@oiz/stzh-components 3.0.0-beta4 → 3.0.0-beta5
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-5897b76e.js → app-globals-82cc9313.js} +2 -2
- package/dist/cjs/{app-globals-5897b76e.js.map → app-globals-82cc9313.js.map} +1 -1
- package/dist/cjs/index-92254d32.js +20 -16
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-actions.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-badge_3.cjs.entry.js +8 -0
- package/dist/cjs/stzh-badge_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-breadcrumb_2.cjs.entry.js +12 -3
- package/dist/cjs/stzh-breadcrumb_2.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-calendar.cjs.entry.js +1 -1
- package/dist/cjs/stzh-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-card-navigation.cjs.entry.js +2 -1
- package/dist/cjs/stzh-card-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-card-searchresult.cjs.entry.js +21 -32
- package/dist/cjs/stzh-card-searchresult.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-card-superteaser.cjs.entry.js +146 -0
- package/dist/cjs/stzh-card-superteaser.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-card_3.cjs.entry.js +72 -29
- package/dist/cjs/stzh-card_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/stzh-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-chip.cjs.entry.js +7 -2
- package/dist/cjs/stzh-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-contact.cjs.entry.js +7 -2
- package/dist/cjs/stzh-contact.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 +10 -2
- package/dist/cjs/stzh-cta.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-datalist_2.cjs.entry.js +26 -16
- package/dist/cjs/stzh-datalist_2.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-datamessagelist-item.cjs.entry.js +2 -1
- package/dist/cjs/stzh-datamessagelist-item.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-datatable.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datatable.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-daterange.cjs.entry.js +107 -0
- package/dist/cjs/stzh-daterange.cjs.entry.js.map +1 -0
- package/dist/cjs/{stzh-message.cjs.entry.js → stzh-details_2.cjs.entry.js} +155 -1
- package/dist/cjs/stzh-details_2.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-dropdown.cjs.entry.js +6 -3
- package/dist/cjs/stzh-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-fieldset.cjs.entry.js +1 -1
- package/dist/cjs/stzh-fieldset.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-ghettobox_3.cjs.entry.js +2 -3
- package/dist/cjs/stzh-ghettobox_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-header.cjs.entry.js +49 -29
- package/dist/cjs/stzh-header.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-heading.cjs.entry.js +1 -1
- package/dist/cjs/stzh-heading.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-input.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-link.cjs.entry.js +10 -2
- package/dist/cjs/stzh-link.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-menu_2.cjs.entry.js +10 -2
- package/dist/cjs/stzh-menu_2.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-microsite-teaserlist.cjs.entry.js +2 -2
- package/dist/cjs/stzh-microsite-teaserlist.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-pagebottom.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pagebottom.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-search.cjs.entry.js +83 -67
- 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-skin-storybook-preview.cjs.entry.js +1 -1
- package/dist/cjs/stzh-skin-storybook-preview.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-table.cjs.entry.js +1 -1
- package/dist/cjs/stzh-table.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-vbz-carousel.cjs.entry.js +1 -1
- package/dist/cjs/stzh-vbz-carousel.cjs.entry.js.map +1 -1
- package/dist/collection/assets/fonts/HelveticaNeueLTW05_66MediumIt.woff2 +0 -0
- package/dist/collection/assets/fonts.css +7 -0
- package/dist/collection/assets/i18n/de.json +10 -3
- package/dist/collection/assets/i18n/en.json +10 -3
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/stzh-accordion/stzh-accordion.css +4 -1
- package/dist/collection/components/stzh-accordion-item/stzh-accordion-item.css +4 -1
- package/dist/collection/components/stzh-actions/stzh-actions.css +4 -1
- package/dist/collection/components/stzh-actions/stzh-actions.js +2 -2
- package/dist/collection/components/stzh-actions/stzh-actions.js.map +1 -1
- package/dist/collection/components/stzh-actionset/stzh-actionset.css +4 -1
- package/dist/collection/components/stzh-amount/stzh-amount.css +4 -1
- package/dist/collection/components/stzh-anchornav/stzh-anchornav.css +4 -1
- package/dist/collection/components/stzh-appointments/stzh-appointments.css +4 -1
- package/dist/collection/components/stzh-archivelist/stzh-archivelist.css +4 -1
- package/dist/collection/components/stzh-audio/stzh-audio.css +4 -1
- package/dist/collection/components/stzh-badge/stzh-badge.css +4 -1
- package/dist/collection/components/stzh-banner/stzh-banner.css +4 -1
- package/dist/collection/components/stzh-breadcrumb/stzh-breadcrumb.css +5 -1
- package/dist/collection/components/stzh-breadcrumb/stzh-breadcrumb.js +32 -1
- package/dist/collection/components/stzh-breadcrumb/stzh-breadcrumb.js.map +1 -1
- package/dist/collection/components/stzh-breadcrumb/stzh-breadcrumb.stories.js +3 -0
- package/dist/collection/components/stzh-button/stzh-button.css +4 -1
- package/dist/collection/components/stzh-button/stzh-button.js +34 -6
- package/dist/collection/components/stzh-button/stzh-button.js.map +1 -1
- package/dist/collection/components/stzh-button/stzh-button.stories.js +1 -1
- package/dist/collection/components/stzh-buttongroup/stzh-buttongroup.css +4 -1
- package/dist/collection/components/stzh-calendar/stzh-calendar.css +5 -1
- package/dist/collection/components/stzh-card/stzh-card.css +4 -1
- package/dist/collection/components/stzh-card/stzh-card.js +3 -2
- package/dist/collection/components/stzh-card/stzh-card.js.map +1 -1
- package/dist/collection/components/stzh-card-navigation/stzh-card-navigation.css +4 -1
- package/dist/collection/components/stzh-card-navigation/stzh-card-navigation.js +3 -2
- package/dist/collection/components/stzh-card-navigation/stzh-card-navigation.js.map +1 -1
- package/dist/collection/components/stzh-card-searchresult/stzh-card-searchresult.css +53 -36
- package/dist/collection/components/stzh-card-searchresult/stzh-card-searchresult.js +72 -44
- package/dist/collection/components/stzh-card-searchresult/stzh-card-searchresult.js.map +1 -1
- package/dist/collection/components/stzh-card-searchresult/stzh-card-searchresult.stories.js +38 -22
- package/dist/collection/components/stzh-card-superteaser/stzh-card-superteaser.css +437 -0
- package/dist/collection/components/stzh-card-superteaser/stzh-card-superteaser.e2e.js +31 -0
- package/dist/collection/components/stzh-card-superteaser/stzh-card-superteaser.e2e.js.map +1 -0
- package/dist/collection/components/stzh-card-superteaser/stzh-card-superteaser.js +591 -0
- package/dist/collection/components/stzh-card-superteaser/stzh-card-superteaser.js.map +1 -0
- package/dist/collection/components/stzh-card-superteaser/stzh-card-superteaser.localization.js +2 -0
- package/dist/collection/components/stzh-card-superteaser/stzh-card-superteaser.localization.js.map +1 -0
- package/dist/collection/components/stzh-card-superteaser/stzh-card-superteaser.stories.js +222 -0
- package/dist/collection/components/stzh-cardlist/stzh-cardlist.css +12 -4
- package/dist/collection/components/stzh-carousel/stzh-carousel.css +4 -1
- package/dist/collection/components/stzh-cell/stzh-cell.css +4 -1
- package/dist/collection/components/stzh-chart/stzh-chart.css +4 -1
- package/dist/collection/components/stzh-checkbox/stzh-checkbox.css +5 -1
- package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.css +4 -1
- package/dist/collection/components/stzh-chip/stzh-chip.css +184 -25
- package/dist/collection/components/stzh-chip/stzh-chip.js +99 -2
- package/dist/collection/components/stzh-chip/stzh-chip.js.map +1 -1
- package/dist/collection/components/stzh-chipgroup/stzh-chipgroup.css +4 -1
- package/dist/collection/components/stzh-chipselect/stzh-chipselect.css +50 -20
- package/dist/collection/components/stzh-chipselect/stzh-chipselect.js +111 -31
- package/dist/collection/components/stzh-chipselect/stzh-chipselect.js.map +1 -1
- package/dist/collection/components/stzh-clamp/stzh-clamp.css +4 -1
- package/dist/collection/components/stzh-contact/stzh-contact.css +11 -6
- package/dist/collection/components/stzh-contact/stzh-contact.js +24 -1
- package/dist/collection/components/stzh-contact/stzh-contact.js.map +1 -1
- package/dist/collection/components/stzh-container/stzh-container.css +4 -1
- package/dist/collection/components/stzh-content/stzh-content.css +4 -1
- package/dist/collection/components/stzh-cspace/stzh-cspace.css +13 -7
- package/dist/collection/components/stzh-cta/stzh-cta.css +6 -3
- package/dist/collection/components/stzh-cta/stzh-cta.js +31 -3
- package/dist/collection/components/stzh-cta/stzh-cta.js.map +1 -1
- package/dist/collection/components/stzh-cta/stzh-cta.stories.js +4 -1
- package/dist/collection/components/stzh-datalist/stzh-datalist.css +6 -1
- package/dist/collection/components/stzh-datalist/stzh-datalist.stories.js +27 -8
- package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.css +7 -2
- package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.js +62 -14
- package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.js.map +1 -1
- package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.stories.js +1 -1
- package/dist/collection/components/stzh-datamessagelist/stzh-datamessagelist.css +4 -1
- package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.css +4 -1
- package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.js +3 -2
- package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.js.map +1 -1
- package/dist/collection/components/stzh-datatable/stzh-datatable.css +7 -4
- package/dist/collection/components/stzh-datepicker/stzh-datepicker.css +4 -1
- package/dist/collection/components/stzh-daterange/stzh-daterange.css +256 -0
- package/dist/collection/components/stzh-daterange/stzh-daterange.e2e.js +18 -0
- package/dist/collection/components/stzh-daterange/stzh-daterange.e2e.js.map +1 -0
- package/dist/collection/components/stzh-daterange/stzh-daterange.js +178 -0
- package/dist/collection/components/stzh-daterange/stzh-daterange.js.map +1 -0
- package/dist/collection/components/stzh-daterange/stzh-daterange.localization.js +2 -0
- package/dist/collection/components/stzh-daterange/stzh-daterange.localization.js.map +1 -0
- package/dist/collection/components/stzh-daterange/stzh-daterange.stories.js +51 -0
- package/dist/collection/components/stzh-details/stzh-details.css +4 -1
- package/dist/collection/components/stzh-dialog/stzh-dialog.css +4 -1
- package/dist/collection/components/stzh-disturber/stzh-disturber.css +4 -1
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.css +453 -62
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.e2e.js +1 -0
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.e2e.js.map +1 -1
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.js +16 -13
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.js.map +1 -1
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.stories.js +17 -0
- package/dist/collection/components/stzh-editor/stzh-editor.css +4 -1
- package/dist/collection/components/stzh-eventinfo/stzh-eventinfo.css +4 -1
- package/dist/collection/components/stzh-fieldset/stzh-fieldset.css +75 -6
- package/dist/collection/components/stzh-figure/stzh-figure.css +4 -1
- package/dist/collection/components/stzh-flyingfocus/stzh-flyingfocus.css +4 -1
- package/dist/collection/components/stzh-footer/stzh-footer.css +4 -1
- package/dist/collection/components/stzh-gallery/stzh-gallery.css +4 -1
- package/dist/collection/components/stzh-ghettobox/stzh-ghettobox.css +7 -9
- package/dist/collection/components/stzh-header/stzh-header.css +9 -6
- package/dist/collection/components/stzh-header/stzh-header.js +72 -30
- package/dist/collection/components/stzh-header/stzh-header.js.map +1 -1
- package/dist/collection/components/stzh-header/stzh-header.stories.js +1 -0
- package/dist/collection/components/stzh-heading/stzh-heading.css +26 -1
- package/dist/collection/components/stzh-hr/stzh-hr.css +4 -1
- package/dist/collection/components/stzh-hspace/stzh-hspace.css +4 -1
- package/dist/collection/components/stzh-icon/stzh-icon.css +4 -1
- package/dist/collection/components/stzh-iframe/stzh-iframe.css +4 -1
- package/dist/collection/components/stzh-imagecomparison/stzh-imagecomparison.css +4 -1
- package/dist/collection/components/stzh-input/stzh-input.css +4 -1
- package/dist/collection/components/stzh-invert/stzh-invert.css +4 -1
- package/dist/collection/components/stzh-link/stzh-link.css +4 -1
- package/dist/collection/components/stzh-link/stzh-link.js +34 -6
- package/dist/collection/components/stzh-link/stzh-link.js.map +1 -1
- package/dist/collection/components/stzh-link/stzh-link.stories.js +1 -1
- package/dist/collection/components/stzh-list/stzh-list.css +4 -1
- package/dist/collection/components/stzh-list-item/stzh-list-item.css +4 -1
- package/dist/collection/components/stzh-loader/stzh-loader.css +4 -1
- package/dist/collection/components/stzh-loadingbar/stzh-loadingbar.css +4 -1
- package/dist/collection/components/stzh-menu/stzh-menu.css +4 -1
- package/dist/collection/components/stzh-menu-item/stzh-menu-item.css +4 -1
- package/dist/collection/components/stzh-menu-item/stzh-menu-item.js +31 -3
- package/dist/collection/components/stzh-menu-item/stzh-menu-item.js.map +1 -1
- package/dist/collection/components/stzh-menu-item/stzh-menu-item.stories.js +1 -1
- package/dist/collection/components/stzh-message/stzh-message.css +4 -1
- package/dist/collection/components/stzh-microsite-teaserlist/stzh-microsite-teaserlist.css +4 -1
- package/dist/collection/components/stzh-microsite-teaserlist/stzh-microsite-teaserlist.js +2 -2
- package/dist/collection/components/stzh-microsite-teaserlist/stzh-microsite-teaserlist.js.map +1 -1
- package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.css +4 -1
- package/dist/collection/components/stzh-olmap/stzh-olmap.css +4 -1
- package/dist/collection/components/stzh-overlay/stzh-overlay.css +4 -1
- package/dist/collection/components/stzh-page-skiplinks/stzh-page-skiplinks.css +4 -1
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.css +5 -2
- package/dist/collection/components/stzh-pagecontent/stzh-pagecontent.css +4 -1
- package/dist/collection/components/stzh-pagetitle/stzh-pagetitle.css +4 -1
- package/dist/collection/components/stzh-pagetitle-hero/stzh-pagetitle-hero.css +4 -1
- package/dist/collection/components/stzh-pagination/stzh-pagination.css +4 -1
- package/dist/collection/components/stzh-panorama/stzh-panorama.css +4 -1
- package/dist/collection/components/stzh-popover/stzh-popover.css +4 -1
- package/dist/collection/components/stzh-print/stzh-print.css +4 -1
- package/dist/collection/components/stzh-progressbar/stzh-progressbar.css +4 -1
- package/dist/collection/components/stzh-progressbar-item/stzh-progressbar-item.css +4 -1
- package/dist/collection/components/stzh-radio/stzh-radio.css +5 -1
- package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.css +4 -1
- package/dist/collection/components/stzh-ratio/stzh-ratio.css +4 -1
- package/dist/collection/components/stzh-readspeaker/stzh-readspeaker.css +4 -1
- package/dist/collection/components/stzh-richtext/stzh-richtext.css +10 -7
- package/dist/collection/components/stzh-row/stzh-row.css +4 -1
- package/dist/collection/components/stzh-saptcha/stzh-saptcha.css +4 -1
- package/dist/collection/components/stzh-scrollup/stzh-scrollup.css +4 -1
- package/dist/collection/components/stzh-search/stzh-search.css +25 -22
- package/dist/collection/components/stzh-search/stzh-search.js +120 -67
- package/dist/collection/components/stzh-search/stzh-search.js.map +1 -1
- package/dist/collection/components/stzh-search/stzh-search.localization.js.map +1 -1
- package/dist/collection/components/stzh-search/stzh-search.stories.js +108 -39
- package/dist/collection/components/stzh-section/stzh-section.css +4 -1
- package/dist/collection/components/stzh-share/stzh-share.css +4 -1
- package/dist/collection/components/stzh-show/stzh-show.css +4 -1
- package/dist/collection/components/stzh-show/stzh-show.js +0 -1
- package/dist/collection/components/stzh-show/stzh-show.js.map +1 -1
- package/dist/collection/components/stzh-sitemap/stzh-sitemap.css +4 -1
- package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.css +26 -17
- package/dist/collection/components/stzh-skin-storybook-preview/stzh-skin-storybook-preview.css +13 -10
- package/dist/collection/components/stzh-skiplink/stzh-skiplink.css +4 -1
- package/dist/collection/components/stzh-sortable/stzh-sortable.css +4 -1
- package/dist/collection/components/stzh-space/stzh-space.css +4 -1
- package/dist/collection/components/stzh-status/stzh-status.css +4 -1
- package/dist/collection/components/stzh-sticky/stzh-sticky.css +4 -1
- package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.css +4 -1
- package/dist/collection/components/stzh-table/stzh-table.css +7 -4
- package/dist/collection/components/stzh-tag/stzh-tag.css +4 -1
- package/dist/collection/components/stzh-tag/stzh-tag.js +3 -2
- package/dist/collection/components/stzh-tag/stzh-tag.js.map +1 -1
- package/dist/collection/components/stzh-text/stzh-text.css +9 -1
- package/dist/collection/components/stzh-textandimage/stzh-textandimage.css +4 -1
- package/dist/collection/components/stzh-timeline/stzh-timeline.css +4 -1
- package/dist/collection/components/stzh-timeline-item/stzh-timeline-item.css +4 -1
- package/dist/collection/components/stzh-timepicker/stzh-timepicker.css +4 -1
- package/dist/collection/components/stzh-toast/stzh-toast.css +4 -1
- package/dist/collection/components/stzh-toastbar/stzh-toastbar.css +4 -1
- package/dist/collection/components/stzh-toggle/stzh-toggle.css +4 -1
- package/dist/collection/components/stzh-tooltip/stzh-tooltip.css +4 -1
- package/dist/collection/components/stzh-twocolumns/stzh-twocolumns.css +4 -1
- package/dist/collection/components/stzh-upload/stzh-upload.css +4 -1
- package/dist/collection/components/stzh-vbz-carousel/stzh-vbz-carousel.css +8 -5
- package/dist/collection/components/stzh-vbz-carousel/stzh-vbz-carousel.js.map +1 -1
- package/dist/collection/components/stzh-vbz-linechip/stzh-vbz-linechip.css +4 -1
- package/dist/collection/components/stzh-vbz-majorticker/stzh-vbz-majorticker.css +4 -1
- package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.css +4 -1
- package/dist/collection/components/stzh-visuallyhidden/stzh-visuallyhidden.css +4 -1
- package/dist/collection/components/stzh-vspace/stzh-vspace.css +4 -1
- package/dist/collection/components/stzh-youtube/stzh-youtube.css +4 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/stzh-actions.js.map +1 -1
- package/dist/components/stzh-breadcrumb2.js +11 -3
- package/dist/components/stzh-breadcrumb2.js.map +1 -1
- package/dist/components/stzh-button2.js +8 -0
- package/dist/components/stzh-button2.js.map +1 -1
- package/dist/components/stzh-calendar2.js +1 -1
- package/dist/components/stzh-calendar2.js.map +1 -1
- package/dist/components/stzh-card-navigation.js +2 -1
- package/dist/components/stzh-card-navigation.js.map +1 -1
- package/dist/components/stzh-card-searchresult.js +73 -47
- package/dist/components/stzh-card-searchresult.js.map +1 -1
- package/dist/components/stzh-card-superteaser.d.ts +11 -0
- package/dist/components/stzh-card-superteaser.js +256 -0
- package/dist/components/stzh-card-superteaser.js.map +1 -0
- package/dist/components/stzh-card2.js +2 -1
- package/dist/components/stzh-card2.js.map +1 -1
- package/dist/components/stzh-cardlist2.js +1 -1
- package/dist/components/stzh-cardlist2.js.map +1 -1
- package/dist/components/stzh-checkbox.js +1 -1
- package/dist/components/stzh-checkbox.js.map +1 -1
- package/dist/components/stzh-chip2.js +11 -2
- package/dist/components/stzh-chip2.js.map +1 -1
- package/dist/components/stzh-chipselect2.js +78 -39
- package/dist/components/stzh-chipselect2.js.map +1 -1
- package/dist/components/stzh-contact.js +8 -2
- package/dist/components/stzh-contact.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 +10 -2
- package/dist/components/stzh-cta.js.map +1 -1
- package/dist/components/stzh-datalist-item2.js +26 -15
- package/dist/components/stzh-datalist-item2.js.map +1 -1
- package/dist/components/stzh-datalist2.js +1 -1
- package/dist/components/stzh-datalist2.js.map +1 -1
- package/dist/components/stzh-datamessagelist-item.js +2 -1
- package/dist/components/stzh-datamessagelist-item.js.map +1 -1
- package/dist/components/stzh-datatable.js +1 -1
- package/dist/components/stzh-datatable.js.map +1 -1
- package/dist/components/stzh-daterange.d.ts +11 -0
- package/dist/components/stzh-daterange.js +143 -0
- package/dist/components/stzh-daterange.js.map +1 -0
- package/dist/components/stzh-dropdown2.js +6 -3
- package/dist/components/stzh-dropdown2.js.map +1 -1
- package/dist/components/stzh-fieldset.js +1 -1
- package/dist/components/stzh-fieldset.js.map +1 -1
- package/dist/components/stzh-ghettobox2.js +1 -1
- package/dist/components/stzh-ghettobox2.js.map +1 -1
- package/dist/components/stzh-header.js +49 -29
- package/dist/components/stzh-header.js.map +1 -1
- package/dist/components/stzh-heading2.js +1 -1
- package/dist/components/stzh-heading2.js.map +1 -1
- package/dist/components/stzh-input2.js.map +1 -1
- package/dist/components/stzh-link2.js +10 -2
- package/dist/components/stzh-link2.js.map +1 -1
- package/dist/components/stzh-menu-item2.js +10 -2
- package/dist/components/stzh-menu-item2.js.map +1 -1
- package/dist/components/stzh-message.js +1 -92
- package/dist/components/stzh-message.js.map +1 -1
- package/dist/{esm/stzh-message.entry.js → components/stzh-message2.js} +50 -9
- package/dist/components/stzh-message2.js.map +1 -0
- package/dist/components/stzh-microsite-teaserlist.js +18 -24
- package/dist/components/stzh-microsite-teaserlist.js.map +1 -1
- package/dist/components/stzh-pagebottom.js +1 -1
- package/dist/components/stzh-pagebottom.js.map +1 -1
- package/dist/components/stzh-radio2.js +1 -1
- package/dist/components/stzh-radio2.js.map +1 -1
- package/dist/components/stzh-richtext2.js +1 -1
- package/dist/components/stzh-richtext2.js.map +1 -1
- package/dist/components/stzh-search.js +106 -81
- package/dist/components/stzh-search.js.map +1 -1
- package/dist/components/stzh-show2.js +0 -1
- package/dist/components/stzh-show2.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-skin-storybook-preview.js +1 -1
- package/dist/components/stzh-skin-storybook-preview.js.map +1 -1
- package/dist/components/stzh-table.js +1 -1
- package/dist/components/stzh-table.js.map +1 -1
- package/dist/components/stzh-tag2.js +2 -1
- package/dist/components/stzh-tag2.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-vbz-carousel.js +1 -1
- package/dist/components/stzh-vbz-carousel.js.map +1 -1
- package/dist/esm/{app-globals-6a7ed0f4.js → app-globals-d7eff0a5.js} +2 -2
- package/dist/esm/{app-globals-6a7ed0f4.js.map → app-globals-d7eff0a5.js.map} +1 -1
- package/dist/esm/index-e3050b18.js +20 -16
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-actions.entry.js.map +1 -1
- package/dist/esm/stzh-badge_3.entry.js +8 -0
- package/dist/esm/stzh-badge_3.entry.js.map +1 -1
- package/dist/esm/stzh-breadcrumb_2.entry.js +13 -4
- package/dist/esm/stzh-breadcrumb_2.entry.js.map +1 -1
- package/dist/esm/stzh-calendar.entry.js +1 -1
- package/dist/esm/stzh-calendar.entry.js.map +1 -1
- package/dist/esm/stzh-card-navigation.entry.js +2 -1
- package/dist/esm/stzh-card-navigation.entry.js.map +1 -1
- package/dist/esm/stzh-card-searchresult.entry.js +21 -32
- package/dist/esm/stzh-card-searchresult.entry.js.map +1 -1
- package/dist/esm/stzh-card-superteaser.entry.js +142 -0
- package/dist/esm/stzh-card-superteaser.entry.js.map +1 -0
- package/dist/esm/stzh-card_3.entry.js +72 -29
- package/dist/esm/stzh-card_3.entry.js.map +1 -1
- package/dist/esm/stzh-checkbox.entry.js +1 -1
- package/dist/esm/stzh-checkbox.entry.js.map +1 -1
- package/dist/esm/stzh-chip.entry.js +7 -2
- package/dist/esm/stzh-chip.entry.js.map +1 -1
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-contact.entry.js +7 -2
- package/dist/esm/stzh-contact.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 +10 -2
- package/dist/esm/stzh-cta.entry.js.map +1 -1
- package/dist/esm/stzh-datalist_2.entry.js +26 -16
- package/dist/esm/stzh-datalist_2.entry.js.map +1 -1
- package/dist/esm/stzh-datamessagelist-item.entry.js +2 -1
- package/dist/esm/stzh-datamessagelist-item.entry.js.map +1 -1
- package/dist/esm/stzh-datatable.entry.js +1 -1
- package/dist/esm/stzh-datatable.entry.js.map +1 -1
- package/dist/esm/stzh-datepicker_3.entry.js +1 -1
- package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
- package/dist/esm/stzh-daterange.entry.js +103 -0
- package/dist/esm/stzh-daterange.entry.js.map +1 -0
- package/dist/esm/stzh-details_2.entry.js +208 -0
- package/dist/esm/stzh-details_2.entry.js.map +1 -0
- package/dist/esm/stzh-dropdown.entry.js +6 -3
- package/dist/esm/stzh-dropdown.entry.js.map +1 -1
- package/dist/esm/stzh-fieldset.entry.js +1 -1
- package/dist/esm/stzh-fieldset.entry.js.map +1 -1
- package/dist/esm/stzh-ghettobox_3.entry.js +2 -3
- package/dist/esm/stzh-ghettobox_3.entry.js.map +1 -1
- package/dist/esm/stzh-header.entry.js +49 -29
- package/dist/esm/stzh-header.entry.js.map +1 -1
- package/dist/esm/stzh-heading.entry.js +1 -1
- package/dist/esm/stzh-heading.entry.js.map +1 -1
- package/dist/esm/stzh-input.entry.js.map +1 -1
- package/dist/esm/stzh-link.entry.js +10 -2
- package/dist/esm/stzh-link.entry.js.map +1 -1
- package/dist/esm/stzh-menu_2.entry.js +10 -2
- package/dist/esm/stzh-menu_2.entry.js.map +1 -1
- package/dist/esm/stzh-microsite-teaserlist.entry.js +2 -2
- package/dist/esm/stzh-microsite-teaserlist.entry.js.map +1 -1
- package/dist/esm/stzh-pagebottom.entry.js +1 -1
- package/dist/esm/stzh-pagebottom.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-search.entry.js +83 -67
- 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-skin-storybook-preview.entry.js +1 -1
- package/dist/esm/stzh-skin-storybook-preview.entry.js.map +1 -1
- package/dist/esm/stzh-table.entry.js +1 -1
- package/dist/esm/stzh-table.entry.js.map +1 -1
- package/dist/esm/stzh-vbz-carousel.entry.js +1 -1
- package/dist/esm/stzh-vbz-carousel.entry.js.map +1 -1
- package/dist/stzh-components/assets/fonts/HelveticaNeueLTW05_66MediumIt.woff2 +0 -0
- package/dist/stzh-components/assets/fonts.css +7 -0
- package/dist/stzh-components/assets/i18n/de.json +10 -3
- package/dist/stzh-components/assets/i18n/en.json +10 -3
- package/dist/stzh-components/index.esm.js.map +1 -1
- package/dist/stzh-components/{p-78eaea8d.js → p-05e8c18d.js} +2 -2
- package/dist/stzh-components/p-0aabd857.entry.js +2 -0
- package/dist/stzh-components/p-0aabd857.entry.js.map +1 -0
- package/dist/stzh-components/p-0bf70420.entry.js +2 -0
- package/dist/stzh-components/p-0bf70420.entry.js.map +1 -0
- package/dist/stzh-components/p-100d4052.entry.js +2 -0
- package/dist/stzh-components/p-100d4052.entry.js.map +1 -0
- package/dist/stzh-components/p-1be90089.entry.js +2 -0
- package/dist/stzh-components/p-1be90089.entry.js.map +1 -0
- package/dist/stzh-components/p-206ec94f.entry.js +2 -0
- package/dist/stzh-components/p-206ec94f.entry.js.map +1 -0
- package/dist/stzh-components/p-2773b08f.entry.js +2 -0
- package/dist/stzh-components/p-2773b08f.entry.js.map +1 -0
- package/dist/stzh-components/{p-53828193.entry.js → p-2ca82cdb.entry.js} +2 -2
- package/dist/stzh-components/{p-53828193.entry.js.map → p-2ca82cdb.entry.js.map} +1 -1
- package/dist/stzh-components/p-3c2d9cff.entry.js +2 -0
- package/dist/stzh-components/p-3c2d9cff.entry.js.map +1 -0
- package/dist/stzh-components/p-3ce84a88.entry.js +2 -0
- package/dist/stzh-components/p-3ce84a88.entry.js.map +1 -0
- package/dist/stzh-components/{p-5b9b2425.entry.js → p-3fa1c5a4.entry.js} +2 -2
- package/dist/stzh-components/p-3fa1c5a4.entry.js.map +1 -0
- package/dist/stzh-components/p-400f2932.entry.js +2 -0
- package/dist/stzh-components/p-400f2932.entry.js.map +1 -0
- package/dist/stzh-components/p-4db427d5.entry.js +2 -0
- package/dist/stzh-components/p-4db427d5.entry.js.map +1 -0
- package/dist/stzh-components/p-5d4a2df0.entry.js +2 -0
- package/dist/stzh-components/{p-10fb3950.entry.js.map → p-5d4a2df0.entry.js.map} +1 -1
- package/dist/stzh-components/{p-75fec3cd.entry.js → p-68d33cd3.entry.js} +2 -2
- package/dist/stzh-components/p-68d33cd3.entry.js.map +1 -0
- package/dist/stzh-components/p-6fdc4c74.entry.js +2 -0
- package/dist/stzh-components/p-6fdc4c74.entry.js.map +1 -0
- package/dist/stzh-components/p-722b9e40.entry.js +2 -0
- package/dist/stzh-components/p-722b9e40.entry.js.map +1 -0
- package/dist/stzh-components/p-72c375c7.entry.js +2 -0
- package/dist/stzh-components/p-72c375c7.entry.js.map +1 -0
- package/dist/stzh-components/p-836c4cdf.entry.js +2 -0
- package/dist/stzh-components/p-836c4cdf.entry.js.map +1 -0
- package/dist/stzh-components/{p-cde04c36.entry.js → p-8f1dbd3b.entry.js} +2 -2
- package/dist/stzh-components/{p-cde04c36.entry.js.map → p-8f1dbd3b.entry.js.map} +1 -1
- package/dist/stzh-components/{p-8cc09e67.entry.js → p-94947ab0.entry.js} +2 -2
- package/dist/stzh-components/p-94947ab0.entry.js.map +1 -0
- package/dist/stzh-components/{p-e7ac738e.entry.js → p-9b43127f.entry.js} +2 -2
- package/dist/stzh-components/{p-e7ac738e.entry.js.map → p-9b43127f.entry.js.map} +1 -1
- package/dist/stzh-components/{p-295c8995.entry.js → p-9f9d53a0.entry.js} +2 -2
- package/dist/stzh-components/p-9f9d53a0.entry.js.map +1 -0
- package/dist/stzh-components/p-accbac61.entry.js +2 -0
- package/dist/stzh-components/p-accbac61.entry.js.map +1 -0
- package/dist/stzh-components/p-b22876e5.entry.js +2 -0
- package/dist/stzh-components/p-b22876e5.entry.js.map +1 -0
- package/dist/stzh-components/{p-1b78f602.entry.js → p-ba32d7ef.entry.js} +2 -2
- package/dist/stzh-components/{p-1b78f602.entry.js.map → p-ba32d7ef.entry.js.map} +1 -1
- package/dist/stzh-components/p-bd2a2c30.entry.js +2 -0
- package/dist/stzh-components/p-bd2a2c30.entry.js.map +1 -0
- package/dist/stzh-components/p-beec9a0a.entry.js.map +1 -1
- package/dist/stzh-components/p-c31b1590.entry.js +9 -0
- package/dist/stzh-components/{p-2bbbc217.entry.js.map → p-c31b1590.entry.js.map} +1 -1
- package/dist/stzh-components/{p-56b6eab9.entry.js → p-cff05968.entry.js} +2 -2
- package/dist/stzh-components/p-cff05968.entry.js.map +1 -0
- package/dist/stzh-components/p-d028e43d.entry.js +2 -0
- package/dist/stzh-components/{p-2d57953a.entry.js.map → p-d028e43d.entry.js.map} +1 -1
- package/dist/stzh-components/p-dff1ce7c.entry.js +2 -0
- package/dist/stzh-components/p-dff1ce7c.entry.js.map +1 -0
- package/dist/stzh-components/{p-17de3017.entry.js → p-e5cfdb8a.entry.js} +2 -2
- package/dist/stzh-components/{p-17de3017.entry.js.map → p-e5cfdb8a.entry.js.map} +1 -1
- package/dist/stzh-components/p-f3d2dc46.entry.js +2 -0
- package/dist/stzh-components/{p-3e1ae32f.entry.js.map → p-f3d2dc46.entry.js.map} +1 -1
- package/dist/stzh-components/p-f5809e5f.entry.js.map +1 -1
- package/dist/stzh-components/p-f5821678.entry.js +2 -0
- package/dist/stzh-components/p-f5821678.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 -1
- package/dist/types/components/stzh-breadcrumb/stzh-breadcrumb.d.ts +5 -1
- package/dist/types/components/stzh-button/stzh-button.d.ts +9 -7
- package/dist/types/components/stzh-card-searchresult/stzh-card-searchresult.d.ts +11 -9
- package/dist/types/components/stzh-card-superteaser/stzh-card-superteaser.d.ts +75 -0
- package/dist/types/components/stzh-card-superteaser/stzh-card-superteaser.localization.d.ts +2 -0
- package/dist/types/components/stzh-chip/stzh-chip.d.ts +8 -0
- package/dist/types/components/stzh-chipselect/stzh-chipselect.d.ts +8 -4
- package/dist/types/components/stzh-contact/stzh-contact.d.ts +2 -0
- package/dist/types/components/stzh-cta/stzh-cta.d.ts +6 -3
- package/dist/types/components/stzh-datalist-item/stzh-datalist-item.d.ts +7 -2
- package/dist/types/components/stzh-daterange/stzh-daterange.d.ts +26 -0
- package/dist/types/components/stzh-daterange/stzh-daterange.localization.d.ts +9 -0
- package/dist/types/components/stzh-dropdown/stzh-dropdown.d.ts +5 -5
- package/dist/types/components/stzh-header/stzh-header.d.ts +8 -3
- package/dist/types/components/stzh-link/stzh-link.d.ts +8 -5
- package/dist/types/components/stzh-menu-item/stzh-menu-item.d.ts +5 -2
- package/dist/types/components/stzh-search/stzh-search.d.ts +5 -0
- package/dist/types/components/stzh-search/stzh-search.localization.d.ts +1 -1
- package/dist/types/components.d.ts +417 -53
- package/dist/types/index.d.ts +54 -6
- package/dist/vscode-data.json +282 -19
- package/package.json +1 -1
- package/dist/cjs/stzh-details.cjs.entry.js +0 -162
- package/dist/cjs/stzh-details.cjs.entry.js.map +0 -1
- package/dist/cjs/stzh-message.cjs.entry.js.map +0 -1
- package/dist/collection/components/stzh-card-searchresult/stzh-card-searchresult.localization.js +0 -2
- package/dist/collection/components/stzh-card-searchresult/stzh-card-searchresult.localization.js.map +0 -1
- package/dist/esm/stzh-details.entry.js +0 -158
- package/dist/esm/stzh-details.entry.js.map +0 -1
- package/dist/esm/stzh-message.entry.js.map +0 -1
- package/dist/stzh-components/p-10fb3950.entry.js +0 -2
- package/dist/stzh-components/p-161ae3d1.entry.js +0 -2
- package/dist/stzh-components/p-161ae3d1.entry.js.map +0 -1
- package/dist/stzh-components/p-295c8995.entry.js.map +0 -1
- package/dist/stzh-components/p-2bbbc217.entry.js +0 -9
- package/dist/stzh-components/p-2d57953a.entry.js +0 -2
- package/dist/stzh-components/p-2eb8f323.entry.js +0 -2
- package/dist/stzh-components/p-2eb8f323.entry.js.map +0 -1
- package/dist/stzh-components/p-3e1ae32f.entry.js +0 -2
- package/dist/stzh-components/p-43cc5c4d.entry.js +0 -2
- package/dist/stzh-components/p-43cc5c4d.entry.js.map +0 -1
- package/dist/stzh-components/p-45392fe0.entry.js +0 -2
- package/dist/stzh-components/p-45392fe0.entry.js.map +0 -1
- package/dist/stzh-components/p-56b6eab9.entry.js.map +0 -1
- package/dist/stzh-components/p-5b9b2425.entry.js.map +0 -1
- package/dist/stzh-components/p-75fec3cd.entry.js.map +0 -1
- package/dist/stzh-components/p-7658bb41.entry.js +0 -2
- package/dist/stzh-components/p-7658bb41.entry.js.map +0 -1
- package/dist/stzh-components/p-79a6b95b.entry.js +0 -2
- package/dist/stzh-components/p-79a6b95b.entry.js.map +0 -1
- package/dist/stzh-components/p-8ab62796.entry.js +0 -2
- package/dist/stzh-components/p-8ab62796.entry.js.map +0 -1
- package/dist/stzh-components/p-8cc09e67.entry.js.map +0 -1
- package/dist/stzh-components/p-b0626969.entry.js +0 -2
- package/dist/stzh-components/p-b0626969.entry.js.map +0 -1
- package/dist/stzh-components/p-b34a4e7c.entry.js +0 -2
- package/dist/stzh-components/p-b34a4e7c.entry.js.map +0 -1
- package/dist/stzh-components/p-b5224e53.entry.js +0 -2
- package/dist/stzh-components/p-b5224e53.entry.js.map +0 -1
- package/dist/stzh-components/p-ba37488e.entry.js +0 -2
- package/dist/stzh-components/p-ba37488e.entry.js.map +0 -1
- package/dist/stzh-components/p-cf96dafb.entry.js +0 -2
- package/dist/stzh-components/p-cf96dafb.entry.js.map +0 -1
- package/dist/stzh-components/p-d1e6afe2.entry.js +0 -2
- package/dist/stzh-components/p-d1e6afe2.entry.js.map +0 -1
- package/dist/stzh-components/p-d2ce78d1.entry.js +0 -2
- package/dist/stzh-components/p-d2ce78d1.entry.js.map +0 -1
- package/dist/stzh-components/p-ddbf653e.entry.js +0 -2
- package/dist/stzh-components/p-ddbf653e.entry.js.map +0 -1
- package/dist/stzh-components/p-e4f62382.entry.js +0 -2
- package/dist/stzh-components/p-e4f62382.entry.js.map +0 -1
- package/dist/stzh-components/p-ef849bb1.entry.js +0 -2
- package/dist/stzh-components/p-ef849bb1.entry.js.map +0 -1
- package/dist/stzh-components/p-f8ec1488.entry.js +0 -2
- package/dist/stzh-components/p-f8ec1488.entry.js.map +0 -1
- package/dist/types/components/stzh-card-searchresult/stzh-card-searchresult.localization.d.ts +0 -2
- /package/dist/stzh-components/{p-78eaea8d.js.map → p-05e8c18d.js.map} +0 -0
|
@@ -38,6 +38,13 @@ export class StzhLink {
|
|
|
38
38
|
originalEvent: event
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
|
+
this.onClick = (event) => {
|
|
42
|
+
this.stzhClick.emit({
|
|
43
|
+
component: "stzh-link",
|
|
44
|
+
originalEvent: event,
|
|
45
|
+
href: this.href
|
|
46
|
+
});
|
|
47
|
+
};
|
|
41
48
|
this.localization = undefined;
|
|
42
49
|
this.icon = "";
|
|
43
50
|
this.iconPosition = "left";
|
|
@@ -116,11 +123,11 @@ export class StzhLink {
|
|
|
116
123
|
return (h(Host, { tabindex: this.disabled ? null : "-1", onFocus: this.onRootFocus }, this.href ?
|
|
117
124
|
h("a", { ref: (el) => (this.link = el), href: this.disabled ? null : this.href, download: this.download, rel: this.rel, target: this.target, class: classes, id: this.linkId, accessKey: this.linkAccesskey, tabindex: this.a11yTabindex, "aria-label": this.a11yLabel || null, "aria-describedby": this.a11yDescribedby || null, "aria-disabled": typeof this.a11yDisabled !== "undefined"
|
|
118
125
|
? (this.a11yDisabled ? "true" : "false") : null, "aria-expanded": typeof this.a11yExpanded !== "undefined"
|
|
119
|
-
? (this.a11yExpanded ? "true" : "false") : null, "aria-controls": this.a11yControls || null, "aria-current": this.a11yCurrent || null, onFocus: this.onFocus, onBlur: this.onBlur }, this.renderInner(iconUsed))
|
|
126
|
+
? (this.a11yExpanded ? "true" : "false") : null, "aria-controls": this.a11yControls || null, "aria-current": this.a11yCurrent || null, onClick: this.onClick, onFocus: this.onFocus, onBlur: this.onBlur }, this.renderInner(iconUsed))
|
|
120
127
|
:
|
|
121
128
|
h("button", { ref: (el) => (this.link = el), class: classes, type: this.type, disabled: this.disabled, id: this.linkId, accessKey: this.linkAccesskey, tabindex: this.a11yTabindex, "aria-label": this.a11yLabel || null, "aria-describedby": this.a11yDescribedby || null, "aria-disabled": typeof this.a11yDisabled !== "undefined"
|
|
122
129
|
? (this.a11yDisabled ? "true" : "false") : null, "aria-expanded": typeof this.a11yExpanded !== "undefined"
|
|
123
|
-
? (this.a11yExpanded ? "true" : "false") : null, "aria-controls": this.a11yControls || null, "aria-current": this.a11yCurrent || null, onFocus: this.onFocus, onBlur: this.onBlur }, this.renderInner(iconUsed))));
|
|
130
|
+
? (this.a11yExpanded ? "true" : "false") : null, "aria-controls": this.a11yControls || null, "aria-current": this.a11yCurrent || null, onClick: this.onClick, onFocus: this.onFocus, onBlur: this.onBlur }, this.renderInner(iconUsed))));
|
|
124
131
|
}
|
|
125
132
|
static get is() { return "stzh-link"; }
|
|
126
133
|
static get encapsulation() { return "scoped"; }
|
|
@@ -253,7 +260,7 @@ export class StzhLink {
|
|
|
253
260
|
"optional": false,
|
|
254
261
|
"docs": {
|
|
255
262
|
"tags": [],
|
|
256
|
-
"text": "Size variant (
|
|
263
|
+
"text": "Size variant (above small breakpoint)"
|
|
257
264
|
},
|
|
258
265
|
"attribute": "size-small",
|
|
259
266
|
"reflect": true
|
|
@@ -276,7 +283,7 @@ export class StzhLink {
|
|
|
276
283
|
"optional": false,
|
|
277
284
|
"docs": {
|
|
278
285
|
"tags": [],
|
|
279
|
-
"text": "Size variant (
|
|
286
|
+
"text": "Size variant (above medium breakpoint)"
|
|
280
287
|
},
|
|
281
288
|
"attribute": "size-medium",
|
|
282
289
|
"reflect": true
|
|
@@ -299,7 +306,7 @@ export class StzhLink {
|
|
|
299
306
|
"optional": false,
|
|
300
307
|
"docs": {
|
|
301
308
|
"tags": [],
|
|
302
|
-
"text": "Size variant (
|
|
309
|
+
"text": "Size variant (above large breakpoint)"
|
|
303
310
|
},
|
|
304
311
|
"attribute": "size-large",
|
|
305
312
|
"reflect": true
|
|
@@ -322,7 +329,7 @@ export class StzhLink {
|
|
|
322
329
|
"optional": false,
|
|
323
330
|
"docs": {
|
|
324
331
|
"tags": [],
|
|
325
|
-
"text": "Size variant (
|
|
332
|
+
"text": "Size variant (above ultra breakpoint)"
|
|
326
333
|
},
|
|
327
334
|
"attribute": "size-ultra",
|
|
328
335
|
"reflect": true
|
|
@@ -794,6 +801,27 @@ export class StzhLink {
|
|
|
794
801
|
}
|
|
795
802
|
static get events() {
|
|
796
803
|
return [{
|
|
804
|
+
"method": "stzhClick",
|
|
805
|
+
"name": "stzhClick",
|
|
806
|
+
"bubbles": true,
|
|
807
|
+
"cancelable": true,
|
|
808
|
+
"composed": true,
|
|
809
|
+
"docs": {
|
|
810
|
+
"tags": [],
|
|
811
|
+
"text": "Click event"
|
|
812
|
+
},
|
|
813
|
+
"complexType": {
|
|
814
|
+
"original": "StzhLinkClickEvent",
|
|
815
|
+
"resolved": "{ component: \"stzh-link\"; originalEvent: MouseEvent; href: string; }",
|
|
816
|
+
"references": {
|
|
817
|
+
"StzhLinkClickEvent": {
|
|
818
|
+
"location": "import",
|
|
819
|
+
"path": "../../index",
|
|
820
|
+
"id": "src/index.ts::StzhLinkClickEvent"
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
}, {
|
|
797
825
|
"method": "stzhFocus",
|
|
798
826
|
"name": "stzhFocus",
|
|
799
827
|
"bubbles": true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stzh-link.js","sourceRoot":"","sources":["../../../../src/components/stzh-link/stzh-link.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,CAAC,EACD,IAAI,EACJ,KAAK,EAEN,MAAM,eAAe,CAAC;AASvB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C;;;GAGG;AAMH,MAAM,OAAO,QAAQ;;IAwHX,mBAAc,GAAY,KAAK,CAAC;IAEhC,gBAAW,GAAG,GAAG,EAAE;MACzB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;QACxB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;OACnB;MAED,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;IAC9B,CAAC,CAAA;IAEO,YAAO,GAAG,CAAC,KAAiB,EAAE,EAAE;MAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n Fragment,\n Element,\n h,\n Prop,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhLinkFocusEvent,\n StzhLinkBlurEvent,\n StzhLinkSize,\n StzhBadgeType\n} from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\n/**\n * @slot - Slot for text content\n * @slot icon - Slot for icon element\n */\n@Component({\n tag: \"stzh-link\",\n styleUrl: \"stzh-link.scss\",\n scoped: true\n})\nexport class StzhLink {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string = \"\";\n\n /** Icon Position */\n @Prop({ reflect: true }) iconPosition: \"left\" | \"right\" = \"left\";\n\n /** Height variant (none prevent setting min-height for mikro and small breakpoint) */\n @Prop({ reflect: true }) height: \"default\" | \"auto\" = \"default\";\n\n /** Size variant */\n @Prop({ reflect: true }) size: StzhLinkSize = \"default\";\n\n /** Size variant (abobe small breakpoint) */\n @Prop({ reflect: true }) sizeSmall: StzhLinkSize;\n\n /** Size variant (abobe medium breakpoint) */\n @Prop({ reflect: true }) sizeMedium: StzhLinkSize;\n\n /** Size variant (abobe large breakpoint) */\n @Prop({ reflect: true }) sizeLarge: StzhLinkSize;\n\n /** Size variant (abobe ultra breakpoint) */\n @Prop({ reflect: true }) sizeUltra: StzhLinkSize;\n\n /** href attribute of the link */\n @Prop() href: string = \"\";\n\n /** Rel (if href is used) */\n @Prop() rel: string;\n\n /** target if the button is used as link (if href used) */\n @Prop() target: string = \"\";\n\n /** Download attribute of link (if `href` used) */\n @Prop() download: string;\n\n /** type of the button, if used as button (if no href used) */\n @Prop() type: \"button\" | \"submit\" | \"reset\" = \"button\";\n\n /** Variant style */\n @Prop({ reflect: true }) variant: \"default\" | \"secondary\" | \"back\" = \"default\";\n\n /** Whether the link is full width */\n @Prop({ reflect: true }) fullwidth: boolean = false;\n\n /** Text alignment */\n @Prop({ reflect: true }) textAlign: \"left\" | \"center\" | \"right\" | \"space-between\" | \"default\" = \"default\";\n\n /** Badge text */\n @Prop() badge: string = \"\";\n\n /** Badge type */\n @Prop({ reflect: true }) badgeType: StzhBadgeType = \"default\";\n\n /** Whether badge should be displayed empty */\n @Prop({ reflect: true }) badgeEmpty: boolean = false;\n\n /** Badge position */\n @Prop({ reflect: true }) badgePosition: \"icon\" | \"link\" = \"icon\";\n\n /** Disabled status */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Active status */\n @Prop({ reflect: true }) active: boolean = false;\n\n /** Whether only an icon is used inside the link */\n @Prop({ reflect: true }) iconOnly: boolean = false;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Access key of link (usually a number e.g. 1) */\n @Prop() linkAccesskey: string;\n\n /** ID of link element */\n @Prop() linkId: string;\n\n /** Accessible label for screen readers to replace visible text */\n @Prop({ attribute: \"a11y-label\" }) a11yLabel: string;\n\n /** Id for element which describes the button (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n /** Aria expanded of link/button */\n @Prop({ reflect: true, attribute: \"a11y-expanded\" }) a11yExpanded: boolean;\n\n /** Aria disabled of link/button */\n @Prop({ reflect: true, attribute: \"a11y-disabled\" }) a11yDisabled: boolean;\n\n /** Aria controls of link/button */\n @Prop({ attribute: \"a11y-controls\" }) a11yControls: string;\n\n /** Tabindex of link/button */\n @Prop({ attribute: \"a11y-tabindex\" }) a11yTabindex: string;\n\n /** Aria current of link/button */\n @Prop({ attribute: \"a11y-current\" }) a11yCurrent: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link/button element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n @Element() element: HTMLStzhLinkElement;\n\n /** Focus event */\n @Event() stzhFocus: EventEmitter<StzhLinkFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhLinkBlurEvent>;\n\n private link: HTMLButtonElement | HTMLAnchorElement;\n private text: HTMLDivElement;\n private focusedByInput: boolean = false;\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.link.focus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n const focusEvent = new FocusEvent(\"focus\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-link\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n const blurEvent = new FocusEvent(\"blur\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-link\",\n originalEvent: event\n });\n }\n\n private renderIcon(): HTMLInputElement {\n return (\n <div class=\"stzh-link__icon-wrapper\">\n {this.icon ?\n <stzh-icon class=\"stzh-link__icon\" name={this.icon}></stzh-icon>\n :\n <slot name=\"icon\"></slot>\n }\n {(this.badge || this.badgeEmpty) &&\n <stzh-badge class=\"stzh-link__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </div>\n );\n }\n\n private renderContent(): HTMLDivElement {\n return (\n <div class=\"stzh-link__text\">\n {this.rel && this.rel.includes('external') && <div class=\"stzh-link__vhidden\">{this.localization.$globals.externalLinkLabel}</div>}\n {this.download && <div class=\"stzh-link__vhidden\">{this.localization.$globals.downloadLinkLabel}</div>}\n <div ref={(el) => (this.text = el as HTMLDivElement)}>{this.label ? this.label : <slot></slot>}</div>\n </div>\n );\n }\n\n private renderInner(iconUsed: boolean): DocumentFragment {\n return (\n <Fragment>\n <div class=\"stzh-link__inner\">\n {this.iconPosition === \"left\" && this.renderIcon()}\n {this.renderContent()}\n {this.iconPosition === \"right\" && this.renderIcon()}\n </div>\n {(this.badge || this.badgeEmpty) && !iconUsed &&\n <stzh-badge class=\"stzh-link__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </Fragment>\n );\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"link\");\n }\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.link?.setAttribute(\"s-object-id\", this.analyticsId || this.text.innerText);\n });\n }\n\n render() {\n const iconUsed = hasSlot(this.element, \"icon\") || !!this.icon;\n const classes = {\n \"stzh-link\": true,\n \"stzh-link--has-icon\": iconUsed,\n \"stzh-link--has-icon-only\": this.iconOnly,\n \"stzh-link--has-badge\": !!this.badge,\n \"stzh-link--is-fullwidth\": this.fullwidth,\n \"stzh-link--is-disabled\": this.disabled,\n \"stzh-link--is-active\": this.active,\n [`stzh-link--badge-position-${this.badgePosition}`]: !!this.badgePosition,\n [`stzh-link--align-${this.textAlign}`]: !!this.textAlign,\n [`stzh-link--${this.variant}`]: !!this.variant,\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n {this.href ?\n <a\n ref={(el) => (this.link = el as HTMLAnchorElement)}\n href={this.disabled ? null : this.href}\n download={this.download}\n rel={this.rel}\n target={this.target}\n class={classes}\n id={this.linkId}\n accessKey={this.linkAccesskey}\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n aria-current={this.a11yCurrent || null}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </a>\n :\n <button\n ref={(el) => (this.link = el as HTMLButtonElement)}\n class={classes}\n type={this.type}\n disabled={this.disabled}\n id={this.linkId}\n accessKey={this.linkAccesskey}\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n aria-current={this.a11yCurrent || null}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </button>\n }\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"stzh-link.js","sourceRoot":"","sources":["../../../../src/components/stzh-link/stzh-link.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,CAAC,EACD,IAAI,EACJ,KAAK,EAEN,MAAM,eAAe,CAAC;AAUvB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C;;;GAGG;AAMH,MAAM,OAAO,QAAQ;;IA2HX,mBAAc,GAAY,KAAK,CAAC;IAEhC,gBAAW,GAAG,GAAG,EAAE;MACzB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;QACxB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;OACnB;MAED,IAAI,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n Fragment,\n Element,\n h,\n Prop,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhLinkFocusEvent,\n StzhLinkBlurEvent,\n StzhLinkSize,\n StzhBadgeType,\n StzhLinkClickEvent\n} from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\n/**\n * @slot - Slot for text content\n * @slot icon - Slot for icon element\n */\n@Component({\n tag: \"stzh-link\",\n styleUrl: \"stzh-link.scss\",\n scoped: true\n})\nexport class StzhLink {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string = \"\";\n\n /** Icon Position */\n @Prop({ reflect: true }) iconPosition: \"left\" | \"right\" = \"left\";\n\n /** Height variant (none prevent setting min-height for mikro and small breakpoint) */\n @Prop({ reflect: true }) height: \"default\" | \"auto\" = \"default\";\n\n /** Size variant */\n @Prop({ reflect: true }) size: StzhLinkSize = \"default\";\n\n /** Size variant (above small breakpoint) */\n @Prop({ reflect: true }) sizeSmall: StzhLinkSize;\n\n /** Size variant (above medium breakpoint) */\n @Prop({ reflect: true }) sizeMedium: StzhLinkSize;\n\n /** Size variant (above large breakpoint) */\n @Prop({ reflect: true }) sizeLarge: StzhLinkSize;\n\n /** Size variant (above ultra breakpoint) */\n @Prop({ reflect: true }) sizeUltra: StzhLinkSize;\n\n /** href attribute of the link */\n @Prop() href: string = \"\";\n\n /** Rel (if href is used) */\n @Prop() rel: string;\n\n /** target if the button is used as link (if href used) */\n @Prop() target: string = \"\";\n\n /** Download attribute of link (if `href` used) */\n @Prop() download: string;\n\n /** type of the button, if used as button (if no href used) */\n @Prop() type: \"button\" | \"submit\" | \"reset\" = \"button\";\n\n /** Variant style */\n @Prop({ reflect: true }) variant: \"default\" | \"secondary\" | \"back\" = \"default\";\n\n /** Whether the link is full width */\n @Prop({ reflect: true }) fullwidth: boolean = false;\n\n /** Text alignment */\n @Prop({ reflect: true }) textAlign: \"left\" | \"center\" | \"right\" | \"space-between\" | \"default\" = \"default\";\n\n /** Badge text */\n @Prop() badge: string = \"\";\n\n /** Badge type */\n @Prop({ reflect: true }) badgeType: StzhBadgeType = \"default\";\n\n /** Whether badge should be displayed empty */\n @Prop({ reflect: true }) badgeEmpty: boolean = false;\n\n /** Badge position */\n @Prop({ reflect: true }) badgePosition: \"icon\" | \"link\" = \"icon\";\n\n /** Disabled status */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Active status */\n @Prop({ reflect: true }) active: boolean = false;\n\n /** Whether only an icon is used inside the link */\n @Prop({ reflect: true }) iconOnly: boolean = false;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Access key of link (usually a number e.g. 1) */\n @Prop() linkAccesskey: string;\n\n /** ID of link element */\n @Prop() linkId: string;\n\n /** Accessible label for screen readers to replace visible text */\n @Prop({ attribute: \"a11y-label\" }) a11yLabel: string;\n\n /** Id for element which describes the button (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n /** Aria expanded of link/button */\n @Prop({ reflect: true, attribute: \"a11y-expanded\" }) a11yExpanded: boolean;\n\n /** Aria disabled of link/button */\n @Prop({ reflect: true, attribute: \"a11y-disabled\" }) a11yDisabled: boolean;\n\n /** Aria controls of link/button */\n @Prop({ attribute: \"a11y-controls\" }) a11yControls: string;\n\n /** Tabindex of link/button */\n @Prop({ attribute: \"a11y-tabindex\" }) a11yTabindex: string;\n\n /** Aria current of link/button */\n @Prop({ attribute: \"a11y-current\" }) a11yCurrent: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link/button element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n @Element() element: HTMLStzhLinkElement;\n\n /** Click event */\n @Event() stzhClick: EventEmitter<StzhLinkClickEvent>;\n\n /** Focus event */\n @Event() stzhFocus: EventEmitter<StzhLinkFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhLinkBlurEvent>;\n\n private link: HTMLButtonElement | HTMLAnchorElement;\n private text: HTMLDivElement;\n private focusedByInput: boolean = false;\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.link.focus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n const focusEvent = new FocusEvent(\"focus\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-link\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n const blurEvent = new FocusEvent(\"blur\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-link\",\n originalEvent: event\n });\n }\n\n private onClick = (event: MouseEvent) => {\n this.stzhClick.emit({\n component: \"stzh-link\",\n originalEvent: event,\n href: this.href\n });\n }\n\n private renderIcon(): HTMLInputElement {\n return (\n <div class=\"stzh-link__icon-wrapper\">\n {this.icon ?\n <stzh-icon class=\"stzh-link__icon\" name={this.icon}></stzh-icon>\n :\n <slot name=\"icon\"></slot>\n }\n {(this.badge || this.badgeEmpty) &&\n <stzh-badge class=\"stzh-link__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </div>\n );\n }\n\n private renderContent(): HTMLDivElement {\n return (\n <div class=\"stzh-link__text\">\n {this.rel && this.rel.includes('external') && <div class=\"stzh-link__vhidden\">{this.localization.$globals.externalLinkLabel}</div>}\n {this.download && <div class=\"stzh-link__vhidden\">{this.localization.$globals.downloadLinkLabel}</div>}\n <div ref={(el) => (this.text = el as HTMLDivElement)}>{this.label ? this.label : <slot></slot>}</div>\n </div>\n );\n }\n\n private renderInner(iconUsed: boolean): DocumentFragment {\n return (\n <Fragment>\n <div class=\"stzh-link__inner\">\n {this.iconPosition === \"left\" && this.renderIcon()}\n {this.renderContent()}\n {this.iconPosition === \"right\" && this.renderIcon()}\n </div>\n {(this.badge || this.badgeEmpty) && !iconUsed &&\n <stzh-badge class=\"stzh-link__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </Fragment>\n );\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"link\");\n }\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.link?.setAttribute(\"s-object-id\", this.analyticsId || this.text.innerText);\n });\n }\n\n render() {\n const iconUsed = hasSlot(this.element, \"icon\") || !!this.icon;\n const classes = {\n \"stzh-link\": true,\n \"stzh-link--has-icon\": iconUsed,\n \"stzh-link--has-icon-only\": this.iconOnly,\n \"stzh-link--has-badge\": !!this.badge,\n \"stzh-link--is-fullwidth\": this.fullwidth,\n \"stzh-link--is-disabled\": this.disabled,\n \"stzh-link--is-active\": this.active,\n [`stzh-link--badge-position-${this.badgePosition}`]: !!this.badgePosition,\n [`stzh-link--align-${this.textAlign}`]: !!this.textAlign,\n [`stzh-link--${this.variant}`]: !!this.variant,\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n {this.href ?\n <a\n ref={(el) => (this.link = el as HTMLAnchorElement)}\n href={this.disabled ? null : this.href}\n download={this.download}\n rel={this.rel}\n target={this.target}\n class={classes}\n id={this.linkId}\n accessKey={this.linkAccesskey}\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n aria-current={this.a11yCurrent || null}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </a>\n :\n <button\n ref={(el) => (this.link = el as HTMLButtonElement)}\n class={classes}\n type={this.type}\n disabled={this.disabled}\n id={this.linkId}\n accessKey={this.linkAccesskey}\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n aria-current={this.a11yCurrent || null}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </button>\n }\n </Host>\n );\n }\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Colors
|
|
4
4
|
*/
|
|
5
5
|
/* Signal colors */
|
|
6
|
-
/* Old colors (TODO: cleanup
|
|
6
|
+
/* Old colors (TODO: cleanup when not needed anymore) */
|
|
7
7
|
/**
|
|
8
8
|
* Base
|
|
9
9
|
*/
|
|
@@ -28,6 +28,9 @@
|
|
|
28
28
|
/**
|
|
29
29
|
* Header
|
|
30
30
|
*/
|
|
31
|
+
/**
|
|
32
|
+
* Fieldset
|
|
33
|
+
*/
|
|
31
34
|
/**
|
|
32
35
|
* Progressbar
|
|
33
36
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Colors
|
|
3
3
|
*/
|
|
4
4
|
/* Signal colors */
|
|
5
|
-
/* Old colors (TODO: cleanup
|
|
5
|
+
/* Old colors (TODO: cleanup when not needed anymore) */
|
|
6
6
|
/**
|
|
7
7
|
* Base
|
|
8
8
|
*/
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
/**
|
|
28
28
|
* Header
|
|
29
29
|
*/
|
|
30
|
+
/**
|
|
31
|
+
* Fieldset
|
|
32
|
+
*/
|
|
30
33
|
/**
|
|
31
34
|
* Progressbar
|
|
32
35
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Colors
|
|
3
3
|
*/
|
|
4
4
|
/* Signal colors */
|
|
5
|
-
/* Old colors (TODO: cleanup
|
|
5
|
+
/* Old colors (TODO: cleanup when not needed anymore) */
|
|
6
6
|
/**
|
|
7
7
|
* Base
|
|
8
8
|
*/
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
/**
|
|
28
28
|
* Header
|
|
29
29
|
*/
|
|
30
|
+
/**
|
|
31
|
+
* Fieldset
|
|
32
|
+
*/
|
|
30
33
|
/**
|
|
31
34
|
* Progressbar
|
|
32
35
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Colors
|
|
3
3
|
*/
|
|
4
4
|
/* Signal colors */
|
|
5
|
-
/* Old colors (TODO: cleanup
|
|
5
|
+
/* Old colors (TODO: cleanup when not needed anymore) */
|
|
6
6
|
/**
|
|
7
7
|
* Base
|
|
8
8
|
*/
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
/**
|
|
28
28
|
* Header
|
|
29
29
|
*/
|
|
30
|
+
/**
|
|
31
|
+
* Fieldset
|
|
32
|
+
*/
|
|
30
33
|
/**
|
|
31
34
|
* Progressbar
|
|
32
35
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Colors
|
|
3
3
|
*/
|
|
4
4
|
/* Signal colors */
|
|
5
|
-
/* Old colors (TODO: cleanup
|
|
5
|
+
/* Old colors (TODO: cleanup when not needed anymore) */
|
|
6
6
|
/**
|
|
7
7
|
* Base
|
|
8
8
|
*/
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
/**
|
|
28
28
|
* Header
|
|
29
29
|
*/
|
|
30
|
+
/**
|
|
31
|
+
* Fieldset
|
|
32
|
+
*/
|
|
30
33
|
/**
|
|
31
34
|
* Progressbar
|
|
32
35
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Colors
|
|
3
3
|
*/
|
|
4
4
|
/* Signal colors */
|
|
5
|
-
/* Old colors (TODO: cleanup
|
|
5
|
+
/* Old colors (TODO: cleanup when not needed anymore) */
|
|
6
6
|
/**
|
|
7
7
|
* Base
|
|
8
8
|
*/
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
/**
|
|
28
28
|
* Header
|
|
29
29
|
*/
|
|
30
|
+
/**
|
|
31
|
+
* Fieldset
|
|
32
|
+
*/
|
|
30
33
|
/**
|
|
31
34
|
* Progressbar
|
|
32
35
|
*/
|
|
@@ -38,6 +38,13 @@ export class StzhMenuItem {
|
|
|
38
38
|
originalEvent: event
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
|
+
this.onClick = (event) => {
|
|
42
|
+
this.stzhClick.emit({
|
|
43
|
+
component: "stzh-menu-item",
|
|
44
|
+
originalEvent: event,
|
|
45
|
+
href: this.href
|
|
46
|
+
});
|
|
47
|
+
};
|
|
41
48
|
this.variant = "default";
|
|
42
49
|
this.size = "default";
|
|
43
50
|
this.counter = undefined;
|
|
@@ -80,9 +87,9 @@ export class StzhMenuItem {
|
|
|
80
87
|
[`stzh-menu-item--${this.variant}`]: !!this.variant
|
|
81
88
|
};
|
|
82
89
|
return (h(Host, { role: "menuitem", tabindex: this.disabled ? null : "-1", onFocus: this.onRootFocus }, this.href ?
|
|
83
|
-
h("a", { ref: (el) => (this.menuItem = el), href: this.disabled ? null : this.href, target: this.target, class: classes, "aria-label": this.a11yLabel || null, onFocus: this.onFocus, onBlur: this.onBlur }, this.renderInner(iconUsed))
|
|
90
|
+
h("a", { ref: (el) => (this.menuItem = el), href: this.disabled ? null : this.href, target: this.target, class: classes, "aria-label": this.a11yLabel || null, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick }, this.renderInner(iconUsed))
|
|
84
91
|
:
|
|
85
|
-
h("button", { ref: (el) => (this.menuItem = el), class: classes, type: "button", disabled: this.disabled, "aria-label": this.a11yLabel || null, onFocus: this.onFocus, onBlur: this.onBlur }, this.renderInner(iconUsed))));
|
|
92
|
+
h("button", { ref: (el) => (this.menuItem = el), class: classes, type: "button", disabled: this.disabled, "aria-label": this.a11yLabel || null, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick }, this.renderInner(iconUsed))));
|
|
86
93
|
}
|
|
87
94
|
static get is() { return "stzh-menu-item"; }
|
|
88
95
|
static get encapsulation() { return "scoped"; }
|
|
@@ -397,7 +404,7 @@ export class StzhMenuItem {
|
|
|
397
404
|
"composed": true,
|
|
398
405
|
"docs": {
|
|
399
406
|
"tags": [],
|
|
400
|
-
"text": "
|
|
407
|
+
"text": "Blur event"
|
|
401
408
|
},
|
|
402
409
|
"complexType": {
|
|
403
410
|
"original": "StzhMenuItemBlurEvent",
|
|
@@ -410,6 +417,27 @@ export class StzhMenuItem {
|
|
|
410
417
|
}
|
|
411
418
|
}
|
|
412
419
|
}
|
|
420
|
+
}, {
|
|
421
|
+
"method": "stzhClick",
|
|
422
|
+
"name": "stzhClick",
|
|
423
|
+
"bubbles": true,
|
|
424
|
+
"cancelable": true,
|
|
425
|
+
"composed": true,
|
|
426
|
+
"docs": {
|
|
427
|
+
"tags": [],
|
|
428
|
+
"text": "Click event"
|
|
429
|
+
},
|
|
430
|
+
"complexType": {
|
|
431
|
+
"original": "StzhMenuItemClickEvent",
|
|
432
|
+
"resolved": "{ component: \"stzh-menu-item\"; originalEvent: MouseEvent; href: string; }",
|
|
433
|
+
"references": {
|
|
434
|
+
"StzhMenuItemClickEvent": {
|
|
435
|
+
"location": "import",
|
|
436
|
+
"path": "../../index",
|
|
437
|
+
"id": "src/index.ts::StzhMenuItemClickEvent"
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
413
441
|
}];
|
|
414
442
|
}
|
|
415
443
|
static get elementRef() { return "element"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stzh-menu-item.js","sourceRoot":"","sources":["../../../../src/components/stzh-menu-item/stzh-menu-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,KAAK,EAEN,MAAM,eAAe,CAAC;AAUvB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;;GAGG;AAMH,MAAM,OAAO,YAAY;;IA0Df,mBAAc,GAAY,KAAK,CAAC;IAEhC,gBAAW,GAAG,GAAG,EAAE;MACzB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;QACxB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;OACvB;MAED,IAAI,CAAC,cAAc,GAAG,KAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Fragment,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhMenuItemFocusEvent,\n StzhMenuItemBlurEvent,\n StzhBadgeType,\n StzhMenuSize,\n StzhMenuVariant\n} from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\n\n/**\n * @slot - Slot for any content\n * @slot icon - Slot for `stzh-icon` element\n */\n@Component({\n tag: \"stzh-menu-item\",\n styleUrl: \"stzh-menu-item.scss\",\n scoped: true\n})\nexport class StzhMenuItem {\n /** Variant */\n @Prop({ reflect: true }) variant: StzhMenuVariant = \"default\";\n\n /** Size */\n @Prop({ reflect: true }) size: StzhMenuSize = \"default\";\n\n /** Counter */\n @Prop() counter: number;\n\n /** Badge (only displayed if `icon` property or icon slot is used) */\n @Prop() badge: string = \"\";\n\n /** Badge type */\n @Prop({ reflect: true }) badgeType: StzhBadgeType = \"default\";\n\n /** Whether badge should be displayed empty */\n @Prop({ reflect: true }) badgeEmpty: boolean = false;\n\n /** Whether the button is disabled */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Whether the button is active */\n @Prop({ reflect: true }) active: boolean = false;\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string = \"\";\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** `href` if the button should be used as link */\n @Prop() href: string = \"\";\n\n /** Target if the button is used as link (if `href` used) */\n @Prop() target: string = \"\";\n\n /** Accessible label for screen readers to replace visible text */\n @Prop({ attribute: \"a11y-label\" }) a11yLabel: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link/button element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n @Element() element: HTMLStzhMenuItemElement;\n\n /** Focus event */\n @Event() stzhFocus: EventEmitter<StzhMenuItemFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhMenuItemBlurEvent>;\n\n private menuItem: HTMLButtonElement | HTMLAnchorElement;\n private text: HTMLDivElement;\n\n private focusedByInput: boolean = false;\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.menuItem.focus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n const focusEvent = new FocusEvent(\"focus\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-menu-item\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n const blurEvent = new FocusEvent(\"blur\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-menu-item\",\n originalEvent: event\n });\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.menuItem?.setAttribute(\"s-object-id\", this.analyticsId || this.text.innerText);\n });\n }\n\n private renderInner(iconUsed: boolean): DocumentFragment {\n return (\n <Fragment>\n {iconUsed &&\n <div class=\"stzh-menu-item__icon-wrapper\">\n {this.icon ?\n <stzh-icon class=\"stzh-menu-item__icon\" name={this.icon}></stzh-icon>\n :\n <slot name=\"icon\"></slot>\n }\n {(this.badge || this.badgeEmpty) &&\n <stzh-badge class=\"stzh-menu-item__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </div>\n }\n <div class=\"stzh-menu-item__text-wrapper\">\n <div\n ref={(el) => (this.text = el as HTMLDivElement)}\n class=\"stzh-menu-item__text\"\n >\n {this.label ? this.label : <slot></slot>}\n </div>\n {this.counter &&\n <div class=\"stzh-menu-item__counter\">\n ({this.counter})\n </div>\n }\n </div>\n </Fragment>\n );\n }\n\n render() {\n const iconUsed: boolean = hasSlot(this.element, \"icon\") || !!this.icon;\n const classes = {\n \"stzh-menu-item\": true,\n \"stzh-menu-item--has-icon\": iconUsed,\n \"stzh-menu-item--has-badge\": !!this.badge,\n \"stzh-menu-item--is-disabled\": this.disabled,\n \"stzh-menu-item--is-active\": this.active,\n [`stzh-menu-item--size-${this.size}`]: !!this.size,\n [`stzh-menu-item--${this.variant}`]: !!this.variant\n };\n\n return (\n <Host role=\"menuitem\" tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n {this.href ?\n <a\n ref={(el) => (this.menuItem = el as HTMLAnchorElement)}\n href={this.disabled ? null : this.href}\n target={this.target}\n class={classes}\n aria-label={this.a11yLabel || null}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </a>\n :\n <button\n ref={(el) => (this.menuItem = el as HTMLButtonElement)}\n class={classes}\n type=\"button\"\n disabled={this.disabled}\n aria-label={this.a11yLabel || null}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </button>\n }\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"stzh-menu-item.js","sourceRoot":"","sources":["../../../../src/components/stzh-menu-item/stzh-menu-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,KAAK,EAEN,MAAM,eAAe,CAAC;AAWvB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;;GAGG;AAMH,MAAM,OAAO,YAAY;;IA6Df,mBAAc,GAAY,KAAK,CAAC;IAEhC,gBAAW,GAAG,GAAG,EAAE;MACzB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;QACxB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;OACvB;MAED,IAAI,CAAC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AC,MAAM,EACnB,OAAO,EAAE,IAAI,CAAC,OAAO,IAEpB,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CACpB,CAEN,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Fragment,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhMenuItemFocusEvent,\n StzhMenuItemBlurEvent,\n StzhMenuItemClickEvent,\n StzhBadgeType,\n StzhMenuSize,\n StzhMenuVariant\n} from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\n\n/**\n * @slot - Slot for any content\n * @slot icon - Slot for `stzh-icon` element\n */\n@Component({\n tag: \"stzh-menu-item\",\n styleUrl: \"stzh-menu-item.scss\",\n scoped: true\n})\nexport class StzhMenuItem {\n /** Variant */\n @Prop({ reflect: true }) variant: StzhMenuVariant = \"default\";\n\n /** Size */\n @Prop({ reflect: true }) size: StzhMenuSize = \"default\";\n\n /** Counter */\n @Prop() counter: number;\n\n /** Badge (only displayed if `icon` property or icon slot is used) */\n @Prop() badge: string = \"\";\n\n /** Badge type */\n @Prop({ reflect: true }) badgeType: StzhBadgeType = \"default\";\n\n /** Whether badge should be displayed empty */\n @Prop({ reflect: true }) badgeEmpty: boolean = false;\n\n /** Whether the button is disabled */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Whether the button is active */\n @Prop({ reflect: true }) active: boolean = false;\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string = \"\";\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** `href` if the button should be used as link */\n @Prop() href: string = \"\";\n\n /** Target if the button is used as link (if `href` used) */\n @Prop() target: string = \"\";\n\n /** Accessible label for screen readers to replace visible text */\n @Prop({ attribute: \"a11y-label\" }) a11yLabel: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link/button element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n @Element() element: HTMLStzhMenuItemElement;\n\n /** Focus event */\n @Event() stzhFocus: EventEmitter<StzhMenuItemFocusEvent>;\n\n /** Blur event */\n @Event() stzhBlur: EventEmitter<StzhMenuItemBlurEvent>;\n\n /** Click event */\n @Event() stzhClick: EventEmitter<StzhMenuItemClickEvent>;\n\n private menuItem: HTMLButtonElement | HTMLAnchorElement;\n private text: HTMLDivElement;\n\n private focusedByInput: boolean = false;\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.menuItem.focus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n const focusEvent = new FocusEvent(\"focus\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-menu-item\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n const blurEvent = new FocusEvent(\"blur\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-menu-item\",\n originalEvent: event\n });\n }\n\n private onClick = (event: MouseEvent) => {\n this.stzhClick.emit({\n component: \"stzh-menu-item\",\n originalEvent: event,\n href: this.href\n });\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.menuItem?.setAttribute(\"s-object-id\", this.analyticsId || this.text.innerText);\n });\n }\n\n private renderInner(iconUsed: boolean): DocumentFragment {\n return (\n <Fragment>\n {iconUsed &&\n <div class=\"stzh-menu-item__icon-wrapper\">\n {this.icon ?\n <stzh-icon class=\"stzh-menu-item__icon\" name={this.icon}></stzh-icon>\n :\n <slot name=\"icon\"></slot>\n }\n {(this.badge || this.badgeEmpty) &&\n <stzh-badge class=\"stzh-menu-item__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </div>\n }\n <div class=\"stzh-menu-item__text-wrapper\">\n <div\n ref={(el) => (this.text = el as HTMLDivElement)}\n class=\"stzh-menu-item__text\"\n >\n {this.label ? this.label : <slot></slot>}\n </div>\n {this.counter &&\n <div class=\"stzh-menu-item__counter\">\n ({this.counter})\n </div>\n }\n </div>\n </Fragment>\n );\n }\n\n render() {\n const iconUsed: boolean = hasSlot(this.element, \"icon\") || !!this.icon;\n const classes = {\n \"stzh-menu-item\": true,\n \"stzh-menu-item--has-icon\": iconUsed,\n \"stzh-menu-item--has-badge\": !!this.badge,\n \"stzh-menu-item--is-disabled\": this.disabled,\n \"stzh-menu-item--is-active\": this.active,\n [`stzh-menu-item--size-${this.size}`]: !!this.size,\n [`stzh-menu-item--${this.variant}`]: !!this.variant\n };\n\n return (\n <Host role=\"menuitem\" tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n {this.href ?\n <a\n ref={(el) => (this.menuItem = el as HTMLAnchorElement)}\n href={this.disabled ? null : this.href}\n target={this.target}\n class={classes}\n aria-label={this.a11yLabel || null}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onClick={this.onClick}\n >\n {this.renderInner(iconUsed)}\n </a>\n :\n <button\n ref={(el) => (this.menuItem = el as HTMLButtonElement)}\n class={classes}\n type=\"button\"\n disabled={this.disabled}\n aria-label={this.a11yLabel || null}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onClick={this.onClick}\n >\n {this.renderInner(iconUsed)}\n </button>\n }\n </Host>\n );\n }\n}\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Colors
|
|
3
3
|
*/
|
|
4
4
|
/* Signal colors */
|
|
5
|
-
/* Old colors (TODO: cleanup
|
|
5
|
+
/* Old colors (TODO: cleanup when not needed anymore) */
|
|
6
6
|
/**
|
|
7
7
|
* Base
|
|
8
8
|
*/
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
/**
|
|
28
28
|
* Header
|
|
29
29
|
*/
|
|
30
|
+
/**
|
|
31
|
+
* Fieldset
|
|
32
|
+
*/
|
|
30
33
|
/**
|
|
31
34
|
* Progressbar
|
|
32
35
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Colors
|
|
3
3
|
*/
|
|
4
4
|
/* Signal colors */
|
|
5
|
-
/* Old colors (TODO: cleanup
|
|
5
|
+
/* Old colors (TODO: cleanup when not needed anymore) */
|
|
6
6
|
/**
|
|
7
7
|
* Base
|
|
8
8
|
*/
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
/**
|
|
28
28
|
* Header
|
|
29
29
|
*/
|
|
30
|
+
/**
|
|
31
|
+
* Fieldset
|
|
32
|
+
*/
|
|
30
33
|
/**
|
|
31
34
|
* Progressbar
|
|
32
35
|
*/
|
|
@@ -13,7 +13,7 @@ export class StzhMicrositeTeaserlist {
|
|
|
13
13
|
this._showMoreLink = false;
|
|
14
14
|
this.handleChange = (event) => {
|
|
15
15
|
this.showItems = this._initialShowItems;
|
|
16
|
-
this.activeFilter = event.detail.value;
|
|
16
|
+
this.activeFilter = typeof event.detail.value === "string" ? event.detail.value : event.detail.value[0] || "";
|
|
17
17
|
};
|
|
18
18
|
this.handleMoreClick = () => {
|
|
19
19
|
this.showItems = this.showItems + this.stepItems;
|
|
@@ -74,7 +74,7 @@ export class StzhMicrositeTeaserlist {
|
|
|
74
74
|
"stzh-microsite-teaserlist": true,
|
|
75
75
|
};
|
|
76
76
|
return (h(Host, null, h("div", { class: classes }, this._tagChips.length > 0 &&
|
|
77
|
-
h("stzh-chipselect", { "hide-optional": true, class: "stzh-microsite-teaserlist__filter", label: this.localization.tagsLabel, data: this._tagChips, onStzhChange: this.handleChange }), h("stzh-cardlist", { layout: "teasers" }, this._filteredSlicedItems.map((item) => h("stzh-card", { href: item.link }, item.image &&
|
|
77
|
+
h("stzh-chipselect", { "hide-optional": true, "label-hidden": true, class: "stzh-microsite-teaserlist__filter", label: this.localization.tagsLabel, data: this._tagChips, onStzhChange: this.handleChange }), h("stzh-cardlist", { layout: "teasers" }, this._filteredSlicedItems.map((item) => h("stzh-card", { href: item.link }, item.image &&
|
|
78
78
|
h("stzh-ratio", { slot: "image" }, h("img", { src: item.image })), item.title &&
|
|
79
79
|
h("div", { slot: "heading" }, item.title), item.description &&
|
|
80
80
|
h("div", { slot: "content" }, item.description)))), this._showMoreLink &&
|
package/dist/collection/components/stzh-microsite-teaserlist/stzh-microsite-teaserlist.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stzh-microsite-teaserlist.js","sourceRoot":"","sources":["../../../../src/components/stzh-microsite-teaserlist/stzh-microsite-teaserlist.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,OAAO,EACP,IAAI,EACJ,KAAK,EACL,KAAK,EACN,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B;;;GAGG;AAMH,MAAM,OAAO,uBAAuB;;IAS1B,UAAK,GAAiC,EAAE,CAAC;IACzC,cAAS,GAAyB,EAAE,CAAC;IAerC,mBAAc,GAAkC,EAAE,CAAC;IACnD,yBAAoB,GAAkC,EAAE,CAAC;IACzD,kBAAa,GAAY,KAAK,CAAC;IAoD/B,iBAAY,GAAG,CAAC,KAA6C,EAAE,EAAE;MACvE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,iBAAiB,CAAC;MACxC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"stzh-microsite-teaserlist.js","sourceRoot":"","sources":["../../../../src/components/stzh-microsite-teaserlist/stzh-microsite-teaserlist.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,OAAO,EACP,IAAI,EACJ,KAAK,EACL,KAAK,EACN,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B;;;GAGG;AAMH,MAAM,OAAO,uBAAuB;;IAS1B,UAAK,GAAiC,EAAE,CAAC;IACzC,cAAS,GAAyB,EAAE,CAAC;IAerC,mBAAc,GAAkC,EAAE,CAAC;IACnD,yBAAoB,GAAkC,EAAE,CAAC;IACzD,kBAAa,GAAY,KAAK,CAAC;IAoD/B,iBAAY,GAAG,CAAC,KAA6C,EAAE,EAAE;MACvE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,iBAAiB,CAAC;MACxC,IAAI,CAAC,YAAY,GAAG,OAAO,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAChH,CAAC,CAAA;IAEO,oBAAe,GAAG,GAAG,EAAE;MAC7B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;IACnD,CAAC,CAAA;;;gBA9EqD,EAAE;qBAKX,CAAC;qBAIlB,CAAC;wBAKG,EAAE;iBAEc,EAAE;;EAQlD,KAAK,CAAC,aAAa;IACjB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK;OAC7B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;MACf,6GAA6G;MAC7G,OAAO,CAAC,IAAI,CAAC,YAAY,KAAK,EAAE,CAAC,CAAC,CA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AE,IAAI,CAAC,KAAK,GAAI,CACb;UAEd,IAAI,CAAC,KAAK;YACT,WAAK,IAAI,EAAC,SAAS,IAAE,IAAI,CAAC,KAAK,CAAO;UAGvC,IAAI,CAAC,WAAW;YACf,WAAK,IAAI,EAAC,SAAS,IAAE,IAAI,CAAC,WAAW,CAAO,CAGpC,CACb,CACa;QAEf,IAAI,CAAC,aAAa;UACjB,WAAK,KAAK,EAAC,sCAAsC;YAC/C,mBACE,OAAO,EAAC,WAAW,EACnB,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,EACjC,OAAO,EAAE,IAAI,CAAC,eAAe,GAChB,CACX,CAEJ,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Watch,\n State\n} from \"@stencil/core\";\n\nimport axios from 'axios';\n\nimport { StzhMicrositeTeaserlistLocalizedText } from './stzh-microsite-teaserlist.localization';\n\nimport {\n StzhMicrositeTeaserlistTag,\n StzhMicrositeTeaserlistItem,\n StzhChipselectItem,\n StzhChipselectChangeEvent\n} from \"../../index\";\n\n/**\n * @see https://www.stadt-zuerich.ch/site/fuer-zueri/de/index.html\n * @see https://www.stadt-zuerich.ch/site/iazh/de/index.html\n */\n@Component({\n tag: \"stzh-microsite-teaserlist\",\n styleUrl: \"stzh-microsite-teaserlist.scss\",\n scoped: true\n})\nexport class StzhMicrositeTeaserlist {\n /** Translation strings */\n @Prop() localization: StzhMicrositeTeaserlistLocalizedText;\n\n /** API URL (`{lang}` is replaced in the URL) */\n @Prop() api: string;\n\n /** Tags */\n @Prop() tags: string | StzhMicrositeTeaserlistTag[] = [];\n private _tags: StzhMicrositeTeaserlistTag[] = [];\n private _tagChips: StzhChipselectItem[] = [];\n\n /** Numbers of items currently shown */\n @Prop({ mutable: true }) showItems: number = 6;\n private _initialShowItems: number;\n\n /** Numbers of item shown with each load more action */\n @Prop() stepItems: number = 6;\n\n @Element() element: HTMLStzhMicrositeTeaserlistElement;\n\n /** Active filter */\n @State() activeFilter: string = \"\";\n\n @State() items: StzhMicrositeTeaserlistItem[] = [];\n private _filteredItems: StzhMicrositeTeaserlistItem[] = [];\n private _filteredSlicedItems: StzhMicrositeTeaserlistItem[] = [];\n private _showMoreLink: boolean = false;\n\n @Watch(\"items\")\n @Watch(\"showItems\")\n @Watch(\"activeFilter\")\n async filterHandler() {\n this._filteredItems = this.items\n .filter((item) => {\n // return (this.activeFilter[0] !== \"\") ? item.tags.some(tag => this.activeFilters.indexOf(tag) > -1) : true;\n return (this.activeFilter !== \"\") ? item.tags.some(tag => this.activeFilter === tag) : true;\n });\n\n this._filteredSlicedItems = this._filteredItems\n .slice(0, this.showItems)\n\n this._showMoreLink = this.showItems < this._filteredItems.length;\n }\n\n @Watch(\"items\")\n @Watch(\"tags\")\n async tagsWatcher() {\n if (typeof this.tags === \"string\") {\n this._tags = JSON.parse(this.tags);\n } else {\n this._tags = this.tags;\n }\n\n this._tagChips = this._tags.map((tag) => ({\n \"label\": tag.name,\n \"value\": tag.id,\n \"variant\": \"filter\",\n \"counter\": ((tag.id)\n ? this.items.filter(item => item.tags.indexOf(tag.id) > -1).length\n : this.items.length).toString()\n }));\n }\n\n @Watch(\"api\")\n async apiWatcher(newValue: string) {\n if (!newValue) {\n return;\n }\n\n let apiUrl = this.api.replace(/\\{lang\\}/, this.localization.$locale)\n\n // load data from API\n const { data } = await axios.get(apiUrl);\n\n this.items = data.items;\n this.showItems = this._initialShowItems;\n }\n\n private handleChange = (event: CustomEvent<StzhChipselectChangeEvent>) => {\n this.showItems = this._initialShowItems;\n this.activeFilter = typeof event.detail.value === \"string\" ? event.detail.value : event.detail.value[0] || \"\";\n }\n\n private handleMoreClick = () => {\n this.showItems = this.showItems + this.stepItems;\n }\n\n async componentWillLoad() {\n this._initialShowItems = this.showItems;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"microsite-teaserlist\");\n }\n\n await this.apiWatcher(this.api);\n }\n\n render() {\n const classes = {\n \"stzh-microsite-teaserlist\": true,\n };\n\n return (\n <Host>\n <div class={classes}>\n {this._tagChips.length > 0 &&\n <stzh-chipselect\n hide-optional\n label-hidden\n class=\"stzh-microsite-teaserlist__filter\"\n label={this.localization.tagsLabel}\n data={this._tagChips}\n onStzhChange={this.handleChange}\n ></stzh-chipselect>\n }\n\n <stzh-cardlist layout=\"teasers\">\n {this._filteredSlicedItems.map((item) =>\n <stzh-card href={item.link}>\n {item.image &&\n <stzh-ratio slot=\"image\">\n <img src={item.image} />\n </stzh-ratio>\n }\n {item.title &&\n <div slot=\"heading\">{item.title}</div>\n }\n {/* <stzh-clamp slot=\"heading\" lines={2}>{item.title}</stzh-clamp> */}\n {item.description &&\n <div slot=\"content\">{item.description}</div>\n }\n {/* <stzh-clamp slot=\"content\" lines={3}>{item.description}</stzh-clamp> */}\n </stzh-card>\n )}\n </stzh-cardlist>\n\n {this._showMoreLink &&\n <div class=\"stzh-microsite-teaserlist__show-more\">\n <stzh-button\n variant=\"secondary\"\n label={this.localization.showMore}\n onClick={this.handleMoreClick}\n ></stzh-button>\n </div>\n }\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Colors
|
|
3
3
|
*/
|
|
4
4
|
/* Signal colors */
|
|
5
|
-
/* Old colors (TODO: cleanup
|
|
5
|
+
/* Old colors (TODO: cleanup when not needed anymore) */
|
|
6
6
|
/**
|
|
7
7
|
* Base
|
|
8
8
|
*/
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
/**
|
|
28
28
|
* Header
|
|
29
29
|
*/
|
|
30
|
+
/**
|
|
31
|
+
* Fieldset
|
|
32
|
+
*/
|
|
30
33
|
/**
|
|
31
34
|
* Progressbar
|
|
32
35
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Colors
|
|
3
3
|
*/
|
|
4
4
|
/* Signal colors */
|
|
5
|
-
/* Old colors (TODO: cleanup
|
|
5
|
+
/* Old colors (TODO: cleanup when not needed anymore) */
|
|
6
6
|
/**
|
|
7
7
|
* Base
|
|
8
8
|
*/
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
/**
|
|
28
28
|
* Header
|
|
29
29
|
*/
|
|
30
|
+
/**
|
|
31
|
+
* Fieldset
|
|
32
|
+
*/
|
|
30
33
|
/**
|
|
31
34
|
* Progressbar
|
|
32
35
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Colors
|
|
3
3
|
*/
|
|
4
4
|
/* Signal colors */
|
|
5
|
-
/* Old colors (TODO: cleanup
|
|
5
|
+
/* Old colors (TODO: cleanup when not needed anymore) */
|
|
6
6
|
/**
|
|
7
7
|
* Base
|
|
8
8
|
*/
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
/**
|
|
28
28
|
* Header
|
|
29
29
|
*/
|
|
30
|
+
/**
|
|
31
|
+
* Fieldset
|
|
32
|
+
*/
|
|
30
33
|
/**
|
|
31
34
|
* Progressbar
|
|
32
35
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Colors
|
|
3
3
|
*/
|
|
4
4
|
/* Signal colors */
|
|
5
|
-
/* Old colors (TODO: cleanup
|
|
5
|
+
/* Old colors (TODO: cleanup when not needed anymore) */
|
|
6
6
|
/**
|
|
7
7
|
* Base
|
|
8
8
|
*/
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
/**
|
|
28
28
|
* Header
|
|
29
29
|
*/
|
|
30
|
+
/**
|
|
31
|
+
* Fieldset
|
|
32
|
+
*/
|
|
30
33
|
/**
|
|
31
34
|
* Progressbar
|
|
32
35
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Colors
|
|
3
3
|
*/
|
|
4
4
|
/* Signal colors */
|
|
5
|
-
/* Old colors (TODO: cleanup
|
|
5
|
+
/* Old colors (TODO: cleanup when not needed anymore) */
|
|
6
6
|
/**
|
|
7
7
|
* Base
|
|
8
8
|
*/
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
/**
|
|
28
28
|
* Header
|
|
29
29
|
*/
|
|
30
|
+
/**
|
|
31
|
+
* Fieldset
|
|
32
|
+
*/
|
|
30
33
|
/**
|
|
31
34
|
* Progressbar
|
|
32
35
|
*/
|
|
@@ -203,7 +206,7 @@
|
|
|
203
206
|
.stzh-pagebottom__share-wrapper {
|
|
204
207
|
margin-left: -0.625rem;
|
|
205
208
|
}
|
|
206
|
-
@media screen and (min-width:
|
|
209
|
+
@media screen and (min-width: 900px) {
|
|
207
210
|
.stzh-pagebottom__share-wrapper {
|
|
208
211
|
margin-left: 0;
|
|
209
212
|
}
|