@swisspost/design-system-components 9.0.0-next.8 → 9.0.0
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/index-e1f32cce.js +16 -36
- package/dist/cjs/index.cjs.js +23 -44
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-a2b895fc.js → package-3ed88bb9.js} +1 -1
- package/dist/cjs/{post-accordion-3ce01432.js → post-accordion-9ef382e8.js} +2 -2
- package/dist/cjs/post-accordion-item-5f685bee.js +52 -0
- package/dist/cjs/post-accordion-item.cjs.entry.js +2 -2
- package/dist/cjs/post-accordion.cjs.entry.js +2 -2
- package/dist/cjs/post-alert-88adc668.js +99 -0
- package/dist/cjs/{post-banner.cjs.entry.js → post-alert.cjs.entry.js} +3 -3
- package/dist/cjs/post-card-control-c6e5c427.js +272 -0
- package/dist/cjs/post-card-control.cjs.entry.js +2 -2
- package/dist/cjs/{post-collapsible-trigger-8ca4d85b.js → post-collapsible-trigger-1764e6dc.js} +12 -7
- package/dist/cjs/post-collapsible_2.cjs.entry.js +2 -3
- package/dist/cjs/post-components.cjs.js +1 -1
- package/dist/cjs/post-icon-f735da00.js +139 -0
- package/dist/cjs/{post-language-option.cjs.entry.js → post-icon.cjs.entry.js} +4 -3
- package/dist/cjs/post-logo-2cd8ae98.js +39 -0
- package/dist/cjs/{post-breadcrumb-item.cjs.entry.js → post-logo.cjs.entry.js} +3 -3
- package/dist/cjs/post-popover-36c854a4.js +131 -0
- package/dist/cjs/post-popover.cjs.entry.js +2 -3
- package/dist/cjs/{post-megadropdown-trigger-7376d867.js → post-popovercontainer-cb4793c1.js} +142 -545
- package/dist/cjs/post-popovercontainer.cjs.entry.js +11 -0
- package/dist/cjs/post-rating-d5073d8d.js +88 -0
- package/dist/cjs/post-rating.cjs.entry.js +2 -2
- package/dist/cjs/post-tab-header-b756d9b1.js +32 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-panel-34aed8e6.js → post-tab-panel-97b79ecd.js} +2 -2
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/{post-tabs-dd2da5d2.js → post-tabs-834497f2.js} +8 -6
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/post-tag-c70fb945.js +47 -0
- package/dist/cjs/post-tag.cjs.entry.js +2 -2
- package/dist/cjs/post-tooltip-20ebe011.js +69 -0
- package/dist/cjs/{post-tooltip-3e0c1509.js → post-tooltip-trigger-6f4c9748.js} +506 -556
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +12 -0
- package/dist/cjs/post-tooltip.cjs.entry.js +2 -6
- package/dist/collection/collection-manifest.json +3 -17
- package/dist/collection/components/post-accordion/post-accordion.css +1 -1
- package/dist/collection/components/post-accordion/post-accordion.js +2 -2
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +8 -19
- package/dist/collection/components/post-alert/alert-types.js +1 -0
- package/dist/collection/components/post-alert/post-alert.css +35 -0
- package/dist/collection/components/{post-banner/post-banner.js → post-alert/post-alert.js} +68 -39
- package/dist/collection/components/post-card-control/post-card-control.css +30 -2
- package/dist/collection/components/post-card-control/post-card-control.js +8 -8
- package/dist/collection/components/post-collapsible/post-collapsible.js +2 -4
- package/dist/collection/components/post-icon/post-icon.css +1 -1
- package/dist/collection/components/post-icon/post-icon.js +52 -13
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-popover/post-popover.css +30 -2
- package/dist/collection/components/post-popover/post-popover.js +10 -6
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +31 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +180 -52
- package/dist/collection/components/post-rating/post-rating.css +29 -1
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.css +29 -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.css +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +6 -4
- package/dist/collection/components/post-tag/post-tag.css +29 -1
- package/dist/collection/components/post-tag/post-tag.js +2 -2
- package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +60 -213
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.css +1 -0
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +230 -0
- package/dist/collection/index.js +2 -16
- package/dist/components/index.js +2 -16
- package/dist/components/index2.js +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +10 -27
- package/dist/components/post-accordion2.js +1 -1
- package/dist/components/{post-menu.d.ts → post-alert.d.ts} +4 -4
- package/dist/components/post-alert.js +6 -0
- package/dist/components/post-alert2.js +136 -0
- package/dist/components/post-card-control2.js +3 -3
- package/dist/components/post-collapsible-trigger2.js +8 -1
- package/dist/components/post-collapsible2.js +3 -5
- package/dist/components/post-icon2.js +54 -15
- package/dist/components/post-logo2.js +2 -2
- package/dist/components/post-popover2.js +35 -8
- package/dist/components/post-popovercontainer2.js +136 -41
- package/dist/components/post-rating2.js +2 -2
- package/dist/components/post-tab-header2.js +2 -2
- package/dist/components/post-tab-panel2.js +1 -1
- package/dist/components/post-tabs2.js +7 -5
- package/dist/components/post-tag2.js +2 -2
- package/dist/components/{post-banner.d.ts → post-tooltip-trigger.d.ts} +4 -4
- package/dist/components/post-tooltip-trigger.js +6 -0
- package/dist/components/post-tooltip-trigger2.js +4968 -0
- package/dist/components/post-tooltip2.js +32 -4962
- package/dist/docs.json +290 -1288
- package/dist/esm/{index-f8a00dc0.js → index-69587a51.js} +1 -1
- package/dist/esm/index-e1b64755.js +16 -36
- package/dist/esm/index.js +19 -26
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-983f957d.js +3 -0
- package/dist/esm/{post-accordion-19e88941.js → post-accordion-ad570427.js} +2 -2
- package/dist/esm/post-accordion-item-4db0aa2a.js +50 -0
- package/dist/esm/post-accordion-item.entry.js +3 -3
- package/dist/esm/post-accordion.entry.js +2 -2
- package/dist/esm/post-alert-1e9fbdfa.js +97 -0
- package/dist/esm/{post-banner.entry.js → post-alert.entry.js} +3 -3
- package/dist/esm/post-card-control-ccb189a8.js +270 -0
- package/dist/esm/post-card-control.entry.js +2 -2
- package/dist/esm/{post-collapsible-trigger-1d939eb6.js → post-collapsible-trigger-45fe328a.js} +12 -7
- package/dist/esm/post-collapsible_2.entry.js +3 -4
- package/dist/esm/post-components.js +1 -1
- package/dist/esm/post-icon-3fc4dd7d.js +137 -0
- package/dist/esm/post-icon.entry.js +8 -0
- package/dist/esm/post-logo-e6cdea13.js +37 -0
- package/dist/esm/post-logo.entry.js +7 -0
- package/dist/esm/post-popover-afdf4906.js +129 -0
- package/dist/esm/post-popover.entry.js +2 -3
- package/dist/esm/{post-megadropdown-trigger-210b4ab3.js → post-popovercontainer-b19b7606.js} +144 -538
- package/dist/esm/post-popovercontainer.entry.js +3 -0
- package/dist/esm/post-rating-f60024fa.js +86 -0
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/post-tab-header-333e15d5.js +30 -0
- package/dist/esm/post-tab-header.entry.js +2 -2
- package/dist/esm/{post-tab-panel-afce8d40.js → post-tab-panel-0ddb05a2.js} +2 -2
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/{post-tabs-fbb42496.js → post-tabs-ab7853cf.js} +8 -6
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/post-tag-4a7d14b9.js +45 -0
- package/dist/esm/post-tag.entry.js +2 -2
- package/dist/esm/post-tooltip-c03cd719.js +67 -0
- package/dist/esm/{post-tooltip-7101ed24.js → post-tooltip-trigger-1fefc8ad.js} +506 -556
- package/dist/esm/post-tooltip-trigger.entry.js +4 -0
- package/dist/esm/post-tooltip.entry.js +2 -6
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-0a45da5e.entry.js +1 -0
- package/dist/post-components/p-12e82863.entry.js +1 -0
- package/dist/post-components/p-1386b77d.js +1 -0
- package/dist/post-components/p-1528b798.js +1 -0
- package/dist/post-components/p-18dc1299.entry.js +1 -0
- package/dist/post-components/p-1a8f6c84.entry.js +1 -0
- package/dist/post-components/p-256453ca.js +1 -0
- package/dist/post-components/p-3272ebad.js +1 -0
- package/dist/post-components/p-3596035e.js +1 -0
- package/dist/post-components/p-3668f4fa.entry.js +1 -0
- package/dist/post-components/p-375845d4.js +1 -0
- package/dist/post-components/p-381de59d.entry.js +1 -0
- package/dist/post-components/p-4e68c514.js +1 -0
- package/dist/post-components/p-4eb5d9a1.entry.js +1 -0
- package/dist/post-components/p-61a7d216.js +1 -0
- package/dist/post-components/{p-0338f9da.js → p-788e64fb.js} +1 -1
- package/dist/post-components/p-7d5b41d1.js +1 -0
- package/dist/post-components/p-82ea24e7.js +1 -0
- package/dist/post-components/p-85c4d04f.js +1 -0
- package/dist/post-components/p-85c6d001.entry.js +1 -0
- package/dist/post-components/p-8e555dda.js +15 -0
- package/dist/post-components/p-962a6f36.entry.js +1 -0
- package/dist/post-components/p-a76c71bc.js +1 -0
- package/dist/post-components/p-a7e8fd41.entry.js +1 -0
- package/dist/post-components/p-ac216bd0.entry.js +1 -0
- package/dist/post-components/p-b17ecbee.entry.js +1 -0
- package/dist/post-components/p-bb4227ad.entry.js +1 -0
- package/dist/post-components/p-bc294d0b.js +1 -0
- package/dist/post-components/p-d0b3c5d3.entry.js +1 -0
- package/dist/post-components/p-d4e148d8.entry.js +1 -0
- package/dist/post-components/p-d9809281.js +1 -0
- package/dist/post-components/p-eb1e7a49.js +1 -0
- package/dist/post-components/p-f35291d5.entry.js +1 -0
- package/dist/post-components/p-fc3bfe08.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-accordion/post-accordion.d.ts +1 -1
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +1 -5
- package/dist/types/components/post-alert/alert-types.d.ts +2 -0
- package/dist/types/components/post-alert/post-alert.d.ts +54 -0
- package/dist/types/components/post-card-control/post-card-control.d.ts +7 -7
- package/dist/types/components/post-icon/post-icon.d.ts +1 -1
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +31 -13
- package/dist/types/components/post-tag/post-tag.d.ts +1 -1
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +20 -34
- package/dist/types/components/post-tooltip-trigger/post-tooltip-trigger.d.ts +47 -0
- package/dist/types/components.d.ts +124 -490
- package/dist/types/index.d.ts +2 -16
- package/loaders/index.d.ts +4 -32
- package/loaders/index.js +4 -18
- package/loaders/index2.js +1 -1
- package/loaders/package.js +1 -1
- package/loaders/post-accordion-item.js +11 -28
- package/loaders/post-accordion.js +1 -1
- package/loaders/{post-menu.d.ts → post-alert.d.ts} +4 -4
- package/loaders/post-alert.js +139 -0
- package/loaders/post-card-control.js +3 -3
- package/loaders/post-collapsible-trigger2.js +8 -1
- package/loaders/post-collapsible2.js +3 -5
- package/loaders/post-icon2.js +54 -15
- package/loaders/post-logo.js +2 -2
- package/loaders/post-popover.js +35 -8
- package/loaders/post-popovercontainer2.js +136 -41
- package/loaders/post-rating.js +2 -2
- package/loaders/post-tab-header.js +2 -2
- package/loaders/post-tab-panel.js +1 -1
- package/loaders/post-tabs.js +7 -5
- package/loaders/post-tag.js +2 -2
- package/loaders/{post-avatar.d.ts → post-tooltip-trigger.d.ts} +4 -4
- package/loaders/post-tooltip-trigger.js +4971 -0
- package/loaders/post-tooltip.js +32 -4962
- package/package.json +5 -7
- package/dist/cjs/attribute-observer-10f08c04.js +0 -27
- package/dist/cjs/get-root-7a3498ef.js +0 -11
- package/dist/cjs/post-accordion-item-81601b1e.js +0 -62
- package/dist/cjs/post-avatar-b1c97f51.js +0 -148
- package/dist/cjs/post-avatar.cjs.entry.js +0 -13
- package/dist/cjs/post-back-to-top-0ce98569.js +0 -98
- package/dist/cjs/post-back-to-top.cjs.entry.js +0 -14
- package/dist/cjs/post-banner-8611eab5.js +0 -90
- package/dist/cjs/post-breadcrumb-item-2075462a.js +0 -49
- package/dist/cjs/post-card-control-acd30573.js +0 -272
- package/dist/cjs/post-closebutton_10.cjs.entry.js +0 -25
- package/dist/cjs/post-language-option-cf32d0ed.js +0 -68
- package/dist/cjs/post-menu-a3b7b63b.js +0 -176
- package/dist/cjs/post-menu-item-28ab1a72.js +0 -20
- package/dist/cjs/post-menu-item.cjs.entry.js +0 -11
- package/dist/cjs/post-menu-trigger-821839f5.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-popover-c4f50134.js +0 -104
- package/dist/cjs/post-rating-3a87ca46.js +0 -88
- package/dist/cjs/post-tab-header-5fdb05a1.js +0 -32
- package/dist/cjs/post-tag-59232922.js +0 -47
- package/dist/cjs/post-togglebutton-59c6357b.js +0 -28
- package/dist/cjs/post-togglebutton.cjs.entry.js +0 -11
- package/dist/collection/animations/slide.js +0 -23
- package/dist/collection/components/post-avatar/post-avatar.css +0 -3
- package/dist/collection/components/post-avatar/post-avatar.js +0 -237
- package/dist/collection/components/post-back-to-top/post-back-to-top.css +0 -1
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +0 -107
- package/dist/collection/components/post-banner/banner-types.js +0 -1
- package/dist/collection/components/post-banner/post-banner.css +0 -3
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +0 -1
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +0 -83
- package/dist/collection/components/post-closebutton/post-closebutton.js +0 -12
- package/dist/collection/components/post-header/post-header.css +0 -1
- package/dist/collection/components/post-header/post-header.js +0 -103
- package/dist/collection/components/post-language-option/post-language-option.css +0 -3
- package/dist/collection/components/post-language-option/post-language-option.js +0 -191
- package/dist/collection/components/post-list/post-list.css +0 -3
- package/dist/collection/components/post-list/post-list.js +0 -87
- package/dist/collection/components/post-list-item/post-list-item.css +0 -1
- package/dist/collection/components/post-list-item/post-list-item.js +0 -25
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +0 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +0 -61
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +0 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +0 -137
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +0 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +0 -48
- package/dist/collection/components/post-menu/post-menu.css +0 -3
- package/dist/collection/components/post-menu/post-menu.js +0 -278
- package/dist/collection/components/post-menu-item/post-menu-item.css +0 -1
- package/dist/collection/components/post-menu-item/post-menu-item.js +0 -20
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.css +0 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +0 -104
- package/dist/collection/components/post-togglebutton/post-togglebutton.css +0 -1
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +0 -56
- package/dist/collection/utils/is-focusable.js +0 -26
- package/dist/components/attribute-observer.js +0 -25
- package/dist/components/get-root.js +0 -9
- package/dist/components/post-avatar.d.ts +0 -11
- package/dist/components/post-avatar.js +0 -6
- package/dist/components/post-avatar2.js +0 -173
- package/dist/components/post-back-to-top.d.ts +0 -11
- package/dist/components/post-back-to-top.js +0 -6
- package/dist/components/post-back-to-top2.js +0 -123
- package/dist/components/post-banner.js +0 -6
- package/dist/components/post-banner2.js +0 -125
- package/dist/components/post-breadcrumb-item.d.ts +0 -11
- package/dist/components/post-breadcrumb-item.js +0 -6
- package/dist/components/post-breadcrumb-item2.js +0 -72
- package/dist/components/post-closebutton.d.ts +0 -11
- package/dist/components/post-closebutton.js +0 -6
- package/dist/components/post-closebutton2.js +0 -34
- package/dist/components/post-header.d.ts +0 -11
- package/dist/components/post-header.js +0 -6
- package/dist/components/post-header2.js +0 -235
- package/dist/components/post-language-option.d.ts +0 -11
- package/dist/components/post-language-option.js +0 -6
- package/dist/components/post-language-option2.js +0 -92
- package/dist/components/post-list-item.d.ts +0 -11
- package/dist/components/post-list-item.js +0 -6
- package/dist/components/post-list-item2.js +0 -35
- package/dist/components/post-list.d.ts +0 -11
- package/dist/components/post-list.js +0 -6
- package/dist/components/post-list2.js +0 -53
- package/dist/components/post-mainnavigation.d.ts +0 -11
- package/dist/components/post-mainnavigation.js +0 -6
- package/dist/components/post-mainnavigation2.js +0 -48
- package/dist/components/post-megadropdown-trigger.d.ts +0 -11
- package/dist/components/post-megadropdown-trigger.js +0 -6
- package/dist/components/post-megadropdown-trigger2.js +0 -39
- package/dist/components/post-megadropdown.d.ts +0 -11
- package/dist/components/post-megadropdown.js +0 -6
- package/dist/components/post-megadropdown2.js +0 -67
- package/dist/components/post-menu-item.d.ts +0 -11
- package/dist/components/post-menu-item.js +0 -6
- package/dist/components/post-menu-item2.js +0 -33
- package/dist/components/post-menu-trigger.d.ts +0 -11
- package/dist/components/post-menu-trigger.js +0 -6
- package/dist/components/post-menu-trigger2.js +0 -92
- package/dist/components/post-menu.js +0 -6
- package/dist/components/post-menu2.js +0 -201
- package/dist/components/post-togglebutton.d.ts +0 -11
- package/dist/components/post-togglebutton.js +0 -6
- package/dist/components/post-togglebutton2.js +0 -43
- package/dist/esm/attribute-observer-37fa950a.js +0 -25
- package/dist/esm/get-root-7af2e0d1.js +0 -9
- package/dist/esm/package-9cafe148.js +0 -3
- package/dist/esm/post-accordion-item-33bbe4de.js +0 -60
- package/dist/esm/post-avatar-d15a9f9e.js +0 -146
- package/dist/esm/post-avatar.entry.js +0 -5
- package/dist/esm/post-back-to-top-bcf46150.js +0 -96
- package/dist/esm/post-back-to-top.entry.js +0 -6
- package/dist/esm/post-banner-bf5e6a18.js +0 -88
- package/dist/esm/post-breadcrumb-item-e3b41f74.js +0 -47
- package/dist/esm/post-breadcrumb-item.entry.js +0 -7
- package/dist/esm/post-card-control-f0788f6f.js +0 -270
- package/dist/esm/post-closebutton_10.entry.js +0 -8
- package/dist/esm/post-language-option-1436370d.js +0 -66
- package/dist/esm/post-language-option.entry.js +0 -7
- package/dist/esm/post-menu-e853e28b.js +0 -174
- package/dist/esm/post-menu-item-86d4c7ab.js +0 -18
- package/dist/esm/post-menu-item.entry.js +0 -3
- package/dist/esm/post-menu-trigger-80c2bdf4.js +0 -73
- package/dist/esm/post-menu-trigger.entry.js +0 -5
- package/dist/esm/post-menu.entry.js +0 -3
- package/dist/esm/post-popover-7195d05a.js +0 -102
- package/dist/esm/post-rating-8baf86fe.js +0 -86
- package/dist/esm/post-tab-header-a1d1d9d0.js +0 -30
- package/dist/esm/post-tag-d67b6a19.js +0 -45
- package/dist/esm/post-togglebutton-c3fb912d.js +0 -26
- package/dist/esm/post-togglebutton.entry.js +0 -3
- package/dist/post-components/p-00fa0152.js +0 -1
- package/dist/post-components/p-1667387e.entry.js +0 -1
- package/dist/post-components/p-19551c18.entry.js +0 -1
- package/dist/post-components/p-1b627f80.js +0 -1
- package/dist/post-components/p-24673919.js +0 -1
- package/dist/post-components/p-266b734f.entry.js +0 -1
- package/dist/post-components/p-282115c4.js +0 -1
- package/dist/post-components/p-2d0ffc1e.entry.js +0 -1
- package/dist/post-components/p-45018d7e.entry.js +0 -1
- package/dist/post-components/p-485dafcf.js +0 -1
- package/dist/post-components/p-4a647a78.js +0 -1
- package/dist/post-components/p-4abfa65b.js +0 -1
- package/dist/post-components/p-517f2b1f.entry.js +0 -1
- package/dist/post-components/p-55224ee7.entry.js +0 -1
- package/dist/post-components/p-558a9849.js +0 -1
- package/dist/post-components/p-59b31557.js +0 -1
- package/dist/post-components/p-5d1db85c.entry.js +0 -1
- package/dist/post-components/p-61e79941.js +0 -1
- package/dist/post-components/p-679978de.entry.js +0 -1
- package/dist/post-components/p-6a842b96.entry.js +0 -1
- package/dist/post-components/p-6adeaa6c.js +0 -1
- package/dist/post-components/p-6cea23cd.js +0 -15
- package/dist/post-components/p-71f03424.js +0 -1
- package/dist/post-components/p-8c2568c1.entry.js +0 -1
- package/dist/post-components/p-8fd3a3cb.entry.js +0 -1
- package/dist/post-components/p-939f2ba7.js +0 -1
- package/dist/post-components/p-a4c39296.entry.js +0 -1
- package/dist/post-components/p-af5d3b89.entry.js +0 -1
- package/dist/post-components/p-b4423249.entry.js +0 -1
- package/dist/post-components/p-c31a7d65.entry.js +0 -1
- package/dist/post-components/p-c544bb82.js +0 -1
- package/dist/post-components/p-ccb6dfa1.js +0 -1
- package/dist/post-components/p-d0b8820a.js +0 -1
- package/dist/post-components/p-d36adfb5.js +0 -1
- package/dist/post-components/p-da6a8268.entry.js +0 -1
- package/dist/post-components/p-ece14d88.js +0 -1
- package/dist/post-components/p-f0f8427e.js +0 -1
- package/dist/post-components/p-f2e1b4d8.js +0 -1
- package/dist/post-components/p-f627744e.js +0 -1
- package/dist/post-components/p-f7b6b96a.entry.js +0 -1
- package/dist/post-components/p-f812e93d.entry.js +0 -1
- package/dist/post-components/p-f8d41c32.js +0 -1
- package/dist/post-components/p-fc91cbc2.js +0 -1
- package/dist/post-components/p-fe516cdf.entry.js +0 -1
- package/dist/post-components/p-fe7467fb.entry.js +0 -1
- package/dist/types/animations/slide.d.ts +0 -2
- package/dist/types/components/post-avatar/post-avatar.d.ts +0 -51
- package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +0 -19
- package/dist/types/components/post-banner/banner-types.d.ts +0 -2
- package/dist/types/components/post-banner/post-banner.d.ts +0 -49
- package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +0 -15
- package/dist/types/components/post-closebutton/post-closebutton.d.ts +0 -7
- package/dist/types/components/post-header/post-header.d.ts +0 -16
- package/dist/types/components/post-language-option/post-language-option.d.ts +0 -40
- package/dist/types/components/post-list/post-list.d.ts +0 -24
- package/dist/types/components/post-list-item/post-list-item.d.ts +0 -8
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +0 -10
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +0 -23
- package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +0 -10
- package/dist/types/components/post-menu/post-menu.d.ts +0 -47
- package/dist/types/components/post-menu-item/post-menu-item.d.ts +0 -4
- package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +0 -27
- package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +0 -13
- package/dist/types/utils/is-focusable.d.ts +0 -1
- package/loaders/attribute-observer.js +0 -25
- package/loaders/get-root.js +0 -9
- package/loaders/post-avatar.js +0 -176
- package/loaders/post-back-to-top.d.ts +0 -11
- package/loaders/post-back-to-top.js +0 -126
- package/loaders/post-banner.d.ts +0 -11
- package/loaders/post-banner.js +0 -128
- package/loaders/post-breadcrumb-item.d.ts +0 -11
- package/loaders/post-breadcrumb-item.js +0 -75
- package/loaders/post-closebutton.d.ts +0 -11
- package/loaders/post-closebutton.js +0 -37
- package/loaders/post-header.d.ts +0 -11
- package/loaders/post-header.js +0 -238
- package/loaders/post-language-option.d.ts +0 -11
- package/loaders/post-language-option.js +0 -95
- package/loaders/post-list-item.d.ts +0 -11
- package/loaders/post-list-item.js +0 -38
- package/loaders/post-list.d.ts +0 -11
- package/loaders/post-list.js +0 -56
- package/loaders/post-mainnavigation.d.ts +0 -11
- package/loaders/post-mainnavigation.js +0 -51
- package/loaders/post-megadropdown-trigger.d.ts +0 -11
- package/loaders/post-megadropdown-trigger.js +0 -42
- package/loaders/post-megadropdown.d.ts +0 -11
- package/loaders/post-megadropdown.js +0 -70
- package/loaders/post-menu-item.d.ts +0 -11
- package/loaders/post-menu-item.js +0 -36
- package/loaders/post-menu-trigger.d.ts +0 -11
- package/loaders/post-menu-trigger.js +0 -95
- package/loaders/post-menu.js +0 -204
- package/loaders/post-togglebutton.d.ts +0 -11
- package/loaders/post-togglebutton.js +0 -46
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { version } from "../../../../package";
|
|
3
|
-
import { isFocusable } from "../../utils/is-focusable";
|
|
4
|
-
export class PostMenu {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.lastFocusedElement = null;
|
|
7
|
-
this.KEYCODES = {
|
|
8
|
-
SPACE: ' ',
|
|
9
|
-
ENTER: 'Enter',
|
|
10
|
-
UP: 'ArrowUp',
|
|
11
|
-
DOWN: 'ArrowDown',
|
|
12
|
-
TAB: 'Tab',
|
|
13
|
-
HOME: 'Home',
|
|
14
|
-
END: 'End',
|
|
15
|
-
ESCAPE: 'Escape'
|
|
16
|
-
};
|
|
17
|
-
this.handleKeyDown = (e) => {
|
|
18
|
-
e.stopPropagation();
|
|
19
|
-
if (e.key === this.KEYCODES.ESCAPE) {
|
|
20
|
-
this.toggle(this.host);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
if (Object.values(this.KEYCODES).includes(e.key)) {
|
|
24
|
-
this.controlKeyDownHandler(e);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
this.handleClick = (e) => {
|
|
28
|
-
const target = e.target;
|
|
29
|
-
if (['BUTTON', 'A', 'INPUT', 'SELECT', 'TEXTAREA'].includes(target.tagName)) {
|
|
30
|
-
this.toggle(this.host);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
this.placement = 'bottom';
|
|
34
|
-
this.isVisible = false;
|
|
35
|
-
}
|
|
36
|
-
connectedCallback() {
|
|
37
|
-
this.host.addEventListener('keydown', this.handleKeyDown);
|
|
38
|
-
this.host.addEventListener('click', this.handleClick);
|
|
39
|
-
}
|
|
40
|
-
disconnectedCallback() {
|
|
41
|
-
this.host.removeEventListener('keydown', this.handleKeyDown);
|
|
42
|
-
this.host.removeEventListener('click', this.handleClick);
|
|
43
|
-
}
|
|
44
|
-
componentDidLoad() {
|
|
45
|
-
this.popoverRef.addEventListener('postToggle', (event) => {
|
|
46
|
-
this.isVisible = event.detail;
|
|
47
|
-
this.toggleMenu.emit(this.isVisible);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Toggles the menu visibility based on its current state.
|
|
52
|
-
*/
|
|
53
|
-
async toggle(target) {
|
|
54
|
-
this.isVisible ? await this.hide() : await this.show(target);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Displays the popover menu, focusing the first menu item.
|
|
58
|
-
*
|
|
59
|
-
* @param target - The HTML element relative to which the popover menu should be displayed.
|
|
60
|
-
*/
|
|
61
|
-
async show(target) {
|
|
62
|
-
if (this.popoverRef) {
|
|
63
|
-
await this.popoverRef.show(target);
|
|
64
|
-
this.lastFocusedElement = document.activeElement;
|
|
65
|
-
const menuItems = this.getSlottedItems();
|
|
66
|
-
if (menuItems.length > 0) {
|
|
67
|
-
menuItems[0].focus();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
console.error('show: popoverRef is null or undefined');
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Hides the popover menu and restores focus to the previously focused element.
|
|
76
|
-
*/
|
|
77
|
-
async hide() {
|
|
78
|
-
if (this.popoverRef) {
|
|
79
|
-
await this.popoverRef.hide();
|
|
80
|
-
if (this.lastFocusedElement) {
|
|
81
|
-
this.lastFocusedElement.focus();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
console.error('hide: popoverRef is null or undefined');
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
controlKeyDownHandler(e) {
|
|
89
|
-
const menuItems = this.getSlottedItems();
|
|
90
|
-
if (!menuItems.length) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
const currentFocusedElement = document.activeElement;
|
|
94
|
-
let currentIndex = menuItems.findIndex(el => el === currentFocusedElement);
|
|
95
|
-
switch (e.key) {
|
|
96
|
-
case this.KEYCODES.UP:
|
|
97
|
-
e.preventDefault();
|
|
98
|
-
currentIndex = (currentIndex - 1 + menuItems.length) % menuItems.length;
|
|
99
|
-
break;
|
|
100
|
-
case this.KEYCODES.DOWN:
|
|
101
|
-
e.preventDefault();
|
|
102
|
-
currentIndex = (currentIndex + 1) % menuItems.length;
|
|
103
|
-
break;
|
|
104
|
-
case this.KEYCODES.HOME:
|
|
105
|
-
currentIndex = 0;
|
|
106
|
-
break;
|
|
107
|
-
case this.KEYCODES.END:
|
|
108
|
-
currentIndex = menuItems.length - 1;
|
|
109
|
-
break;
|
|
110
|
-
case this.KEYCODES.SPACE:
|
|
111
|
-
case this.KEYCODES.ENTER:
|
|
112
|
-
this.toggle(this.host);
|
|
113
|
-
return;
|
|
114
|
-
case this.KEYCODES.TAB:
|
|
115
|
-
this.toggle(this.host);
|
|
116
|
-
break;
|
|
117
|
-
default:
|
|
118
|
-
break;
|
|
119
|
-
}
|
|
120
|
-
if (menuItems[currentIndex]) {
|
|
121
|
-
menuItems[currentIndex].focus();
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
getSlottedItems() {
|
|
125
|
-
const slot = this.host.shadowRoot.querySelector('slot');
|
|
126
|
-
const slottedElements = slot ? slot.assignedElements() : [];
|
|
127
|
-
const menuItems = slottedElements
|
|
128
|
-
.filter(el => el.tagName === 'POST-MENU-ITEM')
|
|
129
|
-
.map(el => {
|
|
130
|
-
const slot = el.shadowRoot.querySelector('slot');
|
|
131
|
-
const assignedElements = slot ? slot.assignedElements() : [];
|
|
132
|
-
return assignedElements.filter(isFocusable);
|
|
133
|
-
})
|
|
134
|
-
.flat();
|
|
135
|
-
return menuItems;
|
|
136
|
-
}
|
|
137
|
-
render() {
|
|
138
|
-
return (h(Host, { key: 'c3fa319c92cc36b562590df18b6585b1bc18f133', "data-version": version }, h("post-popovercontainer", { key: '7d297b7598fecb01f46c3f1b999b6017ee878d06', placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '3ae32950348ae8910094cddd34afef060ca517f1', class: "popover-container" }, h("slot", { key: '7faa98f2f4c50ef1ac424387a6c3890dcf09adce' })))));
|
|
139
|
-
}
|
|
140
|
-
static get is() { return "post-menu"; }
|
|
141
|
-
static get encapsulation() { return "shadow"; }
|
|
142
|
-
static get originalStyleUrls() {
|
|
143
|
-
return {
|
|
144
|
-
"$": ["post-menu.scss"]
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
static get styleUrls() {
|
|
148
|
-
return {
|
|
149
|
-
"$": ["post-menu.css"]
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
static get properties() {
|
|
153
|
-
return {
|
|
154
|
-
"placement": {
|
|
155
|
-
"type": "string",
|
|
156
|
-
"mutable": false,
|
|
157
|
-
"complexType": {
|
|
158
|
-
"original": "Placement",
|
|
159
|
-
"resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
160
|
-
"references": {
|
|
161
|
-
"Placement": {
|
|
162
|
-
"location": "import",
|
|
163
|
-
"path": "@floating-ui/dom",
|
|
164
|
-
"id": "../../node_modules/.pnpm/@floating-ui+dom@1.6.8/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement"
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
"required": false,
|
|
169
|
-
"optional": true,
|
|
170
|
-
"docs": {
|
|
171
|
-
"tags": [],
|
|
172
|
-
"text": "Defines the placement of the tooltip according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.\nTooltips are automatically flipped to the opposite side if there is not enough available space and are shifted\ntowards the viewport if they would overlap edge boundaries."
|
|
173
|
-
},
|
|
174
|
-
"attribute": "placement",
|
|
175
|
-
"reflect": false,
|
|
176
|
-
"defaultValue": "'bottom'"
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
static get states() {
|
|
181
|
-
return {
|
|
182
|
-
"isVisible": {}
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
static get events() {
|
|
186
|
-
return [{
|
|
187
|
-
"method": "toggleMenu",
|
|
188
|
-
"name": "toggleMenu",
|
|
189
|
-
"bubbles": true,
|
|
190
|
-
"cancelable": true,
|
|
191
|
-
"composed": true,
|
|
192
|
-
"docs": {
|
|
193
|
-
"tags": [],
|
|
194
|
-
"text": "Emits when the menu is shown or hidden.\nThe event payload is a boolean: `true` when the menu was opened, `false` when it was closed."
|
|
195
|
-
},
|
|
196
|
-
"complexType": {
|
|
197
|
-
"original": "boolean",
|
|
198
|
-
"resolved": "boolean",
|
|
199
|
-
"references": {}
|
|
200
|
-
}
|
|
201
|
-
}];
|
|
202
|
-
}
|
|
203
|
-
static get methods() {
|
|
204
|
-
return {
|
|
205
|
-
"toggle": {
|
|
206
|
-
"complexType": {
|
|
207
|
-
"signature": "(target: HTMLElement) => Promise<void>",
|
|
208
|
-
"parameters": [{
|
|
209
|
-
"name": "target",
|
|
210
|
-
"type": "HTMLElement",
|
|
211
|
-
"docs": ""
|
|
212
|
-
}],
|
|
213
|
-
"references": {
|
|
214
|
-
"Promise": {
|
|
215
|
-
"location": "global",
|
|
216
|
-
"id": "global::Promise"
|
|
217
|
-
},
|
|
218
|
-
"HTMLElement": {
|
|
219
|
-
"location": "global",
|
|
220
|
-
"id": "global::HTMLElement"
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
"return": "Promise<void>"
|
|
224
|
-
},
|
|
225
|
-
"docs": {
|
|
226
|
-
"text": "Toggles the menu visibility based on its current state.",
|
|
227
|
-
"tags": []
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
"show": {
|
|
231
|
-
"complexType": {
|
|
232
|
-
"signature": "(target: HTMLElement) => Promise<void>",
|
|
233
|
-
"parameters": [{
|
|
234
|
-
"name": "target",
|
|
235
|
-
"type": "HTMLElement",
|
|
236
|
-
"docs": "- The HTML element relative to which the popover menu should be displayed."
|
|
237
|
-
}],
|
|
238
|
-
"references": {
|
|
239
|
-
"Promise": {
|
|
240
|
-
"location": "global",
|
|
241
|
-
"id": "global::Promise"
|
|
242
|
-
},
|
|
243
|
-
"HTMLElement": {
|
|
244
|
-
"location": "global",
|
|
245
|
-
"id": "global::HTMLElement"
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
"return": "Promise<void>"
|
|
249
|
-
},
|
|
250
|
-
"docs": {
|
|
251
|
-
"text": "Displays the popover menu, focusing the first menu item.",
|
|
252
|
-
"tags": [{
|
|
253
|
-
"name": "param",
|
|
254
|
-
"text": "target - The HTML element relative to which the popover menu should be displayed."
|
|
255
|
-
}]
|
|
256
|
-
}
|
|
257
|
-
},
|
|
258
|
-
"hide": {
|
|
259
|
-
"complexType": {
|
|
260
|
-
"signature": "() => Promise<void>",
|
|
261
|
-
"parameters": [],
|
|
262
|
-
"references": {
|
|
263
|
-
"Promise": {
|
|
264
|
-
"location": "global",
|
|
265
|
-
"id": "global::Promise"
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
|
-
"return": "Promise<void>"
|
|
269
|
-
},
|
|
270
|
-
"docs": {
|
|
271
|
-
"text": "Hides the popover menu and restores focus to the previously focused element.",
|
|
272
|
-
"tags": []
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
static get elementRef() { return "host"; }
|
|
278
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
:host{display:block}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { version } from "../../../../package";
|
|
3
|
-
export class PostMenuItem {
|
|
4
|
-
render() {
|
|
5
|
-
return (h(Host, { key: '8e20fdee0faff826319440bed6ec7be0c56e6d06', role: "menuitem", "data-version": version }, h("slot", { key: '69e2be9dec334ade8e84ccb268c7d4955dd2fefb' })));
|
|
6
|
-
}
|
|
7
|
-
static get is() { return "post-menu-item"; }
|
|
8
|
-
static get encapsulation() { return "shadow"; }
|
|
9
|
-
static get originalStyleUrls() {
|
|
10
|
-
return {
|
|
11
|
-
"$": ["post-menu-item.scss"]
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
static get styleUrls() {
|
|
15
|
-
return {
|
|
16
|
-
"$": ["post-menu-item.css"]
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
static get elementRef() { return "host"; }
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
:host{display:inline-block}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { version } from "../../../../package";
|
|
3
|
-
import { checkType, getRoot } from "../../utils/index";
|
|
4
|
-
export class PostMenuTrigger {
|
|
5
|
-
constructor() {
|
|
6
|
-
/**
|
|
7
|
-
* Reference to the slotted button within the trigger, if present.
|
|
8
|
-
* Used to manage click and key events for menu control.
|
|
9
|
-
*/
|
|
10
|
-
this.slottedButton = null;
|
|
11
|
-
this.handleKeyDown = (e) => {
|
|
12
|
-
if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
|
|
13
|
-
e.preventDefault();
|
|
14
|
-
this.handleToggle();
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
this.for = undefined;
|
|
18
|
-
this.ariaExpanded = false;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Watch for changes to the `for` property to validate its type and ensure it is a string.
|
|
22
|
-
* @param forValue - The new value of the `for` property.
|
|
23
|
-
*/
|
|
24
|
-
validateControlFor(forValue = this.for) {
|
|
25
|
-
checkType(forValue, 'string', 'The "for" property is required and should be a string.');
|
|
26
|
-
}
|
|
27
|
-
get menu() {
|
|
28
|
-
const ref = this.root.getElementById(this.for);
|
|
29
|
-
return ref && ref.localName === 'post-menu' ? ref : null;
|
|
30
|
-
}
|
|
31
|
-
handleToggle() {
|
|
32
|
-
const menu = this.menu;
|
|
33
|
-
if (menu && this.slottedButton) {
|
|
34
|
-
this.ariaExpanded = !this.ariaExpanded;
|
|
35
|
-
this.slottedButton.setAttribute('aria-expanded', this.ariaExpanded.toString());
|
|
36
|
-
menu.toggle(this.host);
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
console.warn(`No post-menu found with ID: ${this.for}`);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
componentDidLoad() {
|
|
43
|
-
this.root = getRoot(this.host);
|
|
44
|
-
this.validateControlFor();
|
|
45
|
-
this.slottedButton = this.host.querySelector('button');
|
|
46
|
-
if (this.slottedButton) {
|
|
47
|
-
this.slottedButton.setAttribute('aria-haspopup', 'menu');
|
|
48
|
-
this.slottedButton.addEventListener('click', () => {
|
|
49
|
-
this.handleToggle();
|
|
50
|
-
});
|
|
51
|
-
this.slottedButton.addEventListener('keydown', this.handleKeyDown);
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
console.warn('No button found within post-menu-trigger');
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
render() {
|
|
58
|
-
return (h(Host, { key: 'd6b5619d0b4035887eaffdcc3c153eb0a5fe4ceb', "data-version": version, "tab-index": "-1" }, h("slot", { key: '5d87c80dae6188470b10207993822d92adc714b1' })));
|
|
59
|
-
}
|
|
60
|
-
static get is() { return "post-menu-trigger"; }
|
|
61
|
-
static get originalStyleUrls() {
|
|
62
|
-
return {
|
|
63
|
-
"$": ["post-menu-trigger.scss"]
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
static get styleUrls() {
|
|
67
|
-
return {
|
|
68
|
-
"$": ["post-menu-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 menu element that this trigger is linked to. Used to open and close the specified menu."
|
|
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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
:host{cursor:pointer}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
2
|
-
import { version } from "../../../../package";
|
|
3
|
-
/**
|
|
4
|
-
* @slot toggled - Slot for content displayed when the button is in the "on" state.
|
|
5
|
-
* @slot untoggled - Slot for content displayed when the button is in the "off" state.
|
|
6
|
-
*/
|
|
7
|
-
export class PostTogglebutton {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.handleClick = () => {
|
|
10
|
-
this.toggled = !this.toggled;
|
|
11
|
-
};
|
|
12
|
-
this.handleKeydown = (event) => {
|
|
13
|
-
if (event.key === 'Enter') {
|
|
14
|
-
this.toggled = !this.toggled;
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
this.toggled = false;
|
|
18
|
-
}
|
|
19
|
-
render() {
|
|
20
|
-
return (h(Host, { key: '82fc4126d97650255d1d5fd041208b3d11cf0ded', slot: "post-togglebutton", tabindex: "0", "data-version": version, role: "button", "aria-pressed": this.toggled.toString(), onClick: this.handleClick, onKeyDown: this.handleKeydown }, h("span", { key: '0364e8b63cc2c7955282f62533683c3627aa6626', hidden: this.toggled }, h("slot", { key: '11ccb62855497ddf395276e7f7e88a8409fa36e4', name: "untoggled" })), h("span", { key: '463f4571ceecc51063a4d4495d22063b6b75d0df', hidden: !this.toggled }, h("slot", { key: '7d41e35a64deefd22087524bc57530603aae18fa', name: "toggled" }))));
|
|
21
|
-
}
|
|
22
|
-
static get is() { return "post-togglebutton"; }
|
|
23
|
-
static get encapsulation() { return "shadow"; }
|
|
24
|
-
static get originalStyleUrls() {
|
|
25
|
-
return {
|
|
26
|
-
"$": ["post-togglebutton.scss"]
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
static get styleUrls() {
|
|
30
|
-
return {
|
|
31
|
-
"$": ["post-togglebutton.css"]
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
static get properties() {
|
|
35
|
-
return {
|
|
36
|
-
"toggled": {
|
|
37
|
-
"type": "boolean",
|
|
38
|
-
"mutable": true,
|
|
39
|
-
"complexType": {
|
|
40
|
-
"original": "boolean",
|
|
41
|
-
"resolved": "boolean",
|
|
42
|
-
"references": {}
|
|
43
|
-
},
|
|
44
|
-
"required": false,
|
|
45
|
-
"optional": false,
|
|
46
|
-
"docs": {
|
|
47
|
-
"tags": [],
|
|
48
|
-
"text": "If `true`, the button is in the \"on\" state, otherwise it is in the \"off\" state."
|
|
49
|
-
},
|
|
50
|
-
"attribute": "toggled",
|
|
51
|
-
"reflect": true,
|
|
52
|
-
"defaultValue": "false"
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const focusableSelector = `:where(${[
|
|
2
|
-
'button',
|
|
3
|
-
'input:not([type="hidden"])',
|
|
4
|
-
'[tabindex]',
|
|
5
|
-
'select',
|
|
6
|
-
'textarea',
|
|
7
|
-
'[contenteditable]',
|
|
8
|
-
'a[href]',
|
|
9
|
-
'iframe',
|
|
10
|
-
'audio[controls]',
|
|
11
|
-
'video[controls]',
|
|
12
|
-
'area[href]',
|
|
13
|
-
'details > summary:first-of-type',
|
|
14
|
-
].join(',')})`;
|
|
15
|
-
const focusDisablingSelector = `:where(${[
|
|
16
|
-
'[inert]',
|
|
17
|
-
'[inert] *',
|
|
18
|
-
':disabled',
|
|
19
|
-
'dialog:not([open]) *',
|
|
20
|
-
'[popover]:not(:popover-open) *',
|
|
21
|
-
'details:not([open]) > *:not(details > summary:first-of-type)',
|
|
22
|
-
'details:not([open]) > *:not(details > summary:first-of-type) *',
|
|
23
|
-
].join(',')})`;
|
|
24
|
-
export const isFocusable = (element) => {
|
|
25
|
-
return (element === null || element === void 0 ? void 0 : element.matches(focusableSelector)) && !(element === null || element === void 0 ? void 0 : element.matches(focusDisablingSelector));
|
|
26
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const getAttributeObserver = (attribute, handler) => {
|
|
2
|
-
/**
|
|
3
|
-
* Handle attribute changes and childList changes from the observer
|
|
4
|
-
* @param {MutationRecord[]} mutationList
|
|
5
|
-
*/
|
|
6
|
-
const observerHandler = (mutationList) => {
|
|
7
|
-
mutationList.forEach(mutation => {
|
|
8
|
-
if (mutation.type === 'attributes' && mutation.attributeName === attribute) {
|
|
9
|
-
handler(mutation.target);
|
|
10
|
-
}
|
|
11
|
-
if (mutation.type === 'childList') {
|
|
12
|
-
mutation.addedNodes.forEach(node => {
|
|
13
|
-
if (node.nodeType === Node.ELEMENT_NODE &&
|
|
14
|
-
node.hasAttribute(attribute)) {
|
|
15
|
-
handler(node);
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
// Initialize a mutation observer for patching accessibility features
|
|
22
|
-
return new MutationObserver(observerHandler);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export { getAttributeObserver as g };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
function getRoot(element) {
|
|
2
|
-
const root = element.getRootNode();
|
|
3
|
-
if (root instanceof Document || root instanceof ShadowRoot) {
|
|
4
|
-
return root;
|
|
5
|
-
}
|
|
6
|
-
throw new Error('Attempting to access root node before the element is attached to the document or shadow tree.');
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export { getRoot as g };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface PostAvatar extends Components.PostAvatar, HTMLElement {}
|
|
4
|
-
export const PostAvatar: {
|
|
5
|
-
prototype: PostAvatar;
|
|
6
|
-
new (): PostAvatar;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|