@swisspost/design-system-components 10.0.0-next.75 → 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-Bimhl6Ib.js → create-validator-decorator-4dRrOF30.js} +1 -1
- package/dist/cjs/{index-CyeY2muT.js → index-BqngpwGa.js} +11 -15
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{one-of-BVQP1dR3.js → one-of-D1veqtsm.js} +1 -1
- package/dist/cjs/{package-JSyXVavg.js → package-B0PdQ0Dm.js} +1 -1
- package/dist/cjs/{pattern-BDKu8-v6.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 +5 -5
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +7 -7
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +7 -7
- package/dist/cjs/post-closebutton_14.cjs.entry.js +41 -35
- 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 +5 -4
- package/dist/cjs/post-pagination.cjs.entry.js +5 -5
- 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 +7 -7
- package/dist/cjs/post-side-navigation.cjs.entry.js +18 -7
- 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 +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-BsZuSJAl.js → required-Bkz8MOYa.js} +1 -1
- package/dist/cjs/{type-DXpEWY0w.js → type-D8eD1JMd.js} +1 -1
- package/dist/cjs/{url-D-EbWRlF.js → url-C7MnIIZ_.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -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.js +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +1 -1
- package/dist/collection/components/post-closebutton/post-closebutton.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.js +6 -5
- package/dist/collection/components/post-icon/post-icon.js +1 -1
- package/dist/collection/components/post-language-menu/post-language-menu.js +7 -5
- 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.js +1 -1
- package/dist/collection/components/post-menu/post-menu.js +9 -12
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
- package/dist/collection/components/post-number-input/post-number-input.js +3 -2
- 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.js +13 -9
- 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 +38 -2
- 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 -1
- package/dist/collection/components/post-side-navigation-trigger/post-side-navigation-trigger.js +1 -1
- package/dist/collection/components/post-stepper/post-stepper.js +1 -1
- package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
- package/dist/collection/components/post-tab-item/post-tab-item.js +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 +0 -1
- package/dist/components/index.d.ts +0 -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-breadcrumbs.js +1 -1
- package/dist/components/post-closebutton2.js +1 -1
- package/dist/components/post-collapsible-trigger2.js +1 -1
- package/dist/components/post-collapsible2.js +1 -1
- package/dist/components/post-date-picker.js +1 -1
- package/dist/components/post-footer.js +1 -1
- package/dist/components/post-header.js +1 -1
- package/dist/components/post-icon2.js +1 -1
- package/dist/components/post-language-menu.js +1 -1
- package/dist/components/post-linkarea.js +1 -1
- package/dist/components/post-listbox-option.js +1 -1
- package/dist/components/post-listbox.js +1 -1
- package/dist/components/post-logo.js +1 -1
- package/dist/components/post-mainnavigation.js +1 -1
- package/dist/components/post-megadropdown-trigger.js +1 -1
- package/dist/components/post-megadropdown.js +1 -1
- package/dist/components/post-menu-trigger2.js +1 -1
- package/dist/components/post-menu2.js +1 -1
- package/dist/components/post-number-input.js +1 -1
- package/dist/components/post-popover-trigger.js +1 -1
- package/dist/components/post-popover.js +1 -1
- package/dist/components/post-popovercontainer2.js +1 -1
- package/dist/components/post-progressbar.js +1 -1
- package/dist/components/post-rating.js +1 -1
- package/dist/components/post-side-navigation-trigger.js +1 -1
- package/dist/components/post-side-navigation.js +1 -1
- package/dist/components/post-stepper-item.js +1 -1
- package/dist/components/post-stepper.js +1 -1
- package/dist/components/post-tab-item.js +1 -1
- package/dist/components/post-tab-panel.js +1 -1
- package/dist/components/post-tabs.js +1 -1
- package/dist/components/post-togglebutton2.js +1 -1
- package/dist/components/post-tooltip-trigger.js +1 -1
- package/dist/components/post-tooltip.js +1 -1
- package/dist/components/react/index.js +1 -1
- package/dist/components/react/{p-DU4XzTGt.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-CbU3QFNG.js → p-CrLBbthi.js} +1 -1
- package/dist/components/react/{p-BUSQG9af.js → p-D0kuUny7.js} +1 -1
- package/dist/components/react/{p-DNddZV_h.js → p-DKF__bJF.js} +1 -1
- package/dist/components/react/p-DkKOmXaG.js +1 -0
- package/dist/components/react/{p-ztiqEfbC.js → p-UdMqVxhd.js} +1 -1
- package/dist/components/react/p-d02KpeUM.js +1 -0
- package/dist/components/react/{p-B3ZJPCU0.js → p-gUhGka9h.js} +1 -1
- package/dist/components/react/{p-BUAS73l8.js → p-uQE3DVb8.js} +1 -1
- package/dist/components/react/{p-DTg2SXJj.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.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 +287 -473
- package/dist/esm/{create-validator-decorator-BNkS_yAb.js → create-validator-decorator-CYYTw0AS.js} +1 -1
- package/dist/esm/{index-BGeKgZqi.js → index-DE1aWdqx.js} +11 -15
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{one-of-4BD_5pKR.js → one-of-Ug1_Xoes.js} +1 -1
- package/dist/esm/package-d02KpeUM.js +3 -0
- package/dist/esm/{pattern-D7tnGo1u.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 +5 -5
- package/dist/esm/post-breadcrumb-item.entry.js +7 -7
- package/dist/esm/post-breadcrumbs.entry.js +7 -7
- package/dist/esm/post-closebutton_14.entry.js +41 -35
- 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 +5 -4
- package/dist/esm/post-pagination.entry.js +5 -5
- 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 +7 -7
- package/dist/esm/post-side-navigation.entry.js +18 -7
- 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 +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-DhBxDSbP.js → required-DeOhRbtk.js} +1 -1
- package/dist/esm/{type-icZlikjf.js → type-S-4aPMGU.js} +1 -1
- package/dist/esm/{url-B_2x2YCy.js → url-C8KSrmWc.js} +1 -1
- package/dist/post-components/p-0efb77f9.entry.js +1 -0
- package/dist/post-components/p-1223e51d.entry.js +1 -0
- package/dist/post-components/{p-41b5dbfc.entry.js → p-1878e9f8.entry.js} +1 -1
- package/dist/post-components/{p-97c1f070.entry.js → p-1eea2715.entry.js} +1 -1
- package/dist/post-components/{p-3e83aa1f.entry.js → p-2233c37e.entry.js} +1 -1
- package/dist/post-components/p-266e68a3.entry.js +1 -0
- package/dist/post-components/{p-0a08ae23.entry.js → p-2a0b9ed0.entry.js} +1 -1
- package/dist/post-components/p-3c71d687.entry.js +1 -0
- package/dist/post-components/{p-D2ex14Ye.js → p-4-_BhJWV.js} +1 -1
- package/dist/post-components/{p-15fa7e60.entry.js → p-477c8c35.entry.js} +1 -1
- package/dist/post-components/{p-fac58cbd.entry.js → p-4b366aa0.entry.js} +1 -1
- package/dist/post-components/{p-923439d1.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-9e240299.entry.js → p-8d8ac7ae.entry.js} +1 -1
- 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-6cbb2e7f.entry.js → p-95ad4d06.entry.js} +1 -1
- package/dist/post-components/{p-aff9dd5e.entry.js → p-9915ffee.entry.js} +1 -1
- package/dist/post-components/p-B6uZASBE.js +1 -0
- package/dist/post-components/{p-CIbyqT6u.js → p-BDW1XHCO.js} +1 -1
- package/dist/post-components/p-CiOyV6Mo.js +1 -0
- package/dist/post-components/p-DE1aWdqx.js +2 -0
- package/dist/post-components/{p-8SvFxSp6.js → p-DMiERazc.js} +1 -1
- package/dist/post-components/{p-DH5JdN6V.js → p-NPUljV0P.js} +1 -1
- package/dist/post-components/p-a08abdb2.entry.js +1 -0
- package/dist/post-components/{p-9ec32e7b.entry.js → p-a971ec25.entry.js} +1 -1
- package/dist/post-components/{p-eca119d2.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-e54a6be0.entry.js → p-d9ce8f05.entry.js} +1 -1
- package/dist/post-components/{p-5d20cbcb.entry.js → p-dcceab4e.entry.js} +1 -1
- package/dist/post-components/{p-84c8d952.entry.js → p-e219e22a.entry.js} +1 -1
- package/dist/post-components/{p-7ee4b829.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-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 +2 -1
- 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 +6 -0
- package/dist/types/components/post-side-navigation/side-navigation-styles.d.ts +2 -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 +90 -164
- package/dist/types/types/element-api.d.ts +3 -0
- package/hydrate/index.js +812 -596
- package/hydrate/index.mjs +812 -596
- 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.d.ts +0 -11
- package/dist/components/post-login-widget.js +0 -1
- package/dist/components/react/p-BNgqqRsB.js +0 -8
- package/dist/components/react/p-C7aYEQh5.js +0 -1
- package/dist/components/react/p-CdhbouMD.js +0 -1
- package/dist/components/react/p-Ci08Eesw.js +0 -1
- package/dist/components/react/p-DWlDkwjY.js +0 -1
- package/dist/components/react/p-wqJxIo5L.js +0 -1
- package/dist/components/react/post-login-widget.d.ts +0 -11
- package/dist/components/react/post-login-widget.js +0 -1
- package/dist/esm/long-press-event-BNgqqRsB.js +0 -274
- package/dist/esm/package-CdhbouMD.js +0 -3
- package/dist/esm/post-login-widget.entry.js +0 -90
- package/dist/post-components/p-001f58d8.entry.js +0 -1
- package/dist/post-components/p-12c8b073.entry.js +0 -1
- package/dist/post-components/p-1839276a.entry.js +0 -1
- package/dist/post-components/p-28eeb5d8.entry.js +0 -1
- package/dist/post-components/p-6a1c4897.entry.js +0 -1
- package/dist/post-components/p-6d14f78a.entry.js +0 -1
- package/dist/post-components/p-6e8b6249.entry.js +0 -1
- package/dist/post-components/p-71918d59.entry.js +0 -1
- package/dist/post-components/p-8139b0cc.entry.js +0 -1
- package/dist/post-components/p-87ebb213.entry.js +0 -1
- package/dist/post-components/p-89da6378.entry.js +0 -1
- package/dist/post-components/p-8caaa149.entry.js +0 -1
- package/dist/post-components/p-BGeKgZqi.js +0 -2
- package/dist/post-components/p-BNgqqRsB.js +0 -8
- package/dist/post-components/p-CdhbouMD.js +0 -1
- package/dist/post-components/p-DiBqDD4N.js +0 -1
- package/dist/post-components/p-I6rSjhbA.js +0 -1
- package/dist/post-components/p-c905a97c.entry.js +0 -1
- package/dist/post-components/p-f9529d40.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,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BqngpwGa.js');
|
|
4
4
|
require('./breakpoints-B0Olgvgc.js');
|
|
5
5
|
var nanoid = require('./nanoid-CmjyF1Cm.js');
|
|
6
|
-
var _package = require('./package-
|
|
7
|
-
var required = require('./required-
|
|
8
|
-
var type = require('./type-
|
|
9
|
-
require('./create-validator-decorator-
|
|
6
|
+
var _package = require('./package-B0PdQ0Dm.js');
|
|
7
|
+
var required = require('./required-Bkz8MOYa.js');
|
|
8
|
+
var type = require('./type-D8eD1JMd.js');
|
|
9
|
+
require('./create-validator-decorator-4dRrOF30.js');
|
|
10
10
|
|
|
11
11
|
const postTabPanelCss = () => `:host{display:none}`;
|
|
12
12
|
|
|
@@ -29,7 +29,7 @@ const PostTabPanel = class {
|
|
|
29
29
|
this.panelId = `panel-${this.host.id || nanoid.nanoid(6)}`;
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
|
-
return (index.h(index.Host, { key: '
|
|
32
|
+
return (index.h(index.Host, { key: '07d93ddaa69253a956ed50cd9ecd6ed039fbc6e2', "data-version": _package.version, id: this.panelId, role: "tabpanel", slot: "panels", style: undefined }, index.h("slot", { key: 'd6887db4e0e4dc22f8f8fdf098d6068ef4bd1a91' })));
|
|
33
33
|
}
|
|
34
34
|
get host() { return index.getElement(this); }
|
|
35
35
|
};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BqngpwGa.js');
|
|
4
4
|
var fade = require('./fade-CPQhl1fP.js');
|
|
5
5
|
require('./breakpoints-B0Olgvgc.js');
|
|
6
6
|
var componentOnReady = require('./component-on-ready-CifOTqw1.js');
|
|
7
|
-
var _package = require('./package-
|
|
8
|
-
var
|
|
7
|
+
var _package = require('./package-B0PdQ0Dm.js');
|
|
8
|
+
var oneOf = require('./one-of-D1veqtsm.js');
|
|
9
|
+
var type = require('./type-D8eD1JMd.js');
|
|
9
10
|
require('./utils-s05L2ulk.js');
|
|
10
|
-
require('./create-validator-decorator-
|
|
11
|
+
require('./create-validator-decorator-4dRrOF30.js');
|
|
11
12
|
|
|
12
|
-
const postTabsCss = () =>
|
|
13
|
+
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)}`;
|
|
13
14
|
|
|
14
15
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15
16
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -25,14 +26,37 @@ const PostTabs = class {
|
|
|
25
26
|
constructor(hostRef) {
|
|
26
27
|
index.registerInstance(this, hostRef);
|
|
27
28
|
this.postChange = index.createEvent(this, "postChange");
|
|
29
|
+
this.showing = null;
|
|
30
|
+
this.hiding = null;
|
|
28
31
|
this.isLoaded = false;
|
|
29
|
-
this.
|
|
32
|
+
this.isPagesVariant = false;
|
|
33
|
+
this.showLeftScrollButton = false;
|
|
34
|
+
this.showRightScrollButton = false;
|
|
30
35
|
/**
|
|
31
|
-
*
|
|
32
|
-
* Changing this value after initialization has no effect.
|
|
33
|
-
* full width of the screen, from edge to edge.
|
|
36
|
+
* An accessible label for the "previous tab items" button.
|
|
34
37
|
*/
|
|
35
|
-
this.
|
|
38
|
+
this.textPrevTabItems = 'Previous tab items';
|
|
39
|
+
/**
|
|
40
|
+
* An accessible label for the "next tab items" button.
|
|
41
|
+
*/
|
|
42
|
+
this.textNextTabItems = 'Next tab items';
|
|
43
|
+
/**
|
|
44
|
+
* The size of the tabs, corresponding to the different designs in Figma.
|
|
45
|
+
* Default is 'large'.
|
|
46
|
+
*/
|
|
47
|
+
this.size = 'large';
|
|
48
|
+
// Handles the visibility of scroll buttons based on the scroll position of the tabs container
|
|
49
|
+
this.updateScrollButtons = () => {
|
|
50
|
+
if (!this.tabsContainer)
|
|
51
|
+
return;
|
|
52
|
+
const style = getComputedStyle(this.tabsContainer);
|
|
53
|
+
const paddingStart = Number.parseFloat(style.paddingInlineStart) || 0;
|
|
54
|
+
const paddingEnd = Number.parseFloat(style.paddingInlineEnd) || 0;
|
|
55
|
+
const contentWidth = this.tabsContainer.clientWidth - paddingStart - paddingEnd;
|
|
56
|
+
const scrollableWidth = this.tabsContainer.scrollWidth - paddingStart - paddingEnd;
|
|
57
|
+
this.showLeftScrollButton = this.tabsContainer.scrollLeft > 0;
|
|
58
|
+
this.showRightScrollButton = this.tabsContainer.scrollLeft + contentWidth < scrollableWidth;
|
|
59
|
+
};
|
|
36
60
|
}
|
|
37
61
|
get tabs() {
|
|
38
62
|
return Array.from(this.host.querySelectorAll('post-tab-item')).filter(tab => tab.closest('post-tabs') === this.host);
|
|
@@ -41,29 +65,38 @@ const PostTabs = class {
|
|
|
41
65
|
return Array.from(this.host.querySelectorAll('post-tab-panel')).filter(panel => panel.closest('post-tabs') === this.host);
|
|
42
66
|
}
|
|
43
67
|
validateLabel() {
|
|
44
|
-
if (this.
|
|
45
|
-
console.error(`[${this.host.localName}] Property "label" is required in
|
|
68
|
+
if (this.isPagesVariant && !this.label) {
|
|
69
|
+
console.error(`[${this.host.localName}] Property "label" is required in Pages variant. Received: ${JSON.stringify(this.label)}.`, this.host);
|
|
46
70
|
}
|
|
47
71
|
}
|
|
48
72
|
componentWillRender() {
|
|
49
|
-
this.
|
|
73
|
+
this.detectVariant();
|
|
50
74
|
}
|
|
51
75
|
componentDidLoad() {
|
|
76
|
+
// Programmatically associates the scroll buttons with the tabs container via the ARIA reflection API, avoiding the need for ID-based aria-controls attributes.
|
|
77
|
+
this.leftScrollButton.ariaControlsElements = [this.tabsContainer];
|
|
78
|
+
this.rightScrollButton.ariaControlsElements = [this.tabsContainer];
|
|
52
79
|
this.moveMisplacedTabs();
|
|
53
80
|
this.moveMisplacedPanels();
|
|
54
81
|
this.enableTabs();
|
|
82
|
+
this.handleScrollButtons();
|
|
55
83
|
this.setupContentObserver();
|
|
84
|
+
this.setupResizeObserver();
|
|
56
85
|
this.validateLabel();
|
|
57
|
-
if (this.
|
|
58
|
-
const activeTab = this.
|
|
86
|
+
if (this.isPagesVariant) {
|
|
87
|
+
const activeTab = this.findActivePagesTab();
|
|
59
88
|
if (activeTab) {
|
|
60
89
|
this.activateTab(activeTab);
|
|
90
|
+
this.scrollTabIntoView(activeTab);
|
|
61
91
|
}
|
|
62
92
|
}
|
|
63
93
|
else {
|
|
64
94
|
const tabToActivate = this.activeTab || this.tabs[0]?.name;
|
|
65
95
|
if (tabToActivate) {
|
|
66
96
|
void this.show(tabToActivate);
|
|
97
|
+
const activeTab = this.tabs.find(t => t.name === tabToActivate);
|
|
98
|
+
if (activeTab)
|
|
99
|
+
this.scrollTabIntoView(activeTab);
|
|
67
100
|
}
|
|
68
101
|
}
|
|
69
102
|
this.isLoaded = true;
|
|
@@ -78,35 +111,43 @@ const PostTabs = class {
|
|
|
78
111
|
this.hiding = null;
|
|
79
112
|
}
|
|
80
113
|
if (this.contentObserver) {
|
|
81
|
-
this.contentObserver
|
|
114
|
+
this.contentObserver?.disconnect();
|
|
82
115
|
}
|
|
116
|
+
this.resizeObserver?.disconnect();
|
|
117
|
+
// Remove scroll event listener
|
|
118
|
+
this.tabsContainer?.removeEventListener('scroll', this.updateScrollButtons);
|
|
83
119
|
}
|
|
84
120
|
setupContentObserver() {
|
|
85
121
|
const config = {
|
|
86
122
|
childList: true,
|
|
87
123
|
subtree: true,
|
|
88
124
|
attributes: true,
|
|
89
|
-
attributeFilter: ['data-
|
|
125
|
+
attributeFilter: ['data-pages-variant', 'aria-current'],
|
|
90
126
|
};
|
|
91
127
|
this.contentObserver = new MutationObserver(this.handleContentChange.bind(this));
|
|
92
|
-
this.contentObserver
|
|
128
|
+
this.contentObserver?.observe(this.host, config);
|
|
129
|
+
}
|
|
130
|
+
setupResizeObserver() {
|
|
131
|
+
this.resizeObserver = new ResizeObserver(this.updateScrollButtons);
|
|
132
|
+
this.resizeObserver.observe(this.tabsContainer);
|
|
93
133
|
}
|
|
94
134
|
handleContentChange(mutations) {
|
|
95
|
-
const shouldRedetect = this.
|
|
135
|
+
const shouldRedetect = this.shouldRedetectVariant(mutations);
|
|
96
136
|
const ariaCurrentChanged = this.hasAriaCurrentChanged(mutations);
|
|
97
|
-
if (ariaCurrentChanged && this.
|
|
98
|
-
this.
|
|
137
|
+
if (ariaCurrentChanged && this.isPagesVariant) {
|
|
138
|
+
this.updateActivePagesTab();
|
|
99
139
|
}
|
|
100
140
|
if (shouldRedetect) {
|
|
101
|
-
this.
|
|
141
|
+
this.handleVariantChange();
|
|
102
142
|
}
|
|
143
|
+
this.updateScrollButtons();
|
|
103
144
|
}
|
|
104
|
-
|
|
145
|
+
shouldRedetectVariant(mutations) {
|
|
105
146
|
return mutations.some(mutation => {
|
|
106
147
|
if (mutation.type === 'childList') {
|
|
107
148
|
return mutation.addedNodes.length > 0 || mutation.removedNodes.length > 0;
|
|
108
149
|
}
|
|
109
|
-
if (mutation.type === 'attributes' && mutation.attributeName === 'data-
|
|
150
|
+
if (mutation.type === 'attributes' && mutation.attributeName === 'data-pages-variant') {
|
|
110
151
|
return true;
|
|
111
152
|
}
|
|
112
153
|
return false;
|
|
@@ -115,25 +156,27 @@ const PostTabs = class {
|
|
|
115
156
|
hasAriaCurrentChanged(mutations) {
|
|
116
157
|
return mutations.some(mutation => mutation.type === 'attributes' && mutation.attributeName === 'aria-current');
|
|
117
158
|
}
|
|
118
|
-
|
|
119
|
-
const activeTab = this.
|
|
159
|
+
updateActivePagesTab() {
|
|
160
|
+
const activeTab = this.findActivePagesTab();
|
|
120
161
|
if (activeTab && activeTab !== this.currentActiveTab) {
|
|
121
162
|
this.activateTab(activeTab);
|
|
163
|
+
this.scrollTabIntoView(activeTab, 'smooth');
|
|
122
164
|
}
|
|
123
165
|
}
|
|
124
|
-
|
|
125
|
-
const
|
|
126
|
-
this.
|
|
127
|
-
if (
|
|
166
|
+
handleVariantChange() {
|
|
167
|
+
const previousVariant = this.isPagesVariant;
|
|
168
|
+
this.detectVariant();
|
|
169
|
+
if (previousVariant !== this.isPagesVariant) {
|
|
128
170
|
this.enableTabs();
|
|
129
171
|
this.initializeActiveTab();
|
|
130
172
|
}
|
|
131
173
|
}
|
|
132
174
|
initializeActiveTab() {
|
|
133
|
-
if (this.
|
|
134
|
-
const activeTab = this.
|
|
175
|
+
if (this.isPagesVariant) {
|
|
176
|
+
const activeTab = this.findActivePagesTab();
|
|
135
177
|
if (activeTab) {
|
|
136
178
|
this.activateTab(activeTab);
|
|
179
|
+
this.scrollTabIntoView(activeTab);
|
|
137
180
|
}
|
|
138
181
|
}
|
|
139
182
|
else {
|
|
@@ -143,21 +186,29 @@ const PostTabs = class {
|
|
|
143
186
|
}
|
|
144
187
|
}
|
|
145
188
|
}
|
|
146
|
-
|
|
147
|
-
//
|
|
148
|
-
// This works even before post-tab-item sets data-
|
|
149
|
-
const
|
|
189
|
+
detectVariant() {
|
|
190
|
+
// Identify Page Tabs variant by looking for anchor elements in tabs
|
|
191
|
+
// This works even before post-tab-item sets [data-pages-variant] attribute
|
|
192
|
+
const hasPages = this.tabs.some(tab => {
|
|
150
193
|
const hasAnchor = tab.querySelector('a') !== null;
|
|
151
|
-
const
|
|
152
|
-
return hasAnchor ||
|
|
194
|
+
const pagesVariantAttr = tab.dataset.pagesVariant === 'true';
|
|
195
|
+
return hasAnchor || pagesVariantAttr;
|
|
153
196
|
});
|
|
154
197
|
const hasPanels = this.panels.length > 0;
|
|
155
|
-
if (
|
|
156
|
-
throw new Error('PostTabs: Mixed mode detected. Cannot use both
|
|
198
|
+
if (hasPages && hasPanels) {
|
|
199
|
+
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.');
|
|
200
|
+
}
|
|
201
|
+
this.isPagesVariant = hasPages;
|
|
202
|
+
// Removes variant related classes to reset the state and applies the newly detected variant
|
|
203
|
+
this.host.classList.remove('page-tabs', 'content-tabs');
|
|
204
|
+
if (this.isPagesVariant) {
|
|
205
|
+
this.host.classList.add('page-tabs');
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
this.host.classList.add('content-tabs');
|
|
157
209
|
}
|
|
158
|
-
this.isNavigationMode = hasNavigationTabs;
|
|
159
210
|
}
|
|
160
|
-
|
|
211
|
+
findActivePagesTab() {
|
|
161
212
|
return (this.tabs.find(tab => {
|
|
162
213
|
const anchor = tab.querySelector('a[aria-current="page"]');
|
|
163
214
|
return anchor !== null;
|
|
@@ -168,30 +219,55 @@ const PostTabs = class {
|
|
|
168
219
|
* Any other panel that was previously shown becomes hidden and its associated tab is unselected.
|
|
169
220
|
*/
|
|
170
221
|
async show(tabName) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
222
|
+
try {
|
|
223
|
+
// do nothing if the tab is already active
|
|
224
|
+
if (tabName === this.currentActiveTab?.name) {
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
const previousTab = this.currentActiveTab;
|
|
228
|
+
const newTab = this.host.querySelector(`post-tab-item[name="${tabName}"]`);
|
|
229
|
+
if (!newTab)
|
|
230
|
+
return;
|
|
231
|
+
this.activateTab(newTab);
|
|
232
|
+
this.scrollTabIntoView(newTab, 'smooth');
|
|
233
|
+
// if a panel is currently being displayed, remove it from the view and complete the associated animation
|
|
234
|
+
if (this.showing) {
|
|
235
|
+
this.showing.finish();
|
|
236
|
+
this.showing = null;
|
|
237
|
+
}
|
|
238
|
+
// hide the currently visible panel only if no other animation is running
|
|
239
|
+
if (previousTab && !this.showing && !this.hiding)
|
|
240
|
+
this.hidePanel(previousTab.name);
|
|
241
|
+
if (await this.awaitAnimation(this.hiding))
|
|
242
|
+
return;
|
|
243
|
+
this.showSelectedPanel();
|
|
244
|
+
if (await this.awaitAnimation(this.showing))
|
|
245
|
+
return;
|
|
246
|
+
if (this.isLoaded && this.currentActiveTab)
|
|
247
|
+
this.postChange.emit(this.currentActiveTab.name);
|
|
174
248
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
if (this.showing) {
|
|
180
|
-
this.showing.finish();
|
|
181
|
-
this.showing = null;
|
|
249
|
+
catch (e) {
|
|
250
|
+
if (this.isAbortError(e))
|
|
251
|
+
return;
|
|
252
|
+
throw e;
|
|
182
253
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
254
|
+
}
|
|
255
|
+
// Awaits an animation; returns true if it was aborted (caller should bail out).
|
|
256
|
+
async awaitAnimation(animation) {
|
|
257
|
+
if (!animation)
|
|
258
|
+
return false;
|
|
259
|
+
try {
|
|
260
|
+
await animation.finished;
|
|
261
|
+
return false;
|
|
262
|
+
}
|
|
263
|
+
catch (e) {
|
|
264
|
+
if (this.isAbortError(e))
|
|
265
|
+
return true;
|
|
266
|
+
throw e;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
isAbortError(error) {
|
|
270
|
+
return (error instanceof DOMException || error instanceof Error) && error.name === 'AbortError';
|
|
195
271
|
}
|
|
196
272
|
moveMisplacedTabs() {
|
|
197
273
|
if (!this.tabs)
|
|
@@ -217,11 +293,11 @@ const PostTabs = class {
|
|
|
217
293
|
return;
|
|
218
294
|
this.tabs.forEach(async (tab) => {
|
|
219
295
|
await componentOnReady.componentOnReady(tab);
|
|
220
|
-
// In
|
|
221
|
-
if (this.
|
|
296
|
+
// In Page Tabs variant, navigation is handled by the consumer's routing
|
|
297
|
+
if (this.isPagesVariant) {
|
|
222
298
|
return;
|
|
223
299
|
}
|
|
224
|
-
//
|
|
300
|
+
// Content Tabs variant: set up ARIA relationships and event handlers
|
|
225
301
|
if (tab.getAttribute('aria-controls'))
|
|
226
302
|
return;
|
|
227
303
|
const tabPanel = this.getPanel(tab.name);
|
|
@@ -237,6 +313,17 @@ const PostTabs = class {
|
|
|
237
313
|
e.preventDefault();
|
|
238
314
|
void this.show(tab.name);
|
|
239
315
|
}
|
|
316
|
+
if (e.key !== 'Home' && e.key !== 'End')
|
|
317
|
+
return;
|
|
318
|
+
e.preventDefault();
|
|
319
|
+
const enabledTabs = this.tabs.filter(t => !t.hasAttribute('disabled'));
|
|
320
|
+
if (enabledTabs.length === 0)
|
|
321
|
+
return;
|
|
322
|
+
const targetTab = e.key === 'Home' ? enabledTabs[0] : enabledTabs.at(-1);
|
|
323
|
+
if (targetTab) {
|
|
324
|
+
targetTab?.focus();
|
|
325
|
+
void this.show(targetTab.name);
|
|
326
|
+
}
|
|
240
327
|
});
|
|
241
328
|
tab.addEventListener('keydown', (e) => {
|
|
242
329
|
if (e.key === 'ArrowRight' || e.key === 'ArrowLeft')
|
|
@@ -251,14 +338,12 @@ const PostTabs = class {
|
|
|
251
338
|
activateTab(tab) {
|
|
252
339
|
// Deactivate previous tab
|
|
253
340
|
if (this.currentActiveTab) {
|
|
254
|
-
this.
|
|
255
|
-
if (!this.isNavigationMode) {
|
|
341
|
+
if (!this.isPagesVariant) {
|
|
256
342
|
this.currentActiveTab.setAttribute('aria-selected', 'false');
|
|
257
343
|
this.currentActiveTab.setAttribute('tabindex', '-1');
|
|
258
344
|
}
|
|
259
345
|
}
|
|
260
|
-
|
|
261
|
-
if (!this.isNavigationMode) {
|
|
346
|
+
if (!this.isPagesVariant) {
|
|
262
347
|
tab.setAttribute('aria-selected', 'true');
|
|
263
348
|
tab.setAttribute('tabindex', '0');
|
|
264
349
|
}
|
|
@@ -275,6 +360,8 @@ const PostTabs = class {
|
|
|
275
360
|
};
|
|
276
361
|
}
|
|
277
362
|
showSelectedPanel() {
|
|
363
|
+
if (!this.currentActiveTab)
|
|
364
|
+
return;
|
|
278
365
|
const panel = this.getPanel(this.currentActiveTab.name);
|
|
279
366
|
if (!panel)
|
|
280
367
|
return;
|
|
@@ -304,12 +391,44 @@ const PostTabs = class {
|
|
|
304
391
|
nextTab.focus();
|
|
305
392
|
void this.show(nextTab.name);
|
|
306
393
|
}
|
|
394
|
+
scrollTabs(direction) {
|
|
395
|
+
const sign = direction === 'prev' ? -1 : 1;
|
|
396
|
+
const style = getComputedStyle(this.tabsContainer);
|
|
397
|
+
const paddingStart = Number.parseFloat(style.paddingInlineStart) || 0;
|
|
398
|
+
const paddingEnd = Number.parseFloat(style.paddingInlineEnd) || 0;
|
|
399
|
+
const contentWidth = this.tabsContainer.clientWidth - paddingStart - paddingEnd;
|
|
400
|
+
this.tabsContainer.scrollBy({
|
|
401
|
+
left: sign * contentWidth,
|
|
402
|
+
behavior: 'smooth',
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
scrollTabIntoView(tab, behavior = 'instant') {
|
|
406
|
+
const container = this.tabsContainer;
|
|
407
|
+
const style = getComputedStyle(container);
|
|
408
|
+
const paddingStart = Number.parseFloat(style.paddingInlineStart) || 0;
|
|
409
|
+
const paddingEnd = Number.parseFloat(style.paddingInlineEnd) || 0;
|
|
410
|
+
const tabLeft = tab.offsetLeft;
|
|
411
|
+
const tabRight = tabLeft + tab.offsetWidth;
|
|
412
|
+
const containerLeft = container.scrollLeft + paddingStart;
|
|
413
|
+
const containerRight = containerLeft + container.clientWidth - paddingStart - paddingEnd;
|
|
414
|
+
if (tabLeft < containerLeft) {
|
|
415
|
+
container.scrollTo({ left: tabLeft - paddingStart, behavior });
|
|
416
|
+
}
|
|
417
|
+
else if (tabRight > containerRight) {
|
|
418
|
+
container.scrollTo({ left: tabRight - container.clientWidth + paddingEnd, behavior });
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
handleScrollButtons() {
|
|
422
|
+
this.updateScrollButtons();
|
|
423
|
+
this.tabsContainer.addEventListener('scroll', this.updateScrollButtons);
|
|
424
|
+
}
|
|
307
425
|
render() {
|
|
308
|
-
const TabsContainer = this.
|
|
309
|
-
|
|
426
|
+
const TabsContainer = this.isPagesVariant ? 'nav' : 'div';
|
|
427
|
+
const style = undefined;
|
|
428
|
+
return (index.h(index.Host, { key: '3e187db1375d551ac80bb4facced0ad4d01ec3fd', "data-version": _package.version, style: style }, index.h("div", { key: '8efd1434819801304bb218bf8af2a9c570153d70', class: "tabs-wrapper", part: "post-tabs" }, index.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') }, index.h("post-icon", { key: 'f767e493126954bd9246b4c161aa197f5fe48fcc', name: "chevronleft" })), index.h(TabsContainer, { key: 'f319b638b3fdfb46d5e793001192bb96e4763cca', ref: el => (this.tabsContainer = el), class: "tabs", role: this.isPagesVariant ? undefined : 'tablist', "aria-label": this.isPagesVariant ? this.label : undefined }, index.h("slot", { key: '65d15b30402eaf835f506f4cf24dd6373a632c52', onSlotchange: () => {
|
|
310
429
|
this.moveMisplacedTabs();
|
|
311
430
|
this.enableTabs();
|
|
312
|
-
} }))), !this.
|
|
431
|
+
} })), index.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') }, index.h("post-icon", { key: 'fcc75e1de8c39f3e3e2864e3439e85881001c73c', name: "chevronright" }))), !this.isPagesVariant && (index.h("div", { key: '487435bf4d776f1771eff2c735e3476a05ef68c4', class: "tab-content", part: "post-tabs-content" }, index.h("slot", { key: 'bbe284adfc74d502a77ceaade18179101f6aaf30', name: "panels", onSlotchange: () => this.moveMisplacedPanels() })))));
|
|
313
432
|
}
|
|
314
433
|
get host() { return index.getElement(this); }
|
|
315
434
|
static get watchers() { return {
|
|
@@ -318,6 +437,9 @@ const PostTabs = class {
|
|
|
318
437
|
}]
|
|
319
438
|
}; }
|
|
320
439
|
};
|
|
440
|
+
__decorate([
|
|
441
|
+
oneOf.OneOf(['small', 'large'])
|
|
442
|
+
], PostTabs.prototype, "size", void 0);
|
|
321
443
|
__decorate([
|
|
322
444
|
type.Type('string')
|
|
323
445
|
], PostTabs.prototype, "label", void 0);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BqngpwGa.js');
|
|
4
4
|
require('./breakpoints-B0Olgvgc.js');
|
|
5
|
-
var _package = require('./package-
|
|
6
|
-
var required = require('./required-
|
|
7
|
-
var type = require('./type-
|
|
8
|
-
require('./create-validator-decorator-
|
|
5
|
+
var _package = require('./package-B0PdQ0Dm.js');
|
|
6
|
+
var required = require('./required-Bkz8MOYa.js');
|
|
7
|
+
var type = require('./type-D8eD1JMd.js');
|
|
8
|
+
require('./create-validator-decorator-4dRrOF30.js');
|
|
9
9
|
|
|
10
10
|
const postTooltipTriggerCss = () => `post-tooltip-trigger{vertical-align:top}:host{cursor:pointer}`;
|
|
11
11
|
|
|
@@ -19,7 +19,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
19
19
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
20
20
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21
21
|
};
|
|
22
|
-
const TRIGGER_EVENTS = ['pointerenter', 'pointerleave', 'focusin', 'focusout'
|
|
22
|
+
const TRIGGER_EVENTS = ['pointerenter', 'pointerleave', 'focusin', 'focusout'];
|
|
23
23
|
let isFocusable;
|
|
24
24
|
const PostTooltipTrigger = class {
|
|
25
25
|
constructor(hostRef) {
|
|
@@ -45,8 +45,6 @@ const PostTooltipTrigger = class {
|
|
|
45
45
|
}
|
|
46
46
|
componentWillLoad() {
|
|
47
47
|
{
|
|
48
|
-
// Fire-and-forget: long-press-event registers a global event listener on import.
|
|
49
|
-
Promise.resolve().then(function () { return require('./long-press-event-Dx21Ojod.js'); });
|
|
50
48
|
// Load ally.js lazily; setupTrigger uses optional chaining to handle the
|
|
51
49
|
// case where it hasn't loaded yet (falls back to adding tabindex="0").
|
|
52
50
|
Promise.resolve().then(function () { return require('./focusable-COT2uiEV.js'); }).then(function (n) { return n.focusable; }).then(m => {
|
|
@@ -186,7 +184,7 @@ const PostTooltipTrigger = class {
|
|
|
186
184
|
this.tooltip?.hide();
|
|
187
185
|
}
|
|
188
186
|
render() {
|
|
189
|
-
return (index.h(index.Host, { key: '
|
|
187
|
+
return (index.h(index.Host, { key: '37f835a46c96f1f97019b611da8b6be2d6e1a8d7', "data-version": _package.version }, index.h("slot", { key: 'c2fc3d9080948fdcfbd8b2866730e76b770b87ba', onSlotchange: () => this.handleSlotChange() })));
|
|
190
188
|
}
|
|
191
189
|
get host() { return index.getElement(this); }
|
|
192
190
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BqngpwGa.js');
|
|
4
4
|
var placement = require('./placement-qEFR9hmI.js');
|
|
5
5
|
require('./breakpoints-B0Olgvgc.js');
|
|
6
|
-
var _package = require('./package-
|
|
7
|
-
var oneOf = require('./one-of-
|
|
8
|
-
require('./create-validator-decorator-
|
|
6
|
+
var _package = require('./package-B0PdQ0Dm.js');
|
|
7
|
+
var oneOf = require('./one-of-D1veqtsm.js');
|
|
8
|
+
require('./create-validator-decorator-4dRrOF30.js');
|
|
9
9
|
|
|
10
10
|
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}`;
|
|
11
11
|
|
|
@@ -45,8 +45,8 @@ const PostTooltip = class {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
* Programmatically display the tooltip
|
|
49
|
-
*
|
|
48
|
+
* Programmatically display the tooltip,
|
|
49
|
+
* `target` is the HTML element the menu is anchored to.
|
|
50
50
|
*/
|
|
51
51
|
async show(target) {
|
|
52
52
|
if (this.open)
|
|
@@ -60,9 +60,8 @@ const PostTooltip = class {
|
|
|
60
60
|
this.popoverRef.hide();
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* Toggle tooltip display
|
|
64
|
-
*
|
|
65
|
-
* @param [force] Pass true to always show or false to always hide
|
|
63
|
+
* Toggle tooltip display,
|
|
64
|
+
* `target` is the HTML element the menu is anchored to.
|
|
66
65
|
*/
|
|
67
66
|
async toggle(target, force) {
|
|
68
67
|
this.popoverRef.toggle(target, force);
|
|
@@ -76,7 +75,7 @@ const PostTooltip = class {
|
|
|
76
75
|
}
|
|
77
76
|
render() {
|
|
78
77
|
const popoverClass = `${this.arrow ? 'has-arrow' : ''}`;
|
|
79
|
-
return (index.h(index.Host, { key: '
|
|
78
|
+
return (index.h(index.Host, { key: 'd49731becbb7395ec68cfae34d316a6248977b53', "data-version": _package.version }, index.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) }, index.h("slot", { key: '5f941c0311eff468be1c6abe7cbcdab8ba272e15' }))));
|
|
80
79
|
}
|
|
81
80
|
get host() { return index.getElement(this); }
|
|
82
81
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var createValidatorDecorator = require('./create-validator-decorator-
|
|
3
|
+
var createValidatorDecorator = require('./create-validator-decorator-4dRrOF30.js');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Property decorator that validates the property value is of the specified type.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var createValidatorDecorator = require('./create-validator-decorator-
|
|
3
|
+
var createValidatorDecorator = require('./create-validator-decorator-4dRrOF30.js');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Property decorator that validates the property value is a valid URL.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"entries": [
|
|
3
|
-
"components/post-date-picker/post-date-picker.js",
|
|
4
3
|
"components/post-accordion/post-accordion.js",
|
|
5
4
|
"components/post-accordion-item/post-accordion-item.js",
|
|
6
5
|
"components/post-autocomplete/post-autocomplete.js",
|
|
@@ -12,6 +11,7 @@
|
|
|
12
11
|
"components/post-closebutton/post-closebutton.js",
|
|
13
12
|
"components/post-collapsible/post-collapsible.js",
|
|
14
13
|
"components/post-collapsible-trigger/post-collapsible-trigger.js",
|
|
14
|
+
"components/post-date-picker/post-date-picker.js",
|
|
15
15
|
"components/post-footer/post-footer.js",
|
|
16
16
|
"components/post-header/post-header.js",
|
|
17
17
|
"components/post-icon/post-icon.js",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"components/post-linkarea/post-linkarea.js",
|
|
21
21
|
"components/post-listbox/post-listbox.js",
|
|
22
22
|
"components/post-listbox-option/post-listbox-option.js",
|
|
23
|
-
"components/post-login-widget/post-login-widget.js",
|
|
24
23
|
"components/post-logo/post-logo.js",
|
|
25
24
|
"components/post-mainnavigation/post-mainnavigation.js",
|
|
26
25
|
"components/post-megadropdown/post-megadropdown.js",
|
|
@@ -96,7 +96,7 @@ export class PostAccordion {
|
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
render() {
|
|
99
|
-
return (h(Host, { key: '
|
|
99
|
+
return (h(Host, { key: '4e3df581ac99aa14dfaaab836c90cee788607a76', "data-version": version }, h("div", { key: '425615868542199dc79439d04b9ca9ba815b05f3', class: "accordion" }, h("slot", { key: 'ba7c05b69377101275cd76ecffb476516ca52c83', onSlotchange: () => this.registerAccordionItems() }))));
|
|
100
100
|
}
|
|
101
101
|
static get is() { return "post-accordion"; }
|
|
102
102
|
static get encapsulation() { return "shadow"; }
|