@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, h, a as Host } from './index.js';
|
|
2
|
-
import { I as IS_BROWSER } from './p-
|
|
3
|
-
import { d as checkEmptyOrOneOf, e as checkEmptyOrType, c as checkRequiredAndType } 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, c as checkRequiredAndType } from './p-B8YiQ3mz.js';
|
|
4
|
+
import { v as version } from './p-DZ5m2Ttg.js';
|
|
5
5
|
|
|
6
6
|
const postIconCss = ":host{display:inline-block;width:1em;height:1em;vertical-align:-0.15em}span{display:block;width:100%;height:100%;fill:currentColor;forced-color-adjust:preserve-parent-color;background-color:currentColor;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}:host([flip-h]:not([flip-h=false])){scale:-1 1}:host([flip-v]:not([flip-v=false])){scale:1 -1}:host([flip-h][flip-v]:not([flip-h=false],[flip-v=false])){scale:-1}:host([animation]){transform-origin:center}:host([animation=cylon]){animation:icon-animation-cylon .75s ease-in-out infinite alternate}:host([animation=cylon-vertical]){animation:icon-animation-cylon-vertical .75s ease-in-out infinite alternate}:host([animation=spin]){animation:icon-animation-spin 2s linear infinite normal}:host([animation=spin-reverse]){animation:icon-animation-spin 2s linear infinite reverse}:host([animation=fade]){animation:icon-animation-fade .75s ease-in-out infinite alternate}:host([animation=throb]){animation:icon-animation-throb .75s ease-in-out infinite alternate}@keyframes icon-animation-cylon{from{transform:translateX(-25%)}to{transform:translateX(25%)}}@keyframes icon-animation-cylon-vertical{from{transform:translateY(25%)}to{transform:translateY(-25%)}}@keyframes icon-animation-fade{from{opacity:.1}to{opacity:1}}@keyframes icon-animation-spin{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes icon-animation-throb{from{opacity:.5;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}";
|
|
7
7
|
|
|
@@ -67,9 +67,11 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends H {
|
|
|
67
67
|
const baseHref = IS_BROWSER
|
|
68
68
|
? document.querySelector('base[href]')?.getAttribute('href') || ''
|
|
69
69
|
: '';
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
let metaIconBase = '';
|
|
71
|
+
if (IS_BROWSER) {
|
|
72
|
+
const metaTag = document.querySelector('meta[name="design-system-settings"]');
|
|
73
|
+
metaIconBase = metaTag?.getAttribute('data-post-icon-base') || '';
|
|
74
|
+
}
|
|
73
75
|
// Function to build the first part of the URL when 'this.base' or 'metaIconBase' are relative
|
|
74
76
|
const buildUrlWithBase = (relativeUrl) => {
|
|
75
77
|
const normalizedHref = normalizeUrl(baseHref);
|
|
@@ -116,7 +118,7 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends H {
|
|
|
116
118
|
this.validateAnimation();
|
|
117
119
|
}
|
|
118
120
|
render() {
|
|
119
|
-
return (h(Host, { key: '
|
|
121
|
+
return (h(Host, { key: '6469b748f2792c383593dacd1d9f1f17daf9cde0', "data-version": version }, h("span", { key: '9f4d9766dc97a07a2562dbc3bb0931de29fe9757', style: this.getStyles() })));
|
|
120
122
|
}
|
|
121
123
|
get host() { return this; }
|
|
122
124
|
static get watchers() { return {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { r as resolveEasing } from './p-CoDiS_Ik.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Used by
|
|
5
|
+
* 1. PostHeader (burger menu)
|
|
6
|
+
* 2. PostMegadropdown
|
|
7
|
+
* 3. BackToTopButton
|
|
8
|
+
*/
|
|
9
|
+
const defaultOptions = {
|
|
10
|
+
duration: 500,
|
|
11
|
+
easing: 'ease',
|
|
12
|
+
fill: 'none',
|
|
13
|
+
translate: -100,
|
|
14
|
+
};
|
|
15
|
+
function animateFadeSlide(el, keyframes, options) {
|
|
16
|
+
const { duration, easing, fill } = { ...defaultOptions, ...options };
|
|
17
|
+
return el.animate(keyframes, {
|
|
18
|
+
duration,
|
|
19
|
+
easing: resolveEasing(easing),
|
|
20
|
+
fill,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function fadeSlide(el, direction, options) {
|
|
24
|
+
if (!el)
|
|
25
|
+
return;
|
|
26
|
+
const mergedOptions = options;
|
|
27
|
+
const { translate } = mergedOptions;
|
|
28
|
+
const baseKeyframes = [
|
|
29
|
+
{ opacity: '0', transform: `translateY(${translate}px)` },
|
|
30
|
+
{ opacity: '1', transform: 'translateY(0px)' },
|
|
31
|
+
];
|
|
32
|
+
const keyframes = direction === 'in' ? baseKeyframes : [...baseKeyframes].reverse();
|
|
33
|
+
return animateFadeSlide(el, keyframes, options);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { fadeSlide as f };
|
|
@@ -1,9 +1,8 @@
|
|
|
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 } from './p-
|
|
4
|
-
import './p-
|
|
5
|
-
import {
|
|
6
|
-
import { g as getRoot } from './p-CBFgkSgY.js';
|
|
2
|
+
import { v as version } from './p-DZ5m2Ttg.js';
|
|
3
|
+
import { c as checkRequiredAndType } from './p-B8YiQ3mz.js';
|
|
4
|
+
import { E as EventFrom } from './p-rEfV4v4a.js';
|
|
5
|
+
import { g as getRoot } from './p-BVGcVycs.js';
|
|
7
6
|
|
|
8
7
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
9
8
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -104,7 +103,7 @@ const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollap
|
|
|
104
103
|
this.updateAriaAttributes();
|
|
105
104
|
}
|
|
106
105
|
render() {
|
|
107
|
-
return (h(Host, { key: '
|
|
106
|
+
return (h(Host, { key: 'f5055d5970eb900d345957f306c9a373680f257a', "data-version": version }, h("slot", { key: 'cf63bdbca00602b9c4e2a81f28723bd274561045' })));
|
|
108
107
|
}
|
|
109
108
|
get host() { return this; }
|
|
110
109
|
static get watchers() { return {
|
|
@@ -27,32 +27,40 @@ function getFocusableChildren(element) {
|
|
|
27
27
|
const focusableChildren = element.querySelectorAll(`${focusableSelector}:not(${focusDisablingSelector})`);
|
|
28
28
|
return Array.from(focusableChildren).filter(isVisible);
|
|
29
29
|
}
|
|
30
|
-
// Searches deeper
|
|
31
|
-
function getDeepFocusableChildren(
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
// Searches deeper across shadow DOM
|
|
31
|
+
function getDeepFocusableChildren(el, filter, visited = new Set()) {
|
|
32
|
+
if (visited.has(el))
|
|
33
|
+
return [];
|
|
34
|
+
visited.add(el);
|
|
35
|
+
let nodes = [];
|
|
36
|
+
// SLOT
|
|
37
|
+
if (el instanceof HTMLSlotElement) {
|
|
38
|
+
const assigned = el.assignedElements({ flatten: true });
|
|
39
|
+
nodes = assigned.length ? assigned : Array.from(el.children);
|
|
40
|
+
}
|
|
41
|
+
// SHADOW ROOT
|
|
42
|
+
else if (el instanceof HTMLElement && el.shadowRoot) {
|
|
43
|
+
nodes = Array.from(el.shadowRoot.children);
|
|
44
|
+
}
|
|
45
|
+
// NORMAL ELEMENT
|
|
46
|
+
else if (el instanceof Element) {
|
|
47
|
+
nodes = Array.from(el.children);
|
|
48
|
+
}
|
|
49
|
+
if (filter) {
|
|
50
|
+
nodes = nodes.filter(filter);
|
|
51
|
+
}
|
|
52
|
+
const focusableElements = [];
|
|
53
|
+
for (const node of nodes) {
|
|
34
54
|
if (isElementFocusable(node)) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (node instanceof HTMLElement && node.shadowRoot) {
|
|
38
|
-
traverse(node.shadowRoot);
|
|
39
|
-
}
|
|
40
|
-
for (const child of Array.from(node.children)) {
|
|
41
|
-
traverse(child);
|
|
42
|
-
}
|
|
43
|
-
if (node instanceof HTMLElement) {
|
|
44
|
-
for (const slot of Array.from(node.querySelectorAll('slot'))) {
|
|
45
|
-
for (const el of slot.assignedElements({ flatten: true })) {
|
|
46
|
-
traverse(el);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
55
|
+
focusableElements.push(node);
|
|
56
|
+
continue;
|
|
49
57
|
}
|
|
58
|
+
focusableElements.push(...getDeepFocusableChildren(node, filter, visited));
|
|
50
59
|
}
|
|
51
|
-
|
|
52
|
-
return results;
|
|
60
|
+
return focusableElements;
|
|
53
61
|
}
|
|
54
62
|
function isVisible(el) {
|
|
55
|
-
const style = window.getComputedStyle(el
|
|
63
|
+
const style = window.getComputedStyle(el);
|
|
56
64
|
return style.display !== 'none' && style.visibility !== 'hidden';
|
|
57
65
|
}
|
|
58
66
|
function isElementFocusable(node) {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
|
-
import { a as PLACEMENT_TYPES, d as defineCustomElement$1 } from './p-
|
|
3
|
-
import { v as version } from './p-
|
|
4
|
-
import { g as getFocusableChildren } from './p-
|
|
5
|
-
import { d as checkEmptyOrOneOf, c as checkRequiredAndType } from './p-
|
|
6
|
-
import './p-
|
|
7
|
-
import {
|
|
8
|
-
import { g as getRoot } from './p-CBFgkSgY.js';
|
|
2
|
+
import { a as PLACEMENT_TYPES, d as defineCustomElement$1 } from './p-QNPIvxLq.js';
|
|
3
|
+
import { v as version } from './p-DZ5m2Ttg.js';
|
|
4
|
+
import { g as getFocusableChildren } from './p-CJ13r5fi.js';
|
|
5
|
+
import { d as checkEmptyOrOneOf, c as checkRequiredAndType } from './p-B8YiQ3mz.js';
|
|
6
|
+
import { E as EventFrom } from './p-rEfV4v4a.js';
|
|
7
|
+
import { g as getRoot } from './p-BVGcVycs.js';
|
|
9
8
|
|
|
10
|
-
const postMenuCss = ":host{display:block}:where([part=menu]){display:flex;flex-direction:column;padding-block:.5rem}::slotted([slot=header]){margin-top:-0.5rem;padding:1rem;display:flex;align-items:center;gap:.5rem;border-block-end:1px solid #050400;font-weight:700}@media screen and (max-width: 1023.98px){::slotted([slot=header]){padding:.75rem 1rem}}@media screen and (max-width: 779.98px){::slotted([slot=header]){padding:.5rem 1rem}}";
|
|
9
|
+
const postMenuCss = ":host{display:block}:where([part=post-menu]){display:flex;flex-direction:column;padding-block:.5rem}::slotted([slot=header]){margin-top:-0.5rem;padding:1rem;display:flex;align-items:center;gap:.5rem;border-block-end:1px solid #050400;font-weight:700}@media screen and (max-width: 1023.98px){::slotted([slot=header]){padding:.75rem 1rem}}@media screen and (max-width: 779.98px){::slotted([slot=header]){padding:.5rem 1rem}}";
|
|
11
10
|
|
|
12
11
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
13
12
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -58,35 +57,6 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
58
57
|
this.controlKeyDownHandler(e);
|
|
59
58
|
}
|
|
60
59
|
};
|
|
61
|
-
this.handlePostShown = (event) => {
|
|
62
|
-
// Only for the first open
|
|
63
|
-
if (event.detail.first) {
|
|
64
|
-
// Add "menu" and "menuitem" aria roles and aria-label
|
|
65
|
-
this.host.setAttribute('role', 'menu');
|
|
66
|
-
const menuItems = this.getSlottedItems();
|
|
67
|
-
for (const item of menuItems) {
|
|
68
|
-
item.setAttribute('role', 'menuitem');
|
|
69
|
-
}
|
|
70
|
-
if (this.label)
|
|
71
|
-
this.host.setAttribute('aria-label', this.label);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
this.handlePostToggled = (event) => {
|
|
75
|
-
this.isVisible = event.detail.isOpen;
|
|
76
|
-
this.toggleMenu.emit(this.isVisible);
|
|
77
|
-
if (this.isVisible) {
|
|
78
|
-
this.lastFocusedElement = this.root?.activeElement;
|
|
79
|
-
requestAnimationFrame(() => {
|
|
80
|
-
const menuItems = this.getSlottedItems();
|
|
81
|
-
if (menuItems.length > 0) {
|
|
82
|
-
menuItems[0].focus();
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
else if (this.lastFocusedElement) {
|
|
87
|
-
this.lastFocusedElement.focus();
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
60
|
this.handleClick = (e) => {
|
|
91
61
|
const target = e.target;
|
|
92
62
|
if (['BUTTON', 'A', 'INPUT', 'SELECT', 'TEXTAREA'].includes(target.tagName)) {
|
|
@@ -148,6 +118,35 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
148
118
|
console.error('hide: popoverRef is null or undefined');
|
|
149
119
|
}
|
|
150
120
|
}
|
|
121
|
+
handlePostShown(event) {
|
|
122
|
+
// Only for the first open
|
|
123
|
+
if (event.detail.first) {
|
|
124
|
+
// Add "menu" and "menuitem" aria roles and aria-label
|
|
125
|
+
this.host.setAttribute('role', 'menu');
|
|
126
|
+
const menuItems = this.getSlottedItems();
|
|
127
|
+
for (const item of menuItems) {
|
|
128
|
+
item.setAttribute('role', 'menuitem');
|
|
129
|
+
}
|
|
130
|
+
if (this.label)
|
|
131
|
+
this.host.setAttribute('aria-label', this.label);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
handlePostToggled(event) {
|
|
135
|
+
this.isVisible = event.detail.isOpen;
|
|
136
|
+
this.toggleMenu.emit(this.isVisible);
|
|
137
|
+
if (this.isVisible) {
|
|
138
|
+
this.lastFocusedElement = this.root?.activeElement;
|
|
139
|
+
requestAnimationFrame(() => {
|
|
140
|
+
const menuItems = this.getSlottedItems();
|
|
141
|
+
if (menuItems.length > 0) {
|
|
142
|
+
menuItems[0].focus();
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
else if (this.lastFocusedElement) {
|
|
147
|
+
this.lastFocusedElement.focus();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
151
150
|
controlKeyDownHandler(e) {
|
|
152
151
|
const menuItems = this.getSlottedItems();
|
|
153
152
|
if (!menuItems.length) {
|
|
@@ -195,7 +194,7 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
195
194
|
.flatMap(el => Array.from(getFocusableChildren(el))));
|
|
196
195
|
}
|
|
197
196
|
render() {
|
|
198
|
-
return (h(Host, { key: '
|
|
197
|
+
return (h(Host, { key: '08285b17608e5bc3133a3da6015a5a0d4de6ec29', "data-version": version }, h("post-popovercontainer", { key: '17e45869b5e76cdd9bd43ca77b2f0b3876462014', onPostShow: this.handlePostShown.bind(this), onPostToggle: this.handlePostToggled.bind(this), placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: 'e2486aa099ffc8ac59885a0971ebb13649a49a35', part: "post-menu" }, h("slot", { key: '9f0e05f211fe18cf5beed8e1b33bde26d4974e24', name: "header" }), h("slot", { key: '971ac8ad433467a2ebe2429574cb10dbdadbcf25' })))));
|
|
199
198
|
}
|
|
200
199
|
get host() { return this; }
|
|
201
200
|
static get watchers() { return {
|
|
@@ -216,10 +215,10 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
216
215
|
}]);
|
|
217
216
|
__decorate([
|
|
218
217
|
EventFrom('post-popovercontainer')
|
|
219
|
-
], PostMenu.prototype, "handlePostShown",
|
|
218
|
+
], PostMenu.prototype, "handlePostShown", null);
|
|
220
219
|
__decorate([
|
|
221
220
|
EventFrom('post-popovercontainer')
|
|
222
|
-
], PostMenu.prototype, "handlePostToggled",
|
|
221
|
+
], PostMenu.prototype, "handlePostToggled", null);
|
|
223
222
|
function defineCustomElement() {
|
|
224
223
|
if (typeof customElements === "undefined") {
|
|
225
224
|
return;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const headerEase = {
|
|
2
|
+
x1: 0.8,
|
|
3
|
+
y1: 0.2,
|
|
4
|
+
x2: 0.8,
|
|
5
|
+
y2: 0.7,
|
|
6
|
+
};
|
|
7
|
+
const PRESET_MAP = {
|
|
8
|
+
'linear': 'linear',
|
|
9
|
+
'ease': 'ease',
|
|
10
|
+
'ease-in': 'ease-in',
|
|
11
|
+
'ease-out': 'ease-out',
|
|
12
|
+
'ease-in-out': 'ease-in-out',
|
|
13
|
+
'headerEase': headerEase,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
function resolveEasing(easing) {
|
|
17
|
+
const e = typeof easing === 'string' ? (PRESET_MAP[easing] ?? easing) : easing;
|
|
18
|
+
if (typeof e === 'string')
|
|
19
|
+
return e;
|
|
20
|
+
const { x1, y1, x2, y2 } = e;
|
|
21
|
+
return `cubic-bezier(${x1}, ${y1}, ${x2}, ${y2})`;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { resolveEasing as r };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
+
import { v as version } from './p-DZ5m2Ttg.js';
|
|
3
|
+
|
|
4
|
+
const postTogglebuttonCss = ":host{cursor:pointer;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(:focus-visible){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:focus-visible){outline-color:Highlight !important}}:host([aria-pressed=true]) ::slotted([data-showwhen=untoggled]){display:none}:host([aria-pressed=false]) ::slotted([data-showwhen=toggled]){display:none}";
|
|
5
|
+
|
|
6
|
+
const PostTogglebutton = /*@__PURE__*/ proxyCustomElement(class PostTogglebutton extends H {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
/**
|
|
12
|
+
* If `true`, the button is in the "on" state, otherwise it is in the "off" state.
|
|
13
|
+
*/
|
|
14
|
+
this.toggled = false;
|
|
15
|
+
this.handleClick = () => {
|
|
16
|
+
this.toggled = !this.toggled;
|
|
17
|
+
};
|
|
18
|
+
this.handleKeydown = (event) => {
|
|
19
|
+
// perform a click when enter or spaced are pressed to mimic the button behavior
|
|
20
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
21
|
+
event.preventDefault(); // prevents the page from scrolling when space is pressed
|
|
22
|
+
this.host.click();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
componentWillLoad() {
|
|
27
|
+
// add event listener to not override listener that might be set on the host
|
|
28
|
+
this.host.addEventListener('click', () => this.handleClick());
|
|
29
|
+
this.host.addEventListener('keydown', (e) => this.handleKeydown(e));
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
return (h(Host, { key: 'a526ab3b0ae14c93bb4e1a8dc6d3ded4ff1bf014', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: 'e8a5bdd99d9270cfcf014306a8d7fe8a2b6b79ba' })));
|
|
33
|
+
}
|
|
34
|
+
get host() { return this; }
|
|
35
|
+
static get style() { return postTogglebuttonCss; }
|
|
36
|
+
}, [1, "post-togglebutton", {
|
|
37
|
+
"toggled": [1028]
|
|
38
|
+
}]);
|
|
39
|
+
function defineCustomElement() {
|
|
40
|
+
if (typeof customElements === "undefined") {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const components = ["post-togglebutton"];
|
|
44
|
+
components.forEach(tagName => { switch (tagName) {
|
|
45
|
+
case "post-togglebutton":
|
|
46
|
+
if (!customElements.get(tagName)) {
|
|
47
|
+
customElements.define(tagName, PostTogglebutton);
|
|
48
|
+
}
|
|
49
|
+
break;
|
|
50
|
+
} });
|
|
51
|
+
}
|
|
52
|
+
defineCustomElement();
|
|
53
|
+
|
|
54
|
+
export { PostTogglebutton as P, defineCustomElement as d };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { r as resolveEasing } from './p-CoDiS_Ik.js';
|
|
2
|
+
|
|
3
|
+
const defaultOptions = {
|
|
4
|
+
duration: 200,
|
|
5
|
+
easing: 'linear',
|
|
6
|
+
fill: 'forwards',
|
|
7
|
+
};
|
|
8
|
+
function animateFade(el, keyframes, options = {}) {
|
|
9
|
+
const { duration, easing, fill } = { ...defaultOptions, ...options };
|
|
10
|
+
return el.animate(keyframes, {
|
|
11
|
+
duration,
|
|
12
|
+
easing: resolveEasing(easing),
|
|
13
|
+
fill,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function fade(el, direction, options = {}) {
|
|
17
|
+
if (!el)
|
|
18
|
+
return;
|
|
19
|
+
const baseKeyframes = [{ opacity: '0' }, { opacity: '1' }];
|
|
20
|
+
const keyframes = direction === 'in' ? baseKeyframes : [...baseKeyframes].reverse();
|
|
21
|
+
return animateFade(el, keyframes, options);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { fade as f };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
3
|
-
import { a as checkEmptyOrUrl } 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 { a as checkEmptyOrUrl } from './p-B8YiQ3mz.js';
|
|
4
|
+
import { d as defineCustomElement$1 } from './p-BOLlAY91.js';
|
|
6
5
|
|
|
7
6
|
const postBreadcrumbItemCss = ":host{display:flex;align-items:center;justify-content:start;gap:var(--post-device-spacing-gap-inline-5)}:host post-icon{box-sizing:border-box;height:var(--post-core-dimension-24);width:var(--post-core-dimension-24);padding-block:var(--post-core-dimension-4);padding-inline:var(--post-core-dimension-4)}.breadcrumb-item{white-space:nowrap;line-height:150%;padding-block:var(--post-device-spacing-padding-block-7);color:var(--post-scheme-color-interactive-primary-enabled-fg1);text-decoration:var(--post-core-text-decoration-none)}.breadcrumb-item{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.breadcrumb-item:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.breadcrumb-item:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.breadcrumb-item:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item:focus-visible{border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item,.breadcrumb-item:focus,.breadcrumb-item:hover{color:LinkText !important}.breadcrumb-item:visited{color:VisitedText !important}}";
|
|
8
7
|
|
|
@@ -44,7 +43,7 @@ const PostBreadcrumbItem = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumb
|
|
|
44
43
|
}
|
|
45
44
|
render() {
|
|
46
45
|
const BreadcrumbTag = this.validUrl ? 'a' : 'span';
|
|
47
|
-
return (h(Host, { key: '
|
|
46
|
+
return (h(Host, { key: 'ea3421ed24d2db8fc8c647eeafd04032996a4ae5', "data-version": version }, h("post-icon", { key: 'f2278fc5c68bbf509a44e53ec7f789d396bd75f1', name: "chevronright", class: "breadcrumb-item-icon" }), h(BreadcrumbTag, { key: '60d899795489fdbe9246fda24623289b5994af72', class: "breadcrumb-item", ...(this.validUrl ? { href: this.validUrl } : {}), onKeyDown: event => this.handleKeyDown(event) }, h("slot", { key: '7d87b12cba90f865ef02e1c66fd600703c00456e' }))));
|
|
48
47
|
}
|
|
49
48
|
get host() { return this; }
|
|
50
49
|
static get watchers() { return {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
3
|
-
import { I as IS_BROWSER } from './p-
|
|
4
|
-
import { e as checkEmptyOrType } from './p-
|
|
2
|
+
import { v as version } from './p-DZ5m2Ttg.js';
|
|
3
|
+
import { I as IS_BROWSER } from './p-FxUVQ4Tx.js';
|
|
4
|
+
import { e as checkEmptyOrType } from './p-B8YiQ3mz.js';
|
|
5
5
|
|
|
6
6
|
function isMotionReduced() {
|
|
7
|
-
return IS_BROWSER ? window.matchMedia('(prefers-reduced-motion: reduce)').matches :
|
|
7
|
+
return IS_BROWSER ? window.matchMedia('(prefers-reduced-motion: reduce)').matches : true;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
const collapseDuration = 350;
|
|
11
11
|
const collapseEasing = 'ease';
|
|
12
12
|
const collapsedKeyframe = { height: '0', overflow: 'hidden' };
|
|
13
13
|
const animationOptions = {
|
|
14
|
-
duration: collapseDuration,
|
|
14
|
+
duration: isMotionReduced() ? 0 : collapseDuration,
|
|
15
15
|
easing: collapseEasing,
|
|
16
16
|
fill: 'forwards',
|
|
17
17
|
};
|
|
@@ -34,8 +34,6 @@ const PostCollapsible = /*@__PURE__*/ proxyCustomElement(class PostCollapsible e
|
|
|
34
34
|
this.__registerHost();
|
|
35
35
|
this.__attachShadow();
|
|
36
36
|
this.postToggle = createEvent(this, "postToggle");
|
|
37
|
-
this.isLoaded = false;
|
|
38
|
-
this.isOpen = true;
|
|
39
37
|
/**
|
|
40
38
|
* If `true`, the element is collapsed otherwise it is displayed.
|
|
41
39
|
*/
|
|
@@ -43,34 +41,36 @@ const PostCollapsible = /*@__PURE__*/ proxyCustomElement(class PostCollapsible e
|
|
|
43
41
|
}
|
|
44
42
|
collapsedChange() {
|
|
45
43
|
checkEmptyOrType(this, 'collapsed', 'boolean');
|
|
46
|
-
|
|
44
|
+
}
|
|
45
|
+
get isExpanded() {
|
|
46
|
+
return !this.collapsed;
|
|
47
47
|
}
|
|
48
48
|
componentDidLoad() {
|
|
49
49
|
this.collapsedChange();
|
|
50
|
-
this.isLoaded = true;
|
|
51
50
|
this.updateTriggers();
|
|
52
51
|
}
|
|
53
52
|
/**
|
|
54
53
|
* Triggers the collapse programmatically.
|
|
55
|
-
*
|
|
56
54
|
* If there is a collapsing transition running already, it will be reversed.
|
|
55
|
+
* If no parameter is provided, the current state (this.isExpanded) will be toggled.
|
|
57
56
|
*/
|
|
58
|
-
async toggle(
|
|
59
|
-
if (
|
|
60
|
-
|
|
61
|
-
this.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (isHostRendered)
|
|
57
|
+
async toggle(shouldExpand = !this.isExpanded) {
|
|
58
|
+
// if the parameter (shouldExpand) is set during the call (e.g. `document.querySelector('post-collapsible').toggle(true)`)
|
|
59
|
+
// and it matches the current state, the current state is returned and the function exits early
|
|
60
|
+
if (shouldExpand === this.isExpanded)
|
|
61
|
+
return this.isExpanded;
|
|
62
|
+
// applying the new state to this.collapsed will also indirectly update this.isExpanded,
|
|
63
|
+
// due to its implementation with the getter, which returns !this.collapsed
|
|
64
|
+
this.collapsed = !shouldExpand;
|
|
65
|
+
const isExpanded = this.isExpanded;
|
|
66
|
+
if (IS_BROWSER) {
|
|
67
|
+
const animation = isExpanded ? expand(this.host) : collapse(this.host);
|
|
68
|
+
await animation.finished;
|
|
71
69
|
animation.commitStyles();
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
this.updateTriggers();
|
|
71
|
+
this.postToggle.emit(isExpanded);
|
|
72
|
+
}
|
|
73
|
+
return isExpanded;
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
76
|
* Update all post-collapsible-trigger elements referring to the collapsible
|
|
@@ -80,7 +80,7 @@ const PostCollapsible = /*@__PURE__*/ proxyCustomElement(class PostCollapsible e
|
|
|
80
80
|
triggers.forEach(trigger => trigger.update());
|
|
81
81
|
}
|
|
82
82
|
render() {
|
|
83
|
-
return (h(Host, { key: '
|
|
83
|
+
return (h(Host, { key: '06400647373d6c66398e6f81561ab2c60b748af1', "data-version": version, tabindex: this.collapsed ? -1 : undefined, style: this.collapsed ? collapsedKeyframe : undefined }, h("slot", { key: '63653d2d89b80b03c7f139b1370eaf18fe839409' })));
|
|
84
84
|
}
|
|
85
85
|
get host() { return this; }
|
|
86
86
|
static get watchers() { return {
|
|
@@ -1,8 +1,7 @@
|
|
|
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 } from './p-
|
|
4
|
-
import './p-
|
|
5
|
-
import { g as getRoot } from './p-CBFgkSgY.js';
|
|
2
|
+
import { v as version } from './p-DZ5m2Ttg.js';
|
|
3
|
+
import { c as checkRequiredAndType } from './p-B8YiQ3mz.js';
|
|
4
|
+
import { g as getRoot } from './p-BVGcVycs.js';
|
|
6
5
|
|
|
7
6
|
const postMenuTriggerCss = ":host{display:inline-block}";
|
|
8
7
|
|
|
@@ -80,7 +79,7 @@ const PostMenuTrigger = /*@__PURE__*/ proxyCustomElement(class PostMenuTrigger e
|
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
81
|
render() {
|
|
83
|
-
return (h(Host, { key: '
|
|
82
|
+
return (h(Host, { key: '3ef7e372c9c655bf1da5d5a7d4bca6925a010f65', "data-version": version, "tab-index": "-1" }, h("slot", { key: '771db943ad5aa639c325f055ba6f9d763bf4256d' })));
|
|
84
83
|
}
|
|
85
84
|
get host() { return this; }
|
|
86
85
|
static get watchers() { return {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment detection helper
|
|
3
|
+
*
|
|
4
|
+
* Goal: Distinguish between real browser execution and Stencil's server-side
|
|
5
|
+
* hydration context. During SSR/hydration Stencil provides a mocked `window`
|
|
6
|
+
* (Domino / JSDOM–like) so naive checks (e.g. `typeof window !== 'undefined'`)
|
|
7
|
+
* incorrectly classify the environment as a browser.
|
|
8
|
+
*
|
|
9
|
+
* Detection strategy:
|
|
10
|
+
* - Stencils hydrate context uses a hardcoded user agent string ('MockNavigator')
|
|
11
|
+
* and origin ('http://mockdoc.stenciljs.com') for its mocked `window` object.
|
|
12
|
+
* We can use this to identify the hydrate context.
|
|
13
|
+
* - Stencils unit test context also uses the same hardcoded user agent string,
|
|
14
|
+
* but a differnet value for the origin.
|
|
15
|
+
* That's why comparing the origin is aboslutely mandatory.
|
|
16
|
+
* - Since we test the hydrate app in the test context, the origin is getting
|
|
17
|
+
* overwritten by the test setup, leading to a false positive in the
|
|
18
|
+
* `isHydrateApp` detection.
|
|
19
|
+
* To circumvent this, we use a global flag (`isHydrateAppTestEnv`),
|
|
20
|
+
* that we set/reset during the server test, so we can correctly identify
|
|
21
|
+
* the hydrate app in the test context.
|
|
22
|
+
* As a drawback, we can't properly test if the hydrate app is detected as
|
|
23
|
+
* expected, in a real world scenario (elsewhere than in our tests).
|
|
24
|
+
*/
|
|
25
|
+
const MOCKED_USERAGENT = 'MockNavigator';
|
|
26
|
+
const MOCKED_ORIGIN = 'http://mockdoc.stenciljs.com';
|
|
27
|
+
const isNodeEnv = typeof global !== 'undefined';
|
|
28
|
+
const hasWindow = typeof window !== 'undefined';
|
|
29
|
+
const isMockedUserAgent = hasWindow && window.navigator.userAgent === MOCKED_USERAGENT;
|
|
30
|
+
const isMockedOrigin = hasWindow && window.location.origin === MOCKED_ORIGIN;
|
|
31
|
+
/**
|
|
32
|
+
* This is the natural hydrate app environment
|
|
33
|
+
* Is `true` if the hydrate app runs on server
|
|
34
|
+
*/
|
|
35
|
+
const isHydrateAppEnv = isNodeEnv && isMockedUserAgent && isMockedOrigin;
|
|
36
|
+
/**
|
|
37
|
+
* This is the test app server test env
|
|
38
|
+
* Is `true` if the server unit test runs (`false` if the browser unit test runs)
|
|
39
|
+
*/
|
|
40
|
+
const isTestAppServerTestEnv = isNodeEnv && isMockedUserAgent && global.IS_HYDRATEAPP_SERVERTEST;
|
|
41
|
+
/**
|
|
42
|
+
* This is the final hydrate app flag
|
|
43
|
+
* if it`s `true`, IS_BROWSER equals `false` and IS_SERVER equals `true
|
|
44
|
+
*/
|
|
45
|
+
const isHydrateApp = isHydrateAppEnv || isTestAppServerTestEnv;
|
|
46
|
+
const IS_BROWSER = hasWindow && !isHydrateApp;
|
|
47
|
+
const IS_SERVER = !IS_BROWSER;
|
|
48
|
+
|
|
49
|
+
export { IS_BROWSER as I, IS_SERVER as a };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-DZ5m2Ttg.js';
|
|
3
3
|
|
|
4
4
|
const postMenuItemCss = "post-menu-item button{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-menu-item button{background-color:ButtonFace !important}post-menu-item button:hover{background-color:Highlight !important}}post-menu-item a{text-decoration:none}post-menu-item button,post-menu-item a{position:relative;display:flex;width:100%;align-items:center;padding:.5rem .75rem .5rem 1rem;gap:.75rem;font-size:.875rem;color:#050400;border-radius:0}post-menu-item button post-icon,post-menu-item a post-icon{width:1rem;height:1rem;margin-block:.25rem}@media screen and (min-width: 780px){post-menu-item button,post-menu-item a{font-size:1rem;padding-block:.75rem;gap:1rem}post-menu-item button post-icon,post-menu-item a post-icon{width:1.5rem;height:1.5rem;margin:0}}@media screen and (min-width: 1024px){post-menu-item button,post-menu-item a{font-size:1.25rem;padding-block:.8125rem}}post-menu-item button:focus-visible,post-menu-item a:focus-visible{outline-offset:2px !important;border-radius:4px}post-menu-item button:hover,post-menu-item a:hover{background-color:#504f4b;color:#fff}";
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ const PostMenuItem = /*@__PURE__*/ proxyCustomElement(class PostMenuItem extends
|
|
|
9
9
|
this.__registerHost();
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: 'ae55d1dca73916188cb269cd7f4c808ee3302288', "data-version": version }, h("slot", { key: 'fabc1b7b4b99d7881bea64593114b6cd4fc606c4' })));
|
|
13
13
|
}
|
|
14
14
|
static get style() { return postMenuItemCss; }
|
|
15
15
|
}, [4, "post-menu-item"]);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-DZ5m2Ttg.js';
|
|
3
3
|
import { H as HEADING_LEVELS } from './p-r4txK0AC.js';
|
|
4
|
-
import { b as checkRequiredAndOneOf } from './p-
|
|
5
|
-
import './p-
|
|
6
|
-
import { E as EventFrom } from './p-CzIKqBrS.js';
|
|
4
|
+
import { b as checkRequiredAndOneOf } from './p-B8YiQ3mz.js';
|
|
5
|
+
import { E as EventFrom } from './p-rEfV4v4a.js';
|
|
7
6
|
|
|
8
|
-
const postAccordionCss = ":host{display:block
|
|
7
|
+
const postAccordionCss = ":host{display:block;border-block-start:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}";
|
|
9
8
|
|
|
10
9
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
11
10
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|