@zanichelli/albe-web-components 16.0.0-rc2 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/dist/cjs/{index-7ce01c0e.js → index-066b8da0.js} +5 -5
- package/dist/cjs/{index-7ce01c0e.js.map → index-066b8da0.js.map} +1 -1
- package/dist/cjs/{index-f31d0e66.js → index-1890445d.js} +3 -3
- package/dist/cjs/{index-f31d0e66.js.map → index-1890445d.js.map} +1 -1
- package/dist/cjs/{index-19279b08.js → index-1f9f28df.js} +3 -3
- package/dist/cjs/{index-19279b08.js.map → index-1f9f28df.js.map} +1 -1
- package/dist/cjs/{index-a83e999c.js → index-5cc0f0ca.js} +5 -6
- package/dist/cjs/index-5cc0f0ca.js.map +1 -0
- package/dist/cjs/{index-48cf79d4.js → index-98822eac.js} +6 -6
- package/dist/cjs/{index-48cf79d4.js.map → index-98822eac.js.map} +1 -1
- package/dist/cjs/{index-94f7957c.js → index-b361709b.js} +3 -3
- package/dist/cjs/{index-94f7957c.js.map → index-b361709b.js.map} +1 -1
- package/dist/cjs/{index-e3835c94.js → index-bab7a651.js} +3 -1
- package/dist/cjs/index-bab7a651.js.map +1 -0
- package/dist/cjs/{index-5dc4a8de.js → index-e801ae96.js} +55 -2
- package/dist/cjs/index-e801ae96.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{utils-0d3ac1c1.js → utils-311316ce.js} +2 -2
- package/dist/cjs/{utils-0d3ac1c1.js.map → utils-311316ce.js.map} +1 -1
- package/dist/cjs/{utils-1a8655c7.js → utils-6bd8c55e.js} +2 -2
- package/dist/cjs/{utils-1a8655c7.js.map → utils-6bd8c55e.js.map} +1 -1
- package/dist/cjs/web-components-library.cjs.js +2 -2
- package/dist/cjs/z-accordion.cjs.entry.js +3 -3
- package/dist/cjs/z-alert.cjs.entry.js +2 -2
- package/dist/cjs/z-anchor-navigation.cjs.entry.js +3 -3
- package/dist/cjs/z-app-header-deprecated.cjs.entry.js +158 -0
- package/dist/cjs/z-app-header-deprecated.cjs.entry.js.map +1 -0
- package/dist/cjs/z-app-header_12.cjs.entry.js +197 -67
- package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
- package/dist/cjs/z-aria-alert.cjs.entry.js +3 -3
- package/dist/cjs/z-avatar.cjs.entry.js +4 -4
- package/dist/cjs/z-book-card.cjs.entry.js +4 -4
- package/dist/cjs/z-breadcrumb.cjs.entry.js +5 -5
- package/dist/cjs/z-button-sort.cjs.entry.js +2 -2
- package/dist/cjs/z-card.cjs.entry.js +2 -2
- package/dist/cjs/z-carousel.cjs.entry.js +2 -2
- package/dist/cjs/z-chip.cjs.entry.js +4 -4
- package/dist/cjs/z-combobox.cjs.entry.js +4 -4
- package/dist/cjs/z-cover-hero.cjs.entry.js +4 -4
- package/dist/cjs/z-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +8 -8
- package/dist/cjs/z-file-upload.cjs.entry.js +4 -4
- package/dist/cjs/z-file.cjs.entry.js +3 -3
- package/dist/cjs/z-ghost-loading.cjs.entry.js +2 -2
- package/dist/cjs/z-info-box.cjs.entry.js +2 -2
- package/dist/cjs/z-info-reveal.cjs.entry.js +3 -3
- package/dist/cjs/z-logo.cjs.entry.js +2 -2
- package/dist/cjs/z-menu-deprecated.cjs.entry.js +115 -0
- package/dist/cjs/z-menu-deprecated.cjs.entry.js.map +1 -0
- package/dist/cjs/z-menu-section-deprecated.cjs.entry.js +60 -0
- package/dist/cjs/z-menu-section-deprecated.cjs.entry.js.map +1 -0
- package/dist/cjs/z-menu-section.cjs.entry.js +92 -4
- package/dist/cjs/z-menu-section.cjs.entry.js.map +1 -1
- package/dist/cjs/z-menu.cjs.entry.js +121 -10
- package/dist/cjs/z-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/z-myz-card-alert.cjs.entry.js +3 -3
- package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +3 -3
- package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-card-footer.cjs.entry.js +3 -3
- package/dist/cjs/z-myz-card-icon.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-card-info.cjs.entry.js +4 -4
- package/dist/cjs/z-myz-card-list.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-card_4.cjs.entry.js +6 -6
- package/dist/cjs/z-myz-list-item.cjs.entry.js +4 -4
- package/dist/cjs/z-myz-list.cjs.entry.js +2 -2
- package/dist/cjs/z-navigation-tabs.cjs.entry.js +4 -4
- package/dist/cjs/z-notification.cjs.entry.js +2 -2
- package/dist/cjs/z-otp.cjs.entry.js +4 -4
- package/dist/cjs/z-pagination.cjs.entry.js +2 -2
- package/dist/cjs/z-panel-elem.cjs.entry.js +3 -3
- package/dist/cjs/z-popover.cjs.entry.js +3 -3
- package/dist/cjs/z-range-picker.cjs.entry.js +3 -3
- package/dist/cjs/z-section-title.cjs.entry.js +3 -3
- package/dist/cjs/z-select.cjs.entry.js +4 -4
- package/dist/cjs/z-skip-to-content.cjs.entry.js +4 -4
- package/dist/cjs/z-slideshow.cjs.entry.js +3 -3
- package/dist/cjs/z-stepper-item.cjs.entry.js +2 -2
- package/dist/cjs/z-stepper.cjs.entry.js +2 -2
- package/dist/cjs/z-table.cjs.entry.js +10 -10
- package/dist/cjs/z-tbody.cjs.entry.js +2 -2
- package/dist/cjs/z-td.cjs.entry.js +3 -3
- package/dist/cjs/z-tfoot.cjs.entry.js +2 -2
- package/dist/cjs/z-th.cjs.entry.js +3 -3
- package/dist/cjs/z-thead.cjs.entry.js +2 -2
- package/dist/cjs/z-toast-notification-list.cjs.entry.js +3 -3
- package/dist/cjs/z-toast-notification.cjs.entry.js +3 -3
- package/dist/cjs/z-toggle-button.cjs.entry.js +3 -3
- package/dist/cjs/z-toggle-switch.cjs.entry.js +6 -6
- package/dist/cjs/z-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/z-tr.cjs.entry.js +6 -6
- package/dist/cjs/z-visually-hidden.cjs.entry.js +2 -2
- package/dist/collection/assets/orientamento.svg +14 -0
- package/dist/collection/beans/index.js +2 -0
- package/dist/collection/beans/index.js.map +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/deprecated/z-app-header-deprecated/index.js +420 -0
- package/dist/collection/components/deprecated/z-app-header-deprecated/index.js.map +1 -0
- package/dist/collection/components/deprecated/z-app-header-deprecated/index.spec.js +203 -0
- package/dist/collection/components/deprecated/z-app-header-deprecated/index.spec.js.map +1 -0
- package/dist/collection/components/deprecated/z-app-header-deprecated/index.stories.js +635 -0
- package/dist/collection/components/deprecated/z-app-header-deprecated/index.stories.js.map +1 -0
- package/dist/collection/components/deprecated/z-app-header-deprecated/styles.css +441 -0
- package/dist/collection/components/deprecated/z-menu-deprecated/index.js +244 -0
- package/dist/collection/components/deprecated/z-menu-deprecated/index.js.map +1 -0
- package/dist/collection/components/deprecated/z-menu-deprecated/index.spec.js +120 -0
- package/dist/collection/components/deprecated/z-menu-deprecated/index.spec.js.map +1 -0
- package/dist/collection/components/deprecated/z-menu-deprecated/index.stories.js +129 -0
- package/dist/collection/components/deprecated/z-menu-deprecated/index.stories.js.map +1 -0
- package/dist/collection/components/deprecated/z-menu-deprecated/styles.css +217 -0
- package/dist/collection/components/deprecated/z-menu-section-deprecated/index.js +131 -0
- package/dist/collection/components/deprecated/z-menu-section-deprecated/index.js.map +1 -0
- package/dist/collection/components/deprecated/z-menu-section-deprecated/index.spec.js +50 -0
- package/dist/collection/components/deprecated/z-menu-section-deprecated/index.spec.js.map +1 -0
- package/dist/collection/components/deprecated/z-menu-section-deprecated/index.stories.js +41 -0
- package/dist/collection/components/deprecated/z-menu-section-deprecated/index.stories.js.map +1 -0
- package/dist/collection/components/deprecated/z-menu-section-deprecated/styles.css +123 -0
- package/dist/collection/components/file-upload/z-dragdrop-area/index.js +2 -2
- package/dist/collection/components/file-upload/z-file/index.js +1 -1
- package/dist/collection/components/file-upload/z-file-upload/index.js +1 -1
- package/dist/collection/components/list/z-list/index.js +1 -1
- package/dist/collection/components/list/z-list-element/index.js +1 -1
- package/dist/collection/components/list/z-list-group/index.js +2 -2
- package/dist/collection/components/table/cells/z-td/index.js +2 -27
- package/dist/collection/components/table/cells/z-td/index.js.map +1 -1
- package/dist/collection/components/table/cells/z-td/styles.css +0 -4
- package/dist/collection/components/table/cells/z-th/index.js +1 -1
- package/dist/collection/components/table/cells/z-th/styles.css +0 -4
- package/dist/collection/components/table/z-table/index.js +1 -1
- package/dist/collection/components/table/z-tbody/index.js +1 -1
- package/dist/collection/components/table/z-tfoot/index.js +1 -1
- package/dist/collection/components/table/z-thead/index.js +1 -1
- package/dist/collection/components/table/z-tr/index.js +1 -1
- package/dist/collection/components/z-accordion/index.js +1 -1
- package/dist/collection/components/z-anchor-navigation/index.js +1 -1
- package/dist/collection/components/z-app-header/index.js +215 -159
- package/dist/collection/components/z-app-header/index.js.map +1 -1
- package/dist/collection/components/z-app-header/index.spec.js +493 -79
- package/dist/collection/components/z-app-header/index.spec.js.map +1 -1
- package/dist/collection/components/z-app-header/index.stories.js +59 -369
- package/dist/collection/components/z-app-header/index.stories.js.map +1 -1
- package/dist/collection/components/z-app-header/styles.css +147 -183
- package/dist/collection/components/z-aria-alert/index.js +1 -1
- package/dist/collection/components/z-avatar/index.js +2 -2
- package/dist/collection/components/z-book-card/index.js +1 -1
- package/dist/collection/components/z-breadcrumb/index.js +2 -2
- package/dist/collection/components/z-button-sort/index.js +1 -1
- package/dist/collection/components/z-chip/index.js +2 -2
- package/dist/collection/components/z-combobox/index.js +1 -1
- package/dist/collection/components/z-cover-hero/index.js +2 -2
- package/dist/collection/components/z-divider/index.js +1 -1
- package/dist/collection/components/z-ghost-loading/index.js +1 -1
- package/dist/collection/components/z-info-box/index.js +1 -1
- package/dist/collection/components/z-info-reveal/index.js +1 -1
- package/dist/collection/components/z-input/index.js +1 -1
- package/dist/collection/components/z-input-message/index.js +1 -1
- package/dist/collection/components/z-logo/index.js +1 -1
- package/dist/collection/components/z-menu/index.js +128 -5
- package/dist/collection/components/z-menu/index.js.map +1 -1
- package/dist/collection/components/z-menu/index.spec.js +49 -33
- package/dist/collection/components/z-menu/index.spec.js.map +1 -1
- package/dist/collection/components/z-menu/index.stories.js +7 -7
- package/dist/collection/components/z-menu/index.stories.js.map +1 -1
- package/dist/collection/components/z-menu/styles.css +21 -8
- package/dist/collection/components/z-menu-section/index.js +102 -2
- package/dist/collection/components/z-menu-section/index.js.map +1 -1
- package/dist/collection/components/z-menu-section/index.spec.js +7 -7
- package/dist/collection/components/z-menu-section/index.spec.js.map +1 -1
- package/dist/collection/components/z-menu-section/index.stories.js +3 -3
- package/dist/collection/components/z-menu-section/index.stories.js.map +1 -1
- package/dist/collection/components/z-menu-section/styles.css +5 -5
- package/dist/collection/components/z-modal/index.js +4 -4
- package/dist/collection/components/z-navigation-tabs/index.js +2 -2
- package/dist/collection/components/z-notification/index.js +1 -1
- package/dist/collection/components/z-offcanvas/index.js +1 -1
- package/dist/collection/components/z-panel-elem/index.js +2 -2
- package/dist/collection/components/z-popover/index.js +1 -1
- package/dist/collection/components/z-searchbar/index.js +1 -1
- package/dist/collection/components/z-section-title/index.js +1 -1
- package/dist/collection/components/z-select/index.js +1 -1
- package/dist/collection/components/z-skip-to-content/index.js +1 -1
- package/dist/collection/components/z-stepper/index.js +1 -1
- package/dist/collection/components/z-stepper-item/index.js +1 -1
- package/dist/collection/components/z-tag/index.js +2 -2
- package/dist/collection/components/z-toast-notification/index.js +1 -1
- package/dist/collection/components/z-toast-notification-list/index.js +1 -1
- package/dist/collection/components/z-toggle-button/index.js +2 -2
- package/dist/collection/components/z-toggle-switch/index.js +3 -3
- package/dist/collection/components/z-tooltip/index.js +1 -1
- package/dist/collection/components/z-visually-hidden/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +1 -1
- package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
- package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +3 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index10.js +1 -1
- package/dist/components/index11.js +1 -1
- package/dist/components/index12.js +1 -1
- package/dist/components/index13.js +1 -1
- package/dist/components/index14.js +2 -2
- package/dist/components/index15.js +4 -4
- package/dist/components/index16.js +1 -1
- package/dist/components/index17.js +1 -1
- package/dist/components/index18.js +1 -1
- package/dist/components/index19.js +1 -1
- package/dist/components/index2.js +2 -0
- package/dist/components/index2.js.map +1 -1
- package/dist/components/index20.js +1 -1
- package/dist/components/index21.js +1 -1
- package/dist/components/index22.js +1 -1
- package/dist/components/index23.js +1 -1
- package/dist/components/index24.js +2 -2
- package/dist/components/index3.js +1 -1
- package/dist/components/index5.js +2 -2
- package/dist/components/index6.js +1 -1
- package/dist/components/index7.js +2 -2
- package/dist/components/index8.js +1 -1
- package/dist/components/z-accordion.js +1 -1
- package/dist/components/z-anchor-navigation.js +1 -1
- package/dist/components/z-app-header-deprecated.d.ts +11 -0
- package/dist/components/z-app-header-deprecated.js +255 -0
- package/dist/components/z-app-header-deprecated.js.map +1 -0
- package/dist/components/z-app-header.js +190 -60
- package/dist/components/z-app-header.js.map +1 -1
- package/dist/components/z-aria-alert.js +1 -1
- package/dist/components/z-avatar.js +2 -2
- package/dist/components/z-book-card.js +1 -1
- package/dist/components/z-breadcrumb.js +2 -2
- package/dist/components/z-button-sort.js +1 -1
- package/dist/components/z-combobox.js +1 -1
- package/dist/components/z-cover-hero.js +2 -2
- package/dist/components/z-file-upload.js +1 -1
- package/dist/components/z-file.js +1 -1
- package/dist/components/z-info-box.js +1 -1
- package/dist/components/z-info-reveal.js +1 -1
- package/dist/components/z-logo.js +1 -1
- package/dist/components/z-menu-deprecated.d.ts +11 -0
- package/dist/components/z-menu-deprecated.js +144 -0
- package/dist/components/z-menu-deprecated.js.map +1 -0
- package/dist/components/z-menu-section-deprecated.d.ts +11 -0
- package/dist/components/z-menu-section-deprecated.js +84 -0
- package/dist/components/z-menu-section-deprecated.js.map +1 -0
- package/dist/components/z-menu-section.js +92 -4
- package/dist/components/z-menu-section.js.map +1 -1
- package/dist/components/z-menu.js +117 -6
- package/dist/components/z-menu.js.map +1 -1
- package/dist/components/z-myz-card-alert.js +1 -1
- package/dist/components/z-myz-card-dictionary.js +1 -1
- package/dist/components/z-myz-card-footer-sections.js +1 -1
- package/dist/components/z-myz-card-footer.js +1 -1
- package/dist/components/z-myz-card-icon.js +1 -1
- package/dist/components/z-myz-card-info.js +1 -1
- package/dist/components/z-myz-card-list.js +1 -1
- package/dist/components/z-myz-list.js +1 -1
- package/dist/components/z-navigation-tabs.js +2 -2
- package/dist/components/z-notification.js +1 -1
- package/dist/components/z-otp.js +2 -2
- package/dist/components/z-panel-elem.js +2 -2
- package/dist/components/z-section-title.js +1 -1
- package/dist/components/z-select.js +1 -1
- package/dist/components/z-skip-to-content.js +1 -1
- package/dist/components/z-stepper-item.js +1 -1
- package/dist/components/z-stepper.js +1 -1
- package/dist/components/z-table.js +1 -1
- package/dist/components/z-tbody.js +1 -1
- package/dist/components/z-td.js +3 -5
- package/dist/components/z-td.js.map +1 -1
- package/dist/components/z-tfoot.js +1 -1
- package/dist/components/z-th.js +2 -2
- package/dist/components/z-th.js.map +1 -1
- package/dist/components/z-thead.js +1 -1
- package/dist/components/z-toast-notification-list.js +1 -1
- package/dist/components/z-toast-notification.js +1 -1
- package/dist/components/z-toggle-button.js +2 -2
- package/dist/components/z-toggle-switch.js +3 -3
- package/dist/components/z-tooltip.js +1 -1
- package/dist/components/z-tr.js +1 -1
- package/dist/components/z-visually-hidden.js +1 -1
- package/dist/esm/index-175661e6.js +18 -0
- package/dist/esm/{index-41ee4016.js.map → index-175661e6.js.map} +1 -1
- package/dist/esm/{index-aa07660e.js → index-18018bb5.js} +5 -5
- package/dist/esm/{index-aa07660e.js.map → index-18018bb5.js.map} +1 -1
- package/dist/esm/{index-497d9441.js → index-292b4dd2.js} +5 -6
- package/dist/esm/index-292b4dd2.js.map +1 -0
- package/dist/esm/{index-437f0b00.js → index-50bbb22e.js} +6 -6
- package/dist/esm/{index-437f0b00.js.map → index-50bbb22e.js.map} +1 -1
- package/dist/esm/{index-ab5f1eaa.js → index-a2130b6a.js} +55 -3
- package/dist/esm/index-a2130b6a.js.map +1 -0
- package/dist/esm/{index-ea49e441.js → index-a81f1558.js} +3 -3
- package/dist/esm/{index-ea49e441.js.map → index-a81f1558.js.map} +1 -1
- package/dist/esm/{index-cfde9cec.js → index-b556b384.js} +3 -3
- package/dist/esm/{index-cfde9cec.js.map → index-b556b384.js.map} +1 -1
- package/dist/esm/{index-a7f69d42.js → index-b7dbacb4.js} +3 -1
- package/dist/esm/index-b7dbacb4.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-f7da2c5f.js → utils-54e02183.js} +2 -2
- package/dist/esm/{utils-f7da2c5f.js.map → utils-54e02183.js.map} +1 -1
- package/dist/esm/{utils-0ce33738.js → utils-8ade9e2d.js} +2 -2
- package/dist/esm/{utils-0ce33738.js.map → utils-8ade9e2d.js.map} +1 -1
- package/dist/esm/web-components-library.js +3 -3
- package/dist/esm/z-accordion.entry.js +3 -3
- package/dist/esm/z-alert.entry.js +2 -2
- package/dist/esm/z-anchor-navigation.entry.js +3 -3
- package/dist/esm/z-app-header-deprecated.entry.js +154 -0
- package/dist/esm/z-app-header-deprecated.entry.js.map +1 -0
- package/dist/esm/z-app-header_12.entry.js +197 -67
- package/dist/esm/z-app-header_12.entry.js.map +1 -1
- package/dist/esm/z-aria-alert.entry.js +3 -3
- package/dist/esm/z-avatar.entry.js +4 -4
- package/dist/esm/z-book-card.entry.js +4 -4
- package/dist/esm/z-breadcrumb.entry.js +5 -5
- package/dist/esm/z-button-sort.entry.js +2 -2
- package/dist/esm/z-card.entry.js +2 -2
- package/dist/esm/z-carousel.entry.js +2 -2
- package/dist/esm/z-chip.entry.js +4 -4
- package/dist/esm/z-combobox.entry.js +4 -4
- package/dist/esm/z-cover-hero.entry.js +4 -4
- package/dist/esm/z-date-picker.entry.js +3 -3
- package/dist/esm/z-dragdrop-area_2.entry.js +8 -8
- package/dist/esm/z-file-upload.entry.js +4 -4
- package/dist/esm/z-file.entry.js +3 -3
- package/dist/esm/z-ghost-loading.entry.js +2 -2
- package/dist/esm/z-info-box.entry.js +2 -2
- package/dist/esm/z-info-reveal.entry.js +3 -3
- package/dist/esm/z-logo.entry.js +2 -2
- package/dist/esm/z-menu-deprecated.entry.js +111 -0
- package/dist/esm/z-menu-deprecated.entry.js.map +1 -0
- package/dist/esm/z-menu-section-deprecated.entry.js +56 -0
- package/dist/esm/z-menu-section-deprecated.entry.js.map +1 -0
- package/dist/esm/z-menu-section.entry.js +92 -4
- package/dist/esm/z-menu-section.entry.js.map +1 -1
- package/dist/esm/z-menu.entry.js +117 -6
- package/dist/esm/z-menu.entry.js.map +1 -1
- package/dist/esm/z-myz-card-alert.entry.js +3 -3
- package/dist/esm/z-myz-card-dictionary.entry.js +3 -3
- package/dist/esm/z-myz-card-footer-sections.entry.js +2 -2
- package/dist/esm/z-myz-card-footer.entry.js +3 -3
- package/dist/esm/z-myz-card-icon.entry.js +2 -2
- package/dist/esm/z-myz-card-info.entry.js +4 -4
- package/dist/esm/z-myz-card-list.entry.js +2 -2
- package/dist/esm/z-myz-card_4.entry.js +6 -6
- package/dist/esm/z-myz-list-item.entry.js +4 -4
- package/dist/esm/z-myz-list.entry.js +2 -2
- package/dist/esm/z-navigation-tabs.entry.js +4 -4
- package/dist/esm/z-notification.entry.js +2 -2
- package/dist/esm/z-otp.entry.js +4 -4
- package/dist/esm/z-pagination.entry.js +2 -2
- package/dist/esm/z-panel-elem.entry.js +3 -3
- package/dist/esm/z-popover.entry.js +3 -3
- package/dist/esm/z-range-picker.entry.js +3 -3
- package/dist/esm/z-section-title.entry.js +3 -3
- package/dist/esm/z-select.entry.js +4 -4
- package/dist/esm/z-skip-to-content.entry.js +4 -4
- package/dist/esm/z-slideshow.entry.js +3 -3
- package/dist/esm/z-stepper-item.entry.js +2 -2
- package/dist/esm/z-stepper.entry.js +2 -2
- package/dist/esm/z-table.entry.js +10 -10
- package/dist/esm/z-tbody.entry.js +2 -2
- package/dist/esm/z-td.entry.js +3 -3
- package/dist/esm/z-tfoot.entry.js +2 -2
- package/dist/esm/z-th.entry.js +3 -3
- package/dist/esm/z-thead.entry.js +2 -2
- package/dist/esm/z-toast-notification-list.entry.js +3 -3
- package/dist/esm/z-toast-notification.entry.js +3 -3
- package/dist/esm/z-toggle-button.entry.js +3 -3
- package/dist/esm/z-toggle-switch.entry.js +6 -6
- package/dist/esm/z-tooltip.entry.js +3 -3
- package/dist/esm/z-tr.entry.js +6 -6
- package/dist/esm/z-visually-hidden.entry.js +2 -2
- package/dist/types/beans/index.d.ts +3 -1
- package/dist/types/components/deprecated/z-app-header-deprecated/index.d.ts +149 -0
- package/dist/types/components/deprecated/z-app-header-deprecated/index.stories.d.ts +118 -0
- package/dist/types/components/deprecated/z-menu-deprecated/index.d.ts +61 -0
- package/dist/types/components/deprecated/z-menu-deprecated/index.stories.d.ts +27 -0
- package/dist/types/components/deprecated/z-menu-section-deprecated/index.d.ts +31 -0
- package/dist/types/components/deprecated/z-menu-section-deprecated/index.stories.d.ts +16 -0
- package/dist/types/components/table/cells/z-td/index.d.ts +1 -5
- package/dist/types/components/z-app-header/index.d.ts +33 -76
- package/dist/types/components/z-app-header/index.stories.d.ts +20 -40
- package/dist/types/components/z-menu/index.d.ts +11 -0
- package/dist/types/components/z-menu-section/index.d.ts +9 -0
- package/dist/types/components.d.ts +268 -18
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/{p-5e0acf57.entry.js → p-054484d4.entry.js} +2 -2
- package/dist/web-components-library/{p-bd75bef4.entry.js → p-05e9ae1e.entry.js} +2 -2
- package/dist/web-components-library/{p-6c5a8061.entry.js → p-12d62027.entry.js} +2 -2
- package/{www/build/p-726e1059.entry.js → dist/web-components-library/p-18690383.entry.js} +2 -2
- package/dist/web-components-library/{p-a36045c2.entry.js → p-19f8c3d2.entry.js} +2 -2
- package/dist/web-components-library/p-1edbac5f.entry.js +2 -0
- package/dist/web-components-library/{p-9ddfcfd4.entry.js → p-21b85c7f.entry.js} +2 -2
- package/dist/web-components-library/{p-f7180c65.entry.js → p-2672e36f.entry.js} +2 -2
- package/{www/build/p-4a2b4ad1.entry.js → dist/web-components-library/p-28928bb6.entry.js} +2 -2
- package/dist/web-components-library/{p-a0231723.entry.js → p-2a7e4988.entry.js} +2 -2
- package/dist/web-components-library/{p-66d70fb4.js → p-2c184714.js} +2 -2
- package/dist/web-components-library/p-304eeab0.js +2 -0
- package/dist/web-components-library/{p-09897132.entry.js → p-324ef970.entry.js} +2 -2
- package/{www/build/p-90b4d340.entry.js → dist/web-components-library/p-33eea921.entry.js} +2 -2
- package/dist/web-components-library/p-385bf4ca.entry.js +2 -0
- package/dist/web-components-library/{p-411d929f.entry.js → p-3b266de4.entry.js} +2 -2
- package/dist/web-components-library/{p-2ed68ac5.entry.js → p-4552744b.entry.js} +2 -2
- package/dist/web-components-library/{p-ebdfd7e5.entry.js → p-49e4ce84.entry.js} +2 -2
- package/dist/web-components-library/p-57eee056.entry.js +2 -0
- package/dist/web-components-library/{p-e2997191.entry.js.map → p-57eee056.entry.js.map} +1 -1
- package/{www/build/p-1efacf4c.entry.js → dist/web-components-library/p-5a5481be.entry.js} +2 -2
- package/dist/web-components-library/p-6037cdf3.js +2 -0
- package/{www/build/p-3de034cf.js.map → dist/web-components-library/p-6037cdf3.js.map} +1 -1
- package/{www/build/p-65df3290.entry.js → dist/web-components-library/p-609c11d6.entry.js} +2 -2
- package/dist/web-components-library/p-6319b5e2.entry.js +2 -0
- package/{www/build/p-467d8a16.entry.js → dist/web-components-library/p-63e970ee.entry.js} +2 -2
- package/{www/build/p-7693ae18.entry.js → dist/web-components-library/p-6586441a.entry.js} +3 -3
- package/dist/web-components-library/p-68822fbc.entry.js +2 -0
- package/dist/web-components-library/{p-493c652a.entry.js → p-6a664748.entry.js} +2 -2
- package/dist/web-components-library/p-6b2cd695.entry.js +2 -0
- package/dist/web-components-library/p-6f4dd02b.entry.js +2 -0
- package/dist/web-components-library/{p-5e45636a.entry.js.map → p-6f4dd02b.entry.js.map} +1 -1
- package/dist/web-components-library/p-74a65c6f.entry.js +2 -0
- package/{www/build/p-dde9f76d.entry.js → dist/web-components-library/p-77d8ad7e.entry.js} +2 -2
- package/{www/build/p-2190352b.js → dist/web-components-library/p-78e52a02.js} +2 -2
- package/dist/web-components-library/p-7d827c11.js +2 -0
- package/dist/web-components-library/{p-5bbb5599.entry.js → p-83350b5f.entry.js} +2 -2
- package/dist/web-components-library/p-83eff308.entry.js +2 -0
- package/dist/web-components-library/p-83eff308.entry.js.map +1 -0
- package/dist/web-components-library/{p-8df46096.entry.js → p-8499a29d.entry.js} +2 -2
- package/{www/build/p-1501c221.entry.js → dist/web-components-library/p-85f84e55.entry.js} +2 -2
- package/dist/web-components-library/{p-376208ab.entry.js → p-88e756cd.entry.js} +2 -2
- package/dist/web-components-library/p-89584f19.entry.js +2 -0
- package/dist/web-components-library/{p-b6e14c6b.entry.js.map → p-89584f19.entry.js.map} +1 -1
- package/dist/web-components-library/{p-7ce64686.entry.js → p-8a10fec5.entry.js} +2 -2
- package/dist/web-components-library/p-8a10fec5.entry.js.map +1 -0
- package/dist/web-components-library/{p-214bc293.entry.js → p-8b309268.entry.js} +2 -2
- package/dist/web-components-library/p-8c517cd7.entry.js +2 -0
- package/dist/web-components-library/p-8c517cd7.entry.js.map +1 -0
- package/dist/web-components-library/{p-0c2fdbe5.entry.js → p-8c9f7cef.entry.js} +2 -2
- package/dist/web-components-library/p-8d7323f7.entry.js +2 -0
- package/dist/web-components-library/p-8d7323f7.entry.js.map +1 -0
- package/dist/web-components-library/p-8de7ea6e.js +2 -0
- package/dist/web-components-library/{p-82dc715b.js.map → p-8de7ea6e.js.map} +1 -1
- package/dist/web-components-library/{p-f3272ec6.entry.js → p-91c04edc.entry.js} +2 -2
- package/dist/web-components-library/{p-80359658.entry.js → p-97b0c3b3.entry.js} +2 -2
- package/dist/web-components-library/{p-74e134e6.entry.js → p-99b791d1.entry.js} +2 -2
- package/dist/web-components-library/p-9f2a7cf0.js +2 -0
- package/dist/web-components-library/p-9f2a7cf0.js.map +1 -0
- package/{www/build/p-63337e8b.entry.js → dist/web-components-library/p-a4ada10b.entry.js} +2 -2
- package/dist/web-components-library/p-a5781264.entry.js +2 -0
- package/{www/build/p-14bf4619.entry.js → dist/web-components-library/p-ad76b8ff.entry.js} +2 -2
- package/dist/web-components-library/p-ae94e377.js +2 -0
- package/{www/build/p-40e4e3af.js.map → dist/web-components-library/p-ae94e377.js.map} +1 -1
- package/dist/web-components-library/{p-2c81acaa.entry.js → p-ae96bc09.entry.js} +2 -2
- package/dist/web-components-library/{p-09a9e2ca.entry.js → p-af856537.entry.js} +2 -2
- package/{www/build/p-7d5983f6.entry.js → dist/web-components-library/p-b84fa3b6.entry.js} +2 -2
- package/dist/web-components-library/{p-ff4aa84a.entry.js → p-be4878f2.entry.js} +2 -2
- package/dist/web-components-library/p-bf2a057d.entry.js +2 -0
- package/dist/web-components-library/{p-82b845c3.entry.js → p-c0bdbfb5.entry.js} +2 -2
- package/dist/web-components-library/p-c0bdbfb5.entry.js.map +1 -0
- package/dist/web-components-library/{p-464e5886.entry.js → p-c6b269ce.entry.js} +2 -2
- package/dist/web-components-library/{p-1064cb1a.entry.js → p-c90249e5.entry.js} +2 -2
- package/dist/web-components-library/p-cf2640b0.entry.js +2 -0
- package/dist/web-components-library/p-cf2640b0.entry.js.map +1 -0
- package/dist/web-components-library/p-cfa39bd3.js +3 -0
- package/dist/web-components-library/p-cfa39bd3.js.map +1 -0
- package/dist/web-components-library/p-d9e1d8c7.js +2 -0
- package/dist/web-components-library/{p-60dfcfaa.entry.js → p-df05727f.entry.js} +2 -2
- package/dist/web-components-library/p-e0323da3.entry.js +2 -0
- package/dist/web-components-library/{p-810433b1.entry.js → p-e1852de3.entry.js} +2 -2
- package/dist/web-components-library/{p-2010d544.entry.js → p-e366782c.entry.js} +2 -2
- package/dist/web-components-library/{p-f323cc0b.entry.js → p-e5dc0719.entry.js} +2 -2
- package/dist/web-components-library/{p-ea9aa3bb.entry.js → p-f21bc3a9.entry.js} +2 -2
- package/{www/build/p-a11e1d48.entry.js → dist/web-components-library/p-f74f9f3c.entry.js} +2 -2
- package/dist/web-components-library/p-f8d45aa4.entry.js +2 -0
- package/dist/web-components-library/{p-c3809d39.entry.js → p-fe87b081.entry.js} +2 -2
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/dist/web-components-library/web-components-library.esm.js.map +1 -1
- package/package.json +1 -1
- package/react/components.d.ts +3 -0
- package/react/components.js +5 -2
- package/react/components.js.map +1 -1
- package/www/assets/orientamento.svg +14 -0
- package/www/build/index.esm.js +1 -1
- package/www/build/{p-5e0acf57.entry.js → p-054484d4.entry.js} +2 -2
- package/www/build/{p-bd75bef4.entry.js → p-05e9ae1e.entry.js} +2 -2
- package/www/build/{p-6c5a8061.entry.js → p-12d62027.entry.js} +2 -2
- package/{dist/web-components-library/p-726e1059.entry.js → www/build/p-18690383.entry.js} +2 -2
- package/www/build/{p-a36045c2.entry.js → p-19f8c3d2.entry.js} +2 -2
- package/www/build/p-1edbac5f.entry.js +2 -0
- package/www/build/{p-9ddfcfd4.entry.js → p-21b85c7f.entry.js} +2 -2
- package/www/build/{p-f7180c65.entry.js → p-2672e36f.entry.js} +2 -2
- package/{dist/web-components-library/p-4a2b4ad1.entry.js → www/build/p-28928bb6.entry.js} +2 -2
- package/www/build/{p-a0231723.entry.js → p-2a7e4988.entry.js} +2 -2
- package/www/build/{p-66d70fb4.js → p-2c184714.js} +2 -2
- package/www/build/p-304eeab0.js +2 -0
- package/www/build/{p-09897132.entry.js → p-324ef970.entry.js} +2 -2
- package/{dist/web-components-library/p-90b4d340.entry.js → www/build/p-33eea921.entry.js} +2 -2
- package/www/build/p-385bf4ca.entry.js +2 -0
- package/www/build/{p-411d929f.entry.js → p-3b266de4.entry.js} +2 -2
- package/www/build/{p-2ed68ac5.entry.js → p-4552744b.entry.js} +2 -2
- package/www/build/{p-ebdfd7e5.entry.js → p-49e4ce84.entry.js} +2 -2
- package/www/build/p-57eee056.entry.js +2 -0
- package/www/build/{p-e2997191.entry.js.map → p-57eee056.entry.js.map} +1 -1
- package/{dist/web-components-library/p-1efacf4c.entry.js → www/build/p-5a5481be.entry.js} +2 -2
- package/www/build/p-6037cdf3.js +2 -0
- package/{dist/web-components-library/p-3de034cf.js.map → www/build/p-6037cdf3.js.map} +1 -1
- package/{dist/web-components-library/p-65df3290.entry.js → www/build/p-609c11d6.entry.js} +2 -2
- package/www/build/p-6319b5e2.entry.js +2 -0
- package/{dist/web-components-library/p-467d8a16.entry.js → www/build/p-63e970ee.entry.js} +2 -2
- package/{dist/web-components-library/p-7693ae18.entry.js → www/build/p-6586441a.entry.js} +3 -3
- package/www/build/p-68822fbc.entry.js +2 -0
- package/www/build/{p-493c652a.entry.js → p-6a664748.entry.js} +2 -2
- package/www/build/p-6b2cd695.entry.js +2 -0
- package/www/build/p-6f4dd02b.entry.js +2 -0
- package/www/build/{p-5e45636a.entry.js.map → p-6f4dd02b.entry.js.map} +1 -1
- package/www/build/p-74a65c6f.entry.js +2 -0
- package/www/build/p-774b449d.js +2 -0
- package/{dist/web-components-library/p-dde9f76d.entry.js → www/build/p-77d8ad7e.entry.js} +2 -2
- package/{dist/web-components-library/p-2190352b.js → www/build/p-78e52a02.js} +2 -2
- package/www/build/p-7d827c11.js +2 -0
- package/www/build/{p-5bbb5599.entry.js → p-83350b5f.entry.js} +2 -2
- package/www/build/p-83eff308.entry.js +2 -0
- package/www/build/p-83eff308.entry.js.map +1 -0
- package/www/build/{p-8df46096.entry.js → p-8499a29d.entry.js} +2 -2
- package/{dist/web-components-library/p-1501c221.entry.js → www/build/p-85f84e55.entry.js} +2 -2
- package/www/build/{p-376208ab.entry.js → p-88e756cd.entry.js} +2 -2
- package/www/build/p-89584f19.entry.js +2 -0
- package/www/build/{p-b6e14c6b.entry.js.map → p-89584f19.entry.js.map} +1 -1
- package/www/build/{p-7ce64686.entry.js → p-8a10fec5.entry.js} +2 -2
- package/www/build/p-8a10fec5.entry.js.map +1 -0
- package/www/build/{p-214bc293.entry.js → p-8b309268.entry.js} +2 -2
- package/www/build/p-8c517cd7.entry.js +2 -0
- package/www/build/p-8c517cd7.entry.js.map +1 -0
- package/www/build/{p-0c2fdbe5.entry.js → p-8c9f7cef.entry.js} +2 -2
- package/www/build/p-8d7323f7.entry.js +2 -0
- package/www/build/p-8d7323f7.entry.js.map +1 -0
- package/www/build/p-8de7ea6e.js +2 -0
- package/www/build/{p-82dc715b.js.map → p-8de7ea6e.js.map} +1 -1
- package/www/build/{p-f3272ec6.entry.js → p-91c04edc.entry.js} +2 -2
- package/www/build/{p-80359658.entry.js → p-97b0c3b3.entry.js} +2 -2
- package/www/build/{p-74e134e6.entry.js → p-99b791d1.entry.js} +2 -2
- package/www/build/p-9f2a7cf0.js +2 -0
- package/www/build/p-9f2a7cf0.js.map +1 -0
- package/{dist/web-components-library/p-63337e8b.entry.js → www/build/p-a4ada10b.entry.js} +2 -2
- package/www/build/p-a5781264.entry.js +2 -0
- package/{dist/web-components-library/p-14bf4619.entry.js → www/build/p-ad76b8ff.entry.js} +2 -2
- package/www/build/p-ae94e377.js +2 -0
- package/{dist/web-components-library/p-40e4e3af.js.map → www/build/p-ae94e377.js.map} +1 -1
- package/www/build/{p-2c81acaa.entry.js → p-ae96bc09.entry.js} +2 -2
- package/www/build/{p-09a9e2ca.entry.js → p-af856537.entry.js} +2 -2
- package/{dist/web-components-library/p-7d5983f6.entry.js → www/build/p-b84fa3b6.entry.js} +2 -2
- package/www/build/{p-ff4aa84a.entry.js → p-be4878f2.entry.js} +2 -2
- package/www/build/p-bf2a057d.entry.js +2 -0
- package/www/build/{p-82b845c3.entry.js → p-c0bdbfb5.entry.js} +2 -2
- package/www/build/p-c0bdbfb5.entry.js.map +1 -0
- package/www/build/{p-464e5886.entry.js → p-c6b269ce.entry.js} +2 -2
- package/www/build/{p-1064cb1a.entry.js → p-c90249e5.entry.js} +2 -2
- package/www/build/p-cf2640b0.entry.js +2 -0
- package/www/build/p-cf2640b0.entry.js.map +1 -0
- package/www/build/p-cfa39bd3.js +3 -0
- package/www/build/p-cfa39bd3.js.map +1 -0
- package/www/build/p-d9e1d8c7.js +2 -0
- package/www/build/{p-60dfcfaa.entry.js → p-df05727f.entry.js} +2 -2
- package/www/build/p-e0323da3.entry.js +2 -0
- package/www/build/{p-810433b1.entry.js → p-e1852de3.entry.js} +2 -2
- package/www/build/{p-2010d544.entry.js → p-e366782c.entry.js} +2 -2
- package/www/build/{p-f323cc0b.entry.js → p-e5dc0719.entry.js} +2 -2
- package/www/build/{p-ea9aa3bb.entry.js → p-f21bc3a9.entry.js} +2 -2
- package/{dist/web-components-library/p-a11e1d48.entry.js → www/build/p-f74f9f3c.entry.js} +2 -2
- package/www/build/p-f8d45aa4.entry.js +2 -0
- package/www/build/{p-c3809d39.entry.js → p-fe87b081.entry.js} +2 -2
- package/www/build/web-components-library.esm.js +1 -1
- package/www/build/web-components-library.esm.js.map +1 -1
- package/www/index.html +1 -1
- package/dist/cjs/index-5dc4a8de.js.map +0 -1
- package/dist/cjs/index-a83e999c.js.map +0 -1
- package/dist/cjs/index-e3835c94.js.map +0 -1
- package/dist/esm/index-41ee4016.js +0 -18
- package/dist/esm/index-497d9441.js.map +0 -1
- package/dist/esm/index-a7f69d42.js.map +0 -1
- package/dist/esm/index-ab5f1eaa.js.map +0 -1
- package/dist/web-components-library/p-3de034cf.js +0 -2
- package/dist/web-components-library/p-40e4e3af.js +0 -2
- package/dist/web-components-library/p-4b27ccf0.entry.js +0 -2
- package/dist/web-components-library/p-4d1a8ee8.entry.js +0 -2
- package/dist/web-components-library/p-4d1a8ee8.entry.js.map +0 -1
- package/dist/web-components-library/p-5214f770.entry.js +0 -2
- package/dist/web-components-library/p-550b4473.entry.js +0 -2
- package/dist/web-components-library/p-5e45636a.entry.js +0 -2
- package/dist/web-components-library/p-5e734fd3.entry.js +0 -2
- package/dist/web-components-library/p-6f5b7f16.js +0 -2
- package/dist/web-components-library/p-6f5b7f16.js.map +0 -1
- package/dist/web-components-library/p-737293b2.js +0 -2
- package/dist/web-components-library/p-79766609.entry.js +0 -2
- package/dist/web-components-library/p-7cba8558.entry.js +0 -2
- package/dist/web-components-library/p-7ce64686.entry.js.map +0 -1
- package/dist/web-components-library/p-82b845c3.entry.js.map +0 -1
- package/dist/web-components-library/p-82dc715b.js +0 -2
- package/dist/web-components-library/p-93d39e70.entry.js +0 -2
- package/dist/web-components-library/p-b6e14c6b.entry.js +0 -2
- package/dist/web-components-library/p-b9078348.js +0 -2
- package/dist/web-components-library/p-cc3c02fe.js +0 -3
- package/dist/web-components-library/p-cc3c02fe.js.map +0 -1
- package/dist/web-components-library/p-e2997191.entry.js +0 -2
- package/dist/web-components-library/p-ee290d4c.entry.js +0 -2
- package/dist/web-components-library/p-f978d22d.entry.js +0 -2
- package/dist/web-components-library/p-fdd176e2.entry.js +0 -2
- package/dist/web-components-library/p-feca4075.js +0 -2
- package/www/build/p-3de034cf.js +0 -2
- package/www/build/p-40e4e3af.js +0 -2
- package/www/build/p-4b27ccf0.entry.js +0 -2
- package/www/build/p-4d1a8ee8.entry.js +0 -2
- package/www/build/p-4d1a8ee8.entry.js.map +0 -1
- package/www/build/p-5214f770.entry.js +0 -2
- package/www/build/p-550b4473.entry.js +0 -2
- package/www/build/p-5e45636a.entry.js +0 -2
- package/www/build/p-5e734fd3.entry.js +0 -2
- package/www/build/p-6f5b7f16.js +0 -2
- package/www/build/p-6f5b7f16.js.map +0 -1
- package/www/build/p-737293b2.js +0 -2
- package/www/build/p-79766609.entry.js +0 -2
- package/www/build/p-7cba8558.entry.js +0 -2
- package/www/build/p-7ce64686.entry.js.map +0 -1
- package/www/build/p-82b845c3.entry.js.map +0 -1
- package/www/build/p-82dc715b.js +0 -2
- package/www/build/p-93d39e70.entry.js +0 -2
- package/www/build/p-9bd47256.js +0 -2
- package/www/build/p-b6e14c6b.entry.js +0 -2
- package/www/build/p-b9078348.js +0 -2
- package/www/build/p-cc3c02fe.js +0 -3
- package/www/build/p-cc3c02fe.js.map +0 -1
- package/www/build/p-e2997191.entry.js +0 -2
- package/www/build/p-ee290d4c.entry.js +0 -2
- package/www/build/p-f978d22d.entry.js +0 -2
- package/www/build/p-fdd176e2.entry.js +0 -2
- package/www/build/p-feca4075.js +0 -2
- /package/dist/web-components-library/{p-5e0acf57.entry.js.map → p-054484d4.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-bd75bef4.entry.js.map → p-05e9ae1e.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-6c5a8061.entry.js.map → p-12d62027.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-726e1059.entry.js.map → p-18690383.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-a36045c2.entry.js.map → p-19f8c3d2.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-4b27ccf0.entry.js.map → p-1edbac5f.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-9ddfcfd4.entry.js.map → p-21b85c7f.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-f7180c65.entry.js.map → p-2672e36f.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-4a2b4ad1.entry.js.map → p-28928bb6.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-a0231723.entry.js.map → p-2a7e4988.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-66d70fb4.js.map → p-2c184714.js.map} +0 -0
- /package/dist/web-components-library/{p-737293b2.js.map → p-304eeab0.js.map} +0 -0
- /package/dist/web-components-library/{p-09897132.entry.js.map → p-324ef970.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-90b4d340.entry.js.map → p-33eea921.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-7cba8558.entry.js.map → p-385bf4ca.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-411d929f.entry.js.map → p-3b266de4.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-2ed68ac5.entry.js.map → p-4552744b.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-ebdfd7e5.entry.js.map → p-49e4ce84.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-1efacf4c.entry.js.map → p-5a5481be.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-65df3290.entry.js.map → p-609c11d6.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-ee290d4c.entry.js.map → p-6319b5e2.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-467d8a16.entry.js.map → p-63e970ee.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-7693ae18.entry.js.map → p-6586441a.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-5214f770.entry.js.map → p-68822fbc.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-493c652a.entry.js.map → p-6a664748.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-93d39e70.entry.js.map → p-6b2cd695.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-5e734fd3.entry.js.map → p-74a65c6f.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-dde9f76d.entry.js.map → p-77d8ad7e.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-2190352b.js.map → p-78e52a02.js.map} +0 -0
- /package/dist/web-components-library/{p-feca4075.js.map → p-7d827c11.js.map} +0 -0
- /package/dist/web-components-library/{p-5bbb5599.entry.js.map → p-83350b5f.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-8df46096.entry.js.map → p-8499a29d.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-1501c221.entry.js.map → p-85f84e55.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-376208ab.entry.js.map → p-88e756cd.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-214bc293.entry.js.map → p-8b309268.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-0c2fdbe5.entry.js.map → p-8c9f7cef.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-f3272ec6.entry.js.map → p-91c04edc.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-80359658.entry.js.map → p-97b0c3b3.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-74e134e6.entry.js.map → p-99b791d1.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-63337e8b.entry.js.map → p-a4ada10b.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-550b4473.entry.js.map → p-a5781264.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-14bf4619.entry.js.map → p-ad76b8ff.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-2c81acaa.entry.js.map → p-ae96bc09.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-09a9e2ca.entry.js.map → p-af856537.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-7d5983f6.entry.js.map → p-b84fa3b6.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-ff4aa84a.entry.js.map → p-be4878f2.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-79766609.entry.js.map → p-bf2a057d.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-464e5886.entry.js.map → p-c6b269ce.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-1064cb1a.entry.js.map → p-c90249e5.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-b9078348.js.map → p-d9e1d8c7.js.map} +0 -0
- /package/dist/web-components-library/{p-60dfcfaa.entry.js.map → p-df05727f.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-f978d22d.entry.js.map → p-e0323da3.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-810433b1.entry.js.map → p-e1852de3.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-2010d544.entry.js.map → p-e366782c.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-f323cc0b.entry.js.map → p-e5dc0719.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-ea9aa3bb.entry.js.map → p-f21bc3a9.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-a11e1d48.entry.js.map → p-f74f9f3c.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-fdd176e2.entry.js.map → p-f8d45aa4.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-c3809d39.entry.js.map → p-fe87b081.entry.js.map} +0 -0
- /package/www/build/{p-5e0acf57.entry.js.map → p-054484d4.entry.js.map} +0 -0
- /package/www/build/{p-bd75bef4.entry.js.map → p-05e9ae1e.entry.js.map} +0 -0
- /package/www/build/{p-6c5a8061.entry.js.map → p-12d62027.entry.js.map} +0 -0
- /package/www/build/{p-726e1059.entry.js.map → p-18690383.entry.js.map} +0 -0
- /package/www/build/{p-a36045c2.entry.js.map → p-19f8c3d2.entry.js.map} +0 -0
- /package/www/build/{p-4b27ccf0.entry.js.map → p-1edbac5f.entry.js.map} +0 -0
- /package/www/build/{p-9ddfcfd4.entry.js.map → p-21b85c7f.entry.js.map} +0 -0
- /package/www/build/{p-f7180c65.entry.js.map → p-2672e36f.entry.js.map} +0 -0
- /package/www/build/{p-4a2b4ad1.entry.js.map → p-28928bb6.entry.js.map} +0 -0
- /package/www/build/{p-a0231723.entry.js.map → p-2a7e4988.entry.js.map} +0 -0
- /package/www/build/{p-66d70fb4.js.map → p-2c184714.js.map} +0 -0
- /package/www/build/{p-737293b2.js.map → p-304eeab0.js.map} +0 -0
- /package/www/build/{p-09897132.entry.js.map → p-324ef970.entry.js.map} +0 -0
- /package/www/build/{p-90b4d340.entry.js.map → p-33eea921.entry.js.map} +0 -0
- /package/www/build/{p-7cba8558.entry.js.map → p-385bf4ca.entry.js.map} +0 -0
- /package/www/build/{p-411d929f.entry.js.map → p-3b266de4.entry.js.map} +0 -0
- /package/www/build/{p-2ed68ac5.entry.js.map → p-4552744b.entry.js.map} +0 -0
- /package/www/build/{p-ebdfd7e5.entry.js.map → p-49e4ce84.entry.js.map} +0 -0
- /package/www/build/{p-1efacf4c.entry.js.map → p-5a5481be.entry.js.map} +0 -0
- /package/www/build/{p-65df3290.entry.js.map → p-609c11d6.entry.js.map} +0 -0
- /package/www/build/{p-ee290d4c.entry.js.map → p-6319b5e2.entry.js.map} +0 -0
- /package/www/build/{p-467d8a16.entry.js.map → p-63e970ee.entry.js.map} +0 -0
- /package/www/build/{p-7693ae18.entry.js.map → p-6586441a.entry.js.map} +0 -0
- /package/www/build/{p-5214f770.entry.js.map → p-68822fbc.entry.js.map} +0 -0
- /package/www/build/{p-493c652a.entry.js.map → p-6a664748.entry.js.map} +0 -0
- /package/www/build/{p-93d39e70.entry.js.map → p-6b2cd695.entry.js.map} +0 -0
- /package/www/build/{p-5e734fd3.entry.js.map → p-74a65c6f.entry.js.map} +0 -0
- /package/www/build/{p-dde9f76d.entry.js.map → p-77d8ad7e.entry.js.map} +0 -0
- /package/www/build/{p-2190352b.js.map → p-78e52a02.js.map} +0 -0
- /package/www/build/{p-feca4075.js.map → p-7d827c11.js.map} +0 -0
- /package/www/build/{p-5bbb5599.entry.js.map → p-83350b5f.entry.js.map} +0 -0
- /package/www/build/{p-8df46096.entry.js.map → p-8499a29d.entry.js.map} +0 -0
- /package/www/build/{p-1501c221.entry.js.map → p-85f84e55.entry.js.map} +0 -0
- /package/www/build/{p-376208ab.entry.js.map → p-88e756cd.entry.js.map} +0 -0
- /package/www/build/{p-214bc293.entry.js.map → p-8b309268.entry.js.map} +0 -0
- /package/www/build/{p-0c2fdbe5.entry.js.map → p-8c9f7cef.entry.js.map} +0 -0
- /package/www/build/{p-f3272ec6.entry.js.map → p-91c04edc.entry.js.map} +0 -0
- /package/www/build/{p-80359658.entry.js.map → p-97b0c3b3.entry.js.map} +0 -0
- /package/www/build/{p-74e134e6.entry.js.map → p-99b791d1.entry.js.map} +0 -0
- /package/www/build/{p-63337e8b.entry.js.map → p-a4ada10b.entry.js.map} +0 -0
- /package/www/build/{p-550b4473.entry.js.map → p-a5781264.entry.js.map} +0 -0
- /package/www/build/{p-14bf4619.entry.js.map → p-ad76b8ff.entry.js.map} +0 -0
- /package/www/build/{p-2c81acaa.entry.js.map → p-ae96bc09.entry.js.map} +0 -0
- /package/www/build/{p-09a9e2ca.entry.js.map → p-af856537.entry.js.map} +0 -0
- /package/www/build/{p-7d5983f6.entry.js.map → p-b84fa3b6.entry.js.map} +0 -0
- /package/www/build/{p-ff4aa84a.entry.js.map → p-be4878f2.entry.js.map} +0 -0
- /package/www/build/{p-79766609.entry.js.map → p-bf2a057d.entry.js.map} +0 -0
- /package/www/build/{p-464e5886.entry.js.map → p-c6b269ce.entry.js.map} +0 -0
- /package/www/build/{p-1064cb1a.entry.js.map → p-c90249e5.entry.js.map} +0 -0
- /package/www/build/{p-b9078348.js.map → p-d9e1d8c7.js.map} +0 -0
- /package/www/build/{p-60dfcfaa.entry.js.map → p-df05727f.entry.js.map} +0 -0
- /package/www/build/{p-f978d22d.entry.js.map → p-e0323da3.entry.js.map} +0 -0
- /package/www/build/{p-810433b1.entry.js.map → p-e1852de3.entry.js.map} +0 -0
- /package/www/build/{p-2010d544.entry.js.map → p-e366782c.entry.js.map} +0 -0
- /package/www/build/{p-f323cc0b.entry.js.map → p-e5dc0719.entry.js.map} +0 -0
- /package/www/build/{p-ea9aa3bb.entry.js.map → p-f21bc3a9.entry.js.map} +0 -0
- /package/www/build/{p-a11e1d48.entry.js.map → p-f74f9f3c.entry.js.map} +0 -0
- /package/www/build/{p-fdd176e2.entry.js.map → p-f8d45aa4.entry.js.map} +0 -0
- /package/www/build/{p-c3809d39.entry.js.map → p-fe87b081.entry.js.map} +0 -0
|
@@ -1,67 +1,22 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
2
|
-
import { ButtonVariant, ControlSize, OffCanvasVariant, TransitionDirection } from "../../beans";
|
|
1
|
+
import { Fragment, Host, h } from "@stencil/core";
|
|
2
|
+
import { ButtonVariant, ControlSize, Device, KeyboardCode, OffCanvasVariant, TransitionDirection } from "../../beans";
|
|
3
|
+
import { getDevice } from "../../utils/utils";
|
|
3
4
|
const SUPPORT_INTERSECTION_OBSERVER = typeof IntersectionObserver !== "undefined";
|
|
4
5
|
/**
|
|
5
6
|
* @slot title - Slot for the main title
|
|
6
|
-
* @slot subtitle - Slot for the bottom subtitle. It will not appear in stuck header.
|
|
7
7
|
* @slot top-subtitle - Slot for the top subtitle. It will not appear in stuck header.
|
|
8
8
|
* @slot stucked-title - Title for the stuck header. By default it uses the text from the `title` slot.
|
|
9
|
-
* @
|
|
10
|
-
* @cssprop --app-header-typography-2-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `28px`.
|
|
11
|
-
* @cssprop --app-header-typography-3-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `32px`.
|
|
12
|
-
* @cssprop --app-header-typography-4-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `36px`.
|
|
13
|
-
* @cssprop --app-header-typography-5-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `42px`.
|
|
14
|
-
* @cssprop --app-header-typography-6-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `48px`.
|
|
15
|
-
* @cssprop --app-header-typography-7-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `54px`.
|
|
16
|
-
* @cssprop --app-header-typography-8-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `60px`.
|
|
17
|
-
* @cssprop --app-header-typography-9-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `68px`.
|
|
18
|
-
* @cssprop --app-header-typography-10-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `76px`.
|
|
19
|
-
* @cssprop --app-header-typography-11-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `84px`.
|
|
20
|
-
* @cssprop --app-header-typography-12-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `92px`.
|
|
21
|
-
* @cssprop --app-header-typography-1-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.33`.
|
|
22
|
-
* @cssprop --app-header-typography-2-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.29`.
|
|
23
|
-
* @cssprop --app-header-typography-3-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.25`.
|
|
24
|
-
* @cssprop --app-header-typography-4-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.24`.
|
|
25
|
-
* @cssprop --app-header-typography-5-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.24`.
|
|
26
|
-
* @cssprop --app-header-typography-6-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.25`.
|
|
27
|
-
* @cssprop --app-header-typography-7-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.2`.
|
|
28
|
-
* @cssprop --app-header-typography-8-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.26`.
|
|
29
|
-
* @cssprop --app-header-typography-9-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.24`.
|
|
30
|
-
* @cssprop --app-header-typography-10-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.26`.
|
|
31
|
-
* @cssprop --app-header-typography-11-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.2`.
|
|
32
|
-
* @cssprop --app-header-typography-12-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.2`.
|
|
33
|
-
* @cssprop --app-header-typography-1-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-0.2 / 1em)`.
|
|
34
|
-
* @cssprop --app-header-typography-2-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-0.4 / 1em)`.
|
|
35
|
-
* @cssprop --app-header-typography-3-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-0.6 / 1em)`.
|
|
36
|
-
* @cssprop --app-header-typography-4-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-0.8 / 1em)`.
|
|
37
|
-
* @cssprop --app-header-typography-5-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1 / 1em)`.
|
|
38
|
-
* @cssprop --app-header-typography-6-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1.2 / 1em)`.
|
|
39
|
-
* @cssprop --app-header-typography-7-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1.4 / 1em)`.
|
|
40
|
-
* @cssprop --app-header-typography-8-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1.6 / 1em)`.
|
|
41
|
-
* @cssprop --app-header-typography-9-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1.8 / 1em)`.
|
|
42
|
-
* @cssprop --app-header-typography-10-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-2 / 1em)`.
|
|
43
|
-
* @cssprop --app-header-typography-11-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-2.2 / 1em)`.
|
|
44
|
-
* @cssprop --app-header-typography-12-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-2.4 / 1em)`.
|
|
9
|
+
* @slot product-logo - To insert the product logo, it should be used with an img tag.
|
|
45
10
|
* @cssprop --app-header-content-max-width - Use it to set header's content max width. Useful when the project use a fixed width layout. Defaults to `100%`.
|
|
46
|
-
* @cssprop --app-header-height - Defaults to `auto`.
|
|
47
11
|
* @cssprop --app-header-top-offset - Top offset for the stuck header. Useful when there are other fixed elements above the header. Defaults to `48px` (the height of the main topbar).
|
|
48
12
|
* @cssprop --app-header-drawer-trigger-size - The size of the drawer icon. Defaults to `--space-unit * 4`.
|
|
49
13
|
* @cssprop --app-header-bg - Header background color. Defaults to `--color-surface01`.
|
|
50
14
|
* @cssprop --app-header-stucked-bg - Stuck header background color. Defaults to `--color-surface01`.
|
|
51
|
-
* @cssprop --app-header-text-color - Text color. Useful on `hero` variant to set text color based on the colors of the background image. Defaults to `--color-default-text`.
|
|
52
|
-
* @cssprop --app-header-title-font-size - Variable to customize the title's font size.
|
|
53
|
-
* NOTE: Only use one of the exported `--app-header-typography-*-size` as a value.
|
|
54
|
-
* Defaults to `--app-header-typography-3-size`.
|
|
55
|
-
* @cssprop --app-header-title-lineheight - Variable to customize the title's line-height.
|
|
56
|
-
* NOTE: Only use one of the exported `--app-header-typography-*-lineheight` as a value and use the same level as the one of the font size.
|
|
57
|
-
* Defaults to `--app-header-typography-3-lineheight`.
|
|
58
|
-
* @cssprop --app-header-title-letter-spacing - Variable to customize the title's letter-spacing.
|
|
59
|
-
* NOTE: Only use one of the exported `--app-header-typography-*-tracking` as a value and use the same level as the one of the font size.
|
|
60
|
-
* Defaults to `--app-header-typography-3-tracking`.
|
|
61
15
|
* @cssprop --app-header-stucked-text-color - Stuck header text color. Defaults to `--color-default-text`.
|
|
62
16
|
*/
|
|
63
17
|
export class ZAppHeader {
|
|
64
18
|
constructor() {
|
|
19
|
+
this.currentIndex = -1;
|
|
65
20
|
this.observer = SUPPORT_INTERSECTION_OBSERVER &&
|
|
66
21
|
new IntersectionObserver(([entry]) => {
|
|
67
22
|
this._stuck = !entry.isIntersecting;
|
|
@@ -69,31 +24,77 @@ export class ZAppHeader {
|
|
|
69
24
|
threshold: 0.5,
|
|
70
25
|
});
|
|
71
26
|
this.stuck = false;
|
|
72
|
-
this.
|
|
73
|
-
this.overlay = false;
|
|
74
|
-
this.flow = "auto";
|
|
75
|
-
this.drawerOpen = false;
|
|
27
|
+
this.enableOffcanvas = false;
|
|
76
28
|
this.enableSearch = false;
|
|
77
29
|
this.searchPlaceholder = "Cerca";
|
|
78
30
|
this.searchString = "";
|
|
79
31
|
this.searchPageUrl = undefined;
|
|
32
|
+
this.enableZLogo = true;
|
|
80
33
|
this._stuck = false;
|
|
81
|
-
this.currentViewport =
|
|
34
|
+
this.currentViewport = Device.MOBILE;
|
|
82
35
|
this.menuLength = undefined;
|
|
36
|
+
this.drawerOpen = false;
|
|
83
37
|
this.openDrawer = this.openDrawer.bind(this);
|
|
84
38
|
this.closeDrawer = this.closeDrawer.bind(this);
|
|
85
39
|
this.collectMenuElements = this.collectMenuElements.bind(this);
|
|
86
40
|
}
|
|
87
41
|
evaluateViewport() {
|
|
88
|
-
|
|
89
|
-
|
|
42
|
+
this.currentViewport = getDevice();
|
|
43
|
+
}
|
|
44
|
+
handleKeyDown(e) {
|
|
45
|
+
if (e.code === KeyboardCode.ESC && this.drawerOpen) {
|
|
46
|
+
this.closeDrawer();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
this.handleArrowsNav(e);
|
|
50
|
+
}
|
|
51
|
+
handleArrowsNav(e) {
|
|
52
|
+
if (e.code !== KeyboardCode.ARROW_DOWN && e.code !== KeyboardCode.ARROW_UP && this.enableOffcanvas) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (document.activeElement.slot === "item") {
|
|
56
|
+
return;
|
|
90
57
|
}
|
|
91
|
-
|
|
92
|
-
|
|
58
|
+
const menuItems = Array.from(this.menuElements).map((el) => el.shadowRoot.querySelector(".menu-label"));
|
|
59
|
+
let nextFocusableItem;
|
|
60
|
+
if (this.enableOffcanvas || this._stuck) {
|
|
61
|
+
// INFO: reset focus on all menu items
|
|
62
|
+
menuItems.forEach((item) => item.setAttribute("tabindex", "-1"));
|
|
63
|
+
e.preventDefault();
|
|
64
|
+
e.stopPropagation();
|
|
65
|
+
if (e.code === KeyboardCode.ARROW_DOWN) {
|
|
66
|
+
nextFocusableItem = this.getNextItem(menuItems, 1);
|
|
67
|
+
}
|
|
68
|
+
else if (e.code === KeyboardCode.ARROW_UP) {
|
|
69
|
+
nextFocusableItem = this.getNextItem(menuItems, -1);
|
|
70
|
+
}
|
|
93
71
|
}
|
|
94
72
|
else {
|
|
95
|
-
|
|
73
|
+
if (e.code === KeyboardCode.ARROW_DOWN || e.code === KeyboardCode.ARROW_UP) {
|
|
74
|
+
e.preventDefault();
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
//INFO: reset focus on all menu items
|
|
78
|
+
menuItems.forEach((item) => item.setAttribute("tabindex", "-1"));
|
|
79
|
+
if (e.code === KeyboardCode.ARROW_RIGHT) {
|
|
80
|
+
nextFocusableItem = this.getNextItem(menuItems, 1);
|
|
81
|
+
}
|
|
82
|
+
else if (e.code === KeyboardCode.ARROW_LEFT) {
|
|
83
|
+
nextFocusableItem = this.getNextItem(menuItems, -1);
|
|
84
|
+
}
|
|
96
85
|
}
|
|
86
|
+
if (nextFocusableItem) {
|
|
87
|
+
nextFocusableItem.setAttribute("tabindex", "0");
|
|
88
|
+
nextFocusableItem.focus();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
getNextItem(menuItems, direction) {
|
|
92
|
+
if (this.currentIndex === -1) {
|
|
93
|
+
this.currentIndex = direction === 1 ? 0 : menuItems.length - 1;
|
|
94
|
+
return menuItems[this.currentIndex];
|
|
95
|
+
}
|
|
96
|
+
this.currentIndex = (this.currentIndex + direction + menuItems.length) % menuItems.length;
|
|
97
|
+
return menuItems[this.currentIndex];
|
|
97
98
|
}
|
|
98
99
|
onStuck() {
|
|
99
100
|
const scrollParent = this.scrollParent;
|
|
@@ -106,13 +107,33 @@ export class ZAppHeader {
|
|
|
106
107
|
if (this.menuElements.length === 0) {
|
|
107
108
|
return;
|
|
108
109
|
}
|
|
109
|
-
|
|
110
|
-
elements.forEach((element) => {
|
|
110
|
+
this.menuElements.forEach((element) => {
|
|
111
111
|
element.open = false;
|
|
112
112
|
element.floating = !this.drawerOpen;
|
|
113
113
|
element.verticalContext = this.drawerOpen;
|
|
114
|
+
element.setAttribute("role", "menuitem");
|
|
115
|
+
element.setAttribute("tabindex", "-1");
|
|
114
116
|
});
|
|
115
117
|
}
|
|
118
|
+
onStuckMode() {
|
|
119
|
+
if (this.stuck) {
|
|
120
|
+
this.enableStuckObserver();
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
this.disableStuckMode();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
enableStuckObserver() {
|
|
127
|
+
if (this.observer) {
|
|
128
|
+
this.observer.observe(this.container);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
disableStuckMode() {
|
|
132
|
+
this._stuck = false;
|
|
133
|
+
if (this.observer) {
|
|
134
|
+
this.observer.unobserve(this.container);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
116
137
|
get title() {
|
|
117
138
|
const titleElement = this.hostElement.querySelector('[slot="title"]');
|
|
118
139
|
if (titleElement === null) {
|
|
@@ -128,70 +149,133 @@ export class ZAppHeader {
|
|
|
128
149
|
return parent;
|
|
129
150
|
}
|
|
130
151
|
get canShowMenu() {
|
|
131
|
-
return this.
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
return false;
|
|
136
|
-
}
|
|
137
|
-
// Always show the searchbar on desktop, even if a searchPageUrl is set
|
|
138
|
-
if (this.searchPageUrl) {
|
|
139
|
-
return this.currentViewport === "desktop";
|
|
140
|
-
}
|
|
141
|
-
return true;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Whether the header has a hero image, either as a prop or as a slot.
|
|
145
|
-
*/
|
|
146
|
-
get hasHero() {
|
|
147
|
-
return !!this.hero || this.hostElement.querySelector("[slot=hero]") !== null;
|
|
152
|
+
return (!this.enableOffcanvas &&
|
|
153
|
+
this.menuElements.length > 0 &&
|
|
154
|
+
this.currentViewport !== Device.MOBILE &&
|
|
155
|
+
!this.drawerOpen);
|
|
148
156
|
}
|
|
149
157
|
openDrawer() {
|
|
150
158
|
this.drawerOpen = true;
|
|
151
159
|
}
|
|
152
160
|
closeDrawer() {
|
|
153
161
|
this.drawerOpen = false;
|
|
162
|
+
this.burgerButton.focus();
|
|
163
|
+
this.currentIndex = -1;
|
|
154
164
|
}
|
|
155
165
|
collectMenuElements() {
|
|
156
166
|
const menuElements = (this.menuElements = this.hostElement.querySelectorAll('[slot="menu"]'));
|
|
157
167
|
this.menuLength = menuElements.length;
|
|
158
168
|
this.setMenuFloatingMode();
|
|
159
169
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
170
|
+
isSlotPresent(slotName) {
|
|
171
|
+
const slot = this.hostElement.querySelector(`[slot="${slotName}"]`);
|
|
172
|
+
return !!slot;
|
|
173
|
+
}
|
|
174
|
+
renderSeachbar() {
|
|
175
|
+
const renderSearch = this.currentViewport === Device.MOBILE || this.currentViewport === Device.TABLET ? true : false;
|
|
176
|
+
if (this.currentViewport === Device.MOBILE && !this.searchPageUrl && this._stuck) {
|
|
177
|
+
return;
|
|
163
178
|
}
|
|
179
|
+
if (this.searchPageUrl && (this.currentViewport === Device.MOBILE || this.currentViewport === Device.TABLET)) {
|
|
180
|
+
return (h("z-button", { class: "search-page-button", variant: ButtonVariant.SECONDARY, href: this.searchPageUrl, icon: "search", size: ControlSize.X_SMALL }));
|
|
181
|
+
}
|
|
182
|
+
return (h("z-searchbar", { ref: (el) => (this.searchbar = el), value: this.searchString, placeholder: this.searchPlaceholder, showSearchButton: true, searchButtonIconOnly: renderSearch, size: ControlSize.X_SMALL, variant: ButtonVariant.SECONDARY, preventSubmit: this.searchString.length < 3, onSearchTyping: (e) => (this.searchString = e.detail), onKeyDown: (e) => {
|
|
183
|
+
if (e.code === KeyboardCode.ARROW_RIGHT || e.code === KeyboardCode.ARROW_LEFT) {
|
|
184
|
+
e.stopPropagation();
|
|
185
|
+
}
|
|
186
|
+
} }));
|
|
164
187
|
}
|
|
165
|
-
|
|
166
|
-
this.
|
|
167
|
-
|
|
168
|
-
|
|
188
|
+
renderProductLogos() {
|
|
189
|
+
return (h(Fragment, null, this.enableZLogo && (h("img", { class: "z-logo", alt: "Logo Zanichelli" })), this.currentViewport !== Device.MOBILE && h("slot", { name: "product-logo" })));
|
|
190
|
+
}
|
|
191
|
+
renderMenuButton() {
|
|
192
|
+
return (this.menuLength > 0 &&
|
|
193
|
+
(this.enableOffcanvas || this._stuck || this.currentViewport === Device.MOBILE) && (h("button", { ref: (el) => (this.burgerButton = el), "aria-label": "Apri menu", "aria-haspopup": "menu", "aria-expanded": `${this.drawerOpen}`, "aria-controls": "menu-offcanvas", class: "drawer-trigger", onClick: this.openDrawer, onKeyUp: (ev) => {
|
|
194
|
+
if (ev.code === KeyboardCode.ENTER || ev.code === KeyboardCode.SPACE) {
|
|
195
|
+
this.closeMenuButton.focus();
|
|
196
|
+
}
|
|
197
|
+
} }, h("z-icon", { name: "burger-menu" }))));
|
|
198
|
+
}
|
|
199
|
+
renderOffcanvas() {
|
|
200
|
+
return (h("z-offcanvas", { variant: OffCanvasVariant.OVERLAY, transitiondirection: TransitionDirection.RIGHT, open: this.drawerOpen, onCanvasOpenStatusChanged: (ev) => (this.drawerOpen = ev.detail) }, h("div", { slot: "canvasContent" }, h("button", { ref: (el) => (this.closeMenuButton = el), class: "drawer-close", "aria-label": "Chiudi menu", onClick: this.closeDrawer, "aria-hidden": `${!this.drawerOpen}`, disabled: !this.drawerOpen }, h("z-icon", { name: "close" })), h("div", { class: "drawer-content", "aria-hidden": `${!this.drawerOpen}` }, h("slot", { name: "menu", onSlotchange: this.collectMenuElements })))));
|
|
201
|
+
}
|
|
202
|
+
renderStuck() {
|
|
203
|
+
return (h("div", { class: "heading-stuck" }, h("div", { class: "heading-stuck-content" }, this.renderMenuButton(), h("div", { class: "heading-title" }, this.renderProductLogos(), h("slot", { name: "stucked-title" }, this.title)), this.enableSearch && this.renderSeachbar())));
|
|
204
|
+
}
|
|
205
|
+
getWidthMenu() {
|
|
206
|
+
if (this.menuElements.length === 0) {
|
|
207
|
+
return;
|
|
169
208
|
}
|
|
209
|
+
return Array.from(this.menuElements).reduce((acc, item) => item.getBoundingClientRect().width + acc, 100);
|
|
170
210
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
211
|
+
focusToFirstItemMenu() {
|
|
212
|
+
const menuItems = Array.from(this.menuElements).map((el) => el.shadowRoot.querySelector(".menu-label"));
|
|
213
|
+
menuItems[0].focus();
|
|
214
|
+
this.currentIndex = 0;
|
|
215
|
+
}
|
|
216
|
+
handleFocusItem(e) {
|
|
217
|
+
const menuItems = Array.from(this.menuElements).map((el) => el.shadowRoot.querySelector(".menu-label"));
|
|
218
|
+
if (e.code === KeyboardCode.ARROW_DOWN ||
|
|
219
|
+
e.code === KeyboardCode.ARROW_UP ||
|
|
220
|
+
e.code === KeyboardCode.ENTER ||
|
|
221
|
+
e.code === KeyboardCode.TAB) {
|
|
222
|
+
return;
|
|
174
223
|
}
|
|
175
|
-
|
|
176
|
-
|
|
224
|
+
if (document.activeElement.tagName === "Z-MENU-SECTION" || document.activeElement.tagName === "Z-MENU") {
|
|
225
|
+
return;
|
|
177
226
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
227
|
+
if (this.enableSearch && this.currentIndex === 0) {
|
|
228
|
+
const input = this.searchbar.shadowRoot.querySelector("z-input input");
|
|
229
|
+
input.focus();
|
|
230
|
+
this.currentIndex = -1;
|
|
231
|
+
}
|
|
232
|
+
if (this.currentIndex !== -1) {
|
|
233
|
+
menuItems[this.currentIndex].focus();
|
|
182
234
|
}
|
|
183
|
-
return (h("z-button", { class: "search-page-button", variant: ButtonVariant.SECONDARY, href: this.searchPageUrl, icon: "search", size: ControlSize.X_SMALL }));
|
|
184
235
|
}
|
|
185
|
-
|
|
186
|
-
|
|
236
|
+
componentWillLoad() {
|
|
237
|
+
this.collectMenuElements();
|
|
238
|
+
this.evaluateViewport();
|
|
187
239
|
}
|
|
188
240
|
componentDidLoad() {
|
|
189
|
-
this.collectMenuElements();
|
|
190
241
|
this.onStuckMode();
|
|
191
|
-
this.
|
|
242
|
+
if (this.enableOffcanvas) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
const menuWidth = this.getWidthMenu();
|
|
246
|
+
const containerSidePadding = 50;
|
|
247
|
+
this.resizeObserver = new ResizeObserver((observer) => {
|
|
248
|
+
const containerWidth = observer[0].contentRect.width;
|
|
249
|
+
if (this.currentViewport === Device.MOBILE) {
|
|
250
|
+
return (this.enableOffcanvas = true);
|
|
251
|
+
}
|
|
252
|
+
if (menuWidth > containerWidth - containerSidePadding && !this.enableOffcanvas) {
|
|
253
|
+
this.enableOffcanvas = true;
|
|
254
|
+
}
|
|
255
|
+
else if (menuWidth <= containerWidth - containerSidePadding && this.enableOffcanvas) {
|
|
256
|
+
this.enableOffcanvas = false;
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
this.resizeObserver.observe(this.container);
|
|
260
|
+
}
|
|
261
|
+
disconnectedCallback() {
|
|
262
|
+
var _a;
|
|
263
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
192
264
|
}
|
|
193
265
|
render() {
|
|
194
|
-
|
|
266
|
+
const hasTopSubtitle = this.isSlotPresent("top-subtitle");
|
|
267
|
+
return (h(Host, { key: '1b905f7f0c42a9688493a38353ad69282248dac3', "menu-length": this.menuLength }, h("div", { key: 'f69888ebf52067bc34385e3f455816594d9209a2', class: `heading-panel ${this.menuLength > 0 && !this.enableOffcanvas ? "has-menu" : ""}`, ref: (el) => (this.container = el) }, h("div", { key: '827f5ee62dd066de4b049453738f3a587ab34320', class: "heading-container" }, ((!this.enableSearch && this.currentViewport === Device.MOBILE) ||
|
|
268
|
+
this.currentViewport !== Device.MOBILE) && (h("div", { key: 'd520fb97f1fe09340b6265be94b09ff26dc0e9cf', class: `${this.enableOffcanvas ? "p-left" : ""}` }, h("slot", { key: 'a8f1d05fd7f71603f3b63c43317859ee8c5e37bf', name: "top-subtitle" }))), h("div", { key: 'ec1b3adc2e17d8713849166799c553122d1e7c80', class: "heading-title" }, this.renderMenuButton(), !hasTopSubtitle && !this._stuck && this.renderProductLogos(), h("slot", { key: '263a9099b08065da250a1d0c228caac435dc9dd7', name: "title" }), this.enableSearch && this.currentViewport !== Device.MOBILE && this.renderSeachbar()), this.enableSearch && this.currentViewport === Device.MOBILE && this.renderSeachbar()), this.canShowMenu && (h("div", { key: '2c952c6e1b1ec608f73f5c5210ab5b5331d379bf', class: "menu-container", onKeyUp: (e) => {
|
|
269
|
+
if (this.enableOffcanvas) {
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
if (this.currentIndex === -1) {
|
|
273
|
+
this.focusToFirstItemMenu();
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
this.handleFocusItem(e);
|
|
277
|
+
}
|
|
278
|
+
}, role: "hidden", tabIndex: 0 }, h("slot", { key: '0b71f1d0aa78599592213f61ee49e68daad5d04f', name: "menu", onSlotchange: this.collectMenuElements })))), this.renderOffcanvas(), this._stuck && this.renderStuck()));
|
|
195
279
|
}
|
|
196
280
|
static get is() { return "z-app-header"; }
|
|
197
281
|
static get encapsulation() { return "shadow"; }
|
|
@@ -225,62 +309,9 @@ export class ZAppHeader {
|
|
|
225
309
|
"reflect": true,
|
|
226
310
|
"defaultValue": "false"
|
|
227
311
|
},
|
|
228
|
-
"
|
|
229
|
-
"type": "string",
|
|
230
|
-
"mutable": false,
|
|
231
|
-
"complexType": {
|
|
232
|
-
"original": "string",
|
|
233
|
-
"resolved": "string",
|
|
234
|
-
"references": {}
|
|
235
|
-
},
|
|
236
|
-
"required": false,
|
|
237
|
-
"optional": false,
|
|
238
|
-
"docs": {
|
|
239
|
-
"tags": [],
|
|
240
|
-
"text": "Set the hero image source for the header.\nYou can also use a [slot=\"hero\"] node for advanced customization."
|
|
241
|
-
},
|
|
242
|
-
"attribute": "hero",
|
|
243
|
-
"reflect": false
|
|
244
|
-
},
|
|
245
|
-
"overlay": {
|
|
246
|
-
"type": "boolean",
|
|
247
|
-
"mutable": false,
|
|
248
|
-
"complexType": {
|
|
249
|
-
"original": "boolean",
|
|
250
|
-
"resolved": "boolean",
|
|
251
|
-
"references": {}
|
|
252
|
-
},
|
|
253
|
-
"required": false,
|
|
254
|
-
"optional": false,
|
|
255
|
-
"docs": {
|
|
256
|
-
"tags": [],
|
|
257
|
-
"text": "Should place an overlay over the hero image.\nUseful for legibility purpose."
|
|
258
|
-
},
|
|
259
|
-
"attribute": "overlay",
|
|
260
|
-
"reflect": true,
|
|
261
|
-
"defaultValue": "false"
|
|
262
|
-
},
|
|
263
|
-
"flow": {
|
|
264
|
-
"type": "string",
|
|
265
|
-
"mutable": false,
|
|
266
|
-
"complexType": {
|
|
267
|
-
"original": "\"auto\" | \"stack\" | \"offcanvas\"",
|
|
268
|
-
"resolved": "\"auto\" | \"offcanvas\" | \"stack\"",
|
|
269
|
-
"references": {}
|
|
270
|
-
},
|
|
271
|
-
"required": false,
|
|
272
|
-
"optional": false,
|
|
273
|
-
"docs": {
|
|
274
|
-
"tags": [],
|
|
275
|
-
"text": "Control menu bar position in the header.\n- auto: the menu bar is positioned near the title\n- stack: the menu bar is positioned below the title\n- offcanvas: the menu bar is not displayed and a burger icon appears to open the offcanvas menu"
|
|
276
|
-
},
|
|
277
|
-
"attribute": "flow",
|
|
278
|
-
"reflect": true,
|
|
279
|
-
"defaultValue": "\"auto\""
|
|
280
|
-
},
|
|
281
|
-
"drawerOpen": {
|
|
312
|
+
"enableOffcanvas": {
|
|
282
313
|
"type": "boolean",
|
|
283
|
-
"mutable":
|
|
314
|
+
"mutable": true,
|
|
284
315
|
"complexType": {
|
|
285
316
|
"original": "boolean",
|
|
286
317
|
"resolved": "boolean",
|
|
@@ -290,9 +321,9 @@ export class ZAppHeader {
|
|
|
290
321
|
"optional": false,
|
|
291
322
|
"docs": {
|
|
292
323
|
"tags": [],
|
|
293
|
-
"text": "
|
|
324
|
+
"text": "the menu bar is not displayed and a burger icon appears to open the offcanvas menu"
|
|
294
325
|
},
|
|
295
|
-
"attribute": "
|
|
326
|
+
"attribute": "enable-offcanvas",
|
|
296
327
|
"reflect": true,
|
|
297
328
|
"defaultValue": "false"
|
|
298
329
|
},
|
|
@@ -366,6 +397,24 @@ export class ZAppHeader {
|
|
|
366
397
|
},
|
|
367
398
|
"attribute": "search-page-url",
|
|
368
399
|
"reflect": false
|
|
400
|
+
},
|
|
401
|
+
"enableZLogo": {
|
|
402
|
+
"type": "boolean",
|
|
403
|
+
"mutable": false,
|
|
404
|
+
"complexType": {
|
|
405
|
+
"original": "boolean",
|
|
406
|
+
"resolved": "boolean",
|
|
407
|
+
"references": {}
|
|
408
|
+
},
|
|
409
|
+
"required": false,
|
|
410
|
+
"optional": false,
|
|
411
|
+
"docs": {
|
|
412
|
+
"tags": [],
|
|
413
|
+
"text": "Enable laZ logo."
|
|
414
|
+
},
|
|
415
|
+
"attribute": "enable-z-logo",
|
|
416
|
+
"reflect": true,
|
|
417
|
+
"defaultValue": "true"
|
|
369
418
|
}
|
|
370
419
|
};
|
|
371
420
|
}
|
|
@@ -373,7 +422,8 @@ export class ZAppHeader {
|
|
|
373
422
|
return {
|
|
374
423
|
"_stuck": {},
|
|
375
424
|
"currentViewport": {},
|
|
376
|
-
"menuLength": {}
|
|
425
|
+
"menuLength": {},
|
|
426
|
+
"drawerOpen": {}
|
|
377
427
|
};
|
|
378
428
|
}
|
|
379
429
|
static get events() {
|
|
@@ -414,6 +464,12 @@ export class ZAppHeader {
|
|
|
414
464
|
"target": "window",
|
|
415
465
|
"capture": false,
|
|
416
466
|
"passive": true
|
|
467
|
+
}, {
|
|
468
|
+
"name": "keydown",
|
|
469
|
+
"method": "handleKeyDown",
|
|
470
|
+
"target": undefined,
|
|
471
|
+
"capture": false,
|
|
472
|
+
"passive": false
|
|
417
473
|
}];
|
|
418
474
|
}
|
|
419
475
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-app-header/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAC3G,OAAO,EAAC,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAE9F,MAAM,6BAA6B,GAAG,OAAO,oBAAoB,KAAK,WAAW,CAAC;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AAMH,MAAM,OAAO,UAAU;IAyGrB;QAXQ,aAAQ,GACd,6BAA6B;YAC7B,IAAI,oBAAoB,CACtB,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE;gBACV,IAAI,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC;YACtC,CAAC,EACD;gBACE,SAAS,EAAE,GAAG;aACf,CACF,CAAC;qBA/FI,KAAK;;uBAcH,KAAK;oBASwB,MAAM;0BAMhC,KAAK;4BAMH,KAAK;iCAMA,OAAO;4BAMZ,EAAE;;sBAcA,KAAK;+BAOqC,QAAQ;;QA8BjE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,C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IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,eAAe,KAAK,SAAS,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CACtF,CACF,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h} from \"@stencil/core\";\nimport {ButtonVariant, ControlSize, OffCanvasVariant, TransitionDirection} from \"../../beans\";\n\nconst SUPPORT_INTERSECTION_OBSERVER = typeof IntersectionObserver !== \"undefined\";\n\n/**\n * @slot title - Slot for the main title\n * @slot subtitle - Slot for the bottom subtitle. It will not appear in stuck header.\n * @slot top-subtitle - Slot for the top subtitle. It will not appear in stuck header.\n * @slot stucked-title - Title for the stuck header. By default it uses the text from the `title` slot.\n * @cssprop --app-header-typography-1-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `24px`.\n * @cssprop --app-header-typography-2-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `28px`.\n * @cssprop --app-header-typography-3-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `32px`.\n * @cssprop --app-header-typography-4-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `36px`.\n * @cssprop --app-header-typography-5-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `42px`.\n * @cssprop --app-header-typography-6-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `48px`.\n * @cssprop --app-header-typography-7-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `54px`.\n * @cssprop --app-header-typography-8-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `60px`.\n * @cssprop --app-header-typography-9-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `68px`.\n * @cssprop --app-header-typography-10-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `76px`.\n * @cssprop --app-header-typography-11-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `84px`.\n * @cssprop --app-header-typography-12-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `92px`.\n * @cssprop --app-header-typography-1-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.33`.\n * @cssprop --app-header-typography-2-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.29`.\n * @cssprop --app-header-typography-3-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.25`.\n * @cssprop --app-header-typography-4-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.24`.\n * @cssprop --app-header-typography-5-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.24`.\n * @cssprop --app-header-typography-6-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.25`.\n * @cssprop --app-header-typography-7-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.2`.\n * @cssprop --app-header-typography-8-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.26`.\n * @cssprop --app-header-typography-9-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.24`.\n * @cssprop --app-header-typography-10-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.26`.\n * @cssprop --app-header-typography-11-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.2`.\n * @cssprop --app-header-typography-12-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.2`.\n * @cssprop --app-header-typography-1-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-0.2 / 1em)`.\n * @cssprop --app-header-typography-2-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-0.4 / 1em)`.\n * @cssprop --app-header-typography-3-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-0.6 / 1em)`.\n * @cssprop --app-header-typography-4-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-0.8 / 1em)`.\n * @cssprop --app-header-typography-5-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1 / 1em)`.\n * @cssprop --app-header-typography-6-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1.2 / 1em)`.\n * @cssprop --app-header-typography-7-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1.4 / 1em)`.\n * @cssprop --app-header-typography-8-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1.6 / 1em)`.\n * @cssprop --app-header-typography-9-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1.8 / 1em)`.\n * @cssprop --app-header-typography-10-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-2 / 1em)`.\n * @cssprop --app-header-typography-11-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-2.2 / 1em)`.\n * @cssprop --app-header-typography-12-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-2.4 / 1em)`.\n * @cssprop --app-header-content-max-width - Use it to set header's content max width. Useful when the project use a fixed width layout. Defaults to `100%`.\n * @cssprop --app-header-height - Defaults to `auto`.\n * @cssprop --app-header-top-offset - Top offset for the stuck header. Useful when there are other fixed elements above the header. Defaults to `48px` (the height of the main topbar).\n * @cssprop --app-header-drawer-trigger-size - The size of the drawer icon. Defaults to `--space-unit * 4`.\n * @cssprop --app-header-bg - Header background color. Defaults to `--color-surface01`.\n * @cssprop --app-header-stucked-bg - Stuck header background color. Defaults to `--color-surface01`.\n * @cssprop --app-header-text-color - Text color. Useful on `hero` variant to set text color based on the colors of the background image. Defaults to `--color-default-text`.\n * @cssprop --app-header-title-font-size - Variable to customize the title's font size.\n * NOTE: Only use one of the exported `--app-header-typography-*-size` as a value.\n * Defaults to `--app-header-typography-3-size`.\n * @cssprop --app-header-title-lineheight - Variable to customize the title's line-height.\n * NOTE: Only use one of the exported `--app-header-typography-*-lineheight` as a value and use the same level as the one of the font size.\n * Defaults to `--app-header-typography-3-lineheight`.\n * @cssprop --app-header-title-letter-spacing - Variable to customize the title's letter-spacing.\n * NOTE: Only use one of the exported `--app-header-typography-*-tracking` as a value and use the same level as the one of the font size.\n * Defaults to `--app-header-typography-3-tracking`.\n * @cssprop --app-header-stucked-text-color - Stuck header text color. Defaults to `--color-default-text`.\n */\n@Component({\n tag: \"z-app-header\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZAppHeader {\n @Element() hostElement: HTMLZAppHeaderElement;\n\n /**\n * Stuck mode for the header.\n * You can programmatically set it using an IntersectionObserver.\n */\n @Prop({reflect: true})\n stuck = false;\n\n /**\n * Set the hero image source for the header.\n * You can also use a [slot=\"hero\"] node for advanced customization.\n */\n @Prop()\n hero: string;\n\n /**\n * Should place an overlay over the hero image.\n * Useful for legibility purpose.\n */\n @Prop({reflect: true})\n overlay = false;\n\n /**\n * Control menu bar position in the header.\n * - auto: the menu bar is positioned near the title\n * - stack: the menu bar is positioned below the title\n * - offcanvas: the menu bar is not displayed and a burger icon appears to open the offcanvas menu\n */\n @Prop({reflect: true})\n flow: \"auto\" | \"stack\" | \"offcanvas\" = \"auto\";\n\n /**\n * The opening state of the drawer.\n */\n @Prop({reflect: true})\n drawerOpen = false;\n\n /**\n * Enable the search bar.\n */\n @Prop({reflect: true})\n enableSearch = false;\n\n /**\n * Placeholder text for the search bar.\n */\n @Prop()\n searchPlaceholder = \"Cerca\";\n\n /**\n * Search string for the search bar.\n */\n @Prop({mutable: true})\n searchString = \"\";\n\n /**\n * Url to the search page.\n * Set this prop and `enableSearch` to show a link-button on mobile and tablet viewports, instead of the normal searchbar.\n * The link will also appear on the sticky header.\n */\n @Prop()\n searchPageUrl: string;\n\n /**\n * The stuck state of the bar.\n */\n @State()\n private _stuck = false;\n\n /**\n * Current viewport.\n * Used to change the aspect of the search button (icon only) on mobile and tablet.\n */\n @State()\n private currentViewport: \"mobile\" | \"tablet\" | \"desktop\" = \"mobile\";\n\n /**\n * Current count of menu items.\n */\n @State()\n menuLength: number;\n\n /**\n * Emitted when the `stuck` state of the header changes\n */\n @Event()\n sticking: EventEmitter;\n\n private container?: HTMLDivElement;\n\n private menuElements?: NodeListOf<HTMLElement>;\n\n private observer?: IntersectionObserver =\n SUPPORT_INTERSECTION_OBSERVER &&\n new IntersectionObserver(\n ([entry]) => {\n this._stuck = !entry.isIntersecting;\n },\n {\n threshold: 0.5,\n }\n );\n\n constructor() {\n this.openDrawer = this.openDrawer.bind(this);\n this.closeDrawer = this.closeDrawer.bind(this);\n this.collectMenuElements = this.collectMenuElements.bind(this);\n }\n\n @Listen(\"resize\", {target: \"window\", passive: true})\n evaluateViewport(): void {\n if (window.innerWidth < 768) {\n this.currentViewport = \"mobile\";\n } else if (window.innerWidth >= 768 && window.innerWidth < 1152) {\n this.currentViewport = \"tablet\";\n } else {\n this.currentViewport = \"desktop\";\n }\n }\n\n @Watch(\"_stuck\")\n onStuck(): void {\n const scrollParent = this.scrollParent;\n if (!scrollParent) {\n return;\n }\n\n this.sticking.emit(this._stuck);\n }\n\n @Watch(\"drawerOpen\")\n setMenuFloatingMode(): void {\n if (this.menuElements.length === 0) {\n return;\n }\n\n const elements = this.menuElements;\n elements.forEach((element) => {\n (element as HTMLZMenuElement).open = false;\n (element as HTMLZMenuElement).floating = !this.drawerOpen;\n (element as HTMLZMenuElement).verticalContext = this.drawerOpen;\n });\n }\n\n private get title(): string {\n const titleElement = this.hostElement.querySelector('[slot=\"title\"]');\n if (titleElement === null) {\n return \"\";\n }\n\n return titleElement.textContent.trim();\n }\n\n private get scrollParent(): Window | Element {\n const parent = this.hostElement.offsetParent;\n if (parent === document.body || parent === document.documentElement) {\n return window;\n }\n\n return parent;\n }\n\n private get canShowMenu(): boolean {\n return this.flow !== \"offcanvas\" && this.currentViewport !== \"mobile\" && !this.drawerOpen;\n }\n\n private get canShowSearchbar(): boolean {\n if (!this.enableSearch) {\n return false;\n }\n\n // Always show the searchbar on desktop, even if a searchPageUrl is set\n if (this.searchPageUrl) {\n return this.currentViewport === \"desktop\";\n }\n\n return true;\n }\n\n /**\n * Whether the header has a hero image, either as a prop or as a slot.\n */\n private get hasHero(): boolean {\n return !!this.hero || this.hostElement.querySelector(\"[slot=hero]\") !== null;\n }\n\n private openDrawer(): void {\n this.drawerOpen = true;\n }\n\n private closeDrawer(): void {\n this.drawerOpen = false;\n }\n\n private collectMenuElements(): void {\n const menuElements = (this.menuElements = this.hostElement.querySelectorAll('[slot=\"menu\"]'));\n this.menuLength = menuElements.length;\n this.setMenuFloatingMode();\n }\n\n private enableStuckObserver(): void {\n if (this.observer) {\n this.observer.observe(this.container);\n }\n }\n\n private disableStuckMode(): void {\n this._stuck = false;\n if (this.observer) {\n this.observer.unobserve(this.container);\n }\n }\n\n @Watch(\"stuck\")\n onStuckMode(): void {\n if (this.stuck) {\n this.enableStuckObserver();\n } else {\n this.disableStuckMode();\n }\n }\n\n private renderSearchLinkButton(): HTMLZButtonElement | null {\n if (!this.enableSearch || !this.searchPageUrl || this.currentViewport === \"desktop\") {\n return null;\n }\n\n return (\n <z-button\n class=\"search-page-button\"\n variant={ButtonVariant.SECONDARY}\n href={this.searchPageUrl}\n icon=\"search\"\n size={ControlSize.X_SMALL}\n ></z-button>\n );\n }\n\n private renderSeachbar(searchButtonIconOnly: boolean): HTMLZSearchbarElement {\n return (\n <z-searchbar\n value={this.searchString}\n placeholder={this.searchPlaceholder}\n showSearchButton={true}\n searchButtonIconOnly={searchButtonIconOnly}\n size={ControlSize.X_SMALL}\n variant={ButtonVariant.SECONDARY}\n preventSubmit={this.searchString.length < 3}\n onSearchTyping={(e) => (this.searchString = e.detail)}\n />\n );\n }\n\n componentDidLoad(): void {\n this.collectMenuElements();\n this.onStuckMode();\n this.evaluateViewport();\n }\n\n render(): HTMLZAppHeaderElement {\n return (\n <Host menu-length={this.menuLength}>\n {this.hasHero && (\n <div class=\"hero-container\">\n <slot name=\"hero\">\n {this.hero && (\n <img\n alt=\"\"\n src={this.hero}\n />\n )}\n </slot>\n </div>\n )}\n\n <div\n class=\"heading-panel\"\n ref={(el) => (this.container = el)}\n >\n <div class=\"heading-container\">\n <div class=\"heading-subtitle\">\n <slot name=\"top-subtitle\"></slot>\n </div>\n <div class=\"heading-title\">\n {this.menuLength > 0 && (\n <button\n class=\"drawer-trigger\"\n aria-label=\"Apri menu\"\n onClick={this.openDrawer}\n >\n <z-icon name=\"burger-menu\"></z-icon>\n </button>\n )}\n\n <slot name=\"title\"></slot>\n\n {this.renderSearchLinkButton()}\n </div>\n\n <div class=\"heading-subtitle\">\n <slot name=\"subtitle\"></slot>\n </div>\n </div>\n\n {(this.canShowMenu || this.canShowSearchbar) && (\n <div class=\"menu-container\">\n {this.canShowMenu && (\n <slot\n name=\"menu\"\n onSlotchange={this.collectMenuElements}\n ></slot>\n )}\n\n {this.canShowSearchbar && this.renderSeachbar(this.currentViewport !== \"desktop\")}\n </div>\n )}\n </div>\n\n <z-offcanvas\n variant={OffCanvasVariant.OVERLAY}\n transitiondirection={TransitionDirection.RIGHT}\n open={this.drawerOpen}\n onCanvasOpenStatusChanged={(ev) => (this.drawerOpen = ev.detail)}\n >\n <button\n class=\"drawer-close\"\n aria-label=\"Chiudi menu\"\n onClick={this.closeDrawer}\n slot=\"canvasContent\"\n aria-hidden={`${!this.drawerOpen}`}\n disabled={!this.drawerOpen}\n >\n <z-icon name=\"close\"></z-icon>\n </button>\n\n <div\n class=\"drawer-content\"\n slot=\"canvasContent\"\n aria-hidden={`${!this.drawerOpen}`}\n >\n <slot\n name=\"menu\"\n onSlotchange={this.collectMenuElements}\n ></slot>\n </div>\n </z-offcanvas>\n\n {this._stuck && (\n <div class=\"heading-stuck\">\n <div class=\"heading-stuck-content\">\n {this.menuLength > 0 && (\n <button\n class=\"drawer-trigger\"\n aria-label=\"Apri menu\"\n onClick={this.openDrawer}\n >\n <z-icon name=\"burger-menu\"></z-icon>\n </button>\n )}\n\n <div class=\"heading-title\">\n <slot name=\"stucked-title\">{this.title}</slot>\n </div>\n\n {this.renderSearchLinkButton()}\n {this.canShowSearchbar && this.currentViewport === \"desktop\" && this.renderSeachbar(false)}\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-app-header/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AACrH,OAAO,EAAC,aAAa,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAC,MAAM,aAAa,CAAC;AACpH,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,MAAM,6BAA6B,GAAG,OAAO,oBAAoB,KAAK,WAAW,CAAC;AAElF;;;;;;;;;;;GAWG;AAMH,MAAM,OAAO,UAAU;IAyGrB;QAbQ,iBAAY,GAAG,CAAC,CAAC,CAAC;QAElB,aAAQ,GACd,6BAA6B;YAC7B,IAAI,oBAAoB,CACtB,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE;gBACV,IAAI,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC;YACtC,CAAC,EACD;gBACE,SAAS,EAAE,GAAG;aACf,CACF,CAAC;qBA/FI,KAAK;+BAMK,KAAK;4BAMR,KAAK;iCAMA,OAAO;4BAMZ,EAAE;;2BAcH,IAAI;sBAMD,KAAK;+BAOY,MAAM,CAAC,MAAM;;0BAkB1B,KAAK;QA6BxB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;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;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Fragment, Host, Listen, Prop, State, Watch, h} from \"@stencil/core\";\nimport {ButtonVariant, ControlSize, Device, KeyboardCode, OffCanvasVariant, TransitionDirection} from \"../../beans\";\nimport {getDevice} from \"../../utils/utils\";\n\nconst SUPPORT_INTERSECTION_OBSERVER = typeof IntersectionObserver !== \"undefined\";\n\n/**\n * @slot title - Slot for the main title\n * @slot top-subtitle - Slot for the top subtitle. It will not appear in stuck header.\n * @slot stucked-title - Title for the stuck header. By default it uses the text from the `title` slot.\n * @slot product-logo - To insert the product logo, it should be used with an img tag.\n * @cssprop --app-header-content-max-width - Use it to set header's content max width. Useful when the project use a fixed width layout. Defaults to `100%`.\n * @cssprop --app-header-top-offset - Top offset for the stuck header. Useful when there are other fixed elements above the header. Defaults to `48px` (the height of the main topbar).\n * @cssprop --app-header-drawer-trigger-size - The size of the drawer icon. Defaults to `--space-unit * 4`.\n * @cssprop --app-header-bg - Header background color. Defaults to `--color-surface01`.\n * @cssprop --app-header-stucked-bg - Stuck header background color. Defaults to `--color-surface01`.\n * @cssprop --app-header-stucked-text-color - Stuck header text color. Defaults to `--color-default-text`.\n */\n@Component({\n tag: \"z-app-header\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZAppHeader {\n @Element() hostElement: HTMLZAppHeaderElement;\n\n /**\n * Stuck mode for the header.\n * You can programmatically set it using an IntersectionObserver.\n */\n @Prop({reflect: true})\n stuck = false;\n\n /**\n * the menu bar is not displayed and a burger icon appears to open the offcanvas menu\n */\n @Prop({reflect: true, mutable: true})\n enableOffcanvas = false;\n\n /**\n * Enable the search bar.\n */\n @Prop({reflect: true})\n enableSearch = false;\n\n /**\n * Placeholder text for the search bar.\n */\n @Prop()\n searchPlaceholder = \"Cerca\";\n\n /**\n * Search string for the search bar.\n */\n @Prop({mutable: true})\n searchString = \"\";\n\n /**\n * Url to the search page.\n * Set this prop and `enableSearch` to show a link-button on mobile and tablet viewports, instead of the normal searchbar.\n * The link will also appear on the sticky header.\n */\n @Prop()\n searchPageUrl: string;\n\n /**\n * Enable laZ logo.\n */\n @Prop({reflect: true})\n enableZLogo = true;\n\n /**\n * The stuck state of the bar.\n */\n @State()\n private _stuck = false;\n\n /**\n * Current viewport.\n * Used to change the aspect of the search button (icon only) on mobile and tablet.\n */\n @State()\n private currentViewport: Device = Device.MOBILE;\n\n /**\n * Current count of menu items.\n */\n @State()\n menuLength: number;\n\n /**\n * Emitted when the `stuck` state of the header changes\n */\n @Event()\n sticking: EventEmitter;\n\n /**\n * The opening state of the drawer.\n */\n @State()\n private drawerOpen = false;\n\n private container?: HTMLDivElement;\n\n private menuElements?: NodeListOf<HTMLZMenuElement>;\n\n private closeMenuButton: HTMLButtonElement;\n\n private burgerButton: HTMLButtonElement;\n\n private searchbar: HTMLZSearchbarElement;\n\n /** Observer when the size of the element container changes */\n private resizeObserver: ResizeObserver;\n\n private currentIndex = -1;\n\n private observer?: IntersectionObserver =\n SUPPORT_INTERSECTION_OBSERVER &&\n new IntersectionObserver(\n ([entry]) => {\n this._stuck = !entry.isIntersecting;\n },\n {\n threshold: 0.5,\n }\n );\n\n constructor() {\n this.openDrawer = this.openDrawer.bind(this);\n this.closeDrawer = this.closeDrawer.bind(this);\n this.collectMenuElements = this.collectMenuElements.bind(this);\n }\n\n @Listen(\"resize\", {target: \"window\", passive: true})\n evaluateViewport(): void {\n this.currentViewport = getDevice();\n }\n\n @Listen(\"keydown\")\n handleKeyDown(e: KeyboardEvent): void {\n if (e.code === KeyboardCode.ESC && this.drawerOpen) {\n this.closeDrawer();\n\n return;\n }\n this.handleArrowsNav(e);\n }\n\n private handleArrowsNav(e: KeyboardEvent): void {\n if (e.code !== KeyboardCode.ARROW_DOWN && e.code !== KeyboardCode.ARROW_UP && this.enableOffcanvas) {\n return;\n }\n\n if (document.activeElement.slot === \"item\") {\n return;\n }\n\n const menuItems = Array.from(this.menuElements).map(\n (el) => el.shadowRoot.querySelector(\".menu-label\") as HTMLElement\n );\n\n let nextFocusableItem: HTMLElement;\n if (this.enableOffcanvas || this._stuck) {\n // INFO: reset focus on all menu items\n menuItems.forEach((item: HTMLElement) => item.setAttribute(\"tabindex\", \"-1\"));\n e.preventDefault();\n e.stopPropagation();\n if (e.code === KeyboardCode.ARROW_DOWN) {\n nextFocusableItem = this.getNextItem(menuItems, 1);\n } else if (e.code === KeyboardCode.ARROW_UP) {\n nextFocusableItem = this.getNextItem(menuItems, -1);\n }\n } else {\n if (e.code === KeyboardCode.ARROW_DOWN || e.code === KeyboardCode.ARROW_UP) {\n e.preventDefault();\n\n return;\n }\n //INFO: reset focus on all menu items\n menuItems.forEach((item: HTMLElement) => item.setAttribute(\"tabindex\", \"-1\"));\n if (e.code === KeyboardCode.ARROW_RIGHT) {\n nextFocusableItem = this.getNextItem(menuItems, 1);\n } else if (e.code === KeyboardCode.ARROW_LEFT) {\n nextFocusableItem = this.getNextItem(menuItems, -1);\n }\n }\n if (nextFocusableItem) {\n nextFocusableItem.setAttribute(\"tabindex\", \"0\");\n nextFocusableItem.focus();\n }\n }\n\n private getNextItem(menuItems: HTMLElement[], direction: number): HTMLElement {\n if (this.currentIndex === -1) {\n this.currentIndex = direction === 1 ? 0 : menuItems.length - 1;\n\n return menuItems[this.currentIndex];\n }\n\n this.currentIndex = (this.currentIndex + direction + menuItems.length) % menuItems.length;\n\n return menuItems[this.currentIndex];\n }\n\n @Watch(\"_stuck\")\n onStuck(): void {\n const scrollParent = this.scrollParent;\n if (!scrollParent) {\n return;\n }\n\n this.sticking.emit(this._stuck);\n }\n\n @Watch(\"drawerOpen\")\n setMenuFloatingMode(): void {\n if (this.menuElements.length === 0) {\n return;\n }\n\n this.menuElements.forEach((element) => {\n element.open = false;\n element.floating = !this.drawerOpen;\n element.verticalContext = this.drawerOpen;\n element.setAttribute(\"role\", \"menuitem\");\n element.setAttribute(\"tabindex\", \"-1\");\n });\n }\n\n @Watch(\"stuck\")\n onStuckMode(): void {\n if (this.stuck) {\n this.enableStuckObserver();\n } else {\n this.disableStuckMode();\n }\n }\n\n private enableStuckObserver(): void {\n if (this.observer) {\n this.observer.observe(this.container);\n }\n }\n\n private disableStuckMode(): void {\n this._stuck = false;\n if (this.observer) {\n this.observer.unobserve(this.container);\n }\n }\n\n private get title(): string {\n const titleElement = this.hostElement.querySelector('[slot=\"title\"]');\n if (titleElement === null) {\n return \"\";\n }\n\n return titleElement.textContent.trim();\n }\n\n private get scrollParent(): Window | Element {\n const parent = this.hostElement.offsetParent;\n if (parent === document.body || parent === document.documentElement) {\n return window;\n }\n\n return parent;\n }\n\n private get canShowMenu(): boolean {\n return (\n !this.enableOffcanvas &&\n this.menuElements.length > 0 &&\n this.currentViewport !== Device.MOBILE &&\n !this.drawerOpen\n );\n }\n\n private openDrawer(): void {\n this.drawerOpen = true;\n }\n\n private closeDrawer(): void {\n this.drawerOpen = false;\n this.burgerButton.focus();\n this.currentIndex = -1;\n }\n\n private collectMenuElements(): void {\n const menuElements = (this.menuElements = this.hostElement.querySelectorAll('[slot=\"menu\"]'));\n this.menuLength = menuElements.length;\n this.setMenuFloatingMode();\n }\n\n private isSlotPresent(slotName: string): boolean {\n const slot = this.hostElement.querySelector(`[slot=\"${slotName}\"]`);\n\n return !!slot;\n }\n\n private renderSeachbar(): HTMLZSearchbarElement | HTMLZButtonElement {\n const renderSearch =\n this.currentViewport === Device.MOBILE || this.currentViewport === Device.TABLET ? true : false;\n\n if (this.currentViewport === Device.MOBILE && !this.searchPageUrl && this._stuck) {\n return;\n }\n\n if (this.searchPageUrl && (this.currentViewport === Device.MOBILE || this.currentViewport === Device.TABLET)) {\n return (\n <z-button\n class=\"search-page-button\"\n variant={ButtonVariant.SECONDARY}\n href={this.searchPageUrl}\n icon=\"search\"\n size={ControlSize.X_SMALL}\n ></z-button>\n );\n }\n\n return (\n <z-searchbar\n ref={(el) => (this.searchbar = el as HTMLZSearchbarElement)}\n value={this.searchString}\n placeholder={this.searchPlaceholder}\n showSearchButton={true}\n searchButtonIconOnly={renderSearch}\n size={ControlSize.X_SMALL}\n variant={ButtonVariant.SECONDARY}\n preventSubmit={this.searchString.length < 3}\n onSearchTyping={(e) => (this.searchString = e.detail)}\n onKeyDown={(e) => {\n if (e.code === KeyboardCode.ARROW_RIGHT || e.code === KeyboardCode.ARROW_LEFT) {\n e.stopPropagation();\n }\n }}\n />\n );\n }\n\n private renderProductLogos(): HTMLElement | null {\n return (\n <Fragment>\n {this.enableZLogo && (\n <img\n class=\"z-logo\"\n alt=\"Logo Zanichelli\"\n />\n )}\n {this.currentViewport !== Device.MOBILE && <slot name=\"product-logo\"></slot>}\n </Fragment>\n );\n }\n\n private renderMenuButton(): HTMLButtonElement {\n return (\n this.menuLength > 0 &&\n (this.enableOffcanvas || this._stuck || this.currentViewport === Device.MOBILE) && (\n <button\n ref={(el) => (this.burgerButton = el as HTMLButtonElement)}\n aria-label=\"Apri menu\"\n aria-haspopup=\"menu\"\n aria-expanded={`${this.drawerOpen}`}\n aria-controls=\"menu-offcanvas\"\n class=\"drawer-trigger\"\n onClick={this.openDrawer}\n onKeyUp={(ev: KeyboardEvent) => {\n if (ev.code === KeyboardCode.ENTER || ev.code === KeyboardCode.SPACE) {\n this.closeMenuButton.focus();\n }\n }}\n >\n <z-icon name=\"burger-menu\"></z-icon>\n </button>\n )\n );\n }\n\n private renderOffcanvas(): HTMLZOffcanvasElement {\n return (\n <z-offcanvas\n variant={OffCanvasVariant.OVERLAY}\n transitiondirection={TransitionDirection.RIGHT}\n open={this.drawerOpen}\n onCanvasOpenStatusChanged={(ev) => (this.drawerOpen = ev.detail)}\n >\n <div slot=\"canvasContent\">\n <button\n ref={(el) => (this.closeMenuButton = el as HTMLButtonElement)}\n class=\"drawer-close\"\n aria-label=\"Chiudi menu\"\n onClick={this.closeDrawer}\n aria-hidden={`${!this.drawerOpen}`}\n disabled={!this.drawerOpen}\n >\n <z-icon name=\"close\"></z-icon>\n </button>\n\n <div\n class=\"drawer-content\"\n aria-hidden={`${!this.drawerOpen}`}\n >\n <slot\n name=\"menu\"\n onSlotchange={this.collectMenuElements}\n ></slot>\n </div>\n </div>\n </z-offcanvas>\n );\n }\n\n private renderStuck(): HTMLElement {\n return (\n <div class=\"heading-stuck\">\n <div class=\"heading-stuck-content\">\n {this.renderMenuButton()}\n <div class=\"heading-title\">\n {this.renderProductLogos()}\n <slot name=\"stucked-title\">{this.title}</slot>\n </div>\n {this.enableSearch && this.renderSeachbar()}\n </div>\n </div>\n );\n }\n\n private getWidthMenu(): number {\n if (this.menuElements.length === 0) {\n return;\n }\n\n return Array.from(this.menuElements).reduce((acc, item) => item.getBoundingClientRect().width + acc, 100);\n }\n\n private focusToFirstItemMenu(): void {\n const menuItems = Array.from(this.menuElements).map(\n (el) => el.shadowRoot.querySelector(\".menu-label\") as HTMLElement\n );\n\n menuItems[0].focus();\n this.currentIndex = 0;\n }\n\n private handleFocusItem(e): void {\n const menuItems = Array.from(this.menuElements).map(\n (el) => el.shadowRoot.querySelector(\".menu-label\") as HTMLElement\n );\n\n if (\n e.code === KeyboardCode.ARROW_DOWN ||\n e.code === KeyboardCode.ARROW_UP ||\n e.code === KeyboardCode.ENTER ||\n e.code === KeyboardCode.TAB\n ) {\n return;\n }\n\n if (document.activeElement.tagName === \"Z-MENU-SECTION\" || document.activeElement.tagName === \"Z-MENU\") {\n return;\n }\n\n if (this.enableSearch && this.currentIndex === 0) {\n const input = this.searchbar.shadowRoot.querySelector(\"z-input input\") as HTMLInputElement;\n input.focus();\n this.currentIndex = -1;\n }\n\n if (this.currentIndex !== -1) {\n menuItems[this.currentIndex].focus();\n }\n }\n\n componentWillLoad(): void {\n this.collectMenuElements();\n this.evaluateViewport();\n }\n\n componentDidLoad(): void {\n this.onStuckMode();\n\n if (this.enableOffcanvas) {\n return;\n }\n\n const menuWidth = this.getWidthMenu();\n const containerSidePadding = 50;\n this.resizeObserver = new ResizeObserver((observer) => {\n const containerWidth = observer[0].contentRect.width;\n if (this.currentViewport === Device.MOBILE) {\n return (this.enableOffcanvas = true);\n }\n\n if (menuWidth > containerWidth - containerSidePadding && !this.enableOffcanvas) {\n this.enableOffcanvas = true;\n } else if (menuWidth <= containerWidth - containerSidePadding && this.enableOffcanvas) {\n this.enableOffcanvas = false;\n }\n });\n\n this.resizeObserver.observe(this.container);\n }\n\n disconnectedCallback(): void {\n this.resizeObserver?.disconnect();\n }\n\n render(): HTMLZAppHeaderElement {\n const hasTopSubtitle = this.isSlotPresent(\"top-subtitle\");\n\n return (\n <Host menu-length={this.menuLength}>\n <div\n class={`heading-panel ${this.menuLength > 0 && !this.enableOffcanvas ? \"has-menu\" : \"\"}`}\n ref={(el) => (this.container = el)}\n >\n <div class=\"heading-container\">\n {((!this.enableSearch && this.currentViewport === Device.MOBILE) ||\n this.currentViewport !== Device.MOBILE) && (\n <div class={`${this.enableOffcanvas ? \"p-left\" : \"\"}`}>\n <slot name=\"top-subtitle\"></slot>\n </div>\n )}\n <div class=\"heading-title\">\n {this.renderMenuButton()}\n {!hasTopSubtitle && !this._stuck && this.renderProductLogos()}\n <slot name=\"title\"></slot>\n {this.enableSearch && this.currentViewport !== Device.MOBILE && this.renderSeachbar()}\n </div>\n {this.enableSearch && this.currentViewport === Device.MOBILE && this.renderSeachbar()}\n </div>\n\n {this.canShowMenu && (\n <div\n class=\"menu-container\"\n onKeyUp={(e) => {\n if (this.enableOffcanvas) {\n return;\n }\n\n if (this.currentIndex === -1) {\n this.focusToFirstItemMenu();\n } else {\n this.handleFocusItem(e);\n }\n }}\n role=\"hidden\"\n tabIndex={0}\n >\n <slot\n name=\"menu\"\n onSlotchange={this.collectMenuElements}\n ></slot>\n </div>\n )}\n </div>\n\n {this.renderOffcanvas()}\n\n {this._stuck && this.renderStuck()}\n </Host>\n );\n }\n}\n"]}
|