@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,6 +1,16 @@
|
|
|
1
|
-
|
|
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 { debounce, nanoid, Required, Type } from "../../utils/index";
|
|
2
12
|
import { version } from "../../../../package";
|
|
3
|
-
import {
|
|
13
|
+
import { h, Host, } from "@stencil/core";
|
|
4
14
|
const ELLIPSIS = '...';
|
|
5
15
|
const MEASUREMENT_DEBOUNCE_MS = 50;
|
|
6
16
|
const RESIZE_DEBOUNCE_MS = 150;
|
|
@@ -11,54 +21,31 @@ const GAP_THRESHOLD_FOR_PAGE = 2; // Show page number instead of ellipsis when g
|
|
|
11
21
|
const MIDDLE_RANGE_START = 2; // Middle range starts from page 2 (page 1 is always shown separately)
|
|
12
22
|
export class PostPagination {
|
|
13
23
|
constructor() {
|
|
24
|
+
this.maxVisiblePages = 3;
|
|
14
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;
|
|
15
32
|
this.lastWindowWidth = window.innerWidth;
|
|
16
33
|
this.loaded = false;
|
|
17
34
|
this.debouncedResize = debounce(this.handleResizeInternal.bind(this), RESIZE_DEBOUNCE_MS);
|
|
18
35
|
this.measurementTimeoutId = null;
|
|
19
36
|
}
|
|
20
|
-
validatePage() {
|
|
21
|
-
this.validateProp('page', 'number', false);
|
|
22
|
-
}
|
|
23
|
-
validatePageSize() {
|
|
24
|
-
this.validateProp('pageSize', 'number', true);
|
|
25
|
-
}
|
|
26
|
-
validateCollectionSize() {
|
|
27
|
-
this.validateProp('collectionSize', 'number', true);
|
|
28
|
-
}
|
|
29
|
-
validateLabel() {
|
|
30
|
-
this.validateProp('label', 'string', true);
|
|
31
|
-
}
|
|
32
|
-
validateTextPrevious() {
|
|
33
|
-
this.validateProp('textPrevious', 'string', true);
|
|
34
|
-
}
|
|
35
|
-
validateTextNext() {
|
|
36
|
-
this.validateProp('textNext', 'string', true);
|
|
37
|
-
}
|
|
38
|
-
validateTextPage() {
|
|
39
|
-
this.validateProp('textPage', 'string', true);
|
|
40
|
-
}
|
|
41
|
-
validateTextFirst() {
|
|
42
|
-
this.validateProp('textFirst', 'string', true);
|
|
43
|
-
}
|
|
44
|
-
validateTextLast() {
|
|
45
|
-
this.validateProp('textLast', 'string', true);
|
|
46
|
-
}
|
|
47
37
|
handlePropsChange() {
|
|
48
38
|
this.updatePagesWithValidation();
|
|
49
39
|
}
|
|
50
40
|
componentWillLoad() {
|
|
51
41
|
this.paginationId = `pagination-${this.host.id || nanoid(6)}`;
|
|
52
|
-
|
|
53
|
-
this.page = 1;
|
|
54
|
-
}
|
|
42
|
+
this.updatePagesWithValidation();
|
|
55
43
|
}
|
|
56
44
|
connectedCallback() {
|
|
57
45
|
window.addEventListener('resize', this.debouncedResize);
|
|
58
46
|
}
|
|
59
47
|
componentDidLoad() {
|
|
60
48
|
this.loaded = true;
|
|
61
|
-
this.runAllValidations();
|
|
62
49
|
this.scheduleMeasurement();
|
|
63
50
|
}
|
|
64
51
|
disconnectedCallback() {
|
|
@@ -69,31 +56,6 @@ export class PostPagination {
|
|
|
69
56
|
this.measurementTimeoutId = null;
|
|
70
57
|
}
|
|
71
58
|
}
|
|
72
|
-
/**
|
|
73
|
-
* Validate a prop with the appropriate check function
|
|
74
|
-
*/
|
|
75
|
-
validateProp(propName, type, required = true) {
|
|
76
|
-
if (required) {
|
|
77
|
-
checkRequiredAndType(this, propName, type);
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
checkEmptyOrType(this, propName, type);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Run all prop validations
|
|
85
|
-
*/
|
|
86
|
-
runAllValidations() {
|
|
87
|
-
this.validateProp('page', 'number', false);
|
|
88
|
-
this.validateProp('pageSize', 'number', true);
|
|
89
|
-
this.validateProp('collectionSize', 'number', true);
|
|
90
|
-
this.validateProp('label', 'string', true);
|
|
91
|
-
this.validateProp('textPrevious', 'string', true);
|
|
92
|
-
this.validateProp('textNext', 'string', true);
|
|
93
|
-
this.validateProp('textPage', 'string', true);
|
|
94
|
-
this.validateProp('textFirst', 'string', true);
|
|
95
|
-
this.validateProp('textLast', 'string', true);
|
|
96
|
-
}
|
|
97
59
|
/**
|
|
98
60
|
* Schedule measurement attempt with timeout
|
|
99
61
|
*/
|
|
@@ -434,7 +396,7 @@ export class PostPagination {
|
|
|
434
396
|
*/
|
|
435
397
|
generatePages(totalPages) {
|
|
436
398
|
const maxVisible = this.maxVisiblePages;
|
|
437
|
-
const currentPage = this.page
|
|
399
|
+
const currentPage = this.page;
|
|
438
400
|
if (totalPages <= maxVisible) {
|
|
439
401
|
this.items = this.buildAllPages(totalPages);
|
|
440
402
|
return;
|
|
@@ -585,7 +547,8 @@ export class PostPagination {
|
|
|
585
547
|
"getter": false,
|
|
586
548
|
"setter": false,
|
|
587
549
|
"reflect": false,
|
|
588
|
-
"attribute": "page"
|
|
550
|
+
"attribute": "page",
|
|
551
|
+
"defaultValue": "1"
|
|
589
552
|
},
|
|
590
553
|
"pageSize": {
|
|
591
554
|
"type": "number",
|
|
@@ -769,33 +732,6 @@ export class PostPagination {
|
|
|
769
732
|
static get elementRef() { return "host"; }
|
|
770
733
|
static get watchers() {
|
|
771
734
|
return [{
|
|
772
|
-
"propName": "page",
|
|
773
|
-
"methodName": "validatePage"
|
|
774
|
-
}, {
|
|
775
|
-
"propName": "pageSize",
|
|
776
|
-
"methodName": "validatePageSize"
|
|
777
|
-
}, {
|
|
778
|
-
"propName": "collectionSize",
|
|
779
|
-
"methodName": "validateCollectionSize"
|
|
780
|
-
}, {
|
|
781
|
-
"propName": "label",
|
|
782
|
-
"methodName": "validateLabel"
|
|
783
|
-
}, {
|
|
784
|
-
"propName": "textPrevious",
|
|
785
|
-
"methodName": "validateTextPrevious"
|
|
786
|
-
}, {
|
|
787
|
-
"propName": "textNext",
|
|
788
|
-
"methodName": "validateTextNext"
|
|
789
|
-
}, {
|
|
790
|
-
"propName": "textPage",
|
|
791
|
-
"methodName": "validateTextPage"
|
|
792
|
-
}, {
|
|
793
|
-
"propName": "textFirst",
|
|
794
|
-
"methodName": "validateTextFirst"
|
|
795
|
-
}, {
|
|
796
|
-
"propName": "textLast",
|
|
797
|
-
"methodName": "validateTextLast"
|
|
798
|
-
}, {
|
|
799
735
|
"propName": "page",
|
|
800
736
|
"methodName": "handlePropsChange"
|
|
801
737
|
}, {
|
|
@@ -807,3 +743,38 @@ export class PostPagination {
|
|
|
807
743
|
}];
|
|
808
744
|
}
|
|
809
745
|
}
|
|
746
|
+
__decorate([
|
|
747
|
+
Type('number')
|
|
748
|
+
], PostPagination.prototype, "page", void 0);
|
|
749
|
+
__decorate([
|
|
750
|
+
Required(),
|
|
751
|
+
Type('number')
|
|
752
|
+
], PostPagination.prototype, "pageSize", void 0);
|
|
753
|
+
__decorate([
|
|
754
|
+
Required(),
|
|
755
|
+
Type('number')
|
|
756
|
+
], PostPagination.prototype, "collectionSize", void 0);
|
|
757
|
+
__decorate([
|
|
758
|
+
Required(),
|
|
759
|
+
Type('string')
|
|
760
|
+
], PostPagination.prototype, "label", void 0);
|
|
761
|
+
__decorate([
|
|
762
|
+
Required(),
|
|
763
|
+
Type('string')
|
|
764
|
+
], PostPagination.prototype, "textPrevious", void 0);
|
|
765
|
+
__decorate([
|
|
766
|
+
Required(),
|
|
767
|
+
Type('string')
|
|
768
|
+
], PostPagination.prototype, "textNext", void 0);
|
|
769
|
+
__decorate([
|
|
770
|
+
Required(),
|
|
771
|
+
Type('string')
|
|
772
|
+
], PostPagination.prototype, "textPage", void 0);
|
|
773
|
+
__decorate([
|
|
774
|
+
Required(),
|
|
775
|
+
Type('string')
|
|
776
|
+
], PostPagination.prototype, "textFirst", void 0);
|
|
777
|
+
__decorate([
|
|
778
|
+
Required(),
|
|
779
|
+
Type('string')
|
|
780
|
+
], PostPagination.prototype, "textLast", void 0);
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
|
|
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
|
+
};
|
|
2
11
|
import { PLACEMENT_TYPES } from "../../types/index";
|
|
12
|
+
import { getDeepFocusableChildren, OneOf, Required, Type } from "../../utils/index";
|
|
3
13
|
import { version } from "../../../../package";
|
|
4
|
-
import {
|
|
14
|
+
import { h, Host } from "@stencil/core";
|
|
5
15
|
/**
|
|
6
16
|
* @slot default - Slot for placing content inside the popover.
|
|
7
17
|
*/
|
|
@@ -19,16 +29,6 @@ export class PostPopover {
|
|
|
19
29
|
// eslint-disable-next-line @stencil-community/ban-default-true
|
|
20
30
|
this.arrow = true;
|
|
21
31
|
}
|
|
22
|
-
validatePlacement() {
|
|
23
|
-
checkEmptyOrOneOf(this, 'placement', PLACEMENT_TYPES);
|
|
24
|
-
}
|
|
25
|
-
validateTextClose() {
|
|
26
|
-
checkRequiredAndType(this, 'textClose', 'string');
|
|
27
|
-
}
|
|
28
|
-
componentDidLoad() {
|
|
29
|
-
this.validatePlacement();
|
|
30
|
-
this.validateTextClose();
|
|
31
|
-
}
|
|
32
32
|
/**
|
|
33
33
|
* Programmatically display the popover
|
|
34
34
|
* @param target A focusable element inside the <post-popover-trigger> component that controls the popover
|
|
@@ -62,7 +62,7 @@ export class PostPopover {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
render() {
|
|
65
|
-
return (h(Host, { key: '
|
|
65
|
+
return (h(Host, { key: 'f48f602235071a8621157c99aa86076e8268b5b4', "data-version": version }, h("post-popovercontainer", { key: 'f0be96900bd0e16f2ee8f7937cfa533f510dbd07', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '716b83cad71dbb09dde75c00aa4c8628d7903315', class: "popover-container" }, h("div", { key: '4a15c86977488ba68796ed16175c72ef9ea16a7b', class: "popover-content" }, h("slot", { key: 'afd56e2077ed319e1bfbdaabfc8e19395f4f3959' })), h("post-closebutton", { key: 'd62b6940c68872d8520e4a69c7411479b9698315', onClick: () => this.hide() }, this.textClose)))));
|
|
66
66
|
}
|
|
67
67
|
static get is() { return "post-popover"; }
|
|
68
68
|
static get encapsulation() { return "shadow"; }
|
|
@@ -231,13 +231,11 @@ export class PostPopover {
|
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
233
|
static get elementRef() { return "host"; }
|
|
234
|
-
static get watchers() {
|
|
235
|
-
return [{
|
|
236
|
-
"propName": "placement",
|
|
237
|
-
"methodName": "validatePlacement"
|
|
238
|
-
}, {
|
|
239
|
-
"propName": "textClose",
|
|
240
|
-
"methodName": "validateTextClose"
|
|
241
|
-
}];
|
|
242
|
-
}
|
|
243
234
|
}
|
|
235
|
+
__decorate([
|
|
236
|
+
OneOf(PLACEMENT_TYPES)
|
|
237
|
+
], PostPopover.prototype, "placement", void 0);
|
|
238
|
+
__decorate([
|
|
239
|
+
Required(),
|
|
240
|
+
Type('string')
|
|
241
|
+
], PostPopover.prototype, "textClose", void 0);
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
|
|
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 { Type } from "../../utils/index";
|
|
2
12
|
import { version } from "../../../../package";
|
|
13
|
+
import { h, Host } from "@stencil/core";
|
|
3
14
|
import isFocusable from "ally.js/is/focusable";
|
|
4
|
-
import { checkEmptyOrType } from "../../utils/index";
|
|
5
15
|
export class PostPopoverTrigger {
|
|
6
16
|
syncAriaExpanded(newValue) {
|
|
7
17
|
this.ariaExpanded = newValue;
|
|
@@ -9,13 +19,6 @@ export class PostPopoverTrigger {
|
|
|
9
19
|
this.trigger.setAttribute('aria-expanded', String(newValue));
|
|
10
20
|
}
|
|
11
21
|
}
|
|
12
|
-
/**
|
|
13
|
-
* Watch for changes to the `for` property to validate its type and ensure it is a string.
|
|
14
|
-
* @param forValue - The new value of the `for` property.
|
|
15
|
-
*/
|
|
16
|
-
validateFor() {
|
|
17
|
-
checkEmptyOrType(this, 'for', 'string');
|
|
18
|
-
}
|
|
19
22
|
hasAriaControlsElements(el) {
|
|
20
23
|
return 'ariaControlsElements' in el;
|
|
21
24
|
}
|
|
@@ -95,7 +98,6 @@ export class PostPopoverTrigger {
|
|
|
95
98
|
};
|
|
96
99
|
}
|
|
97
100
|
componentDidLoad() {
|
|
98
|
-
this.validateFor();
|
|
99
101
|
this.setupTrigger();
|
|
100
102
|
this.popover?.addEventListener('postToggle', this.boundHandlePostToggle);
|
|
101
103
|
}
|
|
@@ -105,7 +107,7 @@ export class PostPopoverTrigger {
|
|
|
105
107
|
this.popover?.removeEventListener('postToggle', this.boundHandlePostToggle);
|
|
106
108
|
}
|
|
107
109
|
render() {
|
|
108
|
-
return (h(Host, { key: '
|
|
110
|
+
return (h(Host, { key: '999ec824514eb6e340fd607ce03d82c76354e102', "data-version": version }, h("slot", { key: '3429ab6e44441c2660c14c40436682b5ac49a1b6', onSlotchange: () => this.setupTrigger() })));
|
|
109
111
|
}
|
|
110
112
|
static get is() { return "post-popover-trigger"; }
|
|
111
113
|
static get encapsulation() { return "shadow"; }
|
|
@@ -153,9 +155,9 @@ export class PostPopoverTrigger {
|
|
|
153
155
|
return [{
|
|
154
156
|
"propName": "popoverOpen",
|
|
155
157
|
"methodName": "syncAriaExpanded"
|
|
156
|
-
}, {
|
|
157
|
-
"propName": "for",
|
|
158
|
-
"methodName": "validateFor"
|
|
159
158
|
}];
|
|
160
159
|
}
|
|
161
160
|
}
|
|
161
|
+
__decorate([
|
|
162
|
+
Type('string')
|
|
163
|
+
], PostPopoverTrigger.prototype, "for", void 0);
|
|
@@ -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))}
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { Build, h, Host, } from "@stencil/core";
|
|
12
|
+
import { OneOf, Type } from "../../utils/index";
|
|
3
13
|
import { version } from "../../../../package";
|
|
4
|
-
import { arrow, autoUpdate, computePosition, flip, inline, limitShift, offset, shift, size, } from "@floating-ui/dom";
|
|
5
14
|
import { PLACEMENT_TYPES } from "../../types/index";
|
|
15
|
+
import { arrow, autoUpdate, computePosition, flip, inline, limitShift, offset, shift, size, } from "@floating-ui/dom";
|
|
6
16
|
// Polyfill for popovers, can be removed when https://caniuse.com/?search=popover is green
|
|
7
|
-
import { apply, isSupported } from "@oddbird/popover-polyfill/fn";
|
|
8
17
|
import { popIn } from "../../animations/pop-in";
|
|
18
|
+
import { apply, isSupported } from "@oddbird/popover-polyfill/fn";
|
|
9
19
|
const ANIMATIONS = {
|
|
10
20
|
'pop-in': popIn,
|
|
11
21
|
};
|
|
@@ -37,15 +47,6 @@ export class PostPopovercontainer {
|
|
|
37
47
|
this.currentAnimation = null;
|
|
38
48
|
this.boundMouseTrackingHandler = this.mouseTrackingHandler.bind(this);
|
|
39
49
|
}
|
|
40
|
-
validatePlacement() {
|
|
41
|
-
checkEmptyOrOneOf(this, 'placement', PLACEMENT_TYPES);
|
|
42
|
-
}
|
|
43
|
-
validateEdgeGap() {
|
|
44
|
-
checkEmptyOrType(this, 'edgeGap', 'number');
|
|
45
|
-
}
|
|
46
|
-
validateSafeSpace() {
|
|
47
|
-
checkEmptyOrOneOf(this, 'safeSpace', ['triangle', 'trapezoid']);
|
|
48
|
-
}
|
|
49
50
|
/**
|
|
50
51
|
* Updates cursor position for safe space feature when popover is open.
|
|
51
52
|
* Sets CSS custom properties for dynamic styling of safe area.
|
|
@@ -61,9 +62,6 @@ export class PostPopovercontainer {
|
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
componentDidLoad() {
|
|
64
|
-
this.validatePlacement();
|
|
65
|
-
this.validateEdgeGap();
|
|
66
|
-
this.validateSafeSpace();
|
|
67
65
|
this.host.addEventListener('beforetoggle', this.handleToggle.bind(this));
|
|
68
66
|
}
|
|
69
67
|
disconnectedCallback() {
|
|
@@ -269,9 +267,10 @@ export class PostPopovercontainer {
|
|
|
269
267
|
// flip should come before shift. For non-aligned, shift before flip.
|
|
270
268
|
...(isAligned ? [flipMiddleware, shiftMiddleware] : [shiftMiddleware, flipMiddleware]),
|
|
271
269
|
size({
|
|
272
|
-
apply({ availableWidth,
|
|
273
|
-
elements.floating.style
|
|
274
|
-
|
|
270
|
+
apply({ availableWidth, elements }) {
|
|
271
|
+
Object.assign(elements.floating.style, {
|
|
272
|
+
maxWidth: `${availableWidth - gap * 2}px`,
|
|
273
|
+
});
|
|
275
274
|
},
|
|
276
275
|
}),
|
|
277
276
|
];
|
|
@@ -345,9 +344,9 @@ export class PostPopovercontainer {
|
|
|
345
344
|
}
|
|
346
345
|
}
|
|
347
346
|
render() {
|
|
348
|
-
return (h(Host, { key: '
|
|
347
|
+
return (h(Host, { key: '4fc0f306903c914a632d6ee72d9aaa69f9b60140', "data-version": version, popover: "auto" }, h("div", { key: 'd411b6f9dcb622cc1dfc829c19f69c73e9ad57d6', part: "post-popovercontainer-content", class: "popover-content" }, this.arrow && (h("span", { key: 'bf3e926a44c33b1aa7306be289f695e4b0007370', "dynamic-placement": this.dynamicPlacement, class: "arrow", ref: el => {
|
|
349
348
|
this.arrowRef = el;
|
|
350
|
-
} })), h("span", { key: '
|
|
349
|
+
} })), h("span", { key: '1c8256005b2fda27460c961ec6eea3f76075af20', part: "post-popovercontainer-border-mask" }), h("slot", { key: '0463879c1a444bcef8d6e6e48fe036ab764cef73' }))));
|
|
351
350
|
}
|
|
352
351
|
static get is() { return "post-popovercontainer"; }
|
|
353
352
|
static get encapsulation() { return "shadow"; }
|
|
@@ -638,18 +637,6 @@ export class PostPopovercontainer {
|
|
|
638
637
|
};
|
|
639
638
|
}
|
|
640
639
|
static get elementRef() { return "host"; }
|
|
641
|
-
static get watchers() {
|
|
642
|
-
return [{
|
|
643
|
-
"propName": "placement",
|
|
644
|
-
"methodName": "validatePlacement"
|
|
645
|
-
}, {
|
|
646
|
-
"propName": "edgeGap",
|
|
647
|
-
"methodName": "validateEdgeGap"
|
|
648
|
-
}, {
|
|
649
|
-
"propName": "safeSpace",
|
|
650
|
-
"methodName": "validateSafeSpace"
|
|
651
|
-
}];
|
|
652
|
-
}
|
|
653
640
|
}
|
|
654
641
|
PostPopovercontainer.STATIC_SIDES = {
|
|
655
642
|
top: 'bottom',
|
|
@@ -671,3 +658,12 @@ PostPopovercontainer.PROPERTIES_TO_CLEAR = [
|
|
|
671
658
|
'--post-safe-space-trigger-y-start',
|
|
672
659
|
'--post-safe-space-trigger-y-end',
|
|
673
660
|
];
|
|
661
|
+
__decorate([
|
|
662
|
+
OneOf(PLACEMENT_TYPES)
|
|
663
|
+
], PostPopovercontainer.prototype, "placement", void 0);
|
|
664
|
+
__decorate([
|
|
665
|
+
Type('number')
|
|
666
|
+
], PostPopovercontainer.prototype, "edgeGap", void 0);
|
|
667
|
+
__decorate([
|
|
668
|
+
OneOf(['triangle', 'trapezoid'])
|
|
669
|
+
], PostPopovercontainer.prototype, "safeSpace", void 0);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
: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}}
|
|
@@ -0,0 +1,136 @@
|
|
|
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 { GreaterThan, LessThan, Type } from "../../utils/index";
|
|
12
|
+
import { h, Host } from "@stencil/core";
|
|
13
|
+
export class PostProgressbar {
|
|
14
|
+
constructor() {
|
|
15
|
+
/**
|
|
16
|
+
* The minimum value of the progress bar.
|
|
17
|
+
* Must be a valid floating point number less than max.
|
|
18
|
+
*/
|
|
19
|
+
this.min = 0;
|
|
20
|
+
/**
|
|
21
|
+
* Describes how much work the task indicated by the progress element requires.
|
|
22
|
+
* Must be a valid floating point number greater than min.
|
|
23
|
+
*/
|
|
24
|
+
this.max = 100;
|
|
25
|
+
}
|
|
26
|
+
getEffectiveMin() {
|
|
27
|
+
return Number.isFinite(this.min) ? this.min : 0;
|
|
28
|
+
}
|
|
29
|
+
getEffectiveMax() {
|
|
30
|
+
return Number.isFinite(this.max) && this.max > this.getEffectiveMin() ? this.max : 100;
|
|
31
|
+
}
|
|
32
|
+
getEffectiveValue(min, max) {
|
|
33
|
+
if (this.value === undefined ||
|
|
34
|
+
!Number.isFinite(this.value) ||
|
|
35
|
+
this.value < min ||
|
|
36
|
+
this.value > max) {
|
|
37
|
+
return min;
|
|
38
|
+
}
|
|
39
|
+
return this.value;
|
|
40
|
+
}
|
|
41
|
+
render() {
|
|
42
|
+
const min = this.getEffectiveMin();
|
|
43
|
+
const max = this.getEffectiveMax();
|
|
44
|
+
const value = this.getEffectiveValue(min, max);
|
|
45
|
+
const percentage = ((value - min) / (max - min)) * 100;
|
|
46
|
+
return (h(Host, { key: '3d48615c3f08904f896eb5ebb7d8bfdff882a89b', role: "progressbar", "aria-valuenow": value, "aria-valuemin": min, "aria-valuemax": max }, h("div", { key: 'dd8c0d44ba1aeccb3102cb15556517df98b9cf63', class: "progress-value", style: { '--post-progressbar-value': `${percentage}%` } })));
|
|
47
|
+
}
|
|
48
|
+
static get is() { return "post-progressbar"; }
|
|
49
|
+
static get encapsulation() { return "shadow"; }
|
|
50
|
+
static get originalStyleUrls() {
|
|
51
|
+
return {
|
|
52
|
+
"$": ["post-progressbar.scss"]
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
static get styleUrls() {
|
|
56
|
+
return {
|
|
57
|
+
"$": ["post-progressbar.css"]
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
static get properties() {
|
|
61
|
+
return {
|
|
62
|
+
"min": {
|
|
63
|
+
"type": "number",
|
|
64
|
+
"mutable": false,
|
|
65
|
+
"complexType": {
|
|
66
|
+
"original": "number",
|
|
67
|
+
"resolved": "number",
|
|
68
|
+
"references": {}
|
|
69
|
+
},
|
|
70
|
+
"required": false,
|
|
71
|
+
"optional": false,
|
|
72
|
+
"docs": {
|
|
73
|
+
"tags": [],
|
|
74
|
+
"text": "The minimum value of the progress bar.\nMust be a valid floating point number less than max."
|
|
75
|
+
},
|
|
76
|
+
"getter": false,
|
|
77
|
+
"setter": false,
|
|
78
|
+
"reflect": false,
|
|
79
|
+
"attribute": "min",
|
|
80
|
+
"defaultValue": "0"
|
|
81
|
+
},
|
|
82
|
+
"max": {
|
|
83
|
+
"type": "number",
|
|
84
|
+
"mutable": false,
|
|
85
|
+
"complexType": {
|
|
86
|
+
"original": "number",
|
|
87
|
+
"resolved": "number",
|
|
88
|
+
"references": {}
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"optional": false,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": "Describes how much work the task indicated by the progress element requires.\nMust be a valid floating point number greater than min."
|
|
95
|
+
},
|
|
96
|
+
"getter": false,
|
|
97
|
+
"setter": false,
|
|
98
|
+
"reflect": false,
|
|
99
|
+
"attribute": "max",
|
|
100
|
+
"defaultValue": "100"
|
|
101
|
+
},
|
|
102
|
+
"value": {
|
|
103
|
+
"type": "number",
|
|
104
|
+
"mutable": false,
|
|
105
|
+
"complexType": {
|
|
106
|
+
"original": "number",
|
|
107
|
+
"resolved": "number",
|
|
108
|
+
"references": {}
|
|
109
|
+
},
|
|
110
|
+
"required": false,
|
|
111
|
+
"optional": true,
|
|
112
|
+
"docs": {
|
|
113
|
+
"tags": [],
|
|
114
|
+
"text": "Specifies how much of the task has been completed.\nMust be a valid floating point number between min and max.\nIf there is no value attribute, the progress bar is indeterminate; this indicates that an activity is ongoing with no indication of how long it is expected to take."
|
|
115
|
+
},
|
|
116
|
+
"getter": false,
|
|
117
|
+
"setter": false,
|
|
118
|
+
"reflect": false,
|
|
119
|
+
"attribute": "value"
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
static get elementRef() { return "host"; }
|
|
124
|
+
}
|
|
125
|
+
__decorate([
|
|
126
|
+
Type('number')
|
|
127
|
+
], PostProgressbar.prototype, "min", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
Type('number'),
|
|
130
|
+
GreaterThan('min')
|
|
131
|
+
], PostProgressbar.prototype, "max", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
Type('number'),
|
|
134
|
+
GreaterThan('min'),
|
|
135
|
+
LessThan('max')
|
|
136
|
+
], PostProgressbar.prototype, "value", void 0);
|