@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,4 +1,4 @@
|
|
|
1
|
-
import { P as PostAccordionItem$1, d as defineCustomElement$1 } from './
|
|
1
|
+
import { P as PostAccordionItem$1, d as defineCustomElement$1 } from './p-D2S8TlQo.js';
|
|
2
2
|
|
|
3
3
|
const PostAccordionItem = PostAccordionItem$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,186 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
+
import { v as version } from './p-BQFahg8B.js';
|
|
3
|
+
import { c as checkRequiredAndType, e as checkEmptyOrType, f as checkEmptyOrPattern } from './p-CV7fm1rW.js';
|
|
4
|
+
import './p-Cx0AiN2A.js';
|
|
5
|
+
|
|
6
|
+
const postAvatarCss = "@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{--post-avatar-bg:var(--post-scheme-color-interactive-primary-enabled-bg2);--post-avatar-fg:var(--post-scheme-color-interactive-primary-enabled-fg3);display:inline-flex;position:relative;width:var(--post-device-sizing-interactive-icon-size3);height:var(--post-device-sizing-interactive-icon-size3);background-color:var(--post-scheme-color-interactive-primary-enabled-stroke3);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke3);border-radius:var(--post-device-border-radius-round);font-size:var(--post-device-font-size-8);vertical-align:top;line-height:1}:host::after{display:block;content:\"\";position:absolute;inset:0;z-index:1;border-radius:inherit}*,*::before,*::after{box-sizing:border-box}slot,img,::slotted(img){display:block;width:100%;height:100%}img,::slotted(img){border-radius:var(--post-device-border-radius-round)}::slotted(:not(img)){display:none !important}.initials{display:flex;justify-content:center;align-items:center;position:relative;z-index:2;width:100%;height:100%;background-color:var(--post-avatar-bg);border-radius:var(--post-device-border-radius-round);color:var(--post-avatar-fg);text-transform:uppercase}.initials span{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.initials span:not(caption){position:absolute !important}";
|
|
7
|
+
|
|
8
|
+
// https://docs.gravatar.com/api/avatars/images/
|
|
9
|
+
const GRAVATAR_DEFAULT = '404';
|
|
10
|
+
const GRAVATAR_RATING = 'g';
|
|
11
|
+
const GRAVATAR_SIZE = 80;
|
|
12
|
+
const GRAVATAR_BASE_URL = `https://www.gravatar.com/avatar/{email}?s=${GRAVATAR_SIZE}&d=${GRAVATAR_DEFAULT}&r=${GRAVATAR_RATING}`;
|
|
13
|
+
const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
14
|
+
var AvatarType;
|
|
15
|
+
(function (AvatarType) {
|
|
16
|
+
AvatarType["Slotted"] = "slotted";
|
|
17
|
+
AvatarType["Image"] = "image";
|
|
18
|
+
AvatarType["Initials"] = "initials";
|
|
19
|
+
AvatarType[AvatarType["Null"] = null] = "Null";
|
|
20
|
+
})(AvatarType || (AvatarType = {}));
|
|
21
|
+
const PostAvatar$1 = /*@__PURE__*/ proxyCustomElement(class PostAvatar extends H {
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
this.__registerHost();
|
|
25
|
+
this.__attachShadow();
|
|
26
|
+
this.avatarType = null;
|
|
27
|
+
this.imageUrl = '';
|
|
28
|
+
this.imageAlt = '';
|
|
29
|
+
this.initials = '';
|
|
30
|
+
}
|
|
31
|
+
validateFirstname() {
|
|
32
|
+
checkRequiredAndType(this, 'firstname', 'string');
|
|
33
|
+
}
|
|
34
|
+
validateLastname() {
|
|
35
|
+
checkEmptyOrType(this, 'lastname', 'string');
|
|
36
|
+
}
|
|
37
|
+
validateUserid() {
|
|
38
|
+
checkEmptyOrType(this, 'userid', 'string');
|
|
39
|
+
}
|
|
40
|
+
validateEmail() {
|
|
41
|
+
if (this.email)
|
|
42
|
+
checkEmptyOrPattern(this, 'email', emailPattern);
|
|
43
|
+
}
|
|
44
|
+
async getAvatar() {
|
|
45
|
+
if (this.slottedImage !== null) {
|
|
46
|
+
this.avatarType = AvatarType.Slotted;
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
let imageLoaded = false;
|
|
50
|
+
if (!imageLoaded && this.userid)
|
|
51
|
+
imageLoaded = await this.getImageByProp(this.userid, this.fetchImageByUserId.bind(this));
|
|
52
|
+
if (!imageLoaded && this.email)
|
|
53
|
+
imageLoaded = await this.getImageByProp(this.email, this.fetchImageByEmail.bind(this));
|
|
54
|
+
if (!imageLoaded)
|
|
55
|
+
this.getAvatarByInitials();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async getImageByProp(prop, fetchImage) {
|
|
59
|
+
if (!prop)
|
|
60
|
+
return false;
|
|
61
|
+
const imageResponse = (await this.getStorageItem(prop)) ?? { ok: false, url: '' };
|
|
62
|
+
if (!imageResponse.ok) {
|
|
63
|
+
try {
|
|
64
|
+
const r = await fetchImage();
|
|
65
|
+
imageResponse.ok = r.ok;
|
|
66
|
+
imageResponse.url = r.url;
|
|
67
|
+
this.imageUrl = imageResponse.url;
|
|
68
|
+
this.imageAlt = `${this.firstname} ${this.lastname} avatar`;
|
|
69
|
+
this.avatarType = AvatarType.Image;
|
|
70
|
+
this.setStorageItem(this.userid, JSON.stringify(imageResponse));
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
this.removeStorageItem(prop);
|
|
74
|
+
console.info(`Loading avatar by type "${AvatarType.Image}" failed.`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return imageResponse.ok;
|
|
78
|
+
}
|
|
79
|
+
async fetchImageByUserId() {
|
|
80
|
+
return await fetch(PostAvatar.INTERNAL_USERID_IMAGE_SRC.replace('{userid}', encodeURIComponent(this.userid)));
|
|
81
|
+
}
|
|
82
|
+
async fetchImageByEmail() {
|
|
83
|
+
const email = await this.cryptify(this.email);
|
|
84
|
+
const imageUrl = GRAVATAR_BASE_URL.replace('{email}', email);
|
|
85
|
+
return await fetch(imageUrl);
|
|
86
|
+
}
|
|
87
|
+
getAvatarByInitials() {
|
|
88
|
+
this.initials = this.getInitials();
|
|
89
|
+
this.avatarType = AvatarType.Initials;
|
|
90
|
+
}
|
|
91
|
+
getNames() {
|
|
92
|
+
return [this.firstname, this.lastname].filter(n => n);
|
|
93
|
+
}
|
|
94
|
+
getInitials() {
|
|
95
|
+
return this.getNames()
|
|
96
|
+
.map(n => n.charAt(0))
|
|
97
|
+
.join('')
|
|
98
|
+
.trim();
|
|
99
|
+
}
|
|
100
|
+
async getStorageItem(keyToken) {
|
|
101
|
+
const key = await this.cryptify(keyToken);
|
|
102
|
+
const value = window?.sessionStorage?.getItem(key);
|
|
103
|
+
return value ? JSON.parse(value) : null;
|
|
104
|
+
}
|
|
105
|
+
async setStorageItem(keyToken, value) {
|
|
106
|
+
const key = await this.cryptify(keyToken);
|
|
107
|
+
window?.sessionStorage?.setItem(key, value);
|
|
108
|
+
}
|
|
109
|
+
async removeStorageItem(keyToken) {
|
|
110
|
+
const key = await this.cryptify(keyToken);
|
|
111
|
+
window?.sessionStorage?.removeItem(key);
|
|
112
|
+
}
|
|
113
|
+
async cryptify(key) {
|
|
114
|
+
return await crypto.subtle.digest('SHA-256', new TextEncoder().encode(key)).then(buffer => {
|
|
115
|
+
return Array.from(new Uint8Array(buffer))
|
|
116
|
+
.map(bytes => bytes.toString(16).padStart(2, '0'))
|
|
117
|
+
.join('');
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
onSlotDefaultChange() {
|
|
121
|
+
this.slottedImage = this.host.querySelector('img');
|
|
122
|
+
this.getAvatar();
|
|
123
|
+
}
|
|
124
|
+
componentWillRender() {
|
|
125
|
+
this.slottedImage = this.host.querySelector('img');
|
|
126
|
+
this.getAvatar();
|
|
127
|
+
}
|
|
128
|
+
componentDidLoad() {
|
|
129
|
+
this.validateFirstname();
|
|
130
|
+
this.validateLastname();
|
|
131
|
+
this.validateUserid();
|
|
132
|
+
this.validateEmail();
|
|
133
|
+
}
|
|
134
|
+
render() {
|
|
135
|
+
const initials = this.getNames().reduce((acc, n, i) => {
|
|
136
|
+
if (i > 0)
|
|
137
|
+
acc.push(h("span", null, " "));
|
|
138
|
+
acc.push(n.charAt(0));
|
|
139
|
+
acc.push(h("span", null, n.slice(1)));
|
|
140
|
+
// eslint-disable-next-line @stencil-community/render-returns-host
|
|
141
|
+
return acc;
|
|
142
|
+
}, []);
|
|
143
|
+
return (h(Host, { "data-version": version }, h("slot", { onSlotchange: this.onSlotDefaultChange.bind(this) }, this.avatarType === 'image' && h("img", { src: this.imageUrl, alt: this.imageAlt }), this.avatarType === 'initials' && h("div", { class: "initials" }, initials))));
|
|
144
|
+
}
|
|
145
|
+
get host() { return this; }
|
|
146
|
+
static get watchers() { return {
|
|
147
|
+
"firstname": ["validateFirstname"],
|
|
148
|
+
"lastname": ["validateLastname"],
|
|
149
|
+
"userid": ["validateUserid"],
|
|
150
|
+
"email": ["validateEmail"]
|
|
151
|
+
}; }
|
|
152
|
+
static get style() { return postAvatarCss; }
|
|
153
|
+
}, [1, "post-avatar", {
|
|
154
|
+
"firstname": [513],
|
|
155
|
+
"lastname": [1],
|
|
156
|
+
"userid": [1],
|
|
157
|
+
"email": [1],
|
|
158
|
+
"slottedImage": [32],
|
|
159
|
+
"avatarType": [32],
|
|
160
|
+
"imageUrl": [32],
|
|
161
|
+
"imageAlt": [32],
|
|
162
|
+
"initials": [32]
|
|
163
|
+
}, undefined, {
|
|
164
|
+
"firstname": ["validateFirstname"],
|
|
165
|
+
"lastname": ["validateLastname"],
|
|
166
|
+
"userid": ["validateUserid"],
|
|
167
|
+
"email": ["validateEmail"]
|
|
168
|
+
}]);
|
|
169
|
+
PostAvatar$1.INTERNAL_USERID_IMAGE_SRC = 'https://web.post.ch/UserProfileImage/{userid}.png';
|
|
170
|
+
function defineCustomElement$1() {
|
|
171
|
+
if (typeof customElements === "undefined") {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
const components = ["post-avatar"];
|
|
175
|
+
components.forEach(tagName => { switch (tagName) {
|
|
176
|
+
case "post-avatar":
|
|
177
|
+
if (!customElements.get(tagName)) {
|
|
178
|
+
customElements.define(tagName, PostAvatar$1);
|
|
179
|
+
}
|
|
180
|
+
break;
|
|
181
|
+
} });
|
|
182
|
+
}
|
|
183
|
+
defineCustomElement$1();
|
|
2
184
|
|
|
3
185
|
const PostAvatar = PostAvatar$1;
|
|
4
186
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,118 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
+
import { s as slideDown, a as slideUp } from './p-BuLMaH5t.js';
|
|
3
|
+
import { v as version } from './p-BQFahg8B.js';
|
|
4
|
+
import { c as checkRequiredAndType } from './p-CV7fm1rW.js';
|
|
5
|
+
import './p-Cx0AiN2A.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './p-47N0HfyR.js';
|
|
7
|
+
|
|
8
|
+
const postBackToTopCss = ":host{--post-floating-button-position-top:var(--post-device-position-4);--post-back-to-top-position-top:calc( var(--post-header-height) + var(--post-floating-button-position-top) );--post-back-to-top-elevation:var(--post-device-elevation-300);position:fixed;inset-block-start:var(--post-back-to-top-position-top);inset-inline-end:var(--post-device-position-1)}:host .back-to-top{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;box-shadow:var(--post-back-to-top-elevation);cursor:pointer;border-radius:var(--post-device-border-radius-round);width:var(--post-device-sizing-interactive-button-height-2);height:var(--post-device-sizing-interactive-button-height-2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg);display:flex;align-items:center;justify-content:center}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top{background-color:ButtonFace !important}:host .back-to-top:hover{background-color:Highlight !important}}:host .back-to-top{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .back-to-top:hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:hover{color:HighlightText !important}}:host .back-to-top post-icon{height:var(--post-device-sizing-interactive-button-icon-3);width:var(--post-device-sizing-interactive-button-icon-3)}:host .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
9
|
+
|
|
10
|
+
const PostBackToTop$1 = /*@__PURE__*/ proxyCustomElement(class PostBackToTop extends H {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.__registerHost();
|
|
14
|
+
this.__attachShadow();
|
|
15
|
+
this.belowFold = false;
|
|
16
|
+
this.handleScroll = () => {
|
|
17
|
+
this.belowFold = this.isBelowFold();
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
isBelowFold() {
|
|
21
|
+
return window.scrollY > window.innerHeight;
|
|
22
|
+
}
|
|
23
|
+
validateLabel() {
|
|
24
|
+
checkRequiredAndType(this, 'label', 'string');
|
|
25
|
+
}
|
|
26
|
+
/*Watch for changes in belowFold to show/hide the back to top button*/
|
|
27
|
+
watchBelowFold(newValue) {
|
|
28
|
+
if (newValue) {
|
|
29
|
+
slideDown(this.host, this.translateY);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
slideUp(this.host, this.translateY);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
scrollToTop() {
|
|
36
|
+
window.scrollTo({
|
|
37
|
+
top: 0,
|
|
38
|
+
behavior: 'smooth',
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
getSecondPixelValue(parts) {
|
|
42
|
+
for (const part of parts) {
|
|
43
|
+
const pixelValues = part.match(/\b\d+px\b/g);
|
|
44
|
+
if (pixelValues && pixelValues.length > 1) {
|
|
45
|
+
return pixelValues[1];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
animateButton() {
|
|
50
|
+
// Get the back-to-top button top postiion
|
|
51
|
+
const positionTop = window.getComputedStyle(this.host).getPropertyValue('top');
|
|
52
|
+
const buttonElement = this.host.shadowRoot.querySelector('button');
|
|
53
|
+
// Extract the elevation height from the back-to-top button elevation token
|
|
54
|
+
const elevation = getComputedStyle(buttonElement).getPropertyValue('--post-back-to-top-elevation');
|
|
55
|
+
const elevationParts = elevation.split(',');
|
|
56
|
+
const elevationHeight = this.getSecondPixelValue(elevationParts);
|
|
57
|
+
// The translateY is calculated as => -100% (btt button height) - topPosition - elevationHeight
|
|
58
|
+
this.translateY =
|
|
59
|
+
String((-1 * 100) / 100 -
|
|
60
|
+
parseFloat(positionTop.replace('px', '')) -
|
|
61
|
+
parseFloat(elevationHeight.replace('px', ''))) + 'px';
|
|
62
|
+
if (this.belowFold) {
|
|
63
|
+
slideDown(this.host, this.translateY);
|
|
64
|
+
}
|
|
65
|
+
if (!this.belowFold) {
|
|
66
|
+
this.host.style.transform = `translateY(${this.translateY})`;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// Set the initial state
|
|
70
|
+
componentWillLoad() {
|
|
71
|
+
this.belowFold = this.isBelowFold();
|
|
72
|
+
}
|
|
73
|
+
componentDidLoad() {
|
|
74
|
+
window.addEventListener('scroll', this.handleScroll, false);
|
|
75
|
+
this.animateButton();
|
|
76
|
+
this.validateLabel();
|
|
77
|
+
}
|
|
78
|
+
disconnectedCallback() {
|
|
79
|
+
window.removeEventListener('scroll', this.handleScroll);
|
|
80
|
+
}
|
|
81
|
+
render() {
|
|
82
|
+
return (h(Host, { key: '7edc6db9d849cf9ce0308a2ac5b2c2f9bc4e47a9', "data-version": version }, h("button", { key: '610e81756ce3dd927f55d48beb8cd829b66fc247', class: "back-to-top", "aria-hidden": this.belowFold ? 'false' : 'true', tabindex: this.belowFold ? '0' : '-1', onClick: this.scrollToTop }, h("post-icon", { key: 'bb1f3cc462de7680361f4cfd04abb1816aebd488', "aria-hidden": "true", name: "3026" }), h("span", { key: '4fbd84d78c425140adea5833450cef60af967f5a', class: "visually-hidden" }, this.label))));
|
|
83
|
+
}
|
|
84
|
+
get host() { return this; }
|
|
85
|
+
static get watchers() { return {
|
|
86
|
+
"label": ["validateLabel"],
|
|
87
|
+
"belowFold": ["watchBelowFold"]
|
|
88
|
+
}; }
|
|
89
|
+
static get style() { return postBackToTopCss; }
|
|
90
|
+
}, [1, "post-back-to-top", {
|
|
91
|
+
"label": [513],
|
|
92
|
+
"belowFold": [32]
|
|
93
|
+
}, undefined, {
|
|
94
|
+
"label": ["validateLabel"],
|
|
95
|
+
"belowFold": ["watchBelowFold"]
|
|
96
|
+
}]);
|
|
97
|
+
function defineCustomElement$1() {
|
|
98
|
+
if (typeof customElements === "undefined") {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const components = ["post-back-to-top", "post-icon"];
|
|
102
|
+
components.forEach(tagName => { switch (tagName) {
|
|
103
|
+
case "post-back-to-top":
|
|
104
|
+
if (!customElements.get(tagName)) {
|
|
105
|
+
customElements.define(tagName, PostBackToTop$1);
|
|
106
|
+
}
|
|
107
|
+
break;
|
|
108
|
+
case "post-icon":
|
|
109
|
+
if (!customElements.get(tagName)) {
|
|
110
|
+
defineCustomElement$2();
|
|
111
|
+
}
|
|
112
|
+
break;
|
|
113
|
+
} });
|
|
114
|
+
}
|
|
115
|
+
defineCustomElement$1();
|
|
2
116
|
|
|
3
117
|
const PostBackToTop = PostBackToTop$1;
|
|
4
118
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,123 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
|
+
import { v as version } from './p-BQFahg8B.js';
|
|
3
|
+
import { f as fadeOut } from './p-SbIC4aZX.js';
|
|
4
|
+
import { c as checkRequiredAndType, e as checkEmptyOrType, d as checkEmptyOrOneOf } from './p-CV7fm1rW.js';
|
|
5
|
+
import './p-Cx0AiN2A.js';
|
|
6
|
+
import { n as nanoid } from './p-BLchVpF6.js';
|
|
7
|
+
import { d as defineCustomElement$2 } from './p-47N0HfyR.js';
|
|
8
|
+
|
|
9
|
+
const BANNER_TYPES = ['neutral', 'success', 'warning', 'danger', 'info'];
|
|
10
|
+
|
|
11
|
+
const postBannerCss = ".banner,.alert{min-height:calc(var(--post-device-sizing-notification-icon-2) + (2 * var(--post-device-spacing-padding-10)));box-sizing:border-box;box-shadow:var(--post-device-elevation-100);border-radius:var(--post-device-border-radius-2);padding:var(--post-device-spacing-padding-10) var(--post-device-spacing-padding-10);padding-inline-start:calc(var(--post-device-spacing-padding-10) + var(--post-device-sizing-notification-icon-2) + var(--post-device-spacing-gap-inline-6));font-weight:var(--post-core-font-weight-400);border-style:var(--post-core-border-style-solid);border-width:var(--post-device-border-width-default);position:relative;color:var(--post-scheme-color-surface-default-fg);background-color:var(--post-scheme-color-signal-neutral);border-color:var(--post-scheme-color-signal-neutral-dark);color-scheme:var(--post-core-bg-scheme-light)}.banner:not(.no-icon)::before,.alert:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-signal-neutral-dark)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner:not(.no-icon)::before,.alert:not(.no-icon)::before{color:CanvasText}}.banner:has(>post-icon)::before,.alert:has(>post-icon)::before{content:none}.banner>post-icon,.alert>post-icon{background-color:var(--post-scheme-color-signal-neutral);color:var(--post-scheme-color-signal-neutral-dark)}.banner::before,.alert::before{content:\"\";display:block}.banner::before,.banner>post-icon,.alert::before,.alert>post-icon{position:absolute;height:var(--post-device-sizing-notification-icon-2);width:var(--post-device-sizing-notification-icon-2);left:var(--post-device-spacing-padding-10);top:var(--post-device-spacing-padding-10)}.banner.no-icon,.alert.no-icon{min-height:calc(2*var(--post-device-spacing-padding-10) + var(--post-core-dimension-24));padding-inline-start:var(--post-device-spacing-padding-10)}.banner.no-icon::before,.alert.no-icon::before{content:unset}.banner.no-icon>post-icon,.alert.no-icon>post-icon{display:none}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner,.alert{filter:none !important;border:2px solid CanvasText}}.banner:not(.banner-action):not(.alert-action),.alert:not(.banner-action):not(.alert-action){display:flex;flex-direction:column;justify-content:center;gap:var(--post-core-dimension-4)}.banner:not(.banner-action):not(.alert-action) a,.alert:not(.banner-action):not(.alert-action) a{font-weight:var(--post-core-font-weight-400)}.banner:not(.banner-action):not(.alert-action) hr,.alert:not(.banner-action):not(.alert-action) hr{margin-block:var(--post-core-dimension-8) var(--post-core-dimension-12) !important}.banner:not(.banner-action):not(.alert-action)>*,.alert:not(.banner-action):not(.alert-action)>*{margin:0}.banner-container{border:unset;background-color:rgba(0,0,0,0)}.banner-dismissible,.alert-dismissible{pointer-events:auto;position:relative}.banner-dismissible:not(.banner-action):not(.alert-action),.alert-dismissible:not(.banner-action):not(.alert-action){padding-inline-end:calc(var(--post-device-spacing-padding-10) + var(--post-device-spacing-gap-inline-6) + var(--post-core-dimension-24))}.banner-dismissible>.btn-close,.alert-dismissible>.btn-close{position:absolute;inset-block-start:1rem;inset-inline-end:var(--post-device-spacing-padding-10)}.banner-buttons,.alert-buttons{display:flex;align-items:center;justify-content:flex-start;flex-direction:row-reverse;margin-block-start:var(--post-device-spacing-padding-block-10);gap:var(--post-device-spacing-gap-1)}@media (max-width: 779.98px){.banner-buttons,.alert-buttons{flex-direction:column}}.banner-action>.banner-content,.banner-action>.alert-content,.alert-action>.banner-content,.alert-action>.alert-content{display:flex;flex-direction:column;justify-content:center;gap:var(--post-core-dimension-4)}.banner-action>.banner-content a,.banner-action>.alert-content a,.alert-action>.banner-content a,.alert-action>.alert-content a{font-weight:var(--post-core-font-weight-400)}.banner-action>.banner-content hr,.banner-action>.alert-content hr,.alert-action>.banner-content hr,.alert-action>.alert-content hr{margin-block:var(--post-core-dimension-8) var(--post-core-dimension-12) !important}.banner-action>.banner-content>*,.banner-action>.alert-content>*,.alert-action>.banner-content>*,.alert-action>.alert-content>*{margin:0}@media (max-width: 779.98px){.banner-action,.alert-action{flex-direction:column;align-items:stretch}.banner-action>.banner-content,.banner-action>.alert-content,.alert-action>.banner-content,.alert-action>.alert-content{padding-inline-start:var(--post-device-spacing-gap-inline-6)var(--post-device-sizing-notification-icon-2);padding-inline-end:var(--post-device-spacing-gap-inline-6)var(--post-core-dimension-24)}.banner-action.no-icon>.banner-content,.banner-action.no-icon>.alert-content,.alert-action.no-icon>.banner-content,.alert-action.no-icon>.alert-content{padding-inline-start:0}.banner-action>.banner-buttons,.banner-action>.alert-buttons,.alert-action>.banner-buttons,.alert-action>.alert-buttons{display:flex}.banner-action>.banner-buttons>.btn,.banner-action>.banner-buttons>::slotted(.btn),.banner-action>.alert-buttons>.btn,.banner-action>.alert-buttons>::slotted(.btn),.alert-action>.banner-buttons>.btn,.alert-action>.banner-buttons>::slotted(.btn),.alert-action>.alert-buttons>.btn,.alert-action>.alert-buttons>::slotted(.btn){flex:1 0 0;width:100%}.banner-action>.banner-buttons>.btn:first-child,.banner-action>.banner-buttons>::slotted(.btn:first-child),.banner-action>.alert-buttons>.btn:first-child,.banner-action>.alert-buttons>::slotted(.btn:first-child),.alert-action>.banner-buttons>.btn:first-child,.alert-action>.banner-buttons>::slotted(.btn:first-child),.alert-action>.alert-buttons>.btn:first-child,.alert-action>.alert-buttons>::slotted(.btn:first-child){margin-inline-start:0}}.banner-neutral,.alert-neutral{background-color:var(--post-scheme-color-signal-neutral);border-color:var(--post-scheme-color-signal-neutral-dark);color-scheme:var(--post-core-bg-scheme-light)}.banner-neutral:not(.no-icon)::before,.alert-neutral:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-signal-neutral-dark)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-neutral:not(.no-icon)::before,.alert-neutral:not(.no-icon)::before{color:CanvasText}}.banner-neutral:has(>post-icon)::before,.alert-neutral:has(>post-icon)::before{content:none}.banner-neutral>post-icon,.alert-neutral>post-icon{background-color:var(--post-scheme-color-signal-neutral);color:var(--post-scheme-color-signal-neutral-dark)}.banner-success,.alert-success{background-color:var(--post-scheme-color-interactive-notification-success-bg);border-color:var(--post-scheme-color-interactive-notification-success-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-success:not(.no-icon)::before,.alert-success:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-success-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-success:not(.no-icon)::before,.alert-success:not(.no-icon)::before{color:CanvasText}}.banner-success:has(>post-icon)::before,.alert-success:has(>post-icon)::before{content:none}.banner-success>post-icon,.alert-success>post-icon{background-color:var(--post-scheme-color-interactive-notification-success-bg);color:var(--post-scheme-color-interactive-notification-success-icon)}.banner-warning,.alert-warning{background-color:var(--post-scheme-color-interactive-notification-warning-bg);border-color:var(--post-scheme-color-interactive-notification-warning-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-warning:not(.no-icon)::before,.alert-warning:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-warning-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-warning:not(.no-icon)::before,.alert-warning:not(.no-icon)::before{color:CanvasText}}.banner-warning:has(>post-icon)::before,.alert-warning:has(>post-icon)::before{content:none}.banner-warning>post-icon,.alert-warning>post-icon{background-color:var(--post-scheme-color-interactive-notification-warning-bg);color:var(--post-scheme-color-interactive-notification-warning-icon)}.banner-error,.alert-error{background-color:var(--post-scheme-color-interactive-notification-error-bg);border-color:var(--post-scheme-color-interactive-notification-error-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-error:not(.no-icon)::before,.alert-error:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-error-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-error:not(.no-icon)::before,.alert-error:not(.no-icon)::before{color:CanvasText}}.banner-error:has(>post-icon)::before,.alert-error:has(>post-icon)::before{content:none}.banner-error>post-icon,.alert-error>post-icon{background-color:var(--post-scheme-color-interactive-notification-error-bg);color:var(--post-scheme-color-interactive-notification-error-icon)}.banner-info,.alert-info{background-color:var(--post-scheme-color-interactive-notification-info-bg);border-color:var(--post-scheme-color-interactive-notification-info-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-info:not(.no-icon)::before,.alert-info:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.33 25.33v-16h-4.67V12h2v13.33h-2V28h6.67v-2.67zM14.67 4h2.67v2.67h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-info-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-info:not(.no-icon)::before,.alert-info:not(.no-icon)::before{color:CanvasText}}.banner-info:has(>post-icon)::before,.alert-info:has(>post-icon)::before{content:none}.banner-info>post-icon,.alert-info>post-icon{background-color:var(--post-scheme-color-interactive-notification-info-bg);color:var(--post-scheme-color-interactive-notification-info-icon)}.banner-danger,.alert-danger{background-color:var(--post-scheme-color-interactive-notification-error-bg);border-color:var(--post-scheme-color-interactive-notification-error-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-danger:not(.no-icon)::before,.alert-danger:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-error-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-danger:not(.no-icon)::before,.alert-danger:not(.no-icon)::before{color:CanvasText}}.banner-danger:has(>post-icon)::before,.alert-danger:has(>post-icon)::before{content:none}.banner-danger>post-icon,.alert-danger>post-icon{background-color:var(--post-scheme-color-interactive-notification-error-bg);color:var(--post-scheme-color-interactive-notification-error-icon)}.btn-close{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;border-radius:var(--post-device-border-radius-round);color:#000;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{background-color:ButtonFace !important}.btn-close:hover{background-color:Highlight !important}}.btn-close{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}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-close::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;content:\"\";display:block;height:var(--post-core-dimension-24);width:var(--post-core-dimension-24)}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:#000}.btn-close:disabled{color:#999}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}@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}:host ::slotted(*){margin:0 !important}.visually-hidden{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.visually-hidden:not(caption){position:absolute !important}";
|
|
12
|
+
|
|
13
|
+
const PostBanner$1 = /*@__PURE__*/ proxyCustomElement(class PostBanner extends H {
|
|
14
|
+
constructor() {
|
|
15
|
+
super();
|
|
16
|
+
this.__registerHost();
|
|
17
|
+
this.__attachShadow();
|
|
18
|
+
this.postDismissed = createEvent(this, "postDismissed");
|
|
19
|
+
this.bannerId = `p${nanoid(6)}`;
|
|
20
|
+
this.onDismissButtonClick = () => this.dismiss();
|
|
21
|
+
/**
|
|
22
|
+
* If `true`, a close button (×) is displayed and the banner can be dismissed by the user.
|
|
23
|
+
*/
|
|
24
|
+
this.dismissible = false;
|
|
25
|
+
/**
|
|
26
|
+
* The type of the banner.
|
|
27
|
+
*/
|
|
28
|
+
this.type = 'neutral';
|
|
29
|
+
}
|
|
30
|
+
checkDismissible() {
|
|
31
|
+
if (this.dismissible) {
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
checkRequiredAndType(this, 'dismissLabel', 'string');
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
validateIcon() {
|
|
38
|
+
checkEmptyOrType(this, 'icon', 'string');
|
|
39
|
+
}
|
|
40
|
+
validateType() {
|
|
41
|
+
checkEmptyOrOneOf(this, 'type', BANNER_TYPES);
|
|
42
|
+
}
|
|
43
|
+
componentDidLoad() {
|
|
44
|
+
this.checkDismissible();
|
|
45
|
+
this.validateIcon();
|
|
46
|
+
this.validateType();
|
|
47
|
+
}
|
|
48
|
+
componentWillRender() {
|
|
49
|
+
this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;
|
|
50
|
+
this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;
|
|
51
|
+
this.classes = `banner ${this.type ? 'banner-' + this.type : ''}`;
|
|
52
|
+
if (this.dismissible)
|
|
53
|
+
this.classes += ' banner-dismissible';
|
|
54
|
+
if (this.hasActions)
|
|
55
|
+
this.classes += ' banner-action';
|
|
56
|
+
if (this.icon === 'none')
|
|
57
|
+
this.classes += ' no-icon';
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Triggers banner dismissal programmatically (same as clicking on the close button (×)).
|
|
61
|
+
*/
|
|
62
|
+
async dismiss() {
|
|
63
|
+
const dismissal = fadeOut(this.host);
|
|
64
|
+
await dismissal.finished;
|
|
65
|
+
this.host.remove();
|
|
66
|
+
this.postDismissed.emit();
|
|
67
|
+
}
|
|
68
|
+
render() {
|
|
69
|
+
const defaultBannerContent = [
|
|
70
|
+
this.hasHeading && (h("div", { key: `${this.bannerId}-heading`, class: "banner-heading" }, h("slot", { key: '6bf8a3c8152cda870f7d3036c837918f83dee8e1', name: "heading" }))),
|
|
71
|
+
h("slot", { key: `${this.bannerId}-message` }),
|
|
72
|
+
];
|
|
73
|
+
const actionBannerContent = [
|
|
74
|
+
h("div", { key: `${this.bannerId}-content`, class: "banner-content" }, defaultBannerContent),
|
|
75
|
+
h("div", { key: `${this.bannerId}-buttons`, class: "banner-buttons" }, h("slot", { key: '07a3ade9a798eeb292e28820483a4e5096fe3569', name: "actions" })),
|
|
76
|
+
];
|
|
77
|
+
return (h(Host, { key: '9b6c1935e20686e69005a0034ca711363b880647', "data-version": version }, h("div", { key: '9a4effd086d7279cbd91bea6b5510bc66349fdc5', role: "alert", class: this.classes, part: this.classes }, this.dismissible && (h("button", { key: '7e822d65eaf6eb9aa356aed8cc95c0107ee1ae27', class: "btn-close", onClick: this.onDismissButtonClick }, h("span", { key: 'f1c7356412ddb9d046f985fde25703715a20755d', class: "visually-hidden" }, this.dismissLabel))), this.icon && this.icon !== 'none' && (h("post-icon", { key: `${this.bannerId}-icon`, name: this.icon })), this.hasActions ? actionBannerContent : defaultBannerContent)));
|
|
78
|
+
}
|
|
79
|
+
get host() { return this; }
|
|
80
|
+
static get watchers() { return {
|
|
81
|
+
"dismissible": ["checkDismissible"],
|
|
82
|
+
"icon": ["validateIcon"],
|
|
83
|
+
"type": ["validateType"]
|
|
84
|
+
}; }
|
|
85
|
+
static get style() { return postBannerCss; }
|
|
86
|
+
}, [1, "post-banner", {
|
|
87
|
+
"dismissible": [4],
|
|
88
|
+
"dismissLabel": [1, "dismiss-label"],
|
|
89
|
+
"icon": [1],
|
|
90
|
+
"type": [1],
|
|
91
|
+
"bannerId": [32],
|
|
92
|
+
"classes": [32],
|
|
93
|
+
"hasActions": [32],
|
|
94
|
+
"hasHeading": [32],
|
|
95
|
+
"onDismissButtonClick": [32],
|
|
96
|
+
"dismiss": [64]
|
|
97
|
+
}, undefined, {
|
|
98
|
+
"dismissible": ["checkDismissible"],
|
|
99
|
+
"icon": ["validateIcon"],
|
|
100
|
+
"type": ["validateType"]
|
|
101
|
+
}]);
|
|
102
|
+
function defineCustomElement$1() {
|
|
103
|
+
if (typeof customElements === "undefined") {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const components = ["post-banner", "post-icon"];
|
|
107
|
+
components.forEach(tagName => { switch (tagName) {
|
|
108
|
+
case "post-banner":
|
|
109
|
+
if (!customElements.get(tagName)) {
|
|
110
|
+
customElements.define(tagName, PostBanner$1);
|
|
111
|
+
}
|
|
112
|
+
break;
|
|
113
|
+
case "post-icon":
|
|
114
|
+
if (!customElements.get(tagName)) {
|
|
115
|
+
defineCustomElement$2();
|
|
116
|
+
}
|
|
117
|
+
break;
|
|
118
|
+
} });
|
|
119
|
+
}
|
|
120
|
+
defineCustomElement$1();
|
|
2
121
|
|
|
3
122
|
const PostBanner = PostBanner$1;
|
|
4
123
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PostBreadcrumbItem$1, d as defineCustomElement$1 } from './
|
|
1
|
+
import { P as PostBreadcrumbItem$1, d as defineCustomElement$1 } from './p-BGbm-LIm.js';
|
|
2
2
|
|
|
3
3
|
const PostBreadcrumbItem = PostBreadcrumbItem$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|