@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
|
@@ -13,7 +13,7 @@ import { checkRequiredAndType, checkEmptyOrOneOf, EventFrom } from "../../utils/
|
|
|
13
13
|
import { version } from "../../../../package";
|
|
14
14
|
import { SWITCH_VARIANTS } from "./switch-variants";
|
|
15
15
|
import { nanoid } from "nanoid";
|
|
16
|
-
export class
|
|
16
|
+
export class PostLanguageMenu {
|
|
17
17
|
constructor() {
|
|
18
18
|
this.menuId = `p${nanoid(11)}`;
|
|
19
19
|
this.listSpanId = `list-span-${nanoid(11)}`;
|
|
@@ -23,13 +23,13 @@ export class PostLanguageSwitch {
|
|
|
23
23
|
this.variant = 'list';
|
|
24
24
|
}
|
|
25
25
|
get languageOptions() {
|
|
26
|
-
return Array.from(this.host.querySelectorAll('post-language-
|
|
26
|
+
return Array.from(this.host.querySelectorAll('post-language-menu-item'));
|
|
27
27
|
}
|
|
28
28
|
validateCaption() {
|
|
29
|
-
checkRequiredAndType(this, '
|
|
29
|
+
checkRequiredAndType(this, 'textChangeLanguage', 'string');
|
|
30
30
|
}
|
|
31
31
|
validateDescription() {
|
|
32
|
-
checkRequiredAndType(this, '
|
|
32
|
+
checkRequiredAndType(this, 'textCurrentLanguage', 'string');
|
|
33
33
|
}
|
|
34
34
|
validateVariant() {
|
|
35
35
|
checkEmptyOrOneOf(this, 'variant', SWITCH_VARIANTS);
|
|
@@ -44,11 +44,11 @@ export class PostLanguageSwitch {
|
|
|
44
44
|
this.updateChildrenVariant();
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* Listen for the postChange event and guard it to run only for events originating from a <post-language-
|
|
47
|
+
* Listen for the postChange event and guard it to run only for events originating from a <post-language-menu-item> element.
|
|
48
48
|
*/
|
|
49
49
|
handlePostChange(event) {
|
|
50
50
|
this.activeLang = event.detail;
|
|
51
|
-
// Update the active state in the children post-language-
|
|
51
|
+
// Update the active state in the children post-language-menu-item components
|
|
52
52
|
this.languageOptions.forEach(lang => {
|
|
53
53
|
if (lang.code && lang.code === this.activeLang) {
|
|
54
54
|
lang.setAttribute('active', '');
|
|
@@ -65,43 +65,43 @@ export class PostLanguageSwitch {
|
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Handles cases where the language switch is being rendered before options are available
|
|
68
|
-
* @param event Initially emitted by <post-
|
|
68
|
+
* @param event Initially emitted by <post-language-menu-item>
|
|
69
69
|
*/
|
|
70
70
|
handleInitiallyActive(event) {
|
|
71
71
|
this.activeLang = event.detail;
|
|
72
72
|
}
|
|
73
|
-
// Update post-language-
|
|
73
|
+
// Update post-language-menu-item variant to have the correct style
|
|
74
74
|
updateChildrenVariant() {
|
|
75
75
|
this.languageOptions.forEach(el => {
|
|
76
76
|
el.setAttribute('variant', this.variant);
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
renderList() {
|
|
80
|
-
return (h(Host, { "data-version": version }, h("div", { class: "post-language-
|
|
80
|
+
return (h(Host, { "data-version": version }, h("div", { class: "post-language-menu-list", role: "list", "aria-label": this.textChangeLanguage, "aria-describedby": this.listSpanId }, h("span", { id: this.listSpanId, class: "visually-hidden" }, this.textCurrentLanguage), h("slot", null))));
|
|
81
81
|
}
|
|
82
82
|
renderDropdown() {
|
|
83
|
-
return (h(Host, { "data-version": version }, h("post-menu-trigger", { for: this.menuId }, h("button", { class: "post-language-
|
|
83
|
+
return (h(Host, { "data-version": version }, h("post-menu-trigger", { for: this.menuId }, h("button", { class: "post-language-menu-trigger" }, this.activeLang, h("span", { class: "visually-hidden" }, this.textChangeLanguage), h("span", { class: "visually-hidden" }, this.textCurrentLanguage), h("post-icon", { "aria-hidden": "true", name: "chevrondown" }))), h("post-menu", { id: this.menuId, class: "post-language-menu-dropdown-container", label: this.textChangeLanguage, placement: "bottom-end" }, h("slot", null))));
|
|
84
84
|
}
|
|
85
85
|
render() {
|
|
86
86
|
return this.variant === 'list' ? this.renderList() : this.renderDropdown();
|
|
87
87
|
}
|
|
88
|
-
static get is() { return "post-language-
|
|
88
|
+
static get is() { return "post-language-menu"; }
|
|
89
89
|
static get encapsulation() { return "shadow"; }
|
|
90
90
|
static get originalStyleUrls() {
|
|
91
91
|
return {
|
|
92
|
-
"$": ["post-language-
|
|
92
|
+
"$": ["post-language-menu.scss"]
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
static get styleUrls() {
|
|
96
96
|
return {
|
|
97
|
-
"$": ["post-language-
|
|
97
|
+
"$": ["post-language-menu.css"]
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
100
|
static get properties() {
|
|
101
101
|
return {
|
|
102
|
-
"
|
|
102
|
+
"textChangeLanguage": {
|
|
103
103
|
"type": "string",
|
|
104
|
-
"attribute": "
|
|
104
|
+
"attribute": "text-change-language",
|
|
105
105
|
"mutable": false,
|
|
106
106
|
"complexType": {
|
|
107
107
|
"original": "string",
|
|
@@ -116,11 +116,11 @@ export class PostLanguageSwitch {
|
|
|
116
116
|
},
|
|
117
117
|
"getter": false,
|
|
118
118
|
"setter": false,
|
|
119
|
-
"reflect":
|
|
119
|
+
"reflect": true
|
|
120
120
|
},
|
|
121
|
-
"
|
|
121
|
+
"textCurrentLanguage": {
|
|
122
122
|
"type": "string",
|
|
123
|
-
"attribute": "
|
|
123
|
+
"attribute": "text-current-language",
|
|
124
124
|
"mutable": false,
|
|
125
125
|
"complexType": {
|
|
126
126
|
"original": "string",
|
|
@@ -135,7 +135,7 @@ export class PostLanguageSwitch {
|
|
|
135
135
|
},
|
|
136
136
|
"getter": false,
|
|
137
137
|
"setter": false,
|
|
138
|
-
"reflect":
|
|
138
|
+
"reflect": true
|
|
139
139
|
},
|
|
140
140
|
"variant": {
|
|
141
141
|
"type": "string",
|
|
@@ -148,7 +148,7 @@ export class PostLanguageSwitch {
|
|
|
148
148
|
"SwitchVariant": {
|
|
149
149
|
"location": "import",
|
|
150
150
|
"path": "./switch-variants",
|
|
151
|
-
"id": "src/components/post-language-
|
|
151
|
+
"id": "src/components/post-language-menu/switch-variants.ts::SwitchVariant"
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
},
|
|
@@ -173,10 +173,10 @@ export class PostLanguageSwitch {
|
|
|
173
173
|
static get elementRef() { return "host"; }
|
|
174
174
|
static get watchers() {
|
|
175
175
|
return [{
|
|
176
|
-
"propName": "
|
|
176
|
+
"propName": "textChangeLanguage",
|
|
177
177
|
"methodName": "validateCaption"
|
|
178
178
|
}, {
|
|
179
|
-
"propName": "
|
|
179
|
+
"propName": "textCurrentLanguage",
|
|
180
180
|
"methodName": "validateDescription"
|
|
181
181
|
}, {
|
|
182
182
|
"propName": "variant",
|
|
@@ -191,7 +191,7 @@ export class PostLanguageSwitch {
|
|
|
191
191
|
"capture": false,
|
|
192
192
|
"passive": false
|
|
193
193
|
}, {
|
|
194
|
-
"name": "
|
|
194
|
+
"name": "postLanguageMenuItemInitiallyActive",
|
|
195
195
|
"method": "handleInitiallyActive",
|
|
196
196
|
"target": undefined,
|
|
197
197
|
"capture": false,
|
|
@@ -200,5 +200,5 @@ export class PostLanguageSwitch {
|
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
__decorate([
|
|
203
|
-
EventFrom('post-language-
|
|
204
|
-
],
|
|
203
|
+
EventFrom('post-language-menu-item')
|
|
204
|
+
], PostLanguageMenu.prototype, "handlePostChange", null);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
post-language-menu-item{display:inline-block}post-language-menu-item button{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-menu-item button{background-color:ButtonFace !important}post-language-menu-item button:hover{background-color:Highlight !important}}post-language-menu-item button .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}post-language-menu-item a{color:var(--post-current-fg);text-decoration:none}post-language-menu-item :is(a,button){cursor:pointer;display:flex;align-items:center;justify-content:center;width:100%;height:100%;text-transform:uppercase}post-language-menu-item :is(a,button){outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}post-language-menu-item :is(a,button):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-menu-item :is(a,button):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-language-menu-item :is(a,button):is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-menu-item :is(a,button):is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}post-language-menu-item:where([variant=list]) :is(a,button){padding-inline:0;width:40px;height:40px;border-radius:2px}post-language-menu-item:where([variant=list]) :is(a,button):hover{color:#504f4b}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-menu-item:where([variant=list]) :is(a,button){border:1px solid ButtonBorder;color:ButtonText}}post-language-menu-item:where([variant=list])[active]:not([active=false]) :is(a,button){background-color:#050400 !important;color:#fff;pointer-events:none}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-menu-item:where([variant=list])[active]:not([active=false]) :is(a,button){background-color:Highlight !important;color:HighlightText}}post-language-menu-item:where([variant=menu]){min-width:72px}post-language-menu-item:where([variant=menu])[active]:not([active=false]){display:none}post-language-menu-item:where([variant=menu]) :is(a,button){padding-block:13px;padding-inline:16px;box-sizing:border-box;justify-content:flex-start;position:relative;border-radius:0}post-language-menu-item:where([variant=menu]) :is(a,button):hover{color:#fff;background-color:#504f4b}post-language-menu-item:where([variant=menu]):first-child :is(a,button){border-start-start-radius:4px;border-start-end-radius:4px}post-language-menu-item:where([variant=menu]):last-child :is(a,button){border-end-start-radius:4px;border-end-end-radius:4px}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Host, h, } from "@stencil/core";
|
|
2
2
|
import { checkEmptyOrType, checkRequiredAndType, checkEmptyOrOneOf, checkEmptyOrUrl, } from "../../utils/index";
|
|
3
3
|
import { version } from "../../../../package";
|
|
4
|
-
import { SWITCH_VARIANTS } from "../post-language-
|
|
4
|
+
import { SWITCH_VARIANTS } from "../post-language-menu/switch-variants";
|
|
5
5
|
/**
|
|
6
6
|
* @slot default - Slot for placing the content inside the anchor or button.
|
|
7
7
|
*/
|
|
8
|
-
export class
|
|
8
|
+
export class PostLanguageMenuItem {
|
|
9
9
|
validateCode() {
|
|
10
10
|
checkRequiredAndType(this, 'code', 'string');
|
|
11
11
|
}
|
|
@@ -23,10 +23,10 @@ export class PostLanguageOption {
|
|
|
23
23
|
this.validateName();
|
|
24
24
|
this.validateUrl();
|
|
25
25
|
if (!this.name && this.isNameRequired()) {
|
|
26
|
-
throw new Error('The "name" property of the post-language-
|
|
26
|
+
throw new Error('The "name" property of the post-language-menu-item component is required when the full language name is not displayed.');
|
|
27
27
|
}
|
|
28
28
|
if (this.active) {
|
|
29
|
-
this.
|
|
29
|
+
this.postLanguageMenuItemInitiallyActive.emit(this.code);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
@@ -49,17 +49,17 @@ export class PostLanguageOption {
|
|
|
49
49
|
this.emitChange();
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
return (h(Host, { key: '
|
|
52
|
+
return (h(Host, { key: '0a0f6a2e04d61991696e86fa9a20b34d154e89ac', "data-version": version, role: this.variant === 'list' ? 'listitem' : undefined }, this.url ? (h("a", { "aria-current": this.active ? 'page' : undefined, href: this.url, hrefLang: lang, lang: lang, onClick: () => this.emitChange(), onKeyDown: emitOnKeyDown }, h("slot", null), h("span", { class: "visually-hidden" }, this.name))) : (h("button", { "aria-current": this.active ? 'true' : undefined, lang: lang, onClick: () => this.emitChange(), onKeyDown: emitOnKeyDown }, h("slot", null), h("span", { class: "visually-hidden" }, this.name)))));
|
|
53
53
|
}
|
|
54
|
-
static get is() { return "post-language-
|
|
54
|
+
static get is() { return "post-language-menu-item"; }
|
|
55
55
|
static get originalStyleUrls() {
|
|
56
56
|
return {
|
|
57
|
-
"$": ["post-language-
|
|
57
|
+
"$": ["post-language-menu-item.scss"]
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
static get styleUrls() {
|
|
61
61
|
return {
|
|
62
|
-
"$": ["post-language-
|
|
62
|
+
"$": ["post-language-menu-item.css"]
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
static get properties() {
|
|
@@ -81,7 +81,7 @@ export class PostLanguageOption {
|
|
|
81
81
|
},
|
|
82
82
|
"getter": false,
|
|
83
83
|
"setter": false,
|
|
84
|
-
"reflect":
|
|
84
|
+
"reflect": true
|
|
85
85
|
},
|
|
86
86
|
"active": {
|
|
87
87
|
"type": "boolean",
|
|
@@ -112,8 +112,8 @@ export class PostLanguageOption {
|
|
|
112
112
|
"references": {
|
|
113
113
|
"SwitchVariant": {
|
|
114
114
|
"location": "import",
|
|
115
|
-
"path": "../post-language-
|
|
116
|
-
"id": "src/components/post-language-
|
|
115
|
+
"path": "../post-language-menu/switch-variants",
|
|
116
|
+
"id": "src/components/post-language-menu/switch-variants.ts::SwitchVariant"
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
},
|
|
@@ -121,7 +121,7 @@ export class PostLanguageOption {
|
|
|
121
121
|
"optional": true,
|
|
122
122
|
"docs": {
|
|
123
123
|
"tags": [],
|
|
124
|
-
"text": "To communicate the variant prop from the parent (post-language-
|
|
124
|
+
"text": "To communicate the variant prop from the parent (post-language-menu) component to the child (post-language-menu-item) component. See parent docs for a description about the property itself."
|
|
125
125
|
},
|
|
126
126
|
"getter": false,
|
|
127
127
|
"setter": false,
|
|
@@ -184,8 +184,8 @@ export class PostLanguageOption {
|
|
|
184
184
|
"references": {}
|
|
185
185
|
}
|
|
186
186
|
}, {
|
|
187
|
-
"method": "
|
|
188
|
-
"name": "
|
|
187
|
+
"method": "postLanguageMenuItemInitiallyActive",
|
|
188
|
+
"name": "postLanguageMenuItemInitiallyActive",
|
|
189
189
|
"bubbles": true,
|
|
190
190
|
"cancelable": true,
|
|
191
191
|
"composed": true,
|
|
@@ -25,7 +25,7 @@ export class PostLinkarea {
|
|
|
25
25
|
this.mutationObserver.disconnect();
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
return (h(Host, { key: '
|
|
28
|
+
return (h(Host, { key: 'fd870766c9624ebe770dcaafc4382a87dc07d1b0', "data-version": version, onClick: (e) => this.dispatchClick(e) }, h("slot", { key: '41865e43ad277b5b529d7891601130aa39e6943d' })));
|
|
29
29
|
}
|
|
30
30
|
static get is() { return "post-linkarea"; }
|
|
31
31
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
:host,.logo{display:inline-block}:host,:host .logo>svg,.logo,.logo .logo>svg{height:100%}.description{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.logo-link{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}.logo-link:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.logo-link:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.logo-link:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.logo-link:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.logo-link
|
|
1
|
+
:host,.logo{display:inline-block}:host,:host .logo>svg,.logo,.logo .logo>svg{height:100%}.description{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.logo-link{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}.logo-link:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.logo-link:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.logo-link:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.logo-link:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.logo-link{outline-offset:calc(
|
|
2
|
+
-2px - var(--post-device-border-width-focus)
|
|
3
|
+
) !important}.logo-link :focus,:focus-visible{border-radius:.5rem}
|
|
@@ -20,7 +20,7 @@ export class PostLogo {
|
|
|
20
20
|
render() {
|
|
21
21
|
const logoLink = this.url && (typeof this.url === 'string' ? this.url : this.url.href);
|
|
22
22
|
const LogoTag = logoLink ? 'a' : 'span';
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: '39444d3dd1a87425c7134de5af6ad623a68197c0', "data-version": version }, h(LogoTag, { key: '8f41d8c85212f7fde23c11fa0a0fb506deb5e0c9', class: `logo ${logoLink ? 'logo-link' : ''}`, ...(logoLink ? { href: logoLink } : {}) }, h("span", { key: '06b777726f42914b941a980bce9dd4ba3dc3637e', class: "description" }, h("slot", { key: 'd95f99a2d3b09ffab6d0e7c11b99178d6c1fb7ef', onSlotchange: () => this.checkDescription() })), h("svg", { key: '57fa969750327b0907cd3f5abefd14b52d176dd8', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 72 72", "aria-hidden": "true" }, h("g", { key: '61172060743d8d155bcde7d636da3c5569ec1951', id: "Logo" }, h("rect", { key: 'ef042aea64e01c52d241ff599290646af309f868', fill: "#ffcc00", x: "0", y: "0", width: "72", height: "72" }), h("polygon", { key: 'ef5b2d4666dc676157fddacfe9b3f15c017e2e02', fill: "#ff0000", points: "34,32.3 34,19 19.7,19 19.7,29.1 10,29.1 10,42.9 19.7,42.9 19.7,53 34,53 34,39.7 30.6,39.7 30.6,49.8 23.1,49.8 23.1,39.7 13.4,39.7 13.4,32.3 23.1,32.3 23.1,22.2 30.6,22.2 30.6,32.3" }), h("path", { key: '816fd96b39a89ba22571e7e3257758e39b2599b0', d: "M53.56234,31.10526c0,2.41272-1.99154,4.29475-4.51723,4.29475H45.2v-8.3h3.84511C51.66802,27.1,53.56234,28.78889,53.56234,31.10526z M50.69666,19H36v34h9.2V42.9h5.49666c6.75131,0,11.9971-5.15137,11.9971-11.8057C62.69376,24.39136,57.35099,19,50.69666,19z" }))))));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "post-logo"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--post-icon-chevrondown: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxzeW1ib2wgaWQ9ImktY2hldnJvbmRvd24iPjxzeW1ib2wgaWQ9InMxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBkPSJNMi4wMSA1LjIyYzAtLjE5LjA3LS4zOC4yMi0uNTMuMjktLjI5Ljc3LS4yOSAxLjA2IDBsNC43MiA0LjcyIDQuNzItNC43MmMuMjktLjI5Ljc3LS4yOSAxLjA2IDBzLjI5Ljc3IDAgMS4wNmwtNS43OCA1Ljc4LTUuNzgtNS43OGEuNzQuNzQgMCAwIDEtLjIyLS41MyIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InMyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMy4yNiA3Ljg1YzAtLjIyLjA4LS40NS4yNi0uNjIuMzQtLjM0LjktLjM0IDEuMjQgMGw3LjI2IDcuMjYgNy4yNi03LjI2Yy4zNC0uMzQuOS0uMzQgMS4yNCAwcy4zNC45IDAgMS4yNGwtOC41IDguNS04LjUxLTguNWEuOS45IDAgMCAxLS4yNi0uNjJaIi8+PC9zeW1ib2w+PHN5bWJvbCBpZD0iczMyIiB2aWV3Qm94PSIwIDAgMzIgMzIiPjxwYXRoIGQ9Ik00LjUgMTAuNTRjMC0uMjYuMS0uNTEuMjktLjcxYS45OTYuOTk2IDAgMCAxIDEuNDEgMGw5Ljc5IDkuNzkgOS44LTkuOGEuOTk2Ljk5NiAwIDEgMSAxLjQxIDEuNDFMMTUuOTkgMjIuNDQgNC44IDExLjI1Yy0uMi0uMi0uMjktLjQ1LS4yOS0uNzFaIi8+PC9zeW1ib2w+PHN5bWJvbCBpZD0iczQwIiB2aWV3Qm94PSIwIDAgNDAgNDAiPjxwYXRoIGQ9Ik01LjggMTMuMTdhMS4xMjMgMS4xMjMgMCAwIDEgMS45Mi0uOEwyMC4wNSAyNC43bDEyLjM0LTEyLjM0Yy40NC0uNDQgMS4xNS0uNDQgMS41OSAwcy40NCAxLjE1IDAgMS41OUwyMC4wNSAyNy44OCA2LjEzIDEzLjk3Yy0uMjItLjIyLS4zMy0uNTEtLjMzLS44Ii8+PC9zeW1ib2w+PHN5bWJvbCBpZD0iczQ4IiB2aWV3Qm94PSIwIDAgNDggNDgiPjxwYXRoIGQ9Ik03IDE1Ljg3YzAtLjMyLjEyLS42NC4zNy0uODhhMS4yNSAxLjI1IDAgMCAxIDEuNzcgMGwxNC44NyAxNC44NyAxNC44OC0xNC44OGMuNDktLjQ5IDEuMjgtLjQ5IDEuNzcgMHMuNDkgMS4yOCAwIDEuNzdMMjQuMDIgMzMuMzkgNy4zNyAxNi43NWMtLjI0LS4yNC0uMzctLjU2LS4zNy0uODgiLz48L3N5bWJvbD48c3ltYm9sIGlkPSJzNjQiIHZpZXdCb3g9IjAgMCA2NCA2NCI+PHBhdGggZD0iTTkuNjMgMjEuMjRhMS4zOCAxLjM4IDAgMCAxIDIuMzUtLjk3TDMyLjAxIDQwLjNsMjAuMDQtMjAuMDRjLjU0LS41NCAxLjQxLS41NCAxLjk1IDBzLjU0IDEuNDEgMCAxLjk1TDMyLjAxIDQ0LjE5IDEwLjAzIDIyLjIyYy0uMjctLjI3LS40LS42Mi0uNC0uOTdaTTAgLjAzaDY0djY0SDB6Ii8+PC9zeW1ib2w+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczE2LCBub25lKSIgaHJlZj0iI3MxNiIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXMyNCwgbm9uZSkiIGhyZWY9IiNzMjQiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zMzIsIG5vbmUpIiBocmVmPSIjczMyIi8+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczQwLCBub25lKSIgaHJlZj0iI3M0MCIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXM0OCwgbm9uZSkiIGhyZWY9IiNzNDgiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zNjQsIG5vbmUpIiBocmVmPSIjczY0Ii8+PC9zeW1ib2w+PC9kZWZzPjxzdHlsZT5AbWVkaWEgKG1heC13aWR0aDogMjMuOThweCkge2d7LS1zMTY6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogMjRweCkgYW5kIChtYXgtd2lkdGg6IDMxLjk4cHgpIHtney0tczI0OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDMycHgpIGFuZCAobWF4LXdpZHRoOiAzOS45OHB4KSB7Z3stLXMzMjpibG9jazt9fUBtZWRpYSAobWluLXdpZHRoOiA0MHB4KSBhbmQgKG1heC13aWR0aDogNDcuOThweCkge2d7LS1zNDA6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogNDhweCkgYW5kIChtYXgtd2lkdGg6IDYzLjk4cHgpIHtney0tczQ4OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDY0cHgpIHtney0tczY0OmJsb2NrO319PC9zdHlsZT48Zz48dXNlIGhyZWY9IiNpLWNoZXZyb25kb3duIi8+PC9nPjwvc3ZnPg==")}post-mainnavigation post-list-item>a{text-decoration:none;border-radius:0}post-mainnavigation post-list-item post-megadropdown-trigger button{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;text-align:start}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-mainnavigation post-list-item post-megadropdown-trigger button{background-color:ButtonFace !important}post-mainnavigation post-list-item post-megadropdown-trigger button:hover{background-color:Highlight !important}}post-mainnavigation post-list-item>a,post-mainnavigation post-list-item post-megadropdown-trigger button{flex:0 0 fit-content;white-space:nowrap;display:flex;align-items:center;justify-content:space-between}post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item post-megadropdown-trigger button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}post-mainnavigation post-list-item>a:focus-visible,post-mainnavigation post-list-item post-megadropdown-trigger button:focus-visible{border-radius:4px;outline-offset:-2px !important}post-mainnavigation>button::after,post-mainnavigation post-megadropdown-trigger button::after{content:"";mask-image:var(--post-icon-chevrondown);background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;height:24px;width:24px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-mainnavigation>button,post-mainnavigation post-megadropdown-trigger button{border:1px solid ButtonBorder !important}post-mainnavigation>button:hover::after,post-mainnavigation>button[aria-expanded=true]::after,post-mainnavigation post-megadropdown-trigger button:hover::after,post-mainnavigation post-megadropdown-trigger button[aria-expanded=true]::after{color:HighlightText}}@media screen and (min-width: 1024px){post-mainnavigation{display:flex;overflow:hidden;height:var(--post-main-navigation-height, 0);background:#fff;user-select:none}post-mainnavigation nav{flex:1 1 auto;overflow:hidden;scroll-behavior:smooth}post-mainnavigation .scroll-control{cursor:pointer;z-index:5;padding:1rem;background:#fff;box-shadow:var(--post-device-elevation-500);line-height:1}post-mainnavigation .scroll-control.scroll-left{margin-inline-end:-3rem}post-mainnavigation .scroll-control.scroll-right{margin-inline-start:-3rem}post-mainnavigation .scroll-control.d-none{display:none}post-mainnavigation .scroll-control post-icon{font-size:1rem}post-mainnavigation post-list>[role=list]{flex-direction:row;max-width:100vw}post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{position:sticky;padding-inline:12px;height:var(--post-main-navigation-height, 0);gap:4px;font-size:16px;z-index:4}}@media screen and (min-width: 1024px)and (max-width: 1023.98px){post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{z-index:5}}@media screen and (min-width: 1024px){post-mainnavigation post-list-item>a .nav-el-active,post-mainnavigation post-list-item>button .nav-el-active,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-active{font-weight:700;text-align:center;opacity:0}}@media screen and (min-width: 1024px){post-mainnavigation post-list-item>a .nav-el-inactive,post-mainnavigation post-list-item>button .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-inactive{position:absolute;opacity:1;text-align:center;width:100%;inset-inline-start:0}}@media screen and (min-width: 1024px){post-mainnavigation post-list-item>a.active,post-mainnavigation post-list-item>a[aria-current=page]:not(post-megadropdown *),post-mainnavigation post-list-item>a[aria-expanded=true],post-mainnavigation post-list-item>button.active,post-mainnavigation post-list-item>button[aria-current=page]:not(post-megadropdown *),post-mainnavigation post-list-item>button[aria-expanded=true],post-mainnavigation post-list-item post-megadropdown-trigger button.active,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-current=page]:not(post-megadropdown *),post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true]{background-color:#050400;color:#fff;font-weight:700}post-mainnavigation post-list-item>a.active .nav-el-active,post-mainnavigation post-list-item>a[aria-current=page]:not(post-megadropdown *) .nav-el-active,post-mainnavigation post-list-item>a[aria-expanded=true] .nav-el-active,post-mainnavigation post-list-item>button.active .nav-el-active,post-mainnavigation post-list-item>button[aria-current=page]:not(post-megadropdown *) .nav-el-active,post-mainnavigation post-list-item>button[aria-expanded=true] .nav-el-active,post-mainnavigation post-list-item post-megadropdown-trigger button.active .nav-el-active,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-current=page]:not(post-megadropdown *) .nav-el-active,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true] .nav-el-active{opacity:1}post-mainnavigation post-list-item>a.active .nav-el-inactive,post-mainnavigation post-list-item>a[aria-current=page]:not(post-megadropdown *) .nav-el-inactive,post-mainnavigation post-list-item>a[aria-expanded=true] .nav-el-inactive,post-mainnavigation post-list-item>button.active .nav-el-inactive,post-mainnavigation post-list-item>button[aria-current=page]:not(post-megadropdown *) .nav-el-inactive,post-mainnavigation post-list-item>button[aria-expanded=true] .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button.active .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-current=page]:not(post-megadropdown *) .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true] .nav-el-inactive{opacity:0}}@media screen and (min-width: 1024px){post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item>button:hover,post-mainnavigation post-list-item post-megadropdown-trigger button:hover{background-color:#504f4b;color:#fff}}@media screen and (min-width: 1024px)and (max-width: 599.98px){post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{font-size:14px}}@media screen and (min-width: 1024px){post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{padding-inline-end:12px;transition:border-block-end-color 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-mainnavigation post-list-item>button .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-inactive{width:calc(100% - 28px)}post-mainnavigation post-list-item>button::after,post-mainnavigation post-list-item post-megadropdown-trigger button::after{transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-mainnavigation post-list-item>button[aria-expanded=true]::after,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true]::after{transform:rotate(180deg)}}@media screen and (min-width: 1024px){post-mainnavigation post-megadropdown button:not(:is(post-closebutton *)),post-mainnavigation post-megadropdown a{width:100%;min-width:100%;height:48px;padding-inline:8px 12px;gap:16px;font-weight:400;position:relative}post-mainnavigation post-megadropdown button:not(:is(post-closebutton *))::before,post-mainnavigation post-megadropdown a::before{content:"";background-color:#050400;bottom:0;width:100%;height:1px;position:absolute;left:0}post-mainnavigation post-megadropdown button:not(:is(post-closebutton *)).active,post-mainnavigation post-megadropdown button:not(:is(post-closebutton *))[aria-current=page],post-mainnavigation post-megadropdown button:not(:is(post-closebutton *))[aria-expanded=true],post-mainnavigation post-megadropdown a.active,post-mainnavigation post-megadropdown a[aria-current=page],post-mainnavigation post-megadropdown a[aria-expanded=true]{background-color:#050400;color:#fff}post-mainnavigation post-megadropdown button:not(:is(post-closebutton *)):hover,post-mainnavigation post-megadropdown a:hover{background-color:#504f4b;color:#fff}post-mainnavigation post-megadropdown button:not(:is(post-closebutton *)):hover::before,post-mainnavigation post-megadropdown a:hover::before{background-color:#504f4b}}@media screen and (max-width: 1023.98px){post-mainnavigation nav{transform:none !important}post-mainnavigation .scroll-control{display:none}post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{width:100%;min-width:100%;height:48px;padding-inline:8px 12px;gap:16px;font-weight:400;position:relative}post-mainnavigation post-list-item>a::before,post-mainnavigation post-list-item>button::before,post-mainnavigation post-list-item post-megadropdown-trigger button::before{content:"";background-color:#050400;bottom:0;width:100%;height:1px;position:absolute;left:0}post-mainnavigation post-list-item>a.active,post-mainnavigation post-list-item>a[aria-current=page],post-mainnavigation post-list-item>a[aria-expanded=true],post-mainnavigation post-list-item>button.active,post-mainnavigation post-list-item>button[aria-current=page],post-mainnavigation post-list-item>button[aria-expanded=true],post-mainnavigation post-list-item post-megadropdown-trigger button.active,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-current=page],post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true]{background-color:#050400;color:#fff}post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item>button:hover,post-mainnavigation post-list-item post-megadropdown-trigger button:hover{background-color:#504f4b;color:#fff}post-mainnavigation post-list-item>a:hover::before,post-mainnavigation post-list-item>button:hover::before,post-mainnavigation post-list-item post-megadropdown-trigger button:hover::before{background-color:#504f4b}post-mainnavigation post-list-item>a .nav-el-inactive,post-mainnavigation post-list-item>button .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-inactive{display:none}post-mainnavigation>button::after,post-mainnavigation post-megadropdown-trigger button::after{transform:rotate(-90deg)}}
|
|
1
|
+
:host{display:flex;user-select:none}@media screen and (min-width: 1024px){:host{overflow:hidden}}nav{flex:1 1 auto}@media screen and (min-width: 1024px){nav{scroll-behavior:smooth;max-width:100vw;overflow:hidden;height:var(--post-main-navigation-height)}}.scroll-control{z-index:1;cursor:pointer;padding:1rem;background:#fff;box-shadow:var(--post-device-elevation-500);line-height:1}.scroll-control.scroll-left{margin-inline-end:-3rem}.scroll-control.scroll-right{margin-inline-start:-3rem}.scroll-control.d-none{display:none}.scroll-control post-icon{font-size:1rem}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { checkRequiredAndType } from "../../utils/index";
|
|
2
3
|
import { version } from "../../../../package";
|
|
3
4
|
const SCROLL_REPEAT_INTERVAL = 100; // Interval for repeated scrolling when holding down scroll button
|
|
4
5
|
const NAVBAR_DISABLE_DURATION = 400; // Duration to temporarily disable navbar interactions during scrolling
|
|
5
6
|
export class PostMainnavigation {
|
|
7
|
+
validateTextMain() {
|
|
8
|
+
checkRequiredAndType(this, 'textMain', 'string');
|
|
9
|
+
}
|
|
6
10
|
constructor() {
|
|
7
11
|
this.canScrollLeft = false;
|
|
8
12
|
this.canScrollRight = false;
|
|
9
13
|
this.scrollRight = this.scrollRight.bind(this);
|
|
10
14
|
this.scrollLeft = this.scrollLeft.bind(this);
|
|
11
|
-
this.handleMutations = this.handleMutations.bind(this);
|
|
12
15
|
this.checkScrollability = this.checkScrollability.bind(this);
|
|
13
16
|
this.resizeObserver = new ResizeObserver(this.checkScrollability);
|
|
14
|
-
this.mutationObserver = new MutationObserver(this.
|
|
17
|
+
this.mutationObserver = new MutationObserver(this.checkScrollability);
|
|
15
18
|
}
|
|
16
19
|
componentDidLoad() {
|
|
20
|
+
this.validateTextMain();
|
|
17
21
|
setTimeout(() => {
|
|
18
|
-
this.fixLayoutShift();
|
|
19
22
|
this.checkScrollability();
|
|
20
23
|
});
|
|
21
24
|
// Observe the navbar for size changes
|
|
@@ -40,30 +43,8 @@ export class PostMainnavigation {
|
|
|
40
43
|
if (this.scrollRepeatInterval)
|
|
41
44
|
clearInterval(this.scrollRepeatInterval);
|
|
42
45
|
}
|
|
43
|
-
async handleMutations(mutations) {
|
|
44
|
-
const addedNodes = mutations.flatMap((mutation) => {
|
|
45
|
-
return Array.from(mutation.addedNodes);
|
|
46
|
-
});
|
|
47
|
-
// Wait for all elements to be hydrated
|
|
48
|
-
await Promise.all(addedNodes.map((item) => item.componentOnReady ? item.componentOnReady() : Promise.resolve(item)));
|
|
49
|
-
this.fixLayoutShift();
|
|
50
|
-
this.checkScrollability();
|
|
51
|
-
}
|
|
52
46
|
get navigationItems() {
|
|
53
|
-
return Array.from(this.
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Hack to fix the layout shift due to bold text on active elements
|
|
57
|
-
*/
|
|
58
|
-
fixLayoutShift() {
|
|
59
|
-
this.navigationItems
|
|
60
|
-
.filter(item => !item.matches(':has(.nav-el-active)'))
|
|
61
|
-
.forEach(item => {
|
|
62
|
-
item.innerHTML = `
|
|
63
|
-
<span class="nav-el-active">${item.innerHTML}</span>
|
|
64
|
-
<span class="nav-el-inactive" aria-hidden="true">${item.innerHTML}</span>
|
|
65
|
-
`;
|
|
66
|
-
});
|
|
47
|
+
return Array.from(this.host.querySelectorAll('a:not(post-megadropdown *), post-megadropdown-trigger'));
|
|
67
48
|
}
|
|
68
49
|
/**
|
|
69
50
|
* Returns whether scrolling is enabled in either the left or right direction.
|
|
@@ -102,7 +83,7 @@ export class PostMainnavigation {
|
|
|
102
83
|
}, SCROLL_REPEAT_INTERVAL);
|
|
103
84
|
}
|
|
104
85
|
scrollRight() {
|
|
105
|
-
const scrollRightLeftEdge =
|
|
86
|
+
const scrollRightLeftEdge = this.host.shadowRoot
|
|
106
87
|
.querySelector('.scroll-right')
|
|
107
88
|
.getBoundingClientRect().left;
|
|
108
89
|
for (const navigationItem of this.navigationItems) {
|
|
@@ -116,7 +97,7 @@ export class PostMainnavigation {
|
|
|
116
97
|
}
|
|
117
98
|
}
|
|
118
99
|
scrollLeft() {
|
|
119
|
-
const scrollLeftRightEdge =
|
|
100
|
+
const scrollLeftRightEdge = this.host.shadowRoot
|
|
120
101
|
.querySelector('.scroll-left')
|
|
121
102
|
.getBoundingClientRect().right;
|
|
122
103
|
for (const navigationItem of this.navigationItems.reverse()) {
|
|
@@ -142,9 +123,10 @@ export class PostMainnavigation {
|
|
|
142
123
|
}, NAVBAR_DISABLE_DURATION);
|
|
143
124
|
}
|
|
144
125
|
render() {
|
|
145
|
-
return (h(Host, { key: '
|
|
126
|
+
return (h(Host, { key: '14ca9714f09e1dbbe8c976b8947db07906ec2eb8', version: version, class: this.canScroll ? 'scrollable' : '' }, h("div", { key: 'e886823d21e52db04afc91ecbd12149c47d69038', "aria-hidden": "true", class: { 'scroll-control scroll-left': true, 'd-none': !this.canScrollLeft }, onMouseDown: e => this.handleScrollButtonClick(e, 'left') }, h("post-icon", { key: '3afd56232da3cf120038b68c714c560db16ac30e', "aria-hidden": "true", name: "chevronleft" })), h("nav", { key: '69c39d75c1f90f01c12904c98fc6e3f8de2ba09d', ref: el => (this.navbar = el), "aria-label": this.textMain }, h("slot", { key: '9251d7cec53c05bf9146d0b2c75533c50f7fe070' })), h("div", { key: '649e7ec3c9f65447a2da965bb7fe0c92b3ff8207', "aria-hidden": "true", class: { 'scroll-control scroll-right': true, 'd-none': !this.canScrollRight }, onMouseDown: e => this.handleScrollButtonClick(e, 'right') }, h("post-icon", { key: 'ac2823ab5195c59ea2831ffb24a1d8a033f7266a', "aria-hidden": "true", name: "chevronright" }))));
|
|
146
127
|
}
|
|
147
128
|
static get is() { return "post-mainnavigation"; }
|
|
129
|
+
static get encapsulation() { return "shadow"; }
|
|
148
130
|
static get originalStyleUrls() {
|
|
149
131
|
return {
|
|
150
132
|
"$": ["./post-mainnavigation.scss"]
|
|
@@ -155,12 +137,42 @@ export class PostMainnavigation {
|
|
|
155
137
|
"$": ["post-mainnavigation.css"]
|
|
156
138
|
};
|
|
157
139
|
}
|
|
140
|
+
static get properties() {
|
|
141
|
+
return {
|
|
142
|
+
"textMain": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"attribute": "text-main",
|
|
145
|
+
"mutable": false,
|
|
146
|
+
"complexType": {
|
|
147
|
+
"original": "string",
|
|
148
|
+
"resolved": "string",
|
|
149
|
+
"references": {}
|
|
150
|
+
},
|
|
151
|
+
"required": true,
|
|
152
|
+
"optional": false,
|
|
153
|
+
"docs": {
|
|
154
|
+
"tags": [],
|
|
155
|
+
"text": "Defines the accessible label for the navigation element. This text is used as the `aria-label` attribute to provide screen reader users with a description of the navigation's purpose."
|
|
156
|
+
},
|
|
157
|
+
"getter": false,
|
|
158
|
+
"setter": false,
|
|
159
|
+
"reflect": true
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
}
|
|
158
163
|
static get states() {
|
|
159
164
|
return {
|
|
160
165
|
"canScrollLeft": {},
|
|
161
166
|
"canScrollRight": {}
|
|
162
167
|
};
|
|
163
168
|
}
|
|
169
|
+
static get elementRef() { return "host"; }
|
|
170
|
+
static get watchers() {
|
|
171
|
+
return [{
|
|
172
|
+
"propName": "textMain",
|
|
173
|
+
"methodName": "validateTextMain"
|
|
174
|
+
}];
|
|
175
|
+
}
|
|
164
176
|
static get listeners() {
|
|
165
177
|
return [{
|
|
166
178
|
"name": "mouseup",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
*,::before,::after{box-sizing:border-box}.megadropdown{position:absolute;inset-inline:0;overflow-y:auto;background-color:#fafafa;box-shadow:var(--post-device-elevation-300)}@media screen and (min-width: 1024px){.megadropdown{z-index:-1;inset-block-start:100%;max-height:calc(100vh - var(--post-header-height) - 3rem);padding:2rem 2.5rem 2.5rem}.megadropdown.slide-in{animation:slide-down 350ms forwards}.megadropdown.slide-out{animation:slide-up 350ms forwards}}@media screen and (max-width: 1023.98px){.megadropdown{z-index:1;inset-block-start:var(--post-header-navigation-current-inset);overscroll-behavior:contain;height:calc(min(var(--post-header-scroll-parent-height, 100dvh),100dvh) - var(--post-header-height));padding-inline:var(--post-burger-menu-padding-inline);padding-block:1.5rem;display:flex;flex-direction:column}}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.megadropdown{border-block-end:1px solid CanvasText}}.megadropdown-title{margin-block:0 1rem;font-weight:950}@media screen and (min-width: 600px)and (max-width: 1023.98px){.megadropdown-title{font-size:1.25rem}}@media screen and (min-width: 0)and (max-width: 599.98px){.megadropdown-title{font-size:1.125rem}}.back-button{display:inline-flex;position:relative;align-items:center;justify-content:center;max-width:100%;overflow:hidden;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;border-width:var(--post-device-border-width-default);border-style:solid;border-radius:var(--post-device-border-radius-round);background-color:rgba(0,0,0,0);box-shadow:none;font-family:inherit;font-weight:var(--post-device-font-weight-bold);text-decoration:none;white-space:nowrap;cursor:pointer;min-height:var(--post-device-sizing-interactive-button-height-4);gap:var(--post-device-spacing-gap-inline-11);padding:0 var(--post-device-spacing-padding-inline-7);border-color:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-enabled-bg);color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg);order:-1;width:fit-content;padding-inline:0}.back-button:hover{text-decoration:none}.back-button:disabled{border-style:var(--post-core-border-style-dash)}.back-button{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}.back-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.back-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.back-button:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.back-button:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.back-button:is(a){color:LinkText;border:unset}.back-button:is(button){background-color:ButtonFace !important;border:1px solid ButtonBorder !important}.back-button:not(:disabled,.disabled):is(button):hover{background-color:Highlight !important}.back-button:not(:disabled,.disabled):is(button):hover>post-icon{color:HighlightText !important}}.back-button>post-icon{width:var(--post-device-sizing-interactive-button-icon-5);height:var(--post-device-sizing-interactive-button-icon-5)}.back-button:hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}@media screen and (min-width: 600px)and (max-width: 1023.98px){.back-button{margin-block-end:2rem}}@media screen and (min-width: 0)and (max-width: 599.98px){.back-button{margin-block-end:1.5rem}}.close-button{position:absolute;inset-block-start:1rem;inset-inline-end:1rem}@media screen and (max-width: 1023.98px){.close-button{display:none}}
|