@swisspost/design-system-components 10.7.0 → 10.9.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/README.md +1 -1
- package/dist/cjs/{create-validator-decorator-D7nAb9KJ.js → create-validator-decorator-DVm_SDrR.js} +1 -1
- package/dist/cjs/{index-DWIlRT6N.js → index-DY4QxKNv.js} +5 -5
- package/dist/cjs/is-focus-visible-B3CqVQsX.js +19 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{one-of-B8RUgrZk.js → one-of-qu7_EPxf.js} +1 -1
- package/dist/cjs/{package-BtKYhTNj.js → package-kgRYEtTJ.js} +1 -1
- package/dist/cjs/{pattern-B6VoDk_m.js → pattern-EpwCKMyC.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +6 -6
- package/dist/cjs/post-autocomplete.cjs.entry.js +5 -5
- package/dist/cjs/post-avatar.cjs.entry.js +85 -61
- package/dist/cjs/post-back-to-top.cjs.entry.js +6 -6
- package/dist/cjs/post-banner.cjs.entry.js +5 -5
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +8 -8
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +7 -7
- package/dist/cjs/post-closebutton_14.cjs.entry.js +545 -607
- package/dist/cjs/post-collapsible_2.cjs.entry.js +13 -7
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-date-picker.cjs.entry.js +24 -9
- package/dist/cjs/post-footer.cjs.entry.js +6 -6
- 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 +4 -4
- package/dist/cjs/post-number-input.cjs.entry.js +5 -5
- package/dist/cjs/post-pagination.cjs.entry.js +6 -6
- package/dist/cjs/post-popover-trigger.cjs.entry.js +5 -5
- package/dist/cjs/post-popover.cjs.entry.js +9 -9
- package/dist/cjs/post-progressbar.cjs.entry.js +4 -4
- package/dist/cjs/post-rating.cjs.entry.js +6 -6
- package/dist/cjs/post-side-navigation-trigger.cjs.entry.js +6 -6
- package/dist/cjs/post-side-navigation.cjs.entry.js +14 -9
- package/dist/cjs/post-stepper-item.cjs.entry.js +3 -3
- package/dist/cjs/post-stepper.cjs.entry.js +7 -7
- package/dist/cjs/post-tab-item.cjs.entry.js +6 -6
- package/dist/cjs/post-tab-panel.cjs.entry.js +6 -6
- package/dist/cjs/post-tabs.cjs.entry.js +37 -9
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +6 -6
- package/dist/cjs/post-tooltip.cjs.entry.js +8 -6
- package/dist/cjs/{required-bXtlqqaA.js → required-Dgzo-rb5.js} +1 -1
- package/dist/cjs/{type-BqLE7Uui.js → type-DBRxpBZI.js} +1 -1
- package/dist/cjs/{url-CUy3C3sH.js → url-Dl1JABeP.js} +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-avatar/avatar-utils.js +1 -2
- package/dist/collection/components/post-avatar/post-avatar.js +77 -59
- package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -1
- package/dist/collection/components/post-banner/post-banner.css +1 -1
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
- package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js +9 -3
- package/dist/collection/components/post-date-picker/post-date-picker.css +1 -1
- package/dist/collection/components/post-date-picker/post-date-picker.js +18 -3
- package/dist/collection/components/post-footer/post-footer.css +1 -1
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +100 -18
- package/dist/collection/components/post-icon/post-icon.css +1 -1
- package/dist/collection/components/post-icon/post-icon.js +1 -2
- package/dist/collection/components/post-language-menu/post-language-menu.css +1 -1
- package/dist/collection/components/post-language-menu/post-language-menu.js +2 -2
- package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
- package/dist/collection/components/post-listbox/post-listbox.css +1 -1
- package/dist/collection/components/post-listbox/post-listbox.js +1 -1
- package/dist/collection/components/post-listbox-option/post-listbox-option.js +2 -2
- package/dist/collection/components/post-logo/post-logo.css +1 -1
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +34 -16
- 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 +3 -14
- 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 +2 -2
- 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 +2 -2
- package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +211 -323
- 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 +7 -3
- 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 +31 -3
- 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 +3 -1
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
- package/dist/collection/test-setup.js +28 -0
- package/dist/collection/utils/floating-ui/middleware/flip.js +77 -0
- package/dist/collection/utils/floating-ui/middleware/safe-space.js +52 -0
- package/dist/collection/utils/floating-ui/util.js +10 -0
- package/dist/collection/utils/index.js +1 -0
- package/dist/collection/utils/is-focus-visible.js +15 -0
- package/dist/components/is-focus-visible.js +1 -0
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +1 -1
- package/dist/components/post-avatar.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-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-BWwWKRO5.js +1 -0
- package/dist/components/react/p-CAL337jJ.js +1 -0
- package/dist/components/react/p-CBVthgj-.js +1 -0
- package/dist/components/react/{p-DS46v3ju.js → p-CLkb55ud.js} +1 -1
- package/dist/components/react/{p-C8_zqgAP.js → p-CYBXVnUJ.js} +1 -1
- package/dist/components/react/p-Ci-TsJYj.js +1 -0
- package/dist/components/react/p-CtgMQs_Q.js +1 -0
- package/dist/components/react/p-D4LBzsbB.js +1 -0
- package/dist/components/react/p-D5lqOfVk.js +1 -0
- package/dist/components/react/p-DGpWjdFJ.js +1 -0
- package/dist/components/react/{p-BBv5JYsW.js → p-DSk0Nq8U.js} +1 -1
- package/dist/components/react/{p-1y1rv5Tw.js → p-Db3d6dKF.js} +1 -1
- package/dist/components/react/p-DkDIUTRi.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 +67 -45
- package/dist/esm/{create-validator-decorator-DFpQtJzK.js → create-validator-decorator-Cp_NUmrr.js} +1 -1
- package/dist/esm/{index-Bs0zeM5Q.js → index-D0jX3Fts.js} +5 -5
- package/dist/esm/is-focus-visible-BWwWKRO5.js +17 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{one-of-DQCfaZpw.js → one-of-B9locHPx.js} +1 -1
- package/dist/esm/{package-BBz9PVf0.js → package-CAL337jJ.js} +1 -1
- package/dist/esm/{pattern-3lnaFlkk.js → pattern-BL3OBU8C.js} +1 -1
- package/dist/esm/post-accordion_2.entry.js +6 -6
- package/dist/esm/post-autocomplete.entry.js +5 -5
- package/dist/esm/post-avatar.entry.js +85 -61
- package/dist/esm/post-back-to-top.entry.js +6 -6
- package/dist/esm/post-banner.entry.js +5 -5
- package/dist/esm/post-breadcrumb-item.entry.js +8 -8
- package/dist/esm/post-breadcrumbs.entry.js +7 -7
- package/dist/esm/post-closebutton_14.entry.js +545 -607
- package/dist/esm/post-collapsible_2.entry.js +13 -7
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-date-picker.entry.js +24 -9
- package/dist/esm/post-footer.entry.js +6 -6
- 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 +4 -4
- package/dist/esm/post-number-input.entry.js +5 -5
- package/dist/esm/post-pagination.entry.js +6 -6
- package/dist/esm/post-popover-trigger.entry.js +5 -5
- package/dist/esm/post-popover.entry.js +9 -9
- package/dist/esm/post-progressbar.entry.js +4 -4
- package/dist/esm/post-rating.entry.js +6 -6
- package/dist/esm/post-side-navigation-trigger.entry.js +6 -6
- package/dist/esm/post-side-navigation.entry.js +14 -9
- package/dist/esm/post-stepper-item.entry.js +3 -3
- package/dist/esm/post-stepper.entry.js +7 -7
- package/dist/esm/post-tab-item.entry.js +6 -6
- package/dist/esm/post-tab-panel.entry.js +6 -6
- package/dist/esm/post-tabs.entry.js +37 -9
- package/dist/esm/post-tooltip-trigger.entry.js +6 -6
- package/dist/esm/post-tooltip.entry.js +8 -6
- package/dist/esm/{required-NuzPg5jZ.js → required-CDaQB1gC.js} +1 -1
- package/dist/esm/{type-ChnksJ25.js → type-CQ7XuPCZ.js} +1 -1
- package/dist/esm/{url-BCk3ZU-x.js → url-B-86gtTK.js} +1 -1
- package/dist/post-components/{p-63e570c4.entry.js → p-077be898.entry.js} +1 -1
- package/dist/post-components/{p-6a2f47af.entry.js → p-184bd61c.entry.js} +1 -1
- package/dist/post-components/p-1933e4fa.entry.js +1 -0
- package/dist/post-components/p-21e6f82a.entry.js +1 -0
- package/dist/post-components/{p-c2de3702.entry.js → p-2220db4c.entry.js} +1 -1
- package/dist/post-components/p-2aff3873.entry.js +1 -0
- package/dist/post-components/p-2b475cd7.entry.js +1 -0
- package/dist/post-components/p-33a898ec.entry.js +1 -0
- package/dist/post-components/p-405c1fff.entry.js +1 -0
- package/dist/post-components/{p-bd128657.entry.js → p-5efaca25.entry.js} +1 -1
- package/dist/post-components/p-6a9661d9.entry.js +1 -0
- package/dist/post-components/{p-f275b872.entry.js → p-7dd192b3.entry.js} +1 -1
- package/dist/post-components/p-8e5052d5.entry.js +1 -0
- package/dist/post-components/p-9440738d.entry.js +1 -0
- package/dist/post-components/{p-31550a50.entry.js → p-965a02fb.entry.js} +1 -1
- package/dist/post-components/{p-61a45246.entry.js → p-9740719e.entry.js} +1 -1
- package/dist/post-components/p-9af8f5af.entry.js +1 -0
- package/dist/post-components/{p-DeUk3rcv.js → p-BCPv4bcY.js} +1 -1
- package/dist/post-components/p-BWwWKRO5.js +1 -0
- package/dist/post-components/p-CAL337jJ.js +1 -0
- package/dist/post-components/{p-D1s6tESz.js → p-CP3LjuFR.js} +1 -1
- package/dist/post-components/p-D0jX3Fts.js +2 -0
- package/dist/post-components/{p-Bl-_v3aT.js → p-D6mVqZLg.js} +1 -1
- package/dist/post-components/{p-BwhzbRIR.js → p-DSaWK_q-.js} +1 -1
- package/dist/post-components/p-VPHnF9fB.js +1 -0
- package/dist/post-components/p-a6971c1c.entry.js +1 -0
- package/dist/post-components/p-a7d8f328.entry.js +1 -0
- package/dist/post-components/{p-f784e149.entry.js → p-bb9a0e1e.entry.js} +1 -1
- package/dist/post-components/{p-e6a4146b.entry.js → p-bf8c7dca.entry.js} +1 -1
- package/dist/post-components/p-c3351def.entry.js +1 -0
- package/dist/post-components/{p-31a97aae.entry.js → p-c87f33f0.entry.js} +1 -1
- package/dist/post-components/{p-64480e3a.entry.js → p-e30b534d.entry.js} +1 -1
- package/dist/post-components/{p-43240818.entry.js → p-e73eabac.entry.js} +1 -1
- package/dist/post-components/{p-f566768e.entry.js → p-e84fe883.entry.js} +1 -1
- package/dist/post-components/{p-aa33141b.entry.js → p-eaa28736.entry.js} +1 -1
- package/dist/post-components/{p-451ec8ee.entry.js → p-f2cb8ed1.entry.js} +1 -1
- package/dist/post-components/{p-58b66607.entry.js → p-ffbf2375.entry.js} +1 -1
- package/dist/post-components/p-gv9b-Z15.js +1 -0
- package/dist/post-components/post-components.css +2 -2
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-avatar/avatar-utils.d.ts +0 -2
- package/dist/types/components/post-avatar/post-avatar.d.ts +11 -9
- package/dist/types/components/post-date-picker/post-date-picker.d.ts +2 -0
- package/dist/types/components/post-header/post-header.d.ts +14 -0
- package/dist/types/components/post-language-menu/post-language-menu.d.ts +3 -0
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +1 -1
- package/dist/types/components/post-menu/post-menu.d.ts +0 -1
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +74 -69
- package/dist/types/components/post-tabs/post-tabs.d.ts +4 -0
- package/dist/types/components.d.ts +39 -26
- package/dist/types/utils/floating-ui/middleware/flip.d.ts +14 -0
- package/dist/types/utils/floating-ui/middleware/safe-space.d.ts +10 -0
- package/dist/types/utils/floating-ui/util.d.ts +4 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/is-focus-visible.d.ts +5 -0
- package/dist/vrt/helpers/header-test-config.js +2 -1
- package/hydrate/index.js +659 -634
- package/hydrate/index.mjs +659 -634
- package/package.json +22 -21
- package/dist/components/react/p-BBz9PVf0.js +0 -1
- package/dist/components/react/p-BgEY7xhT.js +0 -1
- package/dist/components/react/p-C3J7fIWx.js +0 -1
- package/dist/components/react/p-C5ibTdH5.js +0 -1
- package/dist/components/react/p-CUKzje9q.js +0 -1
- package/dist/components/react/p-DTBtJCjk.js +0 -1
- package/dist/components/react/p-XUkUhxaz.js +0 -1
- package/dist/components/react/p-ialuSSl2.js +0 -1
- package/dist/post-components/p-10e430c3.entry.js +0 -1
- package/dist/post-components/p-32e1e951.entry.js +0 -1
- package/dist/post-components/p-4f08b99b.entry.js +0 -1
- package/dist/post-components/p-54432b47.entry.js +0 -1
- package/dist/post-components/p-5d7de657.entry.js +0 -1
- package/dist/post-components/p-63dd9a76.entry.js +0 -1
- package/dist/post-components/p-96d07f2b.entry.js +0 -1
- package/dist/post-components/p-9a1e8b1d.entry.js +0 -1
- package/dist/post-components/p-BBz9PVf0.js +0 -1
- package/dist/post-components/p-Bs0zeM5Q.js +0 -2
- package/dist/post-components/p-DH-eJVHZ.js +0 -1
- package/dist/post-components/p-Dk-DtPZn.js +0 -1
- package/dist/post-components/p-aff180f5.entry.js +0 -1
- package/dist/post-components/p-d5327dd1.entry.js +0 -1
- package/dist/post-components/p-e1817744.entry.js +0 -1
- package/dist/post-components/p-f6da5e69.entry.js +0 -1
- package/dist/post-components/p-f917527c.entry.js +0 -1
- package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/vrt/helpers/header-variants.config.d.ts +0 -23
- package/dist/vrt/helpers/header-variants.config.js +0 -157
- /package/dist/collection/utils/{floating-ui.js → floating-ui/platform/safe-area.js} +0 -0
- /package/dist/types/utils/{floating-ui.d.ts → floating-ui/platform/safe-area.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,c as e,h as i,a as o,t as a}from"./index.js";import{f as r}from"./p-D5knoiyy.js";import"./p-DeO0rZ1T.js";import{c as n}from"./p-lpWRZjJp.js";import{v as c}from"./p-BBz9PVf0.js";import{d as h}from"./p-BgEY7xhT.js";import{O as l}from"./p-CnN4Jdtv.js";import{T as b}from"./p-CVVXnYLU.js";var p=function(t,s,e,i){var o,a=arguments.length,r=a<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,s,e,i);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(r=(a<3?o(r):a>3?o(s,e,r):o(s,e))||r);return a>3&&r&&Object.defineProperty(s,e,r),r};const d=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postChange=e(this,"postChange"),this.showing=null,this.hiding=null,this.isLoaded=!1,this.isPagesVariant=!1,this.showLeftScrollButton=!1,this.showRightScrollButton=!1,this.textPrevTabItems="Previous tab items",this.textNextTabItems="Next tab items",this.size="large",this.updateScrollButtons=()=>{if(!this.tabsContainer)return;const t=getComputedStyle(this.tabsContainer),s=Number.parseFloat(t.paddingInlineStart)||0,e=Number.parseFloat(t.paddingInlineEnd)||0,i=this.tabsContainer.clientWidth-s-e,o=this.tabsContainer.scrollWidth-s-e;this.showLeftScrollButton=this.tabsContainer.scrollLeft>0,this.showRightScrollButton=this.tabsContainer.scrollLeft+i<o}}get tabs(){return Array.from(this.host.querySelectorAll("post-tab-item")).filter((t=>t.closest("post-tabs")===this.host))}get panels(){return Array.from(this.host.querySelectorAll("post-tab-panel")).filter((t=>t.closest("post-tabs")===this.host))}validateLabel(){this.isPagesVariant&&!this.label&&console.error(`[${this.host.localName}] Property "label" is required in Pages variant. Received: ${JSON.stringify(this.label)}.`,this.host)}componentWillRender(){this.detectVariant()}componentDidLoad(){if(this.leftScrollButton.ariaControlsElements=[this.tabsContainer],this.rightScrollButton.ariaControlsElements=[this.tabsContainer],this.moveMisplacedTabs(),this.moveMisplacedPanels(),this.enableTabs(),this.handleScrollButtons(),this.setupContentObserver(),this.setupResizeObserver(),this.validateLabel(),this.isPagesVariant){const t=this.findActivePagesTab();t&&(this.activateTab(t),this.scrollTabIntoView(t))}else{const t=this.activeTab||this.tabs[0]?.name;if(t){this.show(t);const s=this.tabs.find((s=>s.name===t));s&&this.scrollTabIntoView(s)}}this.isLoaded=!0}disconnectedCallback(){this.showing&&(this.showing.cancel(),this.showing=null),this.hiding&&(this.hiding.cancel(),this.hiding=null),this.contentObserver&&this.contentObserver?.disconnect(),this.resizeObserver?.disconnect(),this.tabsContainer?.removeEventListener("scroll",this.updateScrollButtons)}setupContentObserver(){this.contentObserver=new MutationObserver(this.handleContentChange.bind(this)),this.contentObserver?.observe(this.host,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-pages-variant","aria-current"]})}setupResizeObserver(){this.resizeObserver=new ResizeObserver(this.updateScrollButtons),this.resizeObserver.observe(this.tabsContainer)}handleContentChange(t){const s=this.shouldRedetectVariant(t);this.hasAriaCurrentChanged(t)&&this.isPagesVariant&&this.updateActivePagesTab(),s&&this.handleVariantChange(),this.updateScrollButtons()}shouldRedetectVariant(t){return t.some((t=>"childList"===t.type?t.addedNodes.length>0||t.removedNodes.length>0:"attributes"===t.type&&"data-pages-variant"===t.attributeName))}hasAriaCurrentChanged(t){return t.some((t=>"attributes"===t.type&&"aria-current"===t.attributeName))}updateActivePagesTab(){const t=this.findActivePagesTab();t&&t!==this.currentActiveTab&&(this.activateTab(t),this.scrollTabIntoView(t,"smooth"))}handleVariantChange(){const t=this.isPagesVariant;this.detectVariant(),t!==this.isPagesVariant&&(this.enableTabs(),this.initializeActiveTab())}initializeActiveTab(){if(this.isPagesVariant){const t=this.findActivePagesTab();t&&(this.activateTab(t),this.scrollTabIntoView(t))}else{const t=this.activeTab||this.tabs[0]?.name;t&&this.show(t)}}detectVariant(){const t=this.tabs.some((t=>null!==t.querySelector("a")||"true"===t.dataset.pagesVariant));if(t&&this.panels.length>0)throw Error("PostTabs: Mixed mode detected. Cannot use both Page Tabs (anchor elements) and Content Tabs (post-tab-panel elements) variants at the same time.");this.isPagesVariant=t,this.host.classList.remove("page-tabs","content-tabs"),this.host.classList.add(this.isPagesVariant?"page-tabs":"content-tabs")}findActivePagesTab(){return this.tabs.find((t=>null!==t.querySelector('a[aria-current="page"]')))||null}async show(t){try{if(t===this.currentActiveTab?.name)return;const s=this.currentActiveTab,e=this.host.querySelector(`post-tab-item[name="${t}"]`);if(!e)return;if(this.activateTab(e),this.scrollTabIntoView(e,"smooth"),this.showing&&(this.showing.finish(),this.showing=null),!s||this.showing||this.hiding||this.hidePanel(s.name),await this.awaitAnimation(this.hiding))return;if(this.showSelectedPanel(),await this.awaitAnimation(this.showing))return;this.isLoaded&&this.currentActiveTab&&this.postChange.emit(this.currentActiveTab.name)}catch(t){if(this.isAbortError(t))return;throw t}}async awaitAnimation(t){if(!t)return!1;try{return await t.finished,!1}catch(t){if(this.isAbortError(t))return!0;throw t}}isAbortError(t){return(t instanceof DOMException||t instanceof Error)&&"AbortError"===t.name}moveMisplacedTabs(){this.tabs&&this.tabs.forEach((t=>{t.getAttribute("slot")&&t.removeAttribute("slot")}))}moveMisplacedPanels(){this.panels&&this.panels.forEach((t=>{"panels"!==t.getAttribute("slot")&&t.setAttribute("slot","panels")}))}enableTabs(){this.tabs&&(this.tabs.forEach((async t=>{if(await n(t),this.isPagesVariant)return;if(t.getAttribute("aria-controls"))return;const s=this.getPanel(t.name);s&&(t.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",t.id)),t.addEventListener("click",(()=>{this.show(t.name)})),t.addEventListener("keydown",(s=>{if("Enter"!==s.key&&" "!==s.key||(s.preventDefault(),this.show(t.name)),"Home"!==s.key&&"End"!==s.key)return;s.preventDefault();const e=this.tabs.filter((t=>!t.hasAttribute("disabled")));if(0===e.length)return;const i="Home"===s.key?e[0]:e.at(-1);i&&(i?.focus(),this.show(i.name))})),t.addEventListener("keydown",(s=>{"ArrowRight"!==s.key&&"ArrowLeft"!==s.key||this.navigateTabs(t,s.key)}))})),this.currentActiveTab&&!this.currentActiveTab.isConnected&&this.show(this.tabs[0]?.name))}activateTab(t){this.currentActiveTab&&(this.isPagesVariant||(this.currentActiveTab.setAttribute("aria-selected","false"),this.currentActiveTab.setAttribute("tabindex","-1"))),this.isPagesVariant||(t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0")),this.currentActiveTab=t}hidePanel(t){const s=this.getPanel(t);s&&(this.hiding=r(s,"out"),this.hiding.onfinish=()=>{s.style.display="none",this.hiding=null})}showSelectedPanel(){if(!this.currentActiveTab)return;const t=this.getPanel(this.currentActiveTab.name);t&&(t.style.display="block",this.isLoaded&&(this.showing=r(t,"in"),this.showing.onfinish=()=>{this.showing=null}))}getPanel(t){return this.host.querySelector(`post-tab-panel[for=${t}]`)}navigateTabs(t,s){const e=Array.from(this.tabs).indexOf(t);let i;i="ArrowRight"===s?this.tabs[e+1]||this.tabs[0]:this.tabs[e-1]||this.tabs.at(-1),i&&(i.focus(),this.show(i.name))}scrollTabs(t){const s="prev"===t?-1:1,e=getComputedStyle(this.tabsContainer),i=Number.parseFloat(e.paddingInlineStart)||0,o=Number.parseFloat(e.paddingInlineEnd)||0;this.tabsContainer.scrollBy({left:s*(this.tabsContainer.clientWidth-i-o),behavior:"smooth"})}scrollTabIntoView(t,s="instant"){const e=this.tabsContainer,i=getComputedStyle(e),o=Number.parseFloat(i.paddingInlineStart)||0,a=Number.parseFloat(i.paddingInlineEnd)||0,r=t.offsetLeft,n=r+t.offsetWidth,c=e.scrollLeft+o,h=c+e.clientWidth-o-a;r<c?e.scrollTo({left:r-o,behavior:s}):n>h&&e.scrollTo({left:n-e.clientWidth+a,behavior:s})}handleScrollButtons(){this.updateScrollButtons(),this.tabsContainer.addEventListener("scroll",this.updateScrollButtons)}render(){const t=this.isPagesVariant?"nav":"div";return i(o,{key:"fb65fd2589517dd6d86e86435ec6b3a3b64b093d","data-version":c,style:void 0},i("div",{key:"dbcdd791af381ccc23953acb38a8e71527a804ee",class:"tabs-wrapper",part:"post-tabs"},i("button",{key:"20ce30515d80b282aa93f20a1f3281a1ef0f6359",ref:t=>this.leftScrollButton=t,class:"scroll-btn scroll-btn-left",type:"button","aria-label":this.textPrevTabItems,tabindex:this.showLeftScrollButton?0:-1,hidden:!this.showLeftScrollButton,onClick:()=>this.scrollTabs("prev")},i("post-icon",{key:"9a5402a28656d7a4459b9b848425bd15a45a0fce",name:"chevronleft"})),i(t,{key:"e821db02fd66aef6cf7a9fb5d925b0906571f3b6",ref:t=>this.tabsContainer=t,class:"tabs",role:this.isPagesVariant?void 0:"tablist","aria-label":this.isPagesVariant?this.label:void 0},i("slot",{key:"e3650e43ac269173cb58f1624f02778bf094573c",onSlotchange:()=>{this.moveMisplacedTabs(),this.enableTabs()}})),i("button",{key:"4345a9bc121ce187022cddf019d5c86d875a70e9",ref:t=>this.rightScrollButton=t,class:"scroll-btn scroll-btn-right",type:"button","aria-label":this.textNextTabItems,tabindex:this.showRightScrollButton?0:-1,hidden:!this.showRightScrollButton,onClick:()=>this.scrollTabs("next")},i("post-icon",{key:"2df749c1a4e506d9940ce61e077d0f0f330b7342",name:"chevronright"}))),!this.isPagesVariant&&i("div",{key:"184db29a5826af78d142ed1489be33c45831970b",class:"tab-content",part:"post-tabs-content"},i("slot",{key:"4a984c7de97f2f89e7fd0f829f5bc62e2323f056",name:"panels",onSlotchange:()=>this.moveMisplacedPanels()})))}get host(){return this}static get watchers(){return{label:[{validateLabel:0}]}}static get style(){return':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)))}@media screen and (min-width: 1024px){:host(.page-tabs) .tabs-wrapper{margin-inline:calc(-1 * (var(--post-container-offset)) + 20px)}:host(.page-tabs) .tabs-wrapper::after{box-shadow:20px 0 0 var(--post-palette-color-nested-tabs-page-stroke),-20px 0 0 var(--post-palette-color-nested-tabs-page-stroke)}}@media screen and (min-width: 1024px)and (forced-colors: active),screen and (min-width: 1024px)and (-ms-high-contrast: active),screen and (min-width: 1024px)and (-ms-high-contrast: white-on-black){:host(.page-tabs) .tabs-wrapper::after{box-shadow:20px 0 0 LinkText,-20px 0 0 LinkText}}: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)}'}},[257,"post-tabs",{textPrevTabItems:[513,"text-prev-tab-items"],textNextTabItems:[513,"text-next-tab-items"],activeTab:[513,"active-tab"],size:[513],label:[513],isPagesVariant:[32],showLeftScrollButton:[32],showRightScrollButton:[32],show:[64]},void 0,{label:[{validateLabel:0}]}]);function v(){"undefined"!=typeof customElements&&["post-tabs","post-icon"].forEach((t=>{switch(t){case"post-tabs":customElements.get(a(t))||customElements.define(a(t),d);break;case"post-icon":customElements.get(a(t))||h()}}))}p([l(["small","large"])],d.prototype,"size",void 0),p([b("string")],d.prototype,"label",void 0),v();const u=d,g=v;export{u as PostTabs,g as defineCustomElement}
|
|
1
|
+
import{p as t,H as s,c as e,h as i,a as o,t as a}from"./index.js";import{f as r}from"./p-D5knoiyy.js";import"./p-DeO0rZ1T.js";import{c as n}from"./p-lpWRZjJp.js";import{v as c}from"./p-CAL337jJ.js";import{d as h}from"./p-DGpWjdFJ.js";import{O as l}from"./p-CnN4Jdtv.js";import{T as b}from"./p-CVVXnYLU.js";var p=function(t,s,e,i){var o,a=arguments.length,r=a<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,s,e,i);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(r=(a<3?o(r):a>3?o(s,e,r):o(s,e))||r);return a>3&&r&&Object.defineProperty(s,e,r),r};const d=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postChange=e(this,"postChange"),this.showing=null,this.hiding=null,this.isLoaded=!1,this.isPagesVariant=!1,this.showLeftScrollButton=!1,this.showRightScrollButton=!1,this.textPrevTabItems="Previous tab items",this.textNextTabItems="Next tab items",this.size="large",this.handleContainerResize=()=>{this.updateScrollButtons();const t=this.host.clientWidth;t!==this.hostWidth&&(this.hostWidth=t,this.pendingScroll=void 0),this.pendingScroll?.()},this.updateScrollButtons=()=>{if(!this.tabsContainer)return;const t=getComputedStyle(this.tabsContainer),s=Number.parseFloat(t.paddingInlineStart)||0,e=Number.parseFloat(t.paddingInlineEnd)||0,i=this.tabsContainer.clientWidth-s-e,o=this.tabsContainer.scrollWidth-s-e;this.showLeftScrollButton=this.tabsContainer.scrollLeft>0,this.showRightScrollButton=this.tabsContainer.scrollLeft+i<o}}get tabs(){return Array.from(this.host.querySelectorAll("post-tab-item")).filter((t=>t.closest("post-tabs")===this.host))}get panels(){return Array.from(this.host.querySelectorAll("post-tab-panel")).filter((t=>t.closest("post-tabs")===this.host))}validateLabel(){this.isPagesVariant&&!this.label&&console.error(`[${this.host.localName}] Property "label" is required in Pages variant. Received: ${JSON.stringify(this.label)}.`,this.host)}componentWillRender(){this.detectVariant()}componentDidLoad(){if(this.leftScrollButton.ariaControlsElements=[this.tabsContainer],this.rightScrollButton.ariaControlsElements=[this.tabsContainer],this.moveMisplacedTabs(),this.moveMisplacedPanels(),this.enableTabs(),this.handleScrollButtons(),this.setupContentObserver(),this.setupResizeObserver(),this.validateLabel(),this.isPagesVariant){const t=this.findActivePagesTab();t&&(this.activateTab(t),this.scrollTabIntoView(t))}else{const t=this.activeTab||this.tabs[0]?.name;if(t){this.show(t);const s=this.tabs.find((s=>s.name===t));s&&this.scrollTabIntoView(s)}}this.isLoaded=!0}disconnectedCallback(){this.showing&&(this.showing.cancel(),this.showing=null),this.hiding&&(this.hiding.cancel(),this.hiding=null),this.contentObserver&&this.contentObserver?.disconnect(),this.resizeObserver?.disconnect(),this.tabsContainer?.removeEventListener("scroll",this.updateScrollButtons)}setupContentObserver(){this.contentObserver=new MutationObserver(this.handleContentChange.bind(this)),this.contentObserver?.observe(this.host,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-pages-variant","aria-current"]})}setupResizeObserver(){this.hostWidth=this.host.clientWidth,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.resizeObserver.observe(this.tabsContainer)}handleContentChange(t){const s=this.shouldRedetectVariant(t);this.hasAriaCurrentChanged(t)&&this.isPagesVariant&&this.updateActivePagesTab(),s&&this.handleVariantChange(),this.updateScrollButtons()}shouldRedetectVariant(t){return t.some((t=>"childList"===t.type?t.addedNodes.length>0||t.removedNodes.length>0:"attributes"===t.type&&"data-pages-variant"===t.attributeName))}hasAriaCurrentChanged(t){return t.some((t=>"attributes"===t.type&&"aria-current"===t.attributeName))}updateActivePagesTab(){const t=this.findActivePagesTab();t&&t!==this.currentActiveTab&&(this.activateTab(t),this.scrollTabIntoView(t,"smooth"))}handleVariantChange(){const t=this.isPagesVariant;this.detectVariant(),t!==this.isPagesVariant&&(this.enableTabs(),this.initializeActiveTab())}initializeActiveTab(){if(this.isPagesVariant){const t=this.findActivePagesTab();t&&(this.activateTab(t),this.scrollTabIntoView(t))}else{const t=this.activeTab||this.tabs[0]?.name;t&&this.show(t)}}detectVariant(){const t=this.tabs.some((t=>null!==t.querySelector("a")||"true"===t.dataset.pagesVariant));if(t&&this.panels.length>0)throw Error("PostTabs: Mixed mode detected. Cannot use both Page Tabs (anchor elements) and Content Tabs (post-tab-panel elements) variants at the same time.");this.isPagesVariant=t,this.host.classList.remove("page-tabs","content-tabs"),this.host.classList.add(this.isPagesVariant?"page-tabs":"content-tabs")}findActivePagesTab(){return this.tabs.find((t=>null!==t.querySelector('a[aria-current="page"]')))||null}async show(t){try{if(t===this.currentActiveTab?.name)return;const s=this.currentActiveTab,e=this.host.querySelector(`post-tab-item[name="${t}"]`);if(!e)return;if(this.activateTab(e),this.scrollTabIntoView(e,"smooth"),this.showing&&(this.showing.finish(),this.showing=null),!s||this.showing||this.hiding||this.hidePanel(s.name),await this.awaitAnimation(this.hiding))return;if(this.showSelectedPanel(),await this.awaitAnimation(this.showing))return;this.isLoaded&&this.currentActiveTab&&this.postChange.emit(this.currentActiveTab.name)}catch(t){if(this.isAbortError(t))return;throw t}}async awaitAnimation(t){if(!t)return!1;try{return await t.finished,!1}catch(t){if(this.isAbortError(t))return!0;throw t}}isAbortError(t){return(t instanceof DOMException||t instanceof Error)&&"AbortError"===t.name}moveMisplacedTabs(){this.tabs&&this.tabs.forEach((t=>{t.getAttribute("slot")&&t.removeAttribute("slot")}))}moveMisplacedPanels(){this.panels&&this.panels.forEach((t=>{"panels"!==t.getAttribute("slot")&&t.setAttribute("slot","panels")}))}enableTabs(){this.tabs&&(this.tabs.forEach((async t=>{if(await n(t),this.isPagesVariant)return;if(t.getAttribute("aria-controls"))return;const s=this.getPanel(t.name);s&&(t.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",t.id)),t.addEventListener("click",(()=>{this.show(t.name)})),t.addEventListener("keydown",(s=>{if("Enter"!==s.key&&" "!==s.key||(s.preventDefault(),this.show(t.name)),"Home"!==s.key&&"End"!==s.key)return;s.preventDefault();const e=this.tabs.filter((t=>!t.hasAttribute("disabled")));if(0===e.length)return;const i="Home"===s.key?e[0]:e.at(-1);i&&(i?.focus(),this.show(i.name))})),t.addEventListener("keydown",(s=>{"ArrowRight"!==s.key&&"ArrowLeft"!==s.key||this.navigateTabs(t,s.key)}))})),this.currentActiveTab&&!this.currentActiveTab.isConnected&&this.show(this.tabs[0]?.name))}activateTab(t){this.currentActiveTab&&(this.isPagesVariant||(this.currentActiveTab.setAttribute("aria-selected","false"),this.currentActiveTab.setAttribute("tabindex","-1"))),this.isPagesVariant||(t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0")),this.currentActiveTab=t}hidePanel(t){const s=this.getPanel(t);s&&(this.hiding=r(s,"out"),this.hiding.onfinish=()=>{s.style.display="none",this.hiding=null})}showSelectedPanel(){if(!this.currentActiveTab)return;const t=this.getPanel(this.currentActiveTab.name);t&&(t.style.display="block",this.isLoaded&&(this.showing=r(t,"in"),this.showing.onfinish=()=>{this.showing=null}))}getPanel(t){return this.host.querySelector(`post-tab-panel[for=${t}]`)}navigateTabs(t,s){const e=Array.from(this.tabs).indexOf(t);let i;i="ArrowRight"===s?this.tabs[e+1]||this.tabs[0]:this.tabs[e-1]||this.tabs.at(-1),i&&(i.focus(),this.show(i.name))}scrollTabs(t){const s="prev"===t?-1:1,e=getComputedStyle(this.tabsContainer),i=Number.parseFloat(e.paddingInlineStart)||0,o=Number.parseFloat(e.paddingInlineEnd)||0,a=this.tabsContainer.clientWidth-i-o;this.pendingScroll=s>0&&this.tabsContainer.scrollLeft+a>=this.tabsContainer.scrollWidth-this.tabsContainer.clientWidth?()=>this.scrollToEnd():void 0,this.tabsContainer.scrollBy({left:s*a,behavior:"smooth"})}scrollToEnd(){const t=this.tabsContainer,s=t.scrollWidth-t.clientWidth;t.scrollLeft>=s?this.pendingScroll=void 0:t.scrollTo({left:s,behavior:"smooth"})}scrollTabIntoView(t,s="instant"){const e=this.tabsContainer,i=getComputedStyle(e),o=Number.parseFloat(i.paddingInlineStart)||0,a=Number.parseFloat(i.paddingInlineEnd)||0,r=t.offsetLeft,n=r+t.offsetWidth,c=e.scrollLeft+o,h=c+e.clientWidth-o-a;this.pendingScroll=void 0,r<c?e.scrollTo({left:r-o,behavior:s}):n>h&&(this.pendingScroll=()=>this.scrollTabIntoView(t,s),e.scrollTo({left:n-e.clientWidth+a,behavior:s}))}handleScrollButtons(){this.updateScrollButtons(),this.tabsContainer.addEventListener("scroll",this.updateScrollButtons)}render(){const t=this.isPagesVariant?"nav":"div";return i(o,{key:"10c247c7c021a4fbbd8f79ce7b82888e0b7c8be2","data-version":c,style:void 0},i("div",{key:"5ccae325884c7cff0eec399da23513c0b864dde0",class:"tabs-wrapper",part:"post-tabs"},i("button",{key:"dd38a22327801b790f849449055b765d2c1bc3b6",ref:t=>this.leftScrollButton=t,class:"scroll-btn scroll-btn-left",type:"button","aria-label":this.textPrevTabItems,tabindex:-1,hidden:!this.showLeftScrollButton,onClick:()=>this.scrollTabs("prev")},i("post-icon",{key:"461a92ab071472c995d0adad5c73c75c82d982fe",name:"chevronleft"})),i(t,{key:"edecdbfdc681b96539e5a0755330faf1795ecb35",ref:t=>this.tabsContainer=t,class:"tabs",role:this.isPagesVariant?void 0:"tablist","aria-label":this.isPagesVariant?this.label:void 0},i("slot",{key:"6240234a2168b2e889cab92a7688731ca93a63a6",onSlotchange:()=>{this.moveMisplacedTabs(),this.enableTabs()}})),i("button",{key:"a4030c48cbbefb578b03ee9dad35724a1fdd5547",ref:t=>this.rightScrollButton=t,class:"scroll-btn scroll-btn-right",type:"button","aria-label":this.textNextTabItems,tabindex:-1,hidden:!this.showRightScrollButton,onClick:()=>this.scrollTabs("next")},i("post-icon",{key:"d89c831bdd2faf1991793df47e7ca79bf49e5339",name:"chevronright"}))),!this.isPagesVariant&&i("div",{key:"aba319437ba8bfb9e7a144a44efcc32d82ef6b02",class:"tab-content",part:"post-tabs-content"},i("slot",{key:"e689b5e3a030909c5c77899ac899ded2481f82a6",name:"panels",onSlotchange:()=>this.moveMisplacedPanels()})))}get host(){return this}static get watchers(){return{label:[{validateLabel:0}]}}static get style(){return':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:focus-visible{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:focus-visible{transition:none}:host .tabs-wrapper button.scroll-btn:focus-visible: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:focus-visible{outline-color:Highlight !important}}:host .tabs-wrapper button.scroll-btn.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.pretend-focus{transition:none}:host .tabs-wrapper button.scroll-btn.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.pretend-focus{outline-color:Highlight !important}}:host .tabs-wrapper button.scroll-btn:has(:focus-visible){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:has(:focus-visible){transition:none}:host .tabs-wrapper button.scroll-btn:has(:focus-visible):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:has(:focus-visible){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)))}@media screen and (min-width: 1024px){:host(.page-tabs) .tabs-wrapper{margin-inline:calc(-1 * (var(--post-container-offset)) + 20px)}:host(.page-tabs) .tabs-wrapper::after{box-shadow:20px 0 0 var(--post-palette-color-nested-tabs-page-stroke),-20px 0 0 var(--post-palette-color-nested-tabs-page-stroke)}}@media screen and (min-width: 1024px)and (forced-colors: active),screen and (min-width: 1024px)and (-ms-high-contrast: active),screen and (min-width: 1024px)and (-ms-high-contrast: white-on-black){:host(.page-tabs) .tabs-wrapper::after{box-shadow:20px 0 0 LinkText,-20px 0 0 LinkText}}: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)}'}},[257,"post-tabs",{textPrevTabItems:[513,"text-prev-tab-items"],textNextTabItems:[513,"text-next-tab-items"],activeTab:[513,"active-tab"],size:[513],label:[513],isPagesVariant:[32],showLeftScrollButton:[32],showRightScrollButton:[32],show:[64]},void 0,{label:[{validateLabel:0}]}]);function v(){"undefined"!=typeof customElements&&["post-tabs","post-icon"].forEach((t=>{switch(t){case"post-tabs":customElements.get(a(t))||customElements.define(a(t),d);break;case"post-icon":customElements.get(a(t))||h()}}))}p([l(["small","large"])],d.prototype,"size",void 0),p([b("string")],d.prototype,"label",void 0),v();const u=d,g=v;export{u as PostTabs,g as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as o,d as
|
|
1
|
+
import{P as o,d as s}from"./p-Db3d6dKF.js";const d=o,p=s;export{d as PostTogglebutton,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,h as s,a as i,t as o}from"./index.js";import"./p-DeO0rZ1T.js";import{v as n}from"./p-
|
|
1
|
+
import{p as t,H as e,h as s,a as i,t as o}from"./index.js";import"./p-DeO0rZ1T.js";import{v as n}from"./p-CAL337jJ.js";import{R as r}from"./p-B2jsM_Ov.js";import{T as h}from"./p-CVVXnYLU.js";const a=["pointerenter","pointerleave","focusin","focusout"];let l;const c=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.delay=0,this.trigger=null,this.delayTimeout=null,this.boundTriggerHandler=this.handleTriggerEvent.bind(this),this.boundTooltipHandler=this.handleTooltipEvent.bind(this)}get tooltip(){const t=document.getElementById(this.for);return"post-tooltip"===t?.localName?t:null}componentWillLoad(){import("./p-BrY4VWTQ.js").then((function(t){return t.f})).then((t=>{l??=t.default}))}componentDidLoad(){this.setupTrigger(),this.attachListeners(),this.attachTooltipListeners()}disconnectedCallback(){this.removeListeners(),this.removeTooltipListeners(),this.cleanupTrigger(),this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null)}handleSlotChange(){this.cleanupTrigger(),this.setupTrigger()}cleanupTrigger(){if(this.trigger){const t=this.trigger.getAttribute("aria-describedby")||"";if(t.includes(this.for)){const e=t.split(" ").filter((t=>t!==this.for)).join(" ");e?this.trigger.setAttribute("aria-describedby",e):this.trigger.removeAttribute("aria-describedby")}this.trigger=null}}setupTrigger(){if(this.trigger=this.host.querySelector("*"),this.trigger){l?.(this.trigger)||this.trigger.setAttribute("tabindex","0");const t=this.trigger.getAttribute("aria-describedby")||"";t.includes(this.for)||this.trigger.setAttribute("aria-describedby",`${t} ${this.for}`.trim())}else console.warn("No content found in the post-tooltip-trigger slot. Please insert a focusable element or content that can receive focus.")}attachListeners(){a.forEach((t=>{this.host.addEventListener(t,this.boundTriggerHandler)}))}removeListeners(){a.forEach((t=>{this.host.removeEventListener(t,this.boundTriggerHandler)}))}attachTooltipListeners(){this.tooltip&&(this.tooltip.addEventListener("pointerenter",this.boundTooltipHandler),this.tooltip.addEventListener("pointerleave",this.boundTooltipHandler))}removeTooltipListeners(){this.tooltip&&(this.tooltip.removeEventListener("pointerenter",this.boundTooltipHandler),this.tooltip.removeEventListener("pointerleave",this.boundTooltipHandler))}handleTriggerEvent(t){switch(t.type){case"pointerenter":case"focusin":case"long-press":this.handleEnter();break;case"pointerleave":case"focusout":this.handleLeave(t)}}handleTooltipEvent(t){switch(t.type){case"pointerenter":this.handleEnter();break;case"pointerleave":this.handleLeave(t)}}handleEnter(){this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),this.interestHandler()}handleLeave(t){const e=t.relatedTarget;this.tooltip&&e&&this.tooltip.contains(e)||e===this.trigger||this.interestLostHandler()}interestHandler(){this.trigger&&(this.delay>0?this.delayTimeout=globalThis.setTimeout((()=>{this.tooltip?.show(this.trigger),this.delayTimeout=null}),this.delay):this.tooltip?.show(this.trigger))}interestLostHandler(){this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),this.tooltip?.hide()}render(){return s(i,{key:"7811d666f249ead72768adaf5bdc92e47b447d8a","data-version":n},s("slot",{key:"68e56c43ebec2abffbf049647ac08757dadf22f9",onSlotchange:()=>this.handleSlotChange()}))}get host(){return this}static get style(){return"post-tooltip-trigger{vertical-align:top}:host{cursor:pointer}"}},[257,"post-tooltip-trigger",{for:[513],delay:[2]}]);function p(){"undefined"!=typeof customElements&&["post-tooltip-trigger"].forEach((t=>{"post-tooltip-trigger"===t&&(customElements.get(o(t))||customElements.define(o(t),c))}))}(function(t,e,s,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,s,i);else for(var h=t.length-1;h>=0;h--)(o=t[h])&&(r=(n<3?o(r):n>3?o(e,s,r):o(e,s))||r);n>3&&r&&Object.defineProperty(e,s,r)})([r(),h("string")],c.prototype,"for",void 0),p();const d=c,u=p;export{d as PostTooltipTrigger,u as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as e,H as o,h as t,a as s,t as r}from"./index.js";import{d as a,a as i}from"./p-D5lqOfVk.js";import"./p-DeO0rZ1T.js";import{v as p}from"./p-CAL337jJ.js";import{O as c}from"./p-CnN4Jdtv.js";const n=e(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.placement="top",this.arrow=!1,this.open=!1}componentDidLoad(){this.host.id||console.error("No id set: <post-tooltip> must have an id, linking it to it's target element with a <post-tooltip-trigger> element.")}async show(e){this.open||await this.popoverRef.show(e)}async hide(){this.popoverRef.hide()}async toggle(e,o){this.popoverRef.toggle(e,o)}handleBeforeToggle(e){this.host.toggleAttribute("open",e.detail.willOpen),this.open=e.detail.willOpen}render(){return t(s,{key:"083507ae592ce9be50f6b4217a8d13785039478d","data-version":p},t("post-popovercontainer",{key:"e0436489bd955cee95b287f35759c364b019be94",safeSpace:!0,class:this.arrow?"has-arrow":"",role:"tooltip",arrow:this.arrow,placement:this.placement,autoHide:!0,onPostBeforeToggle:e=>this.handleBeforeToggle(e),ref:e=>this.popoverRef=e},t("div",{key:"8e6417485a89f56c18e731351de0e9f5db2cdd9a",class:"tooltip-content"},t("slot",{key:"e4c9fed0c8a8454c20f504e38557abd8ea253a1b"}))))}get host(){return this}static get style(){return":host{display:none}:host([open]){display:contents}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)}.tooltip-content{box-sizing:border-box;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;overflow:hidden}"}},[257,"post-tooltip",{placement:[1],arrow:[4],open:[1540],show:[64],hide:[64],toggle:[64]}]);function d(){"undefined"!=typeof customElements&&["post-tooltip","post-popovercontainer"].forEach((e=>{switch(e){case"post-tooltip":customElements.get(r(e))||customElements.define(r(e),n);break;case"post-popovercontainer":customElements.get(r(e))||a()}}))}(function(e,o,t,s){var r,a=arguments.length,i=a<3?o:null===s?s=Object.getOwnPropertyDescriptor(o,t):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,o,t,s);else for(var p=e.length-1;p>=0;p--)(r=e[p])&&(i=(a<3?r(i):a>3?r(o,t,i):r(o,t))||i);a>3&&i&&Object.defineProperty(o,t,i)})([c(i)],n.prototype,"placement",void 0),d();const l=n,h=d;export{l as PostTooltip,h as defineCustomElement}
|
package/dist/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-
|
|
2
|
+
"timestamp": "2026-11-12T15:47:52",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.43.3",
|
|
@@ -2735,7 +2735,7 @@
|
|
|
2735
2735
|
},
|
|
2736
2736
|
"cancelable": true,
|
|
2737
2737
|
"composed": true,
|
|
2738
|
-
"docs": "",
|
|
2738
|
+
"docs": "An event emitted when the active language changes. The payload is the ISO 639 code of the newly active language.",
|
|
2739
2739
|
"docsTags": []
|
|
2740
2740
|
}
|
|
2741
2741
|
],
|
|
@@ -4753,12 +4753,12 @@
|
|
|
4753
4753
|
"filePath": "src/components/post-popovercontainer/post-popovercontainer.tsx",
|
|
4754
4754
|
"encapsulation": "shadow",
|
|
4755
4755
|
"tag": "post-popovercontainer",
|
|
4756
|
-
"readme": "# post-
|
|
4756
|
+
"readme": "# post-popovercontainer\n",
|
|
4757
4757
|
"docs": "",
|
|
4758
4758
|
"docsTags": [
|
|
4759
4759
|
{
|
|
4760
4760
|
"name": "slot",
|
|
4761
|
-
"text": "- Default slot for placing content inside the
|
|
4761
|
+
"text": "- Default slot for placing content inside the popover."
|
|
4762
4762
|
}
|
|
4763
4763
|
],
|
|
4764
4764
|
"usage": {},
|
|
@@ -4774,7 +4774,7 @@
|
|
|
4774
4774
|
"mutable": false,
|
|
4775
4775
|
"attr": "arrow",
|
|
4776
4776
|
"reflectToAttr": false,
|
|
4777
|
-
"docs": "
|
|
4777
|
+
"docs": "Show a little indicator arrow",
|
|
4778
4778
|
"docsTags": [
|
|
4779
4779
|
{
|
|
4780
4780
|
"name": "default",
|
|
@@ -4803,7 +4803,30 @@
|
|
|
4803
4803
|
"mutable": false,
|
|
4804
4804
|
"attr": "auto-hide",
|
|
4805
4805
|
"reflectToAttr": false,
|
|
4806
|
-
"docs": "Whether to automatically hide the popover when the
|
|
4806
|
+
"docs": "Whether to automatically hide the popover when the anchor moves outside the scrollport.\n\nIf the `post-header` can cover the anchor, the popover will also be hidden as soon as the\nanchor scrolls behind it.",
|
|
4807
|
+
"docsTags": [],
|
|
4808
|
+
"values": [
|
|
4809
|
+
{
|
|
4810
|
+
"type": "boolean"
|
|
4811
|
+
}
|
|
4812
|
+
],
|
|
4813
|
+
"optional": true,
|
|
4814
|
+
"required": false,
|
|
4815
|
+
"getter": false,
|
|
4816
|
+
"setter": false
|
|
4817
|
+
},
|
|
4818
|
+
{
|
|
4819
|
+
"name": "autoResize",
|
|
4820
|
+
"type": "boolean",
|
|
4821
|
+
"complexType": {
|
|
4822
|
+
"original": "boolean",
|
|
4823
|
+
"resolved": "boolean",
|
|
4824
|
+
"references": {}
|
|
4825
|
+
},
|
|
4826
|
+
"mutable": false,
|
|
4827
|
+
"attr": "auto-resize",
|
|
4828
|
+
"reflectToAttr": false,
|
|
4829
|
+
"docs": "Whether to keep resizing the popover while it is open.\n\nEvery popover is sized once when it opens: the space available around the anchor, minus the\n`edgeGap`, becomes the maximum width and height of the popover. The placement is then\nrecalculated for that size.\n\nWith `autoResize`, the popover's size is recalculated on every position update, for example\nwhen the anchor moves while scrolling.",
|
|
4807
4830
|
"docsTags": [],
|
|
4808
4831
|
"values": [
|
|
4809
4832
|
{
|
|
@@ -4826,7 +4849,7 @@
|
|
|
4826
4849
|
"mutable": false,
|
|
4827
4850
|
"attr": "edge-gap",
|
|
4828
4851
|
"reflectToAttr": false,
|
|
4829
|
-
"docs": "Gap between the edge of the
|
|
4852
|
+
"docs": "Gap between the edge of the viewport and the popover.",
|
|
4830
4853
|
"docsTags": [
|
|
4831
4854
|
{
|
|
4832
4855
|
"name": "default",
|
|
@@ -4885,7 +4908,7 @@
|
|
|
4885
4908
|
"mutable": false,
|
|
4886
4909
|
"attr": "placement",
|
|
4887
4910
|
"reflectToAttr": false,
|
|
4888
|
-
"docs": "
|
|
4911
|
+
"docs": "Placement of the popover according to the floating-ui options.",
|
|
4889
4912
|
"docsTags": [
|
|
4890
4913
|
{
|
|
4891
4914
|
"name": "default",
|
|
@@ -4950,25 +4973,20 @@
|
|
|
4950
4973
|
},
|
|
4951
4974
|
{
|
|
4952
4975
|
"name": "safeSpace",
|
|
4953
|
-
"type": "
|
|
4976
|
+
"type": "boolean",
|
|
4954
4977
|
"complexType": {
|
|
4955
|
-
"original": "
|
|
4956
|
-
"resolved": "
|
|
4978
|
+
"original": "boolean",
|
|
4979
|
+
"resolved": "boolean",
|
|
4957
4980
|
"references": {}
|
|
4958
4981
|
},
|
|
4959
4982
|
"mutable": false,
|
|
4960
4983
|
"attr": "safe-space",
|
|
4961
4984
|
"reflectToAttr": true,
|
|
4962
|
-
"docs": "
|
|
4985
|
+
"docs": "Whether to add a space through which the mouse can move without the popover being hidden.",
|
|
4963
4986
|
"docsTags": [],
|
|
4964
4987
|
"values": [
|
|
4965
4988
|
{
|
|
4966
|
-
"
|
|
4967
|
-
"type": "string"
|
|
4968
|
-
},
|
|
4969
|
-
{
|
|
4970
|
-
"value": "triangle",
|
|
4971
|
-
"type": "string"
|
|
4989
|
+
"type": "boolean"
|
|
4972
4990
|
}
|
|
4973
4991
|
],
|
|
4974
4992
|
"optional": true,
|
|
@@ -4997,7 +5015,7 @@
|
|
|
4997
5015
|
},
|
|
4998
5016
|
"signature": "hide() => Promise<void>",
|
|
4999
5017
|
"parameters": [],
|
|
5000
|
-
"docs": "
|
|
5018
|
+
"docs": "Hides the popover.",
|
|
5001
5019
|
"docsTags": []
|
|
5002
5020
|
},
|
|
5003
5021
|
{
|
|
@@ -5007,12 +5025,12 @@
|
|
|
5007
5025
|
"docs": ""
|
|
5008
5026
|
},
|
|
5009
5027
|
"complexType": {
|
|
5010
|
-
"signature": "(
|
|
5028
|
+
"signature": "(anchor: HTMLElement) => Promise<void>",
|
|
5011
5029
|
"parameters": [
|
|
5012
5030
|
{
|
|
5013
|
-
"name": "
|
|
5031
|
+
"name": "anchor",
|
|
5014
5032
|
"type": "HTMLElement",
|
|
5015
|
-
"docs": "
|
|
5033
|
+
"docs": "the element that the popover is visually anchored to."
|
|
5016
5034
|
}
|
|
5017
5035
|
],
|
|
5018
5036
|
"references": {
|
|
@@ -5027,19 +5045,19 @@
|
|
|
5027
5045
|
},
|
|
5028
5046
|
"return": "Promise<void>"
|
|
5029
5047
|
},
|
|
5030
|
-
"signature": "show(
|
|
5048
|
+
"signature": "show(anchor: HTMLElement) => Promise<void>",
|
|
5031
5049
|
"parameters": [
|
|
5032
5050
|
{
|
|
5033
|
-
"name": "
|
|
5051
|
+
"name": "anchor",
|
|
5034
5052
|
"type": "HTMLElement",
|
|
5035
|
-
"docs": "
|
|
5053
|
+
"docs": "the element that the popover is visually anchored to."
|
|
5036
5054
|
}
|
|
5037
5055
|
],
|
|
5038
|
-
"docs": "
|
|
5056
|
+
"docs": "Shows the popover.",
|
|
5039
5057
|
"docsTags": [
|
|
5040
5058
|
{
|
|
5041
5059
|
"name": "param",
|
|
5042
|
-
"text": "
|
|
5060
|
+
"text": "anchor the element that the popover is visually anchored to."
|
|
5043
5061
|
}
|
|
5044
5062
|
]
|
|
5045
5063
|
},
|
|
@@ -5047,20 +5065,20 @@
|
|
|
5047
5065
|
"name": "toggle",
|
|
5048
5066
|
"returns": {
|
|
5049
5067
|
"type": "Promise<boolean>",
|
|
5050
|
-
"docs": ""
|
|
5068
|
+
"docs": "the new state of the popover: `true` if it is shown, `false` if it is hidden."
|
|
5051
5069
|
},
|
|
5052
5070
|
"complexType": {
|
|
5053
|
-
"signature": "(
|
|
5071
|
+
"signature": "(anchor: HTMLElement, force?: boolean) => Promise<boolean>",
|
|
5054
5072
|
"parameters": [
|
|
5055
5073
|
{
|
|
5056
|
-
"name": "
|
|
5074
|
+
"name": "anchor",
|
|
5057
5075
|
"type": "HTMLElement",
|
|
5058
|
-
"docs": "
|
|
5076
|
+
"docs": "the element that the popover is visually anchored to."
|
|
5059
5077
|
},
|
|
5060
5078
|
{
|
|
5061
5079
|
"name": "force",
|
|
5062
5080
|
"type": "boolean",
|
|
5063
|
-
"docs": "
|
|
5081
|
+
"docs": "the next state of the popover."
|
|
5064
5082
|
}
|
|
5065
5083
|
],
|
|
5066
5084
|
"references": {
|
|
@@ -5075,28 +5093,32 @@
|
|
|
5075
5093
|
},
|
|
5076
5094
|
"return": "Promise<boolean>"
|
|
5077
5095
|
},
|
|
5078
|
-
"signature": "toggle(
|
|
5096
|
+
"signature": "toggle(anchor: HTMLElement, force?: boolean) => Promise<boolean>",
|
|
5079
5097
|
"parameters": [
|
|
5080
5098
|
{
|
|
5081
|
-
"name": "
|
|
5099
|
+
"name": "anchor",
|
|
5082
5100
|
"type": "HTMLElement",
|
|
5083
|
-
"docs": "
|
|
5101
|
+
"docs": "the element that the popover is visually anchored to."
|
|
5084
5102
|
},
|
|
5085
5103
|
{
|
|
5086
5104
|
"name": "force",
|
|
5087
5105
|
"type": "boolean",
|
|
5088
|
-
"docs": "
|
|
5106
|
+
"docs": "the next state of the popover."
|
|
5089
5107
|
}
|
|
5090
5108
|
],
|
|
5091
|
-
"docs": "
|
|
5109
|
+
"docs": "Toggles the popover's state from hidden to showing and vice versa.\n\nIf `state` is specified, the popover is forced to be shown if the is set to `true`, or hidden\nif it is set to `false`.",
|
|
5092
5110
|
"docsTags": [
|
|
5093
5111
|
{
|
|
5094
5112
|
"name": "param",
|
|
5095
|
-
"text": "
|
|
5113
|
+
"text": "anchor the element that the popover is visually anchored to."
|
|
5096
5114
|
},
|
|
5097
5115
|
{
|
|
5098
5116
|
"name": "param",
|
|
5099
|
-
"text": "force
|
|
5117
|
+
"text": "force the next state of the popover."
|
|
5118
|
+
},
|
|
5119
|
+
{
|
|
5120
|
+
"name": "returns",
|
|
5121
|
+
"text": "the new state of the popover: `true` if it is shown, `false` if it is hidden."
|
|
5100
5122
|
}
|
|
5101
5123
|
]
|
|
5102
5124
|
}
|
|
@@ -5113,7 +5135,7 @@
|
|
|
5113
5135
|
},
|
|
5114
5136
|
"cancelable": true,
|
|
5115
5137
|
"composed": true,
|
|
5116
|
-
"docs": "
|
|
5138
|
+
"docs": "Emitted just before the popover is shown.\n\nThe payload contains a `first` boolean, that is set to `true` when the popover is about to be\nshown for the first time.",
|
|
5117
5139
|
"docsTags": []
|
|
5118
5140
|
},
|
|
5119
5141
|
{
|
|
@@ -5127,7 +5149,7 @@
|
|
|
5127
5149
|
},
|
|
5128
5150
|
"cancelable": true,
|
|
5129
5151
|
"composed": true,
|
|
5130
|
-
"docs": "
|
|
5152
|
+
"docs": "Emitted just before the popover's state changes.\n\nThe payload contains a `willOpen` boolean, that is set to `true` when the popover is about to\nbe shown, `false` when it is about to be hidden.",
|
|
5131
5153
|
"docsTags": []
|
|
5132
5154
|
},
|
|
5133
5155
|
{
|
|
@@ -5141,7 +5163,7 @@
|
|
|
5141
5163
|
},
|
|
5142
5164
|
"cancelable": true,
|
|
5143
5165
|
"composed": true,
|
|
5144
|
-
"docs": "
|
|
5166
|
+
"docs": "Emitted just after the popover is hidden.",
|
|
5145
5167
|
"docsTags": []
|
|
5146
5168
|
},
|
|
5147
5169
|
{
|
|
@@ -5155,7 +5177,7 @@
|
|
|
5155
5177
|
},
|
|
5156
5178
|
"cancelable": true,
|
|
5157
5179
|
"composed": true,
|
|
5158
|
-
"docs": "
|
|
5180
|
+
"docs": "Emitted just after the popover is shown.\n\nThe payload contains a `first` boolean, that is set to `true` when the popover is shown for the\nfirst time.",
|
|
5159
5181
|
"docsTags": []
|
|
5160
5182
|
},
|
|
5161
5183
|
{
|
|
@@ -5169,7 +5191,7 @@
|
|
|
5169
5191
|
},
|
|
5170
5192
|
"cancelable": true,
|
|
5171
5193
|
"composed": true,
|
|
5172
|
-
"docs": "
|
|
5194
|
+
"docs": "Emitted just after the popover's state changes.\n\nThe payload contains a `isOpen` boolean, that is set to `true` when the popover is shown,\n`false` when it is hidden.",
|
|
5173
5195
|
"docsTags": []
|
|
5174
5196
|
}
|
|
5175
5197
|
],
|
|
@@ -5178,7 +5200,7 @@
|
|
|
5178
5200
|
"slots": [
|
|
5179
5201
|
{
|
|
5180
5202
|
"name": "",
|
|
5181
|
-
"docs": "Default slot for placing content inside the
|
|
5203
|
+
"docs": "Default slot for placing content inside the popover."
|
|
5182
5204
|
}
|
|
5183
5205
|
],
|
|
5184
5206
|
"parts": [
|