@swisspost/design-system-components 10.0.0-next.71 → 10.0.0-next.75
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 +223 -0
- package/dist/cjs/{index-CCteMCnR.js → index-CyeY2muT.js} +54 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/one-of-BVQP1dR3.js +27 -0
- package/dist/cjs/{package-CscM89A7.js → package-JSyXVavg.js} +1 -1
- package/dist/cjs/pattern-BDKu8-v6.js +27 -0
- package/dist/cjs/post-accordion_2.cjs.entry.js +15 -21
- package/dist/cjs/post-autocomplete.cjs.entry.js +26 -13
- package/dist/cjs/post-avatar.cjs.entry.js +30 -33
- package/dist/cjs/post-back-to-top.cjs.entry.js +20 -11
- package/dist/cjs/post-banner.cjs.entry.js +9 -14
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +34 -24
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +35 -38
- package/dist/cjs/post-closebutton_14.cjs.entry.js +284 -300
- package/dist/cjs/post-collapsible_2.cjs.entry.js +56 -39
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-date-picker.cjs.entry.js +142 -140
- package/dist/cjs/post-footer.cjs.entry.js +24 -17
- 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 -5
- package/dist/cjs/post-login-widget.cjs.entry.js +29 -30
- package/dist/cjs/post-number-input.cjs.entry.js +5 -5
- package/dist/cjs/post-pagination.cjs.entry.js +60 -85
- package/dist/cjs/post-popover-trigger.cjs.entry.js +21 -18
- package/dist/cjs/post-popover.cjs.entry.js +24 -22
- package/dist/cjs/post-progressbar.cjs.entry.js +147 -0
- package/dist/cjs/post-rating.cjs.entry.js +33 -34
- package/dist/cjs/post-side-navigation-trigger.cjs.entry.js +109 -0
- package/dist/cjs/post-side-navigation.cjs.entry.js +129 -0
- package/dist/cjs/post-stepper-item.cjs.entry.js +4 -4
- package/dist/cjs/post-stepper.cjs.entry.js +50 -37
- package/dist/cjs/post-tab-item.cjs.entry.js +20 -12
- package/dist/cjs/post-tab-panel.cjs.entry.js +20 -13
- package/dist/cjs/post-tabs.cjs.entry.js +21 -7
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +21 -12
- package/dist/cjs/post-tooltip.cjs.entry.js +19 -16
- package/dist/cjs/required-BsZuSJAl.js +44 -0
- package/dist/cjs/type-DXpEWY0w.js +30 -0
- package/dist/cjs/url-D-EbWRlF.js +34 -0
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/post-accordion/post-accordion.js +11 -8
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +4 -17
- package/dist/collection/components/post-autocomplete/post-autocomplete.js +23 -13
- package/dist/collection/components/post-avatar/post-avatar.js +27 -33
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +17 -10
- package/dist/collection/components/post-banner/post-banner.css +2 -2
- package/dist/collection/components/post-banner/post-banner.js +7 -14
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -1
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +27 -22
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +30 -37
- package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
- package/dist/collection/components/post-closebutton/post-closebutton.js +45 -37
- package/dist/collection/components/post-closebutton/types.js +1 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js +26 -16
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +34 -30
- package/dist/collection/components/post-date-picker/post-date-picker.css +1 -1
- package/dist/collection/components/post-date-picker/post-date-picker.js +64 -96
- package/dist/collection/components/post-footer/post-footer.js +17 -13
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +25 -30
- package/dist/collection/components/post-icon/post-icon.js +34 -47
- package/dist/collection/components/post-language-menu/post-language-menu.css +1 -1
- package/dist/collection/components/post-language-menu/post-language-menu.js +15 -20
- package/dist/collection/components/post-language-menu-item/post-language-menu-item.css +1 -1
- package/dist/collection/components/post-language-menu-item/post-language-menu-item.js +28 -39
- package/dist/collection/components/post-linkarea/post-linkarea.js +2 -2
- package/dist/collection/components/post-listbox/post-listbox.js +3 -5
- package/dist/collection/components/post-listbox-option/post-listbox-option.js +3 -3
- package/dist/collection/components/post-login-widget/post-login-widget.css +1 -1
- package/dist/collection/components/post-login-widget/post-login-widget.js +25 -29
- package/dist/collection/components/post-logo/post-logo.js +16 -13
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +17 -13
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +24 -23
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +7 -15
- package/dist/collection/components/post-menu/post-menu.css +1 -1
- package/dist/collection/components/post-menu/post-menu.js +10 -23
- package/dist/collection/components/post-menu-item/post-menu-item.css +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +17 -13
- package/dist/collection/components/post-number-input/post-number-input.css +1 -1
- package/dist/collection/components/post-number-input/post-number-input.js +5 -5
- package/dist/collection/components/post-pagination/post-pagination.css +1 -1
- package/dist/collection/components/post-pagination/post-pagination.js +58 -87
- package/dist/collection/components/post-popover/post-popover.js +20 -22
- package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +16 -14
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +29 -33
- package/dist/collection/components/post-progressbar/post-progressbar.css +1 -0
- package/dist/collection/components/post-progressbar/post-progressbar.js +136 -0
- package/dist/collection/components/post-rating/post-rating.js +25 -29
- package/dist/collection/components/post-side-navigation/post-side-navigation.css +1 -0
- package/dist/collection/components/post-side-navigation/post-side-navigation.js +231 -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 +46 -36
- package/dist/collection/components/post-stepper-item/post-stepper-item.css +1 -1
- package/dist/collection/components/post-stepper-item/post-stepper-item.js +2 -2
- package/dist/collection/components/post-tab-item/post-tab-item.js +17 -12
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +17 -13
- package/dist/collection/components/post-tabs/post-tabs.js +20 -7
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +5 -3
- package/dist/collection/components/post-tooltip/post-tooltip.js +17 -16
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +17 -12
- package/dist/collection/utils/index.js +3 -4
- package/dist/collection/utils/is-value-empty.js +1 -1
- package/dist/collection/utils/property-decorators/bound.js +75 -0
- package/dist/collection/utils/property-decorators/create-validator-decorator.js +24 -0
- package/dist/collection/utils/property-decorators/index.js +1 -1
- package/dist/collection/utils/property-decorators/required.js +19 -3
- package/dist/component-names.json +3 -0
- package/dist/components/breakpoints.js +1 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +1 -1
- package/dist/components/one-of.js +1 -0
- package/dist/components/package.js +1 -1
- package/dist/components/pattern.js +1 -0
- 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-avatar2.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-login-widget.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.d.ts +11 -0
- package/dist/components/post-progressbar.js +1 -0
- 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-side-navigation.d.ts +11 -0
- 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-4wtxqxXu.js +1 -0
- package/dist/components/react/p-B3ZJPCU0.js +1 -0
- package/dist/components/react/p-BUAS73l8.js +1 -0
- package/dist/components/react/p-BUSQG9af.js +1 -0
- package/dist/components/react/p-BXqGI600.js +1 -0
- package/dist/components/react/p-B_WnO-QF.js +1 -0
- package/dist/components/react/p-BaB8wJvk.js +1 -0
- package/dist/components/react/p-Bji_4dfL.js +1 -0
- package/dist/components/react/p-C7aYEQh5.js +1 -0
- package/dist/components/react/p-CX2E_IXB.js +1 -0
- package/dist/components/react/p-CbU3QFNG.js +1 -0
- package/dist/components/react/p-CdhbouMD.js +1 -0
- package/dist/components/react/p-Ci08Eesw.js +1 -0
- package/dist/components/react/{p-BC0-M_SK.js → p-DNddZV_h.js} +1 -1
- package/dist/components/react/p-DTg2SXJj.js +1 -0
- package/dist/components/react/p-DU4XzTGt.js +1 -0
- package/dist/components/react/p-DWlDkwjY.js +1 -0
- package/dist/components/react/p-wqJxIo5L.js +1 -0
- package/dist/components/react/p-ztiqEfbC.js +1 -0
- package/dist/components/react/post-accordion-item.js +1 -1
- package/dist/components/react/post-accordion.js +1 -1
- package/dist/components/react/post-autocomplete.js +1 -1
- package/dist/components/react/post-avatar.js +1 -1
- package/dist/components/react/post-back-to-top.js +1 -1
- package/dist/components/react/post-banner.js +1 -1
- package/dist/components/react/post-breadcrumb-item.js +1 -1
- package/dist/components/react/post-breadcrumbs.js +1 -1
- package/dist/components/react/post-closebutton.js +1 -1
- package/dist/components/react/post-collapsible-trigger.js +1 -1
- package/dist/components/react/post-collapsible.js +1 -1
- package/dist/components/react/post-date-picker.js +1 -1
- package/dist/components/react/post-footer.js +1 -1
- package/dist/components/react/post-header.js +1 -1
- package/dist/components/react/post-icon.js +1 -1
- package/dist/components/react/post-language-menu-item.js +1 -1
- package/dist/components/react/post-language-menu.js +1 -1
- package/dist/components/react/post-linkarea.js +1 -1
- package/dist/components/react/post-listbox-option.js +1 -1
- package/dist/components/react/post-listbox.js +1 -1
- package/dist/components/react/post-login-widget.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.d.ts +11 -0
- package/dist/components/react/post-progressbar.js +1 -0
- 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-side-navigation.d.ts +11 -0
- 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/components/required.js +1 -0
- package/dist/components/type.js +1 -0
- package/dist/components/url.js +1 -0
- package/dist/docs.json +344 -14
- package/dist/esm/create-validator-decorator-BNkS_yAb.js +218 -0
- package/dist/esm/{index-DmBWUef5.js → index-BGeKgZqi.js} +54 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/one-of-4BD_5pKR.js +25 -0
- package/dist/esm/package-CdhbouMD.js +3 -0
- package/dist/esm/pattern-D7tnGo1u.js +25 -0
- package/dist/esm/post-accordion_2.entry.js +15 -21
- package/dist/esm/post-autocomplete.entry.js +26 -13
- package/dist/esm/post-avatar.entry.js +30 -33
- package/dist/esm/post-back-to-top.entry.js +20 -11
- package/dist/esm/post-banner.entry.js +9 -14
- package/dist/esm/post-breadcrumb-item.entry.js +34 -24
- package/dist/esm/post-breadcrumbs.entry.js +35 -38
- package/dist/esm/post-closebutton_14.entry.js +284 -300
- package/dist/esm/post-collapsible_2.entry.js +56 -39
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-date-picker.entry.js +142 -140
- package/dist/esm/post-footer.entry.js +20 -13
- 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 -5
- package/dist/esm/post-login-widget.entry.js +29 -30
- package/dist/esm/post-number-input.entry.js +5 -5
- package/dist/esm/post-pagination.entry.js +60 -85
- package/dist/esm/post-popover-trigger.entry.js +19 -16
- package/dist/esm/post-popover.entry.js +24 -22
- package/dist/esm/post-progressbar.entry.js +145 -0
- package/dist/esm/post-rating.entry.js +28 -29
- package/dist/esm/post-side-navigation-trigger.entry.js +107 -0
- package/dist/esm/post-side-navigation.entry.js +127 -0
- package/dist/esm/post-stepper-item.entry.js +4 -4
- package/dist/esm/post-stepper.entry.js +50 -37
- package/dist/esm/post-tab-item.entry.js +20 -12
- package/dist/esm/post-tab-panel.entry.js +20 -13
- package/dist/esm/post-tabs.entry.js +21 -7
- package/dist/esm/post-tooltip-trigger.entry.js +21 -12
- package/dist/esm/post-tooltip.entry.js +19 -16
- package/dist/esm/required-DhBxDSbP.js +42 -0
- package/dist/esm/type-icZlikjf.js +28 -0
- package/dist/esm/url-B_2x2YCy.js +32 -0
- package/dist/post-components/p-001f58d8.entry.js +1 -0
- package/dist/post-components/p-0a08ae23.entry.js +1 -0
- package/dist/post-components/p-12c8b073.entry.js +1 -0
- package/dist/post-components/{p-bab0f27f.entry.js → p-15fa7e60.entry.js} +1 -1
- package/dist/post-components/p-1839276a.entry.js +1 -0
- package/dist/post-components/p-28eeb5d8.entry.js +1 -0
- package/dist/post-components/p-3e83aa1f.entry.js +1 -0
- package/dist/post-components/p-41b5dbfc.entry.js +1 -0
- package/dist/post-components/p-5d20cbcb.entry.js +1 -0
- package/dist/post-components/p-6a1c4897.entry.js +1 -0
- package/dist/post-components/p-6cbb2e7f.entry.js +1 -0
- package/dist/post-components/p-6d14f78a.entry.js +1 -0
- package/dist/post-components/p-6e8b6249.entry.js +1 -0
- package/dist/post-components/p-71918d59.entry.js +1 -0
- package/dist/post-components/p-7ee4b829.entry.js +1 -0
- package/dist/post-components/p-8139b0cc.entry.js +1 -0
- package/dist/post-components/p-84c8d952.entry.js +1 -0
- package/dist/post-components/p-87ebb213.entry.js +1 -0
- package/dist/post-components/{p-4b445a35.entry.js → p-89da6378.entry.js} +1 -1
- package/dist/post-components/p-8SvFxSp6.js +1 -0
- package/dist/post-components/p-8caaa149.entry.js +1 -0
- package/dist/post-components/p-923439d1.entry.js +1 -0
- package/dist/post-components/p-97c1f070.entry.js +1 -0
- package/dist/post-components/p-9e240299.entry.js +1 -0
- package/dist/post-components/p-9ec32e7b.entry.js +1 -0
- package/dist/post-components/p-BGeKgZqi.js +2 -0
- package/dist/post-components/p-CIbyqT6u.js +1 -0
- package/dist/post-components/p-CdhbouMD.js +1 -0
- package/dist/post-components/p-D2ex14Ye.js +1 -0
- package/dist/post-components/p-DH5JdN6V.js +1 -0
- package/dist/post-components/p-DiBqDD4N.js +1 -0
- package/dist/post-components/p-I6rSjhbA.js +1 -0
- package/dist/post-components/p-aff9dd5e.entry.js +1 -0
- package/dist/post-components/p-c905a97c.entry.js +1 -0
- package/dist/post-components/p-e54a6be0.entry.js +1 -0
- package/dist/post-components/p-eca119d2.entry.js +1 -0
- package/dist/post-components/p-f9529d40.entry.js +1 -0
- package/dist/post-components/p-fac58cbd.entry.js +1 -0
- package/dist/post-components/post-components.css +2 -2
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-accordion/post-accordion.d.ts +1 -1
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +0 -2
- package/dist/types/components/post-autocomplete/post-autocomplete.d.ts +0 -1
- package/dist/types/components/post-avatar/post-avatar.d.ts +0 -5
- package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +0 -1
- package/dist/types/components/post-banner/post-banner.d.ts +0 -1
- package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +0 -3
- package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +0 -4
- package/dist/types/components/post-closebutton/post-closebutton.d.ts +5 -5
- package/dist/types/components/post-closebutton/types.d.ts +1 -1
- package/dist/types/components/post-collapsible/post-collapsible.d.ts +1 -2
- package/dist/types/components/post-collapsible-trigger/post-collapsible-trigger.d.ts +3 -6
- package/dist/types/components/post-date-picker/post-date-picker.d.ts +0 -12
- package/dist/types/components/post-footer/post-footer.d.ts +0 -1
- package/dist/types/components/post-header/post-header.d.ts +1 -3
- package/dist/types/components/post-icon/post-icon.d.ts +0 -6
- package/dist/types/components/post-language-menu/post-language-menu.d.ts +1 -3
- package/dist/types/components/post-language-menu-item/post-language-menu-item.d.ts +0 -5
- package/dist/types/components/post-login-widget/post-login-widget.d.ts +0 -4
- package/dist/types/components/post-logo/post-logo.d.ts +0 -1
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +0 -1
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +1 -3
- package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +0 -2
- package/dist/types/components/post-menu/post-menu.d.ts +1 -4
- package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +0 -1
- package/dist/types/components/post-pagination/post-pagination.d.ts +0 -17
- package/dist/types/components/post-popover/post-popover.d.ts +1 -4
- package/dist/types/components/post-popover-trigger/post-popover-trigger.d.ts +0 -1
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +0 -3
- package/dist/types/components/post-progressbar/post-progressbar.d.ts +23 -0
- package/dist/types/components/post-rating/post-rating.d.ts +0 -4
- package/dist/types/components/post-side-navigation/post-side-navigation.d.ts +56 -0
- package/dist/types/components/post-side-navigation-trigger/post-side-navigation-trigger.d.ts +33 -0
- package/dist/types/components/post-stepper/post-stepper.d.ts +1 -4
- package/dist/types/components/post-tab-item/post-tab-item.d.ts +0 -1
- package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +0 -1
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +0 -2
- package/dist/types/components/post-tooltip-trigger/post-tooltip-trigger.d.ts +0 -1
- package/dist/types/components.d.ts +142 -5
- 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/utils/index.d.ts +3 -4
- package/dist/types/utils/property-decorators/bound.d.ts +36 -0
- package/dist/types/utils/property-decorators/create-validator-decorator.d.ts +5 -0
- package/dist/types/utils/property-decorators/index.d.ts +1 -1
- package/dist/types/utils/property-decorators/required.d.ts +10 -1
- package/dist/vrt/helpers/header-test-config.js +3 -2
- package/dist/vrt/helpers/header-variants.config.js +29 -2
- package/hydrate/index.js +1640 -980
- package/hydrate/index.mjs +1640 -980
- package/package.json +4 -4
- package/dist/cjs/index-qCzRmwgB.js +0 -114
- package/dist/collection/utils/property-checkers/check-array-of.js +0 -8
- package/dist/collection/utils/property-checkers/check-date.js +0 -13
- package/dist/collection/utils/property-checkers/check-iso-date.js +0 -9
- package/dist/collection/utils/property-checkers/check-one-of.js +0 -8
- package/dist/collection/utils/property-checkers/check-pattern.js +0 -8
- package/dist/collection/utils/property-checkers/check-type.js +0 -15
- package/dist/collection/utils/property-checkers/check-url.js +0 -15
- package/dist/collection/utils/property-checkers/constants.js +0 -1
- package/dist/collection/utils/property-checkers/empty-or.js +0 -9
- package/dist/collection/utils/property-checkers/index.js +0 -20
- package/dist/collection/utils/property-checkers/required-and.js +0 -14
- package/dist/components/heading-levels.js +0 -1
- package/dist/components/index2.js +0 -1
- package/dist/components/react/p-BQ3HlJPr.js +0 -1
- package/dist/components/react/p-C7s9oglQ.js +0 -1
- package/dist/components/react/p-CTgZ8DGr.js +0 -1
- package/dist/components/react/p-CVtlwDsT.js +0 -1
- package/dist/components/react/p-CaLwTf3T.js +0 -1
- package/dist/components/react/p-ClJyTIVM.js +0 -1
- package/dist/components/react/p-DGr-hfLq.js +0 -1
- package/dist/components/react/p-DJxdj9pa.js +0 -1
- package/dist/components/react/p-DKDEtjQe.js +0 -1
- package/dist/components/react/p-DPKR_4uI.js +0 -1
- package/dist/components/react/p-DcEDGaFs.js +0 -1
- package/dist/components/react/p-DipfA69b.js +0 -1
- package/dist/components/react/p-DwZxAC2u.js +0 -1
- package/dist/components/react/p-r4txK0AC.js +0 -1
- package/dist/components/react/p-x3kxyWSZ.js +0 -1
- package/dist/esm/index-D9bU2pIE.js +0 -104
- package/dist/esm/package-x3kxyWSZ.js +0 -3
- package/dist/post-components/p-08a0e8e9.entry.js +0 -1
- package/dist/post-components/p-1583817b.entry.js +0 -1
- package/dist/post-components/p-203d9abd.entry.js +0 -1
- package/dist/post-components/p-2c68af27.entry.js +0 -1
- package/dist/post-components/p-39143e19.entry.js +0 -1
- package/dist/post-components/p-46dd9e7e.entry.js +0 -1
- package/dist/post-components/p-53a8cce5.entry.js +0 -1
- package/dist/post-components/p-72bff1fc.entry.js +0 -1
- package/dist/post-components/p-75045028.entry.js +0 -1
- package/dist/post-components/p-768b4516.entry.js +0 -1
- package/dist/post-components/p-7e072450.entry.js +0 -1
- package/dist/post-components/p-83cb6424.entry.js +0 -1
- package/dist/post-components/p-94f4da57.entry.js +0 -1
- package/dist/post-components/p-9dace750.entry.js +0 -1
- package/dist/post-components/p-9ea7e46f.entry.js +0 -1
- package/dist/post-components/p-D9bU2pIE.js +0 -1
- package/dist/post-components/p-DmBWUef5.js +0 -2
- package/dist/post-components/p-a0ac814c.entry.js +0 -1
- package/dist/post-components/p-a0d12ca8.entry.js +0 -1
- package/dist/post-components/p-cb039d66.entry.js +0 -1
- package/dist/post-components/p-e8cda4e1.entry.js +0 -1
- package/dist/post-components/p-e8e50d5c.entry.js +0 -1
- package/dist/post-components/p-eb64ec1d.entry.js +0 -1
- package/dist/post-components/p-f0746a9e.entry.js +0 -1
- package/dist/post-components/p-f5e33714.entry.js +0 -1
- package/dist/post-components/p-f93ce33d.entry.js +0 -1
- package/dist/post-components/p-fd0446b2.entry.js +0 -1
- package/dist/post-components/p-x3kxyWSZ.js +0 -1
- package/dist/types/utils/property-checkers/check-array-of.d.ts +0 -4
- package/dist/types/utils/property-checkers/check-date.d.ts +0 -3
- package/dist/types/utils/property-checkers/check-iso-date.d.ts +0 -3
- package/dist/types/utils/property-checkers/check-one-of.d.ts +0 -3
- package/dist/types/utils/property-checkers/check-pattern.d.ts +0 -3
- package/dist/types/utils/property-checkers/check-type.d.ts +0 -4
- package/dist/types/utils/property-checkers/check-url.d.ts +0 -3
- package/dist/types/utils/property-checkers/constants.d.ts +0 -1
- package/dist/types/utils/property-checkers/empty-or.d.ts +0 -3
- package/dist/types/utils/property-checkers/index.d.ts +0 -34
- package/dist/types/utils/property-checkers/required-and.d.ts +0 -3
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index
|
|
4
|
-
var _package = require('./package-CscM89A7.js');
|
|
5
|
-
var focusable = require('./focusable-COT2uiEV.js');
|
|
6
|
-
var index = require('./index-qCzRmwgB.js');
|
|
3
|
+
var index = require('./index-CyeY2muT.js');
|
|
7
4
|
require('./breakpoints-B0Olgvgc.js');
|
|
5
|
+
var _package = require('./package-JSyXVavg.js');
|
|
6
|
+
var focusable = require('./focusable-COT2uiEV.js');
|
|
7
|
+
var type = require('./type-DXpEWY0w.js');
|
|
8
8
|
require('./_commonjsHelpers-BJu3ubxk.js');
|
|
9
|
+
require('./create-validator-decorator-Bimhl6Ib.js');
|
|
9
10
|
|
|
10
11
|
const postPopoverTriggerCss = () => `:host{cursor:pointer}`;
|
|
11
12
|
|
|
13
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
14
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
16
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
else
|
|
18
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
19
|
+
if (d = decorators[i])
|
|
20
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
12
23
|
const PostPopoverTrigger = class {
|
|
13
24
|
syncAriaExpanded(newValue) {
|
|
14
25
|
this.ariaExpanded = newValue;
|
|
@@ -16,13 +27,6 @@ const PostPopoverTrigger = class {
|
|
|
16
27
|
this.trigger.setAttribute('aria-expanded', String(newValue));
|
|
17
28
|
}
|
|
18
29
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Watch for changes to the `for` property to validate its type and ensure it is a string.
|
|
21
|
-
* @param forValue - The new value of the `for` property.
|
|
22
|
-
*/
|
|
23
|
-
validateFor() {
|
|
24
|
-
index.checkEmptyOrType(this, 'for', 'string');
|
|
25
|
-
}
|
|
26
30
|
hasAriaControlsElements(el) {
|
|
27
31
|
return 'ariaControlsElements' in el;
|
|
28
32
|
}
|
|
@@ -80,7 +84,7 @@ const PostPopoverTrigger = class {
|
|
|
80
84
|
}
|
|
81
85
|
}
|
|
82
86
|
constructor(hostRef) {
|
|
83
|
-
index
|
|
87
|
+
index.registerInstance(this, hostRef);
|
|
84
88
|
/**
|
|
85
89
|
* Manages the accessibility attribute `aria-expanded` to indicate whether the associated popover is expanded or collapsed.
|
|
86
90
|
*/
|
|
@@ -103,7 +107,6 @@ const PostPopoverTrigger = class {
|
|
|
103
107
|
};
|
|
104
108
|
}
|
|
105
109
|
componentDidLoad() {
|
|
106
|
-
this.validateFor();
|
|
107
110
|
this.setupTrigger();
|
|
108
111
|
this.popover?.addEventListener('postToggle', this.boundHandlePostToggle);
|
|
109
112
|
}
|
|
@@ -113,18 +116,18 @@ const PostPopoverTrigger = class {
|
|
|
113
116
|
this.popover?.removeEventListener('postToggle', this.boundHandlePostToggle);
|
|
114
117
|
}
|
|
115
118
|
render() {
|
|
116
|
-
return (index
|
|
119
|
+
return (index.h(index.Host, { key: '999ec824514eb6e340fd607ce03d82c76354e102', "data-version": _package.version }, index.h("slot", { key: '3429ab6e44441c2660c14c40436682b5ac49a1b6', onSlotchange: () => this.setupTrigger() })));
|
|
117
120
|
}
|
|
118
|
-
get host() { return index
|
|
121
|
+
get host() { return index.getElement(this); }
|
|
119
122
|
static get watchers() { return {
|
|
120
123
|
"popoverOpen": [{
|
|
121
124
|
"syncAriaExpanded": 0
|
|
122
|
-
}],
|
|
123
|
-
"for": [{
|
|
124
|
-
"validateFor": 0
|
|
125
125
|
}]
|
|
126
126
|
}; }
|
|
127
127
|
};
|
|
128
|
+
__decorate([
|
|
129
|
+
type.Type('string')
|
|
130
|
+
], PostPopoverTrigger.prototype, "for", void 0);
|
|
128
131
|
PostPopoverTrigger.style = postPopoverTriggerCss();
|
|
129
132
|
|
|
130
133
|
exports.post_popover_trigger = PostPopoverTrigger;
|
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CyeY2muT.js');
|
|
4
4
|
var placement = require('./placement-qEFR9hmI.js');
|
|
5
|
-
var _package = require('./package-CscM89A7.js');
|
|
6
|
-
var index$1 = require('./index-qCzRmwgB.js');
|
|
7
5
|
require('./breakpoints-B0Olgvgc.js');
|
|
8
6
|
var getFocusableChildren = require('./get-focusable-children-BGVgg7Te.js');
|
|
7
|
+
var _package = require('./package-JSyXVavg.js');
|
|
8
|
+
var oneOf = require('./one-of-BVQP1dR3.js');
|
|
9
|
+
var required = require('./required-BsZuSJAl.js');
|
|
10
|
+
var type = require('./type-DXpEWY0w.js');
|
|
9
11
|
require('./get-root-B1FnQ50K.js');
|
|
12
|
+
require('./create-validator-decorator-Bimhl6Ib.js');
|
|
10
13
|
|
|
11
14
|
const postPopoverCss = () => `*{box-sizing:border-box}:host{display:contents}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{color:var(--post-current-fg);background-color:var(--post-current-bg);display:flex;align-items:self-start;padding:.5em;min-width:160px;max-width:var(--post-popover-max-width, 280px)}.popover-content{padding:.5em;flex-grow:1}`;
|
|
12
15
|
|
|
16
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
17
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
18
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
19
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else
|
|
21
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
22
|
+
if (d = decorators[i])
|
|
23
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
25
|
+
};
|
|
13
26
|
const PostPopover = class {
|
|
14
27
|
constructor(hostRef) {
|
|
15
28
|
index.registerInstance(this, hostRef);
|
|
@@ -25,16 +38,6 @@ const PostPopover = class {
|
|
|
25
38
|
// eslint-disable-next-line @stencil-community/ban-default-true
|
|
26
39
|
this.arrow = true;
|
|
27
40
|
}
|
|
28
|
-
validatePlacement() {
|
|
29
|
-
index$1.checkEmptyOrOneOf(this, 'placement', placement.PLACEMENT_TYPES);
|
|
30
|
-
}
|
|
31
|
-
validateTextClose() {
|
|
32
|
-
index$1.checkRequiredAndType(this, 'textClose', 'string');
|
|
33
|
-
}
|
|
34
|
-
componentDidLoad() {
|
|
35
|
-
this.validatePlacement();
|
|
36
|
-
this.validateTextClose();
|
|
37
|
-
}
|
|
38
41
|
/**
|
|
39
42
|
* Programmatically display the popover
|
|
40
43
|
* @param target A focusable element inside the <post-popover-trigger> component that controls the popover
|
|
@@ -68,18 +71,17 @@ const PostPopover = class {
|
|
|
68
71
|
}
|
|
69
72
|
}
|
|
70
73
|
render() {
|
|
71
|
-
return (index.h(index.Host, { key: '
|
|
74
|
+
return (index.h(index.Host, { key: 'f48f602235071a8621157c99aa86076e8268b5b4', "data-version": _package.version }, index.h("post-popovercontainer", { key: 'f0be96900bd0e16f2ee8f7937cfa533f510dbd07', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, index.h("div", { key: '716b83cad71dbb09dde75c00aa4c8628d7903315', class: "popover-container" }, index.h("div", { key: '4a15c86977488ba68796ed16175c72ef9ea16a7b', class: "popover-content" }, index.h("slot", { key: 'afd56e2077ed319e1bfbdaabfc8e19395f4f3959' })), index.h("post-closebutton", { key: 'd62b6940c68872d8520e4a69c7411479b9698315', onClick: () => this.hide() }, this.textClose)))));
|
|
72
75
|
}
|
|
73
76
|
get host() { return index.getElement(this); }
|
|
74
|
-
static get watchers() { return {
|
|
75
|
-
"placement": [{
|
|
76
|
-
"validatePlacement": 0
|
|
77
|
-
}],
|
|
78
|
-
"textClose": [{
|
|
79
|
-
"validateTextClose": 0
|
|
80
|
-
}]
|
|
81
|
-
}; }
|
|
82
77
|
};
|
|
78
|
+
__decorate([
|
|
79
|
+
oneOf.OneOf(placement.PLACEMENT_TYPES)
|
|
80
|
+
], PostPopover.prototype, "placement", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
required.Required(),
|
|
83
|
+
type.Type('string')
|
|
84
|
+
], PostPopover.prototype, "textClose", void 0);
|
|
83
85
|
PostPopover.style = postPopoverCss();
|
|
84
86
|
|
|
85
87
|
exports.post_popover = PostPopover;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CyeY2muT.js');
|
|
4
|
+
require('./breakpoints-B0Olgvgc.js');
|
|
5
|
+
var createValidatorDecorator = require('./create-validator-decorator-Bimhl6Ib.js');
|
|
6
|
+
var type = require('./type-DXpEWY0w.js');
|
|
7
|
+
|
|
8
|
+
function resolveBound(component, bound) {
|
|
9
|
+
const resolvedValue = typeof bound === 'string' ? component[bound] : bound;
|
|
10
|
+
return typeof resolvedValue === 'number' ? resolvedValue : null;
|
|
11
|
+
}
|
|
12
|
+
function createBoundValidatorDecorator(bound, options, config) {
|
|
13
|
+
const decorator = createValidatorDecorator.createValidatorDecorator({
|
|
14
|
+
priority: 1,
|
|
15
|
+
blocking: false,
|
|
16
|
+
run(component, property) {
|
|
17
|
+
const { value, showError } = createValidatorDecorator.getValidationContext(component, property);
|
|
18
|
+
if (typeof value !== 'number') {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
const resolvedBound = resolveBound(component, bound);
|
|
22
|
+
if (resolvedBound === null) {
|
|
23
|
+
if (typeof bound === 'string') {
|
|
24
|
+
const boundVal = component[bound];
|
|
25
|
+
const boundType = typeof boundVal;
|
|
26
|
+
if (boundType !== 'number') {
|
|
27
|
+
showError(`references property "${bound}" which must be a number but got ${boundType}`);
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
const include = options.include ?? config.includeDefault;
|
|
34
|
+
if (!config.compare(value, resolvedBound, include)) {
|
|
35
|
+
const displayBound = typeof bound === 'string' ? String(resolvedBound) : String(bound);
|
|
36
|
+
const expectation = config.formatExpectation(displayBound, include);
|
|
37
|
+
showError(`must be ${expectation}`);
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
return true;
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
return function (target, property) {
|
|
44
|
+
if (typeof bound === 'string') {
|
|
45
|
+
createValidatorDecorator.registerDependency(target, bound, property);
|
|
46
|
+
}
|
|
47
|
+
decorator(target, property);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Property decorator that validates the property value is greater than the specified minimum.
|
|
52
|
+
*
|
|
53
|
+
* Validation runs on `componentDidLoad` and whenever the property value changes.
|
|
54
|
+
*
|
|
55
|
+
* @typeParam T - Component type used to constrain property-name bounds.
|
|
56
|
+
* @param minimum - The minimum allowed value (exclusive by default) or property name to read it from.
|
|
57
|
+
* @param options - Configuration object with `includeMin` flag (default: false for exclusive behavior).
|
|
58
|
+
*/
|
|
59
|
+
function GreaterThan(minimum, options = {}) {
|
|
60
|
+
return createBoundValidatorDecorator(minimum, { include: options.includeMin }, {
|
|
61
|
+
includeDefault: false,
|
|
62
|
+
compare: (value, bound, include) => (include ? value >= bound : value > bound),
|
|
63
|
+
formatExpectation: (display, include) => include ? `greater than or equal to "${display}"` : `greater than "${display}"`,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Property decorator that validates the property value is less than the specified maximum.
|
|
68
|
+
*
|
|
69
|
+
* Validation runs on `componentDidLoad` and whenever the property value changes.
|
|
70
|
+
*
|
|
71
|
+
* @typeParam T - Component type used to constrain property-name bounds.
|
|
72
|
+
* @param maximum - The maximum allowed value (inclusive by default) or property name to read it from.
|
|
73
|
+
* @param options - Configuration object with `includeMax` flag (default: true for inclusive behavior).
|
|
74
|
+
*/
|
|
75
|
+
function LessThan(maximum, options = {}) {
|
|
76
|
+
return createBoundValidatorDecorator(maximum, { include: options.includeMax }, {
|
|
77
|
+
includeDefault: true,
|
|
78
|
+
compare: (value, bound, include) => (include ? value <= bound : value < bound),
|
|
79
|
+
formatExpectation: (display, include) => include ? `less than or equal to "${display}"` : `less than "${display}"`,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const postProgressbarCss = () => `:host{display:block;position:relative;height:var(--post-device-sizing-interactive-progressbar-indicator);border-radius:var(--post-device-border-radius-round);box-shadow:0px 0px 0px var(--post-device-border-width-alternative1) var(--post-scheme-color-interactive-primary-enabled-stroke) inset;overflow:hidden}.progress-value{position:absolute;inset-block:0;inset-inline-start:0;width:var(--post-progressbar-value, 0);border-radius:var(--post-device-border-radius-round);background-color:var(--post-progressbar-status-color, var(--post-scheme-color-interactive-primary-enabled-bg2));transition:width 250ms cubic-bezier(0.4, 0, 0.2, 1)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host{border:1px solid Highlight}.progress-value{background-color:Highlight}}`;
|
|
84
|
+
|
|
85
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
86
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
87
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
88
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
89
|
+
else
|
|
90
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
91
|
+
if (d = decorators[i])
|
|
92
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
93
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
94
|
+
};
|
|
95
|
+
const PostProgressbar = class {
|
|
96
|
+
constructor(hostRef) {
|
|
97
|
+
index.registerInstance(this, hostRef);
|
|
98
|
+
/**
|
|
99
|
+
* The minimum value of the progress bar.
|
|
100
|
+
* Must be a valid floating point number less than max.
|
|
101
|
+
*/
|
|
102
|
+
this.min = 0;
|
|
103
|
+
/**
|
|
104
|
+
* Describes how much work the task indicated by the progress element requires.
|
|
105
|
+
* Must be a valid floating point number greater than min.
|
|
106
|
+
*/
|
|
107
|
+
this.max = 100;
|
|
108
|
+
}
|
|
109
|
+
getEffectiveMin() {
|
|
110
|
+
return Number.isFinite(this.min) ? this.min : 0;
|
|
111
|
+
}
|
|
112
|
+
getEffectiveMax() {
|
|
113
|
+
return Number.isFinite(this.max) && this.max > this.getEffectiveMin() ? this.max : 100;
|
|
114
|
+
}
|
|
115
|
+
getEffectiveValue(min, max) {
|
|
116
|
+
if (this.value === undefined ||
|
|
117
|
+
!Number.isFinite(this.value) ||
|
|
118
|
+
this.value < min ||
|
|
119
|
+
this.value > max) {
|
|
120
|
+
return min;
|
|
121
|
+
}
|
|
122
|
+
return this.value;
|
|
123
|
+
}
|
|
124
|
+
render() {
|
|
125
|
+
const min = this.getEffectiveMin();
|
|
126
|
+
const max = this.getEffectiveMax();
|
|
127
|
+
const value = this.getEffectiveValue(min, max);
|
|
128
|
+
const percentage = ((value - min) / (max - min)) * 100;
|
|
129
|
+
return (index.h(index.Host, { key: '3d48615c3f08904f896eb5ebb7d8bfdff882a89b', role: "progressbar", "aria-valuenow": value, "aria-valuemin": min, "aria-valuemax": max }, index.h("div", { key: 'dd8c0d44ba1aeccb3102cb15556517df98b9cf63', class: "progress-value", style: { '--post-progressbar-value': `${percentage}%` } })));
|
|
130
|
+
}
|
|
131
|
+
get host() { return index.getElement(this); }
|
|
132
|
+
};
|
|
133
|
+
__decorate([
|
|
134
|
+
type.Type('number')
|
|
135
|
+
], PostProgressbar.prototype, "min", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
type.Type('number'),
|
|
138
|
+
GreaterThan('min')
|
|
139
|
+
], PostProgressbar.prototype, "max", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
type.Type('number'),
|
|
142
|
+
GreaterThan('min'),
|
|
143
|
+
LessThan('max')
|
|
144
|
+
], PostProgressbar.prototype, "value", void 0);
|
|
145
|
+
PostProgressbar.style = postProgressbarCss();
|
|
146
|
+
|
|
147
|
+
exports.post_progressbar = PostProgressbar;
|
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index
|
|
4
|
-
var _package = require('./package-CscM89A7.js');
|
|
5
|
-
var index = require('./index-qCzRmwgB.js');
|
|
3
|
+
var index = require('./index-CyeY2muT.js');
|
|
6
4
|
require('./breakpoints-B0Olgvgc.js');
|
|
5
|
+
var _package = require('./package-JSyXVavg.js');
|
|
6
|
+
var required = require('./required-BsZuSJAl.js');
|
|
7
|
+
var type = require('./type-DXpEWY0w.js');
|
|
8
|
+
require('./create-validator-decorator-Bimhl6Ib.js');
|
|
7
9
|
|
|
8
10
|
const postRatingCss = () => `:host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 calc(var(--post-core-dimension-4)*-1);border-radius:4px}.rating .star{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fff;position:relative;width:2rem;height:2rem;cursor:pointer}.rating .star .stroke,.rating .star .fill{display:block;width:100%;height:100%;transition:all ease 100ms}.rating .star .stroke{position:absolute;inset:auto;z-index:1;color:var(--post-rating-star-stroke)}.rating .star .fill{margin:1px;width:calc(100% - 2px);height:calc(100% - 2px);color:var(--post-rating-star-fill)}.rating .star.before-hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.active{--post-rating-star-stroke:hsl(0, 0%, 20%);--post-rating-star-fill:#fc0}.rating .star.hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.after-active{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:hsl(0, 0%, 80%)}.rating :focus{outline:none}.rating:focus-visible{outline-offset:var(--post-core-dimension-2);outline:var(--post-core-dimension-2) solid #1976c8}.rating[aria-readonly=true] .star,.rating[aria-disabled=true] .star{cursor:default}.rating[aria-disabled=true] .star{--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:#fff}.rating[aria-disabled=true] .star.active{cursor:default;--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:hsl(0, 0%, 90%)}`;
|
|
9
11
|
|
|
12
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
13
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
15
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
16
|
+
else
|
|
17
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
18
|
+
if (d = decorators[i])
|
|
19
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
20
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21
|
+
};
|
|
10
22
|
const PostRating = class {
|
|
11
|
-
validateLabel() {
|
|
12
|
-
index.checkRequiredAndType(this, 'label', 'string');
|
|
13
|
-
}
|
|
14
|
-
validateStars() {
|
|
15
|
-
index.checkRequiredAndType(this, 'stars', 'number');
|
|
16
|
-
}
|
|
17
|
-
validateCurrentRating() {
|
|
18
|
-
index.checkRequiredAndType(this, 'currentRating', 'number');
|
|
19
|
-
}
|
|
20
|
-
componentWillLoad() {
|
|
21
|
-
this.validateLabel();
|
|
22
|
-
this.validateStars();
|
|
23
|
-
this.validateCurrentRating();
|
|
24
|
-
}
|
|
25
23
|
constructor(hostRef) {
|
|
26
|
-
index
|
|
27
|
-
this.postInput = index
|
|
28
|
-
this.postChange = index
|
|
24
|
+
index.registerInstance(this, hostRef);
|
|
25
|
+
this.postInput = index.createEvent(this, "postInput");
|
|
26
|
+
this.postChange = index.createEvent(this, "postChange");
|
|
29
27
|
this.hasChanged = false;
|
|
30
28
|
/**
|
|
31
29
|
* Defines the total amount of stars rendered in the component.
|
|
@@ -96,27 +94,28 @@ const PostRating = class {
|
|
|
96
94
|
}
|
|
97
95
|
}
|
|
98
96
|
render() {
|
|
99
|
-
return (index
|
|
97
|
+
return (index.h(index.Host, { key: 'c037e21b074c9ebc433e325e49d17dbe06d8db43', "data-version": _package.version }, index.h("div", { key: 'f661eac91003680598c38d54dbc5fa3f482b7ad8', 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) => (index.h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
|
|
100
98
|
'star': true,
|
|
101
99
|
'before-hover': i < this.hoveredIndex,
|
|
102
100
|
'active': i < Math.round(this.currentRating),
|
|
103
101
|
'hover': i === this.hoveredIndex,
|
|
104
102
|
'after-active': i > this.hoveredIndex && i < this.currentRating,
|
|
105
|
-
}, onClick: () => this.update(i + 1), onMouseEnter: e => this.hoverHandler(i, e), onMouseLeave: e => this.hoverHandler(i, e) }, index
|
|
103
|
+
}, onClick: () => this.update(i + 1), onMouseEnter: e => this.hoverHandler(i, e), onMouseLeave: e => this.hoverHandler(i, e) }, index.h("post-icon", { name: "favoritestar", class: "stroke" }), index.h("post-icon", { name: "favoritestar-solid", class: "fill" })))))));
|
|
106
104
|
}
|
|
107
|
-
get host() { return index
|
|
108
|
-
static get watchers() { return {
|
|
109
|
-
"label": [{
|
|
110
|
-
"validateLabel": 0
|
|
111
|
-
}],
|
|
112
|
-
"stars": [{
|
|
113
|
-
"validateStars": 0
|
|
114
|
-
}],
|
|
115
|
-
"currentRating": [{
|
|
116
|
-
"validateCurrentRating": 0
|
|
117
|
-
}]
|
|
118
|
-
}; }
|
|
105
|
+
get host() { return index.getElement(this); }
|
|
119
106
|
};
|
|
107
|
+
__decorate([
|
|
108
|
+
required.Required(),
|
|
109
|
+
type.Type('string')
|
|
110
|
+
], PostRating.prototype, "label", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
required.Required(),
|
|
113
|
+
type.Type('number')
|
|
114
|
+
], PostRating.prototype, "stars", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
required.Required(),
|
|
117
|
+
type.Type('number')
|
|
118
|
+
], PostRating.prototype, "currentRating", void 0);
|
|
120
119
|
PostRating.style = postRatingCss();
|
|
121
120
|
|
|
122
121
|
exports.post_rating = PostRating;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CyeY2muT.js');
|
|
4
|
+
var _package = require('./package-JSyXVavg.js');
|
|
5
|
+
require('./breakpoints-B0Olgvgc.js');
|
|
6
|
+
var eventFrom = require('./event-from-CwMw19f8.js');
|
|
7
|
+
var getRoot = require('./get-root-B1FnQ50K.js');
|
|
8
|
+
var required = require('./required-BsZuSJAl.js');
|
|
9
|
+
var type = require('./type-DXpEWY0w.js');
|
|
10
|
+
require('./create-validator-decorator-Bimhl6Ib.js');
|
|
11
|
+
|
|
12
|
+
const postSideNavigationTriggerCss = () => `:host{display:inline-block;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}@media screen and (min-width: 1024px){:host{display:none}}:host(:focus-within){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(:focus-within):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:focus-within):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host(:focus-within):is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:focus-within):is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:focus-within){outline-color:Highlight !important}}::slotted(button){display:inline-flex;position:relative;align-items:center;justify-content:center;max-width:100%;overflow:hidden;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;border-width:var(--post-device-border-width-default);border-style:solid;border-color:rgba(0,0,0,0);border-radius:var(--post-device-border-radius-round);background-color:rgba(0,0,0,0);box-shadow:none;font-family:inherit;font-size:var(--post-device-font-size-6);font-weight:var(--post-device-font-weight-bold);text-decoration:none;white-space:nowrap;cursor:pointer;border:unset;font-weight:unset;display:flex;padding:.25rem .625rem;gap:.375rem;font-size:1rem;border-color:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke);color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-tertiary-enabled-bg);outline:none}::slotted(button):not(:disabled):hover{text-decoration:none}::slotted(button):disabled{border-style:var(--post-core-border-style-dash);cursor:unset}::slotted(button){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}::slotted(button):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){::slotted(button):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){::slotted(button):is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){::slotted(button):is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){::slotted(button):is(a){color:LinkText;border:unset}::slotted(button):is(button){background-color:ButtonFace !important;border:1px solid ButtonBorder !important}::slotted(button):not(:disabled,.disabled):is(button):hover{background-color:Highlight !important}::slotted(button):not(:disabled,.disabled):is(button):hover>post-icon{color:HighlightText !important}}::slotted(button):hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg)}::slotted(button):is([aria-current],[aria-pressed=true],[aria-expanded=true],.active){box-shadow:var(--post-device-elevation-100);border-color:var(--post-scheme-color-interactive-button-primary-enabled-stroke);color:var(--post-scheme-color-interactive-button-primary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-primary-enabled-bg)}::slotted(button):is([aria-current],[aria-pressed=true],[aria-expanded=true],.active):hover{border-color:var(--post-scheme-color-interactive-button-primary-hover-stroke);color:var(--post-scheme-color-interactive-button-primary-hover-fg);background-color:var(--post-scheme-color-interactive-button-primary-hover-bg)}@media screen and (min-width: 0)and (max-width: 599.98px){::slotted(button){padding:.625rem}::slotted(button)>:not(post-icon){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}::slotted(button)>post-icon{font-size:1.5rem}}`;
|
|
13
|
+
|
|
14
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
17
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
18
|
+
else
|
|
19
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
20
|
+
if (d = decorators[i])
|
|
21
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
const PostSideNavigationTrigger = class {
|
|
25
|
+
constructor(hostRef) {
|
|
26
|
+
index.registerInstance(this, hostRef);
|
|
27
|
+
this.observer = new MutationObserver(() => this.setTrigger());
|
|
28
|
+
this.toggleSideNavigation = this.toggleSideNavigation.bind(this);
|
|
29
|
+
this.handlePostToggle = this.handlePostToggle.bind(this);
|
|
30
|
+
}
|
|
31
|
+
connectedCallback() {
|
|
32
|
+
this.root = getRoot.getRoot(this.host);
|
|
33
|
+
this.root.addEventListener('postToggle', this.handlePostToggle);
|
|
34
|
+
this.observer.observe(this.host, { childList: true, subtree: true });
|
|
35
|
+
}
|
|
36
|
+
componentDidLoad() {
|
|
37
|
+
this.setTrigger();
|
|
38
|
+
if (!this.trigger)
|
|
39
|
+
console.warn('The post-side-navigation-trigger must contain a button.');
|
|
40
|
+
}
|
|
41
|
+
disconnectedCallback() {
|
|
42
|
+
this.observer.disconnect();
|
|
43
|
+
this.root.removeEventListener('postToggle', this.handlePostToggle);
|
|
44
|
+
this.trigger?.removeEventListener('click', this.toggleSideNavigation);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Retrieve the post-side-navigation controlled by the trigger.
|
|
48
|
+
*/
|
|
49
|
+
get sideNavigation() {
|
|
50
|
+
const ref = this.root.getElementById(this.for);
|
|
51
|
+
if (ref && ref.localName === 'post-side-navigation') {
|
|
52
|
+
return ref;
|
|
53
|
+
}
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Find the button, attach the click listener and the initial ARIA attributes.
|
|
58
|
+
*/
|
|
59
|
+
setTrigger() {
|
|
60
|
+
const trigger = this.host.querySelector('button');
|
|
61
|
+
if (!trigger || (this.trigger && trigger.isEqualNode(this.trigger)))
|
|
62
|
+
return;
|
|
63
|
+
if (this.trigger) {
|
|
64
|
+
this.trigger.removeEventListener('click', this.toggleSideNavigation);
|
|
65
|
+
}
|
|
66
|
+
this.trigger = trigger;
|
|
67
|
+
this.trigger.addEventListener('click', this.toggleSideNavigation);
|
|
68
|
+
this.updateAriaAttributes();
|
|
69
|
+
}
|
|
70
|
+
updateAriaAttributes() {
|
|
71
|
+
if (!this.trigger)
|
|
72
|
+
return;
|
|
73
|
+
const ariaControls = this.trigger.getAttribute('aria-controls');
|
|
74
|
+
if (!ariaControls?.includes(this.for)) {
|
|
75
|
+
const newAriaControls = ariaControls ? `${ariaControls} ${this.for}` : this.for;
|
|
76
|
+
this.trigger.setAttribute('aria-controls', newAriaControls);
|
|
77
|
+
}
|
|
78
|
+
this.trigger.setAttribute('aria-expanded', 'false');
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Keep the trigger's `aria-expanded` in sync with the navigation state.
|
|
82
|
+
*/
|
|
83
|
+
handlePostToggle(e) {
|
|
84
|
+
this.trigger?.setAttribute('aria-expanded', `${e.detail}`);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Manually update the trigger's ARIA attributes.
|
|
88
|
+
*/
|
|
89
|
+
async update() {
|
|
90
|
+
this.updateAriaAttributes();
|
|
91
|
+
}
|
|
92
|
+
async toggleSideNavigation() {
|
|
93
|
+
await this.sideNavigation?.toggle();
|
|
94
|
+
}
|
|
95
|
+
render() {
|
|
96
|
+
return (index.h(index.Host, { key: 'f6b6a9681e0894724cdf523cbd8104f3c3c1924d', "data-version": _package.version }, index.h("slot", { key: 'cbd61018657553b1aed33bddb3667145548fc653' })));
|
|
97
|
+
}
|
|
98
|
+
get host() { return index.getElement(this); }
|
|
99
|
+
};
|
|
100
|
+
__decorate([
|
|
101
|
+
required.Required(),
|
|
102
|
+
type.Type('string')
|
|
103
|
+
], PostSideNavigationTrigger.prototype, "for", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
eventFrom.EventFrom('post-side-navigation', { ignoreNestedComponents: false })
|
|
106
|
+
], PostSideNavigationTrigger.prototype, "handlePostToggle", null);
|
|
107
|
+
PostSideNavigationTrigger.style = postSideNavigationTriggerCss();
|
|
108
|
+
|
|
109
|
+
exports.post_side_navigation_trigger = PostSideNavigationTrigger;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CyeY2muT.js');
|
|
4
|
+
var _package = require('./package-JSyXVavg.js');
|
|
5
|
+
var breakpoints = require('./breakpoints-B0Olgvgc.js');
|
|
6
|
+
var getFocusableChildren = require('./get-focusable-children-BGVgg7Te.js');
|
|
7
|
+
var required = require('./required-BsZuSJAl.js');
|
|
8
|
+
var type = require('./type-DXpEWY0w.js');
|
|
9
|
+
require('./get-root-B1FnQ50K.js');
|
|
10
|
+
require('./create-validator-decorator-Bimhl6Ib.js');
|
|
11
|
+
|
|
12
|
+
const postSideNavigationCss = () => `:host{display:flex;background-color:#f0efed}:host dialog{overflow-y:auto;bottom:auto;right:auto;border:none;padding-inline:0;padding-block:40px;height:100vh;background-color:#f0efed}@media screen and (min-width: 1024px){:host{max-width:35ch;width:35ch}}`;
|
|
13
|
+
|
|
14
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
17
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
18
|
+
else
|
|
19
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
20
|
+
if (d = decorators[i])
|
|
21
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
const PostSideNavigation = class {
|
|
25
|
+
constructor(hostRef) {
|
|
26
|
+
index.registerInstance(this, hostRef);
|
|
27
|
+
this.postToggle = index.createEvent(this, "postToggle");
|
|
28
|
+
this.device = breakpoints.breakpoint.get('device');
|
|
29
|
+
this.breakpointChange = (e) => {
|
|
30
|
+
this.device = e.detail;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Collapses the active disclosure on Escape; lets the native dialog handle it otherwise.
|
|
34
|
+
*/
|
|
35
|
+
this.handleKeyDown = (e) => {
|
|
36
|
+
if (e.key !== 'Escape')
|
|
37
|
+
return;
|
|
38
|
+
const collapsible = this.collapsible;
|
|
39
|
+
if (!collapsible || collapsible.collapsed)
|
|
40
|
+
return;
|
|
41
|
+
e.preventDefault();
|
|
42
|
+
e.stopPropagation();
|
|
43
|
+
collapsible.toggle(false);
|
|
44
|
+
this.collapsibleTrigger?.querySelector('button')?.focus();
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
connectedCallback() {
|
|
48
|
+
globalThis.addEventListener('postBreakpoint:device', this.breakpointChange);
|
|
49
|
+
this.host.addEventListener('keydown', this.handleKeyDown);
|
|
50
|
+
}
|
|
51
|
+
disconnectedCallback() {
|
|
52
|
+
globalThis.removeEventListener('postBreakpoint:device', this.breakpointChange);
|
|
53
|
+
this.host.removeEventListener('keydown', this.handleKeyDown);
|
|
54
|
+
}
|
|
55
|
+
get dialog() {
|
|
56
|
+
return this.host.shadowRoot?.querySelector('dialog');
|
|
57
|
+
}
|
|
58
|
+
get collapsibleTrigger() {
|
|
59
|
+
return document.activeElement?.closest('post-collapsible-trigger') ?? null;
|
|
60
|
+
}
|
|
61
|
+
get collapsible() {
|
|
62
|
+
return this.collapsibleTrigger?.querySelector(':scope > post-collapsible') ?? null;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Toggles the navigation programmatically.
|
|
66
|
+
* No-op on desktop.
|
|
67
|
+
*/
|
|
68
|
+
async toggle() {
|
|
69
|
+
if (this.device === 'desktop')
|
|
70
|
+
return;
|
|
71
|
+
return this.dialog?.open ? this.hide() : this.show();
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Opens the navigation programmatically.
|
|
75
|
+
* No-op on desktop.
|
|
76
|
+
*/
|
|
77
|
+
async show() {
|
|
78
|
+
if (this.device === 'desktop')
|
|
79
|
+
return;
|
|
80
|
+
this.dialog.showModal();
|
|
81
|
+
this.postToggle.emit(true);
|
|
82
|
+
this.focusNav();
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Closes the navigation programmatically.
|
|
86
|
+
* No-op on desktop.
|
|
87
|
+
*/
|
|
88
|
+
async hide() {
|
|
89
|
+
if (this.device === 'desktop')
|
|
90
|
+
return;
|
|
91
|
+
this.dialog.close();
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Move focus into the navigation when the dialog opens.
|
|
95
|
+
*/
|
|
96
|
+
focusNav() {
|
|
97
|
+
const slot = this.host.shadowRoot?.querySelector('slot');
|
|
98
|
+
const nav = slot?.assignedElements({ flatten: true })[0];
|
|
99
|
+
if (!nav)
|
|
100
|
+
return;
|
|
101
|
+
const [firstFocusable] = getFocusableChildren.getFocusableChildren(nav);
|
|
102
|
+
firstFocusable?.focus();
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Render inline navigation (desktop).
|
|
106
|
+
*/
|
|
107
|
+
renderNav() {
|
|
108
|
+
return index.h("slot", null);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Render modal navigation (mobile/tablet).
|
|
112
|
+
*/
|
|
113
|
+
renderDialog() {
|
|
114
|
+
return (index.h("dialog", { onClose: () => {
|
|
115
|
+
this.postToggle.emit(false);
|
|
116
|
+
} }, index.h("slot", null), index.h("post-closebutton", { onClick: () => this.hide() }, this.textClose)));
|
|
117
|
+
}
|
|
118
|
+
render() {
|
|
119
|
+
return (index.h(index.Host, { key: '63da088aa63d8a0cf6565f3bf01ab287a599ae27', "data-version": _package.version }, this.device === 'desktop' ? this.renderNav() : this.renderDialog()));
|
|
120
|
+
}
|
|
121
|
+
get host() { return index.getElement(this); }
|
|
122
|
+
};
|
|
123
|
+
__decorate([
|
|
124
|
+
required.Required(),
|
|
125
|
+
type.Type('string')
|
|
126
|
+
], PostSideNavigation.prototype, "textClose", void 0);
|
|
127
|
+
PostSideNavigation.style = postSideNavigationCss();
|
|
128
|
+
|
|
129
|
+
exports.post_side_navigation = PostSideNavigation;
|