@oiz/stzh-components 3.0.0-beta3 → 3.0.0-beta4
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/{app-globals-0cbebaa1.js → app-globals-5897b76e.js} +39 -14
- package/dist/cjs/app-globals-5897b76e.js.map +1 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-appointments.cjs.entry.js +11 -8
- package/dist/cjs/stzh-appointments.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-badge_3.cjs.entry.js +1 -1
- package/dist/cjs/stzh-badge_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-calendar.cjs.entry.js +1 -1
- package/dist/cjs/stzh-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-card_3.cjs.entry.js +16 -19
- package/dist/cjs/stzh-card_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-chip.cjs.entry.js +2 -2
- package/dist/cjs/stzh-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-content.cjs.entry.js +1 -1
- package/dist/cjs/stzh-content.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-cspace.cjs.entry.js +1 -1
- package/dist/cjs/stzh-cspace.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-cta.cjs.entry.js +1 -1
- package/dist/cjs/stzh-cta.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-datamessagelist-item.cjs.entry.js +9 -4
- package/dist/cjs/stzh-datamessagelist-item.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-datamessagelist.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datamessagelist.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-dropdown.cjs.entry.js +8 -2
- package/dist/cjs/stzh-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-header.cjs.entry.js +15 -5
- package/dist/cjs/stzh-header.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-iframe.cjs.entry.js +11 -3
- package/dist/cjs/stzh-iframe.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-imagecomparison.cjs.entry.js +2 -2
- package/dist/cjs/stzh-imagecomparison.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-link.cjs.entry.js +1 -1
- package/dist/cjs/stzh-link.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-search.cjs.entry.js +20 -3
- package/dist/cjs/stzh-search.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js +1 -1
- package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js.map +1 -1
- package/dist/collection/assets/i18n/de.json +2 -2
- package/dist/collection/assets/i18n/en.json +2 -2
- package/dist/collection/components/stzh-appointments/stzh-appointments.css +99 -19
- package/dist/collection/components/stzh-appointments/stzh-appointments.js +9 -7
- package/dist/collection/components/stzh-appointments/stzh-appointments.js.map +1 -1
- package/dist/collection/components/stzh-appointments/stzh-appointments.stories.js +7 -1
- package/dist/collection/components/stzh-button/stzh-button.css +10 -10
- package/dist/collection/components/stzh-calendar/stzh-calendar.css +0 -2
- package/dist/collection/components/stzh-card/stzh-card.css +0 -27
- package/dist/collection/components/stzh-card/stzh-card.js +12 -94
- package/dist/collection/components/stzh-card/stzh-card.js.map +1 -1
- package/dist/collection/components/stzh-card/stzh-card.stories.js +0 -17
- package/dist/collection/components/stzh-chip/stzh-chip.css +22 -10
- package/dist/collection/components/stzh-chip/stzh-chip.js +2 -2
- package/dist/collection/components/stzh-chip/stzh-chip.js.map +1 -1
- package/dist/collection/components/stzh-chipselect/stzh-chipselect.js +3 -1
- package/dist/collection/components/stzh-chipselect/stzh-chipselect.js.map +1 -1
- package/dist/collection/components/stzh-content/stzh-content.css +3 -3
- package/dist/collection/components/stzh-cspace/stzh-cspace.css +36 -0
- package/dist/collection/components/stzh-cta/stzh-cta.css +22 -36
- package/dist/collection/components/stzh-datamessagelist/stzh-datamessagelist.css +0 -5
- package/dist/collection/components/stzh-datamessagelist/stzh-datamessagelist.stories.js +26 -0
- package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.css +26 -16
- package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.js +26 -3
- package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.js.map +1 -1
- package/dist/collection/components/stzh-datepicker/stzh-datepicker.css +18 -3
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.css +288 -40
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.js +108 -4
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.js.map +1 -1
- package/dist/collection/components/stzh-header/stzh-header.css +15 -13
- package/dist/collection/components/stzh-header/stzh-header.js +19 -6
- package/dist/collection/components/stzh-header/stzh-header.js.map +1 -1
- package/dist/collection/components/stzh-iframe/stzh-iframe.js +160 -3
- package/dist/collection/components/stzh-iframe/stzh-iframe.js.map +1 -1
- package/dist/collection/components/stzh-imagecomparison/stzh-imagecomparison.css +12 -17
- package/dist/collection/components/stzh-imagecomparison/stzh-imagecomparison.js +1 -1
- package/dist/collection/components/stzh-imagecomparison/stzh-imagecomparison.js.map +1 -1
- package/dist/collection/components/stzh-link/stzh-link.js +19 -19
- package/dist/collection/components/stzh-link/stzh-link.js.map +1 -1
- package/dist/collection/components/stzh-search/stzh-search.css +70 -0
- package/dist/collection/components/stzh-search/stzh-search.js +72 -3
- package/dist/collection/components/stzh-search/stzh-search.js.map +1 -1
- package/dist/collection/components/stzh-search/stzh-search.stories.js +3 -0
- package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.css +7 -7
- package/dist/collection/global/js/helpers/autofocus.js +36 -11
- package/dist/collection/global/js/script.js +2 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/components/index.js +38 -13
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/stzh-appointments.js +11 -9
- package/dist/components/stzh-appointments.js.map +1 -1
- package/dist/components/stzh-button2.js +1 -1
- package/dist/components/stzh-button2.js.map +1 -1
- package/dist/components/stzh-calendar2.js +1 -1
- package/dist/components/stzh-calendar2.js.map +1 -1
- package/dist/components/stzh-card2.js +13 -22
- package/dist/components/stzh-card2.js.map +1 -1
- package/dist/components/stzh-chip2.js +3 -3
- package/dist/components/stzh-chip2.js.map +1 -1
- package/dist/components/stzh-chipselect2.js +3 -1
- package/dist/components/stzh-chipselect2.js.map +1 -1
- package/dist/components/stzh-content.js +1 -1
- package/dist/components/stzh-content.js.map +1 -1
- package/dist/components/stzh-cspace.js +1 -1
- package/dist/components/stzh-cspace.js.map +1 -1
- package/dist/components/stzh-cta.js +1 -1
- package/dist/components/stzh-cta.js.map +1 -1
- package/dist/components/stzh-datamessagelist-item.js +10 -4
- package/dist/components/stzh-datamessagelist-item.js.map +1 -1
- package/dist/components/stzh-datamessagelist.js +1 -1
- package/dist/components/stzh-datamessagelist.js.map +1 -1
- package/dist/components/stzh-datepicker2.js +1 -1
- package/dist/components/stzh-datepicker2.js.map +1 -1
- package/dist/components/stzh-dropdown2.js +12 -2
- package/dist/components/stzh-dropdown2.js.map +1 -1
- package/dist/components/stzh-header.js +17 -5
- package/dist/components/stzh-header.js.map +1 -1
- package/dist/components/stzh-iframe2.js +19 -3
- package/dist/components/stzh-iframe2.js.map +1 -1
- package/dist/components/stzh-imagecomparison.js +2 -2
- package/dist/components/stzh-imagecomparison.js.map +1 -1
- package/dist/components/stzh-link2.js +2 -2
- package/dist/components/stzh-link2.js.map +1 -1
- package/dist/components/stzh-search.js +49 -16
- package/dist/components/stzh-search.js.map +1 -1
- package/dist/components/stzh-skin-portal-mitwirken.js +1 -1
- package/dist/components/stzh-skin-portal-mitwirken.js.map +1 -1
- package/dist/esm/{app-globals-3c171b79.js → app-globals-6a7ed0f4.js} +39 -14
- package/dist/esm/app-globals-6a7ed0f4.js.map +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-appointments.entry.js +11 -8
- package/dist/esm/stzh-appointments.entry.js.map +1 -1
- package/dist/esm/stzh-badge_3.entry.js +1 -1
- package/dist/esm/stzh-badge_3.entry.js.map +1 -1
- package/dist/esm/stzh-calendar.entry.js +1 -1
- package/dist/esm/stzh-calendar.entry.js.map +1 -1
- package/dist/esm/stzh-card_3.entry.js +16 -19
- package/dist/esm/stzh-card_3.entry.js.map +1 -1
- package/dist/esm/stzh-chip.entry.js +3 -3
- package/dist/esm/stzh-chip.entry.js.map +1 -1
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-content.entry.js +1 -1
- package/dist/esm/stzh-content.entry.js.map +1 -1
- package/dist/esm/stzh-cspace.entry.js +1 -1
- package/dist/esm/stzh-cspace.entry.js.map +1 -1
- package/dist/esm/stzh-cta.entry.js +1 -1
- package/dist/esm/stzh-cta.entry.js.map +1 -1
- package/dist/esm/stzh-datamessagelist-item.entry.js +9 -4
- package/dist/esm/stzh-datamessagelist-item.entry.js.map +1 -1
- package/dist/esm/stzh-datamessagelist.entry.js +1 -1
- package/dist/esm/stzh-datamessagelist.entry.js.map +1 -1
- package/dist/esm/stzh-datepicker_3.entry.js +1 -1
- package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
- package/dist/esm/stzh-dropdown.entry.js +8 -2
- package/dist/esm/stzh-dropdown.entry.js.map +1 -1
- package/dist/esm/stzh-header.entry.js +15 -5
- package/dist/esm/stzh-header.entry.js.map +1 -1
- package/dist/esm/stzh-iframe.entry.js +11 -3
- package/dist/esm/stzh-iframe.entry.js.map +1 -1
- package/dist/esm/stzh-imagecomparison.entry.js +2 -2
- package/dist/esm/stzh-imagecomparison.entry.js.map +1 -1
- package/dist/esm/stzh-link.entry.js +1 -1
- package/dist/esm/stzh-link.entry.js.map +1 -1
- package/dist/esm/stzh-search.entry.js +20 -3
- package/dist/esm/stzh-search.entry.js.map +1 -1
- package/dist/esm/stzh-skin-portal-mitwirken.entry.js +1 -1
- package/dist/esm/stzh-skin-portal-mitwirken.entry.js.map +1 -1
- package/dist/stzh-components/assets/i18n/de.json +2 -2
- package/dist/stzh-components/assets/i18n/en.json +2 -2
- package/dist/stzh-components/index.esm.js.map +1 -1
- package/dist/stzh-components/{p-3ca4f71a.entry.js → p-069e181f.entry.js} +2 -2
- package/dist/stzh-components/p-069e181f.entry.js.map +1 -0
- package/dist/stzh-components/p-1b78f602.entry.js +2 -0
- package/dist/stzh-components/p-1b78f602.entry.js.map +1 -0
- package/dist/stzh-components/p-295c8995.entry.js +2 -0
- package/dist/stzh-components/p-295c8995.entry.js.map +1 -0
- package/dist/stzh-components/p-2bbbc217.entry.js +9 -0
- package/dist/stzh-components/{p-b4ce8e10.entry.js.map → p-2bbbc217.entry.js.map} +1 -1
- package/dist/stzh-components/p-2d57953a.entry.js +2 -0
- package/dist/stzh-components/{p-1252aa01.entry.js.map → p-2d57953a.entry.js.map} +1 -1
- package/dist/stzh-components/p-2eb8f323.entry.js +2 -0
- package/dist/stzh-components/{p-62b88844.entry.js.map → p-2eb8f323.entry.js.map} +1 -1
- package/dist/stzh-components/p-45392fe0.entry.js +2 -0
- package/dist/stzh-components/p-45392fe0.entry.js.map +1 -0
- package/dist/stzh-components/{p-bd494b47.entry.js → p-523c0bb1.entry.js} +2 -2
- package/dist/stzh-components/p-523c0bb1.entry.js.map +1 -0
- package/dist/stzh-components/{p-e63dfe12.entry.js → p-5b9b2425.entry.js} +2 -2
- package/dist/stzh-components/{p-e63dfe12.entry.js.map → p-5b9b2425.entry.js.map} +1 -1
- package/dist/stzh-components/{p-bb87a6e2.entry.js → p-75fec3cd.entry.js} +2 -2
- package/dist/stzh-components/{p-bb87a6e2.entry.js.map → p-75fec3cd.entry.js.map} +1 -1
- package/dist/stzh-components/p-78eaea8d.js +2 -0
- package/dist/stzh-components/p-78eaea8d.js.map +1 -0
- package/dist/stzh-components/p-8ab62796.entry.js +2 -0
- package/dist/stzh-components/p-8ab62796.entry.js.map +1 -0
- package/dist/stzh-components/p-b0626969.entry.js +2 -0
- package/dist/stzh-components/p-b0626969.entry.js.map +1 -0
- package/dist/stzh-components/p-b34a4e7c.entry.js +2 -0
- package/dist/stzh-components/p-b34a4e7c.entry.js.map +1 -0
- package/dist/stzh-components/p-b5224e53.entry.js +2 -0
- package/dist/stzh-components/p-b5224e53.entry.js.map +1 -0
- package/dist/stzh-components/p-d1e6afe2.entry.js +2 -0
- package/dist/stzh-components/p-d1e6afe2.entry.js.map +1 -0
- package/dist/stzh-components/p-ddfb8df0.entry.js +2 -0
- package/dist/stzh-components/p-ddfb8df0.entry.js.map +1 -0
- package/dist/stzh-components/p-eb79f3ed.entry.js +2 -0
- package/dist/stzh-components/p-eb79f3ed.entry.js.map +1 -0
- package/dist/stzh-components/p-f50e0102.entry.js +2 -0
- package/dist/stzh-components/p-f50e0102.entry.js.map +1 -0
- package/dist/stzh-components/stzh-components.css +1 -1
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/stzh-components/stzh-components.esm.js.map +1 -1
- package/dist/types/components/stzh-card/stzh-card.d.ts +1 -5
- package/dist/types/components/stzh-datamessagelist-item/stzh-datamessagelist-item.d.ts +2 -0
- package/dist/types/components/stzh-dropdown/stzh-dropdown.d.ts +10 -2
- package/dist/types/components/stzh-header/stzh-header.d.ts +2 -2
- package/dist/types/components/stzh-iframe/stzh-iframe.d.ts +29 -1
- package/dist/types/components/stzh-link/stzh-link.d.ts +2 -2
- package/dist/types/components/stzh-search/stzh-search.d.ts +10 -0
- package/dist/types/components.d.ts +156 -38
- package/dist/types/index.d.ts +3 -0
- package/dist/vscode-data.json +140 -12
- package/package.json +1 -1
- package/dist/cjs/app-globals-0cbebaa1.js.map +0 -1
- package/dist/collection/patterns/appointments/appointments.e2e.js +0 -18
- package/dist/collection/patterns/appointments/appointments.e2e.js.map +0 -1
- package/dist/esm/app-globals-3c171b79.js.map +0 -1
- package/dist/stzh-components/p-1252aa01.entry.js +0 -2
- package/dist/stzh-components/p-18015613.entry.js +0 -2
- package/dist/stzh-components/p-18015613.entry.js.map +0 -1
- package/dist/stzh-components/p-38d64313.entry.js +0 -2
- package/dist/stzh-components/p-38d64313.entry.js.map +0 -1
- package/dist/stzh-components/p-39fa126d.js +0 -2
- package/dist/stzh-components/p-39fa126d.js.map +0 -1
- package/dist/stzh-components/p-3ca4f71a.entry.js.map +0 -1
- package/dist/stzh-components/p-4cff0c86.entry.js +0 -2
- package/dist/stzh-components/p-4cff0c86.entry.js.map +0 -1
- package/dist/stzh-components/p-5e48450d.entry.js +0 -2
- package/dist/stzh-components/p-5e48450d.entry.js.map +0 -1
- package/dist/stzh-components/p-62b88844.entry.js +0 -2
- package/dist/stzh-components/p-69c1826d.entry.js +0 -2
- package/dist/stzh-components/p-69c1826d.entry.js.map +0 -1
- package/dist/stzh-components/p-7091d652.entry.js +0 -2
- package/dist/stzh-components/p-7091d652.entry.js.map +0 -1
- package/dist/stzh-components/p-76902b7c.entry.js +0 -2
- package/dist/stzh-components/p-76902b7c.entry.js.map +0 -1
- package/dist/stzh-components/p-92285350.entry.js +0 -2
- package/dist/stzh-components/p-92285350.entry.js.map +0 -1
- package/dist/stzh-components/p-93e0ff47.entry.js +0 -2
- package/dist/stzh-components/p-93e0ff47.entry.js.map +0 -1
- package/dist/stzh-components/p-b4ce8e10.entry.js +0 -9
- package/dist/stzh-components/p-bd494b47.entry.js.map +0 -1
- package/dist/stzh-components/p-e6785bb1.entry.js +0 -2
- package/dist/stzh-components/p-e6785bb1.entry.js.map +0 -1
- package/dist/stzh-components/p-fb1d20da.entry.js +0 -2
- package/dist/stzh-components/p-fb1d20da.entry.js.map +0 -1
|
@@ -24,7 +24,7 @@ const StzhBadge = class {
|
|
|
24
24
|
};
|
|
25
25
|
StzhBadge.style = stzhBadgeCss;
|
|
26
26
|
|
|
27
|
-
const stzhButtonCss = "@charset \"UTF-8\";.sc-stzh-button-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-button-h{display:none}.sc-stzh-button-h::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-button-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-button-h *.sc-stzh-button,.sc-stzh-button-h *.sc-stzh-button::before,.sc-stzh-button-h *.sc-stzh-button::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-button-h .has-focus.sc-stzh-button{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-button-h .stzh-fylingfocus-focused.sc-stzh-button{outline-style:none !important}.sc-stzh-button-h .stzh-fylingfocus-focused.sc-stzh-button::-moz-focus-inner{border:0 !important}.sc-stzh-button-h{--height:var(--stzh-form-input-height);--padding-top:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-left:var(--stzh-space-xlarge);--padding-right:var(--stzh-space-xlarge);--font-size:var(--stzh-font-centi-font-size);--line-height:var(--stzh-font-centi-text-line-height);--letter-spacing:normal;--icon-size:var(--stzh-icon-size-medium);--icon-toggle-size:0.90625rem;--color:var(--stzh-button-color, var(--stzh-color-white));--background-color:var(--stzh-button-background-color, var(--stzh-color-primary70));--border-width:0px;--border-color:transparent;--border-radius:0px;--icon-text-margin:var(--stzh-space-xsmall);--icon-toggle-color:currentColor;--badge-icon-text-margin:calc(var(--icon-text-margin) + var(--stzh-space-xxsmall));--white-space:var(--stzh-button-white-space, normal);--box-shadow:none;--cursor:pointer;--hover-color:var(--stzh-button-hover-color, var(--stzh-color-white));--hover-background-color:var(--stzh-button-hover-background-color, var(--stzh-color-secondary60));--hover-border-color:transparent;display:inline-grid;width:auto;min-width:var(--height);min-height:var(--height);pointer-events:var(--stzh-button-pointer-events, auto)}.sc-stzh-button-h:where([icon-only]:not([icon-only=\"false\"])){--icon-size:var(--stzh-icon-size-large)}@media print{.sc-stzh-button-h{-webkit-print-color-adjust:exact;print-color-adjust:exact}}[icon-only].sc-stzh-button-h:not([icon-only=false]){--padding-top:0;--padding-bottom:0;--padding-left:0;--padding-right:0;width:var(--height);height:var(--height)}[fullwidth].sc-stzh-button-h:not([fullwidth=false]){width:100%;display:grid}[rounded].sc-stzh-button-h:not([rounded=false]){--border-radius:var(--height)}[no-padding-left].sc-stzh-button-h:not([no-padding-left=false]){--padding-left:0px}[no-padding-right].sc-stzh-button-h:not([no-padding-right=false]){--padding-right:0px}[variant=secondary].sc-stzh-button-h{--color:var(--stzh-button-secondary-color, var(--stzh-color-primary70));--background-color:var(--stzh-button-secondary-background-color, var(--stzh-color-secondary30));--hover-color:var(--stzh-button-secondary-hover-color, var(--stzh-color-primary80));--hover-background-color:var(--stzh-button-secondary-hover-background-color, var(--stzh-color-secondary40))}[variant=tertiary].sc-stzh-button-h{--color:var(--stzh-button-tertiary-color, var(--stzh-color-primary70));--background-color:var(--stzh-button-tertiary-background-color, transparent);--hover-color:var(--stzh-button-tertiary-hover-color, var(--stzh-color-primary80));--hover-background-color:var(--stzh-button-tertiary-hover-background-color, var(--stzh-color-secondary20))}[variant=tertiary-plain].sc-stzh-button-h{--color:var(--stzh-button-tertiary-color, var(--stzh-color-primary70));--background-color:transparent;--hover-color:var(--stzh-button-tertiary-hover-color, var(--stzh-color-primary80));--hover-background-color:var(--background-color)}[active].sc-stzh-button-h:not([active=false]){--color:var(--stzh-button-active-color, var(--stzh-color-white));--background-color:var(--stzh-button-active-background-color, var(--stzh-color-secondary60));--hover-color:var(--stzh-button-active-hover-color, var(--stzh-color-white));--hover-background-color:var(--stzh-button-active-hover-background-color, var(--stzh-color-secondary60))}[disabled].sc-stzh-button-h:not([disabled=false]),[a11y-disabled].sc-stzh-button-h:not([a11y-disabled=false]){--color:var(--stzh-button-disabled-color, var(--stzh-color-white));--background-color:var(--stzh-button-disabled-background-color, var(--stzh-color-grey70));--hover-color:var(--color);--hover-background-color:var(--background-color)}[disabled].sc-stzh-button-h:not([disabled=false])[variant=secondary],[a11y-disabled].sc-stzh-button-h:not([a11y-disabled=false])[variant=secondary]{--color:var(--stzh-button-secondary-disabled-color, var(--stzh-color-grey80));--background-color:var(--stzh-button-secondary-disabled-background-color, var(--stzh-color-grey20))}[disabled].sc-stzh-button-h:not([disabled=false])[variant=input],[a11y-disabled].sc-stzh-button-h:not([a11y-disabled=false])[variant=input]{--color:var(--stzh-button-input-disabled-color, var(--stzh-color-grey80));--background-color:var(--stzh-button-input-disabled-background-color, var(--stzh-color-grey20))}[disabled].sc-stzh-button-h:not([disabled=false])[variant=tertiary],[disabled].sc-stzh-button-h:not([disabled=false])[variant=tertiary-plain],[a11y-disabled].sc-stzh-button-h:not([a11y-disabled=false])[variant=tertiary],[a11y-disabled].sc-stzh-button-h:not([a11y-disabled=false])[variant=tertiary-plain]{--color:var(--stzh-button-tertiary-disabled-color, var(--stzh-color-grey70));--background-color:var(--stzh-button-tertiary-disabled-background-color, transparent)}.sc-stzh-button-h:where([size=\"small\"]){--height:var(--stzh-form-input-small-height);--padding-left:var(--stzh-space-large);--padding-right:var(--stzh-space-large);--font-size:var(--stzh-font-milli-font-size);--line-height:var(--stzh-font-milli-text-line-height);--icon-size:var(--stzh-icon-size-medium)}.sc-stzh-button-h:where([size=\"tiny\"]){--height:var(--stzh-form-input-tiny-height);--padding-left:var(--stzh-space-medium);--padding-right:var(--stzh-space-medium);--padding-top:calc(var(--stzh-space-xxsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xxsmall) - var(--border-width));--font-size:var(--stzh-font-micro-font-size);--line-height:var(--stzh-font-micro-text-line-height);--icon-size:var(--stzh-icon-size-medium)}@media screen and (min-width: 600px){.sc-stzh-button-h:where([size-small=\"default\"]){--height:var(--stzh-form-input-height);--padding-top:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-left:var(--stzh-space-xlarge);--padding-right:var(--stzh-space-xlarge);--font-size:var(--stzh-font-centi-font-size);--line-height:var(--stzh-font-centi-text-line-height);--letter-spacing:normal;--icon-size:var(--stzh-icon-size-medium);--icon-toggle-size:0.90625rem}.sc-stzh-button-h:where([size-small=\"default\"]):where([icon-only]:not([icon-only=\"false\"])){--icon-size:var(--stzh-icon-size-large)}.sc-stzh-button-h:where([size-small=\"small\"]){--height:var(--stzh-form-input-small-height);--padding-left:var(--stzh-space-large);--padding-right:var(--stzh-space-large);--font-size:var(--stzh-font-milli-font-size);--line-height:var(--stzh-font-milli-text-line-height);--icon-size:var(--stzh-icon-size-medium)}.sc-stzh-button-h:where([size-small=\"tiny\"]){--height:var(--stzh-form-input-tiny-height);--padding-left:var(--stzh-space-medium);--padding-right:var(--stzh-space-medium);--padding-top:calc(var(--stzh-space-xxsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xxsmall) - var(--border-width));--font-size:var(--stzh-font-micro-font-size);--line-height:var(--stzh-font-micro-text-line-height);--icon-size:var(--stzh-icon-size-medium)}}@media screen and (min-width: 900px){.sc-stzh-button-h:where([size-medium=\"default\"]){--height:var(--stzh-form-input-height);--padding-top:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-left:var(--stzh-space-xlarge);--padding-right:var(--stzh-space-xlarge);--font-size:var(--stzh-font-centi-font-size);--line-height:var(--stzh-font-centi-text-line-height);--letter-spacing:normal;--icon-size:var(--stzh-icon-size-medium);--icon-toggle-size:0.90625rem}.sc-stzh-button-h:where([size-medium=\"default\"]):where([icon-only]:not([icon-only=\"false\"])){--icon-size:var(--stzh-icon-size-large)}.sc-stzh-button-h:where([size-medium=\"small\"]){--height:var(--stzh-form-input-small-height);--padding-left:var(--stzh-space-large);--padding-right:var(--stzh-space-large);--font-size:var(--stzh-font-milli-font-size);--line-height:var(--stzh-font-milli-text-line-height);--icon-size:var(--stzh-icon-size-medium)}.sc-stzh-button-h:where([size-medium=\"tiny\"]){--height:var(--stzh-form-input-tiny-height);--padding-left:var(--stzh-space-medium);--padding-right:var(--stzh-space-medium);--padding-top:calc(var(--stzh-space-xxsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xxsmall) - var(--border-width));--font-size:var(--stzh-font-micro-font-size);--line-height:var(--stzh-font-micro-text-line-height);--icon-size:var(--stzh-icon-size-medium)}}@media screen and (min-width: 1260px){.sc-stzh-button-h:where([size-large=\"default\"]){--height:var(--stzh-form-input-height);--padding-top:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-left:var(--stzh-space-xlarge);--padding-right:var(--stzh-space-xlarge);--font-size:var(--stzh-font-centi-font-size);--line-height:var(--stzh-font-centi-text-line-height);--letter-spacing:normal;--icon-size:var(--stzh-icon-size-medium);--icon-toggle-size:0.90625rem}.sc-stzh-button-h:where([size-large=\"default\"]):where([icon-only]:not([icon-only=\"false\"])){--icon-size:var(--stzh-icon-size-large)}.sc-stzh-button-h:where([size-large=\"small\"]){--height:var(--stzh-form-input-small-height);--padding-left:var(--stzh-space-large);--padding-right:var(--stzh-space-large);--font-size:var(--stzh-font-milli-font-size);--line-height:var(--stzh-font-milli-text-line-height);--icon-size:var(--stzh-icon-size-medium)}.sc-stzh-button-h:where([size-large=\"tiny\"]){--height:var(--stzh-form-input-tiny-height);--padding-left:var(--stzh-space-medium);--padding-right:var(--stzh-space-medium);--padding-top:calc(var(--stzh-space-xxsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xxsmall) - var(--border-width));--font-size:var(--stzh-font-micro-font-size);--line-height:var(--stzh-font-micro-text-line-height);--icon-size:var(--stzh-icon-size-medium)}}@media screen and (min-width: 1600px){.sc-stzh-button-h:where([size-ultra=\"default\"]){--height:var(--stzh-form-input-height);--padding-top:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-left:var(--stzh-space-xlarge);--padding-right:var(--stzh-space-xlarge);--font-size:var(--stzh-font-centi-font-size);--line-height:var(--stzh-font-centi-text-line-height);--letter-spacing:normal;--icon-size:var(--stzh-icon-size-medium);--icon-toggle-size:0.90625rem}.sc-stzh-button-h:where([size-ultra=\"default\"]):where([icon-only]:not([icon-only=\"false\"])){--icon-size:var(--stzh-icon-size-large)}.sc-stzh-button-h:where([size-ultra=\"small\"]){--height:var(--stzh-form-input-small-height);--padding-left:var(--stzh-space-large);--padding-right:var(--stzh-space-large);--font-size:var(--stzh-font-milli-font-size);--line-height:var(--stzh-font-milli-text-line-height);--icon-size:var(--stzh-icon-size-medium)}.sc-stzh-button-h:where([size-ultra=\"tiny\"]){--height:var(--stzh-form-input-tiny-height);--padding-left:var(--stzh-space-medium);--padding-right:var(--stzh-space-medium);--padding-top:calc(var(--stzh-space-xxsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xxsmall) - var(--border-width));--font-size:var(--stzh-font-micro-font-size);--line-height:var(--stzh-font-micro-text-line-height);--icon-size:var(--stzh-icon-size-medium)}}@keyframes stzh-button-effect-cta{0%,20%,50%,80%,100%{transform:translateX(0)}40%{transform:translateX(-0.5rem)}60%{transform:translateX(-0.25rem)}}.stzh-button.sc-stzh-button{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--font-size);line-height:var(--line-height);letter-spacing:var(--letter-spacing);position:relative;z-index:0;overflow:visible;display:flex;align-items:center;justify-content:stretch;-webkit-appearance:none;-moz-appearance:none;appearance:none;color:var(--color);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);padding-left:var(--padding-left);padding-right:var(--padding-right);background-color:var(--background-color);transition-duration:var(--stzh-base-transition-animation-speed);transition-property:color, background-color, border-color;border-style:solid;border-width:var(--border-width);border-color:var(--border-color);cursor:var(--cursor);-webkit-text-decoration-line:none;text-decoration-line:none;width:100%;height:100%;border-radius:var(--border-radius);text-align:left;box-shadow:var(--box-shadow)}.stzh-button.sc-stzh-button:hover{border-color:var(--hover-border-color);background-color:var(--hover-background-color);color:var(--hover-color)}.stzh-button__vhidden.sc-stzh-button{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-button__inner.sc-stzh-button{display:flex;align-items:center;justify-content:center;flex-grow:1}.stzh-button__icon-wrapper.sc-stzh-button,.stzh-button__toggle-icon-wrapper.sc-stzh-button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.stzh-button__icon-wrapper.sc-stzh-button{--stzh-icon-size:var(--icon-size);width:auto;height:1em}.stzh-button__toggle-icon-wrapper.sc-stzh-button{width:var(--icon-size);height:var(--icon-size)}.stzh-button__toggle-icon.sc-stzh-button{position:relative;display:block;width:var(--icon-toggle-size);height:var(--icon-toggle-size)}.stzh-button__toggle-icon.sc-stzh-button::before,.stzh-button__toggle-icon.sc-stzh-button::after{position:absolute;top:50%;left:50%;content:\"\";display:block;width:var(--icon-toggle-size);height:0.125rem;transition-property:transform, background-color;transition-duration:500ms;transform-origin:top left;background-color:var(--icon-toggle-color)}@media (prefers-reduced-motion: reduce){.stzh-button__toggle-icon.sc-stzh-button::before,.stzh-button__toggle-icon.sc-stzh-button::after{transition:none}}.stzh-button__toggle-icon.sc-stzh-button::before{transform:rotate(180deg) translate(-50%, -50%)}.stzh-button__toggle-icon.sc-stzh-button::after{transform:rotate(90deg) translate(-50%, -50%)}.stzh-button__text.sc-stzh-button{overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;-webkit-hyphens:auto;hyphens:auto;white-space:var(--white-space);text-align:center}.stzh-button__icon-wrapper.sc-stzh-button:not(:empty)+.stzh-button__text.sc-stzh-button:not(:empty),.stzh-button__text.sc-stzh-button:not(:empty)+.stzh-button__icon-wrapper.sc-stzh-button:not(:empty){margin-left:var(--icon-text-margin)}.stzh-button__badge.sc-stzh-button{position:absolute;z-index:1;top:0;right:0}.stzh-button__input.sc-stzh-button{position:absolute;top:0;left:0;width:100%;height:100%;margin:0;z-index:-1;opacity:0;pointer-events:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.stzh-button__mark.sc-stzh-button{border:0.125rem solid var(--stzh-color-black);background-color:var(--stzh-color-white);width:1.5rem;height:1.5rem;flex-shrink:0;border-radius:50%;display:inline-flex;justify-content:center;align-items:center;transition:border-color var(--stzh-base-transition-animation-speed);width:1.25rem;height:1.25rem;margin-right:var(--stzh-space-xsmall);border-color:currentColor}.stzh-button__mark.sc-stzh-button::before{content:\"\"}.stzh-button__check.sc-stzh-button{background-color:currentColor;color:var(--stzh-color-primary70);width:1rem;height:1rem;border-radius:50%;opacity:0;transition-property:color;transition-duration:var(--stzh-base-transition-animation-speed)}@media (forced-colors: active), (-ms-high-contrast: active){.stzh-button__check.sc-stzh-button{background-color:ButtonText}}.stzh-button__input.sc-stzh-button:checked:hover~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button .stzh-button__check.sc-stzh-button,.stzh-button__input.sc-stzh-button:checked:focus~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button .stzh-button__check.sc-stzh-button{color:var(--stzh-color-secondary60)}.stzh-button.sc-stzh-button:hover .stzh-button__mark.sc-stzh-button,.stzh-button__input.sc-stzh-button:focus:hover~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button,.stzh-button__input.sc-stzh-button:checked:hover~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button,.stzh-button__input.sc-stzh-button:checked:focus~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button{border-color:var(--stzh-color-secondary60)}.stzh-button__input.sc-stzh-button:focus~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button,.stzh-button__input.sc-stzh-button:checked~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button{border-color:var(--stzh-color-primary)}.stzh-button__input.sc-stzh-button:checked~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button .stzh-button__check.sc-stzh-button{opacity:1}.stzh-button--is-disabled.sc-stzh-button .stzh-button__input.sc-stzh-button~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button .stzh-button__check.sc-stzh-button{color:var(--stzh-color-grey70)}.stzh-button--is-disabled.sc-stzh-button .stzh-button__input.sc-stzh-button~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button{border-color:var(--stzh-color-grey70)}.stzh-button--is-disabled.sc-stzh-button .stzh-button__mark.sc-stzh-button{background-color:var(--stzh-color-grey10)}.stzh-button--is-expanded.sc-stzh-button .stzh-button__toggle-icon.sc-stzh-button::before,.stzh-button--is-expanded.sc-stzh-button .stzh-button__toggle-icon.sc-stzh-button::after{transform:rotate(0) translate(-50%, -50%)}.stzh-button--badge-position-button.sc-stzh-button .stzh-button__icon-wrapper.sc-stzh-button{position:static}.stzh-button__badge.sc-stzh-button,.stzh-button--badge-position-button.sc-stzh-button .stzh-button__badge.sc-stzh-button{top:calc(var(--stzh-space-xsmall) * -1);right:calc(var(--stzh-space-xsmall) * -1)}.stzh-button--badge-position-icon.stzh-button--has-icon.sc-stzh-button .stzh-button__icon-wrapper.sc-stzh-button{position:relative}.stzh-button--badge-position-icon.stzh-button--has-icon.sc-stzh-button .stzh-button__badge.sc-stzh-button{top:calc(var(--stzh-space-xsmall) * -1);right:calc(var(--stzh-space-small) * -1)}.stzh-button--badge-position-icon.stzh-button--has-icon.stzh-button--has-badge.sc-stzh-button .stzh-button__icon-wrapper.sc-stzh-button:not(:empty)+.stzh-button__text.sc-stzh-button:not(:empty),.stzh-button--badge-position-icon.stzh-button--has-icon.stzh-button--has-badge.sc-stzh-button .stzh-button__text.sc-stzh-button:not(:empty)+.stzh-button__icon-wrapper.sc-stzh-button:not(:empty){margin-left:var(--badge-icon-text-margin)}.stzh-button--has-icon-only.sc-stzh-button .stzh-button__text.sc-stzh-button{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-button--effect-cta.sc-stzh-button:hover .stzh-button__icon-wrapper.sc-stzh-button{animation:stzh-button-effect-cta 1s}.stzh-button--align-left.sc-stzh-button .stzh-button__inner.sc-stzh-button{justify-content:flex-start}.stzh-button--align-right.sc-stzh-button .stzh-button__inner.sc-stzh-button{justify-content:flex-end}.stzh-button--align-center.sc-stzh-button .stzh-button__inner.sc-stzh-button{justify-content:center}.stzh-button--align-space-between.sc-stzh-button .stzh-button__inner.sc-stzh-button{justify-content:space-between}.stzh-button--is-disabled.sc-stzh-button{cursor:not-allowed}.stzh-button--default.has-focus.sc-stzh-button{outline:var(--stzh-flyingfocus-color) solid 0.1875rem}";
|
|
27
|
+
const stzhButtonCss = "@charset \"UTF-8\";.sc-stzh-button-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-button-h{display:none}.sc-stzh-button-h::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-button-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-button-h *.sc-stzh-button,.sc-stzh-button-h *.sc-stzh-button::before,.sc-stzh-button-h *.sc-stzh-button::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-button-h .has-focus.sc-stzh-button{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-button-h .stzh-fylingfocus-focused.sc-stzh-button{outline-style:none !important}.sc-stzh-button-h .stzh-fylingfocus-focused.sc-stzh-button::-moz-focus-inner{border:0 !important}.sc-stzh-button-h{--height:var(--stzh-form-input-height);--padding-top:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-left:var(--stzh-space-xlarge);--padding-right:var(--stzh-space-xlarge);--font-size:var(--stzh-font-centi-font-size);--line-height:var(--stzh-font-centi-text-line-height);--letter-spacing:normal;--icon-size:var(--stzh-icon-size-medium);--icon-toggle-size:0.90625rem;--color:var(--stzh-button-color, var(--stzh-color-white));--background-color:var(--stzh-button-background-color, var(--stzh-color-primary70));--border-width:0px;--border-color:transparent;--border-radius:0px;--icon-text-margin:var(--stzh-space-xsmall);--icon-toggle-color:currentColor;--badge-icon-text-margin:calc(var(--icon-text-margin) + var(--stzh-space-xxsmall));--white-space:var(--stzh-button-white-space, normal);--box-shadow:none;--cursor:pointer;--hover-color:var(--stzh-button-hover-color, var(--stzh-color-white));--hover-background-color:var(--stzh-button-hover-background-color, var(--stzh-color-secondary60));--hover-border-color:transparent;display:inline-grid;width:auto;min-width:var(--height);min-height:var(--height);pointer-events:var(--stzh-button-pointer-events, auto)}.sc-stzh-button-h:where([icon-only]:not([icon-only=\"false\"])){--icon-size:var(--stzh-icon-size-large)}@media print{.sc-stzh-button-h{-webkit-print-color-adjust:exact;print-color-adjust:exact}}[icon-only].sc-stzh-button-h:not([icon-only=false]){--padding-top:0;--padding-bottom:0;--padding-left:0;--padding-right:0;width:var(--height);height:var(--height)}[fullwidth].sc-stzh-button-h:not([fullwidth=false]){width:100%;display:grid}[rounded].sc-stzh-button-h:not([rounded=false]){--border-radius:var(--height)}[no-padding-left].sc-stzh-button-h:not([no-padding-left=false]){--padding-left:0px}[no-padding-right].sc-stzh-button-h:not([no-padding-right=false]){--padding-right:0px}[variant=secondary].sc-stzh-button-h{--color:var(--stzh-button-secondary-color, var(--stzh-color-primary70));--background-color:var(--stzh-button-secondary-background-color, var(--stzh-color-secondary30));--hover-color:var(--stzh-button-secondary-hover-color, var(--stzh-color-primary80));--hover-background-color:var(--stzh-button-secondary-hover-background-color, var(--stzh-color-secondary40))}[variant=tertiary].sc-stzh-button-h{--color:var(--stzh-button-tertiary-color, var(--stzh-color-primary70));--background-color:var(--stzh-button-tertiary-background-color, transparent);--hover-color:var(--stzh-button-tertiary-hover-color, var(--stzh-color-primary80));--hover-background-color:var(--stzh-button-tertiary-hover-background-color, var(--stzh-color-secondary20))}[variant=tertiary-plain].sc-stzh-button-h{--color:var(--stzh-button-tertiary-color, var(--stzh-color-primary70));--background-color:transparent;--hover-color:var(--stzh-button-tertiary-hover-color, var(--stzh-color-primary80));--hover-background-color:var(--background-color)}[active].sc-stzh-button-h:not([active=false]){--color:var(--stzh-button-active-color, var(--stzh-color-white));--background-color:var(--stzh-button-active-background-color, var(--stzh-color-secondary60));--hover-color:var(--stzh-button-active-hover-color, var(--stzh-color-white));--hover-background-color:var(--stzh-button-active-hover-background-color, var(--stzh-color-secondary60))}[disabled].sc-stzh-button-h:not([disabled=false]),[a11y-disabled].sc-stzh-button-h:not([a11y-disabled=false]){--color:var(--stzh-button-disabled-color, var(--stzh-color-white));--background-color:var(--stzh-button-disabled-background-color, var(--stzh-color-grey70));--hover-color:var(--color);--hover-background-color:var(--background-color)}[disabled].sc-stzh-button-h:not([disabled=false])[variant=secondary],[a11y-disabled].sc-stzh-button-h:not([a11y-disabled=false])[variant=secondary]{--color:var(--stzh-button-secondary-disabled-color, var(--stzh-color-grey80));--background-color:var(--stzh-button-secondary-disabled-background-color, var(--stzh-color-grey20))}[disabled].sc-stzh-button-h:not([disabled=false])[variant=input],[a11y-disabled].sc-stzh-button-h:not([a11y-disabled=false])[variant=input]{--color:var(--stzh-button-input-disabled-color, var(--stzh-color-grey80));--background-color:var(--stzh-button-input-disabled-background-color, var(--stzh-color-grey20))}[disabled].sc-stzh-button-h:not([disabled=false])[variant=tertiary],[disabled].sc-stzh-button-h:not([disabled=false])[variant=tertiary-plain],[a11y-disabled].sc-stzh-button-h:not([a11y-disabled=false])[variant=tertiary],[a11y-disabled].sc-stzh-button-h:not([a11y-disabled=false])[variant=tertiary-plain]{--color:var(--stzh-button-tertiary-disabled-color, var(--stzh-color-grey70));--background-color:var(--stzh-button-tertiary-disabled-background-color, transparent)}.sc-stzh-button-h:where([size=\"small\"]){--height:var(--stzh-form-input-small-height);--padding-left:var(--stzh-space-large);--padding-right:var(--stzh-space-large);--font-size:var(--stzh-font-milli-font-size);--line-height:var(--stzh-font-milli-text-line-height);--icon-size:var(--stzh-icon-size-medium)}.sc-stzh-button-h:where([size=\"tiny\"]){--height:var(--stzh-form-input-tiny-height);--padding-left:var(--stzh-space-medium);--padding-right:var(--stzh-space-medium);--padding-top:calc(var(--stzh-space-xxsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xxsmall) - var(--border-width));--font-size:var(--stzh-font-milli-font-size);--line-height:var(--stzh-font-milli-text-line-height);--icon-size:var(--stzh-icon-size-medium)}@media screen and (min-width: 600px){.sc-stzh-button-h:where([size-small=\"default\"]){--height:var(--stzh-form-input-height);--padding-top:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-left:var(--stzh-space-xlarge);--padding-right:var(--stzh-space-xlarge);--font-size:var(--stzh-font-centi-font-size);--line-height:var(--stzh-font-centi-text-line-height);--letter-spacing:normal;--icon-size:var(--stzh-icon-size-medium);--icon-toggle-size:0.90625rem}.sc-stzh-button-h:where([size-small=\"default\"]):where([icon-only]:not([icon-only=\"false\"])){--icon-size:var(--stzh-icon-size-large)}.sc-stzh-button-h:where([size-small=\"small\"]){--height:var(--stzh-form-input-small-height);--padding-left:var(--stzh-space-large);--padding-right:var(--stzh-space-large);--font-size:var(--stzh-font-milli-font-size);--line-height:var(--stzh-font-milli-text-line-height);--icon-size:var(--stzh-icon-size-medium)}.sc-stzh-button-h:where([size-small=\"tiny\"]){--height:var(--stzh-form-input-tiny-height);--padding-left:var(--stzh-space-medium);--padding-right:var(--stzh-space-medium);--padding-top:calc(var(--stzh-space-xxsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xxsmall) - var(--border-width));--font-size:var(--stzh-font-milli-font-size);--line-height:var(--stzh-font-milli-text-line-height);--icon-size:var(--stzh-icon-size-medium)}}@media screen and (min-width: 900px){.sc-stzh-button-h:where([size-medium=\"default\"]){--height:var(--stzh-form-input-height);--padding-top:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-left:var(--stzh-space-xlarge);--padding-right:var(--stzh-space-xlarge);--font-size:var(--stzh-font-centi-font-size);--line-height:var(--stzh-font-centi-text-line-height);--letter-spacing:normal;--icon-size:var(--stzh-icon-size-medium);--icon-toggle-size:0.90625rem}.sc-stzh-button-h:where([size-medium=\"default\"]):where([icon-only]:not([icon-only=\"false\"])){--icon-size:var(--stzh-icon-size-large)}.sc-stzh-button-h:where([size-medium=\"small\"]){--height:var(--stzh-form-input-small-height);--padding-left:var(--stzh-space-large);--padding-right:var(--stzh-space-large);--font-size:var(--stzh-font-milli-font-size);--line-height:var(--stzh-font-milli-text-line-height);--icon-size:var(--stzh-icon-size-medium)}.sc-stzh-button-h:where([size-medium=\"tiny\"]){--height:var(--stzh-form-input-tiny-height);--padding-left:var(--stzh-space-medium);--padding-right:var(--stzh-space-medium);--padding-top:calc(var(--stzh-space-xxsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xxsmall) - var(--border-width));--font-size:var(--stzh-font-milli-font-size);--line-height:var(--stzh-font-milli-text-line-height);--icon-size:var(--stzh-icon-size-medium)}}@media screen and (min-width: 1260px){.sc-stzh-button-h:where([size-large=\"default\"]){--height:var(--stzh-form-input-height);--padding-top:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-left:var(--stzh-space-xlarge);--padding-right:var(--stzh-space-xlarge);--font-size:var(--stzh-font-centi-font-size);--line-height:var(--stzh-font-centi-text-line-height);--letter-spacing:normal;--icon-size:var(--stzh-icon-size-medium);--icon-toggle-size:0.90625rem}.sc-stzh-button-h:where([size-large=\"default\"]):where([icon-only]:not([icon-only=\"false\"])){--icon-size:var(--stzh-icon-size-large)}.sc-stzh-button-h:where([size-large=\"small\"]){--height:var(--stzh-form-input-small-height);--padding-left:var(--stzh-space-large);--padding-right:var(--stzh-space-large);--font-size:var(--stzh-font-milli-font-size);--line-height:var(--stzh-font-milli-text-line-height);--icon-size:var(--stzh-icon-size-medium)}.sc-stzh-button-h:where([size-large=\"tiny\"]){--height:var(--stzh-form-input-tiny-height);--padding-left:var(--stzh-space-medium);--padding-right:var(--stzh-space-medium);--padding-top:calc(var(--stzh-space-xxsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xxsmall) - var(--border-width));--font-size:var(--stzh-font-milli-font-size);--line-height:var(--stzh-font-milli-text-line-height);--icon-size:var(--stzh-icon-size-medium)}}@media screen and (min-width: 1600px){.sc-stzh-button-h:where([size-ultra=\"default\"]){--height:var(--stzh-form-input-height);--padding-top:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xsmall) - var(--border-width));--padding-left:var(--stzh-space-xlarge);--padding-right:var(--stzh-space-xlarge);--font-size:var(--stzh-font-centi-font-size);--line-height:var(--stzh-font-centi-text-line-height);--letter-spacing:normal;--icon-size:var(--stzh-icon-size-medium);--icon-toggle-size:0.90625rem}.sc-stzh-button-h:where([size-ultra=\"default\"]):where([icon-only]:not([icon-only=\"false\"])){--icon-size:var(--stzh-icon-size-large)}.sc-stzh-button-h:where([size-ultra=\"small\"]){--height:var(--stzh-form-input-small-height);--padding-left:var(--stzh-space-large);--padding-right:var(--stzh-space-large);--font-size:var(--stzh-font-milli-font-size);--line-height:var(--stzh-font-milli-text-line-height);--icon-size:var(--stzh-icon-size-medium)}.sc-stzh-button-h:where([size-ultra=\"tiny\"]){--height:var(--stzh-form-input-tiny-height);--padding-left:var(--stzh-space-medium);--padding-right:var(--stzh-space-medium);--padding-top:calc(var(--stzh-space-xxsmall) - var(--border-width));--padding-bottom:calc(var(--stzh-space-xxsmall) - var(--border-width));--font-size:var(--stzh-font-milli-font-size);--line-height:var(--stzh-font-milli-text-line-height);--icon-size:var(--stzh-icon-size-medium)}}@keyframes stzh-button-effect-cta{0%,20%,50%,80%,100%{transform:translateX(0)}40%{transform:translateX(-0.5rem)}60%{transform:translateX(-0.25rem)}}.stzh-button.sc-stzh-button{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--font-size);line-height:var(--line-height);letter-spacing:var(--letter-spacing);position:relative;z-index:0;overflow:visible;display:flex;align-items:center;justify-content:stretch;-webkit-appearance:none;-moz-appearance:none;appearance:none;color:var(--color);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);padding-left:var(--padding-left);padding-right:var(--padding-right);background-color:var(--background-color);transition-duration:var(--stzh-base-transition-animation-speed);transition-property:color, background-color, border-color;border-style:solid;border-width:var(--border-width);border-color:var(--border-color);cursor:var(--cursor);-webkit-text-decoration-line:none;text-decoration-line:none;width:100%;height:100%;border-radius:var(--border-radius);text-align:left;box-shadow:var(--box-shadow)}.stzh-button.sc-stzh-button:hover{border-color:var(--hover-border-color);background-color:var(--hover-background-color);color:var(--hover-color)}.stzh-button__vhidden.sc-stzh-button{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-button__inner.sc-stzh-button{display:flex;align-items:center;justify-content:center;flex-grow:1}.stzh-button__icon-wrapper.sc-stzh-button,.stzh-button__toggle-icon-wrapper.sc-stzh-button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.stzh-button__icon-wrapper.sc-stzh-button{--stzh-icon-size:var(--icon-size);width:auto;height:1em}.stzh-button__toggle-icon-wrapper.sc-stzh-button{width:var(--icon-size);height:var(--icon-size)}.stzh-button__toggle-icon.sc-stzh-button{position:relative;display:block;width:var(--icon-toggle-size);height:var(--icon-toggle-size)}.stzh-button__toggle-icon.sc-stzh-button::before,.stzh-button__toggle-icon.sc-stzh-button::after{position:absolute;top:50%;left:50%;content:\"\";display:block;width:var(--icon-toggle-size);height:0.125rem;transition-property:transform, background-color;transition-duration:500ms;transform-origin:top left;background-color:var(--icon-toggle-color)}@media (prefers-reduced-motion: reduce){.stzh-button__toggle-icon.sc-stzh-button::before,.stzh-button__toggle-icon.sc-stzh-button::after{transition:none}}.stzh-button__toggle-icon.sc-stzh-button::before{transform:rotate(180deg) translate(-50%, -50%)}.stzh-button__toggle-icon.sc-stzh-button::after{transform:rotate(90deg) translate(-50%, -50%)}.stzh-button__text.sc-stzh-button{overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;-webkit-hyphens:auto;hyphens:auto;white-space:var(--white-space);text-align:center}.stzh-button__icon-wrapper.sc-stzh-button:not(:empty)+.stzh-button__text.sc-stzh-button:not(:empty),.stzh-button__text.sc-stzh-button:not(:empty)+.stzh-button__icon-wrapper.sc-stzh-button:not(:empty){margin-left:var(--icon-text-margin)}.stzh-button__badge.sc-stzh-button{position:absolute;z-index:1;top:0;right:0}.stzh-button__input.sc-stzh-button{position:absolute;top:0;left:0;width:100%;height:100%;margin:0;z-index:-1;opacity:0;pointer-events:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.stzh-button__mark.sc-stzh-button{border:0.125rem solid var(--stzh-color-black);background-color:var(--stzh-color-white);width:1.5rem;height:1.5rem;flex-shrink:0;border-radius:50%;display:inline-flex;justify-content:center;align-items:center;transition:border-color var(--stzh-base-transition-animation-speed);width:1.25rem;height:1.25rem;margin-right:var(--stzh-space-xsmall);border-color:currentColor}.stzh-button__mark.sc-stzh-button::before{content:\"\"}.stzh-button__check.sc-stzh-button{background-color:currentColor;color:var(--stzh-color-primary70);width:1rem;height:1rem;border-radius:50%;opacity:0;transition-property:color;transition-duration:var(--stzh-base-transition-animation-speed)}@media (forced-colors: active), (-ms-high-contrast: active){.stzh-button__check.sc-stzh-button{background-color:ButtonText}}.stzh-button__input.sc-stzh-button:checked:hover~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button .stzh-button__check.sc-stzh-button,.stzh-button__input.sc-stzh-button:checked:focus~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button .stzh-button__check.sc-stzh-button{color:var(--stzh-color-secondary60)}.stzh-button.sc-stzh-button:hover .stzh-button__mark.sc-stzh-button,.stzh-button__input.sc-stzh-button:focus:hover~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button,.stzh-button__input.sc-stzh-button:checked:hover~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button,.stzh-button__input.sc-stzh-button:checked:focus~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button{border-color:var(--stzh-color-secondary60)}.stzh-button__input.sc-stzh-button:focus~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button,.stzh-button__input.sc-stzh-button:checked~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button{border-color:var(--stzh-color-primary)}.stzh-button__input.sc-stzh-button:checked~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button .stzh-button__check.sc-stzh-button{opacity:1}.stzh-button--is-disabled.sc-stzh-button .stzh-button__input.sc-stzh-button~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button .stzh-button__check.sc-stzh-button{color:var(--stzh-color-grey70)}.stzh-button--is-disabled.sc-stzh-button .stzh-button__input.sc-stzh-button~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button{border-color:var(--stzh-color-grey70)}.stzh-button--is-disabled.sc-stzh-button .stzh-button__mark.sc-stzh-button{background-color:var(--stzh-color-grey10)}.stzh-button--is-expanded.sc-stzh-button .stzh-button__toggle-icon.sc-stzh-button::before,.stzh-button--is-expanded.sc-stzh-button .stzh-button__toggle-icon.sc-stzh-button::after{transform:rotate(0) translate(-50%, -50%)}.stzh-button--badge-position-button.sc-stzh-button .stzh-button__icon-wrapper.sc-stzh-button{position:static}.stzh-button__badge.sc-stzh-button,.stzh-button--badge-position-button.sc-stzh-button .stzh-button__badge.sc-stzh-button{top:calc(var(--stzh-space-xsmall) * -1);right:calc(var(--stzh-space-xsmall) * -1)}.stzh-button--badge-position-icon.stzh-button--has-icon.sc-stzh-button .stzh-button__icon-wrapper.sc-stzh-button{position:relative}.stzh-button--badge-position-icon.stzh-button--has-icon.sc-stzh-button .stzh-button__badge.sc-stzh-button{top:calc(var(--stzh-space-xsmall) * -1);right:calc(var(--stzh-space-small) * -1)}.stzh-button--badge-position-icon.stzh-button--has-icon.stzh-button--has-badge.sc-stzh-button .stzh-button__icon-wrapper.sc-stzh-button:not(:empty)+.stzh-button__text.sc-stzh-button:not(:empty),.stzh-button--badge-position-icon.stzh-button--has-icon.stzh-button--has-badge.sc-stzh-button .stzh-button__text.sc-stzh-button:not(:empty)+.stzh-button__icon-wrapper.sc-stzh-button:not(:empty){margin-left:var(--badge-icon-text-margin)}.stzh-button--has-icon-only.sc-stzh-button .stzh-button__text.sc-stzh-button{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-button--effect-cta.sc-stzh-button:hover .stzh-button__icon-wrapper.sc-stzh-button{animation:stzh-button-effect-cta 1s}.stzh-button--align-left.sc-stzh-button .stzh-button__inner.sc-stzh-button{justify-content:flex-start}.stzh-button--align-right.sc-stzh-button .stzh-button__inner.sc-stzh-button{justify-content:flex-end}.stzh-button--align-center.sc-stzh-button .stzh-button__inner.sc-stzh-button{justify-content:center}.stzh-button--align-space-between.sc-stzh-button .stzh-button__inner.sc-stzh-button{justify-content:space-between}.stzh-button--is-disabled.sc-stzh-button{cursor:not-allowed}.stzh-button--default.has-focus.sc-stzh-button{outline:var(--stzh-flyingfocus-color) solid 0.1875rem}";
|
|
28
28
|
|
|
29
29
|
const StzhButton = class {
|
|
30
30
|
constructor(hostRef) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"stzh-badge.stzh-button.stzh-icon.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,YAAY,GAAG,urEAAurE;;MCiB/rE,SAAS;;;iBAEI,EAAE;gBAGqB,SAAS;;EAExD,MAAM;IACJ,MAAM,OAAO,GAAG;MACd,YAAY,EAAE,IAAI;MAClB,CAAC,oBAAoB,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI;KAC/C,CAAC;IAEF,QACEA,QAACC,UAAI,IAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,IACxBD,iBAAK,KAAK,EAAE,OAAO,IAChB,IAAI,CAAC,KAAK,CACP,CACD,EACP;GACH;;;;ACrCH,MAAM,aAAa,GAAG,q0oBAAq0oB;;MCiC90oB,UAAU;;;;;;IA6Jb,mBAAc,GAAY,KAAK,CAAC;IAEhC,gBAAW,GAAG;MACpB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC;KACpC,CAAA;IAEO,YAAO,GAAG,CAAC,KAAiB;MAClC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;MAClC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QACnB,SAAS,EAAE,aAAa;QACxB,aAAa,EAAE,KAAK;QACpB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,OAAO,EAAE,IAAI,CAAC,OAAO;OACtB,CAAC,CAAC;KACJ,CAAA;IAEO,gBAAW,GAAG;MACpB,IAAI,CAAC,IAAI,CAAC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AG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC;GAC1C;EAKD,MAAM,iBAAiB;IACrB,IAAI,CAAC,MAAM,GAAG,aAAa,WAAW,EAAE,EAAE,CAAC;IAC3C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;GAC7B;EAED,MAAM;IACJ,QACEA,QAACC,UAAI,QACHD,iBAAK,KAAK,EAAC,WAAW,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,GAAQ,CACvF,EACP;GACH;;;;;;;;;;;;;","names":["h","Host","Fragment","hasSlot"],"sources":["src/components/stzh-badge/stzh-badge.scss?tag=stzh-badge&encapsulation=scoped","src/components/stzh-badge/stzh-badge.tsx","src/components/stzh-button/stzh-button.scss?tag=stzh-button&encapsulation=scoped","src/components/stzh-button/stzh-button.tsx","src/components/stzh-icon/stzh-icon.scss?tag=stzh-icon&encapsulation=shadow","src/components/stzh-icon/stzh-icon.tsx"],"sourcesContent":[":host {\n --color: #{$colorWhite};\n --background-color: #{$colorGrey90};\n display: inline-flex;\n\n &[type=\"success\"] {\n --background-color: #{$colorSuccess70};\n }\n\n &[type=\"warning\"] {\n --color: #{$colorBlack};\n --background-color: #{$colorWarning60};\n }\n\n &[type=\"error\"] {\n --background-color: #{$colorError60};\n }\n\n &[type=\"info\"] {\n --background-color: #{$colorPrimary70};\n }\n\n &[filled][type=\"error\"] {\n --background-color: #{$colorError70};\n }\n}\n\n.stzh-badge {\n @include badge;\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n} from \"@stencil/core\";\n\nimport { StzhBadgeType } from \"../../index\";\n\n/**\n * @slot - Slot badge content\n */\n@Component({\n tag: \"stzh-badge\",\n styleUrl: \"stzh-badge.scss\",\n scoped: true\n})\nexport class StzhBadge {\n /** Text content of the badge */\n @Prop() label: string = \"\";\n\n /** Type */\n @Prop({ reflect: true }) type: StzhBadgeType = \"default\";\n\n render() {\n const classes = {\n \"stzh-badge\": true,\n [`stzh-badge--type-${this.type}`]: !!this.type\n };\n\n return (\n <Host filled={!!this.label}>\n <div class={classes}>\n {this.label}\n </div>\n </Host>\n );\n }\n}\n","/**\n * @prop --height: Height of button\n * @prop --padding-top: Padding top of button\n * @prop --padding-bottom: Padding bottom of button\n * @prop --padding-left: Padding left of button\n * @prop --padding-right: Padding right of button\n * @prop --border-radius: Border radius of button\n * @prop --color: Color of button\n * @prop --background-color: Background color of button\n * @prop --border-color: Border color of button\n * @prop --icon-size: Size of icon next to button\n * @prop --hover-color: Hover color of button\n * @prop --hover-background-color: Hover background color of button\n * @prop --hover-border-color: Hover border color of button\n * @prop --white-space: White space behaviour of button\n *\n * @prop --stzh-form-input-height: **Global**: Height of fields & buttons\n * @prop --stzh-form-input-small-height: **Global**: Height of fields & buttons when small variant is used\n * @prop --stzh-form-input-tiny-height: **Global**: Height of fields & buttons when tiny variant is used\n */\n\n@mixin button--size-default() {\n --height: #{$formInputHeight};\n --padding-top: calc(#{space('xsmall')} - var(--border-width));\n --padding-bottom: calc(#{space('xsmall')} - var(--border-width));\n --padding-left: #{space('xlarge')};\n --padding-right: #{space('xlarge')};\n --font-size: var(--stzh-font-centi-font-size);\n --line-height: var(--stzh-font-centi-text-line-height);\n --letter-spacing: normal;\n --icon-size: #{iconSize('medium')};\n --icon-toggle-size: 14.5px;\n\n &:where([icon-only]:not([icon-only=\"false\"])) {\n --icon-size: #{iconSize('large')};\n }\n}\n\n@mixin button--size-small() {\n --height: #{$formInputHeightSmall};\n --padding-left: #{space('large')};\n --padding-right: #{space('large')};\n --font-size: var(--stzh-font-milli-font-size);\n --line-height: var(--stzh-font-milli-text-line-height);\n --icon-size: #{iconSize('medium')};\n}\n\n@mixin button--size-tiny() {\n --height: #{$formInputHeightTiny};\n --padding-left: #{space('medium')};\n --padding-right: #{space('medium')};\n --padding-top: calc(#{space('xxsmall')} - var(--border-width));\n --padding-bottom: calc(#{space('xxsmall')} - var(--border-width));\n --font-size: var(--stzh-font-micro-font-size);\n --line-height: var(--stzh-font-micro-text-line-height);\n --icon-size: #{iconSize('medium')};\n}\n\n:host {\n @include button--size-default;\n --color: var(--stzh-button-color, #{$colorWhite});\n --background-color: var(--stzh-button-background-color, #{$colorPrimary70});\n --border-width: 0px;\n --border-color: transparent;\n --border-radius: 0px;\n --icon-text-margin: #{space('xsmall')};\n --icon-toggle-color: currentColor;\n --badge-icon-text-margin: calc(var(--icon-text-margin) + #{space('xxsmall')});\n --white-space: var(--stzh-button-white-space, normal);\n --box-shadow: none;\n --cursor: pointer;\n\n --hover-color: var(--stzh-button-hover-color, #{$colorWhite});\n --hover-background-color: var(--stzh-button-hover-background-color, #{$colorSecondary60});\n --hover-border-color: transparent;\n\n display: inline-grid;\n width: auto;\n min-width: var(--height);\n min-height: var(--height);\n pointer-events: var(--stzh-button-pointer-events, auto);\n\n @media print {\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n\n &[icon-only]:not([icon-only=\"false\"]) {\n --padding-top: 0;\n --padding-bottom: 0;\n --padding-left: 0;\n --padding-right: 0;\n\n width: var(--height);\n height: var(--height);\n }\n\n &[fullwidth]:not([fullwidth=\"false\"]) {\n width: 100%;\n display: grid;\n }\n\n &[rounded]:not([rounded=\"false\"]) {\n --border-radius: var(--height);\n }\n\n &[no-padding-left]:not([no-padding-left=\"false\"]) {\n --padding-left: 0px;\n }\n\n &[no-padding-right]:not([no-padding-right=\"false\"]) {\n --padding-right: 0px;\n }\n\n &[variant=\"secondary\"] {\n --color: var(--stzh-button-secondary-color, #{$colorPrimary70});\n --background-color: var(--stzh-button-secondary-background-color, #{$colorSecondary30});\n\n --hover-color: var(--stzh-button-secondary-hover-color, #{$colorPrimary80});\n --hover-background-color: var(--stzh-button-secondary-hover-background-color, #{$colorSecondary40});\n }\n\n &[variant=\"tertiary\"] {\n --color: var(--stzh-button-tertiary-color, #{$colorPrimary70});\n --background-color: var(--stzh-button-tertiary-background-color, transparent);\n\n --hover-color: var(--stzh-button-tertiary-hover-color, #{$colorPrimary80});\n --hover-background-color: var(--stzh-button-tertiary-hover-background-color, #{$colorSecondary20});\n }\n\n &[variant=\"tertiary-plain\"] {\n --color: var(--stzh-button-tertiary-color, #{$colorPrimary70});\n --background-color: transparent;\n\n --hover-color: var(--stzh-button-tertiary-hover-color, #{$colorPrimary80});\n --hover-background-color: var(--background-color);\n }\n\n &[active]:not([active=\"false\"]) {\n --color: var(--stzh-button-active-color, #{$colorWhite});\n --background-color: var(--stzh-button-active-background-color, #{$colorSecondary60});\n\n --hover-color: var(--stzh-button-active-hover-color, #{$colorWhite});\n --hover-background-color: var(--stzh-button-active-hover-background-color, #{$colorSecondary60});\n }\n\n &[disabled]:not([disabled=\"false\"]),\n &[a11y-disabled]:not([a11y-disabled=\"false\"]) {\n --color: var(--stzh-button-disabled-color, #{$colorWhite});\n --background-color: var(--stzh-button-disabled-background-color, #{$colorGrey70});\n\n --hover-color: var(--color);\n --hover-background-color: var(--background-color);\n }\n\n &[disabled]:not([disabled=\"false\"])[variant=\"secondary\"],\n &[a11y-disabled]:not([a11y-disabled=\"false\"])[variant=\"secondary\"] {\n --color: var(--stzh-button-secondary-disabled-color, #{$colorGrey80});\n --background-color: var(--stzh-button-secondary-disabled-background-color, #{$colorGrey20});\n }\n\n &[disabled]:not([disabled=\"false\"])[variant=\"input\"],\n &[a11y-disabled]:not([a11y-disabled=\"false\"])[variant=\"input\"] {\n --color: var(--stzh-button-input-disabled-color, #{$colorGrey80});\n --background-color: var(--stzh-button-input-disabled-background-color, #{$colorGrey20});\n }\n\n &[disabled]:not([disabled=\"false\"])[variant=\"tertiary\"],\n &[disabled]:not([disabled=\"false\"])[variant=\"tertiary-plain\"],\n &[a11y-disabled]:not([a11y-disabled=\"false\"])[variant=\"tertiary\"],\n &[a11y-disabled]:not([a11y-disabled=\"false\"])[variant=\"tertiary-plain\"] {\n --color: var(--stzh-button-tertiary-disabled-color, #{$colorGrey70});\n --background-color: var(--stzh-button-tertiary-disabled-background-color, transparent);\n }\n}\n\n:host(:where([size=\"small\"])) {\n @include button--size-small;\n}\n\n:host(:where([size=\"tiny\"])) {\n @include button--size-tiny;\n}\n\n@each $breakpoint, $size in $breakpoints {\n @include mq($from: $breakpoint) {\n :host(:where([size-#{$breakpoint}=\"default\"])) {\n @include button--size-default;\n }\n\n :host(:where([size-#{$breakpoint}=\"small\"])) {\n @include button--size-small;\n }\n\n :host(:where([size-#{$breakpoint}=\"tiny\"])) {\n @include button--size-tiny;\n }\n }\n}\n\n@keyframes stzh-button-effect-cta {\n\t0%,\n\t20%,\n\t50%,\n\t80%,\n\t100% {\n\t\ttransform: translateX(0);\n\t}\n\n\t40% {\n\t\ttransform: translateX(-8px);\n\t}\n\n\t60% {\n\t\ttransform: translateX(-4px);\n\t}\n}\n\n.stzh-button {\n @include font('heavy');\n font-size: var(--font-size);\n line-height: var(--line-height);\n letter-spacing: var(--letter-spacing);\n position: relative;\n z-index: 0;\n overflow: visible;\n display: flex;\n align-items: center;\n justify-content: stretch;\n appearance: none;\n color: var(--color);\n padding-top: var(--padding-top);\n padding-bottom: var(--padding-bottom);\n padding-left: var(--padding-left);\n padding-right: var(--padding-right);\n background-color: var(--background-color);\n transition-duration: $baseTransitionAnimationSpeed;\n transition-property: color, background-color, border-color;\n border-style: solid;\n border-width: var(--border-width);\n border-color: var(--border-color);\n cursor: var(--cursor);\n text-decoration-line: none;\n width: 100%;\n height: 100%;\n border-radius: var(--border-radius);\n text-align: left;\n box-shadow: var(--box-shadow);\n\n &:hover {\n border-color: var(--hover-border-color);\n background-color: var(--hover-background-color);\n color: var(--hover-color);\n }\n\n &__vhidden {\n @include visuallyhidden;\n }\n\n &__inner {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-grow: 1;\n }\n\n &__icon-wrapper,\n &__toggle-icon-wrapper {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n &__icon-wrapper {\n --stzh-icon-size: var(--icon-size);\n width: auto;\n height: 1em;\n }\n\n &__toggle-icon-wrapper {\n width: var(--icon-size);\n height: var(--icon-size);\n }\n\n &__toggle-icon {\n position: relative;\n display: block;\n width: var(--icon-toggle-size);\n height: var(--icon-toggle-size);\n\n &::before,\n &::after {\n position: absolute;\n top: 50%;\n left: 50%;\n content: '';\n display: block;\n width: var(--icon-toggle-size);\n height: 2px;\n transition-property: transform, background-color;\n transition-duration: 500ms;\n transform-origin: top left;\n background-color: var(--icon-toggle-color);\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n\n &::before {\n transform: rotate(180deg) translate(-50%, -50%);\n }\n\n &::after {\n transform: rotate(90deg) translate(-50%, -50%);\n }\n }\n\n &__text {\n @include wordWrap;\n white-space: var(--white-space);\n text-align: center;\n }\n\n &__icon-wrapper:not(:empty) + &__text:not(:empty),\n &__text:not(:empty) + &__icon-wrapper:not(:empty) {\n margin-left: var(--icon-text-margin);\n }\n\n &__badge {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n }\n\n &__input {\n @include visuallyhiddenInput;\n }\n\n &__mark {\n @include radio__mark();\n width: 20px;\n height: 20px;\n margin-right: space('xsmall');\n border-color: currentColor;\n }\n\n &__check {\n @include radio__check();\n }\n\n /* Hover / Focus / Checked / Disabled of Radio Type */\n\n &__input:checked:hover ~ &__inner &__mark &__check,\n &__input:checked:focus ~ &__inner &__mark &__check {\n color: $colorSecondary60;\n }\n\n &:hover &__mark,\n &__input:focus:hover ~ &__inner &__mark,\n &__input:checked:hover ~ &__inner &__mark,\n &__input:checked:focus ~ &__inner &__mark {\n border-color: $colorSecondary60;\n }\n\n &__input:focus ~ &__inner &__mark,\n &__input:checked ~ &__inner &__mark {\n border-color: $colorPrimary;\n }\n\n &__input:checked ~ &__inner &__mark &__check {\n opacity: 1;\n }\n\n &--is-disabled &__input ~ &__inner &__mark &__check {\n color: $formDisabledColor;\n }\n\n &--is-disabled &__input ~ &__inner &__mark {\n border-color: $formDisabledBorderColor;\n }\n\n &--is-disabled &__mark {\n background-color: $formDisabledBackgroundColor;\n }\n\n /* Is expanded */\n\n &--is-expanded &__toggle-icon {\n &::before,\n &::after {\n transform: rotate(0) translate(-50%, -50%);\n }\n }\n\n /* Badge positioning variants */\n\n &--badge-position-button &__icon-wrapper {\n position: static;\n }\n\n &__badge,\n &--badge-position-button &__badge {\n top: calc(#{space('xsmall')} * -1);\n right: calc(#{space('xsmall')} * -1);\n }\n\n &--badge-position-icon#{&}--has-icon &__icon-wrapper {\n position: relative;\n }\n\n &--badge-position-icon#{&}--has-icon &__badge {\n top: calc(#{space('xsmall')} * -1);\n right: calc(#{space('small')} * -1);\n }\n\n &--badge-position-icon#{&}--has-icon#{&}--has-badge &__icon-wrapper:not(:empty) + &__text:not(:empty),\n &--badge-position-icon#{&}--has-icon#{&}--has-badge &__text:not(:empty) + &__icon-wrapper:not(:empty) {\n margin-left: var(--badge-icon-text-margin);\n }\n\n /* Variant if button only has icon */\n\n &--has-icon-only &__text {\n @include visuallyhidden;\n }\n\n /* Effect */\n\n &--effect-cta:hover &__icon-wrapper {\n\t\tanimation: stzh-button-effect-cta 1s;\n }\n\n /* Alignment variants */\n\n &--align-left &__inner {\n justify-content: flex-start;\n }\n\n &--align-right &__inner {\n justify-content: flex-end;\n }\n\n &--align-center &__inner {\n justify-content: center;\n }\n\n &--align-space-between &__inner {\n justify-content: space-between;\n }\n\n /* Disabled variant */\n\n &--is-disabled {\n cursor: not-allowed;\n }\n\n /* Default */\n\n &--default.has-focus {\n outline: var(--stzh-flyingfocus-color) solid 3px;\n }\n}\n","import {\n Component,\n Host,\n Fragment,\n Element,\n h,\n Prop,\n Event,\n EventEmitter,\n Listen\n} from \"@stencil/core\";\n\nimport {\n StzhButtonFocusEvent,\n StzhButtonBlurEvent,\n StzhButtonChangeEvent,\n StzhButtonSize,\n StzhButtonVariant,\n StzhBadgeType\n} from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\n/**\n * @slot - Slot for label/text content\n * @slot icon - Slot for icon element\n */\n@Component({\n tag: \"stzh-button\",\n styleUrl: \"stzh-button.scss\",\n scoped: true\n})\nexport class StzhButton {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Display a badge aligned to button or icons */\n @Prop() badge: string = \"\";\n\n /** Badge type */\n @Prop({ reflect: true }) badgeType: StzhBadgeType = \"default\";\n\n /** Badge position */\n @Prop({ reflect: true }) badgePosition: \"icon\" | \"button\" = \"button\";\n\n /** Whether badge should be displayed empty */\n @Prop({ reflect: true }) badgeEmpty: boolean = false;\n\n /** Whether the button is full width */\n @Prop({ reflect: true }) fullwidth: boolean = false;\n\n /** Whether the button is rounded */\n @Prop({ reflect: true }) rounded: boolean = false;\n\n /** Size variant */\n @Prop({ reflect: true }) size: StzhButtonSize = \"default\";\n\n /** Size variant (abobe small breakpoint) */\n @Prop({ reflect: true }) sizeSmall: StzhButtonSize;\n\n /** Size variant (abobe medium breakpoint) */\n @Prop({ reflect: true }) sizeMedium: StzhButtonSize;\n\n /** Size variant (abobe large breakpoint) */\n @Prop({ reflect: true }) sizeLarge: StzhButtonSize;\n\n /** Size variant (abobe ultra breakpoint) */\n @Prop({ reflect: true }) sizeUltra: StzhButtonSize;\n\n /** Text alignment */\n @Prop({ reflect: true }) textAlign: \"left\" | \"center\" | \"right\" | \"space-between\" | \"default\" = \"default\";\n\n /** Variant style */\n @Prop({ reflect: true }) variant: StzhButtonVariant = \"default\";\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string = \"\";\n\n /** Icon Position */\n @Prop({ reflect: true }) iconPosition: \"left\" | \"right\" = \"left\";\n\n /** Checked status (if type is radio) */\n @Prop({ mutable: true, reflect: true }) checked: boolean = false;\n\n /** Default checked (used by reset, if type is radio) */\n @Prop({ mutable: true }) defaultChecked: boolean;\n\n /** The name of the input element (if type is button or radio) */\n @Prop({ reflect: true }) name: string = \"\";\n\n /** The value of the input element (if type is button or radio) */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** `href` if the button should be used as link */\n @Prop() href: string = \"\";\n\n /** Rel (if href is used) */\n @Prop() rel: string;\n\n /** Target if the button is used as link (if `href` used) */\n @Prop() target: string = \"\";\n\n /** Download attribute of link (if `href` used) */\n @Prop() download: string;\n\n /** Type of the button */\n @Prop() type: \"button\" | \"submit\" | \"reset\" | \"radio\" = \"button\";\n\n /** Whether the button is disabled */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Whether the button is active */\n @Prop({ reflect: true }) active: boolean = false;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Effect/Animation used */\n @Prop() effect: \"default\" | \"cta\" = \"default\";\n\n /** Whether only an icon is used inside the button */\n @Prop({ reflect: true }) iconOnly: boolean = false;\n\n /** Whether padding left should be removed */\n @Prop({ reflect: true }) noPaddingLeft: boolean = false;\n\n /** Whether padding right should be removed */\n @Prop({ reflect: true }) noPaddingRight: boolean = false;\n\n /** Access key of button (usually a number e.g. 1) */\n @Prop() buttonAccesskey: string;\n\n /** ID of button element */\n @Prop() buttonId: string;\n\n /** Whether to show toggle icon (show minus when a11yExpanded=true, otherwise plus) */\n @Prop({ reflect: true }) showToggleIcon: boolean = false;\n\n /** Accessible label for screen readers to replace visible text */\n @Prop({ attribute: \"a11y-label\" }) a11yLabel: string;\n\n /** Id for element which describes the button (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n /** Aria expanded of link/button */\n @Prop({ reflect: true, attribute: \"a11y-expanded\" }) a11yExpanded: boolean;\n\n /** Aria disabled of link/button */\n @Prop({ reflect: true, attribute: \"a11y-disabled\" }) a11yDisabled: boolean;\n\n /** Aria controls of link/button */\n @Prop({ attribute: \"a11y-controls\" }) a11yControls: string;\n\n /** Aria current of link/button */\n @Prop({ attribute: \"a11y-current\" }) a11yCurrent: string;\n\n /** Tabindex of link/button */\n @Prop({ attribute: \"a11y-tabindex\" }) a11yTabindex: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link/button element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n @Element() element: HTMLStzhButtonElement;\n\n @Listen(\"reset\", { target: \"document\" })\n resetListener(event: Event) {\n if ((event.target as HTMLElement).contains(this.element)) {\n requestAnimationFrame(() => {\n this.handleReset();\n });\n }\n }\n\n /** Input focus event */\n @Event() stzhFocus: EventEmitter<StzhButtonFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhButtonBlurEvent>;\n\n /** Change event (only called if type is radio) */\n @Event() stzhChange: EventEmitter<StzhButtonChangeEvent>;\n\n private button: HTMLButtonElement | HTMLAnchorElement | HTMLLabelElement;\n private input: HTMLInputElement;\n private text: HTMLDivElement;\n private focusedByInput: boolean = false;\n\n private handleReset = async () => {\n this.checked = this.defaultChecked;\n }\n\n private onInput = (event: InputEvent) => {\n this.checked = this.input.checked;\n this.stzhChange.emit({\n component: \"stzh-button\",\n originalEvent: event,\n value: this.value,\n checked: this.checked\n });\n }\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.button.focus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n const focusEvent = new FocusEvent(\"focus\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-button\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n const blurEvent = new FocusEvent(\"blur\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-button\",\n originalEvent: event\n });\n }\n\n private onClick = (event: MouseEvent) => {\n if (this.disabled) {\n event.stopPropagation();\n event.preventDefault();\n }\n }\n\n private renderIcon(iconUsed: boolean): HTMLInputElement {\n return (\n <div class=\"stzh-button__icon-wrapper\">\n {this.icon &&\n <stzh-icon class=\"stzh-button__icon\" name={this.icon}></stzh-icon>\n }\n {!this.icon && this.showToggleIcon &&\n <div class=\"stzh-button__toggle-icon-wrapper\">\n <div class=\"stzh-button__toggle-icon\"></div>\n </div>\n }\n {!this.icon && !this.showToggleIcon &&\n <slot name=\"icon\"></slot>\n }\n {(this.badge || this.badgeEmpty) && this.badgePosition === \"icon\" && iconUsed &&\n <stzh-badge class=\"stzh-button__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </div>\n );\n }\n\n private renderContent(): HTMLDivElement {\n return (\n <div\n class=\"stzh-button__text\"\n ref={(el) => (this.text = el as HTMLDivElement)}\n >\n {this.rel && this.rel.includes('external') && <div class=\"stzh-button__vhidden\">{this.localization.$globals.externalLinkLabel}</div>}\n {this.download && <div class=\"stzh-button__vhidden\">{this.localization.$globals.downloadLinkLabel}</div>}\n {this.label ? this.label : <slot></slot>}\n </div>\n );\n }\n\n private renderInner(iconUsed: boolean): DocumentFragment {\n return (\n <Fragment>\n <div\n class=\"stzh-button__inner\"\n onClick={this.onClick}\n >\n {this.type === \"radio\" &&\n <div class=\"stzh-button__mark\">\n <div class=\"stzh-button__check\"></div>\n </div>\n }\n {this.iconPosition === \"left\" && this.renderIcon(iconUsed)}\n {this.renderContent()}\n {this.iconPosition === \"right\" && this.renderIcon(iconUsed)}\n </div>\n {(this.badge || this.badgeEmpty) && (this.badgePosition === \"button\" || !iconUsed) &&\n <stzh-badge\n class=\"stzh-button__badge\"\n label={this.badge}\n type={this.badgeType}\n onClick={this.onClick}\n ></stzh-badge>\n }\n </Fragment>\n );\n }\n\n async componentWillLoad() {\n this.defaultChecked = typeof this.defaultChecked === \"boolean\" ? this.defaultChecked : this.checked;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"button\");\n }\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.button?.setAttribute(\"s-object-id\", this.analyticsId || this.text.innerText);\n });\n }\n\n render() {\n const iconUsed: boolean = hasSlot(this.element, \"icon\") || !!this.icon;\n const classes = {\n \"stzh-button\": true,\n \"stzh-button--has-icon\": iconUsed,\n \"stzh-button--has-icon-only\": this.iconOnly,\n \"stzh-button--has-badge\": !!this.badge,\n \"stzh-button--is-rounded\": this.rounded,\n \"stzh-button--is-fullwidth\": this.fullwidth,\n \"stzh-button--is-disabled\": this.disabled || this.a11yDisabled,\n \"stzh-button--is-active\": this.active,\n \"stzh-button--is-expanded\": this.a11yExpanded,\n [`stzh-button--effect-${this.effect}`]: !!this.effect,\n [`stzh-button--badge-position-${this.badgePosition}`]: !!this.badgePosition,\n [`stzh-button--align-${this.textAlign}`]: !!this.textAlign,\n [`stzh-button--type-${this.type}`]: !!this.type,\n [`stzh-button--${this.variant}`]: !!this.variant\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n {this.href ?\n <a\n ref={(el) => (this.button = el as HTMLAnchorElement)}\n href={this.disabled ? null : this.href}\n rel={this.rel}\n download={this.download}\n target={this.target}\n class={classes}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n aria-current={this.a11yCurrent || null}\n id={this.buttonId}\n accessKey={this.buttonAccesskey}\n tabindex={this.a11yTabindex}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onClick={this.onClick}\n >\n {this.renderInner(iconUsed)}\n </a>\n :\n this.type === \"radio\" ?\n <label\n ref={(el) => (this.button = el as HTMLLabelElement)}\n class={classes}\n onClick={this.onClick}\n >\n <input\n ref={(el) => (this.input = el as HTMLInputElement)}\n type=\"radio\"\n class=\"stzh-button__input\"\n name={this.name}\n value={this.value}\n defaultChecked={this.defaultChecked}\n checked={this.checked}\n disabled={this.disabled}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n aria-current={this.a11yCurrent || null}\n id={this.buttonId}\n accessKey={this.buttonAccesskey}\n tabindex={this.a11yTabindex}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onClick={this.onClick}\n onInput={this.onInput}\n />\n {this.renderInner(iconUsed)}\n </label>\n :\n <button\n ref={(el) => (this.button = el as HTMLButtonElement)}\n class={classes}\n type={this.type}\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n aria-current={this.a11yCurrent || null}\n id={this.buttonId}\n accessKey={this.buttonAccesskey}\n tabindex={this.a11yTabindex}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onClick={this.onClick}\n >\n {this.renderInner(iconUsed)}\n </button>\n }\n </Host>\n );\n }\n}\n","/**\n * @prop --size: Icon size\n * @prop --color: Icon color\n *\n * @prop --stzh-icon-size: **Global**: Default icon size. [See available icon sizes here](/docs/tokens-icons--docs#sizes).\n * @prop --stzh-icon-color: **Global**: Icon color\n * @prop --stzh-icon-vertical-align: **Global**: Icon vertical alignment\n */\n\n:host {\n --size: #{iconSize()};\n --color: #{$iconColor};\n --vertical-align: #{$iconVerticalAlign};\n\n display: inline-flex;\n justify-content: center;\n align-items: center;\n color: var(--color);\n vertical-align: var(--vertical-align);\n width: var(--size);\n height: var(--size);\n}\n\n.stzh-icon {\n display: none;\n\n &__svg {\n width: var(--size);\n height: var(--size);\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Watch,\n State,\n Element\n} from \"@stencil/core\";\n\nlet iconCounter = 0;\n\n@Component({\n tag: \"stzh-icon\",\n styleUrl: \"stzh-icon.scss\",\n shadow: true\n})\nexport class StzhIcon {\n /**\n * Icon which should be displayed\n * See the [icon overview](stzh-components/assets/svgsprites/symbol/sprite.symbol.html) for a list of all available icons.\n */\n @Prop() name: string = \"\";\n\n /**\n * Hidden icon title for screenreader\n * (usually not needed when e.g. inside links or buttons that have text)\n */\n @Prop({ attribute: 'a11y-title' }) a11yTitle: string = \"\";\n\n @Element() element: HTMLStzhIconElement;\n\n @State() svgHtml: string = \"\";\n @State() iconDisplay: string = \"none\";\n\n @Watch(\"name\")\n async nameWatcher(name: string) {\n this.iconDisplay = \"none\";\n\n if (name) {\n const response = await fetch(`${window.stzhComponents.pathMedia}/icons/mono/${this.name}.svg`);\n\n if (response.status === 200) {\n const svgString = await response.text();\n\n const parser = new DOMParser();\n const svgDoc = parser.parseFromString(svgString, 'image/svg+xml');\n\n this.svgElement = svgDoc.documentElement as unknown as SVGElement;\n this.svgElement.classList.add('stzh-icon__svg');\n\n // for some obscure reason we need to delay showing the icon in safari,\n // otherwise the icon doesn't show up randomly\n // TODO: sometimes the icon still randomely disappears when clicked on page (check on newer safari if problems still occur)\n window.setTimeout(() => {\n this.iconDisplay = \"contents\";\n }, 0);\n\n this.a11yTitleWatcher(this.a11yTitle);\n } else {\n this.svgElement = null;\n this.svgHtml = '';\n }\n } else {\n this.svgElement = null;\n this.svgHtml = '';\n }\n }\n\n @Watch(\"a11yTitle\")\n a11yTitleWatcher(a11yTitle: string) {\n this.svgElement.setAttribute(\"aria-hidden\", a11yTitle ? \"false\" : \"true\");\n this.svgElement.setAttribute(\"focusable\", a11yTitle ? \"true\" : \"false\");\n this.svgElement.setAttribute(\"aria-labelledby\", a11yTitle ? `${this.iconId}-title` : null);\n\n let title = this.svgElement.querySelector('title');\n\n if (!title) {\n title = document.createElement('title');\n title.id = `${this.iconId}-title`;\n this.svgElement.appendChild(title);\n }\n\n title.innerHTML = a11yTitle;\n this.svgHtml = this.svgElement.outerHTML;\n }\n\n private svgElement: SVGElement | null;\n private iconId: string;\n\n async componentWillLoad() {\n this.iconId = `stzh-icon-${iconCounter++}`;\n this.nameWatcher(this.name);\n }\n\n render() {\n return (\n <Host>\n <div class=\"stzh-icon\" style={{ display: this.iconDisplay }} innerHTML={this.svgHtml}></div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"stzh-badge.stzh-button.stzh-icon.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,YAAY,GAAG,urEAAurE;;MCiB/rE,SAAS;;;iBAEI,EAAE;gBAGqB,SAAS;;EAExD,MAAM;IACJ,MAAM,OAAO,GAAG;MACd,YAAY,EAAE,IAAI;MAClB,CAAC,oBAAoB,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI;KAC/C,CAAC;IAEF,QACEA,QAACC,UAAI,IAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,IACxBD,iBAAK,KAAK,EAAE,OAAO,IAChB,IAAI,CAAC,KAAK,CACP,CACD,EACP;GACH;;;;ACrCH,MAAM,aAAa,GAAG,q0oBAAq0oB;;MCiC90oB,UAAU;;;;;;IA6Jb,mBAAc,GAAY,KAAK,CAAC;IAEhC,gBAAW,GAAG;MACpB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC;KACpC,CAAA;IAEO,YAAO,GAAG,CAAC,KAAiB;MAClC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;MAClC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QACnB,SAAS,EAAE,aAAa;QACxB,aAAa,EAAE,KAAK;QACpB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,OAAO,EAAE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AAC,KAAK,CAAC,CAAC;KACpC;IAED,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IAC5B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC;GAC1C;EAKD,MAAM,iBAAiB;IACrB,IAAI,CAAC,MAAM,GAAG,aAAa,WAAW,EAAE,EAAE,CAAC;IAC3C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;GAC7B;EAED,MAAM;IACJ,QACEA,QAACC,UAAI,QACHD,iBAAK,KAAK,EAAC,WAAW,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,GAAQ,CACvF,EACP;GACH;;;;;;;;;;;;;","names":["h","Host","Fragment","hasSlot"],"sources":["src/components/stzh-badge/stzh-badge.scss?tag=stzh-badge&encapsulation=scoped","src/components/stzh-badge/stzh-badge.tsx","src/components/stzh-button/stzh-button.scss?tag=stzh-button&encapsulation=scoped","src/components/stzh-button/stzh-button.tsx","src/components/stzh-icon/stzh-icon.scss?tag=stzh-icon&encapsulation=shadow","src/components/stzh-icon/stzh-icon.tsx"],"sourcesContent":[":host {\n --color: #{$colorWhite};\n --background-color: #{$colorGrey90};\n display: inline-flex;\n\n &[type=\"success\"] {\n --background-color: #{$colorSuccess70};\n }\n\n &[type=\"warning\"] {\n --color: #{$colorBlack};\n --background-color: #{$colorWarning60};\n }\n\n &[type=\"error\"] {\n --background-color: #{$colorError60};\n }\n\n &[type=\"info\"] {\n --background-color: #{$colorPrimary70};\n }\n\n &[filled][type=\"error\"] {\n --background-color: #{$colorError70};\n }\n}\n\n.stzh-badge {\n @include badge;\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n} from \"@stencil/core\";\n\nimport { StzhBadgeType } from \"../../index\";\n\n/**\n * @slot - Slot badge content\n */\n@Component({\n tag: \"stzh-badge\",\n styleUrl: \"stzh-badge.scss\",\n scoped: true\n})\nexport class StzhBadge {\n /** Text content of the badge */\n @Prop() label: string = \"\";\n\n /** Type */\n @Prop({ reflect: true }) type: StzhBadgeType = \"default\";\n\n render() {\n const classes = {\n \"stzh-badge\": true,\n [`stzh-badge--type-${this.type}`]: !!this.type\n };\n\n return (\n <Host filled={!!this.label}>\n <div class={classes}>\n {this.label}\n </div>\n </Host>\n );\n }\n}\n","/**\n * @prop --height: Height of button\n * @prop --padding-top: Padding top of button\n * @prop --padding-bottom: Padding bottom of button\n * @prop --padding-left: Padding left of button\n * @prop --padding-right: Padding right of button\n * @prop --border-radius: Border radius of button\n * @prop --color: Color of button\n * @prop --background-color: Background color of button\n * @prop --border-color: Border color of button\n * @prop --icon-size: Size of icon next to button\n * @prop --hover-color: Hover color of button\n * @prop --hover-background-color: Hover background color of button\n * @prop --hover-border-color: Hover border color of button\n * @prop --white-space: White space behaviour of button\n *\n * @prop --stzh-form-input-height: **Global**: Height of fields & buttons\n * @prop --stzh-form-input-small-height: **Global**: Height of fields & buttons when small variant is used\n * @prop --stzh-form-input-tiny-height: **Global**: Height of fields & buttons when tiny variant is used\n */\n\n@mixin button--size-default() {\n --height: #{$formInputHeight};\n --padding-top: calc(#{space('xsmall')} - var(--border-width));\n --padding-bottom: calc(#{space('xsmall')} - var(--border-width));\n --padding-left: #{space('xlarge')};\n --padding-right: #{space('xlarge')};\n --font-size: var(--stzh-font-centi-font-size);\n --line-height: var(--stzh-font-centi-text-line-height);\n --letter-spacing: normal;\n --icon-size: #{iconSize('medium')};\n --icon-toggle-size: 14.5px;\n\n &:where([icon-only]:not([icon-only=\"false\"])) {\n --icon-size: #{iconSize('large')};\n }\n}\n\n@mixin button--size-small() {\n --height: #{$formInputHeightSmall};\n --padding-left: #{space('large')};\n --padding-right: #{space('large')};\n --font-size: var(--stzh-font-milli-font-size);\n --line-height: var(--stzh-font-milli-text-line-height);\n --icon-size: #{iconSize('medium')};\n}\n\n@mixin button--size-tiny() {\n --height: #{$formInputHeightTiny};\n --padding-left: #{space('medium')};\n --padding-right: #{space('medium')};\n --padding-top: calc(#{space('xxsmall')} - var(--border-width));\n --padding-bottom: calc(#{space('xxsmall')} - var(--border-width));\n --font-size: var(--stzh-font-milli-font-size);\n --line-height: var(--stzh-font-milli-text-line-height);\n --icon-size: #{iconSize('medium')};\n}\n\n:host {\n @include button--size-default;\n --color: var(--stzh-button-color, #{$colorWhite});\n --background-color: var(--stzh-button-background-color, #{$colorPrimary70});\n --border-width: 0px;\n --border-color: transparent;\n --border-radius: 0px;\n --icon-text-margin: #{space('xsmall')};\n --icon-toggle-color: currentColor;\n --badge-icon-text-margin: calc(var(--icon-text-margin) + #{space('xxsmall')});\n --white-space: var(--stzh-button-white-space, normal);\n --box-shadow: none;\n --cursor: pointer;\n\n --hover-color: var(--stzh-button-hover-color, #{$colorWhite});\n --hover-background-color: var(--stzh-button-hover-background-color, #{$colorSecondary60});\n --hover-border-color: transparent;\n\n display: inline-grid;\n width: auto;\n min-width: var(--height);\n min-height: var(--height);\n pointer-events: var(--stzh-button-pointer-events, auto);\n\n @media print {\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n\n &[icon-only]:not([icon-only=\"false\"]) {\n --padding-top: 0;\n --padding-bottom: 0;\n --padding-left: 0;\n --padding-right: 0;\n\n width: var(--height);\n height: var(--height);\n }\n\n &[fullwidth]:not([fullwidth=\"false\"]) {\n width: 100%;\n display: grid;\n }\n\n &[rounded]:not([rounded=\"false\"]) {\n --border-radius: var(--height);\n }\n\n &[no-padding-left]:not([no-padding-left=\"false\"]) {\n --padding-left: 0px;\n }\n\n &[no-padding-right]:not([no-padding-right=\"false\"]) {\n --padding-right: 0px;\n }\n\n &[variant=\"secondary\"] {\n --color: var(--stzh-button-secondary-color, #{$colorPrimary70});\n --background-color: var(--stzh-button-secondary-background-color, #{$colorSecondary30});\n\n --hover-color: var(--stzh-button-secondary-hover-color, #{$colorPrimary80});\n --hover-background-color: var(--stzh-button-secondary-hover-background-color, #{$colorSecondary40});\n }\n\n &[variant=\"tertiary\"] {\n --color: var(--stzh-button-tertiary-color, #{$colorPrimary70});\n --background-color: var(--stzh-button-tertiary-background-color, transparent);\n\n --hover-color: var(--stzh-button-tertiary-hover-color, #{$colorPrimary80});\n --hover-background-color: var(--stzh-button-tertiary-hover-background-color, #{$colorSecondary20});\n }\n\n &[variant=\"tertiary-plain\"] {\n --color: var(--stzh-button-tertiary-color, #{$colorPrimary70});\n --background-color: transparent;\n\n --hover-color: var(--stzh-button-tertiary-hover-color, #{$colorPrimary80});\n --hover-background-color: var(--background-color);\n }\n\n &[active]:not([active=\"false\"]) {\n --color: var(--stzh-button-active-color, #{$colorWhite});\n --background-color: var(--stzh-button-active-background-color, #{$colorSecondary60});\n\n --hover-color: var(--stzh-button-active-hover-color, #{$colorWhite});\n --hover-background-color: var(--stzh-button-active-hover-background-color, #{$colorSecondary60});\n }\n\n &[disabled]:not([disabled=\"false\"]),\n &[a11y-disabled]:not([a11y-disabled=\"false\"]) {\n --color: var(--stzh-button-disabled-color, #{$colorWhite});\n --background-color: var(--stzh-button-disabled-background-color, #{$colorGrey70});\n\n --hover-color: var(--color);\n --hover-background-color: var(--background-color);\n }\n\n &[disabled]:not([disabled=\"false\"])[variant=\"secondary\"],\n &[a11y-disabled]:not([a11y-disabled=\"false\"])[variant=\"secondary\"] {\n --color: var(--stzh-button-secondary-disabled-color, #{$colorGrey80});\n --background-color: var(--stzh-button-secondary-disabled-background-color, #{$colorGrey20});\n }\n\n &[disabled]:not([disabled=\"false\"])[variant=\"input\"],\n &[a11y-disabled]:not([a11y-disabled=\"false\"])[variant=\"input\"] {\n --color: var(--stzh-button-input-disabled-color, #{$colorGrey80});\n --background-color: var(--stzh-button-input-disabled-background-color, #{$colorGrey20});\n }\n\n &[disabled]:not([disabled=\"false\"])[variant=\"tertiary\"],\n &[disabled]:not([disabled=\"false\"])[variant=\"tertiary-plain\"],\n &[a11y-disabled]:not([a11y-disabled=\"false\"])[variant=\"tertiary\"],\n &[a11y-disabled]:not([a11y-disabled=\"false\"])[variant=\"tertiary-plain\"] {\n --color: var(--stzh-button-tertiary-disabled-color, #{$colorGrey70});\n --background-color: var(--stzh-button-tertiary-disabled-background-color, transparent);\n }\n}\n\n:host(:where([size=\"small\"])) {\n @include button--size-small;\n}\n\n:host(:where([size=\"tiny\"])) {\n @include button--size-tiny;\n}\n\n@each $breakpoint, $size in $breakpoints {\n @include mq($from: $breakpoint) {\n :host(:where([size-#{$breakpoint}=\"default\"])) {\n @include button--size-default;\n }\n\n :host(:where([size-#{$breakpoint}=\"small\"])) {\n @include button--size-small;\n }\n\n :host(:where([size-#{$breakpoint}=\"tiny\"])) {\n @include button--size-tiny;\n }\n }\n}\n\n@keyframes stzh-button-effect-cta {\n\t0%,\n\t20%,\n\t50%,\n\t80%,\n\t100% {\n\t\ttransform: translateX(0);\n\t}\n\n\t40% {\n\t\ttransform: translateX(-8px);\n\t}\n\n\t60% {\n\t\ttransform: translateX(-4px);\n\t}\n}\n\n.stzh-button {\n @include font('heavy');\n font-size: var(--font-size);\n line-height: var(--line-height);\n letter-spacing: var(--letter-spacing);\n position: relative;\n z-index: 0;\n overflow: visible;\n display: flex;\n align-items: center;\n justify-content: stretch;\n appearance: none;\n color: var(--color);\n padding-top: var(--padding-top);\n padding-bottom: var(--padding-bottom);\n padding-left: var(--padding-left);\n padding-right: var(--padding-right);\n background-color: var(--background-color);\n transition-duration: $baseTransitionAnimationSpeed;\n transition-property: color, background-color, border-color;\n border-style: solid;\n border-width: var(--border-width);\n border-color: var(--border-color);\n cursor: var(--cursor);\n text-decoration-line: none;\n width: 100%;\n height: 100%;\n border-radius: var(--border-radius);\n text-align: left;\n box-shadow: var(--box-shadow);\n\n &:hover {\n border-color: var(--hover-border-color);\n background-color: var(--hover-background-color);\n color: var(--hover-color);\n }\n\n &__vhidden {\n @include visuallyhidden;\n }\n\n &__inner {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-grow: 1;\n }\n\n &__icon-wrapper,\n &__toggle-icon-wrapper {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n &__icon-wrapper {\n --stzh-icon-size: var(--icon-size);\n width: auto;\n height: 1em;\n }\n\n &__toggle-icon-wrapper {\n width: var(--icon-size);\n height: var(--icon-size);\n }\n\n &__toggle-icon {\n position: relative;\n display: block;\n width: var(--icon-toggle-size);\n height: var(--icon-toggle-size);\n\n &::before,\n &::after {\n position: absolute;\n top: 50%;\n left: 50%;\n content: '';\n display: block;\n width: var(--icon-toggle-size);\n height: 2px;\n transition-property: transform, background-color;\n transition-duration: 500ms;\n transform-origin: top left;\n background-color: var(--icon-toggle-color);\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n\n &::before {\n transform: rotate(180deg) translate(-50%, -50%);\n }\n\n &::after {\n transform: rotate(90deg) translate(-50%, -50%);\n }\n }\n\n &__text {\n @include wordWrap;\n white-space: var(--white-space);\n text-align: center;\n }\n\n &__icon-wrapper:not(:empty) + &__text:not(:empty),\n &__text:not(:empty) + &__icon-wrapper:not(:empty) {\n margin-left: var(--icon-text-margin);\n }\n\n &__badge {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n }\n\n &__input {\n @include visuallyhiddenInput;\n }\n\n &__mark {\n @include radio__mark();\n width: 20px;\n height: 20px;\n margin-right: space('xsmall');\n border-color: currentColor;\n }\n\n &__check {\n @include radio__check();\n }\n\n /* Hover / Focus / Checked / Disabled of Radio Type */\n\n &__input:checked:hover ~ &__inner &__mark &__check,\n &__input:checked:focus ~ &__inner &__mark &__check {\n color: $colorSecondary60;\n }\n\n &:hover &__mark,\n &__input:focus:hover ~ &__inner &__mark,\n &__input:checked:hover ~ &__inner &__mark,\n &__input:checked:focus ~ &__inner &__mark {\n border-color: $colorSecondary60;\n }\n\n &__input:focus ~ &__inner &__mark,\n &__input:checked ~ &__inner &__mark {\n border-color: $colorPrimary;\n }\n\n &__input:checked ~ &__inner &__mark &__check {\n opacity: 1;\n }\n\n &--is-disabled &__input ~ &__inner &__mark &__check {\n color: $formDisabledColor;\n }\n\n &--is-disabled &__input ~ &__inner &__mark {\n border-color: $formDisabledBorderColor;\n }\n\n &--is-disabled &__mark {\n background-color: $formDisabledBackgroundColor;\n }\n\n /* Is expanded */\n\n &--is-expanded &__toggle-icon {\n &::before,\n &::after {\n transform: rotate(0) translate(-50%, -50%);\n }\n }\n\n /* Badge positioning variants */\n\n &--badge-position-button &__icon-wrapper {\n position: static;\n }\n\n &__badge,\n &--badge-position-button &__badge {\n top: calc(#{space('xsmall')} * -1);\n right: calc(#{space('xsmall')} * -1);\n }\n\n &--badge-position-icon#{&}--has-icon &__icon-wrapper {\n position: relative;\n }\n\n &--badge-position-icon#{&}--has-icon &__badge {\n top: calc(#{space('xsmall')} * -1);\n right: calc(#{space('small')} * -1);\n }\n\n &--badge-position-icon#{&}--has-icon#{&}--has-badge &__icon-wrapper:not(:empty) + &__text:not(:empty),\n &--badge-position-icon#{&}--has-icon#{&}--has-badge &__text:not(:empty) + &__icon-wrapper:not(:empty) {\n margin-left: var(--badge-icon-text-margin);\n }\n\n /* Variant if button only has icon */\n\n &--has-icon-only &__text {\n @include visuallyhidden;\n }\n\n /* Effect */\n\n &--effect-cta:hover &__icon-wrapper {\n\t\tanimation: stzh-button-effect-cta 1s;\n }\n\n /* Alignment variants */\n\n &--align-left &__inner {\n justify-content: flex-start;\n }\n\n &--align-right &__inner {\n justify-content: flex-end;\n }\n\n &--align-center &__inner {\n justify-content: center;\n }\n\n &--align-space-between &__inner {\n justify-content: space-between;\n }\n\n /* Disabled variant */\n\n &--is-disabled {\n cursor: not-allowed;\n }\n\n /* Default */\n\n &--default.has-focus {\n outline: var(--stzh-flyingfocus-color) solid 3px;\n }\n}\n","import {\n Component,\n Host,\n Fragment,\n Element,\n h,\n Prop,\n Event,\n EventEmitter,\n Listen\n} from \"@stencil/core\";\n\nimport {\n StzhButtonFocusEvent,\n StzhButtonBlurEvent,\n StzhButtonChangeEvent,\n StzhButtonSize,\n StzhButtonVariant,\n StzhBadgeType\n} from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\n/**\n * @slot - Slot for label/text content\n * @slot icon - Slot for icon element\n */\n@Component({\n tag: \"stzh-button\",\n styleUrl: \"stzh-button.scss\",\n scoped: true\n})\nexport class StzhButton {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Display a badge aligned to button or icons */\n @Prop() badge: string = \"\";\n\n /** Badge type */\n @Prop({ reflect: true }) badgeType: StzhBadgeType = \"default\";\n\n /** Badge position */\n @Prop({ reflect: true }) badgePosition: \"icon\" | \"button\" = \"button\";\n\n /** Whether badge should be displayed empty */\n @Prop({ reflect: true }) badgeEmpty: boolean = false;\n\n /** Whether the button is full width */\n @Prop({ reflect: true }) fullwidth: boolean = false;\n\n /** Whether the button is rounded */\n @Prop({ reflect: true }) rounded: boolean = false;\n\n /** Size variant */\n @Prop({ reflect: true }) size: StzhButtonSize = \"default\";\n\n /** Size variant (abobe small breakpoint) */\n @Prop({ reflect: true }) sizeSmall: StzhButtonSize;\n\n /** Size variant (abobe medium breakpoint) */\n @Prop({ reflect: true }) sizeMedium: StzhButtonSize;\n\n /** Size variant (abobe large breakpoint) */\n @Prop({ reflect: true }) sizeLarge: StzhButtonSize;\n\n /** Size variant (abobe ultra breakpoint) */\n @Prop({ reflect: true }) sizeUltra: StzhButtonSize;\n\n /** Text alignment */\n @Prop({ reflect: true }) textAlign: \"left\" | \"center\" | \"right\" | \"space-between\" | \"default\" = \"default\";\n\n /** Variant style */\n @Prop({ reflect: true }) variant: StzhButtonVariant = \"default\";\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string = \"\";\n\n /** Icon Position */\n @Prop({ reflect: true }) iconPosition: \"left\" | \"right\" = \"left\";\n\n /** Checked status (if type is radio) */\n @Prop({ mutable: true, reflect: true }) checked: boolean = false;\n\n /** Default checked (used by reset, if type is radio) */\n @Prop({ mutable: true }) defaultChecked: boolean;\n\n /** The name of the input element (if type is button or radio) */\n @Prop({ reflect: true }) name: string = \"\";\n\n /** The value of the input element (if type is button or radio) */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** `href` if the button should be used as link */\n @Prop() href: string = \"\";\n\n /** Rel (if href is used) */\n @Prop() rel: string;\n\n /** Target if the button is used as link (if `href` used) */\n @Prop() target: string = \"\";\n\n /** Download attribute of link (if `href` used) */\n @Prop() download: string;\n\n /** Type of the button */\n @Prop() type: \"button\" | \"submit\" | \"reset\" | \"radio\" = \"button\";\n\n /** Whether the button is disabled */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Whether the button is active */\n @Prop({ reflect: true }) active: boolean = false;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Effect/Animation used */\n @Prop() effect: \"default\" | \"cta\" = \"default\";\n\n /** Whether only an icon is used inside the button */\n @Prop({ reflect: true }) iconOnly: boolean = false;\n\n /** Whether padding left should be removed */\n @Prop({ reflect: true }) noPaddingLeft: boolean = false;\n\n /** Whether padding right should be removed */\n @Prop({ reflect: true }) noPaddingRight: boolean = false;\n\n /** Access key of button (usually a number e.g. 1) */\n @Prop() buttonAccesskey: string;\n\n /** ID of button element */\n @Prop() buttonId: string;\n\n /** Whether to show toggle icon (show minus when a11yExpanded=true, otherwise plus) */\n @Prop({ reflect: true }) showToggleIcon: boolean = false;\n\n /** Accessible label for screen readers to replace visible text */\n @Prop({ attribute: \"a11y-label\" }) a11yLabel: string;\n\n /** Id for element which describes the button (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n /** Aria expanded of link/button */\n @Prop({ reflect: true, attribute: \"a11y-expanded\" }) a11yExpanded: boolean;\n\n /** Aria disabled of link/button */\n @Prop({ reflect: true, attribute: \"a11y-disabled\" }) a11yDisabled: boolean;\n\n /** Aria controls of link/button */\n @Prop({ attribute: \"a11y-controls\" }) a11yControls: string;\n\n /** Aria current of link/button */\n @Prop({ attribute: \"a11y-current\" }) a11yCurrent: string;\n\n /** Tabindex of link/button */\n @Prop({ attribute: \"a11y-tabindex\" }) a11yTabindex: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link/button element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n @Element() element: HTMLStzhButtonElement;\n\n @Listen(\"reset\", { target: \"document\" })\n resetListener(event: Event) {\n if ((event.target as HTMLElement).contains(this.element)) {\n requestAnimationFrame(() => {\n this.handleReset();\n });\n }\n }\n\n /** Input focus event */\n @Event() stzhFocus: EventEmitter<StzhButtonFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhButtonBlurEvent>;\n\n /** Change event (only called if type is radio) */\n @Event() stzhChange: EventEmitter<StzhButtonChangeEvent>;\n\n private button: HTMLButtonElement | HTMLAnchorElement | HTMLLabelElement;\n private input: HTMLInputElement;\n private text: HTMLDivElement;\n private focusedByInput: boolean = false;\n\n private handleReset = async () => {\n this.checked = this.defaultChecked;\n }\n\n private onInput = (event: InputEvent) => {\n this.checked = this.input.checked;\n this.stzhChange.emit({\n component: \"stzh-button\",\n originalEvent: event,\n value: this.value,\n checked: this.checked\n });\n }\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.button.focus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n const focusEvent = new FocusEvent(\"focus\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-button\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n const blurEvent = new FocusEvent(\"blur\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-button\",\n originalEvent: event\n });\n }\n\n private onClick = (event: MouseEvent) => {\n if (this.disabled) {\n event.stopPropagation();\n event.preventDefault();\n }\n }\n\n private renderIcon(iconUsed: boolean): HTMLInputElement {\n return (\n <div class=\"stzh-button__icon-wrapper\">\n {this.icon &&\n <stzh-icon class=\"stzh-button__icon\" name={this.icon}></stzh-icon>\n }\n {!this.icon && this.showToggleIcon &&\n <div class=\"stzh-button__toggle-icon-wrapper\">\n <div class=\"stzh-button__toggle-icon\"></div>\n </div>\n }\n {!this.icon && !this.showToggleIcon &&\n <slot name=\"icon\"></slot>\n }\n {(this.badge || this.badgeEmpty) && this.badgePosition === \"icon\" && iconUsed &&\n <stzh-badge class=\"stzh-button__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </div>\n );\n }\n\n private renderContent(): HTMLDivElement {\n return (\n <div\n class=\"stzh-button__text\"\n ref={(el) => (this.text = el as HTMLDivElement)}\n >\n {this.rel && this.rel.includes('external') && <div class=\"stzh-button__vhidden\">{this.localization.$globals.externalLinkLabel}</div>}\n {this.download && <div class=\"stzh-button__vhidden\">{this.localization.$globals.downloadLinkLabel}</div>}\n {this.label ? this.label : <slot></slot>}\n </div>\n );\n }\n\n private renderInner(iconUsed: boolean): DocumentFragment {\n return (\n <Fragment>\n <div\n class=\"stzh-button__inner\"\n onClick={this.onClick}\n >\n {this.type === \"radio\" &&\n <div class=\"stzh-button__mark\">\n <div class=\"stzh-button__check\"></div>\n </div>\n }\n {this.iconPosition === \"left\" && this.renderIcon(iconUsed)}\n {this.renderContent()}\n {this.iconPosition === \"right\" && this.renderIcon(iconUsed)}\n </div>\n {(this.badge || this.badgeEmpty) && (this.badgePosition === \"button\" || !iconUsed) &&\n <stzh-badge\n class=\"stzh-button__badge\"\n label={this.badge}\n type={this.badgeType}\n onClick={this.onClick}\n ></stzh-badge>\n }\n </Fragment>\n );\n }\n\n async componentWillLoad() {\n this.defaultChecked = typeof this.defaultChecked === \"boolean\" ? this.defaultChecked : this.checked;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"button\");\n }\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.button?.setAttribute(\"s-object-id\", this.analyticsId || this.text.innerText);\n });\n }\n\n render() {\n const iconUsed: boolean = hasSlot(this.element, \"icon\") || !!this.icon;\n const classes = {\n \"stzh-button\": true,\n \"stzh-button--has-icon\": iconUsed,\n \"stzh-button--has-icon-only\": this.iconOnly,\n \"stzh-button--has-badge\": !!this.badge,\n \"stzh-button--is-rounded\": this.rounded,\n \"stzh-button--is-fullwidth\": this.fullwidth,\n \"stzh-button--is-disabled\": this.disabled || this.a11yDisabled,\n \"stzh-button--is-active\": this.active,\n \"stzh-button--is-expanded\": this.a11yExpanded,\n [`stzh-button--effect-${this.effect}`]: !!this.effect,\n [`stzh-button--badge-position-${this.badgePosition}`]: !!this.badgePosition,\n [`stzh-button--align-${this.textAlign}`]: !!this.textAlign,\n [`stzh-button--type-${this.type}`]: !!this.type,\n [`stzh-button--${this.variant}`]: !!this.variant\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n {this.href ?\n <a\n ref={(el) => (this.button = el as HTMLAnchorElement)}\n href={this.disabled ? null : this.href}\n rel={this.rel}\n download={this.download}\n target={this.target}\n class={classes}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n aria-current={this.a11yCurrent || null}\n id={this.buttonId}\n accessKey={this.buttonAccesskey}\n tabindex={this.a11yTabindex}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onClick={this.onClick}\n >\n {this.renderInner(iconUsed)}\n </a>\n :\n this.type === \"radio\" ?\n <label\n ref={(el) => (this.button = el as HTMLLabelElement)}\n class={classes}\n onClick={this.onClick}\n >\n <input\n ref={(el) => (this.input = el as HTMLInputElement)}\n type=\"radio\"\n class=\"stzh-button__input\"\n name={this.name}\n value={this.value}\n defaultChecked={this.defaultChecked}\n checked={this.checked}\n disabled={this.disabled}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n aria-current={this.a11yCurrent || null}\n id={this.buttonId}\n accessKey={this.buttonAccesskey}\n tabindex={this.a11yTabindex}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onClick={this.onClick}\n onInput={this.onInput}\n />\n {this.renderInner(iconUsed)}\n </label>\n :\n <button\n ref={(el) => (this.button = el as HTMLButtonElement)}\n class={classes}\n type={this.type}\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n aria-current={this.a11yCurrent || null}\n id={this.buttonId}\n accessKey={this.buttonAccesskey}\n tabindex={this.a11yTabindex}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onClick={this.onClick}\n >\n {this.renderInner(iconUsed)}\n </button>\n }\n </Host>\n );\n }\n}\n","/**\n * @prop --size: Icon size\n * @prop --color: Icon color\n *\n * @prop --stzh-icon-size: **Global**: Default icon size. [See available icon sizes here](/docs/tokens-icons--docs#sizes).\n * @prop --stzh-icon-color: **Global**: Icon color\n * @prop --stzh-icon-vertical-align: **Global**: Icon vertical alignment\n */\n\n:host {\n --size: #{iconSize()};\n --color: #{$iconColor};\n --vertical-align: #{$iconVerticalAlign};\n\n display: inline-flex;\n justify-content: center;\n align-items: center;\n color: var(--color);\n vertical-align: var(--vertical-align);\n width: var(--size);\n height: var(--size);\n}\n\n.stzh-icon {\n display: none;\n\n &__svg {\n width: var(--size);\n height: var(--size);\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Watch,\n State,\n Element\n} from \"@stencil/core\";\n\nlet iconCounter = 0;\n\n@Component({\n tag: \"stzh-icon\",\n styleUrl: \"stzh-icon.scss\",\n shadow: true\n})\nexport class StzhIcon {\n /**\n * Icon which should be displayed\n * See the [icon overview](stzh-components/assets/svgsprites/symbol/sprite.symbol.html) for a list of all available icons.\n */\n @Prop() name: string = \"\";\n\n /**\n * Hidden icon title for screenreader\n * (usually not needed when e.g. inside links or buttons that have text)\n */\n @Prop({ attribute: 'a11y-title' }) a11yTitle: string = \"\";\n\n @Element() element: HTMLStzhIconElement;\n\n @State() svgHtml: string = \"\";\n @State() iconDisplay: string = \"none\";\n\n @Watch(\"name\")\n async nameWatcher(name: string) {\n this.iconDisplay = \"none\";\n\n if (name) {\n const response = await fetch(`${window.stzhComponents.pathMedia}/icons/mono/${this.name}.svg`);\n\n if (response.status === 200) {\n const svgString = await response.text();\n\n const parser = new DOMParser();\n const svgDoc = parser.parseFromString(svgString, 'image/svg+xml');\n\n this.svgElement = svgDoc.documentElement as unknown as SVGElement;\n this.svgElement.classList.add('stzh-icon__svg');\n\n // for some obscure reason we need to delay showing the icon in safari,\n // otherwise the icon doesn't show up randomly\n // TODO: sometimes the icon still randomely disappears when clicked on page (check on newer safari if problems still occur)\n window.setTimeout(() => {\n this.iconDisplay = \"contents\";\n }, 0);\n\n this.a11yTitleWatcher(this.a11yTitle);\n } else {\n this.svgElement = null;\n this.svgHtml = '';\n }\n } else {\n this.svgElement = null;\n this.svgHtml = '';\n }\n }\n\n @Watch(\"a11yTitle\")\n a11yTitleWatcher(a11yTitle: string) {\n this.svgElement.setAttribute(\"aria-hidden\", a11yTitle ? \"false\" : \"true\");\n this.svgElement.setAttribute(\"focusable\", a11yTitle ? \"true\" : \"false\");\n this.svgElement.setAttribute(\"aria-labelledby\", a11yTitle ? `${this.iconId}-title` : null);\n\n let title = this.svgElement.querySelector('title');\n\n if (!title) {\n title = document.createElement('title');\n title.id = `${this.iconId}-title`;\n this.svgElement.appendChild(title);\n }\n\n title.innerHTML = a11yTitle;\n this.svgHtml = this.svgElement.outerHTML;\n }\n\n private svgElement: SVGElement | null;\n private iconId: string;\n\n async componentWillLoad() {\n this.iconId = `stzh-icon-${iconCounter++}`;\n this.nameWatcher(this.name);\n }\n\n render() {\n return (\n <Host>\n <div class=\"stzh-icon\" style={{ display: this.iconDisplay }} innerHTML={this.svgHtml}></div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -53,7 +53,7 @@ const StzhCalendarMonth = ({ selectedDate, focusedDate, labelledById, localizati
|
|
|
53
53
|
index.h(StzhCalendarDay, { day: day, today: today, focusedDay: focusedDate, isSelected: dateUtils.isEqual(day, selectedDate), disabled: isDateDisabled(day), inRange: dateUtils.inRange(day, min, max), onDaySelect: onDateSelect, dateFormatter: dateFormatter, onKeyboardNavigation: onKeyboardNavigation, focusedDayRef: focusedDayRef }))))))))));
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
const stzhCalendarCss = ".sc-stzh-calendar-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-calendar-h{display:none}.sc-stzh-calendar-h::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-calendar-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-calendar-h *.sc-stzh-calendar,.sc-stzh-calendar-h *.sc-stzh-calendar::before,.sc-stzh-calendar-h *.sc-stzh-calendar::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-calendar-h .has-focus.sc-stzh-calendar{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-calendar-h .stzh-fylingfocus-focused.sc-stzh-calendar{outline-style:none !important}.sc-stzh-calendar-h .stzh-fylingfocus-focused.sc-stzh-calendar::-moz-focus-inner{border:0 !important}.sc-stzh-calendar-h{--padding-top:var(--stzh-space-small);--padding-bottom:var(--stzh-space-small);--padding-left:var(--stzh-space-xsmall);--padding-right:var(--stzh-space-xsmall)
|
|
56
|
+
const stzhCalendarCss = ".sc-stzh-calendar-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-calendar-h{display:none}.sc-stzh-calendar-h::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-calendar-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-calendar-h *.sc-stzh-calendar,.sc-stzh-calendar-h *.sc-stzh-calendar::before,.sc-stzh-calendar-h *.sc-stzh-calendar::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-calendar-h .has-focus.sc-stzh-calendar{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-calendar-h .stzh-fylingfocus-focused.sc-stzh-calendar{outline-style:none !important}.sc-stzh-calendar-h .stzh-fylingfocus-focused.sc-stzh-calendar::-moz-focus-inner{border:0 !important}.sc-stzh-calendar-h{--padding-top:var(--stzh-space-small);--padding-bottom:var(--stzh-space-small);--padding-left:var(--stzh-space-xsmall);--padding-right:var(--stzh-space-xsmall);width:var(--stzh-calendar-width)}.stzh-calendar.sc-stzh-calendar{display:flex;position:relative;text-align:left;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden;overflow:clip;padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);padding-left:var(--padding-left);padding-right:var(--padding-right)}.stzh-calendar__wrapper.sc-stzh-calendar{width:100%}.stzh-calendar__table.sc-stzh-calendar{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);border-collapse:collapse;border-spacing:0;text-align:center;width:100%}.stzh-calendar__table-header.sc-stzh-calendar,.stzh-calendar__cell.sc-stzh-calendar{padding:var(--stzh-space-xxxsmall)}.stzh-calendar__table-header.sc-stzh-calendar:first-child,.stzh-calendar__cell.sc-stzh-calendar:first-child{padding-left:0}.stzh-calendar__table-header.sc-stzh-calendar:last-child,.stzh-calendar__cell.sc-stzh-calendar:last-child{padding-right:0}.stzh-calendar__row.sc-stzh-calendar:last-child .stzh-calendar__cell.sc-stzh-calendar{padding-bottom:0}.stzh-calendar__table-header.sc-stzh-calendar{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);-webkit-text-decoration-line:none;text-decoration-line:none;padding-top:0;padding-bottom:0;width:2.75rem;height:2.5rem}.stzh-calendar__cell.sc-stzh-calendar{text-align:center}.stzh-calendar__day.sc-stzh-calendar{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;cursor:pointer;display:inline-block;font-variant-numeric:tabular-nums;width:2.5rem;height:2.5rem;text-align:center;vertical-align:middle;transition-property:color, background-color;transition-duration:var(--stzh-base-transition-animation-speed)}.stzh-calendar__day.is-today.sc-stzh-calendar{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);color:var(--stzh-color-primary70)}.stzh-calendar__day.sc-stzh-calendar:hover{background:var(--stzh-color-grey20)}.stzh-calendar__day[aria-pressed=true].sc-stzh-calendar{background:var(--stzh-color-secondary30);color:var(--stzh-color-primary70)}.stzh-calendar__day.sc-stzh-calendar:active{background:var(--stzh-color-secondary30);color:var(--stzh-color-primary70)}.stzh-calendar__day.sc-stzh-calendar:not(.is-month),.stzh-calendar__day[aria-disabled=true].sc-stzh-calendar{background:transparent;color:var(--stzh-color-grey60);cursor:default}.stzh-calendar__day.is-disabled.sc-stzh-calendar{-webkit-text-decoration-line:line-through;text-decoration-line:line-through}.stzh-calendar__day.is-outside.sc-stzh-calendar{color:var(--stzh-color-grey60);background:var(--stzh-color-grey20);cursor:default;pointer-events:none;-webkit-text-decoration-line:none;text-decoration-line:none}.stzh-calendar__header.sc-stzh-calendar{align-items:center;display:flex;justify-content:space-between;width:100%}.stzh-calendar__nav.sc-stzh-calendar{display:flex;align-items:center}.stzh-calendar__nav.is-dropdowns.sc-stzh-calendar{gap:calc(var(--stzh-space-xsmall) + var(--stzh-space-small));margin-left:var(--stzh-space-small)}.stzh-calendar.sc-stzh-calendar stzh-dropdown.stzh-calendar__dropdown.sc-stzh-calendar{--popover-width:100%;--popover-height:calc(100% - var(--stzh-form-input-small-height) - var(--padding-top));--popover-max-height:initial;position:static}.stzh-calendar__select-wrapper.sc-stzh-calendar{display:inline-flex;position:relative}.stzh-calendar__select-wrapper.sc-stzh-calendar span.sc-stzh-calendar{margin-right:0px}.stzh-calendar__select.sc-stzh-calendar{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);cursor:pointer;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%;z-index:2;border-radius:var(--stzh-form-input-border-radius)}.stzh-calendar__select-label.sc-stzh-calendar{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;align-items:center;border-radius:var(--stzh-form-input-border-radius);color:var(--stzh-color-primary70);display:flex;gap:var(--stzh-space-xsmall);padding:0;padding-left:var(--stzh-space-small);padding-right:var(--stzh-space-xsmall);position:relative;width:100%;min-height:2.5rem;z-index:1}.stzh-calendar__select-icon.sc-stzh-calendar{--size:var(--stzh-icon-size-xsmall)}.stzh-calendar__vhidden.sc-stzh-calendar{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}";
|
|
57
57
|
|
|
58
58
|
function range(from, to) {
|
|
59
59
|
var result = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"stzh-calendar.entry.cjs.js","mappings":";;;;;;;AAgBO,MAAM,eAAe,GAA8C,CAAC,EACzE,UAAU,EACV,KAAK,EACL,GAAG,EACH,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,QAAQ,EACR,OAAO,EACP,UAAU,EACV,aAAa,GACd;EACC,MAAM,OAAO,GAAGA,iBAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;EACnC,MAAM,OAAO,GAAGC,sBAAY,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;EAC7C,MAAM,SAAS,GAAGD,iBAAO,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;EAC1C,MAAM,cAAc,GAAG,CAAC,OAAO,CAAA;EAE/B,SAAS,WAAW,CAAC,CAAC;IACpB,WAAW,CAAC,CAAC,EAAE,GAAG,C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B,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,aAAa,EAAE,IAAI,CAAC,qBAAqB,EACzC,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,OAAO,EACZ,cAAc,EAAE,IAAI,CAAC,cAAc,GACnC,CACE,CACF,CACD,EACR;GACF;;;;;;;;;;;","names":["isEqual","isEqualMonth","h","getViewOfMonth","inRange","parseISODate","DaysOfWeek","clamp","printISODate","addDays","startOfWeek","endOfWeek","setMonth","startOfMonth","endOfMonth","setYear","Host"],"sources":["src/components/stzh-calendar/stzh-calendar-day.tsx","src/components/stzh-calendar/stzh-calendar-month.tsx","src/components/stzh-calendar/stzh-calendar.scss?tag=stzh-calendar&encapsulation=scoped","src/components/stzh-calendar/stzh-calendar.tsx"],"sourcesContent":["import { h, FunctionalComponent } from \"@stencil/core\"\nimport { isEqual, isEqualMonth } from \"../../utils/date-utils\"\n\nexport type StzhCalendarDayProps = {\n focusedDay: Date\n today: Date\n day: Date\n disabled: boolean\n inRange: boolean\n isSelected: boolean\n dateFormatter: Intl.DateTimeFormat\n onDaySelect: (event: MouseEvent, day: Date) => void\n onKeyboardNavigation: (event: KeyboardEvent) => void\n focusedDayRef?: (element: HTMLElement) => void\n}\n\nexport const StzhCalendarDay: FunctionalComponent<StzhCalendarDayProps> = ({\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n focusedDayRef,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}) => {\n const isToday = isEqual(day, today)\n const isMonth = isEqualMonth(day, focusedDay)\n const isFocused = isEqual(day, focusedDay)\n const isOutsideRange = !inRange\n\n function handleClick(e) {\n onDaySelect(e, day)\n }\n\n return (\n <button\n class={{\n \"stzh-calendar__day\": true,\n \"is-outside\": isOutsideRange,\n \"is-today\": isToday,\n \"is-month\": isMonth,\n \"is-disabled\": disabled,\n }}\n tabIndex={isFocused ? 0 : -1}\n onClick={handleClick}\n onKeyDown={onKeyboardNavigation}\n aria-disabled={disabled ? \"true\" : undefined}\n disabled={isOutsideRange}\n type=\"button\"\n aria-pressed={isSelected ? \"true\" : \"false\"}\n aria-current={isToday ? \"date\" : undefined}\n s-object-id={dateFormatter.format(day)}\n ref={el => {\n if (isFocused && el && focusedDayRef) {\n focusedDayRef(el)\n }\n }}\n >\n <span aria-hidden=\"true\">{day.getDate()}</span>\n <span class=\"stzh-calendar__vhidden\">{dateFormatter.format(day)}</span>\n </button>\n )\n}\n","import { h, FunctionalComponent } from \"@stencil/core\"\nimport { getViewOfMonth, inRange, DaysOfWeek, isEqual } from \"../../utils/date-utils\"\n\nimport { StzhCalendarLocalizedText } from \"./stzh-calendar.localization\"\nimport { StzhCalendarDay, StzhCalendarDayProps } from \"./stzh-calendar-day\"\nimport { StzhCalendarDateDisabledPredicate } from \"../../index\";\n\nfunction chunk<T>(array: T[], chunkSize: number): T[][] {\n const result = []\n\n for (let i = 0; i < array.length; i += chunkSize) {\n result.push(array.slice(i, i + chunkSize))\n }\n\n return result\n}\n\nfunction mapWithOffset<T, U>(array: T[], startingOffset: number, mapFn: (item: T) => U): U[] {\n return array.map((_, i) => {\n const adjustedIndex = (i + startingOffset) % array.length\n return mapFn(array[adjustedIndex])\n })\n}\n\ntype StzhCalendarMonthProps = {\n selectedDate: Date\n focusedDate: Date\n labelledById: string\n localization: StzhCalendarLocalizedText\n firstDayOfWeek: DaysOfWeek\n min?: Date\n max?: Date\n dateFormatter: Intl.DateTimeFormat\n isDateDisabled: StzhCalendarDateDisabledPredicate\n onDateSelect: StzhCalendarDayProps[\"onDaySelect\"]\n onKeyboardNavigation: StzhCalendarDayProps[\"onKeyboardNavigation\"]\n focusedDayRef: (element: HTMLElement) => void\n}\n\nexport const StzhCalendarMonth: FunctionalComponent<StzhCalendarMonthProps> = ({\n selectedDate,\n focusedDate,\n labelledById,\n localization,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n focusedDayRef,\n}) => {\n const today = new Date()\n const days = getViewOfMonth(focusedDate, firstDayOfWeek)\n\n return (\n <table class=\"stzh-calendar__table\" aria-labelledby={labelledById}>\n <thead>\n <tr>\n {mapWithOffset(localization.$globals.dayNames, firstDayOfWeek, dayName => (\n <th class=\"stzh-calendar__table-header\" scope=\"col\">\n <span aria-hidden=\"true\">{dayName.substring(0, 2)}</span>\n <span class=\"stzh-calendar__vhidden\">{dayName}</span>\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {chunk(days, 7).map(week => (\n <tr class=\"stzh-calendar__row\">\n {week.map(day => (\n <td class=\"stzh-calendar__cell\">\n <StzhCalendarDay\n day={day}\n today={today}\n focusedDay={focusedDate}\n isSelected={isEqual(day, selectedDate)}\n disabled={isDateDisabled(day)}\n inRange={inRange(day, min, max)}\n onDaySelect={onDateSelect}\n dateFormatter={dateFormatter}\n onKeyboardNavigation={onKeyboardNavigation}\n focusedDayRef={focusedDayRef}\n />\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n )\n}\n","/**\n * @prop --background: Background color of calendar\n * @prop --padding-top: Padding top of calendar\n * @prop --padding-bottom: Padding bottom color of calendar\n * @prop --padding-left: Padding left color of calendar\n * @prop --padding-right: Padding right color of calendar\n * @prop --background-color: Background color of calendar\n */\n\n:host {\n --padding-top: #{space('small')};\n --padding-bottom: #{space('small')};\n --padding-left: #{space('xsmall')};\n --padding-right: #{space('xsmall')};\n --background-color: #{$colorGrey10};\n\n width: #{$calendarWidth};\n}\n\n.stzh-calendar {\n display: flex;\n position: relative;\n text-align: left;\n touch-action: pan-y;\n user-select: none;\n overflow: hidden;\n overflow: clip;\n padding-top: var(--padding-top);\n padding-bottom: var(--padding-bottom);\n padding-left: var(--padding-left);\n padding-right: var(--padding-right);\n background-color: var(--background-color);\n\n &__wrapper {\n width: 100%;\n }\n\n &__table {\n @include font;\n @include fontSize('milli');\n border-collapse: collapse;\n border-spacing: 0;\n text-align: center;\n width: 100%;\n }\n\n &__table-header,\n &__cell {\n padding: space('xxxsmall');\n\n &:first-child {\n padding-left: 0;\n }\n\n &:last-child {\n padding-right: 0;\n }\n }\n\n &__row:last-child &__cell {\n padding-bottom: 0;\n }\n\n &__table-header {\n @include font;\n @include fontSize('nano');\n text-decoration-line: none;\n padding-top: 0;\n padding-bottom: 0;\n width: 44px;\n height: 40px;\n }\n\n &__cell {\n text-align: center;\n }\n\n &__day {\n @include font;\n @include fontSize('milli');\n appearance: none;\n background: transparent;\n border: 0;\n cursor: pointer;\n display: inline-block;\n font-variant-numeric: tabular-nums;\n width: 40px;\n height: 40px;\n text-align: center;\n vertical-align: middle;\n transition-property: color, background-color;\n transition-duration: $baseTransitionAnimationSpeed;\n // position: relative;\n // padding: 0 0 1px;\n // z-index: 1;\n\n // &::before {\n // z-index: -1;\n // bottom: 0;\n // content: \"\";\n // left: 0;\n // position: absolute;\n // right: 0;\n // top: 0;\n // }\n\n &.is-today {\n @include font('heavy');\n color: $colorPrimary70;\n // box-shadow: 0 0 0 1px $colorPrimary;\n // position: relative;\n // z-index: 200;\n }\n\n &:hover {\n background: $colorGrey20;\n }\n\n // &:hover::before {\n // background: $colorGrey20;\n // }\n\n // &:focus,\n &[aria-pressed=\"true\"] {\n background: $colorSecondary30;\n // box-shadow: none;\n color: $colorPrimary70;\n }\n\n &:active {\n background: $colorSecondary30;\n // box-shadow: 0 0 5px $colorPrimary;\n color: $colorPrimary70;\n // z-index: 200;\n }\n\n // &:focus {\n // z-index: 200;\n // }\n\n // &:not(.is-month) {\n // box-shadow: none;\n // }\n\n &:not(.is-month),\n &[aria-disabled=\"true\"] {\n background: transparent;\n color: $colorGrey60;\n cursor: default;\n }\n\n // &[aria-disabled=\"true\"] {\n // &.is-today {\n // box-shadow: 0 0 0 1px $colorGrey20;\n\n // &:focus {\n // box-shadow: 0 0 5px $colorPrimary;\n // }\n // }\n\n // &::before {\n // display: none;\n // }\n // }\n\n &.is-disabled {\n text-decoration-line: line-through;\n }\n\n &.is-outside {\n color: $colorGrey60;\n background: $colorGrey20;\n // box-shadow: none;\n cursor: default;\n pointer-events: none;\n text-decoration-line: none;\n\n // &::before {\n // display: none;\n // }\n }\n }\n\n &__header {\n align-items: center;\n display: flex;\n justify-content: space-between;\n width: 100%;\n }\n\n &__nav {\n display: flex;\n align-items: center;\n\n &.is-dropdowns {\n gap: calc(#{space('xsmall')} + #{space('small')});\n margin-left: space('small');\n }\n }\n\n // &__prev,\n // &__next {\n // align-items: center;\n // appearance: none;\n // font-family: inherit;\n // background: transparent;\n // border-radius: 50%;\n // color: $colorPrimary70;\n // cursor: pointer;\n // display: inline-flex;\n // flex-shrink: 0;\n // justify-content: center;\n // margin-left: space('xsmall');\n // padding: 0;\n // transition: background-color 300ms ease;\n // height: 32px;\n // width: 32px;\n\n // &:disabled {\n // cursor: default;\n // color: $colorGrey60;\n // }\n // }\n\n stzh-dropdown#{&}__dropdown {\n --popover-width: 100%;\n --popover-height: calc(100% - #{$formInputHeightSmall} - var(--padding-top));\n --popover-max-height: initial;\n position: static;\n }\n\n &__select-wrapper {\n display: inline-flex;\n position: relative;\n\n span {\n margin-right: 0px;\n }\n }\n\n &__select {\n @include fontSize('milli');\n cursor: pointer;\n height: 100%;\n left: 0;\n opacity: 0;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: 2;\n border-radius: $formInputBorderRadius;\n }\n\n &__select-label {\n @include fontSize('milli');\n appearance: none;\n border: none;\n align-items: center;\n border-radius: $formInputBorderRadius;\n color: $colorPrimary70;\n display: flex;\n gap: space('xsmall');\n padding: 0;\n padding-left: space('small');\n padding-right: space('xsmall');\n\n position: relative;\n width: 100%;\n min-height: 40px;\n z-index: 1;\n }\n\n &__select-icon {\n --size: #{iconSize('xsmall')};\n }\n\n &__vhidden {\n @include visuallyhidden;\n }\n}\n","import {\n Component,\n ComponentInterface,\n Host,\n Prop,\n Element,\n h,\n Event,\n EventEmitter,\n State,\n Method,\n Watch\n} from \"@stencil/core\"\n\nimport {\n addDays,\n startOfWeek,\n endOfWeek,\n setMonth,\n setYear,\n clamp,\n inRange,\n endOfMonth,\n startOfMonth,\n printISODate,\n parseISODate,\n DaysOfWeek,\n} from \"../../utils/date-utils\";\n\nimport { StzhCalendarChangeEvent, StzhDropdownChangeEvent } from \"../../index\";\nimport { StzhCalendarDateDisabledPredicate } from \"../../index\";\n\nimport { StzhCalendarMonth } from \"./stzh-calendar-month\";\nimport { StzhCalendarLocalizedText } from \"./stzh-calendar.localization\";\n\nfunction range(from: number, to: number) {\n var result: number[] = []\n for (var i = from; i <= to; i++) {\n result.push(i)\n }\n return result\n}\n\nconst keyCode = {\n TAB: 9,\n ESC: 27,\n SPACE: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n}\n\nlet calendarCounter = 0;\n\n@Component({\n tag: \"stzh-calendar\",\n styleUrl: \"stzh-calendar.scss\",\n scoped: true\n})\nexport class StzhCalendar implements ComponentInterface {\n /** Date value. Must be in IS0-8601 format: YYYY-MM-DD. */\n @Prop({ mutable: true }) value: string = \"\"\n\n /**\n * Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\n * This setting can be used alone or together with the max property.\n */\n @Prop() min: string = \"\"\n\n /**\n * Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\n * This setting can be used alone or together with the min property.\n */\n @Prop() max: string = \"\"\n\n /**\n * Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\n * Default is Monday.\n */\n @Prop() firstDayOfWeek: DaysOfWeek = DaysOfWeek.Monday\n\n /** Day names, month names, etc, used for localization. */\n @Prop() localization: StzhCalendarLocalizedText;\n\n /**\n * Controls which days are disabled and therefore disallowed.\n * For example, this can be used to disallow selection of weekends.\n */\n @Prop() isDateDisabled: StzhCalendarDateDisabledPredicate = () => false\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the previous month button element.\n * Default value will be taken from translations.\n */\n @Prop() prevMonthAnalyticsId: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the next month button element.\n * Default value will be taken from translations.\n */\n @Prop() nextMonthAnalyticsId: string;\n\n @State() activeFocus = false\n @State() focusedDay = new Date()\n\n /** Event emitted when a date is selected. */\n @Event() stzhChange: EventEmitter<StzhCalendarChangeEvent>\n\n @Watch(\"localization\")\n createDateFormatters() {\n if (this.localization) {\n this.dateFormatShort = new Intl.DateTimeFormat(this.localization.$locale, { day: \"numeric\", month: \"long\" })\n }\n }\n\n @Watch(\"value\")\n valueWatcher(newValue: string) {\n if (newValue) {\n this.setFocusedDay(parseISODate(this.value));\n } else {\n this.setFocusedDay(new Date());\n }\n }\n\n /** Set focused day element by a JS Date object */\n @Method()\n async setFocusedDay(day: Date) {\n this.focusedDay = clamp(day, parseISODate(this.min), parseISODate(this.max))\n }\n\n /** Set value by a JS Date object */\n @Method()\n async setDate(date: Date) {\n this.value = printISODate(date)\n }\n\n @Element() element: HTMLStzhCalendarElement\n\n // private monthSelectId: string\n // private yearSelectId: string\n private dialogLabelId: string\n\n // private focusedDayNode: HTMLButtonElement\n\n private initialTouchX: number = null\n private initialTouchY: number = null\n\n /**\n * To format dates exclusively for the benefit of screen readers.\n *\n * We prefer DateTimeFormat over date.toLocaleDateString, as the former has\n * better performance when formatting large number of dates. See:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString#Performance\n */\n private dateFormatShort: Intl.DateTimeFormat\n\n private enableActiveFocus = () => {\n this.activeFocus = true\n }\n\n private disableActiveFocus = () => {\n this.activeFocus = false\n }\n\n private addDays(days: number) {\n this.setFocusedDay(addDays(this.focusedDay, days))\n }\n\n private addMonths(months: number) {\n this.setMonth(this.focusedDay.getMonth() + months)\n }\n\n private addYears(years: number) {\n this.setYear(this.focusedDay.getFullYear() + years)\n }\n\n private startOfWeek() {\n this.setFocusedDay(startOfWeek(this.focusedDay, this.firstDayOfWeek))\n }\n\n private endOfWeek() {\n this.setFocusedDay(endOfWeek(this.focusedDay, this.firstDayOfWeek))\n }\n\n private setMonth(month: number) {\n const min = setMonth(startOfMonth(this.focusedDay), month)\n const max = endOfMonth(min)\n const date = setMonth(this.focusedDay, month)\n\n this.setFocusedDay(clamp(date, min, max))\n }\n\n private setYear(year: number) {\n const min = setYear(startOfMonth(this.focusedDay), year)\n const max = endOfMonth(min)\n const date = setYear(this.focusedDay, year)\n\n this.setFocusedDay(clamp(date, min, max))\n }\n\n private handleTouchStart = (event: TouchEvent) => {\n const touch = event.changedTouches[0]\n this.initialTouchX = touch.pageX\n this.initialTouchY = touch.pageY\n }\n\n // private handleTouchMove = (event: TouchEvent) => {\n // event.preventDefault()\n // }\n\n private handleTouchEnd = (event: TouchEvent) => {\n const touch = event.changedTouches[0]\n const distX = touch.pageX - this.initialTouchX // get horizontal dist traveled\n const distY = touch.pageY - this.initialTouchY // get vertical dist traveled\n const threshold = 70\n\n const isHorizontalSwipe = Math.abs(distX) >= threshold && Math.abs(distY) <= threshold\n\n if (isHorizontalSwipe) {\n this.addMonths(distX < 0 ? 1 : -1)\n }\n\n this.initialTouchY = null\n this.initialTouchX = null\n }\n\n private handleNextMonthClick = (event: MouseEvent) => {\n event.preventDefault()\n this.addMonths(1)\n }\n\n private handlePreviousMonthClick = (event: MouseEvent) => {\n event.preventDefault()\n this.addMonths(-1)\n }\n\n private handleKeyboardNavigation = (event: KeyboardEvent) => {\n var handled = true\n\n switch (event.keyCode) {\n case keyCode.RIGHT:\n this.addDays(1)\n break\n case keyCode.LEFT:\n this.addDays(-1)\n break\n case keyCode.DOWN:\n this.addDays(7)\n break\n case keyCode.UP:\n this.addDays(-7)\n break\n case keyCode.PAGE_UP:\n if (event.shiftKey) {\n this.addYears(-1)\n } else {\n this.addMonths(-1)\n }\n break\n case keyCode.PAGE_DOWN:\n if (event.shiftKey) {\n this.addYears(1)\n } else {\n this.addMonths(1)\n }\n break\n case keyCode.HOME:\n this.startOfWeek()\n break\n case keyCode.END:\n this.endOfWeek()\n break\n default:\n handled = false\n }\n\n if (handled) {\n event.preventDefault()\n this.enableActiveFocus()\n }\n }\n\n private handleDaySelect = (_event: MouseEvent, day: Date) => {\n const isInRange = inRange(day, parseISODate(this.min), parseISODate(this.max))\n const isAllowed = !this.isDateDisabled(day)\n\n if (isInRange && isAllowed) {\n this.setDate(day)\n\n this.stzhChange.emit({\n component: \"stzh-calendar\",\n value: this.value,\n valueAsDate: day,\n })\n } else {\n // for consistency we should set the focused day in cases where\n // user has selected a day that has been specifically disallowed\n this.setFocusedDay(day)\n }\n }\n\n private handleMonthSelect = (event: CustomEvent<StzhDropdownChangeEvent>) => {\n const value = Array.isArray(event.detail.value) ? event.detail.value[0] : event.detail.value;\n this.setMonth(parseInt(value, 10))\n }\n\n private handleYearSelect = (event: CustomEvent<StzhDropdownChangeEvent>) => {\n const value = Array.isArray(event.detail.value) ? event.detail.value[0] : event.detail.value;\n this.setYear(parseInt(value, 10))\n }\n\n private processFocusedDayNode = (element: HTMLButtonElement) => {\n // this.focusedDayNode = element\n\n if (this.activeFocus) {\n setTimeout(() => element.focus(), 0)\n }\n }\n\n async componentWillLoad() {\n // this.monthSelectId = `stzh-calendar-month-${calendarCounter}`;\n // this.yearSelectId = `stzh-calendar-year-${calendarCounter}`;\n this.dialogLabelId = `stzh-calendar-dialog-${calendarCounter}`;\n calendarCounter++;\n\n this.valueWatcher(this.value);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'calendar');\n }\n }\n\n connectedCallback() {\n this.createDateFormatters()\n }\n\n render() {\n const valueAsDate = parseISODate(this.value)\n const selectedYear = (valueAsDate || this.focusedDay).getFullYear()\n const focusedMonth = this.focusedDay.getMonth()\n const focusedYear = this.focusedDay.getFullYear()\n\n const minDate = parseISODate(this.min)\n const maxDate = parseISODate(this.max)\n const prevMonthDisabled =\n minDate != null && minDate.getMonth() === focusedMonth && minDate.getFullYear() === focusedYear\n const nextMonthDisabled =\n maxDate != null && maxDate.getMonth() === focusedMonth && maxDate.getFullYear() === focusedYear\n\n const minYear = minDate ? minDate.getFullYear() : selectedYear - 10\n const maxYear = maxDate ? maxDate.getFullYear() : selectedYear + 10\n\n const monthDropdownOptions = this.localization.$globals.monthNames.map((month, i) => {\n return {\n value: i.toString(),\n text: month,\n disabled: !inRange(\n new Date(focusedYear, i, 1),\n minDate ? startOfMonth(minDate) : null,\n maxDate ? endOfMonth(maxDate) : null\n ),\n }\n });\n\n const yearDropdownOptions = range(minYear, maxYear).map(year => {\n return {\n value: year.toString(),\n text: year.toString(),\n }\n });\n\n return (\n <Host>\n <div\n class={{\n \"stzh-calendar\": true\n }}\n /* onTouchMove={this.handleTouchMove} */\n onTouchStart={this.handleTouchStart}\n onTouchEnd={this.handleTouchEnd}\n >\n <div class=\"stzh-calendar__wrapper\">\n {/*\n <div class=\"stzh-calendar__mobile\" onFocusin={this.disableActiveFocus}>\n <label class=\"stzh-calendar__mobile-heading\">{this.localization.calendarHeading}</label>\n </div>\n */}\n {/* @ts-ignore */}\n <div class=\"stzh-calendar__header\" onFocusin={this.disableActiveFocus}>\n <div class=\"stzh-calendar__nav is-dropdowns\">\n <h2\n id={this.dialogLabelId}\n class=\"stzh-calendar__vhidden\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {this.localization.$globals.monthNames[focusedMonth]}\n {this.focusedDay.getFullYear()}\n </h2>\n\n <stzh-dropdown\n class=\"stzh-calendar__dropdown\"\n variant=\"plain\"\n size=\"small\"\n inline\n popover-fullwidth=\"horizontal\"\n noSearch={true}\n openOnFocus={false}\n items={[focusedMonth.toString()]}\n options={monthDropdownOptions}\n label={this.localization.monthSelectLabel}\n labelHidden={true}\n onStzhChange={this.handleMonthSelect}\n ></stzh-dropdown>\n\n <stzh-dropdown\n class=\"stzh-calendar__dropdown\"\n variant=\"plain\"\n size=\"small\"\n inline\n popover-fullwidth=\"horizontal\"\n noSearch={true}\n openOnFocus={false}\n items={[focusedYear.toString()]}\n options={yearDropdownOptions}\n label={this.localization.yearSelectLabel}\n labelHidden={true}\n onStzhChange={this.handleYearSelect}\n ></stzh-dropdown>\n\n {/* alternative for dropdown with popover:\n <stzh-popover>\n <button class=\"stzh-calendar__select-label\" aria-label={this.localization.monthSelectLabel}>\n <span>{this.localization.$globals.monthNamesShort[focusedMonth]}</span>\n <stzh-icon class=\"stzh-calendar__select-icon\" name=\"angle-down\"></stzh-icon>\n </button>\n <stzh-menu slot=\"content\">\n {this.localization.$globals.monthNames.map((month, i) => (\n <stzh-menu-item\n // onClick={this.handleMonthSelect(month)}\n active={i === focusedMonth}\n disabled={\n !inRange(\n new Date(focusedYear, i, 1),\n minDate ? startOfMonth(minDate) : null,\n maxDate ? endOfMonth(maxDate) : null\n )\n }\n >\n {month}\n </stzh-menu-item>\n ))}\n </stzh-menu>\n </stzh-popover>\n */}\n\n {/* original implmentation with native select:\n <label htmlFor={this.monthSelectId} class=\"stzh-calendar__vhidden\">\n {this.localization.monthSelectLabel}\n </label>\n\n <div class=\"stzh-calendar__select-wrapper\">\n <select\n id={this.monthSelectId}\n class=\"stzh-calendar__select stzh-calendar__select--month\"\n onChange={this.handleMonthSelect}\n >\n {this.localization.$globals.monthNames.map((month, i) => (\n <option\n key={month}\n value={i}\n selected={i === focusedMonth}\n disabled={\n !inRange(\n new Date(focusedYear, i, 1),\n minDate ? startOfMonth(minDate) : null,\n maxDate ? endOfMonth(maxDate) : null\n )\n }\n >\n {month}\n </option>\n ))}\n </select>\n <div class=\"stzh-calendar__select-label\" aria-hidden=\"true\">\n <span>{this.localization.$globals.monthNamesShort[focusedMonth]}</span>\n <stzh-icon class=\"stzh-calendar__select-icon\" name=\"angle-down\"></stzh-icon>\n </div>\n </div>\n\n <label htmlFor={this.yearSelectId} class=\"stzh-calendar__vhidden\">\n {this.localization.yearSelectLabel}\n </label>\n\n <div class=\"stzh-calendar__select-wrapper\">\n <select\n id={this.yearSelectId}\n class=\"stzh-calendar__select stzh-calendar__select--year\"\n onChange={this.handleYearSelect}\n >\n {range(minYear, maxYear).map(year => (\n <option key={year} selected={year === focusedYear}>\n {year}\n </option>\n ))}\n </select>\n <div class=\"stzh-calendar__select-label\" aria-hidden=\"true\">\n <span>{this.focusedDay.getFullYear()}</span>\n <stzh-icon class=\"stzh-calendar__select-icon\" name=\"angle-down\"></stzh-icon>\n </div>\n </div>\n */}\n\n </div>\n\n <div class=\"stzh-calendar__nav\">\n <stzh-button\n class=\"stzh-calendar__prev\"\n variant=\"tertiary\"\n size=\"small\"\n icon=\"arrow-left\"\n iconOnly={true}\n onClick={this.handlePreviousMonthClick}\n disabled={prevMonthDisabled}\n type=\"button\"\n a11yLabel={this.localization.prevMonthLabel}\n analyticsId={this.prevMonthAnalyticsId || this.localization.prevMonthLabel}\n ></stzh-button>\n <stzh-button\n class=\"stzh-calendar__next\"\n variant=\"tertiary\"\n size=\"small\"\n icon=\"arrow-right\"\n iconOnly={true}\n onClick={this.handleNextMonthClick}\n disabled={nextMonthDisabled}\n type=\"button\"\n a11yLabel={this.localization.nextMonthLabel}\n analyticsId={this.nextMonthAnalyticsId || this.localization.nextMonthLabel}\n ></stzh-button>\n </div>\n </div>\n\n <StzhCalendarMonth\n dateFormatter={this.dateFormatShort}\n selectedDate={valueAsDate}\n focusedDate={this.focusedDay}\n onDateSelect={this.handleDaySelect}\n onKeyboardNavigation={this.handleKeyboardNavigation}\n labelledById={this.dialogLabelId}\n localization={this.localization}\n firstDayOfWeek={this.firstDayOfWeek}\n focusedDayRef={this.processFocusedDayNode}\n min={minDate}\n max={maxDate}\n isDateDisabled={this.isDateDisabled}\n />\n </div>\n </div>\n </Host>\n )\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"stzh-calendar.entry.cjs.js","mappings":";;;;;;;AAgBO,MAAM,eAAe,GAA8C,CAAC,EACzE,UAAU,EACV,KAAK,EACL,GAAG,EACH,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,QAAQ,EACR,OAAO,EACP,UAAU,EACV,aAAa,GACd;EACC,MAAM,OAAO,GAA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,cAAc,GAC7D,CACX,CACF,EAENA,QAAC,iBAAiB,IAChB,aAAa,EAAE,IAAI,CAAC,eAAe,EACnC,YAAY,EAAE,WAAW,EACzB,WAAW,EAAE,IAAI,CAAC,UAAU,EAC5B,YAAY,EAAE,IAAI,CAAC,eAAe,EAClC,oBAAoB,EAAE,IAAI,CAAC,wBAAwB,EACnD,YAAY,EAAE,IAAI,CAAC,aAAa,EAChC,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,aAAa,EAAE,IAAI,CAAC,qBAAqB,EACzC,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,OAAO,EACZ,cAAc,EAAE,IAAI,CAAC,cAAc,GACnC,CACE,CACF,CACD,EACR;GACF;;;;;;;;;;;","names":["isEqual","isEqualMonth","h","getViewOfMonth","inRange","parseISODate","DaysOfWeek","clamp","printISODate","addDays","startOfWeek","endOfWeek","setMonth","startOfMonth","endOfMonth","setYear","Host"],"sources":["src/components/stzh-calendar/stzh-calendar-day.tsx","src/components/stzh-calendar/stzh-calendar-month.tsx","src/components/stzh-calendar/stzh-calendar.scss?tag=stzh-calendar&encapsulation=scoped","src/components/stzh-calendar/stzh-calendar.tsx"],"sourcesContent":["import { h, FunctionalComponent } from \"@stencil/core\"\nimport { isEqual, isEqualMonth } from \"../../utils/date-utils\"\n\nexport type StzhCalendarDayProps = {\n focusedDay: Date\n today: Date\n day: Date\n disabled: boolean\n inRange: boolean\n isSelected: boolean\n dateFormatter: Intl.DateTimeFormat\n onDaySelect: (event: MouseEvent, day: Date) => void\n onKeyboardNavigation: (event: KeyboardEvent) => void\n focusedDayRef?: (element: HTMLElement) => void\n}\n\nexport const StzhCalendarDay: FunctionalComponent<StzhCalendarDayProps> = ({\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n focusedDayRef,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}) => {\n const isToday = isEqual(day, today)\n const isMonth = isEqualMonth(day, focusedDay)\n const isFocused = isEqual(day, focusedDay)\n const isOutsideRange = !inRange\n\n function handleClick(e) {\n onDaySelect(e, day)\n }\n\n return (\n <button\n class={{\n \"stzh-calendar__day\": true,\n \"is-outside\": isOutsideRange,\n \"is-today\": isToday,\n \"is-month\": isMonth,\n \"is-disabled\": disabled,\n }}\n tabIndex={isFocused ? 0 : -1}\n onClick={handleClick}\n onKeyDown={onKeyboardNavigation}\n aria-disabled={disabled ? \"true\" : undefined}\n disabled={isOutsideRange}\n type=\"button\"\n aria-pressed={isSelected ? \"true\" : \"false\"}\n aria-current={isToday ? \"date\" : undefined}\n s-object-id={dateFormatter.format(day)}\n ref={el => {\n if (isFocused && el && focusedDayRef) {\n focusedDayRef(el)\n }\n }}\n >\n <span aria-hidden=\"true\">{day.getDate()}</span>\n <span class=\"stzh-calendar__vhidden\">{dateFormatter.format(day)}</span>\n </button>\n )\n}\n","import { h, FunctionalComponent } from \"@stencil/core\"\nimport { getViewOfMonth, inRange, DaysOfWeek, isEqual } from \"../../utils/date-utils\"\n\nimport { StzhCalendarLocalizedText } from \"./stzh-calendar.localization\"\nimport { StzhCalendarDay, StzhCalendarDayProps } from \"./stzh-calendar-day\"\nimport { StzhCalendarDateDisabledPredicate } from \"../../index\";\n\nfunction chunk<T>(array: T[], chunkSize: number): T[][] {\n const result = []\n\n for (let i = 0; i < array.length; i += chunkSize) {\n result.push(array.slice(i, i + chunkSize))\n }\n\n return result\n}\n\nfunction mapWithOffset<T, U>(array: T[], startingOffset: number, mapFn: (item: T) => U): U[] {\n return array.map((_, i) => {\n const adjustedIndex = (i + startingOffset) % array.length\n return mapFn(array[adjustedIndex])\n })\n}\n\ntype StzhCalendarMonthProps = {\n selectedDate: Date\n focusedDate: Date\n labelledById: string\n localization: StzhCalendarLocalizedText\n firstDayOfWeek: DaysOfWeek\n min?: Date\n max?: Date\n dateFormatter: Intl.DateTimeFormat\n isDateDisabled: StzhCalendarDateDisabledPredicate\n onDateSelect: StzhCalendarDayProps[\"onDaySelect\"]\n onKeyboardNavigation: StzhCalendarDayProps[\"onKeyboardNavigation\"]\n focusedDayRef: (element: HTMLElement) => void\n}\n\nexport const StzhCalendarMonth: FunctionalComponent<StzhCalendarMonthProps> = ({\n selectedDate,\n focusedDate,\n labelledById,\n localization,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n focusedDayRef,\n}) => {\n const today = new Date()\n const days = getViewOfMonth(focusedDate, firstDayOfWeek)\n\n return (\n <table class=\"stzh-calendar__table\" aria-labelledby={labelledById}>\n <thead>\n <tr>\n {mapWithOffset(localization.$globals.dayNames, firstDayOfWeek, dayName => (\n <th class=\"stzh-calendar__table-header\" scope=\"col\">\n <span aria-hidden=\"true\">{dayName.substring(0, 2)}</span>\n <span class=\"stzh-calendar__vhidden\">{dayName}</span>\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {chunk(days, 7).map(week => (\n <tr class=\"stzh-calendar__row\">\n {week.map(day => (\n <td class=\"stzh-calendar__cell\">\n <StzhCalendarDay\n day={day}\n today={today}\n focusedDay={focusedDate}\n isSelected={isEqual(day, selectedDate)}\n disabled={isDateDisabled(day)}\n inRange={inRange(day, min, max)}\n onDaySelect={onDateSelect}\n dateFormatter={dateFormatter}\n onKeyboardNavigation={onKeyboardNavigation}\n focusedDayRef={focusedDayRef}\n />\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n )\n}\n","/**\n * @prop --background: Background color of calendar\n * @prop --padding-top: Padding top of calendar\n * @prop --padding-bottom: Padding bottom color of calendar\n * @prop --padding-left: Padding left color of calendar\n * @prop --padding-right: Padding right color of calendar\n * @prop --background-color: Background color of calendar\n */\n\n:host {\n --padding-top: #{space('small')};\n --padding-bottom: #{space('small')};\n --padding-left: #{space('xsmall')};\n --padding-right: #{space('xsmall')};\n\n width: #{$calendarWidth};\n}\n\n.stzh-calendar {\n display: flex;\n position: relative;\n text-align: left;\n touch-action: pan-y;\n user-select: none;\n overflow: hidden;\n overflow: clip;\n padding-top: var(--padding-top);\n padding-bottom: var(--padding-bottom);\n padding-left: var(--padding-left);\n padding-right: var(--padding-right);\n\n &__wrapper {\n width: 100%;\n }\n\n &__table {\n @include font;\n @include fontSize('milli');\n border-collapse: collapse;\n border-spacing: 0;\n text-align: center;\n width: 100%;\n }\n\n &__table-header,\n &__cell {\n padding: space('xxxsmall');\n\n &:first-child {\n padding-left: 0;\n }\n\n &:last-child {\n padding-right: 0;\n }\n }\n\n &__row:last-child &__cell {\n padding-bottom: 0;\n }\n\n &__table-header {\n @include font;\n @include fontSize('nano');\n text-decoration-line: none;\n padding-top: 0;\n padding-bottom: 0;\n width: 44px;\n height: 40px;\n }\n\n &__cell {\n text-align: center;\n }\n\n &__day {\n @include font;\n @include fontSize('milli');\n appearance: none;\n background: transparent;\n border: 0;\n cursor: pointer;\n display: inline-block;\n font-variant-numeric: tabular-nums;\n width: 40px;\n height: 40px;\n text-align: center;\n vertical-align: middle;\n transition-property: color, background-color;\n transition-duration: $baseTransitionAnimationSpeed;\n // position: relative;\n // padding: 0 0 1px;\n // z-index: 1;\n\n // &::before {\n // z-index: -1;\n // bottom: 0;\n // content: \"\";\n // left: 0;\n // position: absolute;\n // right: 0;\n // top: 0;\n // }\n\n &.is-today {\n @include font('heavy');\n color: $colorPrimary70;\n // box-shadow: 0 0 0 1px $colorPrimary;\n // position: relative;\n // z-index: 200;\n }\n\n &:hover {\n background: $colorGrey20;\n }\n\n // &:hover::before {\n // background: $colorGrey20;\n // }\n\n // &:focus,\n &[aria-pressed=\"true\"] {\n background: $colorSecondary30;\n // box-shadow: none;\n color: $colorPrimary70;\n }\n\n &:active {\n background: $colorSecondary30;\n // box-shadow: 0 0 5px $colorPrimary;\n color: $colorPrimary70;\n // z-index: 200;\n }\n\n // &:focus {\n // z-index: 200;\n // }\n\n // &:not(.is-month) {\n // box-shadow: none;\n // }\n\n &:not(.is-month),\n &[aria-disabled=\"true\"] {\n background: transparent;\n color: $colorGrey60;\n cursor: default;\n }\n\n // &[aria-disabled=\"true\"] {\n // &.is-today {\n // box-shadow: 0 0 0 1px $colorGrey20;\n\n // &:focus {\n // box-shadow: 0 0 5px $colorPrimary;\n // }\n // }\n\n // &::before {\n // display: none;\n // }\n // }\n\n &.is-disabled {\n text-decoration-line: line-through;\n }\n\n &.is-outside {\n color: $colorGrey60;\n background: $colorGrey20;\n // box-shadow: none;\n cursor: default;\n pointer-events: none;\n text-decoration-line: none;\n\n // &::before {\n // display: none;\n // }\n }\n }\n\n &__header {\n align-items: center;\n display: flex;\n justify-content: space-between;\n width: 100%;\n }\n\n &__nav {\n display: flex;\n align-items: center;\n\n &.is-dropdowns {\n gap: calc(#{space('xsmall')} + #{space('small')});\n margin-left: space('small');\n }\n }\n\n // &__prev,\n // &__next {\n // align-items: center;\n // appearance: none;\n // font-family: inherit;\n // background: transparent;\n // border-radius: 50%;\n // color: $colorPrimary70;\n // cursor: pointer;\n // display: inline-flex;\n // flex-shrink: 0;\n // justify-content: center;\n // margin-left: space('xsmall');\n // padding: 0;\n // transition: background-color 300ms ease;\n // height: 32px;\n // width: 32px;\n\n // &:disabled {\n // cursor: default;\n // color: $colorGrey60;\n // }\n // }\n\n stzh-dropdown#{&}__dropdown {\n --popover-width: 100%;\n --popover-height: calc(100% - #{$formInputHeightSmall} - var(--padding-top));\n --popover-max-height: initial;\n position: static;\n }\n\n &__select-wrapper {\n display: inline-flex;\n position: relative;\n\n span {\n margin-right: 0px;\n }\n }\n\n &__select {\n @include fontSize('milli');\n cursor: pointer;\n height: 100%;\n left: 0;\n opacity: 0;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: 2;\n border-radius: $formInputBorderRadius;\n }\n\n &__select-label {\n @include fontSize('milli');\n appearance: none;\n border: none;\n align-items: center;\n border-radius: $formInputBorderRadius;\n color: $colorPrimary70;\n display: flex;\n gap: space('xsmall');\n padding: 0;\n padding-left: space('small');\n padding-right: space('xsmall');\n\n position: relative;\n width: 100%;\n min-height: 40px;\n z-index: 1;\n }\n\n &__select-icon {\n --size: #{iconSize('xsmall')};\n }\n\n &__vhidden {\n @include visuallyhidden;\n }\n}\n","import {\n Component,\n ComponentInterface,\n Host,\n Prop,\n Element,\n h,\n Event,\n EventEmitter,\n State,\n Method,\n Watch\n} from \"@stencil/core\"\n\nimport {\n addDays,\n startOfWeek,\n endOfWeek,\n setMonth,\n setYear,\n clamp,\n inRange,\n endOfMonth,\n startOfMonth,\n printISODate,\n parseISODate,\n DaysOfWeek,\n} from \"../../utils/date-utils\";\n\nimport { StzhCalendarChangeEvent, StzhDropdownChangeEvent } from \"../../index\";\nimport { StzhCalendarDateDisabledPredicate } from \"../../index\";\n\nimport { StzhCalendarMonth } from \"./stzh-calendar-month\";\nimport { StzhCalendarLocalizedText } from \"./stzh-calendar.localization\";\n\nfunction range(from: number, to: number) {\n var result: number[] = []\n for (var i = from; i <= to; i++) {\n result.push(i)\n }\n return result\n}\n\nconst keyCode = {\n TAB: 9,\n ESC: 27,\n SPACE: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n}\n\nlet calendarCounter = 0;\n\n@Component({\n tag: \"stzh-calendar\",\n styleUrl: \"stzh-calendar.scss\",\n scoped: true\n})\nexport class StzhCalendar implements ComponentInterface {\n /** Date value. Must be in IS0-8601 format: YYYY-MM-DD. */\n @Prop({ mutable: true }) value: string = \"\"\n\n /**\n * Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\n * This setting can be used alone or together with the max property.\n */\n @Prop() min: string = \"\"\n\n /**\n * Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\n * This setting can be used alone or together with the min property.\n */\n @Prop() max: string = \"\"\n\n /**\n * Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\n * Default is Monday.\n */\n @Prop() firstDayOfWeek: DaysOfWeek = DaysOfWeek.Monday\n\n /** Day names, month names, etc, used for localization. */\n @Prop() localization: StzhCalendarLocalizedText;\n\n /**\n * Controls which days are disabled and therefore disallowed.\n * For example, this can be used to disallow selection of weekends.\n */\n @Prop() isDateDisabled: StzhCalendarDateDisabledPredicate = () => false\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the previous month button element.\n * Default value will be taken from translations.\n */\n @Prop() prevMonthAnalyticsId: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the next month button element.\n * Default value will be taken from translations.\n */\n @Prop() nextMonthAnalyticsId: string;\n\n @State() activeFocus = false\n @State() focusedDay = new Date()\n\n /** Event emitted when a date is selected. */\n @Event() stzhChange: EventEmitter<StzhCalendarChangeEvent>\n\n @Watch(\"localization\")\n createDateFormatters() {\n if (this.localization) {\n this.dateFormatShort = new Intl.DateTimeFormat(this.localization.$locale, { day: \"numeric\", month: \"long\" })\n }\n }\n\n @Watch(\"value\")\n valueWatcher(newValue: string) {\n if (newValue) {\n this.setFocusedDay(parseISODate(this.value));\n } else {\n this.setFocusedDay(new Date());\n }\n }\n\n /** Set focused day element by a JS Date object */\n @Method()\n async setFocusedDay(day: Date) {\n this.focusedDay = clamp(day, parseISODate(this.min), parseISODate(this.max))\n }\n\n /** Set value by a JS Date object */\n @Method()\n async setDate(date: Date) {\n this.value = printISODate(date)\n }\n\n @Element() element: HTMLStzhCalendarElement\n\n // private monthSelectId: string\n // private yearSelectId: string\n private dialogLabelId: string\n\n // private focusedDayNode: HTMLButtonElement\n\n private initialTouchX: number = null\n private initialTouchY: number = null\n\n /**\n * To format dates exclusively for the benefit of screen readers.\n *\n * We prefer DateTimeFormat over date.toLocaleDateString, as the former has\n * better performance when formatting large number of dates. See:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString#Performance\n */\n private dateFormatShort: Intl.DateTimeFormat\n\n private enableActiveFocus = () => {\n this.activeFocus = true\n }\n\n private disableActiveFocus = () => {\n this.activeFocus = false\n }\n\n private addDays(days: number) {\n this.setFocusedDay(addDays(this.focusedDay, days))\n }\n\n private addMonths(months: number) {\n this.setMonth(this.focusedDay.getMonth() + months)\n }\n\n private addYears(years: number) {\n this.setYear(this.focusedDay.getFullYear() + years)\n }\n\n private startOfWeek() {\n this.setFocusedDay(startOfWeek(this.focusedDay, this.firstDayOfWeek))\n }\n\n private endOfWeek() {\n this.setFocusedDay(endOfWeek(this.focusedDay, this.firstDayOfWeek))\n }\n\n private setMonth(month: number) {\n const min = setMonth(startOfMonth(this.focusedDay), month)\n const max = endOfMonth(min)\n const date = setMonth(this.focusedDay, month)\n\n this.setFocusedDay(clamp(date, min, max))\n }\n\n private setYear(year: number) {\n const min = setYear(startOfMonth(this.focusedDay), year)\n const max = endOfMonth(min)\n const date = setYear(this.focusedDay, year)\n\n this.setFocusedDay(clamp(date, min, max))\n }\n\n private handleTouchStart = (event: TouchEvent) => {\n const touch = event.changedTouches[0]\n this.initialTouchX = touch.pageX\n this.initialTouchY = touch.pageY\n }\n\n // private handleTouchMove = (event: TouchEvent) => {\n // event.preventDefault()\n // }\n\n private handleTouchEnd = (event: TouchEvent) => {\n const touch = event.changedTouches[0]\n const distX = touch.pageX - this.initialTouchX // get horizontal dist traveled\n const distY = touch.pageY - this.initialTouchY // get vertical dist traveled\n const threshold = 70\n\n const isHorizontalSwipe = Math.abs(distX) >= threshold && Math.abs(distY) <= threshold\n\n if (isHorizontalSwipe) {\n this.addMonths(distX < 0 ? 1 : -1)\n }\n\n this.initialTouchY = null\n this.initialTouchX = null\n }\n\n private handleNextMonthClick = (event: MouseEvent) => {\n event.preventDefault()\n this.addMonths(1)\n }\n\n private handlePreviousMonthClick = (event: MouseEvent) => {\n event.preventDefault()\n this.addMonths(-1)\n }\n\n private handleKeyboardNavigation = (event: KeyboardEvent) => {\n var handled = true\n\n switch (event.keyCode) {\n case keyCode.RIGHT:\n this.addDays(1)\n break\n case keyCode.LEFT:\n this.addDays(-1)\n break\n case keyCode.DOWN:\n this.addDays(7)\n break\n case keyCode.UP:\n this.addDays(-7)\n break\n case keyCode.PAGE_UP:\n if (event.shiftKey) {\n this.addYears(-1)\n } else {\n this.addMonths(-1)\n }\n break\n case keyCode.PAGE_DOWN:\n if (event.shiftKey) {\n this.addYears(1)\n } else {\n this.addMonths(1)\n }\n break\n case keyCode.HOME:\n this.startOfWeek()\n break\n case keyCode.END:\n this.endOfWeek()\n break\n default:\n handled = false\n }\n\n if (handled) {\n event.preventDefault()\n this.enableActiveFocus()\n }\n }\n\n private handleDaySelect = (_event: MouseEvent, day: Date) => {\n const isInRange = inRange(day, parseISODate(this.min), parseISODate(this.max))\n const isAllowed = !this.isDateDisabled(day)\n\n if (isInRange && isAllowed) {\n this.setDate(day)\n\n this.stzhChange.emit({\n component: \"stzh-calendar\",\n value: this.value,\n valueAsDate: day,\n })\n } else {\n // for consistency we should set the focused day in cases where\n // user has selected a day that has been specifically disallowed\n this.setFocusedDay(day)\n }\n }\n\n private handleMonthSelect = (event: CustomEvent<StzhDropdownChangeEvent>) => {\n const value = Array.isArray(event.detail.value) ? event.detail.value[0] : event.detail.value;\n this.setMonth(parseInt(value, 10))\n }\n\n private handleYearSelect = (event: CustomEvent<StzhDropdownChangeEvent>) => {\n const value = Array.isArray(event.detail.value) ? event.detail.value[0] : event.detail.value;\n this.setYear(parseInt(value, 10))\n }\n\n private processFocusedDayNode = (element: HTMLButtonElement) => {\n // this.focusedDayNode = element\n\n if (this.activeFocus) {\n setTimeout(() => element.focus(), 0)\n }\n }\n\n async componentWillLoad() {\n // this.monthSelectId = `stzh-calendar-month-${calendarCounter}`;\n // this.yearSelectId = `stzh-calendar-year-${calendarCounter}`;\n this.dialogLabelId = `stzh-calendar-dialog-${calendarCounter}`;\n calendarCounter++;\n\n this.valueWatcher(this.value);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'calendar');\n }\n }\n\n connectedCallback() {\n this.createDateFormatters()\n }\n\n render() {\n const valueAsDate = parseISODate(this.value)\n const selectedYear = (valueAsDate || this.focusedDay).getFullYear()\n const focusedMonth = this.focusedDay.getMonth()\n const focusedYear = this.focusedDay.getFullYear()\n\n const minDate = parseISODate(this.min)\n const maxDate = parseISODate(this.max)\n const prevMonthDisabled =\n minDate != null && minDate.getMonth() === focusedMonth && minDate.getFullYear() === focusedYear\n const nextMonthDisabled =\n maxDate != null && maxDate.getMonth() === focusedMonth && maxDate.getFullYear() === focusedYear\n\n const minYear = minDate ? minDate.getFullYear() : selectedYear - 10\n const maxYear = maxDate ? maxDate.getFullYear() : selectedYear + 10\n\n const monthDropdownOptions = this.localization.$globals.monthNames.map((month, i) => {\n return {\n value: i.toString(),\n text: month,\n disabled: !inRange(\n new Date(focusedYear, i, 1),\n minDate ? startOfMonth(minDate) : null,\n maxDate ? endOfMonth(maxDate) : null\n ),\n }\n });\n\n const yearDropdownOptions = range(minYear, maxYear).map(year => {\n return {\n value: year.toString(),\n text: year.toString(),\n }\n });\n\n return (\n <Host>\n <div\n class={{\n \"stzh-calendar\": true\n }}\n /* onTouchMove={this.handleTouchMove} */\n onTouchStart={this.handleTouchStart}\n onTouchEnd={this.handleTouchEnd}\n >\n <div class=\"stzh-calendar__wrapper\">\n {/*\n <div class=\"stzh-calendar__mobile\" onFocusin={this.disableActiveFocus}>\n <label class=\"stzh-calendar__mobile-heading\">{this.localization.calendarHeading}</label>\n </div>\n */}\n {/* @ts-ignore */}\n <div class=\"stzh-calendar__header\" onFocusin={this.disableActiveFocus}>\n <div class=\"stzh-calendar__nav is-dropdowns\">\n <h2\n id={this.dialogLabelId}\n class=\"stzh-calendar__vhidden\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {this.localization.$globals.monthNames[focusedMonth]}\n {this.focusedDay.getFullYear()}\n </h2>\n\n <stzh-dropdown\n class=\"stzh-calendar__dropdown\"\n variant=\"plain\"\n size=\"small\"\n inline\n popover-fullwidth=\"horizontal\"\n noSearch={true}\n openOnFocus={false}\n items={[focusedMonth.toString()]}\n options={monthDropdownOptions}\n label={this.localization.monthSelectLabel}\n labelHidden={true}\n onStzhChange={this.handleMonthSelect}\n ></stzh-dropdown>\n\n <stzh-dropdown\n class=\"stzh-calendar__dropdown\"\n variant=\"plain\"\n size=\"small\"\n inline\n popover-fullwidth=\"horizontal\"\n noSearch={true}\n openOnFocus={false}\n items={[focusedYear.toString()]}\n options={yearDropdownOptions}\n label={this.localization.yearSelectLabel}\n labelHidden={true}\n onStzhChange={this.handleYearSelect}\n ></stzh-dropdown>\n\n {/* alternative for dropdown with popover:\n <stzh-popover>\n <button class=\"stzh-calendar__select-label\" aria-label={this.localization.monthSelectLabel}>\n <span>{this.localization.$globals.monthNamesShort[focusedMonth]}</span>\n <stzh-icon class=\"stzh-calendar__select-icon\" name=\"angle-down\"></stzh-icon>\n </button>\n <stzh-menu slot=\"content\">\n {this.localization.$globals.monthNames.map((month, i) => (\n <stzh-menu-item\n // onClick={this.handleMonthSelect(month)}\n active={i === focusedMonth}\n disabled={\n !inRange(\n new Date(focusedYear, i, 1),\n minDate ? startOfMonth(minDate) : null,\n maxDate ? endOfMonth(maxDate) : null\n )\n }\n >\n {month}\n </stzh-menu-item>\n ))}\n </stzh-menu>\n </stzh-popover>\n */}\n\n {/* original implmentation with native select:\n <label htmlFor={this.monthSelectId} class=\"stzh-calendar__vhidden\">\n {this.localization.monthSelectLabel}\n </label>\n\n <div class=\"stzh-calendar__select-wrapper\">\n <select\n id={this.monthSelectId}\n class=\"stzh-calendar__select stzh-calendar__select--month\"\n onChange={this.handleMonthSelect}\n >\n {this.localization.$globals.monthNames.map((month, i) => (\n <option\n key={month}\n value={i}\n selected={i === focusedMonth}\n disabled={\n !inRange(\n new Date(focusedYear, i, 1),\n minDate ? startOfMonth(minDate) : null,\n maxDate ? endOfMonth(maxDate) : null\n )\n }\n >\n {month}\n </option>\n ))}\n </select>\n <div class=\"stzh-calendar__select-label\" aria-hidden=\"true\">\n <span>{this.localization.$globals.monthNamesShort[focusedMonth]}</span>\n <stzh-icon class=\"stzh-calendar__select-icon\" name=\"angle-down\"></stzh-icon>\n </div>\n </div>\n\n <label htmlFor={this.yearSelectId} class=\"stzh-calendar__vhidden\">\n {this.localization.yearSelectLabel}\n </label>\n\n <div class=\"stzh-calendar__select-wrapper\">\n <select\n id={this.yearSelectId}\n class=\"stzh-calendar__select stzh-calendar__select--year\"\n onChange={this.handleYearSelect}\n >\n {range(minYear, maxYear).map(year => (\n <option key={year} selected={year === focusedYear}>\n {year}\n </option>\n ))}\n </select>\n <div class=\"stzh-calendar__select-label\" aria-hidden=\"true\">\n <span>{this.focusedDay.getFullYear()}</span>\n <stzh-icon class=\"stzh-calendar__select-icon\" name=\"angle-down\"></stzh-icon>\n </div>\n </div>\n */}\n\n </div>\n\n <div class=\"stzh-calendar__nav\">\n <stzh-button\n class=\"stzh-calendar__prev\"\n variant=\"tertiary\"\n size=\"small\"\n icon=\"arrow-left\"\n iconOnly={true}\n onClick={this.handlePreviousMonthClick}\n disabled={prevMonthDisabled}\n type=\"button\"\n a11yLabel={this.localization.prevMonthLabel}\n analyticsId={this.prevMonthAnalyticsId || this.localization.prevMonthLabel}\n ></stzh-button>\n <stzh-button\n class=\"stzh-calendar__next\"\n variant=\"tertiary\"\n size=\"small\"\n icon=\"arrow-right\"\n iconOnly={true}\n onClick={this.handleNextMonthClick}\n disabled={nextMonthDisabled}\n type=\"button\"\n a11yLabel={this.localization.nextMonthLabel}\n analyticsId={this.nextMonthAnalyticsId || this.localization.nextMonthLabel}\n ></stzh-button>\n </div>\n </div>\n\n <StzhCalendarMonth\n dateFormatter={this.dateFormatShort}\n selectedDate={valueAsDate}\n focusedDate={this.focusedDay}\n onDateSelect={this.handleDaySelect}\n onKeyboardNavigation={this.handleKeyboardNavigation}\n labelledById={this.dialogLabelId}\n localization={this.localization}\n firstDayOfWeek={this.firstDayOfWeek}\n focusedDayRef={this.processFocusedDayNode}\n min={minDate}\n max={maxDate}\n isDateDisabled={this.isDateDisabled}\n />\n </div>\n </div>\n </Host>\n )\n }\n}\n"],"version":3}
|