@swisspost/design-system-components 10.0.0-next.55 → 10.0.0-next.56
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/{esm/breakpoints-CJ80BZ06.js → cjs/breakpoints-Df03Ct7n.js} +103 -5
- package/dist/cjs/debounce-BsIBi_-2.js +13 -0
- package/dist/cjs/environment-BQE9Unf_.js +52 -0
- package/dist/cjs/{event-from-CLvtSUKf.js → event-from-CwMw19f8.js} +2 -2
- package/dist/cjs/fade-CPQhl1fP.js +26 -0
- package/dist/cjs/fade-slide-dPhQa-I1.js +38 -0
- package/dist/cjs/{get-focusable-children-Bx63XUQg.js → get-focusable-children-ChETM1wK.js} +29 -21
- package/dist/cjs/{get-root-CyMf3Vsd.js → get-root-CUAv4k4C.js} +2 -2
- package/dist/cjs/{index-B4gYpuJF.js → index-CKNxhb0S.js} +21 -13
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-DkJrv93P.js → package-CY7IOoiw.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +11 -11
- package/dist/cjs/post-avatar.cjs.entry.js +10 -10
- package/dist/cjs/post-back-to-top.cjs.entry.js +16 -40
- package/dist/cjs/post-banner.cjs.entry.js +11 -10
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +7 -7
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +22 -31
- package/dist/cjs/post-card-control.cjs.entry.js +16 -16
- package/dist/cjs/{post-closebutton_15.cjs.entry.js → post-closebutton_13.cjs.entry.js} +481 -484
- package/dist/cjs/post-collapsible_2.cjs.entry.js +33 -33
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-env-test.cjs.entry.js +15 -0
- package/dist/cjs/post-footer.cjs.entry.js +21 -19
- package/dist/cjs/post-linkarea.cjs.entry.js +3 -3
- package/dist/cjs/post-pagination.cjs.entry.js +589 -0
- package/dist/cjs/post-popover-trigger.cjs.entry.js +46 -30
- package/dist/cjs/post-popover.cjs.entry.js +11 -11
- package/dist/cjs/post-rating.cjs.entry.js +13 -13
- package/dist/cjs/post-stepper-item.cjs.entry.js +4 -4
- package/dist/cjs/post-stepper.cjs.entry.js +29 -26
- package/dist/cjs/post-tab-item.cjs.entry.js +49 -0
- package/dist/cjs/post-tab-panel.cjs.entry.js +9 -9
- package/dist/cjs/post-tabs.cjs.entry.js +191 -38
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +8 -8
- package/dist/cjs/post-tooltip.cjs.entry.js +6 -6
- package/dist/cjs/utils-s05L2ulk.js +26 -0
- package/dist/collection/animations/collapse.js +3 -3
- package/dist/collection/animations/fade-slide.js +33 -0
- package/dist/collection/animations/fade.js +19 -7
- package/dist/collection/animations/index.js +2 -0
- package/dist/collection/animations/slide.js +25 -21
- package/dist/collection/animations/types.js +14 -0
- package/dist/collection/animations/utils.js +8 -0
- package/dist/collection/collection-manifest.json +6 -6
- package/dist/collection/components/post-accordion/post-accordion.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +4 -4
- package/dist/collection/components/post-avatar/post-avatar.js +1 -1
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +14 -14
- package/dist/collection/components/post-banner/post-banner.css +4 -1
- package/dist/collection/components/post-banner/post-banner.js +3 -3
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +24 -24
- package/dist/collection/components/post-card-control/post-card-control.js +2 -2
- package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
- package/dist/collection/components/post-closebutton/post-closebutton.js +1 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js +27 -27
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +1 -1
- package/dist/collection/components/post-footer/post-footer.css +1 -1
- package/dist/collection/components/post-footer/post-footer.js +17 -15
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +113 -82
- package/dist/collection/components/post-icon/post-icon.js +6 -4
- package/dist/collection/components/post-language-menu/post-language-menu.css +1 -0
- package/dist/collection/components/{post-language-switch/post-language-switch.js → post-language-menu/post-language-menu.js} +23 -23
- package/dist/collection/components/post-language-menu-item/post-language-menu-item.css +1 -0
- package/dist/collection/components/{post-language-option/post-language-option.js → post-language-menu-item/post-language-menu-item.js} +13 -13
- package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
- package/dist/collection/components/post-logo/post-logo.css +3 -1
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +41 -29
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +183 -74
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +3 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +79 -73
- package/dist/collection/components/post-menu/post-menu.css +1 -1
- package/dist/collection/components/post-menu/post-menu.js +34 -34
- package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
- package/dist/collection/components/post-pagination/post-pagination.css +1 -0
- package/dist/collection/components/post-pagination/post-pagination.js +838 -0
- package/dist/collection/components/post-popover/post-popover.js +9 -9
- package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +43 -27
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +45 -92
- package/dist/collection/components/post-rating/post-rating.js +2 -2
- package/dist/collection/components/post-stepper/post-stepper.js +34 -31
- package/dist/collection/components/post-stepper-item/post-stepper-item.css +2 -2
- package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
- package/dist/collection/components/post-tab-item/post-tab-item.css +1 -0
- package/dist/collection/components/post-tab-item/post-tab-item.js +86 -0
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +9 -9
- package/dist/collection/components/post-tabs/post-tabs.js +230 -57
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +1 -1
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
- package/dist/collection/utils/environment.js +47 -2
- package/dist/collection/utils/event-from.js +2 -2
- package/dist/collection/utils/get-focusable-children.js +29 -21
- package/dist/collection/utils/is-motion-reduced.js +1 -1
- package/dist/collection/utils/tests/environment/hydrate-app-helper.js +16 -0
- package/dist/collection/utils/tests/environment/post-env-test.js +9 -0
- package/dist/component-names.json +4 -5
- package/dist/components/breakpoints.js +90 -3
- package/dist/components/debounce.js +11 -0
- package/dist/components/environment.js +49 -0
- package/dist/components/event-from.js +2 -2
- package/dist/components/fade-slide.js +36 -0
- package/dist/components/fade.js +21 -8
- package/dist/components/get-focusable-children.js +29 -21
- package/dist/components/get-root.js +1 -1
- package/dist/components/index.d.ts +10 -10
- package/dist/components/index.js +5 -5
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +4 -5
- package/dist/components/post-accordion2.js +2 -3
- package/dist/components/post-avatar.js +2 -3
- package/dist/components/post-back-to-top.js +14 -40
- package/dist/components/post-banner.js +5 -6
- package/dist/components/post-breadcrumb-item2.js +2 -3
- package/dist/components/post-breadcrumbs.js +23 -33
- package/dist/components/post-card-control.js +3 -4
- package/dist/components/post-closebutton2.js +3 -4
- package/dist/components/post-collapsible-trigger2.js +2 -3
- package/dist/components/post-collapsible2.js +25 -25
- package/dist/components/{post-list.d.ts → post-env-test.d.ts} +4 -4
- package/dist/components/post-env-test.js +31 -0
- package/dist/components/post-footer.js +17 -16
- package/dist/components/post-header.js +97 -95
- package/dist/components/post-icon2.js +8 -6
- package/dist/components/post-language-menu-item.d.ts +11 -0
- package/dist/components/post-language-menu-item.js +98 -0
- package/dist/components/{post-language-switch.d.ts → post-language-menu.d.ts} +4 -4
- package/dist/components/post-language-menu.js +156 -0
- package/dist/components/post-linkarea.js +1 -1
- package/dist/components/post-logo.js +3 -4
- package/dist/components/post-mainnavigation.js +21 -32
- package/dist/components/post-megadropdown-trigger.js +71 -78
- package/dist/components/post-megadropdown.js +182 -77
- package/dist/components/post-menu-item2.js +1 -1
- package/dist/components/post-menu-trigger2.js +2 -3
- package/dist/components/post-menu2.js +34 -35
- package/dist/components/{post-tab-header.d.ts → post-pagination.d.ts} +4 -4
- package/dist/components/post-pagination.js +635 -0
- package/dist/components/post-popover-trigger.js +41 -26
- package/dist/components/post-popover.js +8 -9
- package/dist/components/post-popovercontainer2.js +44 -40
- package/dist/components/post-rating.js +2 -3
- package/dist/components/post-stepper-item.js +2 -2
- package/dist/components/post-stepper.js +31 -29
- package/dist/components/{post-list-item.d.ts → post-tab-item.d.ts} +4 -4
- package/dist/components/post-tab-item.js +70 -0
- package/dist/components/post-tab-panel.js +8 -9
- package/dist/components/post-tabs.js +192 -37
- package/dist/components/post-togglebutton.js +1 -51
- package/dist/components/post-togglebutton2.js +53 -0
- package/dist/components/post-tooltip-trigger.js +3 -3
- package/dist/components/post-tooltip.js +2 -3
- package/dist/components/react/index.js +1 -1
- package/dist/{cjs/breakpoints-CEkeixld.js → components/react/p-B8YiQ3mz.js} +89 -6
- package/dist/components/react/{p-DBPOV12C.js → p-BOLlAY91.js} +9 -7
- package/dist/components/react/p-BVCjnh6Q.js +36 -0
- package/dist/components/react/{p-CBFgkSgY.js → p-BVGcVycs.js} +1 -1
- package/dist/components/react/{p-LtiDhYis.js → p-BYCGzO-t.js} +5 -6
- package/dist/components/react/p-C9hMpmsD.js +11 -0
- package/dist/components/react/{p-BVXiQdHq.js → p-CJ13r5fi.js} +29 -21
- package/dist/components/react/{p-CSAMO7iJ.js → p-CnZWXrbA.js} +39 -40
- package/dist/components/react/p-CoDiS_Ik.js +24 -0
- package/dist/components/react/p-CyniMNY-.js +54 -0
- package/dist/components/react/p-D5knoiyy.js +24 -0
- package/dist/components/react/{p-Djvj8fd2.js → p-DBO6FfHt.js} +4 -5
- package/dist/components/react/{p-Ccrl2AQn.js → p-DRfa3MOV.js} +26 -26
- package/dist/components/react/{p-Cwiv86_f.js → p-DYImHx0e.js} +4 -5
- package/dist/components/react/p-DZ5m2Ttg.js +3 -0
- package/dist/components/react/p-FxUVQ4Tx.js +49 -0
- package/dist/components/react/{p-D2waO0Zc.js → p-L36-yvgK.js} +2 -2
- package/dist/components/react/{p-CewRvBtg.js → p-NCAcc7ZZ.js} +4 -5
- package/dist/components/react/{p-DVGEExot.js → p-QNPIvxLq.js} +45 -41
- package/dist/components/react/{p-XrZzCOKT.js → p-_pLhqTys.js} +5 -6
- package/dist/components/react/p-c6yNOQwn.js +113 -0
- package/dist/components/react/{p-CzIKqBrS.js → p-rEfV4v4a.js} +2 -2
- package/dist/components/react/post-accordion-item.js +1 -1
- package/dist/components/react/post-accordion.js +1 -1
- package/dist/components/react/post-avatar.js +3 -4
- package/dist/components/react/post-back-to-top.js +16 -42
- package/dist/components/react/post-banner.js +7 -8
- package/dist/components/react/post-breadcrumb-item.js +1 -1
- package/dist/components/react/post-breadcrumbs.js +30 -40
- package/dist/components/react/post-card-control.js +5 -6
- package/dist/components/react/post-closebutton.js +1 -1
- package/dist/components/react/post-collapsible-trigger.js +1 -1
- package/dist/components/react/post-collapsible.js +1 -1
- package/dist/components/react/{post-list.d.ts → post-env-test.d.ts} +4 -4
- package/dist/components/react/post-env-test.js +32 -0
- package/dist/components/react/post-footer.js +23 -22
- package/dist/components/react/post-header.js +99 -97
- package/dist/components/react/post-icon.js +1 -1
- package/dist/components/react/post-language-menu-item.d.ts +11 -0
- package/dist/components/react/post-language-menu-item.js +99 -0
- package/dist/components/react/{post-language-option.d.ts → post-language-menu.d.ts} +4 -4
- package/dist/components/react/post-language-menu.js +157 -0
- package/dist/components/react/post-linkarea.js +2 -2
- package/dist/components/react/post-logo.js +4 -5
- package/dist/components/react/post-mainnavigation.js +23 -34
- package/dist/components/react/post-megadropdown-trigger.js +73 -80
- package/dist/components/react/post-megadropdown.js +184 -79
- package/dist/components/react/post-menu-item.js +1 -1
- package/dist/components/react/post-menu-trigger.js +1 -1
- package/dist/components/react/post-menu.js +1 -1
- package/dist/components/react/{post-tab-header.d.ts → post-pagination.d.ts} +4 -4
- package/dist/components/react/post-pagination.js +636 -0
- package/dist/components/react/post-popover-trigger.js +42 -27
- package/dist/components/react/post-popover.js +13 -14
- package/dist/components/react/post-popovercontainer.js +1 -1
- package/dist/components/react/post-rating.js +4 -5
- package/dist/components/react/post-stepper-item.js +3 -3
- package/dist/components/react/post-stepper.js +32 -30
- package/dist/components/react/{post-list-item.d.ts → post-tab-item.d.ts} +4 -4
- package/dist/components/react/post-tab-item.js +71 -0
- package/dist/components/react/post-tab-panel.js +9 -10
- package/dist/components/react/post-tabs.js +193 -38
- package/dist/components/react/post-togglebutton.js +1 -52
- package/dist/components/react/post-tooltip-trigger.js +4 -4
- package/dist/components/react/post-tooltip.js +4 -5
- package/dist/components/utils.js +24 -0
- package/dist/docs.json +854 -597
- package/dist/{components/react/p-CJ80BZ06.js → esm/breakpoints-DYoSKGHO.js} +90 -3
- package/dist/esm/debounce-C9hMpmsD.js +11 -0
- package/dist/esm/environment-CEmnRoA6.js +49 -0
- package/dist/esm/{event-from-CzIKqBrS.js → event-from-rEfV4v4a.js} +2 -2
- package/dist/esm/fade-DsgPYmAa.js +24 -0
- package/dist/esm/fade-slide-CvOvauo9.js +36 -0
- package/dist/esm/{get-focusable-children-D9ZHp2FP.js → get-focusable-children-BXNs2_sw.js} +29 -21
- package/dist/esm/{get-root-BkQ3CrLq.js → get-root-CXfAA093.js} +1 -1
- package/dist/esm/{index-wEFJ-c34.js → index-1ReqxAnI.js} +21 -13
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-DZ5m2Ttg.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +9 -9
- package/dist/esm/post-avatar.entry.js +5 -5
- package/dist/esm/post-back-to-top.entry.js +16 -40
- package/dist/esm/post-banner.entry.js +10 -9
- package/dist/esm/post-breadcrumb-item_2.entry.js +6 -6
- package/dist/esm/post-breadcrumbs.entry.js +20 -29
- package/dist/esm/post-card-control.entry.js +6 -6
- package/dist/esm/{post-closebutton_15.entry.js → post-closebutton_13.entry.js} +462 -463
- package/dist/esm/post-collapsible_2.entry.js +30 -30
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-env-test.entry.js +13 -0
- package/dist/esm/post-footer.entry.js +18 -16
- package/dist/esm/post-linkarea.entry.js +3 -3
- package/dist/esm/post-pagination.entry.js +587 -0
- package/dist/esm/post-popover-trigger.entry.js +44 -28
- package/dist/esm/post-popover.entry.js +10 -10
- package/dist/esm/post-rating.entry.js +5 -5
- package/dist/esm/post-stepper-item.entry.js +4 -4
- package/dist/esm/post-stepper.entry.js +28 -25
- package/dist/esm/post-tab-item.entry.js +47 -0
- package/dist/esm/post-tab-panel.entry.js +9 -9
- package/dist/esm/post-tabs.entry.js +191 -38
- package/dist/esm/post-tooltip-trigger.entry.js +5 -5
- package/dist/esm/post-tooltip.entry.js +5 -5
- package/dist/esm/utils-CoDiS_Ik.js +24 -0
- package/dist/post-components/{p-7f635728.entry.js → p-130eb074.entry.js} +1 -1
- package/dist/post-components/p-13d018fe.entry.js +1 -0
- package/dist/post-components/p-143e5a84.entry.js +1 -0
- package/dist/post-components/p-1ReqxAnI.js +2 -0
- package/dist/post-components/p-2b220851.entry.js +1 -0
- package/dist/post-components/{p-a9644e54.entry.js → p-390f111f.entry.js} +1 -1
- package/dist/post-components/p-3cf09fbd.entry.js +1 -0
- package/dist/post-components/p-52e584ca.entry.js +1 -0
- package/dist/post-components/p-56a4040c.entry.js +1 -0
- package/dist/post-components/p-675dab57.entry.js +1 -0
- package/dist/post-components/p-6857fd9d.entry.js +1 -0
- package/dist/post-components/p-7cd00e3e.entry.js +1 -0
- package/dist/post-components/p-7f5d2487.entry.js +1 -0
- package/dist/post-components/{p-cd03e6f2.entry.js → p-88201353.entry.js} +1 -1
- package/dist/post-components/p-89360cd1.entry.js +1 -0
- package/dist/post-components/p-B7ebLhHc.js +1 -0
- package/dist/post-components/p-BVCjnh6Q.js +1 -0
- package/dist/post-components/p-BXNs2_sw.js +1 -0
- package/dist/post-components/p-C9hMpmsD.js +1 -0
- package/dist/post-components/p-CEmnRoA6.js +1 -0
- package/dist/post-components/p-CoDiS_Ik.js +1 -0
- package/dist/post-components/p-D5knoiyy.js +1 -0
- package/dist/post-components/p-DI-h_mEL.js +1 -0
- package/dist/post-components/p-DZ5m2Ttg.js +1 -0
- package/dist/post-components/p-a740eaed.entry.js +1 -0
- package/dist/post-components/{p-57288cb2.entry.js → p-a79590f5.entry.js} +1 -1
- package/dist/post-components/p-b708d96a.entry.js +1 -0
- package/dist/post-components/p-bcf5786f.entry.js +1 -0
- package/dist/post-components/p-c92512f5.entry.js +1 -0
- package/dist/post-components/{p-af030a3a.entry.js → p-d7cb3a61.entry.js} +1 -1
- package/dist/post-components/p-d7f33813.entry.js +1 -0
- package/dist/post-components/p-da97ee21.entry.js +1 -0
- package/dist/post-components/{p-e62e1f57.entry.js → p-ed4db774.entry.js} +1 -1
- package/dist/post-components/post-components.css +1 -1
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/prebuild.js +46 -0
- package/dist/types/animations/collapse.d.ts +1 -0
- package/dist/types/animations/fade-slide.d.ts +11 -0
- package/dist/types/animations/fade.d.ts +2 -2
- package/dist/types/animations/index.d.ts +2 -0
- package/dist/types/animations/slide.d.ts +9 -2
- package/dist/types/animations/types.d.ts +13 -0
- package/dist/types/animations/utils.d.ts +2 -0
- package/dist/types/components/post-accordion-item/heading-levels.d.ts +1 -1
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +2 -2
- package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +2 -2
- package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +6 -6
- package/dist/types/components/post-collapsible/post-collapsible.d.ts +4 -5
- package/dist/types/components/post-footer/post-footer.d.ts +4 -4
- package/dist/types/components/post-header/post-header.d.ts +18 -13
- package/dist/types/components/{post-language-switch/post-language-switch.d.ts → post-language-menu/post-language-menu.d.ts} +6 -6
- package/dist/types/components/{post-language-option/post-language-option.d.ts → post-language-menu-item/post-language-menu-item.d.ts} +5 -5
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +6 -5
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +20 -2
- package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +17 -23
- package/dist/types/components/post-menu/post-menu.d.ts +4 -4
- package/dist/types/components/post-pagination/post-pagination.d.ts +224 -0
- package/dist/types/components/post-popover/post-popover.d.ts +3 -3
- package/dist/types/components/post-popover-trigger/post-popover-trigger.d.ts +2 -1
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +13 -16
- package/dist/types/components/post-rating/post-rating.d.ts +1 -1
- package/dist/types/components/post-stepper/post-stepper.d.ts +9 -8
- package/dist/types/components/post-tab-item/post-tab-item.d.ts +19 -0
- package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +3 -3
- package/dist/types/components/post-tabs/post-tabs.d.ts +33 -12
- package/dist/types/components.d.ts +311 -200
- package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/prebuild.d.ts +9 -0
- package/dist/types/types/heading-levels.d.ts +1 -1
- package/dist/types/utils/environment.d.ts +25 -1
- package/dist/types/utils/get-focusable-children.d.ts +2 -2
- package/dist/types/utils/tests/environment/hydrate-app-helper.d.ts +5 -0
- package/dist/types/utils/tests/environment/post-env-test.d.ts +3 -0
- package/hydrate/index.js +1740 -863
- package/hydrate/index.mjs +1740 -863
- package/package.json +6 -7
- package/dist/cjs/fade-nS5zzDQS.js +0 -14
- package/dist/cjs/index-UFKR6Ok0.js +0 -98
- package/dist/cjs/post-tab-header.cjs.entry.js +0 -31
- package/dist/collection/animations/slide-and-fade.js +0 -25
- package/dist/collection/components/post-language-option/post-language-option.css +0 -1
- package/dist/collection/components/post-language-switch/post-language-switch.css +0 -1
- package/dist/collection/components/post-list/post-list.css +0 -1
- package/dist/collection/components/post-list/post-list.js +0 -97
- package/dist/collection/components/post-list-item/post-list-item.css +0 -1
- package/dist/collection/components/post-list-item/post-list-item.js +0 -26
- package/dist/collection/components/post-tab-header/post-tab-header.css +0 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js +0 -65
- package/dist/components/index2.js +0 -89
- package/dist/components/post-language-option.d.ts +0 -11
- package/dist/components/post-language-option.js +0 -99
- package/dist/components/post-language-switch.js +0 -157
- package/dist/components/post-list-item.js +0 -38
- package/dist/components/post-list.js +0 -61
- package/dist/components/post-tab-header.js +0 -52
- package/dist/components/react/p-BhxZzOEC.js +0 -3
- package/dist/components/react/p-CYkf_7Y5.js +0 -89
- package/dist/components/react/p-SbIC4aZX.js +0 -11
- package/dist/components/react/p-v3pOrMNQ.js +0 -114
- package/dist/components/react/post-language-option.js +0 -100
- package/dist/components/react/post-language-switch.d.ts +0 -11
- package/dist/components/react/post-language-switch.js +0 -158
- package/dist/components/react/post-list-item.js +0 -39
- package/dist/components/react/post-list.js +0 -62
- package/dist/components/react/post-tab-header.js +0 -53
- package/dist/esm/fade-SbIC4aZX.js +0 -11
- package/dist/esm/index-Beaz8wEe.js +0 -89
- package/dist/esm/package-BhxZzOEC.js +0 -3
- package/dist/esm/post-tab-header.entry.js +0 -29
- package/dist/post-components/p-01e678c9.entry.js +0 -1
- package/dist/post-components/p-034a453f.entry.js +0 -1
- package/dist/post-components/p-15a4cdbf.entry.js +0 -1
- package/dist/post-components/p-24dc54d1.entry.js +0 -1
- package/dist/post-components/p-2a2030bf.entry.js +0 -1
- package/dist/post-components/p-2ed84cc3.entry.js +0 -1
- package/dist/post-components/p-3228968f.entry.js +0 -1
- package/dist/post-components/p-3c01ddfe.entry.js +0 -1
- package/dist/post-components/p-748b1f01.entry.js +0 -1
- package/dist/post-components/p-7745e46e.entry.js +0 -1
- package/dist/post-components/p-82c178a3.entry.js +0 -1
- package/dist/post-components/p-9b5f8319.entry.js +0 -1
- package/dist/post-components/p-Beaz8wEe.js +0 -1
- package/dist/post-components/p-BhxZzOEC.js +0 -1
- package/dist/post-components/p-CBFgkSgY.js +0 -1
- package/dist/post-components/p-CJ80BZ06.js +0 -1
- package/dist/post-components/p-D9ZHp2FP.js +0 -1
- package/dist/post-components/p-SbIC4aZX.js +0 -1
- package/dist/post-components/p-b8ba8139.entry.js +0 -1
- package/dist/post-components/p-db935e8e.entry.js +0 -1
- package/dist/post-components/p-fb4b1641.entry.js +0 -1
- package/dist/post-components/p-wEFJ-c34.js +0 -2
- package/dist/types/animations/slide-and-fade.d.ts +0 -2
- package/dist/types/components/post-list/post-list.d.ts +0 -24
- package/dist/types/components/post-list-item/post-list-item.d.ts +0 -8
- package/dist/types/components/post-tab-header/post-tab-header.d.ts +0 -14
- /package/dist/collection/components/{post-language-switch → post-language-menu}/switch-variants.js +0 -0
- /package/dist/post-components/{p-CzIKqBrS.js → p-rEfV4v4a.js} +0 -0
- /package/dist/types/components/{post-language-switch → post-language-menu}/switch-variants.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
|
-
import { I as IS_BROWSER } from './p-
|
|
3
|
-
import { d as checkEmptyOrOneOf, e as checkEmptyOrType } from './p-
|
|
4
|
-
import { v as version } from './p-
|
|
2
|
+
import { I as IS_BROWSER } from './p-FxUVQ4Tx.js';
|
|
3
|
+
import { d as checkEmptyOrOneOf, e as checkEmptyOrType } from './p-B8YiQ3mz.js';
|
|
4
|
+
import { v as version } from './p-DZ5m2Ttg.js';
|
|
5
5
|
|
|
6
6
|
const PLACEMENT_TYPES = [
|
|
7
7
|
'top',
|
|
@@ -2739,7 +2739,7 @@ function popIn(el) {
|
|
|
2739
2739
|
});
|
|
2740
2740
|
}
|
|
2741
2741
|
|
|
2742
|
-
const postPopovercontainerCss = "@layer polyfill{@supports not selector(:popover-open){[popover]:not(.\\:popover-open){display:none}}}:where(post-popovercontainer){background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;margin:0;padding:0;overflow:visible}:where(post-popovercontainer)>div{box-shadow:var(--post-device-elevation-300);width:max-content;max-width:100%;color:var(--post-current-fg);background-color:var(--post-current-bg);border-radius:4px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:where(post-popovercontainer)>div{border:2px solid rgba(0,0,0,0)}}:where(post-popovercontainer)[tooltip]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:where(post-popovercontainer)[safe-space]::after{content:\"\";position:fixed;inset:0;z-index:-1;pointer-events:auto}:where(post-popovercontainer)[safe-space=triangle]::after{clip-path:polygon(var(--post-safe-space-cursor-x, 0) var(--post-safe-space-cursor-y, 0), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)))}:where(post-popovercontainer)[safe-space=trapezoid]::after{clip-path:polygon(var(--post-safe-space-trigger-x-start, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-start, 0)), var(--post-safe-space-trigger-x-end, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-end, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)))}:where(post-popovercontainer):not(:has(.arrow))>div{box-shadow:var(--post-device-elevation-300)}:where(post-popovercontainer):has(.arrow)>div{filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.top)>div{filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.left)>div{filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.right)>div{filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer) .arrow{position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:where(post-popovercontainer) .arrow.top{border-block-
|
|
2742
|
+
const postPopovercontainerCss = "@layer polyfill{@supports not selector(:popover-open){[popover]:not(.\\:popover-open){display:none}}}:where(post-popovercontainer){background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;margin:0;padding:0;overflow:visible}:where(post-popovercontainer)>div{box-shadow:var(--post-device-elevation-300);width:max-content;max-width:100%;color:var(--post-current-fg);background-color:var(--post-current-bg);border-radius:4px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:where(post-popovercontainer)>div{border:2px solid rgba(0,0,0,0)}}:where(post-popovercontainer)[tooltip]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:where(post-popovercontainer)[safe-space]::after{content:\"\";position:fixed;inset:0;z-index:-1;pointer-events:auto}:where(post-popovercontainer)[safe-space=triangle]::after{clip-path:polygon(var(--post-safe-space-cursor-x, 0) var(--post-safe-space-cursor-y, 0), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)))}:where(post-popovercontainer)[safe-space=trapezoid]::after{clip-path:polygon(var(--post-safe-space-trigger-x-start, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-start, 0)), var(--post-safe-space-trigger-x-end, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-end, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)))}:where(post-popovercontainer):not(:has(.arrow))>div{box-shadow:var(--post-device-elevation-300)}:where(post-popovercontainer):has(.arrow)>div{filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.top)>div{filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.left)>div{filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.right)>div{filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer) .arrow{--arrow-size: 0.5825rem;position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:where(post-popovercontainer) .arrow[dynamic-placement=top]{border-bottom-right-radius:2px}:where(post-popovercontainer) .arrow[dynamic-placement=right]{border-bottom-left-radius:2px}:where(post-popovercontainer) .arrow[dynamic-placement=bottom]{border-top-left-radius:2px}:where(post-popovercontainer) .arrow[dynamic-placement=left]{border-top-right-radius:2px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:where(post-popovercontainer) .arrow[dynamic-placement=top]{border-block-end:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);bottom:-0.3796735336rem !important}:where(post-popovercontainer) .arrow[dynamic-placement=left]{border-block-start:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);right:-0.3796735336rem !important}:where(post-popovercontainer) .arrow[dynamic-placement=right]{border-block-end:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);left:-0.3796735336rem !important}:where(post-popovercontainer) .arrow[dynamic-placement=bottom]{border-block-start:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);top:-0.3796735336rem !important}}";
|
|
2743
2743
|
|
|
2744
2744
|
const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopovercontainer extends H {
|
|
2745
2745
|
constructor() {
|
|
@@ -2769,10 +2769,6 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2769
2769
|
* Whether or not to display a little pointer arrow
|
|
2770
2770
|
*/
|
|
2771
2771
|
this.arrow = false;
|
|
2772
|
-
/**
|
|
2773
|
-
* Whether or not the popovercontainer should close when user clicks outside of it
|
|
2774
|
-
*/
|
|
2775
|
-
this.manualClose = false;
|
|
2776
2772
|
this.currentAnimation = null;
|
|
2777
2773
|
}
|
|
2778
2774
|
validatePlacement() {
|
|
@@ -2818,10 +2814,35 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2818
2814
|
this.calculatePosition();
|
|
2819
2815
|
this.host.showPopover();
|
|
2820
2816
|
}
|
|
2817
|
+
/**
|
|
2818
|
+
* Programmatically hide the popovercontainer
|
|
2819
|
+
*/
|
|
2820
|
+
async hide() {
|
|
2821
|
+
if (!this.toggleTimeoutId) {
|
|
2822
|
+
this.eventTarget = null;
|
|
2823
|
+
this.host.hidePopover();
|
|
2824
|
+
this.postHide.emit();
|
|
2825
|
+
}
|
|
2826
|
+
}
|
|
2827
|
+
/**
|
|
2828
|
+
* Toggle popovercontainer display
|
|
2829
|
+
* @param target A focusable element inside the <post-popover-trigger> component that controls the popover
|
|
2830
|
+
* @param force Pass true to always show or false to always hide
|
|
2831
|
+
*/
|
|
2832
|
+
async toggle(target, force) {
|
|
2833
|
+
this.eventTarget = target;
|
|
2834
|
+
// Prevent instant double toggle
|
|
2835
|
+
if (!this.toggleTimeoutId) {
|
|
2836
|
+
this.calculatePosition();
|
|
2837
|
+
this.host.togglePopover(force);
|
|
2838
|
+
this.toggleTimeoutId = null;
|
|
2839
|
+
}
|
|
2840
|
+
return this.host.matches(':where(:popover-open, .popover-open)');
|
|
2841
|
+
}
|
|
2821
2842
|
/**
|
|
2822
2843
|
* Handles the popover opening process and emits related events.
|
|
2823
2844
|
*/
|
|
2824
|
-
|
|
2845
|
+
open() {
|
|
2825
2846
|
const content = this.host.querySelector('.popover-content');
|
|
2826
2847
|
this.startAutoupdates();
|
|
2827
2848
|
if (content) {
|
|
@@ -2846,7 +2867,7 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2846
2867
|
/**
|
|
2847
2868
|
* Handles the popover closing process and emits related events.
|
|
2848
2869
|
*/
|
|
2849
|
-
|
|
2870
|
+
close() {
|
|
2850
2871
|
if (typeof this.clearAutoUpdate === 'function') {
|
|
2851
2872
|
this.clearAutoUpdate();
|
|
2852
2873
|
}
|
|
@@ -2892,31 +2913,6 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2892
2913
|
}
|
|
2893
2914
|
}
|
|
2894
2915
|
}
|
|
2895
|
-
/**
|
|
2896
|
-
* Programmatically hide the popovercontainer
|
|
2897
|
-
*/
|
|
2898
|
-
async hide() {
|
|
2899
|
-
if (!this.toggleTimeoutId) {
|
|
2900
|
-
this.eventTarget = null;
|
|
2901
|
-
this.host.hidePopover();
|
|
2902
|
-
this.postHide.emit();
|
|
2903
|
-
}
|
|
2904
|
-
}
|
|
2905
|
-
/**
|
|
2906
|
-
* Toggle popovercontainer display
|
|
2907
|
-
* @param target A focusable element inside the <post-popover-trigger> component that controls the popover
|
|
2908
|
-
* @param force Pass true to always show or false to always hide
|
|
2909
|
-
*/
|
|
2910
|
-
async toggle(target, force) {
|
|
2911
|
-
this.eventTarget = target;
|
|
2912
|
-
// Prevent instant double toggle
|
|
2913
|
-
if (!this.toggleTimeoutId) {
|
|
2914
|
-
this.calculatePosition();
|
|
2915
|
-
this.host.togglePopover(force);
|
|
2916
|
-
this.toggleTimeoutId = null;
|
|
2917
|
-
}
|
|
2918
|
-
return this.host.matches(':where(:popover-open, .popover-open)');
|
|
2919
|
-
}
|
|
2920
2916
|
/**
|
|
2921
2917
|
* Start or stop auto updates based on popovercontainer events.
|
|
2922
2918
|
* Popovercontainers can be closed or opened with other methods than class members,
|
|
@@ -2950,6 +2946,7 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2950
2946
|
async calculatePosition() {
|
|
2951
2947
|
const { x, y, middlewareData, placement } = await this.computeMainPosition();
|
|
2952
2948
|
const currentPlacement = placement.split('-')[0];
|
|
2949
|
+
this.dynamicPlacement = currentPlacement;
|
|
2953
2950
|
// Position popover
|
|
2954
2951
|
this.host.style.left = `${x}px`;
|
|
2955
2952
|
this.host.style.top = `${y}px`;
|
|
@@ -2957,11 +2954,20 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2957
2954
|
if (this.arrow && middlewareData.arrow) {
|
|
2958
2955
|
const { x: arrowX, y: arrowY } = middlewareData.arrow;
|
|
2959
2956
|
const staticSide = PostPopovercontainer.STATIC_SIDES[currentPlacement];
|
|
2957
|
+
const rootFontSize = Number.parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
2958
|
+
// Calculate dynamically the half side which provides the static side offset
|
|
2959
|
+
const arrowSizeValue = getComputedStyle(this.arrowRef)
|
|
2960
|
+
.getPropertyValue('--arrow-size')
|
|
2961
|
+
.trim();
|
|
2962
|
+
const arrowSizePx = arrowSizeValue.endsWith('rem')
|
|
2963
|
+
? Number.parseFloat(arrowSizeValue) * rootFontSize
|
|
2964
|
+
: Number.parseFloat(arrowSizeValue);
|
|
2965
|
+
const halfSide = -0.5 * arrowSizePx;
|
|
2960
2966
|
if (staticSide) {
|
|
2961
2967
|
Object.assign(this.arrowRef.style, {
|
|
2962
2968
|
left: arrowX ? `${arrowX}px` : '',
|
|
2963
2969
|
top: arrowY ? `${arrowY}px` : '',
|
|
2964
|
-
[staticSide]:
|
|
2970
|
+
[staticSide]: `${halfSide}px`,
|
|
2965
2971
|
});
|
|
2966
2972
|
}
|
|
2967
2973
|
}
|
|
@@ -3062,9 +3068,9 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
3062
3068
|
}
|
|
3063
3069
|
}
|
|
3064
3070
|
render() {
|
|
3065
|
-
return (h(Host, { key: '
|
|
3071
|
+
return (h(Host, { key: '0aaf70cb284e7227149f2e500aa7c72cab69d90a', "data-version": version, popover: "auto" }, h("div", { key: '9762887bdddca93acc6dfda715f2f41f4f6c98d6', class: "popover-content" }, this.arrow && (h("span", { key: 'e77f16be0b3b0cdb02886ea928aa6986d3f477e3', "dynamic-placement": this.dynamicPlacement, class: "arrow", ref: el => {
|
|
3066
3072
|
this.arrowRef = el;
|
|
3067
|
-
} })), h("slot", { key: '
|
|
3073
|
+
} })), h("slot", { key: 'e8737e5acec3a20d258d462a7d82278d303ba353' }))));
|
|
3068
3074
|
}
|
|
3069
3075
|
get host() { return this; }
|
|
3070
3076
|
static get watchers() { return {
|
|
@@ -3078,11 +3084,9 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
3078
3084
|
"edgeGap": [2, "edge-gap"],
|
|
3079
3085
|
"animation": [1],
|
|
3080
3086
|
"arrow": [4],
|
|
3081
|
-
"manualClose": [4, "manual-close"],
|
|
3082
3087
|
"safeSpace": [513, "safe-space"],
|
|
3088
|
+
"dynamicPlacement": [32],
|
|
3083
3089
|
"show": [64],
|
|
3084
|
-
"open": [64],
|
|
3085
|
-
"close": [64],
|
|
3086
3090
|
"hide": [64],
|
|
3087
3091
|
"toggle": [64]
|
|
3088
3092
|
}, undefined, {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
3
|
-
import { d as checkEmptyOrOneOf } from './p-
|
|
4
|
-
import './p-
|
|
5
|
-
import { d as defineCustomElement$1 } from './p-DBPOV12C.js';
|
|
2
|
+
import { v as version } from './p-DZ5m2Ttg.js';
|
|
3
|
+
import { d as checkEmptyOrOneOf } from './p-B8YiQ3mz.js';
|
|
4
|
+
import { d as defineCustomElement$1 } from './p-BOLlAY91.js';
|
|
6
5
|
|
|
7
6
|
const BUTTON_TYPES = ['button', 'submit', 'reset'];
|
|
8
7
|
|
|
9
|
-
const postClosebuttonCss = ".visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}post-closebutton .btn{padding:0;border:unset;min-height:unset;min-width:unset;width:var(--post-device-sizing-notification-1);height:var(--post-device-sizing-notification-1);border-radius:var(--post-device-border-radius-round);background-color:var(--post-scheme-color-interactive-button-tertiary-enabled-bg);color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg);display:flex;align-items:center;justify-content:center}post-closebutton .btn>post-icon{min-width:var(--post-device-sizing-interactive-icon-size4);width:var(--post-device-sizing-interactive-icon-size4);height:var(--post-device-sizing-interactive-icon-size4)}post-closebutton .btn:not(:disabled):hover,post-closebutton .btn.pretend-hover{cursor:pointer;background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-closebutton .btn:not(:disabled):hover,post-closebutton .btn.pretend-hover{color:HighlightText !important}}";
|
|
8
|
+
const postClosebuttonCss = ".visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}post-closebutton .btn{padding:0;border:unset;min-height:unset;min-width:unset;width:var(--post-device-sizing-notification-1);height:var(--post-device-sizing-notification-1);border-radius:var(--post-device-border-radius-round);background-color:var(--post-scheme-color-interactive-button-tertiary-enabled-bg);color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg);display:flex;align-items:center;justify-content:center}post-closebutton .btn>post-icon{min-width:var(--post-device-sizing-interactive-icon-size4);width:var(--post-device-sizing-interactive-icon-size4);height:var(--post-device-sizing-interactive-icon-size4)}post-closebutton .btn{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}post-closebutton .btn: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){post-closebutton .btn:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-closebutton .btn: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){post-closebutton .btn:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}post-closebutton .btn:not(:disabled):hover,post-closebutton .btn.pretend-hover{cursor:pointer;background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-closebutton .btn:not(:disabled):hover,post-closebutton .btn.pretend-hover{color:HighlightText !important}}";
|
|
10
9
|
|
|
11
10
|
const PostClosebutton = /*@__PURE__*/ proxyCustomElement(class PostClosebutton extends H {
|
|
12
11
|
constructor() {
|
|
@@ -43,7 +42,7 @@ const PostClosebutton = /*@__PURE__*/ proxyCustomElement(class PostClosebutton e
|
|
|
43
42
|
}
|
|
44
43
|
}
|
|
45
44
|
render() {
|
|
46
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: '6965a8cb5fb765b4fcec0439ceeafe19d34970c2', "data-version": version }, h("button", { key: '7e718f70b0a4ac79e9439784dac46bd1ffd60fd1', class: "btn", type: this.buttonType }, h("post-icon", { key: '70acda3fbe6c9420f0be708fde6b29a7d5337d13', "aria-hidden": "true", name: "closex" }), h("span", { key: '899b3814c0898b521e4166e1cd951af628558e78', class: "visually-hidden" }, h("slot", { key: 'b13d0e95fd567c86e93e5185389909c7c0e7107d' })))));
|
|
47
46
|
}
|
|
48
47
|
get host() { return this; }
|
|
49
48
|
static get watchers() { return {
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
+
import { v as version } from './p-DZ5m2Ttg.js';
|
|
3
|
+
import { H as HEADING_LEVELS } from './p-r4txK0AC.js';
|
|
4
|
+
import { d as checkEmptyOrOneOf } from './p-B8YiQ3mz.js';
|
|
5
|
+
import { E as EventFrom } from './p-rEfV4v4a.js';
|
|
6
|
+
import { n as nanoid } from './p-BLchVpF6.js';
|
|
7
|
+
import { d as defineCustomElement$3 } from './p-DRfa3MOV.js';
|
|
8
|
+
import { d as defineCustomElement$2 } from './p-BYCGzO-t.js';
|
|
9
|
+
import { d as defineCustomElement$1 } from './p-BOLlAY91.js';
|
|
10
|
+
|
|
11
|
+
const postAccordionItemCss = ":host{display:block;border-block-end:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}:host:has(.accordion-button:hover){border-block-end-color:var(--post-scheme-color-interactive-primary-hover-stroke)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host:has(.accordion-button:hover){border-block-end-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-extra-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-block:var(--post-device-spacing-padding-19);padding-inline:var(--post-device-spacing-padding-5);border-block-end:var(--post-device-border-width-default) var(--post-core-border-style-solid) rgba(0,0,0,0);cursor:pointer;outline:none !important}@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{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)::before{outline-style:var(--post-core-border-style-solid) !important;display:block;content:\"\";position:absolute;inset:calc(var(--post-device-border-width-default)*-1) 0 calc(var(--post-device-border-width-default)*-1);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)::before{outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus)::before{outline-style:var(--post-core-border-style-solid) !important;display:block;content:\"\";position:absolute;inset:calc(var(--post-device-border-width-default)*-1) 0 calc(var(--post-device-border-width-default)*-1);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)::before{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:var(--post-device-spacing-padding-19);padding-block-end:var(--post-device-spacing-padding-19)}.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}}post-collapsible{margin-block-end:calc(var(--post-device-border-width-default)*-1)}.accordion-body{padding-block-start:var(--post-device-spacing-padding-15);padding-block-end:var(--post-device-spacing-padding-block-25);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}";
|
|
12
|
+
|
|
13
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
14
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
16
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
else
|
|
18
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
19
|
+
if (d = decorators[i])
|
|
20
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
const PostAccordionItem = /*@__PURE__*/ proxyCustomElement(class PostAccordionItem extends H {
|
|
24
|
+
constructor() {
|
|
25
|
+
super();
|
|
26
|
+
this.__registerHost();
|
|
27
|
+
this.__attachShadow();
|
|
28
|
+
/**
|
|
29
|
+
* If `true`, the element is collapsed otherwise it is displayed.
|
|
30
|
+
*/
|
|
31
|
+
this.collapsed = false;
|
|
32
|
+
}
|
|
33
|
+
validateHeadingLevel() {
|
|
34
|
+
checkEmptyOrOneOf(this, 'headingLevel', HEADING_LEVELS);
|
|
35
|
+
}
|
|
36
|
+
componentWillLoad() {
|
|
37
|
+
this.id = this.host.id || `p${nanoid(6)}`;
|
|
38
|
+
}
|
|
39
|
+
componentDidLoad() {
|
|
40
|
+
this.validateHeadingLevel();
|
|
41
|
+
}
|
|
42
|
+
// Capture to make sure the "collapsed" property is updated before the event is consumed
|
|
43
|
+
onCollapseToggle(event) {
|
|
44
|
+
this.collapsed = !event.detail;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Triggers the collapse programmatically.
|
|
48
|
+
*/
|
|
49
|
+
async toggle(force) {
|
|
50
|
+
return this.collapsible.toggle(force);
|
|
51
|
+
}
|
|
52
|
+
onSlotLogoChange() {
|
|
53
|
+
this.slottedLogo = this.host.querySelector('img[slot="logo"]');
|
|
54
|
+
}
|
|
55
|
+
componentWillRender() {
|
|
56
|
+
this.slottedLogo = this.host.querySelector('img[slot="logo"]');
|
|
57
|
+
}
|
|
58
|
+
render() {
|
|
59
|
+
const headingLevel = this.host.closest('post-accordion')?.getAttribute('heading-level');
|
|
60
|
+
const HeadingTag = `h${headingLevel ?? this.headingLevel ?? 2}`;
|
|
61
|
+
return (h(Host, { key: '03e6974f6d2f02e0d9240c84516f6538a2a96c9a', id: this.id, "data-version": version }, h("post-collapsible-trigger", { key: 'de3fe01f5fdc4394d6ba0163313850a60b0134ec', for: `${this.id}--collapse` }, h(HeadingTag, { key: 'abc8ccd196030b90f800ffca0075f0a99a70229d', class: "accordion-header", id: `${this.id}--header` }, h("button", { key: '422fb7f22228706ca0d07f07241ec72fab6387b7', type: "button", class: `accordion-button${this.collapsed ? ' collapsed' : ''}`, part: "post-accordion-button" }, h("span", { key: '1b2bec5bf36707656ac92f65f99d2e1c5f1d44c3', class: {
|
|
62
|
+
'logo-container': true,
|
|
63
|
+
'has-image': !!this.slottedLogo,
|
|
64
|
+
} }, h("slot", { key: '717d1393ab1277a0f141c7a978585d288ab9359b', name: "logo", onSlotchange: this.onSlotLogoChange.bind(this) })), h("slot", { key: '6c7f506f051b96f07991cd4c56c884527e736eb5', name: "header" }), h("post-icon", { key: 'e77b71473bcf619b1083dfea8b87d219489f774e', name: "chevronup" })))), h("post-collapsible", { key: '020481b62323ea8719cd8289c6b402611a83944b', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, h("div", { key: '99bdc90c6a557958d1ecb73860b9f6c904165496', class: "accordion-body", part: "post-accordion-body" }, h("slot", { key: '0a10be7f2b7fb61614fec92a5306372ada0dcf62' })))));
|
|
65
|
+
}
|
|
66
|
+
get host() { return this; }
|
|
67
|
+
static get watchers() { return {
|
|
68
|
+
"headingLevel": ["validateHeadingLevel"]
|
|
69
|
+
}; }
|
|
70
|
+
static get style() { return postAccordionItemCss; }
|
|
71
|
+
}, [1, "post-accordion-item", {
|
|
72
|
+
"collapsed": [1028],
|
|
73
|
+
"headingLevel": [2, "heading-level"],
|
|
74
|
+
"id": [32],
|
|
75
|
+
"slottedLogo": [32],
|
|
76
|
+
"toggle": [64]
|
|
77
|
+
}, [[2, "postToggle", "onCollapseToggle"]], {
|
|
78
|
+
"headingLevel": ["validateHeadingLevel"]
|
|
79
|
+
}]);
|
|
80
|
+
__decorate([
|
|
81
|
+
EventFrom('post-accordion-item')
|
|
82
|
+
], PostAccordionItem.prototype, "onCollapseToggle", null);
|
|
83
|
+
function defineCustomElement() {
|
|
84
|
+
if (typeof customElements === "undefined") {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const components = ["post-accordion-item", "post-collapsible", "post-collapsible-trigger", "post-icon"];
|
|
88
|
+
components.forEach(tagName => { switch (tagName) {
|
|
89
|
+
case "post-accordion-item":
|
|
90
|
+
if (!customElements.get(tagName)) {
|
|
91
|
+
customElements.define(tagName, PostAccordionItem);
|
|
92
|
+
}
|
|
93
|
+
break;
|
|
94
|
+
case "post-collapsible":
|
|
95
|
+
if (!customElements.get(tagName)) {
|
|
96
|
+
defineCustomElement$3();
|
|
97
|
+
}
|
|
98
|
+
break;
|
|
99
|
+
case "post-collapsible-trigger":
|
|
100
|
+
if (!customElements.get(tagName)) {
|
|
101
|
+
defineCustomElement$2();
|
|
102
|
+
}
|
|
103
|
+
break;
|
|
104
|
+
case "post-icon":
|
|
105
|
+
if (!customElements.get(tagName)) {
|
|
106
|
+
defineCustomElement$1();
|
|
107
|
+
}
|
|
108
|
+
break;
|
|
109
|
+
} });
|
|
110
|
+
}
|
|
111
|
+
defineCustomElement();
|
|
112
|
+
|
|
113
|
+
export { PostAccordionItem as P, defineCustomElement as d };
|
|
@@ -58,7 +58,7 @@ function EventFrom(tag, option) {
|
|
|
58
58
|
// Create hidden storage for original method
|
|
59
59
|
Object.defineProperty(target, privateKey, {
|
|
60
60
|
writable: true,
|
|
61
|
-
configurable: true
|
|
61
|
+
configurable: true,
|
|
62
62
|
});
|
|
63
63
|
// Replace property with getter/setter
|
|
64
64
|
Object.defineProperty(target, propertyKey, {
|
|
@@ -82,7 +82,7 @@ function EventFrom(tag, option) {
|
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
84
|
configurable: true,
|
|
85
|
-
enumerable: true
|
|
85
|
+
enumerable: true,
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PostAccordionItem$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { P as PostAccordionItem$1, d as defineCustomElement$1 } from './p-c6yNOQwn.js';
|
|
2
2
|
|
|
3
3
|
const PostAccordionItem = PostAccordionItem$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
3
|
-
import { c as checkRequiredAndType, e as checkEmptyOrType,
|
|
4
|
-
import './p-CJ80BZ06.js';
|
|
2
|
+
import { v as version } from './p-DZ5m2Ttg.js';
|
|
3
|
+
import { c as checkRequiredAndType, e as checkEmptyOrType, i as checkEmptyOrPattern } from './p-B8YiQ3mz.js';
|
|
5
4
|
|
|
6
5
|
// https://docs.gravatar.com/api/avatars/images/
|
|
7
6
|
const GRAVATAR_DEFAULT = '404';
|
|
@@ -166,7 +165,7 @@ const PostAvatar$1 = /*@__PURE__*/ proxyCustomElement(class PostAvatar extends H
|
|
|
166
165
|
.join('')
|
|
167
166
|
.trim();
|
|
168
167
|
const fullname = names.join(' ');
|
|
169
|
-
return (h(Host, { key: '
|
|
168
|
+
return (h(Host, { key: '620b361e23a70143903abd7bf10bcd804f959042', "data-version": version }, h("span", { key: 'cc3752d89187f0c08dedf2952676de1aaaa59a8a', class: this.avatarType === 'slotted' ? '' : 'd-none' }, h("slot", { key: 'dbba7fc0522b177f6ad467f0e22dad9065582ce7', onSlotchange: this.slotChanged.bind(this) })), this.avatarType === 'image' && h("img", { key: '375eeeab749e09bc21d215aa80cf45309a15620e', src: this.imageUrl, alt: this.imageAlt }), this.avatarType === 'initials' && (h("span", { key: '620d25537ef0f606933e9c7deb915a87fbc4b95c', class: "initials" }, initials, h("span", { key: '03dc6aacddc2af35c114fc6815550e0ec461937d' }, this.description ?? fullname)))));
|
|
170
169
|
}
|
|
171
170
|
get host() { return this; }
|
|
172
171
|
static get watchers() { return {
|
|
@@ -1,34 +1,8 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import './p-
|
|
5
|
-
import { d as defineCustomElement$2 } from './p-
|
|
6
|
-
|
|
7
|
-
// Define common animation options
|
|
8
|
-
const easing = 'ease';
|
|
9
|
-
const defaultDuration = 500;
|
|
10
|
-
const fill = 'forwards';
|
|
11
|
-
function createSlideFadeAnimation(el, keyframes, duration = defaultDuration) {
|
|
12
|
-
return el.animate(keyframes, {
|
|
13
|
-
duration: duration,
|
|
14
|
-
easing,
|
|
15
|
-
fill,
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function slideUpAndFadeOut(el, translateY = '-100%', duration = defaultDuration) {
|
|
19
|
-
const keyframes = [
|
|
20
|
-
{ transform: 'translateY(0)', opacity: '1' },
|
|
21
|
-
{ transform: `translateY(${translateY})`, opacity: '0' },
|
|
22
|
-
];
|
|
23
|
-
return createSlideFadeAnimation(el, keyframes, duration);
|
|
24
|
-
}
|
|
25
|
-
function slideDownAndFadeIn(el, translateY = '-100%', duration = defaultDuration) {
|
|
26
|
-
const keyframes = [
|
|
27
|
-
{ transform: `translateY(${translateY})`, opacity: '0' },
|
|
28
|
-
{ transform: 'translateY(0)', opacity: '1' },
|
|
29
|
-
];
|
|
30
|
-
return createSlideFadeAnimation(el, keyframes, duration);
|
|
31
|
-
}
|
|
2
|
+
import { f as fadeSlide } from './p-BVCjnh6Q.js';
|
|
3
|
+
import { v as version } from './p-DZ5m2Ttg.js';
|
|
4
|
+
import { c as checkRequiredAndType } from './p-B8YiQ3mz.js';
|
|
5
|
+
import { d as defineCustomElement$2 } from './p-BOLlAY91.js';
|
|
32
6
|
|
|
33
7
|
const postBackToTopCss = ":host{opacity:0;--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}";
|
|
34
8
|
|
|
@@ -45,16 +19,16 @@ const PostBackToTop$1 = /*@__PURE__*/ proxyCustomElement(class PostBackToTop ext
|
|
|
45
19
|
isBelowFold() {
|
|
46
20
|
return window.scrollY > window.innerHeight;
|
|
47
21
|
}
|
|
48
|
-
|
|
49
|
-
checkRequiredAndType(this, '
|
|
22
|
+
validateTextBackToTop() {
|
|
23
|
+
checkRequiredAndType(this, 'textBackToTop', 'string');
|
|
50
24
|
}
|
|
51
25
|
/*Watch for changes in belowFold to show/hide the back to top button*/
|
|
52
26
|
watchBelowFold(newValue) {
|
|
53
27
|
if (newValue) {
|
|
54
|
-
|
|
28
|
+
fadeSlide(this.host, 'in', { translate: this.translateY, fill: 'forwards' });
|
|
55
29
|
}
|
|
56
30
|
else {
|
|
57
|
-
|
|
31
|
+
fadeSlide(this.host, 'out', { translate: this.translateY, fill: 'forwards' });
|
|
58
32
|
}
|
|
59
33
|
}
|
|
60
34
|
scrollToTop() {
|
|
@@ -81,11 +55,11 @@ const PostBackToTop$1 = /*@__PURE__*/ proxyCustomElement(class PostBackToTop ext
|
|
|
81
55
|
const elevationHeight = this.getSecondPixelValue(elevationParts);
|
|
82
56
|
// The translateY is calculated as => -100% (btt button height) - topPosition - elevationHeight
|
|
83
57
|
this.translateY =
|
|
84
|
-
|
|
58
|
+
(-1 * 100) / 100 -
|
|
85
59
|
parseFloat(positionTop.replace('px', '')) -
|
|
86
|
-
parseFloat(elevationHeight.replace('px', ''))
|
|
60
|
+
parseFloat(elevationHeight.replace('px', ''));
|
|
87
61
|
if (this.belowFold) {
|
|
88
|
-
|
|
62
|
+
fadeSlide(this.host, 'in', { translate: this.translateY, fill: 'forwards' });
|
|
89
63
|
}
|
|
90
64
|
if (!this.belowFold) {
|
|
91
65
|
this.host.style.transform = `translateY(${this.translateY})`;
|
|
@@ -98,25 +72,25 @@ const PostBackToTop$1 = /*@__PURE__*/ proxyCustomElement(class PostBackToTop ext
|
|
|
98
72
|
componentDidLoad() {
|
|
99
73
|
window.addEventListener('scroll', this.handleScroll, false);
|
|
100
74
|
this.animateButton();
|
|
101
|
-
this.
|
|
75
|
+
this.validateTextBackToTop();
|
|
102
76
|
}
|
|
103
77
|
disconnectedCallback() {
|
|
104
78
|
window.removeEventListener('scroll', this.handleScroll);
|
|
105
79
|
}
|
|
106
80
|
render() {
|
|
107
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: 'a6a5afe41d76c9b2b703f4a78e63849a1437680f', "data-version": version }, h("button", { key: 'ad10b46cf4d07d1efffae6feef7431ba8a11c59e', class: "back-to-top", "aria-hidden": this.belowFold ? 'false' : 'true', tabindex: this.belowFold ? '0' : '-1', onClick: this.scrollToTop }, h("post-icon", { key: 'e95c5710939aa968df42f3acec2d56b2eaaa238e', "aria-hidden": "true", name: "arrowup" }), h("span", { key: 'f854524e0b76f71ef1edfed5a13d57985ac98ea5', class: "visually-hidden" }, this.textBackToTop))));
|
|
108
82
|
}
|
|
109
83
|
get host() { return this; }
|
|
110
84
|
static get watchers() { return {
|
|
111
|
-
"
|
|
85
|
+
"textBackToTop": ["validateTextBackToTop"],
|
|
112
86
|
"belowFold": ["watchBelowFold"]
|
|
113
87
|
}; }
|
|
114
88
|
static get style() { return postBackToTopCss; }
|
|
115
89
|
}, [1, "post-back-to-top", {
|
|
116
|
-
"
|
|
90
|
+
"textBackToTop": [513, "text-back-to-top"],
|
|
117
91
|
"belowFold": [32]
|
|
118
92
|
}, undefined, {
|
|
119
|
-
"
|
|
93
|
+
"textBackToTop": ["validateTextBackToTop"],
|
|
120
94
|
"belowFold": ["watchBelowFold"]
|
|
121
95
|
}]);
|
|
122
96
|
function defineCustomElement$1() {
|