@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,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
4
|
-
const _package = require('./package-
|
|
3
|
+
const index = require('./index-010dc207.js');
|
|
4
|
+
const _package = require('./package-8e810a59.js');
|
|
5
5
|
const attributeObserver = require('./attribute-observer-10f08c04.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-5d4e0aed.js');
|
|
7
7
|
|
|
8
8
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
9
9
|
|
|
@@ -4988,7 +4988,7 @@ const PostTooltip = class {
|
|
|
4988
4988
|
}
|
|
4989
4989
|
render() {
|
|
4990
4990
|
const popoverClass = `${this.arrow ? ' has-arrow' : ''}`;
|
|
4991
|
-
return (index.h(index.Host, { key: '
|
|
4991
|
+
return (index.h(index.Host, { key: '71db1ccf3cf929d76550b08e69c8594479eaa84f', "data-version": _package.version, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, index.h("post-popovercontainer", { key: 'b9a38cabbfc2cf2eb9b257bca32022b5d97aac7c', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, index.h("slot", { key: '316b55f5fc55d9607205496a87f02a0a5fa197cf' }))));
|
|
4992
4992
|
}
|
|
4993
4993
|
get host() { return index.getElement(this); }
|
|
4994
4994
|
static get watchers() { return {
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postTooltip = require('./post-tooltip-
|
|
6
|
-
require('./index-
|
|
7
|
-
require('./package-
|
|
5
|
+
const postTooltip = require('./post-tooltip-38c839a4.js');
|
|
6
|
+
require('./index-010dc207.js');
|
|
7
|
+
require('./package-8e810a59.js');
|
|
8
8
|
require('./attribute-observer-10f08c04.js');
|
|
9
|
-
require('./index-
|
|
9
|
+
require('./index-5d4e0aed.js');
|
|
10
10
|
require('./constants-238701d3.js');
|
|
11
11
|
require('./check-one-of-f4f5d0c0.js');
|
|
12
12
|
require('./check-type-64af82a9.js');
|
|
13
|
+
require('./check-url-3ffdd2fb.js');
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const easing = 'ease';
|
|
4
|
+
const duration = 500;
|
|
5
|
+
const fill = 'forwards';
|
|
6
|
+
const slideUp = (el, translateSize = '100%') => {
|
|
7
|
+
return el.animate([
|
|
8
|
+
{ transform: `translateY(${translateSize})` }, // Starting position (no translation)
|
|
9
|
+
{ transform: 'translateY(0)' }, // End position
|
|
10
|
+
], {
|
|
11
|
+
duration: duration,
|
|
12
|
+
easing,
|
|
13
|
+
fill,
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
const slideDown = (el, translateSize = '100%') => {
|
|
17
|
+
return el.animate([
|
|
18
|
+
{ transform: 'translateY(0)' }, // Starting position (no translation)
|
|
19
|
+
{ transform: `translateY(${translateSize})` }, // End position
|
|
20
|
+
], {
|
|
21
|
+
duration: duration,
|
|
22
|
+
easing,
|
|
23
|
+
fill,
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.slideDown = slideDown;
|
|
28
|
+
exports.slideUp = slideUp;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const easing = 'ease';
|
|
2
|
+
const duration = 500;
|
|
3
|
+
const fill = 'forwards';
|
|
4
|
+
export const slideUp = (el, translateSize = '100%') => {
|
|
5
|
+
return el.animate([
|
|
6
|
+
{ transform: `translateY(${translateSize})` }, // Starting position (no translation)
|
|
7
|
+
{ transform: 'translateY(0)' }, // End position
|
|
8
|
+
], {
|
|
9
|
+
duration: duration,
|
|
10
|
+
easing,
|
|
11
|
+
fill,
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
export const slideDown = (el, translateSize = '100%') => {
|
|
15
|
+
return el.animate([
|
|
16
|
+
{ transform: 'translateY(0)' }, // Starting position (no translation)
|
|
17
|
+
{ transform: `translateY(${translateSize})` }, // End position
|
|
18
|
+
], {
|
|
19
|
+
duration: duration,
|
|
20
|
+
easing,
|
|
21
|
+
fill,
|
|
22
|
+
});
|
|
23
|
+
};
|
|
@@ -2,34 +2,38 @@
|
|
|
2
2
|
"entries": [
|
|
3
3
|
"components/post-accordion/post-accordion.js",
|
|
4
4
|
"components/post-accordion-item/post-accordion-item.js",
|
|
5
|
+
"components/post-avatar/post-avatar.js",
|
|
6
|
+
"components/post-back-to-top/post-back-to-top.js",
|
|
5
7
|
"components/post-banner/post-banner.js",
|
|
8
|
+
"components/post-breadcrumb/post-breadcrumb.js",
|
|
6
9
|
"components/post-breadcrumb-item/post-breadcrumb-item.js",
|
|
7
|
-
"components/post-avatar/post-avatar.js",
|
|
8
10
|
"components/post-card-control/post-card-control.js",
|
|
9
11
|
"components/post-closebutton/post-closebutton.js",
|
|
10
12
|
"components/post-collapsible/post-collapsible.js",
|
|
11
13
|
"components/post-collapsible-trigger/post-collapsible-trigger.js",
|
|
14
|
+
"components/post-footer/post-footer.js",
|
|
15
|
+
"components/post-header/post-header.js",
|
|
12
16
|
"components/post-icon/post-icon.js",
|
|
13
17
|
"components/post-language-option/post-language-option.js",
|
|
18
|
+
"components/post-language-switch/post-language-switch.js",
|
|
19
|
+
"components/post-list/post-list.js",
|
|
20
|
+
"components/post-list-item/post-list-item.js",
|
|
14
21
|
"components/post-logo/post-logo.js",
|
|
22
|
+
"components/post-mainnavigation/post-mainnavigation.js",
|
|
23
|
+
"components/post-megadropdown/post-megadropdown.js",
|
|
24
|
+
"components/post-megadropdown-trigger/post-megadropdown-trigger.js",
|
|
15
25
|
"components/post-menu/post-menu.js",
|
|
16
|
-
"components/post-menu-trigger/post-menu-trigger.js",
|
|
17
26
|
"components/post-menu-item/post-menu-item.js",
|
|
27
|
+
"components/post-menu-trigger/post-menu-trigger.js",
|
|
18
28
|
"components/post-popover/post-popover.js",
|
|
19
29
|
"components/post-popovercontainer/post-popovercontainer.js",
|
|
20
30
|
"components/post-rating/post-rating.js",
|
|
21
31
|
"components/post-tabs/post-tabs.js",
|
|
22
32
|
"components/post-tab-header/post-tab-header.js",
|
|
23
33
|
"components/post-tab-panel/post-tab-panel.js",
|
|
24
|
-
"components/post-tooltip/post-tooltip.js",
|
|
25
34
|
"components/post-tag/post-tag.js",
|
|
26
35
|
"components/post-togglebutton/post-togglebutton.js",
|
|
27
|
-
"components/post-
|
|
28
|
-
"components/post-list-item/post-list-item.js",
|
|
29
|
-
"components/post-header/post-header.js",
|
|
30
|
-
"components/post-mainnavigation/post-mainnavigation.js",
|
|
31
|
-
"components/post-megadropdown/post-megadropdown.js",
|
|
32
|
-
"components/post-megadropdown-trigger/post-megadropdown-trigger.js"
|
|
36
|
+
"components/post-tooltip/post-tooltip.js"
|
|
33
37
|
],
|
|
34
38
|
"compiler": {
|
|
35
39
|
"name": "@stencil/core",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:host{display:block}
|
|
1
|
+
:host{display:block}::slotted(post-accordion-item){display:block}::slotted(post-accordion-item:not(:only-of-type:first-of-type)){margin-top:calc(var(--post-device-border-width-default)*-1)}::slotted(post-accordion-item:not(:only-of-type):first-of-type){--post-accordion-button-border-top: var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
:host::after{display:block;content:"";margin-top:calc(var(--post-device-border-width-default)*-1);border-bottom:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}:host:has(.accordion-button:hover)::after{border-color:var(--post-scheme-color-interactive-primary-hover-stroke)}.accordion-header{color:var(--post-scheme-color-interactive-primary-enabled-fg1);font-size:var(--post-device-font-size-5);margin:0;line-height:var(--post-device-line-height-heading);font-weight:var(--post-device-font-weight-black)}.accordion-button{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;display:flex;position:relative;width:100%;align-items:center;text-align:start;gap:var(--post-device-spacing-gap-7);padding:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default)) calc(var(--post-device-spacing-padding-5) + var(--post-device-border-width-default));transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.accordion-button::before{display:block;position:absolute;content:"";inset:0;bottom:auto;border-top:var(--post-accordion-button-border-top)}.accordion-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}.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.accordion-button slot::slotted(span[slot=header]){flex-grow:1}.accordion-button post-icon{flex:none;width:var(--post-core-dimension-24);aspect-ratio:1;transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}.accordion-button.collapsed{padding-block-start:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default));padding-block-end:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default))}.accordion-button.collapsed post-icon{transform:rotate(-180deg)}.accordion-button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}.accordion-button>::slotted(.text-truncate){display:block}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:hover:not(:disabled),.accordion-button:focus-visible:not(:disabled){outline:var(--post-device-border-width-default) solid Highlight}.accordion-button:disabled{opacity:1 !important}}.accordion-body{padding-block-start:var(--post-device-spacing-padding-15);padding-block-end:calc(var(--post-device-spacing-padding-block-25) + var(--post-device-border-width-default));padding-inline:var(--post-device-spacing-padding-5)}.logo-container{display:none;width:var(--post-device-sizing-logo-1);aspect-ratio:1}.logo-container.has-image{display:block}.logo-container slot::slotted(img){display:block;width:100%;height:100%;object-fit:cover}.accordion-button>::slotted(:first-child),.accordion-body>::slotted(:first-child){margin-block-start:0 !important}.accordion-button>::slotted(:last-child),.accordion-body>::slotted(:last-child){margin-block-end:0 !important}
|
|
@@ -3,24 +3,28 @@ import { version } from "../../../../package";
|
|
|
3
3
|
import { HEADING_LEVELS } from "../../types/index";
|
|
4
4
|
import { checkEmptyOrOneOf } from "../../utils/index";
|
|
5
5
|
/**
|
|
6
|
+
* @part button - The pseudo-element, used to override styles on the components internal header `button` element.
|
|
7
|
+
* @part body - The pseudo-element, used to override styles on the components internal `body` element.
|
|
8
|
+
* @slot logo - Slot for the placing a logo before the header.
|
|
6
9
|
* @slot header - Slot for placing custom content within the accordion item's header.
|
|
7
10
|
* @slot default - Slot for placing content within the accordion item's body.
|
|
8
11
|
*/
|
|
9
12
|
export class PostAccordionItem {
|
|
10
13
|
constructor() {
|
|
11
14
|
this.id = undefined;
|
|
15
|
+
this.slottedLogo = undefined;
|
|
12
16
|
this.collapsed = false;
|
|
13
17
|
this.headingLevel = undefined;
|
|
14
18
|
}
|
|
15
19
|
validateHeadingLevel(newValue = this.headingLevel) {
|
|
16
20
|
checkEmptyOrOneOf(newValue, HEADING_LEVELS, 'The `heading-level` property of the `post-accordion-item` must be a number between 1 and 6.');
|
|
17
21
|
}
|
|
18
|
-
componentDidLoad() {
|
|
19
|
-
this.validateHeadingLevel();
|
|
20
|
-
}
|
|
21
22
|
componentWillLoad() {
|
|
22
23
|
this.id = this.host.id || `a${crypto.randomUUID()}`;
|
|
23
24
|
}
|
|
25
|
+
componentDidLoad() {
|
|
26
|
+
this.validateHeadingLevel();
|
|
27
|
+
}
|
|
24
28
|
// capture to make sure the "collapsed" property is updated before the event is consumed
|
|
25
29
|
onCollapseToggle(event) {
|
|
26
30
|
if (event.target === this.host &&
|
|
@@ -34,10 +38,20 @@ export class PostAccordionItem {
|
|
|
34
38
|
async toggle(force) {
|
|
35
39
|
return this.collapsible.toggle(force);
|
|
36
40
|
}
|
|
41
|
+
onSlotLogoChange() {
|
|
42
|
+
this.slottedLogo = this.host.querySelector('img[slot="logo"]');
|
|
43
|
+
}
|
|
44
|
+
componentWillRender() {
|
|
45
|
+
this.slottedLogo = this.host.querySelector('img[slot="logo"]');
|
|
46
|
+
}
|
|
37
47
|
render() {
|
|
38
|
-
var _a;
|
|
39
|
-
const
|
|
40
|
-
|
|
48
|
+
var _a, _b;
|
|
49
|
+
const headingLevel = (_a = this.host.closest('post-accorddion')) === null || _a === void 0 ? void 0 : _a.getAttribute('heading-level');
|
|
50
|
+
const HeadingTag = `h${(_b = headingLevel !== null && headingLevel !== void 0 ? headingLevel : this.headingLevel) !== null && _b !== void 0 ? _b : 2}`;
|
|
51
|
+
return (h(Host, { key: 'e11a8ce9df85f6813f152433d0b5526668415953', id: this.id, "data-version": version }, h("div", { key: 'd62b7f758fca1ffbcef7c6f29b3a0ce48ded9749', part: "accordion-item", class: "accordion-item" }, h("post-collapsible-trigger", { key: '492458d3cda61325d931a83be1f1be1f98f63301', for: `${this.id}--collapse` }, h(HeadingTag, { key: '1a4bc90415504cd00a65922ff5e61221c8368eea', class: "accordion-header", id: `${this.id}--header` }, h("button", { key: 'c14154955c74a4482cc197aca95297ae29ef066f', type: "button", class: `accordion-button${this.collapsed ? ' collapsed' : ''}`, part: "button" }, h("span", { key: '112810b9df4a73bc02a46a98ba2d0ce069168c7c', class: {
|
|
52
|
+
'logo-container': true,
|
|
53
|
+
'has-image': !!this.slottedLogo,
|
|
54
|
+
} }, h("slot", { key: '67e72b84363597fc0e239baccb533b9083251a6b', name: "logo", onSlotchange: this.onSlotLogoChange.bind(this) })), h("slot", { key: '3e9a2b38f621990cabfa84431ca8a7fd39087c88', name: "header" }), h("post-icon", { key: 'e8337b48394b9357b62e517c3b066dfa1bb5f5d7', name: "2051" })))), h("post-collapsible", { key: 'ca23a5a9a8b1615dc4352223a3135514ea5f279a', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, h("div", { key: '668805a03a3ee2facee60ecba0fa549edf0cecba', class: "accordion-body", part: "body" }, h("slot", { key: '3ddf282a59dad61dcd093c11a23f33635c9162d1' }))))));
|
|
41
55
|
}
|
|
42
56
|
static get is() { return "post-accordion-item"; }
|
|
43
57
|
static get encapsulation() { return "shadow"; }
|
|
@@ -101,7 +115,8 @@ export class PostAccordionItem {
|
|
|
101
115
|
}
|
|
102
116
|
static get states() {
|
|
103
117
|
return {
|
|
104
|
-
"id": {}
|
|
118
|
+
"id": {},
|
|
119
|
+
"slottedLogo": {}
|
|
105
120
|
};
|
|
106
121
|
}
|
|
107
122
|
static get methods() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:host{--post-floating-button-translate-y: calc(-1 * var(--post-core-dimension-112));position:fixed;top:var(--post-device-position-1);right:var(--post-device-position-1)}:host .back-to-top{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;box-shadow:.5px 3px 4px rgba(0,0,0,.1),2px 4px 10px 4px rgba(0,0,0,.12);cursor:pointer;border-radius:var(--post-device-border-radius-round);width:var(--post-device-sizing-interactive-button-height-2);height:var(--post-device-sizing-interactive-button-height-2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg);display:flex;align-items:center;justify-content:center}:host .back-to-top{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 .back-to-top: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){:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .back-to-top: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){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .back-to-top:hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}:host .back-to-top post-icon{height:var(--post-device-sizing-interactive-button-icon-3);width:var(--post-device-sizing-interactive-button-icon-3)}:host .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { slideUp, slideDown } from "../../animations/slide";
|
|
3
|
+
import { version } from "../../../../package";
|
|
4
|
+
import { checkType, checkNonEmpty } from "../../utils/index";
|
|
5
|
+
export class PostBackToTop {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.handleScroll = () => {
|
|
8
|
+
this.belowFold = this.isBelowFold();
|
|
9
|
+
};
|
|
10
|
+
this.label = undefined;
|
|
11
|
+
this.belowFold = false;
|
|
12
|
+
}
|
|
13
|
+
isBelowFold() {
|
|
14
|
+
return window.scrollY > window.innerHeight;
|
|
15
|
+
}
|
|
16
|
+
// Watch for changes in belowFold
|
|
17
|
+
watchBelowFold(newValue) {
|
|
18
|
+
if (newValue) {
|
|
19
|
+
slideUp(this.el, this.translateY);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
slideDown(this.el, this.translateY);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
scrollToTop() {
|
|
26
|
+
window.scrollTo({
|
|
27
|
+
top: 0,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
// Validate the label
|
|
31
|
+
validateLabel() {
|
|
32
|
+
checkType(this.label, 'string', 'The label property of the Back to Top component is required for accessibility purposes. Please ensure it is set.');
|
|
33
|
+
checkNonEmpty(this.label, 'The label property of the Back to Top component must not be empty. Please provide a proper text for the label');
|
|
34
|
+
}
|
|
35
|
+
// Set the initial state
|
|
36
|
+
componentWillLoad() {
|
|
37
|
+
this.belowFold = this.isBelowFold();
|
|
38
|
+
}
|
|
39
|
+
componentDidLoad() {
|
|
40
|
+
window.addEventListener('scroll', this.handleScroll, false);
|
|
41
|
+
this.translateY = window
|
|
42
|
+
.getComputedStyle(this.el)
|
|
43
|
+
.getPropertyValue('--post-floating-button-translate-y');
|
|
44
|
+
if (!this.belowFold) {
|
|
45
|
+
this.el.style.transform = `translateY(${this.translateY})`;
|
|
46
|
+
}
|
|
47
|
+
// Initial load
|
|
48
|
+
if (this.belowFold) {
|
|
49
|
+
slideUp(this.el, this.translateY);
|
|
50
|
+
}
|
|
51
|
+
this.validateLabel();
|
|
52
|
+
}
|
|
53
|
+
disconnectedCallback() {
|
|
54
|
+
window.removeEventListener('scroll', this.handleScroll);
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
|
+
return (h(Host, { key: '92d56ff9055c2af38ae47b28c3af20771eed9a39', "data-version": version }, h("button", { key: 'ae305dd5b5a3f8d97553945e547ad45e824e6b7d', class: "back-to-top", "aria-hidden": this.belowFold ? 'false' : 'true', tabindex: this.belowFold ? '0' : '-1', onClick: this.scrollToTop }, h("post-icon", { key: '37792f99d6ef79df4260f6ad1c5780e545f7870a', "aria-hidden": "true", name: "3026" }), h("span", { key: '8768101a26e259c2bd0695a97e6bb4077ad31ae6', class: "visually-hidden" }, this.label))));
|
|
58
|
+
}
|
|
59
|
+
static get is() { return "post-back-to-top"; }
|
|
60
|
+
static get encapsulation() { return "shadow"; }
|
|
61
|
+
static get originalStyleUrls() {
|
|
62
|
+
return {
|
|
63
|
+
"$": ["post-back-to-top.scss"]
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
static get styleUrls() {
|
|
67
|
+
return {
|
|
68
|
+
"$": ["post-back-to-top.css"]
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
static get properties() {
|
|
72
|
+
return {
|
|
73
|
+
"label": {
|
|
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": "The label of the back-to-top button, intended solely for accessibility purposes.\nThis label is always hidden from view."
|
|
86
|
+
},
|
|
87
|
+
"attribute": "label",
|
|
88
|
+
"reflect": false
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
static get states() {
|
|
93
|
+
return {
|
|
94
|
+
"belowFold": {}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
static get elementRef() { return "el"; }
|
|
98
|
+
static get watchers() {
|
|
99
|
+
return [{
|
|
100
|
+
"propName": "belowFold",
|
|
101
|
+
"methodName": "watchBelowFold"
|
|
102
|
+
}, {
|
|
103
|
+
"propName": "label",
|
|
104
|
+
"methodName": "validateLabel"
|
|
105
|
+
}];
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -62,14 +62,14 @@ export class PostBanner {
|
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
64
|
const defaultBannerContent = [
|
|
65
|
-
this.hasHeading && (h("div", { key: `${this.bannerId}-heading`, class: "banner-heading" }, h("slot", { key: '
|
|
65
|
+
this.hasHeading && (h("div", { key: `${this.bannerId}-heading`, class: "banner-heading" }, h("slot", { key: '7c03020bf287d48d71b31a7ae1d973ec0094d0f8', name: "heading" }))),
|
|
66
66
|
h("slot", { key: `${this.bannerId}-message` }),
|
|
67
67
|
];
|
|
68
68
|
const actionBannerContent = [
|
|
69
69
|
h("div", { key: `${this.bannerId}-content`, class: "banner-content" }, defaultBannerContent),
|
|
70
|
-
h("div", { key: `${this.bannerId}-buttons`, class: "banner-buttons" }, h("slot", { key: '
|
|
70
|
+
h("div", { key: `${this.bannerId}-buttons`, class: "banner-buttons" }, h("slot", { key: 'e7a4fca1de6d984560ab46c87c9406e567b482f9', name: "actions" })),
|
|
71
71
|
];
|
|
72
|
-
return (h(Host, { key: '
|
|
72
|
+
return (h(Host, { key: '58fcfe2258e5d5426c713864af729b046c9ed678', "data-version": version }, h("div", { key: '0c54f8b1ece142fd9cd3d071cf36fde2dc5e1d08', role: "alert", class: this.classes, part: this.classes }, this.dismissible && (h("button", { key: '8e1c32b63a39605ad15c550f4cd55ebb5630e4fe', class: "btn-close", onClick: this.onDismissButtonClick }, h("span", { key: 'cea941fe2637f3cabb5889875ca12d6f9818e636', class: "visually-hidden" }, this.dismissLabel))), this.icon && this.icon !== 'none' && (h("post-icon", { key: `${this.bannerId}-icon`, name: this.icon })), this.hasActions ? actionBannerContent : defaultBannerContent)));
|
|
73
73
|
}
|
|
74
74
|
static get is() { return "post-banner"; }
|
|
75
75
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 by Swiss Post, Information Technology
|
|
3
|
+
*/:host{display:flex;align-items:center}.breadcrumbs-nav{display:flex;align-items:center}.hidden-items{gap:var(--post-device-spacing-gap-inline-4);position:absolute;height:0;overflow:hidden;white-space:nowrap}.breadcrumbs-list{display:flex;flex-wrap:nowrap;position:relative;margin:0;padding:0;list-style:none;align-items:center;height:100%;gap:var(--post-device-spacing-gap-inline-4)}post-icon{display:inline-block;box-sizing:border-box;color:var(--post-scheme-color-interactive-primary-enabled-fg1);height:var(--post-core-dimension-24);width:var(--post-core-dimension-24)}.breadcrumb-item-icon{padding-block:var(--post-core-dimension-4);padding-inline:var(--post-core-dimension-4)}li a{display:flex;align-items:center}li a{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}li a: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){li a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){li a: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){li a:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}li a:focus{border-radius:var(--post-device-border-radius-focus)}li a .home-icon{padding-block:var(--post-device-spacing-padding-4);padding-inline:var(--post-device-spacing-padding-4)}li a .home-icon:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){li a .home-icon a,li a .home-icon:focus,li a .home-icon:hover{color:CanvasText !important}}.menu-trigger-wrapper{display:flex;align-items:center;gap:var(--post-device-spacing-gap-inline-5)}.actual-menu{display:flex;align-items:center}post-menu-trigger{display:flex;align-items:center;padding-block:var(--post-device-spacing-padding-block-7)}post-menu-trigger{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-menu-trigger: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-menu-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-menu-trigger: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-menu-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}post-menu-trigger:focus{border-radius:var(--post-device-border-radius-focus)}post-menu-trigger button{background:none;border:none;line-height:150%;font-size:var(--post-device-font-size-6);cursor:pointer;padding:0;color:var(--post-scheme-color-interactive-primary-enabled-fg1)}post-menu-trigger button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-menu-trigger button a,post-menu-trigger button:focus,post-menu-trigger button:hover{color:LinkText !important}}post-menu::part(popover-container){display:flex;flex-direction:column;align-items:start;padding:.6rem;gap:var(--post-device-spacing-gap-inline-4)}post-menu::part(popover-container) ::slotted(post-menu-item:not(:last-child)){margin-bottom:var(--post-device-spacing-gap-inline-4)}.breadcrumb-item{display:flex;align-items:center;justify-content:center;gap:var(--post-device-spacing-gap-inline-5)}.breadcrumb-item a{text-decoration:none;color:inherit;line-height:150%;padding-block:var(--post-device-spacing-padding-block-7);font-size:var(--post-device-font-size-6)}.breadcrumb-item a{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}.breadcrumb-item a: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){.breadcrumb-item a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.breadcrumb-item a: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){.breadcrumb-item a:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.breadcrumb-item a:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item a:focus-visible{border-radius:var(--post-device-border-radius-focus)}.breadcrumb-item span:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item span:focus-visible{border-radius:var(--post-device-border-radius-focus)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item a,.breadcrumb-item:focus,.breadcrumb-item:hover{color:LinkText !important}.breadcrumb-item:visited{color:VisitedText !important}}post-breadcrumb-item:last-of-type{pointer-events:none;color:var(--post-scheme-color-interactive-primary-selected-fg1);font-weight:var(--post-device-font-weight-bold);text-decoration:var(--post-core-text-decoration-none)}post-breadcrumb-item:last-of-type:hover{color:var(--post-scheme-color-interactive-primary-selected-fg1);text-decoration:none}.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}.visually-hidden:not(caption){position:absolute !important}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { version } from "../../../../package";
|
|
3
|
+
import { checkUrl, debounce } from "../../utils/index";
|
|
4
|
+
export class PostBreadcrumb {
|
|
5
|
+
constructor() {
|
|
6
|
+
// Waits for breadcrumb navigation reference to be available
|
|
7
|
+
this.waitForBreadcrumbRef = debounce(() => {
|
|
8
|
+
var _a;
|
|
9
|
+
if (((_a = this.breadcrumbNavRef) === null || _a === void 0 ? void 0 : _a.clientWidth) > 0) {
|
|
10
|
+
this.checkConcatenation();
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
this.waitForBreadcrumbRef();
|
|
14
|
+
}
|
|
15
|
+
}, 50);
|
|
16
|
+
// Handles resizing to check concatenation
|
|
17
|
+
this.handleResize = () => {
|
|
18
|
+
if (window.innerWidth === this.lastWindowWidth)
|
|
19
|
+
return;
|
|
20
|
+
this.lastWindowWidth = window.innerWidth;
|
|
21
|
+
this.checkConcatenation();
|
|
22
|
+
};
|
|
23
|
+
this.homeUrl = undefined;
|
|
24
|
+
this.homeText = 'Home';
|
|
25
|
+
this.breadcrumbItems = [];
|
|
26
|
+
this.isConcatenated = undefined;
|
|
27
|
+
this.lastWindowWidth = undefined;
|
|
28
|
+
}
|
|
29
|
+
validateUrl() {
|
|
30
|
+
checkUrl(this.homeUrl, 'The "url" property of the home-icon is invalid');
|
|
31
|
+
}
|
|
32
|
+
componentWillLoad() {
|
|
33
|
+
this.updateBreadcrumbItems();
|
|
34
|
+
}
|
|
35
|
+
componentDidLoad() {
|
|
36
|
+
window.addEventListener('resize', this.handleResize);
|
|
37
|
+
this.waitForBreadcrumbRef();
|
|
38
|
+
}
|
|
39
|
+
disconnectedCallback() {
|
|
40
|
+
window.removeEventListener('resize', this.handleResize);
|
|
41
|
+
}
|
|
42
|
+
// Updates breadcrumb items and sets the last item
|
|
43
|
+
updateBreadcrumbItems() {
|
|
44
|
+
this.breadcrumbItems = Array.from(this.host.querySelectorAll('post-breadcrumb-item')).map((item) => ({
|
|
45
|
+
text: item.textContent || '',
|
|
46
|
+
url: item.getAttribute('url') || '',
|
|
47
|
+
}));
|
|
48
|
+
this.lastItem = this.breadcrumbItems[this.breadcrumbItems.length - 1];
|
|
49
|
+
}
|
|
50
|
+
// Determines parent width for concatenation logic
|
|
51
|
+
getParentWidth() {
|
|
52
|
+
let parent = this.host.parentNode;
|
|
53
|
+
while (parent && !(parent instanceof HTMLElement)) {
|
|
54
|
+
parent = parent.parentNode;
|
|
55
|
+
}
|
|
56
|
+
return parent instanceof HTMLElement ? parent.clientWidth : window.innerWidth;
|
|
57
|
+
}
|
|
58
|
+
checkConcatenation() {
|
|
59
|
+
var _a;
|
|
60
|
+
if (!this.breadcrumbNavRef)
|
|
61
|
+
return;
|
|
62
|
+
const visibleWidth = this.getParentWidth();
|
|
63
|
+
// Measure all hidden breadcrumb items
|
|
64
|
+
const hiddenItems = Array.from(((_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.hidden-breadcrumb-item')) || []);
|
|
65
|
+
const totalWidth = hiddenItems.reduce((accum, element) => {
|
|
66
|
+
const rect = element.getBoundingClientRect();
|
|
67
|
+
return accum + rect.width;
|
|
68
|
+
}, 0);
|
|
69
|
+
this.isConcatenated = totalWidth > visibleWidth;
|
|
70
|
+
}
|
|
71
|
+
// Handles breadcrumb item click to open the menu
|
|
72
|
+
handleBreadcrumbItemClick() {
|
|
73
|
+
var _a, _b;
|
|
74
|
+
if (this.host.shadowRoot) {
|
|
75
|
+
const menuTrigger = (_b = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.menu-trigger-wrapper')) === null || _b === void 0 ? void 0 : _b.querySelector('button');
|
|
76
|
+
if (menuTrigger) {
|
|
77
|
+
menuTrigger.click();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
render() {
|
|
82
|
+
const visibleItems = this.breadcrumbItems.slice(0, -1);
|
|
83
|
+
return (h(Host, { key: '1baffcf05840127383931baec809e2b94e402e5e', "data-version": version }, h("nav", { key: 'c6725b8aa970f35f15f31ecc56280e7518b2dba9', "aria-label": "Breadcrumb", class: "breadcrumbs-nav", ref: (el) => (this.breadcrumbNavRef = el) }, h("ol", { key: '3166f345dde9f7003b23f5e7a1ddbe587b3fb4be', class: "no-list breadcrumbs-list" }, h("li", { key: '2efcbd6502cc5245ee63fd344a28c8aea4561cde' }, h("a", { key: 'b727c3d880ca9ebb7fc8527263a142662e4d42fd', href: this.homeUrl, class: "breadcrumb-link" }, h("span", { key: 'd683d05bce032759aa224e7a36ef5d7fb3883187', class: "visually-hidden" }, this.homeText), h("post-icon", { key: 'f17d5f56a49f0525d64414c079968d80b0c7eca3', name: "home", class: "home-icon" }))), this.isConcatenated ? (h("div", { class: "menu-trigger-wrapper", "aria-label": "More breadcrumbs", onKeyDown: (e) => {
|
|
84
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
85
|
+
e.preventDefault();
|
|
86
|
+
this.handleBreadcrumbItemClick();
|
|
87
|
+
}
|
|
88
|
+
} }, h("post-icon", { name: "2111", class: "breadcrumb-item-icon" }), h("div", { class: "actual-menu" }, h("post-menu-trigger", { for: "breadcrumb-menu", tabIndex: 0 }, h("button", { class: "btn test", tabIndex: -1 }, "...")), h("post-menu", { id: "breadcrumb-menu" }, visibleItems.map((item) => (h("post-menu-item", { key: item.url || item.text, class: "breadcrumb-item", onKeyDown: (e) => {
|
|
89
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
90
|
+
const linkElement = e.currentTarget.querySelector('a');
|
|
91
|
+
linkElement === null || linkElement === void 0 ? void 0 : linkElement.click();
|
|
92
|
+
e.preventDefault();
|
|
93
|
+
}
|
|
94
|
+
} }, item.url ? h("a", { href: item.url }, item.text) : h("span", null, item.text)))))))) : (visibleItems.map((item) => (h("post-breadcrumb-item", { url: item.url, key: item.url || item.text }, item.text)))), this.lastItem && (h("post-breadcrumb-item", { key: '674dd84e23c325f874f57b92b0171b47d600d463', url: this.lastItem.url, "aria-current": "page", tabindex: -1 }, this.lastItem.text))), h("div", { key: 'b4131833874403a8166446991510a36003a21aed', class: "hidden-items" }, h("a", { key: 'aa31950651d486afdb97974c24929cc80e0c3f53', href: this.homeUrl, class: "hidden-breadcrumb-item" }, h("span", { key: 'e9d1f5e225220a5942f8844dc26014f1278f935f', class: "visually-hidden" }, this.homeText), h("post-icon", { key: '493a91739d10c3e536da52d636aca4b305f88273', name: "home", class: "home-icon" })), this.breadcrumbItems.map((item) => (h("post-breadcrumb-item", { url: item.url, key: `hidden-${item.url || item.text}`, class: "hidden-breadcrumb-item" }, item.text)))))));
|
|
95
|
+
}
|
|
96
|
+
static get is() { return "post-breadcrumb"; }
|
|
97
|
+
static get encapsulation() { return "shadow"; }
|
|
98
|
+
static get originalStyleUrls() {
|
|
99
|
+
return {
|
|
100
|
+
"$": ["post-breadcrumb.scss"]
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
static get styleUrls() {
|
|
104
|
+
return {
|
|
105
|
+
"$": ["post-breadcrumb.css"]
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
static get properties() {
|
|
109
|
+
return {
|
|
110
|
+
"homeUrl": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"mutable": false,
|
|
113
|
+
"complexType": {
|
|
114
|
+
"original": "string",
|
|
115
|
+
"resolved": "string",
|
|
116
|
+
"references": {}
|
|
117
|
+
},
|
|
118
|
+
"required": false,
|
|
119
|
+
"optional": false,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [],
|
|
122
|
+
"text": "The URL for the home breadcrumb item."
|
|
123
|
+
},
|
|
124
|
+
"attribute": "home-url",
|
|
125
|
+
"reflect": false
|
|
126
|
+
},
|
|
127
|
+
"homeText": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"mutable": false,
|
|
130
|
+
"complexType": {
|
|
131
|
+
"original": "string",
|
|
132
|
+
"resolved": "string",
|
|
133
|
+
"references": {}
|
|
134
|
+
},
|
|
135
|
+
"required": false,
|
|
136
|
+
"optional": false,
|
|
137
|
+
"docs": {
|
|
138
|
+
"tags": [],
|
|
139
|
+
"text": "The text label for the home breadcrumb item."
|
|
140
|
+
},
|
|
141
|
+
"attribute": "home-text",
|
|
142
|
+
"reflect": false,
|
|
143
|
+
"defaultValue": "'Home'"
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
static get states() {
|
|
148
|
+
return {
|
|
149
|
+
"breadcrumbItems": {},
|
|
150
|
+
"isConcatenated": {},
|
|
151
|
+
"lastWindowWidth": {}
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
static get elementRef() { return "host"; }
|
|
155
|
+
static get watchers() {
|
|
156
|
+
return [{
|
|
157
|
+
"propName": "homeUrl",
|
|
158
|
+
"methodName": "validateUrl"
|
|
159
|
+
}];
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:host{display:inline-
|
|
1
|
+
:host{display:flex;align-items:center;justify-content:start;gap:var(--post-device-spacing-gap-inline-5)}:host post-icon{box-sizing:border-box;height:var(--post-core-dimension-24);width:var(--post-core-dimension-24);padding-block:var(--post-core-dimension-4);padding-inline:var(--post-core-dimension-4)}.breadcrumb-item{white-space:nowrap;line-height:150%;padding-block:var(--post-device-spacing-padding-block-7);color:var(--post-scheme-color-interactive-primary-enabled-fg1);text-decoration:var(--post-core-text-decoration-none)}.breadcrumb-item{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}.breadcrumb-item: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){.breadcrumb-item:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.breadcrumb-item: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){.breadcrumb-item:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.breadcrumb-item:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item:focus-visible{border-radius:var(--post-device-border-radius-focus)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item,.breadcrumb-item:focus,.breadcrumb-item:hover{color:LinkText !important}.breadcrumb-item:visited{color:VisitedText !important}}
|
|
@@ -31,9 +31,19 @@ export class PostBreadcrumbItem {
|
|
|
31
31
|
connectedCallback() {
|
|
32
32
|
this.validateUrl();
|
|
33
33
|
}
|
|
34
|
+
handleKeyDown(event) {
|
|
35
|
+
var _a;
|
|
36
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
37
|
+
const linkElement = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('a');
|
|
38
|
+
if (linkElement) {
|
|
39
|
+
event.preventDefault();
|
|
40
|
+
linkElement.click();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
34
44
|
render() {
|
|
35
45
|
const BreadcrumbTag = this.validUrl ? 'a' : 'span';
|
|
36
|
-
return (h(Host, { key: '
|
|
46
|
+
return (h(Host, { key: 'b64295c6b59c2e200fe0eae5483e60b733f5eb8c', "data-version": version }, h("post-icon", { key: '0e8a0712f03b551206e8cfeef51446f318d60f20', name: "2111", class: "breadcrumb-item-icon" }), h(BreadcrumbTag, Object.assign({ key: 'd3e218f0b3b8feab97cbce6a8190dcddc0b92c92', class: "breadcrumb-item" }, (this.validUrl ? { href: this.validUrl } : {}), { onKeyDown: (event) => this.handleKeyDown(event) }), h("slot", { key: 'dea5990614b38fcaab1fae46aafa6c2ed652cf9a' }))));
|
|
37
47
|
}
|
|
38
48
|
static get is() { return "post-breadcrumb-item"; }
|
|
39
49
|
static get encapsulation() { return "shadow"; }
|