@oiz/stzh-components 2.10.0-beta → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-1c49bef9.js → app-globals-4b0a6e5e.js} +2 -2
- package/dist/cjs/{app-globals-1c49bef9.js.map → app-globals-4b0a6e5e.js.map} +1 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/stzh-accordion-item.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-badge_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-carousel.cjs.entry.js +35 -11
- package/dist/cjs/stzh-carousel.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-cell.cjs.entry.js +2 -2
- package/dist/cjs/stzh-cell.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-container.cjs.entry.js +9 -2
- package/dist/cjs/stzh-container.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-details.cjs.entry.js +1 -1
- package/dist/cjs/stzh-details.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/stzh-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-figure.cjs.entry.js +10 -3
- package/dist/cjs/stzh-figure.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-footer.cjs.entry.js +1 -1
- package/dist/cjs/stzh-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-header.cjs.entry.js +1 -1
- package/dist/cjs/stzh-header.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-panorama.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-print.cjs.entry.js +52 -0
- package/dist/cjs/stzh-print.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-ratio.cjs.entry.js +5 -1
- package/dist/cjs/stzh-ratio.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-scrollup.cjs.entry.js +52 -0
- package/dist/cjs/stzh-scrollup.cjs.entry.js.map +1 -0
- 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-skiplink.cjs.entry.js +38 -1
- package/dist/cjs/stzh-skiplink.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-vbz-carousel.cjs.entry.js +51 -0
- package/dist/cjs/stzh-vbz-carousel.cjs.entry.js.map +1 -0
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/stzh-accordion/stzh-accordion.css +3 -0
- package/dist/collection/components/stzh-accordion-item/stzh-accordion-item.css +10 -0
- package/dist/collection/components/stzh-actions/stzh-actions.css +3 -0
- package/dist/collection/components/stzh-actionset/stzh-actionset.css +3 -0
- package/dist/collection/components/stzh-amount/stzh-amount.css +3 -0
- package/dist/collection/components/stzh-anchornav/stzh-anchornav.css +3 -0
- package/dist/collection/components/stzh-appnav/stzh-appnav.css +3 -0
- package/dist/collection/components/stzh-appointments/stzh-appointments.css +3 -0
- package/dist/collection/components/stzh-audio/stzh-audio.css +3 -0
- package/dist/collection/components/stzh-badge/stzh-badge.css +3 -0
- package/dist/collection/components/stzh-button/stzh-button.css +3 -0
- package/dist/collection/components/stzh-button/stzh-button.js +1 -1
- package/dist/collection/components/stzh-button/stzh-button.js.map +1 -1
- package/dist/collection/components/stzh-buttongroup/stzh-buttongroup.css +3 -0
- package/dist/collection/components/stzh-calendar/stzh-calendar.css +3 -0
- package/dist/collection/components/stzh-card/stzh-card.css +3 -0
- package/dist/collection/components/stzh-card-list/stzh-card-list.css +3 -0
- package/dist/collection/components/stzh-carousel/stzh-carousel.css +37 -24
- package/dist/collection/components/stzh-carousel/stzh-carousel.js +148 -12
- package/dist/collection/components/stzh-carousel/stzh-carousel.js.map +1 -1
- package/dist/collection/components/stzh-carousel/stzh-carousel.stories.js +50 -50
- package/dist/collection/components/stzh-cell/stzh-cell.css +11 -19
- package/dist/collection/components/stzh-cell/stzh-cell.js +8 -14
- package/dist/collection/components/stzh-cell/stzh-cell.js.map +1 -1
- package/dist/collection/components/stzh-chart/stzh-chart.css +3 -0
- package/dist/collection/components/stzh-checkbox/stzh-checkbox.css +3 -0
- package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.css +3 -0
- package/dist/collection/components/stzh-chip/stzh-chip.css +3 -0
- package/dist/collection/components/stzh-chip-select/stzh-chip-select.css +3 -0
- package/dist/collection/components/stzh-clamp/stzh-clamp.css +3 -0
- package/dist/collection/components/stzh-contact/stzh-contact.css +3 -0
- package/dist/collection/components/stzh-container/stzh-container.css +22 -5
- package/dist/collection/components/stzh-container/stzh-container.js +51 -2
- package/dist/collection/components/stzh-container/stzh-container.js.map +1 -1
- package/dist/collection/components/stzh-cspace/stzh-cspace.css +1271 -9
- package/dist/collection/components/stzh-datalist/stzh-datalist.css +3 -0
- package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.css +3 -0
- package/dist/collection/components/stzh-datamessagelist/stzh-datamessagelist.css +3 -0
- package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.css +3 -0
- package/dist/collection/components/stzh-datatable/stzh-datatable.css +3 -0
- package/dist/collection/components/stzh-datepicker/stzh-datepicker.css +3 -0
- package/dist/collection/components/stzh-details/stzh-details.css +10 -0
- package/dist/collection/components/stzh-dialog/stzh-dialog.css +3 -0
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.css +6 -0
- package/dist/collection/components/stzh-fieldset/stzh-fieldset.css +3 -0
- package/dist/collection/components/stzh-figure/stzh-figure.css +18 -6
- package/dist/collection/components/stzh-figure/stzh-figure.js +47 -2
- package/dist/collection/components/stzh-figure/stzh-figure.js.map +1 -1
- package/dist/collection/components/stzh-figure/stzh-figure.stories.js +10 -0
- package/dist/collection/components/stzh-flyingfocus/stzh-flyingfocus.css +3 -0
- package/dist/collection/components/stzh-footer/stzh-footer.css +13 -5
- package/dist/collection/components/stzh-ghettobox/stzh-ghettobox.css +3 -0
- package/dist/collection/components/stzh-header/stzh-header.css +33 -15
- package/dist/collection/components/stzh-header/stzh-header.stories.js +7 -7
- package/dist/collection/components/stzh-heading/stzh-heading.css +3 -0
- package/dist/collection/components/stzh-hr/stzh-hr.css +3 -0
- package/dist/collection/components/stzh-hspace/stzh-hspace.css +3 -0
- package/dist/collection/components/stzh-icon/stzh-icon.css +3 -0
- package/dist/collection/components/stzh-icon-sprite/stzh-icon-sprite.css +3 -0
- package/dist/collection/components/stzh-iframe/stzh-iframe.css +3 -0
- package/dist/collection/components/stzh-input/stzh-input.css +3 -0
- package/dist/collection/components/stzh-invert/stzh-invert.css +3 -0
- package/dist/collection/components/stzh-langnav/stzh-langnav.css +3 -0
- package/dist/collection/components/stzh-link/stzh-link.css +3 -0
- package/dist/collection/components/stzh-list/stzh-list.css +3 -0
- package/dist/collection/components/stzh-list-item/stzh-list-item.css +3 -0
- package/dist/collection/components/stzh-loader/stzh-loader.css +3 -0
- package/dist/collection/components/stzh-loadingbar/stzh-loadingbar.css +3 -0
- package/dist/collection/components/stzh-menu/stzh-menu.css +3 -0
- package/dist/collection/components/stzh-menu-item/stzh-menu-item.css +3 -0
- package/dist/collection/components/stzh-message/stzh-message.css +3 -0
- package/dist/collection/components/stzh-metanav/stzh-metanav.css +3 -0
- package/dist/collection/components/stzh-microsite-teaserlist/stzh-microsite-teaserlist.css +3 -0
- package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.css +3 -0
- package/dist/collection/components/stzh-olmap/stzh-olmap.css +3 -0
- package/dist/collection/components/stzh-overlay/stzh-overlay.css +3 -0
- package/dist/collection/components/stzh-page-skiplinks/stzh-page-skiplinks.css +3 -0
- package/dist/collection/components/stzh-page-skiplinks/stzh-page-skiplinks.stories.js +2 -2
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.css +3 -0
- package/dist/collection/components/stzh-pagetitle/stzh-pagetitle.css +3 -0
- package/dist/collection/components/stzh-pagetitle-hero/stzh-pagetitle-hero.css +3 -0
- package/dist/collection/components/stzh-pagination/stzh-pagination.css +3 -0
- package/dist/collection/components/stzh-panorama/stzh-panorama.css +3 -0
- package/dist/collection/components/stzh-popover/stzh-popover.css +3 -0
- package/dist/collection/components/stzh-print/stzh-print.css +127 -0
- package/dist/collection/components/stzh-print/stzh-print.js +53 -0
- package/dist/collection/components/stzh-print/stzh-print.js.map +1 -0
- package/dist/collection/components/stzh-print/stzh-print.stories.js +43 -0
- package/dist/collection/components/stzh-progressbar/stzh-progressbar.css +3 -0
- package/dist/collection/components/stzh-progressbar-item/stzh-progressbar-item.css +3 -0
- package/dist/collection/components/stzh-radio/stzh-radio.css +3 -0
- package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.css +3 -0
- package/dist/collection/components/stzh-ratio/stzh-ratio.css +457 -21
- package/dist/collection/components/stzh-ratio/stzh-ratio.js +110 -4
- package/dist/collection/components/stzh-ratio/stzh-ratio.js.map +1 -1
- package/dist/collection/components/stzh-readspeaker/stzh-readspeaker.css +3 -0
- package/dist/collection/components/stzh-richtext/stzh-richtext.css +3 -0
- package/dist/collection/components/stzh-row/stzh-row.css +3 -0
- package/dist/collection/components/stzh-saptcha/stzh-saptcha.css +3 -0
- package/dist/collection/components/stzh-scrollup/stzh-scrollup.css +127 -0
- package/dist/collection/components/stzh-scrollup/stzh-scrollup.js +53 -0
- package/dist/collection/components/stzh-scrollup/stzh-scrollup.js.map +1 -0
- package/dist/collection/components/stzh-scrollup/stzh-scrollup.stories.js +99 -0
- package/dist/collection/components/stzh-section/stzh-section.css +3 -0
- package/dist/collection/components/stzh-share/stzh-share.css +3 -0
- package/dist/collection/components/stzh-show/stzh-show.css +3 -0
- package/dist/collection/components/stzh-sitemap/stzh-sitemap.css +3 -0
- package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.css +25 -0
- package/dist/collection/components/stzh-skin-storybook-preview/stzh-skin-storybook-preview.css +3 -0
- package/dist/collection/components/stzh-skiplink/stzh-skiplink.css +3 -0
- package/dist/collection/components/stzh-skiplink/stzh-skiplink.js +81 -1
- package/dist/collection/components/stzh-skiplink/stzh-skiplink.js.map +1 -1
- package/dist/collection/components/stzh-skiplink/stzh-skiplink.stories.js +1 -1
- package/dist/collection/components/stzh-sortable/stzh-sortable.css +3 -0
- package/dist/collection/components/stzh-space/stzh-space.css +3 -0
- package/dist/collection/components/stzh-status/stzh-status.css +3 -0
- package/dist/collection/components/stzh-sticky/stzh-sticky.css +3 -0
- package/dist/collection/components/stzh-table/stzh-table.css +3 -0
- package/dist/collection/components/stzh-text/stzh-text.css +3 -0
- package/dist/collection/components/stzh-textandimage/stzh-textandimage.css +3 -0
- package/dist/collection/components/stzh-timeline/stzh-timeline.css +3 -0
- package/dist/collection/components/stzh-timeline-item/stzh-timeline-item.css +3 -0
- package/dist/collection/components/stzh-timepicker/stzh-timepicker.css +3 -0
- package/dist/collection/components/stzh-toast/stzh-toast.css +3 -0
- package/dist/collection/components/stzh-toastbar/stzh-toastbar.css +3 -0
- package/dist/collection/components/stzh-toggle/stzh-toggle.css +3 -0
- package/dist/collection/components/stzh-tooltip/stzh-tooltip.css +3 -0
- package/dist/collection/components/stzh-upload/stzh-upload.css +3 -0
- package/dist/collection/components/stzh-vbz-carousel/stzh-vbz-carousel.css +142 -0
- package/dist/collection/components/stzh-vbz-carousel/stzh-vbz-carousel.js +76 -0
- package/dist/collection/components/stzh-vbz-carousel/stzh-vbz-carousel.js.map +1 -0
- package/dist/collection/components/stzh-vbz-carousel/stzh-vbz-carousel.stories.js +52 -0
- package/dist/collection/components/stzh-vbz-linechip/stzh-vbz-linechip.css +3 -0
- package/dist/collection/components/stzh-vbz-majorticker/stzh-vbz-majorticker.css +3 -0
- package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.css +3 -0
- package/dist/collection/components/stzh-visuallyhidden/stzh-visuallyhidden.css +3 -0
- package/dist/collection/components/stzh-vspace/stzh-vspace.css +3 -0
- package/dist/collection/components/stzh-youtube/stzh-youtube.css +3 -0
- 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-accordion-item.js +1 -1
- package/dist/components/stzh-accordion-item.js.map +1 -1
- package/dist/components/stzh-button2.js.map +1 -1
- package/dist/components/stzh-carousel.js +1 -579
- package/dist/components/stzh-carousel.js.map +1 -1
- package/dist/components/stzh-carousel2.js +615 -0
- package/dist/components/stzh-carousel2.js.map +1 -0
- package/dist/components/stzh-cell.js +3 -3
- package/dist/components/stzh-cell.js.map +1 -1
- package/dist/components/stzh-container.js +13 -3
- package/dist/components/stzh-container.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-details.js +1 -1
- package/dist/components/stzh-details.js.map +1 -1
- package/dist/components/stzh-dropdown2.js +1 -1
- package/dist/components/stzh-dropdown2.js.map +1 -1
- package/dist/components/stzh-figure2.js +12 -3
- package/dist/components/stzh-figure2.js.map +1 -1
- package/dist/components/stzh-footer.js +1 -1
- package/dist/components/stzh-footer.js.map +1 -1
- package/dist/components/stzh-header.js +1 -1
- package/dist/components/stzh-header.js.map +1 -1
- package/dist/components/stzh-panorama.js.map +1 -1
- package/dist/components/stzh-print.d.ts +11 -0
- package/dist/components/stzh-print.js +64 -0
- package/dist/components/stzh-print.js.map +1 -0
- package/dist/components/stzh-ratio2.js +10 -2
- package/dist/components/stzh-ratio2.js.map +1 -1
- package/dist/components/stzh-scrollup.d.ts +11 -0
- package/dist/components/stzh-scrollup.js +64 -0
- package/dist/components/stzh-scrollup.js.map +1 -0
- 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-skiplink.js +39 -2
- package/dist/components/stzh-skiplink.js.map +1 -1
- package/dist/components/stzh-vbz-carousel.d.ts +11 -0
- package/dist/components/stzh-vbz-carousel.js +72 -0
- package/dist/components/stzh-vbz-carousel.js.map +1 -0
- package/dist/esm/{app-globals-503e5649.js → app-globals-fecef0e2.js} +2 -2
- package/dist/esm/{app-globals-503e5649.js.map → app-globals-fecef0e2.js.map} +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-accordion-item.entry.js +1 -1
- package/dist/esm/stzh-accordion-item.entry.js.map +1 -1
- package/dist/esm/stzh-badge_3.entry.js.map +1 -1
- package/dist/esm/stzh-carousel.entry.js +35 -11
- package/dist/esm/stzh-carousel.entry.js.map +1 -1
- package/dist/esm/stzh-cell.entry.js +2 -2
- package/dist/esm/stzh-cell.entry.js.map +1 -1
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-container.entry.js +9 -2
- package/dist/esm/stzh-container.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-details.entry.js +1 -1
- package/dist/esm/stzh-details.entry.js.map +1 -1
- package/dist/esm/stzh-dropdown.entry.js +1 -1
- package/dist/esm/stzh-dropdown.entry.js.map +1 -1
- package/dist/esm/stzh-figure.entry.js +10 -3
- package/dist/esm/stzh-figure.entry.js.map +1 -1
- package/dist/esm/stzh-footer.entry.js +1 -1
- package/dist/esm/stzh-footer.entry.js.map +1 -1
- package/dist/esm/stzh-header.entry.js +1 -1
- package/dist/esm/stzh-header.entry.js.map +1 -1
- package/dist/esm/stzh-panorama.entry.js.map +1 -1
- package/dist/esm/stzh-print.entry.js +48 -0
- package/dist/esm/stzh-print.entry.js.map +1 -0
- package/dist/esm/stzh-ratio.entry.js +5 -1
- package/dist/esm/stzh-ratio.entry.js.map +1 -1
- package/dist/esm/stzh-scrollup.entry.js +48 -0
- package/dist/esm/stzh-scrollup.entry.js.map +1 -0
- 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-skiplink.entry.js +39 -2
- package/dist/esm/stzh-skiplink.entry.js.map +1 -1
- package/dist/esm/stzh-vbz-carousel.entry.js +47 -0
- package/dist/esm/stzh-vbz-carousel.entry.js.map +1 -0
- package/dist/esm-es5/{app-globals-503e5649.js → app-globals-fecef0e2.js} +2 -2
- package/dist/esm-es5/{app-globals-503e5649.js.map → app-globals-fecef0e2.js.map} +1 -1
- package/dist/esm-es5/index.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/stzh-accordion-item.entry.js +1 -1
- package/dist/esm-es5/stzh-accordion-item.entry.js.map +1 -1
- package/dist/esm-es5/stzh-badge_3.entry.js.map +1 -1
- package/dist/esm-es5/stzh-carousel.entry.js +1 -1
- package/dist/esm-es5/stzh-carousel.entry.js.map +1 -1
- package/dist/esm-es5/stzh-cell.entry.js +1 -1
- package/dist/esm-es5/stzh-cell.entry.js.map +1 -1
- package/dist/esm-es5/stzh-components.js +1 -1
- package/dist/esm-es5/stzh-components.js.map +1 -1
- package/dist/esm-es5/stzh-container.entry.js +1 -1
- package/dist/esm-es5/stzh-container.entry.js.map +1 -1
- package/dist/esm-es5/stzh-cspace.entry.js +1 -1
- package/dist/esm-es5/stzh-cspace.entry.js.map +1 -1
- package/dist/esm-es5/stzh-details.entry.js +1 -1
- package/dist/esm-es5/stzh-details.entry.js.map +1 -1
- package/dist/esm-es5/stzh-dropdown.entry.js +1 -1
- package/dist/esm-es5/stzh-dropdown.entry.js.map +1 -1
- package/dist/esm-es5/stzh-figure.entry.js +1 -1
- package/dist/esm-es5/stzh-figure.entry.js.map +1 -1
- package/dist/esm-es5/stzh-footer.entry.js +1 -1
- package/dist/esm-es5/stzh-footer.entry.js.map +1 -1
- package/dist/esm-es5/stzh-header.entry.js +1 -1
- package/dist/esm-es5/stzh-header.entry.js.map +1 -1
- package/dist/esm-es5/stzh-panorama.entry.js.map +1 -1
- package/dist/esm-es5/stzh-print.entry.js +2 -0
- package/dist/esm-es5/stzh-print.entry.js.map +1 -0
- package/dist/esm-es5/stzh-ratio.entry.js +1 -1
- package/dist/esm-es5/stzh-ratio.entry.js.map +1 -1
- package/dist/esm-es5/stzh-scrollup.entry.js +2 -0
- package/dist/esm-es5/stzh-scrollup.entry.js.map +1 -0
- package/dist/esm-es5/stzh-skin-portal-mitwirken.entry.js +1 -1
- package/dist/esm-es5/stzh-skin-portal-mitwirken.entry.js.map +1 -1
- package/dist/esm-es5/stzh-skiplink.entry.js +1 -1
- package/dist/esm-es5/stzh-skiplink.entry.js.map +1 -1
- package/dist/esm-es5/stzh-vbz-carousel.entry.js +2 -0
- package/dist/esm-es5/stzh-vbz-carousel.entry.js.map +1 -0
- package/dist/stzh-components/index.esm.js.map +1 -1
- package/dist/stzh-components/p-0bb08043.system.js.map +1 -1
- package/dist/stzh-components/{p-42d27a5d.system.entry.js → p-0d654519.system.entry.js} +2 -2
- package/dist/stzh-components/{p-42d27a5d.system.entry.js.map → p-0d654519.system.entry.js.map} +1 -1
- package/dist/stzh-components/p-0dcbb483.system.entry.js.map +1 -1
- package/dist/stzh-components/p-0f3f22c8.entry.js +2 -0
- package/dist/stzh-components/p-0f3f22c8.entry.js.map +1 -0
- package/dist/stzh-components/p-25bfad8b.entry.js +2 -0
- package/dist/stzh-components/p-25bfad8b.entry.js.map +1 -0
- package/dist/stzh-components/p-28ae4569.entry.js +2 -0
- package/dist/stzh-components/p-28ae4569.entry.js.map +1 -0
- package/dist/stzh-components/p-35de63a8.entry.js +2 -0
- package/dist/stzh-components/p-35de63a8.entry.js.map +1 -0
- package/dist/stzh-components/p-37fc4785.system.entry.js +2 -0
- package/dist/stzh-components/p-37fc4785.system.entry.js.map +1 -0
- package/dist/stzh-components/{p-6b86b394.entry.js → p-390c4a4b.entry.js} +4 -4
- package/dist/stzh-components/{p-6b86b394.entry.js.map → p-390c4a4b.entry.js.map} +1 -1
- package/dist/stzh-components/p-491ae21b.entry.js.map +1 -1
- package/dist/stzh-components/p-4b7f4e66.entry.js +2 -0
- package/dist/stzh-components/p-4b7f4e66.entry.js.map +1 -0
- package/dist/stzh-components/p-4d975c00.entry.js +2 -0
- package/dist/stzh-components/{p-18402a84.entry.js.map → p-4d975c00.entry.js.map} +1 -1
- package/dist/stzh-components/p-531fd43a.entry.js +2 -0
- package/dist/stzh-components/p-531fd43a.entry.js.map +1 -0
- package/dist/stzh-components/p-5f1338aa.system.entry.js.map +1 -1
- package/dist/stzh-components/p-64217de4.system.entry.js +2 -0
- package/dist/stzh-components/p-64217de4.system.entry.js.map +1 -0
- package/dist/stzh-components/p-6858fb1c.entry.js +2 -0
- package/dist/stzh-components/p-6858fb1c.entry.js.map +1 -0
- package/dist/stzh-components/p-6c9e992d.entry.js +2 -0
- package/dist/stzh-components/p-6c9e992d.entry.js.map +1 -0
- package/dist/stzh-components/p-70680746.entry.js +2 -0
- package/dist/stzh-components/p-70680746.entry.js.map +1 -0
- package/dist/stzh-components/p-81aee661.system.entry.js +2 -0
- package/dist/stzh-components/{p-1d8dbb06.system.entry.js.map → p-81aee661.system.entry.js.map} +1 -1
- package/dist/stzh-components/p-83e30e85.system.entry.js +2 -0
- package/dist/stzh-components/p-83e30e85.system.entry.js.map +1 -0
- package/dist/stzh-components/p-844a2406.system.entry.js +2 -0
- package/dist/stzh-components/p-844a2406.system.entry.js.map +1 -0
- package/dist/stzh-components/p-8c26e8c9.entry.js +2 -0
- package/dist/stzh-components/{p-a8f684d4.entry.js.map → p-8c26e8c9.entry.js.map} +1 -1
- package/dist/stzh-components/p-8f9dc890.system.entry.js +2 -0
- package/dist/stzh-components/p-8f9dc890.system.entry.js.map +1 -0
- package/dist/stzh-components/p-9790b917.entry.js +2 -0
- package/dist/stzh-components/p-9790b917.entry.js.map +1 -0
- package/dist/stzh-components/p-a2a68a9d.system.entry.js +2 -0
- package/dist/stzh-components/p-a2a68a9d.system.entry.js.map +1 -0
- package/dist/stzh-components/p-b1d5d2df.system.entry.js +2 -0
- package/dist/stzh-components/p-b1d5d2df.system.entry.js.map +1 -0
- package/dist/stzh-components/p-be975e7b.system.js +2 -0
- package/dist/stzh-components/{p-5fce4cad.system.js.map → p-be975e7b.system.js.map} +1 -1
- package/dist/stzh-components/{p-a12b9320.entry.js → p-bf106d8e.entry.js} +2 -2
- package/dist/stzh-components/p-bf106d8e.entry.js.map +1 -0
- package/dist/stzh-components/p-c6e46a21.entry.js.map +1 -1
- package/dist/stzh-components/{p-902b3880.system.js → p-cce9517f.system.js} +2 -2
- package/dist/stzh-components/{p-902b3880.system.js.map → p-cce9517f.system.js.map} +1 -1
- package/dist/stzh-components/p-ce501c33.system.entry.js +2 -0
- package/dist/stzh-components/p-ce501c33.system.entry.js.map +1 -0
- package/dist/stzh-components/{p-8a9c656a.system.entry.js → p-d58e8330.system.entry.js} +2 -2
- package/dist/stzh-components/p-d58e8330.system.entry.js.map +1 -0
- package/dist/stzh-components/p-dfda6333.system.entry.js +2 -0
- package/dist/stzh-components/p-dfda6333.system.entry.js.map +1 -0
- package/dist/stzh-components/p-e03a82e6.system.entry.js +2 -0
- package/dist/stzh-components/{p-ff1cfbee.system.entry.js.map → p-e03a82e6.system.entry.js.map} +1 -1
- package/dist/stzh-components/p-e922df8b.system.entry.js +2 -0
- package/dist/stzh-components/{p-4b5bc7a0.system.entry.js.map → p-e922df8b.system.entry.js.map} +1 -1
- package/dist/stzh-components/p-ec8651cb.entry.js +2 -0
- package/dist/stzh-components/{p-346b8599.entry.js.map → p-ec8651cb.entry.js.map} +1 -1
- package/dist/stzh-components/{p-e11c28a1.js → p-ed41f495.js} +2 -2
- package/dist/stzh-components/{p-e11c28a1.js.map → p-ed41f495.js.map} +1 -1
- package/dist/stzh-components/p-ee8c7dc4.system.entry.js +2 -0
- package/dist/stzh-components/p-ee8c7dc4.system.entry.js.map +1 -0
- package/dist/stzh-components/p-f3ab9795.system.entry.js +2 -0
- package/dist/stzh-components/p-f3ab9795.system.entry.js.map +1 -0
- package/dist/stzh-components/p-fe31269f.entry.js +2 -0
- package/dist/stzh-components/p-fe31269f.entry.js.map +1 -0
- package/dist/stzh-components/stzh-components.css +22 -0
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/stzh-components/stzh-components.esm.js.map +1 -1
- package/dist/stzh-components/stzh-components.js +1 -1
- package/dist/types/components/stzh-cell/stzh-cell.d.ts +2 -2
- package/dist/types/components/stzh-container/stzh-container.d.ts +4 -0
- package/dist/types/components.d.ts +186 -15
- package/dist/types/index.d.ts +10 -1
- package/dist/vscode-data.json +213 -24
- package/package.json +1 -1
- package/dist/stzh-components/p-061ede8b.entry.js +0 -2
- package/dist/stzh-components/p-061ede8b.entry.js.map +0 -1
- package/dist/stzh-components/p-086e9523.system.entry.js +0 -2
- package/dist/stzh-components/p-086e9523.system.entry.js.map +0 -1
- package/dist/stzh-components/p-18402a84.entry.js +0 -2
- package/dist/stzh-components/p-1ae561a5.system.entry.js +0 -2
- package/dist/stzh-components/p-1ae561a5.system.entry.js.map +0 -1
- package/dist/stzh-components/p-1c930dc5.entry.js +0 -2
- package/dist/stzh-components/p-1c930dc5.entry.js.map +0 -1
- package/dist/stzh-components/p-1d8dbb06.system.entry.js +0 -2
- package/dist/stzh-components/p-1edbef4a.system.entry.js +0 -2
- package/dist/stzh-components/p-1edbef4a.system.entry.js.map +0 -1
- package/dist/stzh-components/p-2eb74ed1.entry.js +0 -2
- package/dist/stzh-components/p-2eb74ed1.entry.js.map +0 -1
- package/dist/stzh-components/p-2f205fad.entry.js +0 -2
- package/dist/stzh-components/p-2f205fad.entry.js.map +0 -1
- package/dist/stzh-components/p-32773a2c.system.entry.js +0 -2
- package/dist/stzh-components/p-32773a2c.system.entry.js.map +0 -1
- package/dist/stzh-components/p-346b8599.entry.js +0 -2
- package/dist/stzh-components/p-3d3d09c3.entry.js +0 -2
- package/dist/stzh-components/p-3d3d09c3.entry.js.map +0 -1
- package/dist/stzh-components/p-4b5bc7a0.system.entry.js +0 -2
- package/dist/stzh-components/p-5fce4cad.system.js +0 -2
- package/dist/stzh-components/p-6966188f.system.entry.js +0 -2
- package/dist/stzh-components/p-6966188f.system.entry.js.map +0 -1
- package/dist/stzh-components/p-8a9c656a.system.entry.js.map +0 -1
- package/dist/stzh-components/p-95a50796.entry.js +0 -2
- package/dist/stzh-components/p-95a50796.entry.js.map +0 -1
- package/dist/stzh-components/p-a12b9320.entry.js.map +0 -1
- package/dist/stzh-components/p-a8f684d4.entry.js +0 -2
- package/dist/stzh-components/p-b98bc5c1.entry.js +0 -2
- package/dist/stzh-components/p-b98bc5c1.entry.js.map +0 -1
- package/dist/stzh-components/p-bb5b861d.system.entry.js +0 -2
- package/dist/stzh-components/p-bb5b861d.system.entry.js.map +0 -1
- package/dist/stzh-components/p-c4c8b232.system.entry.js +0 -2
- package/dist/stzh-components/p-c4c8b232.system.entry.js.map +0 -1
- package/dist/stzh-components/p-d3f4ad11.system.entry.js +0 -2
- package/dist/stzh-components/p-d3f4ad11.system.entry.js.map +0 -1
- package/dist/stzh-components/p-e0e7105e.entry.js +0 -2
- package/dist/stzh-components/p-e0e7105e.entry.js.map +0 -1
- package/dist/stzh-components/p-ff1cfbee.system.entry.js +0 -2
- package/dist/types/components/stzh-skiplink/stzh-skiplink.d.ts +0 -27
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as registerInstance,h,a as Host,g as getElement}from"./index-bfb5b569.js";import{h as hasSlot}from"./utils-107fad0f.js";import"./string-utils-e252977e.js";var stzhFigureCss=".sc-stzh-figure-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-figure-h{display:none}.sc-stzh-figure-h *.sc-stzh-figure,.sc-stzh-figure-h *.sc-stzh-figure::before,.sc-stzh-figure-h *.sc-stzh-figure::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-figure-h .has-focus.sc-stzh-figure{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-figure-h .stzh-fylingfocus-focused.sc-stzh-figure{outline-style:none !important}.sc-stzh-figure-h .stzh-fylingfocus-focused.sc-stzh-figure::-moz-focus-inner{border:0 !important}.sc-stzh-figure-h .sc-stzh-figure-s>*{max-width:100%}.sc-stzh-figure-h[fullwidth]:not([fullwidth=false]) .sc-stzh-figure-s>*{width:100%}.stzh-figure.sc-stzh-figure{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:0}.stzh-figure__element.sc-stzh-figure{display:-ms-flexbox;display:flex}.stzh-figure__caption.sc-stzh-figure{font-size:var(--stzh-font-curve-caption-default-font-size, var(--stzh-font-nano-font-size));line-height:var(--stzh-font-curve-caption-default-text-line-height, var(--stzh-font-nano-text-line-height))}@media screen and (min-width: 1024px){.stzh-figure__caption.sc-stzh-figure{font-size:var(--stzh-font-curve-caption-medium-font-size, var(--stzh-font-micro-font-size));line-height:var(--stzh-font-curve-caption-medium-text-line-height, var(--stzh-font-micro-text-line-height))}}.stzh-figure__copyright.sc-stzh-figure{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:normal;font-size:var(--stzh-font-femto-font-size);line-height:var(--stzh-font-femto-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing)}.stzh-
|
|
1
|
+
import{r as registerInstance,h,a as Host,g as getElement}from"./index-bfb5b569.js";import{h as hasSlot}from"./utils-107fad0f.js";import"./string-utils-e252977e.js";var stzhFigureCss=".sc-stzh-figure-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-figure-h{display:none}.sc-stzh-figure-h *.sc-stzh-figure,.sc-stzh-figure-h *.sc-stzh-figure::before,.sc-stzh-figure-h *.sc-stzh-figure::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-figure-h .has-focus.sc-stzh-figure{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-figure-h .stzh-fylingfocus-focused.sc-stzh-figure{outline-style:none !important}.sc-stzh-figure-h .stzh-fylingfocus-focused.sc-stzh-figure::-moz-focus-inner{border:0 !important}.sc-stzh-figure-h .sc-stzh-figure-s>*{max-width:100%}.sc-stzh-figure-h[fullwidth]:not([fullwidth=false]) .sc-stzh-figure-s>*{width:100%}.stzh-figure.sc-stzh-figure{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:0}.stzh-figure__element.sc-stzh-figure{display:-ms-flexbox;display:flex}.stzh-figure__caption-wrapper.sc-stzh-figure{font-size:var(--stzh-font-curve-caption-default-font-size, var(--stzh-font-nano-font-size));line-height:var(--stzh-font-curve-caption-default-text-line-height, var(--stzh-font-nano-text-line-height));display:-ms-flexbox;display:flex}@media screen and (min-width: 1024px){.stzh-figure__caption-wrapper.sc-stzh-figure{font-size:var(--stzh-font-curve-caption-medium-font-size, var(--stzh-font-micro-font-size));line-height:var(--stzh-font-curve-caption-medium-text-line-height, var(--stzh-font-micro-text-line-height))}}.stzh-figure__counter.sc-stzh-figure:not(:empty){margin-right:var(--stzh-space-xsmall)}.stzh-figure__counter.sc-stzh-figure,.stzh-figure__heading.sc-stzh-figure{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:normal}.stzh-figure__caption-text.sc-stzh-figure:not(:empty)+.stzh-figure__copyright.sc-stzh-figure:not(:empty){margin-left:var(--stzh-space-xxsmall)}.stzh-figure__copyright.sc-stzh-figure{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:normal;font-size:var(--stzh-font-femto-font-size);line-height:var(--stzh-font-femto-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing)}.stzh-figure--has-caption.sc-stzh-figure .stzh-figure__caption-wrapper.sc-stzh-figure{margin-top:var(--stzh-space-small)}";var StzhFigure=function(){function t(t){registerInstance(this,t);this.caption="";this.copyright="";this.counter="";this.heading="";this.fullwidth=true}t.prototype.render=function(){var t=hasSlot(this.element,"caption");var e=hasSlot(this.element,"copyright");var s=hasSlot(this.element,"counter");var i=hasSlot(this.element,"heading");var r={"stzh-figure":true,"stzh-figure--has-caption":!!this.caption||t||!!this.copyright||e||!!this.counter||s||!!this.heading||i};return h(Host,null,h("figure",{class:r},h("div",{class:"stzh-figure__element"},h("slot",null)),h("figcaption",{class:"stzh-figure__caption-wrapper"},h("div",{class:"stzh-figure__counter"},this.counter?this.counter:h("slot",{name:"counter"})),h("div",{class:"stzh-figure__text"},h("div",{class:"stzh-figure__heading"},this.heading?this.heading:h("slot",{name:"heading"})),h("div",{class:"stzh-figure__caption"},h("span",{class:"stzh-figure__caption-text"},this.caption?this.caption:h("slot",{name:"caption"})),h("span",{class:"stzh-figure__copyright"},this.copyright?this.copyright:h("slot",{name:"copyright"})))))))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();StzhFigure.style=stzhFigureCss;export{StzhFigure as stzh_figure};
|
|
2
2
|
//# sourceMappingURL=stzh-figure.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["stzhFigureCss","StzhFigure","prototype","render","captionSlotUsed","hasSlot","this","element","copyrightSlotUsed","classes","caption","copyright","h","Host","class","name"],"sources":["src/components/stzh-figure/stzh-figure.scss?tag=stzh-figure&encapsulation=scoped","src/components/stzh-figure/stzh-figure.tsx"],"sourcesContent":[":host {\n ::slotted(*) {\n max-width: 100%;\n }\n}\n\n:host([fullwidth]:not([fullwidth=\"false\"])) ::slotted(*) {\n width: 100%;\n}\n\n.stzh-figure {\n display: flex;\n flex-direction: column;\n margin: 0;\n\n &__element {\n display: flex;\n }\n\n &__caption {\n @include fontCurve('caption');\n }\n\n &
|
|
1
|
+
{"version":3,"names":["stzhFigureCss","StzhFigure","prototype","render","captionSlotUsed","hasSlot","this","element","copyrightSlotUsed","counterSlotUsed","headingSlotUsed","classes","caption","copyright","counter","heading","h","Host","class","name"],"sources":["src/components/stzh-figure/stzh-figure.scss?tag=stzh-figure&encapsulation=scoped","src/components/stzh-figure/stzh-figure.tsx"],"sourcesContent":[":host {\n ::slotted(*) {\n max-width: 100%;\n }\n}\n\n:host([fullwidth]:not([fullwidth=\"false\"])) ::slotted(*) {\n width: 100%;\n}\n\n.stzh-figure {\n display: flex;\n flex-direction: column;\n margin: 0;\n\n &__element {\n display: flex;\n }\n\n &__caption-wrapper {\n @include fontCurve('caption');\n display: flex;\n }\n\n &__counter {\n &:not(:empty) {\n margin-right: space('xsmall');\n }\n }\n\n &__counter,\n &__heading {\n @include font('heavy');\n }\n\n &__caption-text:not(:empty) + &__copyright:not(:empty) {\n margin-left: space('xxsmall');\n }\n\n &__copyright {\n @include font('medium');\n @include fontSize('femto');\n }\n\n /* Has caption content */\n\n &--has-caption &__caption-wrapper {\n margin-top: space('small');\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n} from \"@stencil/core\";\n\nimport { hasSlot } from \"../../utils/utils\";\n\n/**\n * @slot - Slot for e.g. image or video\n * @slot caption - Slot for a caption as alternative for attribute\n * @slot copyright - Slot for a copyright as alternative for attribute\n * @slot counter - Slot for a counter as alternative for attribute\n * @slot heading - Slot for a heading as alternative for attribute\n */\n@Component({\n tag: \"stzh-figure\",\n styleUrl: \"stzh-figure.scss\",\n scoped: true\n})\nexport class StzhFigure {\n /** Caption */\n @Prop() caption: string = \"\";\n\n /** Copyright */\n @Prop() copyright: string = \"\";\n\n /** Counter */\n @Prop() counter: string = \"\";\n\n /** Heading */\n @Prop() heading: string = \"\";\n\n /** Whether to stretch slotted content to fullwidth */\n @Prop({ reflect: true }) fullwidth: boolean = true;\n\n @Element() element: HTMLStzhFigureElement;\n\n render() {\n const captionSlotUsed = hasSlot(this.element, 'caption');\n const copyrightSlotUsed = hasSlot(this.element, 'copyright');\n const counterSlotUsed = hasSlot(this.element, 'counter');\n const headingSlotUsed = hasSlot(this.element, 'heading');\n\n const classes = {\n \"stzh-figure\": true,\n \"stzh-figure--has-caption\":\n !!this.caption || captionSlotUsed\n || !!this.copyright || copyrightSlotUsed\n || !!this.counter || counterSlotUsed\n || !!this.heading || headingSlotUsed\n };\n\n return (\n <Host>\n <figure class={classes}>\n <div class=\"stzh-figure__element\">\n <slot></slot>\n </div>\n <figcaption class=\"stzh-figure__caption-wrapper\">\n <div class=\"stzh-figure__counter\">\n {this.counter ? this.counter : <slot name=\"counter\"></slot>}\n </div>\n <div class=\"stzh-figure__text\">\n <div class=\"stzh-figure__heading\">\n {this.heading ? this.heading : <slot name=\"heading\"></slot>}\n </div>\n <div class=\"stzh-figure__caption\">\n <span class=\"stzh-figure__caption-text\">\n {this.caption ? this.caption : <slot name=\"caption\"></slot>}\n </span>\n <span class=\"stzh-figure__copyright\">\n {this.copyright ? this.copyright : <slot name=\"copyright\"></slot>}\n </span>\n </div>\n </div>\n </figcaption>\n </figure>\n </Host>\n );\n }\n}\n"],"mappings":"oKAAA,IAAMA,cAAgB,shF,ICsBTC,WAAU,W,oDAEK,G,eAGE,G,aAGF,G,aAGA,G,eAGoB,I,CAI9CA,EAAAC,UAAAC,OAAA,WACE,IAAMC,EAAkBC,QAAQC,KAAKC,QAAS,WAC9C,IAAMC,EAAoBH,QAAQC,KAAKC,QAAS,aAChD,IAAME,EAAkBJ,QAAQC,KAAKC,QAAS,WAC9C,IAAMG,EAAkBL,QAAQC,KAAKC,QAAS,WAE9C,IAAMI,EAAU,CACd,cAAe,KACf,6BACIL,KAAKM,SAAWR,KACbE,KAAKO,WAAaL,KAClBF,KAAKQ,SAAWL,KAChBH,KAAKS,SAAWL,GAGzB,OACEM,EAACC,KAAI,KACHD,EAAA,UAAQE,MAAOP,GACbK,EAAA,OAAKE,MAAM,wBACTF,EAAA,cAEFA,EAAA,cAAYE,MAAM,gCAChBF,EAAA,OAAKE,MAAM,wBACRZ,KAAKQ,QAAUR,KAAKQ,QAAUE,EAAA,QAAMG,KAAK,aAE5CH,EAAA,OAAKE,MAAM,qBACTF,EAAA,OAAKE,MAAM,wBACRZ,KAAKS,QAAUT,KAAKS,QAAUC,EAAA,QAAMG,KAAK,aAE5CH,EAAA,OAAKE,MAAM,wBACTF,EAAA,QAAME,MAAM,6BACTZ,KAAKM,QAAUN,KAAKM,QAAUI,EAAA,QAAMG,KAAK,aAE5CH,EAAA,QAAME,MAAM,0BACTZ,KAAKO,UAAYP,KAAKO,UAAYG,EAAA,QAAMG,KAAK,mB,qIApDzC,G"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,o,e,i){function s(t){return t instanceof e?t:new e((function(o){o(t)}))}return new(e||(e=Promise))((function(e,
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,o,e,i){function s(t){return t instanceof e?t:new e((function(o){o(t)}))}return new(e||(e=Promise))((function(e,r){function n(t){try{a(i.next(t))}catch(t){r(t)}}function l(t){try{a(i["throw"](t))}catch(t){r(t)}}function a(t){t.done?e(t.value):s(t.value).then(n,l)}a((i=i.apply(t,o||[])).next())}))};var __generator=this&&this.__generator||function(t,o){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,s,r,n;return n={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function l(t){return function(o){return a([t,o])}}function a(l){if(i)throw new TypeError("Generator is already executing.");while(n&&(n=0,l[0]&&(e=0)),e)try{if(i=1,s&&(r=l[0]&2?s["return"]:l[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,l[1])).done)return r;if(s=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:e.label++;return{value:l[1],done:false};case 5:e.label++;s=l[1];l=[0];continue;case 7:l=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){e=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){e.label=l[1];break}if(l[0]===6&&e.label<r[1]){e.label=r[1];r=l;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(l);break}if(r[2])e.ops.pop();e.trys.pop();continue}l=o.call(t,e)}catch(t){l=[6,t];s=0}finally{i=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,h,F as Fragment,a as Host,g as getElement}from"./index-bfb5b569.js";import{s as setPropsIfNull,h as hasSlot}from"./utils-107fad0f.js";import"./string-utils-e252977e.js";var stzhFooterCss=":host{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block;}:host[hidden]{display:none}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}.stzh-footer{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block;font-size:var(--stzh-font-pico-font-size);line-height:var(--stzh-font-pico-text-line-height);background-color:var(--stzh-color-white);padding:var(--stzh-space-xlarge) 0;}.stzh-footer[hidden]{display:none}.stzh-footer *,.stzh-footer *::before,.stzh-footer *::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.stzh-footer .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.stzh-footer .stzh-fylingfocus-focused{outline-style:none !important}.stzh-footer .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}.stzh-footer [slot=logo],.stzh-footer [slot=logo] img{display:block;height:2.375rem}.stzh-footer [slot=info]{margin:0}.stzh-footer stzh-link[slot=info],.stzh-footer stzh-link[slot=link],.stzh-footer stzh-link[slot=social-link],.stzh-footer stzh-link.stzh-footer__link{--color:var(--stzh-base-color);--text-decoration-line:none;--icon-wrapper-height:auto;--icon-size:var(--stzh-icon-size-large)}.stzh-footer stzh-link[slot=info] .stzh-link,.stzh-footer stzh-link[slot=link] .stzh-link,.stzh-footer stzh-link[slot=social-link] .stzh-link,.stzh-footer stzh-link.stzh-footer__link .stzh-link{font-size:inherit}.stzh-footer stzh-link[slot=social-link]{margin-bottom:var(--stzh-space-xlarge)}@media screen and (min-width: 1024px){.stzh-footer stzh-link[slot=social-link]{margin-bottom:0;margin-right:var(--stzh-space-large)}}.stzh-footer stzh-link[slot=info]:not(:last-child){margin-bottom:var(--stzh-space-small)}.stzh-footer stzh-link[slot=link]:not(:last-child){margin-bottom:var(--stzh-space-small)}@media screen and (min-width: 800px){.stzh-footer stzh-link[slot=link]:not(:last-child){margin-bottom:0;margin-right:var(--stzh-space-large)}}.stzh-footer__wrapper{margin-left:1.25rem;margin-right:1.25rem;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}@media screen and (min-width: 600px){.stzh-footer__wrapper{margin-left:2rem;margin-right:2rem}}@media screen and (min-width: 1024px){.stzh-footer__wrapper{margin-left:2.5rem;margin-right:2.5rem}}@media screen and (min-width: 1260px){.stzh-footer__wrapper{margin-left:5.5rem;margin-right:5.5rem}}@media screen and (min-width: 1440px){.stzh-footer__wrapper{margin-left:auto;margin-right:auto;width:78.75rem}}@media screen and (min-width: 1024px){.stzh-footer__wrapper{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}}.stzh-footer__logo:empty,.stzh-footer__info:empty,.stzh-footer__social-link:empty,.stzh-footer__links:empty{display:none}.stzh-footer__logo:not(:empty){margin-bottom:var(--stzh-space-medium)}@media screen and (min-width: 1024px){.stzh-footer__logo:not(:empty){margin-bottom:0}}.stzh-footer__info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}.stzh-footer__info:not(:empty){margin-bottom:var(--stzh-space-xlarge)}@media screen and (min-width: 1024px){.stzh-footer__info:not(:empty){margin-bottom:0}}@media screen and (min-width: 1024px){.stzh-footer__logo,.stzh-footer__social-link{margin-right:auto}}@media screen and (min-width: 1024px){.stzh-footer__links{margin-left:auto}}.stzh-footer__links,.stzh-footer__link-list,.stzh-footer slot-fb[name=link]:not([hidden]){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}@media screen and (min-width: 800px){.stzh-footer__links,.stzh-footer__link-list,.stzh-footer slot-fb[name=link]:not([hidden]){-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}}.stzh-footer__copyright:not(:empty)+.stzh-footer__link-list:not(:empty){margin-top:var(--stzh-space-small)}@media screen and (min-width: 800px){.stzh-footer__copyright:not(:empty)+.stzh-footer__link-list:not(:empty){margin-top:0;margin-left:var(--stzh-space-large)}}@media screen and (min-width: 1024px){.stzh-footer--has-logo .stzh-footer__wrapper,.stzh-footer--has-info .stzh-footer__wrapper{-ms-flex-align:start;align-items:flex-start}}.stzh-footer--has-border{border-top:0.0625rem solid var(--stzh-base-border-color)}";var StzhFooter=function(){function t(t){var o=this;registerInstance(this,t);this.init=function(){var t=o.element.querySelector('stzh-link[slot="social-link"]');var e=o.element.querySelectorAll('stzh-link[slot="link"]');if(t){setPropsIfNull(t,{icon:"social-media"})}e.forEach((function(t){t.setAttribute("role","listitem")}))};this.localization=undefined;this.copyright=undefined;this.variant="default";this.mainUrl="https://www.stadt-zuerich.ch";this.withBorder=false}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,o;return __generator(this,(function(e){switch(e.label){case 0:if(typeof this.copyright==="undefined"){t=new Date;this.copyright="© ".concat(t.getFullYear()," Stadt Zürich")}if(!!this.localization)return[3,2];o=this;return[4,window.stzhComponents.utils.fetchTranslations(this.element,"footer")];case 1:o.localization=e.sent();e.label=2;case 2:return[2]}}))}))};t.prototype.connectedCallback=function(){this.init();this.observer=new MutationObserver(this.init);this.observer.observe(this.element,{childList:true,subtree:true})};t.prototype.disconnectedCallback=function(){if(this.observer){this.observer.disconnect()}};t.prototype.render=function(){var t=hasSlot(this.element,"logo");var o=hasSlot(this.element,"info");var e=hasSlot(this.element,"link");var i=hasSlot(this.element,"social-link");var s={"stzh-footer":true,"stzh-footer--has-border":this.withBorder,"stzh-footer--has-logo":t,"stzh-footer--has-info":o,"stzh-footer--has-links":e,"stzh-footer--has-social-link":i};return h(Host,null,h("footer",{class:s},h("div",{class:"stzh-footer__wrapper"},h("div",{class:"stzh-footer__social-link"},h("slot",{name:"social-link"})),h("div",{class:"stzh-footer__logo"},h("slot",{name:"logo"})),h("div",{class:"stzh-footer__info"},h("slot",{name:"info"})),h("div",{class:"stzh-footer__links"},this.copyright&&h("div",{class:"stzh-footer__copyright"},this.copyright),h("div",{class:"stzh-footer__link-list",role:"list"},h("slot",{name:"link"},this.variant==="egov"&&h(Fragment,null,h("stzh-link",{slot:"link",target:"_blank",class:"stzh-footer__link",href:"".concat(this.mainUrl,"/").concat(this.localization.legalNoticeUrl)},this.localization.legalNoticeText),h("stzh-link",{slot:"link",target:"_blank",class:"stzh-footer__link",href:"".concat(this.mainUrl,"/").concat(this.localization.imprintUrl)},this.localization.imprintText),h("stzh-link",{class:"stzh-footer__link",slot:"link",target:"_blank",href:"".concat(this.mainUrl,"/").concat(this.localization.accessibilityUrl)},this.localization.accessibilityText))))))))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();StzhFooter.style=stzhFooterCss;export{StzhFooter as stzh_footer};
|
|
2
2
|
//# sourceMappingURL=stzh-footer.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["stzhFooterCss","StzhFooter","this","init","socialLink","_this","element","querySelector","links","querySelectorAll","setPropsIfNull","icon","forEach","link","setAttribute","class_1","prototype","componentWillLoad","copyright","currentDate","Date","concat","getFullYear","localization","_a","window","stzhComponents","utils","fetchTranslations","_b","sent","connectedCallback","observer","MutationObserver","observe","childList","subtree","disconnectedCallback","disconnect","render","logoSlotUsed","hasSlot","infoSlotUsed","linkSlotUsed","socialLinkSlotUsed","classes","withBorder","h","Host","class","name","role","variant","Fragment","slot","target","href","mainUrl","legalNoticeUrl","legalNoticeText","imprintUrl","imprintText","accessibilityUrl","accessibilityText"],"sources":["src/components/stzh-footer/stzh-footer.scss?tag=stzh-footer","src/components/stzh-footer/stzh-footer.tsx"],"sourcesContent":[".stzh-footer {\n @include host;\n @include fontSize('pico');\n background-color: $colorWhite;\n padding: space('xlarge') 0;\n\n [slot=\"logo\"],\n [slot=\"logo\"] img {\n display: block;\n height: 38px;\n }\n\n [slot=\"info\"] {\n margin: 0;\n }\n\n stzh-link[slot=\"info\"],\n stzh-link[slot=\"link\"],\n stzh-link[slot=\"social-link\"],\n stzh-link#{&}__link {\n --color: #{$baseColor};\n --text-decoration-line: none;\n --icon-wrapper-height: auto;\n --icon-size: #{iconSize('large')};\n\n .stzh-link {\n font-size: inherit;\n }\n }\n\n stzh-link[slot=\"social-link\"] {\n margin-bottom: space('xlarge');\n\n @include mq($from: medium) {\n margin-bottom: 0;\n margin-right: space('large');\n }\n }\n\n stzh-link[slot=\"info\"] {\n &:not(:last-child) {\n margin-bottom: space('small');\n }\n }\n\n stzh-link[slot=\"link\"]{\n &:not(:last-child) {\n margin-bottom: space('small');\n\n @include mq($from: smallheader) {\n margin-bottom: 0;\n margin-right: space('large');\n }\n }\n }\n\n &__wrapper {\n @include container;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n\n @include mq($from: medium) {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n }\n }\n\n &__logo,\n &__info,\n &__social-link,\n &__links {\n &:empty {\n display: none;\n }\n }\n\n &__logo {\n &:not(:empty) {\n margin-bottom: space('medium');\n\n @include mq($from: medium) {\n margin-bottom: 0;\n }\n }\n }\n\n &__info {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n\n &:not(:empty) {\n margin-bottom: space('xlarge');\n\n @include mq($from: medium) {\n margin-bottom: 0;\n }\n }\n }\n\n &__logo,\n &__social-link {\n @include mq($from: medium) {\n margin-right: auto;\n }\n }\n\n &__links {\n @include mq($from: medium) {\n margin-left: auto;\n }\n }\n\n &__links,\n &__link-list,\n slot-fb[name=\"link\"]:not([hidden]) {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n\n @include mq($from: smallheader) {\n flex-direction: row;\n align-items: center;\n }\n }\n\n &__copyright:not(:empty) + &__link-list:not(:empty) {\n margin-top: space('small');\n\n @include mq($from: smallheader) {\n margin-top: 0;\n margin-left: space('large');\n }\n }\n\n /* Logo or info filled variant */\n\n &--has-logo &__wrapper,\n &--has-info &__wrapper{\n @include mq($from: medium) {\n align-items: flex-start;\n }\n }\n\n /* Has border */\n\n &--has-border {\n border-top: 1px solid $baseBorderColor;\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Fragment,\n} from \"@stencil/core\";\n\nimport { StzhFooterLocalizedText } from './stzh-footer.localization';\n\nimport { hasSlot, setPropsIfNull } from \"../../utils/utils\";\n\n/**\n * @slot - Slot for content\n * @slot social-link - Slot for social `stzh-link`\n * @slot logo - Slot for logo `img`\n * @slot info - Slot for info content\n * @slot link - Slot for `stzh-link` elements\n */\n@Component({\n tag: \"stzh-footer\",\n styleUrl: \"stzh-footer.scss\"\n})\nexport class StzhFooter {\n /** Translation strings */\n @Prop() localization: StzhFooterLocalizedText;\n\n /** Copyright text (will show default copyright string if undefined) */\n @Prop() copyright: string;\n\n /** Footer variant */\n @Prop() variant: \"default\" | \"egov\" = \"default\";\n\n /** Main URL for shortlinks */\n @Prop() mainUrl: string = \"https://www.stadt-zuerich.ch\";\n\n /** Whether to display separation border */\n @Prop() withBorder: boolean = false;\n\n @Element() element: HTMLStzhFooterElement;\n\n private observer: MutationObserver;\n\n private init = () => {\n const socialLink = this.element.querySelector('stzh-link[slot=\"social-link\"]');\n const links = this.element.querySelectorAll('stzh-link[slot=\"link\"]');\n\n if (socialLink) {\n setPropsIfNull(socialLink, {\n icon: \"social-media\"\n } as HTMLStzhLinkElement | HTMLStzhButtonElement);\n }\n\n links.forEach((link) => {\n link.setAttribute(\"role\", \"listitem\");\n });\n }\n\n async componentWillLoad() {\n if (typeof this.copyright === \"undefined\") {\n const currentDate = new Date();\n this.copyright = `© ${currentDate.getFullYear()} Stadt Zürich`;\n }\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'footer');\n }\n }\n\n connectedCallback() {\n this.init();\n\n this.observer = new MutationObserver(this.init);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true\n });\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n render() {\n const logoSlotUsed = hasSlot(this.element, \"logo\");\n const infoSlotUsed = hasSlot(this.element, \"info\");\n const linkSlotUsed = hasSlot(this.element, \"link\");\n const socialLinkSlotUsed = hasSlot(this.element, \"social-link\");\n\n const classes = {\n \"stzh-footer\": true,\n \"stzh-footer--has-border\": this.withBorder,\n \"stzh-footer--has-logo\": logoSlotUsed,\n \"stzh-footer--has-info\": infoSlotUsed,\n \"stzh-footer--has-links\": linkSlotUsed,\n \"stzh-footer--has-social-link\": socialLinkSlotUsed\n };\n\n return (\n <Host>\n <footer class={classes}>\n <div class=\"stzh-footer__wrapper\">\n <div class=\"stzh-footer__social-link\">\n <slot name=\"social-link\"></slot>\n </div>\n\n <div class=\"stzh-footer__logo\">\n <slot name=\"logo\"></slot>\n </div>\n\n <div class=\"stzh-footer__info\">\n <slot name=\"info\"></slot>\n </div>\n\n <div class=\"stzh-footer__links\">\n {this.copyright &&\n <div class=\"stzh-footer__copyright\">\n {this.copyright}\n </div>\n }\n <div class=\"stzh-footer__link-list\" role=\"list\">\n <slot name=\"link\">\n {this.variant === \"egov\" &&\n <Fragment>\n <stzh-link\n slot=\"link\"\n target=\"_blank\"\n class=\"stzh-footer__link\"\n href={`${this.mainUrl}/${this.localization.legalNoticeUrl}`}\n >\n {this.localization.legalNoticeText}\n </stzh-link>\n <stzh-link\n slot=\"link\"\n target=\"_blank\"\n class=\"stzh-footer__link\"\n href={`${this.mainUrl}/${this.localization.imprintUrl}`}\n >\n {this.localization.imprintText}\n </stzh-link>\n <stzh-link\n class=\"stzh-footer__link\"\n slot=\"link\"\n target=\"_blank\"\n href={`${this.mainUrl}/${this.localization.accessibilityUrl}`}\n >\n {this.localization.accessibilityText}\n </stzh-link>\n </Fragment>\n }\n </slot>\n </div>\n </div>\n </div>\n </footer>\n </Host>\n );\n }\n}\n"],"mappings":"opDAAA,IAAMA,cAAgB,y/J,ICwBTC,WAAU,W,kDAoBbC,KAAAC,KAAO,WACb,IAAMC,EAAaC,EAAKC,QAAQC,cAAc,iCAC9C,IAAMC,EAAQH,EAAKC,QAAQG,iBAAiB,0BAE5C,GAAIL,EAAY,CACdM,eAAeN,EAAY,CACzBO,KAAM,gB,CAIVH,EAAMI,SAAQ,SAACC,GACbA,EAAKC,aAAa,OAAQ,W,uEAvBQ,U,aAGZ,+B,gBAGI,K,CAqBxBC,EAAAC,UAAAC,kBAAN,W,oHACE,UAAWf,KAAKgB,YAAc,YAAa,CACnCC,EAAc,IAAIC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ACLC,OAAO,SACPN,MAAM,oBACNO,KAAM,GAAAnC,OAAGnB,KAAKuD,QAAO,KAAApC,OAAInB,KAAKqB,aAAamC,iBAE1CxD,KAAKqB,aAAaoC,iBAErBZ,EAAA,aACEO,KAAK,OACLC,OAAO,SACPN,MAAM,oBACNO,KAAM,GAAAnC,OAAGnB,KAAKuD,QAAO,KAAApC,OAAInB,KAAKqB,aAAaqC,aAE1C1D,KAAKqB,aAAasC,aAErBd,EAAA,aACEE,MAAM,oBACNK,KAAK,OACLC,OAAO,SACPC,KAAM,GAAAnC,OAAGnB,KAAKuD,QAAO,KAAApC,OAAInB,KAAKqB,aAAauC,mBAE1C5D,KAAKqB,aAAawC,yB,qIA7HpB,G"}
|
|
1
|
+
{"version":3,"names":["stzhFooterCss","StzhFooter","this","init","socialLink","_this","element","querySelector","links","querySelectorAll","setPropsIfNull","icon","forEach","link","setAttribute","class_1","prototype","componentWillLoad","copyright","currentDate","Date","concat","getFullYear","localization","_a","window","stzhComponents","utils","fetchTranslations","_b","sent","connectedCallback","observer","MutationObserver","observe","childList","subtree","disconnectedCallback","disconnect","render","logoSlotUsed","hasSlot","infoSlotUsed","linkSlotUsed","socialLinkSlotUsed","classes","withBorder","h","Host","class","name","role","variant","Fragment","slot","target","href","mainUrl","legalNoticeUrl","legalNoticeText","imprintUrl","imprintText","accessibilityUrl","accessibilityText"],"sources":["src/components/stzh-footer/stzh-footer.scss?tag=stzh-footer","src/components/stzh-footer/stzh-footer.tsx"],"sourcesContent":[".stzh-footer {\n @include host;\n @include fontSize('pico');\n background-color: $colorWhite;\n padding: space('xlarge') 0;\n\n [slot=\"logo\"],\n [slot=\"logo\"] img {\n display: block;\n height: 38px;\n }\n\n [slot=\"info\"] {\n margin: 0;\n }\n\n stzh-link[slot=\"info\"],\n stzh-link[slot=\"link\"],\n stzh-link[slot=\"social-link\"],\n stzh-link#{&}__link {\n --color: #{$baseColor};\n --text-decoration-line: none;\n --icon-wrapper-height: auto;\n --icon-size: #{iconSize('large')};\n\n .stzh-link {\n font-size: inherit;\n }\n }\n\n stzh-link[slot=\"social-link\"] {\n margin-bottom: space('xlarge');\n\n @include mq($from: medium) {\n margin-bottom: 0;\n margin-right: space('large');\n }\n }\n\n stzh-link[slot=\"info\"] {\n &:not(:last-child) {\n margin-bottom: space('small');\n }\n }\n\n stzh-link[slot=\"link\"]{\n &:not(:last-child) {\n margin-bottom: space('small');\n\n @include mq($from: smallheader) {\n margin-bottom: 0;\n margin-right: space('large');\n }\n }\n }\n\n &__wrapper {\n @include container;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n\n @include mq($from: medium) {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n }\n }\n\n &__logo,\n &__info,\n &__social-link,\n &__links {\n &:empty {\n display: none;\n }\n }\n\n &__logo {\n &:not(:empty) {\n margin-bottom: space('medium');\n\n @include mq($from: medium) {\n margin-bottom: 0;\n }\n }\n }\n\n &__info {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n\n &:not(:empty) {\n margin-bottom: space('xlarge');\n\n @include mq($from: medium) {\n margin-bottom: 0;\n }\n }\n }\n\n &__logo,\n &__social-link {\n @include mq($from: medium) {\n margin-right: auto;\n }\n }\n\n &__links {\n @include mq($from: medium) {\n margin-left: auto;\n }\n }\n\n &__links,\n &__link-list,\n slot-fb[name=\"link\"]:not([hidden]) {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n\n @include mq($from: smallheader) {\n flex-direction: row;\n align-items: center;\n }\n }\n\n &__copyright:not(:empty) + &__link-list:not(:empty) {\n margin-top: space('small');\n\n @include mq($from: smallheader) {\n margin-top: 0;\n margin-left: space('large');\n }\n }\n\n /* Logo or info filled variant */\n\n &--has-logo &__wrapper,\n &--has-info &__wrapper{\n @include mq($from: medium) {\n align-items: flex-start;\n }\n }\n\n /* Has border */\n\n &--has-border {\n border-top: 1px solid $baseBorderColor;\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Fragment,\n} from \"@stencil/core\";\n\nimport { StzhFooterLocalizedText } from './stzh-footer.localization';\n\nimport { hasSlot, setPropsIfNull } from \"../../utils/utils\";\n\n/**\n * @slot - Slot for content\n * @slot social-link - Slot for social `stzh-link`\n * @slot logo - Slot for logo `img`\n * @slot info - Slot for info content\n * @slot link - Slot for `stzh-link` elements\n */\n@Component({\n tag: \"stzh-footer\",\n styleUrl: \"stzh-footer.scss\"\n})\nexport class StzhFooter {\n /** Translation strings */\n @Prop() localization: StzhFooterLocalizedText;\n\n /** Copyright text (will show default copyright string if undefined) */\n @Prop() copyright: string;\n\n /** Footer variant */\n @Prop() variant: \"default\" | \"egov\" = \"default\";\n\n /** Main URL for shortlinks */\n @Prop() mainUrl: string = \"https://www.stadt-zuerich.ch\";\n\n /** Whether to display separation border */\n @Prop() withBorder: boolean = false;\n\n @Element() element: HTMLStzhFooterElement;\n\n private observer: MutationObserver;\n\n private init = () => {\n const socialLink = this.element.querySelector('stzh-link[slot=\"social-link\"]');\n const links = this.element.querySelectorAll('stzh-link[slot=\"link\"]');\n\n if (socialLink) {\n setPropsIfNull(socialLink, {\n icon: \"social-media\"\n } as HTMLStzhLinkElement | HTMLStzhButtonElement);\n }\n\n links.forEach((link) => {\n link.setAttribute(\"role\", \"listitem\");\n });\n }\n\n async componentWillLoad() {\n if (typeof this.copyright === \"undefined\") {\n const currentDate = new Date();\n this.copyright = `© ${currentDate.getFullYear()} Stadt Zürich`;\n }\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'footer');\n }\n }\n\n connectedCallback() {\n this.init();\n\n this.observer = new MutationObserver(this.init);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true\n });\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n render() {\n const logoSlotUsed = hasSlot(this.element, \"logo\");\n const infoSlotUsed = hasSlot(this.element, \"info\");\n const linkSlotUsed = hasSlot(this.element, \"link\");\n const socialLinkSlotUsed = hasSlot(this.element, \"social-link\");\n\n const classes = {\n \"stzh-footer\": true,\n \"stzh-footer--has-border\": this.withBorder,\n \"stzh-footer--has-logo\": logoSlotUsed,\n \"stzh-footer--has-info\": infoSlotUsed,\n \"stzh-footer--has-links\": linkSlotUsed,\n \"stzh-footer--has-social-link\": socialLinkSlotUsed\n };\n\n return (\n <Host>\n <footer class={classes}>\n <div class=\"stzh-footer__wrapper\">\n <div class=\"stzh-footer__social-link\">\n <slot name=\"social-link\"></slot>\n </div>\n\n <div class=\"stzh-footer__logo\">\n <slot name=\"logo\"></slot>\n </div>\n\n <div class=\"stzh-footer__info\">\n <slot name=\"info\"></slot>\n </div>\n\n <div class=\"stzh-footer__links\">\n {this.copyright &&\n <div class=\"stzh-footer__copyright\">\n {this.copyright}\n </div>\n }\n <div class=\"stzh-footer__link-list\" role=\"list\">\n <slot name=\"link\">\n {this.variant === \"egov\" &&\n <Fragment>\n <stzh-link\n slot=\"link\"\n target=\"_blank\"\n class=\"stzh-footer__link\"\n href={`${this.mainUrl}/${this.localization.legalNoticeUrl}`}\n >\n {this.localization.legalNoticeText}\n </stzh-link>\n <stzh-link\n slot=\"link\"\n target=\"_blank\"\n class=\"stzh-footer__link\"\n href={`${this.mainUrl}/${this.localization.imprintUrl}`}\n >\n {this.localization.imprintText}\n </stzh-link>\n <stzh-link\n class=\"stzh-footer__link\"\n slot=\"link\"\n target=\"_blank\"\n href={`${this.mainUrl}/${this.localization.accessibilityUrl}`}\n >\n {this.localization.accessibilityText}\n </stzh-link>\n </Fragment>\n }\n </slot>\n </div>\n </div>\n </div>\n </footer>\n </Host>\n );\n }\n}\n"],"mappings":"opDAAA,IAAMA,cAAgB,ymK,ICwBTC,WAAU,W,kDAoBbC,KAAAC,KAAO,WACb,IAAMC,EAAaC,EAAKC,QAAQC,cAAc,iCAC9C,IAAMC,EAAQH,EAAKC,QAAQG,iBAAiB,0BAE5C,GAAIL,EAAY,CACdM,eAAeN,EAAY,CACzBO,KAAM,gB,CAIVH,EAAMI,SAAQ,SAACC,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,KAAKgB,WAGV6B,EAAA,OAAKE,MAAM,yBAAyBE,KAAK,QACvCJ,EAAA,QAAMG,KAAK,QACRhD,KAAKkD,UAAY,QAChBL,EAACM,SAAQ,KACPN,EAAA,aACEO,KAAK,OACLC,OAAO,SACPN,MAAM,oBACNO,KAAM,GAAAnC,OAAGnB,KAAKuD,QAAO,KAAApC,OAAInB,KAAKqB,aAAamC,iBAE1CxD,KAAKqB,aAAaoC,iBAErBZ,EAAA,aACEO,KAAK,OACLC,OAAO,SACPN,MAAM,oBACNO,KAAM,GAAAnC,OAAGnB,KAAKuD,QAAO,KAAApC,OAAInB,KAAKqB,aAAaqC,aAE1C1D,KAAKqB,aAAasC,aAErBd,EAAA,aACEE,MAAM,oBACNK,KAAK,OACLC,OAAO,SACPC,KAAM,GAAAnC,OAAGnB,KAAKuD,QAAO,KAAApC,OAAInB,KAAKqB,aAAauC,mBAE1C5D,KAAKqB,aAAawC,yB,qIA7HpB,G"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,a,t,s){function r(e){return e instanceof t?e:new t((function(a){a(e)}))}return new(t||(t=Promise))((function(t,i){function n(e){try{o(s.next(e))}catch(e){i(e)}}function h(e){try{o(s["throw"](e))}catch(e){i(e)}}function o(e){e.done?t(e.value):r(e.value).then(n,h)}o((s=s.apply(e,a||[])).next())}))};var __generator=this&&this.__generator||function(e,a){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,r,i,n;return n={next:h(0),throw:h(1),return:h(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function h(e){return function(a){return o([e,a])}}function o(h){if(s)throw new TypeError("Generator is already executing.");while(n&&(n=0,h[0]&&(t=0)),t)try{if(s=1,r&&(i=h[0]&2?r["return"]:h[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,h[1])).done)return i;if(r=0,i)h=[h[0]&2,i.value];switch(h[0]){case 0:case 1:i=h;break;case 4:t.label++;return{value:h[1],done:false};case 5:t.label++;r=h[1];h=[0];continue;case 7:h=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(h[0]===6||h[0]===2)){t=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){t.label=h[1];break}if(h[0]===6&&t.label<i[1]){t.label=i[1];i=h;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(h);break}if(i[2])t.ops.pop();t.trys.pop();continue}h=a.call(e,t)}catch(e){h=[6,e];r=0}finally{s=i=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:true}}};import{r as registerInstance,e as readTask,w as writeTask,h,a as Host,g as getElement}from"./index-bfb5b569.js";import{h as hasSlot}from"./utils-107fad0f.js";import{m as media}from"./media-utils-ee5a59fa.js";import"./string-utils-e252977e.js";var stzhHeaderCss=".sc-stzh-header-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-header-h{display:none}.sc-stzh-header-h *.sc-stzh-header,.sc-stzh-header-h *.sc-stzh-header::before,.sc-stzh-header-h *.sc-stzh-header::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-header-h .has-focus.sc-stzh-header{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-header-h .stzh-fylingfocus-focused.sc-stzh-header{outline-style:none !important}.sc-stzh-header-h .stzh-fylingfocus-focused.sc-stzh-header::-moz-focus-inner{border:0 !important}@-webkit-keyframes stzh-header-open{from{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0%);transform:translateY(0%)}}@keyframes stzh-header-open{from{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0%);transform:translateY(0%)}}@-webkit-keyframes stzh-header-close{from{-webkit-transform:translateY(0%);transform:translateY(0%)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes stzh-header-close{from{-webkit-transform:translateY(0%);transform:translateY(0%)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.sc-stzh-header-h .sc-stzh-header-s>img[slot=logo]{width:auto;height:100%}.sc-stzh-header-h .sc-stzh-header-s>stzh-popover[slot=login]{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1}.sc-stzh-header-h .sc-stzh-header-s>stzh-popover[slot=login] .stzh-popover,.sc-stzh-header-h .sc-stzh-header-s>stzh-popover[slot=login] .stzh-popover__trigger{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1}.sc-stzh-header-h .sc-stzh-header-s>stzh-popover[slot=login] .stzh-popover .stzh-popover__trigger stzh-button .stzh-button{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);height:auto}@media screen and (max-width: 799px){.sc-stzh-header-h .sc-stzh-header-s>stzh-popover[slot=login] .stzh-popover .stzh-popover__trigger stzh-button .stzh-button{border-radius:0;height:100%}}@media screen and (max-width: 799px){.sc-stzh-header-h .sc-stzh-header-s>stzh-popover[slot=login] .stzh-popover .stzh-popover__trigger stzh-button .stzh-button__badge{top:0.5rem;right:0.4375rem}}.header__inner.sc-stzh-header{-webkit-transition:-webkit-box-shadow var(--stzh-base-transition-animation-speed);transition:-webkit-box-shadow var(--stzh-base-transition-animation-speed);transition:box-shadow var(--stzh-base-transition-animation-speed);transition:box-shadow var(--stzh-base-transition-animation-speed), -webkit-box-shadow var(--stzh-base-transition-animation-speed)}.header__main.sc-stzh-header{position:relative;z-index:var(--stzh-z-index-header);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative;-webkit-box-shadow:var(--stzh-box-shadow-header);box-shadow:var(--stzh-box-shadow-header);background-color:var(--stzh-color-white);-webkit-transition:-webkit-box-shadow var(--stzh-base-transition-animation-speed);transition:-webkit-box-shadow var(--stzh-base-transition-animation-speed);transition:box-shadow var(--stzh-base-transition-animation-speed);transition:box-shadow var(--stzh-base-transition-animation-speed), -webkit-box-shadow var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 800px){.header__main.sc-stzh-header{-webkit-box-shadow:none;box-shadow:none;-ms-flex-direction:column-reverse;flex-direction:column-reverse;border-bottom:0.0625rem solid var(--stzh-base-border-color);padding-top:4rem}@supports ((position: -webkit-sticky) or (position: sticky)){.header__main.sc-stzh-header{padding-top:0}}}.header__metabar.sc-stzh-header{border-top:0.0625rem solid var(--stzh-base-border-color)}@media screen and (min-width: 800px){.header__metabar.sc-stzh-header{border-top:none;background-color:var(--stzh-color-grey5);z-index:1;position:absolute;top:0;left:0;right:0}@supports ((position: -webkit-sticky) or (position: sticky)){.header__metabar.sc-stzh-header{position:-webkit-sticky;position:sticky}}}.header__metabar-inner.sc-stzh-header{margin:0 1.25rem;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;height:3rem}@media screen and (min-width: 600px){.header__metabar-inner.sc-stzh-header{margin:0 2rem}}@media screen and (min-width: 1024px){.header__metabar-inner.sc-stzh-header{margin:0 2.5rem}}@media screen and (min-width: 1260px){.header__metabar-inner.sc-stzh-header{margin:0 5.5rem}}@media screen and (min-width: 1440px){.header__metabar-inner.sc-stzh-header{margin:0 auto;width:78.75rem}}@media screen and (max-width: 799px){.header__metabar-inner.sc-stzh-header{margin:0 auto}}@media screen and (min-width: 800px){.header__metabar-inner.sc-stzh-header{-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center;height:4rem}}.header__metabar-nav.sc-stzh-header,.header__metabar-langnav.sc-stzh-header{display:none}@media screen and (min-width: 800px){.header__metabar-nav.sc-stzh-header,.header__metabar-langnav.sc-stzh-header{display:-ms-inline-flexbox;display:inline-flex}}.header__metabar-login.sc-stzh-header{display:-ms-flexbox;display:flex;-ms-flex-preferred-size:50%;flex-basis:50%}@media screen and (min-width: 800px){.header__metabar-login.sc-stzh-header:not(:empty){-ms-flex-preferred-size:auto;flex-basis:auto;margin-left:var(--stzh-space-small)}}@media screen and (min-width: 800px){.header__metabar-langnav.sc-stzh-header:not(:empty){margin-left:var(--stzh-space-medium)}}.header__logobar.sc-stzh-header{display:-ms-flexbox;display:flex;background-color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.header__logobar-logo.sc-stzh-header{-webkit-box-sizing:content-box;box-sizing:content-box;display:-ms-flexbox;display:flex;background-color:var(--stzh-color-white);overflow:hidden;width:calc(100% - 3rem - 0.0625rem)}@media screen and (min-width: 800px){.header__logobar-logo.sc-stzh-header{width:25rem}}@media screen and (min-width: 1260px){.header__logobar-logo.sc-stzh-header{width:28.75rem}}@media screen and (min-width: 1440px){.header__logobar-logo.sc-stzh-header{padding-left:calc((100vw - 78.75rem - var(--stzh-scrollbar-width, 0px)) / 2)}}.header__logo-link.sc-stzh-header{-ms-flex-positive:1;flex-grow:1;display:-ms-inline-flexbox;display:inline-flex;height:4.75rem;padding:var(--stzh-space-medium);padding-left:1.25rem;-webkit-transition:opacity var(--stzh-base-transition-animation-speed);transition:opacity var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 600px){.header__logo-link.sc-stzh-header{padding-left:2rem}}@media screen and (min-width: 800px){.header__logo-link.sc-stzh-header{height:5.625rem}}@media screen and (min-width: 1260px){.header__logo-link.sc-stzh-header{height:7.5rem;padding:var(--stzh-space-large);padding-left:5.5rem}}@media screen and (min-width: 1440px){.header__logo-link.sc-stzh-header{padding-left:0}}.header__appnav.sc-stzh-header{position:fixed;left:0;right:0;bottom:0;z-index:calc(var(--stzh-z-index-header) - 1);-webkit-box-shadow:var(--stzh-box-shadow-header);box-shadow:var(--stzh-box-shadow-header);background-color:var(--stzh-color-white)}@media screen and (min-width: 600px){.header__appnav.sc-stzh-header{position:static;-webkit-box-shadow:none;box-shadow:none}}@media screen and (min-width: 600px){.header__appnav-inner.sc-stzh-header{margin:0 1.25rem}}@media screen and (min-width: 600px) and (min-width: 600px){.header__appnav-inner.sc-stzh-header{margin:0 2rem}}@media screen and (min-width: 600px) and (min-width: 1024px){.header__appnav-inner.sc-stzh-header{margin:0 2.5rem}}@media screen and (min-width: 600px) and (min-width: 1260px){.header__appnav-inner.sc-stzh-header{margin:0 5.5rem}}@media screen and (min-width: 600px) and (min-width: 1440px){.header__appnav-inner.sc-stzh-header{margin:0 auto;width:78.75rem}}.header--hide-logo.sc-stzh-header .header__logo-link.sc-stzh-header{opacity:0}@media screen and (max-width: 799px){.header--has-empty-metabar-mobile.sc-stzh-header .header__metabar.sc-stzh-header{display:none}}.header--has-empty-metabar.sc-stzh-header .header__metabar.sc-stzh-header{display:none}@media screen and (max-width: 799px){.header--has-metabar-stay.sc-stzh-header .header__metabar-langnav.sc-stzh-header{display:-ms-inline-flexbox;display:inline-flex}}@media screen and (max-width: 799px){.header--has-metabar-stay.sc-stzh-header .header__metabar-nav.sc-stzh-header{display:-ms-inline-flexbox;display:inline-flex}}@media screen and (max-width: 799px){.header--has-metabar-stay.sc-stzh-header .header__main.sc-stzh-header{-webkit-box-shadow:none;box-shadow:none;-ms-flex-direction:column-reverse;flex-direction:column-reverse;border-bottom:0.0625rem solid var(--stzh-base-border-color)}}@media screen and (max-width: 799px){.header--has-metabar-stay.sc-stzh-header .header__metabar.sc-stzh-header{display:block;border-top:none;background-color:var(--stzh-color-grey5)}}@media screen and (max-width: 799px){.header--has-metabar-stay.sc-stzh-header .header__metabar-inner.sc-stzh-header{margin:0 1.25rem;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center}}@media screen and (max-width: 799px) and (min-width: 600px){.header--has-metabar-stay.sc-stzh-header .header__metabar-inner.sc-stzh-header{margin:0 2rem}}@media screen and (max-width: 799px) and (min-width: 1024px){.header--has-metabar-stay.sc-stzh-header .header__metabar-inner.sc-stzh-header{margin:0 2.5rem}}@media screen and (max-width: 799px) and (min-width: 1260px){.header--has-metabar-stay.sc-stzh-header .header__metabar-inner.sc-stzh-header{margin:0 5.5rem}}@media screen and (max-width: 799px) and (min-width: 1440px){.header--has-metabar-stay.sc-stzh-header .header__metabar-inner.sc-stzh-header{margin:0 auto;width:78.75rem}}@media screen and (min-width: 800px){.header--sticky-metabar.sc-stzh-header:not(.header--sticky):not(.header--is-sticky-disabled) .header__metabar.sc-stzh-header{position:fixed}}@media screen and (min-width: 600px){.header--sticky.sc-stzh-header .header__inner.sc-stzh-header{-webkit-animation:stzh-header-open var(--stzh-base-transition-animation-speed);animation:stzh-header-open var(--stzh-base-transition-animation-speed);z-index:var(--stzh-z-index-header);position:fixed;top:0;left:0;right:0;margin:0;-webkit-box-shadow:var(--stzh-box-shadow-header);box-shadow:var(--stzh-box-shadow-header)}}@media screen and (max-width: 599px){.header--sticky.sc-stzh-header .header__main.sc-stzh-header{-webkit-animation:stzh-header-open var(--stzh-base-transition-animation-speed);animation:stzh-header-open var(--stzh-base-transition-animation-speed);z-index:var(--stzh-z-index-header);position:fixed;top:0;left:0;right:0;margin:0}}@media screen and (min-width: 600px){.header--sticky.sc-stzh-header .header__main.sc-stzh-header{-webkit-box-shadow:none;box-shadow:none}}@media screen and (max-width: 799px){.header--sticky.sc-stzh-header .header__appnav.sc-stzh-header{border-top:0.0625rem solid var(--stzh-base-border-color)}}.header--sticky.sc-stzh-header .header__metabar.sc-stzh-header{border-top:none}.header--sticky.header--has-empty-metabar.sc-stzh-header .header__metabar.sc-stzh-header{display:none}@media screen and (min-width: 600px){.header--sticky.header--has-empty-metabar.sc-stzh-header:not(.header--has-appnav) .header__main.sc-stzh-header{border-bottom:none}}.header--sticky.sc-stzh-header .header__logobar.sc-stzh-header{display:none}@media screen and (max-width: 599px){.header--sticky.header--has-metabar-stay.sc-stzh-header .header__main.sc-stzh-header{-webkit-box-shadow:var(--stzh-box-shadow-header);box-shadow:var(--stzh-box-shadow-header)}}@media screen and (min-width: 600px){.header--sticky-closing.sc-stzh-header .header__inner.sc-stzh-header{-webkit-animation:stzh-header-close var(--stzh-base-transition-animation-speed);animation:stzh-header-close var(--stzh-base-transition-animation-speed)}}@media screen and (max-width: 599px){.header--sticky-closing.sc-stzh-header .header__main.sc-stzh-header{-webkit-animation:stzh-header-close var(--stzh-base-transition-animation-speed);animation:stzh-header-close var(--stzh-base-transition-animation-speed)}}@media screen and (min-width: 800px){@supports ((position: -webkit-sticky) or (position: sticky)){.header--is-sticky-disabled.sc-stzh-header .header__main.sc-stzh-header{padding-top:4rem}}}@media screen and (min-width: 800px){@supports ((position: -webkit-sticky) or (position: sticky)){.header--is-sticky-disabled.sc-stzh-header .header__metabar.sc-stzh-header{position:absolute}}}";var StzhHeader=function(){function e(e){var a=this;registerInstance(this,e);this.handleResize=function(){if(a.stickyDisabled){return}if(a.debounceResize){window.cancelAnimationFrame(a.debounceResize)}a.debounceResize=requestAnimationFrame((function(){readTask((function(){a.isSmall=media("small").matches;a.isSmallheader=media("smallheader").matches;a.headerTop=a.element.offsetTop;a.headerHeight=a.element.offsetHeight;a.appnavHeight=a.appnavElement?a.appnavElement.offsetHeight:0;a.metabarHeight=a.metabarElement?a.metabarElement.offsetHeight:0}));writeTask((function(){document.documentElement.style.setProperty("--stzh-header-height","".concat(a.headerHeight,"px"));document.documentElement.style.setProperty("--stzh-header-appnav-height","".concat(a.appnavHeight,"px"));document.documentElement.style.setProperty("--stzh-header-metabar-height","".concat(a.metabarHeight,"px"));if(a.appnavHeight&&!a.isSmall&&!a.preventAppnavPlaceholder){a.appnavPlaceholderElement.style.height="".concat(a.appnavHeight,"px");document.documentElement.style.setProperty("--stzh-header-sticky-appnav-height","".concat(a.appnavHeight,"px"))}else{a.appnavPlaceholderElement.style.height="0px";document.documentElement.style.setProperty("--stzh-header-sticky-appnav-height","0px")}}));a.scrollListener()}))};this.href="https://www.stadt-zuerich.ch";this.metabarStay=false;this.stickyDisabled=false;this.preventAppnavPlaceholder=false;this.logoAnalyticsId=undefined;this.hideLogo=false;this.paddingTop=undefined;this.metabarTransform=undefined;this.sticky=false;this.stickyClosing=false;this.stickyMetabar=false;this.stickyMetabarEnd=false}e.prototype.updatePosition=function(){return __awaiter(this,void 0,void 0,(function(){var e,a;var t=this;return __generator(this,(function(s){if(this.stickyDisabled){return[2]}e=function(){t.sticky=false;t.stickyClosing=false;t.paddingTop=0};if(this.scrollingUp&&this.belowStayStickyPoint){if(!this.sticky&&this.belowStartStickyPoint){this.paddingTop=this.headerHeight;this.sticky=true}this.updateMetabarPosition()}else{if(this.sticky&&this.belowStayStickyPoint){a=function(){e();t.updateMetabarPosition();t.innerElement.removeEventListener("animationend",a)};this.innerElement.addEventListener("animationend",a);this.stickyClosing=true}else{e();this.updateMetabarPosition()}}return[2]}))}))};e.prototype.scrollListener=function(){var e=this;if(this.stickyDisabled){return}readTask((function(){e.scrollTop=e.getScrollTop();e.scrollingUp=e.lastScrollTop&&e.lastScrollTop>e.scrollTop;e.lastScrollTop=e.scrollTop;e.innerHeight=e.innerElement?e.innerElement.offsetHeight:0;e.mainHeight=e.mainElement?e.mainElement.offsetHeight:0;e.logobarHeight=e.sticky?e.isSmall?e.headerHeight-e.innerHeight:e.headerHeight-e.mainHeight:e.logobarElement?e.logobarElement.offsetHeight:0;e.belowStayStickyPoint=e.scrollTop>e.logobarHeight;e.belowStartStickyPoint=e.scrollTop>e.headerHeight;e.headerOverlap=(e.headerTop-e.scrollTop)/-1;e.hideLogo=e.isSmallheader&&e.headerOverlap>10}));writeTask((function(){e.updatePosition()}))};e.prototype.getScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop};e.prototype.updateMetabarPosition=function(){if(!this.metabarElement||this.stickyDisabled){return}if(CSS&&CSS.supports&&CSS.supports("position","sticky")){return}if(this.isSmallheader&&this.headerOverlap>0&&!this.sticky&&!this.stickyClosing){if(this.headerOverlap<this.mainHeight-this.metabarHeight){this.stickyMetabar=true;this.stickyMetabarEnd=false;this.metabarTransform="translateY(0)"}else{this.stickyMetabar=false;this.stickyMetabarEnd=true;this.metabarTransform="translateY(".concat(this.logobarHeight,"px)")}}else{this.stickyMetabar=false;this.stickyMetabarEnd=false;this.metabarTransform="translateY(0)"}};e.prototype.connectedCallback=function(){this.appnavPlaceholderElement=document.createElement("div");this.element.parentElement.appendChild(this.appnavPlaceholderElement);this.resizeObserver=new ResizeObserver(this.handleResize);this.resizeObserver.observe(this.element)};e.prototype.disconnectedCallback=function(){this.appnavPlaceholderElement.parentElement.removeChild(this.appnavPlaceholderElement);if(this.resizeObserver){this.resizeObserver.disconnect()}};e.prototype.render=function(){var e=this;var a=hasSlot(this.element,"nav");var t=hasSlot(this.element,"login");var s=hasSlot(this.element,"appnav");var r=hasSlot(this.element,"langnav");var i={header:true,"header--is-sticky-disabled":this.stickyDisabled,"header--sticky":this.sticky,"header--sticky-closing":this.stickyClosing,"header--hide-logo":this.hideLogo,"header--sticky-metabar":this.stickyMetabar,"header--sticky-metabar-end":this.stickyMetabarEnd,"header--has-metabar-stay":this.metabarStay,"header--has-empty-metabar-mobile":!t,"header--has-empty-metabar":!t&&!r&&!a,"header--has-appnav":s};return h(Host,null,h("div",{style:{paddingTop:"".concat(this.paddingTop,"px")},class:i},h("div",{class:"header__inner",ref:function(a){return e.innerElement=a}},h("div",{class:"header__main",ref:function(a){return e.mainElement=a}},h("div",{class:"header__logobar",ref:function(a){return e.logobarElement=a}},h("div",{class:"header__logobar-logo"},h("a",{href:this.href,class:"header__logo-link","s-object-id":this.logoAnalyticsId||"Header Logo"},h("slot",{name:"logo"})))),h("div",{class:"header__metabar",style:{transform:this.metabarTransform},ref:function(a){return e.metabarElement=a}},h("div",{class:"header__metabar-inner"},h("div",{class:"header__metabar-nav"},h("slot",{name:"nav"})),h("div",{class:"header__metabar-login"},h("slot",{name:"login"})),h("div",{class:"header__metabar-langnav"},h("slot",{name:"langnav"}))))),h("div",{class:"header__appnav",ref:function(a){return e.appnavElement=a}},h("div",{class:"header__appnav-inner"},h("slot",{name:"appnav"}))))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();StzhHeader.style=stzhHeaderCss;export{StzhHeader as stzh_header};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,a,t,r){function s(e){return e instanceof t?e:new t((function(a){a(e)}))}return new(t||(t=Promise))((function(t,i){function n(e){try{o(r.next(e))}catch(e){i(e)}}function h(e){try{o(r["throw"](e))}catch(e){i(e)}}function o(e){e.done?t(e.value):s(e.value).then(n,h)}o((r=r.apply(e,a||[])).next())}))};var __generator=this&&this.__generator||function(e,a){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,s,i,n;return n={next:h(0),throw:h(1),return:h(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function h(e){return function(a){return o([e,a])}}function o(h){if(r)throw new TypeError("Generator is already executing.");while(n&&(n=0,h[0]&&(t=0)),t)try{if(r=1,s&&(i=h[0]&2?s["return"]:h[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,h[1])).done)return i;if(s=0,i)h=[h[0]&2,i.value];switch(h[0]){case 0:case 1:i=h;break;case 4:t.label++;return{value:h[1],done:false};case 5:t.label++;s=h[1];h=[0];continue;case 7:h=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(h[0]===6||h[0]===2)){t=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){t.label=h[1];break}if(h[0]===6&&t.label<i[1]){t.label=i[1];i=h;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(h);break}if(i[2])t.ops.pop();t.trys.pop();continue}h=a.call(e,t)}catch(e){h=[6,e];s=0}finally{r=i=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:true}}};import{r as registerInstance,e as readTask,w as writeTask,h,a as Host,g as getElement}from"./index-bfb5b569.js";import{h as hasSlot}from"./utils-107fad0f.js";import{m as media}from"./media-utils-ee5a59fa.js";import"./string-utils-e252977e.js";var stzhHeaderCss=".sc-stzh-header-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-header-h{display:none}.sc-stzh-header-h *.sc-stzh-header,.sc-stzh-header-h *.sc-stzh-header::before,.sc-stzh-header-h *.sc-stzh-header::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-header-h .has-focus.sc-stzh-header{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-header-h .stzh-fylingfocus-focused.sc-stzh-header{outline-style:none !important}.sc-stzh-header-h .stzh-fylingfocus-focused.sc-stzh-header::-moz-focus-inner{border:0 !important}@-webkit-keyframes stzh-header-open{from{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0%);transform:translateY(0%)}}@keyframes stzh-header-open{from{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0%);transform:translateY(0%)}}@-webkit-keyframes stzh-header-close{from{-webkit-transform:translateY(0%);transform:translateY(0%)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes stzh-header-close{from{-webkit-transform:translateY(0%);transform:translateY(0%)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.sc-stzh-header-h .sc-stzh-header-s>img[slot=logo]{width:auto;height:100%}.sc-stzh-header-h .sc-stzh-header-s>stzh-popover[slot=login]{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1}.sc-stzh-header-h .sc-stzh-header-s>stzh-popover[slot=login] .stzh-popover,.sc-stzh-header-h .sc-stzh-header-s>stzh-popover[slot=login] .stzh-popover__trigger{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1}.sc-stzh-header-h .sc-stzh-header-s>stzh-popover[slot=login] .stzh-popover .stzh-popover__trigger stzh-button .stzh-button{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);height:auto}@media screen and (max-width: 799px){.sc-stzh-header-h .sc-stzh-header-s>stzh-popover[slot=login] .stzh-popover .stzh-popover__trigger stzh-button .stzh-button{border-radius:0;height:100%}}@media screen and (max-width: 799px){.sc-stzh-header-h .sc-stzh-header-s>stzh-popover[slot=login] .stzh-popover .stzh-popover__trigger stzh-button .stzh-button__badge{top:0.5rem;right:0.4375rem}}.header__inner.sc-stzh-header{-webkit-transition:-webkit-box-shadow var(--stzh-base-transition-animation-speed);transition:-webkit-box-shadow var(--stzh-base-transition-animation-speed);transition:box-shadow var(--stzh-base-transition-animation-speed);transition:box-shadow var(--stzh-base-transition-animation-speed), -webkit-box-shadow var(--stzh-base-transition-animation-speed)}.header__main.sc-stzh-header{position:relative;z-index:var(--stzh-z-index-header);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative;-webkit-box-shadow:var(--stzh-box-shadow-header);box-shadow:var(--stzh-box-shadow-header);background-color:var(--stzh-color-white);-webkit-transition:-webkit-box-shadow var(--stzh-base-transition-animation-speed);transition:-webkit-box-shadow var(--stzh-base-transition-animation-speed);transition:box-shadow var(--stzh-base-transition-animation-speed);transition:box-shadow var(--stzh-base-transition-animation-speed), -webkit-box-shadow var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 800px){.header__main.sc-stzh-header{-webkit-box-shadow:none;box-shadow:none;-ms-flex-direction:column-reverse;flex-direction:column-reverse;border-bottom:0.0625rem solid var(--stzh-base-border-color);padding-top:4rem}@supports ((position: -webkit-sticky) or (position: sticky)){.header__main.sc-stzh-header{padding-top:0}}}.header__metabar.sc-stzh-header{border-top:0.0625rem solid var(--stzh-base-border-color)}@media screen and (min-width: 800px){.header__metabar.sc-stzh-header{border-top:none;background-color:var(--stzh-color-grey5);z-index:1;position:absolute;top:0;left:0;right:0}@supports ((position: -webkit-sticky) or (position: sticky)){.header__metabar.sc-stzh-header{position:-webkit-sticky;position:sticky}}}.header__metabar-inner.sc-stzh-header{margin-left:1.25rem;margin-right:1.25rem;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;height:3rem}@media screen and (min-width: 600px){.header__metabar-inner.sc-stzh-header{margin-left:2rem;margin-right:2rem}}@media screen and (min-width: 1024px){.header__metabar-inner.sc-stzh-header{margin-left:2.5rem;margin-right:2.5rem}}@media screen and (min-width: 1260px){.header__metabar-inner.sc-stzh-header{margin-left:5.5rem;margin-right:5.5rem}}@media screen and (min-width: 1440px){.header__metabar-inner.sc-stzh-header{margin-left:auto;margin-right:auto;width:78.75rem}}@media screen and (max-width: 799px){.header__metabar-inner.sc-stzh-header{margin:0 auto}}@media screen and (min-width: 800px){.header__metabar-inner.sc-stzh-header{-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center;height:4rem}}.header__metabar-nav.sc-stzh-header,.header__metabar-langnav.sc-stzh-header{display:none}@media screen and (min-width: 800px){.header__metabar-nav.sc-stzh-header,.header__metabar-langnav.sc-stzh-header{display:-ms-inline-flexbox;display:inline-flex}}.header__metabar-login.sc-stzh-header{display:-ms-flexbox;display:flex;-ms-flex-preferred-size:50%;flex-basis:50%}@media screen and (min-width: 800px){.header__metabar-login.sc-stzh-header:not(:empty){-ms-flex-preferred-size:auto;flex-basis:auto;margin-left:var(--stzh-space-small)}}@media screen and (min-width: 800px){.header__metabar-langnav.sc-stzh-header:not(:empty){margin-left:var(--stzh-space-medium)}}.header__logobar.sc-stzh-header{display:-ms-flexbox;display:flex;background-color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.header__logobar-logo.sc-stzh-header{-webkit-box-sizing:content-box;box-sizing:content-box;display:-ms-flexbox;display:flex;background-color:var(--stzh-color-white);overflow:hidden;width:calc(100% - 3rem - 0.0625rem)}@media screen and (min-width: 800px){.header__logobar-logo.sc-stzh-header{width:25rem}}@media screen and (min-width: 1260px){.header__logobar-logo.sc-stzh-header{width:28.75rem}}@media screen and (min-width: 1440px){.header__logobar-logo.sc-stzh-header{padding-left:calc((100vw - 78.75rem - var(--stzh-scrollbar-width, 0px)) / 2)}}.header__logo-link.sc-stzh-header{-ms-flex-positive:1;flex-grow:1;display:-ms-inline-flexbox;display:inline-flex;height:4.75rem;padding:var(--stzh-space-medium);padding-left:1.25rem;-webkit-transition:opacity var(--stzh-base-transition-animation-speed);transition:opacity var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 600px){.header__logo-link.sc-stzh-header{padding-left:2rem}}@media screen and (min-width: 800px){.header__logo-link.sc-stzh-header{height:5.625rem}}@media screen and (min-width: 1260px){.header__logo-link.sc-stzh-header{height:7.5rem;padding:var(--stzh-space-large);padding-left:5.5rem}}@media screen and (min-width: 1440px){.header__logo-link.sc-stzh-header{padding-left:0}}.header__appnav.sc-stzh-header{position:fixed;left:0;right:0;bottom:0;z-index:calc(var(--stzh-z-index-header) - 1);-webkit-box-shadow:var(--stzh-box-shadow-header);box-shadow:var(--stzh-box-shadow-header);background-color:var(--stzh-color-white)}@media screen and (min-width: 600px){.header__appnav.sc-stzh-header{position:static;-webkit-box-shadow:none;box-shadow:none}}@media screen and (min-width: 600px){.header__appnav-inner.sc-stzh-header{margin-left:1.25rem;margin-right:1.25rem}}@media screen and (min-width: 600px) and (min-width: 600px){.header__appnav-inner.sc-stzh-header{margin-left:2rem;margin-right:2rem}}@media screen and (min-width: 600px) and (min-width: 1024px){.header__appnav-inner.sc-stzh-header{margin-left:2.5rem;margin-right:2.5rem}}@media screen and (min-width: 600px) and (min-width: 1260px){.header__appnav-inner.sc-stzh-header{margin-left:5.5rem;margin-right:5.5rem}}@media screen and (min-width: 600px) and (min-width: 1440px){.header__appnav-inner.sc-stzh-header{margin-left:auto;margin-right:auto;width:78.75rem}}.header--hide-logo.sc-stzh-header .header__logo-link.sc-stzh-header{opacity:0}@media screen and (max-width: 799px){.header--has-empty-metabar-mobile.sc-stzh-header .header__metabar.sc-stzh-header{display:none}}.header--has-empty-metabar.sc-stzh-header .header__metabar.sc-stzh-header{display:none}@media screen and (max-width: 799px){.header--has-metabar-stay.sc-stzh-header .header__metabar-langnav.sc-stzh-header{display:-ms-inline-flexbox;display:inline-flex}}@media screen and (max-width: 799px){.header--has-metabar-stay.sc-stzh-header .header__metabar-nav.sc-stzh-header{display:-ms-inline-flexbox;display:inline-flex}}@media screen and (max-width: 799px){.header--has-metabar-stay.sc-stzh-header .header__main.sc-stzh-header{-webkit-box-shadow:none;box-shadow:none;-ms-flex-direction:column-reverse;flex-direction:column-reverse;border-bottom:0.0625rem solid var(--stzh-base-border-color)}}@media screen and (max-width: 799px){.header--has-metabar-stay.sc-stzh-header .header__metabar.sc-stzh-header{display:block;border-top:none;background-color:var(--stzh-color-grey5)}}@media screen and (max-width: 799px){.header--has-metabar-stay.sc-stzh-header .header__metabar-inner.sc-stzh-header{margin-left:1.25rem;margin-right:1.25rem;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center}}@media screen and (max-width: 799px) and (min-width: 600px){.header--has-metabar-stay.sc-stzh-header .header__metabar-inner.sc-stzh-header{margin-left:2rem;margin-right:2rem}}@media screen and (max-width: 799px) and (min-width: 1024px){.header--has-metabar-stay.sc-stzh-header .header__metabar-inner.sc-stzh-header{margin-left:2.5rem;margin-right:2.5rem}}@media screen and (max-width: 799px) and (min-width: 1260px){.header--has-metabar-stay.sc-stzh-header .header__metabar-inner.sc-stzh-header{margin-left:5.5rem;margin-right:5.5rem}}@media screen and (max-width: 799px) and (min-width: 1440px){.header--has-metabar-stay.sc-stzh-header .header__metabar-inner.sc-stzh-header{margin-left:auto;margin-right:auto;width:78.75rem}}@media screen and (min-width: 800px){.header--sticky-metabar.sc-stzh-header:not(.header--sticky):not(.header--is-sticky-disabled) .header__metabar.sc-stzh-header{position:fixed}}@media screen and (min-width: 600px){.header--sticky.sc-stzh-header .header__inner.sc-stzh-header{-webkit-animation:stzh-header-open var(--stzh-base-transition-animation-speed);animation:stzh-header-open var(--stzh-base-transition-animation-speed);z-index:var(--stzh-z-index-header);position:fixed;top:0;left:0;right:0;margin:0;-webkit-box-shadow:var(--stzh-box-shadow-header);box-shadow:var(--stzh-box-shadow-header)}}@media screen and (max-width: 599px){.header--sticky.sc-stzh-header .header__main.sc-stzh-header{-webkit-animation:stzh-header-open var(--stzh-base-transition-animation-speed);animation:stzh-header-open var(--stzh-base-transition-animation-speed);z-index:var(--stzh-z-index-header);position:fixed;top:0;left:0;right:0;margin:0}}@media screen and (min-width: 600px){.header--sticky.sc-stzh-header .header__main.sc-stzh-header{-webkit-box-shadow:none;box-shadow:none}}@media screen and (max-width: 799px){.header--sticky.sc-stzh-header .header__appnav.sc-stzh-header{border-top:0.0625rem solid var(--stzh-base-border-color)}}.header--sticky.sc-stzh-header .header__metabar.sc-stzh-header{border-top:none}.header--sticky.header--has-empty-metabar.sc-stzh-header .header__metabar.sc-stzh-header{display:none}@media screen and (min-width: 600px){.header--sticky.header--has-empty-metabar.sc-stzh-header:not(.header--has-appnav) .header__main.sc-stzh-header{border-bottom:none}}.header--sticky.sc-stzh-header .header__logobar.sc-stzh-header{display:none}@media screen and (max-width: 599px){.header--sticky.header--has-metabar-stay.sc-stzh-header .header__main.sc-stzh-header{-webkit-box-shadow:var(--stzh-box-shadow-header);box-shadow:var(--stzh-box-shadow-header)}}@media screen and (min-width: 600px){.header--sticky-closing.sc-stzh-header .header__inner.sc-stzh-header{-webkit-animation:stzh-header-close var(--stzh-base-transition-animation-speed);animation:stzh-header-close var(--stzh-base-transition-animation-speed)}}@media screen and (max-width: 599px){.header--sticky-closing.sc-stzh-header .header__main.sc-stzh-header{-webkit-animation:stzh-header-close var(--stzh-base-transition-animation-speed);animation:stzh-header-close var(--stzh-base-transition-animation-speed)}}@media screen and (min-width: 800px){@supports ((position: -webkit-sticky) or (position: sticky)){.header--is-sticky-disabled.sc-stzh-header .header__main.sc-stzh-header{padding-top:4rem}}}@media screen and (min-width: 800px){@supports ((position: -webkit-sticky) or (position: sticky)){.header--is-sticky-disabled.sc-stzh-header .header__metabar.sc-stzh-header{position:absolute}}}";var StzhHeader=function(){function e(e){var a=this;registerInstance(this,e);this.handleResize=function(){if(a.stickyDisabled){return}if(a.debounceResize){window.cancelAnimationFrame(a.debounceResize)}a.debounceResize=requestAnimationFrame((function(){readTask((function(){a.isSmall=media("small").matches;a.isSmallheader=media("smallheader").matches;a.headerTop=a.element.offsetTop;a.headerHeight=a.element.offsetHeight;a.appnavHeight=a.appnavElement?a.appnavElement.offsetHeight:0;a.metabarHeight=a.metabarElement?a.metabarElement.offsetHeight:0}));writeTask((function(){document.documentElement.style.setProperty("--stzh-header-height","".concat(a.headerHeight,"px"));document.documentElement.style.setProperty("--stzh-header-appnav-height","".concat(a.appnavHeight,"px"));document.documentElement.style.setProperty("--stzh-header-metabar-height","".concat(a.metabarHeight,"px"));if(a.appnavHeight&&!a.isSmall&&!a.preventAppnavPlaceholder){a.appnavPlaceholderElement.style.height="".concat(a.appnavHeight,"px");document.documentElement.style.setProperty("--stzh-header-sticky-appnav-height","".concat(a.appnavHeight,"px"))}else{a.appnavPlaceholderElement.style.height="0px";document.documentElement.style.setProperty("--stzh-header-sticky-appnav-height","0px")}}));a.scrollListener()}))};this.href="https://www.stadt-zuerich.ch";this.metabarStay=false;this.stickyDisabled=false;this.preventAppnavPlaceholder=false;this.logoAnalyticsId=undefined;this.hideLogo=false;this.paddingTop=undefined;this.metabarTransform=undefined;this.sticky=false;this.stickyClosing=false;this.stickyMetabar=false;this.stickyMetabarEnd=false}e.prototype.updatePosition=function(){return __awaiter(this,void 0,void 0,(function(){var e,a;var t=this;return __generator(this,(function(r){if(this.stickyDisabled){return[2]}e=function(){t.sticky=false;t.stickyClosing=false;t.paddingTop=0};if(this.scrollingUp&&this.belowStayStickyPoint){if(!this.sticky&&this.belowStartStickyPoint){this.paddingTop=this.headerHeight;this.sticky=true}this.updateMetabarPosition()}else{if(this.sticky&&this.belowStayStickyPoint){a=function(){e();t.updateMetabarPosition();t.innerElement.removeEventListener("animationend",a)};this.innerElement.addEventListener("animationend",a);this.stickyClosing=true}else{e();this.updateMetabarPosition()}}return[2]}))}))};e.prototype.scrollListener=function(){var e=this;if(this.stickyDisabled){return}readTask((function(){e.scrollTop=e.getScrollTop();e.scrollingUp=e.lastScrollTop&&e.lastScrollTop>e.scrollTop;e.lastScrollTop=e.scrollTop;e.innerHeight=e.innerElement?e.innerElement.offsetHeight:0;e.mainHeight=e.mainElement?e.mainElement.offsetHeight:0;e.logobarHeight=e.sticky?e.isSmall?e.headerHeight-e.innerHeight:e.headerHeight-e.mainHeight:e.logobarElement?e.logobarElement.offsetHeight:0;e.belowStayStickyPoint=e.scrollTop>e.logobarHeight;e.belowStartStickyPoint=e.scrollTop>e.headerHeight;e.headerOverlap=(e.headerTop-e.scrollTop)/-1;e.hideLogo=e.isSmallheader&&e.headerOverlap>10}));writeTask((function(){e.updatePosition()}))};e.prototype.getScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop};e.prototype.updateMetabarPosition=function(){if(!this.metabarElement||this.stickyDisabled){return}if(CSS&&CSS.supports&&CSS.supports("position","sticky")){return}if(this.isSmallheader&&this.headerOverlap>0&&!this.sticky&&!this.stickyClosing){if(this.headerOverlap<this.mainHeight-this.metabarHeight){this.stickyMetabar=true;this.stickyMetabarEnd=false;this.metabarTransform="translateY(0)"}else{this.stickyMetabar=false;this.stickyMetabarEnd=true;this.metabarTransform="translateY(".concat(this.logobarHeight,"px)")}}else{this.stickyMetabar=false;this.stickyMetabarEnd=false;this.metabarTransform="translateY(0)"}};e.prototype.connectedCallback=function(){this.appnavPlaceholderElement=document.createElement("div");this.element.parentElement.appendChild(this.appnavPlaceholderElement);this.resizeObserver=new ResizeObserver(this.handleResize);this.resizeObserver.observe(this.element)};e.prototype.disconnectedCallback=function(){this.appnavPlaceholderElement.parentElement.removeChild(this.appnavPlaceholderElement);if(this.resizeObserver){this.resizeObserver.disconnect()}};e.prototype.render=function(){var e=this;var a=hasSlot(this.element,"nav");var t=hasSlot(this.element,"login");var r=hasSlot(this.element,"appnav");var s=hasSlot(this.element,"langnav");var i={header:true,"header--is-sticky-disabled":this.stickyDisabled,"header--sticky":this.sticky,"header--sticky-closing":this.stickyClosing,"header--hide-logo":this.hideLogo,"header--sticky-metabar":this.stickyMetabar,"header--sticky-metabar-end":this.stickyMetabarEnd,"header--has-metabar-stay":this.metabarStay,"header--has-empty-metabar-mobile":!t,"header--has-empty-metabar":!t&&!s&&!a,"header--has-appnav":r};return h(Host,null,h("div",{style:{paddingTop:"".concat(this.paddingTop,"px")},class:i},h("div",{class:"header__inner",ref:function(a){return e.innerElement=a}},h("div",{class:"header__main",ref:function(a){return e.mainElement=a}},h("div",{class:"header__logobar",ref:function(a){return e.logobarElement=a}},h("div",{class:"header__logobar-logo"},h("a",{href:this.href,class:"header__logo-link","s-object-id":this.logoAnalyticsId||"Header Logo"},h("slot",{name:"logo"})))),h("div",{class:"header__metabar",style:{transform:this.metabarTransform},ref:function(a){return e.metabarElement=a}},h("div",{class:"header__metabar-inner"},h("div",{class:"header__metabar-nav"},h("slot",{name:"nav"})),h("div",{class:"header__metabar-login"},h("slot",{name:"login"})),h("div",{class:"header__metabar-langnav"},h("slot",{name:"langnav"}))))),h("div",{class:"header__appnav",ref:function(a){return e.appnavElement=a}},h("div",{class:"header__appnav-inner"},h("slot",{name:"appnav"}))))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();StzhHeader.style=stzhHeaderCss;export{StzhHeader as stzh_header};
|
|
2
2
|
//# sourceMappingURL=stzh-header.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["stzhHeaderCss","StzhHeader","this","handleResize","_this","stickyDisabled","debounceResize","window","cancelAnimationFrame","requestAnimationFrame","readTask","isSmall","media","matches","isSmallheader","headerTop","element","offsetTop","headerHeight","offsetHeight","appnavHeight","appnavElement","metabarHeight","metabarElement","writeTask","document","documentElement","style","setProperty","concat","preventAppnavPlaceholder","appnavPlaceholderElement","height","scrollListener","class_1","prototype","updatePosition","removeSticky","sticky","stickyClosing","paddingTop","scrollingUp","belowStayStickyPoint","belowStartStickyPoint","updateMetabarPosition","animationEnd_1","innerElement","removeEventListener","addEventListener","scrollTop","getScrollTop","lastScrollTop","innerHeight","mainHeight","mainElement","logobarHeight","logobarElement","headerOverlap","hideLogo","pageYOffset","CSS","supports","stickyMetabar","stickyMetabarEnd","metabarTransform","connectedCallback","createElement","parentElement","appendChild","resizeObserver","ResizeObserver","observe","disconnectedCallback","removeChild","disconnect","render","navSlotUsed","hasSlot","loginSlotUsed","appnavSlotUsed","langNavSlotUsed","classes","header","metabarStay","h","Host","class","ref","el","href","logoAnalyticsId","name","transform"],"sources":["src/components/stzh-header/stzh-header.scss?tag=stzh-header&encapsulation=scoped","src/components/stzh-header/stzh-header.tsx"],"sourcesContent":["/**\n * @prop --stzh-header-height: **Global**: Height of header (readonly variable)\n * @prop --stzh-header-appnav-height: **Global**: Height of appnav header if exists (readonly variable)\n * @prop --stzh-header-metabar-height: **Global**: Height of metabar header (readonly variable)\n * @prop --stzh-header-sticky-appnav-height: **Global**: Height of appnav header if he is sticky (readonly variable)\n */\n\n@keyframes stzh-header-open {\n\tfrom {\n\t\ttransform: translateY(-100%);\n\t}\n\n\tto {\n\t\ttransform: translateY(0%);\n\t}\n}\n\n@keyframes stzh-header-close {\n\tfrom {\n\t\ttransform: translateY(0%);\n\t}\n\n\tto {\n\t\ttransform: translateY(-100%);\n\t}\n}\n\n:host {\n ::slotted(img[slot=\"logo\"]) {\n width: auto;\n height: 100%;\n }\n\n ::slotted(stzh-popover[slot=\"login\"]) {\n display: flex;\n flex-grow: 1;\n\n .stzh-popover,\n .stzh-popover__trigger {\n display: flex;\n flex-grow: 1;\n }\n\n .stzh-popover .stzh-popover__trigger stzh-button .stzh-button {\n @include fontSize('micro');\n height: auto;\n\n @include mq($to: smallheader) {\n border-radius: 0;\n height: 100%;\n }\n\n &__badge {\n @include mq($to: smallheader) {\n top: 8px;\n right: 7px;\n }\n }\n }\n }\n}\n\n.header {\n &__inner {\n transition: box-shadow $baseTransitionAnimationSpeed;\n }\n\n &__main {\n position: relative;\n z-index: $zIndexHeader;\n display: flex;\n flex-direction: column;\n position: relative;\n box-shadow: $boxShadowHeader;\n background-color: $colorWhite;\n transition: box-shadow $baseTransitionAnimationSpeed;\n\n @include mq($from: smallheader) {\n box-shadow: none;\n flex-direction: column-reverse;\n border-bottom: 1px solid $baseBorderColor;\n padding-top: $headerMetabarHeightRegularUp;\n\n @supports (position: sticky) {\n padding-top: 0;\n }\n }\n }\n\n &__metabar {\n border-top: 1px solid $baseBorderColor;\n\n @include mq($from: smallheader) {\n border-top: none;\n background-color: $colorGrey5;\n z-index: 1;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n\n @supports (position: sticky) {\n position: sticky;\n }\n }\n }\n\n &__metabar-inner {\n @include container;\n display: flex;\n align-items: stretch;\n height: $headerMetabarHeight;\n\n\t\t@include mq($to: smallheader) {\n // overwrite container margin for smallheader\n // to be able to use fullwidth of metabar\n margin: 0 auto;\n }\n\n\t\t@include mq($from: smallheader) {\n justify-content: flex-end;\n align-items: center;\n height: $headerMetabarHeightRegularUp;\n }\n }\n\n &__metabar-nav,\n &__metabar-langnav {\n display: none;\n\n @include mq($from: smallheader) {\n display: inline-flex;\n }\n }\n\n &__metabar-login {\n display: flex;\n flex-basis: 50%;\n\n &:not(:empty) {\n \t\t@include mq($from: smallheader) {\n flex-basis: auto;\n margin-left: space('small');\n }\n }\n }\n\n &__metabar-langnav {\n &:not(:empty) {\n @include mq($from: smallheader) {\n margin-left: space('medium');\n }\n }\n }\n\n &__logobar {\n display: flex;\n background-color: $colorPrimary;\n }\n\n &__logobar-logo {\n box-sizing: content-box;\n display: flex;\n background-color: $colorWhite;\n overflow: hidden;\n width: calc(100% - #{$headerMetabarHeight} - 1px);\n\n\t\t@include mq($from: smallheader) {\n width: 400px;\n }\n\n\t\t@include mq($from: large) {\n\t\t width: 460px;\n\t\t}\n\n\t\t@include mq($from: ultra) {\n \t\tpadding-left: calc((100vw - #{$containerMaxWidth} - var(--stzh-scrollbar-width, 0px)) / 2);\n\t\t}\n }\n\n &__logo-link {\n flex-grow: 1;\n display: inline-flex;\n\t\theight: 76px;\n padding: space('medium');\n padding-left: $containerMargin;\n transition: opacity $baseTransitionAnimationSpeed;\n\n\t\t@include mq($from: small) {\n\t\t\tpadding-left: $containerMarginSmall;\n\t\t}\n\n\t\t@include mq($from: smallheader) {\n\t\t\theight: 90px;\n\t\t}\n\n\t\t@include mq($from: large) {\n\t\t\theight: 120px;\n padding: space('large');\n\t\t\tpadding-left: $containerMarginLarge;\n }\n\n\t\t@include mq($from: ultra) {\n padding-left: 0;\n }\n }\n\n &__appnav {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: calc(#{$zIndexHeader} - 1);\n box-shadow: $boxShadowHeader;\n background-color: $colorWhite;\n\n @include mq($from: small) {\n position: static;\n box-shadow: none;\n }\n }\n\n &__appnav-inner {\n @include mq($from: small) {\n @include container;\n }\n }\n\n /* Hide logo */\n\n &--hide-logo &__logo-link {\n opacity: 0;\n }\n\n /* Has empty metabar */\n\n &--has-empty-metabar-mobile &__metabar {\n @include mq($to: smallheader) {\n display: none;\n }\n }\n\n /* Has empty metabar */\n\n &--has-empty-metabar &__metabar {\n display: none;\n }\n\n /* Metabar Stay */\n\n &--has-metabar-stay &__metabar-langnav {\n @include mq($to: smallheader) {\n display: inline-flex;\n }\n }\n\n &--has-metabar-stay &__metabar-nav {\n @include mq($to: smallheader) {\n display: inline-flex;\n }\n }\n\n &--has-metabar-stay &__main {\n @include mq($to: smallheader) {\n box-shadow: none;\n flex-direction: column-reverse;\n border-bottom: 1px solid $baseBorderColor;\n }\n }\n\n &--has-metabar-stay &__metabar {\n @include mq($to: smallheader) {\n display: block;\n border-top: none;\n background-color: $colorGrey5;\n }\n }\n\n &--has-metabar-stay &__metabar-inner {\n @include mq($to: smallheader) {\n @include container;\n justify-content: flex-end;\n align-items: center;\n }\n }\n\n /* Sticky metabar */\n\n &--sticky-metabar:not(#{&}--sticky):not(#{&}--is-sticky-disabled) &__metabar {\n @include mq($from: smallheader) {\n position: fixed;\n }\n }\n\n /* Sticky variant */\n\n &--sticky &__inner {\n\t\t@include mq($from: small) {\n animation: stzh-header-open $baseTransitionAnimationSpeed;\n z-index: $zIndexHeader;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n margin: 0;\n box-shadow: $boxShadowHeader;\n }\n }\n\n &--sticky &__main {\n\t\t@include mq($to: small) {\n animation: stzh-header-open $baseTransitionAnimationSpeed;\n z-index: $zIndexHeader;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n margin: 0;\n }\n\n\t\t@include mq($from: small) {\n box-shadow: none;\n }\n }\n\n &--sticky &__appnav {\n\t\t@include mq($to: smallheader) {\n border-top: 1px solid $baseBorderColor;\n }\n }\n\n &--sticky &__metabar {\n border-top: none;\n }\n\n &--sticky#{&}--has-empty-metabar &__metabar {\n display: none;\n }\n\n &--sticky#{&}--has-empty-metabar:not(#{&}--has-appnav) &__main {\n\t\t@include mq($from: small) {\n border-bottom: none;\n }\n }\n\n &--sticky &__logobar {\n display: none;\n }\n\n &--sticky#{&}--has-metabar-stay &__main {\n\t\t@include mq($to: small) {\n box-shadow: $boxShadowHeader;\n }\n }\n\n /* Sticky closing */\n\n &--sticky-closing &__inner {\n\t\t@include mq($from: small) {\n animation: stzh-header-close $baseTransitionAnimationSpeed;\n }\n }\n\n &--sticky-closing &__main {\n\t\t@include mq($to: small) {\n animation: stzh-header-close $baseTransitionAnimationSpeed;\n }\n }\n\n /* Sticky disabled */\n\n &--is-sticky-disabled &__main {\n @include mq($from: smallheader) {\n @supports (position: sticky) {\n padding-top: $headerMetabarHeightRegularUp;\n }\n }\n }\n\n &--is-sticky-disabled &__metabar {\n @include mq($from: smallheader) {\n @supports (position: sticky) {\n position: absolute;\n }\n }\n }\n}\n","import {\n Component,\n Element,\n Listen,\n Host,\n State,\n h,\n writeTask,\n readTask,\n Method,\n Prop,\n} from \"@stencil/core\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { media } from \"../../utils/media-utils\";\n\n/**\n * @slot logo - Slot for brand logo\n * @slot nav - Slot for `stzh-metanav` element\n * @slot login - Slot for login button\n * @slot appnav - Slot for `stzh-appnav` element\n * @slot langnav - Slot for `stzh-langnav` element\n */\n@Component({\n tag: \"stzh-header\",\n styleUrl: \"stzh-header.scss\",\n scoped: true\n})\nexport class StzhHeader {\n /** Portal link (for logo) */\n @Prop() href: string = \"https://www.stadt-zuerich.ch\";\n\n /** Whether grey metabar should stay (on top) on mobile */\n @Prop() metabarStay: boolean = false;\n\n /** Whether sticky behaviour should be disabled */\n @Prop() stickyDisabled: boolean = false;\n\n /**\n * Prevent creating a appnav placeholder element\n * with the size of appnav inside header parent element.\n * This prevents the fixed appnav to overlap\n * content at the end on mikro breakpoint,\n * but could lead to problems with certain layouts.\n */\n @Prop() preventAppnavPlaceholder: boolean = false;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the logo link element.\n * Default value is \"Header Logo\".\n */\n @Prop() logoAnalyticsId: string;\n\n @State() hideLogo: boolean = false;\n @State() paddingTop: number;\n @State() metabarTransform: string;\n @State() sticky: boolean = false;\n @State() stickyClosing: boolean = false;\n @State() stickyMetabar: boolean = false;\n @State() stickyMetabarEnd: boolean = false;\n\n @Element() element: HTMLStzhHeaderElement;\n\n /** Update position / sticky state of header */\n @Method()\n async updatePosition() {\n if (this.stickyDisabled) {\n return;\n }\n\n const removeSticky = () => {\n this.sticky = false;\n this.stickyClosing = false;\n this.paddingTop = 0;\n }\n\n if (this.scrollingUp && this.belowStayStickyPoint) {\n if (!this.sticky && this.belowStartStickyPoint) {\n this.paddingTop = this.headerHeight;\n this.sticky = true;\n }\n\n this.updateMetabarPosition();\n } else {\n if (this.sticky && this.belowStayStickyPoint) {\n const animationEnd = () => {\n removeSticky();\n this.updateMetabarPosition();\n this.innerElement.removeEventListener(\"animationend\", animationEnd);\n };\n\n this.innerElement.addEventListener(\"animationend\", animationEnd);\n this.stickyClosing = true;\n } else {\n removeSticky();\n this.updateMetabarPosition();\n }\n }\n }\n\n @Listen(\"scroll\", { target: \"window\" })\n scrollListener() {\n if (this.stickyDisabled) {\n return;\n }\n\n readTask(() => {\n this.scrollTop = this.getScrollTop();\n this.scrollingUp = this.lastScrollTop && this.lastScrollTop > this.scrollTop;\n this.lastScrollTop = this.scrollTop;\n\n this.innerHeight = this.innerElement ? this.innerElement.offsetHeight : 0;\n this.mainHeight = this.mainElement ? this.mainElement.offsetHeight : 0;\n\n this.logobarHeight = this.sticky\n ? this.isSmall\n ? this.headerHeight - this.innerHeight\n : this.headerHeight - this.mainHeight\n : this.logobarElement\n ? this.logobarElement.offsetHeight\n : 0;\n\n this.belowStayStickyPoint = this.scrollTop > this.logobarHeight;\n this.belowStartStickyPoint = this.scrollTop > this.headerHeight;\n\n this.headerOverlap = (this.headerTop - this.scrollTop) / -1;\n this.hideLogo = this.isSmallheader && this.headerOverlap > 10;\n });\n\n writeTask(() => {\n this.updatePosition();\n });\n }\n\n private scrollTop: number;\n private lastScrollTop: number;\n private headerOverlap: number;\n private scrollingUp: boolean;\n private belowStayStickyPoint: boolean;\n private belowStartStickyPoint: boolean;\n\n private headerTop: number;\n private headerHeight: number;\n private innerHeight: number;\n private mainHeight: number;\n private metabarHeight: number;\n private logobarHeight: number;\n private appnavHeight: number;\n\n private isSmall: boolean;\n private isSmallheader: boolean;\n\n private debounceResize: number;\n private resizeObserver: ResizeObserver;\n\n private innerElement: HTMLDivElement;\n private mainElement: HTMLDivElement;\n private logobarElement: HTMLDivElement;\n private metabarElement: HTMLDivElement;\n private appnavElement: HTMLDivElement;\n private appnavPlaceholderElement: HTMLDivElement;\n\n private handleResize = () => {\n if (this.stickyDisabled) {\n return;\n }\n\n if (this.debounceResize) {\n window.cancelAnimationFrame(this.debounceResize);\n }\n\n this.debounceResize = requestAnimationFrame(() => {\n readTask(() => {\n this.isSmall = media(\"small\").matches;\n this.isSmallheader = media(\"smallheader\").matches;\n\n this.headerTop = this.element.offsetTop;\n this.headerHeight = this.element.offsetHeight;\n this.appnavHeight = this.appnavElement ? this.appnavElement.offsetHeight : 0;\n this.metabarHeight = this.metabarElement ? this.metabarElement.offsetHeight : 0;\n });\n\n writeTask(() => {\n document.documentElement.style.setProperty('--stzh-header-height', `${this.headerHeight}px`);\n document.documentElement.style.setProperty('--stzh-header-appnav-height', `${this.appnavHeight}px`);\n document.documentElement.style.setProperty('--stzh-header-metabar-height', `${this.metabarHeight}px`);\n\n if (this.appnavHeight && !this.isSmall && !this.preventAppnavPlaceholder) {\n this.appnavPlaceholderElement.style.height = `${this.appnavHeight}px`;\n document.documentElement.style.setProperty('--stzh-header-sticky-appnav-height', `${this.appnavHeight}px`);\n } else {\n this.appnavPlaceholderElement.style.height = \"0px\";\n document.documentElement.style.setProperty('--stzh-header-sticky-appnav-height', \"0px\");\n }\n });\n\n this.scrollListener();\n });\n }\n\n private getScrollTop() {\n return window.pageYOffset || document.documentElement.scrollTop;\n }\n\n private updateMetabarPosition() {\n if (!this.metabarElement || this.stickyDisabled) {\n return;\n }\n\n if (CSS && CSS.supports && CSS.supports(\"position\", \"sticky\")) {\n return;\n }\n\n if (this.isSmallheader && this.headerOverlap > 0 && !this.sticky && !this.stickyClosing) {\n if (this.headerOverlap < this.mainHeight - this.metabarHeight) {\n this.stickyMetabar = true;\n this.stickyMetabarEnd = false;\n this.metabarTransform = \"translateY(0)\";\n } else {\n this.stickyMetabar = false;\n this.stickyMetabarEnd = true;\n this.metabarTransform = `translateY(${this.logobarHeight}px)`;\n }\n } else {\n this.stickyMetabar = false;\n this.stickyMetabarEnd = false;\n this.metabarTransform = \"translateY(0)\";\n }\n }\n\n connectedCallback() {\n this.appnavPlaceholderElement = document.createElement(\"div\");\n this.element.parentElement.appendChild(this.appnavPlaceholderElement);\n\n this.resizeObserver = new ResizeObserver(this.handleResize);\n this.resizeObserver.observe(this.element);\n }\n\n disconnectedCallback() {\n this.appnavPlaceholderElement.parentElement.removeChild(this.appnavPlaceholderElement);\n\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const navSlotUsed: boolean = hasSlot(this.element, \"nav\");\n const loginSlotUsed: boolean = hasSlot(this.element, \"login\");\n const appnavSlotUsed: boolean = hasSlot(this.element, \"appnav\");\n const langNavSlotUsed = hasSlot(this.element, \"langnav\");\n\n const classes = {\n \"header\": true,\n \"header--is-sticky-disabled\": this.stickyDisabled,\n \"header--sticky\": this.sticky,\n \"header--sticky-closing\": this.stickyClosing,\n \"header--hide-logo\": this.hideLogo,\n \"header--sticky-metabar\": this.stickyMetabar,\n \"header--sticky-metabar-end\": this.stickyMetabarEnd,\n \"header--has-metabar-stay\": this.metabarStay,\n \"header--has-empty-metabar-mobile\": !loginSlotUsed, // check for searchfield and burger slot when implemented\n \"header--has-empty-metabar\": !loginSlotUsed && !langNavSlotUsed && !navSlotUsed,\n \"header--has-appnav\": appnavSlotUsed\n };\n\n return (\n <Host>\n <div style={{paddingTop: `${this.paddingTop}px`}} class={classes}>\n <div\n class=\"header__inner\"\n ref={(el) => (this.innerElement = el as HTMLDivElement)}\n >\n <div\n class=\"header__main\"\n ref={(el) => (this.mainElement = el as HTMLDivElement)}\n >\n <div\n class=\"header__logobar\"\n ref={(el) => (this.logobarElement = el as HTMLDivElement)}\n >\n <div class=\"header__logobar-logo\">\n <a href={this.href} class=\"header__logo-link\" s-object-id={this.logoAnalyticsId || \"Header Logo\"}>\n <slot name=\"logo\"></slot>\n </a>\n </div>\n </div>\n\n <div\n class=\"header__metabar\"\n style={{transform: this.metabarTransform}}\n ref={(el) => (this.metabarElement = el as HTMLDivElement)}\n >\n <div class=\"header__metabar-inner\">\n <div class=\"header__metabar-nav\">\n <slot name=\"nav\"></slot>\n </div>\n <div class=\"header__metabar-login\">\n <slot name=\"login\"></slot>\n </div>\n <div class=\"header__metabar-langnav\">\n <slot name=\"langnav\"></slot>\n </div>\n </div>\n </div>\n </div>\n\n <div\n class=\"header__appnav\"\n ref={(el) => (this.appnavElement = el as HTMLDivElement)}\n >\n <div class=\"header__appnav-inner\">\n <slot name=\"appnav\"></slot>\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"isDAAA,IAAMA,cAAgB,uiZ,IC4BTC,WAAU,W,kDAuIbC,KAAAC,aAAe,WACrB,GAAIC,EAAKC,eAAgB,CACvB,M,CAGF,GAAID,EAAKE,eAAgB,CACvBC,OAAOC,qBAAqBJ,EAAKE,e,CAGnCF,EAAKE,eAAiBG,uBAAsB,WAC1CC,UAAS,WACPN,EAAKO,QAAUC,MAAM,SAASC,QAC9BT,EAAKU,cAAgBF,MAAM,eAAeC,QAE1CT,EAAKW,UAAYX,EAAKY,QAAQC,UAC9Bb,EAAKc,aAAed,EAAKY,QAAQG,aACjCf,EAAKgB,aAAehB,EAAKiB,cAAgBjB,EAAKiB,cAAcF,aAAe,EAC3Ef,EAAKkB,cAAgBlB,EAAKmB,eAAiBnB,EAAKmB,eAAeJ,aAAe,C,IAGhFK,WAAU,WACRC,SAASC,gBAAgBC,MAAMC,YAAY,uBAAwB,GAAAC,OAAGzB,EAAKc,aAAY,OACvFO,SAASC,gBAAgBC,MAAMC,YAAY,8BAA+B,GAAAC,OAAGzB,EAAKgB,aAAY,OAC9FK,SAASC,gBAAgBC,MAAMC,YAAY,+BAAgC,GAAAC,OAAGzB,EAAKkB,cAAa,OAEhG,GAAIlB,EAAKgB,eAAiBhB,EAAKO,UAAYP,EAAK0B,yBAA0B,CACxE1B,EAAK2B,yBAAyBJ,MAAMK,OAAS,GAAAH,OAAGzB,EAAKgB,aAAY,MACjEK,SAASC,gBAAgBC,MAAMC,YAAY,qCAAsC,GAAAC,OAAGzB,EAAKgB,aAAY,M,KAChG,CACLhB,EAAK2B,yBAAyBJ,MAAMK,OAAS,MAC7CP,SAASC,gBAAgBC,MAAMC,YAAY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AAMO,KAAK,WAEbP,EAAA,OAAKE,MAAM,2BACTF,EAAA,QAAMO,KAAK,gBAMnBP,EAAA,OACEE,MAAM,iBACNC,IAAK,SAACC,GAAE,OAAMpF,EAAKiB,cAAgBmE,CAA3B,GAERJ,EAAA,OAAKE,MAAM,wBACTF,EAAA,QAAMO,KAAK,e,qIA7RJ,G"}
|
|
1
|
+
{"version":3,"names":["stzhHeaderCss","StzhHeader","this","handleResize","_this","stickyDisabled","debounceResize","window","cancelAnimationFrame","requestAnimationFrame","readTask","isSmall","media","matches","isSmallheader","headerTop","element","offsetTop","headerHeight","offsetHeight","appnavHeight","appnavElement","metabarHeight","metabarElement","writeTask","document","documentElement","style","setProperty","concat","preventAppnavPlaceholder","appnavPlaceholderElement","height","scrollListener","class_1","prototype","updatePosition","removeSticky","sticky","stickyClosing","paddingTop","scrollingUp","belowStayStickyPoint","belowStartStickyPoint","updateMetabarPosition","animationEnd_1","innerElement","removeEventListener","addEventListener","scrollTop","getScrollTop","lastScrollTop","innerHeight","mainHeight","mainElement","logobarHeight","logobarElement","headerOverlap","hideLogo","pageYOffset","CSS","supports","stickyMetabar","stickyMetabarEnd","metabarTransform","connectedCallback","createElement","parentElement","appendChild","resizeObserver","ResizeObserver","observe","disconnectedCallback","removeChild","disconnect","render","navSlotUsed","hasSlot","loginSlotUsed","appnavSlotUsed","langNavSlotUsed","classes","header","metabarStay","h","Host","class","ref","el","href","logoAnalyticsId","name","transform"],"sources":["src/components/stzh-header/stzh-header.scss?tag=stzh-header&encapsulation=scoped","src/components/stzh-header/stzh-header.tsx"],"sourcesContent":["/**\n * @prop --stzh-header-height: **Global**: Height of header (readonly variable)\n * @prop --stzh-header-appnav-height: **Global**: Height of appnav header if exists (readonly variable)\n * @prop --stzh-header-metabar-height: **Global**: Height of metabar header (readonly variable)\n * @prop --stzh-header-sticky-appnav-height: **Global**: Height of appnav header if he is sticky (readonly variable)\n */\n\n@keyframes stzh-header-open {\n\tfrom {\n\t\ttransform: translateY(-100%);\n\t}\n\n\tto {\n\t\ttransform: translateY(0%);\n\t}\n}\n\n@keyframes stzh-header-close {\n\tfrom {\n\t\ttransform: translateY(0%);\n\t}\n\n\tto {\n\t\ttransform: translateY(-100%);\n\t}\n}\n\n:host {\n ::slotted(img[slot=\"logo\"]) {\n width: auto;\n height: 100%;\n }\n\n ::slotted(stzh-popover[slot=\"login\"]) {\n display: flex;\n flex-grow: 1;\n\n .stzh-popover,\n .stzh-popover__trigger {\n display: flex;\n flex-grow: 1;\n }\n\n .stzh-popover .stzh-popover__trigger stzh-button .stzh-button {\n @include fontSize('micro');\n height: auto;\n\n @include mq($to: smallheader) {\n border-radius: 0;\n height: 100%;\n }\n\n &__badge {\n @include mq($to: smallheader) {\n top: 8px;\n right: 7px;\n }\n }\n }\n }\n}\n\n.header {\n &__inner {\n transition: box-shadow $baseTransitionAnimationSpeed;\n }\n\n &__main {\n position: relative;\n z-index: $zIndexHeader;\n display: flex;\n flex-direction: column;\n position: relative;\n box-shadow: $boxShadowHeader;\n background-color: $colorWhite;\n transition: box-shadow $baseTransitionAnimationSpeed;\n\n @include mq($from: smallheader) {\n box-shadow: none;\n flex-direction: column-reverse;\n border-bottom: 1px solid $baseBorderColor;\n padding-top: $headerMetabarHeightRegularUp;\n\n @supports (position: sticky) {\n padding-top: 0;\n }\n }\n }\n\n &__metabar {\n border-top: 1px solid $baseBorderColor;\n\n @include mq($from: smallheader) {\n border-top: none;\n background-color: $colorGrey5;\n z-index: 1;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n\n @supports (position: sticky) {\n position: sticky;\n }\n }\n }\n\n &__metabar-inner {\n @include container;\n display: flex;\n align-items: stretch;\n height: $headerMetabarHeight;\n\n\t\t@include mq($to: smallheader) {\n // overwrite container margin for smallheader\n // to be able to use fullwidth of metabar\n margin: 0 auto;\n }\n\n\t\t@include mq($from: smallheader) {\n justify-content: flex-end;\n align-items: center;\n height: $headerMetabarHeightRegularUp;\n }\n }\n\n &__metabar-nav,\n &__metabar-langnav {\n display: none;\n\n @include mq($from: smallheader) {\n display: inline-flex;\n }\n }\n\n &__metabar-login {\n display: flex;\n flex-basis: 50%;\n\n &:not(:empty) {\n \t\t@include mq($from: smallheader) {\n flex-basis: auto;\n margin-left: space('small');\n }\n }\n }\n\n &__metabar-langnav {\n &:not(:empty) {\n @include mq($from: smallheader) {\n margin-left: space('medium');\n }\n }\n }\n\n &__logobar {\n display: flex;\n background-color: $colorPrimary;\n }\n\n &__logobar-logo {\n box-sizing: content-box;\n display: flex;\n background-color: $colorWhite;\n overflow: hidden;\n width: calc(100% - #{$headerMetabarHeight} - 1px);\n\n\t\t@include mq($from: smallheader) {\n width: 400px;\n }\n\n\t\t@include mq($from: large) {\n\t\t width: 460px;\n\t\t}\n\n\t\t@include mq($from: ultra) {\n \t\tpadding-left: calc((100vw - #{$containerMaxWidth} - var(--stzh-scrollbar-width, 0px)) / 2);\n\t\t}\n }\n\n &__logo-link {\n flex-grow: 1;\n display: inline-flex;\n\t\theight: 76px;\n padding: space('medium');\n padding-left: $containerMargin;\n transition: opacity $baseTransitionAnimationSpeed;\n\n\t\t@include mq($from: small) {\n\t\t\tpadding-left: $containerMarginSmall;\n\t\t}\n\n\t\t@include mq($from: smallheader) {\n\t\t\theight: 90px;\n\t\t}\n\n\t\t@include mq($from: large) {\n\t\t\theight: 120px;\n padding: space('large');\n\t\t\tpadding-left: $containerMarginLarge;\n }\n\n\t\t@include mq($from: ultra) {\n padding-left: 0;\n }\n }\n\n &__appnav {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: calc(#{$zIndexHeader} - 1);\n box-shadow: $boxShadowHeader;\n background-color: $colorWhite;\n\n @include mq($from: small) {\n position: static;\n box-shadow: none;\n }\n }\n\n &__appnav-inner {\n @include mq($from: small) {\n @include container;\n }\n }\n\n /* Hide logo */\n\n &--hide-logo &__logo-link {\n opacity: 0;\n }\n\n /* Has empty metabar */\n\n &--has-empty-metabar-mobile &__metabar {\n @include mq($to: smallheader) {\n display: none;\n }\n }\n\n /* Has empty metabar */\n\n &--has-empty-metabar &__metabar {\n display: none;\n }\n\n /* Metabar Stay */\n\n &--has-metabar-stay &__metabar-langnav {\n @include mq($to: smallheader) {\n display: inline-flex;\n }\n }\n\n &--has-metabar-stay &__metabar-nav {\n @include mq($to: smallheader) {\n display: inline-flex;\n }\n }\n\n &--has-metabar-stay &__main {\n @include mq($to: smallheader) {\n box-shadow: none;\n flex-direction: column-reverse;\n border-bottom: 1px solid $baseBorderColor;\n }\n }\n\n &--has-metabar-stay &__metabar {\n @include mq($to: smallheader) {\n display: block;\n border-top: none;\n background-color: $colorGrey5;\n }\n }\n\n &--has-metabar-stay &__metabar-inner {\n @include mq($to: smallheader) {\n @include container;\n justify-content: flex-end;\n align-items: center;\n }\n }\n\n /* Sticky metabar */\n\n &--sticky-metabar:not(#{&}--sticky):not(#{&}--is-sticky-disabled) &__metabar {\n @include mq($from: smallheader) {\n position: fixed;\n }\n }\n\n /* Sticky variant */\n\n &--sticky &__inner {\n\t\t@include mq($from: small) {\n animation: stzh-header-open $baseTransitionAnimationSpeed;\n z-index: $zIndexHeader;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n margin: 0;\n box-shadow: $boxShadowHeader;\n }\n }\n\n &--sticky &__main {\n\t\t@include mq($to: small) {\n animation: stzh-header-open $baseTransitionAnimationSpeed;\n z-index: $zIndexHeader;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n margin: 0;\n }\n\n\t\t@include mq($from: small) {\n box-shadow: none;\n }\n }\n\n &--sticky &__appnav {\n\t\t@include mq($to: smallheader) {\n border-top: 1px solid $baseBorderColor;\n }\n }\n\n &--sticky &__metabar {\n border-top: none;\n }\n\n &--sticky#{&}--has-empty-metabar &__metabar {\n display: none;\n }\n\n &--sticky#{&}--has-empty-metabar:not(#{&}--has-appnav) &__main {\n\t\t@include mq($from: small) {\n border-bottom: none;\n }\n }\n\n &--sticky &__logobar {\n display: none;\n }\n\n &--sticky#{&}--has-metabar-stay &__main {\n\t\t@include mq($to: small) {\n box-shadow: $boxShadowHeader;\n }\n }\n\n /* Sticky closing */\n\n &--sticky-closing &__inner {\n\t\t@include mq($from: small) {\n animation: stzh-header-close $baseTransitionAnimationSpeed;\n }\n }\n\n &--sticky-closing &__main {\n\t\t@include mq($to: small) {\n animation: stzh-header-close $baseTransitionAnimationSpeed;\n }\n }\n\n /* Sticky disabled */\n\n &--is-sticky-disabled &__main {\n @include mq($from: smallheader) {\n @supports (position: sticky) {\n padding-top: $headerMetabarHeightRegularUp;\n }\n }\n }\n\n &--is-sticky-disabled &__metabar {\n @include mq($from: smallheader) {\n @supports (position: sticky) {\n position: absolute;\n }\n }\n }\n}\n","import {\n Component,\n Element,\n Listen,\n Host,\n State,\n h,\n writeTask,\n readTask,\n Method,\n Prop,\n} from \"@stencil/core\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { media } from \"../../utils/media-utils\";\n\n/**\n * @slot logo - Slot for brand logo\n * @slot nav - Slot for `stzh-metanav` element\n * @slot login - Slot for login button\n * @slot appnav - Slot for `stzh-appnav` element\n * @slot langnav - Slot for `stzh-langnav` element\n */\n@Component({\n tag: \"stzh-header\",\n styleUrl: \"stzh-header.scss\",\n scoped: true\n})\nexport class StzhHeader {\n /** Portal link (for logo) */\n @Prop() href: string = \"https://www.stadt-zuerich.ch\";\n\n /** Whether grey metabar should stay (on top) on mobile */\n @Prop() metabarStay: boolean = false;\n\n /** Whether sticky behaviour should be disabled */\n @Prop() stickyDisabled: boolean = false;\n\n /**\n * Prevent creating a appnav placeholder element\n * with the size of appnav inside header parent element.\n * This prevents the fixed appnav to overlap\n * content at the end on mikro breakpoint,\n * but could lead to problems with certain layouts.\n */\n @Prop() preventAppnavPlaceholder: boolean = false;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the logo link element.\n * Default value is \"Header Logo\".\n */\n @Prop() logoAnalyticsId: string;\n\n @State() hideLogo: boolean = false;\n @State() paddingTop: number;\n @State() metabarTransform: string;\n @State() sticky: boolean = false;\n @State() stickyClosing: boolean = false;\n @State() stickyMetabar: boolean = false;\n @State() stickyMetabarEnd: boolean = false;\n\n @Element() element: HTMLStzhHeaderElement;\n\n /** Update position / sticky state of header */\n @Method()\n async updatePosition() {\n if (this.stickyDisabled) {\n return;\n }\n\n const removeSticky = () => {\n this.sticky = false;\n this.stickyClosing = false;\n this.paddingTop = 0;\n }\n\n if (this.scrollingUp && this.belowStayStickyPoint) {\n if (!this.sticky && this.belowStartStickyPoint) {\n this.paddingTop = this.headerHeight;\n this.sticky = true;\n }\n\n this.updateMetabarPosition();\n } else {\n if (this.sticky && this.belowStayStickyPoint) {\n const animationEnd = () => {\n removeSticky();\n this.updateMetabarPosition();\n this.innerElement.removeEventListener(\"animationend\", animationEnd);\n };\n\n this.innerElement.addEventListener(\"animationend\", animationEnd);\n this.stickyClosing = true;\n } else {\n removeSticky();\n this.updateMetabarPosition();\n }\n }\n }\n\n @Listen(\"scroll\", { target: \"window\" })\n scrollListener() {\n if (this.stickyDisabled) {\n return;\n }\n\n readTask(() => {\n this.scrollTop = this.getScrollTop();\n this.scrollingUp = this.lastScrollTop && this.lastScrollTop > this.scrollTop;\n this.lastScrollTop = this.scrollTop;\n\n this.innerHeight = this.innerElement ? this.innerElement.offsetHeight : 0;\n this.mainHeight = this.mainElement ? this.mainElement.offsetHeight : 0;\n\n this.logobarHeight = this.sticky\n ? this.isSmall\n ? this.headerHeight - this.innerHeight\n : this.headerHeight - this.mainHeight\n : this.logobarElement\n ? this.logobarElement.offsetHeight\n : 0;\n\n this.belowStayStickyPoint = this.scrollTop > this.logobarHeight;\n this.belowStartStickyPoint = this.scrollTop > this.headerHeight;\n\n this.headerOverlap = (this.headerTop - this.scrollTop) / -1;\n this.hideLogo = this.isSmallheader && this.headerOverlap > 10;\n });\n\n writeTask(() => {\n this.updatePosition();\n });\n }\n\n private scrollTop: number;\n private lastScrollTop: number;\n private headerOverlap: number;\n private scrollingUp: boolean;\n private belowStayStickyPoint: boolean;\n private belowStartStickyPoint: boolean;\n\n private headerTop: number;\n private headerHeight: number;\n private innerHeight: number;\n private mainHeight: number;\n private metabarHeight: number;\n private logobarHeight: number;\n private appnavHeight: number;\n\n private isSmall: boolean;\n private isSmallheader: boolean;\n\n private debounceResize: number;\n private resizeObserver: ResizeObserver;\n\n private innerElement: HTMLDivElement;\n private mainElement: HTMLDivElement;\n private logobarElement: HTMLDivElement;\n private metabarElement: HTMLDivElement;\n private appnavElement: HTMLDivElement;\n private appnavPlaceholderElement: HTMLDivElement;\n\n private handleResize = () => {\n if (this.stickyDisabled) {\n return;\n }\n\n if (this.debounceResize) {\n window.cancelAnimationFrame(this.debounceResize);\n }\n\n this.debounceResize = requestAnimationFrame(() => {\n readTask(() => {\n this.isSmall = media(\"small\").matches;\n this.isSmallheader = media(\"smallheader\").matches;\n\n this.headerTop = this.element.offsetTop;\n this.headerHeight = this.element.offsetHeight;\n this.appnavHeight = this.appnavElement ? this.appnavElement.offsetHeight : 0;\n this.metabarHeight = this.metabarElement ? this.metabarElement.offsetHeight : 0;\n });\n\n writeTask(() => {\n document.documentElement.style.setProperty('--stzh-header-height', `${this.headerHeight}px`);\n document.documentElement.style.setProperty('--stzh-header-appnav-height', `${this.appnavHeight}px`);\n document.documentElement.style.setProperty('--stzh-header-metabar-height', `${this.metabarHeight}px`);\n\n if (this.appnavHeight && !this.isSmall && !this.preventAppnavPlaceholder) {\n this.appnavPlaceholderElement.style.height = `${this.appnavHeight}px`;\n document.documentElement.style.setProperty('--stzh-header-sticky-appnav-height', `${this.appnavHeight}px`);\n } else {\n this.appnavPlaceholderElement.style.height = \"0px\";\n document.documentElement.style.setProperty('--stzh-header-sticky-appnav-height', \"0px\");\n }\n });\n\n this.scrollListener();\n });\n }\n\n private getScrollTop() {\n return window.pageYOffset || document.documentElement.scrollTop;\n }\n\n private updateMetabarPosition() {\n if (!this.metabarElement || this.stickyDisabled) {\n return;\n }\n\n if (CSS && CSS.supports && CSS.supports(\"position\", \"sticky\")) {\n return;\n }\n\n if (this.isSmallheader && this.headerOverlap > 0 && !this.sticky && !this.stickyClosing) {\n if (this.headerOverlap < this.mainHeight - this.metabarHeight) {\n this.stickyMetabar = true;\n this.stickyMetabarEnd = false;\n this.metabarTransform = \"translateY(0)\";\n } else {\n this.stickyMetabar = false;\n this.stickyMetabarEnd = true;\n this.metabarTransform = `translateY(${this.logobarHeight}px)`;\n }\n } else {\n this.stickyMetabar = false;\n this.stickyMetabarEnd = false;\n this.metabarTransform = \"translateY(0)\";\n }\n }\n\n connectedCallback() {\n this.appnavPlaceholderElement = document.createElement(\"div\");\n this.element.parentElement.appendChild(this.appnavPlaceholderElement);\n\n this.resizeObserver = new ResizeObserver(this.handleResize);\n this.resizeObserver.observe(this.element);\n }\n\n disconnectedCallback() {\n this.appnavPlaceholderElement.parentElement.removeChild(this.appnavPlaceholderElement);\n\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const navSlotUsed: boolean = hasSlot(this.element, \"nav\");\n const loginSlotUsed: boolean = hasSlot(this.element, \"login\");\n const appnavSlotUsed: boolean = hasSlot(this.element, \"appnav\");\n const langNavSlotUsed = hasSlot(this.element, \"langnav\");\n\n const classes = {\n \"header\": true,\n \"header--is-sticky-disabled\": this.stickyDisabled,\n \"header--sticky\": this.sticky,\n \"header--sticky-closing\": this.stickyClosing,\n \"header--hide-logo\": this.hideLogo,\n \"header--sticky-metabar\": this.stickyMetabar,\n \"header--sticky-metabar-end\": this.stickyMetabarEnd,\n \"header--has-metabar-stay\": this.metabarStay,\n \"header--has-empty-metabar-mobile\": !loginSlotUsed, // check for searchfield and burger slot when implemented\n \"header--has-empty-metabar\": !loginSlotUsed && !langNavSlotUsed && !navSlotUsed,\n \"header--has-appnav\": appnavSlotUsed\n };\n\n return (\n <Host>\n <div style={{paddingTop: `${this.paddingTop}px`}} class={classes}>\n <div\n class=\"header__inner\"\n ref={(el) => (this.innerElement = el as HTMLDivElement)}\n >\n <div\n class=\"header__main\"\n ref={(el) => (this.mainElement = el as HTMLDivElement)}\n >\n <div\n class=\"header__logobar\"\n ref={(el) => (this.logobarElement = el as HTMLDivElement)}\n >\n <div class=\"header__logobar-logo\">\n <a href={this.href} class=\"header__logo-link\" s-object-id={this.logoAnalyticsId || \"Header Logo\"}>\n <slot name=\"logo\"></slot>\n </a>\n </div>\n </div>\n\n <div\n class=\"header__metabar\"\n style={{transform: this.metabarTransform}}\n ref={(el) => (this.metabarElement = el as HTMLDivElement)}\n >\n <div class=\"header__metabar-inner\">\n <div class=\"header__metabar-nav\">\n <slot name=\"nav\"></slot>\n </div>\n <div class=\"header__metabar-login\">\n <slot name=\"login\"></slot>\n </div>\n <div class=\"header__metabar-langnav\">\n <slot name=\"langnav\"></slot>\n </div>\n </div>\n </div>\n </div>\n\n <div\n class=\"header__appnav\"\n ref={(el) => (this.appnavElement = el as HTMLDivElement)}\n >\n <div class=\"header__appnav-inner\">\n <slot name=\"appnav\"></slot>\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"isDAAA,IAAMA,cAAgB,u3Z,IC4BTC,WAAU,W,kDAuIbC,KAAAC,aAAe,WACrB,GAAIC,EAAKC,eAAgB,CACvB,M,CAGF,GAAID,EAAKE,eAAgB,CACvBC,OAAOC,qBAAqBJ,EAAKE,e,CAGnCF,EAAKE,eAAiBG,uBAAsB,WAC1CC,UAAS,WACPN,EAAKO,QAAUC,MAAM,SAASC,QAC9BT,EAAKU,cAAgBF,MAAM,eAAeC,QAE1CT,EAAKW,UAAYX,EAAKY,QAAQC,UAC9Bb,EAAKc,aAAed,EAAKY,QAAQG,aACjCf,EAAKgB,aAAehB,EAAKiB,cAAgBjB,EAAKiB,cAAcF,aAAe,EAC3Ef,EAAKkB,cAAgBlB,EAAKmB,eAAiBnB,EAAKmB,eAAeJ,aAAe,C,IAGhFK,WAAU,WACRC,SAASC,gBAAgBC,MAAMC,YAAY,uBAAwB,GAAAC,OAAGzB,EAAKc,aAAY,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