@swisspost/design-system-components 10.0.0-next.39 → 10.0.0-next.41
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 -313
- package/dist/cjs/index.cjs.js +0 -72
- package/dist/cjs/loader.cjs.js +3 -6
- package/dist/cjs/{package-29dc73af.js → package-C2pR6Vs2.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +183 -0
- 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.css +1 -1
- package/dist/collection/components/post-accordion/post-accordion.js +39 -23
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +26 -12
- 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.css +1 -1
- package/dist/collection/components/post-footer/post-footer.js +35 -15
- 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-linkarea/post-linkarea.js +1 -1
- package/dist/collection/components/post-list/post-list.js +13 -4
- package/dist/collection/components/post-list-item/post-list-item.js +1 -1
- package/dist/collection/components/post-logo/post-logo.js +4 -5
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
- 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 +20 -6
- 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 +26 -6
- 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 +8 -3
- package/dist/collection/components/post-tooltip/post-tooltip.js +25 -7
- 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/dist/components/p-1KLiMO0w.js +3 -0
- package/dist/components/p-8U5GFtQP.js +105 -0
- package/dist/components/{post-menu2.js → p-BLhBouGz.js} +51 -30
- package/dist/{esm/index-ffccd040.js → components/p-CV7fm1rW.js} +1 -1
- package/dist/components/{post-menu-trigger2.js → p-CaPj3whI.js} +14 -12
- package/dist/components/{post-breadcrumb-item2.js → p-Cpaqct04.js} +9 -11
- package/dist/components/p-CtNCtg2z.js +114 -0
- package/dist/components/p-Cx0AiN2A.js +182 -0
- package/{loaders/post-collapsible-trigger2.js → dist/components/p-D3LhzIrC.js} +25 -14
- package/dist/components/{get-root.js → p-DBHo9yGF.js} +1 -1
- package/dist/components/p-DQuPPEca.js +31 -0
- package/dist/components/{post-accordion2.js → p-DlEtlaNu.js} +42 -29
- package/dist/components/{post-collapsible2.js → p-DphlfQse.js} +11 -8
- package/dist/components/{post-popovercontainer2.js → p-elg4VvHg.js} +246 -278
- package/{loaders/post-icon2.js → dist/components/p-fmA57Ivd.js} +52 -54
- 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 +426 -118
- 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 -309
- package/dist/esm/index.js +1 -31
- package/dist/esm/loader.js +3 -4
- package/dist/esm/package-1KLiMO0w.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +180 -0
- 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-0d08ab13.entry.js +1 -0
- package/dist/post-components/p-1KLiMO0w.js +1 -0
- package/dist/post-components/p-1e006e29.entry.js +1 -0
- package/dist/post-components/p-3a5bdb7f.entry.js +1 -0
- package/dist/post-components/p-4214b85e.entry.js +1 -0
- package/dist/post-components/p-50916d48.entry.js +1 -0
- package/dist/post-components/p-5f4126d8.entry.js +1 -0
- package/dist/post-components/p-62982420.entry.js +1 -0
- package/dist/post-components/p-78f4dd12.entry.js +1 -0
- package/dist/post-components/p-7a7d237b.entry.js +1 -0
- package/dist/post-components/p-80174475.entry.js +1 -0
- package/dist/post-components/p-8U5GFtQP.js +1 -0
- package/dist/post-components/p-8d5a4218.entry.js +1 -0
- package/dist/post-components/p-8e89ccc1.entry.js +1 -0
- package/dist/post-components/p-9003674b.entry.js +1 -0
- package/dist/post-components/p-925aee3d.entry.js +1 -0
- package/dist/post-components/p-9b446561.entry.js +1 -0
- package/dist/post-components/p-9ec29527.entry.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-ec764922.entry.js +1 -0
- package/dist/post-components/p-fa550b4a.entry.js +1 -0
- package/dist/post-components/p-fb46e260.entry.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-footer/post-footer.d.ts +7 -3
- 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/heading-levels-608d432e.js +0 -5
- package/dist/cjs/post-accordion-c433c493.js +0 -105
- package/dist/cjs/post-accordion-item-8d5a301d.js +0 -64
- package/dist/cjs/post-accordion-item.cjs.entry.js +0 -16
- package/dist/cjs/post-accordion.cjs.entry.js +0 -15
- package/dist/cjs/post-avatar-421043df.js +0 -162
- package/dist/cjs/post-back-to-top-3cca3803.js +0 -93
- package/dist/cjs/post-banner-2e99c9d8.js +0 -87
- package/dist/cjs/post-breadcrumbs-1be50860.js +0 -126
- package/dist/cjs/post-card-control-0bfdad92.js +0 -290
- package/dist/cjs/post-collapsible-trigger-4180b218.js +0 -190
- package/dist/cjs/post-footer-92adffac.js +0 -48
- package/dist/cjs/post-linkarea-26c457b3.js +0 -30
- package/dist/cjs/post-menu-item-d0a53c84.js +0 -68
- package/dist/cjs/post-popover-36cead3d.js +0 -150
- package/dist/cjs/post-rating-f50a9939.js +0 -109
- package/dist/cjs/post-tab-header-f47508da.js +0 -34
- package/dist/cjs/post-tab-panel-7c51798b.js +0 -36
- package/dist/cjs/post-tabs-2debea01.js +0 -173
- package/dist/cjs/post-tag-ac62c57f.js +0 -60
- package/dist/cjs/post-togglebutton-43c46511.js +0 -4491
- package/dist/cjs/post-tooltip-b7dcfb44.js +0 -74
- package/dist/cjs/post-tooltip-trigger-904061b6.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-accordion-item2.js +0 -103
- 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-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-collapsible-trigger2.js +0 -125
- package/dist/components/post-footer2.js +0 -90
- 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/heading-levels-5b7b4349.js +0 -3
- package/dist/esm/package-8503eaa8.js +0 -3
- package/dist/esm/post-accordion-9365faca.js +0 -103
- package/dist/esm/post-accordion-item-2dc8e3b7.js +0 -62
- package/dist/esm/post-accordion-item.entry.js +0 -8
- package/dist/esm/post-accordion.entry.js +0 -7
- package/dist/esm/post-avatar-4f73dc4d.js +0 -160
- package/dist/esm/post-back-to-top-8f759d32.js +0 -91
- package/dist/esm/post-banner-ad979275.js +0 -85
- package/dist/esm/post-breadcrumbs-a20336c7.js +0 -124
- package/dist/esm/post-card-control-3c77e778.js +0 -288
- package/dist/esm/post-collapsible-trigger-5fd0e193.js +0 -187
- package/dist/esm/post-footer-3e117b5a.js +0 -46
- package/dist/esm/post-linkarea-16a14609.js +0 -28
- package/dist/esm/post-menu-item-b1604fe4.js +0 -65
- package/dist/esm/post-popover-49096648.js +0 -148
- package/dist/esm/post-rating-405bee8f.js +0 -107
- package/dist/esm/post-tab-header-b228c217.js +0 -32
- package/dist/esm/post-tab-panel-98110b64.js +0 -34
- package/dist/esm/post-tabs-44d9313c.js +0 -171
- package/dist/esm/post-tag-99cc9616.js +0 -58
- package/dist/esm/post-togglebutton-ea73e63f.js +0 -4475
- package/dist/esm/post-tooltip-78cd2988.js +0 -72
- package/dist/esm/post-tooltip-trigger-bdb21c45.js +0 -4683
- package/dist/post-components/p-0889c759.js +0 -1
- package/dist/post-components/p-09dd5aa4.js +0 -1
- package/dist/post-components/p-0f9322e5.js +0 -8
- package/dist/post-components/p-11572299.js +0 -1
- package/dist/post-components/p-19a83519.entry.js +0 -1
- package/dist/post-components/p-1afb3c43.entry.js +0 -1
- package/dist/post-components/p-214cd032.js +0 -1
- package/dist/post-components/p-21e5b028.js +0 -1
- package/dist/post-components/p-2320305b.js +0 -1
- package/dist/post-components/p-247a1668.js +0 -1
- package/dist/post-components/p-2523f97b.entry.js +0 -1
- package/dist/post-components/p-2bd3a436.js +0 -1
- package/dist/post-components/p-2ce8fbf5.js +0 -1
- package/dist/post-components/p-2f879f4e.entry.js +0 -1
- package/dist/post-components/p-33e26845.entry.js +0 -1
- package/dist/post-components/p-38b1c71e.entry.js +0 -1
- package/dist/post-components/p-38d59732.js +0 -1
- package/dist/post-components/p-3a67f1ff.js +0 -1
- package/dist/post-components/p-41450b6c.entry.js +0 -1
- package/dist/post-components/p-4c23ed05.entry.js +0 -1
- package/dist/post-components/p-57746c40.js +0 -1
- package/dist/post-components/p-6313d72e.entry.js +0 -1
- package/dist/post-components/p-64e0b0fc.js +0 -1
- package/dist/post-components/p-658a2e34.entry.js +0 -1
- package/dist/post-components/p-722ffaae.js +0 -1
- package/dist/post-components/p-746d3cd3.entry.js +0 -1
- package/dist/post-components/p-79a2dad0.entry.js +0 -1
- package/dist/post-components/p-7dd1807c.js +0 -1
- package/dist/post-components/p-817fbeaf.js +0 -1
- package/dist/post-components/p-85950200.js +0 -1
- package/dist/post-components/p-8ebecf22.entry.js +0 -1
- package/dist/post-components/p-8ed1cb53.entry.js +0 -1
- package/dist/post-components/p-91244b25.js +0 -1
- package/dist/post-components/p-91675004.js +0 -1
- package/dist/post-components/p-94ebc430.js +0 -1
- package/dist/post-components/p-95727a4f.entry.js +0 -1
- package/dist/post-components/p-9e461613.js +0 -2
- package/dist/post-components/p-a844da3a.entry.js +0 -1
- package/dist/post-components/p-af900651.js +0 -1
- package/dist/post-components/p-b373659e.entry.js +0 -1
- package/dist/post-components/p-b500b245.js +0 -1
- package/dist/post-components/p-bf182745.entry.js +0 -1
- package/dist/post-components/p-c9b6f9e7.entry.js +0 -1
- package/dist/post-components/p-cb7d8f67.entry.js +0 -1
- package/dist/post-components/p-e1255160.js +0 -1
- package/dist/post-components/p-e28eb73a.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 -129
- 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-breadcrumb-item2.js +0 -82
- 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.d.ts +0 -11
- package/loaders/post-collapsible.js +0 -6
- package/loaders/post-collapsible2.js +0 -108
- package/loaders/post-footer.d.ts +0 -11
- package/loaders/post-footer.js +0 -93
- 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,43 +0,0 @@
|
|
|
1
|
-
export function eventGuard(host, event, options, callback) {
|
|
2
|
-
const target = event.target;
|
|
3
|
-
if (!target)
|
|
4
|
-
return;
|
|
5
|
-
if (target.localName === options.targetLocalName) {
|
|
6
|
-
if (!options.delegatorSelector || shadowClosest(target, options.delegatorSelector) === host) {
|
|
7
|
-
callback();
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Traverses up the DOM (including crossing shadow DOM boundaries) starting from the given element
|
|
13
|
-
* to find and return the closest ancestor that matches the specified CSS selector.
|
|
14
|
-
* If no matching element is found, returns null.
|
|
15
|
-
*
|
|
16
|
-
* @param element - The starting element from which the search begins.
|
|
17
|
-
* @param selector - The CSS selector used to test each ancestor element.
|
|
18
|
-
* @returns The closest matching ancestor element or null if none is found.
|
|
19
|
-
*/
|
|
20
|
-
function shadowClosest(element, selector) {
|
|
21
|
-
let currentElement = element;
|
|
22
|
-
while (currentElement) {
|
|
23
|
-
if (currentElement.matches(selector)) {
|
|
24
|
-
return currentElement;
|
|
25
|
-
}
|
|
26
|
-
const parent = currentElement.parentElement;
|
|
27
|
-
if (parent) {
|
|
28
|
-
currentElement = parent;
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
const parentNode = currentElement.parentNode;
|
|
32
|
-
// When no parentElement exists, check if the current element is inside a shadow DOM.
|
|
33
|
-
// If so, move up to the shadow host to continue the search outside the shadow boundary.
|
|
34
|
-
if (parentNode instanceof ShadowRoot) {
|
|
35
|
-
currentElement = parentNode.host;
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
currentElement = null;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
const IS_SERVER = typeof window === 'undefined';
|
|
2
|
-
const IS_BROWSER = !IS_SERVER;
|
|
3
|
-
|
|
4
|
-
class Breakpoint {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.current = {
|
|
7
|
-
key: '',
|
|
8
|
-
name: '',
|
|
9
|
-
};
|
|
10
|
-
if (IS_BROWSER && !this.breakpointMap) {
|
|
11
|
-
const keys = this.getStyles('--post-breakpoint-keys');
|
|
12
|
-
const names = this.getStyles('--post-breakpoint-names');
|
|
13
|
-
const widths = this.getStyles('--post-breakpoint-widths');
|
|
14
|
-
this.breakpointMap = widths
|
|
15
|
-
.map((width, i) => ({
|
|
16
|
-
minWidth: Number(width),
|
|
17
|
-
key: keys[i],
|
|
18
|
-
name: names[i],
|
|
19
|
-
}))
|
|
20
|
-
.reverse();
|
|
21
|
-
window.addEventListener('resize', () => this.updateHandler(), { passive: true });
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
getStyles(propertyName) {
|
|
25
|
-
const styles = getComputedStyle(document.documentElement);
|
|
26
|
-
return (styles
|
|
27
|
-
.getPropertyValue(propertyName)
|
|
28
|
-
?.split(',')
|
|
29
|
-
.map(w => w.trim()) ?? []);
|
|
30
|
-
}
|
|
31
|
-
updateHandler(emitEvents = true) {
|
|
32
|
-
const calculated = this.breakpointMap.find(({ minWidth }) => innerWidth >= minWidth);
|
|
33
|
-
if (this.current.key !== calculated.key) {
|
|
34
|
-
this.current.key = calculated.key;
|
|
35
|
-
if (emitEvents)
|
|
36
|
-
this.dispatchEvent('key');
|
|
37
|
-
}
|
|
38
|
-
if (this.current.name !== calculated.name) {
|
|
39
|
-
this.current.name = calculated.name;
|
|
40
|
-
if (emitEvents)
|
|
41
|
-
this.dispatchEvent('name');
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
dispatchEvent(type) {
|
|
45
|
-
if (IS_BROWSER) {
|
|
46
|
-
window.dispatchEvent(new CustomEvent(`postBreakpoint:${type}`, { detail: this.current[type] }));
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
get(type) {
|
|
50
|
-
this.updateHandler(false);
|
|
51
|
-
return this.current[type];
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
const breakpoint = new Breakpoint();
|
|
55
|
-
|
|
56
|
-
export { IS_BROWSER as I, breakpoint as b };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
function eventGuard(host, event, options, callback) {
|
|
2
|
-
const target = event.target;
|
|
3
|
-
if (!target)
|
|
4
|
-
return;
|
|
5
|
-
if (target.localName === options.targetLocalName) {
|
|
6
|
-
if (!options.delegatorSelector || shadowClosest(target, options.delegatorSelector) === host) {
|
|
7
|
-
callback();
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Traverses up the DOM (including crossing shadow DOM boundaries) starting from the given element
|
|
13
|
-
* to find and return the closest ancestor that matches the specified CSS selector.
|
|
14
|
-
* If no matching element is found, returns null.
|
|
15
|
-
*
|
|
16
|
-
* @param element - The starting element from which the search begins.
|
|
17
|
-
* @param selector - The CSS selector used to test each ancestor element.
|
|
18
|
-
* @returns The closest matching ancestor element or null if none is found.
|
|
19
|
-
*/
|
|
20
|
-
function shadowClosest(element, selector) {
|
|
21
|
-
let currentElement = element;
|
|
22
|
-
while (currentElement) {
|
|
23
|
-
if (currentElement.matches(selector)) {
|
|
24
|
-
return currentElement;
|
|
25
|
-
}
|
|
26
|
-
const parent = currentElement.parentElement;
|
|
27
|
-
if (parent) {
|
|
28
|
-
currentElement = parent;
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
const parentNode = currentElement.parentNode;
|
|
32
|
-
// When no parentElement exists, check if the current element is inside a shadow DOM.
|
|
33
|
-
// If so, move up to the shadow host to continue the search outside the shadow boundary.
|
|
34
|
-
if (parentNode instanceof ShadowRoot) {
|
|
35
|
-
currentElement = parentNode.host;
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
currentElement = null;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export { eventGuard as e };
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
const EMPTY_VALUES = [undefined, null, '', NaN];
|
|
2
|
-
|
|
3
|
-
function isValueEmpty(value) {
|
|
4
|
-
return EMPTY_VALUES.some(v => v === value);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
function requiredAnd(check) {
|
|
8
|
-
return (component, prop, ...extraArgs) => {
|
|
9
|
-
const componentName = component.host.localName;
|
|
10
|
-
const value = component[prop];
|
|
11
|
-
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component is not defined.`;
|
|
12
|
-
if (isValueEmpty(value)) {
|
|
13
|
-
throw new Error(message);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
check(component, prop, ...extraArgs);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function checkOneOf(component, prop, possibleValues) {
|
|
22
|
-
const componentName = component.host.localName;
|
|
23
|
-
const value = component[prop];
|
|
24
|
-
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be one of the following values: ${possibleValues.join(', ')}.`;
|
|
25
|
-
if (!possibleValues.includes(value)) {
|
|
26
|
-
console.error(message);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function checkPattern(component, prop, pattern) {
|
|
31
|
-
const componentName = component.host.localName;
|
|
32
|
-
const value = component[prop];
|
|
33
|
-
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must follow the format \`${pattern}\`.`;
|
|
34
|
-
if (typeof value !== 'string' || !pattern.test(value)) {
|
|
35
|
-
console.error(message);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function checkType(component, prop, type) {
|
|
40
|
-
const componentName = component.host.localName;
|
|
41
|
-
const value = component[prop];
|
|
42
|
-
const typeIsArray = type === 'array';
|
|
43
|
-
const valueIsArray = Array.isArray(value);
|
|
44
|
-
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be of type \`${type}\`.`;
|
|
45
|
-
if (typeIsArray || valueIsArray) {
|
|
46
|
-
if (valueIsArray !== typeIsArray) {
|
|
47
|
-
console.error(message);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
else if (typeof value !== type) {
|
|
51
|
-
console.error(message);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function checkUrl(component, prop) {
|
|
56
|
-
const componentName = component.host.localName;
|
|
57
|
-
const value = component[prop];
|
|
58
|
-
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component is invalid.`;
|
|
59
|
-
if (typeof value !== 'string' && !(value instanceof URL)) {
|
|
60
|
-
console.error(message);
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
try {
|
|
64
|
-
new URL(value, 'https://www.post.ch');
|
|
65
|
-
}
|
|
66
|
-
catch {
|
|
67
|
-
console.error(message);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function emptyOr(check) {
|
|
72
|
-
return (component, prop, ...extraArgs) => {
|
|
73
|
-
const value = component[prop];
|
|
74
|
-
if (!isValueEmpty(value)) {
|
|
75
|
-
check(component, prop, ...extraArgs);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const checkEmptyOrOneOf = emptyOr(checkOneOf);
|
|
81
|
-
const checkEmptyOrPattern = emptyOr(checkPattern);
|
|
82
|
-
const checkEmptyOrType = emptyOr(checkType);
|
|
83
|
-
const checkEmptyOrUrl = emptyOr(checkUrl);
|
|
84
|
-
const checkRequiredAndOneOf = requiredAnd(checkOneOf);
|
|
85
|
-
const checkRequiredAndType = requiredAnd(checkType);
|
|
86
|
-
const checkRequiredAndUrl = requiredAnd(checkUrl);
|
|
87
|
-
|
|
88
|
-
export { checkEmptyOrOneOf as a, checkRequiredAndType as b, checkRequiredAndOneOf as c, checkEmptyOrType as d, checkEmptyOrPattern as e, checkRequiredAndUrl as f, checkEmptyOrUrl as g };
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { v as version } from './package.js';
|
|
3
|
-
import { H as HEADING_LEVELS } from './heading-levels.js';
|
|
4
|
-
import { a as checkEmptyOrOneOf } from './index2.js';
|
|
5
|
-
import './breakpoints.js';
|
|
6
|
-
import { e as eventGuard } from './event-guard.js';
|
|
7
|
-
import { n as nanoid } from './index.browser.js';
|
|
8
|
-
import { d as defineCustomElement$3 } from './post-collapsible2.js';
|
|
9
|
-
import { d as defineCustomElement$2 } from './post-collapsible-trigger2.js';
|
|
10
|
-
import { d as defineCustomElement$1 } from './post-icon2.js';
|
|
11
|
-
|
|
12
|
-
const postAccordionItemCss = ".accordion-item::after{display:block;content:\"\";margin-block-start:calc(var(--post-device-border-width-default)*-1);border-block-end:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}.accordion-item:has(.accordion-button:hover)::after{border-color:var(--post-scheme-color-interactive-primary-hover-stroke)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-item:has(.accordion-button:hover)::after{border-color:Highlight}}.accordion-header{color:var(--post-scheme-color-interactive-primary-enabled-fg1);font-size:var(--post-device-font-size-5);margin:0;line-height:var(--post-device-line-height-heading);font-weight:var(--post-device-font-weight-black)}.accordion-button{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;display:flex;position:relative;width:100%;align-items:center;text-align:start;gap:var(--post-device-spacing-gap-7);padding:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default)) calc(var(--post-device-spacing-padding-5) + var(--post-device-border-width-default));cursor:pointer}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button{background-color:ButtonFace !important}.accordion-button:hover{background-color:Highlight !important}}.accordion-button::before{display:block;position:absolute;content:\"\";inset:0;inset-block-end:auto;border-block-start:var(--post-accordion-button-border-top)}.accordion-button{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.accordion-button slot::slotted(span[slot=header]){flex-grow:1}.accordion-button post-icon{flex:none;width:var(--post-core-dimension-24);aspect-ratio:1;transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}.accordion-button.collapsed{padding-block-start:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default));padding-block-end:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default))}.accordion-button.collapsed post-icon{transform:rotate(-180deg)}.accordion-button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}.accordion-button>::slotted(.text-truncate){display:block}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:hover,.accordion-button:focus-visible{color:Highlight}}.accordion-body{padding-block-start:var(--post-device-spacing-padding-15);padding-block-end:calc(var(--post-device-spacing-padding-block-25) + var(--post-device-border-width-default));padding-inline:var(--post-device-spacing-padding-5)}.logo-container{display:none;width:var(--post-device-sizing-logo-1);aspect-ratio:1}.logo-container.has-image{display:block}.logo-container slot::slotted(img){display:block;width:100%;height:100%;object-fit:cover}.accordion-button>::slotted(:first-child),.accordion-body>::slotted(:first-child){margin-block-start:0 !important}.accordion-button>::slotted(:last-child),.accordion-body>::slotted(:last-child){margin-block-end:0 !important}";
|
|
13
|
-
const PostAccordionItemStyle0 = postAccordionItemCss;
|
|
14
|
-
|
|
15
|
-
const PostAccordionItem = /*@__PURE__*/ proxyCustomElement(class PostAccordionItem extends HTMLElement {
|
|
16
|
-
constructor() {
|
|
17
|
-
super();
|
|
18
|
-
this.__registerHost();
|
|
19
|
-
this.__attachShadow();
|
|
20
|
-
this.id = undefined;
|
|
21
|
-
this.slottedLogo = undefined;
|
|
22
|
-
this.collapsed = false;
|
|
23
|
-
this.headingLevel = undefined;
|
|
24
|
-
}
|
|
25
|
-
validateHeadingLevel() {
|
|
26
|
-
checkEmptyOrOneOf(this, 'headingLevel', HEADING_LEVELS);
|
|
27
|
-
}
|
|
28
|
-
componentWillLoad() {
|
|
29
|
-
this.id = this.host.id || `p${nanoid(6)}`;
|
|
30
|
-
}
|
|
31
|
-
componentDidLoad() {
|
|
32
|
-
this.validateHeadingLevel();
|
|
33
|
-
}
|
|
34
|
-
// Capture to make sure the "collapsed" property is updated before the event is consumed
|
|
35
|
-
onCollapseToggle(event) {
|
|
36
|
-
eventGuard(this.host, event, { targetLocalName: 'post-collapsible', delegatorSelector: 'post-accordion-item' }, () => {
|
|
37
|
-
this.collapsed = !event.detail;
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Triggers the collapse programmatically.
|
|
42
|
-
*/
|
|
43
|
-
async toggle(force) {
|
|
44
|
-
return this.collapsible.toggle(force);
|
|
45
|
-
}
|
|
46
|
-
onSlotLogoChange() {
|
|
47
|
-
this.slottedLogo = this.host.querySelector('img[slot="logo"]');
|
|
48
|
-
}
|
|
49
|
-
componentWillRender() {
|
|
50
|
-
this.slottedLogo = this.host.querySelector('img[slot="logo"]');
|
|
51
|
-
}
|
|
52
|
-
render() {
|
|
53
|
-
const headingLevel = this.host.closest('post-accordion')?.getAttribute('heading-level');
|
|
54
|
-
const HeadingTag = `h${headingLevel ?? this.headingLevel ?? 2}`;
|
|
55
|
-
return (h(Host, { key: '4de770633e0c9b9bb92b92a66be9a1481bf0fb3e', id: this.id, "data-version": version }, h("div", { key: '4c2b91b25637cbe284442626d02d0ce6496589a4', part: "accordion-item", class: "accordion-item" }, h("post-collapsible-trigger", { key: '777f8b222b017b765f265296ad2829a027a99c22', for: `${this.id}--collapse` }, h(HeadingTag, { key: 'a646d911ea83c004fbc5490cb1e9dafdf490d09f', class: "accordion-header", id: `${this.id}--header` }, h("button", { key: '0c30a665426b98fff997874c365ffc6b97ecc01c', type: "button", class: `accordion-button${this.collapsed ? ' collapsed' : ''}`, part: "button" }, h("span", { key: '64edd8541af949f87ad929173c4a5210f892b0b6', class: {
|
|
56
|
-
'logo-container': true,
|
|
57
|
-
'has-image': !!this.slottedLogo,
|
|
58
|
-
} }, h("slot", { key: 'a3dfd1796d7c3b854980078673a017d58acb97ea', name: "logo", onSlotchange: this.onSlotLogoChange.bind(this) })), h("slot", { key: 'd008c9aebfd8431afa4eae1af8646dd7de97916b', name: "header" }), h("post-icon", { key: 'ee5150a9cd7693e57f639cf09d9c4f24aae57308', name: "2051" })))), h("post-collapsible", { key: '12d2ef55e0e7615619a0a246268e8af3d3d8e712', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, h("div", { key: 'd2cf362418c50ad56f8dee8e43baabbd976682f9', class: "accordion-body", part: "body" }, h("slot", { key: '6792db26a9eab60e113d62e23faf003a6b43685b' }))))));
|
|
59
|
-
}
|
|
60
|
-
get host() { return this; }
|
|
61
|
-
static get watchers() { return {
|
|
62
|
-
"headingLevel": ["validateHeadingLevel"]
|
|
63
|
-
}; }
|
|
64
|
-
static get style() { return PostAccordionItemStyle0; }
|
|
65
|
-
}, [1, "post-accordion-item", {
|
|
66
|
-
"collapsed": [1028],
|
|
67
|
-
"headingLevel": [2, "heading-level"],
|
|
68
|
-
"id": [32],
|
|
69
|
-
"slottedLogo": [32],
|
|
70
|
-
"toggle": [64]
|
|
71
|
-
}, [[2, "postToggle", "onCollapseToggle"]], {
|
|
72
|
-
"headingLevel": ["validateHeadingLevel"]
|
|
73
|
-
}]);
|
|
74
|
-
function defineCustomElement() {
|
|
75
|
-
if (typeof customElements === "undefined") {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
const components = ["post-accordion-item", "post-collapsible", "post-collapsible-trigger", "post-icon"];
|
|
79
|
-
components.forEach(tagName => { switch (tagName) {
|
|
80
|
-
case "post-accordion-item":
|
|
81
|
-
if (!customElements.get(tagName)) {
|
|
82
|
-
customElements.define(tagName, PostAccordionItem);
|
|
83
|
-
}
|
|
84
|
-
break;
|
|
85
|
-
case "post-collapsible":
|
|
86
|
-
if (!customElements.get(tagName)) {
|
|
87
|
-
defineCustomElement$3();
|
|
88
|
-
}
|
|
89
|
-
break;
|
|
90
|
-
case "post-collapsible-trigger":
|
|
91
|
-
if (!customElements.get(tagName)) {
|
|
92
|
-
defineCustomElement$2();
|
|
93
|
-
}
|
|
94
|
-
break;
|
|
95
|
-
case "post-icon":
|
|
96
|
-
if (!customElements.get(tagName)) {
|
|
97
|
-
defineCustomElement$1();
|
|
98
|
-
}
|
|
99
|
-
break;
|
|
100
|
-
} });
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export { PostAccordionItem as P, defineCustomElement as d };
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { v as version } from './package.js';
|
|
3
|
-
import { b as checkRequiredAndType, d as checkEmptyOrType, e as checkEmptyOrPattern } from './index2.js';
|
|
4
|
-
import './breakpoints.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
|
-
const PostAvatarStyle0 = postAvatarCss;
|
|
8
|
-
|
|
9
|
-
// https://docs.gravatar.com/api/avatars/images/
|
|
10
|
-
const GRAVATAR_DEFAULT = '404';
|
|
11
|
-
const GRAVATAR_RATING = 'g';
|
|
12
|
-
const GRAVATAR_SIZE = 80;
|
|
13
|
-
const GRAVATAR_BASE_URL = `https://www.gravatar.com/avatar/{email}?s=${GRAVATAR_SIZE}&d=${GRAVATAR_DEFAULT}&r=${GRAVATAR_RATING}`;
|
|
14
|
-
const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
15
|
-
var AvatarType;
|
|
16
|
-
(function (AvatarType) {
|
|
17
|
-
AvatarType["Slotted"] = "slotted";
|
|
18
|
-
AvatarType["Image"] = "image";
|
|
19
|
-
AvatarType["Initials"] = "initials";
|
|
20
|
-
AvatarType[AvatarType["Null"] = null] = "Null";
|
|
21
|
-
})(AvatarType || (AvatarType = {}));
|
|
22
|
-
const PostAvatar = /*@__PURE__*/ proxyCustomElement(class PostAvatar extends HTMLElement {
|
|
23
|
-
constructor() {
|
|
24
|
-
super();
|
|
25
|
-
this.__registerHost();
|
|
26
|
-
this.__attachShadow();
|
|
27
|
-
this.firstname = undefined;
|
|
28
|
-
this.lastname = undefined;
|
|
29
|
-
this.userid = undefined;
|
|
30
|
-
this.email = undefined;
|
|
31
|
-
this.slottedImage = undefined;
|
|
32
|
-
this.avatarType = null;
|
|
33
|
-
this.imageUrl = '';
|
|
34
|
-
this.imageAlt = '';
|
|
35
|
-
this.initials = '';
|
|
36
|
-
}
|
|
37
|
-
validateFirstname() {
|
|
38
|
-
checkRequiredAndType(this, 'firstname', 'string');
|
|
39
|
-
}
|
|
40
|
-
validateLastname() {
|
|
41
|
-
checkEmptyOrType(this, 'lastname', 'string');
|
|
42
|
-
}
|
|
43
|
-
validateUserid() {
|
|
44
|
-
checkEmptyOrType(this, 'userid', 'string');
|
|
45
|
-
}
|
|
46
|
-
validateEmail() {
|
|
47
|
-
if (this.email)
|
|
48
|
-
checkEmptyOrPattern(this, 'email', emailPattern);
|
|
49
|
-
}
|
|
50
|
-
async getAvatar() {
|
|
51
|
-
if (this.slottedImage !== null) {
|
|
52
|
-
this.avatarType = AvatarType.Slotted;
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
let imageLoaded = false;
|
|
56
|
-
if (!imageLoaded && this.userid)
|
|
57
|
-
imageLoaded = await this.getImageByProp(this.userid, this.fetchImageByUserId.bind(this));
|
|
58
|
-
if (!imageLoaded && this.email)
|
|
59
|
-
imageLoaded = await this.getImageByProp(this.email, this.fetchImageByEmail.bind(this));
|
|
60
|
-
if (!imageLoaded)
|
|
61
|
-
this.getAvatarByInitials();
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
async getImageByProp(prop, fetchImage) {
|
|
65
|
-
if (!prop)
|
|
66
|
-
return false;
|
|
67
|
-
const imageResponse = (await this.getStorageItem(prop)) ?? { ok: false, url: '' };
|
|
68
|
-
if (!imageResponse.ok) {
|
|
69
|
-
try {
|
|
70
|
-
const r = await fetchImage();
|
|
71
|
-
imageResponse.ok = r.ok;
|
|
72
|
-
imageResponse.url = r.url;
|
|
73
|
-
this.imageUrl = imageResponse.url;
|
|
74
|
-
this.imageAlt = `${this.firstname} ${this.lastname} avatar`;
|
|
75
|
-
this.avatarType = AvatarType.Image;
|
|
76
|
-
this.setStorageItem(this.userid, JSON.stringify(imageResponse));
|
|
77
|
-
}
|
|
78
|
-
catch (error) {
|
|
79
|
-
this.removeStorageItem(prop);
|
|
80
|
-
console.info(`Loading avatar by type "${AvatarType.Image}" failed.`);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return imageResponse.ok;
|
|
84
|
-
}
|
|
85
|
-
async fetchImageByUserId() {
|
|
86
|
-
return await fetch(PostAvatar.INTERNAL_USERID_IMAGE_SRC.replace('{userid}', encodeURIComponent(this.userid)));
|
|
87
|
-
}
|
|
88
|
-
async fetchImageByEmail() {
|
|
89
|
-
const email = await this.cryptify(this.email);
|
|
90
|
-
const imageUrl = GRAVATAR_BASE_URL.replace('{email}', email);
|
|
91
|
-
return await fetch(imageUrl);
|
|
92
|
-
}
|
|
93
|
-
getAvatarByInitials() {
|
|
94
|
-
this.initials = this.getInitials();
|
|
95
|
-
this.avatarType = AvatarType.Initials;
|
|
96
|
-
}
|
|
97
|
-
getNames() {
|
|
98
|
-
return [this.firstname, this.lastname].filter(n => n);
|
|
99
|
-
}
|
|
100
|
-
getInitials() {
|
|
101
|
-
return this.getNames()
|
|
102
|
-
.map(n => n.charAt(0))
|
|
103
|
-
.join('')
|
|
104
|
-
.trim();
|
|
105
|
-
}
|
|
106
|
-
async getStorageItem(keyToken) {
|
|
107
|
-
const key = await this.cryptify(keyToken);
|
|
108
|
-
const value = window?.sessionStorage?.getItem(key);
|
|
109
|
-
return value ? JSON.parse(value) : null;
|
|
110
|
-
}
|
|
111
|
-
async setStorageItem(keyToken, value) {
|
|
112
|
-
const key = await this.cryptify(keyToken);
|
|
113
|
-
window?.sessionStorage?.setItem(key, value);
|
|
114
|
-
}
|
|
115
|
-
async removeStorageItem(keyToken) {
|
|
116
|
-
const key = await this.cryptify(keyToken);
|
|
117
|
-
window?.sessionStorage?.removeItem(key);
|
|
118
|
-
}
|
|
119
|
-
async cryptify(key) {
|
|
120
|
-
return await crypto.subtle.digest('SHA-256', new TextEncoder().encode(key)).then(buffer => {
|
|
121
|
-
return Array.from(new Uint8Array(buffer))
|
|
122
|
-
.map(bytes => bytes.toString(16).padStart(2, '0'))
|
|
123
|
-
.join('');
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
onSlotDefaultChange() {
|
|
127
|
-
this.slottedImage = this.host.querySelector('img');
|
|
128
|
-
this.getAvatar();
|
|
129
|
-
}
|
|
130
|
-
componentWillRender() {
|
|
131
|
-
this.slottedImage = this.host.querySelector('img');
|
|
132
|
-
this.getAvatar();
|
|
133
|
-
}
|
|
134
|
-
componentDidLoad() {
|
|
135
|
-
this.validateFirstname();
|
|
136
|
-
this.validateLastname();
|
|
137
|
-
this.validateUserid();
|
|
138
|
-
this.validateEmail();
|
|
139
|
-
}
|
|
140
|
-
render() {
|
|
141
|
-
const initials = this.getNames().reduce((acc, n, i) => {
|
|
142
|
-
if (i > 0)
|
|
143
|
-
acc.push(h("span", null, " "));
|
|
144
|
-
acc.push(n.charAt(0));
|
|
145
|
-
acc.push(h("span", null, n.slice(1)));
|
|
146
|
-
// eslint-disable-next-line @stencil-community/render-returns-host
|
|
147
|
-
return acc;
|
|
148
|
-
}, []);
|
|
149
|
-
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))));
|
|
150
|
-
}
|
|
151
|
-
get host() { return this; }
|
|
152
|
-
static get watchers() { return {
|
|
153
|
-
"firstname": ["validateFirstname"],
|
|
154
|
-
"lastname": ["validateLastname"],
|
|
155
|
-
"userid": ["validateUserid"],
|
|
156
|
-
"email": ["validateEmail"]
|
|
157
|
-
}; }
|
|
158
|
-
static get style() { return PostAvatarStyle0; }
|
|
159
|
-
}, [1, "post-avatar", {
|
|
160
|
-
"firstname": [513],
|
|
161
|
-
"lastname": [1],
|
|
162
|
-
"userid": [1],
|
|
163
|
-
"email": [1],
|
|
164
|
-
"slottedImage": [32],
|
|
165
|
-
"avatarType": [32],
|
|
166
|
-
"imageUrl": [32],
|
|
167
|
-
"imageAlt": [32],
|
|
168
|
-
"initials": [32]
|
|
169
|
-
}, undefined, {
|
|
170
|
-
"firstname": ["validateFirstname"],
|
|
171
|
-
"lastname": ["validateLastname"],
|
|
172
|
-
"userid": ["validateUserid"],
|
|
173
|
-
"email": ["validateEmail"]
|
|
174
|
-
}]);
|
|
175
|
-
PostAvatar.INTERNAL_USERID_IMAGE_SRC = 'https://web.post.ch/UserProfileImage/{userid}.png';
|
|
176
|
-
function defineCustomElement() {
|
|
177
|
-
if (typeof customElements === "undefined") {
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
const components = ["post-avatar"];
|
|
181
|
-
components.forEach(tagName => { switch (tagName) {
|
|
182
|
-
case "post-avatar":
|
|
183
|
-
if (!customElements.get(tagName)) {
|
|
184
|
-
customElements.define(tagName, PostAvatar);
|
|
185
|
-
}
|
|
186
|
-
break;
|
|
187
|
-
} });
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
export { PostAvatar as P, defineCustomElement as d };
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { s as slideDown, a as slideUp } from './slide.js';
|
|
3
|
-
import { v as version } from './package.js';
|
|
4
|
-
import { b as checkRequiredAndType } from './index2.js';
|
|
5
|
-
import './breakpoints.js';
|
|
6
|
-
import { d as defineCustomElement$1 } from './post-icon2.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
|
-
const PostBackToTopStyle0 = postBackToTopCss;
|
|
10
|
-
|
|
11
|
-
const PostBackToTop = /*@__PURE__*/ proxyCustomElement(class PostBackToTop extends HTMLElement {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
this.__registerHost();
|
|
15
|
-
this.__attachShadow();
|
|
16
|
-
this.handleScroll = () => {
|
|
17
|
-
this.belowFold = this.isBelowFold();
|
|
18
|
-
};
|
|
19
|
-
this.label = undefined;
|
|
20
|
-
this.belowFold = false;
|
|
21
|
-
}
|
|
22
|
-
isBelowFold() {
|
|
23
|
-
return window.scrollY > window.innerHeight;
|
|
24
|
-
}
|
|
25
|
-
validateLabel() {
|
|
26
|
-
checkRequiredAndType(this, 'label', 'string');
|
|
27
|
-
}
|
|
28
|
-
/*Watch for changes in belowFold to show/hide the back to top button*/
|
|
29
|
-
watchBelowFold(newValue) {
|
|
30
|
-
if (newValue) {
|
|
31
|
-
slideDown(this.host, this.translateY);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
slideUp(this.host, this.translateY);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
scrollToTop() {
|
|
38
|
-
window.scrollTo({
|
|
39
|
-
top: 0,
|
|
40
|
-
behavior: 'smooth',
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
getSecondPixelValue(parts) {
|
|
44
|
-
for (const part of parts) {
|
|
45
|
-
const pixelValues = part.match(/\b\d+px\b/g);
|
|
46
|
-
if (pixelValues && pixelValues.length > 1) {
|
|
47
|
-
return pixelValues[1];
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
animateButton() {
|
|
52
|
-
// Get the back-to-top button top postiion
|
|
53
|
-
const positionTop = window.getComputedStyle(this.host).getPropertyValue('top');
|
|
54
|
-
const buttonElement = this.host.shadowRoot.querySelector('button');
|
|
55
|
-
// Extract the elevation height from the back-to-top button elevation token
|
|
56
|
-
const elevation = getComputedStyle(buttonElement).getPropertyValue('--post-back-to-top-elevation');
|
|
57
|
-
const elevationParts = elevation.split(',');
|
|
58
|
-
const elevationHeight = this.getSecondPixelValue(elevationParts);
|
|
59
|
-
// The translateY is calculated as => -100% (btt button height) - topPosition - elevationHeight
|
|
60
|
-
this.translateY =
|
|
61
|
-
String((-1 * 100) / 100 -
|
|
62
|
-
parseFloat(positionTop.replace('px', '')) -
|
|
63
|
-
parseFloat(elevationHeight.replace('px', ''))) + 'px';
|
|
64
|
-
if (this.belowFold) {
|
|
65
|
-
slideDown(this.host, this.translateY);
|
|
66
|
-
}
|
|
67
|
-
if (!this.belowFold) {
|
|
68
|
-
this.host.style.transform = `translateY(${this.translateY})`;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
// Set the initial state
|
|
72
|
-
componentWillLoad() {
|
|
73
|
-
this.belowFold = this.isBelowFold();
|
|
74
|
-
}
|
|
75
|
-
componentDidLoad() {
|
|
76
|
-
window.addEventListener('scroll', this.handleScroll, false);
|
|
77
|
-
this.animateButton();
|
|
78
|
-
this.validateLabel();
|
|
79
|
-
}
|
|
80
|
-
disconnectedCallback() {
|
|
81
|
-
window.removeEventListener('scroll', this.handleScroll);
|
|
82
|
-
}
|
|
83
|
-
render() {
|
|
84
|
-
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))));
|
|
85
|
-
}
|
|
86
|
-
get host() { return this; }
|
|
87
|
-
static get watchers() { return {
|
|
88
|
-
"label": ["validateLabel"],
|
|
89
|
-
"belowFold": ["watchBelowFold"]
|
|
90
|
-
}; }
|
|
91
|
-
static get style() { return PostBackToTopStyle0; }
|
|
92
|
-
}, [1, "post-back-to-top", {
|
|
93
|
-
"label": [513],
|
|
94
|
-
"belowFold": [32]
|
|
95
|
-
}, undefined, {
|
|
96
|
-
"label": ["validateLabel"],
|
|
97
|
-
"belowFold": ["watchBelowFold"]
|
|
98
|
-
}]);
|
|
99
|
-
function defineCustomElement() {
|
|
100
|
-
if (typeof customElements === "undefined") {
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
const components = ["post-back-to-top", "post-icon"];
|
|
104
|
-
components.forEach(tagName => { switch (tagName) {
|
|
105
|
-
case "post-back-to-top":
|
|
106
|
-
if (!customElements.get(tagName)) {
|
|
107
|
-
customElements.define(tagName, PostBackToTop);
|
|
108
|
-
}
|
|
109
|
-
break;
|
|
110
|
-
case "post-icon":
|
|
111
|
-
if (!customElements.get(tagName)) {
|
|
112
|
-
defineCustomElement$1();
|
|
113
|
-
}
|
|
114
|
-
break;
|
|
115
|
-
} });
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export { PostBackToTop as P, defineCustomElement as d };
|