@swisspost/design-system-components 10.0.0-next.40 → 10.0.0-next.42
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/breakpoints-DIH5Oaz7.js +186 -0
- package/dist/cjs/event-from-AKK8RQrn.js +107 -0
- package/dist/cjs/{get-root-8102fecd.js → get-root-DmyBVSJ_.js} +1 -1
- package/dist/cjs/{index-b60129c4.js → index-CRMt-jq2.js} +1172 -309
- package/dist/cjs/index.cjs.js +0 -70
- package/dist/cjs/loader.cjs.js +3 -6
- package/dist/cjs/{package-b731881e.js → package-C_aBW878.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +177 -10
- package/dist/cjs/post-avatar.cjs.entry.js +151 -8
- package/dist/cjs/post-back-to-top.cjs.entry.js +86 -9
- package/dist/cjs/post-banner.cjs.entry.js +81 -9
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +62 -8
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +119 -7
- package/dist/cjs/post-card-control.cjs.entry.js +283 -8
- package/dist/cjs/post-closebutton_15.cjs.entry.js +4376 -30
- package/dist/cjs/post-collapsible_2.cjs.entry.js +196 -10
- package/dist/cjs/post-components.cjs.js +7 -8
- package/dist/cjs/post-footer.cjs.entry.js +59 -8
- package/dist/cjs/post-linkarea.cjs.entry.js +24 -6
- package/dist/cjs/post-popover.cjs.entry.js +151 -8
- package/dist/cjs/post-rating.cjs.entry.js +115 -8
- package/dist/cjs/post-tab-header.cjs.entry.js +26 -9
- package/dist/cjs/post-tab-panel.cjs.entry.js +28 -9
- package/dist/cjs/post-tabs.cjs.entry.js +165 -7
- package/dist/cjs/post-tag.cjs.entry.js +50 -8
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +5195 -7
- package/dist/cjs/post-tooltip.cjs.entry.js +78 -9
- package/dist/collection/collection-manifest.json +4 -4
- package/dist/collection/components/post-accordion/post-accordion.js +39 -23
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +26 -11
- package/dist/collection/components/post-avatar/post-avatar.js +12 -9
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +4 -3
- package/dist/collection/components/post-banner/post-banner.js +18 -9
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +4 -6
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +13 -9
- package/dist/collection/components/post-card-control/post-card-control.js +33 -16
- package/dist/collection/components/post-collapsible/post-collapsible.js +6 -1
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +21 -9
- package/dist/collection/components/post-footer/post-footer.js +8 -7
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +28 -16
- package/dist/collection/components/post-icon/post-icon.js +66 -54
- package/dist/collection/components/post-language-option/post-language-option.css +1 -1
- package/dist/collection/components/post-language-option/post-language-option.js +17 -13
- package/dist/collection/components/post-language-switch/post-language-switch.css +1 -1
- package/dist/collection/components/post-language-switch/post-language-switch.js +43 -24
- package/dist/collection/components/post-list/post-list.js +12 -3
- package/dist/collection/components/post-logo/post-logo.js +3 -4
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +12 -6
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +34 -20
- package/dist/collection/components/post-menu/post-menu.css +1 -1
- package/dist/collection/components/post-menu/post-menu.js +43 -21
- package/dist/collection/components/post-menu-item/post-menu-item.css +1 -0
- package/dist/collection/components/post-menu-item/post-menu-item.js +11 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +9 -5
- package/dist/collection/components/post-popover/post-popover.js +19 -5
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +44 -16
- package/dist/collection/components/post-rating/post-rating.js +25 -5
- package/dist/collection/components/post-tab-header/post-tab-header.js +4 -6
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +4 -6
- package/dist/collection/components/post-tabs/post-tabs.js +4 -3
- package/dist/collection/components/post-tag/post-tag.js +11 -9
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +7 -2
- package/dist/collection/components/post-tooltip/post-tooltip.js +24 -6
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +20 -12
- package/dist/collection/index.js +1 -37
- package/dist/collection/utils/breakpoints.js +38 -45
- package/dist/collection/utils/event-from.js +103 -0
- package/dist/collection/utils/index.js +1 -1
- package/dist/components/index.js +2315 -37
- package/{loaders/post-icon2.js → dist/components/p-47N0HfyR.js} +52 -54
- package/dist/components/p-8U5GFtQP.js +105 -0
- package/{loaders/post-breadcrumb-item2.js → dist/components/p-BGbm-LIm.js} +9 -11
- package/dist/components/p-BQFahg8B.js +3 -0
- package/dist/components/p-BTDGpxKD.js +31 -0
- package/dist/components/{post-menu2.js → p-BTuwEPwo.js} +51 -30
- package/dist/{esm/index-ffccd040.js → components/p-CV7fm1rW.js} +1 -1
- package/dist/components/p-Cx0AiN2A.js +182 -0
- package/dist/components/{post-accordion-item2.js → p-D2S8TlQo.js} +32 -21
- package/dist/components/{get-root.js → p-DBHo9yGF.js} +1 -1
- package/dist/components/{post-menu-trigger2.js → p-DEBPuQvD.js} +14 -12
- package/dist/components/{post-collapsible-trigger2.js → p-DS1BUsT3.js} +25 -14
- package/dist/components/{post-accordion2.js → p-Df_aJQyq.js} +41 -28
- package/{loaders/post-collapsible2.js → dist/components/p-DrzP02ul.js} +11 -8
- package/dist/components/{post-popovercontainer2.js → p-Dzrd8BSS.js} +246 -278
- package/dist/components/post-accordion-item.js +1 -1
- package/dist/components/post-accordion.js +1 -1
- package/dist/components/post-avatar.js +183 -1
- package/dist/components/post-back-to-top.js +115 -1
- package/dist/components/post-banner.js +120 -1
- package/dist/components/post-breadcrumb-item.js +1 -1
- package/dist/components/post-breadcrumbs.js +182 -1
- package/dist/components/post-card-control.js +322 -1
- package/dist/components/post-closebutton.js +37 -1
- package/dist/components/post-collapsible-trigger.js +1 -1
- package/dist/components/post-collapsible.js +1 -1
- package/dist/components/post-footer.js +112 -1
- package/dist/components/post-header.js +273 -1
- package/dist/components/post-icon.js +1 -1
- package/dist/components/post-language-option.js +96 -1
- package/dist/components/post-language-switch.js +154 -1
- package/dist/components/post-linkarea.js +41 -1
- package/dist/components/post-list-item.js +34 -1
- package/dist/components/post-list.js +57 -1
- package/dist/components/post-logo.js +54 -1
- package/dist/components/post-mainnavigation.js +181 -1
- package/dist/components/post-megadropdown-trigger.js +132 -1
- package/dist/components/post-megadropdown.js +194 -1
- package/dist/components/post-menu-item.js +1 -1
- package/dist/components/post-menu-trigger.js +1 -1
- package/dist/components/post-menu.js +1 -1
- package/dist/components/post-popover.js +184 -1
- package/dist/components/post-popovercontainer.js +1 -1
- package/dist/components/post-rating.js +148 -1
- package/dist/components/post-tab-header.js +48 -1
- package/dist/components/post-tab-panel.js +50 -1
- package/dist/components/post-tabs.js +186 -1
- package/dist/components/post-tag.js +82 -1
- package/dist/components/post-togglebutton.js +52 -1
- package/dist/components/post-tooltip-trigger.js +5218 -1
- package/dist/components/post-tooltip.js +110 -1
- package/dist/docs.d.ts +8 -0
- package/dist/docs.json +416 -116
- package/dist/esm/breakpoints-DyVir0ex.js +182 -0
- package/dist/esm/event-from-8U5GFtQP.js +105 -0
- package/{loaders/get-root.js → dist/esm/get-root-D9QC9-TY.js} +1 -1
- package/{loaders/index2.js → dist/esm/index-BWC0gtGU.js} +1 -1
- package/dist/esm/{index-f4d19816.js → index-CVhzhVv0.js} +1169 -305
- package/dist/esm/index.js +1 -29
- package/dist/esm/loader.js +3 -4
- package/dist/esm/package-BQFahg8B.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +180 -7
- package/dist/esm/post-avatar.entry.js +154 -5
- package/dist/esm/post-back-to-top.entry.js +89 -6
- package/dist/esm/post-banner.entry.js +85 -7
- package/dist/esm/post-breadcrumb-item_2.entry.js +65 -5
- package/dist/esm/post-breadcrumbs.entry.js +123 -5
- package/dist/esm/post-card-control.entry.js +286 -5
- package/dist/esm/post-closebutton_15.entry.js +4362 -10
- package/dist/esm/post-collapsible_2.entry.js +199 -7
- package/dist/esm/post-components.js +5 -5
- package/dist/esm/post-footer.entry.js +62 -5
- package/dist/esm/post-linkarea.entry.js +27 -3
- package/dist/esm/post-popover.entry.js +155 -6
- package/dist/esm/post-rating.entry.js +118 -5
- package/dist/esm/post-tab-header.entry.js +29 -6
- package/dist/esm/post-tab-panel.entry.js +31 -6
- package/dist/esm/post-tabs.entry.js +169 -5
- package/dist/esm/post-tag.entry.js +53 -5
- package/dist/esm/post-tooltip-trigger.entry.js +5199 -5
- package/dist/esm/post-tooltip.entry.js +81 -6
- package/dist/post-components/index.esm.js +0 -1
- package/dist/post-components/p-16a44ba9.entry.js +1 -0
- package/dist/post-components/p-1a2f3472.entry.js +1 -0
- package/dist/post-components/p-3b0fdc33.entry.js +1 -0
- package/dist/post-components/p-4c44a7b6.entry.js +1 -0
- package/dist/post-components/p-65b70b56.entry.js +1 -0
- package/dist/post-components/p-79551aa5.entry.js +1 -0
- package/dist/post-components/p-7ff04db9.entry.js +1 -0
- package/dist/post-components/p-8036d63d.entry.js +1 -0
- package/dist/post-components/p-8U5GFtQP.js +1 -0
- package/dist/post-components/p-9a814dc9.entry.js +1 -0
- package/dist/post-components/p-BQFahg8B.js +1 -0
- package/dist/post-components/{p-b176309b.js → p-BWC0gtGU.js} +1 -1
- package/dist/post-components/{p-6b31a76a.js → p-Bkp2QDth.js} +1 -1
- package/dist/post-components/p-CVhzhVv0.js +2 -0
- package/dist/post-components/p-DyVir0ex.js +1 -0
- package/dist/post-components/p-a2847d8c.entry.js +1 -0
- package/dist/post-components/p-b62dfb1e.entry.js +1 -0
- package/dist/post-components/p-bd16c322.entry.js +1 -0
- package/dist/post-components/p-c25faa09.entry.js +1 -0
- package/dist/post-components/p-c949f699.entry.js +1 -0
- package/dist/post-components/p-d1db269a.entry.js +1 -0
- package/dist/post-components/p-d9e33696.entry.js +1 -0
- package/dist/post-components/p-e5f6c467.entry.js +1 -0
- package/dist/post-components/p-ecfbdd8d.entry.js +1 -0
- package/dist/post-components/p-f06866d2.entry.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-header/post-header.d.ts +1 -0
- package/dist/types/components/post-icon/post-icon.d.ts +0 -4
- package/dist/types/components/post-language-switch/post-language-switch.d.ts +1 -0
- package/dist/types/components/post-tag/post-tag.d.ts +1 -1
- package/dist/types/components.d.ts +61 -1
- package/dist/types/index.d.ts +10 -37
- package/dist/types/stencil-public-runtime.d.ts +29 -1
- package/dist/types/utils/breakpoints.d.ts +12 -7
- package/dist/types/utils/event-from.d.ts +9 -0
- package/dist/types/utils/index.d.ts +1 -1
- package/hydrate/index.d.ts +273 -0
- package/hydrate/index.js +32002 -0
- package/hydrate/index.mjs +31994 -0
- package/hydrate/package.json +12 -0
- package/package.json +45 -17
- package/dist/cjs/app-globals-3a1e7e63.js +0 -5
- package/dist/cjs/breakpoints-cdf1b747.js +0 -59
- package/dist/cjs/event-guard-efabc84f.js +0 -47
- package/dist/cjs/post-accordion-item-5c879102.js +0 -161
- package/dist/cjs/post-avatar-4f1681df.js +0 -162
- package/dist/cjs/post-back-to-top-abbb4ac4.js +0 -93
- package/dist/cjs/post-banner-4d99c51c.js +0 -87
- package/dist/cjs/post-breadcrumbs-5ceabb10.js +0 -126
- package/dist/cjs/post-card-control-b657aeaa.js +0 -290
- package/dist/cjs/post-collapsible-trigger-33f09d6c.js +0 -190
- package/dist/cjs/post-footer-022cf408.js +0 -66
- package/dist/cjs/post-linkarea-5fbb2e25.js +0 -30
- package/dist/cjs/post-menu-item-d4cc4742.js +0 -68
- package/dist/cjs/post-popover-b7cd0091.js +0 -150
- package/dist/cjs/post-rating-c81d1ac3.js +0 -109
- package/dist/cjs/post-tab-header-1db15093.js +0 -34
- package/dist/cjs/post-tab-panel-698981b8.js +0 -36
- package/dist/cjs/post-tabs-79eab811.js +0 -173
- package/dist/cjs/post-tag-66a52727.js +0 -60
- package/dist/cjs/post-togglebutton-a6b8b75d.js +0 -4491
- package/dist/cjs/post-tooltip-560cf42c.js +0 -74
- package/dist/cjs/post-tooltip-trigger-2a54e3e4.js +0 -4685
- package/dist/collection/utils/event-guard.js +0 -43
- package/dist/components/breakpoints.js +0 -56
- package/dist/components/event-guard.js +0 -45
- package/dist/components/index2.js +0 -88
- package/dist/components/package.js +0 -3
- package/dist/components/post-avatar2.js +0 -190
- package/dist/components/post-back-to-top2.js +0 -118
- package/dist/components/post-banner2.js +0 -121
- package/dist/components/post-breadcrumb-item2.js +0 -82
- package/dist/components/post-breadcrumbs2.js +0 -184
- package/dist/components/post-card-control2.js +0 -325
- package/dist/components/post-closebutton2.js +0 -39
- package/dist/components/post-collapsible2.js +0 -108
- package/dist/components/post-footer2.js +0 -115
- package/dist/components/post-header2.js +0 -397
- package/dist/components/post-icon2.js +0 -156
- package/dist/components/post-language-option2.js +0 -102
- package/dist/components/post-language-switch2.js +0 -143
- package/dist/components/post-linkarea2.js +0 -43
- package/dist/components/post-list-item2.js +0 -36
- package/dist/components/post-list2.js +0 -54
- package/dist/components/post-logo2.js +0 -57
- package/dist/components/post-mainnavigation2.js +0 -183
- package/dist/components/post-megadropdown-trigger2.js +0 -121
- package/dist/components/post-megadropdown2.js +0 -190
- package/dist/components/post-menu-item2.js +0 -27
- package/dist/components/post-popover2.js +0 -178
- package/dist/components/post-rating2.js +0 -138
- package/dist/components/post-tab-header2.js +0 -52
- package/dist/components/post-tab-panel2.js +0 -54
- package/dist/components/post-tabs2.js +0 -189
- package/dist/components/post-tag2.js +0 -88
- package/dist/components/post-togglebutton2.js +0 -51
- package/dist/components/post-tooltip-trigger2.js +0 -4703
- package/dist/components/post-tooltip2.js +0 -102
- package/dist/esm/app-globals-0f993ce5.js +0 -3
- package/dist/esm/breakpoints-7812702e.js +0 -56
- package/dist/esm/event-guard-538ee077.js +0 -45
- package/dist/esm/get-root-1b1af46f.js +0 -15
- package/dist/esm/package-9374eb90.js +0 -3
- package/dist/esm/post-accordion-item-f416bd95.js +0 -158
- package/dist/esm/post-avatar-2cb5190b.js +0 -160
- package/dist/esm/post-back-to-top-f877d4c6.js +0 -91
- package/dist/esm/post-banner-576a5adb.js +0 -85
- package/dist/esm/post-breadcrumbs-63223336.js +0 -124
- package/dist/esm/post-card-control-2eebe7b4.js +0 -288
- package/dist/esm/post-collapsible-trigger-561df34e.js +0 -187
- package/dist/esm/post-footer-a270f67b.js +0 -64
- package/dist/esm/post-linkarea-456ce63d.js +0 -28
- package/dist/esm/post-menu-item-e051284c.js +0 -65
- package/dist/esm/post-popover-7c3c9072.js +0 -148
- package/dist/esm/post-rating-2c9dd11f.js +0 -107
- package/dist/esm/post-tab-header-f90b2f93.js +0 -32
- package/dist/esm/post-tab-panel-c19b5e30.js +0 -34
- package/dist/esm/post-tabs-0dadedf2.js +0 -171
- package/dist/esm/post-tag-b8be3b0c.js +0 -58
- package/dist/esm/post-togglebutton-83339cc9.js +0 -4475
- package/dist/esm/post-tooltip-3cc82984.js +0 -72
- package/dist/esm/post-tooltip-trigger-898c3dbc.js +0 -4683
- package/dist/post-components/p-0889c759.js +0 -1
- package/dist/post-components/p-104ddc50.js +0 -1
- package/dist/post-components/p-13b41e32.entry.js +0 -1
- package/dist/post-components/p-1906d77c.js +0 -1
- package/dist/post-components/p-19d0e6ea.entry.js +0 -1
- package/dist/post-components/p-1b9afb34.entry.js +0 -1
- package/dist/post-components/p-1fbffc90.js +0 -1
- package/dist/post-components/p-234925fa.js +0 -1
- package/dist/post-components/p-23fb976f.entry.js +0 -1
- package/dist/post-components/p-24c42ebe.entry.js +0 -1
- package/dist/post-components/p-28c19671.js +0 -8
- package/dist/post-components/p-37aaa30f.js +0 -1
- package/dist/post-components/p-3baf0b40.entry.js +0 -1
- package/dist/post-components/p-4390192f.js +0 -1
- package/dist/post-components/p-4a071696.js +0 -1
- package/dist/post-components/p-4c2d5072.js +0 -1
- package/dist/post-components/p-51b6114c.entry.js +0 -1
- package/dist/post-components/p-5fb4fc65.js +0 -1
- package/dist/post-components/p-64c13aaf.entry.js +0 -1
- package/dist/post-components/p-66679f9d.entry.js +0 -1
- package/dist/post-components/p-68a98f0b.js +0 -1
- package/dist/post-components/p-6a4dc55e.js +0 -1
- package/dist/post-components/p-722ffaae.js +0 -1
- package/dist/post-components/p-789f9a23.entry.js +0 -1
- package/dist/post-components/p-7e6eae42.js +0 -1
- package/dist/post-components/p-8117dd0c.js +0 -1
- package/dist/post-components/p-814c0c4d.entry.js +0 -1
- package/dist/post-components/p-87e0d6fa.js +0 -1
- package/dist/post-components/p-988d20f4.js +0 -1
- package/dist/post-components/p-9b1e4e52.entry.js +0 -1
- package/dist/post-components/p-9e461613.js +0 -2
- package/dist/post-components/p-ab44a18c.entry.js +0 -1
- package/dist/post-components/p-b2952b0e.entry.js +0 -1
- package/dist/post-components/p-c10b2a2f.js +0 -1
- package/dist/post-components/p-c80cb846.js +0 -1
- package/dist/post-components/p-da4704c1.js +0 -1
- package/dist/post-components/p-dc4de84a.entry.js +0 -1
- package/dist/post-components/p-e1255160.js +0 -1
- package/dist/post-components/p-f1f0ace3.entry.js +0 -1
- package/dist/post-components/p-f34fb6c4.entry.js +0 -1
- package/dist/post-components/p-f6f914bb.js +0 -1
- package/dist/post-components/p-fe7e64cf.entry.js +0 -1
- package/dist/post-components/p-fee94252.entry.js +0 -1
- package/dist/types/popover-fn.d.ts +0 -11
- package/dist/types/utils/event-guard.d.ts +0 -4
- package/loader/package.json +0 -11
- package/loaders/breakpoints.js +0 -56
- package/loaders/event-guard.js +0 -45
- package/loaders/fade.js +0 -11
- package/loaders/get-focusable-children.js +0 -35
- package/loaders/heading-levels.js +0 -3
- package/loaders/index.browser.js +0 -14
- package/loaders/index.d.ts +0 -108
- package/loaders/index.js +0 -39
- package/loaders/long-press-event.js +0 -264
- package/loaders/package.js +0 -3
- package/loaders/post-accordion-item.d.ts +0 -11
- package/loaders/post-accordion-item.js +0 -6
- package/loaders/post-accordion-item2.js +0 -103
- package/loaders/post-accordion.d.ts +0 -11
- package/loaders/post-accordion.js +0 -6
- package/loaders/post-accordion2.js +0 -126
- package/loaders/post-avatar.d.ts +0 -11
- package/loaders/post-avatar.js +0 -193
- package/loaders/post-back-to-top.d.ts +0 -11
- package/loaders/post-back-to-top.js +0 -121
- package/loaders/post-banner.d.ts +0 -11
- package/loaders/post-banner.js +0 -124
- package/loaders/post-breadcrumb-item.d.ts +0 -11
- package/loaders/post-breadcrumb-item.js +0 -6
- package/loaders/post-breadcrumbs.d.ts +0 -11
- package/loaders/post-breadcrumbs.js +0 -187
- package/loaders/post-card-control.d.ts +0 -11
- package/loaders/post-card-control.js +0 -328
- package/loaders/post-closebutton.d.ts +0 -11
- package/loaders/post-closebutton.js +0 -42
- package/loaders/post-collapsible-trigger.d.ts +0 -11
- package/loaders/post-collapsible-trigger.js +0 -6
- package/loaders/post-collapsible-trigger2.js +0 -125
- package/loaders/post-collapsible.d.ts +0 -11
- package/loaders/post-collapsible.js +0 -6
- package/loaders/post-footer.d.ts +0 -11
- package/loaders/post-footer.js +0 -118
- package/loaders/post-header.d.ts +0 -11
- package/loaders/post-header.js +0 -400
- package/loaders/post-icon.d.ts +0 -11
- package/loaders/post-icon.js +0 -6
- package/loaders/post-language-option.d.ts +0 -11
- package/loaders/post-language-option.js +0 -105
- package/loaders/post-language-switch.d.ts +0 -11
- package/loaders/post-language-switch.js +0 -146
- package/loaders/post-linkarea.d.ts +0 -11
- package/loaders/post-linkarea.js +0 -46
- package/loaders/post-list-item.d.ts +0 -11
- package/loaders/post-list-item.js +0 -39
- package/loaders/post-list.d.ts +0 -11
- package/loaders/post-list.js +0 -57
- package/loaders/post-logo.d.ts +0 -11
- package/loaders/post-logo.js +0 -60
- package/loaders/post-mainnavigation.d.ts +0 -11
- package/loaders/post-mainnavigation.js +0 -186
- package/loaders/post-megadropdown-trigger.d.ts +0 -11
- package/loaders/post-megadropdown-trigger.js +0 -124
- package/loaders/post-megadropdown.d.ts +0 -11
- package/loaders/post-megadropdown.js +0 -193
- package/loaders/post-menu-item.d.ts +0 -11
- package/loaders/post-menu-item.js +0 -6
- package/loaders/post-menu-item2.js +0 -27
- package/loaders/post-menu-trigger.d.ts +0 -11
- package/loaders/post-menu-trigger.js +0 -6
- package/loaders/post-menu-trigger2.js +0 -109
- package/loaders/post-menu.d.ts +0 -11
- package/loaders/post-menu.js +0 -6
- package/loaders/post-menu2.js +0 -202
- package/loaders/post-popover.d.ts +0 -11
- package/loaders/post-popover.js +0 -181
- package/loaders/post-popovercontainer.d.ts +0 -11
- package/loaders/post-popovercontainer.js +0 -6
- package/loaders/post-popovercontainer2.js +0 -3051
- package/loaders/post-rating.d.ts +0 -11
- package/loaders/post-rating.js +0 -141
- package/loaders/post-tab-header.d.ts +0 -11
- package/loaders/post-tab-header.js +0 -55
- package/loaders/post-tab-panel.d.ts +0 -11
- package/loaders/post-tab-panel.js +0 -57
- package/loaders/post-tabs.d.ts +0 -11
- package/loaders/post-tabs.js +0 -192
- package/loaders/post-tag.d.ts +0 -11
- package/loaders/post-tag.js +0 -91
- package/loaders/post-togglebutton.d.ts +0 -11
- package/loaders/post-togglebutton.js +0 -54
- package/loaders/post-tooltip-trigger.d.ts +0 -11
- package/loaders/post-tooltip-trigger.js +0 -4706
- package/loaders/post-tooltip.d.ts +0 -11
- package/loaders/post-tooltip.js +0 -105
- package/loaders/slide.js +0 -25
- package/loaders/switch-variants.js +0 -3
- /package/dist/cjs/{fade-72d5ef55.js → fade-nS5zzDQS.js} +0 -0
- /package/dist/cjs/{index-2b2b85e5.js → index-DtvYdwe1.js} +0 -0
- /package/dist/cjs/{index.browser-4af21c17.js → index.browser-Doj636JV.js} +0 -0
- /package/dist/cjs/{long-press-event-6e62d113.js → long-press-event-Q8jMUNXD.js} +0 -0
- /package/dist/cjs/{placement-b2bb6ec4.js → placement-qEFR9hmI.js} +0 -0
- /package/dist/cjs/{slide-cd1f09b3.js → slide-CbBL7A8w.js} +0 -0
- /package/dist/components/{index.browser.js → p-BLchVpF6.js} +0 -0
- /package/dist/components/{slide.js → p-BuLMaH5t.js} +0 -0
- /package/dist/components/{get-focusable-children.js → p-C35MCWIp.js} +0 -0
- /package/dist/components/{long-press-event.js → p-C_2k3G1c.js} +0 -0
- /package/dist/components/{switch-variants.js → p-DjIHLduJ.js} +0 -0
- /package/dist/components/{fade.js → p-SbIC4aZX.js} +0 -0
- /package/dist/components/{heading-levels.js → p-r4txK0AC.js} +0 -0
- /package/dist/esm/{fade-1f3cacf4.js → fade-SbIC4aZX.js} +0 -0
- /package/dist/esm/{index.browser-ff103197.js → index.browser-BLchVpF6.js} +0 -0
- /package/dist/esm/{long-press-event-04d24397.js → long-press-event-C_2k3G1c.js} +0 -0
- /package/dist/esm/{placement-8d56605d.js → placement-DRiVosES.js} +0 -0
- /package/dist/esm/{slide-cd2850ee.js → slide-BuLMaH5t.js} +0 -0
- /package/dist/post-components/{p-c65f32b0.js → p-BLchVpF6.js} +0 -0
- /package/dist/post-components/{p-9b052461.js → p-BuLMaH5t.js} +0 -0
- /package/dist/post-components/{p-8db32dab.js → p-C_2k3G1c.js} +0 -0
- /package/dist/post-components/{p-59a38c23.js → p-DRiVosES.js} +0 -0
- /package/dist/post-components/{p-64e3de38.js → p-SbIC4aZX.js} +0 -0
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { proxyCustomElement,
|
|
2
|
-
import { I as IS_BROWSER } from './
|
|
3
|
-
import { d as checkEmptyOrOneOf,
|
|
4
|
-
import { v as version } from './
|
|
1
|
+
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
+
import { I as IS_BROWSER } from './p-Cx0AiN2A.js';
|
|
3
|
+
import { d as checkEmptyOrOneOf, e as checkEmptyOrType, c as checkRequiredAndType } from './p-CV7fm1rW.js';
|
|
4
|
+
import { v as version } from './p-BQFahg8B.js';
|
|
5
5
|
|
|
6
6
|
const postIconCss = ":host{display:inline-block;width:1em;height:1em;vertical-align:-0.15em}span{display:block;width:100%;height:100%;fill:currentColor;forced-color-adjust:preserve-parent-color;background-color:currentColor;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}:host([flip-h]:not([flip-h=false])){scale:-1 1}:host([flip-v]:not([flip-v=false])){scale:1 -1}:host([flip-h][flip-v]:not([flip-h=false],[flip-v=false])){scale:-1}:host([animation]){transform-origin:center}:host([animation=cylon]){animation:icon-animation-cylon .75s ease-in-out infinite alternate}:host([animation=cylon-vertical]){animation:icon-animation-cylon-vertical .75s ease-in-out infinite alternate}:host([animation=spin]){animation:icon-animation-spin 2s linear infinite normal}:host([animation=spin-reverse]){animation:icon-animation-spin 2s linear infinite reverse}:host([animation=fade]){animation:icon-animation-fade .75s ease-in-out infinite alternate}:host([animation=throb]){animation:icon-animation-throb .75s ease-in-out infinite alternate}@keyframes icon-animation-cylon{from{transform:translateX(-25%)}to{transform:translateX(25%)}}@keyframes icon-animation-cylon-vertical{from{transform:translateY(25%)}to{transform:translateY(-25%)}}@keyframes icon-animation-fade{from{opacity:.1}to{opacity:1}}@keyframes icon-animation-spin{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes icon-animation-throb{from{opacity:.5;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}";
|
|
7
|
-
const PostIconStyle0 = postIconCss;
|
|
8
7
|
|
|
9
8
|
const CDN_URL = `https://unpkg.com/@swisspost/design-system-icons@${version}/public/post-icons/`;
|
|
10
9
|
const ANIMATION_NAMES = [
|
|
@@ -16,18 +15,19 @@ const ANIMATION_NAMES = [
|
|
|
16
15
|
'throb',
|
|
17
16
|
];
|
|
18
17
|
const ANIMATION_KEYS = [...ANIMATION_NAMES];
|
|
19
|
-
const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends
|
|
18
|
+
const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends H {
|
|
20
19
|
constructor() {
|
|
21
20
|
super();
|
|
22
21
|
this.__registerHost();
|
|
23
22
|
this.__attachShadow();
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
/**
|
|
24
|
+
* When set to `true`, the icon will be flipped horizontally.
|
|
25
|
+
*/
|
|
26
26
|
this.flipH = false;
|
|
27
|
+
/**
|
|
28
|
+
* When set to `true`, the icon will be flipped vertically.
|
|
29
|
+
*/
|
|
27
30
|
this.flipV = false;
|
|
28
|
-
this.name = undefined;
|
|
29
|
-
this.rotate = undefined;
|
|
30
|
-
this.scale = undefined;
|
|
31
31
|
}
|
|
32
32
|
validateAnimation() {
|
|
33
33
|
checkEmptyOrOneOf(this, 'animation', ANIMATION_KEYS);
|
|
@@ -44,55 +44,52 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
|
|
|
44
44
|
validateScale() {
|
|
45
45
|
checkEmptyOrType(this, 'scale', 'number');
|
|
46
46
|
}
|
|
47
|
-
// Construct the icon
|
|
47
|
+
// Construct the icon URL according to the following rules:
|
|
48
|
+
// - URL = current domain + base[href] + meta[data-post-icon-base] (or component base)
|
|
49
|
+
// - If base[href] is not relative, it's used instead of current domain + base[href]
|
|
50
|
+
// - If meta[data-post-icon-base] (or component base) is not relative, it's used as is
|
|
48
51
|
getUrl() {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
// the first definition object which defines a slug, will be used to set the slug of the file url
|
|
53
|
-
const urlDefinitions = [this.getUrlDefinition(this.base, 'both')];
|
|
54
|
-
if (IS_BROWSER) {
|
|
55
|
-
urlDefinitions.push(this.getUrlDefinition(document.head
|
|
56
|
-
.querySelector('meta[name="design-system-settings"][data-post-icon-base]')
|
|
57
|
-
?.getAttribute('data-post-icon-base'), 'relative'));
|
|
58
|
-
urlDefinitions.push(this.getUrlDefinition(document.querySelector('base[href]')?.getAttribute('href'), 'both'));
|
|
52
|
+
const fileName = `${this.name}.svg`;
|
|
53
|
+
if (!IS_BROWSER && !this.base) {
|
|
54
|
+
return `${CDN_URL}${fileName}`;
|
|
59
55
|
}
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
const currentDomain = IS_BROWSER ? window.location.origin : '';
|
|
57
|
+
const baseHref = IS_BROWSER
|
|
58
|
+
? document.querySelector('base[href]')?.getAttribute('href') || ''
|
|
59
|
+
: '';
|
|
60
|
+
const isBaseHrefAbsolute = /^https?:\/\//.test(baseHref);
|
|
61
|
+
const metaIconBase = IS_BROWSER
|
|
62
|
+
? document
|
|
63
|
+
.querySelector('meta[name="design-system-settings"]')
|
|
64
|
+
?.getAttribute('data-post-icon-base') || ''
|
|
65
|
+
: '';
|
|
66
|
+
const iconBase = this.base || metaIconBase;
|
|
67
|
+
const isIconBaseAbsolute = /^https?:\/\//.test(iconBase);
|
|
68
|
+
const normalizedBaseHref = normalizeUrl(baseHref);
|
|
69
|
+
const normalizedIconBase = normalizeUrl(iconBase);
|
|
70
|
+
function normalizeUrl(url) {
|
|
71
|
+
if (!url)
|
|
72
|
+
return '';
|
|
73
|
+
return url.endsWith('/') ? url : `${url}/`;
|
|
66
74
|
}
|
|
67
|
-
|
|
68
|
-
|
|
75
|
+
let url;
|
|
76
|
+
if (isIconBaseAbsolute) {
|
|
77
|
+
// If icon base is absolute, use it as is
|
|
78
|
+
url = `${normalizedIconBase}${fileName}`;
|
|
69
79
|
}
|
|
70
|
-
else {
|
|
71
|
-
|
|
80
|
+
else if (isBaseHrefAbsolute) {
|
|
81
|
+
// If baseHref is absolute, don't use current domain
|
|
82
|
+
url = `${normalizedBaseHref}${normalizedIconBase}${fileName}`;
|
|
72
83
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return {
|
|
77
|
-
url: this.getUrlObject(url),
|
|
78
|
-
definesDomain: allow !== 'relative' ? this.definesDomain(url) : false,
|
|
79
|
-
definesSlug: allow !== 'absolute' ? this.definesSlug(url) : false,
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
getUrlObject(url) {
|
|
83
|
-
if (url) {
|
|
84
|
-
url = url?.endsWith('/') ? url : `${url}/`;
|
|
85
|
-
return new URL(url, 'https://url.base');
|
|
84
|
+
else if (iconBase || baseHref) {
|
|
85
|
+
// Standard case: domain + baseHref + iconBase
|
|
86
|
+
url = `${currentDomain}${normalizedBaseHref}${normalizedIconBase}${fileName}`;
|
|
86
87
|
}
|
|
87
88
|
else {
|
|
88
|
-
|
|
89
|
+
// Fallback to CDN if no paths are specified
|
|
90
|
+
url = `${CDN_URL}${fileName}`;
|
|
89
91
|
}
|
|
90
|
-
|
|
91
|
-
definesDomain(url) {
|
|
92
|
-
return url ? /^https?:\/\//.test(url) : false;
|
|
93
|
-
}
|
|
94
|
-
definesSlug(url) {
|
|
95
|
-
return Boolean(/^\/.+/.test(this.getUrlObject(url)?.pathname));
|
|
92
|
+
return url.replace(/([^:])\/\//g, '$1/');
|
|
96
93
|
}
|
|
97
94
|
getStyles() {
|
|
98
95
|
const url = this.getUrl();
|
|
@@ -113,7 +110,7 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
|
|
|
113
110
|
this.validateAnimation();
|
|
114
111
|
}
|
|
115
112
|
render() {
|
|
116
|
-
return (h(Host, { key: '
|
|
113
|
+
return (h(Host, { key: '1427e07f64159df95922a2e79343447675183c3c', "data-version": version }, h("span", { key: 'a83eadbc13d9c5876d135cd5282cfa451951d2fe', style: this.getStyles() })));
|
|
117
114
|
}
|
|
118
115
|
get host() { return this; }
|
|
119
116
|
static get watchers() { return {
|
|
@@ -123,7 +120,7 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
|
|
|
123
120
|
"rotate": ["validateRotate"],
|
|
124
121
|
"scale": ["validateScale"]
|
|
125
122
|
}; }
|
|
126
|
-
static get style() { return
|
|
123
|
+
static get style() { return postIconCss; }
|
|
127
124
|
}, [1, "post-icon", {
|
|
128
125
|
"animation": [1],
|
|
129
126
|
"base": [1],
|
|
@@ -152,5 +149,6 @@ function defineCustomElement() {
|
|
|
152
149
|
break;
|
|
153
150
|
} });
|
|
154
151
|
}
|
|
152
|
+
defineCustomElement();
|
|
155
153
|
|
|
156
154
|
export { PostIcon as P, defineCustomElement as d };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validates if an event should be processed based on target and nesting criteria
|
|
3
|
+
* @param event - The event to validate
|
|
4
|
+
* @param tag - The expected local name of the event target
|
|
5
|
+
* @param host - The host element for nested component checking
|
|
6
|
+
* @param ignoreNestedComponents - Whether to ignore events from nested components
|
|
7
|
+
* @returns true if the event should be processed, false otherwise
|
|
8
|
+
*/
|
|
9
|
+
function shouldProcessEvent(event, tag, host, ignoreNestedComponents) {
|
|
10
|
+
if (!(event instanceof CustomEvent && event.target instanceof HTMLElement))
|
|
11
|
+
return false;
|
|
12
|
+
const eventTarget = event.target;
|
|
13
|
+
if (eventTarget.localName !== tag)
|
|
14
|
+
return false;
|
|
15
|
+
if (ignoreNestedComponents) {
|
|
16
|
+
// Find the closest parent with the same tag as the host
|
|
17
|
+
const closestParentWithSameTag = findClosestParentWithTag(eventTarget, host.localName);
|
|
18
|
+
if (closestParentWithSameTag !== host)
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Decorator that guards event handlers to only execute when the event meets certain criteria.
|
|
25
|
+
* @param tag - The local name of the element that should be the target of the event
|
|
26
|
+
* @param option - Configuration options for the event guard
|
|
27
|
+
* @param option.ignoreNestedComponents - Whether to ignore events from nested components
|
|
28
|
+
*/
|
|
29
|
+
function EventFrom(tag, option = { ignoreNestedComponents: true }) {
|
|
30
|
+
return function (target, propertyKey, descriptor) {
|
|
31
|
+
if (descriptor) {
|
|
32
|
+
const originalMethod = descriptor.value;
|
|
33
|
+
descriptor.value = function (event) {
|
|
34
|
+
if (!shouldProcessEvent(event, tag, this.host, option.ignoreNestedComponents)) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
return originalMethod.call(this, event);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
// Creates a hidden storage property for the original method using a
|
|
42
|
+
// modified key format (__[property]_original) to avoid naming conflicts
|
|
43
|
+
const privateKey = `__${propertyKey}_original`;
|
|
44
|
+
// Create hidden storage for original method
|
|
45
|
+
Object.defineProperty(target, privateKey, {
|
|
46
|
+
writable: true,
|
|
47
|
+
configurable: true
|
|
48
|
+
});
|
|
49
|
+
// Replace property with getter/setter
|
|
50
|
+
Object.defineProperty(target, propertyKey, {
|
|
51
|
+
// Getter returns original method
|
|
52
|
+
get() {
|
|
53
|
+
return this[privateKey];
|
|
54
|
+
},
|
|
55
|
+
// Setter wraps original method with extra code
|
|
56
|
+
set(originalFunction) {
|
|
57
|
+
if (typeof originalFunction === 'function') {
|
|
58
|
+
// Store original and add new behavior
|
|
59
|
+
this[privateKey] = (event) => {
|
|
60
|
+
if (!shouldProcessEvent(event, tag, this.host, option.ignoreNestedComponents)) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
return originalFunction.call(this, event);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
this[privateKey] = originalFunction;
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
configurable: true,
|
|
71
|
+
enumerable: true
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Traverses up the DOM (including crossing shadow DOM boundaries) to find the closest ancestor
|
|
78
|
+
* that matches the specified tag name.
|
|
79
|
+
* @param element - The starting element
|
|
80
|
+
* @param tagName - The tag name to match (e.g., 'post-accordion')
|
|
81
|
+
* @returns The closest matching ancestor or null if none found
|
|
82
|
+
*/
|
|
83
|
+
function findClosestParentWithTag(element, tagName) {
|
|
84
|
+
let current = element;
|
|
85
|
+
while (current) {
|
|
86
|
+
if (current.localName === tagName) {
|
|
87
|
+
return current;
|
|
88
|
+
}
|
|
89
|
+
// Check regular parent first
|
|
90
|
+
if (current.parentElement) {
|
|
91
|
+
current = current.parentElement;
|
|
92
|
+
}
|
|
93
|
+
// If no parentElement, check if we're in a shadow root
|
|
94
|
+
else if (current.parentNode instanceof ShadowRoot) {
|
|
95
|
+
current = current.parentNode.host;
|
|
96
|
+
}
|
|
97
|
+
// No more parents to check
|
|
98
|
+
else {
|
|
99
|
+
current = null;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export { EventFrom as E };
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import { proxyCustomElement,
|
|
2
|
-
import { v as version } from './
|
|
3
|
-
import {
|
|
4
|
-
import './
|
|
5
|
-
import { d as defineCustomElement$1 } from './
|
|
1
|
+
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
+
import { v as version } from './p-BQFahg8B.js';
|
|
3
|
+
import { a as checkEmptyOrUrl } from './p-CV7fm1rW.js';
|
|
4
|
+
import './p-Cx0AiN2A.js';
|
|
5
|
+
import { d as defineCustomElement$1 } from './p-47N0HfyR.js';
|
|
6
6
|
|
|
7
7
|
const postBreadcrumbItemCss = ":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}}";
|
|
8
|
-
const PostBreadcrumbItemStyle0 = postBreadcrumbItemCss;
|
|
9
8
|
|
|
10
|
-
const PostBreadcrumbItem = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumbItem extends
|
|
9
|
+
const PostBreadcrumbItem = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumbItem extends H {
|
|
11
10
|
constructor() {
|
|
12
11
|
super();
|
|
13
12
|
this.__registerHost();
|
|
14
13
|
this.__attachShadow();
|
|
15
|
-
this.url = undefined;
|
|
16
|
-
this.fullUrl = undefined;
|
|
17
14
|
}
|
|
18
15
|
validateUrl() {
|
|
19
16
|
try {
|
|
@@ -47,13 +44,13 @@ const PostBreadcrumbItem = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumb
|
|
|
47
44
|
}
|
|
48
45
|
render() {
|
|
49
46
|
const BreadcrumbTag = this.validUrl ? 'a' : 'span';
|
|
50
|
-
return (h(Host, { key: '
|
|
47
|
+
return (h(Host, { key: '872c34ab9464ab8c48ad3e3f8af3f44b4c3dcd54', "data-version": version }, h("post-icon", { key: '7637ec79d84bb72ed8066789f3e5b07925e1ca9a', name: "2111", class: "breadcrumb-item-icon" }), h(BreadcrumbTag, { key: 'fd3f54306a49821af4267596a308f6043d4d4ac3', class: "breadcrumb-item", ...(this.validUrl ? { href: this.validUrl } : {}), onKeyDown: event => this.handleKeyDown(event) }, h("slot", { key: '09e41b58cba991ec5ce4e15aa248aba49f459592' }))));
|
|
51
48
|
}
|
|
52
49
|
get host() { return this; }
|
|
53
50
|
static get watchers() { return {
|
|
54
51
|
"url": ["validateUrl"]
|
|
55
52
|
}; }
|
|
56
|
-
static get style() { return
|
|
53
|
+
static get style() { return postBreadcrumbItemCss; }
|
|
57
54
|
}, [1, "post-breadcrumb-item", {
|
|
58
55
|
"url": [1],
|
|
59
56
|
"fullUrl": [32]
|
|
@@ -78,5 +75,6 @@ function defineCustomElement() {
|
|
|
78
75
|
break;
|
|
79
76
|
} });
|
|
80
77
|
}
|
|
78
|
+
defineCustomElement();
|
|
81
79
|
|
|
82
80
|
export { PostBreadcrumbItem as P, defineCustomElement as d };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
+
import { v as version } from './p-BQFahg8B.js';
|
|
3
|
+
|
|
4
|
+
const postMenuItemCss = "post-menu-item button{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-menu-item button{background-color:ButtonFace !important}post-menu-item button:hover{background-color:Highlight !important}}post-menu-item a{text-decoration:none}post-menu-item button,post-menu-item a{position:relative;display:flex;width:100%;align-items:center;padding:.5rem 1rem;gap:.5rem;font-size:1rem;color:#050400;transition:color 250ms cubic-bezier(0.4, 0, 0.2, 1);outline-offset:0;padding-block:.75rem}post-menu-item button:has(post-icon:last-child),post-menu-item a:has(post-icon:last-child){padding-inline-end:.75rem}@media screen and (min-width: 1024px){post-menu-item button,post-menu-item a{font-size:1.25rem}}post-menu-item button>post-icon:last-child,post-menu-item a>post-icon:last-child{margin-inline-start:.5rem}post-menu-item button:focus-visible,post-menu-item a:focus-visible{outline-offset:-2px !important;border-radius:4px}post-menu-item button::after,post-menu-item a::after{content:\"\";display:block;position:absolute;inset-block-end:0;inset-inline:0;height:3px;background-color:rgba(0,0,0,0);transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-menu-item button:hover,post-menu-item a:hover{color:#504f4b}post-menu-item button:hover::after,post-menu-item a:hover::after{background-color:currentColor}";
|
|
5
|
+
|
|
6
|
+
const PostMenuItem = /*@__PURE__*/ proxyCustomElement(class PostMenuItem extends H {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return (h(Host, { key: '6be606f22288f655320c5ef58f3d0f4bf39d7f62', role: "menuitem", "data-version": version }, h("slot", { key: 'a6d4b48b8cb09e27b19cc14def007e3754ff06c0' })));
|
|
13
|
+
}
|
|
14
|
+
static get style() { return postMenuItemCss; }
|
|
15
|
+
}, [4, "post-menu-item"]);
|
|
16
|
+
function defineCustomElement() {
|
|
17
|
+
if (typeof customElements === "undefined") {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const components = ["post-menu-item"];
|
|
21
|
+
components.forEach(tagName => { switch (tagName) {
|
|
22
|
+
case "post-menu-item":
|
|
23
|
+
if (!customElements.get(tagName)) {
|
|
24
|
+
customElements.define(tagName, PostMenuItem);
|
|
25
|
+
}
|
|
26
|
+
break;
|
|
27
|
+
} });
|
|
28
|
+
}
|
|
29
|
+
defineCustomElement();
|
|
30
|
+
|
|
31
|
+
export { PostMenuItem as P, defineCustomElement as d };
|
|
@@ -1,21 +1,30 @@
|
|
|
1
|
-
import { proxyCustomElement,
|
|
2
|
-
import { a as PLACEMENT_TYPES, d as defineCustomElement$1 } from './
|
|
3
|
-
import { v as version } from './
|
|
4
|
-
import { g as getFocusableChildren } from './
|
|
5
|
-
import {
|
|
6
|
-
import './
|
|
7
|
-
import {
|
|
8
|
-
import { g as getRoot } from './
|
|
1
|
+
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
|
+
import { a as PLACEMENT_TYPES, d as defineCustomElement$1 } from './p-Dzrd8BSS.js';
|
|
3
|
+
import { v as version } from './p-BQFahg8B.js';
|
|
4
|
+
import { g as getFocusableChildren } from './p-C35MCWIp.js';
|
|
5
|
+
import { d as checkEmptyOrOneOf } from './p-CV7fm1rW.js';
|
|
6
|
+
import './p-Cx0AiN2A.js';
|
|
7
|
+
import { E as EventFrom } from './p-8U5GFtQP.js';
|
|
8
|
+
import { g as getRoot } from './p-DBHo9yGF.js';
|
|
9
9
|
|
|
10
|
-
const postMenuCss = "@keyframes popIn{from{transform:scale(0.9);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--post-transition-duration, 0.35s);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}to{opacity:1;transform:scale(1)}}:host{display:block}
|
|
11
|
-
const PostMenuStyle0 = postMenuCss;
|
|
10
|
+
const postMenuCss = "@keyframes popIn{from{transform:scale(0.9);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--post-transition-duration, 0.35s);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}to{opacity:1;transform:scale(1)}}:host{display:block}:where([part=menu]){display:flex;flex-direction:column;padding-block:.5rem}";
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
13
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
15
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
16
|
+
else
|
|
17
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
18
|
+
if (d = decorators[i])
|
|
19
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
20
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21
|
+
};
|
|
22
|
+
const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
14
23
|
constructor() {
|
|
15
24
|
super();
|
|
16
25
|
this.__registerHost();
|
|
17
26
|
this.__attachShadow();
|
|
18
|
-
this.toggleMenu = createEvent(this, "toggleMenu"
|
|
27
|
+
this.toggleMenu = createEvent(this, "toggleMenu");
|
|
19
28
|
this.lastFocusedElement = null;
|
|
20
29
|
this.KEYCODES = {
|
|
21
30
|
SPACE: ' ',
|
|
@@ -27,6 +36,18 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLEle
|
|
|
27
36
|
END: 'End',
|
|
28
37
|
ESCAPE: 'Escape',
|
|
29
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* Defines the position of the menu relative to its trigger.
|
|
41
|
+
* Menus are automatically flipped to the opposite side if there is not enough available space and are shifted towards the viewport if they would overlap edge boundaries.
|
|
42
|
+
* For supported values and behavior details, see the [Floating UI placement documentation](https://floating-ui.com/docs/computePosition#placement).
|
|
43
|
+
*/
|
|
44
|
+
this.placement = 'bottom';
|
|
45
|
+
/**
|
|
46
|
+
* Holds the current visibility state of the menu.
|
|
47
|
+
* This state is internally managed to track whether the menu is open (`true`) or closed (`false`),
|
|
48
|
+
* and updates automatically when the menu is toggled.
|
|
49
|
+
*/
|
|
50
|
+
this.isVisible = false;
|
|
30
51
|
this.handleKeyDown = (e) => {
|
|
31
52
|
e.stopPropagation();
|
|
32
53
|
if (e.key === this.KEYCODES.ESCAPE) {
|
|
@@ -38,21 +59,19 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLEle
|
|
|
38
59
|
}
|
|
39
60
|
};
|
|
40
61
|
this.handlePostToggle = (event) => {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
menuItems[0].focus();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
else if (this.lastFocusedElement) {
|
|
53
|
-
this.lastFocusedElement.focus();
|
|
62
|
+
this.isVisible = event.detail;
|
|
63
|
+
this.toggleMenu.emit(this.isVisible);
|
|
64
|
+
requestAnimationFrame(() => {
|
|
65
|
+
if (this.isVisible) {
|
|
66
|
+
this.lastFocusedElement = this.root?.activeElement;
|
|
67
|
+
const menuItems = this.getSlottedItems();
|
|
68
|
+
if (menuItems.length > 0) {
|
|
69
|
+
menuItems[0].focus();
|
|
54
70
|
}
|
|
55
|
-
}
|
|
71
|
+
}
|
|
72
|
+
else if (this.lastFocusedElement) {
|
|
73
|
+
this.lastFocusedElement.focus();
|
|
74
|
+
}
|
|
56
75
|
});
|
|
57
76
|
};
|
|
58
77
|
this.handleClick = (e) => {
|
|
@@ -61,8 +80,6 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLEle
|
|
|
61
80
|
this.toggle(this.host);
|
|
62
81
|
}
|
|
63
82
|
};
|
|
64
|
-
this.placement = 'bottom';
|
|
65
|
-
this.isVisible = false;
|
|
66
83
|
}
|
|
67
84
|
validatePlacement() {
|
|
68
85
|
checkEmptyOrOneOf(this, 'placement', PLACEMENT_TYPES);
|
|
@@ -164,13 +181,13 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLEle
|
|
|
164
181
|
.flatMap(el => Array.from(getFocusableChildren(el))));
|
|
165
182
|
}
|
|
166
183
|
render() {
|
|
167
|
-
return (h(Host, { key: '
|
|
184
|
+
return (h(Host, { key: 'bca8873f7f98b03d3e6952bce4990d1c435bd5ec', "data-version": version, role: "menu" }, h("post-popovercontainer", { key: '805c1e528c4af6e35b7881395b2f9de9e430f8c8', placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: 'f534119e208f2bb387f39824736aee766f550fa8', part: "menu" }, h("slot", { key: 'ec9ae42dab9aebd93aafdbebd15d8c39736c84df' })))));
|
|
168
185
|
}
|
|
169
186
|
get host() { return this; }
|
|
170
187
|
static get watchers() { return {
|
|
171
188
|
"placement": ["validatePlacement"]
|
|
172
189
|
}; }
|
|
173
|
-
static get style() { return
|
|
190
|
+
static get style() { return postMenuCss; }
|
|
174
191
|
}, [1, "post-menu", {
|
|
175
192
|
"placement": [1],
|
|
176
193
|
"isVisible": [32],
|
|
@@ -180,6 +197,9 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLEle
|
|
|
180
197
|
}, undefined, {
|
|
181
198
|
"placement": ["validatePlacement"]
|
|
182
199
|
}]);
|
|
200
|
+
__decorate([
|
|
201
|
+
EventFrom('post-popovercontainer')
|
|
202
|
+
], PostMenu.prototype, "handlePostToggle", void 0);
|
|
183
203
|
function defineCustomElement() {
|
|
184
204
|
if (typeof customElements === "undefined") {
|
|
185
205
|
return;
|
|
@@ -198,5 +218,6 @@ function defineCustomElement() {
|
|
|
198
218
|
break;
|
|
199
219
|
} });
|
|
200
220
|
}
|
|
221
|
+
defineCustomElement();
|
|
201
222
|
|
|
202
223
|
export { PostMenu as P, defineCustomElement as d };
|
|
@@ -85,4 +85,4 @@ const checkRequiredAndOneOf = requiredAnd(checkOneOf);
|
|
|
85
85
|
const checkRequiredAndType = requiredAnd(checkType);
|
|
86
86
|
const checkRequiredAndUrl = requiredAnd(checkUrl);
|
|
87
87
|
|
|
88
|
-
export {
|
|
88
|
+
export { checkEmptyOrUrl as a, checkRequiredAndOneOf as b, checkRequiredAndType as c, checkEmptyOrOneOf as d, checkEmptyOrType as e, checkEmptyOrPattern as f, checkRequiredAndUrl as g };
|