@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
|
@@ -21,7 +21,14 @@ const GAP_THRESHOLD_FOR_PAGE = 2; // Show page number instead of ellipsis when g
|
|
|
21
21
|
const MIDDLE_RANGE_START = 2; // Middle range starts from page 2 (page 1 is always shown separately)
|
|
22
22
|
export class PostPagination {
|
|
23
23
|
constructor() {
|
|
24
|
+
this.maxVisiblePages = 3;
|
|
24
25
|
this.items = [];
|
|
26
|
+
/**
|
|
27
|
+
* The current active page number.
|
|
28
|
+
*
|
|
29
|
+
* **If not specified, defaults to the first page.**
|
|
30
|
+
*/
|
|
31
|
+
this.page = 1;
|
|
25
32
|
this.lastWindowWidth = window.innerWidth;
|
|
26
33
|
this.loaded = false;
|
|
27
34
|
this.debouncedResize = debounce(this.handleResizeInternal.bind(this), RESIZE_DEBOUNCE_MS);
|
|
@@ -32,9 +39,7 @@ export class PostPagination {
|
|
|
32
39
|
}
|
|
33
40
|
componentWillLoad() {
|
|
34
41
|
this.paginationId = `pagination-${this.host.id || nanoid(6)}`;
|
|
35
|
-
|
|
36
|
-
this.page = 1;
|
|
37
|
-
}
|
|
42
|
+
this.updatePagesWithValidation();
|
|
38
43
|
}
|
|
39
44
|
connectedCallback() {
|
|
40
45
|
window.addEventListener('resize', this.debouncedResize);
|
|
@@ -391,7 +396,7 @@ export class PostPagination {
|
|
|
391
396
|
*/
|
|
392
397
|
generatePages(totalPages) {
|
|
393
398
|
const maxVisible = this.maxVisiblePages;
|
|
394
|
-
const currentPage = this.page
|
|
399
|
+
const currentPage = this.page;
|
|
395
400
|
if (totalPages <= maxVisible) {
|
|
396
401
|
this.items = this.buildAllPages(totalPages);
|
|
397
402
|
return;
|
|
@@ -542,7 +547,8 @@ export class PostPagination {
|
|
|
542
547
|
"getter": false,
|
|
543
548
|
"setter": false,
|
|
544
549
|
"reflect": false,
|
|
545
|
-
"attribute": "page"
|
|
550
|
+
"attribute": "page",
|
|
551
|
+
"defaultValue": "1"
|
|
546
552
|
},
|
|
547
553
|
"pageSize": {
|
|
548
554
|
"type": "number",
|
|
@@ -30,8 +30,8 @@ export class PostPopover {
|
|
|
30
30
|
this.arrow = true;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* Programmatically display the popover
|
|
34
|
-
*
|
|
33
|
+
* Programmatically display the popover,
|
|
34
|
+
* `target` is the HTML element the menu is anchored to.
|
|
35
35
|
*/
|
|
36
36
|
async show(target) {
|
|
37
37
|
await this.popoverRef.show(target);
|
|
@@ -44,9 +44,8 @@ export class PostPopover {
|
|
|
44
44
|
this.popoverRef.hide();
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* Toggle popover display
|
|
48
|
-
*
|
|
49
|
-
* @param force Pass true to always show or false to always hide
|
|
47
|
+
* Toggle popover display,
|
|
48
|
+
* `target` is the HTML element the menu is anchored to.
|
|
50
49
|
*/
|
|
51
50
|
async toggle(target, force) {
|
|
52
51
|
const isOpen = await this.popoverRef.toggle(target, force);
|
|
@@ -62,7 +61,7 @@ export class PostPopover {
|
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
63
|
render() {
|
|
65
|
-
return (h(Host, { key: '
|
|
64
|
+
return (h(Host, { key: 'f24329a264569794e7108875eda111a1456c5b47', "data-version": version }, h("post-popovercontainer", { key: 'ae8e9498e59de8a515f5bd11ecf79a2be9a513d1', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '76e4e49d302159db19c8e83a7ece60945f003da5', class: "popover-container" }, h("div", { key: '3fb7c1ca533e54b4960bd5d7c54535b0097831d8', class: "popover-content" }, h("slot", { key: '5bdf6a0a75d0c433f88afe0a6e9c6f298bbb64a7' })), h("post-closebutton", { key: '26d7569bb60cdb1aa5479260738f33cf65737df9', onClick: () => this.hide() }, this.textClose)))));
|
|
66
65
|
}
|
|
67
66
|
static get is() { return "post-popover"; }
|
|
68
67
|
static get encapsulation() { return "shadow"; }
|
|
@@ -154,7 +153,7 @@ export class PostPopover {
|
|
|
154
153
|
"parameters": [{
|
|
155
154
|
"name": "target",
|
|
156
155
|
"type": "HTMLElement",
|
|
157
|
-
"docs": "
|
|
156
|
+
"docs": ""
|
|
158
157
|
}],
|
|
159
158
|
"references": {
|
|
160
159
|
"Promise": {
|
|
@@ -169,11 +168,8 @@ export class PostPopover {
|
|
|
169
168
|
"return": "Promise<void>"
|
|
170
169
|
},
|
|
171
170
|
"docs": {
|
|
172
|
-
"text": "Programmatically display the popover",
|
|
173
|
-
"tags": [
|
|
174
|
-
"name": "param",
|
|
175
|
-
"text": "target A focusable element inside the <post-popover-trigger> component that controls the popover"
|
|
176
|
-
}]
|
|
171
|
+
"text": "Programmatically display the popover,\n`target` is the HTML element the menu is anchored to.",
|
|
172
|
+
"tags": []
|
|
177
173
|
}
|
|
178
174
|
},
|
|
179
175
|
"hide": {
|
|
@@ -199,11 +195,11 @@ export class PostPopover {
|
|
|
199
195
|
"parameters": [{
|
|
200
196
|
"name": "target",
|
|
201
197
|
"type": "HTMLElement",
|
|
202
|
-
"docs": "
|
|
198
|
+
"docs": ""
|
|
203
199
|
}, {
|
|
204
200
|
"name": "force",
|
|
205
201
|
"type": "boolean",
|
|
206
|
-
"docs": "
|
|
202
|
+
"docs": ""
|
|
207
203
|
}],
|
|
208
204
|
"references": {
|
|
209
205
|
"Promise": {
|
|
@@ -218,14 +214,8 @@ export class PostPopover {
|
|
|
218
214
|
"return": "Promise<void>"
|
|
219
215
|
},
|
|
220
216
|
"docs": {
|
|
221
|
-
"text": "Toggle popover display",
|
|
222
|
-
"tags": [
|
|
223
|
-
"name": "param",
|
|
224
|
-
"text": "target A focusable element inside the <post-popover-trigger> component that controls the popover"
|
|
225
|
-
}, {
|
|
226
|
-
"name": "param",
|
|
227
|
-
"text": "force Pass true to always show or false to always hide"
|
|
228
|
-
}]
|
|
217
|
+
"text": "Toggle popover display,\n`target` is the HTML element the menu is anchored to.",
|
|
218
|
+
"tags": []
|
|
229
219
|
}
|
|
230
220
|
}
|
|
231
221
|
};
|
|
@@ -107,7 +107,7 @@ export class PostPopoverTrigger {
|
|
|
107
107
|
this.popover?.removeEventListener('postToggle', this.boundHandlePostToggle);
|
|
108
108
|
}
|
|
109
109
|
render() {
|
|
110
|
-
return (h(Host, { key: '
|
|
110
|
+
return (h(Host, { key: '009495ba354321f2b0162c4a0c4fcb1e165074e7', "data-version": version }, h("slot", { key: 'f0e5ef7851b4bc9916382b0910d9500db52668d4', onSlotchange: () => this.setupTrigger() })));
|
|
111
111
|
}
|
|
112
112
|
static get is() { return "post-popover-trigger"; }
|
|
113
113
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer polyfill{@supports not selector(:popover-open){:host([popover]:not(.\:popover-open)){display:none}}}:host{background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;margin:0;padding:0;overflow:visible}:host>div{box-shadow:var(--post-device-elevation-300);width:max-content;max-width:100%;color:var(--post-current-fg);background-color:var(--post-current-bg);border-radius:4px;position:relative}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host>div{border:2px solid rgba(0,0,0,0)}}:host
|
|
1
|
+
@layer polyfill{@supports not selector(:popover-open){:host([popover]:not(.\:popover-open)){display:none}}}:host{background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;margin:0;padding:0;overflow:visible}:host>div{box-shadow:var(--post-device-elevation-300);width:max-content;max-width:100%;color:var(--post-current-fg);background-color:var(--post-current-bg);border-radius:4px;position:relative}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host>div{border:2px solid rgba(0,0,0,0)}}:host [part=post-popovercontainer-border-mask]{display:none;position:absolute;inset:0;border-radius:4px;pointer-events:none}:host .arrow{--post-popovercontainer-arrow-border: var(--post-popovercontainer-arrow-border-width, 0px) solid var(--post-popovercontainer-arrow-border-color, transparent);position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:host .arrow[dynamic-placement=top]{border-bottom-right-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=right]{border-bottom-left-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=bottom]{border-top-left-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=left]{border-top-right-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .arrow[dynamic-placement=top]{border-block-end:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);bottom:-0.3796735336rem !important}:host .arrow[dynamic-placement=left]{border-block-start:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);right:-0.3796735336rem !important}:host .arrow[dynamic-placement=right]{border-block-end:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);left:-0.3796735336rem !important}:host .arrow[dynamic-placement=bottom]{border-block-start:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);top:-0.3796735336rem !important}}:host([tooltip]){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:host([safe-space])::after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:auto}:host([safe-space=triangle])::after{clip-path:polygon(var(--post-safe-space-cursor-x, 0) var(--post-safe-space-cursor-y, 0), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)))}:host([safe-space=trapezoid])::after{clip-path:polygon(var(--post-safe-space-trigger-x-start, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-start, 0)), var(--post-safe-space-trigger-x-end, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-end, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)))}:host(:not(:has(.arrow)))>div{box-shadow:var(--post-device-elevation-300)}:host(:has(.arrow))>div{filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=top]))>div{filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=left]))>div{filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=right]))>div{filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}
|
|
@@ -72,10 +72,10 @@ export class PostPopovercontainer {
|
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
74
|
* Programmatically display the popovercontainer
|
|
75
|
-
* @param target
|
|
75
|
+
* @param target The element that invokes the popover and to which it is visually anchored.
|
|
76
76
|
*/
|
|
77
77
|
async show(target) {
|
|
78
|
-
if (this.toggleTimeoutId)
|
|
78
|
+
if (this.toggleTimeoutId || !target)
|
|
79
79
|
return;
|
|
80
80
|
this.eventTarget = target;
|
|
81
81
|
this.calculatePosition();
|
|
@@ -93,10 +93,14 @@ export class PostPopovercontainer {
|
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
95
|
* Toggle popovercontainer display
|
|
96
|
-
* @param target
|
|
96
|
+
* @param target The element that invokes the popover and to which it is visually anchored.
|
|
97
97
|
* @param force Pass true to always show or false to always hide
|
|
98
98
|
*/
|
|
99
99
|
async toggle(target, force) {
|
|
100
|
+
const isOpen = this.host.matches(':where(:popover-open, .popover-open)');
|
|
101
|
+
const willOpen = force === true || (force === undefined && !isOpen);
|
|
102
|
+
if (willOpen && !target)
|
|
103
|
+
return isOpen;
|
|
100
104
|
this.eventTarget = target;
|
|
101
105
|
// Prevent instant double toggle
|
|
102
106
|
if (!this.toggleTimeoutId) {
|
|
@@ -267,9 +271,10 @@ export class PostPopovercontainer {
|
|
|
267
271
|
// flip should come before shift. For non-aligned, shift before flip.
|
|
268
272
|
...(isAligned ? [flipMiddleware, shiftMiddleware] : [shiftMiddleware, flipMiddleware]),
|
|
269
273
|
size({
|
|
270
|
-
apply({ availableWidth,
|
|
271
|
-
elements.floating.style
|
|
272
|
-
|
|
274
|
+
apply({ availableWidth, elements }) {
|
|
275
|
+
Object.assign(elements.floating.style, {
|
|
276
|
+
maxWidth: `${availableWidth - gap * 2}px`,
|
|
277
|
+
});
|
|
273
278
|
},
|
|
274
279
|
}),
|
|
275
280
|
];
|
|
@@ -343,9 +348,9 @@ export class PostPopovercontainer {
|
|
|
343
348
|
}
|
|
344
349
|
}
|
|
345
350
|
render() {
|
|
346
|
-
return (h(Host, { key: '
|
|
351
|
+
return (h(Host, { key: 'be9f32a35f247f5b2cb54599b96e715ce1a5a1f1', "data-version": version, popover: "auto" }, h("div", { key: 'ad2616c15dfec83e1e53ad14cb145aee2d625c9a', part: "post-popovercontainer-content", class: "popover-content" }, this.arrow && (h("span", { key: '293ba9d1ba2a7b57297cd4aa716ba1369b2f8988', "dynamic-placement": this.dynamicPlacement, class: "arrow", ref: el => {
|
|
347
352
|
this.arrowRef = el;
|
|
348
|
-
} })), h("span", { key: '
|
|
353
|
+
} })), h("span", { key: '7b9d47b53a4d4a672490eccdc88a7eb0552b5574', part: "post-popovercontainer-border-mask" }), h("slot", { key: '4b4249d6ebe1c247634bbb76b08ec01e73dc7d4b' }))));
|
|
349
354
|
}
|
|
350
355
|
static get is() { return "post-popovercontainer"; }
|
|
351
356
|
static get encapsulation() { return "shadow"; }
|
|
@@ -559,7 +564,7 @@ export class PostPopovercontainer {
|
|
|
559
564
|
"parameters": [{
|
|
560
565
|
"name": "target",
|
|
561
566
|
"type": "HTMLElement",
|
|
562
|
-
"docs": "
|
|
567
|
+
"docs": "The element that invokes the popover and to which it is visually anchored."
|
|
563
568
|
}],
|
|
564
569
|
"references": {
|
|
565
570
|
"Promise": {
|
|
@@ -577,7 +582,7 @@ export class PostPopovercontainer {
|
|
|
577
582
|
"text": "Programmatically display the popovercontainer",
|
|
578
583
|
"tags": [{
|
|
579
584
|
"name": "param",
|
|
580
|
-
"text": "target
|
|
585
|
+
"text": "target The element that invokes the popover and to which it is visually anchored."
|
|
581
586
|
}]
|
|
582
587
|
}
|
|
583
588
|
},
|
|
@@ -604,7 +609,7 @@ export class PostPopovercontainer {
|
|
|
604
609
|
"parameters": [{
|
|
605
610
|
"name": "target",
|
|
606
611
|
"type": "HTMLElement",
|
|
607
|
-
"docs": "
|
|
612
|
+
"docs": "The element that invokes the popover and to which it is visually anchored."
|
|
608
613
|
}, {
|
|
609
614
|
"name": "force",
|
|
610
615
|
"type": "boolean",
|
|
@@ -626,7 +631,7 @@ export class PostPopovercontainer {
|
|
|
626
631
|
"text": "Toggle popovercontainer display",
|
|
627
632
|
"tags": [{
|
|
628
633
|
"name": "param",
|
|
629
|
-
"text": "target
|
|
634
|
+
"text": "target The element that invokes the popover and to which it is visually anchored."
|
|
630
635
|
}, {
|
|
631
636
|
"name": "param",
|
|
632
637
|
"text": "force Pass true to always show or false to always hide"
|
|
@@ -43,7 +43,7 @@ export class PostProgressbar {
|
|
|
43
43
|
const max = this.getEffectiveMax();
|
|
44
44
|
const value = this.getEffectiveValue(min, max);
|
|
45
45
|
const percentage = ((value - min) / (max - min)) * 100;
|
|
46
|
-
return (h(Host, { key: '
|
|
46
|
+
return (h(Host, { key: '26bdbb5219393e8b44e2fe5395d8a4cd8aa7e18a', role: "progressbar", "aria-valuenow": value, "aria-valuemin": min, "aria-valuemax": max }, h("div", { key: '65b81479fac7aa6024556ef6589064f997f4394e', class: "progress-value", style: { '--post-progressbar-value': `${percentage}%` } })));
|
|
47
47
|
}
|
|
48
48
|
static get is() { return "post-progressbar"; }
|
|
49
49
|
static get encapsulation() { return "shadow"; }
|
|
@@ -83,7 +83,7 @@ export class PostRating {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
render() {
|
|
86
|
-
return (h(Host, { key: '
|
|
86
|
+
return (h(Host, { key: 'c793abbf5e0d01bb19dc4464ebd75249959a1717', "data-version": version }, h("div", { key: '357946df40a3d3a85ece2d0ac6ecc761951d9471', role: "slider", class: "rating", tabindex: "0", "aria-label": this.label, "aria-valuemin": "0", "aria-valuemax": this.stars, "aria-valuenow": this.currentRating, "aria-valuetext": `${this.currentRating} / ${this.stars}`, "aria-readonly": this.readonly ? 'true' : 'false', onKeyDown: this.keydownHandler, onBlur: this.blurHandler }, Array.from({ length: this.stars }).map((v, i) => (h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
|
|
87
87
|
'star': true,
|
|
88
88
|
'before-hover': i < this.hoveredIndex,
|
|
89
89
|
'active': i < Math.round(this.currentRating),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:host{--post-side-navigation-padding-block-start: 34px;--post-side-navigation-padding-block-end: 16px;--post-side-navigation-bg: #f0efed;--post-side-navigation-stroke: #b4b3af;display:flex;background-color:var(--post-side-navigation-bg);border-inline-end:1px solid var(--post-side-navigation-stroke)}:host dialog{overflow:visible;width:var(--post-side-navigation-width);bottom:auto;right:auto;border:none;padding:0;max-height:100dvh;background-color:var(--post-side-navigation-bg);border-inline-end:1px solid var(--post-side-navigation-stroke)}@media screen and (max-width: 1023.98px){:host dialog{box-shadow:var(--post-device-elevation-300)}}:host post-closebutton{transform:translate(50%, 0)}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
4
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else
|
|
6
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
7
|
+
if (d = decorators[i])
|
|
8
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
|
+
};
|
|
11
|
+
import { h, Host, } from "@stencil/core";
|
|
12
|
+
import { version } from "../../../../package";
|
|
13
|
+
import { breakpoint } from "../../utils/breakpoints";
|
|
14
|
+
import { getFocusableChildren, OneOf, Required, Type } from "../../utils/index";
|
|
15
|
+
import { SIDE_NAVIGATION_SIZES } from "./side-navigation-styles";
|
|
16
|
+
/**
|
|
17
|
+
* @slot default - Slot for the navigation content (must be a `<nav>` landmark with proper heading)
|
|
18
|
+
*/
|
|
19
|
+
export class PostSideNavigation {
|
|
20
|
+
constructor() {
|
|
21
|
+
this.device = breakpoint.get('device');
|
|
22
|
+
/**
|
|
23
|
+
* Controls the size of the navigation items.
|
|
24
|
+
* Choose "small" for deep and long navigation, and "large" (default) for a flat and short navigation.
|
|
25
|
+
*/
|
|
26
|
+
this.size = 'large';
|
|
27
|
+
this.breakpointChange = (e) => {
|
|
28
|
+
this.device = e.detail;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Collapses the active disclosure on Escape; lets the native dialog handle it otherwise.
|
|
32
|
+
*/
|
|
33
|
+
this.handleKeyDown = (e) => {
|
|
34
|
+
if (e.key !== 'Escape')
|
|
35
|
+
return;
|
|
36
|
+
const collapsible = this.collapsible;
|
|
37
|
+
if (!collapsible || collapsible.collapsed)
|
|
38
|
+
return;
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
e.stopPropagation();
|
|
41
|
+
collapsible.toggle(false);
|
|
42
|
+
this.collapsibleTrigger?.querySelector('button')?.focus();
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
connectedCallback() {
|
|
46
|
+
globalThis.addEventListener('postBreakpoint:device', this.breakpointChange);
|
|
47
|
+
this.host.addEventListener('keydown', this.handleKeyDown);
|
|
48
|
+
}
|
|
49
|
+
disconnectedCallback() {
|
|
50
|
+
globalThis.removeEventListener('postBreakpoint:device', this.breakpointChange);
|
|
51
|
+
this.host.removeEventListener('keydown', this.handleKeyDown);
|
|
52
|
+
}
|
|
53
|
+
get dialog() {
|
|
54
|
+
return this.host.shadowRoot?.querySelector('dialog');
|
|
55
|
+
}
|
|
56
|
+
get collapsibleTrigger() {
|
|
57
|
+
return document.activeElement?.closest('post-collapsible-trigger') ?? null;
|
|
58
|
+
}
|
|
59
|
+
get collapsible() {
|
|
60
|
+
return this.collapsibleTrigger?.querySelector(':scope > post-collapsible') ?? null;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Toggles the navigation programmatically.
|
|
64
|
+
* No-op on desktop.
|
|
65
|
+
*/
|
|
66
|
+
async toggle() {
|
|
67
|
+
if (this.device === 'desktop')
|
|
68
|
+
return;
|
|
69
|
+
return this.dialog?.open ? this.hide() : this.show();
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Opens the navigation programmatically.
|
|
73
|
+
* No-op on desktop.
|
|
74
|
+
*/
|
|
75
|
+
async show() {
|
|
76
|
+
if (this.device === 'desktop')
|
|
77
|
+
return;
|
|
78
|
+
this.dialog.showModal();
|
|
79
|
+
this.postToggle.emit(true);
|
|
80
|
+
this.focusNav();
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Closes the navigation programmatically.
|
|
84
|
+
* No-op on desktop.
|
|
85
|
+
*/
|
|
86
|
+
async hide() {
|
|
87
|
+
if (this.device === 'desktop')
|
|
88
|
+
return;
|
|
89
|
+
this.dialog.close();
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Move focus into the navigation when the dialog opens.
|
|
93
|
+
*/
|
|
94
|
+
focusNav() {
|
|
95
|
+
const slot = this.host.shadowRoot?.querySelector('slot');
|
|
96
|
+
const nav = slot?.assignedElements({ flatten: true })[0];
|
|
97
|
+
if (!nav)
|
|
98
|
+
return;
|
|
99
|
+
const [firstFocusable] = getFocusableChildren(nav);
|
|
100
|
+
firstFocusable?.focus();
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Render inline navigation (desktop).
|
|
104
|
+
*/
|
|
105
|
+
renderNav() {
|
|
106
|
+
return h("slot", null);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Render modal navigation (mobile/tablet).
|
|
110
|
+
*/
|
|
111
|
+
renderDialog() {
|
|
112
|
+
return (h("dialog", { onClose: () => {
|
|
113
|
+
this.postToggle.emit(false);
|
|
114
|
+
} }, h("slot", null), h("post-closebutton", { onClick: () => this.hide() }, this.textClose)));
|
|
115
|
+
}
|
|
116
|
+
render() {
|
|
117
|
+
return (h(Host, { key: '71ecd690876690a72f5c06b1e91856600aa11b90', "data-version": version }, this.device === 'desktop' ? this.renderNav() : this.renderDialog()));
|
|
118
|
+
}
|
|
119
|
+
static get is() { return "post-side-navigation"; }
|
|
120
|
+
static get encapsulation() { return "shadow"; }
|
|
121
|
+
static get originalStyleUrls() {
|
|
122
|
+
return {
|
|
123
|
+
"$": ["post-side-navigation.scss"]
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
static get styleUrls() {
|
|
127
|
+
return {
|
|
128
|
+
"$": ["post-side-navigation.css"]
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
static get properties() {
|
|
132
|
+
return {
|
|
133
|
+
"textClose": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"mutable": false,
|
|
136
|
+
"complexType": {
|
|
137
|
+
"original": "string",
|
|
138
|
+
"resolved": "string",
|
|
139
|
+
"references": {}
|
|
140
|
+
},
|
|
141
|
+
"required": true,
|
|
142
|
+
"optional": false,
|
|
143
|
+
"docs": {
|
|
144
|
+
"tags": [],
|
|
145
|
+
"text": "Accessible label for the close button shown in the mobile navigation dialog."
|
|
146
|
+
},
|
|
147
|
+
"getter": false,
|
|
148
|
+
"setter": false,
|
|
149
|
+
"reflect": true,
|
|
150
|
+
"attribute": "text-close"
|
|
151
|
+
},
|
|
152
|
+
"size": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"mutable": false,
|
|
155
|
+
"complexType": {
|
|
156
|
+
"original": "SideNavigationSize",
|
|
157
|
+
"resolved": "\"large\" | \"small\"",
|
|
158
|
+
"references": {
|
|
159
|
+
"SideNavigationSize": {
|
|
160
|
+
"location": "import",
|
|
161
|
+
"path": "./side-navigation-styles",
|
|
162
|
+
"id": "src/components/post-side-navigation/side-navigation-styles.ts::SideNavigationSize",
|
|
163
|
+
"referenceLocation": "SideNavigationSize"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"required": false,
|
|
168
|
+
"optional": true,
|
|
169
|
+
"docs": {
|
|
170
|
+
"tags": [],
|
|
171
|
+
"text": "Controls the size of the navigation items.\nChoose \"small\" for deep and long navigation, and \"large\" (default) for a flat and short navigation."
|
|
172
|
+
},
|
|
173
|
+
"getter": false,
|
|
174
|
+
"setter": false,
|
|
175
|
+
"reflect": false,
|
|
176
|
+
"attribute": "size",
|
|
177
|
+
"defaultValue": "'large'"
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
static get states() {
|
|
182
|
+
return {
|
|
183
|
+
"device": {}
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
static get events() {
|
|
187
|
+
return [{
|
|
188
|
+
"method": "postToggle",
|
|
189
|
+
"name": "postToggle",
|
|
190
|
+
"bubbles": true,
|
|
191
|
+
"cancelable": true,
|
|
192
|
+
"composed": true,
|
|
193
|
+
"docs": {
|
|
194
|
+
"tags": [],
|
|
195
|
+
"text": "An event emitted when the navigation is shown or hidden on mobile.\nThe payload is a boolean: `true` when the navigation opens, `false` when it closes."
|
|
196
|
+
},
|
|
197
|
+
"complexType": {
|
|
198
|
+
"original": "boolean",
|
|
199
|
+
"resolved": "boolean",
|
|
200
|
+
"references": {}
|
|
201
|
+
}
|
|
202
|
+
}];
|
|
203
|
+
}
|
|
204
|
+
static get methods() {
|
|
205
|
+
return {
|
|
206
|
+
"toggle": {
|
|
207
|
+
"complexType": {
|
|
208
|
+
"signature": "() => Promise<void>",
|
|
209
|
+
"parameters": [],
|
|
210
|
+
"references": {
|
|
211
|
+
"Promise": {
|
|
212
|
+
"location": "global",
|
|
213
|
+
"id": "global::Promise"
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"return": "Promise<void>"
|
|
217
|
+
},
|
|
218
|
+
"docs": {
|
|
219
|
+
"text": "Toggles the navigation programmatically.\nNo-op on desktop.",
|
|
220
|
+
"tags": []
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"show": {
|
|
224
|
+
"complexType": {
|
|
225
|
+
"signature": "() => Promise<void>",
|
|
226
|
+
"parameters": [],
|
|
227
|
+
"references": {
|
|
228
|
+
"Promise": {
|
|
229
|
+
"location": "global",
|
|
230
|
+
"id": "global::Promise"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"return": "Promise<void>"
|
|
234
|
+
},
|
|
235
|
+
"docs": {
|
|
236
|
+
"text": "Opens the navigation programmatically.\nNo-op on desktop.",
|
|
237
|
+
"tags": []
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"hide": {
|
|
241
|
+
"complexType": {
|
|
242
|
+
"signature": "() => Promise<void>",
|
|
243
|
+
"parameters": [],
|
|
244
|
+
"references": {
|
|
245
|
+
"Promise": {
|
|
246
|
+
"location": "global",
|
|
247
|
+
"id": "global::Promise"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"return": "Promise<void>"
|
|
251
|
+
},
|
|
252
|
+
"docs": {
|
|
253
|
+
"text": "Closes the navigation programmatically.\nNo-op on desktop.",
|
|
254
|
+
"tags": []
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
static get elementRef() { return "host"; }
|
|
260
|
+
}
|
|
261
|
+
__decorate([
|
|
262
|
+
Required(),
|
|
263
|
+
Type('string')
|
|
264
|
+
], PostSideNavigation.prototype, "textClose", void 0);
|
|
265
|
+
__decorate([
|
|
266
|
+
OneOf(SIDE_NAVIGATION_SIZES)
|
|
267
|
+
], PostSideNavigation.prototype, "size", void 0);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const SIDE_NAVIGATION_SIZES = ['large', 'small'];
|
package/dist/collection/components/post-side-navigation-trigger/post-side-navigation-trigger.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:host{display:inline-block}@media screen and (min-width: 1024px){:host{display:none}}
|