@oiz/stzh-components 3.0.0-beta5 → 3.0.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-82cc9313.js → app-globals-1d1f8f2e.js} +2 -2
- package/dist/cjs/{app-globals-82cc9313.js.map → app-globals-1d1f8f2e.js.map} +1 -1
- package/dist/cjs/index-92254d32.js +16 -8
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-actions.cjs.entry.js +8 -2
- package/dist/cjs/stzh-actions.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-breadcrumb_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-breadcrumb_2.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-card_3.cjs.entry.js +2 -0
- package/dist/cjs/stzh-card_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-carousel.cjs.entry.js +1 -2
- package/dist/cjs/stzh-carousel.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-chart.cjs.entry.js +1 -1
- package/dist/cjs/stzh-chart.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-checkboxgroup.cjs.entry.js +9 -10
- package/dist/cjs/stzh-checkboxgroup.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-content.cjs.entry.js +1 -1
- package/dist/cjs/stzh-content.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-cspace.cjs.entry.js +1 -1
- package/dist/cjs/stzh-cspace.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-cta.cjs.entry.js +1 -1
- package/dist/cjs/stzh-cta.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-datalist_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datalist_2.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js +8 -10
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-details.cjs.entry.js +162 -0
- package/dist/cjs/stzh-details.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-eventdata.cjs.entry.js +26 -0
- package/dist/cjs/stzh-eventdata.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-eventinfo.cjs.entry.js +43 -4
- package/dist/cjs/stzh-eventinfo.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-footer.cjs.entry.js +1 -1
- package/dist/cjs/stzh-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-gallery.cjs.entry.js +1 -1
- package/dist/cjs/stzh-gallery.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-header.cjs.entry.js +0 -1
- package/dist/cjs/stzh-header.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-imagecomparison.cjs.entry.js +1 -1
- package/dist/cjs/stzh-imagecomparison.cjs.entry.js.map +1 -1
- package/dist/cjs/{stzh-details_2.cjs.entry.js → stzh-message.cjs.entry.js} +1 -155
- package/dist/cjs/stzh-message.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-monthyearpicker.cjs.entry.js +18 -2
- package/dist/cjs/stzh-monthyearpicker.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-pagebottom.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-pagetitle.cjs.entry.js +2 -1
- package/dist/cjs/stzh-pagetitle.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-popover_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-popover_2.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-readspeaker.cjs.entry.js +1 -1
- package/dist/cjs/stzh-readspeaker.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-search.cjs.entry.js +1 -1
- package/dist/cjs/stzh-search.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js +1 -1
- package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-textandimage.cjs.entry.js +3 -2
- package/dist/cjs/stzh-textandimage.cjs.entry.js.map +1 -1
- package/dist/collection/assets/i18n/de.json +3 -1
- package/dist/collection/assets/i18n/en.json +3 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/stzh-accordion/stzh-accordion.css +3 -3
- package/dist/collection/components/stzh-accordion-item/stzh-accordion-item.css +3 -3
- package/dist/collection/components/stzh-actions/stzh-actions.css +27 -7
- package/dist/collection/components/stzh-actions/stzh-actions.js +8 -1
- package/dist/collection/components/stzh-actions/stzh-actions.js.map +1 -1
- package/dist/collection/components/stzh-actions/stzh-actions.stories.js +2 -2
- package/dist/collection/components/stzh-actionset/stzh-actionset.css +3 -3
- package/dist/collection/components/stzh-amount/stzh-amount.css +3 -3
- package/dist/collection/components/stzh-anchornav/stzh-anchornav.css +3 -3
- package/dist/collection/components/stzh-appointments/stzh-appointments.css +3 -3
- package/dist/collection/components/stzh-archivelist/stzh-archivelist.css +3 -3
- package/dist/collection/components/stzh-audio/stzh-audio.css +3 -3
- package/dist/collection/components/stzh-badge/stzh-badge.css +3 -3
- package/dist/collection/components/stzh-banner/stzh-banner.css +3 -3
- package/dist/collection/components/stzh-breadcrumb/stzh-breadcrumb.css +8 -3
- package/dist/collection/components/stzh-button/stzh-button.css +3 -3
- package/dist/collection/components/stzh-buttongroup/stzh-buttongroup.css +3 -3
- package/dist/collection/components/stzh-calendar/stzh-calendar.css +3 -3
- package/dist/collection/components/stzh-card/stzh-card.css +3 -3
- package/dist/collection/components/stzh-card-navigation/stzh-card-navigation.css +3 -3
- package/dist/collection/components/stzh-card-navigation/stzh-card-navigation.stories.js +1 -1
- package/dist/collection/components/stzh-card-searchresult/stzh-card-searchresult.css +3 -3
- package/dist/collection/components/stzh-card-superteaser/stzh-card-superteaser.css +3 -3
- package/dist/collection/components/stzh-cardlist/stzh-cardlist.css +3 -3
- package/dist/collection/components/stzh-carousel/stzh-carousel.css +8 -3
- package/dist/collection/components/stzh-carousel/stzh-carousel.js +0 -1
- package/dist/collection/components/stzh-carousel/stzh-carousel.js.map +1 -1
- package/dist/collection/components/stzh-cell/stzh-cell.css +3 -3
- package/dist/collection/components/stzh-chart/stzh-chart.css +6 -3
- package/dist/collection/components/stzh-checkbox/stzh-checkbox.css +3 -3
- package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.css +3 -3
- package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.js +9 -12
- package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.js.map +1 -1
- package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.stories.js +9 -0
- package/dist/collection/components/stzh-chip/stzh-chip.css +3 -3
- package/dist/collection/components/stzh-chipgroup/stzh-chipgroup.css +3 -3
- package/dist/collection/components/stzh-chipselect/stzh-chipselect.css +3 -3
- package/dist/collection/components/stzh-chipselect/stzh-chipselect.js +2 -0
- package/dist/collection/components/stzh-chipselect/stzh-chipselect.js.map +1 -1
- package/dist/collection/components/stzh-chipselect/stzh-chipselect.stories.js +2 -2
- package/dist/collection/components/stzh-clamp/stzh-clamp.css +3 -3
- package/dist/collection/components/stzh-contact/stzh-contact.css +3 -3
- package/dist/collection/components/stzh-container/stzh-container.css +3 -3
- package/dist/collection/components/stzh-content/stzh-content.css +7 -5
- package/dist/collection/components/stzh-cspace/stzh-cspace.css +9 -9
- package/dist/collection/components/stzh-cta/stzh-cta.css +8 -3
- package/dist/collection/components/stzh-datalist/stzh-datalist.css +3 -3
- package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.css +9 -69
- package/dist/collection/components/stzh-datamessagelist/stzh-datamessagelist.css +3 -3
- package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.css +3 -3
- package/dist/collection/components/stzh-datatable/stzh-datatable.css +3 -3
- package/dist/collection/components/stzh-datepicker/stzh-datepicker.css +3 -3
- package/dist/collection/components/stzh-daterange/stzh-daterange.css +3 -3
- package/dist/collection/components/stzh-details/stzh-details.css +3 -3
- package/dist/collection/components/stzh-dialog/stzh-dialog.css +3 -3
- package/dist/collection/components/stzh-disturber/stzh-disturber.css +3 -3
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.css +3 -3
- package/dist/collection/components/stzh-editor/stzh-editor.css +3 -3
- package/dist/collection/components/stzh-eventdata/stzh-eventdata.css +210 -0
- package/dist/collection/components/stzh-eventdata/stzh-eventdata.e2e.js +18 -0
- package/dist/collection/components/stzh-eventdata/stzh-eventdata.e2e.js.map +1 -0
- package/dist/collection/components/stzh-eventdata/stzh-eventdata.js +52 -0
- package/dist/collection/components/stzh-eventdata/stzh-eventdata.js.map +1 -0
- package/dist/collection/components/stzh-eventdata/stzh-eventdata.stories.js +44 -0
- package/dist/collection/components/stzh-eventinfo/stzh-eventinfo.css +157 -12
- package/dist/collection/components/stzh-eventinfo/stzh-eventinfo.js +122 -4
- package/dist/collection/components/stzh-eventinfo/stzh-eventinfo.js.map +1 -1
- package/dist/collection/components/stzh-eventinfo/stzh-eventinfo.localization.js.map +1 -1
- package/dist/collection/components/stzh-eventinfo/stzh-eventinfo.stories.js +14 -1
- package/dist/collection/components/stzh-fieldset/stzh-fieldset.css +3 -3
- package/dist/collection/components/stzh-figure/stzh-figure.css +3 -3
- package/dist/collection/components/stzh-flyingfocus/stzh-flyingfocus.css +3 -3
- package/dist/collection/components/stzh-footer/stzh-footer.css +7 -4
- package/dist/collection/components/stzh-gallery/stzh-gallery.css +9 -3
- package/dist/collection/components/stzh-ghettobox/stzh-ghettobox.css +3 -3
- package/dist/collection/components/stzh-header/stzh-header.css +3 -3
- package/dist/collection/components/stzh-header/stzh-header.js +0 -1
- package/dist/collection/components/stzh-header/stzh-header.js.map +1 -1
- package/dist/collection/components/stzh-heading/stzh-heading.css +3 -3
- package/dist/collection/components/stzh-hr/stzh-hr.css +3 -3
- package/dist/collection/components/stzh-hspace/stzh-hspace.css +3 -3
- package/dist/collection/components/stzh-icon/stzh-icon.css +9 -3
- package/dist/collection/components/stzh-iframe/stzh-iframe.css +3 -3
- package/dist/collection/components/stzh-imagecomparison/stzh-imagecomparison.css +10 -3
- package/dist/collection/components/stzh-input/stzh-input.css +3 -3
- package/dist/collection/components/stzh-invert/stzh-invert.css +3 -3
- package/dist/collection/components/stzh-link/stzh-link.css +3 -3
- package/dist/collection/components/stzh-list/stzh-list.css +3 -3
- package/dist/collection/components/stzh-list-item/stzh-list-item.css +3 -3
- package/dist/collection/components/stzh-loader/stzh-loader.css +3 -3
- package/dist/collection/components/stzh-loadingbar/stzh-loadingbar.css +3 -3
- package/dist/collection/components/stzh-menu/stzh-menu.css +3 -3
- package/dist/collection/components/stzh-menu-item/stzh-menu-item.css +3 -3
- package/dist/collection/components/stzh-message/stzh-message.css +3 -3
- package/dist/collection/components/stzh-microsite-teaserlist/stzh-microsite-teaserlist.css +3 -3
- package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.css +3 -3
- package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.js +36 -4
- package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.js.map +1 -1
- package/dist/collection/components/stzh-olmap/stzh-olmap.css +3 -3
- package/dist/collection/components/stzh-overlay/stzh-overlay.css +3 -3
- package/dist/collection/components/stzh-page-skiplinks/stzh-page-skiplinks.css +3 -3
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.css +3 -3
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.js +0 -1
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.js.map +1 -1
- package/dist/collection/components/stzh-pagecontent/stzh-pagecontent.css +3 -3
- package/dist/collection/components/stzh-pagetitle/stzh-pagetitle.css +3 -3
- package/dist/collection/components/stzh-pagetitle/stzh-pagetitle.js +2 -1
- package/dist/collection/components/stzh-pagetitle/stzh-pagetitle.js.map +1 -1
- package/dist/collection/components/stzh-pagetitle-hero/stzh-pagetitle-hero.css +3 -3
- package/dist/collection/components/stzh-pagination/stzh-pagination.css +3 -3
- package/dist/collection/components/stzh-panorama/stzh-panorama.css +3 -3
- package/dist/collection/components/stzh-popover/stzh-popover.css +3 -3
- package/dist/collection/components/stzh-print/stzh-print.css +3 -3
- package/dist/collection/components/stzh-progressbar/stzh-progressbar.css +3 -3
- package/dist/collection/components/stzh-progressbar-item/stzh-progressbar-item.css +3 -3
- package/dist/collection/components/stzh-radio/stzh-radio.css +3 -3
- package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.css +3 -3
- package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.js +8 -12
- package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.js.map +1 -1
- package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.stories.js +10 -0
- package/dist/collection/components/stzh-ratio/stzh-ratio.css +3 -3
- package/dist/collection/components/stzh-readspeaker/stzh-readspeaker.css +8 -3
- package/dist/collection/components/stzh-richtext/stzh-richtext.css +3 -3
- package/dist/collection/components/stzh-row/stzh-row.css +3 -3
- package/dist/collection/components/stzh-saptcha/stzh-saptcha.css +3 -3
- package/dist/collection/components/stzh-scrollup/stzh-scrollup.css +3 -3
- package/dist/collection/components/stzh-search/stzh-search.css +6 -5
- package/dist/collection/components/stzh-section/stzh-section.css +3 -3
- package/dist/collection/components/stzh-share/stzh-share.css +3 -3
- package/dist/collection/components/stzh-show/stzh-show.css +3 -3
- package/dist/collection/components/stzh-sitemap/stzh-sitemap.css +3 -3
- package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.css +18 -3
- package/dist/collection/components/stzh-skin-storybook-preview/stzh-skin-storybook-preview.css +3 -3
- package/dist/collection/components/stzh-skiplink/stzh-skiplink.css +3 -3
- package/dist/collection/components/stzh-sortable/stzh-sortable.css +3 -3
- package/dist/collection/components/stzh-space/stzh-space.css +3 -3
- package/dist/collection/components/stzh-status/stzh-status.css +3 -3
- package/dist/collection/components/stzh-sticky/stzh-sticky.css +3 -3
- package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.css +3 -3
- package/dist/collection/components/stzh-table/stzh-table.css +3 -3
- package/dist/collection/components/stzh-tag/stzh-tag.css +3 -3
- package/dist/collection/components/stzh-text/stzh-text.css +4 -4
- package/dist/collection/components/stzh-textandimage/stzh-textandimage.css +9 -3
- package/dist/collection/components/stzh-textandimage/stzh-textandimage.js +2 -1
- package/dist/collection/components/stzh-textandimage/stzh-textandimage.js.map +1 -1
- package/dist/collection/components/stzh-textandimage/stzh-textandimage.stories.js +2 -0
- package/dist/collection/components/stzh-timeline/stzh-timeline.css +3 -3
- package/dist/collection/components/stzh-timeline-item/stzh-timeline-item.css +3 -3
- package/dist/collection/components/stzh-timepicker/stzh-timepicker.css +3 -3
- package/dist/collection/components/stzh-toast/stzh-toast.css +3 -3
- package/dist/collection/components/stzh-toastbar/stzh-toastbar.css +3 -3
- package/dist/collection/components/stzh-toggle/stzh-toggle.css +3 -3
- package/dist/collection/components/stzh-tooltip/stzh-tooltip.css +3 -3
- package/dist/collection/components/stzh-twocolumns/stzh-twocolumns.css +3 -3
- package/dist/collection/components/stzh-upload/stzh-upload.css +3 -3
- package/dist/collection/components/stzh-vbz-carousel/stzh-vbz-carousel.css +3 -3
- package/dist/collection/components/stzh-vbz-linechip/stzh-vbz-linechip.css +3 -3
- package/dist/collection/components/stzh-vbz-majorticker/stzh-vbz-majorticker.css +3 -3
- package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.css +3 -3
- package/dist/collection/components/stzh-visuallyhidden/stzh-visuallyhidden.css +3 -3
- package/dist/collection/components/stzh-vspace/stzh-vspace.css +3 -3
- package/dist/collection/components/stzh-youtube/stzh-youtube.css +3 -3
- package/dist/collection/pages/website/website.e2e.js +1 -1
- package/dist/collection/pages/website/website.e2e.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/stzh-actions.js +8 -2
- package/dist/components/stzh-actions.js.map +1 -1
- package/dist/components/stzh-breadcrumb2.js +1 -1
- package/dist/components/stzh-breadcrumb2.js.map +1 -1
- package/dist/components/stzh-carousel2.js +1 -2
- package/dist/components/stzh-carousel2.js.map +1 -1
- package/dist/components/stzh-chart.js +1 -1
- package/dist/components/stzh-chart.js.map +1 -1
- package/dist/components/stzh-checkboxgroup.js +10 -12
- package/dist/components/stzh-checkboxgroup.js.map +1 -1
- package/dist/components/stzh-chipselect2.js +2 -0
- package/dist/components/stzh-chipselect2.js.map +1 -1
- package/dist/components/stzh-content.js +1 -1
- package/dist/components/stzh-content.js.map +1 -1
- package/dist/components/stzh-cspace.js +1 -1
- package/dist/components/stzh-cspace.js.map +1 -1
- package/dist/components/stzh-cta.js +1 -1
- package/dist/components/stzh-cta.js.map +1 -1
- package/dist/components/stzh-datalist-item2.js +1 -1
- package/dist/components/stzh-datalist-item2.js.map +1 -1
- package/dist/components/stzh-eventdata.d.ts +11 -0
- package/dist/components/stzh-eventdata.js +41 -0
- package/dist/components/stzh-eventdata.js.map +1 -0
- package/dist/components/stzh-eventinfo.js +50 -8
- package/dist/components/stzh-eventinfo.js.map +1 -1
- package/dist/components/stzh-footer.js +1 -1
- package/dist/components/stzh-footer.js.map +1 -1
- package/dist/components/stzh-gallery.js +1 -1
- package/dist/components/stzh-gallery.js.map +1 -1
- package/dist/components/stzh-header.js +0 -1
- package/dist/components/stzh-header.js.map +1 -1
- package/dist/components/stzh-icon2.js +1 -1
- package/dist/components/stzh-icon2.js.map +1 -1
- package/dist/components/stzh-imagecomparison.js +1 -1
- package/dist/components/stzh-imagecomparison.js.map +1 -1
- package/dist/components/stzh-monthyearpicker.js +19 -2
- package/dist/components/stzh-monthyearpicker.js.map +1 -1
- package/dist/components/stzh-pagebottom.js.map +1 -1
- package/dist/components/stzh-pagetitle.js +2 -1
- package/dist/components/stzh-pagetitle.js.map +1 -1
- package/dist/components/stzh-radiogroup2.js +8 -11
- package/dist/components/stzh-radiogroup2.js.map +1 -1
- package/dist/components/stzh-readspeaker.js +1 -1
- package/dist/components/stzh-readspeaker.js.map +1 -1
- package/dist/components/stzh-search.js +1 -1
- package/dist/components/stzh-search.js.map +1 -1
- package/dist/components/stzh-skin-portal-mitwirken.js +1 -1
- package/dist/components/stzh-skin-portal-mitwirken.js.map +1 -1
- package/dist/components/stzh-text2.js +1 -1
- package/dist/components/stzh-text2.js.map +1 -1
- package/dist/components/stzh-textandimage.js +3 -2
- package/dist/components/stzh-textandimage.js.map +1 -1
- package/dist/esm/{app-globals-d7eff0a5.js → app-globals-f9c4987b.js} +2 -2
- package/dist/esm/{app-globals-d7eff0a5.js.map → app-globals-f9c4987b.js.map} +1 -1
- package/dist/esm/index-e3050b18.js +16 -8
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-actions.entry.js +8 -2
- package/dist/esm/stzh-actions.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-breadcrumb_2.entry.js +1 -1
- package/dist/esm/stzh-breadcrumb_2.entry.js.map +1 -1
- package/dist/esm/stzh-card_3.entry.js +2 -0
- package/dist/esm/stzh-card_3.entry.js.map +1 -1
- package/dist/esm/stzh-carousel.entry.js +1 -2
- package/dist/esm/stzh-carousel.entry.js.map +1 -1
- package/dist/esm/stzh-chart.entry.js +1 -1
- package/dist/esm/stzh-chart.entry.js.map +1 -1
- package/dist/esm/stzh-checkboxgroup.entry.js +9 -10
- package/dist/esm/stzh-checkboxgroup.entry.js.map +1 -1
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-content.entry.js +1 -1
- package/dist/esm/stzh-content.entry.js.map +1 -1
- package/dist/esm/stzh-cspace.entry.js +1 -1
- package/dist/esm/stzh-cspace.entry.js.map +1 -1
- package/dist/esm/stzh-cta.entry.js +1 -1
- package/dist/esm/stzh-cta.entry.js.map +1 -1
- package/dist/esm/stzh-datalist_2.entry.js +1 -1
- package/dist/esm/stzh-datalist_2.entry.js.map +1 -1
- package/dist/esm/stzh-datepicker_3.entry.js +8 -10
- package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
- package/dist/esm/stzh-details.entry.js +158 -0
- package/dist/esm/stzh-details.entry.js.map +1 -0
- package/dist/esm/stzh-eventdata.entry.js +22 -0
- package/dist/esm/stzh-eventdata.entry.js.map +1 -0
- package/dist/esm/stzh-eventinfo.entry.js +43 -4
- package/dist/esm/stzh-eventinfo.entry.js.map +1 -1
- package/dist/esm/stzh-footer.entry.js +1 -1
- package/dist/esm/stzh-footer.entry.js.map +1 -1
- package/dist/esm/stzh-gallery.entry.js +1 -1
- package/dist/esm/stzh-gallery.entry.js.map +1 -1
- package/dist/esm/stzh-header.entry.js +0 -1
- package/dist/esm/stzh-header.entry.js.map +1 -1
- package/dist/esm/stzh-imagecomparison.entry.js +1 -1
- package/dist/esm/stzh-imagecomparison.entry.js.map +1 -1
- package/dist/esm/{stzh-details_2.entry.js → stzh-message.entry.js} +2 -155
- package/dist/esm/stzh-message.entry.js.map +1 -0
- package/dist/esm/stzh-monthyearpicker.entry.js +18 -2
- package/dist/esm/stzh-monthyearpicker.entry.js.map +1 -1
- package/dist/esm/stzh-pagebottom.entry.js.map +1 -1
- package/dist/esm/stzh-pagetitle.entry.js +2 -1
- package/dist/esm/stzh-pagetitle.entry.js.map +1 -1
- package/dist/esm/stzh-popover_2.entry.js +1 -1
- package/dist/esm/stzh-popover_2.entry.js.map +1 -1
- package/dist/esm/stzh-readspeaker.entry.js +1 -1
- package/dist/esm/stzh-readspeaker.entry.js.map +1 -1
- package/dist/esm/stzh-search.entry.js +1 -1
- package/dist/esm/stzh-search.entry.js.map +1 -1
- package/dist/esm/stzh-skin-portal-mitwirken.entry.js +1 -1
- package/dist/esm/stzh-skin-portal-mitwirken.entry.js.map +1 -1
- package/dist/esm/stzh-textandimage.entry.js +3 -2
- package/dist/esm/stzh-textandimage.entry.js.map +1 -1
- package/dist/stzh-components/assets/i18n/de.json +3 -1
- package/dist/stzh-components/assets/i18n/en.json +3 -1
- package/dist/stzh-components/p-14177ccb.entry.js +2 -0
- package/dist/stzh-components/p-14177ccb.entry.js.map +1 -0
- package/dist/stzh-components/p-161ae3d1.entry.js +2 -0
- package/dist/stzh-components/p-161ae3d1.entry.js.map +1 -0
- package/dist/stzh-components/{p-93721591.entry.js → p-1a19bc6e.entry.js} +2 -2
- package/dist/stzh-components/p-1a19bc6e.entry.js.map +1 -0
- package/dist/stzh-components/p-1a3dcde3.entry.js +2 -0
- package/dist/stzh-components/p-1a3dcde3.entry.js.map +1 -0
- package/dist/stzh-components/p-2096f3c6.entry.js +2 -0
- package/dist/stzh-components/p-2096f3c6.entry.js.map +1 -0
- package/dist/stzh-components/p-27d5ad01.entry.js +2 -0
- package/dist/stzh-components/p-27d5ad01.entry.js.map +1 -0
- package/dist/stzh-components/p-3f0d3919.entry.js +2 -0
- package/dist/stzh-components/p-3f0d3919.entry.js.map +1 -0
- package/dist/stzh-components/p-429d2a9b.entry.js +2 -0
- package/dist/stzh-components/p-429d2a9b.entry.js.map +1 -0
- package/dist/stzh-components/{p-e5cfdb8a.entry.js → p-5b1bc446.entry.js} +2 -2
- package/dist/stzh-components/{p-e5cfdb8a.entry.js.map → p-5b1bc446.entry.js.map} +1 -1
- package/dist/stzh-components/{p-0aabd857.entry.js → p-663f31a2.entry.js} +2 -2
- package/dist/stzh-components/p-663f31a2.entry.js.map +1 -0
- package/dist/stzh-components/{p-1be90089.entry.js → p-6f87ad6e.entry.js} +2 -2
- package/dist/stzh-components/{p-1be90089.entry.js.map → p-6f87ad6e.entry.js.map} +1 -1
- package/dist/stzh-components/p-7aac960b.entry.js +2 -0
- package/dist/stzh-components/p-7aac960b.entry.js.map +1 -0
- package/dist/stzh-components/p-8f19c3ec.entry.js +2 -0
- package/dist/stzh-components/p-8f19c3ec.entry.js.map +1 -0
- package/dist/stzh-components/p-91b360c9.entry.js +2 -0
- package/dist/stzh-components/{p-d028e43d.entry.js.map → p-91b360c9.entry.js.map} +1 -1
- package/dist/stzh-components/p-91d7c08d.entry.js +2 -0
- package/dist/stzh-components/p-91d7c08d.entry.js.map +1 -0
- package/dist/stzh-components/{p-f2ec1ede.entry.js → p-929c5234.entry.js} +2 -2
- package/dist/stzh-components/{p-f2ec1ede.entry.js.map → p-929c5234.entry.js.map} +1 -1
- package/dist/stzh-components/p-94947ab0.entry.js.map +1 -1
- package/dist/stzh-components/p-97df1d9f.entry.js +2 -0
- package/dist/stzh-components/p-97df1d9f.entry.js.map +1 -0
- package/dist/stzh-components/{p-9f9d53a0.entry.js → p-9b19785c.entry.js} +2 -2
- package/dist/stzh-components/p-9b19785c.entry.js.map +1 -0
- package/dist/stzh-components/{p-1a50b64a.entry.js → p-ab2aee99.entry.js} +2 -2
- package/dist/stzh-components/{p-1a50b64a.entry.js.map → p-ab2aee99.entry.js.map} +1 -1
- package/dist/stzh-components/p-af7562ba.entry.js +2 -0
- package/dist/stzh-components/p-af7562ba.entry.js.map +1 -0
- package/dist/stzh-components/{p-0bf70420.entry.js → p-af87b81a.entry.js} +2 -2
- package/dist/stzh-components/p-af87b81a.entry.js.map +1 -0
- package/dist/stzh-components/p-c9eecee7.entry.js +2 -0
- package/dist/stzh-components/p-c9eecee7.entry.js.map +1 -0
- package/dist/stzh-components/{p-3fa1c5a4.entry.js → p-ee82f53c.entry.js} +2 -2
- package/dist/stzh-components/{p-3fa1c5a4.entry.js.map → p-ee82f53c.entry.js.map} +1 -1
- package/dist/stzh-components/p-ef849bb1.entry.js +2 -0
- package/dist/stzh-components/p-ef849bb1.entry.js.map +1 -0
- package/dist/stzh-components/p-f06b2737.js +2 -0
- package/dist/stzh-components/{p-05e8c18d.js.map → p-f06b2737.js.map} +1 -1
- package/dist/stzh-components/{p-55cdd473.entry.js → p-f692c5d0.entry.js} +2 -2
- package/dist/stzh-components/p-f692c5d0.entry.js.map +1 -0
- package/dist/stzh-components/p-f7979f2a.entry.js +2 -0
- package/dist/stzh-components/p-f7979f2a.entry.js.map +1 -0
- package/dist/stzh-components/p-fdd6e755.entry.js +2 -0
- package/dist/stzh-components/p-fdd6e755.entry.js.map +1 -0
- package/dist/stzh-components/stzh-components.css +1 -1
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/stzh-components/stzh-components.esm.js.map +1 -1
- package/dist/types/components/stzh-actions/stzh-actions.d.ts +1 -0
- package/dist/types/components/stzh-checkboxgroup/stzh-checkboxgroup.d.ts +1 -1
- package/dist/types/components/stzh-eventdata/stzh-eventdata.d.ts +10 -0
- package/dist/types/components/stzh-eventinfo/stzh-eventinfo.d.ts +15 -1
- package/dist/types/components/stzh-eventinfo/stzh-eventinfo.localization.d.ts +2 -0
- package/dist/types/components/stzh-monthyearpicker/stzh-monthyearpicker.d.ts +3 -2
- package/dist/types/components/stzh-pagebottom/stzh-pagebottom.d.ts +0 -1
- package/dist/types/components/stzh-radiogroup/stzh-radiogroup.d.ts +1 -1
- package/dist/types/components.d.ts +61 -0
- package/dist/vscode-data.json +41 -0
- package/package.json +1 -1
- package/dist/cjs/stzh-details_2.cjs.entry.js.map +0 -1
- package/dist/esm/stzh-details_2.entry.js.map +0 -1
- package/dist/stzh-components/p-05e8c18d.js +0 -2
- package/dist/stzh-components/p-0aabd857.entry.js.map +0 -1
- package/dist/stzh-components/p-0bf70420.entry.js.map +0 -1
- package/dist/stzh-components/p-3c2d9cff.entry.js +0 -2
- package/dist/stzh-components/p-3c2d9cff.entry.js.map +0 -1
- package/dist/stzh-components/p-3cd1696a.entry.js +0 -2
- package/dist/stzh-components/p-3cd1696a.entry.js.map +0 -1
- package/dist/stzh-components/p-400f2932.entry.js +0 -2
- package/dist/stzh-components/p-400f2932.entry.js.map +0 -1
- package/dist/stzh-components/p-55cdd473.entry.js.map +0 -1
- package/dist/stzh-components/p-5f5d14cb.entry.js +0 -2
- package/dist/stzh-components/p-5f5d14cb.entry.js.map +0 -1
- package/dist/stzh-components/p-836c4cdf.entry.js +0 -2
- package/dist/stzh-components/p-836c4cdf.entry.js.map +0 -1
- package/dist/stzh-components/p-93721591.entry.js.map +0 -1
- package/dist/stzh-components/p-9f9d53a0.entry.js.map +0 -1
- package/dist/stzh-components/p-accbac61.entry.js +0 -2
- package/dist/stzh-components/p-accbac61.entry.js.map +0 -1
- package/dist/stzh-components/p-bd2a2c30.entry.js +0 -2
- package/dist/stzh-components/p-bd2a2c30.entry.js.map +0 -1
- package/dist/stzh-components/p-beec9a0a.entry.js +0 -2
- package/dist/stzh-components/p-beec9a0a.entry.js.map +0 -1
- package/dist/stzh-components/p-c774915c.entry.js +0 -2
- package/dist/stzh-components/p-c774915c.entry.js.map +0 -1
- package/dist/stzh-components/p-d028e43d.entry.js +0 -2
- package/dist/stzh-components/p-d56d5fe9.entry.js +0 -2
- package/dist/stzh-components/p-d56d5fe9.entry.js.map +0 -1
- package/dist/stzh-components/p-ddfb8df0.entry.js +0 -2
- package/dist/stzh-components/p-ddfb8df0.entry.js.map +0 -1
- package/dist/stzh-components/p-e10aa7bd.entry.js +0 -2
- package/dist/stzh-components/p-e10aa7bd.entry.js.map +0 -1
- package/dist/stzh-components/p-f50e0102.entry.js +0 -2
- package/dist/stzh-components/p-f50e0102.entry.js.map +0 -1
- package/dist/stzh-components/p-f86e53a0.entry.js +0 -2
- package/dist/stzh-components/p-f86e53a0.entry.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { h as hasSlot, c as camelCase } from './utils.js';
|
|
3
3
|
import { S as StzhInputDescription } from './stzh-input-description.js';
|
|
4
4
|
import { d as defineCustomElement$4 } from './stzh-icon2.js';
|
|
5
5
|
import { d as defineCustomElement$3 } from './stzh-popover2.js';
|
|
@@ -19,12 +19,13 @@ const StzhCheckboxgroup$1 = /*@__PURE__*/ proxyCustomElement(class StzhCheckboxg
|
|
|
19
19
|
this.value = [...this.defaultValue];
|
|
20
20
|
};
|
|
21
21
|
this.init = () => {
|
|
22
|
+
// update checkboxes
|
|
22
23
|
this.checkboxes = Array.from(this.element.querySelectorAll("stzh-checkbox"));
|
|
23
24
|
this.updateCheckboxesProperty("a11y-describedby", `${this.checkboxgroupId}-description`);
|
|
25
|
+
this.updateCheckboxesProperty("invalid", this.invalid || this.errorUsed);
|
|
24
26
|
this.watchValue(this.value);
|
|
25
27
|
this.watchName(this.name);
|
|
26
28
|
this.watchDisabled(this.disabled);
|
|
27
|
-
this.watchInvalid(this.invalid);
|
|
28
29
|
this.watchHideOptional(this.hideOptional);
|
|
29
30
|
};
|
|
30
31
|
this.localization = undefined;
|
|
@@ -50,9 +51,6 @@ const StzhCheckboxgroup$1 = /*@__PURE__*/ proxyCustomElement(class StzhCheckboxg
|
|
|
50
51
|
watchDisabled(newValue) {
|
|
51
52
|
this.updateCheckboxesProperty("disabled", newValue);
|
|
52
53
|
}
|
|
53
|
-
watchInvalid(newValue) {
|
|
54
|
-
this.updateCheckboxesProperty("invalid", newValue);
|
|
55
|
-
}
|
|
56
54
|
watchHideOptional(newValue) {
|
|
57
55
|
this.updateCheckboxesProperty("hideOptional", newValue);
|
|
58
56
|
}
|
|
@@ -121,6 +119,10 @@ const StzhCheckboxgroup$1 = /*@__PURE__*/ proxyCustomElement(class StzhCheckboxg
|
|
|
121
119
|
});
|
|
122
120
|
}
|
|
123
121
|
}
|
|
122
|
+
get errorUsed() {
|
|
123
|
+
var _a;
|
|
124
|
+
return hasSlot(this.element, 'error') || ((_a = this._error) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
125
|
+
}
|
|
124
126
|
updateCheckboxesProperty(prop, value) {
|
|
125
127
|
this.checkboxes.forEach((checkbox) => {
|
|
126
128
|
if (prop === "name" || (this._preventUpdateProperties.indexOf(prop) === -1)) {
|
|
@@ -169,28 +171,25 @@ const StzhCheckboxgroup$1 = /*@__PURE__*/ proxyCustomElement(class StzhCheckboxg
|
|
|
169
171
|
}
|
|
170
172
|
}
|
|
171
173
|
render() {
|
|
172
|
-
var _a;
|
|
173
174
|
const descriptionUsed = hasSlot(this.element, 'description') || !!this.description;
|
|
174
175
|
const descriptionLongUsed = hasSlot(this.element, 'description-long') || !!this.descriptionLong;
|
|
175
|
-
const errorUsed = hasSlot(this.element, 'error') || ((_a = this._error) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
176
176
|
const classes = {
|
|
177
177
|
"stzh-checkboxgroup": true,
|
|
178
178
|
"stzh-checkboxgroup--has-description": descriptionUsed,
|
|
179
179
|
"stzh-checkboxgroup--has-description-long": descriptionLongUsed,
|
|
180
|
-
"stzh-checkboxgroup--has-error": errorUsed,
|
|
180
|
+
"stzh-checkboxgroup--has-error": this.errorUsed,
|
|
181
181
|
"stzh-checkboxgroup--is-disabled": this.disabled,
|
|
182
|
-
"stzh-checkboxgroup--is-invalid": this.invalid || errorUsed,
|
|
182
|
+
"stzh-checkboxgroup--is-invalid": this.invalid || this.errorUsed,
|
|
183
183
|
"stzh-checkboxgroup--hide-legend": this.hideLegend,
|
|
184
184
|
[`stzh-checkboxgroup--direction-${this.direction}`]: !!this.direction
|
|
185
185
|
};
|
|
186
|
-
return (h(Host, { "is-invalid": this.invalid || errorUsed }, h("fieldset", { class: classes }, this.legend &&
|
|
186
|
+
return (h(Host, { "is-invalid": this.invalid || this.errorUsed }, h("fieldset", { class: classes }, this.legend &&
|
|
187
187
|
h("legend", { class: "stzh-checkboxgroup__legend" }, this.legend), h("div", { class: "stzh-checkboxgroup__fields" }, h("slot", null)), h(StzhInputDescription, { classPrefix: "stzh-checkboxgroup", id: `${this.checkboxgroupId}-description`, error: this._error, description: this.description, descriptionLong: this.descriptionLong, descriptionLongTitle: this.descriptionLongTitle, descriptionLongUsed: descriptionLongUsed, moreInfoButtonLabel: this.localization.$globals.moreInfoButtonLabel }))));
|
|
188
188
|
}
|
|
189
189
|
get element() { return this; }
|
|
190
190
|
static get watchers() { return {
|
|
191
191
|
"name": ["watchName"],
|
|
192
192
|
"disabled": ["watchDisabled"],
|
|
193
|
-
"invalid": ["watchInvalid"],
|
|
194
193
|
"hideOptional": ["watchHideOptional"],
|
|
195
194
|
"value": ["watchValue"],
|
|
196
195
|
"error": ["errorWatcher"],
|
|
@@ -217,7 +216,6 @@ const StzhCheckboxgroup$1 = /*@__PURE__*/ proxyCustomElement(class StzhCheckboxg
|
|
|
217
216
|
}, [[4, "reset", "resetListener"], [2, "stzhChange", "onChange"]], {
|
|
218
217
|
"name": ["watchName"],
|
|
219
218
|
"disabled": ["watchDisabled"],
|
|
220
|
-
"invalid": ["watchInvalid"],
|
|
221
219
|
"hideOptional": ["watchHideOptional"],
|
|
222
220
|
"value": ["watchValue"],
|
|
223
221
|
"error": ["errorWatcher"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"stzh-checkboxgroup.js","mappings":";;;;;;;AAAA,MAAM,oBAAoB,GAAG,sqJAAsqJ;;ACoBnsJ,IAAI,oBAAoB,GAAG,CAAC,CAAC;MAchBA,mBAAiB;;;;;IAwBpB,WAAM,GAAa,EAAE,CAAC;IA0BtB,6BAAwB,GAAa,EAAE,CAAC;IAoHxC,gBAAW,GAAG;MACpB,IAAI,CAAC,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC;KACrC,CAAA;IAEO,SAAI,GAAG;MACb,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC;MAC7E,IAAI,CAAC,wBAAwB,CAAC,kBAAkB,EAAE,GAAG,IAAI,CAAC,eAAe,cAAc,CAAC,CAAC;MAEzF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;MAC5B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;MAC1B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;MAClC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;MAChC,IAAI,CAAC,iBAAiB,CA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5E,MAAM,OAAO,GAAG;MACd,oBAAoB,EAAE,IAAI;MAC1B,qCAAqC,EAAE,eAAe;MACtD,0CAA0C,EAAE,mBAAmB;MAC/D,+BAA+B,EAAE,SAAS;MAC1C,iCAAiC,EAAE,IAAI,CAAC,QAAQ;MAChD,gCAAgC,EAAE,IAAI,CAAC,OAAO,IAAI,SAAS;MAC3D,iCAAiC,EAAE,IAAI,CAAC,UAAU;MAClD,CAAC,iCAAiC,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS;KACtE,CAAC;IAEF,QACE,EAAC,IAAI,kBAAa,IAAI,CAAC,OAAO,IAAI,SAAS,IACzC,gBAAU,KAAK,EAAE,OAAO,IACrB,IAAI,CAAC,MAAM;MACV,cAAQ,KAAK,EAAC,4BAA4B,IACvC,IAAI,CAAC,MAAM,CACL,EAEX,WAAK,KAAK,EAAC,4BAA4B,IACrC,eAAa,CACT,EACN,EAAC,oBAAoB,IACnB,WAAW,EAAC,oBAAoB,EAChC,EAAE,EAAE,GAAG,IAAI,CAAC,eAAe,cAAc,EACzC,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAC/C,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,mBAAmB,GACnE,CACO,CACN,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["StzhCheckboxgroup"],"sources":["src/components/stzh-checkboxgroup/stzh-checkboxgroup.scss?tag=stzh-checkboxgroup&encapsulation=scoped","src/components/stzh-checkboxgroup/stzh-checkboxgroup.tsx"],"sourcesContent":[":host {\n &[disabled]:not([disabled=\"false\"]) {\n --description-color: #{$formDisabledColor};\n }\n}\n\n.stzh-checkboxgroup {\n @include input-description;\n margin: 0;\n padding: 0;\n border: none;\n\n &__fields {\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n gap: space('medium');\n }\n\n &__legend {\n @include font('heavy');\n @include fontSize('micro');\n color: $headingColor;\n padding: 0;\n margin-bottom: space('xsmall');\n }\n\n &--hide-legend &__legend {\n @include visuallyhidden;\n }\n\n &--direction-horizontal &__fields {\n flex-wrap: wrap;\n flex-direction: row;\n row-gap: space('medium');\n column-gap: space('xxlarge');\n }\n}\n","import {\n Host,\n Component,\n Prop,\n Element,\n Watch,\n Event,\n h,\n Listen,\n EventEmitter,\n} from \"@stencil/core\";\n\nimport { hasSlot } from \"../../utils/utils\";\n\nimport { StzhCheckboxChangeEvent, StzhCheckboxgroupChangeEvent } from \"../../index\";\nimport { camelCase } from \"../../utils/string-utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\nlet checkboxgroupCounter = 0;\n\n/**\n * @slot - Slot for `stzh-checkbox` elements\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot description-long-title - Slot for long description title (in popover) / instead of descriptionLongTitle or description property\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-checkboxgroup\",\n styleUrl: \"stzh-checkboxgroup.scss\",\n scoped: true\n})\nexport class StzhCheckboxgroup {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** The name of the input checkbox elements */\n @Prop({ reflect: true }) name: string;\n\n /** The legend */\n @Prop() legend: string;\n\n /** Hide legend to show only for screenreaders */\n @Prop({ reflect: true }) hideLegend: boolean = false;\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Hide `(optional)` label (or use `required` inside form ot hide it) */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** The selected values of the checkboxgroup */\n @Prop({ mutable: true }) value: string[] | string = \"\";\n private _value: string[] = [];\n\n /** Default value (used by reset) */\n @Prop({ mutable: true }) defaultValue: string[] = [];\n\n /** Direction */\n @Prop({ reflect: true }) direction: \"vertical\" | \"horizontal\" = \"vertical\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** Long description title appearing in a popover (use description-long-title slot as or description property alternative) */\n @Prop() descriptionLongTitle: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Current checked checkbox elements (readonly) */\n @Prop() checkedCheckbox: HTMLStzhCheckboxElement[] | null = null;\n\n /** Prevent updating certain properties of radio elements (possible values inside array: disabled, invalid) */\n @Prop() preventUpdateProperties: string[] | string = [];\n private _preventUpdateProperties: string[] = [];\n\n /** Host element */\n @Element() element: HTMLElement;\n\n @Watch(\"name\")\n watchName(newValue: string) {\n this.updateCheckboxesProperty(\"name\", newValue);\n }\n\n @Watch(\"disabled\")\n watchDisabled(newValue: boolean) {\n this.updateCheckboxesProperty(\"disabled\", newValue);\n }\n\n @Watch(\"invalid\")\n watchInvalid(newValue: boolean) {\n this.updateCheckboxesProperty(\"invalid\", newValue);\n }\n\n @Watch(\"hideOptional\")\n watchHideOptional(newValue: boolean) {\n this.updateCheckboxesProperty(\"hideOptional\", newValue)\n }\n\n @Watch(\"value\")\n watchValue(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n this._value = JSON.parse(newValue);\n } else {\n this._value = newValue;\n }\n\n if (JSON.stringify(this._value) !== JSON.stringify(this.value)) {\n this.value = this._value;\n }\n\n this.updateCheckedCheckboxByValue(this._value);\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n @Watch(\"preventUpdateProperties\")\n preventUpdatePropertiesWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n this._preventUpdateProperties = JSON.parse(newValue);\n } else {\n this._preventUpdateProperties = newValue;\n }\n }\n\n /** Change event */\n @Event() stzhChange: EventEmitter<StzhCheckboxgroupChangeEvent>;\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 @Listen(\"stzhChange\", {capture: true})\n onChange(event: CustomEvent<StzhCheckboxChangeEvent>) {\n if (event.detail.component === \"stzh-checkbox\") {\n if (event.detail.checked) {\n this._value.push(event.detail.value);\n } else {\n this._value = this._value.filter(value => value !== event.detail.value);\n }\n // stop propagating checkbox change event otherwise angular control value accessor won't work\n event.stopPropagation();\n this.value = this._value;\n this.stzhChange.emit({\n component: \"stzh-checkboxgroup\",\n value: this._value,\n });\n }\n }\n\n /** Checkbox elements */\n private checkboxes: HTMLStzhCheckboxElement[];\n private checkboxgroupId: string;\n private observer: MutationObserver;\n\n private updateCheckboxesProperty(prop: string, value: any) {\n this.checkboxes.forEach((checkbox: HTMLStzhCheckboxElement) => {\n if (prop === \"name\" || (this._preventUpdateProperties.indexOf(prop) === -1)) {\n checkbox[camelCase(prop)] = value;\n }\n });\n }\n\n private updateCheckedCheckboxByValue(value: string[]) {\n this.checkedCheckbox = this.checkboxes.filter(checkbox => value.indexOf(checkbox.value) > -1);\n this.checkboxes.forEach(checkbox => checkbox.checked = value.indexOf(checkbox.value) > -1);\n }\n\n private handleReset = async () => {\n this.value = [...this.defaultValue];\n }\n\n private init = () => {\n this.checkboxes = Array.from(this.element.querySelectorAll(\"stzh-checkbox\"));\n this.updateCheckboxesProperty(\"a11y-describedby\", `${this.checkboxgroupId}-description`);\n\n this.watchValue(this.value);\n this.watchName(this.name);\n this.watchDisabled(this.disabled);\n this.watchInvalid(this.invalid);\n this.watchHideOptional(this.hideOptional);\n }\n\n async componentWillLoad() {\n this.checkboxgroupId = `stzh-checkboxgroup-${checkboxgroupCounter++}`;\n this.errorWatcher(this.error);\n this.preventUpdatePropertiesWatcher(this.preventUpdateProperties);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'checkboxgroup');\n }\n }\n\n componentShouldUpdate(_newValue, _oldValue, prop: string) {\n return prop !== \"checkedCheckbox\";\n }\n\n componentDidRender() {\n this.init();\n }\n\n componentDidLoad() {\n this.defaultValue = this.defaultValue.length > 0 ? this.defaultValue : [...this._value];\n }\n\n connectedCallback() {\n if (!this.value.length) {\n this.checkboxes = Array.from(this.element.querySelectorAll(\"stzh-checkbox\"));\n\n // try to find checkboxes that might have checked set to true\n this.value = this.checkboxes\n .filter(checkbox => checkbox.checked)\n .map(checkbox => checkbox.value);\n }\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 if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n render() {\n const descriptionUsed = hasSlot(this.element, 'description') || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, 'description-long') || !!this.descriptionLong;\n const errorUsed = hasSlot(this.element, 'error') || this._error?.length > 0;\n\n const classes = {\n \"stzh-checkboxgroup\": true,\n \"stzh-checkboxgroup--has-description\": descriptionUsed,\n \"stzh-checkboxgroup--has-description-long\": descriptionLongUsed,\n \"stzh-checkboxgroup--has-error\": errorUsed,\n \"stzh-checkboxgroup--is-disabled\": this.disabled,\n \"stzh-checkboxgroup--is-invalid\": this.invalid || errorUsed,\n \"stzh-checkboxgroup--hide-legend\": this.hideLegend,\n [`stzh-checkboxgroup--direction-${this.direction}`]: !!this.direction\n };\n\n return (\n <Host is-invalid={this.invalid || errorUsed}>\n <fieldset class={classes}>\n {this.legend &&\n <legend class=\"stzh-checkboxgroup__legend\">\n {this.legend}\n </legend>\n }\n <div class=\"stzh-checkboxgroup__fields\">\n <slot></slot>\n </div>\n <StzhInputDescription\n classPrefix=\"stzh-checkboxgroup\"\n id={`${this.checkboxgroupId}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongTitle={this.descriptionLongTitle}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n </fieldset>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"stzh-checkboxgroup.js","mappings":";;;;;;;AAAA,MAAM,oBAAoB,GAAG,sqJAAsqJ;;ACoBnsJ,IAAI,oBAAoB,GAAG,CAAC,CAAC;MAchBA,mBAAiB;;;;;IAwBpB,WAAM,GAAa,EAAE,CAAC;IA0BtB,6BAAwB,GAAa,EAAE,CAAC;IAmHxC,gBAAW,GAAG;MACpB,IAAI,CAAC,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC;KACrC,CAAA;IAEO,SAAI,GAAG;;MAEb,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC;MAC7E,IAAI,CAAC,wBAAwB,CAAC,kBAAkB,EAAE,GAAG,IAAI,CAAC,eAAe,cAAc,CAAC,CAAC;MACzF,IAAI,CAAC,wBAAwB,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;MAEzE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;MAC5B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;MAC1B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;MAClC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KAC3C,CAAA;;oBA9K4C,KAAK;;;sBASH,KAAK;mBA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AI,CAAC,QAAQ;MAChD,gCAAgC,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS;MAChE,iCAAiC,EAAE,IAAI,CAAC,UAAU;MAClD,CAAC,iCAAiC,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS;KACtE,CAAC;IAEF,QACE,EAAC,IAAI,kBAAa,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,IAC9C,gBAAU,KAAK,EAAE,OAAO,IACrB,IAAI,CAAC,MAAM;MACV,cAAQ,KAAK,EAAC,4BAA4B,IACvC,IAAI,CAAC,MAAM,CACL,EAEX,WAAK,KAAK,EAAC,4BAA4B,IACrC,eAAa,CACT,EACN,EAAC,oBAAoB,IACnB,WAAW,EAAC,oBAAoB,EAChC,EAAE,EAAE,GAAG,IAAI,CAAC,eAAe,cAAc,EACzC,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAC/C,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,mBAAmB,GACnE,CACO,CACN,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["StzhCheckboxgroup"],"sources":["src/components/stzh-checkboxgroup/stzh-checkboxgroup.scss?tag=stzh-checkboxgroup&encapsulation=scoped","src/components/stzh-checkboxgroup/stzh-checkboxgroup.tsx"],"sourcesContent":[":host {\n &[disabled]:not([disabled=\"false\"]) {\n --description-color: #{$formDisabledColor};\n }\n}\n\n.stzh-checkboxgroup {\n @include input-description;\n margin: 0;\n padding: 0;\n border: none;\n\n &__fields {\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n gap: space('medium');\n }\n\n &__legend {\n @include font('heavy');\n @include fontSize('micro');\n color: $headingColor;\n padding: 0;\n margin-bottom: space('xsmall');\n }\n\n &--hide-legend &__legend {\n @include visuallyhidden;\n }\n\n &--direction-horizontal &__fields {\n flex-wrap: wrap;\n flex-direction: row;\n row-gap: space('medium');\n column-gap: space('xxlarge');\n }\n}\n","import {\n Host,\n Component,\n Prop,\n Element,\n Watch,\n Event,\n h,\n Listen,\n EventEmitter,\n} from \"@stencil/core\";\n\nimport { hasSlot } from \"../../utils/utils\";\n\nimport { StzhCheckboxChangeEvent, StzhCheckboxgroupChangeEvent } from \"../../index\";\nimport { camelCase } from \"../../utils/string-utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\nlet checkboxgroupCounter = 0;\n\n/**\n * @slot - Slot for `stzh-checkbox` elements\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot description-long-title - Slot for long description title (in popover) / instead of descriptionLongTitle or description property\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-checkboxgroup\",\n styleUrl: \"stzh-checkboxgroup.scss\",\n scoped: true\n})\nexport class StzhCheckboxgroup {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** The name of the input checkbox elements */\n @Prop({ reflect: true }) name: string;\n\n /** The legend */\n @Prop() legend: string;\n\n /** Hide legend to show only for screenreaders */\n @Prop({ reflect: true }) hideLegend: boolean = false;\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Hide `(optional)` label (or use `required` inside form ot hide it) */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** The selected values of the checkboxgroup */\n @Prop({ mutable: true }) value: string[] | string = \"\";\n private _value: string[] = [];\n\n /** Default value (used by reset) */\n @Prop({ mutable: true }) defaultValue: string[] = [];\n\n /** Direction */\n @Prop({ reflect: true }) direction: \"vertical\" | \"horizontal\" = \"vertical\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** Long description title appearing in a popover (use description-long-title slot as or description property alternative) */\n @Prop() descriptionLongTitle: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Current checked checkbox elements (readonly) */\n @Prop() checkedCheckbox: HTMLStzhCheckboxElement[] | null = null;\n\n /** Prevent updating certain properties of radio elements (possible values inside array: disabled, invalid) */\n @Prop() preventUpdateProperties: string[] | string = [];\n private _preventUpdateProperties: string[] = [];\n\n /** Host element */\n @Element() element: HTMLElement;\n\n @Watch(\"name\")\n watchName(newValue: string) {\n this.updateCheckboxesProperty(\"name\", newValue);\n }\n\n @Watch(\"disabled\")\n watchDisabled(newValue: boolean) {\n this.updateCheckboxesProperty(\"disabled\", newValue);\n }\n\n @Watch(\"hideOptional\")\n watchHideOptional(newValue: boolean) {\n this.updateCheckboxesProperty(\"hideOptional\", newValue)\n }\n\n @Watch(\"value\")\n watchValue(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n this._value = JSON.parse(newValue);\n } else {\n this._value = newValue;\n }\n\n if (JSON.stringify(this._value) !== JSON.stringify(this.value)) {\n this.value = this._value;\n }\n\n this.updateCheckedCheckboxByValue(this._value);\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n @Watch(\"preventUpdateProperties\")\n preventUpdatePropertiesWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n this._preventUpdateProperties = JSON.parse(newValue);\n } else {\n this._preventUpdateProperties = newValue;\n }\n }\n\n /** Change event */\n @Event() stzhChange: EventEmitter<StzhCheckboxgroupChangeEvent>;\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 @Listen(\"stzhChange\", {capture: true})\n onChange(event: CustomEvent<StzhCheckboxChangeEvent>) {\n if (event.detail.component === \"stzh-checkbox\") {\n if (event.detail.checked) {\n this._value.push(event.detail.value);\n } else {\n this._value = this._value.filter(value => value !== event.detail.value);\n }\n // stop propagating checkbox change event otherwise angular control value accessor won't work\n event.stopPropagation();\n this.value = this._value;\n this.stzhChange.emit({\n component: \"stzh-checkboxgroup\",\n value: this._value,\n });\n }\n }\n\n private get errorUsed() {\n return hasSlot(this.element, 'error') || this._error?.length > 0;\n }\n\n /** Checkbox elements */\n private checkboxes: HTMLStzhCheckboxElement[];\n private checkboxgroupId: string;\n private observer: MutationObserver;\n\n private updateCheckboxesProperty(prop: string, value: any) {\n this.checkboxes.forEach((checkbox: HTMLStzhCheckboxElement) => {\n if (prop === \"name\" || (this._preventUpdateProperties.indexOf(prop) === -1)) {\n checkbox[camelCase(prop)] = value;\n }\n });\n }\n\n private updateCheckedCheckboxByValue(value: string[]) {\n this.checkedCheckbox = this.checkboxes.filter(checkbox => value.indexOf(checkbox.value) > -1);\n this.checkboxes.forEach(checkbox => checkbox.checked = value.indexOf(checkbox.value) > -1);\n }\n\n private handleReset = async () => {\n this.value = [...this.defaultValue];\n }\n\n private init = () => {\n // update checkboxes\n this.checkboxes = Array.from(this.element.querySelectorAll(\"stzh-checkbox\"));\n this.updateCheckboxesProperty(\"a11y-describedby\", `${this.checkboxgroupId}-description`);\n this.updateCheckboxesProperty(\"invalid\", this.invalid || this.errorUsed);\n\n this.watchValue(this.value);\n this.watchName(this.name);\n this.watchDisabled(this.disabled);\n this.watchHideOptional(this.hideOptional);\n }\n\n async componentWillLoad() {\n this.checkboxgroupId = `stzh-checkboxgroup-${checkboxgroupCounter++}`;\n this.errorWatcher(this.error);\n this.preventUpdatePropertiesWatcher(this.preventUpdateProperties);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'checkboxgroup');\n }\n }\n\n componentShouldUpdate(_newValue, _oldValue, prop: string) {\n return prop !== \"checkedCheckbox\";\n }\n\n componentDidRender() {\n this.init();\n }\n\n componentDidLoad() {\n this.defaultValue = this.defaultValue.length > 0 ? this.defaultValue : [...this._value];\n }\n\n connectedCallback() {\n if (!this.value.length) {\n this.checkboxes = Array.from(this.element.querySelectorAll(\"stzh-checkbox\"));\n\n // try to find checkboxes that might have checked set to true\n this.value = this.checkboxes\n .filter(checkbox => checkbox.checked)\n .map(checkbox => checkbox.value);\n }\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 if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n render() {\n const descriptionUsed = hasSlot(this.element, 'description') || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, 'description-long') || !!this.descriptionLong;\n\n const classes = {\n \"stzh-checkboxgroup\": true,\n \"stzh-checkboxgroup--has-description\": descriptionUsed,\n \"stzh-checkboxgroup--has-description-long\": descriptionLongUsed,\n \"stzh-checkboxgroup--has-error\": this.errorUsed,\n \"stzh-checkboxgroup--is-disabled\": this.disabled,\n \"stzh-checkboxgroup--is-invalid\": this.invalid || this.errorUsed,\n \"stzh-checkboxgroup--hide-legend\": this.hideLegend,\n [`stzh-checkboxgroup--direction-${this.direction}`]: !!this.direction\n };\n\n return (\n <Host is-invalid={this.invalid || this.errorUsed}>\n <fieldset class={classes}>\n {this.legend &&\n <legend class=\"stzh-checkboxgroup__legend\">\n {this.legend}\n </legend>\n }\n <div class=\"stzh-checkboxgroup__fields\">\n <slot></slot>\n </div>\n <StzhInputDescription\n classPrefix=\"stzh-checkboxgroup\"\n id={`${this.checkboxgroupId}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongTitle={this.descriptionLongTitle}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n </fieldset>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -206,7 +206,9 @@ const StzhChipselect = /*@__PURE__*/ proxyCustomElement(class StzhChipselect ext
|
|
|
206
206
|
"stzh-chipselect__chip": true,
|
|
207
207
|
"is-focused": this.activeFocusOptionIndex === index
|
|
208
208
|
}, label: data.label, counter: data.counter, icon: data.icon, type: data.type, inverted: data.inverted, variant: data.variant, size: data.size || "small", disabled: this.disabled || data.disabled, active: this._value.includes(data.value)
|
|
209
|
+
|| (!this.multiple && !data.value && (this._value.length === 0 || this._value[0] === ""))
|
|
209
210
|
|| (!data.value && this.multiple && (this._value.length === 0 || (this._value.length === 1 && this._value[0] === ""))), "aria-selected": this._value.includes(data.value)
|
|
211
|
+
|| (!this.multiple && !data.value && (this._value.length === 0 || this._value[0] === ""))
|
|
210
212
|
|| (!data.value && this.multiple && (this._value.length === 0 || (this._value.length === 1 && this._value[0] === "")))
|
|
211
213
|
? "true" : "false", id: `${this.id}-option-${index}`, a11yTabindex: "-1", onClick: () => this.handleChipClick(data, index) })))), h(StzhInputDescription, { classPrefix: "stzh-chipselect", id: `${this.id}-description`, error: this._error, description: this.description, descriptionLong: this.descriptionLong, descriptionLongTitle: this.descriptionLongTitle, descriptionLongUsed: descriptionLongUsed, moreInfoButtonLabel: this.localization.$globals.moreInfoButtonLabel })))));
|
|
212
214
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"stzh-chipselect2.js","mappings":";;;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,kxLAAkxL;;ACyB5yL,IAAI,iBAAiB,GAAG,CAAC,CAAC;MAcb,cAAc;;;;;IAMjB,UAAK,GAAyB,EAAE,CAAC;IAiBjC,WAAM,GAAa,EAAE,CAAC;IA0GtB,gBAAW,GAAG;MACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC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AC,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,GACrC,CACd,CAAC,CACE,EAEN,EAAC,oBAAoB,IACnB,WAAW,EAAC,iBAAiB,EAC7B,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,cAAc,EAC5B,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAC/C,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,mBAAmB,GACnE,CAkBO,CAET,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-chipselect/stzh-chipselect.scss?tag=stzh-chipselect&encapsulation=scoped","src/components/stzh-chipselect/stzh-chipselect.tsx"],"sourcesContent":[":host {\n &[disabled]:not([disabled=\"false\"]) {\n --description-color: #{$formDisabledColor};\n }\n}\n\n.stzh-chipselect {\n\t@include input-description;\n\n &__label {\n @include font('heavy');\n @include fontSize('micro');\n @include truncate;\n color: $headingColor;\n display: block;\n margin-bottom: space('xsmall');\n\n &:empty {\n display: none;\n }\n }\n\n &__marker {\n @include fontSize('nano');\n margin-left: calc(-0.25em + #{space('xsmall')});\n }\n\n &__chips {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n border-radius: $buttonBorderRadius;\n column-gap: space('medium');\n\n @include mq($from: medium) {\n row-gap: space('medium');\n }\n\n // @include mq($to: medium) {\n // display: none;\n // }\n }\n\n &__chip {\n &.is-focused,\n &.is-focused[active]:not([active=false]) {\n --background-color: #{$colorSecondary40};\n\n @include highContrast() {\n --background-color: Highlight;\n }\n }\n\n &.is-focused[active]:not([active=false]) {\n --background-color: #{$colorPrimary90};\n\n @include highContrast() {\n --background-color: Canvas;\n }\n }\n }\n\n // &__dropdown {\n // @include mq($from: medium) {\n // display: none;\n // }\n // }\n\n // &__description-wrapper {\n // @include mq($to: medium) {\n // display: none;\n // }\n // }\n\n &--has-error &__error,\n &--has-description &__description {\n margin-top: space('xsmall');\n }\n\n /* Hidden label */\n\n &--has-label-hidden &__label {\n @include visuallyhidden;\n }\n\n /* Disabled */\n\n &--is-disabled &__chips,\n &--is-disabled &__label {\n cursor: not-allowed;\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Watch,\n Event,\n EventEmitter,\n State,\n Fragment,\n Listen,\n} from \"@stencil/core\";\n\nimport {\n StzhChipselectItem,\n StzhChipselectChangeEvent,\n // StzhDropdownChangeEvent\n} from \"../../index\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\n// import { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nlet chipselectCounter = 0;\n\n/**\n * @slot - Slot for `stzh-checkbox` elements\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot description-long-title - Slot for long description title (in popover) / instead of descriptionLongTitle or description property\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-chipselect\",\n styleUrl: \"stzh-chipselect.scss\",\n scoped: true\n})\nexport class StzhChipselect {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** The list of chips */\n @Prop() data: string | StzhChipselectItem[] = [];\n private _data: StzhChipselectItem[] = [];\n // private _dataDropdown: any[] = [];\n\n /** The name of the input element */\n @Prop({ reflect: true }) name: string;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Whether label is hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Multiple */\n @Prop({ mutable: true }) multiple: boolean = false;\n\n /** Value */\n @Prop({ mutable: true }) value: string | string[] = \"\";\n private _value: string[] = [];\n\n /** Default value (used by reset) */\n @Prop({ mutable: true }) defaultValue: string | string[] = \"\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** Long description title appearing in a popover (use description-long-title slot as or description property alternative) */\n @Prop() descriptionLongTitle: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Whether all chips are disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Hide `(optional)` label (or use `required` inside form ot hide it) */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** Id for element which describes the input (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n @State() activeFocusOptionIndex: number = 0;\n\n @Element() element: HTMLStzhChipselectElement;\n\n /** Change event */\n @Event() stzhChange: EventEmitter<StzhChipselectChangeEvent>;\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 @Watch(\"value\")\n valueWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n try {\n this._value = JSON.parse(newValue);\n } catch(ex) {\n this._value = newValue ? [newValue] : [];\n }\n } else {\n this._value = newValue ? newValue : [];\n }\n }\n\n @Watch(\"data\")\n dataWatcher(newValue: StzhChipselectItem[] | string) {\n if (typeof newValue === \"string\") {\n this._data = JSON.parse(newValue);\n } else {\n this._data = newValue;\n }\n\n // this._dataDropdown = this._data.map((data) => {\n // return {\n // text: data.counter\n // ? `${data.label} (${data.counter})`\n // : data.label,\n // value: data.value\n // }\n // });\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n private id: string;\n private renderPromiseResolve: (value?: unknown) => void;\n\n private waitForNextRender() {\n return new Promise(resolve => this.renderPromiseResolve = resolve);\n }\n\n private handleReset = async () => {\n this.value = this.defaultValue;\n\n // this.stzhChange.emit({\n // component: \"stzh-chipselect\",\n // value: this.value\n // });\n }\n\n private handleChipClick = async (data: StzhChipselectItem, index: number) => {\n if (this.multiple) {\n if (data.value === \"\" && this._value.length > 0 && !(this._value.length === 1 && this._value[0] === \"\")) {\n this.value = [];\n } else if (data.value !== \"\") {\n this.value = this._value.includes(data.value)\n ? this._value.filter(value => value !== data.value)\n : [...this._value, data.value];\n }\n } else {\n this.value = [data.value]\n }\n\n this.activeFocusOptionIndex = index;\n\n await this.waitForNextRender();\n\n this.stzhChange.emit({\n component: \"stzh-chipselect\",\n value: this.multiple ? this._value[0] : this._value\n })\n }\n\n // private handleDropdownChange = async (event: CustomEvent<StzhDropdownChangeEvent>) => {\n // this.value = Array.isArray(event.detail.value) ? event.detail.value[0] : event.detail.value;\n\n // this.activeFocusOptionIndex = this._data.findIndex(data => {\n // return data.value === this.value;\n // });\n\n // await this.waitForNextRender();\n\n // this.stzhChange.emit({\n // component: \"stzh-chipselect\",\n // value: this.value\n // })\n // }\n\n private handleKeydown = (event: KeyboardEvent) => {\n let newActiveIndex: number = null;\n const activeOptionIndex = this.activeFocusOptionIndex;\n\n if (event.key === \"ArrowUp\" || event.key === \"ArrowLeft\") {\n event.preventDefault();\n\n if (activeOptionIndex > 0) {\n newActiveIndex = activeOptionIndex - 1;\n }\n } else if (event.key === \"ArrowDown\" || event.key === \"ArrowRight\") {\n event.preventDefault();\n\n if (activeOptionIndex < this._data.length - 1) {\n newActiveIndex = activeOptionIndex + 1;\n }\n } else if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n this.value = this._data[activeOptionIndex].value;\n\n this.stzhChange.emit({\n component: \"stzh-chipselect\",\n value: this.value\n });\n }\n\n if (newActiveIndex !== null) {\n this.activeFocusOptionIndex = newActiveIndex;\n }\n }\n\n componentDidRender() {\n if (this.renderPromiseResolve) {\n this.renderPromiseResolve();\n }\n }\n\n async componentWillLoad() {\n this.id = `stzh-chipselect-${chipselectCounter++}`;\n\n this.dataWatcher(this.data);\n this.errorWatcher(this.error);\n this.valueWatcher(this.value);\n\n this.defaultValue = this.defaultValue || this.value;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"chipselect\");\n }\n }\n\n render() {\n const descriptionUsed = !!this.description;\n const descriptionLongUsed = !!this.descriptionLong;\n const errorUsed = !!this.error;\n\n const classes = {\n \"stzh-chipselect\": true,\n \"stzh-chipselect--has-description\": descriptionUsed,\n \"stzh-chipselect--has-description-long\": descriptionLongUsed,\n \"stzh-chipselect--has-error\": errorUsed,\n \"stzh-chipselect--is-invalid\": this.invalid || errorUsed,\n \"stzh-chipselect--is-disabled\": this.disabled,\n \"stzh-chipselect--is-required\": this.required,\n \"stzh-chipselect--has-label-hidden\": this.labelHidden,\n };\n\n return (\n <Host is-invalid={this.invalid || errorUsed}>\n <div class={classes}>\n {this.multiple\n ?\n <Fragment>\n {this._value.map((value) =>\n <input type=\"hidden\" name={this.name} value={value} />\n )}\n </Fragment>\n :\n <input\n type=\"hidden\"\n name={this.name}\n value={this.value}\n />\n }\n\n <label class=\"stzh-chipselect__label\" htmlFor={this.id}>\n {this.label ? this.label : <slot></slot>}\n {!this.hideOptional &&\n <span class=\"stzh-chipselect__marker\">\n <span class=\"stzh-chipselect__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker\n }\n </span>\n <span class=\"stzh-chipselect__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText\n }\n </span>\n </span>\n }\n </label>\n\n {this._data.length > 0 &&\n <Fragment>\n <div\n id={this.id}\n class=\"stzh-chipselect__chips\"\n role=\"listbox\"\n tabindex=\"0\"\n aria-multiselectable={this.multiple ? \"true\" : \"false\"}\n aria-activedescendant={`${this.id}-option-${this.activeFocusOptionIndex}`}\n aria-describedby={`${this.id}-description ${this.a11yDescribedby}`}\n onKeyDown={this.handleKeydown}\n >\n {this._data.map((data, index) => (\n <stzh-chip\n role=\"option\"\n class={{\n \"stzh-chipselect__chip\": true,\n \"is-focused\": this.activeFocusOptionIndex === index\n }}\n label={data.label}\n counter={data.counter}\n icon={data.icon}\n type={data.type}\n inverted={data.inverted}\n variant={data.variant}\n size={data.size || \"small\"}\n disabled={this.disabled || data.disabled}\n active={\n this._value.includes(data.value)\n || (!data.value && this.multiple && (this._value.length === 0 || (this._value.length === 1 && this._value[0] === \"\")))\n }\n aria-selected={\n this._value.includes(data.value)\n || (!data.value && this.multiple && (this._value.length === 0 || (this._value.length === 1 && this._value[0] === \"\")))\n ? \"true\" : \"false\"\n }\n id={`${this.id}-option-${index}`}\n a11yTabindex=\"-1\"\n onClick={() => this.handleChipClick(data, index)}\n ></stzh-chip>\n ))}\n </div>\n\n <StzhInputDescription\n classPrefix=\"stzh-chipselect\"\n id={`${this.id}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongTitle={this.descriptionLongTitle}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n\n {/* <stzh-dropdown\n class=\"stzh-chipselect__dropdown\"\n multiple={this.multiple}\n disabled={this.disabled}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n required={this.required}\n invalid={this.invalid}\n items={[this.value]}\n label={this.label}\n labelHidden={this.labelHidden}\n options={this._dataDropdown}\n hideOptional={this.hideOptional}\n onStzhChange={this.handleDropdownChange}\n ></stzh-dropdown> */}\n </Fragment>\n }\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"stzh-chipselect2.js","mappings":";;;;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AC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;cAC5B,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;cACrF,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YAClH,MAAM,GAAG,OAAO,EAEtB,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,WAAW,KAAK,EAAE,EAChC,YAAY,EAAC,IAAI,EACjB,OAAO,EAAE,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,GACrC,CACd,CAAC,CACE,EAEN,EAAC,oBAAoB,IACnB,WAAW,EAAC,iBAAiB,EAC7B,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,cAAc,EAC5B,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAC/C,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,mBAAmB,GACnE,CAkBO,CAET,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-chipselect/stzh-chipselect.scss?tag=stzh-chipselect&encapsulation=scoped","src/components/stzh-chipselect/stzh-chipselect.tsx"],"sourcesContent":[":host {\n &[disabled]:not([disabled=\"false\"]) {\n --description-color: #{$formDisabledColor};\n }\n}\n\n.stzh-chipselect {\n\t@include input-description;\n\n &__label {\n @include font('heavy');\n @include fontSize('micro');\n @include truncate;\n color: $headingColor;\n display: block;\n margin-bottom: space('xsmall');\n\n &:empty {\n display: none;\n }\n }\n\n &__marker {\n @include fontSize('nano');\n margin-left: calc(-0.25em + #{space('xsmall')});\n }\n\n &__chips {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n border-radius: $buttonBorderRadius;\n column-gap: space('medium');\n\n @include mq($from: medium) {\n row-gap: space('medium');\n }\n\n // @include mq($to: medium) {\n // display: none;\n // }\n }\n\n &__chip {\n &.is-focused,\n &.is-focused[active]:not([active=false]) {\n --background-color: #{$colorSecondary40};\n\n @include highContrast() {\n --background-color: Highlight;\n }\n }\n\n &.is-focused[active]:not([active=false]) {\n --background-color: #{$colorPrimary90};\n\n @include highContrast() {\n --background-color: Canvas;\n }\n }\n }\n\n // &__dropdown {\n // @include mq($from: medium) {\n // display: none;\n // }\n // }\n\n // &__description-wrapper {\n // @include mq($to: medium) {\n // display: none;\n // }\n // }\n\n &--has-error &__error,\n &--has-description &__description {\n margin-top: space('xsmall');\n }\n\n /* Hidden label */\n\n &--has-label-hidden &__label {\n @include visuallyhidden;\n }\n\n /* Disabled */\n\n &--is-disabled &__chips,\n &--is-disabled &__label {\n cursor: not-allowed;\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Watch,\n Event,\n EventEmitter,\n State,\n Fragment,\n Listen,\n} from \"@stencil/core\";\n\nimport {\n StzhChipselectItem,\n StzhChipselectChangeEvent,\n // StzhDropdownChangeEvent\n} from \"../../index\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\n// import { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nlet chipselectCounter = 0;\n\n/**\n * @slot - Slot for `stzh-checkbox` elements\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot description-long-title - Slot for long description title (in popover) / instead of descriptionLongTitle or description property\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-chipselect\",\n styleUrl: \"stzh-chipselect.scss\",\n scoped: true\n})\nexport class StzhChipselect {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** The list of chips */\n @Prop() data: string | StzhChipselectItem[] = [];\n private _data: StzhChipselectItem[] = [];\n // private _dataDropdown: any[] = [];\n\n /** The name of the input element */\n @Prop({ reflect: true }) name: string;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Whether label is hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Multiple */\n @Prop({ mutable: true }) multiple: boolean = false;\n\n /** Value */\n @Prop({ mutable: true }) value: string | string[] = \"\";\n private _value: string[] = [];\n\n /** Default value (used by reset) */\n @Prop({ mutable: true }) defaultValue: string | string[] = \"\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** Long description title appearing in a popover (use description-long-title slot as or description property alternative) */\n @Prop() descriptionLongTitle: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Whether all chips are disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Hide `(optional)` label (or use `required` inside form ot hide it) */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** Id for element which describes the input (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n @State() activeFocusOptionIndex: number = 0;\n\n @Element() element: HTMLStzhChipselectElement;\n\n /** Change event */\n @Event() stzhChange: EventEmitter<StzhChipselectChangeEvent>;\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 @Watch(\"value\")\n valueWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n try {\n this._value = JSON.parse(newValue);\n } catch(ex) {\n this._value = newValue ? [newValue] : [];\n }\n } else {\n this._value = newValue ? newValue : [];\n }\n }\n\n @Watch(\"data\")\n dataWatcher(newValue: StzhChipselectItem[] | string) {\n if (typeof newValue === \"string\") {\n this._data = JSON.parse(newValue);\n } else {\n this._data = newValue;\n }\n\n // this._dataDropdown = this._data.map((data) => {\n // return {\n // text: data.counter\n // ? `${data.label} (${data.counter})`\n // : data.label,\n // value: data.value\n // }\n // });\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n private id: string;\n private renderPromiseResolve: (value?: unknown) => void;\n\n private waitForNextRender() {\n return new Promise(resolve => this.renderPromiseResolve = resolve);\n }\n\n private handleReset = async () => {\n this.value = this.defaultValue;\n\n // this.stzhChange.emit({\n // component: \"stzh-chipselect\",\n // value: this.value\n // });\n }\n\n private handleChipClick = async (data: StzhChipselectItem, index: number) => {\n if (this.multiple) {\n if (data.value === \"\" && this._value.length > 0 && !(this._value.length === 1 && this._value[0] === \"\")) {\n this.value = [];\n } else if (data.value !== \"\") {\n this.value = this._value.includes(data.value)\n ? this._value.filter(value => value !== data.value)\n : [...this._value, data.value];\n }\n } else {\n this.value = [data.value]\n }\n\n this.activeFocusOptionIndex = index;\n\n await this.waitForNextRender();\n\n this.stzhChange.emit({\n component: \"stzh-chipselect\",\n value: this.multiple ? this._value[0] : this._value\n })\n }\n\n // private handleDropdownChange = async (event: CustomEvent<StzhDropdownChangeEvent>) => {\n // this.value = Array.isArray(event.detail.value) ? event.detail.value[0] : event.detail.value;\n\n // this.activeFocusOptionIndex = this._data.findIndex(data => {\n // return data.value === this.value;\n // });\n\n // await this.waitForNextRender();\n\n // this.stzhChange.emit({\n // component: \"stzh-chipselect\",\n // value: this.value\n // })\n // }\n\n private handleKeydown = (event: KeyboardEvent) => {\n let newActiveIndex: number = null;\n const activeOptionIndex = this.activeFocusOptionIndex;\n\n if (event.key === \"ArrowUp\" || event.key === \"ArrowLeft\") {\n event.preventDefault();\n\n if (activeOptionIndex > 0) {\n newActiveIndex = activeOptionIndex - 1;\n }\n } else if (event.key === \"ArrowDown\" || event.key === \"ArrowRight\") {\n event.preventDefault();\n\n if (activeOptionIndex < this._data.length - 1) {\n newActiveIndex = activeOptionIndex + 1;\n }\n } else if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n this.value = this._data[activeOptionIndex].value;\n\n this.stzhChange.emit({\n component: \"stzh-chipselect\",\n value: this.value\n });\n }\n\n if (newActiveIndex !== null) {\n this.activeFocusOptionIndex = newActiveIndex;\n }\n }\n\n componentDidRender() {\n if (this.renderPromiseResolve) {\n this.renderPromiseResolve();\n }\n }\n\n async componentWillLoad() {\n this.id = `stzh-chipselect-${chipselectCounter++}`;\n\n this.dataWatcher(this.data);\n this.errorWatcher(this.error);\n this.valueWatcher(this.value);\n\n this.defaultValue = this.defaultValue || this.value;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"chipselect\");\n }\n }\n\n render() {\n const descriptionUsed = !!this.description;\n const descriptionLongUsed = !!this.descriptionLong;\n const errorUsed = !!this.error;\n\n const classes = {\n \"stzh-chipselect\": true,\n \"stzh-chipselect--has-description\": descriptionUsed,\n \"stzh-chipselect--has-description-long\": descriptionLongUsed,\n \"stzh-chipselect--has-error\": errorUsed,\n \"stzh-chipselect--is-invalid\": this.invalid || errorUsed,\n \"stzh-chipselect--is-disabled\": this.disabled,\n \"stzh-chipselect--is-required\": this.required,\n \"stzh-chipselect--has-label-hidden\": this.labelHidden,\n };\n\n return (\n <Host is-invalid={this.invalid || errorUsed}>\n <div class={classes}>\n {this.multiple\n ?\n <Fragment>\n {this._value.map((value) =>\n <input type=\"hidden\" name={this.name} value={value} />\n )}\n </Fragment>\n :\n <input\n type=\"hidden\"\n name={this.name}\n value={this.value}\n />\n }\n\n <label class=\"stzh-chipselect__label\" htmlFor={this.id}>\n {this.label ? this.label : <slot></slot>}\n {!this.hideOptional &&\n <span class=\"stzh-chipselect__marker\">\n <span class=\"stzh-chipselect__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker\n }\n </span>\n <span class=\"stzh-chipselect__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText\n }\n </span>\n </span>\n }\n </label>\n\n {this._data.length > 0 &&\n <Fragment>\n <div\n id={this.id}\n class=\"stzh-chipselect__chips\"\n role=\"listbox\"\n tabindex=\"0\"\n aria-multiselectable={this.multiple ? \"true\" : \"false\"}\n aria-activedescendant={`${this.id}-option-${this.activeFocusOptionIndex}`}\n aria-describedby={`${this.id}-description ${this.a11yDescribedby}`}\n onKeyDown={this.handleKeydown}\n >\n {this._data.map((data, index) => (\n <stzh-chip\n role=\"option\"\n class={{\n \"stzh-chipselect__chip\": true,\n \"is-focused\": this.activeFocusOptionIndex === index\n }}\n label={data.label}\n counter={data.counter}\n icon={data.icon}\n type={data.type}\n inverted={data.inverted}\n variant={data.variant}\n size={data.size || \"small\"}\n disabled={this.disabled || data.disabled}\n active={\n this._value.includes(data.value)\n || (!this.multiple && !data.value && (this._value.length === 0 || this._value[0] === \"\"))\n || (!data.value && this.multiple && (this._value.length === 0 || (this._value.length === 1 && this._value[0] === \"\")))\n }\n aria-selected={\n this._value.includes(data.value)\n || (!this.multiple && !data.value && (this._value.length === 0 || this._value[0] === \"\"))\n || (!data.value && this.multiple && (this._value.length === 0 || (this._value.length === 1 && this._value[0] === \"\")))\n ? \"true\" : \"false\"\n }\n id={`${this.id}-option-${index}`}\n a11yTabindex=\"-1\"\n onClick={() => this.handleChipClick(data, index)}\n ></stzh-chip>\n ))}\n </div>\n\n <StzhInputDescription\n classPrefix=\"stzh-chipselect\"\n id={`${this.id}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongTitle={this.descriptionLongTitle}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n\n {/* <stzh-dropdown\n class=\"stzh-chipselect__dropdown\"\n multiple={this.multiple}\n disabled={this.disabled}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n required={this.required}\n invalid={this.invalid}\n items={[this.value]}\n label={this.label}\n labelHidden={this.labelHidden}\n options={this._dataDropdown}\n hideOptional={this.hideOptional}\n onStzhChange={this.handleDropdownChange}\n ></stzh-dropdown> */}\n </Fragment>\n }\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const stzhContentCss = ".sc-stzh-content-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-content-h{display:none}.sc-stzh-content-h::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-content-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-content-h *.sc-stzh-content,.sc-stzh-content-h *.sc-stzh-content::before,.sc-stzh-content-h *.sc-stzh-content::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-content-h .has-focus.sc-stzh-content{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-content-h .stzh-fylingfocus-focused.sc-stzh-content{outline-style:none !important}.sc-stzh-content-h .stzh-fylingfocus-focused.sc-stzh-content::-moz-focus-inner{border:0 !important}.sc-stzh-content-h{--grid-template-areas:var(--stzh-content-grid-template-areas, \"content content content content\")}@media screen and (min-width: 900px){.sc-stzh-content-h{--grid-template-areas:var(--stzh-content-grid-template-areas, \"content content content content content content content content\")}}@media screen and (min-width: 1260px){.sc-stzh-content-h{--grid-template-areas:var(--stzh-content-grid-template-areas, \"aside-left aside-left content content content content content content content content aside-right aside-right\")}}@media screen and (min-width: 1260px){[variant=shifted].sc-stzh-content-h{--grid-template-areas:var(--stzh-content-shifted-grid-template-areas, var(--stzh-content-grid-template-areas, \"aside-left aside-left content content content content content content content content content aside-right\"))}}@media screen and (min-width: 1260px){[variant=full].sc-stzh-content-h{--grid-template-areas:var(--stzh-content-full-grid-template-areas, var(--stzh-content-grid-template-areas, \"content content content content content content content content content content content content\"))}}.sc-stzh-content-h .sc-stzh-content-s>*{grid-area:content}@media screen and (min-width: 600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s>*{--stzh-cta-small-grid-template-areas:\"cta cta cta .\"}}@media screen and (min-width: 900px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s>*{--stzh-cta-grid-template-areas:\"cta cta cta cta cta . . .\";--stzh-cta-small-grid-template-areas:\"cta cta cta cta . . . .\"}}@media screen and (min-width: 600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s>*{--stzh-text-display:grid;--stzh-text-grid-template-areas:\"text text text .\";--stzh-richtext-display:grid;--stzh-richtext-grid-template-areas:\"text text text .\"}}@media screen and (min-width: 900px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s>*{--stzh-text-grid-template-areas:\"text text text text text text . .\";--stzh-richtext-grid-template-areas:\"text text text text text text . .\"}}@media screen and (min-width: 600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s>*{--stzh-datalist-grid-template-areas:\"list list list .\";--stzh-datalist-details-content-width:calc(((100% - var(--stzh-grid-gutter-small) - 2 * var(--stzh-grid-gutter-small)) / 3 * 4) + 3 * var(--stzh-grid-gutter-small) + var(--stzh-grid-gutter-small))}}@media screen and (min-width: 900px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s>*{--stzh-datalist-grid-template-areas:\"list list list list list . . .\";--stzh-datalist-details-content-width:calc(((100% - var(--stzh-grid-gutter-medium) - 4 * var(--stzh-grid-gutter-medium)) / 5 * 8) + 7 * var(--stzh-grid-gutter-medium) + var(--stzh-grid-gutter-medium))}}@media screen and (min-width: 1260px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s>*{--stzh-datalist-details-content-width:calc(((100% - var(--stzh-grid-gutter-large) - 4 * var(--stzh-grid-gutter-large)) / 5 * 8) + 7 * var(--stzh-grid-gutter-large) + var(--stzh-grid-gutter-large))}}@media screen and (min-width: 1600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s>*{--stzh-datalist-details-content-width:calc(((100% - var(--stzh-grid-gutter-ultra) - 4 * var(--stzh-grid-gutter-ultra)) / 5 * 8) + 7 * var(--stzh-grid-gutter-ultra) + var(--stzh-grid-gutter-ultra))}}@media screen and (min-width: 600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-datalist{--stzh-text-display:block;--stzh-richtext-display:block}}@media screen and (min-width: 600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-section[variant=highlight],.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-ghettobox,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-message,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-toast,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-tooltip,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-popover,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-accordion,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-timeline,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-twocolumns,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-textandimage,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-datalist stzh-datalist,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-dialog,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-overlay{--stzh-cta-small-grid-template-areas:\"cta cta cta cta\"}}@media screen and (min-width: 900px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-section[variant=highlight],.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-ghettobox,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-message,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-toast,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-tooltip,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-popover,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-accordion,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-timeline,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-twocolumns,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-textandimage,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-datalist stzh-datalist,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-dialog,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-overlay{--stzh-cta-grid-template-areas:\"cta cta cta cta cta cta cta cta\";--stzh-cta-small-grid-template-areas:\"cta cta cta cta cta cta cta cta\"}}@media screen and (min-width: 600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-section[variant=highlight],.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-ghettobox,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-message,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-toast,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-tooltip,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-popover,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-accordion,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-timeline,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-twocolumns,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-textandimage,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-datalist stzh-datalist,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-dialog,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-overlay{--stzh-text-display:block;--stzh-richtext-display:block}}@media screen and (min-width: 600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-section[variant=highlight],.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-ghettobox,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-message,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-toast,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-tooltip,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-popover,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-accordion,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-timeline,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-twocolumns,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-textandimage,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-datalist stzh-datalist,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-dialog,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-overlay{--stzh-datalist-grid-template-areas:\"list list list list\";--stzh-datalist-details-content-width:calc(((100% - var(--stzh-grid-gutter-small) - 2 * var(--stzh-grid-gutter-small)) / 4 * 4) + 3 * var(--stzh-grid-gutter-small) + var(--stzh-grid-gutter-small))}}@media screen and (min-width: 900px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-section[variant=highlight],.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-ghettobox,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-message,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-toast,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-tooltip,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-popover,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-accordion,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-timeline,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-twocolumns,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-textandimage,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-datalist stzh-datalist,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-dialog,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-overlay{--stzh-datalist-grid-template-areas:\"list list list list list list list list\";--stzh-datalist-details-content-width:calc(((100% - var(--stzh-grid-gutter-medium) - 4 * var(--stzh-grid-gutter-medium)) / 8 * 8) + 7 * var(--stzh-grid-gutter-medium) + var(--stzh-grid-gutter-medium))}}@media screen and (min-width: 1260px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-section[variant=highlight],.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-ghettobox,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-message,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-toast,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-tooltip,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-popover,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-accordion,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-timeline,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-twocolumns,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-textandimage,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-datalist stzh-datalist,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-dialog,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-overlay{--stzh-datalist-details-content-width:calc(((100% - var(--stzh-grid-gutter-large) - 4 * var(--stzh-grid-gutter-large)) / 8 * 8) + 7 * var(--stzh-grid-gutter-large) + var(--stzh-grid-gutter-large))}}@media screen and (min-width: 1600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-section[variant=highlight],.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-ghettobox,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-message,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-toast,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-tooltip,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-popover,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-accordion,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-timeline,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-twocolumns,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-textandimage,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-datalist stzh-datalist,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-dialog,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-overlay{--stzh-datalist-details-content-width:calc(((100% - var(--stzh-grid-gutter-ultra) - 4 * var(--stzh-grid-gutter-ultra)) / 8 * 8) + 7 * var(--stzh-grid-gutter-ultra) + var(--stzh-grid-gutter-ultra))}}.stzh-content.sc-stzh-content{--stzh-content-grid-template-areas:\"content content content content content content content content content content content content\";--stzh-content-shifted-grid-template-areas:\"content content content content content content content content content content content content\";--stzh-content-full-grid-template-areas:\"content content content content content content content content content content content content\";-moz-column-gap:var(--stzh-grid-gutter);column-gap:var(--stzh-grid-gutter);display:grid;grid-template-columns:repeat(4, minmax(0, 1fr));grid-template-areas:var(--grid-template-areas)}@media screen and (min-width: 600px){.stzh-content.sc-stzh-content{-moz-column-gap:var(--stzh-grid-gutter-small);column-gap:var(--stzh-grid-gutter-small)}}@media screen and (min-width: 900px){.stzh-content.sc-stzh-content{-moz-column-gap:var(--stzh-grid-gutter-medium);column-gap:var(--stzh-grid-gutter-medium)}}@media screen and (min-width: 1260px){.stzh-content.sc-stzh-content{-moz-column-gap:var(--stzh-grid-gutter-large);column-gap:var(--stzh-grid-gutter-large)}}@media screen and (min-width: 1600px){.stzh-content.sc-stzh-content{-moz-column-gap:var(--stzh-grid-gutter-ultra);column-gap:var(--stzh-grid-gutter-ultra)}}@media screen and (min-width: 900px){.stzh-content.sc-stzh-content{grid-template-columns:repeat(8, minmax(0, 1fr))}}@media screen and (min-width: 1260px){.stzh-content.sc-stzh-content{grid-template-columns:repeat(12, minmax(0, 1fr))}}";
|
|
3
|
+
const stzhContentCss = ".sc-stzh-content-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-content-h{display:none}.sc-stzh-content-h::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-content-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-content-h *.sc-stzh-content,.sc-stzh-content-h *.sc-stzh-content::before,.sc-stzh-content-h *.sc-stzh-content::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-content-h .has-focus.sc-stzh-content{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-content-h .stzh-fylingfocus-focused.sc-stzh-content{outline-style:none !important}.sc-stzh-content-h .stzh-fylingfocus-focused.sc-stzh-content::-moz-focus-inner{border:0 !important}.sc-stzh-content-h{--grid-template-areas:var(--stzh-content-grid-template-areas, \"content content content content\")}@media screen and (min-width: 900px){.sc-stzh-content-h{--grid-template-areas:var(--stzh-content-grid-template-areas, \"content content content content content content content content\")}}@media screen and (min-width: 1260px){.sc-stzh-content-h{--grid-template-areas:var(--stzh-content-grid-template-areas, \"aside-left aside-left content content content content content content content content aside-right aside-right\")}}@media screen and (min-width: 1260px){[variant=shifted].sc-stzh-content-h{--grid-template-areas:var(--stzh-content-shifted-grid-template-areas, var(--stzh-content-grid-template-areas, \"aside-left aside-left content content content content content content content content content aside-right\"))}}@media screen and (min-width: 1260px){[variant=full].sc-stzh-content-h{--grid-template-areas:var(--stzh-content-full-grid-template-areas, var(--stzh-content-grid-template-areas, \"content content content content content content content content content content content content\"))}}.sc-stzh-content-h .sc-stzh-content-s>*{grid-area:content}@media screen and (min-width: 600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s>*{--stzh-cta-small-grid-template-areas:\"cta cta cta .\"}}@media screen and (min-width: 900px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s>*{--stzh-cta-grid-template-areas:\"cta cta cta cta cta . . .\";--stzh-cta-small-grid-template-areas:\"cta cta cta cta . . . .\"}}@media screen and (min-width: 600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s>*{--stzh-text-display:grid;--stzh-text-grid-template-areas:\"text text text .\";--stzh-richtext-display:grid;--stzh-richtext-grid-template-areas:\"text text text .\"}}@media screen and (min-width: 900px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s>*{--stzh-text-grid-template-areas:\"text text text text text text . .\";--stzh-richtext-grid-template-areas:\"text text text text text text . .\"}}@media screen and (min-width: 600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s>*{--stzh-datalist-grid-template-areas:\"list list list .\";--stzh-datalist-details-content-width:calc(((100% - var(--stzh-grid-gutter-small) - 2 * var(--stzh-grid-gutter-small)) / 3 * 4) + 3 * var(--stzh-grid-gutter-small) + var(--stzh-grid-gutter-small))}}@media screen and (min-width: 900px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s>*{--stzh-datalist-grid-template-areas:\"list list list list list . . .\";--stzh-datalist-details-content-width:calc(((100% - var(--stzh-grid-gutter-medium) - 4 * var(--stzh-grid-gutter-medium)) / 5 * 8) + 7 * var(--stzh-grid-gutter-medium) + var(--stzh-grid-gutter-medium))}}@media screen and (min-width: 1260px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s>*{--stzh-datalist-details-content-width:calc(((100% - var(--stzh-grid-gutter-large) - 4 * var(--stzh-grid-gutter-large)) / 5 * 8) + 7 * var(--stzh-grid-gutter-large) + var(--stzh-grid-gutter-large))}}@media screen and (min-width: 1600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s>*{--stzh-datalist-details-content-width:calc(((100% - var(--stzh-grid-gutter-ultra) - 4 * var(--stzh-grid-gutter-ultra)) / 5 * 8) + 7 * var(--stzh-grid-gutter-ultra) + var(--stzh-grid-gutter-ultra))}}@media screen and (min-width: 600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-datalist,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-eventdata{--stzh-text-display:block;--stzh-richtext-display:block}}@media screen and (min-width: 600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-section[variant=highlight],.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-ghettobox,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-message,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-toast,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-tooltip,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-popover,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-accordion,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-timeline,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-twocolumns,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-textandimage,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-datalist stzh-datalist,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-dialog,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-overlay{--stzh-cta-small-grid-template-areas:\"cta cta cta cta\"}}@media screen and (min-width: 900px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-section[variant=highlight],.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-ghettobox,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-message,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-toast,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-tooltip,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-popover,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-accordion,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-timeline,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-twocolumns,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-textandimage,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-datalist stzh-datalist,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-dialog,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-overlay{--stzh-cta-grid-template-areas:\"cta cta cta cta cta cta cta cta\";--stzh-cta-small-grid-template-areas:\"cta cta cta cta cta cta cta cta\"}}@media screen and (min-width: 600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-section[variant=highlight],.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-ghettobox,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-message,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-toast,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-tooltip,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-popover,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-accordion,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-timeline,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-twocolumns,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-textandimage,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-datalist stzh-datalist,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-dialog,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-overlay{--stzh-text-display:block;--stzh-richtext-display:block}}@media screen and (min-width: 600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-section[variant=highlight],.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-ghettobox,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-message,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-toast,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-tooltip,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-popover,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-accordion,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-timeline,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-twocolumns,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-textandimage,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-datalist stzh-datalist,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-dialog,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-overlay{--stzh-datalist-grid-template-areas:\"list list list list\";--stzh-datalist-details-content-width:calc(((100% - var(--stzh-grid-gutter-small) - 2 * var(--stzh-grid-gutter-small)) / 4 * 4) + 3 * var(--stzh-grid-gutter-small) + var(--stzh-grid-gutter-small))}}@media screen and (min-width: 900px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-section[variant=highlight],.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-ghettobox,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-message,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-toast,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-tooltip,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-popover,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-accordion,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-timeline,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-twocolumns,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-textandimage,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-datalist stzh-datalist,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-dialog,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-overlay{--stzh-datalist-grid-template-areas:\"list list list list list list list list\";--stzh-datalist-details-content-width:calc(((100% - var(--stzh-grid-gutter-medium) - 4 * var(--stzh-grid-gutter-medium)) / 8 * 8) + 7 * var(--stzh-grid-gutter-medium) + var(--stzh-grid-gutter-medium))}}@media screen and (min-width: 1260px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-section[variant=highlight],.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-ghettobox,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-message,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-toast,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-tooltip,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-popover,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-accordion,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-timeline,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-twocolumns,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-textandimage,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-datalist stzh-datalist,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-dialog,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-overlay{--stzh-datalist-details-content-width:calc(((100% - var(--stzh-grid-gutter-large) - 4 * var(--stzh-grid-gutter-large)) / 8 * 8) + 7 * var(--stzh-grid-gutter-large) + var(--stzh-grid-gutter-large))}}@media screen and (min-width: 1600px){.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-section[variant=highlight],.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-ghettobox,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-message,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-toast,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-tooltip,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-popover,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-accordion,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-timeline,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-twocolumns,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-textandimage,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-datalist stzh-datalist,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-dialog,.sc-stzh-content-h:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) .sc-stzh-content-s stzh-overlay{--stzh-datalist-details-content-width:calc(((100% - var(--stzh-grid-gutter-ultra) - 4 * var(--stzh-grid-gutter-ultra)) / 8 * 8) + 7 * var(--stzh-grid-gutter-ultra) + var(--stzh-grid-gutter-ultra))}}.stzh-content.sc-stzh-content{--stzh-content-grid-template-areas:\"content content content content content content content content content content content content\";--stzh-content-shifted-grid-template-areas:\"content content content content content content content content content content content content\";--stzh-content-full-grid-template-areas:\"content content content content content content content content content content content content\";-moz-column-gap:var(--stzh-grid-gutter);column-gap:var(--stzh-grid-gutter);display:grid;grid-template-columns:repeat(4, minmax(0, 1fr));grid-template-areas:var(--grid-template-areas)}@media screen and (min-width: 600px){.stzh-content.sc-stzh-content{-moz-column-gap:var(--stzh-grid-gutter-small);column-gap:var(--stzh-grid-gutter-small)}}@media screen and (min-width: 900px){.stzh-content.sc-stzh-content{-moz-column-gap:var(--stzh-grid-gutter-medium);column-gap:var(--stzh-grid-gutter-medium)}}@media screen and (min-width: 1260px){.stzh-content.sc-stzh-content{-moz-column-gap:var(--stzh-grid-gutter-large);column-gap:var(--stzh-grid-gutter-large)}}@media screen and (min-width: 1600px){.stzh-content.sc-stzh-content{-moz-column-gap:var(--stzh-grid-gutter-ultra);column-gap:var(--stzh-grid-gutter-ultra)}}@media screen and (min-width: 900px){.stzh-content.sc-stzh-content{grid-template-columns:repeat(8, minmax(0, 1fr))}}@media screen and (min-width: 1260px){.stzh-content.sc-stzh-content{grid-template-columns:repeat(12, minmax(0, 1fr))}}";
|
|
4
4
|
|
|
5
5
|
const StzhContent$1 = /*@__PURE__*/ proxyCustomElement(class StzhContent extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"stzh-content.js","mappings":";;AAAA,MAAM,cAAc,GAAG,
|
|
1
|
+
{"file":"stzh-content.js","mappings":";;AAAA,MAAM,cAAc,GAAG,27nBAA27nB;;MCgBr8nBA,aAAW;;;;mBAE6C,SAAS;gCAG5B,KAAK;;EAIrD,MAAM;IACJ,MAAM,OAAO,GAAG;MACd,cAAc,EAAE,IAAI;MACpB,CAAC,iBAAiB,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO;KAClD,CAAC;IAEF,QACE,EAAC,IAAI,QACH,WAAK,KAAK,EAAE,OAAO,IACjB,eAAa,CACT,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["StzhContent"],"sources":["src/components/stzh-content/stzh-content.scss?tag=stzh-content&encapsulation=scoped","src/components/stzh-content/stzh-content.tsx"],"sourcesContent":[":host {\n --grid-template-areas: var(--stzh-content-grid-template-areas, \"content content content content\");\n\n @include mq($from: medium) {\n --grid-template-areas: var(--stzh-content-grid-template-areas, \"content content content content content content content content\");\n }\n\n @include mq($from: large) {\n --grid-template-areas: var(--stzh-content-grid-template-areas, \"aside-left aside-left content content content content content content content content aside-right aside-right\");\n }\n\n &[variant=\"shifted\"] {\n @include mq($from: large) {\n --grid-template-areas: var(--stzh-content-shifted-grid-template-areas, var(--stzh-content-grid-template-areas, \"aside-left aside-left content content content content content content content content content aside-right\"));\n }\n }\n\n &[variant=\"full\"] {\n @include mq($from: large) {\n --grid-template-areas: var(--stzh-content-full-grid-template-areas, var(--stzh-content-grid-template-areas, \"content content content content content content content content content content content content\"));\n }\n }\n\n ::slotted(*) {\n grid-area: content;\n }\n\n &:where(:not([prevent-element-layout]:not([prevent-element-layout=\"false\"]))) ::slotted(*) {\n /* CTA Layout */\n\n @include mq($from: small) {\n --stzh-cta-small-grid-template-areas: \"cta cta cta .\";\n }\n\n @include mq($from: medium) {\n --stzh-cta-grid-template-areas: \"cta cta cta cta cta . . .\";\n --stzh-cta-small-grid-template-areas: \"cta cta cta cta . . . .\";\n }\n\n /* Text / Richtext Layout */\n\n @include mq($from: small) {\n --stzh-text-display: grid;\n --stzh-text-grid-template-areas: \"text text text .\";\n\n --stzh-richtext-display: grid;\n --stzh-richtext-grid-template-areas: \"text text text .\";\n }\n\n @include mq($from: medium) {\n --stzh-text-grid-template-areas: \"text text text text text text . .\";\n --stzh-richtext-grid-template-areas: \"text text text text text text . .\";\n }\n\n /* Datalist Layout */\n\n @include mq($from: small) {\n --stzh-datalist-grid-template-areas: \"list list list .\";\n // breakout with details element inside datalist-item\n --stzh-datalist-details-content-width: calc(((100% - #{$gridGutterSmall} - 2 * #{$gridGutterSmall}) / 3 * 4) + 3 * #{$gridGutterSmall} + #{$gridGutterSmall});\n }\n\n @include mq($from: medium) {\n --stzh-datalist-grid-template-areas: \"list list list list list . . .\";\n --stzh-datalist-details-content-width: calc(((100% - #{$gridGutterMedium} - 4 * #{$gridGutterMedium}) / 5 * 8) + 7 * #{$gridGutterMedium} + #{$gridGutterMedium});\n }\n\n @include mq($from: large) {\n --stzh-datalist-details-content-width: calc(((100% - #{$gridGutterLarge} - 4 * #{$gridGutterLarge}) / 5 * 8) + 7 * #{$gridGutterLarge} + #{$gridGutterLarge});\n }\n\n @include mq($from: ultra) {\n --stzh-datalist-details-content-width: calc(((100% - #{$gridGutterUltra} - 4 * #{$gridGutterUltra}) / 5 * 8) + 7 * #{$gridGutterUltra} + #{$gridGutterUltra});\n }\n\n /* Reset layout inside certain components */\n\n stzh-datalist,\n stzh-eventdata {\n /* Text Layout */\n\n @include mq($from: small) {\n --stzh-text-display: block;\n --stzh-richtext-display: block;\n }\n }\n\n stzh-section[variant=\"highlight\"],\n stzh-ghettobox,\n stzh-message,\n stzh-toast,\n stzh-tooltip,\n stzh-popover,\n stzh-accordion,\n stzh-timeline,\n stzh-twocolumns,\n stzh-textandimage,\n stzh-datalist stzh-datalist,\n stzh-dialog,\n stzh-overlay {\n /* CTA Layout */\n\n @include mq($from: small) {\n --stzh-cta-small-grid-template-areas: \"cta cta cta cta\";\n }\n\n @include mq($from: medium) {\n --stzh-cta-grid-template-areas: \"cta cta cta cta cta cta cta cta\";\n --stzh-cta-small-grid-template-areas: \"cta cta cta cta cta cta cta cta\";\n }\n\n /* Text Layout */\n\n @include mq($from: small) {\n --stzh-text-display: block;\n --stzh-richtext-display: block;\n }\n\n /* Datalist Layout */\n\n @include mq($from: small) {\n --stzh-datalist-grid-template-areas: \"list list list list\";\n // breakout with details element inside datalist-item\n --stzh-datalist-details-content-width: calc(((100% - #{$gridGutterSmall} - 2 * #{$gridGutterSmall}) / 4 * 4) + 3 * #{$gridGutterSmall} + #{$gridGutterSmall});\n }\n\n @include mq($from: medium) {\n --stzh-datalist-grid-template-areas: \"list list list list list list list list\";\n --stzh-datalist-details-content-width: calc(((100% - #{$gridGutterMedium} - 4 * #{$gridGutterMedium}) / 8 * 8) + 7 * #{$gridGutterMedium} + #{$gridGutterMedium});\n }\n\n @include mq($from: large) {\n --stzh-datalist-details-content-width: calc(((100% - #{$gridGutterLarge} - 4 * #{$gridGutterLarge}) / 8 * 8) + 7 * #{$gridGutterLarge} + #{$gridGutterLarge});\n }\n\n @include mq($from: ultra) {\n --stzh-datalist-details-content-width: calc(((100% - #{$gridGutterUltra} - 4 * #{$gridGutterUltra}) / 8 * 8) + 7 * #{$gridGutterUltra} + #{$gridGutterUltra});\n }\n }\n }\n}\n\n.stzh-content {\n // set nested content elements to be fullwidth\n --stzh-content-grid-template-areas: \"content content content content content content content content content content content content\";\n --stzh-content-shifted-grid-template-areas: \"content content content content content content content content content content content content\";\n --stzh-content-full-grid-template-areas: \"content content content content content content content content content content content content\";\n\n @include grid;\n grid-template-areas: var(--grid-template-areas);\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n} from \"@stencil/core\";\n\n/**\n * @slot - Slot for any content\n */\n@Component({\n tag: \"stzh-content\",\n styleUrl: \"stzh-content.scss\",\n scoped: true\n})\nexport class StzhContent {\n /** Variant */\n @Prop({ reflect: true }) variant: \"default\" | \"shifted\" | \"full\" = \"default\";\n\n /** Prevent changing layout of elements within this content element */\n @Prop({ reflect: true }) preventElementLayout = false;\n\n @Element() element: HTMLStzhContentElement;\n\n render() {\n const classes = {\n \"stzh-content\": true,\n [`stzh-content--${this.variant}`]: !!this.variant,\n };\n\n return (\n <Host>\n <div class={classes}>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|