@swisspost/design-system-components 10.0.0-next.72 → 10.0.0-next.76
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/{create-validator-decorator-Bnx17kwi.js → create-validator-decorator-4dRrOF30.js} +1 -1
- package/dist/cjs/{index-ngUOBQot.js → index-BqngpwGa.js} +56 -15
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{one-of-BHyX4vYq.js → one-of-D1veqtsm.js} +1 -1
- package/dist/cjs/{package-Bi-tiNRc.js → package-B0PdQ0Dm.js} +1 -1
- package/dist/cjs/{pattern-BgBx5zGQ.js → pattern-B7VKOu5m.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +10 -12
- package/dist/cjs/post-autocomplete.cjs.entry.js +6 -6
- package/dist/cjs/post-avatar.cjs.entry.js +7 -7
- package/dist/cjs/post-back-to-top.cjs.entry.js +6 -6
- package/dist/cjs/post-banner.cjs.entry.js +6 -6
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +8 -8
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +9 -11
- package/dist/cjs/post-closebutton_14.cjs.entry.js +86 -62
- package/dist/cjs/post-collapsible_2.cjs.entry.js +6 -6
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-date-picker.cjs.entry.js +427 -257
- 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 +3 -3
- package/dist/cjs/post-number-input.cjs.entry.js +6 -5
- package/dist/cjs/post-pagination.cjs.entry.js +15 -10
- package/dist/cjs/post-popover-trigger.cjs.entry.js +5 -5
- package/dist/cjs/post-popover.cjs.entry.js +11 -12
- 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 +109 -0
- package/dist/cjs/post-side-navigation.cjs.entry.js +140 -0
- package/dist/cjs/post-stepper-item.cjs.entry.js +4 -4
- package/dist/cjs/post-stepper.cjs.entry.js +9 -7
- package/dist/cjs/post-tab-item.cjs.entry.js +15 -14
- package/dist/cjs/post-tab-panel.cjs.entry.js +6 -6
- package/dist/cjs/post-tabs.cjs.entry.js +196 -74
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +7 -9
- package/dist/cjs/post-tooltip.cjs.entry.js +9 -10
- package/dist/cjs/{required-lRDOdbd6.js → required-Bkz8MOYa.js} +1 -1
- package/dist/cjs/{type-shT641Eo.js → type-D8eD1JMd.js} +1 -1
- package/dist/cjs/{url-DRUMqVBq.js → url-C7MnIIZ_.js} +1 -1
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/post-accordion/post-accordion.js +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +4 -36
- package/dist/collection/components/post-autocomplete/post-autocomplete.js +1 -1
- package/dist/collection/components/post-avatar/post-avatar.js +1 -1
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +1 -1
- package/dist/collection/components/post-banner/post-banner.css +2 -2
- package/dist/collection/components/post-banner/post-banner.js +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-breadcrumbs/post-breadcrumbs.js +2 -4
- package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
- package/dist/collection/components/post-closebutton/post-closebutton.js +22 -11
- package/dist/collection/components/post-closebutton/types.js +1 -1
- 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/accessibility-utils.js +59 -0
- package/dist/collection/components/post-date-picker/date-utils.js +102 -0
- package/dist/collection/components/post-date-picker/native-mask-element.js +36 -0
- package/dist/collection/components/post-date-picker/post-date-picker.css +1 -1
- package/dist/collection/components/post-date-picker/post-date-picker.js +224 -301
- package/dist/collection/components/post-footer/post-footer.js +1 -1
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +13 -11
- 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 +7 -5
- package/dist/collection/components/post-language-menu-item/post-language-menu-item.css +1 -1
- package/dist/collection/components/post-linkarea/post-linkarea.js +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.js +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 +9 -12
- 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 +3 -2
- package/dist/collection/components/post-pagination/post-pagination.css +1 -1
- package/dist/collection/components/post-pagination/post-pagination.js +11 -5
- package/dist/collection/components/post-popover/post-popover.js +12 -22
- 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 +17 -12
- 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 -0
- package/dist/collection/components/post-side-navigation/post-side-navigation.js +267 -0
- package/dist/collection/components/post-side-navigation/side-navigation-styles.js +1 -0
- package/dist/collection/components/post-side-navigation-trigger/post-side-navigation-trigger.css +1 -0
- package/dist/collection/components/post-side-navigation-trigger/post-side-navigation-trigger.js +154 -0
- package/dist/collection/components/post-stepper/post-stepper.js +3 -1
- package/dist/collection/components/post-stepper-item/post-stepper-item.css +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 +36 -19
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +3 -2
- package/dist/collection/components/post-tabs/post-tabs.css +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +255 -84
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +12 -22
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +2 -4
- package/dist/collection/types/element-api.js +3 -0
- package/dist/component-names.json +2 -1
- package/dist/components/index.d.ts +4 -2
- package/dist/components/index.js +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +1 -1
- package/dist/components/post-accordion2.js +1 -1
- package/dist/components/post-autocomplete.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-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-item.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.d.ts +11 -0
- package/dist/components/post-side-navigation-trigger.js +1 -0
- package/dist/components/{post-login-widget.d.ts → post-side-navigation.d.ts} +4 -4
- package/dist/components/post-side-navigation.js +1 -0
- 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-Bu2JeHDf.js → p-06VKKzxv.js} +1 -1
- package/dist/components/react/p-BkWqx_6U.js +1 -0
- package/dist/components/react/p-Chtl9X7o.js +1 -0
- package/dist/components/react/p-CrLBbthi.js +1 -0
- package/dist/components/react/{p-D1zw8FxT.js → p-D0kuUny7.js} +1 -1
- package/dist/components/react/{p-PM7l--ff.js → p-DKF__bJF.js} +1 -1
- package/dist/components/react/p-DkKOmXaG.js +1 -0
- package/dist/components/react/p-UdMqVxhd.js +1 -0
- package/dist/components/react/p-d02KpeUM.js +1 -0
- package/dist/components/react/{p-BZSAV0-K.js → p-gUhGka9h.js} +1 -1
- package/dist/components/react/{p-Cd1TsNm7.js → p-uQE3DVb8.js} +1 -1
- package/dist/components/react/{p-BxoRVIIr.js → p-wLn52OZT.js} +1 -1
- 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.d.ts +11 -0
- package/dist/components/react/post-side-navigation-trigger.js +1 -0
- package/dist/components/react/{post-login-widget.d.ts → post-side-navigation.d.ts} +4 -4
- package/dist/components/react/post-side-navigation.js +1 -0
- 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 +571 -529
- package/dist/esm/{create-validator-decorator-D8qwF5Qe.js → create-validator-decorator-CYYTw0AS.js} +1 -1
- package/dist/esm/{index-BbDawWJ5.js → index-DE1aWdqx.js} +56 -15
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{one-of-GPr3FflU.js → one-of-Ug1_Xoes.js} +1 -1
- package/dist/esm/package-d02KpeUM.js +3 -0
- package/dist/esm/{pattern-BWPRYpYv.js → pattern-WLk4tOqI.js} +1 -1
- package/dist/esm/post-accordion_2.entry.js +10 -12
- package/dist/esm/post-autocomplete.entry.js +6 -6
- package/dist/esm/post-avatar.entry.js +7 -7
- package/dist/esm/post-back-to-top.entry.js +6 -6
- package/dist/esm/post-banner.entry.js +6 -6
- package/dist/esm/post-breadcrumb-item.entry.js +8 -8
- package/dist/esm/post-breadcrumbs.entry.js +9 -11
- package/dist/esm/post-closebutton_14.entry.js +86 -62
- package/dist/esm/post-collapsible_2.entry.js +6 -6
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-date-picker.entry.js +427 -257
- 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 +3 -3
- package/dist/esm/post-number-input.entry.js +6 -5
- package/dist/esm/post-pagination.entry.js +15 -10
- package/dist/esm/post-popover-trigger.entry.js +5 -5
- package/dist/esm/post-popover.entry.js +11 -12
- 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 +107 -0
- package/dist/esm/post-side-navigation.entry.js +138 -0
- package/dist/esm/post-stepper-item.entry.js +4 -4
- package/dist/esm/post-stepper.entry.js +9 -7
- package/dist/esm/post-tab-item.entry.js +15 -14
- package/dist/esm/post-tab-panel.entry.js +6 -6
- package/dist/esm/post-tabs.entry.js +196 -74
- package/dist/esm/post-tooltip-trigger.entry.js +7 -9
- package/dist/esm/post-tooltip.entry.js +9 -10
- package/dist/esm/{required-uK-rZZjy.js → required-DeOhRbtk.js} +1 -1
- package/dist/esm/{type-obmwEgkM.js → type-S-4aPMGU.js} +1 -1
- package/dist/esm/{url-B28ByZCe.js → url-C8KSrmWc.js} +1 -1
- package/dist/post-components/{p-12047216.entry.js → p-0efb77f9.entry.js} +1 -1
- package/dist/post-components/p-1223e51d.entry.js +1 -0
- package/dist/post-components/{p-3b05e01d.entry.js → p-1878e9f8.entry.js} +1 -1
- package/dist/post-components/p-1eea2715.entry.js +1 -0
- package/dist/post-components/p-2233c37e.entry.js +1 -0
- package/dist/post-components/p-266e68a3.entry.js +1 -0
- package/dist/post-components/{p-00f55af5.entry.js → p-2a0b9ed0.entry.js} +1 -1
- package/dist/post-components/p-3c71d687.entry.js +1 -0
- package/dist/post-components/{p-IUnDBhPg.js → p-4-_BhJWV.js} +1 -1
- package/dist/post-components/{p-7f929bb9.entry.js → p-477c8c35.entry.js} +1 -1
- package/dist/post-components/{p-2c6b4e6a.entry.js → p-4b366aa0.entry.js} +1 -1
- package/dist/post-components/{p-53fd5230.entry.js → p-4c7750cd.entry.js} +1 -1
- package/dist/post-components/p-52e118e0.entry.js +1 -0
- package/dist/post-components/p-53f34806.entry.js +1 -0
- package/dist/post-components/p-621a81a7.entry.js +1 -0
- package/dist/post-components/p-85594193.entry.js +1 -0
- package/dist/post-components/p-89ea447b.entry.js +1 -0
- package/dist/post-components/p-8d8ac7ae.entry.js +1 -0
- package/dist/post-components/p-900dc8e1.entry.js +1 -0
- package/dist/post-components/p-93da9105.entry.js +1 -0
- package/dist/post-components/{p-d061773b.entry.js → p-95ad4d06.entry.js} +1 -1
- package/dist/post-components/p-9915ffee.entry.js +1 -0
- package/dist/post-components/{p-Ck2qPht6.js → p-B6uZASBE.js} +1 -1
- package/dist/post-components/{p-DSNGJB58.js → p-BDW1XHCO.js} +1 -1
- package/dist/post-components/{p-CVsNfXZd.js → p-CiOyV6Mo.js} +1 -1
- package/dist/post-components/p-DE1aWdqx.js +2 -0
- package/dist/post-components/{p-BRNqUiXj.js → p-DMiERazc.js} +1 -1
- package/dist/post-components/{p-D4F0BqBW.js → p-NPUljV0P.js} +1 -1
- package/dist/post-components/p-a08abdb2.entry.js +1 -0
- package/dist/post-components/p-a971ec25.entry.js +1 -0
- package/dist/post-components/{p-e2370e94.entry.js → p-ad69ed8c.entry.js} +1 -1
- package/dist/post-components/p-c11a8e06.entry.js +1 -0
- package/dist/post-components/p-d02KpeUM.js +1 -0
- package/dist/post-components/p-d9ce8f05.entry.js +1 -0
- package/dist/post-components/p-dcceab4e.entry.js +1 -0
- package/dist/post-components/{p-f1ca1d3f.entry.js → p-e219e22a.entry.js} +1 -1
- package/dist/post-components/{p-758fc84f.entry.js → p-f6c45fed.entry.js} +1 -1
- package/dist/post-components/post-components.css +2 -2
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +0 -8
- package/dist/types/components/post-closebutton/post-closebutton.d.ts +5 -2
- package/dist/types/components/post-closebutton/types.d.ts +1 -1
- package/dist/types/components/post-date-picker/accessibility-utils.d.ts +19 -0
- package/dist/types/components/post-date-picker/date-utils.d.ts +48 -0
- package/dist/types/components/post-date-picker/native-mask-element.d.ts +12 -0
- package/dist/types/components/post-date-picker/post-date-picker.d.ts +23 -62
- package/dist/types/components/post-header/post-header.d.ts +3 -2
- package/dist/types/components/post-language-menu/post-language-menu.d.ts +2 -1
- package/dist/types/components/post-menu/post-menu.d.ts +4 -4
- package/dist/types/components/post-popover/post-popover.d.ts +4 -5
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +2 -2
- package/dist/types/components/post-side-navigation/post-side-navigation.d.ts +62 -0
- package/dist/types/components/post-side-navigation/side-navigation-styles.d.ts +2 -0
- package/dist/types/components/post-side-navigation-trigger/post-side-navigation-trigger.d.ts +33 -0
- package/dist/types/components/post-tab-item/post-tab-item.d.ts +8 -4
- package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +1 -1
- package/dist/types/components/post-tabs/post-tabs.d.ts +37 -17
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +4 -5
- package/dist/types/components.d.ts +181 -164
- package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/vrt/helpers/header-variants.config.d.ts +1 -0
- package/dist/types/types/element-api.d.ts +3 -0
- package/dist/vrt/helpers/header-test-config.js +3 -2
- package/dist/vrt/helpers/header-variants.config.js +29 -2
- package/hydrate/index.js +1174 -682
- package/hydrate/index.mjs +1174 -682
- package/package.json +11 -12
- package/dist/cjs/long-press-event-Dx21Ojod.js +0 -276
- package/dist/cjs/post-login-widget.cjs.entry.js +0 -92
- package/dist/collection/components/post-accordion-item/heading-levels.js +0 -1
- package/dist/collection/components/post-login-widget/post-login-widget.css +0 -1
- package/dist/collection/components/post-login-widget/post-login-widget.js +0 -218
- package/dist/collection/components/post-tab-item/post-tab-item.css +0 -1
- package/dist/components/long-press-event.js +0 -8
- package/dist/components/post-avatar2.js +0 -1
- package/dist/components/post-login-widget.js +0 -1
- package/dist/components/react/p-85IGlhtB.js +0 -1
- package/dist/components/react/p-B9ZFuYey.js +0 -1
- package/dist/components/react/p-BNgqqRsB.js +0 -8
- package/dist/components/react/p-Bg9dtyzK.js +0 -1
- package/dist/components/react/p-Bn66acGG.js +0 -1
- package/dist/components/react/p-CkTAQJGd.js +0 -1
- package/dist/components/react/p-ClG-N42b.js +0 -1
- package/dist/components/react/p-DwuW52g5.js +0 -1
- package/dist/components/react/post-login-widget.js +0 -1
- package/dist/esm/long-press-event-BNgqqRsB.js +0 -274
- package/dist/esm/package-ClG-N42b.js +0 -3
- package/dist/esm/post-login-widget.entry.js +0 -90
- package/dist/post-components/p-0288484f.entry.js +0 -1
- package/dist/post-components/p-07cdd022.entry.js +0 -1
- package/dist/post-components/p-17df4e91.entry.js +0 -1
- package/dist/post-components/p-17e046fa.entry.js +0 -1
- package/dist/post-components/p-29bd31a0.entry.js +0 -1
- package/dist/post-components/p-5b7e6369.entry.js +0 -1
- package/dist/post-components/p-5f4ca179.entry.js +0 -1
- package/dist/post-components/p-62b6154a.entry.js +0 -1
- package/dist/post-components/p-686a6e22.entry.js +0 -1
- package/dist/post-components/p-9865f72c.entry.js +0 -1
- package/dist/post-components/p-99803d57.entry.js +0 -1
- package/dist/post-components/p-BNgqqRsB.js +0 -8
- package/dist/post-components/p-BbDawWJ5.js +0 -2
- package/dist/post-components/p-ClG-N42b.js +0 -1
- package/dist/post-components/p-a0e0a760.entry.js +0 -1
- package/dist/post-components/p-a850652d.entry.js +0 -1
- package/dist/post-components/p-aac1a8ea.entry.js +0 -1
- package/dist/post-components/p-b3f0f9a2.entry.js +0 -1
- package/dist/post-components/p-c37dba4b.entry.js +0 -1
- package/dist/post-components/p-f2e5f44e.entry.js +0 -1
- package/dist/post-components/p-ff98ada4.entry.js +0 -1
- package/dist/types/components/post-accordion-item/heading-levels.d.ts +0 -2
- package/dist/types/components/post-login-widget/post-login-widget.d.ts +0 -45
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-DE1aWdqx.js';
|
|
2
2
|
import { f as fade } from './fade-DsgPYmAa.js';
|
|
3
3
|
import './breakpoints-BQ3HlJPr.js';
|
|
4
4
|
import { c as componentOnReady } from './component-on-ready-lpWRZjJp.js';
|
|
5
|
-
import { v as version } from './package-
|
|
6
|
-
import {
|
|
5
|
+
import { v as version } from './package-d02KpeUM.js';
|
|
6
|
+
import { O as OneOf } from './one-of-Ug1_Xoes.js';
|
|
7
|
+
import { T as Type } from './type-S-4aPMGU.js';
|
|
7
8
|
import './utils-CoDiS_Ik.js';
|
|
8
|
-
import './create-validator-decorator-
|
|
9
|
+
import './create-validator-decorator-CYYTw0AS.js';
|
|
9
10
|
|
|
10
|
-
const postTabsCss = () =>
|
|
11
|
+
const postTabsCss = () => `: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-2) !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;outline-offset:calc(var(--post-device-spacing-padding-28) + -1*var(--post-device-border-width-default)) !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;outline-offset:calc(var(--post-device-spacing-padding-28) + -1*var(--post-device-border-width-default)) !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) + var(--post-device-grid-padding-inline-container)))}: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:calc(var(--post-container-offset) + var(--post-device-grid-padding-inline-container));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:calc(var(--post-container-offset) + var(--post-device-grid-padding-inline-container));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) + var(--post-device-grid-padding-inline-container));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-block-35)}:host(.page-tabs[size=small]) button.scroll-btn{top:var(--post-device-spacing-padding-block-8)}: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(.page-tabs:not([size=small])) .tabs-wrapper button.scroll-btn{height:var(--post-device-sizing-interactive-button-height-10);width:var(--post-device-sizing-interactive-button-width-1)}:host(.page-tabs:not([size=small])) .tabs-wrapper button.scroll-btn.scroll-btn-left{padding-inline:var(--post-device-spacing-padding-38) var(--post-device-spacing-padding-39)}:host(.page-tabs:not([size=small])) .tabs-wrapper button.scroll-btn.scroll-btn-right{padding-inline:var(--post-device-spacing-padding-39) var(--post-device-spacing-padding-38)}:host([size=small]) .tabs-wrapper button.scroll-btn{height:var(--post-device-sizing-interactive-button-size-1);width:var(--post-device-sizing-interactive-button-size-1)}:host([size=small]) .tabs-wrapper button.scroll-btn.scroll-btn-left{padding-inline:var(--post-device-spacing-padding-41) var(--post-device-spacing-padding-42)}:host([size=small]) .tabs-wrapper button.scroll-btn.scroll-btn-right{padding-inline:var(--post-device-spacing-padding-42) var(--post-device-spacing-padding-41)}:host([size=small]) .tabs-wrapper button.scroll-btn post-icon{height:var(--post-device-sizing-interactive-icon-size4);width:var(--post-device-sizing-interactive-icon-size4)}`;
|
|
11
12
|
|
|
12
13
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
13
14
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -23,14 +24,37 @@ const PostTabs = class {
|
|
|
23
24
|
constructor(hostRef) {
|
|
24
25
|
registerInstance(this, hostRef);
|
|
25
26
|
this.postChange = createEvent(this, "postChange");
|
|
27
|
+
this.showing = null;
|
|
28
|
+
this.hiding = null;
|
|
26
29
|
this.isLoaded = false;
|
|
27
|
-
this.
|
|
30
|
+
this.isPagesVariant = false;
|
|
31
|
+
this.showLeftScrollButton = false;
|
|
32
|
+
this.showRightScrollButton = false;
|
|
28
33
|
/**
|
|
29
|
-
*
|
|
30
|
-
* Changing this value after initialization has no effect.
|
|
31
|
-
* full width of the screen, from edge to edge.
|
|
34
|
+
* An accessible label for the "previous tab items" button.
|
|
32
35
|
*/
|
|
33
|
-
this.
|
|
36
|
+
this.textPrevTabItems = 'Previous tab items';
|
|
37
|
+
/**
|
|
38
|
+
* An accessible label for the "next tab items" button.
|
|
39
|
+
*/
|
|
40
|
+
this.textNextTabItems = 'Next tab items';
|
|
41
|
+
/**
|
|
42
|
+
* The size of the tabs, corresponding to the different designs in Figma.
|
|
43
|
+
* Default is 'large'.
|
|
44
|
+
*/
|
|
45
|
+
this.size = 'large';
|
|
46
|
+
// Handles the visibility of scroll buttons based on the scroll position of the tabs container
|
|
47
|
+
this.updateScrollButtons = () => {
|
|
48
|
+
if (!this.tabsContainer)
|
|
49
|
+
return;
|
|
50
|
+
const style = getComputedStyle(this.tabsContainer);
|
|
51
|
+
const paddingStart = Number.parseFloat(style.paddingInlineStart) || 0;
|
|
52
|
+
const paddingEnd = Number.parseFloat(style.paddingInlineEnd) || 0;
|
|
53
|
+
const contentWidth = this.tabsContainer.clientWidth - paddingStart - paddingEnd;
|
|
54
|
+
const scrollableWidth = this.tabsContainer.scrollWidth - paddingStart - paddingEnd;
|
|
55
|
+
this.showLeftScrollButton = this.tabsContainer.scrollLeft > 0;
|
|
56
|
+
this.showRightScrollButton = this.tabsContainer.scrollLeft + contentWidth < scrollableWidth;
|
|
57
|
+
};
|
|
34
58
|
}
|
|
35
59
|
get tabs() {
|
|
36
60
|
return Array.from(this.host.querySelectorAll('post-tab-item')).filter(tab => tab.closest('post-tabs') === this.host);
|
|
@@ -39,29 +63,38 @@ const PostTabs = class {
|
|
|
39
63
|
return Array.from(this.host.querySelectorAll('post-tab-panel')).filter(panel => panel.closest('post-tabs') === this.host);
|
|
40
64
|
}
|
|
41
65
|
validateLabel() {
|
|
42
|
-
if (this.
|
|
43
|
-
console.error(`[${this.host.localName}] Property "label" is required in
|
|
66
|
+
if (this.isPagesVariant && !this.label) {
|
|
67
|
+
console.error(`[${this.host.localName}] Property "label" is required in Pages variant. Received: ${JSON.stringify(this.label)}.`, this.host);
|
|
44
68
|
}
|
|
45
69
|
}
|
|
46
70
|
componentWillRender() {
|
|
47
|
-
this.
|
|
71
|
+
this.detectVariant();
|
|
48
72
|
}
|
|
49
73
|
componentDidLoad() {
|
|
74
|
+
// Programmatically associates the scroll buttons with the tabs container via the ARIA reflection API, avoiding the need for ID-based aria-controls attributes.
|
|
75
|
+
this.leftScrollButton.ariaControlsElements = [this.tabsContainer];
|
|
76
|
+
this.rightScrollButton.ariaControlsElements = [this.tabsContainer];
|
|
50
77
|
this.moveMisplacedTabs();
|
|
51
78
|
this.moveMisplacedPanels();
|
|
52
79
|
this.enableTabs();
|
|
80
|
+
this.handleScrollButtons();
|
|
53
81
|
this.setupContentObserver();
|
|
82
|
+
this.setupResizeObserver();
|
|
54
83
|
this.validateLabel();
|
|
55
|
-
if (this.
|
|
56
|
-
const activeTab = this.
|
|
84
|
+
if (this.isPagesVariant) {
|
|
85
|
+
const activeTab = this.findActivePagesTab();
|
|
57
86
|
if (activeTab) {
|
|
58
87
|
this.activateTab(activeTab);
|
|
88
|
+
this.scrollTabIntoView(activeTab);
|
|
59
89
|
}
|
|
60
90
|
}
|
|
61
91
|
else {
|
|
62
92
|
const tabToActivate = this.activeTab || this.tabs[0]?.name;
|
|
63
93
|
if (tabToActivate) {
|
|
64
94
|
void this.show(tabToActivate);
|
|
95
|
+
const activeTab = this.tabs.find(t => t.name === tabToActivate);
|
|
96
|
+
if (activeTab)
|
|
97
|
+
this.scrollTabIntoView(activeTab);
|
|
65
98
|
}
|
|
66
99
|
}
|
|
67
100
|
this.isLoaded = true;
|
|
@@ -76,35 +109,43 @@ const PostTabs = class {
|
|
|
76
109
|
this.hiding = null;
|
|
77
110
|
}
|
|
78
111
|
if (this.contentObserver) {
|
|
79
|
-
this.contentObserver
|
|
112
|
+
this.contentObserver?.disconnect();
|
|
80
113
|
}
|
|
114
|
+
this.resizeObserver?.disconnect();
|
|
115
|
+
// Remove scroll event listener
|
|
116
|
+
this.tabsContainer?.removeEventListener('scroll', this.updateScrollButtons);
|
|
81
117
|
}
|
|
82
118
|
setupContentObserver() {
|
|
83
119
|
const config = {
|
|
84
120
|
childList: true,
|
|
85
121
|
subtree: true,
|
|
86
122
|
attributes: true,
|
|
87
|
-
attributeFilter: ['data-
|
|
123
|
+
attributeFilter: ['data-pages-variant', 'aria-current'],
|
|
88
124
|
};
|
|
89
125
|
this.contentObserver = new MutationObserver(this.handleContentChange.bind(this));
|
|
90
|
-
this.contentObserver
|
|
126
|
+
this.contentObserver?.observe(this.host, config);
|
|
127
|
+
}
|
|
128
|
+
setupResizeObserver() {
|
|
129
|
+
this.resizeObserver = new ResizeObserver(this.updateScrollButtons);
|
|
130
|
+
this.resizeObserver.observe(this.tabsContainer);
|
|
91
131
|
}
|
|
92
132
|
handleContentChange(mutations) {
|
|
93
|
-
const shouldRedetect = this.
|
|
133
|
+
const shouldRedetect = this.shouldRedetectVariant(mutations);
|
|
94
134
|
const ariaCurrentChanged = this.hasAriaCurrentChanged(mutations);
|
|
95
|
-
if (ariaCurrentChanged && this.
|
|
96
|
-
this.
|
|
135
|
+
if (ariaCurrentChanged && this.isPagesVariant) {
|
|
136
|
+
this.updateActivePagesTab();
|
|
97
137
|
}
|
|
98
138
|
if (shouldRedetect) {
|
|
99
|
-
this.
|
|
139
|
+
this.handleVariantChange();
|
|
100
140
|
}
|
|
141
|
+
this.updateScrollButtons();
|
|
101
142
|
}
|
|
102
|
-
|
|
143
|
+
shouldRedetectVariant(mutations) {
|
|
103
144
|
return mutations.some(mutation => {
|
|
104
145
|
if (mutation.type === 'childList') {
|
|
105
146
|
return mutation.addedNodes.length > 0 || mutation.removedNodes.length > 0;
|
|
106
147
|
}
|
|
107
|
-
if (mutation.type === 'attributes' && mutation.attributeName === 'data-
|
|
148
|
+
if (mutation.type === 'attributes' && mutation.attributeName === 'data-pages-variant') {
|
|
108
149
|
return true;
|
|
109
150
|
}
|
|
110
151
|
return false;
|
|
@@ -113,25 +154,27 @@ const PostTabs = class {
|
|
|
113
154
|
hasAriaCurrentChanged(mutations) {
|
|
114
155
|
return mutations.some(mutation => mutation.type === 'attributes' && mutation.attributeName === 'aria-current');
|
|
115
156
|
}
|
|
116
|
-
|
|
117
|
-
const activeTab = this.
|
|
157
|
+
updateActivePagesTab() {
|
|
158
|
+
const activeTab = this.findActivePagesTab();
|
|
118
159
|
if (activeTab && activeTab !== this.currentActiveTab) {
|
|
119
160
|
this.activateTab(activeTab);
|
|
161
|
+
this.scrollTabIntoView(activeTab, 'smooth');
|
|
120
162
|
}
|
|
121
163
|
}
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
this.
|
|
125
|
-
if (
|
|
164
|
+
handleVariantChange() {
|
|
165
|
+
const previousVariant = this.isPagesVariant;
|
|
166
|
+
this.detectVariant();
|
|
167
|
+
if (previousVariant !== this.isPagesVariant) {
|
|
126
168
|
this.enableTabs();
|
|
127
169
|
this.initializeActiveTab();
|
|
128
170
|
}
|
|
129
171
|
}
|
|
130
172
|
initializeActiveTab() {
|
|
131
|
-
if (this.
|
|
132
|
-
const activeTab = this.
|
|
173
|
+
if (this.isPagesVariant) {
|
|
174
|
+
const activeTab = this.findActivePagesTab();
|
|
133
175
|
if (activeTab) {
|
|
134
176
|
this.activateTab(activeTab);
|
|
177
|
+
this.scrollTabIntoView(activeTab);
|
|
135
178
|
}
|
|
136
179
|
}
|
|
137
180
|
else {
|
|
@@ -141,21 +184,29 @@ const PostTabs = class {
|
|
|
141
184
|
}
|
|
142
185
|
}
|
|
143
186
|
}
|
|
144
|
-
|
|
145
|
-
//
|
|
146
|
-
// This works even before post-tab-item sets data-
|
|
147
|
-
const
|
|
187
|
+
detectVariant() {
|
|
188
|
+
// Identify Page Tabs variant by looking for anchor elements in tabs
|
|
189
|
+
// This works even before post-tab-item sets [data-pages-variant] attribute
|
|
190
|
+
const hasPages = this.tabs.some(tab => {
|
|
148
191
|
const hasAnchor = tab.querySelector('a') !== null;
|
|
149
|
-
const
|
|
150
|
-
return hasAnchor ||
|
|
192
|
+
const pagesVariantAttr = tab.dataset.pagesVariant === 'true';
|
|
193
|
+
return hasAnchor || pagesVariantAttr;
|
|
151
194
|
});
|
|
152
195
|
const hasPanels = this.panels.length > 0;
|
|
153
|
-
if (
|
|
154
|
-
throw new Error('PostTabs: Mixed mode detected. Cannot use both
|
|
196
|
+
if (hasPages && hasPanels) {
|
|
197
|
+
throw new Error('PostTabs: Mixed mode detected. Cannot use both Page Tabs (anchor elements) and Content Tabs (post-tab-panel elements) variants at the same time.');
|
|
198
|
+
}
|
|
199
|
+
this.isPagesVariant = hasPages;
|
|
200
|
+
// Removes variant related classes to reset the state and applies the newly detected variant
|
|
201
|
+
this.host.classList.remove('page-tabs', 'content-tabs');
|
|
202
|
+
if (this.isPagesVariant) {
|
|
203
|
+
this.host.classList.add('page-tabs');
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
this.host.classList.add('content-tabs');
|
|
155
207
|
}
|
|
156
|
-
this.isNavigationMode = hasNavigationTabs;
|
|
157
208
|
}
|
|
158
|
-
|
|
209
|
+
findActivePagesTab() {
|
|
159
210
|
return (this.tabs.find(tab => {
|
|
160
211
|
const anchor = tab.querySelector('a[aria-current="page"]');
|
|
161
212
|
return anchor !== null;
|
|
@@ -166,30 +217,55 @@ const PostTabs = class {
|
|
|
166
217
|
* Any other panel that was previously shown becomes hidden and its associated tab is unselected.
|
|
167
218
|
*/
|
|
168
219
|
async show(tabName) {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
220
|
+
try {
|
|
221
|
+
// do nothing if the tab is already active
|
|
222
|
+
if (tabName === this.currentActiveTab?.name) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
const previousTab = this.currentActiveTab;
|
|
226
|
+
const newTab = this.host.querySelector(`post-tab-item[name="${tabName}"]`);
|
|
227
|
+
if (!newTab)
|
|
228
|
+
return;
|
|
229
|
+
this.activateTab(newTab);
|
|
230
|
+
this.scrollTabIntoView(newTab, 'smooth');
|
|
231
|
+
// if a panel is currently being displayed, remove it from the view and complete the associated animation
|
|
232
|
+
if (this.showing) {
|
|
233
|
+
this.showing.finish();
|
|
234
|
+
this.showing = null;
|
|
235
|
+
}
|
|
236
|
+
// hide the currently visible panel only if no other animation is running
|
|
237
|
+
if (previousTab && !this.showing && !this.hiding)
|
|
238
|
+
this.hidePanel(previousTab.name);
|
|
239
|
+
if (await this.awaitAnimation(this.hiding))
|
|
240
|
+
return;
|
|
241
|
+
this.showSelectedPanel();
|
|
242
|
+
if (await this.awaitAnimation(this.showing))
|
|
243
|
+
return;
|
|
244
|
+
if (this.isLoaded && this.currentActiveTab)
|
|
245
|
+
this.postChange.emit(this.currentActiveTab.name);
|
|
172
246
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
if (this.showing) {
|
|
178
|
-
this.showing.finish();
|
|
179
|
-
this.showing = null;
|
|
247
|
+
catch (e) {
|
|
248
|
+
if (this.isAbortError(e))
|
|
249
|
+
return;
|
|
250
|
+
throw e;
|
|
180
251
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
252
|
+
}
|
|
253
|
+
// Awaits an animation; returns true if it was aborted (caller should bail out).
|
|
254
|
+
async awaitAnimation(animation) {
|
|
255
|
+
if (!animation)
|
|
256
|
+
return false;
|
|
257
|
+
try {
|
|
258
|
+
await animation.finished;
|
|
259
|
+
return false;
|
|
260
|
+
}
|
|
261
|
+
catch (e) {
|
|
262
|
+
if (this.isAbortError(e))
|
|
263
|
+
return true;
|
|
264
|
+
throw e;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
isAbortError(error) {
|
|
268
|
+
return (error instanceof DOMException || error instanceof Error) && error.name === 'AbortError';
|
|
193
269
|
}
|
|
194
270
|
moveMisplacedTabs() {
|
|
195
271
|
if (!this.tabs)
|
|
@@ -215,11 +291,11 @@ const PostTabs = class {
|
|
|
215
291
|
return;
|
|
216
292
|
this.tabs.forEach(async (tab) => {
|
|
217
293
|
await componentOnReady(tab);
|
|
218
|
-
// In
|
|
219
|
-
if (this.
|
|
294
|
+
// In Page Tabs variant, navigation is handled by the consumer's routing
|
|
295
|
+
if (this.isPagesVariant) {
|
|
220
296
|
return;
|
|
221
297
|
}
|
|
222
|
-
//
|
|
298
|
+
// Content Tabs variant: set up ARIA relationships and event handlers
|
|
223
299
|
if (tab.getAttribute('aria-controls'))
|
|
224
300
|
return;
|
|
225
301
|
const tabPanel = this.getPanel(tab.name);
|
|
@@ -235,6 +311,17 @@ const PostTabs = class {
|
|
|
235
311
|
e.preventDefault();
|
|
236
312
|
void this.show(tab.name);
|
|
237
313
|
}
|
|
314
|
+
if (e.key !== 'Home' && e.key !== 'End')
|
|
315
|
+
return;
|
|
316
|
+
e.preventDefault();
|
|
317
|
+
const enabledTabs = this.tabs.filter(t => !t.hasAttribute('disabled'));
|
|
318
|
+
if (enabledTabs.length === 0)
|
|
319
|
+
return;
|
|
320
|
+
const targetTab = e.key === 'Home' ? enabledTabs[0] : enabledTabs.at(-1);
|
|
321
|
+
if (targetTab) {
|
|
322
|
+
targetTab?.focus();
|
|
323
|
+
void this.show(targetTab.name);
|
|
324
|
+
}
|
|
238
325
|
});
|
|
239
326
|
tab.addEventListener('keydown', (e) => {
|
|
240
327
|
if (e.key === 'ArrowRight' || e.key === 'ArrowLeft')
|
|
@@ -249,14 +336,12 @@ const PostTabs = class {
|
|
|
249
336
|
activateTab(tab) {
|
|
250
337
|
// Deactivate previous tab
|
|
251
338
|
if (this.currentActiveTab) {
|
|
252
|
-
this.
|
|
253
|
-
if (!this.isNavigationMode) {
|
|
339
|
+
if (!this.isPagesVariant) {
|
|
254
340
|
this.currentActiveTab.setAttribute('aria-selected', 'false');
|
|
255
341
|
this.currentActiveTab.setAttribute('tabindex', '-1');
|
|
256
342
|
}
|
|
257
343
|
}
|
|
258
|
-
|
|
259
|
-
if (!this.isNavigationMode) {
|
|
344
|
+
if (!this.isPagesVariant) {
|
|
260
345
|
tab.setAttribute('aria-selected', 'true');
|
|
261
346
|
tab.setAttribute('tabindex', '0');
|
|
262
347
|
}
|
|
@@ -273,6 +358,8 @@ const PostTabs = class {
|
|
|
273
358
|
};
|
|
274
359
|
}
|
|
275
360
|
showSelectedPanel() {
|
|
361
|
+
if (!this.currentActiveTab)
|
|
362
|
+
return;
|
|
276
363
|
const panel = this.getPanel(this.currentActiveTab.name);
|
|
277
364
|
if (!panel)
|
|
278
365
|
return;
|
|
@@ -302,12 +389,44 @@ const PostTabs = class {
|
|
|
302
389
|
nextTab.focus();
|
|
303
390
|
void this.show(nextTab.name);
|
|
304
391
|
}
|
|
392
|
+
scrollTabs(direction) {
|
|
393
|
+
const sign = direction === 'prev' ? -1 : 1;
|
|
394
|
+
const style = getComputedStyle(this.tabsContainer);
|
|
395
|
+
const paddingStart = Number.parseFloat(style.paddingInlineStart) || 0;
|
|
396
|
+
const paddingEnd = Number.parseFloat(style.paddingInlineEnd) || 0;
|
|
397
|
+
const contentWidth = this.tabsContainer.clientWidth - paddingStart - paddingEnd;
|
|
398
|
+
this.tabsContainer.scrollBy({
|
|
399
|
+
left: sign * contentWidth,
|
|
400
|
+
behavior: 'smooth',
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
scrollTabIntoView(tab, behavior = 'instant') {
|
|
404
|
+
const container = this.tabsContainer;
|
|
405
|
+
const style = getComputedStyle(container);
|
|
406
|
+
const paddingStart = Number.parseFloat(style.paddingInlineStart) || 0;
|
|
407
|
+
const paddingEnd = Number.parseFloat(style.paddingInlineEnd) || 0;
|
|
408
|
+
const tabLeft = tab.offsetLeft;
|
|
409
|
+
const tabRight = tabLeft + tab.offsetWidth;
|
|
410
|
+
const containerLeft = container.scrollLeft + paddingStart;
|
|
411
|
+
const containerRight = containerLeft + container.clientWidth - paddingStart - paddingEnd;
|
|
412
|
+
if (tabLeft < containerLeft) {
|
|
413
|
+
container.scrollTo({ left: tabLeft - paddingStart, behavior });
|
|
414
|
+
}
|
|
415
|
+
else if (tabRight > containerRight) {
|
|
416
|
+
container.scrollTo({ left: tabRight - container.clientWidth + paddingEnd, behavior });
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
handleScrollButtons() {
|
|
420
|
+
this.updateScrollButtons();
|
|
421
|
+
this.tabsContainer.addEventListener('scroll', this.updateScrollButtons);
|
|
422
|
+
}
|
|
305
423
|
render() {
|
|
306
|
-
const TabsContainer = this.
|
|
307
|
-
|
|
424
|
+
const TabsContainer = this.isPagesVariant ? 'nav' : 'div';
|
|
425
|
+
const style = undefined;
|
|
426
|
+
return (h(Host, { key: '3e187db1375d551ac80bb4facced0ad4d01ec3fd', "data-version": version, style: style }, h("div", { key: '8efd1434819801304bb218bf8af2a9c570153d70', class: "tabs-wrapper", part: "post-tabs" }, h("button", { key: '50d03d1a84e1f92c915d11e9b161498bd938b713', 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: 'f767e493126954bd9246b4c161aa197f5fe48fcc', name: "chevronleft" })), h(TabsContainer, { key: 'f319b638b3fdfb46d5e793001192bb96e4763cca', ref: el => (this.tabsContainer = el), class: "tabs", role: this.isPagesVariant ? undefined : 'tablist', "aria-label": this.isPagesVariant ? this.label : undefined }, h("slot", { key: '65d15b30402eaf835f506f4cf24dd6373a632c52', onSlotchange: () => {
|
|
308
427
|
this.moveMisplacedTabs();
|
|
309
428
|
this.enableTabs();
|
|
310
|
-
} }))), !this.
|
|
429
|
+
} })), h("button", { key: 'f18317a83f6bd1c28c455ad6cfc8d58cd83c52d2', 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: 'fcc75e1de8c39f3e3e2864e3439e85881001c73c', name: "chevronright" }))), !this.isPagesVariant && (h("div", { key: '487435bf4d776f1771eff2c735e3476a05ef68c4', class: "tab-content", part: "post-tabs-content" }, h("slot", { key: 'bbe284adfc74d502a77ceaade18179101f6aaf30', name: "panels", onSlotchange: () => this.moveMisplacedPanels() })))));
|
|
311
430
|
}
|
|
312
431
|
get host() { return getElement(this); }
|
|
313
432
|
static get watchers() { return {
|
|
@@ -316,6 +435,9 @@ const PostTabs = class {
|
|
|
316
435
|
}]
|
|
317
436
|
}; }
|
|
318
437
|
};
|
|
438
|
+
__decorate([
|
|
439
|
+
OneOf(['small', 'large'])
|
|
440
|
+
], PostTabs.prototype, "size", void 0);
|
|
319
441
|
__decorate([
|
|
320
442
|
Type('string')
|
|
321
443
|
], PostTabs.prototype, "label", void 0);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-DE1aWdqx.js';
|
|
2
2
|
import './breakpoints-BQ3HlJPr.js';
|
|
3
|
-
import { v as version } from './package-
|
|
4
|
-
import { R as Required } from './required-
|
|
5
|
-
import { T as Type } from './type-
|
|
6
|
-
import './create-validator-decorator-
|
|
3
|
+
import { v as version } from './package-d02KpeUM.js';
|
|
4
|
+
import { R as Required } from './required-DeOhRbtk.js';
|
|
5
|
+
import { T as Type } from './type-S-4aPMGU.js';
|
|
6
|
+
import './create-validator-decorator-CYYTw0AS.js';
|
|
7
7
|
|
|
8
8
|
const postTooltipTriggerCss = () => `post-tooltip-trigger{vertical-align:top}:host{cursor:pointer}`;
|
|
9
9
|
|
|
@@ -17,7 +17,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
17
17
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
18
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
19
|
};
|
|
20
|
-
const TRIGGER_EVENTS = ['pointerenter', 'pointerleave', 'focusin', 'focusout'
|
|
20
|
+
const TRIGGER_EVENTS = ['pointerenter', 'pointerleave', 'focusin', 'focusout'];
|
|
21
21
|
let isFocusable;
|
|
22
22
|
const PostTooltipTrigger = class {
|
|
23
23
|
constructor(hostRef) {
|
|
@@ -43,8 +43,6 @@ const PostTooltipTrigger = class {
|
|
|
43
43
|
}
|
|
44
44
|
componentWillLoad() {
|
|
45
45
|
{
|
|
46
|
-
// Fire-and-forget: long-press-event registers a global event listener on import.
|
|
47
|
-
import('./long-press-event-BNgqqRsB.js');
|
|
48
46
|
// Load ally.js lazily; setupTrigger uses optional chaining to handle the
|
|
49
47
|
// case where it hasn't loaded yet (falls back to adding tabindex="0").
|
|
50
48
|
import('./focusable-C7afHKmo.js').then(function (n) { return n.f; }).then(m => {
|
|
@@ -184,7 +182,7 @@ const PostTooltipTrigger = class {
|
|
|
184
182
|
this.tooltip?.hide();
|
|
185
183
|
}
|
|
186
184
|
render() {
|
|
187
|
-
return (h(Host, { key: '
|
|
185
|
+
return (h(Host, { key: '37f835a46c96f1f97019b611da8b6be2d6e1a8d7', "data-version": version }, h("slot", { key: 'c2fc3d9080948fdcfbd8b2866730e76b770b87ba', onSlotchange: () => this.handleSlotChange() })));
|
|
188
186
|
}
|
|
189
187
|
get host() { return getElement(this); }
|
|
190
188
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-DE1aWdqx.js';
|
|
2
2
|
import { P as PLACEMENT_TYPES } from './placement-DRiVosES.js';
|
|
3
3
|
import './breakpoints-BQ3HlJPr.js';
|
|
4
|
-
import { v as version } from './package-
|
|
5
|
-
import { O as OneOf } from './one-of-
|
|
6
|
-
import './create-validator-decorator-
|
|
4
|
+
import { v as version } from './package-d02KpeUM.js';
|
|
5
|
+
import { O as OneOf } from './one-of-Ug1_Xoes.js';
|
|
6
|
+
import './create-validator-decorator-CYYTw0AS.js';
|
|
7
7
|
|
|
8
8
|
const postTooltipCss = () => `: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);width:inherit;word-wrap:break-word;white-space:normal}`;
|
|
9
9
|
|
|
@@ -43,8 +43,8 @@ const PostTooltip = class {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
|
-
* Programmatically display the tooltip
|
|
47
|
-
*
|
|
46
|
+
* Programmatically display the tooltip,
|
|
47
|
+
* `target` is the HTML element the menu is anchored to.
|
|
48
48
|
*/
|
|
49
49
|
async show(target) {
|
|
50
50
|
if (this.open)
|
|
@@ -58,9 +58,8 @@ const PostTooltip = class {
|
|
|
58
58
|
this.popoverRef.hide();
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
* Toggle tooltip display
|
|
62
|
-
*
|
|
63
|
-
* @param [force] Pass true to always show or false to always hide
|
|
61
|
+
* Toggle tooltip display,
|
|
62
|
+
* `target` is the HTML element the menu is anchored to.
|
|
64
63
|
*/
|
|
65
64
|
async toggle(target, force) {
|
|
66
65
|
this.popoverRef.toggle(target, force);
|
|
@@ -74,7 +73,7 @@ const PostTooltip = class {
|
|
|
74
73
|
}
|
|
75
74
|
render() {
|
|
76
75
|
const popoverClass = `${this.arrow ? 'has-arrow' : ''}`;
|
|
77
|
-
return (h(Host, { key: '
|
|
76
|
+
return (h(Host, { key: 'd49731becbb7395ec68cfae34d316a6248977b53', "data-version": version }, h("post-popovercontainer", { key: '12da18a58c2143ef4c2ddff207d081d091e6a40e', safeSpace: "trapezoid", class: popoverClass, role: "tooltip", arrow: this.arrow, placement: this.placement, onPostBeforeToggle: e => this.handleBeforeToggle(e), ref: (el) => (this.popoverRef = el) }, h("slot", { key: '5f941c0311eff468be1c6abe7cbcdab8ba272e15' }))));
|
|
78
77
|
}
|
|
79
78
|
get host() { return getElement(this); }
|
|
80
79
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createValidatorDecorator, g as getValidationContext, i as isValueEmpty, r as registerDependency } from './create-validator-decorator-
|
|
1
|
+
import { c as createValidatorDecorator, g as getValidationContext, i as isValueEmpty, r as registerDependency } from './create-validator-decorator-CYYTw0AS.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Property decorator that validates the property is not empty.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createValidatorDecorator, g as getValidationContext } from './create-validator-decorator-
|
|
1
|
+
import { c as createValidatorDecorator, g as getValidationContext } from './create-validator-decorator-CYYTw0AS.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Property decorator that validates the property value is of the specified type.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createValidatorDecorator, g as getValidationContext } from './create-validator-decorator-
|
|
1
|
+
import { c as createValidatorDecorator, g as getValidationContext } from './create-validator-decorator-CYYTw0AS.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Property decorator that validates the property value is a valid URL.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as o,h as e,H as i}from"./p-
|
|
1
|
+
import{r as t,c as o,h as e,H as i}from"./p-DE1aWdqx.js";import{v as s}from"./p-d02KpeUM.js";const n=class{constructor(e){t(this,e),this.postOptionSelected=o(this,"postOptionSelected"),this.optionId=crypto.randomUUID(),this.selected=!1,this.highlighted=!1}render(){return e(i,{key:"ff0e773f8a89f9df3996a83cd2be6247c1ab5475","data-version":s,role:"option","aria-selected":`${this.selected}`,"data-active":this.highlighted?"true":null,onPointerDown:t=>t.preventDefault(),onClick:()=>this.postOptionSelected.emit(this.value),id:`post-listbox-option-${this.optionId}`},e("span",{key:"cb43e8bec5f262ae25ddfdcae1b7f9979bdd6858",class:"option-content"},this.value,e("span",{key:"5b314c41073a357185613a04a07d2020e4eab300",class:"option-description"},e("slot",{key:"ac1ed1be98f9a348952c0169d7ec89f8aaa99474"}))),this.selected&&e("post-icon",{key:"7691085df732c0c2c5db9824587d54047017adf5","aria-hidden":"true",name:"checkmark"}))}};n.style=":host{padding:12px 12px 9px 16px;background-color:#fff;cursor:pointer;user-select:none;display:flex;align-items:center;gap:8px;justify-content:space-between}:host(:hover){background-color:#f0efed}:host([data-active=true]){outline:2px solid #000;outline-offset:-4px}:host([hidden]){display:none}:host(:focus-visible){outline:2px solid #050400;outline-offset:2px}.option-content{display:flex;flex-direction:column;min-width:0}.option-description{display:none;font-size:.85em;color:#666}:host(:not(:empty)) .option-description{display:block}post-icon{width:24px;height:24px}";export{n as post_listbox_option}
|