@swisspost/design-system-components 10.0.0-next.70 → 10.0.0-next.72
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/breakpoints-B0Olgvgc.js +206 -0
- package/dist/cjs/component-on-ready-CifOTqw1.js +24 -0
- package/dist/cjs/create-validator-decorator-Bnx17kwi.js +223 -0
- package/dist/cjs/{focusable-ZqET_zrB.js → focusable-COT2uiEV.js} +25 -4
- package/dist/cjs/{index-DPdHkdGf.js → index-ngUOBQot.js} +17 -13
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/nanoid-CmjyF1Cm.js +20 -0
- package/dist/cjs/one-of-BHyX4vYq.js +27 -0
- package/dist/cjs/{package-Ds_LS1pB.js → package-Bi-tiNRc.js} +1 -1
- package/dist/cjs/pattern-BgBx5zGQ.js +27 -0
- package/dist/cjs/post-accordion_2.cjs.entry.js +18 -24
- package/dist/cjs/post-autocomplete.cjs.entry.js +27 -14
- package/dist/cjs/post-avatar.cjs.entry.js +33 -54
- package/dist/cjs/post-back-to-top.cjs.entry.js +21 -12
- package/dist/cjs/post-banner.cjs.entry.js +9 -14
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +48 -41
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +106 -105
- package/dist/cjs/post-closebutton_14.cjs.entry.js +257 -288
- package/dist/cjs/post-collapsible_2.cjs.entry.js +57 -40
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-date-picker.cjs.entry.js +154 -144
- package/dist/cjs/post-footer.cjs.entry.js +26 -19
- 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 +4 -6
- package/dist/cjs/post-login-widget.cjs.entry.js +35 -3
- package/dist/cjs/post-number-input.cjs.entry.js +6 -6
- package/dist/cjs/post-pagination.cjs.entry.js +53 -83
- package/dist/cjs/post-popover-trigger.cjs.entry.js +22 -19
- package/dist/cjs/post-popover.cjs.entry.js +25 -23
- package/dist/cjs/post-progressbar.cjs.entry.js +147 -0
- package/dist/cjs/post-rating.cjs.entry.js +34 -35
- package/dist/cjs/post-stepper-item.cjs.entry.js +3 -3
- package/dist/cjs/post-stepper.cjs.entry.js +49 -38
- package/dist/cjs/post-tab-item.cjs.entry.js +23 -15
- package/dist/cjs/post-tab-panel.cjs.entry.js +23 -16
- package/dist/cjs/post-tabs.cjs.entry.js +24 -30
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +34 -21
- package/dist/cjs/post-tooltip.cjs.entry.js +19 -16
- package/dist/cjs/required-lRDOdbd6.js +44 -0
- package/dist/cjs/type-shT641Eo.js +30 -0
- package/dist/cjs/url-DRUMqVBq.js +34 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/post-accordion/post-accordion.js +11 -8
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +4 -18
- package/dist/collection/components/post-autocomplete/post-autocomplete.js +23 -13
- package/dist/collection/components/post-avatar/avatar-utils.js +2 -2
- package/dist/collection/components/post-avatar/post-avatar.js +29 -72
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +17 -10
- 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 +92 -47
- package/dist/collection/components/post-breadcrumb-item/variants.js +1 -0
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +110 -114
- package/dist/collection/components/post-closebutton/post-closebutton.js +24 -27
- 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.js +18 -24
- package/dist/collection/components/post-icon/post-icon.js +36 -48
- package/dist/collection/components/post-language-menu/post-language-menu.js +16 -22
- 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 -0
- package/dist/collection/components/post-login-widget/post-login-widget.js +103 -5
- 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.js +24 -23
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +7 -15
- package/dist/collection/components/post-menu/post-menu.js +14 -24
- 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.js +5 -5
- package/dist/collection/components/post-pagination/post-pagination.js +47 -83
- 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 +28 -34
- 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-stepper/post-stepper.js +44 -36
- 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 -13
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +17 -14
- 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 +30 -19
- package/dist/collection/hydrate-stub/index.stub.js +5 -0
- package/dist/collection/test-setup.js +7 -0
- package/dist/collection/utils/index.js +4 -3
- package/dist/collection/utils/is-value-empty.js +1 -1
- package/dist/collection/utils/locales.js +9 -2
- package/dist/collection/utils/nanoid.js +16 -0
- package/dist/collection/utils/property-decorators/array-of.js +22 -0
- package/dist/collection/utils/property-decorators/bound.js +75 -0
- package/dist/collection/utils/property-decorators/create-validator-decorator.js +211 -0
- package/dist/collection/utils/property-decorators/date.js +21 -0
- package/dist/collection/utils/property-decorators/index.js +9 -0
- package/dist/collection/utils/property-decorators/iso-date.js +21 -0
- package/dist/collection/utils/property-decorators/one-of.js +22 -0
- package/dist/collection/utils/property-decorators/pattern.js +22 -0
- package/dist/collection/utils/property-decorators/required.js +40 -0
- package/dist/collection/utils/property-decorators/type.js +25 -0
- package/dist/collection/utils/property-decorators/url.js +29 -0
- package/dist/component-names.json +1 -0
- package/dist/components/breakpoints.js +1 -0
- package/dist/components/component-on-ready.js +1 -0
- package/dist/components/focusable.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/nanoid.js +1 -0
- 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-avatar.js +1 -1
- package/dist/components/post-avatar2.js +1 -0
- 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-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-85IGlhtB.js +1 -0
- package/dist/components/react/p-8LXe8Zt_.js +1 -0
- package/dist/components/react/p-B9ZFuYey.js +1 -0
- package/dist/components/react/p-BXqGI600.js +1 -0
- package/dist/components/react/p-BZSAV0-K.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-Bg9dtyzK.js +1 -0
- package/dist/components/react/p-Bji_4dfL.js +1 -0
- package/dist/components/react/p-Bn66acGG.js +1 -0
- package/dist/components/react/p-BrY4VWTQ.js +1 -0
- package/dist/components/react/p-Bu2JeHDf.js +1 -0
- package/dist/components/react/p-BxoRVIIr.js +1 -0
- package/dist/components/react/p-CX2E_IXB.js +1 -0
- package/dist/components/react/p-Cd1TsNm7.js +1 -0
- package/dist/components/react/p-CkTAQJGd.js +1 -0
- package/dist/components/react/p-ClG-N42b.js +1 -0
- package/dist/components/react/p-D1zw8FxT.js +1 -0
- package/dist/components/react/p-DwuW52g5.js +1 -0
- package/dist/components/react/p-PM7l--ff.js +1 -0
- package/dist/components/react/p-lpWRZjJp.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-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 +307 -72
- package/dist/esm/breakpoints-BQ3HlJPr.js +202 -0
- package/dist/esm/component-on-ready-lpWRZjJp.js +22 -0
- package/dist/esm/create-validator-decorator-D8qwF5Qe.js +218 -0
- package/dist/esm/{focusable-BD_WT2MO.js → focusable-C7afHKmo.js} +25 -5
- package/dist/esm/{index-DmAi35UF.js → index-BbDawWJ5.js} +17 -13
- package/dist/esm/loader.js +3 -3
- package/dist/esm/nanoid-8LXe8Zt_.js +18 -0
- package/dist/esm/one-of-GPr3FflU.js +25 -0
- package/dist/esm/package-ClG-N42b.js +3 -0
- package/dist/esm/pattern-BWPRYpYv.js +25 -0
- package/dist/esm/post-accordion_2.entry.js +17 -23
- package/dist/esm/post-autocomplete.entry.js +27 -14
- package/dist/esm/post-avatar.entry.js +33 -54
- package/dist/esm/post-back-to-top.entry.js +21 -12
- package/dist/esm/post-banner.entry.js +9 -14
- package/dist/esm/post-breadcrumb-item.entry.js +48 -41
- package/dist/esm/post-breadcrumbs.entry.js +106 -105
- package/dist/esm/post-closebutton_14.entry.js +252 -283
- package/dist/esm/post-collapsible_2.entry.js +57 -40
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-date-picker.entry.js +151 -141
- package/dist/esm/post-footer.entry.js +21 -14
- 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 +4 -6
- package/dist/esm/post-login-widget.entry.js +35 -3
- package/dist/esm/post-number-input.entry.js +5 -5
- package/dist/esm/post-pagination.entry.js +52 -82
- package/dist/esm/post-popover-trigger.entry.js +20 -17
- package/dist/esm/post-popover.entry.js +25 -23
- package/dist/esm/post-progressbar.entry.js +145 -0
- package/dist/esm/post-rating.entry.js +29 -30
- package/dist/esm/post-stepper-item.entry.js +3 -3
- package/dist/esm/post-stepper.entry.js +49 -38
- package/dist/esm/post-tab-item.entry.js +22 -14
- package/dist/esm/post-tab-panel.entry.js +22 -15
- package/dist/esm/post-tabs.entry.js +23 -29
- package/dist/esm/post-tooltip-trigger.entry.js +34 -21
- package/dist/esm/post-tooltip.entry.js +19 -16
- package/dist/esm/required-uK-rZZjy.js +42 -0
- package/dist/esm/type-obmwEgkM.js +28 -0
- package/dist/esm/url-B28ByZCe.js +32 -0
- package/dist/post-components/p-00f55af5.entry.js +1 -0
- package/dist/post-components/p-0288484f.entry.js +1 -0
- package/dist/post-components/p-07cdd022.entry.js +1 -0
- package/dist/post-components/{p-c2e05ba0.entry.js → p-12047216.entry.js} +1 -1
- package/dist/post-components/p-17df4e91.entry.js +1 -0
- package/dist/post-components/p-17e046fa.entry.js +1 -0
- package/dist/post-components/p-29bd31a0.entry.js +1 -0
- package/dist/post-components/p-2c6b4e6a.entry.js +1 -0
- package/dist/post-components/p-3b05e01d.entry.js +1 -0
- package/dist/post-components/p-53fd5230.entry.js +1 -0
- package/dist/post-components/p-5b7e6369.entry.js +1 -0
- package/dist/post-components/p-5f4ca179.entry.js +1 -0
- package/dist/post-components/p-62b6154a.entry.js +1 -0
- package/dist/post-components/{p-77d5e17b.entry.js → p-686a6e22.entry.js} +1 -1
- package/dist/post-components/p-758fc84f.entry.js +1 -0
- package/dist/post-components/{p-570d64dd.entry.js → p-7f929bb9.entry.js} +1 -1
- package/dist/post-components/p-8LXe8Zt_.js +1 -0
- package/dist/post-components/p-9865f72c.entry.js +1 -0
- package/dist/post-components/p-99803d57.entry.js +1 -0
- package/dist/post-components/p-BQ3HlJPr.js +1 -0
- package/dist/post-components/p-BRNqUiXj.js +1 -0
- package/dist/post-components/p-BbDawWJ5.js +2 -0
- package/dist/post-components/p-BrY4VWTQ.js +1 -0
- package/dist/post-components/p-CVsNfXZd.js +1 -0
- package/dist/post-components/p-Ck2qPht6.js +1 -0
- package/dist/post-components/p-ClG-N42b.js +1 -0
- package/dist/post-components/p-D4F0BqBW.js +1 -0
- package/dist/post-components/p-DSNGJB58.js +1 -0
- package/dist/post-components/p-IUnDBhPg.js +1 -0
- package/dist/post-components/p-a0e0a760.entry.js +1 -0
- package/dist/post-components/p-a850652d.entry.js +1 -0
- package/dist/post-components/p-aac1a8ea.entry.js +1 -0
- package/dist/post-components/{p-092f8795.entry.js → p-b3f0f9a2.entry.js} +1 -1
- package/dist/post-components/p-c37dba4b.entry.js +1 -0
- package/dist/post-components/p-d061773b.entry.js +1 -0
- package/dist/post-components/p-e2370e94.entry.js +1 -0
- package/dist/post-components/p-f1ca1d3f.entry.js +1 -0
- package/dist/post-components/p-f2e5f44e.entry.js +1 -0
- package/dist/post-components/p-ff98ada4.entry.js +1 -0
- package/dist/post-components/p-lpWRZjJp.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/avatar-utils.d.ts +1 -1
- package/dist/types/components/post-avatar/post-avatar.d.ts +0 -13
- 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 +11 -11
- package/dist/types/components/post-breadcrumb-item/variants.d.ts +2 -0
- package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +20 -26
- package/dist/types/components/post-closebutton/post-closebutton.d.ts +0 -3
- 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 +0 -2
- 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 +17 -2
- 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 +0 -3
- 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-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 +1 -3
- package/dist/types/components/post-tooltip-trigger/post-tooltip-trigger.d.ts +1 -1
- package/dist/types/components.d.ts +119 -29
- package/dist/types/modules.d.ts +2 -0
- package/dist/types/utils/index.d.ts +4 -3
- package/dist/types/utils/nanoid.d.ts +8 -0
- package/dist/types/utils/property-decorators/array-of.d.ts +9 -0
- package/dist/types/utils/property-decorators/bound.d.ts +36 -0
- package/dist/types/utils/property-decorators/create-validator-decorator.d.ts +48 -0
- package/dist/types/utils/property-decorators/date.d.ts +6 -0
- package/dist/types/utils/property-decorators/index.d.ts +9 -0
- package/dist/types/utils/property-decorators/iso-date.d.ts +6 -0
- package/dist/types/utils/property-decorators/one-of.d.ts +8 -0
- package/dist/types/utils/property-decorators/pattern.d.ts +8 -0
- package/dist/types/utils/property-decorators/required.d.ts +17 -0
- package/dist/types/utils/property-decorators/type.d.ts +9 -0
- package/dist/types/utils/property-decorators/url.d.ts +6 -0
- package/hydrate/index.js +1536 -115469
- package/hydrate/index.mjs +1536 -115469
- package/hydrate/index.stub.js +5 -0
- package/package.json +28 -18
- package/dist/cjs/index-YBj3gUJp.js +0 -114540
- package/dist/cjs/index-qCzRmwgB.js +0 -114
- package/dist/cjs/index.browser-BVb9l9T_.js +0 -16
- 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/index.browser.js +0 -1
- package/dist/components/index2.js +0 -1
- package/dist/components/index3.js +0 -6
- package/dist/components/post-breadcrumb-item2.js +0 -1
- package/dist/components/react/p-B076QoO3.js +0 -1
- package/dist/components/react/p-B2BDAeHI.js +0 -1
- package/dist/components/react/p-B2iQay0-.js +0 -1
- package/dist/components/react/p-B_RL4AOE.js +0 -1
- package/dist/components/react/p-BoFDru4R.js +0 -1
- package/dist/components/react/p-BuL0WAoF.js +0 -1
- package/dist/components/react/p-C8b6-YQl.js +0 -1
- package/dist/components/react/p-CJcRbvrI.js +0 -6
- package/dist/components/react/p-Cu9RsvYK.js +0 -1
- package/dist/components/react/p-D6uA8DbL.js +0 -1
- package/dist/components/react/p-DSSN7xW4.js +0 -1
- package/dist/components/react/p-DW7sbg9f.js +0 -1
- package/dist/components/react/p-DgdnwpId.js +0 -1
- package/dist/components/react/p-Dmnnz3fB.js +0 -1
- package/dist/components/react/p-PuHMz_9_.js +0 -1
- package/dist/components/react/p-nA1BKco0.js +0 -1
- package/dist/components/react/p-r4txK0AC.js +0 -1
- package/dist/components/react/p-tpgRP2Dr.js +0 -1
- package/dist/esm/index-CJcRbvrI.js +0 -114535
- package/dist/esm/index-D9bU2pIE.js +0 -104
- package/dist/esm/index.browser-nA1BKco0.js +0 -14
- package/dist/esm/package-DW7sbg9f.js +0 -3
- package/dist/post-components/p-17ccebe6.entry.js +0 -1
- package/dist/post-components/p-1d58bec1.entry.js +0 -1
- package/dist/post-components/p-25c28493.entry.js +0 -1
- package/dist/post-components/p-29ada3d7.entry.js +0 -1
- package/dist/post-components/p-2fcca5ec.entry.js +0 -1
- package/dist/post-components/p-3cefd49e.entry.js +0 -1
- package/dist/post-components/p-3fea238c.entry.js +0 -1
- package/dist/post-components/p-5068ae7e.entry.js +0 -1
- package/dist/post-components/p-521178f5.entry.js +0 -1
- package/dist/post-components/p-534fed55.entry.js +0 -1
- package/dist/post-components/p-5f52cba3.entry.js +0 -1
- package/dist/post-components/p-86697a58.entry.js +0 -1
- package/dist/post-components/p-987bebe8.entry.js +0 -1
- package/dist/post-components/p-9ca5c297.entry.js +0 -1
- package/dist/post-components/p-9ea3066f.entry.js +0 -1
- package/dist/post-components/p-CJcRbvrI.js +0 -6
- package/dist/post-components/p-D9bU2pIE.js +0 -1
- package/dist/post-components/p-DW7sbg9f.js +0 -1
- package/dist/post-components/p-DmAi35UF.js +0 -2
- package/dist/post-components/p-PuHMz_9_.js +0 -1
- package/dist/post-components/p-a6fc33fa.entry.js +0 -1
- package/dist/post-components/p-ac853d6b.entry.js +0 -1
- package/dist/post-components/p-bd09bc20.entry.js +0 -1
- package/dist/post-components/p-c55b537b.entry.js +0 -1
- package/dist/post-components/p-dded4f13.entry.js +0 -1
- package/dist/post-components/p-e6ba44b1.entry.js +0 -1
- package/dist/post-components/p-ead1094e.entry.js +0 -1
- package/dist/post-components/p-f12e59a0.entry.js +0 -1
- package/dist/post-components/p-nA1BKco0.js +0 -1
- package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/types/language-tags.d.ts +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
- /package/dist/types/{language-tags.js → test-setup.d.ts} +0 -0
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-ngUOBQot.js');
|
|
4
4
|
var placement = require('./placement-qEFR9hmI.js');
|
|
5
|
-
|
|
6
|
-
var index$1 = require('./index-qCzRmwgB.js');
|
|
7
|
-
require('./index-YBj3gUJp.js');
|
|
5
|
+
require('./breakpoints-B0Olgvgc.js');
|
|
8
6
|
var getFocusableChildren = require('./get-focusable-children-BGVgg7Te.js');
|
|
7
|
+
var _package = require('./package-Bi-tiNRc.js');
|
|
8
|
+
var oneOf = require('./one-of-BHyX4vYq.js');
|
|
9
|
+
var required = require('./required-lRDOdbd6.js');
|
|
10
|
+
var type = require('./type-shT641Eo.js');
|
|
9
11
|
require('./get-root-B1FnQ50K.js');
|
|
12
|
+
require('./create-validator-decorator-Bnx17kwi.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: '4c6d36060c351602af36c7df3bd1a594cb851213', "data-version": _package.version }, index.h("post-popovercontainer", { key: 'ec84ed352e562037e547e22f75304683bffa4521', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, index.h("div", { key: '2fca8b18ca9ba9abb9464347496ee390815165ec', class: "popover-container" }, index.h("div", { key: '8859270d05c687223a55583654f97bef9848a8e7', class: "popover-content" }, index.h("slot", { key: 'e1dff905b2c0882a72693cb07c331581cf63fcf7' })), index.h("post-closebutton", { key: '7a147e9542c1b7c462141e0940c80eb465fef9a4', 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-ngUOBQot.js');
|
|
4
|
+
require('./breakpoints-B0Olgvgc.js');
|
|
5
|
+
var createValidatorDecorator = require('./create-validator-decorator-Bnx17kwi.js');
|
|
6
|
+
var type = require('./type-shT641Eo.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
|
-
|
|
5
|
-
var
|
|
6
|
-
require('./
|
|
3
|
+
var index = require('./index-ngUOBQot.js');
|
|
4
|
+
require('./breakpoints-B0Olgvgc.js');
|
|
5
|
+
var _package = require('./package-Bi-tiNRc.js');
|
|
6
|
+
var required = require('./required-lRDOdbd6.js');
|
|
7
|
+
var type = require('./type-shT641Eo.js');
|
|
8
|
+
require('./create-validator-decorator-Bnx17kwi.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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var _package = require('./package-
|
|
3
|
+
var index = require('./index-ngUOBQot.js');
|
|
4
|
+
var _package = require('./package-Bi-tiNRc.js');
|
|
5
5
|
|
|
6
6
|
const postStepperItemCss = () => `:host{grid-row:1;position:relative;padding-inline-start:0}:host::before,:host::after{content:"";display:block;position:absolute;inset-block-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - 2px)/2);height:2px;background-color:var(--post-scheme-color-interactive-primary-disabled-bg4);inset-inline:0}:host(:not(:first-of-type)){padding-inline-start:calc(var(--post-device-sizing-interactive-stepper-indicator) / 2)}:host(:not(:last-of-type)){padding-inline-end:calc(var(--post-device-sizing-interactive-stepper-indicator) / 2);grid-column:span 2}:host(:not(:first-of-type,:last-of-type))::before{inset-inline-end:50%}:host(:not(:first-of-type,:last-of-type))::after{inset-inline-start:50%}:host(.stepper-item-current:not(:last-of-type))::after,:host(.stepper-item-current:first-of-type)::before,:host(.stepper-item-after-current)::before,:host(.stepper-item-after-current:last-of-type)::after{background-color:var(--post-scheme-color-interactive-primary-enabled-fg1)}:host(.stepper-item-current:not(:first-of-type))::before,:host(.stepper-item-current:last-of-type)::after,:host(.stepper-item-completed)::after{background-color:var(--post-scheme-color-interactive-primary-selected-bg2);z-index:1}.stepper-item-content{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;position:relative;z-index:2;overflow:hidden;text-decoration:none;color:var(--post-scheme-color-interactive-primary-disabled-fg1);width:fit-content;word-break:break-word;font-size:var(--post-device-font-size-7)}:host(:not(:first-of-type,:last-of-type))>.stepper-item-content{margin-inline:auto;text-align:center}:host(:last-of-type)>.stepper-item-content{margin-inline-start:auto;margin-inline-end:-20px;text-align:end}:host(.stepper-item-completed)>.stepper-item-content{color:var(--post-scheme-color-interactive-primary-enabled-fg1)}:host(.stepper-item-selected)>.stepper-item-content{font-weight:var(--post-device-font-weight-bold)}:host(.stepper-item-selected)>.stepper-item-content::before{font-weight:var(--post-device-font-weight-regular)}:host(.stepper-item-current)>.stepper-item-content{color:var(--post-scheme-color-interactive-primary-enabled-fg1)}:host(.stepper-item-current)>.stepper-item-content::before{color:var(--post-scheme-color-interactive-primary-enabled-fg3)}.stepper-item-content::before{counter-increment:step-index;content:counter(step-index);display:flex;align-items:center;justify-content:center;z-index:1;height:var(--post-device-sizing-interactive-stepper-indicator);width:var(--post-device-sizing-interactive-stepper-indicator);box-sizing:border-box;margin-block-end:var(--post-device-spacing-gap-1);color:var(--post-scheme-color-interactive-primary-disabled-fg3);background-color:var(--post-scheme-color-interactive-primary-disabled-bg4);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-disabled-stroke3);border-radius:var(--post-device-border-radius-round);text-indent:initial}:host(:not(:first-of-type,:last-of-type))>.stepper-item-content::before{margin-inline:auto}:host(:last-of-type)>.stepper-item-content::before{margin-inline-start:auto}:host(.stepper-item-completed)>.stepper-item-content::before{color:rgba(0,0,0,0);background-color:var(--post-scheme-color-interactive-primary-selected-bg2);border-color:var(--post-scheme-color-interactive-primary-selected-stroke3)}:host(.stepper-item-current)>.stepper-item-content::before{color:var(--post-scheme-color-interactive-primary-enabled-fg3);background-color:var(--post-scheme-color-interactive-primary-enabled-bg2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke3)}.stepper-item-content::after{display:block;position:absolute;inset-block-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size7))/2);z-index:1;mask-image:var(--post-icon-checkmark-solid);background-color:currentColor;width:var(--post-device-sizing-interactive-icon-size7);height:var(--post-device-sizing-interactive-icon-size7);background-color:var(--post-scheme-color-interactive-primary-enabled-fg3)}:root,:host{--post-icon-checkmark-solid:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxzeW1ib2wgaWQ9ImktY2hlY2ttYXJrLXNvbGlkIj48c3ltYm9sIGlkPSJzMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0ibTcuNDkgMTIuOTktMy42NC0zLjljLS40Ny0uNS0uNDQtMS4zLjA2LTEuNzdzMS4yOS0uNDQgMS43Ny4wNmwxLjQ4IDEuNTggMy4wNS00LjYyYy4zOC0uNTggMS4xNi0uNzQgMS43My0uMzUuNTguMzguNzQgMS4xNi4zNSAxLjczeiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InMyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJtMTEuMTggMTguODgtNS4xNC01LjUxYTEuNSAxLjUgMCAwIDEgLjA3LTIuMTJjLjYtLjU2IDEuNTUtLjUzIDIuMTIuMDdsMi41NCAyLjcyIDQuODQtNy4zM2MuNDYtLjY5IDEuMzktLjg4IDIuMDgtLjQzLjY5LjQ2Ljg4IDEuMzkuNDMgMi4wOGwtNi45NCAxMC41MVoiLz48L3N5bWJvbD48c3ltYm9sIGlkPSJzMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZD0iTTE0Ljg3IDI0LjgxIDguMjMgMTcuN2MtLjY2LS43MS0uNjItMS44MS4wOC0yLjQ3LjcxLS42NiAxLjgxLS42MiAyLjQ3LjA4bDMuNjEgMy44NiA2LjYyLTEwLjA0Yy41My0uODEgMS42Mi0xLjAzIDIuNDItLjUuODEuNTMgMS4wMyAxLjYyLjUgMi40MkwxNC44NiAyNC44WiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InM0MCIgdmlld0JveD0iMCA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5OiB2YXIoLS1zNjQsIG5vbmUpIiBocmVmPSIjczY0Ii8+PC9zeW1ib2w+PC9kZWZzPjxzdHlsZT5AbWVkaWEgKG1heC13aWR0aDogMjMuOThweCkge2d7LS1zMTY6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogMjRweCkgYW5kIChtYXgtd2lkdGg6IDMxLjk4cHgpIHtney0tczI0OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDMycHgpIGFuZCAobWF4LXdpZHRoOiAzOS45OHB4KSB7Z3stLXMzMjpibG9jazt9fUBtZWRpYSAobWluLXdpZHRoOiA0MHB4KSBhbmQgKG1heC13aWR0aDogNDcuOThweCkge2d7LS1zNDA6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogNDhweCkgYW5kIChtYXgtd2lkdGg6IDYzLjk4cHgpIHtney0tczQ4OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDY0cHgpIHtney0tczY0OmJsb2NrO319PC9zdHlsZT48Zz48dXNlIGhyZWY9IiNpLWNoZWNrbWFyay1zb2xpZCIvPjwvZz48L3N2Zz4=")}:host(:first-of-type)>.stepper-item-content::after{inset-inline-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size7))/2)}:host(:not(:first-of-type,:last-of-type))>.stepper-item-content::after{inset-inline-start:calc(50% - var(--post-device-sizing-interactive-icon-size7)/2)}:host(:last-of-type)>.stepper-item-content::after{inset-inline-end:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size7))/2)}:host(.stepper-item-completed)>.stepper-item-content::after{content:""}:host([aria-current=step])>.stepper-item-content::after{mask-image:var(--post-icon-edit-solid);background-color:currentColor;width:var(--post-device-sizing-interactive-icon-size4);height:var(--post-device-sizing-interactive-icon-size4);background-color:var(--post-scheme-color-interactive-primary-enabled-fg3);inset-block-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size4))/2)}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NlIGhyZWY9IiNpLWVkaXQtc29saWQiLz48L2c+PC9zdmc+")}:host([aria-current=step]:first-of-type)>.stepper-item-content::after{inset-inline-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size4))/2)}:host([aria-current=step]:not(:first-of-type,:last-of-type))>.stepper-item-content::after{inset-inline-start:calc(50% - var(--post-device-sizing-interactive-icon-size4)/2)}@media screen and (max-width: 779.98px){:host{flex-grow:1;margin-inline:0;padding:0 !important}:host::before{content:unset}:host::after{inset-inline-start:0 !important}:host(:last-of-type){flex:0 0 32px}:host(:last-of-type)::after{content:unset}.stepper-item-content{margin-inline:0 !important}.label{display:none}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host::before,:host::after{background-color:CanvasText !important}:host(.stepper-item-current:not(:first-of-type))::before,:host(.stepper-item-current:last-of-type)::after,:host(.stepper-item-completed)::after,:host(.stepper-item-completed)::before{background-color:Highlight !important}.stepper-item-content::before{forced-color-adjust:none}:host(.stepper-item-current) .stepper-item-content::before{background-color:Canvas;color:CanvasText}:host(.stepper-item-completed) .stepper-item-content::before,:host(.stepper-item-inactive) .stepper-item-content::before{border-color:Canvas;background-color:CanvasText}:host(.stepper-item-inactive) .stepper-item-content::before{color:Canvas}.stepper-item-content::after{color:Canvas}}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}`;
|
|
7
7
|
|
|
@@ -10,7 +10,7 @@ const PostStepperItem = class {
|
|
|
10
10
|
index.registerInstance(this, hostRef);
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (index.h(index.Host, { key: '
|
|
13
|
+
return (index.h(index.Host, { key: '0919891d67f961e1ee2c8a7fb556d232ed34ed94', "data-version": _package.version, role: "listitem" }, index.h("span", { key: '862705599a537267080fbf054e06353c65888bba', class: "stepper-item-content" }, index.h("span", { key: '96c62cc07fd460402d4e49a36fad70c80eb52f78', class: "step-hidden-label visually-hidden" }), index.h("span", { key: '6cce8bef3684d50f8dbb72f48b1ca3b0bbcd57ca', class: "label" }, index.h("slot", { key: '9ec06d2716870180309bbfde83a04953e7abb011' })))));
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
PostStepperItem.style = postStepperItemCss();
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
require('./
|
|
3
|
+
var index = require('./index-ngUOBQot.js');
|
|
4
|
+
require('./breakpoints-B0Olgvgc.js');
|
|
5
|
+
var _package = require('./package-Bi-tiNRc.js');
|
|
6
|
+
var required = require('./required-lRDOdbd6.js');
|
|
7
|
+
var type = require('./type-shT641Eo.js');
|
|
8
|
+
var pattern = require('./pattern-BgBx5zGQ.js');
|
|
9
|
+
require('./create-validator-decorator-Bnx17kwi.js');
|
|
7
10
|
|
|
8
11
|
const postStepperCss = () => `ol{margin-block:0;padding-inline-start:0;list-style:none;counter-reset:step-index;display:grid;position:relative;overflow:hidden;grid-template-columns:20px;grid-auto-columns:minmax(0, 1fr);padding-inline-end:20px}@media screen and (max-width: 779.98px){ol{display:flex;padding-inline-end:0}}.active-step{font-size:var(--post-device-font-size-7);font-weight:var(--post-device-font-weight-bold);color:var(--post-scheme-color-interactive-primary-enabled-fg1)}.active-step .active-step-label:has(+span:empty){visibility:hidden}@media screen and (min-width: 780px){.active-step{display:none}}`;
|
|
9
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
|
+
};
|
|
10
23
|
const PostStepper = class {
|
|
11
24
|
constructor(hostRef) {
|
|
12
25
|
index.registerInstance(this, hostRef);
|
|
@@ -15,18 +28,7 @@ const PostStepper = class {
|
|
|
15
28
|
*/
|
|
16
29
|
this.currentIndex = -1;
|
|
17
30
|
}
|
|
18
|
-
validateTextCurrentStep() {
|
|
19
|
-
index$1.checkRequiredAndType(this, 'textCurrentStep', 'string');
|
|
20
|
-
}
|
|
21
|
-
validateTextCompletedStep() {
|
|
22
|
-
index$1.checkRequiredAndType(this, 'textCompletedStep', 'string');
|
|
23
|
-
}
|
|
24
|
-
validateTextStepNumber() {
|
|
25
|
-
index$1.checkRequiredAndPattern(this, 'textStepNumber', /\{number\}/);
|
|
26
|
-
this.updateActiveStepNumber();
|
|
27
|
-
}
|
|
28
31
|
validateCurrentIndex() {
|
|
29
|
-
index$1.checkRequiredAndType(this, 'currentIndex', 'number');
|
|
30
32
|
if (this.stepItems) {
|
|
31
33
|
this.updateSteps();
|
|
32
34
|
this.checkIndexes();
|
|
@@ -37,15 +39,20 @@ const PostStepper = class {
|
|
|
37
39
|
this.selectedIndex = this.currentIndex;
|
|
38
40
|
}
|
|
39
41
|
else {
|
|
40
|
-
index$1.checkRequiredAndType(this, 'selectedIndex', 'number');
|
|
41
42
|
this.checkIndexes();
|
|
42
43
|
}
|
|
43
44
|
this.updateSteps();
|
|
44
45
|
}
|
|
46
|
+
updateActiveStepNumber() {
|
|
47
|
+
if (this.textStepNumber) {
|
|
48
|
+
const labelTemplate = this.textStepNumber;
|
|
49
|
+
this.mobileActiveStepLabel = labelTemplate.replaceAll('{number}', `${this.selectedIndex + 1}`);
|
|
50
|
+
if (this.stepItems) {
|
|
51
|
+
this.updateMobileActiveStepVisibility();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
45
55
|
componentDidLoad() {
|
|
46
|
-
this.validateTextCompletedStep();
|
|
47
|
-
this.validateTextCurrentStep();
|
|
48
|
-
this.validateTextStepNumber();
|
|
49
56
|
// Wait for slotchange
|
|
50
57
|
setTimeout(() => {
|
|
51
58
|
this.validateCurrentIndex();
|
|
@@ -57,15 +64,6 @@ const PostStepper = class {
|
|
|
57
64
|
console.error('The selected-index cannot be higher than the current-index, as only the current and completed steps can be selected.');
|
|
58
65
|
}
|
|
59
66
|
}
|
|
60
|
-
updateActiveStepNumber() {
|
|
61
|
-
if (this.textStepNumber) {
|
|
62
|
-
const labelTemplate = this.textStepNumber;
|
|
63
|
-
this.mobileActiveStepLabel = labelTemplate.replaceAll('{number}', `${this.selectedIndex + 1}`);
|
|
64
|
-
if (this.stepItems) {
|
|
65
|
-
this.updateMobileActiveStepVisibility();
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
67
|
updateSteps() {
|
|
70
68
|
this.stepItems = this.host.querySelectorAll('post-stepper-item');
|
|
71
69
|
if (!this.stepItems || this.stepItems.length < 3) {
|
|
@@ -114,27 +112,40 @@ const PostStepper = class {
|
|
|
114
112
|
}
|
|
115
113
|
}
|
|
116
114
|
render() {
|
|
117
|
-
return (index.h(index.Host, { key: '
|
|
115
|
+
return (index.h(index.Host, { key: '54ed38463a97b7141fdd5ce7576547cb709b377a', "data-version": _package.version }, index.h("ol", { key: '7bed20f941c892da6c00f973bf6cf99780d4cec1' }, index.h("slot", { key: '36cd434ae62f7e6ffa742ddedbea2f2f5a870825', onSlotchange: () => this.updateSteps() })), index.h("div", { key: 'b523effd246fb447cf5511d973b9cef463e6d316', class: "active-step", "aria-hidden": "true" }, index.h("span", { key: '506617bee389d6b6ee2c477e06388ae13d0eef16', class: "active-step-label" }, this.mobileActiveStepLabel), index.h("span", { key: '0aebdb5c031c30bc732a73a6a38544038a9f48ef', innerHTML: this.mobileActiveStepName }))));
|
|
118
116
|
}
|
|
119
117
|
get host() { return index.getElement(this); }
|
|
120
118
|
static get watchers() { return {
|
|
121
|
-
"textCurrentStep": [{
|
|
122
|
-
"validateTextCurrentStep": 0
|
|
123
|
-
}],
|
|
124
|
-
"textCompletedStep": [{
|
|
125
|
-
"validateTextCompletedStep": 0
|
|
126
|
-
}],
|
|
127
|
-
"textStepNumber": [{
|
|
128
|
-
"validateTextStepNumber": 0
|
|
129
|
-
}],
|
|
130
119
|
"currentIndex": [{
|
|
131
120
|
"validateCurrentIndex": 0
|
|
132
121
|
}],
|
|
133
122
|
"selectedIndex": [{
|
|
134
123
|
"validateSelectedIndex": 0
|
|
124
|
+
}],
|
|
125
|
+
"textStepNumber": [{
|
|
126
|
+
"updateActiveStepNumber": 0
|
|
135
127
|
}]
|
|
136
128
|
}; }
|
|
137
129
|
};
|
|
130
|
+
__decorate([
|
|
131
|
+
required.Required(),
|
|
132
|
+
type.Type('string')
|
|
133
|
+
], PostStepper.prototype, "textCurrentStep", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
required.Required(),
|
|
136
|
+
type.Type('string')
|
|
137
|
+
], PostStepper.prototype, "textCompletedStep", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
required.Required(),
|
|
140
|
+
pattern.Pattern(/\{number\}/)
|
|
141
|
+
], PostStepper.prototype, "textStepNumber", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
required.Required(),
|
|
144
|
+
type.Type('number')
|
|
145
|
+
], PostStepper.prototype, "currentIndex", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
type.Type('number')
|
|
148
|
+
], PostStepper.prototype, "selectedIndex", void 0);
|
|
138
149
|
PostStepper.style = postStepperCss();
|
|
139
150
|
|
|
140
151
|
exports.post_stepper = PostStepper;
|
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
require('./
|
|
7
|
-
var
|
|
3
|
+
var index = require('./index-ngUOBQot.js');
|
|
4
|
+
require('./breakpoints-B0Olgvgc.js');
|
|
5
|
+
var nanoid = require('./nanoid-CmjyF1Cm.js');
|
|
6
|
+
var _package = require('./package-Bi-tiNRc.js');
|
|
7
|
+
var required = require('./required-lRDOdbd6.js');
|
|
8
|
+
var type = require('./type-shT641Eo.js');
|
|
9
|
+
require('./create-validator-decorator-Bnx17kwi.js');
|
|
8
10
|
|
|
9
11
|
const postTabItemCss = () => `.tab-title,.nav-item a{display:inline-block;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);opacity:.7;color:#000;text-decoration:none;background-color:rgba(0,0,0,0);cursor:pointer}.tab-title:hover,.nav-item a:hover{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.tab-title:focus-visible,.nav-item a:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(0,0,0,.6);color:#fff;box-shadow:none}.tab-title:focus-visible::after,.nav-item a:focus-visible::after{content:"";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title:hover,:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title:focus-visible,:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:hover,:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:focus-visible{background-color:rgba(255,255,255,.2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title,.nav-item a{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title:hover,.tab-title:focus,.tab-title:focus-within,.tab-title:focus-visible,.nav-item a:hover,.nav-item a:focus,.nav-item a:focus-within,.nav-item a:focus-visible{outline:var(--post-core-dimension-2) solid Highlight;outline-offset:calc(var(--post-core-dimension-4)*-1)}}.nav-item{display:inline-block;position:relative;box-sizing:border-box;cursor:default}.nav-item:focus,.nav-item:focus-visible{outline:none;box-shadow:none}.nav-item:focus::after,.nav-item:focus-visible::after{display:none}.nav-item a{color:inherit;text-decoration:none;display:block;width:100%;height:100%;box-sizing:border-box;position:relative;outline:none;cursor:pointer;border-radius:0}.nav-item a:focus{outline:none}.nav-item a:active{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.nav-item a:focus-visible{outline:none !important}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:hover{background-color:rgba(255,255,255,.2)}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:focus-visible{background-color:rgba(255,255,255,.2)}.tab-title.active,.nav-item.active a{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:#fff;color:#000;font-weight:700}.tab-title.active::before,.nav-item.active a::before{content:"";display:block;position:absolute;top:0;right:-1px;left:-1px;height:var(--post-core-dimension-4);background-color:#fc0}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title.active,.nav-item.active a{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title.active::before,.nav-item.active a::before{background-color:Highlight}}:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title{background-color:ButtonFace !important}.tab-title:hover{background-color:Highlight !important}}`;
|
|
10
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
|
+
};
|
|
11
23
|
const PostTabItem = class {
|
|
12
24
|
constructor(hostRef) {
|
|
13
25
|
index.registerInstance(this, hostRef);
|
|
14
26
|
this.mutationObserver = new MutationObserver(this.checkNavigationMode.bind(this));
|
|
15
27
|
this.isNavigationMode = false;
|
|
16
28
|
}
|
|
17
|
-
validateName() {
|
|
18
|
-
index$1.checkRequiredAndType(this, 'name', 'string');
|
|
19
|
-
}
|
|
20
29
|
connectedCallback() {
|
|
21
30
|
this.mutationObserver.observe(this.host, {
|
|
22
31
|
childList: true,
|
|
@@ -24,7 +33,7 @@ const PostTabItem = class {
|
|
|
24
33
|
});
|
|
25
34
|
}
|
|
26
35
|
componentWillLoad() {
|
|
27
|
-
this.tabId = `tab-${this.host.id ||
|
|
36
|
+
this.tabId = `tab-${this.host.id || nanoid.nanoid(6)}`;
|
|
28
37
|
this.checkNavigationMode();
|
|
29
38
|
}
|
|
30
39
|
disconnectedCallback() {
|
|
@@ -37,15 +46,14 @@ const PostTabItem = class {
|
|
|
37
46
|
this.isNavigationMode = hasAnchor;
|
|
38
47
|
}
|
|
39
48
|
render() {
|
|
40
|
-
return (index.h(index.Host, { key: '
|
|
49
|
+
return (index.h(index.Host, { key: 'bd2713959afafd5dafa80c5f59e8249ffbb78b09', id: this.tabId, role: !this.isNavigationMode ? 'tab' : undefined, "data-version": _package.version, "data-navigation-mode": this.isNavigationMode.toString(), "aria-selected": !this.isNavigationMode ? 'false' : undefined, tabindex: !this.isNavigationMode ? '-1' : undefined, class: !this.isNavigationMode ? 'tab-title' : 'nav-item' }, index.h("slot", { key: '87e22df81eae1ecef48a6ad443b959562d8a816b' })));
|
|
41
50
|
}
|
|
42
51
|
get host() { return index.getElement(this); }
|
|
43
|
-
static get watchers() { return {
|
|
44
|
-
"name": [{
|
|
45
|
-
"validateName": 0
|
|
46
|
-
}]
|
|
47
|
-
}; }
|
|
48
52
|
};
|
|
53
|
+
__decorate([
|
|
54
|
+
required.Required(),
|
|
55
|
+
type.Type('string')
|
|
56
|
+
], PostTabItem.prototype, "name", void 0);
|
|
49
57
|
PostTabItem.style = postTabItemCss();
|
|
50
58
|
|
|
51
59
|
exports.post_tab_item = PostTabItem;
|
|
@@ -1,35 +1,42 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
require('./
|
|
3
|
+
var index = require('./index-ngUOBQot.js');
|
|
4
|
+
require('./breakpoints-B0Olgvgc.js');
|
|
5
|
+
var nanoid = require('./nanoid-CmjyF1Cm.js');
|
|
6
|
+
var _package = require('./package-Bi-tiNRc.js');
|
|
7
|
+
var required = require('./required-lRDOdbd6.js');
|
|
8
|
+
var type = require('./type-shT641Eo.js');
|
|
9
|
+
require('./create-validator-decorator-Bnx17kwi.js');
|
|
8
10
|
|
|
9
11
|
const postTabPanelCss = () => `:host{display:none}`;
|
|
10
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
|
+
};
|
|
11
23
|
const PostTabPanel = class {
|
|
12
24
|
constructor(hostRef) {
|
|
13
25
|
index.registerInstance(this, hostRef);
|
|
14
26
|
}
|
|
15
|
-
validateFor() {
|
|
16
|
-
index$1.checkRequiredAndType(this, 'for', 'string');
|
|
17
|
-
}
|
|
18
27
|
componentWillLoad() {
|
|
19
|
-
this.validateFor();
|
|
20
28
|
// get the id set on the host element or use a random id by default
|
|
21
|
-
this.panelId = `panel-${this.host.id ||
|
|
29
|
+
this.panelId = `panel-${this.host.id || nanoid.nanoid(6)}`;
|
|
22
30
|
}
|
|
23
31
|
render() {
|
|
24
|
-
return (index.h(index.Host, { key: '
|
|
32
|
+
return (index.h(index.Host, { key: 'a67cc32e99a26cafcdb39968252012d8b67810b1', "data-version": _package.version, id: this.panelId, role: "tabpanel", slot: "panels" }, index.h("slot", { key: '2435e43fcecac9a863e4ba2fc215efa7b03c7c18' })));
|
|
25
33
|
}
|
|
26
34
|
get host() { return index.getElement(this); }
|
|
27
|
-
static get watchers() { return {
|
|
28
|
-
"for": [{
|
|
29
|
-
"validateFor": 0
|
|
30
|
-
}]
|
|
31
|
-
}; }
|
|
32
35
|
};
|
|
36
|
+
__decorate([
|
|
37
|
+
required.Required(),
|
|
38
|
+
type.Type('string')
|
|
39
|
+
], PostTabPanel.prototype, "for", void 0);
|
|
33
40
|
PostTabPanel.style = postTabPanelCss();
|
|
34
41
|
|
|
35
42
|
exports.post_tab_panel = PostTabPanel;
|