@swisspost/design-system-components 10.4.0 → 10.5.0
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/cjs/breakpoints-Kruvy8Dm.js +47 -0
- package/dist/cjs/{create-validator-decorator-BtgLWaMJ.js → create-validator-decorator-u-Byhihe.js} +1 -1
- package/dist/cjs/{event-from-CwMw19f8.js → event-from-CTcQxB9-.js} +19 -13
- package/dist/cjs/{index-CW10QvjR.js → index-CXnlZiX8.js} +1 -1
- package/dist/cjs/{breakpoints-B0Olgvgc.js → index-CggFmZ8n.js} +0 -42
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{one-of-vJeW7S4_.js → one-of-LGG0uEIi.js} +1 -1
- package/dist/cjs/{package-CL8OSAS4.js → package-DdU-rENe.js} +1 -1
- package/dist/cjs/{pattern-Zmn3wpyp.js → pattern-B-csvfNt.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +7 -7
- package/dist/cjs/post-autocomplete.cjs.entry.js +70 -55
- package/dist/cjs/post-avatar.cjs.entry.js +7 -7
- package/dist/cjs/post-back-to-top.cjs.entry.js +25 -13
- package/dist/cjs/post-banner.cjs.entry.js +6 -13
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +18 -10
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +118 -67
- package/dist/cjs/post-closebutton_14.cjs.entry.js +404 -210
- package/dist/cjs/post-collapsible_2.cjs.entry.js +8 -8
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-date-picker.cjs.entry.js +8 -8
- package/dist/cjs/post-footer.cjs.entry.js +8 -8
- package/dist/cjs/post-linkarea.cjs.entry.js +3 -3
- package/dist/cjs/post-listbox-option.cjs.entry.js +4 -4
- package/dist/cjs/post-listbox.cjs.entry.js +6 -6
- package/dist/cjs/post-number-input.cjs.entry.js +7 -6
- package/dist/cjs/post-pagination.cjs.entry.js +6 -6
- package/dist/cjs/post-popover-trigger.cjs.entry.js +7 -7
- package/dist/cjs/post-popover.cjs.entry.js +10 -10
- package/dist/cjs/post-progressbar.cjs.entry.js +5 -5
- package/dist/cjs/post-rating.cjs.entry.js +7 -7
- package/dist/cjs/post-side-navigation-trigger.cjs.entry.js +8 -8
- package/dist/cjs/post-side-navigation.cjs.entry.js +9 -9
- package/dist/cjs/post-stepper-item.cjs.entry.js +3 -3
- package/dist/cjs/post-stepper.cjs.entry.js +8 -8
- package/dist/cjs/post-tab-item.cjs.entry.js +7 -7
- package/dist/cjs/post-tab-panel.cjs.entry.js +7 -7
- package/dist/cjs/post-tabs.cjs.entry.js +8 -8
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +7 -7
- package/dist/cjs/post-tooltip.cjs.entry.js +6 -6
- package/dist/cjs/{required-DRnPokVn.js → required-bJzxBV-V.js} +1 -1
- package/dist/cjs/{type-CNcU_-B2.js → type-CGPnqGY1.js} +1 -1
- package/dist/cjs/{url-DgJ3lXQz.js → url-Dxdd6tWj.js} +1 -1
- package/dist/collection/components/post-autocomplete/post-autocomplete.js +65 -50
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +19 -7
- package/dist/collection/components/post-banner/post-banner.js +2 -17
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -1
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +29 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +113 -62
- package/dist/collection/components/post-closebutton/post-closebutton.js +7 -8
- package/dist/collection/components/post-collapsible/post-collapsible.js +1 -1
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +1 -1
- package/dist/collection/components/post-date-picker/post-date-picker.js +2 -2
- package/dist/collection/components/post-footer/post-footer.js +2 -2
- package/dist/collection/components/post-header/post-header.js +2 -2
- package/dist/collection/components/post-icon/post-icon.js +1 -1
- package/dist/collection/components/post-language-menu/post-language-menu.js +1 -1
- package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
- package/dist/collection/components/post-listbox/post-listbox.js +2 -2
- package/dist/collection/components/post-listbox-option/post-listbox-option.js +2 -2
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +1 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +1 -1
- package/dist/collection/components/post-menu/post-menu.js +23 -8
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
- package/dist/collection/components/post-number-input/post-number-input.js +2 -2
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-popover/post-popover.js +3 -3
- package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +2 -2
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +47 -23
- package/dist/collection/components/post-progressbar/post-progressbar.js +1 -1
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-side-navigation/post-side-navigation.css +1 -1
- package/dist/collection/components/post-side-navigation/post-side-navigation.js +1 -1
- package/dist/collection/components/post-side-navigation-trigger/post-side-navigation-trigger.js +1 -1
- package/dist/collection/components/post-stepper/post-stepper.js +1 -1
- package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
- package/dist/collection/components/post-tab-item/post-tab-item.js +2 -2
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +2 -2
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +2 -2
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
- package/dist/collection/utils/breakpoints.js +11 -9
- package/dist/collection/utils/closable-target.js +38 -0
- package/dist/collection/utils/event-from.js +18 -13
- package/dist/collection/utils/floating-ui.js +72 -0
- package/dist/collection/utils/index.js +1 -0
- package/dist/components/breakpoints.js +1 -1
- package/dist/components/event-from.js +1 -1
- package/dist/components/index2.js +1 -0
- package/dist/components/package.js +1 -1
- package/dist/components/post-autocomplete.js +1 -1
- package/dist/components/post-back-to-top.js +1 -1
- package/dist/components/post-banner.js +1 -1
- package/dist/components/post-breadcrumb-item.js +1 -1
- package/dist/components/post-breadcrumbs.js +1 -1
- package/dist/components/post-closebutton2.js +1 -1
- package/dist/components/post-collapsible-trigger2.js +1 -1
- package/dist/components/post-collapsible2.js +1 -1
- package/dist/components/post-date-picker.js +1 -1
- package/dist/components/post-footer.js +1 -1
- package/dist/components/post-header.js +1 -1
- package/dist/components/post-icon2.js +1 -1
- package/dist/components/post-linkarea.js +1 -1
- package/dist/components/post-listbox-option.js +1 -1
- package/dist/components/post-listbox.js +1 -1
- package/dist/components/post-logo.js +1 -1
- package/dist/components/post-mainnavigation.js +1 -1
- package/dist/components/post-megadropdown-trigger.js +1 -1
- package/dist/components/post-megadropdown.js +1 -1
- package/dist/components/post-menu-trigger2.js +1 -1
- package/dist/components/post-menu2.js +1 -1
- package/dist/components/post-number-input.js +1 -1
- package/dist/components/post-popover-trigger.js +1 -1
- package/dist/components/post-popover.js +1 -1
- package/dist/components/post-popovercontainer2.js +1 -1
- package/dist/components/post-progressbar.js +1 -1
- package/dist/components/post-rating.js +1 -1
- package/dist/components/post-side-navigation-trigger.js +1 -1
- package/dist/components/post-side-navigation.js +1 -1
- package/dist/components/post-stepper-item.js +1 -1
- package/dist/components/post-stepper.js +1 -1
- package/dist/components/post-tab-item.js +1 -1
- package/dist/components/post-tab-panel.js +1 -1
- package/dist/components/post-tabs.js +1 -1
- package/dist/components/post-togglebutton2.js +1 -1
- package/dist/components/post-tooltip-trigger.js +1 -1
- package/dist/components/post-tooltip.js +1 -1
- package/dist/components/react/index.js +1 -1
- package/dist/components/react/p-0nNMdSBr.js +1 -0
- package/dist/components/react/p-5LuCes5o.js +1 -0
- package/dist/components/react/{p-4wtxqxXu.js → p-B2jsM_Ov.js} +1 -1
- package/dist/components/react/p-BEcxHjuM.js +1 -0
- package/dist/{post-components/p-C-lLRsYC.js → components/react/p-BdLRXQqY.js} +1 -1
- package/dist/components/react/{p-Df31eVdi.js → p-C8vlYfD-.js} +1 -1
- package/dist/components/react/{p-9RCG8BWM.js → p-CLeWLMJn.js} +1 -1
- package/dist/components/react/p-CVVXnYLU.js +1 -0
- package/dist/components/react/p-CnN4Jdtv.js +1 -0
- package/dist/components/react/{p-Bwko4UKh.js → p-CoCua20S.js} +1 -1
- package/dist/components/react/p-CuVhOs8F.js +1 -0
- package/dist/components/react/{p-B1kYo1K9.js → p-D3rq_-Qk.js} +1 -1
- package/dist/components/react/{p-CSmrQ__L.js → p-DD-Sl3Ji.js} +1 -1
- package/dist/components/react/{p-D-imniYA.js → p-DasK590W.js} +1 -1
- package/dist/components/react/p-DeO0rZ1T.js +1 -0
- package/dist/components/react/p-DiFAKI9o.js +1 -0
- package/dist/components/react/p-Ny5VnydI.js +1 -0
- package/dist/components/react/{p-BSb74xQy.js → p-PYoaz_Xl.js} +1 -1
- package/dist/components/react/{p-CwmQwirr.js → p-SBBBSmJM.js} +1 -1
- package/dist/components/react/p-bR8vy6-s.js +1 -0
- package/dist/components/react/post-accordion-item.js +1 -1
- package/dist/components/react/post-accordion.js +1 -1
- package/dist/components/react/post-autocomplete.js +1 -1
- package/dist/components/react/post-avatar.js +1 -1
- package/dist/components/react/post-back-to-top.js +1 -1
- package/dist/components/react/post-banner.js +1 -1
- package/dist/components/react/post-breadcrumb-item.js +1 -1
- package/dist/components/react/post-breadcrumbs.js +1 -1
- 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-date-picker.js +1 -1
- package/dist/components/react/post-footer.js +1 -1
- package/dist/components/react/post-header.js +1 -1
- package/dist/components/react/post-icon.js +1 -1
- package/dist/components/react/post-language-menu-item.js +1 -1
- package/dist/components/react/post-language-menu.js +1 -1
- package/dist/components/react/post-linkarea.js +1 -1
- package/dist/components/react/post-listbox-option.js +1 -1
- package/dist/components/react/post-listbox.js +1 -1
- package/dist/components/react/post-logo.js +1 -1
- package/dist/components/react/post-mainnavigation.js +1 -1
- package/dist/components/react/post-megadropdown-trigger.js +1 -1
- package/dist/components/react/post-megadropdown.js +1 -1
- 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-number-input.js +1 -1
- package/dist/components/react/post-pagination.js +1 -1
- package/dist/components/react/post-popover-trigger.js +1 -1
- package/dist/components/react/post-popover.js +1 -1
- package/dist/components/react/post-popovercontainer.js +1 -1
- package/dist/components/react/post-progressbar.js +1 -1
- package/dist/components/react/post-rating.js +1 -1
- package/dist/components/react/post-side-navigation-trigger.js +1 -1
- package/dist/components/react/post-side-navigation.js +1 -1
- package/dist/components/react/post-stepper-item.js +1 -1
- package/dist/components/react/post-stepper.js +1 -1
- package/dist/components/react/post-tab-item.js +1 -1
- package/dist/components/react/post-tab-panel.js +1 -1
- package/dist/components/react/post-tabs.js +1 -1
- package/dist/components/react/post-togglebutton.js +1 -1
- package/dist/components/react/post-tooltip-trigger.js +1 -1
- package/dist/components/react/post-tooltip.js +1 -1
- package/dist/docs.json +62 -16
- package/dist/esm/breakpoints-I1j7a0bW.js +45 -0
- package/dist/esm/{create-validator-decorator-CNUaQboh.js → create-validator-decorator-CbYxqPSB.js} +1 -1
- package/dist/esm/{event-from-rEfV4v4a.js → event-from-BEcxHjuM.js} +19 -14
- package/dist/esm/{index-sn7oKSwC.js → index-D3NdvMgy.js} +1 -1
- package/dist/esm/{breakpoints-BQ3HlJPr.js → index-bR8vy6-s.js} +1 -42
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{one-of-C6Ironyj.js → one-of-Mx4vYjem.js} +1 -1
- package/dist/esm/{package-tTf1w3A9.js → package-Ny5VnydI.js} +1 -1
- package/dist/esm/{pattern-57oD--q3.js → pattern-CqQVrJPN.js} +1 -1
- package/dist/esm/post-accordion_2.entry.js +7 -7
- package/dist/esm/post-autocomplete.entry.js +70 -55
- package/dist/esm/post-avatar.entry.js +7 -7
- package/dist/esm/post-back-to-top.entry.js +25 -13
- package/dist/esm/post-banner.entry.js +6 -13
- package/dist/esm/post-breadcrumb-item.entry.js +18 -10
- package/dist/esm/post-breadcrumbs.entry.js +118 -67
- package/dist/esm/post-closebutton_14.entry.js +403 -209
- package/dist/esm/post-collapsible_2.entry.js +8 -8
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-date-picker.entry.js +8 -8
- package/dist/esm/post-footer.entry.js +8 -8
- package/dist/esm/post-linkarea.entry.js +3 -3
- package/dist/esm/post-listbox-option.entry.js +4 -4
- package/dist/esm/post-listbox.entry.js +6 -6
- package/dist/esm/post-number-input.entry.js +6 -5
- package/dist/esm/post-pagination.entry.js +6 -6
- package/dist/esm/post-popover-trigger.entry.js +7 -7
- package/dist/esm/post-popover.entry.js +10 -10
- package/dist/esm/post-progressbar.entry.js +5 -5
- package/dist/esm/post-rating.entry.js +7 -7
- package/dist/esm/post-side-navigation-trigger.entry.js +8 -8
- package/dist/esm/post-side-navigation.entry.js +9 -9
- package/dist/esm/post-stepper-item.entry.js +3 -3
- package/dist/esm/post-stepper.entry.js +8 -8
- package/dist/esm/post-tab-item.entry.js +7 -7
- package/dist/esm/post-tab-panel.entry.js +7 -7
- package/dist/esm/post-tabs.entry.js +8 -8
- package/dist/esm/post-tooltip-trigger.entry.js +7 -7
- package/dist/esm/post-tooltip.entry.js +6 -6
- package/dist/esm/{required-D2rl2XZJ.js → required-CxvSCYJj.js} +1 -1
- package/dist/esm/{type-CGynDrfh.js → type-CYB7_Yi8.js} +1 -1
- package/dist/esm/{url-1wyUfUv-.js → url-DOwgyBfp.js} +1 -1
- package/dist/post-components/p-030bfaa1.entry.js +1 -0
- package/dist/post-components/p-1d67c427.entry.js +1 -0
- package/dist/post-components/{p-212c71e4.entry.js → p-2379e498.entry.js} +1 -1
- package/dist/post-components/p-29e6c2a4.entry.js +1 -0
- package/dist/post-components/{p-a01ea634.entry.js → p-2cb843f4.entry.js} +1 -1
- package/dist/post-components/{p-96bf6b01.entry.js → p-2ee255c1.entry.js} +1 -1
- package/dist/post-components/{p-b535fc10.entry.js → p-3a75186d.entry.js} +1 -1
- package/dist/post-components/{p-3149d866.entry.js → p-44718c1a.entry.js} +1 -1
- package/dist/post-components/{p-167191e5.entry.js → p-4e2bb082.entry.js} +1 -1
- package/dist/post-components/p-5a44b217.entry.js +1 -0
- package/dist/post-components/p-65e12f2c.entry.js +1 -0
- package/dist/post-components/p-665d877f.entry.js +1 -0
- package/dist/post-components/p-781efeb8.entry.js +1 -0
- package/dist/post-components/p-795eb5ad.entry.js +1 -0
- package/dist/post-components/p-894b20dd.entry.js +1 -0
- package/dist/post-components/p-9ad2216e.entry.js +1 -0
- package/dist/post-components/p-BEcxHjuM.js +1 -0
- package/dist/post-components/p-BmpkvdQk.js +1 -0
- package/dist/post-components/p-C-FunIfQ.js +1 -0
- package/dist/post-components/p-CCciE4QO.js +1 -0
- package/dist/post-components/p-D3NdvMgy.js +2 -0
- package/dist/post-components/p-I1j7a0bW.js +1 -0
- package/dist/post-components/p-Ny5VnydI.js +1 -0
- package/dist/post-components/p-X1vWfzMK.js +1 -0
- package/dist/post-components/{p-beed9922.entry.js → p-a9223467.entry.js} +1 -1
- package/dist/post-components/{p-e8d9723e.entry.js → p-b6e231a8.entry.js} +1 -1
- package/dist/post-components/{p-70fbe469.entry.js → p-b856263a.entry.js} +1 -1
- package/dist/post-components/p-bR8vy6-s.js +1 -0
- package/dist/post-components/{p-58422de1.entry.js → p-c7a39444.entry.js} +1 -1
- package/dist/post-components/p-cGcyMrvx.js +1 -0
- package/dist/post-components/{p-b99e6621.entry.js → p-cde00944.entry.js} +1 -1
- package/dist/post-components/p-cf7493ab.entry.js +1 -0
- package/dist/post-components/{p-e08d26f4.entry.js → p-e463e7ac.entry.js} +1 -1
- package/dist/post-components/{p-1cf5bc67.entry.js → p-e7f97f6d.entry.js} +1 -1
- package/dist/post-components/p-e8268a8d.entry.js +1 -0
- package/dist/post-components/{p-cf6eacab.entry.js → p-e8c19f72.entry.js} +1 -1
- package/dist/post-components/p-ecfc494e.entry.js +1 -0
- package/dist/post-components/p-eda4a376.entry.js +1 -0
- package/dist/post-components/{p-da217dbc.entry.js → p-ffec1880.entry.js} +1 -1
- package/dist/post-components/{p-DoNhJ2D7.js → p-sgCfAEQU.js} +1 -1
- package/dist/post-components/post-components.css +1 -1
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-autocomplete/post-autocomplete.d.ts +18 -6
- package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +2 -1
- package/dist/types/components/post-banner/post-banner.d.ts +0 -1
- package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +4 -0
- package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +34 -11
- package/dist/types/components/post-closebutton/post-closebutton.d.ts +1 -1
- package/dist/types/components/post-menu/post-menu.d.ts +1 -0
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +8 -5
- package/dist/types/components.d.ts +20 -0
- package/dist/types/utils/breakpoints.d.ts +1 -0
- package/dist/types/utils/closable-target.d.ts +5 -0
- package/dist/types/utils/event-from.d.ts +8 -0
- package/dist/types/utils/floating-ui.d.ts +12 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/hydrate/index.js +908 -625
- package/hydrate/index.mjs +908 -625
- package/package.json +7 -6
- package/dist/components/react/p-BXqGI600.js +0 -1
- package/dist/components/react/p-B_WnO-QF.js +0 -1
- package/dist/components/react/p-BaB8wJvk.js +0 -1
- package/dist/components/react/p-Bji_4dfL.js +0 -1
- package/dist/components/react/p-CX2E_IXB.js +0 -1
- package/dist/components/react/p-D17tCsFk.js +0 -1
- package/dist/components/react/p-DD1c_IgL.js +0 -1
- package/dist/components/react/p-I0dqoE80.js +0 -1
- package/dist/components/react/p-rEfV4v4a.js +0 -1
- package/dist/components/react/p-tTf1w3A9.js +0 -1
- package/dist/post-components/p-0323b0f3.entry.js +0 -1
- package/dist/post-components/p-06ddd73b.entry.js +0 -1
- package/dist/post-components/p-090e52db.entry.js +0 -1
- package/dist/post-components/p-292a9784.entry.js +0 -1
- package/dist/post-components/p-2de6fe62.entry.js +0 -1
- package/dist/post-components/p-39ff8127.entry.js +0 -1
- package/dist/post-components/p-3a968b19.entry.js +0 -1
- package/dist/post-components/p-472_tiaS.js +0 -1
- package/dist/post-components/p-5873a90c.entry.js +0 -1
- package/dist/post-components/p-986fa1c1.entry.js +0 -1
- package/dist/post-components/p-BQ3HlJPr.js +0 -1
- package/dist/post-components/p-B_FOhVrp.js +0 -1
- package/dist/post-components/p-CeNqFJV7.js +0 -1
- package/dist/post-components/p-DYDdaLz-.js +0 -1
- package/dist/post-components/p-b1d2384a.entry.js +0 -1
- package/dist/post-components/p-bf83a3fb.entry.js +0 -1
- package/dist/post-components/p-c46bc56f.entry.js +0 -1
- package/dist/post-components/p-ce8132a9.entry.js +0 -1
- package/dist/post-components/p-d72e830b.entry.js +0 -1
- package/dist/post-components/p-rEfV4v4a.js +0 -1
- package/dist/post-components/p-sn7oKSwC.js +0 -2
- package/dist/post-components/p-tTf1w3A9.js +0 -1
|
@@ -25,11 +25,15 @@ export class PostBreadcrumbItem {
|
|
|
25
25
|
* Indicates that the item represents the current page, applying appropriate styling.
|
|
26
26
|
*/
|
|
27
27
|
this.selected = false;
|
|
28
|
+
/**
|
|
29
|
+
* Indicates that this is the only visible item, applying appropriate styling.
|
|
30
|
+
*/
|
|
31
|
+
this.standalone = false;
|
|
28
32
|
}
|
|
29
33
|
render() {
|
|
30
34
|
const href = this.url instanceof URL ? this.url.href : this.url;
|
|
31
35
|
const content = href ? (h("a", { href: href, "aria-current": this.selected ? 'page' : undefined, "aria-label": this.label, "aria-description": this.description }, h("slot", null))) : (h("span", null, h("slot", null)));
|
|
32
|
-
return this.variant === 'listitem' || this.selected ? (h(Host, { "data-version": version, role: "listitem", slot: this.selected ? 'selected' : undefined }, content)) : (h(Host, { "data-version": version }, h("post-menu-item", null, content)));
|
|
36
|
+
return this.variant === 'listitem' || this.selected ? (h(Host, { "data-version": version, role: "listitem", slot: this.selected ? 'selected' : undefined }, content)) : (h(Host, { "data-version": version, slot: "menu" }, h("post-menu-item", null, content)));
|
|
33
37
|
}
|
|
34
38
|
static get is() { return "post-breadcrumb-item"; }
|
|
35
39
|
static get encapsulation() { return "shadow"; }
|
|
@@ -153,6 +157,26 @@ export class PostBreadcrumbItem {
|
|
|
153
157
|
"reflect": true,
|
|
154
158
|
"attribute": "selected",
|
|
155
159
|
"defaultValue": "false"
|
|
160
|
+
},
|
|
161
|
+
"standalone": {
|
|
162
|
+
"type": "boolean",
|
|
163
|
+
"mutable": false,
|
|
164
|
+
"complexType": {
|
|
165
|
+
"original": "boolean",
|
|
166
|
+
"resolved": "boolean",
|
|
167
|
+
"references": {}
|
|
168
|
+
},
|
|
169
|
+
"required": false,
|
|
170
|
+
"optional": false,
|
|
171
|
+
"docs": {
|
|
172
|
+
"tags": [],
|
|
173
|
+
"text": "Indicates that this is the only visible item, applying appropriate styling."
|
|
174
|
+
},
|
|
175
|
+
"getter": false,
|
|
176
|
+
"setter": false,
|
|
177
|
+
"reflect": true,
|
|
178
|
+
"attribute": "standalone",
|
|
179
|
+
"defaultValue": "false"
|
|
156
180
|
}
|
|
157
181
|
};
|
|
158
182
|
}
|
|
@@ -174,3 +198,7 @@ __decorate([
|
|
|
174
198
|
Required(),
|
|
175
199
|
Type('boolean')
|
|
176
200
|
], PostBreadcrumbItem.prototype, "selected", void 0);
|
|
201
|
+
__decorate([
|
|
202
|
+
Required(),
|
|
203
|
+
Type('boolean')
|
|
204
|
+
], PostBreadcrumbItem.prototype, "standalone", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:host{display:block;position:relative}nav{max-width:100%}nav.invisible{
|
|
1
|
+
:host{display:block;position:relative}nav{max-width:100%}nav.invisible{overflow:hidden;visibility:hidden;position:absolute;inset:0}nav.loading>div>:not(.home){display:none}[role=list]{display:flex;align-items:flex-start;gap:var(--post-device-spacing-gap-inline-4)}.breadcrumb-item{display:flex;align-items:flex-start;padding-block:var(--post-device-spacing-padding-block-6);gap:var(--post-device-spacing-gap-inline-5)}.breadcrumb-item :is(button,a){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-color:rgba(0,0,0,0);border-radius:var(--post-device-border-radius-round);background-color:rgba(0,0,0,0);box-shadow:none;font-family:inherit;font-size:var(--post-device-font-size-6);font-weight:var(--post-device-font-weight-bold);text-decoration:none;white-space:nowrap;cursor:pointer;font:inherit;padding:unset;border:unset;color:var(--post-scheme-color-interactive-primary-enabled-fg1);border-radius:var(--post-device-border-radius-focus);text-decoration:var(--post-core-text-decoration-none)}.breadcrumb-item :is(button,a):not(:disabled):hover{text-decoration:none}.breadcrumb-item :is(button,a):disabled{border-style:var(--post-core-border-style-dash);cursor:unset}.breadcrumb-item :is(button,a){outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.breadcrumb-item :is(button,a):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item :is(button,a):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.breadcrumb-item :is(button,a):is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item :is(button,a):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){.breadcrumb-item :is(button,a){border-width:1px !important;transition:none}.breadcrumb-item :is(button,a):is(button){background-color:ButtonFace !important;border-color:ButtonBorder !important}}.breadcrumb-item :is(button,a):hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item::before{mask-image:var(--post-icon-chevronright);background-color:currentColor;flex:0 0 auto;content:"";display:block;height:var(--post-device-sizing-interactive-icon-size4);width:var(--post-device-sizing-interactive-icon-size4);margin-block:calc(var(--post-device-spacing-padding-35) - 1*var(--post-device-spacing-padding-block-6));margin-inline:var(--post-core-dimension-4)}:root,:host{--post-icon-chevronright: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxzeW1ib2wgaWQ9ImktY2hldnJvbnJpZ2h0Ij48c3ltYm9sIGlkPSJzMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTTUuMzggMTRjLS4xOSAwLS4zOC0uMDctLjUzLS4yMmEuNzU0Ljc1NCAwIDAgMSAwLTEuMDZMOS41NyA4IDQuODUgMy4yOGMtLjI5LS4yOS0uMjktLjc3IDAtMS4wNnMuNzctLjI5IDEuMDYgMEwxMS42OSA4bC01Ljc4IDUuNzhjLS4xNS4xNS0uMzQuMjItLjUzLjIyIi8+PC9zeW1ib2w+PHN5bWJvbCBpZD0iczI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik04LjA3IDIwLjcyYy0uMjIgMC0uNDUtLjA4LS42Mi0uMjZhLjg4Ljg4IDAgMCAxIDAtMS4yNGw3LjI2LTcuMjZMNy40NSA0LjdhLjg4Ljg4IDAgMCAxIDAtMS4yNGMuMzQtLjM0LjktLjM0IDEuMjQgMGw4LjUgOC41LTguNDkgOC40OWMtLjE3LjE3LS40LjI2LS42Mi4yNloiLz48L3N5bWJvbD48c3ltYm9sIGlkPSJzMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZD0iTTEwLjc2IDI3LjVjLS4yNiAwLS41MS0uMS0uNzEtLjI5YS45OTYuOTk2IDAgMCAxIDAtMS40MWw5Ljc5LTkuNzktOS43OS05LjgxYS45OTYuOTk2IDAgMSAxIDEuNDEtMS40MUwyMi42NyAxNiAxMS40NiAyNy4yMWMtLjIuMi0uNDUuMjktLjcxLjI5WiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InM0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cGF0aCBkPSJNMTMuNSAzNC4yMmExLjEyMyAxLjEyMyAwIDAgMS0uOC0xLjkybDEyLjMzLTEyLjMzTDEyLjcgNy42M2MtLjQ0LS40NC0uNDQtMS4xNSAwLTEuNTlzMS4xNS0uNDQgMS41OSAwbDEzLjkzIDEzLjkzTDE0LjMgMzMuODljLS4yMi4yMi0uNTEuMzMtLjguMzMiLz48L3N5bWJvbD48c3ltYm9sIGlkPSJzNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCI+PHBhdGggZD0iTTE2LjE0IDQxYy0uMzIgMC0uNjQtLjEyLS44OC0uMzdhMS4yNSAxLjI1IDAgMCAxIDAtMS43N2wxNC44Ny0xNC44N0wxNS4yNSA5LjExYy0uNDktLjQ5LS40OS0xLjI4IDAtMS43N3MxLjI4LS40OSAxLjc3IDBsMTYuNjQgMTYuNjQtMTYuNjMgMTYuNjNjLS4yNC4yNC0uNTYuMzctLjg4LjM3WiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InM2NCIgdmlld0JveD0iMCAwIDY0IDY0Ij48cGF0aCBkPSJNMjEuNTEgNTQuNGExLjM3NiAxLjM3NiAwIDAgMS0uOTctMi4zNWwyMC4wMy0yMC4wMy0yMC4wNC0yMC4wM2MtLjU0LS41NC0uNTQtMS40MSAwLTEuOTVzMS40MS0uNTQgMS45NSAwbDIxLjk4IDIxLjk5TDIyLjQ5IDU0Yy0uMjcuMjctLjYyLjQtLjk3LjRaIi8+PC9zeW1ib2w+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczE2LCBub25lKSIgaHJlZj0iI3MxNiIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXMyNCwgbm9uZSkiIGhyZWY9IiNzMjQiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zMzIsIG5vbmUpIiBocmVmPSIjczMyIi8+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczQwLCBub25lKSIgaHJlZj0iI3M0MCIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXM0OCwgbm9uZSkiIGhyZWY9IiNzNDgiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zNjQsIG5vbmUpIiBocmVmPSIjczY0Ii8+PC9zeW1ib2w+PC9kZWZzPjxzdHlsZT5AbWVkaWEgKG1heC13aWR0aDogMjMuOThweCkge2d7LS1zMTY6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogMjRweCkgYW5kIChtYXgtd2lkdGg6IDMxLjk4cHgpIHtney0tczI0OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDMycHgpIGFuZCAobWF4LXdpZHRoOiAzOS45OHB4KSB7Z3stLXMzMjpibG9jazt9fUBtZWRpYSAobWluLXdpZHRoOiA0MHB4KSBhbmQgKG1heC13aWR0aDogNDcuOThweCkge2d7LS1zNDA6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogNDhweCkgYW5kIChtYXgtd2lkdGg6IDYzLjk4cHgpIHtney0tczQ4OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDY0cHgpIHtney0tczY0OmJsb2NrO319PC9zdHlsZT48Zz48dXNlIGhyZWY9IiNpLWNoZXZyb25yaWdodCIvPjwvZz48L3N2Zz4=")}.home{padding-block:var(--post-device-spacing-padding-47)}.home::before{content:unset}.home post-icon{width:var(--post-device-sizing-interactive-icon-size2);height:var(--post-device-sizing-interactive-icon-size2)}.menu{margin-inline-end:calc(-1*var(--post-device-spacing-gap-inline-4))}.menu.empty{display:none}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}
|
|
@@ -10,93 +10,143 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
10
10
|
};
|
|
11
11
|
import { componentOnReady, nanoid, Required, Type, Url } from "../../utils/index";
|
|
12
12
|
import { version } from "../../../../package";
|
|
13
|
-
import {
|
|
13
|
+
import { Host, h } from "@stencil/core";
|
|
14
14
|
import { throttle } from "throttle-debounce";
|
|
15
|
+
const MAX_VISIBLE_ITEMS = 6;
|
|
16
|
+
const MEASUREMENT_DEBOUNCE_MS = 50;
|
|
15
17
|
export class PostBreadcrumbs {
|
|
16
18
|
constructor() {
|
|
17
|
-
this.
|
|
19
|
+
this.debounceUpdateCollapsedItems = throttle(MEASUREMENT_DEBOUNCE_MS, this.updateCollapsedItems.bind(this));
|
|
20
|
+
this.resizeObserver = new ResizeObserver(this.debounceUpdateCollapsedItems);
|
|
21
|
+
this.mutationObserver = new MutationObserver(this.updateHiddenNav.bind(this));
|
|
22
|
+
this.loaded = false;
|
|
23
|
+
/** The number of breadcrumb items, counted from the start, that are moved into the overflow menu. */
|
|
24
|
+
this.collapsed = 0;
|
|
25
|
+
/** The visible breadcrumb navigation. */
|
|
26
|
+
this.nav = null;
|
|
27
|
+
/** An off-screen copy of the breadcrumb navigation used for measurement. */
|
|
28
|
+
this.hiddenNav = null;
|
|
18
29
|
}
|
|
19
30
|
componentWillLoad() {
|
|
20
31
|
this.id = this.host.id || `b${nanoid(6)}`;
|
|
21
32
|
}
|
|
22
|
-
componentDidLoad() {
|
|
23
|
-
this.
|
|
24
|
-
this.
|
|
25
|
-
}
|
|
26
|
-
disconnectedCallback() {
|
|
27
|
-
this.mutationObserver?.disconnect();
|
|
28
|
-
this.resizeObserver?.disconnect();
|
|
29
|
-
}
|
|
30
|
-
createMutationObserver() {
|
|
31
|
-
this.mutationObserver = new MutationObserver(this.duplicateNavElement.bind(this));
|
|
32
|
-
this.mutationObserver.observe(this.host, {
|
|
33
|
+
async componentDidLoad() {
|
|
34
|
+
this.resizeObserver?.observe(document.body);
|
|
35
|
+
this.mutationObserver?.observe(this.host, {
|
|
33
36
|
childList: true,
|
|
34
37
|
characterData: true,
|
|
35
38
|
subtree: true,
|
|
36
39
|
});
|
|
37
|
-
this.
|
|
40
|
+
await this.updateHiddenNav();
|
|
41
|
+
await this.updateCollapsedItems();
|
|
42
|
+
this.loaded = true;
|
|
38
43
|
}
|
|
39
|
-
|
|
40
|
-
this.resizeObserver
|
|
41
|
-
this.
|
|
44
|
+
disconnectedCallback() {
|
|
45
|
+
this.resizeObserver?.disconnect();
|
|
46
|
+
this.mutationObserver?.disconnect();
|
|
47
|
+
this.debounceUpdateCollapsedItems.cancel();
|
|
42
48
|
}
|
|
43
49
|
/**
|
|
44
|
-
*
|
|
50
|
+
* Measures the space available in the breadcrumb navigation and moves the items that do not fit
|
|
51
|
+
* into the overflow menu.
|
|
45
52
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const nav = shadowRoot?.querySelector('nav');
|
|
49
|
-
if (!shadowRoot || !nav)
|
|
53
|
+
async updateCollapsedItems() {
|
|
54
|
+
if (!this.nav)
|
|
50
55
|
return;
|
|
51
|
-
this.
|
|
52
|
-
const clone = nav.cloneNode(true);
|
|
53
|
-
clone.classList.add('invisible');
|
|
54
|
-
shadowRoot.querySelector('nav.invisible')?.remove();
|
|
55
|
-
shadowRoot.append(clone);
|
|
56
|
-
requestAnimationFrame(() => {
|
|
57
|
-
this.duplicateSlottedElements(clone, 'slot:not([name])');
|
|
58
|
-
this.duplicateSlottedElements(clone, 'slot[name="selected"]');
|
|
59
|
-
this.checkOverflow();
|
|
60
|
-
});
|
|
56
|
+
this.collapsed = await this.calculateCollapsedItems();
|
|
61
57
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Determines how many items have to be collapsed, either because they do not fit the breadcrumb
|
|
60
|
+
* navigation or because they exceed the maximum number of visible items.
|
|
61
|
+
*/
|
|
62
|
+
async calculateCollapsedItems() {
|
|
63
|
+
const items = this.host.querySelectorAll('post-breadcrumb-item');
|
|
64
|
+
const overflowing = await this.calculateOverflowingItems();
|
|
65
|
+
// Never show more than `MAX_VISIBLE_ITEMS`, even if the nav is wide enough to fit them all.
|
|
66
|
+
return Math.max(overflowing, items.length - MAX_VISIBLE_ITEMS);
|
|
71
67
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Determines how many items overflow the width of the breadcrumb navigation.
|
|
70
|
+
*/
|
|
71
|
+
async calculateOverflowingItems() {
|
|
72
|
+
// Fallback to zero if the hidden nav is not available for measurement.
|
|
73
|
+
if (!this.hiddenNav)
|
|
74
|
+
return 0;
|
|
75
|
+
const gap = Number.parseFloat(getComputedStyle(this.hiddenNav.firstElementChild).gap);
|
|
76
|
+
const menu = this.hiddenNav.querySelector('.menu').clientWidth;
|
|
77
|
+
// The last item can never be collapsed, so it is ignored when measuring the width of the items.
|
|
78
|
+
const items = Array.from(this.hiddenNav.querySelectorAll('post-breadcrumb-item')).slice(0, -1);
|
|
79
|
+
// Start from the assumption that all items fit and that no menu is shown.
|
|
80
|
+
// Therefore, subtract the width of the overflow menu.
|
|
81
|
+
let width = this.hiddenNav.scrollWidth - menu + gap;
|
|
82
|
+
let overflowing = 0;
|
|
83
|
+
// Discard items from the start until the remaining ones fit the available width.
|
|
84
|
+
while (overflowing < items.length && width > this.hiddenNav.clientWidth) {
|
|
85
|
+
// The overflow menu needs to be displayed as soon as the first item is moved into it, so its
|
|
86
|
+
// width needs to be taken into account when measuring the remaining items.
|
|
87
|
+
if (overflowing === 0)
|
|
88
|
+
width += menu;
|
|
89
|
+
width -= items[overflowing++].clientWidth + gap;
|
|
90
|
+
}
|
|
91
|
+
return overflowing;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Moves `collapsed` items into the overflow menu and marks the last item as selected.
|
|
95
|
+
*/
|
|
96
|
+
updateItems(items, collapsed) {
|
|
97
|
+
items.forEach((item, index) => {
|
|
98
|
+
item.setAttribute('variant', index < collapsed ? 'menuitem' : 'listitem');
|
|
99
|
+
item.setAttribute('selected', String(index === items.length - 1));
|
|
100
|
+
item.setAttribute('standalone', String(index === items.length - 1 && index === collapsed));
|
|
81
101
|
});
|
|
82
102
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
103
|
+
/**
|
|
104
|
+
* Rebuilds the off-screen copy of the breadcrumb navigation.
|
|
105
|
+
*/
|
|
106
|
+
async updateHiddenNav() {
|
|
107
|
+
this.hiddenNav?.remove();
|
|
108
|
+
this.hiddenNav = await this.renderHiddenNav();
|
|
86
109
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
110
|
+
/**
|
|
111
|
+
* Renders an off-screen copy of the breadcrumb navigation that is used for measurements.
|
|
112
|
+
*/
|
|
113
|
+
async renderHiddenNav() {
|
|
114
|
+
const shadowRoot = this.host.shadowRoot;
|
|
115
|
+
if (!shadowRoot || !this.nav)
|
|
116
|
+
return null;
|
|
117
|
+
const clone = this.nav.cloneNode(true);
|
|
118
|
+
const slots = clone.querySelectorAll('slot');
|
|
119
|
+
// Deep clone the breadcrumb navigation and flatten its slots into the clone.
|
|
120
|
+
this.nav.querySelectorAll('slot').forEach((source, index) => {
|
|
121
|
+
const target = slots[index];
|
|
122
|
+
// Insert the assigned elements where the slot used to be, then drop the now empty slot
|
|
123
|
+
source.assignedElements().forEach(element => {
|
|
124
|
+
target.insertAdjacentElement('beforebegin', element.cloneNode(true));
|
|
125
|
+
});
|
|
126
|
+
target.remove();
|
|
92
127
|
});
|
|
128
|
+
clone.classList.remove('loading');
|
|
129
|
+
clone.classList.add('invisible');
|
|
130
|
+
// Show the overflow menu so that we can include the space it takes up in the measurement.
|
|
131
|
+
clone.querySelector('.menu').classList.remove('empty');
|
|
132
|
+
shadowRoot.append(clone);
|
|
133
|
+
// Wait for all items to be fully hydrated before measuring.
|
|
134
|
+
const items = clone.querySelectorAll('post-breadcrumb-item');
|
|
135
|
+
await Promise.all(Array.from(items).map(item => componentOnReady(item)));
|
|
136
|
+
// Move the items out of the overflow menu so that the uncollapsed layout can be measured.
|
|
137
|
+
this.updateItems(items, 0);
|
|
138
|
+
return clone;
|
|
93
139
|
}
|
|
94
140
|
renderMenu() {
|
|
95
141
|
const menuId = `${this.id}-menu`;
|
|
96
|
-
return (h("div", {
|
|
142
|
+
return (h("div", { class: `breadcrumb-item menu ${this.collapsed === 0 ? 'empty' : ''}`, role: "listitem" }, h("post-menu-trigger", { for: menuId }, h("button", null, h("span", { class: "visually-hidden" }, this.textMoreItems), h("span", { "aria-hidden": "true" }, "..."))), h("post-menu", { id: menuId, label: this.textMoreItems, placement: "bottom-start" }, h("slot", { name: "menu" }))));
|
|
97
143
|
}
|
|
98
144
|
render() {
|
|
99
|
-
|
|
145
|
+
if (this.loaded) {
|
|
146
|
+
const items = this.host.querySelectorAll('post-breadcrumb-item');
|
|
147
|
+
this.updateItems(items, this.collapsed);
|
|
148
|
+
}
|
|
149
|
+
return (h(Host, { key: '501384cb07b2deac87a21800fc4d39d695747341', "data-version": version }, h("nav", { key: '20aa57da865967458169544dec75d975926eb675', "aria-label": this.textBreadcrumbs, ref: el => (this.nav = el), class: this.loaded ? '' : 'loading' }, h("div", { key: 'cf8f21f2ee9de01bac0edf9379ba5c183b938d70', role: "list" }, h("div", { key: '9bd29a83cb976d67f3c6ea24cf23b2a07e40ca84', class: "breadcrumb-item home", role: "listitem" }, h("a", { key: '675638668994f074951491040c6043819e6f7282', href: this.homeUrl }, h("span", { key: '3ce1f8ea5ba5738925bff000ec5a8c32603ae963', class: "visually-hidden" }, this.textHome), h("post-icon", { key: '1b35b22788d4e70c948e1067d99265e8af9c74e7', "aria-hidden": "true", name: "home" }))), this.renderMenu(), h("slot", { key: 'f7fe7cd0b16a9064aba28149756f785c47133351' }), h("slot", { key: 'c62ce84877203586c184e1adaea1ecb6ed8a0912', name: "selected" })))));
|
|
100
150
|
}
|
|
101
151
|
static get is() { return "post-breadcrumbs"; }
|
|
102
152
|
static get encapsulation() { return "shadow"; }
|
|
@@ -192,8 +242,9 @@ export class PostBreadcrumbs {
|
|
|
192
242
|
}
|
|
193
243
|
static get states() {
|
|
194
244
|
return {
|
|
195
|
-
"
|
|
196
|
-
"
|
|
245
|
+
"id": {},
|
|
246
|
+
"loaded": {},
|
|
247
|
+
"collapsed": {}
|
|
197
248
|
};
|
|
198
249
|
}
|
|
199
250
|
static get elementRef() { return "host"; }
|
|
@@ -8,7 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
9
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
10
|
};
|
|
11
|
-
import { OneOf, Required } from "../../utils/index";
|
|
11
|
+
import { findClosableTarget, OneOf, Required } from "../../utils/index";
|
|
12
12
|
import { version } from "../../../../package";
|
|
13
13
|
import { h, Host } from "@stencil/core";
|
|
14
14
|
import { BUTTON_TYPES, PLACEMENT, SIZE } from "./types";
|
|
@@ -19,7 +19,7 @@ export class PostClosebutton {
|
|
|
19
19
|
constructor() {
|
|
20
20
|
/**
|
|
21
21
|
* The "type" attribute used for the close button
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
*/
|
|
24
24
|
this.buttonType = 'button';
|
|
25
25
|
/**
|
|
@@ -30,6 +30,10 @@ export class PostClosebutton {
|
|
|
30
30
|
* The size of the close button.
|
|
31
31
|
*/
|
|
32
32
|
this.size = 'default';
|
|
33
|
+
this.handleClick = () => {
|
|
34
|
+
const target = findClosableTarget(this.host);
|
|
35
|
+
target?.close();
|
|
36
|
+
};
|
|
33
37
|
}
|
|
34
38
|
componentDidLoad() {
|
|
35
39
|
if (globalThis.MutationObserver) {
|
|
@@ -54,13 +58,8 @@ export class PostClosebutton {
|
|
|
54
58
|
console.error(`The \`${this.host.localName}\` component requires content for accessibility.`);
|
|
55
59
|
}
|
|
56
60
|
}
|
|
57
|
-
handleClick() {
|
|
58
|
-
if (this.buttonType === 'reset')
|
|
59
|
-
this.internals.form?.reset();
|
|
60
|
-
this.host.closest('dialog')?.close();
|
|
61
|
-
}
|
|
62
61
|
render() {
|
|
63
|
-
return (h(Host, { key: '
|
|
62
|
+
return (h(Host, { key: 'f46ba6cbd82793b2a3d3a72c2f89236f0904eb68', "data-version": version }, h("button", { key: 'd014e76ccce88a087f8dd9caaac002eb09f64699', type: this.buttonType, class: "btn btn-icon btn-secondary btn-sm", onClick: this.handleClick }, h("post-icon", { key: '442305b327aabe61f259b98694118ec1b4ed2f09', "aria-hidden": "true", name: "closex" }), h("span", { key: '530149339a2a983d1e5d23c149abd0faf6f912b5', ref: el => (this.visuallyHidden = el), class: "visually-hidden" }, h("slot", { key: 'b90d5bea08c70c6df33dc5fc74bcf06eb2b6cd14' })))));
|
|
64
63
|
}
|
|
65
64
|
static get is() { return "post-closebutton"; }
|
|
66
65
|
static get encapsulation() { return "shadow"; }
|
|
@@ -66,7 +66,7 @@ export class PostCollapsible {
|
|
|
66
66
|
triggers.forEach(trigger => trigger.update());
|
|
67
67
|
}
|
|
68
68
|
render() {
|
|
69
|
-
return (h(Host, { key: '
|
|
69
|
+
return (h(Host, { key: 'd21f5e36e292652981b165fbb5f4e03501f88e1b', "data-version": version, tabindex: this.collapsed ? -1 : undefined, style: this.collapsed ? collapsedKeyframe : undefined }, h("slot", { key: '7804a966899325cbc55f9e62eadf81e8e6a1e248' })));
|
|
70
70
|
}
|
|
71
71
|
static get is() { return "post-collapsible"; }
|
|
72
72
|
static get encapsulation() { return "shadow"; }
|
|
@@ -106,7 +106,7 @@ export class PostCollapsibleTrigger {
|
|
|
106
106
|
this.updateAriaAttributes();
|
|
107
107
|
}
|
|
108
108
|
render() {
|
|
109
|
-
return (h(Host, { key: '
|
|
109
|
+
return (h(Host, { key: '55ae82b4cf69709de291000cc5e273107e1f61e7', "data-version": version }, h("slot", { key: 'c85ddfc93a1ef93c41fcb3fc5705fa1fbb30934d' })));
|
|
110
110
|
}
|
|
111
111
|
static get is() { return "post-collapsible-trigger"; }
|
|
112
112
|
static get encapsulation() { return "shadow"; }
|
|
@@ -920,11 +920,11 @@ export class PostDatePicker {
|
|
|
920
920
|
}
|
|
921
921
|
}
|
|
922
922
|
render() {
|
|
923
|
-
return (h(Host, { key: '
|
|
923
|
+
return (h(Host, { key: '8f3e9c45b6536e766d2930bb7647ccb230a1a53c', "data-version": version }, this.inline && (h("div", { key: '37c23df45461da546c03ab5e487e6831992a1a6f', dir: this.textDirection }, h("slot", { key: '6c031a739d43642604c752e2101bbc2d4fbb39e5' }), h("div", { key: '42ecf6418c4522d15a24341b127b444aedbfc7be', class: "datepicker-container" }))), !this.inline && (h("div", { key: '0166eba762a209d0113f42c19715a9dde86eef2d', dir: this.textDirection }, h("div", { key: '14f687ecc53fd5681aa52abd955e18aa17991b2c', class: {
|
|
924
924
|
'calendar-input': !this.range,
|
|
925
925
|
'calendar-input-range': this.range,
|
|
926
926
|
'disabled': this.inputDisabled,
|
|
927
|
-
} }, h("slot", { key: '
|
|
927
|
+
} }, h("slot", { key: 'afc114dc156c665de0b1a23732efaf3e221929d4' }), h("button", { key: '205ef45ccc828418af1ef7b3b09def83b87c9b26', onClick: () => this.show(), "aria-haspopup": "true", "aria-label": this.textToggleCalendar, disabled: this.inputDisabled, ref: e => (this.dpTrigger = e) }, h("post-icon", { key: '6730069a64bc2bb461d72e5c0e615d37ca57b74d', name: "calendar" }))), h("post-popovercontainer", { key: '56e1dfd0fd04442f7778c547fc75cba8caba84a5', placement: "bottom-end", offset: PostDatePicker.FLYOUT_OFFSET, ref: e => (this.popoverRef = e) }, h("div", { key: '43ff0d83760214ff8e1ad06c2f8d7c6626e178c1', class: "datepicker-container" }))))));
|
|
928
928
|
}
|
|
929
929
|
static get is() { return "post-date-picker"; }
|
|
930
930
|
static get encapsulation() { return "shadow"; }
|
|
@@ -81,10 +81,10 @@ export class PostFooter {
|
|
|
81
81
|
const allGridSlotsEmpty = GRID_SLOTS.every(slotName => !this.slotDisplayed[slotName]);
|
|
82
82
|
const renderMain = !allGridSlotsEmpty || renderSocialmedia || renderApp || renderBusinesssectors;
|
|
83
83
|
const renderBase = renderCopyright || renderMeta;
|
|
84
|
-
return (h(Host, { key: '
|
|
84
|
+
return (h(Host, { key: '02edce3d202fefa6fe21a84d1ed97a6ded2d76ce', "data-version": version, "data-color-scheme": "light" }, h("footer", { key: '7d67c940dc73b6dd16283e7c7a7feeda05f50f80' }, h("h2", { key: '1d71a47f631f463c15b7ac02c7574d4f8adbfe2e', class: "visually-hidden" }, this.textFooter), h("div", { key: '9fd3d08883d63c8aaccb4c3c32c0c8a81c3f8e1c', class: { 'prefooter': true, 'd-none': !renderPrefooter } }, h("div", { key: '99a6abfe43b586e5486c4ceeff3c7176905ef631', class: "footer-container" }, h("slot", { key: '5616b403340d5e2395c0d949926f99c56936b662', onSlotchange: this.handleSlotChange, name: "prefooter" }))), h("div", { key: 'd6ccd3988b9951bb0e38fd612eae64a1889427ef', class: { 'footer-main': true, 'd-none': !renderMain } }, h("div", { key: '4c8880c1dbf366a408402a884e61fe8e1cf45af0', class: "footer-container" }, h("div", { key: 'a79010da73a749002a25b03052d0427d2dcf6c2e', class: { 'footer-grid': true, 'd-none': allGridSlotsEmpty } }, this.device === 'mobile' ? this.renderAccordion() : this.renderColumns()), h("div", { key: '335efe778d8b8e2c4a9f3eeffd4d60e5ba670ad2', class: {
|
|
85
85
|
'footer-column': true,
|
|
86
86
|
'd-none': !renderSocialmedia && !renderApp,
|
|
87
|
-
} }, h("div", { key: '
|
|
87
|
+
} }, h("div", { key: '6725d6db6af39a2f2ed4d887a598f262c6314562', class: { 'footer-socialmedia': true, 'd-none': !renderSocialmedia } }, h("slot", { key: '3a2d1c69bc05245842447ac104615f681b02e3a9', onSlotchange: this.handleSlotChange, name: "socialmedia" })), h("div", { key: '38f1a4b8ef975aafb7f4fd90512ea08dc18e3d4c', class: { 'footer-app': true, 'd-none': !renderApp } }, h("slot", { key: 'fbcb201b8ee7b9ac419c7a01e995ce3be7e4acca', onSlotchange: this.handleSlotChange, name: "app" }))), h("div", { key: '76b292642cd8587ffa95277bf43478c785aed594', class: { 'footer-businesssectors': true, 'd-none': !renderBusinesssectors } }, h("slot", { key: '9fa3ead24b007de21d2669421f03ab2fd870d64e', onSlotchange: this.handleSlotChange, name: "businesssectors" })))), h("div", { key: '0278475002d8a479936967c06335cc667519a902', class: { 'footer-base': true, 'd-none': !renderBase } }, h("div", { key: '59d46393b2a04184a6adc445d4b0940f07ad56f8', class: "footer-container" }, h("div", { key: '7bbaebdf46638ffa1946e7c5be6970c8a1e586bb', class: { 'footer-copyright': true, 'd-none': !renderCopyright } }, h("slot", { key: 'c1601db6edc32929d84897330654dbec24bb8543', onSlotchange: this.handleSlotChange, name: "copyright" })), h("div", { key: '1339ee3a91e8f18d757333b74053291080d95e2b', class: { 'footer-meta': true, 'd-none': !renderMeta } }, h("slot", { key: 'aa98ffd65b0138b198e057dbd2c96368bf92c0b0', onSlotchange: this.handleSlotChange, name: "meta" })))))));
|
|
88
88
|
}
|
|
89
89
|
static get is() { return "post-footer"; }
|
|
90
90
|
static get encapsulation() { return "shadow"; }
|
|
@@ -319,10 +319,10 @@ export class PostHeader {
|
|
|
319
319
|
render() {
|
|
320
320
|
const onDesktop = Build.isServer || this.device === 'desktop';
|
|
321
321
|
const onTabletAndMobile = Build.isServer || this.device !== 'desktop';
|
|
322
|
-
return (h(Host, { key: '
|
|
322
|
+
return (h(Host, { key: '4ae4873c57cd307d3a4073f3d712bcf975528a90', "data-version": version, "data-color-scheme": "light", "data-burger-menu": this.hasBurgerMenu, "data-menu-extended": this.burgerMenuExtended }, h("header", { key: 'cbc743a8981f4bbc3d42807244d88edba88e6a6c' }, h("div", { key: 'f39c122246336d0de803353d9abb9e573459073e', class: "global-header" }, h("div", { key: 'a76628c6501851bbfd597e0106847da12dc0b705', class: "section" }, h("div", { key: 'b703c54159955ae272378aab5172f0bcd1b638d1', class: "logo" }, h("slot", { key: 'a55336f3bee22b2c9a2cb0426b5e04ba5c8f29c4', name: "post-logo" })), h("div", { key: '9b6db729465dae5c503d461a115af296730b2ce6', class: "sliding-controls" }, onDesktop && (h("div", { key: 'cf4124ae4aaf47c2445499ce08ebb15076ac4bf2', class: "audience" }, h("slot", { key: '830003c8b3b50abeb9d82bdfde83212f20a4da3d', name: "audience" }))), h("slot", { key: '458afb2da52853fbc9bc066fc487fcf77df0d2a0', name: "global-nav-primary" }), (onDesktop || !this.hasMainNav) && [
|
|
323
323
|
h("slot", { key: "global-nav-secondary", name: "global-nav-secondary" }),
|
|
324
324
|
h("slot", { key: "language-menu", name: "language-menu" }),
|
|
325
|
-
], h("slot", { key: '
|
|
325
|
+
], h("slot", { key: 'ffab20101950b7472c97ff0675f36903a6a66ebd', name: "post-login" }), onTabletAndMobile && this.hasMainNav && (h("post-togglebutton", { key: 'd1cb44efb5ae024bc225487be4e592a406acf138', class: "burger-button", ref: el => (this.burgerMenuButton = el), onClick: () => this.toggleBurgerMenu() }, h("span", { key: 'c33d2bb5c415f58829ad10026b9811684eac3d35' }, this.textMenu), h("post-icon", { key: '7acb3d93aec23ef1c1efd9c9d52832395e66abf0', "aria-hidden": "true", name: "burger", "data-showwhen": "untoggled" }), h("post-icon", { key: '7b6fb17d50df4474ddd282d7e202a43c324c3b87', "aria-hidden": "true", name: "closex", "data-showwhen": "toggled" })))))), h("div", { key: 'c7e6d91a0cd4a286b7186d0f41abdf9dc1e9ffd4', ref: el => (this.localHeader = el), class: { 'local-header': true, 'megadropdown-open': this.megadropdownOpen } }, h("div", { key: '670d00fb0a79ecc1f2bb45645887db13c7ea500f', class: "section" }, h("slot", { key: '5d3b0c9b97be561875fc908b2b7bf4d558513318', name: "side-nav" }), h("slot", { key: '39348fb8869f5623da026ed08ce69f727d9de7e6', name: "title" }), this.hasTitle && h("slot", { key: '883097731548de45adec9cbbf7df1c80a37b76b5', name: "local-nav" }), onDesktop && h("slot", { key: 'fbc77dee6ed73d8a13da75d3d695af80ce32c3af', name: "main-nav" }), onDesktop && !this.hasTitle && h("slot", { key: '94a989295ae04cd8259ba22e583d41bcb4701881', name: "local-nav" }))), this.hasBurgerMenu && this.renderBurgerMenu())));
|
|
326
326
|
}
|
|
327
327
|
static get is() { return "post-header"; }
|
|
328
328
|
static get encapsulation() { return "shadow"; }
|
|
@@ -102,7 +102,7 @@ export class PostIcon {
|
|
|
102
102
|
}).filter(([_key, value]) => value !== null));
|
|
103
103
|
}
|
|
104
104
|
render() {
|
|
105
|
-
return (h(Host, { key: '
|
|
105
|
+
return (h(Host, { key: '917a78dbe4db46244348298b08a2176c9028048e', "data-version": version }, h("span", { key: '06f07755212e2b6a9a5957d7fd37751c62343be6', style: this.getStyles() })));
|
|
106
106
|
}
|
|
107
107
|
static get is() { return "post-icon"; }
|
|
108
108
|
static get encapsulation() { return "shadow"; }
|
|
@@ -39,7 +39,7 @@ export class PostLanguageMenu {
|
|
|
39
39
|
}
|
|
40
40
|
componentDidLoad() {
|
|
41
41
|
// Initially set variants and active language
|
|
42
|
-
// Handles cases where the language-menu is rendered after the language-
|
|
42
|
+
// Handles cases where the language-menu is rendered after the language-menu-items have been rendered
|
|
43
43
|
this.updateChildrenVariant();
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
@@ -60,7 +60,7 @@ export class PostLinkarea {
|
|
|
60
60
|
}));
|
|
61
61
|
}
|
|
62
62
|
render() {
|
|
63
|
-
return (h(Host, { key: '
|
|
63
|
+
return (h(Host, { key: 'a1ab65608098bc992cd70f98a1c60cecd00f43c5', "data-version": version, onClick: (e) => this.dispatchClick(e) }, h("slot", { key: 'f3042050a7075daa1e5cc35664bde6aa6bfcdac1' })));
|
|
64
64
|
}
|
|
65
65
|
static get is() { return "post-linkarea"; }
|
|
66
66
|
static get encapsulation() { return "shadow"; }
|
|
@@ -25,7 +25,7 @@ export class PostListbox {
|
|
|
25
25
|
option.highlighted = false;
|
|
26
26
|
});
|
|
27
27
|
this.highlightedIndex = -1;
|
|
28
|
-
this.
|
|
28
|
+
this.clearActive();
|
|
29
29
|
};
|
|
30
30
|
this.clearActive = () => {
|
|
31
31
|
this.highlightedIndex = -1;
|
|
@@ -129,7 +129,7 @@ export class PostListbox {
|
|
|
129
129
|
this.updateSelection(event.detail);
|
|
130
130
|
}
|
|
131
131
|
render() {
|
|
132
|
-
return (h(Host, { key: '
|
|
132
|
+
return (h(Host, { key: '793bdd535fb6b51bfd05012d180520e414519c0f', "data-version": version, role: "listbox" }, h("post-popovercontainer", { key: 'd88195a37625fd29c47d4a8cc3ec34e0c92caa5f', placement: "bottom-start", ref: el => (this.popoverContainer = el) }, h("slot", { key: '6882e0cdcf7b277b47a349244382eeb7f3f525e1', name: "blank-slate" }), h("slot", { key: 'dd71f5d59621097df38cfbc3b69cdfc805a54272' }))));
|
|
133
133
|
}
|
|
134
134
|
static get is() { return "post-listbox"; }
|
|
135
135
|
static get encapsulation() { return "shadow"; }
|
|
@@ -9,9 +9,9 @@ export class PostListboxOption {
|
|
|
9
9
|
this.highlighted = false;
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: 'c2e1c5052d742c62e82eaac30a01d525048b3a2e', "data-version": version, role: "option", "aria-selected": `${this.selected}`, "data-active": this.highlighted ? 'true' : null,
|
|
13
13
|
/* Prevent focus change from triggering onblur event in post-autocomplete */
|
|
14
|
-
onPointerDown: (e) => e.preventDefault(), onClick: () => this.postOptionSelected.emit(this.value), id: `post-listbox-option-${this.optionId}` }, h("span", { key: '
|
|
14
|
+
onPointerDown: (e) => e.preventDefault(), onClick: () => this.postOptionSelected.emit(this.value), id: `post-listbox-option-${this.optionId}` }, h("span", { key: '2b0cdab57c328df649c1353c41e2c4cfe57378d0', class: "option-content" }, this.value, h("span", { key: 'e5807160223e87095dc3c0c076ec84317050cf18', class: "option-description" }, h("slot", { key: '45f0020b9eebe13b84880a842c095daa51cf0feb' }))), this.selected && h("post-icon", { key: '80a23567a10075cbc8269f4769dd7d8aba7b2961', "aria-hidden": "true", name: "checkmark" })));
|
|
15
15
|
}
|
|
16
16
|
static get is() { return "post-listbox-option"; }
|
|
17
17
|
static get encapsulation() { return "shadow"; }
|
|
@@ -26,7 +26,7 @@ export class PostLogo {
|
|
|
26
26
|
render() {
|
|
27
27
|
const logoLink = this.url && (typeof this.url === 'string' ? this.url : this.url.href);
|
|
28
28
|
const LogoTag = logoLink ? 'a' : 'span';
|
|
29
|
-
return (h(Host, { key: '
|
|
29
|
+
return (h(Host, { key: 'dd8ddb0dcbed8062ee5adecf2a26ad98b42c94b1', "data-version": version }, h(LogoTag, { key: 'f4d8ad34cdd455c3e2096ce26db7bc775d7e05c3', class: `logo ${logoLink ? 'logo-link' : ''}`, ...(logoLink ? { href: logoLink } : {}) }, h("span", { key: '87a58c2904f3dae5406b5652787ca1d99dbda0dc', class: "description" }, h("slot", { key: 'ae69c86c4bfed42b25aafa948f13989c31833466', onSlotchange: () => this.checkDescription() })), h("svg", { key: 'e51164151a1a53971414ea37af5085f99575fc36', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 72 72", "aria-hidden": "true" }, h("g", { key: 'fa946d3ded62128ca4469b160103b464eb59329b', id: "Logo" }, h("rect", { key: '18424ee0ca3256f9169d8dac6223df3d49cb09b9', fill: "#ffcc00", x: "0", y: "0", width: "72", height: "72" }), h("polygon", { key: '96381aeedbc8536fd551ec8ac4161db842b3bfc9', 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: 'c1bbdb1bb687390d59ec2e6dcf83e80d1606582f', 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" }))))));
|
|
30
30
|
}
|
|
31
31
|
static get is() { return "post-logo"; }
|
|
32
32
|
static get encapsulation() { return "shadow"; }
|
|
@@ -129,7 +129,7 @@ export class PostMainnavigation {
|
|
|
129
129
|
}, NAVBAR_DISABLE_DURATION);
|
|
130
130
|
}
|
|
131
131
|
render() {
|
|
132
|
-
return (h(Host, { key: '
|
|
132
|
+
return (h(Host, { key: '9fe43f86cab360591a15a033e0dc657096a69c00', version: version, class: this.canScroll ? 'scrollable' : '' }, h("div", { key: 'f68ea70e332336e99c0b51b19e33647b40fcfbb4', "aria-hidden": "true", class: { 'scroll-control scroll-left': true, 'd-none': !this.canScrollLeft }, onMouseDown: e => this.handleScrollButtonClick(e, 'left') }, h("post-icon", { key: 'fac01a93fd7cbfe2548a4d049d59f0bc6d01af63', "aria-hidden": "true", name: "chevronleft" })), h("nav", { key: '7787a27e76350e9e86a97a58a20abe1286786ff7', ref: el => (this.navbar = el), "aria-label": this.textMain }, h("slot", { key: '357a8f5fe1e7b6bea5ae67d87c979f785ea24b82' })), h("div", { key: 'ce6091a9466fcd17aca39fcb5d6c204e1782c95d', "aria-hidden": "true", class: { 'scroll-control scroll-right': true, 'd-none': !this.canScrollRight }, onMouseDown: e => this.handleScrollButtonClick(e, 'right') }, h("post-icon", { key: '92d35b38a453326701a0837e6187abf82fa37bf4', "aria-hidden": "true", name: "chevronright" }))));
|
|
133
133
|
}
|
|
134
134
|
static get is() { return "post-mainnavigation"; }
|
|
135
135
|
static get encapsulation() { return "shadow"; }
|
|
@@ -295,7 +295,7 @@ export class PostMegadropdown {
|
|
|
295
295
|
}
|
|
296
296
|
render() {
|
|
297
297
|
const containerStyle = this.isVisible ? {} : { display: 'none' };
|
|
298
|
-
return (h(Host, { key: '
|
|
298
|
+
return (h(Host, { key: '2cc8228a628b2a0380acf4fcac8daa1ef1a7bf2f', version: version }, h("div", { key: '709fe50f23fd355bd97add916b451d5abf653780', ref: el => (this.animatedContainer = el), class: "megadropdown", style: containerStyle }, h("div", { key: 'e2bac29e70e39800ee55c8454f78b6889b241121', class: "section" }, this.device !== 'desktop' && this.megadropdownTitle && (h("p", { key: '6c28bc5d3e3b8c8dab385f13a4b9b8a7b7ba70b9', class: "megadropdown-title" }, this.megadropdownTitle)), h("div", { key: 'bf71d0d7b4a84ae1238f27373d195403d8a1f812', class: "megadropdown-content" }, h("slot", { key: '9812bec733ca678b1a3681d90859082e57fbd64a' })), this.device === 'desktop' ? (h("post-closebutton", { onClick: () => this.hide(true), class: "close-button", size: "small", placement: "manual" }, this.textClose)) : (h("button", { onClick: () => this.hide(true), class: "back-button" }, h("post-icon", { name: "arrowleft" }), this.textBack))))));
|
|
299
299
|
}
|
|
300
300
|
static get is() { return "post-megadropdown"; }
|
|
301
301
|
static get encapsulation() { return "shadow"; }
|
|
@@ -71,7 +71,7 @@ export class PostMegadropdownTrigger {
|
|
|
71
71
|
this.megadropdown.toggle();
|
|
72
72
|
}
|
|
73
73
|
render() {
|
|
74
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: 'd5242fd9126f3486f731ed6f369f3a6c38a5d1e9', "data-version": version }, h("button", { key: '6af086a50a9c788b35ba542531950b69a5e249da', ref: el => (this.interactiveButton = el), type: "button", "aria-haspopup": "menu", "aria-expanded": this.isMegadropdownExpanded.toString(), onClick: this.onClick.bind(this), onKeyDown: this.onKeyDown.bind(this), class: { active: this.active } }, h("span", { key: 'dacf0bd6dc576fa7c70353c98eacb3d81ddf83e5' }, h("span", { key: '0c7b950ea9bfcae62b367900d78f155edc49de72', innerHTML: this.slottedContent }), h("span", { key: '999325546eb3196f6e704ebeb18f436ff3d53756', "aria-hidden": "true" }, h("slot", { key: '08fa107b944a87edf156ea7d5e12692eba64952d' }))), h("post-icon", { key: 'eb32199b1ff6951b6025c1e4919674f5419f7d49', name: "chevrondown" }))));
|
|
75
75
|
}
|
|
76
76
|
static get is() { return "post-megadropdown-trigger"; }
|
|
77
77
|
static get encapsulation() { return "shadow"; }
|