@oiz/stzh-components 3.8.0-beta1 → 3.8.0
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-02553278.js → app-globals-0e887dd2.js} +2 -2
- package/dist/cjs/{app-globals-02553278.js.map → app-globals-0e887dd2.js.map} +1 -1
- package/dist/cjs/{axios-69bcb71f.js → axios-bd44344d.js} +51 -96
- package/dist/cjs/axios-bd44344d.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-accordion_3.cjs.entry.js +2 -7
- package/dist/cjs/stzh-accordion_3.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-bathstatus-list.cjs.entry.js +1 -1
- package/dist/cjs/stzh-checkboxgroup.cjs.entry.js +12 -11
- package/dist/cjs/stzh-checkboxgroup.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-chipselect.cjs.entry.js +1 -1
- package/dist/cjs/stzh-chipselect.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-contact.cjs.entry.js +2 -8
- package/dist/cjs/stzh-contact.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-datalist_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datalist_2.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-dialog.cjs.entry.js +1 -1
- package/dist/cjs/stzh-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/stzh-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-eventdata.cjs.entry.js +1 -1
- package/dist/cjs/stzh-eventdata.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-microsite-teaserlist.cjs.entry.js +3 -2
- package/dist/cjs/stzh-microsite-teaserlist.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-poilist.cjs.entry.js +1 -1
- package/dist/cjs/stzh-progressbar.cjs.entry.js +23 -0
- package/dist/cjs/stzh-progressbar.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-search.cjs.entry.js +2 -2
- package/dist/cjs/stzh-search.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-upload.cjs.entry.js +23 -10
- package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-vbz-majorticker.cjs.entry.js +1 -1
- package/dist/cjs/stzh-vbz-ticker.cjs.entry.js +1 -1
- package/dist/collection/assets/i18n/de.json +9 -5
- package/dist/collection/assets/i18n/en.json +9 -5
- package/dist/collection/components/stzh-accordion/stzh-accordion.e2e.js +1 -0
- package/dist/collection/components/stzh-accordion/stzh-accordion.e2e.js.map +1 -1
- package/dist/collection/components/stzh-accordion/stzh-accordion.stories.js +86 -0
- package/dist/collection/components/stzh-accordion-item/stzh-accordion-item.js +2 -7
- package/dist/collection/components/stzh-accordion-item/stzh-accordion-item.js.map +1 -1
- package/dist/collection/components/stzh-button/stzh-button.css +13 -4
- package/dist/collection/components/stzh-button/stzh-button.e2e.js +6 -3
- package/dist/collection/components/stzh-button/stzh-button.e2e.js.map +1 -1
- package/dist/collection/components/stzh-button/stzh-button.stories.js +191 -15
- package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.js +31 -14
- package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.js.map +1 -1
- package/dist/collection/components/stzh-chip/stzh-chip.stories.js +11 -0
- package/dist/collection/components/stzh-chipselect/stzh-chipselect.css +1 -6
- package/dist/collection/components/stzh-contact/stzh-contact.css +11 -0
- package/dist/collection/components/stzh-contact/stzh-contact.js +1 -7
- package/dist/collection/components/stzh-contact/stzh-contact.js.map +1 -1
- package/dist/collection/components/stzh-datalist/stzh-datalist.e2e.js +1 -0
- package/dist/collection/components/stzh-datalist/stzh-datalist.e2e.js.map +1 -1
- package/dist/collection/components/stzh-datalist/stzh-datalist.stories.js +32 -0
- package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.css +2 -1
- package/dist/collection/components/stzh-datepicker/stzh-datepicker.stories.js +1 -1
- package/dist/collection/components/stzh-dialog/stzh-dialog.css +2 -1
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.css +8 -1
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.stories.js +107 -5
- package/dist/collection/components/stzh-eventdata/stzh-eventdata.css +0 -5
- package/dist/collection/components/stzh-input/stzh-input.stories.js +1 -1
- package/dist/collection/components/stzh-microsite-teaserlist/stzh-microsite-teaserlist.js +3 -2
- package/dist/collection/components/stzh-microsite-teaserlist/stzh-microsite-teaserlist.js.map +1 -1
- package/dist/collection/components/stzh-progressbar/stzh-progressbar.js +27 -2
- package/dist/collection/components/stzh-progressbar/stzh-progressbar.js.map +1 -1
- package/dist/collection/components/stzh-search/stzh-search.js +1 -1
- package/dist/collection/components/stzh-search/stzh-search.js.map +1 -1
- package/dist/collection/components/stzh-search/stzh-search.stories.js +51 -83
- package/dist/collection/components/stzh-skiplink/stzh-skiplink.stories.js +0 -1
- package/dist/collection/components/stzh-upload/models/stzh-photographing-url-details.dto.js.map +1 -1
- package/dist/collection/components/stzh-upload/stzh-upload.css +5 -0
- package/dist/collection/components/stzh-upload/stzh-upload.js +26 -10
- package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
- package/dist/collection/components/stzh-upload/stzh-upload.localization.js.map +1 -1
- package/dist/collection/components/stzh-upload/stzh-upload.stories.js +3 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-ed75de26.js → p-16940157.js} +3 -3
- package/dist/components/{p-ed75de26.js.map → p-16940157.js.map} +1 -1
- package/dist/components/{p-2fe2c81f.js → p-1d21ac10.js} +3 -3
- package/dist/components/{p-2fe2c81f.js.map → p-1d21ac10.js.map} +1 -1
- package/dist/components/{p-16892790.js → p-345a1e99.js} +51 -96
- package/dist/components/p-345a1e99.js.map +1 -0
- package/dist/components/{p-3aefa2e3.js → p-37367a31.js} +5 -5
- package/dist/components/{p-3aefa2e3.js.map → p-37367a31.js.map} +1 -1
- package/dist/components/{p-74755a90.js → p-408a1562.js} +2 -2
- package/dist/components/{p-74755a90.js.map → p-408a1562.js.map} +1 -1
- package/dist/components/{p-7e9f4f9f.js → p-497e2db0.js} +2 -2
- package/dist/components/{p-7e9f4f9f.js.map → p-497e2db0.js.map} +1 -1
- package/dist/components/p-4d000b5b.js +265 -0
- package/dist/components/p-4d000b5b.js.map +1 -0
- package/dist/components/{p-866cf184.js → p-4e5ccabd.js} +2 -2
- package/dist/components/{p-866cf184.js.map → p-4e5ccabd.js.map} +1 -1
- package/dist/components/{p-bd7d15a6.js → p-541e8c61.js} +2 -2
- package/dist/components/{p-bd7d15a6.js.map → p-541e8c61.js.map} +1 -1
- package/dist/components/{p-d4aabf9c.js → p-60b9f94a.js} +3 -3
- package/dist/components/p-60b9f94a.js.map +1 -0
- package/dist/components/{p-82c163e4.js → p-62e6cd61.js} +3 -3
- package/dist/components/{p-82c163e4.js.map → p-62e6cd61.js.map} +1 -1
- package/dist/components/{p-13c3319c.js → p-6956beb9.js} +2 -2
- package/dist/components/{p-13c3319c.js.map → p-6956beb9.js.map} +1 -1
- package/dist/components/{p-2a870524.js → p-6c754f8f.js} +3 -8
- package/dist/components/p-6c754f8f.js.map +1 -0
- package/dist/components/{p-9b0832ca.js → p-70f62e8e.js} +3 -3
- package/dist/components/{p-9b0832ca.js.map → p-70f62e8e.js.map} +1 -1
- package/dist/components/{p-c9ddf923.js → p-8ed7a61b.js} +2 -2
- package/dist/components/{p-c9ddf923.js.map → p-8ed7a61b.js.map} +1 -1
- package/dist/components/{p-3890d846.js → p-96416f66.js} +3 -3
- package/dist/components/p-96416f66.js.map +1 -0
- package/dist/components/{p-435e0ef4.js → p-c73125e2.js} +3 -3
- package/dist/components/{p-435e0ef4.js.map → p-c73125e2.js.map} +1 -1
- package/dist/components/{p-d1623b2e.js → p-dd072a49.js} +2 -2
- package/dist/components/{p-d1623b2e.js.map → p-dd072a49.js.map} +1 -1
- package/dist/components/{p-4039ba55.js → p-e5edc56d.js} +2 -2
- package/dist/components/{p-4039ba55.js.map → p-e5edc56d.js.map} +1 -1
- package/dist/components/{p-e0e4416e.js → p-ebbe78de.js} +2 -2
- package/dist/components/p-ebbe78de.js.map +1 -0
- package/dist/components/{p-e197115b.js → p-fa14b406.js} +2 -2
- package/dist/components/{p-e197115b.js.map → p-fa14b406.js.map} +1 -1
- package/dist/components/stzh-accordion-item.js +1 -1
- package/dist/components/stzh-actionset.js +1 -1
- package/dist/components/stzh-amount.js +3 -3
- package/dist/components/stzh-appointments.js +5 -5
- package/dist/components/stzh-archivelist.js +1 -1
- package/dist/components/stzh-banner.js +1 -1
- package/dist/components/stzh-bathstatus-list.js +1 -1
- package/dist/components/stzh-button.js +1 -1
- package/dist/components/stzh-calendar.js +1 -1
- package/dist/components/stzh-card-searchresult.js +3 -3
- package/dist/components/stzh-card-superteaser.js +3 -3
- package/dist/components/stzh-card.js +1 -1
- package/dist/components/stzh-checkboxgroup.js +13 -12
- package/dist/components/stzh-checkboxgroup.js.map +1 -1
- package/dist/components/stzh-chipselect.js +1 -1
- package/dist/components/stzh-contact.js +2 -8
- package/dist/components/stzh-contact.js.map +1 -1
- package/dist/components/stzh-datalist-item.js +1 -1
- package/dist/components/stzh-datalist.js +1 -1
- package/dist/components/stzh-datamessagelist-item.js +1 -1
- package/dist/components/stzh-datatable.js +7 -7
- package/dist/components/stzh-datepicker.js +1 -1
- package/dist/components/stzh-dialog.js +1 -1
- package/dist/components/stzh-disturber.js +1 -1
- package/dist/components/stzh-dropdown.js +1 -1
- package/dist/components/stzh-eventdata.js +1 -1
- package/dist/components/stzh-eventdata.js.map +1 -1
- package/dist/components/stzh-feedreader.js +2 -2
- package/dist/components/stzh-gallery.js +1 -1
- package/dist/components/stzh-geo-ref-data.js +6 -6
- package/dist/components/stzh-ghettobox.js +1 -1
- package/dist/components/stzh-header.js +1 -1
- package/dist/components/stzh-http-error.js +1 -1
- package/dist/components/stzh-iframe.js +1 -1
- package/dist/components/stzh-input.js +1 -1
- package/dist/components/stzh-message.js +1 -1
- package/dist/components/stzh-microsite-teaserlist.js +7 -6
- package/dist/components/stzh-microsite-teaserlist.js.map +1 -1
- package/dist/components/stzh-monthyearpicker.js +1 -1
- package/dist/components/stzh-offline-indicator.js +3 -3
- package/dist/components/stzh-pagebottom.js +2 -2
- package/dist/components/stzh-pagination.js +1 -1
- package/dist/components/stzh-panorama.js +2 -2
- package/dist/components/stzh-poilist.js +4 -4
- package/dist/components/stzh-progressbar.js +26 -2
- package/dist/components/stzh-progressbar.js.map +1 -1
- package/dist/components/stzh-readspeaker.js +1 -1
- package/dist/components/stzh-saptcha.js +2 -2
- package/dist/components/stzh-search.js +6 -6
- package/dist/components/stzh-search.js.map +1 -1
- package/dist/components/stzh-share.js +1 -1
- package/dist/components/stzh-sitemap.js +3 -3
- package/dist/components/stzh-timepicker.js +1 -1
- package/dist/components/stzh-toast.js +1 -1
- package/dist/components/stzh-toastbar.js +1 -1
- package/dist/components/stzh-upload.js +31 -15
- package/dist/components/stzh-upload.js.map +1 -1
- package/dist/components/stzh-vbz-majorticker.js +3 -3
- package/dist/components/stzh-vbz-ticker.js +1 -1
- package/dist/components/stzh-youtube.js +2 -2
- package/dist/esm/{app-globals-30dc1fec.js → app-globals-1e3146bc.js} +2 -2
- package/dist/esm/{app-globals-30dc1fec.js.map → app-globals-1e3146bc.js.map} +1 -1
- package/dist/esm/{axios-e0a35239.js → axios-0cc95004.js} +51 -96
- package/dist/esm/axios-0cc95004.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-accordion_3.entry.js +2 -7
- package/dist/esm/stzh-accordion_3.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-bathstatus-list.entry.js +1 -1
- package/dist/esm/stzh-checkboxgroup.entry.js +12 -11
- package/dist/esm/stzh-checkboxgroup.entry.js.map +1 -1
- package/dist/esm/stzh-chipselect.entry.js +1 -1
- package/dist/esm/stzh-chipselect.entry.js.map +1 -1
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-contact.entry.js +2 -8
- package/dist/esm/stzh-contact.entry.js.map +1 -1
- package/dist/esm/stzh-datalist_2.entry.js +1 -1
- package/dist/esm/stzh-datalist_2.entry.js.map +1 -1
- package/dist/esm/stzh-dialog.entry.js +1 -1
- package/dist/esm/stzh-dialog.entry.js.map +1 -1
- package/dist/esm/stzh-dropdown.entry.js +1 -1
- package/dist/esm/stzh-dropdown.entry.js.map +1 -1
- package/dist/esm/stzh-eventdata.entry.js +1 -1
- package/dist/esm/stzh-eventdata.entry.js.map +1 -1
- package/dist/esm/stzh-microsite-teaserlist.entry.js +3 -2
- package/dist/esm/stzh-microsite-teaserlist.entry.js.map +1 -1
- package/dist/esm/stzh-poilist.entry.js +1 -1
- package/dist/esm/stzh-progressbar.entry.js +24 -1
- package/dist/esm/stzh-progressbar.entry.js.map +1 -1
- package/dist/esm/stzh-search.entry.js +2 -2
- package/dist/esm/stzh-search.entry.js.map +1 -1
- package/dist/esm/stzh-upload.entry.js +23 -10
- package/dist/esm/stzh-upload.entry.js.map +1 -1
- package/dist/esm/stzh-vbz-majorticker.entry.js +1 -1
- package/dist/esm/stzh-vbz-ticker.entry.js +1 -1
- package/dist/stzh-components/assets/i18n/de.json +9 -5
- package/dist/stzh-components/assets/i18n/en.json +9 -5
- package/dist/stzh-components/p-129faf7d.entry.js +2 -0
- package/dist/stzh-components/p-129faf7d.entry.js.map +1 -0
- package/dist/stzh-components/{p-68dee00d.entry.js → p-23678dfc.entry.js} +2 -2
- package/dist/stzh-components/{p-68dee00d.entry.js.map → p-23678dfc.entry.js.map} +1 -1
- package/dist/stzh-components/p-345a1e99.js +2 -0
- package/dist/stzh-components/p-345a1e99.js.map +1 -0
- package/dist/stzh-components/{p-e5a451a0.entry.js → p-646958e0.entry.js} +2 -2
- package/dist/stzh-components/{p-025a5c2e.entry.js → p-66c866e5.entry.js} +2 -2
- package/dist/stzh-components/p-66c866e5.entry.js.map +1 -0
- package/dist/stzh-components/{p-232d017c.entry.js → p-6a3db3bd.entry.js} +2 -2
- package/dist/stzh-components/p-6a3db3bd.entry.js.map +1 -0
- package/dist/stzh-components/{p-ef38e1fe.entry.js → p-6f9626d1.entry.js} +2 -2
- package/dist/stzh-components/p-6f9626d1.entry.js.map +1 -0
- package/dist/stzh-components/p-75143e35.entry.js +2 -0
- package/dist/stzh-components/p-75143e35.entry.js.map +1 -0
- package/dist/stzh-components/{p-8aab9098.entry.js → p-7c5e34db.entry.js} +2 -2
- package/dist/stzh-components/{p-b2986e24.entry.js → p-809076ff.entry.js} +2 -2
- package/dist/stzh-components/p-84cedd61.entry.js +2 -0
- package/dist/stzh-components/p-84cedd61.entry.js.map +1 -0
- package/dist/stzh-components/{p-5bafa548.entry.js → p-84f8307b.entry.js} +2 -2
- package/dist/stzh-components/p-84f8307b.entry.js.map +1 -0
- package/dist/stzh-components/{p-7b2bd184.entry.js → p-8856651e.entry.js} +2 -2
- package/dist/stzh-components/{p-7b2bd184.entry.js.map → p-8856651e.entry.js.map} +1 -1
- package/dist/stzh-components/p-8c5fb0e2.entry.js +2 -0
- package/dist/stzh-components/{p-f156650a.entry.js.map → p-8c5fb0e2.entry.js.map} +1 -1
- package/dist/stzh-components/p-9f91ca1f.entry.js +2 -0
- package/dist/stzh-components/p-9f91ca1f.entry.js.map +1 -0
- package/dist/stzh-components/p-d41803d1.js +2 -0
- package/dist/stzh-components/{p-64ba89a2.js.map → p-d41803d1.js.map} +1 -1
- package/dist/stzh-components/{p-6f0cf6e3.entry.js → p-d97fbf1f.entry.js} +2 -2
- package/dist/stzh-components/p-fa4595c8.entry.js +2 -0
- package/dist/stzh-components/p-fa4595c8.entry.js.map +1 -0
- package/dist/stzh-components/p-fcc75797.entry.js +2 -0
- package/dist/stzh-components/p-fcc75797.entry.js.map +1 -0
- 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-accordion-item/stzh-accordion-item.d.ts +0 -1
- package/dist/types/components/stzh-checkboxgroup/stzh-checkboxgroup.d.ts +3 -3
- package/dist/types/components/stzh-microsite-teaserlist/stzh-microsite-teaserlist.d.ts +2 -2
- package/dist/types/components/stzh-progressbar/stzh-progressbar.d.ts +4 -0
- package/dist/types/components/stzh-upload/models/stzh-photographing-url-details.dto.d.ts +1 -0
- package/dist/types/components/stzh-upload/stzh-upload.d.ts +3 -0
- package/dist/types/components/stzh-upload/stzh-upload.localization.d.ts +2 -0
- package/dist/types/components.d.ts +8 -0
- package/dist/vscode-data.json +4 -0
- package/package.json +9 -5
- package/dist/cjs/axios-69bcb71f.js.map +0 -1
- package/dist/components/p-16892790.js.map +0 -1
- package/dist/components/p-20c7b76b.js +0 -265
- package/dist/components/p-20c7b76b.js.map +0 -1
- package/dist/components/p-2a870524.js.map +0 -1
- package/dist/components/p-3890d846.js.map +0 -1
- package/dist/components/p-d4aabf9c.js.map +0 -1
- package/dist/components/p-e0e4416e.js.map +0 -1
- package/dist/esm/axios-e0a35239.js.map +0 -1
- package/dist/stzh-components/p-025a5c2e.entry.js.map +0 -1
- package/dist/stzh-components/p-11abc40a.entry.js +0 -2
- package/dist/stzh-components/p-11abc40a.entry.js.map +0 -1
- package/dist/stzh-components/p-16892790.js +0 -2
- package/dist/stzh-components/p-16892790.js.map +0 -1
- package/dist/stzh-components/p-232d017c.entry.js.map +0 -1
- package/dist/stzh-components/p-5ac0220a.entry.js +0 -2
- package/dist/stzh-components/p-5ac0220a.entry.js.map +0 -1
- package/dist/stzh-components/p-5bafa548.entry.js.map +0 -1
- package/dist/stzh-components/p-64ba89a2.js +0 -2
- package/dist/stzh-components/p-95427be2.entry.js +0 -2
- package/dist/stzh-components/p-95427be2.entry.js.map +0 -1
- package/dist/stzh-components/p-973c5df2.entry.js +0 -2
- package/dist/stzh-components/p-973c5df2.entry.js.map +0 -1
- package/dist/stzh-components/p-aff2ca5f.entry.js +0 -2
- package/dist/stzh-components/p-aff2ca5f.entry.js.map +0 -1
- package/dist/stzh-components/p-da2c88a2.entry.js +0 -2
- package/dist/stzh-components/p-da2c88a2.entry.js.map +0 -1
- package/dist/stzh-components/p-ef38e1fe.entry.js.map +0 -1
- package/dist/stzh-components/p-f156650a.entry.js +0 -2
- /package/dist/stzh-components/{p-e5a451a0.entry.js.map → p-646958e0.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-8aab9098.entry.js.map → p-7c5e34db.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-b2986e24.entry.js.map → p-809076ff.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-6f0cf6e3.entry.js.map → p-d97fbf1f.entry.js.map} +0 -0
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, c as createEvent, h, F as Fragment, d as Host } from './p-96cf9087.js';
|
|
2
|
-
import { h as hasSlot } from './p-073888ce.js';
|
|
3
|
-
import { d as defineCustomElement$2 } from './p-011c5d9b.js';
|
|
4
|
-
import { d as defineCustomElement$1 } from './p-6e55dee9.js';
|
|
5
|
-
|
|
6
|
-
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,[stzh-hidden].sc-stzh-button-h{display:none}.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-flex;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;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%;min-height:100%;margin:0;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);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;hyphens:auto;white-space:var(--white-space);text-align:center}.stzh-button--not-hyphenated.sc-stzh-button .stzh-button__text.sc-stzh-button{hyphens:none}.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;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);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}";
|
|
7
|
-
|
|
8
|
-
const StzhButton = /*@__PURE__*/ proxyCustomElement(class StzhButton extends H {
|
|
9
|
-
constructor() {
|
|
10
|
-
super();
|
|
11
|
-
this.__registerHost();
|
|
12
|
-
this.stzhFocus = createEvent(this, "stzhFocus", 7);
|
|
13
|
-
this.stzhBlur = createEvent(this, "stzhBlur", 7);
|
|
14
|
-
this.stzhChange = createEvent(this, "stzhChange", 7);
|
|
15
|
-
this.stzhClick = createEvent(this, "stzhClick", 7);
|
|
16
|
-
this.focusedByInput = false;
|
|
17
|
-
this.handleReset = async () => {
|
|
18
|
-
this.checked = this.defaultChecked;
|
|
19
|
-
};
|
|
20
|
-
this.onInput = (event) => {
|
|
21
|
-
this.checked = this.input.checked;
|
|
22
|
-
this.stzhChange.emit({
|
|
23
|
-
component: 'stzh-button',
|
|
24
|
-
originalEvent: event,
|
|
25
|
-
value: this.value,
|
|
26
|
-
checked: this.checked,
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
this.onRootFocus = () => {
|
|
30
|
-
if (!this.focusedByInput) {
|
|
31
|
-
this.button.focus();
|
|
32
|
-
}
|
|
33
|
-
this.focusedByInput = false;
|
|
34
|
-
};
|
|
35
|
-
this.onFocus = (event) => {
|
|
36
|
-
this.focusedByInput = true;
|
|
37
|
-
const focusEvent = new FocusEvent('focus', {
|
|
38
|
-
view: window,
|
|
39
|
-
bubbles: false,
|
|
40
|
-
cancelable: false,
|
|
41
|
-
});
|
|
42
|
-
this.element.dispatchEvent(focusEvent);
|
|
43
|
-
this.stzhFocus.emit({
|
|
44
|
-
component: 'stzh-button',
|
|
45
|
-
originalEvent: event,
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
this.onBlur = (event) => {
|
|
49
|
-
const blurEvent = new FocusEvent('blur', {
|
|
50
|
-
view: window,
|
|
51
|
-
bubbles: false,
|
|
52
|
-
cancelable: false,
|
|
53
|
-
});
|
|
54
|
-
this.element.dispatchEvent(blurEvent);
|
|
55
|
-
this.stzhBlur.emit({
|
|
56
|
-
component: 'stzh-button',
|
|
57
|
-
originalEvent: event,
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
this.onClick = (event) => {
|
|
61
|
-
if (this.disabled) {
|
|
62
|
-
event.stopPropagation();
|
|
63
|
-
event.preventDefault();
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
if (this.disableOnClick) {
|
|
67
|
-
this.disabled = true;
|
|
68
|
-
}
|
|
69
|
-
this.stzhClick.emit({
|
|
70
|
-
component: 'stzh-button',
|
|
71
|
-
originalEvent: event,
|
|
72
|
-
href: this.href,
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
this.localization = undefined;
|
|
77
|
-
this.badge = '';
|
|
78
|
-
this.noHyphenation = false;
|
|
79
|
-
this.badgeType = 'default';
|
|
80
|
-
this.badgePosition = 'button';
|
|
81
|
-
this.badgeEmpty = false;
|
|
82
|
-
this.fullwidth = false;
|
|
83
|
-
this.rounded = false;
|
|
84
|
-
this.size = 'default';
|
|
85
|
-
this.sizeSmall = undefined;
|
|
86
|
-
this.sizeMedium = undefined;
|
|
87
|
-
this.sizeLarge = undefined;
|
|
88
|
-
this.sizeUltra = undefined;
|
|
89
|
-
this.textAlign = 'default';
|
|
90
|
-
this.variant = 'default';
|
|
91
|
-
this.icon = '';
|
|
92
|
-
this.iconPosition = 'left';
|
|
93
|
-
this.checked = false;
|
|
94
|
-
this.defaultChecked = undefined;
|
|
95
|
-
this.name = '';
|
|
96
|
-
this.value = '';
|
|
97
|
-
this.href = '';
|
|
98
|
-
this.rel = undefined;
|
|
99
|
-
this.target = '';
|
|
100
|
-
this.download = undefined;
|
|
101
|
-
this.type = 'button';
|
|
102
|
-
this.disabled = false;
|
|
103
|
-
this.disableOnClick = false;
|
|
104
|
-
this.active = false;
|
|
105
|
-
this.label = '';
|
|
106
|
-
this.effect = 'default';
|
|
107
|
-
this.iconOnly = false;
|
|
108
|
-
this.noPaddingLeft = false;
|
|
109
|
-
this.noPaddingRight = false;
|
|
110
|
-
this.buttonAccesskey = undefined;
|
|
111
|
-
this.buttonId = undefined;
|
|
112
|
-
this.showToggleIcon = false;
|
|
113
|
-
this.a11yLabel = undefined;
|
|
114
|
-
this.a11yDescribedby = '';
|
|
115
|
-
this.a11yExpanded = undefined;
|
|
116
|
-
this.a11yDisabled = undefined;
|
|
117
|
-
this.a11yControls = undefined;
|
|
118
|
-
this.a11yCurrent = undefined;
|
|
119
|
-
this.a11yTabindex = undefined;
|
|
120
|
-
this.analyticsId = undefined;
|
|
121
|
-
}
|
|
122
|
-
resetListener(event) {
|
|
123
|
-
if (event.target.contains(this.element)) {
|
|
124
|
-
requestAnimationFrame(() => {
|
|
125
|
-
this.handleReset();
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
renderIcon(iconUsed) {
|
|
130
|
-
return (h("div", { class: "stzh-button__icon-wrapper" }, this.icon &&
|
|
131
|
-
h("stzh-icon", { class: "stzh-button__icon", name: this.icon }), !this.icon && this.showToggleIcon &&
|
|
132
|
-
h("div", { class: "stzh-button__toggle-icon-wrapper" }, h("div", { class: "stzh-button__toggle-icon" })), !this.icon && !this.showToggleIcon &&
|
|
133
|
-
h("slot", { name: "icon" }), (this.badge || this.badgeEmpty) && this.badgePosition === 'icon' && iconUsed &&
|
|
134
|
-
h("stzh-badge", { class: "stzh-button__badge", label: this.badge, type: this.badgeType })));
|
|
135
|
-
}
|
|
136
|
-
renderContent() {
|
|
137
|
-
return (h("div", { class: "stzh-button__text", ref: (el) => (this.text = el) }, this.rel && this.rel.includes('external') &&
|
|
138
|
-
h("div", { class: "stzh-button__vhidden" }, this.localization.$globals.externalLinkLabel), this.download && h("div", { class: "stzh-button__vhidden" }, this.localization.$globals.downloadLinkLabel), this.label ? this.label : h("slot", null)));
|
|
139
|
-
}
|
|
140
|
-
renderInner(iconUsed) {
|
|
141
|
-
return (h(Fragment, null, h("div", { class: "stzh-button__inner" }, this.type === 'radio' &&
|
|
142
|
-
h("div", { class: "stzh-button__mark" }, h("div", { class: "stzh-button__check" })), this.iconPosition === 'left' && this.renderIcon(iconUsed), this.renderContent(), this.iconPosition === 'right' && this.renderIcon(iconUsed)), (this.badge || this.badgeEmpty) && (this.badgePosition === 'button' || !iconUsed) &&
|
|
143
|
-
h("stzh-badge", { class: "stzh-button__badge", label: this.badge, type: this.badgeType })));
|
|
144
|
-
}
|
|
145
|
-
async componentWillLoad() {
|
|
146
|
-
this.defaultChecked = typeof this.defaultChecked === 'boolean' ? this.defaultChecked : this.checked;
|
|
147
|
-
if (!this.localization) {
|
|
148
|
-
this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'button');
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
componentDidRender() {
|
|
152
|
-
requestAnimationFrame(() => {
|
|
153
|
-
var _a;
|
|
154
|
-
(_a = this.button) === null || _a === void 0 ? void 0 : _a.setAttribute('s-object-id', this.analyticsId || this.text.innerText);
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
render() {
|
|
158
|
-
const iconUsed = hasSlot(this.element, 'icon') || !!this.icon;
|
|
159
|
-
const classes = {
|
|
160
|
-
'stzh-button': true,
|
|
161
|
-
'stzh-button--has-icon': iconUsed,
|
|
162
|
-
'stzh-button--has-icon-only': this.iconOnly,
|
|
163
|
-
'stzh-button--has-badge': !!this.badge,
|
|
164
|
-
'stzh-button--is-rounded': this.rounded,
|
|
165
|
-
'stzh-button--is-fullwidth': this.fullwidth,
|
|
166
|
-
'stzh-button--is-disabled': this.disabled || this.a11yDisabled,
|
|
167
|
-
'stzh-button--is-active': this.active,
|
|
168
|
-
'stzh-button--is-expanded': this.a11yExpanded,
|
|
169
|
-
'stzh-button--not-hyphenated': this.noHyphenation,
|
|
170
|
-
[`stzh-button--effect-${this.effect}`]: !!this.effect,
|
|
171
|
-
[`stzh-button--badge-position-${this.badgePosition}`]: !!this.badgePosition,
|
|
172
|
-
[`stzh-button--align-${this.textAlign}`]: !!this.textAlign,
|
|
173
|
-
[`stzh-button--type-${this.type}`]: !!this.type,
|
|
174
|
-
[`stzh-button--${this.variant}`]: !!this.variant,
|
|
175
|
-
};
|
|
176
|
-
return (h(Host, { tabindex: this.disabled ? null : '-1', onFocus: this.onRootFocus }, this.href ?
|
|
177
|
-
h("a", { ref: (el) => (this.button = el), href: this.disabled ? null : this.href, rel: this.rel, download: this.download, target: this.target, class: classes, "aria-label": this.a11yLabel || null, "aria-describedby": this.a11yDescribedby || null, "aria-disabled": typeof this.a11yDisabled !== 'undefined'
|
|
178
|
-
? (this.a11yDisabled ? 'true' : 'false') : null, "aria-expanded": typeof this.a11yExpanded !== 'undefined'
|
|
179
|
-
? (this.a11yExpanded ? 'true' : 'false') : null, "aria-controls": this.a11yControls || null, "aria-current": this.a11yCurrent || null, id: this.buttonId, accessKey: this.buttonAccesskey, tabindex: this.a11yTabindex, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick }, this.renderInner(iconUsed))
|
|
180
|
-
:
|
|
181
|
-
this.type === 'radio' ?
|
|
182
|
-
h("label", { ref: (el) => (this.button = el), class: classes, onClick: this.onClick }, h("input", { ref: (el) => (this.input = el), type: "radio", class: "stzh-button__input", name: this.name, value: this.value, defaultChecked: this.defaultChecked, checked: this.checked, disabled: this.disabled, "aria-label": this.a11yLabel || null, "aria-describedby": this.a11yDescribedby || null, "aria-disabled": typeof this.a11yDisabled !== 'undefined'
|
|
183
|
-
? (this.a11yDisabled ? 'true' : 'false') : null, "aria-expanded": typeof this.a11yExpanded !== 'undefined'
|
|
184
|
-
? (this.a11yExpanded ? 'true' : 'false') : null, "aria-controls": this.a11yControls || null, "aria-current": this.a11yCurrent || null, id: this.buttonId, accessKey: this.buttonAccesskey, tabindex: this.a11yTabindex, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, onInput: this.onInput }), this.renderInner(iconUsed))
|
|
185
|
-
:
|
|
186
|
-
h("button", { ref: (el) => (this.button = el), class: classes, type: this.type, name: this.name, value: this.value, disabled: this.disabled, "aria-label": this.a11yLabel || null, "aria-describedby": this.a11yDescribedby || null, "aria-disabled": typeof this.a11yDisabled !== 'undefined'
|
|
187
|
-
? (this.a11yDisabled ? 'true' : 'false') : null, "aria-expanded": typeof this.a11yExpanded !== 'undefined'
|
|
188
|
-
? (this.a11yExpanded ? 'true' : 'false') : null, "aria-controls": this.a11yControls || null, "aria-current": this.a11yCurrent || null, id: this.buttonId, accessKey: this.buttonAccesskey, tabindex: this.a11yTabindex, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick }, this.renderInner(iconUsed))));
|
|
189
|
-
}
|
|
190
|
-
get element() { return this; }
|
|
191
|
-
static get style() { return stzhButtonCss; }
|
|
192
|
-
}, [6, "stzh-button", {
|
|
193
|
-
"localization": [16],
|
|
194
|
-
"badge": [1],
|
|
195
|
-
"noHyphenation": [4, "no-hyphenation"],
|
|
196
|
-
"badgeType": [513, "badge-type"],
|
|
197
|
-
"badgePosition": [513, "badge-position"],
|
|
198
|
-
"badgeEmpty": [516, "badge-empty"],
|
|
199
|
-
"fullwidth": [516],
|
|
200
|
-
"rounded": [516],
|
|
201
|
-
"size": [513],
|
|
202
|
-
"sizeSmall": [513, "size-small"],
|
|
203
|
-
"sizeMedium": [513, "size-medium"],
|
|
204
|
-
"sizeLarge": [513, "size-large"],
|
|
205
|
-
"sizeUltra": [513, "size-ultra"],
|
|
206
|
-
"textAlign": [513, "text-align"],
|
|
207
|
-
"variant": [513],
|
|
208
|
-
"icon": [1],
|
|
209
|
-
"iconPosition": [513, "icon-position"],
|
|
210
|
-
"checked": [1540],
|
|
211
|
-
"defaultChecked": [1028, "default-checked"],
|
|
212
|
-
"name": [513],
|
|
213
|
-
"value": [1025],
|
|
214
|
-
"href": [1],
|
|
215
|
-
"rel": [1],
|
|
216
|
-
"target": [1],
|
|
217
|
-
"download": [1],
|
|
218
|
-
"type": [1],
|
|
219
|
-
"disabled": [516],
|
|
220
|
-
"disableOnClick": [4, "disable-on-click"],
|
|
221
|
-
"active": [516],
|
|
222
|
-
"label": [1],
|
|
223
|
-
"effect": [1],
|
|
224
|
-
"iconOnly": [516, "icon-only"],
|
|
225
|
-
"noPaddingLeft": [516, "no-padding-left"],
|
|
226
|
-
"noPaddingRight": [516, "no-padding-right"],
|
|
227
|
-
"buttonAccesskey": [1, "button-accesskey"],
|
|
228
|
-
"buttonId": [1, "button-id"],
|
|
229
|
-
"showToggleIcon": [516, "show-toggle-icon"],
|
|
230
|
-
"a11yLabel": [1, "a11y-label"],
|
|
231
|
-
"a11yDescribedby": [1, "a11y-describedby"],
|
|
232
|
-
"a11yExpanded": [516, "a11y-expanded"],
|
|
233
|
-
"a11yDisabled": [516, "a11y-disabled"],
|
|
234
|
-
"a11yControls": [1, "a11y-controls"],
|
|
235
|
-
"a11yCurrent": [1, "a11y-current"],
|
|
236
|
-
"a11yTabindex": [1, "a11y-tabindex"],
|
|
237
|
-
"analyticsId": [1, "analytics-id"]
|
|
238
|
-
}, [[4, "reset", "resetListener"]]]);
|
|
239
|
-
function defineCustomElement() {
|
|
240
|
-
if (typeof customElements === "undefined") {
|
|
241
|
-
return;
|
|
242
|
-
}
|
|
243
|
-
const components = ["stzh-button", "stzh-badge", "stzh-icon"];
|
|
244
|
-
components.forEach(tagName => { switch (tagName) {
|
|
245
|
-
case "stzh-button":
|
|
246
|
-
if (!customElements.get(tagName)) {
|
|
247
|
-
customElements.define(tagName, StzhButton);
|
|
248
|
-
}
|
|
249
|
-
break;
|
|
250
|
-
case "stzh-badge":
|
|
251
|
-
if (!customElements.get(tagName)) {
|
|
252
|
-
defineCustomElement$2();
|
|
253
|
-
}
|
|
254
|
-
break;
|
|
255
|
-
case "stzh-icon":
|
|
256
|
-
if (!customElements.get(tagName)) {
|
|
257
|
-
defineCustomElement$1();
|
|
258
|
-
}
|
|
259
|
-
break;
|
|
260
|
-
} });
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EACtC,EAAE,EAAE,IAAI,CAAC,QAAQ,EACjB,SAAS,EAAE,IAAI,CAAC,eAAe,EAC/B,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,OAAO,EAAE,IAAI,CAAC,OAAO,IAEpB,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CACpB,CAER,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-button/stzh-button.scss?tag=stzh-button&encapsulation=scoped","src/components/stzh-button/stzh-button.tsx"],"sourcesContent":["/**\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-flex;\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 min-height: 100%;\n margin: 0;\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 &--not-hyphenated &__text {\n hyphens: none;\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 { Component, Element, Event, EventEmitter, Fragment, h, Host, Listen, Prop } from '@stencil/core';\n\nimport {\n StzhBadgeType,\n StzhButtonBlurEvent,\n StzhButtonChangeEvent,\n StzhButtonClickEvent,\n StzhButtonFocusEvent,\n StzhButtonSize,\n StzhButtonVariant,\n StzhLocaleComponent,\n} from '../../index';\n\nimport { hasSlot } from '../../utils/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 /** Disable hyphenation for text inside button */\n @Prop() noHyphenation: boolean = false;\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 (above small breakpoint) */\n @Prop({ reflect: true }) sizeSmall: StzhButtonSize;\n\n /** Size variant (above medium breakpoint) */\n @Prop({ reflect: true }) sizeMedium: StzhButtonSize;\n\n /** Size variant (above large breakpoint) */\n @Prop({ reflect: true }) sizeLarge: StzhButtonSize;\n\n /** Size variant (above 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 to disable the button on click or not */\n @Prop() disableOnClick: 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 /** Focus event */\n @Event() stzhFocus: EventEmitter<StzhButtonFocusEvent>;\n\n /** Blur event */\n @Event() stzhBlur: EventEmitter<StzhButtonBlurEvent>;\n\n /** Change event (only called if type is radio) */\n @Event() stzhChange: EventEmitter<StzhButtonChangeEvent>;\n\n /** Click event */\n @Event() stzhClick: EventEmitter<StzhButtonClickEvent>;\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 } else {\n if (this.disableOnClick) {\n this.disabled = true;\n }\n this.stzhClick.emit({\n component: 'stzh-button',\n originalEvent: event,\n href: this.href,\n });\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') &&\n <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 class=\"stzh-button__inner\">\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 ></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--not-hyphenated': this.noHyphenation,\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"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-2a870524.js","mappings":";;;;;;;AAAA,MAAM,oBAAoB,GAAG,q1bAAq1b;;ACkBl3b,MAAM,cAAc,GAAG;EACrB,SAAS,EAAE;IACT,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE;IAC7B,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE;GACjC;EACD,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE;CAC7C,CAAC;AAEF,MAAM,cAAc,GAAG;EACrB,SAAS,EAAE;IACT,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE;IAChC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE;GAC9B;EACD,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE;CAC7C,CAAC;AAEF,IAAI,oBAAoB,GAAG,CAAC,CAAC;MAWhB,iBAAiB;;;;;;;;;;;IA2LpB,oBAAe,GAAY,KAAK,CAAC;IAMjC,mBAAc,GAAY,KAAK,CAAC;IAChC,iBAAY,GAAY,KAAK,CAAC;IAE9B,wBAAmB,GAAG,CAAC,MAAoD;MACjF,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KACnC,CAAC;IAEM,sBAAiB,GAAG;MAC1B,IAAI,OAAO,IAAI,CAAC,WAAW,KAAK,WAAW,EAAE;QAC3C,IAAI,IAAI,CAAC,WAAW,EAAE;UACpB,IAAI,CAAC,MAAM,EAAE,CAAC;SACf;aAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;UACrB,IAAI,CAAC,IAAI,EAAE,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;;;;;;","names":[],"sources":["src/components/stzh-accordion-item/stzh-accordion-item.scss?tag=stzh-accordion-item&encapsulation=shadow","src/components/stzh-accordion-item/stzh-accordion-item.tsx"],"sourcesContent":["/**\n * @prop --content-background: Content background\n *\n * @prop --stzh-accordion-content-background: **Global**: Content background\n * @prop --stzh-accordion-button-color: **Global**: Button label background\n */\n\n:host {\n --trigger-size: 18px;\n --trigger-color: currentColor;\n --content-background: #{$accordionContentBackground};\n --icon-size: #{iconSize()};\n --button-color: var(--stzh-accordion-button-color, #{$colorPrimary70});\n --button-background-color: #{$colorSecondary30};\n\n --hover-button-color: var(--button-color);\n --hover-button-background-color: #{$colorSecondary40};\n --hover-trigger-color: var(--trigger-color);\n\n --transition-duration: 200ms;\n\n @media print {\n page-break-inside: avoid;\n break-inside: avoid;\n }\n\n @include highContrast() {\n --trigger-color: CanvasText;\n\n --hover-trigger-color: CanvasText;\n }\n}\n\n/* Table */\n:host(:where([is-variant=\"table\"])) {\n --trigger-size: #{iconSize()};\n --content-background: #{$colorGrey10};\n --button-background-color: #{$colorGrey20};\n --trigger-color: #{$colorBlack};\n\n --hover-button-background-color: #{$colorGrey30};\n\n @include highContrast() {\n --trigger-color: CanvasText;\n\n --hover-trigger-color: CanvasText;\n }\n}\n\n/* Disabled */\n\n:host(:where([disabled]:not([disabled=\"false\"]))) {\n --button-color: #{$colorGrey80};\n --button-background-color: #{$colorGrey20};\n --trigger-color: #{$colorGrey80};\n\n --hover-button-color: var(--button-color);\n --hover-button-background-color: var(--button-background-color);\n --hover-trigger-color: var(--trigger-color);\n}\n\n.stzh-accordion-item {\n &__heading {\n position: relative;\n margin: 0;\n }\n\n &__button {\n @include fontCurve('p1');\n @include spaceCurve('padding-top', 'regular');\n @include spaceCurve('padding-bottom', 'regular');\n font-family: inherit;\n width: 100%;\n appearance: none;\n display: flex;\n align-items: center;\n min-height: 60px;\n color: var(--button-color);\n background-color: var(--button-background-color);\n text-align: left;\n border: none;\n transition-property: background-color;\n transition-duration: var(--transition-duration);\n cursor: pointer;\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n\n &:hover {\n color: var(--hover-button-color);\n background-color: var(--hover-button-background-color);\n }\n }\n\n &__button,\n &__content-inner {\n @include spaceCurve('padding-left', 'regular');\n @include spaceCurve('padding-right', 'regular');\n }\n\n &__button-text {\n flex-grow: 1;\n }\n\n &__button-icon {\n &.is-default {\n position: relative;\n display: block;\n width: var(--trigger-size);\n height: var(--trigger-size);\n margin-left: space('medium');\n\n &::before,\n &::after {\n position: absolute;\n top: 50%;\n left: 50%;\n content: '';\n display: block;\n width: var(--trigger-size);\n height: 2.5px;\n transition-property: transform, background-color;\n transition-duration: var(--transition-duration);\n transform-origin: top left;\n background-color: var(--trigger-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 &.is-table {\n --size: var(--trigger-size);\n\n transition-property: transform, color;\n transition-duration: var(--transition-duration);\n color: var(--trigger-color);\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n }\n\n &__button:hover &__button-icon {\n &.is-default {\n &::before,\n &::after {\n background-color: var(--hover-trigger-color);\n }\n }\n\n &.is-table {\n color: var(--hover-trigger-color);\n }\n }\n\n &__content {\n overflow: hidden;\n background-color: var(--content-background);\n\n @media print {\n height: auto !important;\n overflow: visible !important;\n display: block !important;\n }\n }\n\n &__content-inner {\n @include spaceCurve('padding-top', 'medium');\n @include spaceCurve('padding-bottom', 'medium');\n }\n\n &__icon-wrapper {\n --stzh-icon-size: var(--icon-size);\n\n align-self: flex-start;\n }\n\n &__badge {\n position: absolute;\n right: -5px;\n top: -5px;\n }\n\n &__description {\n @include fontCurve('caption');\n }\n\n &__heading-text,\n &__description,\n &__subtitle {\n display: block;\n }\n\n &__subtitle {\n @include fontCurve('p2');\n }\n\n /* Has icon */\n\n &--has-icon &__icon-wrapper {\n margin-right: space('xsmall');\n }\n\n /* Title Variant / Subtitle */\n\n &--title &__heading-text,\n &--has-subtitle &__heading-text {\n @include font('title');\n @include fontCurve('h3', 'heading');\n }\n\n &--title &__subtitle:not(:empty) + &__heading-text,\n &--has-subtitle &__subtitle:not(:empty) + &__heading-text {\n @include spaceCurve('margin-top', 'tiny');\n\n @include mq($from: medium) {\n margin-top: space('xsmall');\n }\n }\n\n /* Open */\n\n &--is-open &__button-icon {\n &.is-default {\n &::before,\n &::after {\n transform: rotate(0) translate(-50%, -50%);\n }\n }\n\n &.is-table {\n transform: rotate(180deg);\n }\n }\n\n /* Table Variant */\n\n &--table &__button,\n &--table &__content-inner {\n padding-left: space('medium');\n padding-right: space('medium');\n }\n\n &__button {\n @include fontSize('milli');\n padding-top: space('medium');\n padding-bottom: space('medium');\n min-height: 56px;\n }\n\n &--table &__content-inner {\n @include spaceCurve('padding-top', 'tiny');\n @include spaceCurve('padding-bottom', 'regular');\n }\n\n &--table &__heading-text {\n @include font('heavy');\n }\n\n /* Disabled */\n\n &--is-disabled &__button {\n cursor: not-allowed;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Listen, Method, Prop, State, Watch } from \"@stencil/core\";\n\nimport {\n StzhAccordionItemBlurEvent,\n StzhAccordionItemClosedEvent,\n StzhAccordionItemCloseEvent,\n StzhAccordionItemFocusEvent,\n StzhAccordionItemOpenedEvent,\n StzhAccordionItemOpenEvent,\n StzhAccordionVariant,\n StzhAccordionVariantChangeEvent,\n StzhBadgeType,\n} from \"../../index\";\n\nimport { waitForEvent } from \"../../utils/event-utils\";\nimport { animateTo, shimKeyframesAutoValues, stopAnimations } from \"../../utils/animation-utils\";\nimport { hasSlot } from \"../../utils/utils\";\n\nconst ANIMATION_SHOW = {\n keyframes: [\n { height: \"0\", opacity: \"0\" },\n { height: \"auto\", opacity: \"1\" },\n ],\n options: { duration: 300, easing: \"linear\" },\n};\n\nconst ANIMATION_HIDE = {\n keyframes: [\n { height: \"auto\", opacity: \"1\" },\n { height: \"0\", opacity: \"0\" },\n ],\n options: { duration: 300, easing: \"linear\" },\n};\n\nlet accordionItemCounter = 0;\n\n/**\n * @slot - Slot for any content\n * @slot icon - Slot for icon element\n */\n@Component({\n tag: \"stzh-accordion-item\",\n styleUrl: \"stzh-accordion-item.scss\",\n shadow: true,\n})\nexport class StzhAccordionItem {\n /** Variant (overwrites variant from accordion parent) */\n @Prop() variant: StzhAccordionVariant;\n\n /** Whether fold is collapsible (overwrites collapsible from accordion parent) */\n @Prop() collapsible: boolean;\n\n /** Whether fold is open */\n @Prop({ mutable: true, reflect: true }) open: boolean = false;\n\n /** Whether fold disabled */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Heading title */\n @Prop() heading: string = \"\";\n\n /** Subtitle */\n @Prop() subtitle: string = \"\";\n\n /** Description */\n @Prop() description: string = \"\";\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string = \"\";\n\n /** Badge */\n @Prop() badge: string = \"\";\n\n /** Whether badge should be displayed empty */\n @Prop({ reflect: true }) badgeEmpty: boolean = false;\n\n /** Badge type */\n @Prop({ reflect: true }) badgeType: StzhBadgeType = \"default\";\n\n /** Heading level, for accessibility, no visual impact */\n @Prop({ reflect: true }) headingLevel: \"1\" | \"2\" | \"3\" | \"4\" = \"3\";\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the button element.\n * Default value will be taken from `heading` prop.\n */\n @Prop() analyticsId: string;\n\n @Element() element: HTMLStzhAccordionItemElement;\n\n /** Open event */\n @Event() stzhOpen: EventEmitter<StzhAccordionItemOpenEvent>;\n\n /** Opened event (after animation) */\n @Event() stzhOpened: EventEmitter<StzhAccordionItemOpenedEvent>;\n\n /** Close event */\n @Event() stzhClose: EventEmitter<StzhAccordionItemCloseEvent>;\n\n /** Closed event (after animation) */\n @Event() stzhClosed: EventEmitter<StzhAccordionItemClosedEvent>;\n\n @Watch(\"variant\")\n variantWatcher(newValue: StzhAccordionVariant) {\n if (typeof newValue !== \"undefined\") {\n this._variant = newValue;\n } else if (this.accordion) {\n this._variant = this.accordion.variant;\n }\n }\n\n @Watch(\"open\")\n async openWatcher(newValue: boolean) {\n if (!this.bodyElement) {\n return;\n }\n\n if (newValue) {\n if (this.toggledByMethod) {\n this.stzhOpen.emit({\n component: \"stzh-accordion-item\",\n });\n }\n\n await stopAnimations(this.bodyElement);\n this.bodyElement.hidden = false;\n\n await animateTo(\n this.bodyElement,\n shimKeyframesAutoValues(ANIMATION_SHOW.keyframes, {\n height: this.bodyElement.scrollHeight,\n }),\n ANIMATION_SHOW.options\n );\n\n this.bodyElement.style.height = \"auto\";\n this.bodyElement.style.overflow = \"visible\";\n\n if (this.toggledByMethod) {\n this.stzhOpened.emit({\n component: \"stzh-accordion-item\",\n });\n }\n } else {\n if (this.toggledByMethod) {\n this.stzhClose.emit({\n component: \"stzh-accordion-item\",\n });\n }\n\n await stopAnimations(this.bodyElement);\n this.bodyElement.style.overflow = \"hidden\";\n\n await animateTo(\n this.bodyElement,\n shimKeyframesAutoValues(ANIMATION_HIDE.keyframes, {\n height: this.bodyElement.scrollHeight,\n }),\n ANIMATION_HIDE.options\n );\n\n this.bodyElement.hidden = true;\n this.bodyElement.style.height = \"0px\";\n\n if (this.toggledByMethod) {\n this.stzhClosed.emit({\n component: \"stzh-accordion-item\",\n });\n }\n }\n\n this.toggledByMethod = false;\n }\n\n /** Show accordion item content */\n @Method()\n async show() {\n if (this.open || this.disabled) {\n return;\n }\n\n this.toggledByMethod = true;\n this.open = true;\n return waitForEvent(this.element, \"stzhOpened\");\n }\n\n /** Hide accordion item content */\n @Method()\n async hide() {\n if (!this.open || this.disabled) {\n return;\n }\n\n this.toggledByMethod = true;\n this.open = false;\n return waitForEvent(this.element, \"stzhClosed\");\n }\n\n /** Toggle accordion item content */\n @Method()\n async toggle() {\n if (this.open) {\n return await this.hide();\n } else {\n return await this.show();\n }\n }\n\n /** Focus event */\n @Event() stzhFocus: EventEmitter<StzhAccordionItemFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhAccordionItemBlurEvent>;\n\n @Listen(\"keydown\", { target: \"document\", capture: true })\n handleKeydown(event: KeyboardEvent) {\n if (event.key === \"Shift\") {\n this.shiftPressed = true;\n }\n }\n\n @Listen(\"keyup\", { target: \"document\", capture: true })\n handleKeyup(event: KeyboardEvent) {\n if (event.key === \"Shift\") {\n this.shiftPressed = false;\n }\n }\n\n @State() rootTabindex: number = 0;\n @State() _variant: StzhAccordionVariant;\n\n private toggledByMethod: boolean = false;\n private bodyElement: HTMLDivElement;\n private buttonElement: HTMLButtonElement;\n private iconWrapperElement: HTMLDivElement;\n private accordionItemId: string;\n private accordion: HTMLStzhAccordionElement;\n private focusedByInput: boolean = false;\n private shiftPressed: boolean = false;\n\n private handleVariantChange = (_event: CustomEvent<StzhAccordionVariantChangeEvent>) => {\n this.variantWatcher(this.variant);\n };\n\n private handleHeaderClick = () => {\n if (typeof this.collapsible !== \"undefined\") {\n if (this.collapsible) {\n this.toggle();\n } else if (!this.open) {\n this.show();\n }\n } else if (!this.accordion || this.accordion.collapsible) {\n this.toggle();\n } else if (!this.open) {\n this.show();\n }\n };\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.buttonElement.focus();\n }\n\n this.focusedByInput = false;\n };\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n if (this.shiftPressed) {\n // user presses currently shift\n this.rootTabindex = -1;\n }\n\n this.stzhFocus.emit({\n component: \"stzh-accordion-item\",\n originalEvent: event,\n });\n };\n\n private onBlur = (event: FocusEvent) => {\n this.rootTabindex = 0;\n\n this.stzhBlur.emit({\n component: \"stzh-accordion-item\",\n originalEvent: event,\n });\n };\n\n private onButtonKeydown = (event: KeyboardEvent) => {\n let action = null;\n\n if (event.key === \"ArrowDown\") {\n action = \"next\";\n } else if (event.key === \"ArrowUp\") {\n action = \"prev\";\n } else if (event.key === \"Home\") {\n action = \"first\";\n } else if (event.key === \"End\") {\n action = \"last\";\n } else if (event.key === \"PageDown\" && event.ctrlKey) {\n action = \"next\";\n } else if (event.key === \"PageUp\" && event.ctrlKey) {\n action = \"prev\";\n }\n\n if (event.key === \"Shift\") {\n this.rootTabindex = -1;\n }\n\n if (action) {\n event.preventDefault();\n this.accordion.setItemFocus(this.element, action);\n }\n };\n\n private onContentKeydown = (event: KeyboardEvent) => {\n if (!event.ctrlKey) {\n return;\n }\n\n let action = null;\n\n if (event.key === \"PageDown\") {\n action = \"next\";\n } else if (event.key === \"PageUp\") {\n action = \"prev\";\n }\n\n if (action) {\n event.preventDefault();\n this.accordion.setItemFocus(this.element, action);\n }\n };\n\n componentWillLoad() {\n this.accordionItemId = `stzh-accordion-item-${accordionItemCounter++}`;\n }\n\n componentDidLoad() {\n this.bodyElement.hidden = !this.open;\n this.bodyElement.style.height = this.open ? \"auto\" : \"0px\";\n this.bodyElement.style.overflow = this.open ? \"visible\" : \"hidden\";\n }\n\n async connectedCallback() {\n this.accordion = this.element.closest(\"stzh-accordion\");\n\n if (this.accordion) {\n this.accordion.addEventListener(\"stzhVariantChange\", this.handleVariantChange);\n }\n\n this.variantWatcher(this.variant);\n }\n\n disconnectedCallback() {\n if (this.accordion) {\n this.accordion.removeEventListener(\"stzhVariantChange\", this.handleVariantChange);\n this.accordion = null;\n }\n }\n\n render() {\n let hasIcon = hasSlot(this.element, \"icon\") || !!this.icon;\n if (this.iconWrapperElement) {\n hasIcon = hasSlot(this.iconWrapperElement, \"icon\") || !!this.icon;\n }\n\n const Heading = `h${this.headingLevel}`;\n const classes = {\n \"stzh-accordion-item\": true,\n \"stzh-accordion-item--has-icon\": hasIcon,\n \"stzh-accordion-item--has-description\": !!this.description,\n \"stzh-accordion-item--has-subtitle\": !!this.subtitle,\n \"stzh-accordion-item--is-open\": this.open,\n \"stzh-accordion-item--is-disabled\": this.disabled,\n [`stzh-accordion-item--${this._variant}`]: !!this._variant,\n };\n\n return (\n <Host tabindex={this.disabled ? null : this.rootTabindex} onFocus={this.onRootFocus} is-variant={this._variant}>\n <div class={classes}>\n <Heading\n id={`${this.accordionItemId}-header`}\n class=\"stzh-accordion-item__heading\"\n onClick={this.handleHeaderClick}\n >\n <button\n ref={el => (this.buttonElement = el as HTMLButtonElement)}\n class=\"stzh-accordion-item__button\"\n aria-controls={`${this.accordionItemId}-content`}\n aria-expanded={`${this.open ? \"true\" : \"false\"}`}\n disabled={this.disabled}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onKeyDown={this.onButtonKeydown}\n type=\"button\"\n s-object-id={this.analyticsId || this.heading}\n >\n <span\n class=\"stzh-accordion-item__icon-wrapper\"\n ref={el => (this.iconWrapperElement = el as HTMLDivElement)}\n >\n {this.icon ? (\n <stzh-icon class=\"stzh-accordion-item__icon\" name={this.icon}></stzh-icon>\n ) : (\n <slot name=\"icon\"></slot>\n )}\n </span>\n <span class=\"stzh-accordion-item__button-text\">\n <span class=\"stzh-accordion-item__subtitle\">{this.subtitle}</span>\n <span class=\"stzh-accordion-item__heading-text\">{this.heading}</span>\n <span class=\"stzh-accordion-item__description\">{this.description}</span>\n </span>\n {this._variant === \"table\" ? (\n <stzh-icon name=\"angle-down\" class=\"stzh-accordion-item__button-icon is-table\"></stzh-icon>\n ) : (\n <span class=\"stzh-accordion-item__button-icon is-default\"></span>\n )}\n\n {(this.badge || this.badgeEmpty) && (\n <stzh-badge class=\"stzh-accordion-item__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n )}\n </button>\n </Heading>\n <div\n id={`${this.accordionItemId}-content`}\n ref={el => (this.bodyElement = el as HTMLDivElement)}\n class=\"stzh-accordion-item__content\"\n aria-labelledby={`${this.accordionItemId}-header`}\n role=\"region\"\n onKeyDown={this.onContentKeydown}\n >\n <div class=\"stzh-accordion-item__content-inner\">\n <slot></slot>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-3890d846.js","mappings":";;;;;;;;;AAAA,MAAM,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,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAO,CACnF,CACZ,EACD,EAAC,UAAU,IACT,IAAI,EAAE,eAAe,GAAG,IAAI,GAAG,cAAc,iBAChC,eAAe,GAAG,IAAI,GAAG,MAAM,EAC5C,QAAQ,EAAC,IAAI,EACb,KAAK,EAAE;QACL,iCAAiC,EAAE,IAAI;QACvC,WAAW,EAAE,QAAQ;QACrB,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ;OACzC,EACD,IAAI,EAAE,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,EACvC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,GAAG,IAAI,EACrC,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,EAC3C,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,IAE9C,eAAe;OACb,IAAI,CAAC,WAAW,IACf,oBAAc,OAAO,EAAE,IAAI,CAAC,WAAW,IAAG,YAAY,EAAE,CAAgB,KAExE,YAAY,EAAE,CACf,CAAC,CACO,EAEb,WAAK,KAAK,EAAC,4BAA4B,GAAO,CAC1C,EAEN,WAAK,KAAK,EAAC,4BAA4B,IACrC,WAAK,KAAK,EAAC,kCAAkC,IAC3C,eAAa,CACT,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-datalist-item/stzh-datalist-item.scss?tag=stzh-datalist-item&encapsulation=scoped","src/components/stzh-datalist-item/stzh-datalist-item.tsx"],"sourcesContent":[":host {\n --value-font-family: var(--stzh-font-family-medium);\n --value-font-weight: var(--stzh-font-weight-medium);\n --value-color: inherit;\n --action-display: flex;\n --leading-icon-color: #{$colorGrey90};\n --nested-display: var(--stzh-datalist-item-nested-display, block);\n --wrapper-display: var(--stzh-datalist-item-wrapper-display, contents);\n\n --text-overflow: ellipsis;\n --white-space: nowrap;\n --overflow: hidden;\n --max-width: 100%;\n\n display: contents;\n\n &[href]:not([href=\"\"]),\n &[a11y-expanded],\n &[a11y-controls] {\n --value-color: #{$linkColor};\n --value-hover-color: #{$linkHoverColor};\n }\n}\n\n:host(.no-text-truncate) {\n --text-overflow: clip;\n --white-space: normal;\n --overflow: visible;\n --width: initial;\n --max-width: initial;\n}\n\n.stzh-datalist-item {\n position: relative;\n text-decoration-line: none;\n display: flex;\n align-items: center;\n\n &__nested {\n display: contents;\n }\n\n &__nested-inner {\n display: var(--nested-display);\n grid-column: var(--full-grid-column);\n }\n\n &__vhidden {\n @include visuallyhidden;\n }\n\n &__wrapper {\n flex-grow: 1;\n display: grid;\n }\n\n &__leading,\n &__value,\n &__label,\n &__meta,\n &__action-list {\n color: inherit;\n display: flex;\n text-align: left;\n appearance: none;\n font-family: inherit;\n background: transparent;\n border: none;\n padding: 0;\n text-decoration-line: none;\n\n &.is-button,\n &.is-link {\n cursor: pointer;\n }\n }\n\n &__leading {\n flex-shrink: 0;\n\n &:not(:empty) {\n padding-right: space('xsmall');\n }\n }\n\n &__leading-icon-container {\n color: var(--leading-icon-color);\n transition-property: color, background-color;\n transition-duration: $baseTransitionAnimationSpeed;\n }\n\n &__value-wrapper {\n display: flex;\n align-items: center;\n gap: space('xsmall');\n color: var(--value-color);\n transition: color $baseTransitionAnimationSpeed;\n }\n\n &__value {\n flex-grow: 1;\n flex-direction: column;\n }\n\n &__value-text {\n --color: initial;\n\n @include fontCurve('p1');\n font-family: var(--value-font-family);\n font-weight: var(--value-font-weight);\n width: auto;\n }\n\n &__label,\n &__meta {\n @include fontCurve('caption');\n }\n\n &__meta {\n justify-content: flex-end;\n }\n\n &__meta-text {\n display: flex;\n gap: space('xsmall');\n color: $colorGrey70;\n }\n\n &__label {\n color: $colorGrey90;\n }\n\n &__action-list {\n display: var(--action-display);\n justify-content: center;\n text-align: center;\n\n &:not(:empty) {\n padding-left: space('medium');\n }\n }\n\n &__action {\n &.is-non-interactive {\n display: flex;\n justify-content: center;\n align-items: center;\n width: $formInputHeightSmall;\n height: $formInputHeightSmall;\n }\n }\n\n &__interactive {\n position: absolute;\n top: 0;\n left: 0;\n }\n\n &__readspeaker {\n width: fit-content;\n }\n\n /* Button variant */\n\n &--is-button &__icon.is-open {\n display: none;\n }\n\n &--is-button#{&}--is-expanded &__icon {\n &.is-closed {\n display: none;\n }\n\n &.is-open {\n display: inline-flex;\n }\n }\n\n /* Interactive variant */\n\n &--is-interactive &__value-text {\n text-decoration-line: underline;\n }\n\n &--is-interactive:hover &__value-wrapper {\n color: var(--value-hover-color);\n }\n\n &--direction-vertical &__wrapper {\n flex-grow: inherit;\n }\n\n &--direction-vertical &__leading,\n &--direction-vertical &__wrapper,\n &--direction-vertical &__action-list {\n &:not(:empty) {\n padding-top: space('xsmall');\n padding-bottom: space('xsmall');\n }\n }\n\n &--direction-vertical &__meta {\n flex-direction: column;\n align-items: flex-start;\n }\n\n /* Horizontal / Table Variant */\n\n &--direction-horizontal &__leading,\n &--direction-horizontal &__value,\n &--direction-horizontal &__action-list {\n &:not(:empty) {\n padding-top: space('xxsmall');\n padding-bottom: space('xxsmall');\n }\n }\n\n &--direction-horizontal &__meta {\n padding-bottom: space('xxsmall');\n padding-top: calc(#{space('xxsmall')} + 12px);\n }\n\n &--direction-horizontal &__readspeaker {\n padding-bottom: space('xxsmall');\n padding-top: space('xxsmall');\n padding-left: space('medium');\n }\n\n &--direction-horizontal &__meta {\n &:not(:empty) {\n padding-left: space('xsmall');\n }\n }\n\n &--direction-horizontal &__meta-status + &__meta-text {\n margin-left: space('xsmall');\n }\n\n /** Table Variant */\n\n &--table &__label,\n &--table &__meta {\n @include fontSize('nano');\n }\n\n &--table &__label {\n color: $colorGrey70;\n }\n\n &--table &__value-text {\n @include fontSize('milli');\n }\n\n &--table &__leading,\n &--table &__value,\n &--table &__label,\n &--table &__meta,\n &--table &__action-list {\n &:not(:empty) {\n padding-top: space('xsmall');\n padding-bottom: space('small');\n }\n }\n\n &--table &__label:not(:empty) + &__value {\n padding-left: space('medium');\n }\n\n &--table &__meta {\n &:not(:empty) {\n padding-left: space('medium');\n }\n }\n\n /** Big label */\n\n &--table#{&}--big-label &__label {\n @include font('heavy');\n @include fontSize('milli');\n color: $colorGrey80;\n }\n\n &--table#{&}--big-label &__leading,\n &--table#{&}--big-label &__value,\n &--table#{&}--big-label &__label,\n &--table#{&}--big-label &__meta,\n &--table#{&}--big-label &__action-list {\n &:not(:empty) {\n padding-top: 0;\n padding-bottom: 0;\n\n @include mq($from: small) {\n padding-top: space('xsmall');\n padding-bottom: space('small');\n }\n }\n }\n\n &--table#{&}--big-label &__label:not(:empty) + &__value {\n padding-left: space('medium');\n\n @include mq($to: small) {\n padding-left: 0;\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, Fragment, h, Host, Prop, State, Watch } from \"@stencil/core\";\n\nimport {\n StzhDatalistBigLabelChangeEvent,\n StzhDatalistDirection,\n StzhDatalistDirectionChangeEvent,\n StzhDatalistItemActionClickEvent,\n StzhDatalistItemClickEvent,\n StzhDatalistVariant,\n StzhDatalistVariantChangeEvent,\n StzhStatusType,\n} from \"../../index\";\n\nimport { addWordBreakToLinks } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../index\";\n\nlet datalistItemCounter = 0;\n\n/**\n * @slot - Slot for nested datalist\n * @slot value - Slot for value (or use value slot instead)\n * @slot readspeaker - Slot for readspeaker\n */\n@Component({\n tag: \"stzh-datalist-item\",\n styleUrl: \"stzh-datalist-item.scss\",\n scoped: true,\n})\nexport class StzhDatalistItem {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Link */\n @Prop({ reflect: true }) href: string;\n\n /** Rel (if href is used) */\n @Prop() rel: string;\n\n /** Target (if href is used) */\n @Prop() target: string;\n\n /** Download attribute of link (if `href` used) */\n @Prop() download: string;\n\n /** Leading icon */\n @Prop() leadingIcon: string;\n\n /** Icon of action button (if href is used, will only be for presentation) */\n @Prop() icon: string;\n\n /** Icon position */\n @Prop() iconPosition: \"left\" | \"right\" = \"right\";\n\n /** Overwrite aria-label of action button (default aria label is `label` and `value`). */\n @Prop() iconLabel: string;\n\n /** Tooltip content of action button. Overwrites aria-label (set by default or `iconLabel`) of action button. */\n @Prop() iconTooltip: string;\n\n /** Href of action button */\n @Prop() iconHref: string;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Value (or use value slot instead) */\n @Prop() value: string = \"\";\n\n /** Whether text should be truncate or not */\n @Prop() noTextTruncate: boolean = false; \n\n /** Readspeaker label */\n @Prop() readspeakerLabel: string = \"\";\n\n /** Readspeaker link */\n @Prop() readspeakerHref: string = \"\";\n\n /** Meta */\n @Prop({ reflect: true }) meta: string | string[] = \"\";\n private _meta: string[] = [];\n\n /** Status Label */\n @Prop({ reflect: true }) statusLabel: string = \"\";\n\n /** Status Type */\n @Prop() statusType: StzhStatusType = \"default\";\n\n /** Aria expanded of link/button */\n @Prop({ reflect: true, attribute: \"a11y-expanded\" }) a11yExpanded: boolean;\n\n /** Aria controls of link/button */\n @Prop({ attribute: \"a11y-controls\" }) a11yControls: string;\n\n /** Item action click event */\n @Event() stzhItemActionClick: EventEmitter<StzhDatalistItemActionClickEvent>;\n\n /** Item click event */\n @Event() stzhClick: EventEmitter<StzhDatalistItemClickEvent>;\n\n @Element() element: HTMLStzhDatalistItemElement;\n\n @Watch(\"meta\")\n metaWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n try {\n this._meta = JSON.parse(newValue);\n } catch (ex) {\n this._meta = newValue === \"\" ? [] : [newValue];\n }\n } else {\n this._meta = newValue;\n }\n }\n\n @Watch(\"rel\")\n externalWatcher() {\n this.external = this.rel && this.rel.includes(\"external\");\n }\n\n @Watch(\"href\")\n hrefWatcher() {\n this.isPhone = this.href && (this.href.startsWith(\"tel:\") || this.href.startsWith(\"fax:\"));\n }\n\n @State() direction: StzhDatalistDirection = \"vertical\";\n @State() variant: StzhDatalistVariant = \"default\";\n @State() bigLabel: boolean = false;\n\n private external: boolean = false;\n private isPhone: boolean = false;\n private datalist: HTMLStzhDatalistElement;\n private datalistItemId: string;\n\n private onActionClick = (originalEvent: MouseEvent) => {\n this.stzhItemActionClick.emit({\n component: \"stzh-datalist-item\",\n originalEvent,\n });\n };\n\n private onClick = (event: MouseEvent) => {\n this.stzhClick.emit({\n component: \"stzh-datalist-item\",\n originalEvent: event,\n href: this.href,\n });\n };\n\n private handleDirectionChange = (event: CustomEvent<StzhDatalistDirectionChangeEvent>) => {\n this.direction = event.detail.value;\n };\n\n private handleVariantChange = (event: CustomEvent<StzhDatalistVariantChangeEvent>) => {\n this.variant = event.detail.value;\n };\n\n private handleBigLabelChange = (event: CustomEvent<StzhDatalistBigLabelChangeEvent>) => {\n this.bigLabel = event.detail.value;\n };\n\n private addWordBreakToLinks() {\n const links = Array.from(\n this.element?.getElementsByClassName(\"stzh-datalist-item__value-text\") || []\n );\n addWordBreakToLinks(links as HTMLElement[]);\n }\n\n private renderInner(isButton: boolean, hasActionButton: boolean): DocumentFragment {\n const Item = isButton ? \"button\" : this.href ? \"a\" : \"div\";\n\n const Icon = () => (\n <Fragment>\n {(this.href || this.icon) && !hasActionButton && !isButton && (\n <div class=\"stzh-datalist-item__label-icon\">\n <stzh-icon\n class=\"stzh-datalist-item__icon\"\n name={this.icon ? this.icon : this.isPhone ? \"phone\" : this.external && \"external-link\"}\n ></stzh-icon>\n </div>\n )}\n\n {isButton && (\n <div class=\"stzh-datalist-item__label-icon\">\n <stzh-icon class=\"stzh-datalist-item__icon is-closed\" name={this.icon ? this.icon : \"plus\"}></stzh-icon>\n <stzh-icon class=\"stzh-datalist-item__icon is-open\" name={this.icon ? this.icon : \"minus\"}></stzh-icon>\n </div>\n )}\n </Fragment>\n );\n\n return (\n <Fragment>\n {this.variant === \"table\" && (\n <Item\n aria-hidden={this.label ? null : \"true\"}\n tabindex=\"-1\"\n id={`${this.datalistItemId}-label`}\n class={{\n \"stzh-datalist-item__label\": true,\n \"is-button\": isButton,\n \"is-link\": !!this.href,\n }}\n href={this.href}\n rel={this.rel}\n target={this.target}\n download={this.download}\n onClick={this.onClick}\n >\n {this.label}\n </Item>\n )}\n\n <Item\n id={`${this.datalistItemId}-value`}\n class={{\n \"stzh-datalist-item__value\": true,\n \"is-button\": isButton,\n \"is-link\": !!this.href,\n }}\n href={this.href}\n rel={this.rel}\n target={this.target}\n download={this.download}\n // aria-labelledby={Item !== 'div' ? `${this.datalistItemId}-label ${this.datalistItemId}-value ${this.datalistItemId}-meta` : null}\n aria-labelledby={\n Item !== \"div\"\n ? `${this.variant === \"table\" ? `${this.datalistItemId}-label` : \"\"} ${this.datalistItemId}-value ${\n this.datalistItemId\n }-meta`\n : null\n }\n aria-controls={this.a11yControls || null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\" ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n onClick={this.onClick}\n >\n {this.variant === \"default\" && <div class=\"stzh-datalist-item__label\">{this.label}</div>}\n\n {this.external && (\n <div class=\"stzh-datalist-item__vhidden\">{this.localization.$globals.externalLinkLabel}</div>\n )}\n {this.download && (\n <div class=\"stzh-datalist-item__vhidden\">{this.localization.$globals.downloadLinkLabel}</div>\n )}\n\n <div class=\"stzh-datalist-item__value-wrapper\">\n {this.iconPosition === \"left\" && <Icon></Icon>}\n {this.value ? (\n <stzh-text curve=\"none\" class=\"stzh-datalist-item__value-text\" innerHTML={this.value}></stzh-text>\n ) : (\n <stzh-text curve=\"none\" class=\"stzh-datalist-item__value-text\">\n <slot name=\"value\"></slot>\n </stzh-text>\n )}\n {this.iconPosition === \"right\" && <Icon></Icon>}\n </div>\n </Item>\n\n <Item\n aria-hidden={this.statusLabel || this._meta.length > 0 ? null : \"true\"}\n tabindex=\"-1\"\n id={`${this.datalistItemId}-meta`}\n class={{\n \"stzh-datalist-item__meta\": true,\n \"is-button\": isButton,\n \"is-link\": !!this.href,\n }}\n href={this.href}\n rel={this.rel}\n target={this.target}\n download={this.download}\n onClick={this.onClick}\n >\n {this.statusLabel && (\n <stzh-status\n class=\"stzh-datalist-item__meta-status\"\n label={this.statusLabel}\n type={this.statusType}\n ></stzh-status>\n )}\n {this._meta.length > 0 && (\n <span class=\"stzh-datalist-item__meta-text\">\n {this._meta.map((meta, index) => (\n <Fragment>\n <span class=\"stzh-datalist-item__meta-text-inner\">{meta}</span>\n {index + 1 !== this._meta.length && <span class=\"stzh-datalist-item__meta-separator\">|</span>}\n </Fragment>\n ))}\n </span>\n )}\n </Item>\n\n {this.readspeakerHref && this.readspeakerLabel && (\n <stzh-button\n class=\"stzh-datalist-item__readspeaker\"\n variant=\"tertiary-plain\"\n no-padding-left=\"true\"\n no-padding-right=\"true\"\n icon-position=\"right\"\n icon=\"volume-medium\"\n size=\"small\"\n href={this.readspeakerHref}\n target=\"_blank\"\n >\n {this.readspeakerLabel}\n </stzh-button>\n )}\n </Fragment>\n );\n }\n\n private renderLeadingIcon(isButton: boolean): HTMLElement {\n const Item = isButton ? \"button\" : this.href ? \"a\" : \"div\";\n\n return (\n <Item\n role=\"presentation\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n class={{\n \"stzh-datalist-item__leading\": true,\n \"is-button\": isButton,\n \"is-link\": !!this.href,\n }}\n href={this.href}\n rel={this.rel}\n target={this.target}\n download={this.download}\n onClick={this.onClick}\n >\n {this.leadingIcon && (\n <div class=\"stzh-datalist-item__leading-icon-container\">\n <stzh-icon class=\"stzh-datalist-item__leading-icon\" name={this.leadingIcon}></stzh-icon>\n </div>\n )}\n </Item>\n );\n }\n\n async componentDidLoad() {\n // execute connectedCallbck again, because sometimes has problem rendering\n this.connectedCallback();\n this.addWordBreakToLinks();\n }\n\n async componentWillLoad() {\n this.datalistItemId = `stzh-datalist-item-${datalistItemCounter++}`;\n this.metaWatcher(this.meta);\n this.externalWatcher();\n this.hrefWatcher();\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"datalist-item\");\n }\n }\n\n async connectedCallback() {\n this.datalist = this.element.closest(\"stzh-datalist\");\n\n if (this.datalist) {\n this.variant = this.datalist.variant;\n this.bigLabel = this.datalist.bigLabel;\n this.direction = await this.datalist.getCurrentDirection();\n\n this.datalist?.addEventListener(\"stzhDirectionChange\", this.handleDirectionChange);\n this.datalist?.addEventListener(\"stzhVariantChange\", this.handleVariantChange);\n this.datalist?.addEventListener(\"stzhBigLabelChange\", this.handleBigLabelChange);\n }\n }\n\n disconnectedCallback() {\n if (this.datalist) {\n this.datalist?.removeEventListener(\"stzhDirectionChange\", this.handleDirectionChange);\n this.datalist?.removeEventListener(\"stzhVariantChange\", this.handleVariantChange);\n this.datalist?.removeEventListener(\"stzhBigLabelChange\", this.handleBigLabelChange);\n this.datalist = null;\n }\n }\n\n render() {\n const isButton = typeof this.a11yExpanded !== \"undefined\" || typeof this.a11yControls !== \"undefined\";\n\n const hasActionButton = !!((!this.href || this.iconHref || this.iconTooltip) && this.icon);\n\n const classes = {\n \"stzh-datalist-item\": true,\n \"stzh-datalist-item--is-interactive\": !!this.href || isButton,\n \"stzh-datalist-item--is-link\": !!this.href,\n \"stzh-datalist-item--is-button\": isButton,\n \"stzh-datalist-item--is-expanded\": this.a11yExpanded,\n \"stzh-datalist-item--big-label\": this.bigLabel,\n [`stzh-datalist-item--direction-${this.direction}`]: !!this.direction && this.variant === \"default\",\n [`stzh-datalist-item--${this.variant}`]: !!this.variant,\n };\n\n let ActionItem = isButton ? \"button\" : hasActionButton ? \"div\" : \"a\";\n\n const ActionButton = () => {\n return (\n <stzh-button\n class={{\n \"stzh-datalist-item__action\": true,\n \"is-button\": true,\n }}\n variant=\"tertiary\"\n size=\"small\"\n aria-label={this.iconLabel}\n iconOnly={true}\n href={this.iconHref}\n icon={this.icon}\n onClick={this.onActionClick}\n ></stzh-button>\n );\n };\n\n return (\n <Host role=\"listitem\" class={{\"no-text-truncate\": !!this.href || this.noTextTruncate}}>\n <div class={classes}>\n {this.direction === \"horizontal\" || this.variant === \"table\" ? (\n <Fragment>\n {this.renderLeadingIcon(isButton)}\n {this.renderInner(isButton, hasActionButton)}\n </Fragment>\n ) : (\n <Fragment>\n {this.renderLeadingIcon(isButton)}\n <div class=\"stzh-datalist-item__wrapper\">{this.renderInner(isButton, hasActionButton)}</div>\n </Fragment>\n )}\n <ActionItem\n role={hasActionButton ? null : \"presentation\"}\n aria-hidden={hasActionButton ? null : \"true\"}\n tabindex=\"-1\"\n class={{\n \"stzh-datalist-item__action-list\": true,\n \"is-button\": isButton,\n \"is-link\": !!this.href && !this.iconHref,\n }}\n href={!this.iconHref ? this.href : null}\n rel={!this.iconHref ? this.rel : null}\n target={!this.iconHref ? this.target : null}\n download={!this.iconHref ? this.download : null}\n >\n {hasActionButton &&\n (this.iconTooltip ? (\n <stzh-tooltip content={this.iconTooltip}>{ActionButton()}</stzh-tooltip>\n ) : (\n ActionButton()\n ))}\n </ActionItem>\n\n <div class=\"stzh-datalist-item__spacer\"></div>\n </div>\n\n <div class=\"stzh-datalist-item__nested\">\n <div class=\"stzh-datalist-item__nested-inner\">\n <slot></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-d4aabf9c.js","mappings":";;;;;;;;;AAAA,MAAM,aAAa,GAAG,+yLAA+yL;;ACwBr0L,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAE3C,IAAI,YAAY,GAAe,IAAI,CAAC;AACpC,IAAI,aAAa,GAAG,CAAC,CAAC;MAWT,UAAU;;;;;;IA4Gb,sBAAiB,GAAG,CAAC,KAAiB;MAC5C,MAAM,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;MAC3C,IAAI,MAAM,CAAC,OAAO,CAAC,eAAe,EAAE;QAClC,IAAI,CAAC,IAAI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AAG,MAAM,EACzC,OAAO,EAAE,IAAI,CAAC,iBAAiB,IAE9B,IAAI,CAAC,OAAO;MACX,oBACE,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,UAAU,EACxB,KAAK,EAAC,sBAAsB,EAC5B,KAAK,EAAC,GAAG,IAER,IAAI,CAAC,OAAO,CACA,EAGjB,WAAK,KAAK,EAAC,6BAA6B,IACtC,eAAa,CACT,EAEN,WAAK,KAAK,EAAC,sBAAsB,IAC/B,YAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,EAEL,CAAC,IAAI,CAAC,SAAS;MACd,mBACE,KAAK,EAAC,2BAA2B,EACjC,OAAO,EAAC,UAAU,EAClB,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,IAAI,EACd,OAAO,EAAE,IAAI,CAAC,sBAAsB,EACpC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,EAClC,WAAW,EAAE,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,YAAY,CAAC,KAAK,GAChD,CAEb,CACF,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-dialog/stzh-dialog.scss?tag=stzh-dialog&encapsulation=scoped","src/components/stzh-dialog/stzh-dialog.tsx"],"sourcesContent":["/**\n * @prop --width: Width of dialog\n * @prop --padding-top: Padding top of dialog\n * @prop --padding-bottom: Padding bottom of dialog\n * @prop --padding-left: Padding left of dialog\n * @prop --padding-right: Padding right of dialog\n * @prop --backdrop-opacity: Opacity of dialog backdrop\n * @prop --backdrop-background-color: Opacity of dialog background color\n *\n * @prop --stzh-dialog-backdrop-opacity: **Global**: Opacity of backdrops\n * @prop --stzh-dialog-backdrop-background-color: **Global**: Background color of backdrops\n */\n\n:host {\n @include spaceCurve('--padding-top', 'large');\n @include spaceCurve('--padding-bottom', 'large');\n @include spaceCurve('--padding-left', 'medium');\n @include spaceCurve('--padding-right', 'medium');\n --width: 100%;\n --backdrop-opacity: #{$dialogBackdropOpacity};\n --backdrop-background-color: #{$dialogBackdropBackgroundColor};\n\n @include mq($from: small) {\n --width: 536px;\n }\n\n @include mq($from: medium) {\n --width: 610px; // 786 before\n }\n\n @include mq($from: large) {\n --width: 866px; // 832 before\n }\n\n @include mq($from: ultra) {\n --width: 888px;\n }\n\n &[size=\"small\"] {\n @include mq($from: small) {\n --width: 395px;\n }\n\n @include mq($from: medium) {\n --width: 460px;\n }\n\n @include mq($from: large) {\n --width: 512px;\n }\n }\n}\n\n.stzh-dialog {\n z-index: $zIndexDialog;\n display: none;\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-direction: column;\n align-items: stretch;\n justify-content: stretch;\n\n &__content {\n z-index: 2;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n flex-grow: 1;\n overflow: auto;\n }\n\n &__dialog {\n position: relative;\n display: flex;\n flex-direction: column;\n margin: auto;\n border: none;\n background-color: $colorWhite;\n width: var(--width);\n max-width: 100%;\n box-shadow: $boxShadowOverlay;\n height: 100vh;\n max-height: 100vh;\n overflow: hidden;\n outline: none;\n\n &--fit-content {\n width: fit-content;\n }\n\n @include mq($from: small) {\n height: auto;\n }\n }\n\n &__backdrop {\n z-index: 1;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n text-align: center;\n background-color: var(--backdrop-background-color);\n opacity: var(--backdrop-opacity);\n }\n\n &__heading {\n @include spaceCurve('padding-bottom', 'regular');\n padding-top: var(--padding-top);\n padding-left: var(--padding-left);\n padding-right: var(--padding-right);\n }\n\n &__dialog-content {\n padding-left: var(--padding-left);\n padding-right: var(--padding-right);\n @include spaceCurve('padding-top', 'medium');\n @include spaceCurve('padding-bottom', 'medium');\n overflow: auto;\n flex-grow: 1;\n }\n\n &__actions {\n &:not(:empty) {\n padding: space('medium') var(--padding-right) var(--padding-bottom) var(--padding-left);\n }\n }\n\n &__close-button {\n position: absolute;\n top: space('xsmall');\n right: space('xsmall');\n\n @include mq($from: medium) {\n top: space('large');\n right: space('large');\n }\n }\n\n &--is-open {\n display: flex;\n }\n}\n","import {\n Host,\n Component,\n Element,\n Method,\n Listen,\n Prop,\n Event,\n EventEmitter,\n h,\n} from \"@stencil/core\";\n\nimport {\n StzhDialogOpenEvent,\n StzhDialogCloseEvent\n} from \"../../index\";\n\nimport { setPropsIfNull } from \"../../utils/utils\";\nimport { createBaseFocusTrapOptions } from \"../../utils/overlay-utils\";\n\nimport { StzhDialogLocalizedText } from \"./stzh-dialog.localization\"\n\nimport { createFocusTrap, FocusTrap } from 'focus-trap';\n\nconst CLASS_BODY_OPEN = \"stzh-dialog-open\";\n\nlet activeDialog: StzhDialog = null;\nlet dialogCounter = 0;\n\n/**\n * @slot actions - Slot for actions element\n * @slot - Slot for any content inside the dialog\n */\n@Component({\n tag: \"stzh-dialog\",\n styleUrl: \"stzh-dialog.scss\",\n scoped: true\n})\nexport class StzhDialog {\n /** Translation strings */\n @Prop() localization: StzhDialogLocalizedText;\n\n /** Close dialog when pressing ESC */\n @Prop() closeOnEscapeKey: boolean = false;\n\n /** Close dialog when clicking outside of it */\n @Prop() closeOnBackdropClick: boolean = false;\n\n /** Open status */\n @Prop({ mutable: true }) open: boolean = false;\n\n /** Stay in original position (true) or move to body (false) */\n @Prop() stay: boolean = true;\n\n /** Size */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\n\n /** Whether to hide close button */\n @Prop() hideClose: boolean = false;\n\n /** Heading text */\n @Prop() heading: string = \"\";\n\n /** Accessibility role */\n @Prop({ attribute: \"a11y-role\" }) a11yRole: \"dialog\" | \"alertdialog\" = \"alertdialog\";\n\n /** Accessible label for dialog (use if no heading is used) */\n @Prop({ attribute: \"a11y-label\" }) a11yLabel: string = \"\";\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the close button element.\n * Default value will be taken from translations.\n */\n @Prop() closeAnalyticsId: string;\n\n /** Dialog open event */\n @Event() stzhOpen: EventEmitter<StzhDialogOpenEvent>;\n\n /** Dialog close event */\n @Event() stzhClose: EventEmitter<StzhDialogCloseEvent>;\n\n @Element() element: HTMLStzhDialogElement;\n\n @Listen(\"click\", { target: \"document\", capture: true })\n handleOutsideClick(event: MouseEvent) {\n if (!this.open || !this.closeOnBackdropClick) {\n return\n }\n\n const isClickOutside = event.target !== this.dialogElement\n && this.dialogElement.contains(event.target as HTMLElement) === false\n\n if (isClickOutside) {\n this.hide()\n }\n }\n\n @Listen(\"keydown\", { target: \"document\" })\n handleKeydown(event: KeyboardEvent) {\n if (\n event.key === \"Escape\"\n && activeDialog === this\n && this.closeOnEscapeKey\n ) {\n this.hide();\n }\n }\n\n @Listen(\"click\", { target: \"document\" })\n handleOpenTriggerClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n\n if (target.dataset.stzhDialogTrigger === this.element.id) {\n this.show();\n } else {\n const closest = target.closest(\"[data-stzh-dialog-trigger]\") as HTMLElement;\n\n if (closest && closest.dataset.stzhDialogTrigger === this.element.id) {\n this.show();\n }\n }\n }\n\n @Method()\n async show() {\n this.open = true;\n this.stzhOpen.emit({\n component: \"stzh-dialog\"\n });\n }\n\n @Method()\n async hide() {\n this.open = false;\n this.stzhClose.emit({\n component: \"stzh-dialog\"\n });\n }\n\n private observer: MutationObserver;\n private id: string;\n private trap: FocusTrap;\n private parentElement: HTMLElement;\n private dialogElement: HTMLDivElement;\n\n private handleDialogClick = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n if (target.dataset.stzhDialogClose) {\n this.hide();\n } else {\n const closest = target.closest(\"[data-stzh-dialog-close]\");\n\n if (closest) {\n this.hide();\n }\n }\n }\n\n private handleCloseButtonClick = () => {\n this.hide();\n }\n\n private init = () => {\n const actions = this.element.querySelector('stzh-actions[slot=\"actions\"]');\n\n if (actions) {\n setPropsIfNull(actions, {\n variant: \"dialog\"\n } as HTMLStzhActionsElement)\n }\n }\n\n private getSiblings() {\n if (!this.parentElement) {\n return [];\n }\n\n return Array.from(this.parentElement.children).filter(\n (child) => child !== this.element\n );\n }\n\n private disableSiblings() {\n this.getSiblings().forEach((sibling) => {\n sibling.setAttribute(\"aria-hidden\", \"true\");\n });\n }\n\n private enableSiblings() {\n this.getSiblings().forEach((sibling) => {\n sibling.removeAttribute(\"aria-hidden\");\n });\n }\n\n private dialogShown() {\n activeDialog = this;\n document.body.classList.add(CLASS_BODY_OPEN);\n this.disableSiblings();\n\n if (this.trap) {\n this.trap.activate();\n }\n }\n\n private dialogHidden() {\n document.body.classList.remove(CLASS_BODY_OPEN);\n this.enableSiblings();\n\n if (this.trap) {\n this.trap.deactivate();\n }\n\n activeDialog = null;\n }\n\n async componentWillLoad() {\n this.id = `stzh-dialog-${dialogCounter}`;\n dialogCounter++;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"dialog\");\n }\n }\n\n componentDidRender() {\n this.open ? this.dialogShown() : this.dialogHidden();\n }\n\n componentDidUpdate() {\n this.trap.updateContainerElements(this.element);\n }\n\n componentDidLoad() {\n this.trap = createFocusTrap(this.element, {\n fallbackFocus: this.dialogElement,\n ...createBaseFocusTrapOptions()\n });\n\n if (this.open) {\n this.dialogShown();\n }\n }\n\n connectedCallback() {\n if (!this.stay && this.element.parentElement !== document.body) {\n document.body.appendChild(this.element);\n }\n\n this.parentElement = this.element.parentElement;\n\n this.init();\n\n this.observer = new MutationObserver(this.init);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true\n });\n }\n\n disconnectedCallback() {\n this.dialogHidden();\n\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n render() {\n return (\n <Host>\n <div\n class={{\n \"stzh-dialog\": true,\n \"stzh-dialog--is-open\": this.open,\n \"stzh-dialog--has-heading\": !!this.heading,\n \"stzh-dialog--has-close-hidden\": this.hideClose,\n [`stzh-dialog--size-${this.size}`]: !!this.size,\n }}\n >\n <div class=\"stzh-dialog__backdrop\"></div>\n <div class=\"stzh-dialog__content\">\n <div\n class=\"stzh-dialog__dialog\"\n ref={(el) => (this.dialogElement = el as HTMLDivElement)}\n tabindex=\"-1\"\n role={this.a11yRole}\n aria-label={this.a11yLabel || null}\n aria-labelledby={this.heading ? `${this.id}-heading` : null}\n aria-hidden={this.open ? \"false\" : \"true\"}\n onClick={this.handleDialogClick}\n >\n {this.heading &&\n <stzh-heading\n id={`${this.id}-heading`}\n class=\"stzh-dialog__heading\"\n level=\"2\"\n >\n {this.heading}\n </stzh-heading>\n }\n\n <div class=\"stzh-dialog__dialog-content\">\n <slot></slot>\n </div>\n\n <div class=\"stzh-dialog__actions\">\n <slot name=\"actions\"></slot>\n </div>\n\n {!this.hideClose &&\n <stzh-button\n class=\"stzh-dialog__close-button\"\n variant=\"tertiary\"\n size=\"small\"\n icon=\"close\"\n iconOnly={true}\n onClick={this.handleCloseButtonClick}\n a11yLabel={this.localization.close}\n analyticsId={this.closeAnalyticsId || this.localization.close}\n ></stzh-button>\n }\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n\n"],"version":3}
|