@swisspost/design-system-components 10.0.0-next.54 → 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/{components/react/p-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-Cb8CTrOz.js → index-CKNxhb0S.js} +29 -13
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-CvZxvdTJ.js → package-CY7IOoiw.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +12 -12
- package/dist/cjs/post-avatar.cjs.entry.js +11 -11
- 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} +537 -507
- package/dist/cjs/post-collapsible_2.cjs.entry.js +39 -38
- 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 +12 -12
- package/dist/cjs/post-rating.cjs.entry.js +13 -13
- package/dist/cjs/post-stepper-item.cjs.entry.js +18 -0
- package/dist/cjs/post-stepper.cjs.entry.js +109 -0
- 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 +7 -7
- 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 +8 -6
- package/dist/collection/components/post-accordion/post-accordion.css +1 -1
- package/dist/collection/components/post-accordion/post-accordion.js +2 -2
- 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.css +1 -1
- 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 +28 -28
- package/dist/collection/components/post-card-control/post-card-control.js +3 -3
- 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 +6 -5
- package/dist/collection/components/post-footer/post-footer.css +1 -1
- package/dist/collection/components/post-footer/post-footer.js +18 -16
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +186 -105
- 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} +25 -25
- 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} +14 -14
- 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 +184 -75
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +3 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +80 -74
- package/dist/collection/components/post-menu/post-menu.css +1 -1
- package/dist/collection/components/post-menu/post-menu.js +35 -35
- 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.css +1 -1
- package/dist/collection/components/post-popover/post-popover.js +10 -10
- 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 +3 -3
- package/dist/collection/components/post-stepper/post-stepper.css +1 -0
- package/dist/collection/components/post-stepper/post-stepper.js +207 -0
- package/dist/collection/components/post-stepper-item/post-stepper-item.css +7 -0
- package/dist/collection/components/post-stepper-item/post-stepper-item.js +18 -0
- 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.css +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 +6 -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 +14 -10
- package/dist/components/index.js +7 -5
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +4 -5
- package/dist/components/post-accordion2.js +4 -5
- package/dist/components/post-avatar.js +3 -4
- 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 +24 -34
- package/dist/components/post-card-control.js +4 -5
- package/dist/components/post-closebutton2.js +3 -4
- package/dist/components/post-collapsible-trigger2.js +10 -10
- 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 +156 -119
- 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 +72 -79
- package/dist/components/post-megadropdown.js +183 -78
- package/dist/components/post-menu-item2.js +1 -1
- package/dist/components/post-menu-trigger2.js +2 -3
- package/dist/components/post-menu2.js +35 -36
- package/dist/components/post-pagination.d.ts +11 -0
- package/dist/components/post-pagination.js +635 -0
- package/dist/components/post-popover-trigger.js +41 -26
- package/dist/components/post-popover.js +9 -10
- package/dist/components/post-popovercontainer2.js +44 -40
- package/dist/components/post-rating.js +3 -4
- package/dist/components/post-stepper-item.d.ts +11 -0
- package/dist/components/post-stepper-item.js +33 -0
- package/dist/components/{post-list-item.d.ts → post-stepper.d.ts} +4 -4
- package/dist/components/post-stepper.js +136 -0
- package/dist/components/{post-tab-header.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 +3 -4
- 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-2U_BGLjc.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-D4NSCxrX.js → p-BYCGzO-t.js} +13 -13
- 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-nSFSgY-P.js → p-CnZWXrbA.js} +40 -41
- 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-Ccgu_WOx.js → p-DBO6FfHt.js} +4 -5
- package/dist/components/react/{p-BfLuYwf7.js → p-DRfa3MOV.js} +26 -26
- package/dist/components/react/{p-BUxAs8N5.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-BK474oMI.js → p-L36-yvgK.js} +2 -2
- package/dist/components/react/{p-DVxZMuPW.js → p-NCAcc7ZZ.js} +6 -7
- package/dist/components/react/{p-mENtrn2l.js → p-QNPIvxLq.js} +45 -41
- package/dist/components/react/{p-D3CFjhAf.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 +4 -5
- 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 +31 -41
- package/dist/components/react/post-card-control.js +6 -7
- 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 +158 -121
- 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 +74 -81
- package/dist/components/react/post-megadropdown.js +185 -80
- 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-pagination.d.ts +11 -0
- 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 +14 -15
- package/dist/components/react/post-popovercontainer.js +1 -1
- package/dist/components/react/post-rating.js +5 -6
- package/dist/components/react/post-stepper-item.d.ts +11 -0
- package/dist/components/react/post-stepper-item.js +34 -0
- package/dist/components/react/{post-list-item.d.ts → post-stepper.d.ts} +4 -4
- package/dist/components/react/post-stepper.js +137 -0
- package/dist/components/react/{post-tab-header.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 +5 -6
- package/dist/components/utils.js +24 -0
- package/dist/docs.json +968 -563
- package/dist/esm/{breakpoints-CJ80BZ06.js → 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-CFNKgUjL.js → index-1ReqxAnI.js} +29 -13
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-DZ5m2Ttg.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +10 -10
- package/dist/esm/post-avatar.entry.js +6 -6
- 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} +518 -486
- package/dist/esm/post-collapsible_2.entry.js +36 -35
- 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 +11 -11
- package/dist/esm/post-rating.entry.js +5 -5
- package/dist/esm/post-stepper-item.entry.js +16 -0
- package/dist/esm/post-stepper.entry.js +107 -0
- 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 +6 -6
- package/dist/esm/utils-CoDiS_Ik.js +24 -0
- package/dist/post-components/{p-8f0fc02a.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-96750e25.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-bf41fe56.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-261b1452.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-658b1ccc.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-11c204e0.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-collapsible-trigger/post-collapsible-trigger.d.ts +1 -0
- package/dist/types/components/post-footer/post-footer.d.ts +4 -4
- package/dist/types/components/post-header/post-header.d.ts +28 -19
- 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 +39 -0
- package/dist/types/components/post-stepper-item/post-stepper-item.d.ts +3 -0
- 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 +357 -186
- 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 +1882 -833
- package/hydrate/index.mjs +1882 -833
- package/package.json +9 -11
- package/dist/cjs/fade-nS5zzDQS.js +0 -14
- package/dist/cjs/index-DtvYdwe1.js +0 -96
- 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 -88
- 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-BXRsHuTS.js +0 -3
- package/dist/components/react/p-CV7fm1rW.js +0 -88
- package/dist/components/react/p-Dj7qWba5.js +0 -114
- package/dist/components/react/p-SbIC4aZX.js +0 -11
- 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-VmK3ABCB.js +0 -88
- package/dist/esm/package-BXRsHuTS.js +0 -3
- package/dist/esm/post-tab-header.entry.js +0 -29
- package/dist/post-components/p-02ea3ec5.entry.js +0 -1
- package/dist/post-components/p-0e92dbef.entry.js +0 -1
- package/dist/post-components/p-0ec2bdd7.entry.js +0 -1
- package/dist/post-components/p-197a0f25.entry.js +0 -1
- package/dist/post-components/p-3274ab81.entry.js +0 -1
- package/dist/post-components/p-77e43032.entry.js +0 -1
- package/dist/post-components/p-BXRsHuTS.js +0 -1
- package/dist/post-components/p-CBFgkSgY.js +0 -1
- package/dist/post-components/p-CFNKgUjL.js +0 -2
- 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-VmK3ABCB.js +0 -1
- package/dist/post-components/p-b5b5e4b9.entry.js +0 -1
- package/dist/post-components/p-b8059ba1.entry.js +0 -1
- package/dist/post-components/p-d6134e24.entry.js +0 -1
- package/dist/post-components/p-e7029b9e.entry.js +0 -1
- package/dist/post-components/p-e90688ab.entry.js +0 -1
- package/dist/post-components/p-ea5da614.entry.js +0 -1
- package/dist/post-components/p-f1b815b6.entry.js +0 -1
- 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
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
post-stepper-item{grid-row:1;position:relative;padding-inline-start:0}post-stepper-item:not(:first-child){padding-inline-start:calc(var(--post-device-sizing-interactive-stepper-indicator) / 2)}post-stepper-item:not(:last-child){padding-inline-end:calc(var(--post-device-sizing-interactive-stepper-indicator) / 2);grid-column:span 2}post-stepper-item::before,post-stepper-item::after{content:"";display:block;position:absolute;inset-block-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - 2px)/2);height:2px;background-color:var(--post-scheme-color-interactive-primary-disabled-bg4);inset-inline:0}post-stepper-item:not(:first-child,:last-child)::before{inset-inline-end:50%}post-stepper-item:not(:first-child,:last-child)::after{inset-inline-start:50%}post-stepper-item.stepper-item-current:not(:last-child)::after,post-stepper-item.stepper-item-current:first-child::before,post-stepper-item.stepper-item-current+*:last-child::after,post-stepper-item.stepper-item-current+*::before{background-color:var(--post-scheme-color-interactive-primary-enabled-fg1)}post-stepper-item.stepper-item-current:not(:first-child)::before,post-stepper-item.stepper-item-current:last-child::after,post-stepper-item.stepper-item-completed::after,post-stepper-item.stepper-item-completed::before,post-stepper-item.stepper-item-completed+*::before{background-color:var(--post-scheme-color-interactive-primary-selected-bg2);z-index:1}.stepper-item-content{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;position:relative;z-index:2;overflow:hidden;text-decoration:none;color:var(--post-scheme-color-interactive-primary-disabled-fg1);width:fit-content;word-break:break-word;font-size:var(--post-device-font-size-7)}post-stepper-item:not(:first-child,:last-child)>.stepper-item-content{margin-inline:auto;text-align:center}post-stepper-item:last-child>.stepper-item-content{margin-inline-start:auto;margin-inline-end:-20px;text-align:end}.stepper-item-completed>.stepper-item-content{color:var(--post-scheme-color-interactive-primary-enabled-fg1)}.stepper-item-current>.stepper-item-content{font-weight:var(--post-device-font-weight-bold);color:var(--post-scheme-color-interactive-primary-enabled-fg1)}.stepper-item-current>.stepper-item-content::before{font-weight:var(--post-device-font-weight-regular);color:var(--post-scheme-color-interactive-primary-enabled-fg3)}.stepper-item-content::before{counter-increment:step-index;content:counter(step-index);display:flex;align-items:center;justify-content:center;z-index:1;height:var(--post-device-sizing-interactive-stepper-indicator);width:var(--post-device-sizing-interactive-stepper-indicator);box-sizing:border-box;margin-block-end:var(--post-device-spacing-gap-1);color:var(--post-scheme-color-interactive-primary-enabled-fg3);background-color:var(--post-scheme-color-interactive-primary-enabled-bg2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke3);border-radius:var(--post-device-border-radius-round);text-indent:initial}post-stepper-item:not(:first-child,:last-child)>.stepper-item-content::before{margin-inline:auto}post-stepper-item:last-child>.stepper-item-content::before{margin-inline-start:auto}.stepper-item-completed>.stepper-item-content::before{color:rgba(0,0,0,0);background-color:var(--post-scheme-color-interactive-primary-selected-stroke3);border-color:var(--post-scheme-color-interactive-primary-selected-stroke3)}.stepper-item-inactive>.stepper-item-content::before{color:var(--post-scheme-color-interactive-primary-disabled-fg3);background-color:var(--post-scheme-color-interactive-primary-disabled-bg4);border-color:var(--post-scheme-color-interactive-primary-disabled-stroke3)}.stepper-item-content::after{display:block;position:absolute;inset-block-start:var(--post-device-border-width-default);z-index:1;background-color:var(--post-scheme-color-interactive-primary-enabled-fg3);mask-image:var(--post-icon-success-solid);background-color:currentColor;width:calc(
|
|
2
|
+
var(--post-device-sizing-interactive-stepper-indicator) - (var(--post-device-border-width-default) * 2)
|
|
3
|
+
);height:calc(
|
|
4
|
+
var(--post-device-sizing-interactive-stepper-indicator) - (var(--post-device-border-width-default) * 2)
|
|
5
|
+
);color:var(--post-scheme-color-interactive-primary-selected-bg2)}:root{--post-icon-success-solid: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxzeW1ib2wgaWQ9Imktc3VjY2Vzcy1zb2xpZCI+PHN5bWJvbCBpZD0iczE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiPjxwYXRoIGQ9Ik03Ljk5LS4wOUMzLjU4LS4wOSAwIDMuNDkgMCA3LjkxczMuNTggOCA3Ljk5IDggOC0zLjU4IDgtOC0zLjU4LTgtOC04bTMuMzIgNi4xTDcuNTIgMTEuMiA0LjYzIDguNDRhLjc0Ni43NDYgMCAwIDEtLjAyLTEuMDZjLjI5LS4zLjc2LS4zMSAxLjA2LS4wMmwxLjY1IDEuNTggMi43OC0zLjgxYS43NTEuNzUxIDAgMSAxIDEuMjIuODhaIi8+PC9zeW1ib2w+PHN5bWJvbCBpZD0iczI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMS45OSAwQzUuMzYgMCAwIDUuMzggMCAxMnM1LjM3IDEyIDEyIDEyIDEyLTUuMzcgMTItMTJTMTguNjIgMCAxMS45OSAwbTQuNzcgOC44Ni01LjUxIDcuNTYtNC4xMy0zLjk1Yy0uMzUtLjMzLS4zNi0uODktLjAzLTEuMjRzLjg5LS4zNiAxLjI0LS4wM2wyLjY5IDIuNTcgNC4zMy01Ljk0Yy4yOC0uMzkuODMtLjQ4IDEuMjItLjE5LjM5LjI4LjQ4LjgzLjE5IDEuMjIiLz48L3N5bWJvbD48c3ltYm9sIGlkPSJzMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZD0iTTE1Ljk5IDBjLTguODQgMC0xNiA3LjE2LTE2IDE2czcuMTYgMTYgMTYgMTYgMTYtNy4xNiAxNi0xNi03LjE2LTE2LTE2LTE2bTYuNzkgMTEuMjItNy45MSAxMC44NS01Ljg1LTUuNThhLjk5Ni45OTYgMCAwIDEtLjAzLTEuNDEuOTk2Ljk5NiAwIDAgMSAxLjQxLS4wM2w0LjE5IDQuMDEgNi41Ny05LjAxYy4zMi0uNDUuOTUtLjU0IDEuNC0uMjIuNDUuMzMuNTQuOTUuMjIgMS40WiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InM0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cGF0aCBkPSJNMTkuOTktLjA2Yy0xMS4wNSAwLTIwIDguOTYtMjAgMjBzOC45NSAyMCAyMCAyMCAyMC04Ljk1IDIwLTIwLTguOTYtMjAtMjAtMjBtOC4zOCAxMy45Ni05LjgxIDEzLjQ1LTcuMjEtNi44OGMtLjQ1LS40My0uNDctMS4xNC0uMDQtMS41OXMxLjE0LS40NyAxLjU5LS4wNGw1LjM1IDUuMTEgOC4yOS0xMS4zOGMuMzctLjUgMS4wNy0uNjEgMS41Ny0uMjUuNS4zNy42MSAxLjA3LjI1IDEuNTdaIi8+PC9zeW1ib2w+PHN5bWJvbCBpZD0iczQ4IiB2aWV3Qm94PSIwIDAgNDggNDgiPjxwYXRoIGQ9Ik0yMy45OS0uMDFjLTEzLjI2IDAtMjQgMTAuNzQtMjQgMjRzMTAuNzUgMjQgMjQgMjQgMjQtMTAuNzUgMjQtMjQtMTAuNzUtMjQtMjQtMjRtOS45OCAxNi42OC0xMS43IDE2LjA1LTguNTYtOC4xOGExLjI1IDEuMjUgMCAwIDEtLjA0LTEuNzdjLjQ4LS41IDEuMjctLjUyIDEuNzctLjA0bDYuNSA2LjIxTDMxLjk2IDE1LjJjLjQxLS41NiAxLjE5LS42OCAxLjc1LS4yN3MuNjggMS4xOS4yNyAxLjc1WiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InM2NCIgdmlld0JveD0iMCAwIDY0IDY0Ij48cGF0aCBkPSJNMzEuOTggMGMtMTcuNjcgMC0zMiAxNC4zMi0zMiAzMnMxNC4zMyAzMiAzMiAzMiAzMi0xNC4zMyAzMi0zMi0xNC4zMi0zMi0zMi0zMm0xMy4wNyAyMi4wOC0xNS40IDIxLjEzLTExLjE4LTEwLjY4Yy0uNTUtLjUyLS41Ny0xLjM5LS4wNC0xLjk0LjUyLS41NSAxLjQtLjU3IDEuOTQtLjA0bDguOTEgOC41MSAxMy41NS0xOC41OWExLjM3NSAxLjM3NSAwIDAgMSAyLjIyIDEuNjJaIi8+PC9zeW1ib2w+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczE2LCBub25lKSIgaHJlZj0iI3MxNiIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXMyNCwgbm9uZSkiIGhyZWY9IiNzMjQiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zMzIsIG5vbmUpIiBocmVmPSIjczMyIi8+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczQwLCBub25lKSIgaHJlZj0iI3M0MCIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXM0OCwgbm9uZSkiIGhyZWY9IiNzNDgiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zNjQsIG5vbmUpIiBocmVmPSIjczY0Ii8+PC9zeW1ib2w+PC9kZWZzPjxzdHlsZT5AbWVkaWEgKG1heC13aWR0aDogMjMuOThweCkge2d7LS1zMTY6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogMjRweCkgYW5kIChtYXgtd2lkdGg6IDMxLjk4cHgpIHtney0tczI0OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDMycHgpIGFuZCAobWF4LXdpZHRoOiAzOS45OHB4KSB7Z3stLXMzMjpibG9jazt9fUBtZWRpYSAobWluLXdpZHRoOiA0MHB4KSBhbmQgKG1heC13aWR0aDogNDcuOThweCkge2d7LS1zNDA6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogNDhweCkgYW5kIChtYXgtd2lkdGg6IDYzLjk4cHgpIHtney0tczQ4OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDY0cHgpIHtney0tczY0OmJsb2NrO319PC9zdHlsZT48Zz48dXNlIGhyZWY9IiNpLXN1Y2Nlc3Mtc29saWQiLz48L2c+PC9zdmc+")}post-stepper-item:first-child>.stepper-item-content::after{inset-inline-start:var(--post-device-border-width-default)}post-stepper-item:not(:first-child,:last-child)>.stepper-item-content::after{inset-inline-start:calc(50% - (
|
|
6
|
+
var(--post-device-sizing-interactive-stepper-indicator) - (var(--post-device-border-width-default) * 2)
|
|
7
|
+
)/2)}post-stepper-item:last-child>.stepper-item-content::after{inset-inline-end:var(--post-device-border-width-default)}.stepper-item-completed>.stepper-item-content::after{content:""}@media screen and (max-width: 779.98px){post-stepper-item{flex-grow:1;margin-inline:0;padding:0 !important}post-stepper-item::before{content:unset}post-stepper-item::after{inset-inline-start:0 !important}post-stepper-item:last-child{flex:0 0 32px}post-stepper-item:last-child::after{content:unset}post-stepper-item .stepper-item-content{margin-inline:0 !important}post-stepper-item .stepper-item-content>span{display:none}}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-stepper-item::before,post-stepper-item::after{background-color:CanvasText !important}post-stepper-item.stepper-item-current:not(:first-child)::before,post-stepper-item.stepper-item-current:last-child::after,post-stepper-item.stepper-item-completed::after,post-stepper-item.stepper-item-completed::before,post-stepper-item.stepper-item-completed+*::before{background-color:Highlight !important}.stepper-item-content::before{forced-color-adjust:none}.stepper-item-current>.stepper-item-content::before{background-color:Canvas;color:CanvasText}.stepper-item-completed>.stepper-item-content::before,.stepper-item-inactive>.stepper-item-content::before{border-color:Canvas;background-color:CanvasText}.stepper-item-inactive>.stepper-item-content::before{color:Canvas}.stepper-item-content::after{color:Canvas}}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { version } from "../../../../package";
|
|
3
|
+
export class PostStepperItem {
|
|
4
|
+
render() {
|
|
5
|
+
return (h(Host, { key: '04ee0014a44c978432fd2569a801dc1023c30f14', "data-version": version, role: "listitem" }, h("span", { key: '3fc43cca8c0b1af4129858aca44724241e85a8c0', class: "stepper-item-content" }, h("span", { key: '158580119f48648869e3625a64fe38b8a8224e4d', class: "step-hidden-label visually-hidden" }), h("span", { key: '8f273c70ac9d386a197ced9738217490ef3c15e7', class: "label" }, h("slot", { key: 'd29e0df0613529f051f66dad125954476cb0b0e7' })))));
|
|
6
|
+
}
|
|
7
|
+
static get is() { return "post-stepper-item"; }
|
|
8
|
+
static get originalStyleUrls() {
|
|
9
|
+
return {
|
|
10
|
+
"$": ["post-stepper-item.scss"]
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
static get styleUrls() {
|
|
14
|
+
return {
|
|
15
|
+
"$": ["post-stepper-item.css"]
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.tab-title,.nav-item a{display:inline-block;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);opacity:.7;color:#000;text-decoration:none;background-color:rgba(0,0,0,0);cursor:pointer}.tab-title:hover,.nav-item a:hover{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.tab-title:focus-visible,.nav-item a:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(0,0,0,.6);color:#fff;box-shadow:none}.tab-title:focus-visible::after,.nav-item a:focus-visible::after{content:"";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title:hover,:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title:focus-visible,:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:hover,:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:focus-visible{background-color:rgba(255,255,255,.2)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title,.nav-item a{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title:hover,.tab-title:focus,.tab-title:focus-within,.tab-title:focus-visible,.nav-item a:hover,.nav-item a:focus,.nav-item a:focus-within,.nav-item a:focus-visible{outline:var(--post-core-dimension-2) solid Highlight;outline-offset:calc(var(--post-core-dimension-4)*-1)}}.nav-item{display:inline-block;position:relative;box-sizing:border-box;cursor:default}.nav-item:focus,.nav-item:focus-visible{outline:none;box-shadow:none}.nav-item:focus::after,.nav-item:focus-visible::after{display:none}.nav-item a{color:inherit;text-decoration:none;display:block;width:100%;height:100%;box-sizing:border-box;position:relative;outline:none;cursor:pointer;border-radius:0}.nav-item a:focus{outline:none}.nav-item a:active{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.nav-item a:focus-visible{outline:none !important}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:hover{background-color:rgba(255,255,255,.2)}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:focus-visible{background-color:rgba(255,255,255,.2)}.tab-title.active,.nav-item.active a{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:#fff;color:#000;font-weight:700}.tab-title.active::before,.nav-item.active a::before{content:"";display:block;position:absolute;top:0;right:-1px;left:-1px;height:var(--post-core-dimension-4);background-color:#fc0}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title.active,.nav-item.active a{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title.active::before,.nav-item.active a::before{background-color:Highlight}}:host{display:block}.tab-title{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){.tab-title{background-color:ButtonFace !important}.tab-title:hover{background-color:Highlight !important}}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { version } from "../../../../package";
|
|
3
|
+
import { checkRequiredAndType } from "../../utils/index";
|
|
4
|
+
import { nanoid } from "nanoid";
|
|
5
|
+
/**
|
|
6
|
+
* @slot default - Slot for the content of the tab item. Can contain text or an <a> element for navigation mode.
|
|
7
|
+
*/
|
|
8
|
+
export class PostTabItem {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.mutationObserver = new MutationObserver(this.checkNavigationMode.bind(this));
|
|
11
|
+
this.isNavigationMode = false;
|
|
12
|
+
}
|
|
13
|
+
validateName() {
|
|
14
|
+
checkRequiredAndType(this, 'name', 'string');
|
|
15
|
+
}
|
|
16
|
+
connectedCallback() {
|
|
17
|
+
this.mutationObserver.observe(this.host, {
|
|
18
|
+
childList: true,
|
|
19
|
+
subtree: true,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
componentWillLoad() {
|
|
23
|
+
this.tabId = `tab-${this.host.id || nanoid(6)}`;
|
|
24
|
+
this.checkNavigationMode();
|
|
25
|
+
}
|
|
26
|
+
disconnectedCallback() {
|
|
27
|
+
if (this.mutationObserver) {
|
|
28
|
+
this.mutationObserver.disconnect();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
checkNavigationMode() {
|
|
32
|
+
const hasAnchor = this.host.querySelector('a') !== null;
|
|
33
|
+
this.isNavigationMode = hasAnchor;
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
return (h(Host, { key: '9367e007f35147f7a412968f018089910ecc88a0', id: this.tabId, role: !this.isNavigationMode ? 'tab' : undefined, "data-version": version, "data-navigation-mode": this.isNavigationMode.toString(), "aria-selected": !this.isNavigationMode ? 'false' : undefined, tabindex: !this.isNavigationMode ? '-1' : undefined, class: !this.isNavigationMode ? 'tab-title' : 'nav-item' }, h("slot", { key: 'd805ef623f162d5f66603c3cdeedbb31cc585591' })));
|
|
37
|
+
}
|
|
38
|
+
static get is() { return "post-tab-item"; }
|
|
39
|
+
static get encapsulation() { return "shadow"; }
|
|
40
|
+
static get originalStyleUrls() {
|
|
41
|
+
return {
|
|
42
|
+
"$": ["post-tab-item.scss"]
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
static get styleUrls() {
|
|
46
|
+
return {
|
|
47
|
+
"$": ["post-tab-item.css"]
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
static get properties() {
|
|
51
|
+
return {
|
|
52
|
+
"name": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"attribute": "name",
|
|
55
|
+
"mutable": false,
|
|
56
|
+
"complexType": {
|
|
57
|
+
"original": "string",
|
|
58
|
+
"resolved": "string",
|
|
59
|
+
"references": {}
|
|
60
|
+
},
|
|
61
|
+
"required": true,
|
|
62
|
+
"optional": false,
|
|
63
|
+
"docs": {
|
|
64
|
+
"tags": [],
|
|
65
|
+
"text": "The name of the tab, used to associate it with a tab panel or identify the active tab in panel mode."
|
|
66
|
+
},
|
|
67
|
+
"getter": false,
|
|
68
|
+
"setter": false,
|
|
69
|
+
"reflect": true
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
static get states() {
|
|
74
|
+
return {
|
|
75
|
+
"tabId": {},
|
|
76
|
+
"isNavigationMode": {}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
static get elementRef() { return "host"; }
|
|
80
|
+
static get watchers() {
|
|
81
|
+
return [{
|
|
82
|
+
"propName": "name",
|
|
83
|
+
"methodName": "validateName"
|
|
84
|
+
}];
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -6,16 +6,16 @@ import { checkRequiredAndType } from "../../utils/index";
|
|
|
6
6
|
* @slot default - Slot for placing the content of the tab panel.
|
|
7
7
|
*/
|
|
8
8
|
export class PostTabPanel {
|
|
9
|
-
|
|
10
|
-
checkRequiredAndType(this, '
|
|
9
|
+
validateFor() {
|
|
10
|
+
checkRequiredAndType(this, 'for', 'string');
|
|
11
11
|
}
|
|
12
12
|
componentWillLoad() {
|
|
13
|
-
this.
|
|
13
|
+
this.validateFor();
|
|
14
14
|
// get the id set on the host element or use a random id by default
|
|
15
15
|
this.panelId = `panel-${this.host.id || nanoid(6)}`;
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return (h(Host, { key: '
|
|
18
|
+
return (h(Host, { key: 'dcb273fbc2a98c39813a152cd4a7e50bc86d0004', "data-version": version, id: this.panelId, role: "tabpanel", slot: "panels" }, h("slot", { key: 'c3f13a3b062c53c87b303f57ee267a6ce24c54c8' })));
|
|
19
19
|
}
|
|
20
20
|
static get is() { return "post-tab-panel"; }
|
|
21
21
|
static get encapsulation() { return "shadow"; }
|
|
@@ -31,9 +31,9 @@ export class PostTabPanel {
|
|
|
31
31
|
}
|
|
32
32
|
static get properties() {
|
|
33
33
|
return {
|
|
34
|
-
"
|
|
34
|
+
"for": {
|
|
35
35
|
"type": "string",
|
|
36
|
-
"attribute": "
|
|
36
|
+
"attribute": "for",
|
|
37
37
|
"mutable": false,
|
|
38
38
|
"complexType": {
|
|
39
39
|
"original": "string",
|
|
@@ -44,7 +44,7 @@ export class PostTabPanel {
|
|
|
44
44
|
"optional": false,
|
|
45
45
|
"docs": {
|
|
46
46
|
"tags": [],
|
|
47
|
-
"text": "The name of the
|
|
47
|
+
"text": "The name of the tab that this panel is associated with."
|
|
48
48
|
},
|
|
49
49
|
"getter": false,
|
|
50
50
|
"setter": false,
|
|
@@ -60,8 +60,8 @@ export class PostTabPanel {
|
|
|
60
60
|
static get elementRef() { return "host"; }
|
|
61
61
|
static get watchers() {
|
|
62
62
|
return [{
|
|
63
|
-
"propName": "
|
|
64
|
-
"methodName": "
|
|
63
|
+
"propName": "for",
|
|
64
|
+
"methodName": "validateFor"
|
|
65
65
|
}];
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -1,52 +1,172 @@
|
|
|
1
|
-
import { h, Host } from "@stencil/core";
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
2
|
import { version } from "../../../../package";
|
|
3
|
-
import {
|
|
4
|
-
import { componentOnReady } from "../../utils/index";
|
|
3
|
+
import { fade } from "../../animations/index";
|
|
4
|
+
import { componentOnReady, checkRequiredAndType } from "../../utils/index";
|
|
5
5
|
/**
|
|
6
|
-
* @slot
|
|
7
|
-
* @slot
|
|
8
|
-
* @part tabs - The container element that holds the set of tabs.
|
|
9
|
-
* @part content - The container element that displays the content of the currently active tab.
|
|
6
|
+
* @slot default - Slot for placing tab items. Each tab item should be a <post-tab-item> element.
|
|
7
|
+
* @slot panels - Slot for placing tab panels. Each tab panel should be a <post-tab-panel> element.
|
|
8
|
+
* @part post-tabs - The container element that holds the set of tabs.
|
|
9
|
+
* @part post-tabs-content - The container element that displays the content of the currently active tab. Only available in panels mode.
|
|
10
10
|
*/
|
|
11
11
|
export class PostTabs {
|
|
12
12
|
constructor() {
|
|
13
13
|
this.isLoaded = false;
|
|
14
|
+
this.isNavigationMode = false;
|
|
14
15
|
/**
|
|
15
16
|
* When set to true, this property allows the tabs container to span the
|
|
17
|
+
* Changing this value after initialization has no effect.
|
|
16
18
|
* full width of the screen, from edge to edge.
|
|
17
19
|
*/
|
|
18
20
|
this.fullWidth = false;
|
|
19
21
|
}
|
|
20
22
|
get tabs() {
|
|
21
|
-
return Array.from(this.host.querySelectorAll('post-tab-
|
|
23
|
+
return Array.from(this.host.querySelectorAll('post-tab-item')).filter(tab => tab.closest('post-tabs') === this.host);
|
|
24
|
+
}
|
|
25
|
+
get panels() {
|
|
26
|
+
return Array.from(this.host.querySelectorAll('post-tab-panel')).filter(panel => panel.closest('post-tabs') === this.host);
|
|
27
|
+
}
|
|
28
|
+
validateLabel() {
|
|
29
|
+
if (this.isNavigationMode) {
|
|
30
|
+
checkRequiredAndType(this, 'label', 'string');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
componentWillRender() {
|
|
34
|
+
this.detectMode();
|
|
22
35
|
}
|
|
23
36
|
componentDidLoad() {
|
|
24
37
|
this.moveMisplacedTabs();
|
|
38
|
+
this.moveMisplacedPanels();
|
|
25
39
|
this.enableTabs();
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.
|
|
40
|
+
this.setupContentObserver();
|
|
41
|
+
this.validateLabel();
|
|
42
|
+
if (this.isNavigationMode) {
|
|
43
|
+
const activeTab = this.findActiveNavigationTab();
|
|
44
|
+
if (activeTab) {
|
|
45
|
+
this.activateTab(activeTab);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
const tabToActivate = this.activeTab || this.tabs[0]?.name;
|
|
50
|
+
if (tabToActivate) {
|
|
51
|
+
void this.show(tabToActivate);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
disconnectedCallback() {
|
|
56
|
+
if (this.showing) {
|
|
57
|
+
this.showing.cancel();
|
|
58
|
+
this.showing = null;
|
|
59
|
+
}
|
|
60
|
+
if (this.hiding) {
|
|
61
|
+
this.hiding.cancel();
|
|
62
|
+
this.hiding = null;
|
|
63
|
+
}
|
|
64
|
+
if (this.contentObserver) {
|
|
65
|
+
this.contentObserver.disconnect();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
setupContentObserver() {
|
|
69
|
+
const config = {
|
|
70
|
+
childList: true,
|
|
71
|
+
subtree: true,
|
|
72
|
+
attributes: true,
|
|
73
|
+
attributeFilter: ['data-navigation-mode', 'aria-current'],
|
|
74
|
+
};
|
|
75
|
+
this.contentObserver = new MutationObserver(this.handleContentChange.bind(this));
|
|
76
|
+
this.contentObserver.observe(this.host, config);
|
|
77
|
+
}
|
|
78
|
+
handleContentChange(mutations) {
|
|
79
|
+
const shouldRedetect = this.shouldRedetectMode(mutations);
|
|
80
|
+
const ariaCurrentChanged = this.hasAriaCurrentChanged(mutations);
|
|
81
|
+
if (ariaCurrentChanged && this.isNavigationMode) {
|
|
82
|
+
this.updateActiveNavigationTab();
|
|
83
|
+
}
|
|
84
|
+
if (shouldRedetect) {
|
|
85
|
+
this.handleModeChange();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
shouldRedetectMode(mutations) {
|
|
89
|
+
return mutations.some(mutation => {
|
|
90
|
+
if (mutation.type === 'childList') {
|
|
91
|
+
return mutation.addedNodes.length > 0 || mutation.removedNodes.length > 0;
|
|
92
|
+
}
|
|
93
|
+
if (mutation.type === 'attributes' && mutation.attributeName === 'data-navigation-mode') {
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
return false;
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
hasAriaCurrentChanged(mutations) {
|
|
100
|
+
return mutations.some(mutation => mutation.type === 'attributes' && mutation.attributeName === 'aria-current');
|
|
101
|
+
}
|
|
102
|
+
updateActiveNavigationTab() {
|
|
103
|
+
const activeTab = this.findActiveNavigationTab();
|
|
104
|
+
if (activeTab && activeTab !== this.currentActiveTab) {
|
|
105
|
+
this.activateTab(activeTab);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
handleModeChange() {
|
|
109
|
+
const previousMode = this.isNavigationMode;
|
|
110
|
+
this.detectMode();
|
|
111
|
+
if (previousMode !== this.isNavigationMode) {
|
|
112
|
+
this.enableTabs();
|
|
113
|
+
this.initializeActiveTab();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
initializeActiveTab() {
|
|
117
|
+
if (this.isNavigationMode) {
|
|
118
|
+
const activeTab = this.findActiveNavigationTab();
|
|
119
|
+
if (activeTab) {
|
|
120
|
+
this.activateTab(activeTab);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
const tabToActivate = this.activeTab || this.tabs[0]?.name;
|
|
125
|
+
if (tabToActivate) {
|
|
126
|
+
void this.show(tabToActivate);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
detectMode() {
|
|
131
|
+
// Check for navigation mode by looking for anchor elements in tabs
|
|
132
|
+
// This works even before post-tab-item sets data-navigation-mode attribute
|
|
133
|
+
const hasNavigationTabs = this.tabs.some(tab => {
|
|
134
|
+
const hasAnchor = tab.querySelector('a') !== null;
|
|
135
|
+
const navModeAttr = tab.getAttribute('data-navigation-mode') === 'true';
|
|
136
|
+
return hasAnchor || navModeAttr;
|
|
137
|
+
});
|
|
138
|
+
const hasPanels = this.panels.length > 0;
|
|
139
|
+
if (hasNavigationTabs && hasPanels) {
|
|
140
|
+
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.');
|
|
141
|
+
}
|
|
142
|
+
this.isNavigationMode = hasNavigationTabs;
|
|
143
|
+
}
|
|
144
|
+
findActiveNavigationTab() {
|
|
145
|
+
return (this.tabs.find(tab => {
|
|
146
|
+
const anchor = tab.querySelector('a[aria-current="page"]');
|
|
147
|
+
return anchor !== null;
|
|
148
|
+
}) || null);
|
|
29
149
|
}
|
|
30
150
|
/**
|
|
31
151
|
* Shows the panel with the given name and selects its associated tab.
|
|
32
152
|
* Any other panel that was previously shown becomes hidden and its associated tab is unselected.
|
|
33
153
|
*/
|
|
34
|
-
async show(
|
|
154
|
+
async show(tabName) {
|
|
35
155
|
// do nothing if the tab is already active
|
|
36
|
-
if (
|
|
156
|
+
if (tabName === this.currentActiveTab?.name) {
|
|
37
157
|
return;
|
|
38
158
|
}
|
|
39
|
-
const previousTab = this.
|
|
40
|
-
const newTab = this.host.querySelector(`post-tab-
|
|
159
|
+
const previousTab = this.currentActiveTab;
|
|
160
|
+
const newTab = this.host.querySelector(`post-tab-item[name=${tabName}]`);
|
|
41
161
|
this.activateTab(newTab);
|
|
42
162
|
// if a panel is currently being displayed, remove it from the view and complete the associated animation
|
|
43
163
|
if (this.showing) {
|
|
44
|
-
this.showing.effect['target'].style.display = 'none';
|
|
45
164
|
this.showing.finish();
|
|
165
|
+
this.showing = null;
|
|
46
166
|
}
|
|
47
167
|
// hide the currently visible panel only if no other animation is running
|
|
48
168
|
if (previousTab && !this.showing && !this.hiding)
|
|
49
|
-
this.hidePanel(previousTab.
|
|
169
|
+
this.hidePanel(previousTab.name);
|
|
50
170
|
// wait for any hiding animation to complete before showing the selected tab
|
|
51
171
|
if (this.hiding)
|
|
52
172
|
await this.hiding.finished;
|
|
@@ -55,15 +175,25 @@ export class PostTabs {
|
|
|
55
175
|
if (this.showing)
|
|
56
176
|
await this.showing.finished;
|
|
57
177
|
if (this.isLoaded)
|
|
58
|
-
this.postChange.emit(this.
|
|
178
|
+
this.postChange.emit(this.currentActiveTab.name);
|
|
59
179
|
}
|
|
60
180
|
moveMisplacedTabs() {
|
|
61
181
|
if (!this.tabs)
|
|
62
182
|
return;
|
|
63
183
|
this.tabs.forEach(tab => {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
184
|
+
// Tab items should go in the default slot, so remove any slot attribute
|
|
185
|
+
if (tab.getAttribute('slot')) {
|
|
186
|
+
tab.removeAttribute('slot');
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
moveMisplacedPanels() {
|
|
191
|
+
if (!this.panels)
|
|
192
|
+
return;
|
|
193
|
+
this.panels.forEach(panel => {
|
|
194
|
+
if (panel.getAttribute('slot') !== 'panels') {
|
|
195
|
+
panel.setAttribute('slot', 'panels');
|
|
196
|
+
}
|
|
67
197
|
});
|
|
68
198
|
}
|
|
69
199
|
enableTabs() {
|
|
@@ -71,19 +201,25 @@ export class PostTabs {
|
|
|
71
201
|
return;
|
|
72
202
|
this.tabs.forEach(async (tab) => {
|
|
73
203
|
await componentOnReady(tab);
|
|
74
|
-
//
|
|
204
|
+
// In navigation mode, navigation is handled by the consumer's routing
|
|
205
|
+
if (this.isNavigationMode) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
// Panel mode: set up ARIA relationships and event handlers
|
|
75
209
|
if (tab.getAttribute('aria-controls'))
|
|
76
210
|
return;
|
|
77
|
-
const tabPanel = this.getPanel(tab.
|
|
78
|
-
|
|
79
|
-
|
|
211
|
+
const tabPanel = this.getPanel(tab.name);
|
|
212
|
+
if (tabPanel) {
|
|
213
|
+
tab.setAttribute('aria-controls', tabPanel.id);
|
|
214
|
+
tabPanel.setAttribute('aria-labelledby', tab.id);
|
|
215
|
+
}
|
|
80
216
|
tab.addEventListener('click', () => {
|
|
81
|
-
void this.show(tab.
|
|
217
|
+
void this.show(tab.name);
|
|
82
218
|
});
|
|
83
219
|
tab.addEventListener('keydown', (e) => {
|
|
84
220
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
85
221
|
e.preventDefault();
|
|
86
|
-
void this.show(tab.
|
|
222
|
+
void this.show(tab.name);
|
|
87
223
|
}
|
|
88
224
|
});
|
|
89
225
|
tab.addEventListener('keydown', (e) => {
|
|
@@ -92,44 +228,51 @@ export class PostTabs {
|
|
|
92
228
|
});
|
|
93
229
|
});
|
|
94
230
|
// if the currently active tab was removed from the DOM then select the first one
|
|
95
|
-
if (this.
|
|
96
|
-
void this.show(this.tabs[0]?.
|
|
231
|
+
if (this.currentActiveTab && !this.currentActiveTab.isConnected) {
|
|
232
|
+
void this.show(this.tabs[0]?.name);
|
|
97
233
|
}
|
|
98
234
|
}
|
|
99
235
|
activateTab(tab) {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
this.
|
|
103
|
-
this.
|
|
236
|
+
// Deactivate previous tab
|
|
237
|
+
if (this.currentActiveTab) {
|
|
238
|
+
this.currentActiveTab.classList.remove('active');
|
|
239
|
+
if (!this.isNavigationMode) {
|
|
240
|
+
this.currentActiveTab.setAttribute('aria-selected', 'false');
|
|
241
|
+
this.currentActiveTab.setAttribute('tabindex', '-1');
|
|
242
|
+
}
|
|
104
243
|
}
|
|
105
|
-
tab.setAttribute('aria-selected', 'true');
|
|
106
|
-
tab.setAttribute('tabindex', '0');
|
|
107
244
|
tab.classList.add('active');
|
|
108
|
-
this.
|
|
245
|
+
if (!this.isNavigationMode) {
|
|
246
|
+
tab.setAttribute('aria-selected', 'true');
|
|
247
|
+
tab.setAttribute('tabindex', '0');
|
|
248
|
+
}
|
|
249
|
+
this.currentActiveTab = tab;
|
|
109
250
|
}
|
|
110
251
|
hidePanel(panelName) {
|
|
111
252
|
const previousPanel = this.getPanel(panelName);
|
|
112
253
|
if (!previousPanel)
|
|
113
254
|
return;
|
|
114
|
-
this.hiding =
|
|
255
|
+
this.hiding = fade(previousPanel, 'out');
|
|
115
256
|
this.hiding.onfinish = () => {
|
|
116
257
|
previousPanel.style.display = 'none';
|
|
117
258
|
this.hiding = null;
|
|
118
259
|
};
|
|
119
260
|
}
|
|
120
261
|
showSelectedPanel() {
|
|
121
|
-
const panel = this.getPanel(this.
|
|
262
|
+
const panel = this.getPanel(this.currentActiveTab.name);
|
|
263
|
+
if (!panel)
|
|
264
|
+
return;
|
|
122
265
|
panel.style.display = 'block';
|
|
123
266
|
// prevent the initially selected panel from fading in
|
|
124
267
|
if (!this.isLoaded)
|
|
125
268
|
return;
|
|
126
|
-
this.showing =
|
|
269
|
+
this.showing = fade(panel, 'in');
|
|
127
270
|
this.showing.onfinish = () => {
|
|
128
271
|
this.showing = null;
|
|
129
272
|
};
|
|
130
273
|
}
|
|
131
274
|
getPanel(name) {
|
|
132
|
-
return this.host.querySelector(`post-tab-panel[
|
|
275
|
+
return this.host.querySelector(`post-tab-panel[for=${name}]`);
|
|
133
276
|
}
|
|
134
277
|
navigateTabs(tab, key) {
|
|
135
278
|
const activeTabIndex = Array.from(this.tabs).indexOf(tab);
|
|
@@ -143,9 +286,14 @@ export class PostTabs {
|
|
|
143
286
|
if (!nextTab)
|
|
144
287
|
return;
|
|
145
288
|
nextTab.focus();
|
|
289
|
+
void this.show(nextTab.name);
|
|
146
290
|
}
|
|
147
291
|
render() {
|
|
148
|
-
|
|
292
|
+
const TabsContainer = this.isNavigationMode ? 'nav' : 'div';
|
|
293
|
+
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: () => {
|
|
294
|
+
this.moveMisplacedTabs();
|
|
295
|
+
this.enableTabs();
|
|
296
|
+
} }))), !this.isNavigationMode && (h("div", { key: '4ea329e77c108dd2b25db6efa116a68a3a415af6', class: "tab-content", part: "post-tabs-content" }, h("slot", { key: '28efc229a3f3f6f4f9cee157ff453c860c5ffa9e', name: "panels", onSlotchange: () => this.moveMisplacedPanels() })))));
|
|
149
297
|
}
|
|
150
298
|
static get is() { return "post-tabs"; }
|
|
151
299
|
static get encapsulation() { return "shadow"; }
|
|
@@ -161,25 +309,20 @@ export class PostTabs {
|
|
|
161
309
|
}
|
|
162
310
|
static get properties() {
|
|
163
311
|
return {
|
|
164
|
-
"
|
|
312
|
+
"activeTab": {
|
|
165
313
|
"type": "string",
|
|
166
|
-
"attribute": "active-
|
|
314
|
+
"attribute": "active-tab",
|
|
167
315
|
"mutable": false,
|
|
168
316
|
"complexType": {
|
|
169
|
-
"original": "
|
|
317
|
+
"original": "string",
|
|
170
318
|
"resolved": "string",
|
|
171
|
-
"references": {
|
|
172
|
-
"HTMLPostTabPanelElement": {
|
|
173
|
-
"location": "global",
|
|
174
|
-
"id": "global::HTMLPostTabPanelElement"
|
|
175
|
-
}
|
|
176
|
-
}
|
|
319
|
+
"references": {}
|
|
177
320
|
},
|
|
178
321
|
"required": false,
|
|
179
322
|
"optional": true,
|
|
180
323
|
"docs": {
|
|
181
324
|
"tags": [],
|
|
182
|
-
"text": "The name of the panel that is initially
|
|
325
|
+
"text": "The name of the tab in the panel mode that is initially active.\nChanging this value after initialization has no effect.\nIf not specified, defaults to the first tab."
|
|
183
326
|
},
|
|
184
327
|
"getter": false,
|
|
185
328
|
"setter": false,
|
|
@@ -198,15 +341,39 @@ export class PostTabs {
|
|
|
198
341
|
"optional": false,
|
|
199
342
|
"docs": {
|
|
200
343
|
"tags": [],
|
|
201
|
-
"text": "When set to true, this property allows the tabs container to span the\nfull width of the screen, from edge to edge."
|
|
344
|
+
"text": "When set to true, this property allows the tabs container to span the\nChanging this value after initialization has no effect.\nfull width of the screen, from edge to edge."
|
|
202
345
|
},
|
|
203
346
|
"getter": false,
|
|
204
347
|
"setter": false,
|
|
205
348
|
"reflect": true,
|
|
206
349
|
"defaultValue": "false"
|
|
350
|
+
},
|
|
351
|
+
"label": {
|
|
352
|
+
"type": "string",
|
|
353
|
+
"attribute": "label",
|
|
354
|
+
"mutable": false,
|
|
355
|
+
"complexType": {
|
|
356
|
+
"original": "string",
|
|
357
|
+
"resolved": "string",
|
|
358
|
+
"references": {}
|
|
359
|
+
},
|
|
360
|
+
"required": false,
|
|
361
|
+
"optional": true,
|
|
362
|
+
"docs": {
|
|
363
|
+
"tags": [],
|
|
364
|
+
"text": "The accessible label for the tabs component in navigation mode."
|
|
365
|
+
},
|
|
366
|
+
"getter": false,
|
|
367
|
+
"setter": false,
|
|
368
|
+
"reflect": true
|
|
207
369
|
}
|
|
208
370
|
};
|
|
209
371
|
}
|
|
372
|
+
static get states() {
|
|
373
|
+
return {
|
|
374
|
+
"isNavigationMode": {}
|
|
375
|
+
};
|
|
376
|
+
}
|
|
210
377
|
static get events() {
|
|
211
378
|
return [{
|
|
212
379
|
"method": "postChange",
|
|
@@ -216,7 +383,7 @@ export class PostTabs {
|
|
|
216
383
|
"composed": true,
|
|
217
384
|
"docs": {
|
|
218
385
|
"tags": [],
|
|
219
|
-
"text": "An event emitted after the active tab changes, when the fade in transition of its associated panel is finished.\nThe payload is the name of the newly
|
|
386
|
+
"text": "An event emitted after the active tab changes, when the fade in transition of its associated panel is finished.\nThe payload is the name of the newly active tab.\nOnly emitted in panel mode."
|
|
220
387
|
},
|
|
221
388
|
"complexType": {
|
|
222
389
|
"original": "string",
|
|
@@ -229,9 +396,9 @@ export class PostTabs {
|
|
|
229
396
|
return {
|
|
230
397
|
"show": {
|
|
231
398
|
"complexType": {
|
|
232
|
-
"signature": "(
|
|
399
|
+
"signature": "(tabName: string) => Promise<void>",
|
|
233
400
|
"parameters": [{
|
|
234
|
-
"name": "
|
|
401
|
+
"name": "tabName",
|
|
235
402
|
"type": "string",
|
|
236
403
|
"docs": ""
|
|
237
404
|
}],
|
|
@@ -240,9 +407,9 @@ export class PostTabs {
|
|
|
240
407
|
"location": "global",
|
|
241
408
|
"id": "global::Promise"
|
|
242
409
|
},
|
|
243
|
-
"
|
|
410
|
+
"HTMLPostTabItemElement": {
|
|
244
411
|
"location": "global",
|
|
245
|
-
"id": "global::
|
|
412
|
+
"id": "global::HTMLPostTabItemElement"
|
|
246
413
|
}
|
|
247
414
|
},
|
|
248
415
|
"return": "Promise<void>"
|
|
@@ -255,4 +422,10 @@ export class PostTabs {
|
|
|
255
422
|
};
|
|
256
423
|
}
|
|
257
424
|
static get elementRef() { return "host"; }
|
|
425
|
+
static get watchers() {
|
|
426
|
+
return [{
|
|
427
|
+
"propName": "label",
|
|
428
|
+
"methodName": "validateLabel"
|
|
429
|
+
}];
|
|
430
|
+
}
|
|
258
431
|
}
|
|
@@ -26,7 +26,7 @@ export class PostTogglebutton {
|
|
|
26
26
|
this.host.addEventListener('keydown', (e) => this.handleKeydown(e));
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
|
-
return (h(Host, { key: '
|
|
29
|
+
return (h(Host, { key: 'a526ab3b0ae14c93bb4e1a8dc6d3ded4ff1bf014', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: 'e8a5bdd99d9270cfcf014306a8d7fe8a2b6b79ba' })));
|
|
30
30
|
}
|
|
31
31
|
static get is() { return "post-togglebutton"; }
|
|
32
32
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
: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:280px;min-height:32px;word-wrap:break-word;white-space:normal}
|
|
1
|
+
: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}
|