@swisspost/design-system-components 10.3.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-BchTP-YG.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-BDBlw92l.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-IgKJFMA_.js → one-of-LGG0uEIi.js} +1 -1
- package/dist/cjs/{package-uiAqYqcY.js → package-DdU-rENe.js} +1 -1
- package/dist/cjs/{pattern-BCnL1qK3.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 -66
- package/dist/cjs/post-closebutton_14.cjs.entry.js +413 -218
- 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 +38 -15
- package/dist/cjs/post-footer.cjs.entry.js +13 -10
- 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 +8 -7
- package/dist/cjs/post-pagination.cjs.entry.js +7 -7
- 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 +19 -10
- 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 +9 -9
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +7 -7
- package/dist/cjs/post-tooltip.cjs.entry.js +7 -7
- package/dist/cjs/{required-BXiinq5t.js → required-bJzxBV-V.js} +1 -1
- package/dist/cjs/{type-l3fnHs_E.js → type-CGPnqGY1.js} +1 -1
- package/dist/cjs/{url-Dmn5zP5b.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 -61
- package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
- 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.css +7 -3
- package/dist/collection/components/post-date-picker/post-date-picker.js +31 -8
- package/dist/collection/components/post-footer/post-footer.css +1 -1
- package/dist/collection/components/post-footer/post-footer.js +6 -3
- package/dist/collection/components/post-header/post-header.css +1 -1
- 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.css +1 -1
- package/dist/collection/components/post-language-menu/post-language-menu.js +19 -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.css +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +1 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +1 -1
- package/dist/collection/components/post-menu/post-menu.css +1 -1
- package/dist/collection/components/post-menu/post-menu.js +23 -8
- package/dist/collection/components/post-menu-item/post-menu-item.css +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
- package/dist/collection/components/post-number-input/post-number-input.css +1 -1
- package/dist/collection/components/post-number-input/post-number-input.js +2 -2
- package/dist/collection/components/post-pagination/post-pagination.css +1 -1
- 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 +11 -2
- 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.css +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.css +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-language-menu.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-item2.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-pagination.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-CveORA5D.js → components/react/p-BdLRXQqY.js} +1 -1
- package/dist/components/react/{p-CRQE_mDo.js → p-C8vlYfD-.js} +1 -1
- package/dist/components/react/{p-CWFoQ-cx.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-BUtt9Sij.js → p-CoCua20S.js} +1 -1
- package/dist/components/react/p-CuVhOs8F.js +1 -0
- package/dist/components/react/{p-DmN8JwRm.js → p-D3rq_-Qk.js} +1 -1
- package/dist/components/react/{p-Bj1LK-jg.js → p-DD-Sl3Ji.js} +1 -1
- package/dist/components/react/{p-Dr0r5iBG.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-DRQB0V8-.js → p-PYoaz_Xl.js} +1 -1
- package/dist/components/react/p-SBBBSmJM.js +1 -0
- 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 +78 -17
- package/dist/esm/breakpoints-I1j7a0bW.js +45 -0
- package/dist/esm/{create-validator-decorator-BzX_jW0Z.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-BAtz9iuv.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-D5QwMlvb.js → one-of-Mx4vYjem.js} +1 -1
- package/dist/esm/{package-D9jUbrFT.js → package-Ny5VnydI.js} +1 -1
- package/dist/esm/{pattern-CrL4IkfA.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 -66
- package/dist/esm/post-closebutton_14.entry.js +412 -217
- 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 +38 -15
- package/dist/esm/post-footer.entry.js +13 -10
- 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 +7 -6
- package/dist/esm/post-pagination.entry.js +7 -7
- 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 +19 -10
- 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 +9 -9
- package/dist/esm/post-tooltip-trigger.entry.js +7 -7
- package/dist/esm/post-tooltip.entry.js +7 -7
- package/dist/esm/{required-BX_AhSO0.js → required-CxvSCYJj.js} +1 -1
- package/dist/esm/{type-BYIjiHKr.js → type-CYB7_Yi8.js} +1 -1
- package/dist/esm/{url-CZMYpchD.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-15f0cdf5.entry.js → p-2379e498.entry.js} +1 -1
- package/dist/post-components/p-29e6c2a4.entry.js +1 -0
- package/dist/post-components/{p-b3a9309d.entry.js → p-2cb843f4.entry.js} +1 -1
- package/dist/post-components/{p-1ff7ddef.entry.js → p-2ee255c1.entry.js} +1 -1
- package/dist/post-components/{p-6258e611.entry.js → p-3a75186d.entry.js} +1 -1
- package/dist/post-components/{p-3ed757a7.entry.js → p-44718c1a.entry.js} +1 -1
- package/dist/post-components/p-4e2bb082.entry.js +1 -0
- 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-33649303.entry.js → p-a9223467.entry.js} +1 -1
- package/dist/post-components/p-b6e231a8.entry.js +1 -0
- package/dist/post-components/{p-ed64b31f.entry.js → p-b856263a.entry.js} +1 -1
- package/dist/post-components/p-bR8vy6-s.js +1 -0
- package/dist/post-components/{p-32c266ba.entry.js → p-c7a39444.entry.js} +1 -1
- package/dist/post-components/p-cGcyMrvx.js +1 -0
- package/dist/post-components/{p-dd4a07ca.entry.js → p-cde00944.entry.js} +1 -1
- package/dist/post-components/p-cf7493ab.entry.js +1 -0
- package/dist/post-components/{p-143014ef.entry.js → p-e463e7ac.entry.js} +1 -1
- package/dist/post-components/p-e7f97f6d.entry.js +1 -0
- package/dist/post-components/p-e8268a8d.entry.js +1 -0
- package/dist/post-components/{p-4df63f7d.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-675f62bc.entry.js → p-ffec1880.entry.js} +1 -1
- package/dist/post-components/{p-C0Z-E_YL.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-date-picker/post-date-picker.d.ts +6 -1
- package/dist/types/components/post-language-menu/post-language-menu.d.ts +2 -0
- 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/post-side-navigation/post-side-navigation.d.ts +4 -0
- package/dist/types/components.d.ts +36 -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 +949 -629
- package/hydrate/index.mjs +949 -629
- package/package.json +7 -6
- package/dist/components/react/p-B-mnuUce.js +0 -1
- package/dist/components/react/p-B4APzGUz.js +0 -1
- package/dist/components/react/p-BXqGI600.js +0 -1
- package/dist/components/react/p-BYoBZKC_.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-C4D-C0Qi.js +0 -1
- package/dist/components/react/p-CX2E_IXB.js +0 -1
- package/dist/components/react/p-D9jUbrFT.js +0 -1
- package/dist/components/react/p-rEfV4v4a.js +0 -1
- package/dist/post-components/p-02585fe8.entry.js +0 -1
- package/dist/post-components/p-07d50011.entry.js +0 -1
- package/dist/post-components/p-0b762d2b.entry.js +0 -1
- package/dist/post-components/p-0sQVSOjO.js +0 -1
- package/dist/post-components/p-6a146ec8.entry.js +0 -1
- package/dist/post-components/p-6ed71ab9.entry.js +0 -1
- package/dist/post-components/p-7492d34d.entry.js +0 -1
- package/dist/post-components/p-8ace2b57.entry.js +0 -1
- package/dist/post-components/p-8f52881d.entry.js +0 -1
- package/dist/post-components/p-950ba0a1.entry.js +0 -1
- package/dist/post-components/p-BAtz9iuv.js +0 -2
- package/dist/post-components/p-BQ3HlJPr.js +0 -1
- package/dist/post-components/p-BzmELz-M.js +0 -1
- package/dist/post-components/p-D9jUbrFT.js +0 -1
- package/dist/post-components/p-DsgIP6Dq.js +0 -1
- package/dist/post-components/p-a5ae59ba.entry.js +0 -1
- package/dist/post-components/p-ac7120cb.entry.js +0 -1
- package/dist/post-components/p-b079f36d.entry.js +0 -1
- package/dist/post-components/p-c72c3bff.entry.js +0 -1
- package/dist/post-components/p-d99f4d9d.entry.js +0 -1
- package/dist/post-components/p-da7178e5.entry.js +0 -1
- package/dist/post-components/p-f1598c80.entry.js +0 -1
- package/dist/post-components/p-fOjbWhb_.js +0 -1
- package/dist/post-components/p-fed3e568.entry.js +0 -1
- package/dist/post-components/p-rEfV4v4a.js +0 -1
|
@@ -12,10 +12,11 @@ import { Build, h, Host, } from "@stencil/core";
|
|
|
12
12
|
import { OneOf, Type } from "../../utils/index";
|
|
13
13
|
import { version } from "../../../../package";
|
|
14
14
|
import { PLACEMENT_TYPES } from "../../types/index";
|
|
15
|
-
import { arrow, autoUpdate,
|
|
15
|
+
import { arrow, autoUpdate, flip, hide, inline, limitShift, offset, shift, size, } from "@floating-ui/dom";
|
|
16
16
|
// Polyfill for popovers, can be removed when https://caniuse.com/?search=popover is green
|
|
17
17
|
import { popIn } from "../../animations/pop-in";
|
|
18
18
|
import { apply, isSupported } from "@oddbird/popover-polyfill/fn";
|
|
19
|
+
import { computePositionWithSafeArea } from "../../utils/floating-ui";
|
|
19
20
|
const ANIMATIONS = {
|
|
20
21
|
'pop-in': popIn,
|
|
21
22
|
};
|
|
@@ -78,7 +79,7 @@ export class PostPopovercontainer {
|
|
|
78
79
|
if (this.toggleTimeoutId || !target)
|
|
79
80
|
return;
|
|
80
81
|
this.eventTarget = target;
|
|
81
|
-
this.
|
|
82
|
+
this.updatePosition();
|
|
82
83
|
this.host.showPopover();
|
|
83
84
|
}
|
|
84
85
|
/**
|
|
@@ -104,7 +105,7 @@ export class PostPopovercontainer {
|
|
|
104
105
|
this.eventTarget = target;
|
|
105
106
|
// Prevent instant double toggle
|
|
106
107
|
if (!this.toggleTimeoutId) {
|
|
107
|
-
this.
|
|
108
|
+
this.updatePosition();
|
|
108
109
|
this.host.togglePopover(force);
|
|
109
110
|
this.toggleTimeoutId = null;
|
|
110
111
|
}
|
|
@@ -216,17 +217,14 @@ export class PostPopovercontainer {
|
|
|
216
217
|
startAutoupdates() {
|
|
217
218
|
if (!this.eventTarget || !this.host)
|
|
218
219
|
return;
|
|
219
|
-
this.clearAutoUpdate = autoUpdate(this.eventTarget, this.host, this.
|
|
220
|
+
this.clearAutoUpdate = autoUpdate(this.eventTarget, this.host, this.updatePosition.bind(this));
|
|
220
221
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
}
|
|
228
|
-
async calculatePosition() {
|
|
229
|
-
const { x, y, middlewareData, placement } = await this.computeMainPosition();
|
|
222
|
+
async updatePosition() {
|
|
223
|
+
const { x, y, middlewareData, placement } = await this.calculatePosition();
|
|
224
|
+
// Hide the popover if the target is outside the viewport
|
|
225
|
+
if (middlewareData.hide?.referenceHidden) {
|
|
226
|
+
this.host.hidePopover();
|
|
227
|
+
}
|
|
230
228
|
const currentPlacement = placement.split('-')[0];
|
|
231
229
|
this.dynamicPlacement = currentPlacement;
|
|
232
230
|
// Position popover
|
|
@@ -251,13 +249,15 @@ export class PostPopovercontainer {
|
|
|
251
249
|
await this.updateSafeSpaceBoundaries(currentPlacement);
|
|
252
250
|
}
|
|
253
251
|
}
|
|
254
|
-
async
|
|
252
|
+
async calculatePosition() {
|
|
255
253
|
const gap = this.edgeGap;
|
|
256
254
|
const isAligned = (this.placement || 'top').includes('-');
|
|
257
|
-
const flipMiddleware =
|
|
258
|
-
|
|
259
|
-
crossAxis: false,
|
|
260
|
-
|
|
255
|
+
const flipMiddleware = [
|
|
256
|
+
// Flip the popover if the target moves outside the viewport
|
|
257
|
+
flip({ elementContext: 'reference', crossAxis: false }),
|
|
258
|
+
// Flip the popover if the popover itself moves outside the viewport
|
|
259
|
+
flip({ elementContext: 'floating', crossAxis: false }),
|
|
260
|
+
];
|
|
261
261
|
const shiftMiddleware = shift({
|
|
262
262
|
padding: gap,
|
|
263
263
|
limiter: limitShift({
|
|
@@ -269,7 +269,7 @@ export class PostPopovercontainer {
|
|
|
269
269
|
inline(),
|
|
270
270
|
// Per floating-ui docs: for aligned placements (e.g. bottom-end),
|
|
271
271
|
// flip should come before shift. For non-aligned, shift before flip.
|
|
272
|
-
...(isAligned ? [flipMiddleware, shiftMiddleware] : [shiftMiddleware, flipMiddleware]),
|
|
272
|
+
...(isAligned ? [...flipMiddleware, shiftMiddleware] : [shiftMiddleware, ...flipMiddleware]),
|
|
273
273
|
size({
|
|
274
274
|
apply({ availableWidth, elements }) {
|
|
275
275
|
Object.assign(elements.floating.style, {
|
|
@@ -281,7 +281,12 @@ export class PostPopovercontainer {
|
|
|
281
281
|
if (this.arrow) {
|
|
282
282
|
middleware.push(arrow({ element: this.arrowRef, padding: gap }));
|
|
283
283
|
}
|
|
284
|
-
|
|
284
|
+
// Automatically hide the popover if the target moves outside the scrollport.
|
|
285
|
+
if (this.autoHide) {
|
|
286
|
+
// Per floating-ui docs: hide should generally be placed at the end.
|
|
287
|
+
middleware.push(hide({ strategy: 'referenceHidden' }));
|
|
288
|
+
}
|
|
289
|
+
return computePositionWithSafeArea(this.eventTarget, this.host, {
|
|
285
290
|
placement: this.placement || 'top',
|
|
286
291
|
strategy: 'fixed',
|
|
287
292
|
middleware,
|
|
@@ -348,9 +353,9 @@ export class PostPopovercontainer {
|
|
|
348
353
|
}
|
|
349
354
|
}
|
|
350
355
|
render() {
|
|
351
|
-
return (h(Host, { key: '
|
|
356
|
+
return (h(Host, { key: 'a6f41ad3ef982f9e9ec0d6450837d1cfdca73d16', "data-version": version, popover: "auto" }, h("div", { key: '40afab436d5550fda44c8995139080161eab5b09', part: "post-popovercontainer-content", class: "popover-content" }, this.arrow && (h("span", { key: '580bd8fcaecb89334aca05001137a4d7cccd254a', "dynamic-placement": this.dynamicPlacement, class: "arrow", ref: el => {
|
|
352
357
|
this.arrowRef = el;
|
|
353
|
-
} })), h("span", { key: '
|
|
358
|
+
} })), h("span", { key: '61a6e4e8026832afc188edd5a74535716db65945', part: "post-popovercontainer-border-mask" }), h("slot", { key: 'd79cb69a77dbba13ffa3c30e0393db4f3a669a12' }))));
|
|
354
359
|
}
|
|
355
360
|
static get is() { return "post-popovercontainer"; }
|
|
356
361
|
static get encapsulation() { return "shadow"; }
|
|
@@ -376,7 +381,7 @@ export class PostPopovercontainer {
|
|
|
376
381
|
"Placement": {
|
|
377
382
|
"location": "import",
|
|
378
383
|
"path": "@floating-ui/dom",
|
|
379
|
-
"id": "../../node_modules/.pnpm/@floating-ui+dom@1.
|
|
384
|
+
"id": "../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts::Placement",
|
|
380
385
|
"referenceLocation": "Placement"
|
|
381
386
|
}
|
|
382
387
|
}
|
|
@@ -470,6 +475,25 @@ export class PostPopovercontainer {
|
|
|
470
475
|
"setter": false,
|
|
471
476
|
"reflect": true,
|
|
472
477
|
"attribute": "safe-space"
|
|
478
|
+
},
|
|
479
|
+
"autoHide": {
|
|
480
|
+
"type": "boolean",
|
|
481
|
+
"mutable": false,
|
|
482
|
+
"complexType": {
|
|
483
|
+
"original": "boolean",
|
|
484
|
+
"resolved": "boolean",
|
|
485
|
+
"references": {}
|
|
486
|
+
},
|
|
487
|
+
"required": false,
|
|
488
|
+
"optional": true,
|
|
489
|
+
"docs": {
|
|
490
|
+
"tags": [],
|
|
491
|
+
"text": "Whether to automatically hide the popover when the target moves outside the scrollport.\n\nIf the `post-header` can cover the target, the popover will also be hidden as soon as the\ntarget scrolls behind it."
|
|
492
|
+
},
|
|
493
|
+
"getter": false,
|
|
494
|
+
"setter": false,
|
|
495
|
+
"reflect": false,
|
|
496
|
+
"attribute": "auto-hide"
|
|
473
497
|
}
|
|
474
498
|
};
|
|
475
499
|
}
|
|
@@ -43,7 +43,7 @@ export class PostProgressbar {
|
|
|
43
43
|
const max = this.getEffectiveMax();
|
|
44
44
|
const value = this.getEffectiveValue(min, max);
|
|
45
45
|
const percentage = ((value - min) / (max - min)) * 100;
|
|
46
|
-
return (h(Host, { key: '
|
|
46
|
+
return (h(Host, { key: 'c08b9b976c5cb34018e48c4dafe6b87207710ba5', role: "progressbar", "aria-valuenow": value, "aria-valuemin": min, "aria-valuemax": max }, h("div", { key: '485eb6657d14ad5472bfbe822b1cd0eb50cd0129', class: "progress-value", style: { '--post-progressbar-value': `${percentage}%` } })));
|
|
47
47
|
}
|
|
48
48
|
static get is() { return "post-progressbar"; }
|
|
49
49
|
static get encapsulation() { return "shadow"; }
|
|
@@ -83,7 +83,7 @@ export class PostRating {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
render() {
|
|
86
|
-
return (h(Host, { key: '
|
|
86
|
+
return (h(Host, { key: '0cf576670f16d4b8f88b714af12ded14aa1372b2', "data-version": version }, h("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) => (h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
|
|
87
87
|
'star': true,
|
|
88
88
|
'before-hover': i < this.hoveredIndex,
|
|
89
89
|
'active': i < Math.round(this.currentRating),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:host{
|
|
1
|
+
: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)}
|
|
@@ -47,6 +47,15 @@ export class PostSideNavigation {
|
|
|
47
47
|
collapsible.toggle(false);
|
|
48
48
|
this.collapsibleTrigger?.querySelector('button')?.focus();
|
|
49
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* Closes the dialog when a navigation link is clicked.
|
|
52
|
+
*/
|
|
53
|
+
this.handleDialogClick = (e) => {
|
|
54
|
+
const path = e.composedPath();
|
|
55
|
+
if (path.some(el => el instanceof HTMLAnchorElement)) {
|
|
56
|
+
this.dialog.close();
|
|
57
|
+
}
|
|
58
|
+
};
|
|
50
59
|
}
|
|
51
60
|
connectedCallback() {
|
|
52
61
|
globalThis.addEventListener('postBreakpoint:device', this.breakpointChange);
|
|
@@ -115,12 +124,12 @@ export class PostSideNavigation {
|
|
|
115
124
|
* Render modal navigation (mobile/tablet).
|
|
116
125
|
*/
|
|
117
126
|
renderDialog() {
|
|
118
|
-
return (h("dialog", { onClose: () => {
|
|
127
|
+
return (h("dialog", { onClick: this.handleDialogClick, onClose: () => {
|
|
119
128
|
this.postToggle.emit(false);
|
|
120
129
|
} }, h("slot", null), h("post-closebutton", { onClick: () => this.hide() }, this.textClose)));
|
|
121
130
|
}
|
|
122
131
|
render() {
|
|
123
|
-
return (h(Host, { key: '
|
|
132
|
+
return (h(Host, { key: 'd99b96af69d80dc97b44fdc61410768617ca934c', "data-version": version }, this.device === 'desktop' ? this.renderNav() : this.renderDialog()));
|
|
124
133
|
}
|
|
125
134
|
static get is() { return "post-side-navigation"; }
|
|
126
135
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/post-side-navigation-trigger/post-side-navigation-trigger.js
CHANGED
|
@@ -85,7 +85,7 @@ export class PostSideNavigationTrigger {
|
|
|
85
85
|
await this.sideNavigation?.toggle();
|
|
86
86
|
}
|
|
87
87
|
render() {
|
|
88
|
-
return (h(Host, { key: '
|
|
88
|
+
return (h(Host, { key: 'e82eb54b68db812c3753a7d027d983fa81f01255', "data-version": version }, h("slot", { key: 'a1ca8877d1a9e0faa653a3f1dec3fd1655b4bcb7' })));
|
|
89
89
|
}
|
|
90
90
|
static get is() { return "post-side-navigation-trigger"; }
|
|
91
91
|
static get encapsulation() { return "shadow"; }
|
|
@@ -104,7 +104,7 @@ export class PostStepper {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
render() {
|
|
107
|
-
return (h(Host, { key: '
|
|
107
|
+
return (h(Host, { key: '917393b196552a6994cfc230bf93f2cd0a5e77e7', "data-version": version }, h("ol", { key: 'ab15bc7eaa44c5a8246c2fcc2d1c3c8e1d8ab4a6' }, h("slot", { key: 'e61ab0edfce06fe1ef7345a6472834a3af38ce9e', onSlotchange: () => this.updateSteps() })), h("div", { key: 'be0556840878de5adb007ef33693ef619d8a19fa', class: "active-step", "aria-hidden": "true" }, h("span", { key: '8a1663a9360d931198f52c699c4e855a1f77bbc6', class: "active-step-label" }, this.mobileActiveStepLabel), h("span", { key: '31f804be237598a5d8b7cbd1f418af1758e42fd6', innerHTML: this.mobileActiveStepName }))));
|
|
108
108
|
}
|
|
109
109
|
static get is() { return "post-stepper"; }
|
|
110
110
|
static get encapsulation() { return "shadow"; }
|
|
@@ -2,7 +2,7 @@ import { version } from "../../../../package";
|
|
|
2
2
|
import { h, Host } from "@stencil/core";
|
|
3
3
|
export class PostStepperItem {
|
|
4
4
|
render() {
|
|
5
|
-
return (h(Host, { key: '
|
|
5
|
+
return (h(Host, { key: '486be1addaa512c39628cfa2fab567d5dfb4b517', "data-version": version, role: "listitem" }, h("span", { key: 'a89be43022ff5b9d9cbcad1e4f934fdcef8919c3', class: "stepper-item-content" }, h("span", { key: '60e217eab48532d7985b57159251f84217f1b362', class: "step-hidden-label visually-hidden" }), h("span", { key: 'b847451659b699693d168dd8164c878281fb7793', class: "label" }, h("slot", { key: '823229cba3855d597f08ebc6fc4e5a5059ef7f98' })))));
|
|
6
6
|
}
|
|
7
7
|
static get is() { return "post-stepper-item"; }
|
|
8
8
|
static get encapsulation() { return "shadow"; }
|
|
@@ -44,9 +44,9 @@ export class PostTabItem {
|
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
46
|
const isSSR = Build.isServer;
|
|
47
|
-
return (h(Host, { key: '
|
|
47
|
+
return (h(Host, { key: '7a12be83f1b2bd428a4fcba01b4696a253d58daf', id: this.tabId, role: this.isPagesVariant ? undefined : 'tab', "data-version": version, "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'}${isSSR && !this.isPagesVariant ? ' ssr' : ''}`, style: isSSR && !this.isPagesVariant
|
|
48
48
|
? { '--active': `var(--post-tab-item-${this.name}, 0)` }
|
|
49
|
-
: undefined }, h("slot", { key: '
|
|
49
|
+
: undefined }, h("slot", { key: '7350214640bf0ab1afcd3584c4ccd48e22da1612' })));
|
|
50
50
|
}
|
|
51
51
|
static get is() { return "post-tab-item"; }
|
|
52
52
|
static get encapsulation() { return "shadow"; }
|
|
@@ -21,7 +21,7 @@ export class PostTabPanel {
|
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
23
|
const isSSR = Build.isServer;
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: 'a1aa48f24e91af0562683115218d19582309ef6e', "data-version": version, id: this.panelId, role: "tabpanel", slot: "panels", style: isSSR ? { display: `var(--post-tab-panel-${this.for}, none)` } : undefined }, h("slot", { key: '17e0e571302ded052f9586e0754203b772a3fbec' })));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "post-tab-panel"; }
|
|
27
27
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:host{display:block}:host .tabs-wrapper{position:relative;display:flex;align-items:center}:host .tabs-wrapper button.scroll-btn{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;display:flex;align-items:center;justify-content:center;transition:background-color 100ms,border-color 100ms,color 100ms;cursor:pointer}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn{background-color:ButtonFace !important}:host .tabs-wrapper button.scroll-btn:hover{background-color:Highlight !important}}:host .tabs-wrapper button.scroll-btn post-icon{color:currentColor}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn post-icon{color:Highlight}}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:hover post-icon{color:canvas}}:host .tabs-wrapper button.scroll-btn[hidden]{display:none}:host .tabs-wrapper button.scroll-btn{outline-offset:var(--post-device-spacing-padding-
|
|
1
|
+
:host{display:block}:host .tabs-wrapper{position:relative;display:flex;align-items:center}:host .tabs-wrapper button.scroll-btn{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;display:flex;align-items:center;justify-content:center;transition:background-color 100ms,border-color 100ms,color 100ms;cursor:pointer}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn{background-color:ButtonFace !important}:host .tabs-wrapper button.scroll-btn:hover{background-color:Highlight !important}}:host .tabs-wrapper button.scroll-btn post-icon{color:currentColor}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn post-icon{color:Highlight}}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:hover post-icon{color:canvas}}:host .tabs-wrapper button.scroll-btn[hidden]{display:none}:host .tabs-wrapper button.scroll-btn{outline-offset:var(--post-device-spacing-padding-44) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host .tabs-wrapper button.scroll-btn: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 .tabs-wrapper button.scroll-btn:is(:focus-visible,:has(:focus-visible),.pretend-focus){transition:none}:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:has(:focus-visible),.pretend-focus):hover{color:HighlightText;border-color:HighlightText}}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .tabs-wrapper button.scroll-btn: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 .tabs-wrapper button.scroll-btn:is(:focus-visible,:focus-within,.pretend-focus){transition:none}:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:focus-within,.pretend-focus):hover{color:HighlightText;border-color:HighlightText}}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .tabs-wrapper .tabs{overflow-x:hidden;background-color:rgba(0,0,0,0) !important;display:flex;flex-wrap:nowrap;align-items:end;overscroll-behavior-x:contain;white-space:nowrap;margin-block:0;padding-inline-start:0;list-style:none}:host(.page-tabs){overflow:visible !important}:host(.page-tabs) .tabs-wrapper{margin-inline:calc(-1*(var(--post-container-offset)))}:host(.page-tabs) .tabs-wrapper button.scroll-btn{color:var(--post-scheme-color-interactive-primary-enabled-fg5);background-color:var(--post-scheme-color-interactive-primary-enabled-bg5);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke);position:absolute;z-index:2;box-shadow:var(--post-device-elevation-200);border-radius:var(--post-device-border-radius-2)}:host(.page-tabs) .tabs-wrapper button.scroll-btn:hover{border-color:var(--post-scheme-color-interactive-primary-hover-stroke) !important;color:var(--post-scheme-color-interactive-primary-hover-fg4);background-color:var(--post-scheme-color-interactive-primary-hover-bg8)}:host(.page-tabs) .tabs-wrapper button.scroll-btn.scroll-btn-left{inset-inline-start:0;border-inline-start:none;border-radius:0 var(--post-device-border-radius-2) var(--post-device-border-radius-2) 0}:host(.page-tabs) .tabs-wrapper button.scroll-btn.scroll-btn-right{inset-inline-end:0;border-inline-end:none;border-radius:var(--post-device-border-radius-2) 0 0 var(--post-device-border-radius-2)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(.page-tabs) .tabs-wrapper button.scroll-btn.scroll-btn{background-color:Highlight;color:HighlightText}}:host(.page-tabs) .tabs-wrapper::after{content:"";position:absolute;inset-block-end:0;inset-inline-start:0;width:100%;height:var(--post-device-border-width-default);background-color:var(--post-palette-color-nested-tabs-page-stroke)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(.page-tabs) .tabs-wrapper::after{background-color:LinkText}}:host(.page-tabs) .tabs-wrapper .tabs{padding-inline:calc(var(--post-container-offset));gap:var(--post-device-spacing-gap-inline-5);scrollbar-width:none}:host(.page-tabs) .tabs-wrapper .tabs::-webkit-scrollbar{display:none}:host(.page-tabs:not([size=small])) button.scroll-btn{top:var(--post-device-spacing-padding-36)}:host(.page-tabs[size=small]) button.scroll-btn{top:var(--post-device-spacing-padding-36)}:host(.content-tabs) .tabs-wrapper button.scroll-btn{flex-shrink:0;color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg)}:host(.content-tabs) .tabs-wrapper button.scroll-btn:hover{border-color:var(--post-scheme-color-interactive-primary-hover-stroke) !important;color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(.content-tabs) .tabs-wrapper button.scroll-btn:hover{color:HighlightText}}:host(post-tabs:not([size=small])) button.scroll-btn{height:var(--post-device-sizing-interactive-button-height-10);width:var(--post-device-sizing-interactive-button-width-1);border-radius:var(--post-device-border-radius-2)}:host(post-tabs:not([size=small])) button.scroll-btn post-icon{height:var(--post-device-sizing-interactive-icon-size5);width:var(--post-device-sizing-interactive-icon-size5)}:host(.page-tabs:not([size=small])) button.scroll-btn-left{padding-inline:var(--post-device-spacing-padding-39) var(--post-device-spacing-padding-40)}:host(.page-tabs:not([size=small])) button.scroll-btn-right{padding-inline:var(--post-device-spacing-padding-40) var(--post-device-spacing-padding-39)}:host([size=small]) button.scroll-btn{height:var(--post-device-sizing-interactive-button-size-1);width:var(--post-device-sizing-interactive-button-size-1);border-radius:var(--post-device-border-radius-2)}:host([size=small]) button.scroll-btn post-icon{height:var(--post-device-sizing-interactive-icon-size4);width:var(--post-device-sizing-interactive-icon-size4)}:host(.page-tabs[size=small]) button.scroll-btn-left{padding-inline:var(--post-device-spacing-padding-42) var(--post-device-spacing-padding-43)}:host(.page-tabs[size=small]) button.scroll-btn-right{padding-inline:var(--post-device-spacing-padding-43) var(--post-device-spacing-padding-42)}
|
|
@@ -427,10 +427,10 @@ export class PostTabs {
|
|
|
427
427
|
}
|
|
428
428
|
: undefined;
|
|
429
429
|
const style = isSSR && !this.isPagesVariant ? tabStyle : undefined;
|
|
430
|
-
return (h(Host, { key: '
|
|
430
|
+
return (h(Host, { key: 'ad4f55f50dbd83e1383944984f79d195d1c531e7', "data-version": version, style: style }, h("div", { key: '48456590c7b6cead75b689e3b2b463c641600cdd', class: "tabs-wrapper", part: "post-tabs" }, h("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') }, h("post-icon", { key: '97897bb7329a070f40e6ecbacff394b10f660aec', name: "chevronleft" })), h(TabsContainer, { key: 'edc801dcadf41c85ed9aafdd2dda11ff4c87756b', ref: el => (this.tabsContainer = el), class: "tabs", role: this.isPagesVariant ? undefined : 'tablist', "aria-label": this.isPagesVariant ? this.label : undefined }, h("slot", { key: '908aaf787f545de1738236412dc4094cabe87155', onSlotchange: () => {
|
|
431
431
|
this.moveMisplacedTabs();
|
|
432
432
|
this.enableTabs();
|
|
433
|
-
} })), h("button", { key: '
|
|
433
|
+
} })), h("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') }, h("post-icon", { key: '0ecd4444455da92f371b300299ff2f1a53f804a2', name: "chevronright" }))), !this.isPagesVariant && (h("div", { key: '2252fefeca18a6135796852e511c779d413aa2c5', class: "tab-content", part: "post-tabs-content" }, h("slot", { key: 'dc553352c6fa9ea4c5780108bc9ed8e3e9b29b24', name: "panels", onSlotchange: () => this.moveMisplacedPanels() })))));
|
|
434
434
|
}
|
|
435
435
|
static get is() { return "post-tabs"; }
|
|
436
436
|
static get encapsulation() { return "shadow"; }
|
|
@@ -29,7 +29,7 @@ export class PostTogglebutton {
|
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
|
-
return (h(Host, { key: '
|
|
32
|
+
return (h(Host, { key: 'ae46e9fcd82766abcf76c4b37d0341cfd29f2f4f', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: '9c71c065225f0f5c68e76fa2cec6d75bdf29fed0' })));
|
|
33
33
|
}
|
|
34
34
|
static get is() { return "post-togglebutton"; }
|
|
35
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:host{display:none}:host([open]){display:contents}post-popovercontainer[arrow]::after{position:absolute;content:"";inset:-13px;z-index:-1}post-popovercontainer{--post-current-bg: var(--post-scheme-color-surface-accent-bg);--post-current-fg: var(--post-scheme-color-surface-accent-fg);--post-popovercontainer-arrow-border-width: var(--post-device-border-width-alternative1);--post-popovercontainer-arrow-border-color: var(--post-scheme-color-surface-accent-fg)}post-popovercontainer::part(post-popovercontainer-border-mask){display:block;box-shadow:inset 0 0 0 var(--post-device-spacing-padding-14) var(--post-scheme-color-surface-accent-bg)}post-popovercontainer::part(post-popovercontainer-content){border:var(--post-device-border-width-alternative1) solid var(--post-scheme-color-surface-accent-fg);border-radius:var(--post-device-border-radius-1);padding:var(--post-device-spacing-padding-14) var(--post-device-spacing-padding-15);font-size:var(--post-device-font-size-9);max-width:var(--post-tooltip-max-width, 280px);
|
|
1
|
+
:host{display:none}:host([open]){display:contents}post-popovercontainer[arrow]::after{position:absolute;content:"";inset:-13px;z-index:-1}post-popovercontainer{--post-current-bg: var(--post-scheme-color-surface-accent-bg);--post-current-fg: var(--post-scheme-color-surface-accent-fg);--post-popovercontainer-arrow-border-width: var(--post-device-border-width-alternative1);--post-popovercontainer-arrow-border-color: var(--post-scheme-color-surface-accent-fg)}post-popovercontainer::part(post-popovercontainer-border-mask){display:block;box-shadow:inset 0 0 0 var(--post-device-spacing-padding-14) var(--post-scheme-color-surface-accent-bg)}post-popovercontainer::part(post-popovercontainer-content){border:var(--post-device-border-width-alternative1) solid var(--post-scheme-color-surface-accent-fg);border-radius:var(--post-device-border-radius-1);padding:var(--post-device-spacing-padding-14) var(--post-device-spacing-padding-15);font-size:var(--post-device-font-size-9);max-width:var(--post-tooltip-max-width, 280px);word-wrap:break-word;white-space:normal}
|
|
@@ -67,7 +67,7 @@ export class PostTooltip {
|
|
|
67
67
|
}
|
|
68
68
|
render() {
|
|
69
69
|
const popoverClass = `${this.arrow ? 'has-arrow' : ''}`;
|
|
70
|
-
return (h(Host, { key: '
|
|
70
|
+
return (h(Host, { key: '1510f7ec123b7bfaa39cc348a6b496a9051163ea', "data-version": version }, h("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) }, h("slot", { key: '182f95928a4f70c747073e4585c18cab5f0eb277' }))));
|
|
71
71
|
}
|
|
72
72
|
static get is() { return "post-tooltip"; }
|
|
73
73
|
static get encapsulation() { return "shadow"; }
|
|
@@ -93,7 +93,7 @@ export class PostTooltip {
|
|
|
93
93
|
"Placement": {
|
|
94
94
|
"location": "import",
|
|
95
95
|
"path": "@floating-ui/dom",
|
|
96
|
-
"id": "../../node_modules/.pnpm/@floating-ui+dom@1.
|
|
96
|
+
"id": "../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts::Placement",
|
|
97
97
|
"referenceLocation": "Placement"
|
|
98
98
|
}
|
|
99
99
|
}
|
|
@@ -180,7 +180,7 @@ export class PostTooltipTrigger {
|
|
|
180
180
|
this.tooltip?.hide();
|
|
181
181
|
}
|
|
182
182
|
render() {
|
|
183
|
-
return (h(Host, { key: '
|
|
183
|
+
return (h(Host, { key: '692a3cda2890f30f0df80366a9610ec70b0872ba', "data-version": version }, h("slot", { key: '0a9df94a1d52ec318ecbec6740b7d3acc915b130', onSlotchange: () => this.handleSlotChange() })));
|
|
184
184
|
}
|
|
185
185
|
static get is() { return "post-tooltip-trigger"; }
|
|
186
186
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { throttle } from "throttle-debounce";
|
|
2
1
|
class Breakpoint {
|
|
3
2
|
constructor() {
|
|
4
3
|
this.breakpoints = [
|
|
5
|
-
{ key: 'xl', device: 'desktop', minWidth: 1280 },
|
|
6
|
-
{ key: 'lg', device: 'desktop', minWidth: 1024 },
|
|
7
|
-
{ key: 'md', device: 'tablet', minWidth: 780 },
|
|
8
|
-
{ key: 'sm', device: 'tablet', minWidth: 600 },
|
|
9
|
-
{ key: 'xs', device: 'mobile', minWidth: 0 },
|
|
4
|
+
{ key: 'xl', device: 'desktop', minWidth: 1280, mediaQuery: '(min-width: 1280px)' },
|
|
5
|
+
{ key: 'lg', device: 'desktop', minWidth: 1024, mediaQuery: '(min-width: 1024px)' },
|
|
6
|
+
{ key: 'md', device: 'tablet', minWidth: 780, mediaQuery: '(min-width: 780px)' },
|
|
7
|
+
{ key: 'sm', device: 'tablet', minWidth: 600, mediaQuery: '(min-width: 600px)' },
|
|
8
|
+
{ key: 'xs', device: 'mobile', minWidth: 0, mediaQuery: '(min-width: 0px)' },
|
|
10
9
|
];
|
|
11
10
|
this.resizeObserver = globalThis.ResizeObserver
|
|
12
11
|
? new ResizeObserver(() => this.updateCurrentBreakpoint())
|
|
13
12
|
: null;
|
|
14
|
-
this.updateCurrentBreakpoint =
|
|
13
|
+
this.updateCurrentBreakpoint = (options = { emitEvents: true }) => {
|
|
15
14
|
const previousBreakpoint = this.currentBreakpoint;
|
|
16
15
|
const newBreakpoint = this.breakpoints.find(breakpoint => {
|
|
17
|
-
return
|
|
16
|
+
return globalThis.matchMedia
|
|
17
|
+
? globalThis.matchMedia(breakpoint.mediaQuery).matches
|
|
18
|
+
: breakpoint.minWidth <= document.documentElement.clientWidth;
|
|
18
19
|
});
|
|
19
20
|
if (!newBreakpoint)
|
|
20
21
|
return;
|
|
@@ -22,9 +23,10 @@ class Breakpoint {
|
|
|
22
23
|
if (!options.emitEvents)
|
|
23
24
|
return;
|
|
24
25
|
Object.keys(this.currentBreakpoint)
|
|
26
|
+
.filter(key => key !== 'mediaQuery')
|
|
25
27
|
.filter(key => !previousBreakpoint || this.currentBreakpoint[key] !== previousBreakpoint[key])
|
|
26
28
|
.forEach((key) => this.dispatchEvent(key));
|
|
27
|
-
}
|
|
29
|
+
};
|
|
28
30
|
if (this.resizeObserver) {
|
|
29
31
|
this.updateCurrentBreakpoint({ emitEvents: false });
|
|
30
32
|
this.resizeObserver.observe(document.body);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { findClosestAcrossShadow } from "./event-from";
|
|
2
|
+
const CLOSABLE_TARGETS = [
|
|
3
|
+
{
|
|
4
|
+
predicate: el => el.localName === 'post-banner',
|
|
5
|
+
close: el => void el.dismiss(),
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
predicate: el => el.localName === 'post-popover',
|
|
9
|
+
close: el => void el.hide(),
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
predicate: el => el.localName === 'post-popovercontainer',
|
|
13
|
+
close: el => void el.hide(),
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
predicate: el => el.localName === 'post-collapsible',
|
|
17
|
+
close: el => void el.toggle(false),
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
predicate: el => el.localName === 'post-accordion-item',
|
|
21
|
+
close: el => void el.toggle(false),
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
predicate: el => el.localName === 'dialog',
|
|
25
|
+
close: el => el.close(),
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
predicate: el => el.hasAttribute('popover'),
|
|
29
|
+
close: el => el.togglePopover(false),
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
export function findClosableTarget(start) {
|
|
33
|
+
const el = findClosestAcrossShadow(start, (el) => CLOSABLE_TARGETS.some(t => t.predicate(el)));
|
|
34
|
+
if (!el)
|
|
35
|
+
return null;
|
|
36
|
+
const match = CLOSABLE_TARGETS.find(t => t.predicate(el));
|
|
37
|
+
return { element: el, close: () => match.close(el) };
|
|
38
|
+
}
|
|
@@ -89,29 +89,34 @@ export function EventFrom(tag, option) {
|
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
91
|
* Traverses up the DOM (including crossing shadow DOM boundaries) to find the closest ancestor
|
|
92
|
-
*
|
|
93
|
-
* @param
|
|
94
|
-
* @param
|
|
92
|
+
* matching the given predicate.
|
|
93
|
+
* @param start - The starting element
|
|
94
|
+
* @param predicate - A type guard used to test each ancestor
|
|
95
95
|
* @returns The closest matching ancestor or null if none found
|
|
96
96
|
*/
|
|
97
|
-
function
|
|
98
|
-
let current =
|
|
97
|
+
export function findClosestAcrossShadow(start, predicate) {
|
|
98
|
+
let current = start;
|
|
99
99
|
while (current) {
|
|
100
|
-
if (current
|
|
100
|
+
if (predicate(current)) {
|
|
101
101
|
return current;
|
|
102
102
|
}
|
|
103
|
-
// Check regular parent first
|
|
104
103
|
if (current.parentElement) {
|
|
105
104
|
current = current.parentElement;
|
|
106
105
|
}
|
|
107
|
-
// If no parentElement, check if we're in a shadow root
|
|
108
|
-
else if (current.parentNode instanceof ShadowRoot) {
|
|
109
|
-
current = current.parentNode.host;
|
|
110
|
-
}
|
|
111
|
-
// No more parents to check
|
|
112
106
|
else {
|
|
113
|
-
|
|
107
|
+
// Duck-typed ShadowRoot check (nodeType 11 + host) instead of `instanceof ShadowRoot`,
|
|
108
|
+
// since some test environments (e.g. JSDOM) only partially implement it.
|
|
109
|
+
const parent = current.parentNode;
|
|
110
|
+
if (parent !== null && parent.nodeType === 11 && 'host' in parent) {
|
|
111
|
+
current = parent.host;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
current = null;
|
|
115
|
+
}
|
|
114
116
|
}
|
|
115
117
|
}
|
|
116
118
|
return null;
|
|
117
119
|
}
|
|
120
|
+
function findClosestParentWithTag(element, tagName) {
|
|
121
|
+
return findClosestAcrossShadow(element, (el) => el.localName === tagName);
|
|
122
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This utility is covered by the end-to-end tests under 'clipping' in `popovercontainer.cy.ts`.
|
|
3
|
+
*/
|
|
4
|
+
import { computePosition, platform as domPlatform } from "@floating-ui/dom";
|
|
5
|
+
import { getParentNode, isHTMLElement, isLastTraversableNode, isTopLayer, } from "@floating-ui/utils/dom";
|
|
6
|
+
const CLIPPING_RECT_CACHE = Symbol('Clipping Rect Cache');
|
|
7
|
+
/**
|
|
8
|
+
* A custom floating UI platform that restricts clipping rectangles to the safe area.
|
|
9
|
+
*/
|
|
10
|
+
const safeAreaPlatform = { ...domPlatform, getClippingRect };
|
|
11
|
+
/**
|
|
12
|
+
* Computes the clipping rectangle of an element while accounting for the safe area.
|
|
13
|
+
*/
|
|
14
|
+
async function getClippingRect(...args) {
|
|
15
|
+
const element = args[0].element;
|
|
16
|
+
// Check whether the clipping rectangle of the given element has already been computed during
|
|
17
|
+
// this pass.
|
|
18
|
+
const hit = this[CLIPPING_RECT_CACHE].get(element);
|
|
19
|
+
if (hit)
|
|
20
|
+
return hit;
|
|
21
|
+
// Compute the clipping rectangle with the Floating UI DOM platform, then restrict it to the safe
|
|
22
|
+
// area.
|
|
23
|
+
const clippingRect = await domPlatform.getClippingRect.apply(this, args);
|
|
24
|
+
applySafeArea(clippingRect, element);
|
|
25
|
+
this[CLIPPING_RECT_CACHE].set(element, clippingRect);
|
|
26
|
+
return clippingRect;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Restricts the `clippingRect` computed for `element` to the safe area, modifying it in place.
|
|
30
|
+
*
|
|
31
|
+
* The safe area only applies to elements that the header can actually cover, which excludes
|
|
32
|
+
* elements without a header on their page, elements on a top layer and elements within the header.
|
|
33
|
+
*/
|
|
34
|
+
function applySafeArea(clippingRect, element) {
|
|
35
|
+
const headerElement = element.ownerDocument.querySelector('post-header');
|
|
36
|
+
if (headerElement === null)
|
|
37
|
+
return;
|
|
38
|
+
let parent = element;
|
|
39
|
+
while (!isLastTraversableNode(parent)) {
|
|
40
|
+
parent = getParentNode(parent);
|
|
41
|
+
if (!isHTMLElement(parent))
|
|
42
|
+
continue;
|
|
43
|
+
// Do not apply the safe area of the header to
|
|
44
|
+
// - elements that are on a top layer, such as a dialog.
|
|
45
|
+
// - elements that are located within the header itself.
|
|
46
|
+
if (isTopLayer(parent) || parent === headerElement)
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const headerRect = headerElement.getBoundingClientRect();
|
|
50
|
+
const top = Math.max(clippingRect.y, headerRect.bottom);
|
|
51
|
+
clippingRect.height -= top - clippingRect.y;
|
|
52
|
+
clippingRect.y = top;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Computes the coordinates that will position the `floating` element next to a given `reference`
|
|
56
|
+
* element while accounting for the safe area.
|
|
57
|
+
*
|
|
58
|
+
* The safe area is the part of the viewport that the header does not cover. Restricting the
|
|
59
|
+
* clipping rectangles to it makes floating elements behave as if they were clipped by the header.
|
|
60
|
+
*/
|
|
61
|
+
export const computePositionWithSafeArea = (reference, floating, options) => {
|
|
62
|
+
// Adapted from https://github.com/floating-ui/floating-ui/blob/27629b74ba36ab8ceb2a968051927b9b69511a3b/packages/dom/src/index.ts#L15
|
|
63
|
+
options ?? (options = {});
|
|
64
|
+
return computePosition(reference, floating, {
|
|
65
|
+
...options,
|
|
66
|
+
platform: {
|
|
67
|
+
...safeAreaPlatform,
|
|
68
|
+
...options.platform,
|
|
69
|
+
[CLIPPING_RECT_CACHE]: new Map(),
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getElement as t}from"@stencil/core/internal/client";const e=[void 0,null,"",Number.NaN];function n(t){return e.some((e=>Object.is(e,t)))}const i=new WeakSet,o=new WeakSet,s=new WeakMap,c=new WeakMap,r=new WeakMap,u=new WeakMap;function a(t,e,n){let i=t.get(e);return i||(i=n(),t.set(e,i)),i}function
|
|
1
|
+
import{getElement as t}from"@stencil/core/internal/client";const e=[void 0,null,"",Number.NaN];function n(t){return e.some((e=>Object.is(e,t)))}const i=new WeakSet,o=new WeakSet,s=new WeakMap,c=new WeakMap,r=new WeakMap,u=new WeakMap;function a(t,e,n){let i=t.get(e);return i||(i=n(),t.set(e,i)),i}function h(t){return a(c,t,(()=>new Set))}function d(t){return a(r,t,(()=>new Map))}function f(t,e,n){m(t,e);const i=a(u,t,(()=>new Map));a(i,e,(()=>new Set)).add(n)}function m(t,e){const n=Object.getOwnPropertyDescriptor(t,e);n&&n.get||Object.defineProperty(t,e,{get(){return d(this).get(e)},set(t){if(d(this).set(e,t),o.has(this)){l(this,e);const t=Object.getPrototypeOf(this),n=u.get(t);if(n){const t=n.get(e);if(t)for(const e of t)l(this,e)}}},enumerable:!0,configurable:!0})}function l(t,e){const i=Object.getPrototypeOf(t),o=s.get(i);if(!o)return;const c=o.get(e);if(!c||0===c.length)return;const r=[...c].sort(((t,e)=>t.priority-e.priority)),u=n(t[e]);for(const n of r)if((!u||n.validateEmptyValues)&&!n.run(t,e)&&n.blocking)break}function b(t){return function(e,n){m(e,n),function(t){if(i.has(t))return;i.add(t);const e="componentDidLoad"in t&&"function"==typeof t.componentDidLoad?t.componentDidLoad:void 0;Object.defineProperty(t,"componentDidLoad",{writable:!0,configurable:!0,value:function(...t){o.add(this);const n=h(Object.getPrototypeOf(this));for(const t of n)l(this,t);if(e)return e.apply(this,t)}})}(e),h(e).add(n),function(t,e){const n=a(s,t,(()=>new Map));return a(n,e,(()=>[]))}(e,n).push(t)}}function p(e,n){const i=t(e),o=i.localName,s=e[n];return{value:s,showError(t){console.error(`[${o}] Property "${String(n)}" ${t}. Received: ${JSON.stringify(s)}.`,i)}}}const w=new class{constructor(){this.breakpoints=[{key:"xl",device:"desktop",minWidth:1280,mediaQuery:"(min-width: 1280px)"},{key:"lg",device:"desktop",minWidth:1024,mediaQuery:"(min-width: 1024px)"},{key:"md",device:"tablet",minWidth:780,mediaQuery:"(min-width: 780px)"},{key:"sm",device:"tablet",minWidth:600,mediaQuery:"(min-width: 600px)"},{key:"xs",device:"mobile",minWidth:0,mediaQuery:"(min-width: 0px)"}],this.resizeObserver=globalThis.ResizeObserver?new ResizeObserver((()=>this.updateCurrentBreakpoint())):null,this.updateCurrentBreakpoint=(t={emitEvents:!0})=>{const e=this.currentBreakpoint,n=this.breakpoints.find((t=>globalThis.matchMedia?globalThis.matchMedia(t.mediaQuery).matches:t.minWidth<=document.documentElement.clientWidth));n&&(this.currentBreakpoint=n,t.emitEvents&&Object.keys(this.currentBreakpoint).filter((t=>"mediaQuery"!==t)).filter((t=>!e||this.currentBreakpoint[t]!==e[t])).forEach((t=>this.dispatchEvent(t))))},this.resizeObserver&&(this.updateCurrentBreakpoint({emitEvents:!1}),this.resizeObserver.observe(document.body))}dispatchEvent(t){globalThis.dispatchEvent(new CustomEvent(`postBreakpoint:${t}`,{detail:this.currentBreakpoint[t]}))}get(t){return this.updateCurrentBreakpoint({emitEvents:!1}),this.currentBreakpoint[t]}};export{w as b,b as c,p as g,n as i,f as r}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function n(n,t,
|
|
1
|
+
function n(n,t,i,r,o=!1){if(!(n instanceof Event&&n.target instanceof HTMLElement))return!1;const s=n.target;if(o){if(!s.closest(t))return!1}else if(s.localName!==t)return!1;return!r||(f=i.localName,e(s,(n=>n.localName===f))===i);var f}function t(t,e){const i={ignoreNestedComponents:!0,allowDescendants:!1,...e};return function(e,r,o){if(o){const e=o.value;o.value=function(r){if(n(r,t,this.host,i.ignoreNestedComponents,i.allowDescendants))return e.call(this,r)}}else{const o=`__${r}_original`;Object.defineProperty(e,o,{writable:!0,configurable:!0}),Object.defineProperty(e,r,{get(){return this[o]},set(e){this[o]="function"==typeof e?r=>{if(n(r,t,this.host,i.ignoreNestedComponents))return e.call(this,r)}:e},configurable:!0,enumerable:!0})}}}function e(n,t){let e=n;for(;e;){if(t(e))return e;if(e.parentElement)e=e.parentElement;else{const n=e.parentNode;e=null!==n&&11===n.nodeType&&"host"in n?n.host:null}}return null}export{t as E,e as f}
|