@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,129 +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 { e as checkRequiredAndOneOf } from './index2.js';
|
|
5
|
-
import './breakpoints.js';
|
|
6
|
-
import { e as eventGuard } from './event-guard.js';
|
|
7
|
-
|
|
8
|
-
const postAccordionCss = ":host{display:block}::slotted(post-accordion-item){display:block}::slotted(post-accordion-item:not(:only-of-type:first-of-type)){margin-block-start:calc(var(--post-device-border-width-default)*-1)}::slotted(post-accordion-item:not(:only-of-type):first-of-type){--post-accordion-button-border-top:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}";
|
|
9
|
-
const PostAccordionStyle0 = postAccordionCss;
|
|
10
|
-
|
|
11
|
-
const PostAccordion$1 = /*@__PURE__*/ proxyCustomElement(class PostAccordion extends HTMLElement {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
this.__registerHost();
|
|
15
|
-
this.__attachShadow();
|
|
16
|
-
this.expandedItems = new Set();
|
|
17
|
-
this.headingLevel = undefined;
|
|
18
|
-
this.multiple = false;
|
|
19
|
-
}
|
|
20
|
-
validateHeadingLevel() {
|
|
21
|
-
checkRequiredAndOneOf(this, 'headingLevel', HEADING_LEVELS);
|
|
22
|
-
this.accordionItems.forEach(item => {
|
|
23
|
-
item.setAttribute('heading-level', String(this.headingLevel));
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
componentWillLoad() {
|
|
27
|
-
this.registerAccordionItems();
|
|
28
|
-
}
|
|
29
|
-
componentDidLoad() {
|
|
30
|
-
this.validateHeadingLevel();
|
|
31
|
-
}
|
|
32
|
-
collapseToggleHandler(event) {
|
|
33
|
-
eventGuard(this.host, event, { targetLocalName: 'post-accordion-item', delegatorSelector: 'post-accordion' }, () => {
|
|
34
|
-
const toggledAccordionItem = event.target;
|
|
35
|
-
const isClosing = this.expandedItems.has(toggledAccordionItem);
|
|
36
|
-
if (isClosing) {
|
|
37
|
-
this.expandedItems.delete(toggledAccordionItem);
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
this.expandedItems.add(toggledAccordionItem);
|
|
41
|
-
}
|
|
42
|
-
if (this.multiple || isClosing)
|
|
43
|
-
return;
|
|
44
|
-
// Close other open accordion items to ensure only one is open at a time
|
|
45
|
-
Array.from(this.expandedItems.values())
|
|
46
|
-
.filter(item => item !== toggledAccordionItem)
|
|
47
|
-
.forEach(item => {
|
|
48
|
-
item.toggle(false);
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Toggles the `post-accordion-item` with the given id.
|
|
54
|
-
*/
|
|
55
|
-
async toggle(id) {
|
|
56
|
-
const itemToToggle = this.accordionItems.find(item => item.id === id);
|
|
57
|
-
if (!itemToToggle)
|
|
58
|
-
throw new Error(`No post-accordion-item found with id #${id}.`);
|
|
59
|
-
await itemToToggle.toggle();
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Expands all `post-accordion-item`.
|
|
63
|
-
*
|
|
64
|
-
* If `multiple="true"` is not set and all items are closed, it will open the first one.
|
|
65
|
-
* Otherwise, it will keep the opened one.
|
|
66
|
-
*/
|
|
67
|
-
async expandAll() {
|
|
68
|
-
if (this.multiple) {
|
|
69
|
-
await Promise.all(this.accordionItems.map(item => item.toggle(true)));
|
|
70
|
-
}
|
|
71
|
-
else if (!this.expandedItems.size) {
|
|
72
|
-
await this.accordionItems[0].toggle(true);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Collapses all `post-accordion-item`.
|
|
77
|
-
*/
|
|
78
|
-
async collapseAll() {
|
|
79
|
-
await Promise.all(this.accordionItems.map(item => item.toggle(false)));
|
|
80
|
-
}
|
|
81
|
-
registerAccordionItems() {
|
|
82
|
-
this.accordionItems = Array.from(this.host.querySelectorAll('post-accordion-item'));
|
|
83
|
-
this.accordionItems
|
|
84
|
-
.filter(item => {
|
|
85
|
-
return !item.collapsed || this.expandedItems.has(item);
|
|
86
|
-
})
|
|
87
|
-
.forEach((item, index) => {
|
|
88
|
-
if (!this.multiple && index !== 0) {
|
|
89
|
-
item.setAttribute('collapsed', '');
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
this.expandedItems.add(item);
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
render() {
|
|
96
|
-
return (h(Host, { key: '7057a6926f2279f7fc86d7f8539dd3ca884a3d70', "data-version": version }, h("div", { key: 'a6d337471d1d16c09d7e6af950d39c58fc6f2880', class: "accordion" }, h("slot", { key: '9687babb4b539f6e54468555b4057a2b378e1e10', onSlotchange: () => this.registerAccordionItems() }))));
|
|
97
|
-
}
|
|
98
|
-
get host() { return this; }
|
|
99
|
-
static get watchers() { return {
|
|
100
|
-
"headingLevel": ["validateHeadingLevel"]
|
|
101
|
-
}; }
|
|
102
|
-
static get style() { return PostAccordionStyle0; }
|
|
103
|
-
}, [1, "post-accordion", {
|
|
104
|
-
"headingLevel": [2, "heading-level"],
|
|
105
|
-
"multiple": [4],
|
|
106
|
-
"toggle": [64],
|
|
107
|
-
"expandAll": [64],
|
|
108
|
-
"collapseAll": [64]
|
|
109
|
-
}, [[0, "postToggle", "collapseToggleHandler"]], {
|
|
110
|
-
"headingLevel": ["validateHeadingLevel"]
|
|
111
|
-
}]);
|
|
112
|
-
function defineCustomElement$1() {
|
|
113
|
-
if (typeof customElements === "undefined") {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
const components = ["post-accordion"];
|
|
117
|
-
components.forEach(tagName => { switch (tagName) {
|
|
118
|
-
case "post-accordion":
|
|
119
|
-
if (!customElements.get(tagName)) {
|
|
120
|
-
customElements.define(tagName, PostAccordion$1);
|
|
121
|
-
}
|
|
122
|
-
break;
|
|
123
|
-
} });
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const PostAccordion = PostAccordion$1;
|
|
127
|
-
const defineCustomElement = defineCustomElement$1;
|
|
128
|
-
|
|
129
|
-
export { PostAccordion, defineCustomElement };
|
package/loaders/post-avatar.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
-
|
|
3
|
-
interface PostAvatar extends Components.PostAvatar, HTMLElement {}
|
|
4
|
-
export const PostAvatar: {
|
|
5
|
-
prototype: PostAvatar;
|
|
6
|
-
new (): PostAvatar;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
package/loaders/post-avatar.js
DELETED
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { v as version } from './package.js';
|
|
3
|
-
import { c as checkRequiredAndType, a as checkEmptyOrType, b 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$1 = /*@__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$1.INTERNAL_USERID_IMAGE_SRC = 'https://web.post.ch/UserProfileImage/{userid}.png';
|
|
176
|
-
function defineCustomElement$1() {
|
|
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$1);
|
|
185
|
-
}
|
|
186
|
-
break;
|
|
187
|
-
} });
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
const PostAvatar = PostAvatar$1;
|
|
191
|
-
const defineCustomElement = defineCustomElement$1;
|
|
192
|
-
|
|
193
|
-
export { PostAvatar, defineCustomElement };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
-
|
|
3
|
-
interface PostBackToTop extends Components.PostBackToTop, HTMLElement {}
|
|
4
|
-
export const PostBackToTop: {
|
|
5
|
-
prototype: PostBackToTop;
|
|
6
|
-
new (): PostBackToTop;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1,121 +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 { c as checkRequiredAndType } from './index2.js';
|
|
5
|
-
import './breakpoints.js';
|
|
6
|
-
import { d as defineCustomElement$2 } 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$1 = /*@__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$1() {
|
|
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$1);
|
|
108
|
-
}
|
|
109
|
-
break;
|
|
110
|
-
case "post-icon":
|
|
111
|
-
if (!customElements.get(tagName)) {
|
|
112
|
-
defineCustomElement$2();
|
|
113
|
-
}
|
|
114
|
-
break;
|
|
115
|
-
} });
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const PostBackToTop = PostBackToTop$1;
|
|
119
|
-
const defineCustomElement = defineCustomElement$1;
|
|
120
|
-
|
|
121
|
-
export { PostBackToTop, defineCustomElement };
|
package/loaders/post-banner.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
-
|
|
3
|
-
interface PostBanner extends Components.PostBanner, HTMLElement {}
|
|
4
|
-
export const PostBanner: {
|
|
5
|
-
prototype: PostBanner;
|
|
6
|
-
new (): PostBanner;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
package/loaders/post-banner.js
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { v as version } from './package.js';
|
|
3
|
-
import { f as fadeOut } from './fade.js';
|
|
4
|
-
import { c as checkRequiredAndType, a as checkEmptyOrType, d as checkEmptyOrOneOf } from './index2.js';
|
|
5
|
-
import './breakpoints.js';
|
|
6
|
-
import { n as nanoid } from './index.browser.js';
|
|
7
|
-
import { d as defineCustomElement$2 } from './post-icon2.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
|
-
const PostBannerStyle0 = postBannerCss;
|
|
13
|
-
|
|
14
|
-
const PostBanner$1 = /*@__PURE__*/ proxyCustomElement(class PostBanner extends HTMLElement {
|
|
15
|
-
constructor() {
|
|
16
|
-
super();
|
|
17
|
-
this.__registerHost();
|
|
18
|
-
this.__attachShadow();
|
|
19
|
-
this.postDismissed = createEvent(this, "postDismissed", 7);
|
|
20
|
-
this.bannerId = `p${nanoid(6)}`;
|
|
21
|
-
this.classes = undefined;
|
|
22
|
-
this.hasActions = undefined;
|
|
23
|
-
this.hasHeading = undefined;
|
|
24
|
-
this.onDismissButtonClick = () => this.dismiss();
|
|
25
|
-
this.dismissible = false;
|
|
26
|
-
this.dismissLabel = undefined;
|
|
27
|
-
this.icon = undefined;
|
|
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 PostBannerStyle0; }
|
|
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
|
-
|
|
121
|
-
const PostBanner = PostBanner$1;
|
|
122
|
-
const defineCustomElement = defineCustomElement$1;
|
|
123
|
-
|
|
124
|
-
export { PostBanner, defineCustomElement };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
-
|
|
3
|
-
interface PostBreadcrumbItem extends Components.PostBreadcrumbItem, HTMLElement {}
|
|
4
|
-
export const PostBreadcrumbItem: {
|
|
5
|
-
prototype: PostBreadcrumbItem;
|
|
6
|
-
new (): PostBreadcrumbItem;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|