@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
package/hydrate/index.mjs
CHANGED
|
@@ -5887,182 +5887,24 @@ function Url() {
|
|
|
5887
5887
|
});
|
|
5888
5888
|
}
|
|
5889
5889
|
|
|
5890
|
-
/* eslint-disable no-undefined,no-param-reassign,no-shadow */
|
|
5891
|
-
|
|
5892
|
-
/**
|
|
5893
|
-
* Throttle execution of a function. Especially useful for rate limiting
|
|
5894
|
-
* execution of handlers on events like resize and scroll.
|
|
5895
|
-
*
|
|
5896
|
-
* @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher)
|
|
5897
|
-
* are most useful.
|
|
5898
|
-
* @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through,
|
|
5899
|
-
* as-is, to `callback` when the throttled-function is executed.
|
|
5900
|
-
* @param {object} [options] - An object to configure options.
|
|
5901
|
-
* @param {boolean} [options.noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds
|
|
5902
|
-
* while the throttled-function is being called. If noTrailing is false or unspecified, callback will be executed
|
|
5903
|
-
* one final time after the last throttled-function call. (After the throttled-function has not been called for
|
|
5904
|
-
* `delay` milliseconds, the internal counter is reset).
|
|
5905
|
-
* @param {boolean} [options.noLeading] - Optional, defaults to false. If noLeading is false, the first throttled-function call will execute callback
|
|
5906
|
-
* immediately. If noLeading is true, the first the callback execution will be skipped. It should be noted that
|
|
5907
|
-
* callback will never executed if both noLeading = true and noTrailing = true.
|
|
5908
|
-
* @param {boolean} [options.debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is
|
|
5909
|
-
* false (at end), schedule `callback` to execute after `delay` ms.
|
|
5910
|
-
*
|
|
5911
|
-
* @returns {Function} A new, throttled, function.
|
|
5912
|
-
*/
|
|
5913
|
-
function throttle (delay, callback, options) {
|
|
5914
|
-
var _ref = options || {},
|
|
5915
|
-
_ref$noTrailing = _ref.noTrailing,
|
|
5916
|
-
noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing,
|
|
5917
|
-
_ref$noLeading = _ref.noLeading,
|
|
5918
|
-
noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading,
|
|
5919
|
-
_ref$debounceMode = _ref.debounceMode,
|
|
5920
|
-
debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode;
|
|
5921
|
-
/*
|
|
5922
|
-
* After wrapper has stopped being called, this timeout ensures that
|
|
5923
|
-
* `callback` is executed at the proper times in `throttle` and `end`
|
|
5924
|
-
* debounce modes.
|
|
5925
|
-
*/
|
|
5926
|
-
var timeoutID;
|
|
5927
|
-
var cancelled = false;
|
|
5928
|
-
|
|
5929
|
-
// Keep track of the last time `callback` was executed.
|
|
5930
|
-
var lastExec = 0;
|
|
5931
|
-
|
|
5932
|
-
// Function to clear existing timeout
|
|
5933
|
-
function clearExistingTimeout() {
|
|
5934
|
-
if (timeoutID) {
|
|
5935
|
-
clearTimeout(timeoutID);
|
|
5936
|
-
}
|
|
5937
|
-
}
|
|
5938
|
-
|
|
5939
|
-
// Function to cancel next exec
|
|
5940
|
-
function cancel(options) {
|
|
5941
|
-
var _ref2 = options || {},
|
|
5942
|
-
_ref2$upcomingOnly = _ref2.upcomingOnly,
|
|
5943
|
-
upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly;
|
|
5944
|
-
clearExistingTimeout();
|
|
5945
|
-
cancelled = !upcomingOnly;
|
|
5946
|
-
}
|
|
5947
|
-
|
|
5948
|
-
/*
|
|
5949
|
-
* The `wrapper` function encapsulates all of the throttling / debouncing
|
|
5950
|
-
* functionality and when executed will limit the rate at which `callback`
|
|
5951
|
-
* is executed.
|
|
5952
|
-
*/
|
|
5953
|
-
function wrapper() {
|
|
5954
|
-
for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
5955
|
-
arguments_[_key] = arguments[_key];
|
|
5956
|
-
}
|
|
5957
|
-
var self = this;
|
|
5958
|
-
var elapsed = Date.now() - lastExec;
|
|
5959
|
-
if (cancelled) {
|
|
5960
|
-
return;
|
|
5961
|
-
}
|
|
5962
|
-
|
|
5963
|
-
// Execute `callback` and update the `lastExec` timestamp.
|
|
5964
|
-
function exec() {
|
|
5965
|
-
lastExec = Date.now();
|
|
5966
|
-
callback.apply(self, arguments_);
|
|
5967
|
-
}
|
|
5968
|
-
|
|
5969
|
-
/*
|
|
5970
|
-
* If `debounceMode` is true (at begin) this is used to clear the flag
|
|
5971
|
-
* to allow future `callback` executions.
|
|
5972
|
-
*/
|
|
5973
|
-
function clear() {
|
|
5974
|
-
timeoutID = undefined;
|
|
5975
|
-
}
|
|
5976
|
-
if (!noLeading && debounceMode && !timeoutID) {
|
|
5977
|
-
/*
|
|
5978
|
-
* Since `wrapper` is being called for the first time and
|
|
5979
|
-
* `debounceMode` is true (at begin), execute `callback`
|
|
5980
|
-
* and noLeading != true.
|
|
5981
|
-
*/
|
|
5982
|
-
exec();
|
|
5983
|
-
}
|
|
5984
|
-
clearExistingTimeout();
|
|
5985
|
-
if (debounceMode === undefined && elapsed > delay) {
|
|
5986
|
-
if (noLeading) {
|
|
5987
|
-
/*
|
|
5988
|
-
* In throttle mode with noLeading, if `delay` time has
|
|
5989
|
-
* been exceeded, update `lastExec` and schedule `callback`
|
|
5990
|
-
* to execute after `delay` ms.
|
|
5991
|
-
*/
|
|
5992
|
-
lastExec = Date.now();
|
|
5993
|
-
if (!noTrailing) {
|
|
5994
|
-
timeoutID = setTimeout(debounceMode ? clear : exec, delay);
|
|
5995
|
-
}
|
|
5996
|
-
} else {
|
|
5997
|
-
/*
|
|
5998
|
-
* In throttle mode without noLeading, if `delay` time has been exceeded, execute
|
|
5999
|
-
* `callback`.
|
|
6000
|
-
*/
|
|
6001
|
-
exec();
|
|
6002
|
-
}
|
|
6003
|
-
} else if (noTrailing !== true) {
|
|
6004
|
-
/*
|
|
6005
|
-
* In trailing throttle mode, since `delay` time has not been
|
|
6006
|
-
* exceeded, schedule `callback` to execute `delay` ms after most
|
|
6007
|
-
* recent execution.
|
|
6008
|
-
*
|
|
6009
|
-
* If `debounceMode` is true (at begin), schedule `clear` to execute
|
|
6010
|
-
* after `delay` ms.
|
|
6011
|
-
*
|
|
6012
|
-
* If `debounceMode` is false (at end), schedule `callback` to
|
|
6013
|
-
* execute after `delay` ms.
|
|
6014
|
-
*/
|
|
6015
|
-
timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
|
|
6016
|
-
}
|
|
6017
|
-
}
|
|
6018
|
-
wrapper.cancel = cancel;
|
|
6019
|
-
|
|
6020
|
-
// Return the wrapper function.
|
|
6021
|
-
return wrapper;
|
|
6022
|
-
}
|
|
6023
|
-
|
|
6024
|
-
/* eslint-disable no-undefined */
|
|
6025
|
-
|
|
6026
|
-
/**
|
|
6027
|
-
* Debounce execution of a function. Debouncing, unlike throttling,
|
|
6028
|
-
* guarantees that a function is only executed a single time, either at the
|
|
6029
|
-
* very beginning of a series of calls, or at the very end.
|
|
6030
|
-
*
|
|
6031
|
-
* @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
|
|
6032
|
-
* @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
|
|
6033
|
-
* to `callback` when the debounced-function is executed.
|
|
6034
|
-
* @param {object} [options] - An object to configure options.
|
|
6035
|
-
* @param {boolean} [options.atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds
|
|
6036
|
-
* after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.
|
|
6037
|
-
* (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).
|
|
6038
|
-
*
|
|
6039
|
-
* @returns {Function} A new, debounced function.
|
|
6040
|
-
*/
|
|
6041
|
-
function debounce$1 (delay, callback, options) {
|
|
6042
|
-
var _ref = {},
|
|
6043
|
-
_ref$atBegin = _ref.atBegin,
|
|
6044
|
-
atBegin = _ref$atBegin === void 0 ? false : _ref$atBegin;
|
|
6045
|
-
return throttle(delay, callback, {
|
|
6046
|
-
debounceMode: atBegin !== false
|
|
6047
|
-
});
|
|
6048
|
-
}
|
|
6049
|
-
|
|
6050
5890
|
class Breakpoint {
|
|
6051
5891
|
constructor() {
|
|
6052
5892
|
this.breakpoints = [
|
|
6053
|
-
{ key: 'xl', device: 'desktop', minWidth: 1280 },
|
|
6054
|
-
{ key: 'lg', device: 'desktop', minWidth: 1024 },
|
|
6055
|
-
{ key: 'md', device: 'tablet', minWidth: 780 },
|
|
6056
|
-
{ key: 'sm', device: 'tablet', minWidth: 600 },
|
|
6057
|
-
{ key: 'xs', device: 'mobile', minWidth: 0 },
|
|
5893
|
+
{ key: 'xl', device: 'desktop', minWidth: 1280, mediaQuery: '(min-width: 1280px)' },
|
|
5894
|
+
{ key: 'lg', device: 'desktop', minWidth: 1024, mediaQuery: '(min-width: 1024px)' },
|
|
5895
|
+
{ key: 'md', device: 'tablet', minWidth: 780, mediaQuery: '(min-width: 780px)' },
|
|
5896
|
+
{ key: 'sm', device: 'tablet', minWidth: 600, mediaQuery: '(min-width: 600px)' },
|
|
5897
|
+
{ key: 'xs', device: 'mobile', minWidth: 0, mediaQuery: '(min-width: 0px)' },
|
|
6058
5898
|
];
|
|
6059
5899
|
this.resizeObserver = globalThis.ResizeObserver
|
|
6060
5900
|
? new ResizeObserver(() => this.updateCurrentBreakpoint())
|
|
6061
5901
|
: null;
|
|
6062
|
-
this.updateCurrentBreakpoint =
|
|
5902
|
+
this.updateCurrentBreakpoint = (options = { emitEvents: true }) => {
|
|
6063
5903
|
const previousBreakpoint = this.currentBreakpoint;
|
|
6064
5904
|
const newBreakpoint = this.breakpoints.find(breakpoint => {
|
|
6065
|
-
return
|
|
5905
|
+
return globalThis.matchMedia
|
|
5906
|
+
? globalThis.matchMedia(breakpoint.mediaQuery).matches
|
|
5907
|
+
: breakpoint.minWidth <= document.documentElement.clientWidth;
|
|
6066
5908
|
});
|
|
6067
5909
|
if (!newBreakpoint)
|
|
6068
5910
|
return;
|
|
@@ -6070,9 +5912,10 @@ class Breakpoint {
|
|
|
6070
5912
|
if (!options.emitEvents)
|
|
6071
5913
|
return;
|
|
6072
5914
|
Object.keys(this.currentBreakpoint)
|
|
5915
|
+
.filter(key => key !== 'mediaQuery')
|
|
6073
5916
|
.filter(key => !previousBreakpoint || this.currentBreakpoint[key] !== previousBreakpoint[key])
|
|
6074
5917
|
.forEach((key) => this.dispatchEvent(key));
|
|
6075
|
-
}
|
|
5918
|
+
};
|
|
6076
5919
|
if (this.resizeObserver) {
|
|
6077
5920
|
this.updateCurrentBreakpoint({ emitEvents: false });
|
|
6078
5921
|
this.resizeObserver.observe(document.body);
|
|
@@ -6088,37 +5931,6 @@ class Breakpoint {
|
|
|
6088
5931
|
}
|
|
6089
5932
|
const breakpoint = new Breakpoint();
|
|
6090
5933
|
|
|
6091
|
-
/**
|
|
6092
|
-
* Invoke the `componentOnReady` method if it is available, simulate it otherwise
|
|
6093
|
-
* @see https://stenciljs.com/docs/api#componentonready
|
|
6094
|
-
*/
|
|
6095
|
-
function componentOnReady(el) {
|
|
6096
|
-
if (typeof el.componentOnReady === 'function') {
|
|
6097
|
-
return el.componentOnReady();
|
|
6098
|
-
}
|
|
6099
|
-
else {
|
|
6100
|
-
return new Promise(resolve => customOnReady(() => {
|
|
6101
|
-
resolve(el);
|
|
6102
|
-
}));
|
|
6103
|
-
}
|
|
6104
|
-
}
|
|
6105
|
-
function customOnReady(callback) {
|
|
6106
|
-
if (typeof requestAnimationFrame === 'function') {
|
|
6107
|
-
return requestAnimationFrame(callback);
|
|
6108
|
-
}
|
|
6109
|
-
return setTimeout(callback);
|
|
6110
|
-
}
|
|
6111
|
-
|
|
6112
|
-
function debounce(callback, timeout = 200) {
|
|
6113
|
-
let id;
|
|
6114
|
-
return (...args) => {
|
|
6115
|
-
if (id) {
|
|
6116
|
-
clearTimeout(id);
|
|
6117
|
-
}
|
|
6118
|
-
id = setTimeout(callback, timeout, ...args);
|
|
6119
|
-
};
|
|
6120
|
-
}
|
|
6121
|
-
|
|
6122
5934
|
/**
|
|
6123
5935
|
* Validates if an event should be processed based on target and nesting criteria
|
|
6124
5936
|
* @param event - The event to validate
|
|
@@ -6210,32 +6022,106 @@ function EventFrom(tag, option) {
|
|
|
6210
6022
|
}
|
|
6211
6023
|
/**
|
|
6212
6024
|
* Traverses up the DOM (including crossing shadow DOM boundaries) to find the closest ancestor
|
|
6213
|
-
*
|
|
6214
|
-
* @param
|
|
6215
|
-
* @param
|
|
6025
|
+
* matching the given predicate.
|
|
6026
|
+
* @param start - The starting element
|
|
6027
|
+
* @param predicate - A type guard used to test each ancestor
|
|
6216
6028
|
* @returns The closest matching ancestor or null if none found
|
|
6217
6029
|
*/
|
|
6218
|
-
function
|
|
6219
|
-
let current =
|
|
6030
|
+
function findClosestAcrossShadow(start, predicate) {
|
|
6031
|
+
let current = start;
|
|
6220
6032
|
while (current) {
|
|
6221
|
-
if (current
|
|
6033
|
+
if (predicate(current)) {
|
|
6222
6034
|
return current;
|
|
6223
6035
|
}
|
|
6224
|
-
// Check regular parent first
|
|
6225
6036
|
if (current.parentElement) {
|
|
6226
6037
|
current = current.parentElement;
|
|
6227
6038
|
}
|
|
6228
|
-
// If no parentElement, check if we're in a shadow root
|
|
6229
|
-
else if (current.parentNode instanceof ShadowRoot) {
|
|
6230
|
-
current = current.parentNode.host;
|
|
6231
|
-
}
|
|
6232
|
-
// No more parents to check
|
|
6233
6039
|
else {
|
|
6234
|
-
|
|
6040
|
+
// Duck-typed ShadowRoot check (nodeType 11 + host) instead of `instanceof ShadowRoot`,
|
|
6041
|
+
// since some test environments (e.g. JSDOM) only partially implement it.
|
|
6042
|
+
const parent = current.parentNode;
|
|
6043
|
+
if (parent !== null && parent.nodeType === 11 && 'host' in parent) {
|
|
6044
|
+
current = parent.host;
|
|
6045
|
+
}
|
|
6046
|
+
else {
|
|
6047
|
+
current = null;
|
|
6048
|
+
}
|
|
6235
6049
|
}
|
|
6236
6050
|
}
|
|
6237
6051
|
return null;
|
|
6238
6052
|
}
|
|
6053
|
+
function findClosestParentWithTag(element, tagName) {
|
|
6054
|
+
return findClosestAcrossShadow(element, (el) => el.localName === tagName);
|
|
6055
|
+
}
|
|
6056
|
+
|
|
6057
|
+
const CLOSABLE_TARGETS = [
|
|
6058
|
+
{
|
|
6059
|
+
predicate: el => el.localName === 'post-banner',
|
|
6060
|
+
close: el => void el.dismiss(),
|
|
6061
|
+
},
|
|
6062
|
+
{
|
|
6063
|
+
predicate: el => el.localName === 'post-popover',
|
|
6064
|
+
close: el => void el.hide(),
|
|
6065
|
+
},
|
|
6066
|
+
{
|
|
6067
|
+
predicate: el => el.localName === 'post-popovercontainer',
|
|
6068
|
+
close: el => void el.hide(),
|
|
6069
|
+
},
|
|
6070
|
+
{
|
|
6071
|
+
predicate: el => el.localName === 'post-collapsible',
|
|
6072
|
+
close: el => void el.toggle(false),
|
|
6073
|
+
},
|
|
6074
|
+
{
|
|
6075
|
+
predicate: el => el.localName === 'post-accordion-item',
|
|
6076
|
+
close: el => void el.toggle(false),
|
|
6077
|
+
},
|
|
6078
|
+
{
|
|
6079
|
+
predicate: el => el.localName === 'dialog',
|
|
6080
|
+
close: el => el.close(),
|
|
6081
|
+
},
|
|
6082
|
+
{
|
|
6083
|
+
predicate: el => el.hasAttribute('popover'),
|
|
6084
|
+
close: el => el.togglePopover(false),
|
|
6085
|
+
},
|
|
6086
|
+
];
|
|
6087
|
+
function findClosableTarget(start) {
|
|
6088
|
+
const el = findClosestAcrossShadow(start, (el) => CLOSABLE_TARGETS.some(t => t.predicate(el)));
|
|
6089
|
+
if (!el)
|
|
6090
|
+
return null;
|
|
6091
|
+
const match = CLOSABLE_TARGETS.find(t => t.predicate(el));
|
|
6092
|
+
return { element: el, close: () => match.close(el) };
|
|
6093
|
+
}
|
|
6094
|
+
|
|
6095
|
+
/**
|
|
6096
|
+
* Invoke the `componentOnReady` method if it is available, simulate it otherwise
|
|
6097
|
+
* @see https://stenciljs.com/docs/api#componentonready
|
|
6098
|
+
*/
|
|
6099
|
+
function componentOnReady(el) {
|
|
6100
|
+
if (typeof el.componentOnReady === 'function') {
|
|
6101
|
+
return el.componentOnReady();
|
|
6102
|
+
}
|
|
6103
|
+
else {
|
|
6104
|
+
return new Promise(resolve => customOnReady(() => {
|
|
6105
|
+
resolve(el);
|
|
6106
|
+
}));
|
|
6107
|
+
}
|
|
6108
|
+
}
|
|
6109
|
+
function customOnReady(callback) {
|
|
6110
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
6111
|
+
return requestAnimationFrame(callback);
|
|
6112
|
+
}
|
|
6113
|
+
return setTimeout(callback);
|
|
6114
|
+
}
|
|
6115
|
+
|
|
6116
|
+
function debounce$1(callback, timeout = 200) {
|
|
6117
|
+
let id;
|
|
6118
|
+
return (...args) => {
|
|
6119
|
+
if (id) {
|
|
6120
|
+
clearTimeout(id);
|
|
6121
|
+
}
|
|
6122
|
+
id = setTimeout(callback, timeout, ...args);
|
|
6123
|
+
};
|
|
6124
|
+
}
|
|
6239
6125
|
|
|
6240
6126
|
/**
|
|
6241
6127
|
* getRootNode() can only be used after the element has been attached to the document!
|
|
@@ -6417,7 +6303,7 @@ function repeat(callback, { delayMs = 300, intervalMs = 100 } = {}) {
|
|
|
6417
6303
|
};
|
|
6418
6304
|
}
|
|
6419
6305
|
|
|
6420
|
-
const version$1 = "10.
|
|
6306
|
+
const version$1 = "10.5.0";
|
|
6421
6307
|
|
|
6422
6308
|
const postAccordionCss = () => `:host{display:block;border-block-start:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}`;
|
|
6423
6309
|
|
|
@@ -6638,44 +6524,31 @@ class PostAutocomplete {
|
|
|
6638
6524
|
constructor(hostRef) {
|
|
6639
6525
|
registerInstance(this, hostRef);
|
|
6640
6526
|
this.postFilteringEvent = createEvent(this, "postFilteringEvent");
|
|
6641
|
-
this.debouncedHandleInput = debounce((event) => {
|
|
6527
|
+
this.debouncedHandleInput = debounce$1((event) => {
|
|
6642
6528
|
void this.handleInput(event);
|
|
6643
6529
|
}, 250);
|
|
6644
6530
|
/** Number of characters to type before filtering methods are called */
|
|
6645
6531
|
this.filterThreshold = 0;
|
|
6646
6532
|
/** Show or hide the clear button */
|
|
6647
6533
|
this.clearable = false;
|
|
6648
|
-
|
|
6649
|
-
this.
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6534
|
+
/** Whether the listbox is currently expanded */
|
|
6535
|
+
this.expanded = false;
|
|
6536
|
+
/** The value of the last run query */
|
|
6537
|
+
this.lastQuery = '';
|
|
6538
|
+
/** The value of the selected listbox option */
|
|
6539
|
+
this.selectedValue = null;
|
|
6540
|
+
this.handleClick = async () => {
|
|
6541
|
+
await this.runQuery('', true);
|
|
6655
6542
|
};
|
|
6656
|
-
this.
|
|
6657
|
-
this.
|
|
6658
|
-
this.listBoxElement.filter('');
|
|
6543
|
+
this.handleBlur = () => {
|
|
6544
|
+
this.restoreSelectedValue();
|
|
6659
6545
|
this.hideListBox();
|
|
6660
6546
|
};
|
|
6661
6547
|
this.handleInput = async (event) => {
|
|
6662
6548
|
if (!this.listBoxElement)
|
|
6663
6549
|
return;
|
|
6664
6550
|
const value = event.target.value.trim();
|
|
6665
|
-
|
|
6666
|
-
// Allow for consuming parent to handle filtering (e.g. for async data) and prevent default filtering behavior
|
|
6667
|
-
const { defaultPrevented } = this.postFilteringEvent.emit(query && query.length >= this.filterThreshold ? query : '');
|
|
6668
|
-
if (defaultPrevented)
|
|
6669
|
-
return;
|
|
6670
|
-
await this.listBoxElement.filter(query);
|
|
6671
|
-
if (query) {
|
|
6672
|
-
this.showListBox();
|
|
6673
|
-
this.announceCount();
|
|
6674
|
-
}
|
|
6675
|
-
else {
|
|
6676
|
-
this.inputValue = '';
|
|
6677
|
-
this.clearAnnouncement();
|
|
6678
|
-
}
|
|
6551
|
+
await this.runQuery(value.length >= this.filterThreshold ? value : '');
|
|
6679
6552
|
};
|
|
6680
6553
|
this.handleKeyDown = (event) => {
|
|
6681
6554
|
const { key, altKey } = event;
|
|
@@ -6717,8 +6590,7 @@ class PostAutocomplete {
|
|
|
6717
6590
|
};
|
|
6718
6591
|
this.handleOptionSelected = (e) => {
|
|
6719
6592
|
const value = e.detail;
|
|
6720
|
-
this.
|
|
6721
|
-
this.inputValue = value;
|
|
6593
|
+
this.updateSelectedValue(value);
|
|
6722
6594
|
this.hideListBox();
|
|
6723
6595
|
};
|
|
6724
6596
|
this.handleOptionActive = (e) => {
|
|
@@ -6730,23 +6602,9 @@ class PostAutocomplete {
|
|
|
6730
6602
|
this.inputElement.removeAttribute('aria-activedescendant');
|
|
6731
6603
|
}
|
|
6732
6604
|
};
|
|
6733
|
-
this.
|
|
6734
|
-
this.clearAnnouncement();
|
|
6735
|
-
this.listBoxElement.hide();
|
|
6736
|
-
this.inputElement.ariaExpanded = 'false';
|
|
6737
|
-
this.host.removeAttribute('open');
|
|
6738
|
-
this.inputElement.removeAttribute('aria-activedescendant');
|
|
6739
|
-
};
|
|
6740
|
-
this.showListBox = async () => {
|
|
6741
|
-
await this.listBoxElement.show();
|
|
6742
|
-
this.inputElement.ariaExpanded = 'true';
|
|
6743
|
-
this.host.setAttribute('open', '');
|
|
6744
|
-
this.announceCount();
|
|
6745
|
-
};
|
|
6746
|
-
this.clearInput = () => {
|
|
6605
|
+
this.handleClear = () => {
|
|
6747
6606
|
if (this.inputElement) {
|
|
6748
|
-
this.
|
|
6749
|
-
this.inputValue = '';
|
|
6607
|
+
this.updateSelectedValue(null);
|
|
6750
6608
|
this.listBoxElement.clearSelection();
|
|
6751
6609
|
this.hideListBox();
|
|
6752
6610
|
}
|
|
@@ -6793,18 +6651,16 @@ class PostAutocomplete {
|
|
|
6793
6651
|
if (this.inputElement) {
|
|
6794
6652
|
this.inputElement.addEventListener('input', this.debouncedHandleInput);
|
|
6795
6653
|
this.inputElement.addEventListener('keydown', this.handleKeyDown);
|
|
6796
|
-
this.inputElement.addEventListener('blur', this.
|
|
6797
|
-
this.inputElement.addEventListener('click', this.
|
|
6798
|
-
this.inputElement.addEventListener('focus', this.handleFocus);
|
|
6654
|
+
this.inputElement.addEventListener('blur', this.handleBlur);
|
|
6655
|
+
this.inputElement.addEventListener('click', this.handleClick);
|
|
6799
6656
|
}
|
|
6800
6657
|
}
|
|
6801
6658
|
detachInputListeners() {
|
|
6802
6659
|
if (this.inputElement) {
|
|
6803
6660
|
this.inputElement.removeEventListener('input', this.debouncedHandleInput);
|
|
6804
6661
|
this.inputElement.removeEventListener('keydown', this.handleKeyDown);
|
|
6805
|
-
this.inputElement.removeEventListener('blur', this.
|
|
6806
|
-
this.inputElement.removeEventListener('click', this.
|
|
6807
|
-
this.inputElement.removeEventListener('focus', this.handleFocus);
|
|
6662
|
+
this.inputElement.removeEventListener('blur', this.handleBlur);
|
|
6663
|
+
this.inputElement.removeEventListener('click', this.handleClick);
|
|
6808
6664
|
}
|
|
6809
6665
|
}
|
|
6810
6666
|
attachListboxListeners() {
|
|
@@ -6829,8 +6685,53 @@ class PostAutocomplete {
|
|
|
6829
6685
|
const count = this.listBoxElement.querySelectorAll('post-listbox-option:not([hidden])').length;
|
|
6830
6686
|
this.outputElement.textContent = this.textAvailableSuggestions.replace('{count}', String(count));
|
|
6831
6687
|
}
|
|
6688
|
+
async showListBox() {
|
|
6689
|
+
await this.listBoxElement.show();
|
|
6690
|
+
this.expanded = true;
|
|
6691
|
+
this.inputElement.ariaExpanded = 'true';
|
|
6692
|
+
this.host.setAttribute('open', '');
|
|
6693
|
+
this.announceCount();
|
|
6694
|
+
}
|
|
6695
|
+
async hideListBox() {
|
|
6696
|
+
this.clearAnnouncement();
|
|
6697
|
+
this.expanded = false;
|
|
6698
|
+
this.host.removeAttribute('open');
|
|
6699
|
+
this.inputElement.ariaExpanded = 'false';
|
|
6700
|
+
this.inputElement.removeAttribute('aria-activedescendant');
|
|
6701
|
+
await this.listBoxElement.hide();
|
|
6702
|
+
}
|
|
6703
|
+
updateSelectedValue(value) {
|
|
6704
|
+
this.selectedValue = value;
|
|
6705
|
+
this.inputElement.value = this.selectedValue ?? '';
|
|
6706
|
+
}
|
|
6707
|
+
/** Restores the input to the value of the selected option. */
|
|
6708
|
+
restoreSelectedValue() {
|
|
6709
|
+
this.inputElement.value = this.selectedValue ?? '';
|
|
6710
|
+
}
|
|
6711
|
+
/** Runs a query, filtering the listbox options and reflecting the outcome. */
|
|
6712
|
+
async runQuery(query, alwaysExpand = false) {
|
|
6713
|
+
// Prevent running the same query twice.
|
|
6714
|
+
if (this.lastQuery !== (this.lastQuery = query)) {
|
|
6715
|
+
await this.filterListBox(query);
|
|
6716
|
+
}
|
|
6717
|
+
// Always update the count if the listbox is expanded.
|
|
6718
|
+
if (this.expanded) {
|
|
6719
|
+
this.announceCount();
|
|
6720
|
+
}
|
|
6721
|
+
// Automatically show the listbox if the query is non-empty.
|
|
6722
|
+
else if (alwaysExpand || query) {
|
|
6723
|
+
await this.showListBox();
|
|
6724
|
+
}
|
|
6725
|
+
}
|
|
6726
|
+
/** Filters the listbox options based on the query, delegating to the consuming parent when possible. */
|
|
6727
|
+
async filterListBox(query) {
|
|
6728
|
+
// Allow for consuming parent to handle filtering (e.g. for async data) and prevent default filtering behavior.
|
|
6729
|
+
if (this.postFilteringEvent.emit(query).defaultPrevented)
|
|
6730
|
+
return;
|
|
6731
|
+
await this.listBoxElement?.filter(query);
|
|
6732
|
+
}
|
|
6832
6733
|
render() {
|
|
6833
|
-
return (hAsync(Host, { key: '
|
|
6734
|
+
return (hAsync(Host, { key: '8b386930fe5484cd73395224b5f0c5daea867b33', "data-version": version$1 }, hAsync("slot", { key: '9aa5a34de2cf18c3d6342069fc2b4ce52baac0d3' }), this.clearable && this.selectedValue !== null && (hAsync("button", { key: '90b459fffc29066667ca4656b6871275d061d3fd', type: "button", class: "autocomplete-clear", onClick: this.handleClear }, hAsync("post-icon", { key: '419de2b608f1638b14aed086f8e2c6064ae634bc', "aria-hidden": "true", name: "closex" }))), hAsync("post-icon", { key: '56b7dd986023a0e46d902020b923ae525c88bef1', "aria-hidden": "true", class: "autocomplete-icon", name: "chevronDown" }), hAsync("output", { key: '6ef02d0baf03c7f562ba6d5c95918e4a7ae1214f', class: "visually-hidden", ref: el => (this.outputElement = el) })));
|
|
6834
6735
|
}
|
|
6835
6736
|
get host() { return getElement(this); }
|
|
6836
6737
|
static get style() { return postAutocompleteCss(); }
|
|
@@ -6842,7 +6743,7 @@ class PostAutocomplete {
|
|
|
6842
6743
|
"clearable": [516],
|
|
6843
6744
|
"listbox": [513],
|
|
6844
6745
|
"textAvailableSuggestions": [513, "text-available-suggestions"],
|
|
6845
|
-
"
|
|
6746
|
+
"selectedValue": [32]
|
|
6846
6747
|
},
|
|
6847
6748
|
"$listeners$": undefined,
|
|
6848
6749
|
"$lazyBundleId$": "-",
|
|
@@ -7117,12 +7018,23 @@ class PostBackToTop {
|
|
|
7117
7018
|
return window.scrollY > window.innerHeight;
|
|
7118
7019
|
}
|
|
7119
7020
|
/*Watch for changes in belowFold to show/hide the back to top button*/
|
|
7120
|
-
watchBelowFold(newValue) {
|
|
7121
|
-
|
|
7122
|
-
|
|
7021
|
+
async watchBelowFold(newValue) {
|
|
7022
|
+
this.currentAnimation?.cancel();
|
|
7023
|
+
// host needs to be visible before we can animate, in or out
|
|
7024
|
+
// hidden state gets recalculated after the animation, based on belowFold
|
|
7025
|
+
this.host.hidden = false;
|
|
7026
|
+
this.currentAnimation = fadeSlide(this.host, newValue ? 'in' : 'out', {
|
|
7027
|
+
translate: this.translateY,
|
|
7028
|
+
fill: 'forwards',
|
|
7029
|
+
});
|
|
7030
|
+
try {
|
|
7031
|
+
await this.currentAnimation.finished;
|
|
7032
|
+
// only hide once the fade-out finished and we're still not below fold
|
|
7033
|
+
if (!this.belowFold)
|
|
7034
|
+
this.host.hidden = true;
|
|
7123
7035
|
}
|
|
7124
|
-
|
|
7125
|
-
|
|
7036
|
+
catch {
|
|
7037
|
+
// animation got canceled, nothing to do
|
|
7126
7038
|
}
|
|
7127
7039
|
}
|
|
7128
7040
|
scrollToTop() {
|
|
@@ -7164,16 +7076,17 @@ class PostBackToTop {
|
|
|
7164
7076
|
// Set the initial state
|
|
7165
7077
|
componentWillLoad() {
|
|
7166
7078
|
this.belowFold = this.isBelowFold();
|
|
7079
|
+
this.host.hidden = !this.belowFold;
|
|
7167
7080
|
}
|
|
7168
7081
|
componentDidLoad() {
|
|
7169
|
-
window.addEventListener('scroll', this.handleScroll,
|
|
7082
|
+
window.addEventListener('scroll', this.handleScroll, { passive: true });
|
|
7170
7083
|
this.animateButton();
|
|
7171
7084
|
}
|
|
7172
7085
|
disconnectedCallback() {
|
|
7173
7086
|
window.removeEventListener('scroll', this.handleScroll);
|
|
7174
7087
|
}
|
|
7175
7088
|
render() {
|
|
7176
|
-
return (hAsync(Host, { key: '
|
|
7089
|
+
return (hAsync(Host, { key: '149a8afee36c12130b3e503c4da5cffdaa3f86b5', "data-version": version$1 }, hAsync("button", { key: '4e291c5cfaa55bb6a68f436af570d83377436a3a', class: "back-to-top", onClick: this.scrollToTop }, hAsync("post-icon", { key: 'c25e8d12cf6f751b368010ad2d82534fa95adf86', "aria-hidden": "true", name: "arrowup" }), hAsync("span", { key: 'e16d1247a5ab7e39629e4bec7307ee562c589f7e', class: "visually-hidden" }, this.textBackToTop))));
|
|
7177
7090
|
}
|
|
7178
7091
|
get host() { return getElement(this); }
|
|
7179
7092
|
static get watchers() { return {
|
|
@@ -7296,14 +7209,11 @@ class PostBanner {
|
|
|
7296
7209
|
this.postDismissed.emit();
|
|
7297
7210
|
this.host.remove();
|
|
7298
7211
|
}
|
|
7299
|
-
onCloseButtonClick() {
|
|
7300
|
-
void this.dismiss();
|
|
7301
|
-
}
|
|
7302
7212
|
checkContent() {
|
|
7303
7213
|
this.hasActions = this.host.querySelectorAll('[slot="actions"]').length > 0;
|
|
7304
7214
|
}
|
|
7305
7215
|
render() {
|
|
7306
|
-
return (hAsync(Host, { key: '
|
|
7216
|
+
return (hAsync(Host, { key: '890eea914f07f31f64c9e1b01fca94e824a019bc', "data-version": version$1, role: "alert", "data-color-scheme": "light" }, hAsync("slot", { key: 'd4ac9c3714979cde7bba7554fbe1886d2cf75701', name: "close-button" }), hAsync("div", { key: 'a097570719b709a3b67aa7152701edbf1174ace0', class: "post-banner-content" }, hAsync("slot", { key: 'df12b0e63ac4cf4152c196eaad071774be4d7b88', name: "heading" }), hAsync("slot", { key: 'a5e376800525119dc47815b9977936fa3966e087' }), this.hasActions && (hAsync("div", { key: '6a0cc7f82873bcfde5109ed9e6bfe8255e30b19c', class: "actions" }, hAsync("slot", { key: '11b1d289705cb9d1d96b20b4fcea2b923bfd184a', name: "actions" }))))));
|
|
7307
7217
|
}
|
|
7308
7218
|
get host() { return getElement(this); }
|
|
7309
7219
|
static get style() { return postBannerCss(); }
|
|
@@ -7315,7 +7225,7 @@ class PostBanner {
|
|
|
7315
7225
|
"hasActions": [32],
|
|
7316
7226
|
"dismiss": [64]
|
|
7317
7227
|
},
|
|
7318
|
-
"$listeners$":
|
|
7228
|
+
"$listeners$": undefined,
|
|
7319
7229
|
"$lazyBundleId$": "-",
|
|
7320
7230
|
"$attrsToReflect$": [["type", "type"]]
|
|
7321
7231
|
}; }
|
|
@@ -7323,13 +7233,10 @@ class PostBanner {
|
|
|
7323
7233
|
__decorate$w([
|
|
7324
7234
|
OneOf(BANNER_TYPES)
|
|
7325
7235
|
], PostBanner.prototype, "type", void 0);
|
|
7326
|
-
__decorate$w([
|
|
7327
|
-
EventFrom('post-closebutton', { allowDescendants: true })
|
|
7328
|
-
], PostBanner.prototype, "onCloseButtonClick", null);
|
|
7329
7236
|
|
|
7330
7237
|
const VARIANTS = ['listitem', 'menuitem'];
|
|
7331
7238
|
|
|
7332
|
-
const postBreadcrumbItemCss = () => `a{-webkit-text-decoration:var(--post-core-text-decoration-underline);text-decoration:var(--post-core-text-decoration-underline);border-radius:var(--post-device-border-radius-focus);color:var(--post-current-fg)}a:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}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}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){a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){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){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){a,a:focus{color:LinkText !important}a:hover{text-decoration-thickness:2px}a:visited{color:VisitedText}a.btn:not(.btn-link){border-color:ButtonBorder !important}a.btn.btn-tertiary.px-0{border:0 !important}a.btn.btn-tertiary.px-0:not(:hover){text-decoration:underline}}:host(:not([variant=menuitem])){display:flex;align-items:flex-start;padding-block:var(--post-device-spacing-padding-block-6);gap:var(--post-device-spacing-gap-inline-5)}:host(:not([variant=menuitem])) :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)}:host(:not([variant=menuitem])) :is(button,a):not(:disabled):hover{text-decoration:none}:host(:not([variant=menuitem])) :is(button,a):disabled{border-style:var(--post-core-border-style-dash);cursor:unset}:host(:not([variant=menuitem])) :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}:host(:not([variant=menuitem])) :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){:host(:not([variant=menuitem])) :is(button,a):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host(:not([variant=menuitem])) :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){:host(:not([variant=menuitem])) :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){:host(:not([variant=menuitem])) :is(button,a){border-width:1px !important;transition:none}:host(:not([variant=menuitem])) :is(button,a):is(button){background-color:ButtonFace !important;border-color:ButtonBorder !important}}:host(:not([variant=menuitem])) :is(button,a):hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}:host(:not([variant=menuitem]))::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=")}:is(a,span){white-space:var(--post-breadcrumb-item-wrap, normal) !important;overflow-wrap:anywhere;hyphens:auto;line-break:strict}:host([selected]:not([selected=false])){display:flex;align-items:flex-start;padding-block:var(--post-device-spacing-padding-block-6);gap:var(--post-device-spacing-gap-inline-5)}:host([selected]:not([selected=false])) :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)}:host([selected]:not([selected=false])) :is(button,a):not(:disabled):hover{text-decoration:none}:host([selected]:not([selected=false])) :is(button,a):disabled{border-style:var(--post-core-border-style-dash);cursor:unset}:host([selected]:not([selected=false])) :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}:host([selected]:not([selected=false])) :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){:host([selected]:not([selected=false])) :is(button,a):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host([selected]:not([selected=false])) :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){:host([selected]:not([selected=false])) :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){:host([selected]:not([selected=false])) :is(button,a){border-width:1px !important;transition:none}:host([selected]:not([selected=false])) :is(button,a):is(button){background-color:ButtonFace !important;border-color:ButtonBorder !important}}:host([selected]:not([selected=false])) :is(button,a):hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}:host([selected]:not([selected=false]))::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=")}:host([selected]:not([selected=false])) :is(a,span){color:var(--post-scheme-color-interactive-primary-selected-fg1);font-weight:var(--post-device-font-weight-bold);text-decoration:var(--post-core-text-decoration-none)}`;
|
|
7239
|
+
const postBreadcrumbItemCss = () => `a{-webkit-text-decoration:var(--post-core-text-decoration-underline);text-decoration:var(--post-core-text-decoration-underline);border-radius:var(--post-device-border-radius-focus);color:var(--post-current-fg)}a:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}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}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){a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){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){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){a,a:focus{color:LinkText !important}a:hover{text-decoration-thickness:2px}a:visited{color:VisitedText}a.btn:not(.btn-link){border-color:ButtonBorder !important}a.btn.btn-tertiary.px-0{border:0 !important}a.btn.btn-tertiary.px-0:not(:hover){text-decoration:underline}}:host([variant=menuitem]) :is(a,span){white-space:normal;overflow-wrap:anywhere;hyphens:auto;line-break:strict}:host([variant=listitem]){display:flex;align-items:flex-start;padding-block:var(--post-device-spacing-padding-block-6);gap:var(--post-device-spacing-gap-inline-5)}:host([variant=listitem]) :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)}:host([variant=listitem]) :is(button,a):not(:disabled):hover{text-decoration:none}:host([variant=listitem]) :is(button,a):disabled{border-style:var(--post-core-border-style-dash);cursor:unset}:host([variant=listitem]) :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}:host([variant=listitem]) :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){:host([variant=listitem]) :is(button,a):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host([variant=listitem]) :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){:host([variant=listitem]) :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){:host([variant=listitem]) :is(button,a){border-width:1px !important;transition:none}:host([variant=listitem]) :is(button,a):is(button){background-color:ButtonFace !important;border-color:ButtonBorder !important}}:host([variant=listitem]) :is(button,a):hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}:host([variant=listitem])::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=")}:host([variant=listitem]):host([selected]:not([selected=false])) :is(a,span){color:var(--post-scheme-color-interactive-primary-selected-fg1);font-weight:var(--post-device-font-weight-bold);text-decoration:var(--post-core-text-decoration-none)}:host([variant=listitem]):host([standalone]:not([standalone=false])) :is(a,span){white-space:normal;overflow-wrap:anywhere;hyphens:auto;line-break:strict}`;
|
|
7333
7240
|
|
|
7334
7241
|
var __decorate$v = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
7335
7242
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -7342,60 +7249,229 @@ var __decorate$v = (undefined && undefined.__decorate) || function (decorators,
|
|
|
7342
7249
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7343
7250
|
};
|
|
7344
7251
|
/**
|
|
7345
|
-
* @slot default - The content displayed inside the breadcrumb item.
|
|
7252
|
+
* @slot default - The content displayed inside the breadcrumb item.
|
|
7253
|
+
*/
|
|
7254
|
+
class PostBreadcrumbItem {
|
|
7255
|
+
constructor(hostRef) {
|
|
7256
|
+
registerInstance(this, hostRef);
|
|
7257
|
+
/**
|
|
7258
|
+
* Controls how the item is rendered, either as a standard list item or within an overflow menu.
|
|
7259
|
+
*/
|
|
7260
|
+
this.variant = 'listitem';
|
|
7261
|
+
/**
|
|
7262
|
+
* Indicates that the item represents the current page, applying appropriate styling.
|
|
7263
|
+
*/
|
|
7264
|
+
this.selected = false;
|
|
7265
|
+
/**
|
|
7266
|
+
* Indicates that this is the only visible item, applying appropriate styling.
|
|
7267
|
+
*/
|
|
7268
|
+
this.standalone = false;
|
|
7269
|
+
}
|
|
7270
|
+
render() {
|
|
7271
|
+
const href = this.url instanceof URL ? this.url.href : this.url;
|
|
7272
|
+
const content = href ? (hAsync("a", { href: href, "aria-current": this.selected ? 'page' : undefined, "aria-label": this.label, "aria-description": this.description }, hAsync("slot", null))) : (hAsync("span", null, hAsync("slot", null)));
|
|
7273
|
+
return this.variant === 'listitem' || this.selected ? (hAsync(Host, { "data-version": version$1, role: "listitem", slot: this.selected ? 'selected' : undefined }, content)) : (hAsync(Host, { "data-version": version$1, slot: "menu" }, hAsync("post-menu-item", null, content)));
|
|
7274
|
+
}
|
|
7275
|
+
get host() { return getElement(this); }
|
|
7276
|
+
static get style() { return postBreadcrumbItemCss(); }
|
|
7277
|
+
static get cmpMeta() { return {
|
|
7278
|
+
"$flags$": 265,
|
|
7279
|
+
"$tagName$": "post-breadcrumb-item",
|
|
7280
|
+
"$members$": {
|
|
7281
|
+
"url": [513],
|
|
7282
|
+
"label": [513],
|
|
7283
|
+
"description": [513],
|
|
7284
|
+
"variant": [513],
|
|
7285
|
+
"selected": [516],
|
|
7286
|
+
"standalone": [516]
|
|
7287
|
+
},
|
|
7288
|
+
"$listeners$": undefined,
|
|
7289
|
+
"$lazyBundleId$": "-",
|
|
7290
|
+
"$attrsToReflect$": [["url", "url"], ["label", "label"], ["description", "description"], ["variant", "variant"], ["selected", "selected"], ["standalone", "standalone"]]
|
|
7291
|
+
}; }
|
|
7292
|
+
}
|
|
7293
|
+
__decorate$v([
|
|
7294
|
+
Url()
|
|
7295
|
+
], PostBreadcrumbItem.prototype, "url", void 0);
|
|
7296
|
+
__decorate$v([
|
|
7297
|
+
Type('string')
|
|
7298
|
+
], PostBreadcrumbItem.prototype, "label", void 0);
|
|
7299
|
+
__decorate$v([
|
|
7300
|
+
Type('string')
|
|
7301
|
+
], PostBreadcrumbItem.prototype, "description", void 0);
|
|
7302
|
+
__decorate$v([
|
|
7303
|
+
OneOf(VARIANTS)
|
|
7304
|
+
], PostBreadcrumbItem.prototype, "variant", void 0);
|
|
7305
|
+
__decorate$v([
|
|
7306
|
+
Required(),
|
|
7307
|
+
Type('boolean')
|
|
7308
|
+
], PostBreadcrumbItem.prototype, "selected", void 0);
|
|
7309
|
+
__decorate$v([
|
|
7310
|
+
Required(),
|
|
7311
|
+
Type('boolean')
|
|
7312
|
+
], PostBreadcrumbItem.prototype, "standalone", void 0);
|
|
7313
|
+
|
|
7314
|
+
/* eslint-disable no-undefined,no-param-reassign,no-shadow */
|
|
7315
|
+
|
|
7316
|
+
/**
|
|
7317
|
+
* Throttle execution of a function. Especially useful for rate limiting
|
|
7318
|
+
* execution of handlers on events like resize and scroll.
|
|
7319
|
+
*
|
|
7320
|
+
* @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher)
|
|
7321
|
+
* are most useful.
|
|
7322
|
+
* @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through,
|
|
7323
|
+
* as-is, to `callback` when the throttled-function is executed.
|
|
7324
|
+
* @param {object} [options] - An object to configure options.
|
|
7325
|
+
* @param {boolean} [options.noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds
|
|
7326
|
+
* while the throttled-function is being called. If noTrailing is false or unspecified, callback will be executed
|
|
7327
|
+
* one final time after the last throttled-function call. (After the throttled-function has not been called for
|
|
7328
|
+
* `delay` milliseconds, the internal counter is reset).
|
|
7329
|
+
* @param {boolean} [options.noLeading] - Optional, defaults to false. If noLeading is false, the first throttled-function call will execute callback
|
|
7330
|
+
* immediately. If noLeading is true, the first the callback execution will be skipped. It should be noted that
|
|
7331
|
+
* callback will never executed if both noLeading = true and noTrailing = true.
|
|
7332
|
+
* @param {boolean} [options.debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is
|
|
7333
|
+
* false (at end), schedule `callback` to execute after `delay` ms.
|
|
7334
|
+
*
|
|
7335
|
+
* @returns {Function} A new, throttled, function.
|
|
7336
|
+
*/
|
|
7337
|
+
function throttle (delay, callback, options) {
|
|
7338
|
+
var _ref = options || {},
|
|
7339
|
+
_ref$noTrailing = _ref.noTrailing,
|
|
7340
|
+
noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing,
|
|
7341
|
+
_ref$noLeading = _ref.noLeading,
|
|
7342
|
+
noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading,
|
|
7343
|
+
_ref$debounceMode = _ref.debounceMode,
|
|
7344
|
+
debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode;
|
|
7345
|
+
/*
|
|
7346
|
+
* After wrapper has stopped being called, this timeout ensures that
|
|
7347
|
+
* `callback` is executed at the proper times in `throttle` and `end`
|
|
7348
|
+
* debounce modes.
|
|
7349
|
+
*/
|
|
7350
|
+
var timeoutID;
|
|
7351
|
+
var cancelled = false;
|
|
7352
|
+
|
|
7353
|
+
// Keep track of the last time `callback` was executed.
|
|
7354
|
+
var lastExec = 0;
|
|
7355
|
+
|
|
7356
|
+
// Function to clear existing timeout
|
|
7357
|
+
function clearExistingTimeout() {
|
|
7358
|
+
if (timeoutID) {
|
|
7359
|
+
clearTimeout(timeoutID);
|
|
7360
|
+
}
|
|
7361
|
+
}
|
|
7362
|
+
|
|
7363
|
+
// Function to cancel next exec
|
|
7364
|
+
function cancel(options) {
|
|
7365
|
+
var _ref2 = options || {},
|
|
7366
|
+
_ref2$upcomingOnly = _ref2.upcomingOnly,
|
|
7367
|
+
upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly;
|
|
7368
|
+
clearExistingTimeout();
|
|
7369
|
+
cancelled = !upcomingOnly;
|
|
7370
|
+
}
|
|
7371
|
+
|
|
7372
|
+
/*
|
|
7373
|
+
* The `wrapper` function encapsulates all of the throttling / debouncing
|
|
7374
|
+
* functionality and when executed will limit the rate at which `callback`
|
|
7375
|
+
* is executed.
|
|
7376
|
+
*/
|
|
7377
|
+
function wrapper() {
|
|
7378
|
+
for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
7379
|
+
arguments_[_key] = arguments[_key];
|
|
7380
|
+
}
|
|
7381
|
+
var self = this;
|
|
7382
|
+
var elapsed = Date.now() - lastExec;
|
|
7383
|
+
if (cancelled) {
|
|
7384
|
+
return;
|
|
7385
|
+
}
|
|
7386
|
+
|
|
7387
|
+
// Execute `callback` and update the `lastExec` timestamp.
|
|
7388
|
+
function exec() {
|
|
7389
|
+
lastExec = Date.now();
|
|
7390
|
+
callback.apply(self, arguments_);
|
|
7391
|
+
}
|
|
7392
|
+
|
|
7393
|
+
/*
|
|
7394
|
+
* If `debounceMode` is true (at begin) this is used to clear the flag
|
|
7395
|
+
* to allow future `callback` executions.
|
|
7396
|
+
*/
|
|
7397
|
+
function clear() {
|
|
7398
|
+
timeoutID = undefined;
|
|
7399
|
+
}
|
|
7400
|
+
if (!noLeading && debounceMode && !timeoutID) {
|
|
7401
|
+
/*
|
|
7402
|
+
* Since `wrapper` is being called for the first time and
|
|
7403
|
+
* `debounceMode` is true (at begin), execute `callback`
|
|
7404
|
+
* and noLeading != true.
|
|
7405
|
+
*/
|
|
7406
|
+
exec();
|
|
7407
|
+
}
|
|
7408
|
+
clearExistingTimeout();
|
|
7409
|
+
if (debounceMode === undefined && elapsed > delay) {
|
|
7410
|
+
if (noLeading) {
|
|
7411
|
+
/*
|
|
7412
|
+
* In throttle mode with noLeading, if `delay` time has
|
|
7413
|
+
* been exceeded, update `lastExec` and schedule `callback`
|
|
7414
|
+
* to execute after `delay` ms.
|
|
7415
|
+
*/
|
|
7416
|
+
lastExec = Date.now();
|
|
7417
|
+
if (!noTrailing) {
|
|
7418
|
+
timeoutID = setTimeout(debounceMode ? clear : exec, delay);
|
|
7419
|
+
}
|
|
7420
|
+
} else {
|
|
7421
|
+
/*
|
|
7422
|
+
* In throttle mode without noLeading, if `delay` time has been exceeded, execute
|
|
7423
|
+
* `callback`.
|
|
7424
|
+
*/
|
|
7425
|
+
exec();
|
|
7426
|
+
}
|
|
7427
|
+
} else if (noTrailing !== true) {
|
|
7428
|
+
/*
|
|
7429
|
+
* In trailing throttle mode, since `delay` time has not been
|
|
7430
|
+
* exceeded, schedule `callback` to execute `delay` ms after most
|
|
7431
|
+
* recent execution.
|
|
7432
|
+
*
|
|
7433
|
+
* If `debounceMode` is true (at begin), schedule `clear` to execute
|
|
7434
|
+
* after `delay` ms.
|
|
7435
|
+
*
|
|
7436
|
+
* If `debounceMode` is false (at end), schedule `callback` to
|
|
7437
|
+
* execute after `delay` ms.
|
|
7438
|
+
*/
|
|
7439
|
+
timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
|
|
7440
|
+
}
|
|
7441
|
+
}
|
|
7442
|
+
wrapper.cancel = cancel;
|
|
7443
|
+
|
|
7444
|
+
// Return the wrapper function.
|
|
7445
|
+
return wrapper;
|
|
7446
|
+
}
|
|
7447
|
+
|
|
7448
|
+
/* eslint-disable no-undefined */
|
|
7449
|
+
|
|
7450
|
+
/**
|
|
7451
|
+
* Debounce execution of a function. Debouncing, unlike throttling,
|
|
7452
|
+
* guarantees that a function is only executed a single time, either at the
|
|
7453
|
+
* very beginning of a series of calls, or at the very end.
|
|
7454
|
+
*
|
|
7455
|
+
* @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
|
|
7456
|
+
* @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
|
|
7457
|
+
* to `callback` when the debounced-function is executed.
|
|
7458
|
+
* @param {object} [options] - An object to configure options.
|
|
7459
|
+
* @param {boolean} [options.atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds
|
|
7460
|
+
* after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.
|
|
7461
|
+
* (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).
|
|
7462
|
+
*
|
|
7463
|
+
* @returns {Function} A new, debounced function.
|
|
7346
7464
|
*/
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
/**
|
|
7355
|
-
* Indicates that the item represents the current page, applying appropriate styling.
|
|
7356
|
-
*/
|
|
7357
|
-
this.selected = false;
|
|
7358
|
-
}
|
|
7359
|
-
render() {
|
|
7360
|
-
const href = this.url instanceof URL ? this.url.href : this.url;
|
|
7361
|
-
const content = href ? (hAsync("a", { href: href, "aria-current": this.selected ? 'page' : undefined, "aria-label": this.label, "aria-description": this.description }, hAsync("slot", null))) : (hAsync("span", null, hAsync("slot", null)));
|
|
7362
|
-
return this.variant === 'listitem' || this.selected ? (hAsync(Host, { "data-version": version$1, role: "listitem", slot: this.selected ? 'selected' : undefined }, content)) : (hAsync(Host, { "data-version": version$1 }, hAsync("post-menu-item", null, content)));
|
|
7363
|
-
}
|
|
7364
|
-
get host() { return getElement(this); }
|
|
7365
|
-
static get style() { return postBreadcrumbItemCss(); }
|
|
7366
|
-
static get cmpMeta() { return {
|
|
7367
|
-
"$flags$": 265,
|
|
7368
|
-
"$tagName$": "post-breadcrumb-item",
|
|
7369
|
-
"$members$": {
|
|
7370
|
-
"url": [513],
|
|
7371
|
-
"label": [513],
|
|
7372
|
-
"description": [513],
|
|
7373
|
-
"variant": [513],
|
|
7374
|
-
"selected": [516]
|
|
7375
|
-
},
|
|
7376
|
-
"$listeners$": undefined,
|
|
7377
|
-
"$lazyBundleId$": "-",
|
|
7378
|
-
"$attrsToReflect$": [["url", "url"], ["label", "label"], ["description", "description"], ["variant", "variant"], ["selected", "selected"]]
|
|
7379
|
-
}; }
|
|
7465
|
+
function debounce (delay, callback, options) {
|
|
7466
|
+
var _ref = {},
|
|
7467
|
+
_ref$atBegin = _ref.atBegin,
|
|
7468
|
+
atBegin = _ref$atBegin === void 0 ? false : _ref$atBegin;
|
|
7469
|
+
return throttle(delay, callback, {
|
|
7470
|
+
debounceMode: atBegin !== false
|
|
7471
|
+
});
|
|
7380
7472
|
}
|
|
7381
|
-
__decorate$v([
|
|
7382
|
-
Url()
|
|
7383
|
-
], PostBreadcrumbItem.prototype, "url", void 0);
|
|
7384
|
-
__decorate$v([
|
|
7385
|
-
Type('string')
|
|
7386
|
-
], PostBreadcrumbItem.prototype, "label", void 0);
|
|
7387
|
-
__decorate$v([
|
|
7388
|
-
Type('string')
|
|
7389
|
-
], PostBreadcrumbItem.prototype, "description", void 0);
|
|
7390
|
-
__decorate$v([
|
|
7391
|
-
OneOf(VARIANTS)
|
|
7392
|
-
], PostBreadcrumbItem.prototype, "variant", void 0);
|
|
7393
|
-
__decorate$v([
|
|
7394
|
-
Required(),
|
|
7395
|
-
Type('boolean')
|
|
7396
|
-
], PostBreadcrumbItem.prototype, "selected", void 0);
|
|
7397
7473
|
|
|
7398
|
-
const postBreadcrumbsCss = () => `:host{display:block;position:relative}nav{max-width:100%}nav.invisible{
|
|
7474
|
+
const postBreadcrumbsCss = () => `: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}`;
|
|
7399
7475
|
|
|
7400
7476
|
var __decorate$u = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
7401
7477
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -7407,92 +7483,142 @@ var __decorate$u = (undefined && undefined.__decorate) || function (decorators,
|
|
|
7407
7483
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7408
7484
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7409
7485
|
};
|
|
7486
|
+
const MAX_VISIBLE_ITEMS = 6;
|
|
7487
|
+
const MEASUREMENT_DEBOUNCE_MS$1 = 50;
|
|
7410
7488
|
class PostBreadcrumbs {
|
|
7411
7489
|
constructor(hostRef) {
|
|
7412
7490
|
registerInstance(this, hostRef);
|
|
7413
|
-
this.
|
|
7491
|
+
this.debounceUpdateCollapsedItems = throttle(MEASUREMENT_DEBOUNCE_MS$1, this.updateCollapsedItems.bind(this));
|
|
7492
|
+
this.resizeObserver = new ResizeObserver(this.debounceUpdateCollapsedItems);
|
|
7493
|
+
this.mutationObserver = new MutationObserver(this.updateHiddenNav.bind(this));
|
|
7494
|
+
this.loaded = false;
|
|
7495
|
+
/** The number of breadcrumb items, counted from the start, that are moved into the overflow menu. */
|
|
7496
|
+
this.collapsed = 0;
|
|
7497
|
+
/** The visible breadcrumb navigation. */
|
|
7498
|
+
this.nav = null;
|
|
7499
|
+
/** An off-screen copy of the breadcrumb navigation used for measurement. */
|
|
7500
|
+
this.hiddenNav = null;
|
|
7414
7501
|
}
|
|
7415
7502
|
componentWillLoad() {
|
|
7416
7503
|
this.id = this.host.id || `b${nanoid(6)}`;
|
|
7417
7504
|
}
|
|
7418
|
-
componentDidLoad() {
|
|
7419
|
-
this.
|
|
7420
|
-
this.
|
|
7421
|
-
}
|
|
7422
|
-
disconnectedCallback() {
|
|
7423
|
-
this.mutationObserver?.disconnect();
|
|
7424
|
-
this.resizeObserver?.disconnect();
|
|
7425
|
-
}
|
|
7426
|
-
createMutationObserver() {
|
|
7427
|
-
this.mutationObserver = new MutationObserver(this.duplicateNavElement.bind(this));
|
|
7428
|
-
this.mutationObserver.observe(this.host, {
|
|
7505
|
+
async componentDidLoad() {
|
|
7506
|
+
this.resizeObserver?.observe(document.body);
|
|
7507
|
+
this.mutationObserver?.observe(this.host, {
|
|
7429
7508
|
childList: true,
|
|
7430
7509
|
characterData: true,
|
|
7431
7510
|
subtree: true,
|
|
7432
7511
|
});
|
|
7433
|
-
this.
|
|
7512
|
+
await this.updateHiddenNav();
|
|
7513
|
+
await this.updateCollapsedItems();
|
|
7514
|
+
this.loaded = true;
|
|
7434
7515
|
}
|
|
7435
|
-
|
|
7436
|
-
this.resizeObserver
|
|
7437
|
-
this.
|
|
7516
|
+
disconnectedCallback() {
|
|
7517
|
+
this.resizeObserver?.disconnect();
|
|
7518
|
+
this.mutationObserver?.disconnect();
|
|
7519
|
+
this.debounceUpdateCollapsedItems.cancel();
|
|
7438
7520
|
}
|
|
7439
7521
|
/**
|
|
7440
|
-
*
|
|
7522
|
+
* Measures the space available in the breadcrumb navigation and moves the items that do not fit
|
|
7523
|
+
* into the overflow menu.
|
|
7441
7524
|
*/
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
const nav = shadowRoot?.querySelector('nav');
|
|
7445
|
-
if (!shadowRoot || !nav)
|
|
7525
|
+
async updateCollapsedItems() {
|
|
7526
|
+
if (!this.nav)
|
|
7446
7527
|
return;
|
|
7447
|
-
this.
|
|
7448
|
-
const clone = nav.cloneNode(true);
|
|
7449
|
-
clone.classList.add('invisible');
|
|
7450
|
-
shadowRoot.querySelector('nav.invisible')?.remove();
|
|
7451
|
-
shadowRoot.append(clone);
|
|
7452
|
-
requestAnimationFrame(() => {
|
|
7453
|
-
this.duplicateSlottedElements(clone, 'slot:not([name])');
|
|
7454
|
-
this.duplicateSlottedElements(clone, 'slot[name="selected"]');
|
|
7455
|
-
this.checkOverflow();
|
|
7456
|
-
});
|
|
7528
|
+
this.collapsed = await this.calculateCollapsedItems();
|
|
7457
7529
|
}
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7530
|
+
/**
|
|
7531
|
+
* Determines how many items have to be collapsed, either because they do not fit the breadcrumb
|
|
7532
|
+
* navigation or because they exceed the maximum number of visible items.
|
|
7533
|
+
*/
|
|
7534
|
+
async calculateCollapsedItems() {
|
|
7535
|
+
const items = this.host.querySelectorAll('post-breadcrumb-item');
|
|
7536
|
+
const overflowing = await this.calculateOverflowingItems();
|
|
7537
|
+
// Never show more than `MAX_VISIBLE_ITEMS`, even if the nav is wide enough to fit them all.
|
|
7538
|
+
return Math.max(overflowing, items.length - MAX_VISIBLE_ITEMS);
|
|
7467
7539
|
}
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7540
|
+
/**
|
|
7541
|
+
* Determines how many items overflow the width of the breadcrumb navigation.
|
|
7542
|
+
*/
|
|
7543
|
+
async calculateOverflowingItems() {
|
|
7544
|
+
// Fallback to zero if the hidden nav is not available for measurement.
|
|
7545
|
+
if (!this.hiddenNav)
|
|
7546
|
+
return 0;
|
|
7547
|
+
const gap = Number.parseFloat(getComputedStyle(this.hiddenNav.firstElementChild).gap);
|
|
7548
|
+
const menu = this.hiddenNav.querySelector('.menu').clientWidth;
|
|
7549
|
+
// The last item can never be collapsed, so it is ignored when measuring the width of the items.
|
|
7550
|
+
const items = Array.from(this.hiddenNav.querySelectorAll('post-breadcrumb-item')).slice(0, -1);
|
|
7551
|
+
// Start from the assumption that all items fit and that no menu is shown.
|
|
7552
|
+
// Therefore, subtract the width of the overflow menu.
|
|
7553
|
+
let width = this.hiddenNav.scrollWidth - menu + gap;
|
|
7554
|
+
let overflowing = 0;
|
|
7555
|
+
// Discard items from the start until the remaining ones fit the available width.
|
|
7556
|
+
while (overflowing < items.length && width > this.hiddenNav.clientWidth) {
|
|
7557
|
+
// The overflow menu needs to be displayed as soon as the first item is moved into it, so its
|
|
7558
|
+
// width needs to be taken into account when measuring the remaining items.
|
|
7559
|
+
if (overflowing === 0)
|
|
7560
|
+
width += menu;
|
|
7561
|
+
width -= items[overflowing++].clientWidth + gap;
|
|
7562
|
+
}
|
|
7563
|
+
return overflowing;
|
|
7564
|
+
}
|
|
7565
|
+
/**
|
|
7566
|
+
* Moves `collapsed` items into the overflow menu and marks the last item as selected.
|
|
7567
|
+
*/
|
|
7568
|
+
updateItems(items, collapsed) {
|
|
7569
|
+
items.forEach((item, index) => {
|
|
7570
|
+
item.setAttribute('variant', index < collapsed ? 'menuitem' : 'listitem');
|
|
7571
|
+
item.setAttribute('selected', String(index === items.length - 1));
|
|
7572
|
+
item.setAttribute('standalone', String(index === items.length - 1 && index === collapsed));
|
|
7477
7573
|
});
|
|
7478
7574
|
}
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7575
|
+
/**
|
|
7576
|
+
* Rebuilds the off-screen copy of the breadcrumb navigation.
|
|
7577
|
+
*/
|
|
7578
|
+
async updateHiddenNav() {
|
|
7579
|
+
this.hiddenNav?.remove();
|
|
7580
|
+
this.hiddenNav = await this.renderHiddenNav();
|
|
7482
7581
|
}
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7582
|
+
/**
|
|
7583
|
+
* Renders an off-screen copy of the breadcrumb navigation that is used for measurements.
|
|
7584
|
+
*/
|
|
7585
|
+
async renderHiddenNav() {
|
|
7586
|
+
const shadowRoot = this.host.shadowRoot;
|
|
7587
|
+
if (!shadowRoot || !this.nav)
|
|
7588
|
+
return null;
|
|
7589
|
+
const clone = this.nav.cloneNode(true);
|
|
7590
|
+
const slots = clone.querySelectorAll('slot');
|
|
7591
|
+
// Deep clone the breadcrumb navigation and flatten its slots into the clone.
|
|
7592
|
+
this.nav.querySelectorAll('slot').forEach((source, index) => {
|
|
7593
|
+
const target = slots[index];
|
|
7594
|
+
// Insert the assigned elements where the slot used to be, then drop the now empty slot
|
|
7595
|
+
source.assignedElements().forEach(element => {
|
|
7596
|
+
target.insertAdjacentElement('beforebegin', element.cloneNode(true));
|
|
7597
|
+
});
|
|
7598
|
+
target.remove();
|
|
7488
7599
|
});
|
|
7600
|
+
clone.classList.remove('loading');
|
|
7601
|
+
clone.classList.add('invisible');
|
|
7602
|
+
// Show the overflow menu so that we can include the space it takes up in the measurement.
|
|
7603
|
+
clone.querySelector('.menu').classList.remove('empty');
|
|
7604
|
+
shadowRoot.append(clone);
|
|
7605
|
+
// Wait for all items to be fully hydrated before measuring.
|
|
7606
|
+
const items = clone.querySelectorAll('post-breadcrumb-item');
|
|
7607
|
+
await Promise.all(Array.from(items).map(item => componentOnReady(item)));
|
|
7608
|
+
// Move the items out of the overflow menu so that the uncollapsed layout can be measured.
|
|
7609
|
+
this.updateItems(items, 0);
|
|
7610
|
+
return clone;
|
|
7489
7611
|
}
|
|
7490
7612
|
renderMenu() {
|
|
7491
7613
|
const menuId = `${this.id}-menu`;
|
|
7492
|
-
return (hAsync("div", {
|
|
7614
|
+
return (hAsync("div", { class: `breadcrumb-item menu ${this.collapsed === 0 ? 'empty' : ''}`, role: "listitem" }, hAsync("post-menu-trigger", { for: menuId }, hAsync("button", null, hAsync("span", { class: "visually-hidden" }, this.textMoreItems), hAsync("span", { "aria-hidden": "true" }, "..."))), hAsync("post-menu", { id: menuId, label: this.textMoreItems, placement: "bottom-start" }, hAsync("slot", { name: "menu" }))));
|
|
7493
7615
|
}
|
|
7494
7616
|
render() {
|
|
7495
|
-
|
|
7617
|
+
if (this.loaded) {
|
|
7618
|
+
const items = this.host.querySelectorAll('post-breadcrumb-item');
|
|
7619
|
+
this.updateItems(items, this.collapsed);
|
|
7620
|
+
}
|
|
7621
|
+
return (hAsync(Host, { key: '501384cb07b2deac87a21800fc4d39d695747341', "data-version": version$1 }, hAsync("nav", { key: '20aa57da865967458169544dec75d975926eb675', "aria-label": this.textBreadcrumbs, ref: el => (this.nav = el), class: this.loaded ? '' : 'loading' }, hAsync("div", { key: 'cf8f21f2ee9de01bac0edf9379ba5c183b938d70', role: "list" }, hAsync("div", { key: '9bd29a83cb976d67f3c6ea24cf23b2a07e40ca84', class: "breadcrumb-item home", role: "listitem" }, hAsync("a", { key: '675638668994f074951491040c6043819e6f7282', href: this.homeUrl }, hAsync("span", { key: '3ce1f8ea5ba5738925bff000ec5a8c32603ae963', class: "visually-hidden" }, this.textHome), hAsync("post-icon", { key: '1b35b22788d4e70c948e1067d99265e8af9c74e7', "aria-hidden": "true", name: "home" }))), this.renderMenu(), hAsync("slot", { key: 'f7fe7cd0b16a9064aba28149756f785c47133351' }), hAsync("slot", { key: 'c62ce84877203586c184e1adaea1ecb6ed8a0912', name: "selected" })))));
|
|
7496
7622
|
}
|
|
7497
7623
|
get host() { return getElement(this); }
|
|
7498
7624
|
static get style() { return postBreadcrumbsCss(); }
|
|
@@ -7504,8 +7630,9 @@ class PostBreadcrumbs {
|
|
|
7504
7630
|
"textHome": [513, "text-home"],
|
|
7505
7631
|
"textBreadcrumbs": [513, "text-breadcrumbs"],
|
|
7506
7632
|
"textMoreItems": [513, "text-more-items"],
|
|
7507
|
-
"
|
|
7508
|
-
"
|
|
7633
|
+
"id": [32],
|
|
7634
|
+
"loaded": [32],
|
|
7635
|
+
"collapsed": [32]
|
|
7509
7636
|
},
|
|
7510
7637
|
"$listeners$": undefined,
|
|
7511
7638
|
"$lazyBundleId$": "-",
|
|
@@ -7560,7 +7687,7 @@ class PostClosebutton {
|
|
|
7560
7687
|
}
|
|
7561
7688
|
/**
|
|
7562
7689
|
* The "type" attribute used for the close button
|
|
7563
|
-
|
|
7690
|
+
|
|
7564
7691
|
*/
|
|
7565
7692
|
this.buttonType = 'button';
|
|
7566
7693
|
/**
|
|
@@ -7571,6 +7698,10 @@ class PostClosebutton {
|
|
|
7571
7698
|
* The size of the close button.
|
|
7572
7699
|
*/
|
|
7573
7700
|
this.size = 'default';
|
|
7701
|
+
this.handleClick = () => {
|
|
7702
|
+
const target = findClosableTarget(this.host);
|
|
7703
|
+
target?.close();
|
|
7704
|
+
};
|
|
7574
7705
|
}
|
|
7575
7706
|
componentDidLoad() {
|
|
7576
7707
|
if (globalThis.MutationObserver) {
|
|
@@ -7595,13 +7726,8 @@ class PostClosebutton {
|
|
|
7595
7726
|
console.error(`The \`${this.host.localName}\` component requires content for accessibility.`);
|
|
7596
7727
|
}
|
|
7597
7728
|
}
|
|
7598
|
-
handleClick() {
|
|
7599
|
-
if (this.buttonType === 'reset')
|
|
7600
|
-
this.internals.form?.reset();
|
|
7601
|
-
this.host.closest('dialog')?.close();
|
|
7602
|
-
}
|
|
7603
7729
|
render() {
|
|
7604
|
-
return (hAsync(Host, { key: '
|
|
7730
|
+
return (hAsync(Host, { key: 'f46ba6cbd82793b2a3d3a72c2f89236f0904eb68', "data-version": version$1 }, hAsync("button", { key: 'd014e76ccce88a087f8dd9caaac002eb09f64699', type: this.buttonType, class: "btn btn-icon btn-secondary btn-sm", onClick: this.handleClick }, hAsync("post-icon", { key: '442305b327aabe61f259b98694118ec1b4ed2f09', "aria-hidden": "true", name: "closex" }), hAsync("span", { key: '530149339a2a983d1e5d23c149abd0faf6f912b5', ref: el => (this.visuallyHidden = el), class: "visually-hidden" }, hAsync("slot", { key: 'b90d5bea08c70c6df33dc5fc74bcf06eb2b6cd14' })))));
|
|
7605
7731
|
}
|
|
7606
7732
|
static get formAssociated() { return true; }
|
|
7607
7733
|
get host() { return getElement(this); }
|
|
@@ -7697,7 +7823,7 @@ class PostCollapsible {
|
|
|
7697
7823
|
triggers.forEach(trigger => trigger.update());
|
|
7698
7824
|
}
|
|
7699
7825
|
render() {
|
|
7700
|
-
return (hAsync(Host, { key: '
|
|
7826
|
+
return (hAsync(Host, { key: 'd21f5e36e292652981b165fbb5f4e03501f88e1b', "data-version": version$1, tabindex: this.collapsed ? -1 : undefined, style: this.collapsed ? collapsedKeyframe : undefined }, hAsync("slot", { key: '7804a966899325cbc55f9e62eadf81e8e6a1e248' })));
|
|
7701
7827
|
}
|
|
7702
7828
|
get host() { return getElement(this); }
|
|
7703
7829
|
static get style() { return postCollapsibleCss(); }
|
|
@@ -7823,7 +7949,7 @@ class PostCollapsibleTrigger {
|
|
|
7823
7949
|
this.updateAriaAttributes();
|
|
7824
7950
|
}
|
|
7825
7951
|
render() {
|
|
7826
|
-
return (hAsync(Host, { key: '
|
|
7952
|
+
return (hAsync(Host, { key: '55ae82b4cf69709de291000cc5e273107e1f61e7', "data-version": version$1 }, hAsync("slot", { key: 'c85ddfc93a1ef93c41fcb3fc5705fa1fbb30934d' })));
|
|
7827
7953
|
}
|
|
7828
7954
|
get host() { return getElement(this); }
|
|
7829
7955
|
static get cmpMeta() { return {
|
|
@@ -12657,11 +12783,11 @@ class PostDatePicker {
|
|
|
12657
12783
|
}
|
|
12658
12784
|
}
|
|
12659
12785
|
render() {
|
|
12660
|
-
return (hAsync(Host, { key: '
|
|
12786
|
+
return (hAsync(Host, { key: '8f3e9c45b6536e766d2930bb7647ccb230a1a53c', "data-version": version$1 }, this.inline && (hAsync("div", { key: '37c23df45461da546c03ab5e487e6831992a1a6f', dir: this.textDirection }, hAsync("slot", { key: '6c031a739d43642604c752e2101bbc2d4fbb39e5' }), hAsync("div", { key: '42ecf6418c4522d15a24341b127b444aedbfc7be', class: "datepicker-container" }))), !this.inline && (hAsync("div", { key: '0166eba762a209d0113f42c19715a9dde86eef2d', dir: this.textDirection }, hAsync("div", { key: '14f687ecc53fd5681aa52abd955e18aa17991b2c', class: {
|
|
12661
12787
|
'calendar-input': !this.range,
|
|
12662
12788
|
'calendar-input-range': this.range,
|
|
12663
12789
|
'disabled': this.inputDisabled,
|
|
12664
|
-
} }, hAsync("slot", { key: '
|
|
12790
|
+
} }, hAsync("slot", { key: 'afc114dc156c665de0b1a23732efaf3e221929d4' }), hAsync("button", { key: '205ef45ccc828418af1ef7b3b09def83b87c9b26', onClick: () => this.show(), "aria-haspopup": "true", "aria-label": this.textToggleCalendar, disabled: this.inputDisabled, ref: e => (this.dpTrigger = e) }, hAsync("post-icon", { key: '6730069a64bc2bb461d72e5c0e615d37ca57b74d', name: "calendar" }))), hAsync("post-popovercontainer", { key: '56e1dfd0fd04442f7778c547fc75cba8caba84a5', placement: "bottom-end", offset: PostDatePicker.FLYOUT_OFFSET, ref: e => (this.popoverRef = e) }, hAsync("div", { key: '43ff0d83760214ff8e1ad06c2f8d7c6626e178c1', class: "datepicker-container" }))))));
|
|
12665
12791
|
}
|
|
12666
12792
|
get host() { return getElement(this); }
|
|
12667
12793
|
static get watchers() { return {
|
|
@@ -12844,10 +12970,10 @@ class PostFooter {
|
|
|
12844
12970
|
const allGridSlotsEmpty = GRID_SLOTS.every(slotName => !this.slotDisplayed[slotName]);
|
|
12845
12971
|
const renderMain = !allGridSlotsEmpty || renderSocialmedia || renderApp || renderBusinesssectors;
|
|
12846
12972
|
const renderBase = renderCopyright || renderMeta;
|
|
12847
|
-
return (hAsync(Host, { key: '
|
|
12973
|
+
return (hAsync(Host, { key: '02edce3d202fefa6fe21a84d1ed97a6ded2d76ce', "data-version": version$1, "data-color-scheme": "light" }, hAsync("footer", { key: '7d67c940dc73b6dd16283e7c7a7feeda05f50f80' }, hAsync("h2", { key: '1d71a47f631f463c15b7ac02c7574d4f8adbfe2e', class: "visually-hidden" }, this.textFooter), hAsync("div", { key: '9fd3d08883d63c8aaccb4c3c32c0c8a81c3f8e1c', class: { 'prefooter': true, 'd-none': !renderPrefooter } }, hAsync("div", { key: '99a6abfe43b586e5486c4ceeff3c7176905ef631', class: "footer-container" }, hAsync("slot", { key: '5616b403340d5e2395c0d949926f99c56936b662', onSlotchange: this.handleSlotChange, name: "prefooter" }))), hAsync("div", { key: 'd6ccd3988b9951bb0e38fd612eae64a1889427ef', class: { 'footer-main': true, 'd-none': !renderMain } }, hAsync("div", { key: '4c8880c1dbf366a408402a884e61fe8e1cf45af0', class: "footer-container" }, hAsync("div", { key: 'a79010da73a749002a25b03052d0427d2dcf6c2e', class: { 'footer-grid': true, 'd-none': allGridSlotsEmpty } }, this.device === 'mobile' ? this.renderAccordion() : this.renderColumns()), hAsync("div", { key: '335efe778d8b8e2c4a9f3eeffd4d60e5ba670ad2', class: {
|
|
12848
12974
|
'footer-column': true,
|
|
12849
12975
|
'd-none': !renderSocialmedia && !renderApp,
|
|
12850
|
-
} }, hAsync("div", { key: '
|
|
12976
|
+
} }, hAsync("div", { key: '6725d6db6af39a2f2ed4d887a598f262c6314562', class: { 'footer-socialmedia': true, 'd-none': !renderSocialmedia } }, hAsync("slot", { key: '3a2d1c69bc05245842447ac104615f681b02e3a9', onSlotchange: this.handleSlotChange, name: "socialmedia" })), hAsync("div", { key: '38f1a4b8ef975aafb7f4fd90512ea08dc18e3d4c', class: { 'footer-app': true, 'd-none': !renderApp } }, hAsync("slot", { key: 'fbcb201b8ee7b9ac419c7a01e995ce3be7e4acca', onSlotchange: this.handleSlotChange, name: "app" }))), hAsync("div", { key: '76b292642cd8587ffa95277bf43478c785aed594', class: { 'footer-businesssectors': true, 'd-none': !renderBusinesssectors } }, hAsync("slot", { key: '9fa3ead24b007de21d2669421f03ab2fd870d64e', onSlotchange: this.handleSlotChange, name: "businesssectors" })))), hAsync("div", { key: '0278475002d8a479936967c06335cc667519a902', class: { 'footer-base': true, 'd-none': !renderBase } }, hAsync("div", { key: '59d46393b2a04184a6adc445d4b0940f07ad56f8', class: "footer-container" }, hAsync("div", { key: '7bbaebdf46638ffa1946e7c5be6970c8a1e586bb', class: { 'footer-copyright': true, 'd-none': !renderCopyright } }, hAsync("slot", { key: 'c1601db6edc32929d84897330654dbec24bb8543', onSlotchange: this.handleSlotChange, name: "copyright" })), hAsync("div", { key: '1339ee3a91e8f18d757333b74053291080d95e2b', class: { 'footer-meta': true, 'd-none': !renderMeta } }, hAsync("slot", { key: 'aa98ffd65b0138b198e057dbd2c96368bf92c0b0', onSlotchange: this.handleSlotChange, name: "meta" })))))));
|
|
12851
12977
|
}
|
|
12852
12978
|
get host() { return getElement(this); }
|
|
12853
12979
|
static get style() { return postFooterCss(); }
|
|
@@ -13179,10 +13305,10 @@ class PostHeader {
|
|
|
13179
13305
|
}, style: { '--post-header-navigation-current-inset': `${this.burgerMenu?.scrollTop ?? 0}px` }, ref: el => (this.burgerMenu = el) }, this.hasLocalNav && !this.hasTitle && (hAsync("div", { class: "local-nav" }, hAsync("slot", { name: "local-nav" }))), hAsync("div", { class: "burger-menu-body" }, hAsync("slot", { name: "audience" }), hAsync("slot", { name: "main-nav" })), hAsync("div", { class: "burger-menu-footer" }, hAsync("slot", { name: "global-nav-secondary" }), hAsync("slot", { name: "language-menu" }))));
|
|
13180
13306
|
}
|
|
13181
13307
|
render() {
|
|
13182
|
-
return (hAsync(Host, { key: '
|
|
13308
|
+
return (hAsync(Host, { key: '4ae4873c57cd307d3a4073f3d712bcf975528a90', "data-version": version$1, "data-color-scheme": "light", "data-burger-menu": this.hasBurgerMenu, "data-menu-extended": this.burgerMenuExtended }, hAsync("header", { key: 'cbc743a8981f4bbc3d42807244d88edba88e6a6c' }, hAsync("div", { key: 'f39c122246336d0de803353d9abb9e573459073e', class: "global-header" }, hAsync("div", { key: 'a76628c6501851bbfd597e0106847da12dc0b705', class: "section" }, hAsync("div", { key: 'b703c54159955ae272378aab5172f0bcd1b638d1', class: "logo" }, hAsync("slot", { key: 'a55336f3bee22b2c9a2cb0426b5e04ba5c8f29c4', name: "post-logo" })), hAsync("div", { key: '9b6db729465dae5c503d461a115af296730b2ce6', class: "sliding-controls" }, (hAsync("div", { key: 'cf4124ae4aaf47c2445499ce08ebb15076ac4bf2', class: "audience" }, hAsync("slot", { key: '830003c8b3b50abeb9d82bdfde83212f20a4da3d', name: "audience" }))), hAsync("slot", { key: '458afb2da52853fbc9bc066fc487fcf77df0d2a0', name: "global-nav-primary" }), [
|
|
13183
13309
|
hAsync("slot", { key: "global-nav-secondary", name: "global-nav-secondary" }),
|
|
13184
13310
|
hAsync("slot", { key: "language-menu", name: "language-menu" }),
|
|
13185
|
-
], hAsync("slot", { key: '
|
|
13311
|
+
], hAsync("slot", { key: 'ffab20101950b7472c97ff0675f36903a6a66ebd', name: "post-login" }), this.hasMainNav && (hAsync("post-togglebutton", { key: 'd1cb44efb5ae024bc225487be4e592a406acf138', class: "burger-button", ref: el => (this.burgerMenuButton = el), onClick: () => this.toggleBurgerMenu() }, hAsync("span", { key: 'c33d2bb5c415f58829ad10026b9811684eac3d35' }, this.textMenu), hAsync("post-icon", { key: '7acb3d93aec23ef1c1efd9c9d52832395e66abf0', "aria-hidden": "true", name: "burger", "data-showwhen": "untoggled" }), hAsync("post-icon", { key: '7b6fb17d50df4474ddd282d7e202a43c324c3b87', "aria-hidden": "true", name: "closex", "data-showwhen": "toggled" })))))), hAsync("div", { key: 'c7e6d91a0cd4a286b7186d0f41abdf9dc1e9ffd4', ref: el => (this.localHeader = el), class: { 'local-header': true, 'megadropdown-open': this.megadropdownOpen } }, hAsync("div", { key: '670d00fb0a79ecc1f2bb45645887db13c7ea500f', class: "section" }, hAsync("slot", { key: '5d3b0c9b97be561875fc908b2b7bf4d558513318', name: "side-nav" }), hAsync("slot", { key: '39348fb8869f5623da026ed08ce69f727d9de7e6', name: "title" }), this.hasTitle && hAsync("slot", { key: '883097731548de45adec9cbbf7df1c80a37b76b5', name: "local-nav" }), hAsync("slot", { key: 'fbc77dee6ed73d8a13da75d3d695af80ce32c3af', name: "main-nav" }), !this.hasTitle && hAsync("slot", { key: '94a989295ae04cd8259ba22e583d41bcb4701881', name: "local-nav" }))), this.hasBurgerMenu && this.renderBurgerMenu())));
|
|
13186
13312
|
}
|
|
13187
13313
|
get host() { return getElement(this); }
|
|
13188
13314
|
static get watchers() { return {
|
|
@@ -13314,7 +13440,7 @@ class PostIcon {
|
|
|
13314
13440
|
}).filter(([_key, value]) => value !== null));
|
|
13315
13441
|
}
|
|
13316
13442
|
render() {
|
|
13317
|
-
return (hAsync(Host, { key: '
|
|
13443
|
+
return (hAsync(Host, { key: '917a78dbe4db46244348298b08a2176c9028048e', "data-version": version$1 }, hAsync("span", { key: '06f07755212e2b6a9a5957d7fd37751c62343be6', style: this.getStyles() })));
|
|
13318
13444
|
}
|
|
13319
13445
|
get host() { return getElement(this); }
|
|
13320
13446
|
static get style() { return postIconCss(); }
|
|
@@ -13396,7 +13522,7 @@ class PostLanguageMenu {
|
|
|
13396
13522
|
}
|
|
13397
13523
|
componentDidLoad() {
|
|
13398
13524
|
// Initially set variants and active language
|
|
13399
|
-
// Handles cases where the language-menu is rendered after the language-
|
|
13525
|
+
// Handles cases where the language-menu is rendered after the language-menu-items have been rendered
|
|
13400
13526
|
this.updateChildrenVariant();
|
|
13401
13527
|
}
|
|
13402
13528
|
/**
|
|
@@ -13634,7 +13760,7 @@ class PostLinkarea {
|
|
|
13634
13760
|
}));
|
|
13635
13761
|
}
|
|
13636
13762
|
render() {
|
|
13637
|
-
return (hAsync(Host, { key: '
|
|
13763
|
+
return (hAsync(Host, { key: 'a1ab65608098bc992cd70f98a1c60cecd00f43c5', "data-version": version$1, onClick: (e) => this.dispatchClick(e) }, hAsync("slot", { key: 'f3042050a7075daa1e5cc35664bde6aa6bfcdac1' })));
|
|
13638
13764
|
}
|
|
13639
13765
|
get host() { return getElement(this); }
|
|
13640
13766
|
static get style() { return postLinkareaCss(); }
|
|
@@ -13676,7 +13802,7 @@ class PostListbox {
|
|
|
13676
13802
|
option.highlighted = false;
|
|
13677
13803
|
});
|
|
13678
13804
|
this.highlightedIndex = -1;
|
|
13679
|
-
this.
|
|
13805
|
+
this.clearActive();
|
|
13680
13806
|
};
|
|
13681
13807
|
this.clearActive = () => {
|
|
13682
13808
|
this.highlightedIndex = -1;
|
|
@@ -13780,7 +13906,7 @@ class PostListbox {
|
|
|
13780
13906
|
this.updateSelection(event.detail);
|
|
13781
13907
|
}
|
|
13782
13908
|
render() {
|
|
13783
|
-
return (hAsync(Host, { key: '
|
|
13909
|
+
return (hAsync(Host, { key: '793bdd535fb6b51bfd05012d180520e414519c0f', "data-version": version$1, role: "listbox" }, hAsync("post-popovercontainer", { key: 'd88195a37625fd29c47d4a8cc3ec34e0c92caa5f', placement: "bottom-start", ref: el => (this.popoverContainer = el) }, hAsync("slot", { key: '6882e0cdcf7b277b47a349244382eeb7f3f525e1', name: "blank-slate" }), hAsync("slot", { key: 'dd71f5d59621097df38cfbc3b69cdfc805a54272' }))));
|
|
13784
13910
|
}
|
|
13785
13911
|
get host() { return getElement(this); }
|
|
13786
13912
|
static get style() { return postListboxCss(); }
|
|
@@ -13817,9 +13943,9 @@ class PostListboxOption {
|
|
|
13817
13943
|
this.highlighted = false;
|
|
13818
13944
|
}
|
|
13819
13945
|
render() {
|
|
13820
|
-
return (hAsync(Host, { key: '
|
|
13946
|
+
return (hAsync(Host, { key: 'c2e1c5052d742c62e82eaac30a01d525048b3a2e', "data-version": version$1, role: "option", "aria-selected": `${this.selected}`, "data-active": this.highlighted ? 'true' : null,
|
|
13821
13947
|
/* Prevent focus change from triggering onblur event in post-autocomplete */
|
|
13822
|
-
onPointerDown: (e) => e.preventDefault(), onClick: () => this.postOptionSelected.emit(this.value), id: `post-listbox-option-${this.optionId}` }, hAsync("span", { key: '
|
|
13948
|
+
onPointerDown: (e) => e.preventDefault(), onClick: () => this.postOptionSelected.emit(this.value), id: `post-listbox-option-${this.optionId}` }, hAsync("span", { key: '2b0cdab57c328df649c1353c41e2c4cfe57378d0', class: "option-content" }, this.value, hAsync("span", { key: 'e5807160223e87095dc3c0c076ec84317050cf18', class: "option-description" }, hAsync("slot", { key: '45f0020b9eebe13b84880a842c095daa51cf0feb' }))), this.selected && hAsync("post-icon", { key: '80a23567a10075cbc8269f4769dd7d8aba7b2961', "aria-hidden": "true", name: "checkmark" })));
|
|
13823
13949
|
}
|
|
13824
13950
|
static get style() { return postListboxOptionCss(); }
|
|
13825
13951
|
static get cmpMeta() { return {
|
|
@@ -13866,7 +13992,7 @@ class PostLogo {
|
|
|
13866
13992
|
render() {
|
|
13867
13993
|
const logoLink = this.url && (typeof this.url === 'string' ? this.url : this.url.href);
|
|
13868
13994
|
const LogoTag = logoLink ? 'a' : 'span';
|
|
13869
|
-
return (hAsync(Host, { key: '
|
|
13995
|
+
return (hAsync(Host, { key: 'dd8ddb0dcbed8062ee5adecf2a26ad98b42c94b1', "data-version": version$1 }, hAsync(LogoTag, { key: 'f4d8ad34cdd455c3e2096ce26db7bc775d7e05c3', class: `logo ${logoLink ? 'logo-link' : ''}`, ...(logoLink ? { href: logoLink } : {}) }, hAsync("span", { key: '87a58c2904f3dae5406b5652787ca1d99dbda0dc', class: "description" }, hAsync("slot", { key: 'ae69c86c4bfed42b25aafa948f13989c31833466', onSlotchange: () => this.checkDescription() })), hAsync("svg", { key: 'e51164151a1a53971414ea37af5085f99575fc36', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 72 72", "aria-hidden": "true" }, hAsync("g", { key: 'fa946d3ded62128ca4469b160103b464eb59329b', id: "Logo" }, hAsync("rect", { key: '18424ee0ca3256f9169d8dac6223df3d49cb09b9', fill: "#ffcc00", x: "0", y: "0", width: "72", height: "72" }), hAsync("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" }), hAsync("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" }))))));
|
|
13870
13996
|
}
|
|
13871
13997
|
get host() { return getElement(this); }
|
|
13872
13998
|
static get style() { return postLogoCss(); }
|
|
@@ -14016,7 +14142,7 @@ class PostMainnavigation {
|
|
|
14016
14142
|
}, NAVBAR_DISABLE_DURATION);
|
|
14017
14143
|
}
|
|
14018
14144
|
render() {
|
|
14019
|
-
return (hAsync(Host, { key: '
|
|
14145
|
+
return (hAsync(Host, { key: '9fe43f86cab360591a15a033e0dc657096a69c00', version: version$1, class: this.canScroll ? 'scrollable' : '' }, hAsync("div", { key: 'f68ea70e332336e99c0b51b19e33647b40fcfbb4', "aria-hidden": "true", class: { 'scroll-control scroll-left': true, 'd-none': !this.canScrollLeft }, onMouseDown: e => this.handleScrollButtonClick(e, 'left') }, hAsync("post-icon", { key: 'fac01a93fd7cbfe2548a4d049d59f0bc6d01af63', "aria-hidden": "true", name: "chevronleft" })), hAsync("nav", { key: '7787a27e76350e9e86a97a58a20abe1286786ff7', ref: el => (this.navbar = el), "aria-label": this.textMain }, hAsync("slot", { key: '357a8f5fe1e7b6bea5ae67d87c979f785ea24b82' })), hAsync("div", { key: 'ce6091a9466fcd17aca39fcb5d6c204e1782c95d', "aria-hidden": "true", class: { 'scroll-control scroll-right': true, 'd-none': !this.canScrollRight }, onMouseDown: e => this.handleScrollButtonClick(e, 'right') }, hAsync("post-icon", { key: '92d35b38a453326701a0837e6187abf82fa37bf4', "aria-hidden": "true", name: "chevronright" }))));
|
|
14020
14146
|
}
|
|
14021
14147
|
get host() { return getElement(this); }
|
|
14022
14148
|
static get style() { return postMainnavigationCss(); }
|
|
@@ -14332,7 +14458,7 @@ class PostMegadropdown {
|
|
|
14332
14458
|
}
|
|
14333
14459
|
render() {
|
|
14334
14460
|
const containerStyle = this.isVisible ? {} : { display: 'none' };
|
|
14335
|
-
return (hAsync(Host, { key: '
|
|
14461
|
+
return (hAsync(Host, { key: '2cc8228a628b2a0380acf4fcac8daa1ef1a7bf2f', version: version$1 }, hAsync("div", { key: '709fe50f23fd355bd97add916b451d5abf653780', ref: el => (this.animatedContainer = el), class: "megadropdown", style: containerStyle }, hAsync("div", { key: 'e2bac29e70e39800ee55c8454f78b6889b241121', class: "section" }, this.device !== 'desktop' && this.megadropdownTitle && (hAsync("p", { key: '6c28bc5d3e3b8c8dab385f13a4b9b8a7b7ba70b9', class: "megadropdown-title" }, this.megadropdownTitle)), hAsync("div", { key: 'bf71d0d7b4a84ae1238f27373d195403d8a1f812', class: "megadropdown-content" }, hAsync("slot", { key: '9812bec733ca678b1a3681d90859082e57fbd64a' })), this.device === 'desktop' ? (hAsync("post-closebutton", { onClick: () => this.hide(true), class: "close-button", size: "small", placement: "manual" }, this.textClose)) : (hAsync("button", { onClick: () => this.hide(true), class: "back-button" }, hAsync("post-icon", { name: "arrowleft" }), this.textBack))))));
|
|
14336
14462
|
}
|
|
14337
14463
|
get host() { return getElement(this); }
|
|
14338
14464
|
static get style() { return postMegadropdownCss(); }
|
|
@@ -14437,7 +14563,7 @@ class PostMegadropdownTrigger {
|
|
|
14437
14563
|
this.megadropdown.toggle();
|
|
14438
14564
|
}
|
|
14439
14565
|
render() {
|
|
14440
|
-
return (hAsync(Host, { key: '
|
|
14566
|
+
return (hAsync(Host, { key: 'd5242fd9126f3486f731ed6f369f3a6c38a5d1e9', "data-version": version$1 }, hAsync("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 } }, hAsync("span", { key: 'dacf0bd6dc576fa7c70353c98eacb3d81ddf83e5' }, hAsync("span", { key: '0c7b950ea9bfcae62b367900d78f155edc49de72', innerHTML: this.slottedContent }), hAsync("span", { key: '999325546eb3196f6e704ebeb18f436ff3d53756', "aria-hidden": "true" }, hAsync("slot", { key: '08fa107b944a87edf156ea7d5e12692eba64952d' }))), hAsync("post-icon", { key: 'eb32199b1ff6951b6025c1e4919674f5419f7d49', name: "chevrondown" }))));
|
|
14441
14567
|
}
|
|
14442
14568
|
get host() { return getElement(this); }
|
|
14443
14569
|
static get style() { return postMegadropdownTriggerCss(); }
|
|
@@ -14585,17 +14711,32 @@ class PostMenu {
|
|
|
14585
14711
|
this.toggleMenu.emit(this.isVisible);
|
|
14586
14712
|
if (this.isVisible) {
|
|
14587
14713
|
this.lastFocusedElement = this.root?.activeElement;
|
|
14588
|
-
|
|
14589
|
-
|
|
14590
|
-
|
|
14591
|
-
|
|
14592
|
-
|
|
14593
|
-
|
|
14714
|
+
// Only focus the first item if the trigger was keyboard-focus-visible
|
|
14715
|
+
// that's the browser's own signal for a keyboard-driven interaction.
|
|
14716
|
+
if (this.wasFocusVisible(this.lastFocusedElement)) {
|
|
14717
|
+
requestAnimationFrame(() => {
|
|
14718
|
+
const menuItems = this.getSlottedItems();
|
|
14719
|
+
if (menuItems.length > 0) {
|
|
14720
|
+
menuItems[0].focus();
|
|
14721
|
+
}
|
|
14722
|
+
});
|
|
14723
|
+
}
|
|
14594
14724
|
}
|
|
14595
14725
|
else if (this.lastFocusedElement) {
|
|
14596
14726
|
this.lastFocusedElement.focus();
|
|
14597
14727
|
}
|
|
14598
14728
|
}
|
|
14729
|
+
wasFocusVisible(element) {
|
|
14730
|
+
if (!element)
|
|
14731
|
+
return false;
|
|
14732
|
+
try {
|
|
14733
|
+
return element.matches(':focus-visible');
|
|
14734
|
+
}
|
|
14735
|
+
catch {
|
|
14736
|
+
// Not supported, fall back to always focusing
|
|
14737
|
+
return true;
|
|
14738
|
+
}
|
|
14739
|
+
}
|
|
14599
14740
|
controlKeyDownHandler(e) {
|
|
14600
14741
|
const menuItems = this.getSlottedItems();
|
|
14601
14742
|
if (menuItems.length === 0) {
|
|
@@ -14647,7 +14788,7 @@ class PostMenu {
|
|
|
14647
14788
|
]));
|
|
14648
14789
|
}
|
|
14649
14790
|
render() {
|
|
14650
|
-
return (hAsync(Host, { key: '
|
|
14791
|
+
return (hAsync(Host, { key: 'cc6ede4cdacb722006475de88385b041d7e42dcb', "data-version": version$1 }, hAsync("post-popovercontainer", { key: '3931f604aad477441112fd0b5a4800c8f034abbb', onPostShow: this.handlePostShown.bind(this), onPostBeforeToggle: this.handlePostBeforeToggle.bind(this), placement: this.placement, ref: e => (this.popoverRef = e) }, hAsync("div", { key: '1b0adb12bb1369d14a6bcfac3c956090eb66572a', part: "post-menu" }, hAsync("slot", { key: '9c2518e7e9e6ccaa64d486a90b5fc7eec15c24b8', name: "header" }), hAsync("slot", { key: 'd28df1e411010aabe083255cd5e5ece4bd62424d' })))));
|
|
14651
14792
|
}
|
|
14652
14793
|
get host() { return getElement(this); }
|
|
14653
14794
|
static get style() { return postMenuCss(); }
|
|
@@ -14769,7 +14910,7 @@ class PostMenuTrigger {
|
|
|
14769
14910
|
return null;
|
|
14770
14911
|
}
|
|
14771
14912
|
render() {
|
|
14772
|
-
return (hAsync(Host, { key: '
|
|
14913
|
+
return (hAsync(Host, { key: 'fcdfd58ba24cd5269461477ac3d00a53ccf2ea1b', "data-version": version$1 }, hAsync("slot", { key: 'b3a6b137bf61accd32eb1bec5af5e39e68ec6613' })));
|
|
14773
14914
|
}
|
|
14774
14915
|
get host() { return getElement(this); }
|
|
14775
14916
|
static get style() { return postMenuTriggerCss(); }
|
|
@@ -14805,7 +14946,7 @@ class PostNumberInput {
|
|
|
14805
14946
|
this.isIncrementDisabled = false;
|
|
14806
14947
|
this.isDecrementDisabled = false;
|
|
14807
14948
|
this.small = false;
|
|
14808
|
-
this.setupInput = debounce
|
|
14949
|
+
this.setupInput = debounce(50, () => {
|
|
14809
14950
|
this.input = this.input ?? getSlottedElement(this.host, 'input[type="number"]');
|
|
14810
14951
|
if (!this.input)
|
|
14811
14952
|
return;
|
|
@@ -14879,10 +15020,10 @@ class PostNumberInput {
|
|
|
14879
15020
|
}
|
|
14880
15021
|
render() {
|
|
14881
15022
|
const areButtonsShown = !!this.input;
|
|
14882
|
-
return (hAsync(Host, { key: '
|
|
15023
|
+
return (hAsync(Host, { key: 'aeb366d1738707172f9ae3e154f9a93a10caa016', "data-version": version$1, class: {
|
|
14883
15024
|
'number-input-sm': this.small,
|
|
14884
15025
|
'disabled': this.isDisabled,
|
|
14885
|
-
} }, areButtonsShown && (hAsync("div", { key: '
|
|
15026
|
+
} }, areButtonsShown && (hAsync("div", { key: '9037651a4e2f65ca62f1f4ebe0575a25383c77c7', "aria-hidden": "true", onPointerDown: () => this.step('down'), class: { 'step-button': true, 'disabled': this.isDecrementDisabled } }, hAsync("post-icon", { key: '43ac843cc7df50981dc92eeb5405b415d530a415', name: "minus" }))), hAsync("div", { key: 'f49907424a6cc6802ee9066ef42dcc2c43b1bbfd', class: "input-container" }, hAsync("slot", { key: 'f649b968dac37fbb5f5a643853aedbc90653ed6c', onSlotchange: () => this.setupInput() })), areButtonsShown && (hAsync("div", { key: '66d06189252e360f43c3e63fbdce300be9606069', "aria-hidden": "true", onPointerDown: () => this.step('up'), class: { 'step-button': true, 'disabled': this.isIncrementDisabled } }, hAsync("post-icon", { key: '44bcff6c698f87eac09d1aeaa8b6af6436cac572', name: "plus" })))));
|
|
14886
15027
|
}
|
|
14887
15028
|
get host() { return getElement(this); }
|
|
14888
15029
|
static get style() { return postNumberInputCss(); }
|
|
@@ -14936,7 +15077,7 @@ class PostPagination {
|
|
|
14936
15077
|
this.page = 1;
|
|
14937
15078
|
this.lastWindowWidth = window.innerWidth;
|
|
14938
15079
|
this.loaded = false;
|
|
14939
|
-
this.debouncedResize = debounce(this.handleResizeInternal.bind(this), RESIZE_DEBOUNCE_MS);
|
|
15080
|
+
this.debouncedResize = debounce$1(this.handleResizeInternal.bind(this), RESIZE_DEBOUNCE_MS);
|
|
14940
15081
|
this.measurementTimeoutId = null;
|
|
14941
15082
|
}
|
|
14942
15083
|
handlePropsChange() {
|
|
@@ -15546,7 +15687,7 @@ __decorate$d([
|
|
|
15546
15687
|
Type('string')
|
|
15547
15688
|
], PostPagination.prototype, "textLast", void 0);
|
|
15548
15689
|
|
|
15549
|
-
const postPopoverCss = () => `*{box-sizing:border-box}:host{display:contents}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{color:var(--post-current-fg);background-color:var(--post-current-bg);display:flex;align-items:self-start;padding:8px;min-width:160px;max-width:var(--post-popover-max-width, 280px)}.popover-content{padding:8px;flex-grow:1}`;
|
|
15690
|
+
const postPopoverCss = () => `*{box-sizing:border-box}:host{display:contents}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{color:var(--post-current-fg);background-color:var(--post-current-bg);display:flex;align-items:self-start;padding:8px;min-width:160px;max-width:var(--post-popover-max-width, 280px)}.popover-content{padding:8px;flex-grow:1}post-closebutton{color-scheme:light}`;
|
|
15550
15691
|
|
|
15551
15692
|
var __decorate$c = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15552
15693
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -15630,10 +15771,10 @@ class PostPopover {
|
|
|
15630
15771
|
}
|
|
15631
15772
|
}
|
|
15632
15773
|
render() {
|
|
15633
|
-
return (hAsync(Host, { key: '
|
|
15774
|
+
return (hAsync(Host, { key: '61399669708d5983911748d652ef1a0d7e0562a0', "data-version": version$1 }, hAsync("post-popovercontainer", { key: '561bbe71d735acec27421160623169f7f7f8134e', arrow: this.arrow, placement: this.placement, edgeGap: this.edgeGap, autoHide: true, ref: e => {
|
|
15634
15775
|
if (e)
|
|
15635
15776
|
this.popoverRef = e;
|
|
15636
|
-
} }, hAsync("div", { key: '
|
|
15777
|
+
} }, hAsync("div", { key: 'f7e8d0ae5556cfd429c43b12c3d3d0b19e3cdd46', class: "popover-container" }, hAsync("div", { key: '74c9076d67696ff1d1a295560140864b26f59f60', class: "popover-content" }, hAsync("slot", { key: '5c63af09f545ed7fe3fcfd810fccd7db9da05e8a' })), hAsync("post-closebutton", { key: 'f8fd8c7ba548b912c3fe84994810add92fb470d9' }, this.textClose)))));
|
|
15637
15778
|
}
|
|
15638
15779
|
get host() { return getElement(this); }
|
|
15639
15780
|
static get style() { return postPopoverCss(); }
|
|
@@ -20745,7 +20886,7 @@ class PostPopoverTrigger {
|
|
|
20745
20886
|
focusTrigger() {
|
|
20746
20887
|
// Restores focus to the trigger
|
|
20747
20888
|
if (!this.popoverOpen && this.trigger) {
|
|
20748
|
-
this.trigger.focus();
|
|
20889
|
+
this.trigger.focus({ preventScroll: true });
|
|
20749
20890
|
}
|
|
20750
20891
|
}
|
|
20751
20892
|
constructor(hostRef) {
|
|
@@ -20781,7 +20922,7 @@ class PostPopoverTrigger {
|
|
|
20781
20922
|
this.popover?.removeEventListener('postToggle', this.boundHandlePostToggle);
|
|
20782
20923
|
}
|
|
20783
20924
|
render() {
|
|
20784
|
-
return (hAsync(Host, { key: '
|
|
20925
|
+
return (hAsync(Host, { key: 'a8a3be80d30404564add3fcbef1a24b4f59d4614', "data-version": version$1 }, hAsync("slot", { key: '1fada9d0241aa9e8ab6392e63feb61dc2c686dd5', onSlotchange: () => this.setupTrigger() })));
|
|
20785
20926
|
}
|
|
20786
20927
|
get host() { return getElement(this); }
|
|
20787
20928
|
static get watchers() { return {
|
|
@@ -20812,6 +20953,7 @@ __decorate$b([
|
|
|
20812
20953
|
* @see https://floating-ui.com/docs/virtual-elements
|
|
20813
20954
|
*/
|
|
20814
20955
|
|
|
20956
|
+
const sides = ['top', 'right', 'bottom', 'left'];
|
|
20815
20957
|
const min = Math.min;
|
|
20816
20958
|
const max = Math.max;
|
|
20817
20959
|
const round = Math.round;
|
|
@@ -20904,12 +21046,12 @@ function getOppositePlacement(placement) {
|
|
|
20904
21046
|
return oppositeSideMap[side] + placement.slice(side.length);
|
|
20905
21047
|
}
|
|
20906
21048
|
function expandPaddingObject(padding) {
|
|
21049
|
+
var _padding$top, _padding$right, _padding$bottom, _padding$left;
|
|
20907
21050
|
return {
|
|
20908
|
-
top: 0,
|
|
20909
|
-
right: 0,
|
|
20910
|
-
bottom: 0,
|
|
20911
|
-
left: 0
|
|
20912
|
-
...padding
|
|
21051
|
+
top: (_padding$top = padding.top) != null ? _padding$top : 0,
|
|
21052
|
+
right: (_padding$right = padding.right) != null ? _padding$right : 0,
|
|
21053
|
+
bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
|
|
21054
|
+
left: (_padding$left = padding.left) != null ? _padding$left : 0
|
|
20913
21055
|
};
|
|
20914
21056
|
}
|
|
20915
21057
|
function getPaddingObject(padding) {
|
|
@@ -20984,13 +21126,9 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
20984
21126
|
y: reference.y
|
|
20985
21127
|
};
|
|
20986
21128
|
}
|
|
20987
|
-
|
|
20988
|
-
|
|
20989
|
-
|
|
20990
|
-
break;
|
|
20991
|
-
case 'end':
|
|
20992
|
-
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
20993
|
-
break;
|
|
21129
|
+
const alignment = getAlignment(placement);
|
|
21130
|
+
if (alignment) {
|
|
21131
|
+
coords[alignmentAxis] += commonAlign * (alignment === 'end' ? 1 : -1) * (rtl && isVertical ? -1 : 1);
|
|
20994
21132
|
}
|
|
20995
21133
|
return coords;
|
|
20996
21134
|
}
|
|
@@ -21039,10 +21177,7 @@ async function detectOverflow(state, options) {
|
|
|
21039
21177
|
height: rects.floating.height
|
|
21040
21178
|
} : rects.reference;
|
|
21041
21179
|
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
21042
|
-
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)))
|
|
21043
|
-
x: 1,
|
|
21044
|
-
y: 1
|
|
21045
|
-
} : {
|
|
21180
|
+
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) && (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
21046
21181
|
x: 1,
|
|
21047
21182
|
y: 1
|
|
21048
21183
|
};
|
|
@@ -21215,17 +21350,16 @@ const arrow$1 = options => ({
|
|
|
21215
21350
|
|
|
21216
21351
|
// Make sure the arrow doesn't overflow the floating element if the center
|
|
21217
21352
|
// point is outside the floating element's bounds.
|
|
21218
|
-
const min$1 = minPadding;
|
|
21219
21353
|
const max = clientSize - arrowDimensions[length] - maxPadding;
|
|
21220
21354
|
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
21221
|
-
const offset = clamp(
|
|
21355
|
+
const offset = clamp(minPadding, center, max);
|
|
21222
21356
|
|
|
21223
21357
|
// If the reference is small enough that the arrow's padding causes it to
|
|
21224
21358
|
// to point to nothing for an aligned placement, adjust the offset of the
|
|
21225
21359
|
// floating element itself. To ensure `shift()` continues to take action,
|
|
21226
21360
|
// a single reset is performed when this is true.
|
|
21227
|
-
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center <
|
|
21228
|
-
const alignmentOffset = shouldAddOffset ? center <
|
|
21361
|
+
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < minPadding ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
21362
|
+
const alignmentOffset = shouldAddOffset ? center < minPadding ? center - minPadding : center - max : 0;
|
|
21229
21363
|
return {
|
|
21230
21364
|
[axis]: coords[axis] + alignmentOffset,
|
|
21231
21365
|
data: {
|
|
@@ -21372,6 +21506,76 @@ const flip$1 = function (options) {
|
|
|
21372
21506
|
};
|
|
21373
21507
|
};
|
|
21374
21508
|
|
|
21509
|
+
function getSideOffsets(overflow, rect) {
|
|
21510
|
+
return {
|
|
21511
|
+
top: overflow.top - rect.height,
|
|
21512
|
+
right: overflow.right - rect.width,
|
|
21513
|
+
bottom: overflow.bottom - rect.height,
|
|
21514
|
+
left: overflow.left - rect.width
|
|
21515
|
+
};
|
|
21516
|
+
}
|
|
21517
|
+
function isAnySideFullyClipped(overflow) {
|
|
21518
|
+
return sides.some(side => overflow[side] >= 0);
|
|
21519
|
+
}
|
|
21520
|
+
/**
|
|
21521
|
+
* Provides data to hide the floating element in applicable situations, such as
|
|
21522
|
+
* when it is not in the same clipping context as the reference element.
|
|
21523
|
+
* @see https://floating-ui.com/docs/hide
|
|
21524
|
+
*/
|
|
21525
|
+
const hide$1 = function (options) {
|
|
21526
|
+
if (options === void 0) {
|
|
21527
|
+
options = {};
|
|
21528
|
+
}
|
|
21529
|
+
return {
|
|
21530
|
+
name: 'hide',
|
|
21531
|
+
options,
|
|
21532
|
+
async fn(state) {
|
|
21533
|
+
const {
|
|
21534
|
+
rects,
|
|
21535
|
+
platform
|
|
21536
|
+
} = state;
|
|
21537
|
+
const {
|
|
21538
|
+
strategy = 'referenceHidden',
|
|
21539
|
+
...detectOverflowOptions
|
|
21540
|
+
} = evaluate(options, state);
|
|
21541
|
+
switch (strategy) {
|
|
21542
|
+
case 'referenceHidden':
|
|
21543
|
+
{
|
|
21544
|
+
const overflow = await platform.detectOverflow(state, {
|
|
21545
|
+
...detectOverflowOptions,
|
|
21546
|
+
elementContext: 'reference'
|
|
21547
|
+
});
|
|
21548
|
+
const offsets = getSideOffsets(overflow, rects.reference);
|
|
21549
|
+
return {
|
|
21550
|
+
data: {
|
|
21551
|
+
referenceHiddenOffsets: offsets,
|
|
21552
|
+
referenceHidden: isAnySideFullyClipped(offsets)
|
|
21553
|
+
}
|
|
21554
|
+
};
|
|
21555
|
+
}
|
|
21556
|
+
case 'escaped':
|
|
21557
|
+
{
|
|
21558
|
+
const overflow = await platform.detectOverflow(state, {
|
|
21559
|
+
...detectOverflowOptions,
|
|
21560
|
+
altBoundary: true
|
|
21561
|
+
});
|
|
21562
|
+
const offsets = getSideOffsets(overflow, rects.floating);
|
|
21563
|
+
return {
|
|
21564
|
+
data: {
|
|
21565
|
+
escapedOffsets: offsets,
|
|
21566
|
+
escaped: isAnySideFullyClipped(offsets)
|
|
21567
|
+
}
|
|
21568
|
+
};
|
|
21569
|
+
}
|
|
21570
|
+
default:
|
|
21571
|
+
{
|
|
21572
|
+
return {};
|
|
21573
|
+
}
|
|
21574
|
+
}
|
|
21575
|
+
}
|
|
21576
|
+
};
|
|
21577
|
+
};
|
|
21578
|
+
|
|
21375
21579
|
function getBoundingRect(rects) {
|
|
21376
21580
|
const minX = min(...rects.map(rect => rect.left));
|
|
21377
21581
|
const minY = min(...rects.map(rect => rect.top));
|
|
@@ -21428,12 +21632,19 @@ const inline$1 = function (options) {
|
|
|
21428
21632
|
y
|
|
21429
21633
|
} = evaluate(options, state);
|
|
21430
21634
|
const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);
|
|
21635
|
+
|
|
21636
|
+
// No rects (e.g. a hidden or detached reference, or a collapsed range) —
|
|
21637
|
+
// keep the existing reference rect rather than resetting to an invalid
|
|
21638
|
+
// one with non-finite values.
|
|
21639
|
+
if (!nativeClientRects.length) {
|
|
21640
|
+
return {};
|
|
21641
|
+
}
|
|
21431
21642
|
const clientRects = getRectsByLine(nativeClientRects);
|
|
21432
21643
|
const fallback = rectToClientRect(getBoundingRect(nativeClientRects));
|
|
21433
21644
|
const paddingObject = getPaddingObject(padding);
|
|
21434
21645
|
function getBoundingClientRect() {
|
|
21435
21646
|
// There are two rects and they are disjoined.
|
|
21436
|
-
if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
|
|
21647
|
+
if (clientRects.length === 2 && (clientRects[0].left > clientRects[1].right || clientRects[1].left > clientRects[0].right) && x != null && y != null) {
|
|
21437
21648
|
// Find the first rect in which the point is fully inside.
|
|
21438
21649
|
return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;
|
|
21439
21650
|
}
|
|
@@ -21448,18 +21659,12 @@ const inline$1 = function (options) {
|
|
|
21448
21659
|
const bottom = lastRect.bottom;
|
|
21449
21660
|
const left = isTop ? firstRect.left : lastRect.left;
|
|
21450
21661
|
const right = isTop ? firstRect.right : lastRect.right;
|
|
21451
|
-
|
|
21452
|
-
const height = bottom - top;
|
|
21453
|
-
return {
|
|
21454
|
-
top,
|
|
21455
|
-
bottom,
|
|
21456
|
-
left,
|
|
21457
|
-
right,
|
|
21458
|
-
width,
|
|
21459
|
-
height,
|
|
21662
|
+
return rectToClientRect({
|
|
21460
21663
|
x: left,
|
|
21461
|
-
y: top
|
|
21462
|
-
|
|
21664
|
+
y: top,
|
|
21665
|
+
width: right - left,
|
|
21666
|
+
height: bottom - top
|
|
21667
|
+
});
|
|
21463
21668
|
}
|
|
21464
21669
|
const isLeftSide = getSide(placement) === 'left';
|
|
21465
21670
|
const maxRight = max(...clientRects.map(rect => rect.right));
|
|
@@ -21467,20 +21672,12 @@ const inline$1 = function (options) {
|
|
|
21467
21672
|
const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
|
|
21468
21673
|
const top = measureRects[0].top;
|
|
21469
21674
|
const bottom = measureRects[measureRects.length - 1].bottom;
|
|
21470
|
-
|
|
21471
|
-
|
|
21472
|
-
|
|
21473
|
-
|
|
21474
|
-
|
|
21475
|
-
|
|
21476
|
-
bottom,
|
|
21477
|
-
left,
|
|
21478
|
-
right,
|
|
21479
|
-
width,
|
|
21480
|
-
height,
|
|
21481
|
-
x: left,
|
|
21482
|
-
y: top
|
|
21483
|
-
};
|
|
21675
|
+
return rectToClientRect({
|
|
21676
|
+
x: minLeft,
|
|
21677
|
+
y: top,
|
|
21678
|
+
width: maxRight - minLeft,
|
|
21679
|
+
height: bottom - top
|
|
21680
|
+
});
|
|
21484
21681
|
}
|
|
21485
21682
|
return fallback;
|
|
21486
21683
|
}
|
|
@@ -21630,23 +21827,16 @@ const shift$1 = function (options) {
|
|
|
21630
21827
|
y
|
|
21631
21828
|
};
|
|
21632
21829
|
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
21633
|
-
const crossAxis = getSideAxis(
|
|
21830
|
+
const crossAxis = getSideAxis(placement);
|
|
21634
21831
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
21635
21832
|
let mainAxisCoord = coords[mainAxis];
|
|
21636
21833
|
let crossAxisCoord = coords[crossAxis];
|
|
21834
|
+
const clampCoord = (axis, coord) => clamp(coord + overflow[axis === 'y' ? 'top' : 'left'], coord, coord - overflow[axis === 'y' ? 'bottom' : 'right']);
|
|
21637
21835
|
if (checkMainAxis) {
|
|
21638
|
-
|
|
21639
|
-
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
|
21640
|
-
const min = mainAxisCoord + overflow[minSide];
|
|
21641
|
-
const max = mainAxisCoord - overflow[maxSide];
|
|
21642
|
-
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
21836
|
+
mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
|
|
21643
21837
|
}
|
|
21644
21838
|
if (checkCrossAxis) {
|
|
21645
|
-
|
|
21646
|
-
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
|
21647
|
-
const min = crossAxisCoord + overflow[minSide];
|
|
21648
|
-
const max = crossAxisCoord - overflow[maxSide];
|
|
21649
|
-
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
21839
|
+
crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
|
|
21650
21840
|
}
|
|
21651
21841
|
const limitedCoords = limiter.fn({
|
|
21652
21842
|
...state,
|
|
@@ -21677,6 +21867,7 @@ const limitShift$1 = function (options) {
|
|
|
21677
21867
|
return {
|
|
21678
21868
|
options,
|
|
21679
21869
|
fn(state) {
|
|
21870
|
+
var _rawOffset$mainAxis, _rawOffset$crossAxis;
|
|
21680
21871
|
const {
|
|
21681
21872
|
x,
|
|
21682
21873
|
y,
|
|
@@ -21702,9 +21893,8 @@ const limitShift$1 = function (options) {
|
|
|
21702
21893
|
mainAxis: rawOffset,
|
|
21703
21894
|
crossAxis: 0
|
|
21704
21895
|
} : {
|
|
21705
|
-
mainAxis: 0,
|
|
21706
|
-
crossAxis: 0
|
|
21707
|
-
...rawOffset
|
|
21896
|
+
mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,
|
|
21897
|
+
crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0
|
|
21708
21898
|
};
|
|
21709
21899
|
if (checkMainAxis) {
|
|
21710
21900
|
const len = mainAxis === 'y' ? 'height' : 'width';
|
|
@@ -21736,6 +21926,12 @@ const limitShift$1 = function (options) {
|
|
|
21736
21926
|
};
|
|
21737
21927
|
};
|
|
21738
21928
|
|
|
21929
|
+
// Method syntax keeps callback parameters bivariant, but expressing the
|
|
21930
|
+
// explicit `| undefined` required by `exactOptionalPropertyTypes` needs
|
|
21931
|
+
// property syntax, which is contravariant under `strictFunctionTypes`.
|
|
21932
|
+
// Extracting the function from a method position restores that bivariance so
|
|
21933
|
+
// consumers can still assign callbacks with narrower parameter types.
|
|
21934
|
+
|
|
21739
21935
|
/**
|
|
21740
21936
|
* Provides data that allows you to change the size of the floating element —
|
|
21741
21937
|
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
@@ -21750,7 +21946,6 @@ const size$1 = function (options) {
|
|
|
21750
21946
|
name: 'size',
|
|
21751
21947
|
options,
|
|
21752
21948
|
async fn(state) {
|
|
21753
|
-
var _state$middlewareData, _state$middlewareData2;
|
|
21754
21949
|
const {
|
|
21755
21950
|
placement,
|
|
21756
21951
|
rects,
|
|
@@ -21782,24 +21977,21 @@ const size$1 = function (options) {
|
|
|
21782
21977
|
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
21783
21978
|
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
21784
21979
|
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
21785
|
-
const
|
|
21980
|
+
const shiftData = state.middlewareData.shift;
|
|
21981
|
+
const noShift = !shiftData;
|
|
21786
21982
|
let availableHeight = overflowAvailableHeight;
|
|
21787
21983
|
let availableWidth = overflowAvailableWidth;
|
|
21788
|
-
if (
|
|
21984
|
+
if (shiftData != null && shiftData.enabled.x) {
|
|
21789
21985
|
availableWidth = maximumClippingWidth;
|
|
21790
21986
|
}
|
|
21791
|
-
if (
|
|
21987
|
+
if (shiftData != null && shiftData.enabled.y) {
|
|
21792
21988
|
availableHeight = maximumClippingHeight;
|
|
21793
21989
|
}
|
|
21794
21990
|
if (noShift && !alignment) {
|
|
21795
|
-
const xMin = max(overflow.left, 0);
|
|
21796
|
-
const xMax = max(overflow.right, 0);
|
|
21797
|
-
const yMin = max(overflow.top, 0);
|
|
21798
|
-
const yMax = max(overflow.bottom, 0);
|
|
21799
21991
|
if (isYAxis) {
|
|
21800
|
-
availableWidth = width - 2 *
|
|
21992
|
+
availableWidth = width - 2 * max(overflow.left, overflow.right);
|
|
21801
21993
|
} else {
|
|
21802
|
-
availableHeight = height - 2 *
|
|
21994
|
+
availableHeight = height - 2 * max(overflow.top, overflow.bottom);
|
|
21803
21995
|
}
|
|
21804
21996
|
}
|
|
21805
21997
|
await apply({
|
|
@@ -21955,7 +22147,7 @@ function getParentNode(node) {
|
|
|
21955
22147
|
function getNearestOverflowAncestor(node) {
|
|
21956
22148
|
const parentNode = getParentNode(node);
|
|
21957
22149
|
if (isLastTraversableNode(parentNode)) {
|
|
21958
|
-
return node.ownerDocument
|
|
22150
|
+
return (node.ownerDocument || node).body;
|
|
21959
22151
|
}
|
|
21960
22152
|
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
21961
22153
|
return parentNode;
|
|
@@ -22052,10 +22244,7 @@ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
|
22052
22244
|
if (isFixed === void 0) {
|
|
22053
22245
|
isFixed = false;
|
|
22054
22246
|
}
|
|
22055
|
-
|
|
22056
|
-
return false;
|
|
22057
|
-
}
|
|
22058
|
-
return isFixed;
|
|
22247
|
+
return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
|
|
22059
22248
|
}
|
|
22060
22249
|
|
|
22061
22250
|
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
@@ -22082,12 +22271,12 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
22082
22271
|
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
22083
22272
|
let width = clientRect.width / scale.x;
|
|
22084
22273
|
let height = clientRect.height / scale.y;
|
|
22085
|
-
if (domElement) {
|
|
22274
|
+
if (domElement && offsetParent) {
|
|
22086
22275
|
const win = getWindow(domElement);
|
|
22087
|
-
const offsetWin =
|
|
22276
|
+
const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
22088
22277
|
let currentWin = win;
|
|
22089
22278
|
let currentIFrame = getFrameElement(currentWin);
|
|
22090
|
-
while (currentIFrame &&
|
|
22279
|
+
while (currentIFrame && offsetWin !== currentWin) {
|
|
22091
22280
|
const iframeScale = getScale(currentIFrame);
|
|
22092
22281
|
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
22093
22282
|
const css = getComputedStyle$1(currentIFrame);
|
|
@@ -22151,7 +22340,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
22151
22340
|
let scale = createCoords(1);
|
|
22152
22341
|
const offsets = createCoords(0);
|
|
22153
22342
|
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
22154
|
-
if (isOffsetParentAnElement || !
|
|
22343
|
+
if (isOffsetParentAnElement || !isFixed) {
|
|
22155
22344
|
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
22156
22345
|
scroll = getNodeScroll(offsetParent);
|
|
22157
22346
|
}
|
|
@@ -22172,18 +22361,17 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
22172
22361
|
}
|
|
22173
22362
|
|
|
22174
22363
|
function getClientRects(element) {
|
|
22175
|
-
return Array.from(element.getClientRects());
|
|
22364
|
+
return element.getClientRects ? Array.from(element.getClientRects()) : [];
|
|
22176
22365
|
}
|
|
22177
22366
|
|
|
22178
22367
|
// Gets the entire size of the scrollable document area, even extending outside
|
|
22179
22368
|
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
22180
|
-
function getDocumentRect(
|
|
22181
|
-
const
|
|
22182
|
-
const
|
|
22183
|
-
const body = element.ownerDocument.body;
|
|
22369
|
+
function getDocumentRect(html) {
|
|
22370
|
+
const scroll = getNodeScroll(html);
|
|
22371
|
+
const body = html.ownerDocument.body;
|
|
22184
22372
|
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
22185
22373
|
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
22186
|
-
let x = -scroll.scrollLeft + getWindowScrollBarX(
|
|
22374
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX(html);
|
|
22187
22375
|
const y = -scroll.scrollTop;
|
|
22188
22376
|
if (getComputedStyle$1(body).direction === 'rtl') {
|
|
22189
22377
|
x += max(html.clientWidth, body.clientWidth) - width;
|
|
@@ -22200,7 +22388,11 @@ function getDocumentRect(element) {
|
|
|
22200
22388
|
// calculation is affected by unusual styles.
|
|
22201
22389
|
// Most scrollbars leave 15-18px of space.
|
|
22202
22390
|
const SCROLLBAR_MAX = 25;
|
|
22203
|
-
function getViewportRect(element, strategy) {
|
|
22391
|
+
function getViewportRect(element, strategy, rootBoundary) {
|
|
22392
|
+
if (rootBoundary === void 0) {
|
|
22393
|
+
rootBoundary = 'viewport';
|
|
22394
|
+
}
|
|
22395
|
+
const isLayoutViewport = rootBoundary === 'layoutViewport';
|
|
22204
22396
|
const win = getWindow(element);
|
|
22205
22397
|
const html = getDocumentElement(element);
|
|
22206
22398
|
const visualViewport = win.visualViewport;
|
|
@@ -22209,31 +22401,42 @@ function getViewportRect(element, strategy) {
|
|
|
22209
22401
|
let x = 0;
|
|
22210
22402
|
let y = 0;
|
|
22211
22403
|
if (visualViewport) {
|
|
22212
|
-
|
|
22213
|
-
|
|
22214
|
-
|
|
22215
|
-
|
|
22216
|
-
|
|
22217
|
-
|
|
22404
|
+
// Client coordinates are relative to the layout viewport, except in
|
|
22405
|
+
// WebKit with an `absolute` strategy, where they are relative to the
|
|
22406
|
+
// visual viewport.
|
|
22407
|
+
const layoutRelativeClientCoords = !isWebKit() || strategy === 'fixed';
|
|
22408
|
+
if (isLayoutViewport) {
|
|
22409
|
+
if (!layoutRelativeClientCoords) {
|
|
22410
|
+
x = -visualViewport.offsetLeft;
|
|
22411
|
+
y = -visualViewport.offsetTop;
|
|
22412
|
+
}
|
|
22413
|
+
} else {
|
|
22414
|
+
width = visualViewport.width;
|
|
22415
|
+
height = visualViewport.height;
|
|
22416
|
+
if (layoutRelativeClientCoords) {
|
|
22417
|
+
x = visualViewport.offsetLeft;
|
|
22418
|
+
y = visualViewport.offsetTop;
|
|
22419
|
+
}
|
|
22218
22420
|
}
|
|
22219
22421
|
}
|
|
22220
22422
|
const windowScrollbarX = getWindowScrollBarX(html);
|
|
22221
|
-
//
|
|
22222
|
-
// visual width
|
|
22223
|
-
//
|
|
22423
|
+
// `scrollbar-gutter: stable` on the <html> reserves gutter space that shrinks
|
|
22424
|
+
// the visual width but isn't reflected in `html.clientWidth`, so subtract it.
|
|
22425
|
+
// Only the inline-end (right) gutter can hold the scrollbar; `both-edges` also
|
|
22426
|
+
// reserves an empty inline-start gutter that clips nothing, so exclude just
|
|
22427
|
+
// the one scrollbar-side gutter — halve the measured (two-gutter) total. A
|
|
22428
|
+
// left-side scrollbar (`windowScrollbarX > 0`) is already handled by
|
|
22429
|
+
// `getHTMLOffset`/`visualViewport.width`; skip it here.
|
|
22224
22430
|
if (windowScrollbarX <= 0) {
|
|
22225
22431
|
const doc = html.ownerDocument;
|
|
22226
22432
|
const body = doc.body;
|
|
22227
22433
|
const bodyStyles = getComputedStyle(body);
|
|
22228
22434
|
const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
22229
|
-
const
|
|
22230
|
-
|
|
22231
|
-
|
|
22435
|
+
const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
22436
|
+
const gutter = getComputedStyle(html).scrollbarGutter === 'stable both-edges' ? reservedWidth / 2 : reservedWidth;
|
|
22437
|
+
if (gutter <= SCROLLBAR_MAX) {
|
|
22438
|
+
width -= gutter;
|
|
22232
22439
|
}
|
|
22233
|
-
} else if (windowScrollbarX <= SCROLLBAR_MAX) {
|
|
22234
|
-
// If the <body> scrollbar is on the left, the width needs to be extended
|
|
22235
|
-
// by the scrollbar amount so there isn't extra space on the right.
|
|
22236
|
-
width += windowScrollbarX;
|
|
22237
22440
|
}
|
|
22238
22441
|
return {
|
|
22239
22442
|
width,
|
|
@@ -22248,7 +22451,7 @@ function getInnerBoundingClientRect(element, strategy) {
|
|
|
22248
22451
|
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
22249
22452
|
const top = clientRect.top + element.clientTop;
|
|
22250
22453
|
const left = clientRect.left + element.clientLeft;
|
|
22251
|
-
const scale =
|
|
22454
|
+
const scale = getScale(element);
|
|
22252
22455
|
const width = element.clientWidth * scale.x;
|
|
22253
22456
|
const height = element.clientHeight * scale.y;
|
|
22254
22457
|
const x = left * scale.x;
|
|
@@ -22262,8 +22465,8 @@ function getInnerBoundingClientRect(element, strategy) {
|
|
|
22262
22465
|
}
|
|
22263
22466
|
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
22264
22467
|
let rect;
|
|
22265
|
-
if (clippingAncestor === 'viewport') {
|
|
22266
|
-
rect = getViewportRect(element, strategy);
|
|
22468
|
+
if (clippingAncestor === 'viewport' || clippingAncestor === 'layoutViewport') {
|
|
22469
|
+
rect = getViewportRect(element, strategy, clippingAncestor);
|
|
22267
22470
|
} else if (clippingAncestor === 'document') {
|
|
22268
22471
|
rect = getDocumentRect(getDocumentElement(element));
|
|
22269
22472
|
} else if (isElement(clippingAncestor)) {
|
|
@@ -22279,13 +22482,6 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
|
|
|
22279
22482
|
}
|
|
22280
22483
|
return rectToClientRect(rect);
|
|
22281
22484
|
}
|
|
22282
|
-
function hasFixedPositionAncestor(element, stopNode) {
|
|
22283
|
-
const parentNode = getParentNode(element);
|
|
22284
|
-
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
22285
|
-
return false;
|
|
22286
|
-
}
|
|
22287
|
-
return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
|
22288
|
-
}
|
|
22289
22485
|
|
|
22290
22486
|
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
22291
22487
|
// clipping (or hiding) child elements. This returns all clipping ancestors
|
|
@@ -22296,7 +22492,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
22296
22492
|
return cachedResult;
|
|
22297
22493
|
}
|
|
22298
22494
|
let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
|
|
22299
|
-
let
|
|
22495
|
+
let lastKeptComputedStyle = null;
|
|
22300
22496
|
const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
|
|
22301
22497
|
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
22302
22498
|
|
|
@@ -22304,16 +22500,20 @@ function getClippingElementAncestors(element, cache) {
|
|
|
22304
22500
|
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
22305
22501
|
const computedStyle = getComputedStyle$1(currentNode);
|
|
22306
22502
|
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
22307
|
-
|
|
22308
|
-
|
|
22309
|
-
|
|
22310
|
-
|
|
22503
|
+
// Position of the containing block chain below the current node. A fixed
|
|
22504
|
+
// element whose containing block hasn't been found yet is a fixed chain.
|
|
22505
|
+
const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? 'fixed' : '';
|
|
22506
|
+
|
|
22507
|
+
// A non-containing ancestor does not clip the element when the chain
|
|
22508
|
+
// below it escapes it: a fixed chain escapes all ancestors up to the
|
|
22509
|
+
// next containing block, an absolute chain escapes static ancestors.
|
|
22510
|
+
const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === 'fixed' || lastPosition === 'absolute' && computedStyle.position === 'static');
|
|
22311
22511
|
if (shouldDropCurrentNode) {
|
|
22312
22512
|
// Drop non-containing blocks.
|
|
22313
22513
|
result = result.filter(ancestor => ancestor !== currentNode);
|
|
22314
22514
|
} else {
|
|
22315
|
-
//
|
|
22316
|
-
|
|
22515
|
+
// The kept node carries the chain position for the next iteration.
|
|
22516
|
+
lastKeptComputedStyle = computedStyle;
|
|
22317
22517
|
}
|
|
22318
22518
|
currentNode = getParentNode(currentNode);
|
|
22319
22519
|
}
|
|
@@ -22323,7 +22523,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
22323
22523
|
|
|
22324
22524
|
// Gets the maximum area that the element is visible in due to any number of
|
|
22325
22525
|
// clipping ancestors.
|
|
22326
|
-
function getClippingRect(_ref) {
|
|
22526
|
+
function getClippingRect$1(_ref) {
|
|
22327
22527
|
let {
|
|
22328
22528
|
element,
|
|
22329
22529
|
boundary,
|
|
@@ -22373,13 +22573,7 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
22373
22573
|
scrollTop: 0
|
|
22374
22574
|
};
|
|
22375
22575
|
const offsets = createCoords(0);
|
|
22376
|
-
|
|
22377
|
-
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
22378
|
-
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
22379
|
-
function setLeftRTLScrollbarOffset() {
|
|
22380
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
22381
|
-
}
|
|
22382
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
22576
|
+
if (isOffsetParentAnElement || !isFixed) {
|
|
22383
22577
|
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
22384
22578
|
scroll = getNodeScroll(offsetParent);
|
|
22385
22579
|
}
|
|
@@ -22387,12 +22581,13 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
22387
22581
|
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
22388
22582
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
22389
22583
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
22390
|
-
} else if (documentElement) {
|
|
22391
|
-
setLeftRTLScrollbarOffset();
|
|
22392
22584
|
}
|
|
22393
22585
|
}
|
|
22394
|
-
|
|
22395
|
-
|
|
22586
|
+
|
|
22587
|
+
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
22588
|
+
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
22589
|
+
if (!isOffsetParentAnElement && documentElement) {
|
|
22590
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
22396
22591
|
}
|
|
22397
22592
|
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
22398
22593
|
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
@@ -22477,7 +22672,7 @@ function isRTL(element) {
|
|
|
22477
22672
|
const platform = {
|
|
22478
22673
|
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
22479
22674
|
getDocumentElement,
|
|
22480
|
-
getClippingRect,
|
|
22675
|
+
getClippingRect: getClippingRect$1,
|
|
22481
22676
|
getOffsetParent,
|
|
22482
22677
|
getElementRects,
|
|
22483
22678
|
getClientRects,
|
|
@@ -22492,7 +22687,7 @@ function rectsAreEqual(a, b) {
|
|
|
22492
22687
|
}
|
|
22493
22688
|
|
|
22494
22689
|
// https://samthor.au/2021/observing-dom/
|
|
22495
|
-
function observeMove(element, onMove) {
|
|
22690
|
+
function observeMove(element, onMove, ancestorResize) {
|
|
22496
22691
|
let io = null;
|
|
22497
22692
|
let timeoutId;
|
|
22498
22693
|
const root = getDocumentElement(element);
|
|
@@ -22535,13 +22730,22 @@ function observeMove(element, onMove) {
|
|
|
22535
22730
|
let isFirstUpdate = true;
|
|
22536
22731
|
function handleObserve(entries) {
|
|
22537
22732
|
const ratio = entries[0].intersectionRatio;
|
|
22733
|
+
|
|
22734
|
+
// The entry is a snapshot, so the reference may have moved since the
|
|
22735
|
+
// intersection was computed (under performance constraints, or between
|
|
22736
|
+
// consecutive frames of a multi-frame layout shift). The reported ratio
|
|
22737
|
+
// and the observed area are stale in that case and cannot be trusted to
|
|
22738
|
+
// detect subsequent movement, so refresh regardless of the ratio.
|
|
22739
|
+
if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
22740
|
+
return refresh();
|
|
22741
|
+
}
|
|
22538
22742
|
if (ratio !== threshold) {
|
|
22539
22743
|
if (!isFirstUpdate) {
|
|
22540
22744
|
return refresh();
|
|
22541
22745
|
}
|
|
22542
22746
|
if (!ratio) {
|
|
22543
|
-
// If the reference is clipped, the ratio is 0. Throttle
|
|
22544
|
-
// to prevent an infinite loop of updates.
|
|
22747
|
+
// If the reference is clipped in place, the ratio is 0. Throttle
|
|
22748
|
+
// the refresh to prevent an infinite loop of updates.
|
|
22545
22749
|
timeoutId = setTimeout(() => {
|
|
22546
22750
|
refresh(false, 1e-7);
|
|
22547
22751
|
}, 1000);
|
|
@@ -22549,16 +22753,6 @@ function observeMove(element, onMove) {
|
|
|
22549
22753
|
refresh(false, ratio);
|
|
22550
22754
|
}
|
|
22551
22755
|
}
|
|
22552
|
-
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
22553
|
-
// It's possible that even though the ratio is reported as 1, the
|
|
22554
|
-
// element is not actually fully within the IntersectionObserver's root
|
|
22555
|
-
// area anymore. This can happen under performance constraints. This may
|
|
22556
|
-
// be a bug in the browser's IntersectionObserver implementation. To
|
|
22557
|
-
// work around this, we compare the element's bounding rect now with
|
|
22558
|
-
// what it was at the time we created the IntersectionObserver. If they
|
|
22559
|
-
// are not equal then the element moved, so we refresh.
|
|
22560
|
-
refresh();
|
|
22561
|
-
}
|
|
22562
22756
|
isFirstUpdate = false;
|
|
22563
22757
|
}
|
|
22564
22758
|
|
|
@@ -22575,8 +22769,18 @@ function observeMove(element, onMove) {
|
|
|
22575
22769
|
}
|
|
22576
22770
|
io.observe(element);
|
|
22577
22771
|
}
|
|
22772
|
+
const win = getWindow(element);
|
|
22773
|
+
// The window is a resize ancestor, so when `ancestorResize` is enabled its
|
|
22774
|
+
// listener already runs the update on resize. Here we only need to rebuild
|
|
22775
|
+
// the `IntersectionObserver` for the new root size, skipping a redundant
|
|
22776
|
+
// update. When `ancestorResize` is disabled, this becomes the sole update.
|
|
22777
|
+
const handleResize = () => refresh(ancestorResize);
|
|
22778
|
+
win.addEventListener('resize', handleResize);
|
|
22578
22779
|
refresh(true);
|
|
22579
|
-
return
|
|
22780
|
+
return () => {
|
|
22781
|
+
win.removeEventListener('resize', handleResize);
|
|
22782
|
+
cleanup();
|
|
22783
|
+
};
|
|
22580
22784
|
}
|
|
22581
22785
|
|
|
22582
22786
|
/**
|
|
@@ -22601,12 +22805,10 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
22601
22805
|
const referenceEl = unwrapElement(reference);
|
|
22602
22806
|
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
|
|
22603
22807
|
ancestors.forEach(ancestor => {
|
|
22604
|
-
ancestorScroll && ancestor.addEventListener('scroll', update
|
|
22605
|
-
passive: true
|
|
22606
|
-
});
|
|
22808
|
+
ancestorScroll && ancestor.addEventListener('scroll', update);
|
|
22607
22809
|
ancestorResize && ancestor.addEventListener('resize', update);
|
|
22608
22810
|
});
|
|
22609
|
-
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
22811
|
+
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update, ancestorResize) : null;
|
|
22610
22812
|
let reobserveFrame = -1;
|
|
22611
22813
|
let resizeObserver = null;
|
|
22612
22814
|
if (elementResize) {
|
|
@@ -22692,6 +22894,13 @@ const flip = flip$1;
|
|
|
22692
22894
|
*/
|
|
22693
22895
|
const size = size$1;
|
|
22694
22896
|
|
|
22897
|
+
/**
|
|
22898
|
+
* Provides data to hide the floating element in applicable situations, such as
|
|
22899
|
+
* when it is not in the same clipping context as the reference element.
|
|
22900
|
+
* @see https://floating-ui.com/docs/hide
|
|
22901
|
+
*/
|
|
22902
|
+
const hide = hide$1;
|
|
22903
|
+
|
|
22695
22904
|
/**
|
|
22696
22905
|
* Provides data to position an inner element of the floating element so that it
|
|
22697
22906
|
* appears centered to the reference element.
|
|
@@ -22720,11 +22929,9 @@ const computePosition = (reference, floating, options) => {
|
|
|
22720
22929
|
// multiple lifecycle resets re-use the same result. It only lives for a
|
|
22721
22930
|
// single call. If other functions become expensive, we can add them as well.
|
|
22722
22931
|
const cache = new Map();
|
|
22723
|
-
const mergedOptions = {
|
|
22724
|
-
platform,
|
|
22725
|
-
...options
|
|
22726
|
-
};
|
|
22932
|
+
const mergedOptions = options != null ? options : {};
|
|
22727
22933
|
const platformWithCache = {
|
|
22934
|
+
...platform,
|
|
22728
22935
|
...mergedOptions.platform,
|
|
22729
22936
|
_c: cache
|
|
22730
22937
|
};
|
|
@@ -22749,6 +22956,77 @@ function popIn(el) {
|
|
|
22749
22956
|
});
|
|
22750
22957
|
}
|
|
22751
22958
|
|
|
22959
|
+
/**
|
|
22960
|
+
* This utility is covered by the end-to-end tests under 'clipping' in `popovercontainer.cy.ts`.
|
|
22961
|
+
*/
|
|
22962
|
+
const CLIPPING_RECT_CACHE = Symbol('Clipping Rect Cache');
|
|
22963
|
+
/**
|
|
22964
|
+
* A custom floating UI platform that restricts clipping rectangles to the safe area.
|
|
22965
|
+
*/
|
|
22966
|
+
const safeAreaPlatform = { ...platform, getClippingRect };
|
|
22967
|
+
/**
|
|
22968
|
+
* Computes the clipping rectangle of an element while accounting for the safe area.
|
|
22969
|
+
*/
|
|
22970
|
+
async function getClippingRect(...args) {
|
|
22971
|
+
const element = args[0].element;
|
|
22972
|
+
// Check whether the clipping rectangle of the given element has already been computed during
|
|
22973
|
+
// this pass.
|
|
22974
|
+
const hit = this[CLIPPING_RECT_CACHE].get(element);
|
|
22975
|
+
if (hit)
|
|
22976
|
+
return hit;
|
|
22977
|
+
// Compute the clipping rectangle with the Floating UI DOM platform, then restrict it to the safe
|
|
22978
|
+
// area.
|
|
22979
|
+
const clippingRect = await platform.getClippingRect.apply(this, args);
|
|
22980
|
+
applySafeArea(clippingRect, element);
|
|
22981
|
+
this[CLIPPING_RECT_CACHE].set(element, clippingRect);
|
|
22982
|
+
return clippingRect;
|
|
22983
|
+
}
|
|
22984
|
+
/**
|
|
22985
|
+
* Restricts the `clippingRect` computed for `element` to the safe area, modifying it in place.
|
|
22986
|
+
*
|
|
22987
|
+
* The safe area only applies to elements that the header can actually cover, which excludes
|
|
22988
|
+
* elements without a header on their page, elements on a top layer and elements within the header.
|
|
22989
|
+
*/
|
|
22990
|
+
function applySafeArea(clippingRect, element) {
|
|
22991
|
+
const headerElement = element.ownerDocument.querySelector('post-header');
|
|
22992
|
+
if (headerElement === null)
|
|
22993
|
+
return;
|
|
22994
|
+
let parent = element;
|
|
22995
|
+
while (!isLastTraversableNode(parent)) {
|
|
22996
|
+
parent = getParentNode(parent);
|
|
22997
|
+
if (!isHTMLElement(parent))
|
|
22998
|
+
continue;
|
|
22999
|
+
// Do not apply the safe area of the header to
|
|
23000
|
+
// - elements that are on a top layer, such as a dialog.
|
|
23001
|
+
// - elements that are located within the header itself.
|
|
23002
|
+
if (isTopLayer(parent) || parent === headerElement)
|
|
23003
|
+
return;
|
|
23004
|
+
}
|
|
23005
|
+
const headerRect = headerElement.getBoundingClientRect();
|
|
23006
|
+
const top = Math.max(clippingRect.y, headerRect.bottom);
|
|
23007
|
+
clippingRect.height -= top - clippingRect.y;
|
|
23008
|
+
clippingRect.y = top;
|
|
23009
|
+
}
|
|
23010
|
+
/**
|
|
23011
|
+
* Computes the coordinates that will position the `floating` element next to a given `reference`
|
|
23012
|
+
* element while accounting for the safe area.
|
|
23013
|
+
*
|
|
23014
|
+
* The safe area is the part of the viewport that the header does not cover. Restricting the
|
|
23015
|
+
* clipping rectangles to it makes floating elements behave as if they were clipped by the header.
|
|
23016
|
+
*/
|
|
23017
|
+
const computePositionWithSafeArea = (reference, floating, options) => {
|
|
23018
|
+
// Adapted from https://github.com/floating-ui/floating-ui/blob/27629b74ba36ab8ceb2a968051927b9b69511a3b/packages/dom/src/index.ts#L15
|
|
23019
|
+
options ?? (options = {});
|
|
23020
|
+
return computePosition(reference, floating, {
|
|
23021
|
+
...options,
|
|
23022
|
+
platform: {
|
|
23023
|
+
...safeAreaPlatform,
|
|
23024
|
+
...options.platform,
|
|
23025
|
+
[CLIPPING_RECT_CACHE]: new Map(),
|
|
23026
|
+
},
|
|
23027
|
+
});
|
|
23028
|
+
};
|
|
23029
|
+
|
|
22752
23030
|
const postPopovercontainerCss = () => `@layer polyfill{@supports not selector(:popover-open){:host([popover]:not(.\\:popover-open)){display:none}}}:host{background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;margin:0;padding:0;overflow:visible}:host>div{box-shadow:var(--post-device-elevation-300);width:max-content;max-width:100%;color:var(--post-current-fg);background-color:var(--post-current-bg);border-radius:4px;position:relative}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host>div{border:2px solid rgba(0,0,0,0)}}:host [part=post-popovercontainer-border-mask]{display:none;position:absolute;inset:0;border-radius:4px;pointer-events:none}:host .arrow{--post-popovercontainer-arrow-border: var(--post-popovercontainer-arrow-border-width, 0px) solid var(--post-popovercontainer-arrow-border-color, transparent);position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:host .arrow[dynamic-placement=top]{border-bottom-right-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=right]{border-bottom-left-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=bottom]{border-top-left-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=left]{border-top-right-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .arrow[dynamic-placement=top]{border-block-end:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);bottom:-0.3796735336rem !important}:host .arrow[dynamic-placement=left]{border-block-start:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);right:-0.3796735336rem !important}:host .arrow[dynamic-placement=right]{border-block-end:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);left:-0.3796735336rem !important}:host .arrow[dynamic-placement=bottom]{border-block-start:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);top:-0.3796735336rem !important}}:host([tooltip]){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:host([safe-space])::after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:auto}:host([safe-space=triangle])::after{clip-path:polygon(var(--post-safe-space-cursor-x, 0) var(--post-safe-space-cursor-y, 0), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)))}:host([safe-space=trapezoid])::after{clip-path:polygon(var(--post-safe-space-trigger-x-start, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-start, 0)), var(--post-safe-space-trigger-x-end, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-end, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)))}:host(:not(:has(.arrow)))>div{box-shadow:var(--post-device-elevation-300)}:host(:has(.arrow))>div{filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=top]))>div{filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=left]))>div{filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=right]))>div{filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}`;
|
|
22753
23031
|
|
|
22754
23032
|
var __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -22826,7 +23104,7 @@ class PostPopovercontainer {
|
|
|
22826
23104
|
if (this.toggleTimeoutId || !target)
|
|
22827
23105
|
return;
|
|
22828
23106
|
this.eventTarget = target;
|
|
22829
|
-
this.
|
|
23107
|
+
this.updatePosition();
|
|
22830
23108
|
this.host.showPopover();
|
|
22831
23109
|
}
|
|
22832
23110
|
/**
|
|
@@ -22852,7 +23130,7 @@ class PostPopovercontainer {
|
|
|
22852
23130
|
this.eventTarget = target;
|
|
22853
23131
|
// Prevent instant double toggle
|
|
22854
23132
|
if (!this.toggleTimeoutId) {
|
|
22855
|
-
this.
|
|
23133
|
+
this.updatePosition();
|
|
22856
23134
|
this.host.togglePopover(force);
|
|
22857
23135
|
this.toggleTimeoutId = null;
|
|
22858
23136
|
}
|
|
@@ -22964,17 +23242,14 @@ class PostPopovercontainer {
|
|
|
22964
23242
|
startAutoupdates() {
|
|
22965
23243
|
if (!this.eventTarget || !this.host)
|
|
22966
23244
|
return;
|
|
22967
|
-
this.clearAutoUpdate = autoUpdate(this.eventTarget, this.host, this.
|
|
22968
|
-
}
|
|
22969
|
-
/**
|
|
22970
|
-
* Retrieves the dynamic height of the header
|
|
22971
|
-
*/
|
|
22972
|
-
getHeaderHeight() {
|
|
22973
|
-
const header = document.querySelector('post-header');
|
|
22974
|
-
return header ? Number.parseFloat(getComputedStyle(header).height) : 0;
|
|
23245
|
+
this.clearAutoUpdate = autoUpdate(this.eventTarget, this.host, this.updatePosition.bind(this));
|
|
22975
23246
|
}
|
|
22976
|
-
async
|
|
22977
|
-
const { x, y, middlewareData, placement } = await this.
|
|
23247
|
+
async updatePosition() {
|
|
23248
|
+
const { x, y, middlewareData, placement } = await this.calculatePosition();
|
|
23249
|
+
// Hide the popover if the target is outside the viewport
|
|
23250
|
+
if (middlewareData.hide?.referenceHidden) {
|
|
23251
|
+
this.host.hidePopover();
|
|
23252
|
+
}
|
|
22978
23253
|
const currentPlacement = placement.split('-')[0];
|
|
22979
23254
|
this.dynamicPlacement = currentPlacement;
|
|
22980
23255
|
// Position popover
|
|
@@ -22999,13 +23274,15 @@ class PostPopovercontainer {
|
|
|
22999
23274
|
await this.updateSafeSpaceBoundaries(currentPlacement);
|
|
23000
23275
|
}
|
|
23001
23276
|
}
|
|
23002
|
-
async
|
|
23277
|
+
async calculatePosition() {
|
|
23003
23278
|
const gap = this.edgeGap;
|
|
23004
23279
|
const isAligned = (this.placement || 'top').includes('-');
|
|
23005
|
-
const flipMiddleware =
|
|
23006
|
-
|
|
23007
|
-
crossAxis: false,
|
|
23008
|
-
|
|
23280
|
+
const flipMiddleware = [
|
|
23281
|
+
// Flip the popover if the target moves outside the viewport
|
|
23282
|
+
flip({ elementContext: 'reference', crossAxis: false }),
|
|
23283
|
+
// Flip the popover if the popover itself moves outside the viewport
|
|
23284
|
+
flip({ elementContext: 'floating', crossAxis: false }),
|
|
23285
|
+
];
|
|
23009
23286
|
const shiftMiddleware = shift({
|
|
23010
23287
|
padding: gap,
|
|
23011
23288
|
limiter: limitShift({
|
|
@@ -23017,7 +23294,7 @@ class PostPopovercontainer {
|
|
|
23017
23294
|
inline(),
|
|
23018
23295
|
// Per floating-ui docs: for aligned placements (e.g. bottom-end),
|
|
23019
23296
|
// flip should come before shift. For non-aligned, shift before flip.
|
|
23020
|
-
...(isAligned ? [flipMiddleware, shiftMiddleware] : [shiftMiddleware, flipMiddleware]),
|
|
23297
|
+
...(isAligned ? [...flipMiddleware, shiftMiddleware] : [shiftMiddleware, ...flipMiddleware]),
|
|
23021
23298
|
size({
|
|
23022
23299
|
apply({ availableWidth, elements }) {
|
|
23023
23300
|
Object.assign(elements.floating.style, {
|
|
@@ -23029,7 +23306,12 @@ class PostPopovercontainer {
|
|
|
23029
23306
|
if (this.arrow) {
|
|
23030
23307
|
middleware.push(arrow({ element: this.arrowRef, padding: gap }));
|
|
23031
23308
|
}
|
|
23032
|
-
|
|
23309
|
+
// Automatically hide the popover if the target moves outside the scrollport.
|
|
23310
|
+
if (this.autoHide) {
|
|
23311
|
+
// Per floating-ui docs: hide should generally be placed at the end.
|
|
23312
|
+
middleware.push(hide({ strategy: 'referenceHidden' }));
|
|
23313
|
+
}
|
|
23314
|
+
return computePositionWithSafeArea(this.eventTarget, this.host, {
|
|
23033
23315
|
placement: this.placement || 'top',
|
|
23034
23316
|
strategy: 'fixed',
|
|
23035
23317
|
middleware,
|
|
@@ -23096,9 +23378,9 @@ class PostPopovercontainer {
|
|
|
23096
23378
|
}
|
|
23097
23379
|
}
|
|
23098
23380
|
render() {
|
|
23099
|
-
return (hAsync(Host, { key: '
|
|
23381
|
+
return (hAsync(Host, { key: 'a6f41ad3ef982f9e9ec0d6450837d1cfdca73d16', "data-version": version$1, popover: "auto" }, hAsync("div", { key: '40afab436d5550fda44c8995139080161eab5b09', part: "post-popovercontainer-content", class: "popover-content" }, this.arrow && (hAsync("span", { key: '580bd8fcaecb89334aca05001137a4d7cccd254a', "dynamic-placement": this.dynamicPlacement, class: "arrow", ref: el => {
|
|
23100
23382
|
this.arrowRef = el;
|
|
23101
|
-
} })), hAsync("span", { key: '
|
|
23383
|
+
} })), hAsync("span", { key: '61a6e4e8026832afc188edd5a74535716db65945', part: "post-popovercontainer-border-mask" }), hAsync("slot", { key: 'd79cb69a77dbba13ffa3c30e0393db4f3a669a12' }))));
|
|
23102
23384
|
}
|
|
23103
23385
|
get host() { return getElement(this); }
|
|
23104
23386
|
static get style() { return postPopovercontainerCss(); }
|
|
@@ -23111,6 +23393,7 @@ class PostPopovercontainer {
|
|
|
23111
23393
|
"offset": [2],
|
|
23112
23394
|
"arrow": [4],
|
|
23113
23395
|
"safeSpace": [513, "safe-space"],
|
|
23396
|
+
"autoHide": [4, "auto-hide"],
|
|
23114
23397
|
"dynamicPlacement": [32],
|
|
23115
23398
|
"show": [64],
|
|
23116
23399
|
"hide": [64],
|
|
@@ -23197,7 +23480,7 @@ class PostProgressbar {
|
|
|
23197
23480
|
const max = this.getEffectiveMax();
|
|
23198
23481
|
const value = this.getEffectiveValue(min, max);
|
|
23199
23482
|
const percentage = ((value - min) / (max - min)) * 100;
|
|
23200
|
-
return (hAsync(Host, { key: '
|
|
23483
|
+
return (hAsync(Host, { key: 'c08b9b976c5cb34018e48c4dafe6b87207710ba5', role: "progressbar", "aria-valuenow": value, "aria-valuemin": min, "aria-valuemax": max }, hAsync("div", { key: '485eb6657d14ad5472bfbe822b1cd0eb50cd0129', class: "progress-value", style: { '--post-progressbar-value': `${percentage}%` } })));
|
|
23201
23484
|
}
|
|
23202
23485
|
get host() { return getElement(this); }
|
|
23203
23486
|
static get style() { return postProgressbarCss(); }
|
|
@@ -23314,7 +23597,7 @@ class PostRating {
|
|
|
23314
23597
|
}
|
|
23315
23598
|
}
|
|
23316
23599
|
render() {
|
|
23317
|
-
return (hAsync(Host, { key: '
|
|
23600
|
+
return (hAsync(Host, { key: '0cf576670f16d4b8f88b714af12ded14aa1372b2', "data-version": version$1 }, hAsync("div", { key: 'a53c8f8f9c617a2bd3996fd5812c7af091497f55', role: "slider", class: "rating", tabindex: "0", "aria-label": this.label, "aria-valuemin": "0", "aria-valuemax": this.stars, "aria-valuenow": this.currentRating, "aria-valuetext": `${this.currentRating} / ${this.stars}`, "aria-readonly": this.readonly ? 'true' : 'false', onKeyDown: this.keydownHandler, onBlur: this.blurHandler }, Array.from({ length: this.stars }).map((v, i) => (hAsync("div", { key: `star-${v}`, "aria-hidden": "true", class: {
|
|
23318
23601
|
'star': true,
|
|
23319
23602
|
'before-hover': i < this.hoveredIndex,
|
|
23320
23603
|
'active': i < Math.round(this.currentRating),
|
|
@@ -23354,7 +23637,7 @@ __decorate$8([
|
|
|
23354
23637
|
|
|
23355
23638
|
const SIDE_NAVIGATION_SIZES = ['large', 'small'];
|
|
23356
23639
|
|
|
23357
|
-
const postSideNavigationCss = () => `:host{
|
|
23640
|
+
const postSideNavigationCss = () => `:host{display:flex}:host,:host dialog{background-color:var(--post-scheme-color-palette-bg-2);border-inline-end:var(--post-device-border-width-alternative1) solid var(--post-scheme-color-interactive-primary-enabled-stroke4)}:host dialog{overflow:visible;width:var(--post-core-dimension-296);bottom:auto;right:auto;border:none;padding:0;max-height:100dvh;transform:translateX(-100%);transition-property:transform,overlay,display;transition-behavior:allow-discrete;transition-duration:350ms;box-shadow:var(--post-device-elevation-300)}:host dialog[open]{transform:translateX(0)}@starting-style{:host dialog[open]{transform:translateX(-100%)}}@media (prefers-reduced-motion: reduce){:host dialog{transition:none}}:host post-closebutton{transform:translate(50%, 0)}`;
|
|
23358
23641
|
|
|
23359
23642
|
var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
23360
23643
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -23484,7 +23767,7 @@ class PostSideNavigation {
|
|
|
23484
23767
|
} }, hAsync("slot", null), hAsync("post-closebutton", { onClick: () => this.hide() }, this.textClose)));
|
|
23485
23768
|
}
|
|
23486
23769
|
render() {
|
|
23487
|
-
return (hAsync(Host, { key: '
|
|
23770
|
+
return (hAsync(Host, { key: 'd99b96af69d80dc97b44fdc61410768617ca934c', "data-version": version$1 }, this.device === 'desktop' ? this.renderNav() : this.renderDialog()));
|
|
23488
23771
|
}
|
|
23489
23772
|
get host() { return getElement(this); }
|
|
23490
23773
|
static get style() { return postSideNavigationCss(); }
|
|
@@ -23599,7 +23882,7 @@ class PostSideNavigationTrigger {
|
|
|
23599
23882
|
await this.sideNavigation?.toggle();
|
|
23600
23883
|
}
|
|
23601
23884
|
render() {
|
|
23602
|
-
return (hAsync(Host, { key: '
|
|
23885
|
+
return (hAsync(Host, { key: 'e82eb54b68db812c3753a7d027d983fa81f01255', "data-version": version$1 }, hAsync("slot", { key: 'a1ca8877d1a9e0faa653a3f1dec3fd1655b4bcb7' })));
|
|
23603
23886
|
}
|
|
23604
23887
|
get host() { return getElement(this); }
|
|
23605
23888
|
static get style() { return postSideNavigationTriggerCss(); }
|
|
@@ -23729,7 +24012,7 @@ class PostStepper {
|
|
|
23729
24012
|
}
|
|
23730
24013
|
}
|
|
23731
24014
|
render() {
|
|
23732
|
-
return (hAsync(Host, { key: '
|
|
24015
|
+
return (hAsync(Host, { key: '917393b196552a6994cfc230bf93f2cd0a5e77e7', "data-version": version$1 }, hAsync("ol", { key: 'ab15bc7eaa44c5a8246c2fcc2d1c3c8e1d8ab4a6' }, hAsync("slot", { key: 'e61ab0edfce06fe1ef7345a6472834a3af38ce9e', onSlotchange: () => this.updateSteps() })), hAsync("div", { key: 'be0556840878de5adb007ef33693ef619d8a19fa', class: "active-step", "aria-hidden": "true" }, hAsync("span", { key: '8a1663a9360d931198f52c699c4e855a1f77bbc6', class: "active-step-label" }, this.mobileActiveStepLabel), hAsync("span", { key: '31f804be237598a5d8b7cbd1f418af1758e42fd6', innerHTML: this.mobileActiveStepName }))));
|
|
23733
24016
|
}
|
|
23734
24017
|
get host() { return getElement(this); }
|
|
23735
24018
|
static get watchers() { return {
|
|
@@ -23788,7 +24071,7 @@ class PostStepperItem {
|
|
|
23788
24071
|
registerInstance(this, hostRef);
|
|
23789
24072
|
}
|
|
23790
24073
|
render() {
|
|
23791
|
-
return (hAsync(Host, { key: '
|
|
24074
|
+
return (hAsync(Host, { key: '486be1addaa512c39628cfa2fab567d5dfb4b517', "data-version": version$1, role: "listitem" }, hAsync("span", { key: 'a89be43022ff5b9d9cbcad1e4f934fdcef8919c3', class: "stepper-item-content" }, hAsync("span", { key: '60e217eab48532d7985b57159251f84217f1b362', class: "step-hidden-label visually-hidden" }), hAsync("span", { key: 'b847451659b699693d168dd8164c878281fb7793', class: "label" }, hAsync("slot", { key: '823229cba3855d597f08ebc6fc4e5a5059ef7f98' })))));
|
|
23792
24075
|
}
|
|
23793
24076
|
static get style() { return postStepperItemCss(); }
|
|
23794
24077
|
static get cmpMeta() { return {
|
|
@@ -23844,9 +24127,9 @@ class PostTabItem {
|
|
|
23844
24127
|
this.isPagesVariant = hasAnchor;
|
|
23845
24128
|
}
|
|
23846
24129
|
render() {
|
|
23847
|
-
return (hAsync(Host, { key: '
|
|
24130
|
+
return (hAsync(Host, { key: '7a12be83f1b2bd428a4fcba01b4696a253d58daf', id: this.tabId, role: this.isPagesVariant ? undefined : 'tab', "data-version": version$1, "data-pages-variant": this.isPagesVariant.toString(), "aria-selected": this.isPagesVariant ? undefined : 'false', "aria-disabled": this.disabled ? 'true' : undefined, tabindex: this.isPagesVariant ? undefined : '-1', class: `${this.isPagesVariant ? 'nav-item' : 'tab-title'}${!this.isPagesVariant ? ' ssr' : ''}`, style: !this.isPagesVariant
|
|
23848
24131
|
? { '--active': `var(--post-tab-item-${this.name}, 0)` }
|
|
23849
|
-
: undefined }, hAsync("slot", { key: '
|
|
24132
|
+
: undefined }, hAsync("slot", { key: '7350214640bf0ab1afcd3584c4ccd48e22da1612' })));
|
|
23850
24133
|
}
|
|
23851
24134
|
get host() { return getElement(this); }
|
|
23852
24135
|
static get cmpMeta() { return {
|
|
@@ -23892,7 +24175,7 @@ class PostTabPanel {
|
|
|
23892
24175
|
this.panelId = `panel-${this.host.id || nanoid(6)}`;
|
|
23893
24176
|
}
|
|
23894
24177
|
render() {
|
|
23895
|
-
return (hAsync(Host, { key: '
|
|
24178
|
+
return (hAsync(Host, { key: 'a1aa48f24e91af0562683115218d19582309ef6e', "data-version": version$1, id: this.panelId, role: "tabpanel", slot: "panels", style: { display: `var(--post-tab-panel-${this.for}, none)` } }, hAsync("slot", { key: '17e0e571302ded052f9586e0754203b772a3fbec' })));
|
|
23896
24179
|
}
|
|
23897
24180
|
get host() { return getElement(this); }
|
|
23898
24181
|
static get style() { return postTabPanelCss(); }
|
|
@@ -24341,10 +24624,10 @@ class PostTabs {
|
|
|
24341
24624
|
}
|
|
24342
24625
|
: undefined;
|
|
24343
24626
|
const style = !this.isPagesVariant ? tabStyle : undefined;
|
|
24344
|
-
return (hAsync(Host, { key: '
|
|
24627
|
+
return (hAsync(Host, { key: 'ad4f55f50dbd83e1383944984f79d195d1c531e7', "data-version": version$1, style: style }, hAsync("div", { key: '48456590c7b6cead75b689e3b2b463c641600cdd', class: "tabs-wrapper", part: "post-tabs" }, hAsync("button", { key: '6337fd1ba75f53f09bd80ff0873b129cb2387498', ref: el => (this.leftScrollButton = el), class: "scroll-btn scroll-btn-left", type: "button", "aria-label": this.textPrevTabItems, tabindex: this.showLeftScrollButton ? 0 : -1, hidden: !this.showLeftScrollButton, onClick: () => this.scrollTabs('prev') }, hAsync("post-icon", { key: '97897bb7329a070f40e6ecbacff394b10f660aec', name: "chevronleft" })), hAsync(TabsContainer, { key: 'edc801dcadf41c85ed9aafdd2dda11ff4c87756b', ref: el => (this.tabsContainer = el), class: "tabs", role: this.isPagesVariant ? undefined : 'tablist', "aria-label": this.isPagesVariant ? this.label : undefined }, hAsync("slot", { key: '908aaf787f545de1738236412dc4094cabe87155', onSlotchange: () => {
|
|
24345
24628
|
this.moveMisplacedTabs();
|
|
24346
24629
|
this.enableTabs();
|
|
24347
|
-
} })), hAsync("button", { key: '
|
|
24630
|
+
} })), hAsync("button", { key: 'ed12a602b399e1a8dcd190fca7828fcb2683b925', ref: el => (this.rightScrollButton = el), class: "scroll-btn scroll-btn-right", type: "button", "aria-label": this.textNextTabItems, tabindex: this.showRightScrollButton ? 0 : -1, hidden: !this.showRightScrollButton, onClick: () => this.scrollTabs('next') }, hAsync("post-icon", { key: '0ecd4444455da92f371b300299ff2f1a53f804a2', name: "chevronright" }))), !this.isPagesVariant && (hAsync("div", { key: '2252fefeca18a6135796852e511c779d413aa2c5', class: "tab-content", part: "post-tabs-content" }, hAsync("slot", { key: 'dc553352c6fa9ea4c5780108bc9ed8e3e9b29b24', name: "panels", onSlotchange: () => this.moveMisplacedPanels() })))));
|
|
24348
24631
|
}
|
|
24349
24632
|
get host() { return getElement(this); }
|
|
24350
24633
|
static get watchers() { return {
|
|
@@ -24411,7 +24694,7 @@ class PostTogglebutton {
|
|
|
24411
24694
|
});
|
|
24412
24695
|
}
|
|
24413
24696
|
render() {
|
|
24414
|
-
return (hAsync(Host, { key: '
|
|
24697
|
+
return (hAsync(Host, { key: 'ae46e9fcd82766abcf76c4b37d0341cfd29f2f4f', "data-version": version$1, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, hAsync("slot", { key: '9c71c065225f0f5c68e76fa2cec6d75bdf29fed0' })));
|
|
24415
24698
|
}
|
|
24416
24699
|
get host() { return getElement(this); }
|
|
24417
24700
|
static get style() { return postTogglebuttonCss(); }
|
|
@@ -24495,7 +24778,7 @@ class PostTooltip {
|
|
|
24495
24778
|
}
|
|
24496
24779
|
render() {
|
|
24497
24780
|
const popoverClass = `${this.arrow ? 'has-arrow' : ''}`;
|
|
24498
|
-
return (hAsync(Host, { key: '
|
|
24781
|
+
return (hAsync(Host, { key: '1510f7ec123b7bfaa39cc348a6b496a9051163ea', "data-version": version$1 }, hAsync("post-popovercontainer", { key: '004baf52684bfed3b8af77f773c9487d3b776fa9', safeSpace: "trapezoid", class: popoverClass, role: "tooltip", arrow: this.arrow, placement: this.placement, autoHide: true, onPostBeforeToggle: e => this.handleBeforeToggle(e), ref: (el) => (this.popoverRef = el) }, hAsync("slot", { key: '182f95928a4f70c747073e4585c18cab5f0eb277' }))));
|
|
24499
24782
|
}
|
|
24500
24783
|
get host() { return getElement(this); }
|
|
24501
24784
|
static get style() { return postTooltipCss(); }
|
|
@@ -24690,7 +24973,7 @@ class PostTooltipTrigger {
|
|
|
24690
24973
|
this.tooltip?.hide();
|
|
24691
24974
|
}
|
|
24692
24975
|
render() {
|
|
24693
|
-
return (hAsync(Host, { key: '
|
|
24976
|
+
return (hAsync(Host, { key: '692a3cda2890f30f0df80366a9610ec70b0872ba', "data-version": version$1 }, hAsync("slot", { key: '0a9df94a1d52ec318ecbec6740b7d3acc915b130', onSlotchange: () => this.handleSlotChange() })));
|
|
24694
24977
|
}
|
|
24695
24978
|
get host() { return getElement(this); }
|
|
24696
24979
|
static get style() { return postTooltipTriggerCss(); }
|