@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,8 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
3
|
import { n as nanoid } from './index.browser.js';
|
|
4
|
-
import { c as checkRequiredAndType } from './
|
|
5
|
-
import './breakpoints.js';
|
|
4
|
+
import { c as checkRequiredAndType } from './breakpoints.js';
|
|
6
5
|
|
|
7
6
|
const postTabPanelCss = ":host{display:none}";
|
|
8
7
|
|
|
@@ -12,27 +11,27 @@ const PostTabPanel$1 = /*@__PURE__*/ proxyCustomElement(class PostTabPanel exten
|
|
|
12
11
|
this.__registerHost();
|
|
13
12
|
this.__attachShadow();
|
|
14
13
|
}
|
|
15
|
-
|
|
16
|
-
checkRequiredAndType(this, '
|
|
14
|
+
validateFor() {
|
|
15
|
+
checkRequiredAndType(this, 'for', 'string');
|
|
17
16
|
}
|
|
18
17
|
componentWillLoad() {
|
|
19
|
-
this.
|
|
18
|
+
this.validateFor();
|
|
20
19
|
// get the id set on the host element or use a random id by default
|
|
21
20
|
this.panelId = `panel-${this.host.id || nanoid(6)}`;
|
|
22
21
|
}
|
|
23
22
|
render() {
|
|
24
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: 'dcb273fbc2a98c39813a152cd4a7e50bc86d0004', "data-version": version, id: this.panelId, role: "tabpanel", slot: "panels" }, h("slot", { key: 'c3f13a3b062c53c87b303f57ee267a6ce24c54c8' })));
|
|
25
24
|
}
|
|
26
25
|
get host() { return this; }
|
|
27
26
|
static get watchers() { return {
|
|
28
|
-
"
|
|
27
|
+
"for": ["validateFor"]
|
|
29
28
|
}; }
|
|
30
29
|
static get style() { return postTabPanelCss; }
|
|
31
30
|
}, [1, "post-tab-panel", {
|
|
32
|
-
"
|
|
31
|
+
"for": [513],
|
|
33
32
|
"panelId": [32]
|
|
34
33
|
}, undefined, {
|
|
35
|
-
"
|
|
34
|
+
"for": ["validateFor"]
|
|
36
35
|
}]);
|
|
37
36
|
function defineCustomElement$1() {
|
|
38
37
|
if (typeof customElements === "undefined") {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
|
-
import { f as
|
|
4
|
-
import './breakpoints.js';
|
|
3
|
+
import { f as fade } from './fade.js';
|
|
4
|
+
import { c as checkRequiredAndType } from './breakpoints.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Invoke the `componentOnReady` method if it is available, simulate it otherwise
|
|
@@ -33,42 +33,162 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
33
33
|
this.__attachShadow();
|
|
34
34
|
this.postChange = createEvent(this, "postChange", 7);
|
|
35
35
|
this.isLoaded = false;
|
|
36
|
+
this.isNavigationMode = false;
|
|
36
37
|
/**
|
|
37
38
|
* When set to true, this property allows the tabs container to span the
|
|
39
|
+
* Changing this value after initialization has no effect.
|
|
38
40
|
* full width of the screen, from edge to edge.
|
|
39
41
|
*/
|
|
40
42
|
this.fullWidth = false;
|
|
41
43
|
}
|
|
42
44
|
get tabs() {
|
|
43
|
-
return Array.from(this.host.querySelectorAll('post-tab-
|
|
45
|
+
return Array.from(this.host.querySelectorAll('post-tab-item')).filter(tab => tab.closest('post-tabs') === this.host);
|
|
46
|
+
}
|
|
47
|
+
get panels() {
|
|
48
|
+
return Array.from(this.host.querySelectorAll('post-tab-panel')).filter(panel => panel.closest('post-tabs') === this.host);
|
|
49
|
+
}
|
|
50
|
+
validateLabel() {
|
|
51
|
+
if (this.isNavigationMode) {
|
|
52
|
+
checkRequiredAndType(this, 'label', 'string');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
componentWillRender() {
|
|
56
|
+
this.detectMode();
|
|
44
57
|
}
|
|
45
58
|
componentDidLoad() {
|
|
46
59
|
this.moveMisplacedTabs();
|
|
60
|
+
this.moveMisplacedPanels();
|
|
47
61
|
this.enableTabs();
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
this.
|
|
62
|
+
this.setupContentObserver();
|
|
63
|
+
this.validateLabel();
|
|
64
|
+
if (this.isNavigationMode) {
|
|
65
|
+
const activeTab = this.findActiveNavigationTab();
|
|
66
|
+
if (activeTab) {
|
|
67
|
+
this.activateTab(activeTab);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
const tabToActivate = this.activeTab || this.tabs[0]?.name;
|
|
72
|
+
if (tabToActivate) {
|
|
73
|
+
void this.show(tabToActivate);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
disconnectedCallback() {
|
|
78
|
+
if (this.showing) {
|
|
79
|
+
this.showing.cancel();
|
|
80
|
+
this.showing = null;
|
|
81
|
+
}
|
|
82
|
+
if (this.hiding) {
|
|
83
|
+
this.hiding.cancel();
|
|
84
|
+
this.hiding = null;
|
|
85
|
+
}
|
|
86
|
+
if (this.contentObserver) {
|
|
87
|
+
this.contentObserver.disconnect();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
setupContentObserver() {
|
|
91
|
+
const config = {
|
|
92
|
+
childList: true,
|
|
93
|
+
subtree: true,
|
|
94
|
+
attributes: true,
|
|
95
|
+
attributeFilter: ['data-navigation-mode', 'aria-current'],
|
|
96
|
+
};
|
|
97
|
+
this.contentObserver = new MutationObserver(this.handleContentChange.bind(this));
|
|
98
|
+
this.contentObserver.observe(this.host, config);
|
|
99
|
+
}
|
|
100
|
+
handleContentChange(mutations) {
|
|
101
|
+
const shouldRedetect = this.shouldRedetectMode(mutations);
|
|
102
|
+
const ariaCurrentChanged = this.hasAriaCurrentChanged(mutations);
|
|
103
|
+
if (ariaCurrentChanged && this.isNavigationMode) {
|
|
104
|
+
this.updateActiveNavigationTab();
|
|
105
|
+
}
|
|
106
|
+
if (shouldRedetect) {
|
|
107
|
+
this.handleModeChange();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
shouldRedetectMode(mutations) {
|
|
111
|
+
return mutations.some(mutation => {
|
|
112
|
+
if (mutation.type === 'childList') {
|
|
113
|
+
return mutation.addedNodes.length > 0 || mutation.removedNodes.length > 0;
|
|
114
|
+
}
|
|
115
|
+
if (mutation.type === 'attributes' && mutation.attributeName === 'data-navigation-mode') {
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
return false;
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
hasAriaCurrentChanged(mutations) {
|
|
122
|
+
return mutations.some(mutation => mutation.type === 'attributes' && mutation.attributeName === 'aria-current');
|
|
123
|
+
}
|
|
124
|
+
updateActiveNavigationTab() {
|
|
125
|
+
const activeTab = this.findActiveNavigationTab();
|
|
126
|
+
if (activeTab && activeTab !== this.currentActiveTab) {
|
|
127
|
+
this.activateTab(activeTab);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
handleModeChange() {
|
|
131
|
+
const previousMode = this.isNavigationMode;
|
|
132
|
+
this.detectMode();
|
|
133
|
+
if (previousMode !== this.isNavigationMode) {
|
|
134
|
+
this.enableTabs();
|
|
135
|
+
this.initializeActiveTab();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
initializeActiveTab() {
|
|
139
|
+
if (this.isNavigationMode) {
|
|
140
|
+
const activeTab = this.findActiveNavigationTab();
|
|
141
|
+
if (activeTab) {
|
|
142
|
+
this.activateTab(activeTab);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
const tabToActivate = this.activeTab || this.tabs[0]?.name;
|
|
147
|
+
if (tabToActivate) {
|
|
148
|
+
void this.show(tabToActivate);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
detectMode() {
|
|
153
|
+
// Check for navigation mode by looking for anchor elements in tabs
|
|
154
|
+
// This works even before post-tab-item sets data-navigation-mode attribute
|
|
155
|
+
const hasNavigationTabs = this.tabs.some(tab => {
|
|
156
|
+
const hasAnchor = tab.querySelector('a') !== null;
|
|
157
|
+
const navModeAttr = tab.getAttribute('data-navigation-mode') === 'true';
|
|
158
|
+
return hasAnchor || navModeAttr;
|
|
159
|
+
});
|
|
160
|
+
const hasPanels = this.panels.length > 0;
|
|
161
|
+
if (hasNavigationTabs && hasPanels) {
|
|
162
|
+
throw new Error('PostTabs: Mixed mode detected. Cannot use both navigation mode (anchor elements) and panel mode (post-tab-panel elements) at the same time.');
|
|
163
|
+
}
|
|
164
|
+
this.isNavigationMode = hasNavigationTabs;
|
|
165
|
+
}
|
|
166
|
+
findActiveNavigationTab() {
|
|
167
|
+
return (this.tabs.find(tab => {
|
|
168
|
+
const anchor = tab.querySelector('a[aria-current="page"]');
|
|
169
|
+
return anchor !== null;
|
|
170
|
+
}) || null);
|
|
51
171
|
}
|
|
52
172
|
/**
|
|
53
173
|
* Shows the panel with the given name and selects its associated tab.
|
|
54
174
|
* Any other panel that was previously shown becomes hidden and its associated tab is unselected.
|
|
55
175
|
*/
|
|
56
|
-
async show(
|
|
176
|
+
async show(tabName) {
|
|
57
177
|
// do nothing if the tab is already active
|
|
58
|
-
if (
|
|
178
|
+
if (tabName === this.currentActiveTab?.name) {
|
|
59
179
|
return;
|
|
60
180
|
}
|
|
61
|
-
const previousTab = this.
|
|
62
|
-
const newTab = this.host.querySelector(`post-tab-
|
|
181
|
+
const previousTab = this.currentActiveTab;
|
|
182
|
+
const newTab = this.host.querySelector(`post-tab-item[name=${tabName}]`);
|
|
63
183
|
this.activateTab(newTab);
|
|
64
184
|
// if a panel is currently being displayed, remove it from the view and complete the associated animation
|
|
65
185
|
if (this.showing) {
|
|
66
|
-
this.showing.effect['target'].style.display = 'none';
|
|
67
186
|
this.showing.finish();
|
|
187
|
+
this.showing = null;
|
|
68
188
|
}
|
|
69
189
|
// hide the currently visible panel only if no other animation is running
|
|
70
190
|
if (previousTab && !this.showing && !this.hiding)
|
|
71
|
-
this.hidePanel(previousTab.
|
|
191
|
+
this.hidePanel(previousTab.name);
|
|
72
192
|
// wait for any hiding animation to complete before showing the selected tab
|
|
73
193
|
if (this.hiding)
|
|
74
194
|
await this.hiding.finished;
|
|
@@ -77,15 +197,25 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
77
197
|
if (this.showing)
|
|
78
198
|
await this.showing.finished;
|
|
79
199
|
if (this.isLoaded)
|
|
80
|
-
this.postChange.emit(this.
|
|
200
|
+
this.postChange.emit(this.currentActiveTab.name);
|
|
81
201
|
}
|
|
82
202
|
moveMisplacedTabs() {
|
|
83
203
|
if (!this.tabs)
|
|
84
204
|
return;
|
|
85
205
|
this.tabs.forEach(tab => {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
206
|
+
// Tab items should go in the default slot, so remove any slot attribute
|
|
207
|
+
if (tab.getAttribute('slot')) {
|
|
208
|
+
tab.removeAttribute('slot');
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
moveMisplacedPanels() {
|
|
213
|
+
if (!this.panels)
|
|
214
|
+
return;
|
|
215
|
+
this.panels.forEach(panel => {
|
|
216
|
+
if (panel.getAttribute('slot') !== 'panels') {
|
|
217
|
+
panel.setAttribute('slot', 'panels');
|
|
218
|
+
}
|
|
89
219
|
});
|
|
90
220
|
}
|
|
91
221
|
enableTabs() {
|
|
@@ -93,19 +223,25 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
93
223
|
return;
|
|
94
224
|
this.tabs.forEach(async (tab) => {
|
|
95
225
|
await componentOnReady(tab);
|
|
96
|
-
//
|
|
226
|
+
// In navigation mode, navigation is handled by the consumer's routing
|
|
227
|
+
if (this.isNavigationMode) {
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
// Panel mode: set up ARIA relationships and event handlers
|
|
97
231
|
if (tab.getAttribute('aria-controls'))
|
|
98
232
|
return;
|
|
99
|
-
const tabPanel = this.getPanel(tab.
|
|
100
|
-
|
|
101
|
-
|
|
233
|
+
const tabPanel = this.getPanel(tab.name);
|
|
234
|
+
if (tabPanel) {
|
|
235
|
+
tab.setAttribute('aria-controls', tabPanel.id);
|
|
236
|
+
tabPanel.setAttribute('aria-labelledby', tab.id);
|
|
237
|
+
}
|
|
102
238
|
tab.addEventListener('click', () => {
|
|
103
|
-
void this.show(tab.
|
|
239
|
+
void this.show(tab.name);
|
|
104
240
|
});
|
|
105
241
|
tab.addEventListener('keydown', (e) => {
|
|
106
242
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
107
243
|
e.preventDefault();
|
|
108
|
-
void this.show(tab.
|
|
244
|
+
void this.show(tab.name);
|
|
109
245
|
}
|
|
110
246
|
});
|
|
111
247
|
tab.addEventListener('keydown', (e) => {
|
|
@@ -114,44 +250,51 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
114
250
|
});
|
|
115
251
|
});
|
|
116
252
|
// if the currently active tab was removed from the DOM then select the first one
|
|
117
|
-
if (this.
|
|
118
|
-
void this.show(this.tabs[0]?.
|
|
253
|
+
if (this.currentActiveTab && !this.currentActiveTab.isConnected) {
|
|
254
|
+
void this.show(this.tabs[0]?.name);
|
|
119
255
|
}
|
|
120
256
|
}
|
|
121
257
|
activateTab(tab) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
this.
|
|
125
|
-
this.
|
|
258
|
+
// Deactivate previous tab
|
|
259
|
+
if (this.currentActiveTab) {
|
|
260
|
+
this.currentActiveTab.classList.remove('active');
|
|
261
|
+
if (!this.isNavigationMode) {
|
|
262
|
+
this.currentActiveTab.setAttribute('aria-selected', 'false');
|
|
263
|
+
this.currentActiveTab.setAttribute('tabindex', '-1');
|
|
264
|
+
}
|
|
126
265
|
}
|
|
127
|
-
tab.setAttribute('aria-selected', 'true');
|
|
128
|
-
tab.setAttribute('tabindex', '0');
|
|
129
266
|
tab.classList.add('active');
|
|
130
|
-
this.
|
|
267
|
+
if (!this.isNavigationMode) {
|
|
268
|
+
tab.setAttribute('aria-selected', 'true');
|
|
269
|
+
tab.setAttribute('tabindex', '0');
|
|
270
|
+
}
|
|
271
|
+
this.currentActiveTab = tab;
|
|
131
272
|
}
|
|
132
273
|
hidePanel(panelName) {
|
|
133
274
|
const previousPanel = this.getPanel(panelName);
|
|
134
275
|
if (!previousPanel)
|
|
135
276
|
return;
|
|
136
|
-
this.hiding =
|
|
277
|
+
this.hiding = fade(previousPanel, 'out');
|
|
137
278
|
this.hiding.onfinish = () => {
|
|
138
279
|
previousPanel.style.display = 'none';
|
|
139
280
|
this.hiding = null;
|
|
140
281
|
};
|
|
141
282
|
}
|
|
142
283
|
showSelectedPanel() {
|
|
143
|
-
const panel = this.getPanel(this.
|
|
284
|
+
const panel = this.getPanel(this.currentActiveTab.name);
|
|
285
|
+
if (!panel)
|
|
286
|
+
return;
|
|
144
287
|
panel.style.display = 'block';
|
|
145
288
|
// prevent the initially selected panel from fading in
|
|
146
289
|
if (!this.isLoaded)
|
|
147
290
|
return;
|
|
148
|
-
this.showing =
|
|
291
|
+
this.showing = fade(panel, 'in');
|
|
149
292
|
this.showing.onfinish = () => {
|
|
150
293
|
this.showing = null;
|
|
151
294
|
};
|
|
152
295
|
}
|
|
153
296
|
getPanel(name) {
|
|
154
|
-
return this.host.querySelector(`post-tab-panel[
|
|
297
|
+
return this.host.querySelector(`post-tab-panel[for=${name}]`);
|
|
155
298
|
}
|
|
156
299
|
navigateTabs(tab, key) {
|
|
157
300
|
const activeTabIndex = Array.from(this.tabs).indexOf(tab);
|
|
@@ -165,16 +308,28 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
165
308
|
if (!nextTab)
|
|
166
309
|
return;
|
|
167
310
|
nextTab.focus();
|
|
311
|
+
void this.show(nextTab.name);
|
|
168
312
|
}
|
|
169
313
|
render() {
|
|
170
|
-
|
|
314
|
+
const TabsContainer = this.isNavigationMode ? 'nav' : 'div';
|
|
315
|
+
return (h(Host, { key: '0d2ce5c335e58aeb6231ad4d63a44324eb35f54a', "data-version": version }, h("div", { key: 'd8b0ad389fd4ba8010c7816472373d6a8d4a3aa4', class: "tabs-wrapper", part: "post-tabs" }, h(TabsContainer, { key: 'fd8ae3c19f12138936a39028f117aec1d41ea992', class: "tabs", role: this.isNavigationMode ? undefined : 'tablist', "aria-label": this.isNavigationMode ? this.label : undefined }, h("slot", { key: '3148c5c8f508a6c3f2daab075f8ab2d91c567343', onSlotchange: () => {
|
|
316
|
+
this.moveMisplacedTabs();
|
|
317
|
+
this.enableTabs();
|
|
318
|
+
} }))), !this.isNavigationMode && (h("div", { key: '4ea329e77c108dd2b25db6efa116a68a3a415af6', class: "tab-content", part: "post-tabs-content" }, h("slot", { key: '28efc229a3f3f6f4f9cee157ff453c860c5ffa9e', name: "panels", onSlotchange: () => this.moveMisplacedPanels() })))));
|
|
171
319
|
}
|
|
172
320
|
get host() { return this; }
|
|
321
|
+
static get watchers() { return {
|
|
322
|
+
"label": ["validateLabel"]
|
|
323
|
+
}; }
|
|
173
324
|
static get style() { return postTabsCss; }
|
|
174
325
|
}, [1, "post-tabs", {
|
|
175
|
-
"
|
|
326
|
+
"activeTab": [1, "active-tab"],
|
|
176
327
|
"fullWidth": [516, "full-width"],
|
|
328
|
+
"label": [513],
|
|
329
|
+
"isNavigationMode": [32],
|
|
177
330
|
"show": [64]
|
|
331
|
+
}, undefined, {
|
|
332
|
+
"label": ["validateLabel"]
|
|
178
333
|
}]);
|
|
179
334
|
function defineCustomElement$1() {
|
|
180
335
|
if (typeof customElements === "undefined") {
|
|
@@ -1,54 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { v as version } from './package.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$1 = /*@__PURE__*/ proxyCustomElement(class PostTogglebutton extends HTMLElement {
|
|
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: 'ecd5772b09be8842e5c6fc3bf34932b27d90c533', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: '3bb32b33155e71ced9375afb5a26d1d4e63a83c8' })));
|
|
33
|
-
}
|
|
34
|
-
get host() { return this; }
|
|
35
|
-
static get style() { return postTogglebuttonCss; }
|
|
36
|
-
}, [1, "post-togglebutton", {
|
|
37
|
-
"toggled": [1028]
|
|
38
|
-
}]);
|
|
39
|
-
function defineCustomElement$1() {
|
|
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$1);
|
|
48
|
-
}
|
|
49
|
-
break;
|
|
50
|
-
} });
|
|
51
|
-
}
|
|
1
|
+
import { P as PostTogglebutton$1, d as defineCustomElement$1 } from './post-togglebutton2.js';
|
|
52
2
|
|
|
53
3
|
const PostTogglebutton = PostTogglebutton$1;
|
|
54
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { v as version } from './package.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 HTMLElement {
|
|
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
|
+
|
|
53
|
+
export { PostTogglebutton as P, defineCustomElement as d };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { I as IS_BROWSER } from './
|
|
3
|
-
import { e as checkEmptyOrType } from './
|
|
2
|
+
import { I as IS_BROWSER } from './environment.js';
|
|
3
|
+
import { e as checkEmptyOrType } from './breakpoints.js';
|
|
4
4
|
import { v as version } from './package.js';
|
|
5
5
|
import { i as isFocusable } from './focusable.js';
|
|
6
6
|
|
|
@@ -173,7 +173,7 @@ const PostTooltipTrigger$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltipT
|
|
|
173
173
|
this.tooltip?.hide();
|
|
174
174
|
}
|
|
175
175
|
render() {
|
|
176
|
-
return (h(Host, { key: '
|
|
176
|
+
return (h(Host, { key: '272df9fbda27a695e083a71e7740dd6c8c3afb2d', "data-version": version }, h("slot", { key: '616b48a7dcbe591f4490aa8ec41abf43c17259bb', onSlotchange: () => this.handleSlotChange() })));
|
|
177
177
|
}
|
|
178
178
|
get host() { return this; }
|
|
179
179
|
static get watchers() { return {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
|
-
import { d as checkEmptyOrOneOf } from './
|
|
4
|
-
import './breakpoints.js';
|
|
3
|
+
import { d as checkEmptyOrOneOf } from './breakpoints.js';
|
|
5
4
|
import { a as PLACEMENT_TYPES, d as defineCustomElement$2 } from './post-popovercontainer2.js';
|
|
6
5
|
|
|
7
6
|
const postTooltipCss = ":host{display:none}:host([open]){display:contents}post-popovercontainer[arrow]::after{position:absolute;content:\"\";inset:-13px;z-index:-1}post-popovercontainer>div{color:var(--post-current-fg);background-color:var(--post-current-bg);padding:var(--post-core-dimension-4) var(--post-core-dimension-8);max-width:var(--post-tooltip-max-width, 280px);width:inherit;min-height:32px;word-wrap:break-word;white-space:normal}";
|
|
@@ -71,7 +70,7 @@ const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends
|
|
|
71
70
|
}
|
|
72
71
|
render() {
|
|
73
72
|
const popoverClass = `${this.arrow ? 'has-arrow' : ''}`;
|
|
74
|
-
return (h(Host, { key: '
|
|
73
|
+
return (h(Host, { key: 'a9ce457973507a7cd05edb774c84c769ba11bcce', "data-version": version }, h("post-popovercontainer", { key: '8fa8c699ddccd7d46f240992ab1d7e515637cab5', safeSpace: "trapezoid", class: popoverClass, role: "tooltip", arrow: this.arrow, animation: this.animation, placement: this.placement, onPostToggle: e => this.handleToggle(e), ref: (el) => (this.popoverRef = el) }, h("slot", { key: '2ce3408b95a511b9c3c91905fff7142b3598fc55' }))));
|
|
75
74
|
}
|
|
76
75
|
get host() { return this; }
|
|
77
76
|
static get watchers() { return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const globalStyles = ":where(post-accordion,post-accordion-item,post-avatar,post-back-to-top,post-banner,post-breadcrumb-item,post-breadcrumbs,post-card-control,post-closebutton,post-collapsible,post-collapsible-trigger,post-footer,post-header,post-icon,post-language-
|
|
1
|
+
const globalStyles = ":where(post-accordion,post-accordion-item,post-avatar,post-back-to-top,post-banner,post-breadcrumb-item,post-breadcrumbs,post-card-control,post-closebutton,post-collapsible,post-collapsible-trigger,post-footer,post-header,post-icon,post-language-menu,post-language-menu-item,post-linkarea,post-logo,post-mainnavigation,post-megadropdown,post-megadropdown-trigger,post-menu,post-menu-item,post-menu-trigger,post-pagination,post-popover,post-popover-trigger,post-popovercontainer,post-rating,post-stepper,post-stepper-item,post-tab-item,post-tab-panel,post-tabs,post-togglebutton,post-tooltip,post-tooltip-trigger):not([data-hydrated],:defined){visibility:hidden}";
|
|
2
2
|
|
|
3
3
|
const NAMESPACE = 'post-components';
|
|
4
4
|
const BUILD = /* post-components */ { hydratedSelectorName: "data-hydrated", lazyLoad: false, slotRelocation: true, updatable: true};
|
|
@@ -1,7 +1,92 @@
|
|
|
1
|
-
|
|
1
|
+
import { a as IS_SERVER } from './p-FxUVQ4Tx.js';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
|
|
3
|
+
const EMPTY_VALUES = [undefined, null, '', NaN];
|
|
4
|
+
|
|
5
|
+
function isValueEmpty(value) {
|
|
6
|
+
return EMPTY_VALUES.some(v => v === value);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function requiredAnd(check) {
|
|
10
|
+
return (component, prop, ...extraArgs) => {
|
|
11
|
+
const componentName = component.host.localName;
|
|
12
|
+
const value = component[prop];
|
|
13
|
+
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component is not defined.`;
|
|
14
|
+
if (isValueEmpty(value)) {
|
|
15
|
+
throw new Error(message);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
check(component, prop, ...extraArgs);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function checkOneOf(component, prop, possibleValues) {
|
|
24
|
+
const componentName = component.host.localName;
|
|
25
|
+
const value = component[prop];
|
|
26
|
+
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be one of the following values: ${possibleValues.join(', ')}.`;
|
|
27
|
+
if (!possibleValues.includes(value)) {
|
|
28
|
+
console.error(message);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function checkPattern(component, prop, pattern) {
|
|
33
|
+
const componentName = component.host.localName;
|
|
34
|
+
const value = component[prop];
|
|
35
|
+
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must follow the format \`${pattern}\`.`;
|
|
36
|
+
if (typeof value !== 'string' || !pattern.test(value)) {
|
|
37
|
+
console.error(message);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function checkType(component, prop, type) {
|
|
42
|
+
const componentName = component.host.localName;
|
|
43
|
+
const value = component[prop];
|
|
44
|
+
const typeIsArray = type === 'array';
|
|
45
|
+
const valueIsArray = Array.isArray(value);
|
|
46
|
+
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be of type \`${type}\`.`;
|
|
47
|
+
if (typeIsArray || valueIsArray) {
|
|
48
|
+
if (valueIsArray !== typeIsArray) {
|
|
49
|
+
console.error(message);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
else if (typeof value !== type) {
|
|
53
|
+
console.error(message);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function checkUrl(component, prop) {
|
|
58
|
+
const componentName = component.host.localName;
|
|
59
|
+
const value = component[prop];
|
|
60
|
+
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component is invalid.`;
|
|
61
|
+
if (typeof value !== 'string' && !(value instanceof URL)) {
|
|
62
|
+
console.error(message);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
new URL(value, 'https://www.post.ch');
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
console.error(message);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function emptyOr(check) {
|
|
74
|
+
return (component, prop, ...extraArgs) => {
|
|
75
|
+
const value = component[prop];
|
|
76
|
+
if (!isValueEmpty(value)) {
|
|
77
|
+
check(component, prop, ...extraArgs);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const checkEmptyOrOneOf = emptyOr(checkOneOf);
|
|
83
|
+
const checkEmptyOrPattern = emptyOr(checkPattern);
|
|
84
|
+
const checkEmptyOrType = emptyOr(checkType);
|
|
85
|
+
const checkEmptyOrUrl = emptyOr(checkUrl);
|
|
86
|
+
const checkRequiredAndOneOf = requiredAnd(checkOneOf);
|
|
87
|
+
const checkRequiredAndPattern = requiredAnd(checkPattern);
|
|
88
|
+
const checkRequiredAndType = requiredAnd(checkType);
|
|
89
|
+
const checkRequiredAndUrl = requiredAnd(checkUrl);
|
|
5
90
|
|
|
6
91
|
/* eslint-disable no-undefined,no-param-reassign,no-shadow */
|
|
7
92
|
|
|
@@ -177,6 +262,4 @@ class Breakpoint {
|
|
|
177
262
|
}
|
|
178
263
|
const breakpoint = new Breakpoint();
|
|
179
264
|
|
|
180
|
-
|
|
181
|
-
exports.breakpoint = breakpoint;
|
|
182
|
-
exports.throttle = throttle;
|
|
265
|
+
export { checkEmptyOrUrl as a, checkRequiredAndOneOf as b, checkRequiredAndType as c, checkEmptyOrOneOf as d, checkEmptyOrType as e, checkRequiredAndUrl as f, breakpoint as g, checkRequiredAndPattern as h, checkEmptyOrPattern as i, throttle as t };
|