@zanichelli/albe-web-components 16.3.0 → 16.3.1
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/breakpoints-8a1e87e0.js +11 -0
- package/dist/cjs/breakpoints-8a1e87e0.js.map +1 -0
- package/dist/cjs/{index-b361709b.js → index-041b41e6.js} +2 -2
- package/dist/cjs/{index-b361709b.js.map → index-041b41e6.js.map} +1 -1
- package/dist/cjs/{index-3a070c6b.js → index-1dfb8b3c.js} +2 -2
- package/dist/cjs/{index-3a070c6b.js.map → index-1dfb8b3c.js.map} +1 -1
- package/dist/cjs/{index-1f9f28df.js → index-25ded558.js} +2 -2
- package/dist/cjs/{index-1f9f28df.js.map → index-25ded558.js.map} +1 -1
- package/dist/cjs/{index-f0159789.js → index-4bce26ea.js} +5 -5
- package/dist/cjs/{index-f0159789.js.map → index-4bce26ea.js.map} +1 -1
- package/dist/cjs/{index-e801ae96.js → index-96af6326.js} +2167 -2127
- package/dist/cjs/index-96af6326.js.map +1 -0
- package/dist/cjs/{index-1890445d.js → index-b7759a0d.js} +2 -2
- package/dist/cjs/{index-1890445d.js.map → index-b7759a0d.js.map} +1 -1
- package/dist/cjs/{index-597156d1.js → index-d4272b0e.js} +2 -2
- package/dist/cjs/{index-597156d1.js.map → index-d4272b0e.js.map} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{utils-6bd8c55e.js → utils-257558ff.js} +19 -5
- package/dist/cjs/utils-257558ff.js.map +1 -0
- package/dist/cjs/web-components-library.cjs.js +3 -3
- package/dist/cjs/web-components-library.cjs.js.map +1 -1
- package/dist/cjs/z-accordion.cjs.entry.js +1 -1
- package/dist/cjs/z-alert.cjs.entry.js +2 -2
- package/dist/cjs/z-anchor-navigation.cjs.entry.js +1 -1
- package/dist/cjs/z-app-header-deprecated.cjs.entry.js +2 -2
- package/dist/cjs/z-app-header-deprecated.cjs.entry.js.map +1 -1
- package/dist/cjs/z-app-header_12.cjs.entry.js +278 -342
- package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
- package/dist/cjs/z-aria-alert.cjs.entry.js +2 -2
- package/dist/cjs/z-avatar.cjs.entry.js +3 -3
- package/dist/cjs/z-book-card.cjs.entry.js +5 -5
- package/dist/cjs/z-book-card.cjs.entry.js.map +1 -1
- package/dist/cjs/z-breadcrumb.cjs.entry.js +5 -5
- package/dist/cjs/z-button-sort.cjs.entry.js +4 -4
- package/dist/cjs/z-button-sort.cjs.entry.js.map +1 -1
- package/dist/cjs/z-card.cjs.entry.js +1 -1
- package/dist/cjs/z-carousel.cjs.entry.js +1 -1
- package/dist/cjs/z-chip.cjs.entry.js +3 -3
- package/dist/cjs/z-combobox.cjs.entry.js +5 -5
- package/dist/cjs/z-combobox.cjs.entry.js.map +1 -1
- package/dist/cjs/z-cover-hero.cjs.entry.js +3 -3
- package/dist/cjs/z-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +7 -7
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js.map +1 -1
- package/dist/cjs/z-file-upload.cjs.entry.js +3 -3
- package/dist/cjs/z-file.cjs.entry.js +4 -4
- package/dist/cjs/z-file.cjs.entry.js.map +1 -1
- 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 +2 -2
- package/dist/cjs/z-logo.cjs.entry.js +2 -2
- package/dist/cjs/z-menu-deprecated.cjs.entry.js +1 -1
- package/dist/cjs/z-menu-section-deprecated.cjs.entry.js +1 -1
- package/dist/cjs/z-menu-section.cjs.entry.js +141 -112
- package/dist/cjs/z-menu-section.cjs.entry.js.map +1 -1
- package/dist/cjs/z-menu.cjs.entry.js +210 -162
- package/dist/cjs/z-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/z-myz-card-alert.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-card-footer.cjs.entry.js +2 -2
- 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 +5 -5
- 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 +3 -3
- package/dist/cjs/z-notification.cjs.entry.js +2 -2
- package/dist/cjs/z-otp.cjs.entry.js +3 -3
- package/dist/cjs/z-pagination.cjs.entry.js +1 -1
- package/dist/cjs/z-panel-elem.cjs.entry.js +3 -3
- package/dist/cjs/z-popover.cjs.entry.js +2 -2
- package/dist/cjs/z-range-picker.cjs.entry.js +1 -1
- package/dist/cjs/z-section-title.cjs.entry.js +2 -2
- 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 +9 -9
- package/dist/cjs/z-tbody.cjs.entry.js +2 -2
- package/dist/cjs/z-td.cjs.entry.js +2 -2
- package/dist/cjs/z-tfoot.cjs.entry.js +2 -2
- package/dist/cjs/z-th.cjs.entry.js +2 -2
- package/dist/cjs/z-thead.cjs.entry.js +2 -2
- package/dist/cjs/z-toast-notification-list.cjs.entry.js +2 -2
- package/dist/cjs/z-toast-notification.cjs.entry.js +4 -4
- package/dist/cjs/z-toast-notification.cjs.entry.js.map +1 -1
- 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 +2 -2
- package/dist/cjs/z-tr.cjs.entry.js +6 -6
- package/dist/cjs/z-visually-hidden.cjs.entry.js +2 -2
- package/dist/collection/beans/index.js.map +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/css-components/z-fab/index.stories.js.map +1 -1
- package/dist/collection/components/css-components/z-link/index.stories.js.map +1 -1
- package/dist/collection/components/date-picker/utils.js.map +1 -1
- package/dist/collection/components/date-picker/z-date-picker/index.js.map +1 -1
- package/dist/collection/components/date-picker/z-date-picker/index.stories.js.map +1 -1
- package/dist/collection/components/date-picker/z-range-picker/index.js.map +1 -1
- package/dist/collection/components/date-picker/z-range-picker/index.stories.js.map +1 -1
- package/dist/collection/components/deprecated/z-app-header-deprecated/index.js +1 -1
- package/dist/collection/components/deprecated/z-app-header-deprecated/index.js.map +1 -1
- package/dist/collection/components/deprecated/z-app-header-deprecated/index.stories.js.map +1 -1
- package/dist/collection/components/deprecated/z-menu-deprecated/index.js.map +1 -1
- package/dist/collection/components/deprecated/z-menu-deprecated/index.stories.js.map +1 -1
- package/dist/collection/components/deprecated/z-menu-section-deprecated/index.js.map +1 -1
- package/dist/collection/components/deprecated/z-menu-section-deprecated/index.stories.js.map +1 -1
- package/dist/collection/components/file-upload/z-dragdrop-area/index.js.map +1 -1
- package/dist/collection/components/file-upload/z-file/index.js +3 -3
- package/dist/collection/components/file-upload/z-file/index.js.map +1 -1
- package/dist/collection/components/file-upload/z-file/index.stories.js.map +1 -1
- package/dist/collection/components/file-upload/z-file-upload/index.js.map +1 -1
- package/dist/collection/components/file-upload/z-file-upload/index.stories.js.map +1 -1
- package/dist/collection/components/index.js.map +1 -1
- package/dist/collection/components/list/z-list/index.js.map +1 -1
- package/dist/collection/components/list/z-list/index.stories.js.map +1 -1
- package/dist/collection/components/list/z-list-element/index.js.map +1 -1
- package/dist/collection/components/list/z-list-element/index.stories.js.map +1 -1
- package/dist/collection/components/list/z-list-group/index.js.map +1 -1
- package/dist/collection/components/list/z-list-group/index.stories.js.map +1 -1
- package/dist/collection/components/table/cells/z-td/index.js.map +1 -1
- package/dist/collection/components/table/cells/z-th/index.js.map +1 -1
- package/dist/collection/components/table/z-table/index.js.map +1 -1
- package/dist/collection/components/table/z-table/index.stories.js.map +1 -1
- package/dist/collection/components/table/z-tbody/index.js.map +1 -1
- package/dist/collection/components/table/z-tfoot/index.js.map +1 -1
- package/dist/collection/components/table/z-thead/index.js.map +1 -1
- package/dist/collection/components/table/z-tr/index.js.map +1 -1
- package/dist/collection/components/z-accordion/index.js.map +1 -1
- package/dist/collection/components/z-accordion/index.stories.js.map +1 -1
- package/dist/collection/components/z-anchor-navigation/index.js.map +1 -1
- package/dist/collection/components/z-anchor-navigation/index.stories.js.map +1 -1
- package/dist/collection/components/z-app-header/index.js +149 -206
- package/dist/collection/components/z-app-header/index.js.map +1 -1
- package/dist/collection/components/z-app-header/index.stories.js +12 -28
- package/dist/collection/components/z-app-header/index.stories.js.map +1 -1
- package/dist/collection/components/z-app-header/styles.css +95 -121
- package/dist/collection/components/z-aria-alert/index.js +1 -1
- package/dist/collection/components/z-aria-alert/index.js.map +1 -1
- package/dist/collection/components/z-aria-alert/index.stories.js.map +1 -1
- package/dist/collection/components/z-avatar/index.js +2 -2
- package/dist/collection/components/z-avatar/index.js.map +1 -1
- package/dist/collection/components/z-avatar/index.stories.js.map +1 -1
- package/dist/collection/components/z-book-card/index.js +3 -3
- package/dist/collection/components/z-book-card/index.js.map +1 -1
- package/dist/collection/components/z-book-card/index.stories.js.map +1 -1
- package/dist/collection/components/z-breadcrumb/index.js +2 -2
- package/dist/collection/components/z-breadcrumb/index.js.map +1 -1
- package/dist/collection/components/z-breadcrumb/index.stories.js.map +1 -1
- package/dist/collection/components/z-button/index.js.map +1 -1
- package/dist/collection/components/z-button/index.stories.js.map +1 -1
- package/dist/collection/components/z-button-sort/index.js +3 -3
- package/dist/collection/components/z-button-sort/index.js.map +1 -1
- package/dist/collection/components/z-button-sort/index.stories.js.map +1 -1
- package/dist/collection/components/z-card/index.js.map +1 -1
- package/dist/collection/components/z-card/index.stories.js.map +1 -1
- package/dist/collection/components/z-carousel/index.js.map +1 -1
- package/dist/collection/components/z-carousel/index.stories.js.map +1 -1
- package/dist/collection/components/z-chip/index.js +2 -2
- package/dist/collection/components/z-chip/index.js.map +1 -1
- package/dist/collection/components/z-chip/index.stories.js.map +1 -1
- package/dist/collection/components/z-combobox/index.js +1 -1
- package/dist/collection/components/z-combobox/index.js.map +1 -1
- package/dist/collection/components/z-combobox/index.stories.js.map +1 -1
- package/dist/collection/components/z-combobox/styles.css +6 -4
- package/dist/collection/components/z-cover-hero/index.js +2 -2
- package/dist/collection/components/z-cover-hero/index.js.map +1 -1
- package/dist/collection/components/z-cover-hero/index.stories.js.map +1 -1
- package/dist/collection/components/z-divider/index.js +1 -1
- package/dist/collection/components/z-divider/index.js.map +1 -1
- package/dist/collection/components/z-divider/index.stories.js.map +1 -1
- package/dist/collection/components/z-ghost-loading/index.js +1 -1
- package/dist/collection/components/z-ghost-loading/index.js.map +1 -1
- package/dist/collection/components/z-ghost-loading/index.stories.js.map +1 -1
- package/dist/collection/components/z-icon/index.js.map +1 -1
- package/dist/collection/components/z-icon/index.stories.js.map +1 -1
- package/dist/collection/components/z-info-box/index.js +1 -1
- package/dist/collection/components/z-info-box/index.js.map +1 -1
- package/dist/collection/components/z-info-box/index.stories.js.map +1 -1
- package/dist/collection/components/z-info-reveal/index.js +1 -1
- package/dist/collection/components/z-info-reveal/index.js.map +1 -1
- package/dist/collection/components/z-info-reveal/index.stories.js.map +1 -1
- package/dist/collection/components/z-input/index.js +1 -1
- package/dist/collection/components/z-input/index.js.map +1 -1
- package/dist/collection/components/z-input/index.stories.js.map +1 -1
- package/dist/collection/components/z-input-message/index.js +1 -1
- package/dist/collection/components/z-input-message/index.js.map +1 -1
- package/dist/collection/components/z-input-message/index.stories.js.map +1 -1
- package/dist/collection/components/z-logo/index.js +1 -1
- package/dist/collection/components/z-logo/index.js.map +1 -1
- package/dist/collection/components/z-logo/index.stories.js.map +1 -1
- package/dist/collection/components/z-menu/index.js +269 -171
- package/dist/collection/components/z-menu/index.js.map +1 -1
- package/dist/collection/components/z-menu/index.stories.js +2 -8
- package/dist/collection/components/z-menu/index.stories.js.map +1 -1
- package/dist/collection/components/z-menu/styles.css +38 -46
- package/dist/collection/components/z-menu-section/index.js +216 -121
- package/dist/collection/components/z-menu-section/index.js.map +1 -1
- package/dist/collection/components/z-menu-section/index.stories.js.map +1 -1
- package/dist/collection/components/z-menu-section/styles.css +32 -27
- package/dist/collection/components/z-modal/index.js +6 -6
- package/dist/collection/components/z-modal/index.js.map +1 -1
- package/dist/collection/components/z-modal/index.stories.js.map +1 -1
- package/dist/collection/components/z-navigation-tabs/index.js +2 -2
- package/dist/collection/components/z-navigation-tabs/index.js.map +1 -1
- package/dist/collection/components/z-navigation-tabs/index.stories.js.map +1 -1
- package/dist/collection/components/z-notification/index.js +1 -1
- package/dist/collection/components/z-notification/index.js.map +1 -1
- package/dist/collection/components/z-notification/index.stories.js.map +1 -1
- package/dist/collection/components/z-offcanvas/index.js +1 -1
- package/dist/collection/components/z-offcanvas/index.js.map +1 -1
- package/dist/collection/components/z-offcanvas/index.stories.js.map +1 -1
- package/dist/collection/components/z-pagination/index.js.map +1 -1
- package/dist/collection/components/z-pagination/index.stories.js.map +1 -1
- package/dist/collection/components/z-panel-elem/index.js +2 -2
- package/dist/collection/components/z-panel-elem/index.js.map +1 -1
- package/dist/collection/components/z-panel-elem/index.stories.js.map +1 -1
- package/dist/collection/components/z-popover/index.js +1 -1
- package/dist/collection/components/z-popover/index.js.map +1 -1
- package/dist/collection/components/z-popover/index.stories.js.map +1 -1
- package/dist/collection/components/z-searchbar/index.js +4 -3
- package/dist/collection/components/z-searchbar/index.js.map +1 -1
- package/dist/collection/components/z-searchbar/index.stories.js.map +1 -1
- package/dist/collection/components/z-section-title/index.js +1 -1
- package/dist/collection/components/z-section-title/index.js.map +1 -1
- package/dist/collection/components/z-section-title/index.stories.js.map +1 -1
- package/dist/collection/components/z-select/index.js +1 -1
- package/dist/collection/components/z-select/index.js.map +1 -1
- package/dist/collection/components/z-select/index.stories.js.map +1 -1
- package/dist/collection/components/z-skip-to-content/index.js +1 -1
- package/dist/collection/components/z-skip-to-content/index.js.map +1 -1
- package/dist/collection/components/z-skip-to-content/index.stories.js.map +1 -1
- package/dist/collection/components/z-stepper/index.js +1 -1
- package/dist/collection/components/z-stepper/index.js.map +1 -1
- package/dist/collection/components/z-stepper/index.stories.js.map +1 -1
- package/dist/collection/components/z-stepper-item/index.js +1 -1
- package/dist/collection/components/z-stepper-item/index.js.map +1 -1
- package/dist/collection/components/z-stepper-item/index.stories.js.map +1 -1
- package/dist/collection/components/z-tag/index.js.map +1 -1
- package/dist/collection/components/z-tag/index.stories.js.map +1 -1
- package/dist/collection/components/z-toast-notification/index.js +3 -3
- package/dist/collection/components/z-toast-notification/index.js.map +1 -1
- package/dist/collection/components/z-toast-notification/index.stories.js.map +1 -1
- package/dist/collection/components/z-toast-notification-list/index.js +1 -1
- package/dist/collection/components/z-toast-notification-list/index.js.map +1 -1
- package/dist/collection/components/z-toast-notification-list/index.stories.js.map +1 -1
- package/dist/collection/components/z-toggle-button/index.js +2 -2
- package/dist/collection/components/z-toggle-button/index.js.map +1 -1
- package/dist/collection/components/z-toggle-button/index.stories.js.map +1 -1
- package/dist/collection/components/z-toggle-switch/index.js +3 -3
- package/dist/collection/components/z-toggle-switch/index.js.map +1 -1
- package/dist/collection/components/z-toggle-switch/index.stories.js.map +1 -1
- package/dist/collection/components/z-tooltip/index.js +1 -1
- package/dist/collection/components/z-tooltip/index.js.map +1 -1
- package/dist/collection/components/z-tooltip/index.stories.js.map +1 -1
- package/dist/collection/components/z-visually-hidden/index.js +1 -1
- package/dist/collection/components/z-visually-hidden/index.js.map +1 -1
- package/dist/collection/components/z-visually-hidden/index.stories.js.map +1 -1
- package/dist/collection/constants/breakpoints.js +7 -4
- package/dist/collection/constants/breakpoints.js.map +1 -1
- package/dist/collection/constants/icons.js.map +1 -1
- package/dist/collection/constants/iconset.js.map +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card/index.js.map +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-alert/index.js.map +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-body/index.js.map +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-cover/index.js.map +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-dictionary/index.js.map +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/index.js.map +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-footer-sections/index.js.map +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-header/index.js.map +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-icon/index.js.map +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-info/index.js.map +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js.map +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list/index.js.map +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js.map +1 -1
- package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
- package/dist/collection/snowflakes/myz/z-alert/index.js.map +1 -1
- package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
- package/dist/collection/snowflakes/myz/z-otp/index.js.map +1 -1
- package/dist/collection/snowflakes/myz/z-slideshow/index.js.map +1 -1
- package/dist/collection/utils/storybook-utils.js.map +1 -1
- package/dist/collection/utils/utils.js +17 -7
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/breakpoints.js +8 -4
- package/dist/components/breakpoints.js.map +1 -1
- package/dist/components/index10.js +1 -1
- package/dist/components/index11.js +1 -1
- package/dist/components/index15.js +6 -6
- package/dist/components/index15.js.map +1 -1
- 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/index20.js +1 -1
- package/dist/components/index21.js +1 -1
- package/dist/components/index22.js +1 -1
- package/dist/components/index23.js +5 -4
- package/dist/components/index23.js.map +1 -1
- package/dist/components/index3.js +1 -1
- package/dist/components/index5.js +2 -2
- package/dist/components/index6.js +1 -1
- package/dist/components/index8.js +1 -1
- package/dist/components/utils.js +18 -5
- package/dist/components/utils.js.map +1 -1
- package/dist/components/z-app-header-deprecated.js +1 -1
- package/dist/components/z-app-header-deprecated.js.map +1 -1
- package/dist/components/z-app-header.js +144 -207
- 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 +3 -3
- package/dist/components/z-book-card.js.map +1 -1
- package/dist/components/z-breadcrumb.js +2 -2
- package/dist/components/z-button-sort.js +3 -3
- package/dist/components/z-button-sort.js.map +1 -1
- package/dist/components/z-combobox.js +2 -2
- package/dist/components/z-combobox.js.map +1 -1
- package/dist/components/z-cover-hero.js +2 -2
- package/dist/components/z-file.js +3 -3
- package/dist/components/z-file.js.map +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-section.js +151 -115
- package/dist/components/z-menu-section.js.map +1 -1
- package/dist/components/z-menu.js +218 -166
- 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 +2 -2
- package/dist/components/z-skip-to-content.js +2 -2
- package/dist/components/z-slideshow.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 -0
- package/dist/components/z-table.js.map +1 -1
- package/dist/components/z-toast-notification-list.js +1 -1
- package/dist/components/z-toast-notification.js +3 -3
- package/dist/components/z-toast-notification.js.map +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-visually-hidden.js +1 -1
- package/dist/esm/breakpoints-d148bfde.js +11 -0
- package/dist/esm/breakpoints-d148bfde.js.map +1 -0
- package/dist/esm/{index-175661e6.js → index-36f0f6c0.js} +2 -2
- package/dist/esm/{index-175661e6.js.map → index-36f0f6c0.js.map} +1 -1
- package/dist/esm/{index-fd7edd22.js → index-66bd56db.js} +5 -5
- package/dist/esm/{index-fd7edd22.js.map → index-66bd56db.js.map} +1 -1
- package/dist/esm/{index-7a28ff39.js → index-89520805.js} +2 -2
- package/dist/esm/{index-7a28ff39.js.map → index-89520805.js.map} +1 -1
- package/dist/esm/{index-a2130b6a.js → index-c8ceadeb.js} +2167 -2127
- package/dist/esm/index-c8ceadeb.js.map +1 -0
- package/dist/esm/{index-230d44a5.js → index-cddfba10.js} +2 -2
- package/dist/esm/{index-230d44a5.js.map → index-cddfba10.js.map} +1 -1
- package/dist/esm/{index-a81f1558.js → index-dfddeb25.js} +2 -2
- package/dist/esm/{index-a81f1558.js.map → index-dfddeb25.js.map} +1 -1
- package/dist/esm/{index-b556b384.js → index-e70be23f.js} +2 -2
- package/dist/esm/{index-b556b384.js.map → index-e70be23f.js.map} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-8ade9e2d.js → utils-acc8bdd0.js} +19 -6
- package/dist/esm/utils-acc8bdd0.js.map +1 -0
- package/dist/esm/web-components-library.js +4 -4
- package/dist/esm/web-components-library.js.map +1 -1
- package/dist/esm/z-accordion.entry.js +1 -1
- package/dist/esm/z-alert.entry.js +2 -2
- package/dist/esm/z-anchor-navigation.entry.js +1 -1
- package/dist/esm/z-app-header-deprecated.entry.js +2 -2
- package/dist/esm/z-app-header-deprecated.entry.js.map +1 -1
- package/dist/esm/z-app-header_12.entry.js +145 -209
- package/dist/esm/z-app-header_12.entry.js.map +1 -1
- package/dist/esm/z-aria-alert.entry.js +2 -2
- package/dist/esm/z-avatar.entry.js +3 -3
- package/dist/esm/z-book-card.entry.js +5 -5
- package/dist/esm/z-book-card.entry.js.map +1 -1
- package/dist/esm/z-breadcrumb.entry.js +5 -5
- package/dist/esm/z-button-sort.entry.js +4 -4
- package/dist/esm/z-button-sort.entry.js.map +1 -1
- package/dist/esm/z-card.entry.js +1 -1
- package/dist/esm/z-carousel.entry.js +1 -1
- package/dist/esm/z-chip.entry.js +3 -3
- package/dist/esm/z-combobox.entry.js +5 -5
- package/dist/esm/z-combobox.entry.js.map +1 -1
- package/dist/esm/z-cover-hero.entry.js +3 -3
- package/dist/esm/z-date-picker.entry.js +1 -1
- package/dist/esm/z-dragdrop-area_2.entry.js +7 -7
- package/dist/esm/z-dragdrop-area_2.entry.js.map +1 -1
- package/dist/esm/z-file-upload.entry.js +3 -3
- package/dist/esm/z-file.entry.js +4 -4
- package/dist/esm/z-file.entry.js.map +1 -1
- 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 +2 -2
- package/dist/esm/z-logo.entry.js +2 -2
- package/dist/esm/z-menu-deprecated.entry.js +1 -1
- package/dist/esm/z-menu-section-deprecated.entry.js +1 -1
- package/dist/esm/z-menu-section.entry.js +140 -111
- package/dist/esm/z-menu-section.entry.js.map +1 -1
- package/dist/esm/z-menu.entry.js +210 -162
- package/dist/esm/z-menu.entry.js.map +1 -1
- package/dist/esm/z-myz-card-alert.entry.js +2 -2
- package/dist/esm/z-myz-card-dictionary.entry.js +2 -2
- package/dist/esm/z-myz-card-footer-sections.entry.js +2 -2
- package/dist/esm/z-myz-card-footer.entry.js +2 -2
- 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 +5 -5
- 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 +3 -3
- package/dist/esm/z-notification.entry.js +2 -2
- package/dist/esm/z-otp.entry.js +3 -3
- package/dist/esm/z-pagination.entry.js +1 -1
- package/dist/esm/z-panel-elem.entry.js +3 -3
- package/dist/esm/z-popover.entry.js +2 -2
- package/dist/esm/z-range-picker.entry.js +1 -1
- package/dist/esm/z-section-title.entry.js +2 -2
- 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 +9 -9
- package/dist/esm/z-tbody.entry.js +2 -2
- package/dist/esm/z-td.entry.js +2 -2
- package/dist/esm/z-tfoot.entry.js +2 -2
- package/dist/esm/z-th.entry.js +2 -2
- package/dist/esm/z-thead.entry.js +2 -2
- package/dist/esm/z-toast-notification-list.entry.js +2 -2
- package/dist/esm/z-toast-notification.entry.js +4 -4
- package/dist/esm/z-toast-notification.entry.js.map +1 -1
- 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 +2 -2
- package/dist/esm/z-tr.entry.js +6 -6
- package/dist/esm/z-visually-hidden.entry.js +2 -2
- package/dist/types/components/deprecated/z-app-header-deprecated/index.stories.d.ts +3 -3
- package/dist/types/components/list/z-list-group/index.stories.d.ts +1 -1
- package/dist/types/components/z-app-header/index.d.ts +23 -30
- package/dist/types/components/z-app-header/index.stories.d.ts +2 -5
- package/dist/types/components/z-book-card/index.stories.d.ts +2 -2
- package/dist/types/components/z-carousel/index.stories.d.ts +1 -1
- package/dist/types/components/z-cover-hero/index.stories.d.ts +1 -1
- package/dist/types/components/z-menu/index.d.ts +34 -26
- package/dist/types/components/z-menu/index.stories.d.ts +1 -2
- package/dist/types/components/z-menu-section/index.d.ts +28 -18
- package/dist/types/components/z-modal/index.stories.d.ts +1 -1
- package/dist/types/components/z-navigation-tabs/index.stories.d.ts +2 -2
- package/dist/types/components/z-popover/index.stories.d.ts +2 -2
- package/dist/types/components/z-section-title/index.stories.d.ts +1 -1
- package/dist/types/components/z-tag/index.stories.d.ts +2 -2
- package/dist/types/components/z-tooltip/index.stories.d.ts +1 -1
- package/dist/types/components.d.ts +48 -8
- package/dist/types/constants/breakpoints.d.ts +6 -4
- package/dist/types/stencil-public-runtime.d.ts +0 -2
- package/dist/types/utils/utils.d.ts +10 -1
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/p-04c39e8a.entry.js +2 -0
- package/dist/web-components-library/p-04c39e8a.entry.js.map +1 -0
- package/dist/web-components-library/p-0542a3c9.entry.js +2 -0
- package/dist/web-components-library/p-0542a3c9.entry.js.map +1 -0
- package/dist/web-components-library/{p-6319b5e2.entry.js → p-06d98334.entry.js} +2 -2
- package/dist/web-components-library/{p-2672e36f.entry.js → p-100c6243.entry.js} +2 -2
- package/dist/web-components-library/p-16d625b3.entry.js +2 -0
- package/dist/web-components-library/p-16d625b3.entry.js.map +1 -0
- package/{www/build/p-28928bb6.entry.js → dist/web-components-library/p-1896cc54.entry.js} +2 -2
- package/{www/build/p-19f8c3d2.entry.js → dist/web-components-library/p-1cc37aa7.entry.js} +2 -2
- package/{www/build/p-c0bdbfb5.entry.js → dist/web-components-library/p-273f3c53.entry.js} +2 -2
- package/dist/web-components-library/{p-4f7dd068.entry.js → p-28018cd3.entry.js} +2 -2
- package/{www/build/p-12d62027.entry.js → dist/web-components-library/p-296924ea.entry.js} +2 -2
- package/dist/web-components-library/p-2b1fd95a.entry.js +2 -0
- package/dist/web-components-library/{p-99b791d1.entry.js → p-2e432a39.entry.js} +2 -2
- package/dist/web-components-library/{p-af856537.entry.js → p-2f662fea.entry.js} +2 -2
- package/dist/web-components-library/{p-8a10fec5.entry.js → p-38d5e74f.entry.js} +2 -2
- package/dist/web-components-library/p-3ae8fb1a.entry.js +2 -0
- package/dist/web-components-library/{p-304eeab0.js → p-3dbad75e.js} +2 -2
- package/{www/build/p-be4878f2.entry.js → dist/web-components-library/p-4537f922.entry.js} +2 -2
- package/dist/web-components-library/{p-91c04edc.entry.js → p-45dc157c.entry.js} +2 -2
- package/dist/web-components-library/{p-e366782c.entry.js → p-46d98609.entry.js} +2 -2
- package/{www/build/p-7d7c5344.js → dist/web-components-library/p-4a2e0034.js} +2 -2
- package/dist/web-components-library/p-4f3f8578.entry.js +2 -0
- package/dist/web-components-library/p-5145a606.js +2 -0
- package/dist/web-components-library/p-5145a606.js.map +1 -0
- package/{www/build/p-e5dc0719.entry.js → dist/web-components-library/p-51f1c9c0.entry.js} +2 -2
- package/{www/build/p-e1852de3.entry.js → dist/web-components-library/p-5a0f0978.entry.js} +2 -2
- package/dist/web-components-library/{p-6586441a.entry.js → p-5a178c69.entry.js} +3 -3
- package/dist/web-components-library/p-5a178c69.entry.js.map +1 -0
- package/dist/web-components-library/{p-cf2640b0.entry.js → p-608c35ba.entry.js} +2 -2
- package/{www/build/p-cf2640b0.entry.js.map → dist/web-components-library/p-608c35ba.entry.js.map} +1 -1
- package/dist/web-components-library/{p-26b5c84d.js → p-60f410df.js} +2 -2
- package/dist/web-components-library/p-63ec7bad.entry.js +2 -0
- package/dist/web-components-library/p-64364cbf.entry.js +2 -0
- package/dist/web-components-library/p-64364cbf.entry.js.map +1 -0
- package/dist/web-components-library/p-64aab82f.js +2 -0
- package/dist/web-components-library/p-67e5e8ed.js +2 -0
- package/dist/web-components-library/p-67e5e8ed.js.map +1 -0
- package/dist/web-components-library/{p-57eee056.entry.js → p-68f4fbc8.entry.js} +2 -2
- package/dist/web-components-library/{p-f21bc3a9.entry.js → p-6a1b3e86.entry.js} +2 -2
- package/dist/web-components-library/{p-05e9ae1e.entry.js → p-6db2fd46.entry.js} +2 -2
- package/{www/build/p-83350b5f.entry.js → dist/web-components-library/p-707e5f91.entry.js} +2 -2
- package/dist/web-components-library/p-75c4a726.js +3 -0
- package/dist/web-components-library/p-75c4a726.js.map +1 -0
- package/{www/build/p-85f84e55.entry.js → dist/web-components-library/p-777ad335.entry.js} +2 -2
- package/dist/web-components-library/p-777ad335.entry.js.map +1 -0
- package/{www/build/p-b84fa3b6.entry.js → dist/web-components-library/p-7aba5af3.entry.js} +2 -2
- package/dist/web-components-library/p-7d5bf905.entry.js +2 -0
- package/dist/web-components-library/{p-324ef970.entry.js → p-820b48f6.entry.js} +2 -2
- package/dist/web-components-library/p-823c45d4.entry.js +2 -0
- package/{www/build/p-8c9f7cef.entry.js → dist/web-components-library/p-855334f4.entry.js} +2 -2
- package/dist/web-components-library/{p-aa0f083b.js → p-8a6a4d22.js} +2 -2
- package/{www/build/p-8b309268.entry.js → dist/web-components-library/p-8d56e74b.entry.js} +2 -2
- package/dist/web-components-library/p-8d56e74b.entry.js.map +1 -0
- package/dist/web-components-library/{p-d9e1d8c7.js → p-95cb8701.js} +2 -2
- package/dist/web-components-library/p-9a1b51ed.entry.js +2 -0
- package/{www/build/p-ad76b8ff.entry.js.map → dist/web-components-library/p-9a1b51ed.entry.js.map} +1 -1
- package/dist/web-components-library/{p-4552744b.entry.js → p-9b9a04ad.entry.js} +2 -2
- package/dist/web-components-library/{p-77d8ad7e.entry.js → p-a0fd1323.entry.js} +2 -2
- package/dist/web-components-library/p-a64a1bf0.entry.js +2 -0
- package/dist/web-components-library/p-a64a1bf0.entry.js.map +1 -0
- package/dist/web-components-library/p-aaae6b16.entry.js +2 -0
- package/dist/web-components-library/{p-97b0c3b3.entry.js.map → p-aaae6b16.entry.js.map} +1 -1
- package/dist/web-components-library/p-ab7f129e.entry.js +2 -0
- package/dist/web-components-library/{p-6f4dd02b.entry.js.map → p-ab7f129e.entry.js.map} +1 -1
- package/{www/build/p-088a31dc.entry.js → dist/web-components-library/p-acd911aa.entry.js} +2 -2
- package/{www/build/p-a4ada10b.entry.js → dist/web-components-library/p-ad97fdc4.entry.js} +2 -2
- package/dist/web-components-library/{p-57ecb5a7.entry.js → p-b2356bc7.entry.js} +2 -2
- package/dist/web-components-library/p-c1e498ac.entry.js +2 -0
- package/dist/web-components-library/{p-a5781264.entry.js → p-c54d0925.entry.js} +2 -2
- package/dist/web-components-library/p-c679277c.entry.js +2 -0
- package/{www/build/p-df05727f.entry.js.map → dist/web-components-library/p-c679277c.entry.js.map} +1 -1
- package/dist/web-components-library/p-cc71a90c.entry.js +2 -0
- package/{www/build/p-c90249e5.entry.js → dist/web-components-library/p-cd0219b4.entry.js} +2 -2
- package/{www/build/p-6a664748.entry.js → dist/web-components-library/p-d5f5e107.entry.js} +2 -2
- package/dist/web-components-library/p-d5f5e107.entry.js.map +1 -0
- package/dist/web-components-library/{p-88e756cd.entry.js → p-da7200c2.entry.js} +2 -2
- package/{www/build/p-ae96bc09.entry.js → dist/web-components-library/p-df8c381a.entry.js} +2 -2
- package/dist/web-components-library/{p-3b266de4.entry.js → p-df9c3674.entry.js} +2 -2
- package/dist/web-components-library/{p-609c11d6.entry.js → p-e25d7f0a.entry.js} +2 -2
- package/dist/web-components-library/{p-33eea921.entry.js → p-e4d97fbf.entry.js} +2 -2
- package/dist/web-components-library/{p-f74f9f3c.entry.js → p-e529a714.entry.js} +2 -2
- package/dist/web-components-library/{p-21b85c7f.entry.js → p-ea9c0ff3.entry.js} +2 -2
- package/dist/web-components-library/{p-2a7e4988.entry.js → p-f06ad42c.entry.js} +2 -2
- package/dist/web-components-library/{p-8499a29d.entry.js → p-f15d0a00.entry.js} +2 -2
- package/{www/build/p-63e970ee.entry.js → dist/web-components-library/p-f425c6f2.entry.js} +2 -2
- package/dist/web-components-library/p-f703660d.entry.js +2 -0
- package/{www/build/p-49e4ce84.entry.js → dist/web-components-library/p-f8bbca6e.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/loader/index.d.ts +3 -0
- package/package.json +16 -18
- package/www/build/index.esm.js +1 -1
- package/www/build/p-04c39e8a.entry.js +2 -0
- package/www/build/p-04c39e8a.entry.js.map +1 -0
- package/www/build/p-0542a3c9.entry.js +2 -0
- package/www/build/p-0542a3c9.entry.js.map +1 -0
- package/www/build/{p-6319b5e2.entry.js → p-06d98334.entry.js} +2 -2
- package/www/build/{p-2672e36f.entry.js → p-100c6243.entry.js} +2 -2
- package/www/build/p-16d625b3.entry.js +2 -0
- package/www/build/p-16d625b3.entry.js.map +1 -0
- package/{dist/web-components-library/p-28928bb6.entry.js → www/build/p-1896cc54.entry.js} +2 -2
- package/{dist/web-components-library/p-19f8c3d2.entry.js → www/build/p-1cc37aa7.entry.js} +2 -2
- package/{dist/web-components-library/p-c0bdbfb5.entry.js → www/build/p-273f3c53.entry.js} +2 -2
- package/www/build/{p-4f7dd068.entry.js → p-28018cd3.entry.js} +2 -2
- package/{dist/web-components-library/p-12d62027.entry.js → www/build/p-296924ea.entry.js} +2 -2
- package/www/build/p-2b1fd95a.entry.js +2 -0
- package/www/build/{p-99b791d1.entry.js → p-2e432a39.entry.js} +2 -2
- package/www/build/{p-af856537.entry.js → p-2f662fea.entry.js} +2 -2
- package/www/build/{p-8a10fec5.entry.js → p-38d5e74f.entry.js} +2 -2
- package/www/build/p-3ae8fb1a.entry.js +2 -0
- package/www/build/{p-304eeab0.js → p-3dbad75e.js} +2 -2
- package/{dist/web-components-library/p-be4878f2.entry.js → www/build/p-4537f922.entry.js} +2 -2
- package/www/build/{p-91c04edc.entry.js → p-45dc157c.entry.js} +2 -2
- package/www/build/{p-e366782c.entry.js → p-46d98609.entry.js} +2 -2
- package/{dist/web-components-library/p-7d7c5344.js → www/build/p-4a2e0034.js} +2 -2
- package/www/build/p-4f3f8578.entry.js +2 -0
- package/www/build/p-5145a606.js +2 -0
- package/www/build/p-5145a606.js.map +1 -0
- package/{dist/web-components-library/p-e5dc0719.entry.js → www/build/p-51f1c9c0.entry.js} +2 -2
- package/{dist/web-components-library/p-e1852de3.entry.js → www/build/p-5a0f0978.entry.js} +2 -2
- package/www/build/{p-6586441a.entry.js → p-5a178c69.entry.js} +3 -3
- package/www/build/p-5a178c69.entry.js.map +1 -0
- package/www/build/{p-cf2640b0.entry.js → p-608c35ba.entry.js} +2 -2
- package/{dist/web-components-library/p-cf2640b0.entry.js.map → www/build/p-608c35ba.entry.js.map} +1 -1
- package/www/build/{p-26b5c84d.js → p-60f410df.js} +2 -2
- package/www/build/p-63ec7bad.entry.js +2 -0
- package/www/build/p-64364cbf.entry.js +2 -0
- package/www/build/p-64364cbf.entry.js.map +1 -0
- package/www/build/p-64aab82f.js +2 -0
- package/www/build/p-67e5e8ed.js +2 -0
- package/www/build/p-67e5e8ed.js.map +1 -0
- package/www/build/{p-57eee056.entry.js → p-68f4fbc8.entry.js} +2 -2
- package/www/build/{p-f21bc3a9.entry.js → p-6a1b3e86.entry.js} +2 -2
- package/www/build/{p-05e9ae1e.entry.js → p-6db2fd46.entry.js} +2 -2
- package/{dist/web-components-library/p-83350b5f.entry.js → www/build/p-707e5f91.entry.js} +2 -2
- package/www/build/p-75c4a726.js +3 -0
- package/www/build/p-75c4a726.js.map +1 -0
- package/{dist/web-components-library/p-85f84e55.entry.js → www/build/p-777ad335.entry.js} +2 -2
- package/www/build/p-777ad335.entry.js.map +1 -0
- package/{dist/web-components-library/p-b84fa3b6.entry.js → www/build/p-7aba5af3.entry.js} +2 -2
- package/www/build/p-7d5bf905.entry.js +2 -0
- package/www/build/{p-324ef970.entry.js → p-820b48f6.entry.js} +2 -2
- package/www/build/p-823c45d4.entry.js +2 -0
- package/{dist/web-components-library/p-8c9f7cef.entry.js → www/build/p-855334f4.entry.js} +2 -2
- package/www/build/{p-aa0f083b.js → p-8a6a4d22.js} +2 -2
- package/{dist/web-components-library/p-8b309268.entry.js → www/build/p-8d56e74b.entry.js} +2 -2
- package/www/build/p-8d56e74b.entry.js.map +1 -0
- package/www/build/{p-d9e1d8c7.js → p-95cb8701.js} +2 -2
- package/www/build/p-9a1b51ed.entry.js +2 -0
- package/{dist/web-components-library/p-ad76b8ff.entry.js.map → www/build/p-9a1b51ed.entry.js.map} +1 -1
- package/www/build/{p-4552744b.entry.js → p-9b9a04ad.entry.js} +2 -2
- package/www/build/{p-77d8ad7e.entry.js → p-a0fd1323.entry.js} +2 -2
- package/www/build/p-a64a1bf0.entry.js +2 -0
- package/www/build/p-a64a1bf0.entry.js.map +1 -0
- package/www/build/p-aaae6b16.entry.js +2 -0
- package/www/build/{p-97b0c3b3.entry.js.map → p-aaae6b16.entry.js.map} +1 -1
- package/www/build/p-ab7f129e.entry.js +2 -0
- package/www/build/{p-6f4dd02b.entry.js.map → p-ab7f129e.entry.js.map} +1 -1
- package/{dist/web-components-library/p-088a31dc.entry.js → www/build/p-acd911aa.entry.js} +2 -2
- package/{dist/web-components-library/p-a4ada10b.entry.js → www/build/p-ad97fdc4.entry.js} +2 -2
- package/www/build/p-ae5cec65.js +2 -0
- package/www/build/{p-57ecb5a7.entry.js → p-b2356bc7.entry.js} +2 -2
- package/www/build/p-c1e498ac.entry.js +2 -0
- package/www/build/{p-a5781264.entry.js → p-c54d0925.entry.js} +2 -2
- package/www/build/p-c679277c.entry.js +2 -0
- package/{dist/web-components-library/p-df05727f.entry.js.map → www/build/p-c679277c.entry.js.map} +1 -1
- package/www/build/p-cc71a90c.entry.js +2 -0
- package/{dist/web-components-library/p-c90249e5.entry.js → www/build/p-cd0219b4.entry.js} +2 -2
- package/{dist/web-components-library/p-6a664748.entry.js → www/build/p-d5f5e107.entry.js} +2 -2
- package/www/build/p-d5f5e107.entry.js.map +1 -0
- package/www/build/{p-88e756cd.entry.js → p-da7200c2.entry.js} +2 -2
- package/{dist/web-components-library/p-ae96bc09.entry.js → www/build/p-df8c381a.entry.js} +2 -2
- package/www/build/{p-3b266de4.entry.js → p-df9c3674.entry.js} +2 -2
- package/www/build/{p-609c11d6.entry.js → p-e25d7f0a.entry.js} +2 -2
- package/www/build/{p-33eea921.entry.js → p-e4d97fbf.entry.js} +2 -2
- package/www/build/{p-f74f9f3c.entry.js → p-e529a714.entry.js} +2 -2
- package/www/build/{p-21b85c7f.entry.js → p-ea9c0ff3.entry.js} +2 -2
- package/www/build/{p-2a7e4988.entry.js → p-f06ad42c.entry.js} +2 -2
- package/www/build/{p-8499a29d.entry.js → p-f15d0a00.entry.js} +2 -2
- package/{dist/web-components-library/p-63e970ee.entry.js → www/build/p-f425c6f2.entry.js} +2 -2
- package/www/build/p-f703660d.entry.js +2 -0
- package/{dist/web-components-library/p-49e4ce84.entry.js → www/build/p-f8bbca6e.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 +3 -1
- package/dist/.storybook/elements/args-controls.js +0 -78
- package/dist/.storybook/elements/args-controls.js.map +0 -1
- package/dist/.storybook/elements/docs-template.js +0 -11
- package/dist/.storybook/elements/docs-template.js.map +0 -1
- package/dist/cjs/breakpoints-5c22092a.js +0 -11
- package/dist/cjs/breakpoints-5c22092a.js.map +0 -1
- package/dist/cjs/index-e801ae96.js.map +0 -1
- package/dist/cjs/utils-6bd8c55e.js.map +0 -1
- package/dist/collection/assets/orientamento.svg +0 -14
- package/dist/collection/components/date-picker/z-date-picker/index.spec.js +0 -38
- package/dist/collection/components/date-picker/z-date-picker/index.spec.js.map +0 -1
- package/dist/collection/components/date-picker/z-range-picker/index.spec.js +0 -25
- package/dist/collection/components/date-picker/z-range-picker/index.spec.js.map +0 -1
- package/dist/collection/components/deprecated/z-app-header-deprecated/index.spec.js +0 -203
- package/dist/collection/components/deprecated/z-app-header-deprecated/index.spec.js.map +0 -1
- package/dist/collection/components/deprecated/z-menu-deprecated/index.spec.js +0 -120
- package/dist/collection/components/deprecated/z-menu-deprecated/index.spec.js.map +0 -1
- package/dist/collection/components/deprecated/z-menu-section-deprecated/index.spec.js +0 -50
- package/dist/collection/components/deprecated/z-menu-section-deprecated/index.spec.js.map +0 -1
- package/dist/collection/components/file-upload/z-dragdrop-area/index.spec.js +0 -55
- package/dist/collection/components/file-upload/z-dragdrop-area/index.spec.js.map +0 -1
- package/dist/collection/components/file-upload/z-file/index.spec.js +0 -20
- package/dist/collection/components/file-upload/z-file/index.spec.js.map +0 -1
- package/dist/collection/components/file-upload/z-file-upload/index.spec.js +0 -135
- package/dist/collection/components/file-upload/z-file-upload/index.spec.js.map +0 -1
- package/dist/collection/components/file-upload/z-file-upload/test.e2e.js +0 -69
- package/dist/collection/components/file-upload/z-file-upload/test.e2e.js.map +0 -1
- package/dist/collection/components/list/z-list/index.spec.js +0 -33
- package/dist/collection/components/list/z-list/index.spec.js.map +0 -1
- package/dist/collection/components/list/z-list-element/index.spec.js +0 -135
- package/dist/collection/components/list/z-list-element/index.spec.js.map +0 -1
- package/dist/collection/components/list/z-list-group/index.spec.js +0 -39
- package/dist/collection/components/list/z-list-group/index.spec.js.map +0 -1
- package/dist/collection/components/z-app-header/index.spec.js +0 -617
- package/dist/collection/components/z-app-header/index.spec.js.map +0 -1
- package/dist/collection/components/z-aria-alert/index.spec.js +0 -14
- package/dist/collection/components/z-aria-alert/index.spec.js.map +0 -1
- package/dist/collection/components/z-avatar/index.spec.js +0 -98
- package/dist/collection/components/z-avatar/index.spec.js.map +0 -1
- package/dist/collection/components/z-book-card/index.spec.js +0 -679
- package/dist/collection/components/z-book-card/index.spec.js.map +0 -1
- package/dist/collection/components/z-breadcrumb/index.spec.js +0 -39
- package/dist/collection/components/z-breadcrumb/index.spec.js.map +0 -1
- package/dist/collection/components/z-button/index.spec.js +0 -101
- package/dist/collection/components/z-button/index.spec.js.map +0 -1
- package/dist/collection/components/z-button-sort/index.spec.js +0 -139
- package/dist/collection/components/z-button-sort/index.spec.js.map +0 -1
- package/dist/collection/components/z-button-sort/test.e2e.js +0 -29
- package/dist/collection/components/z-button-sort/test.e2e.js.map +0 -1
- package/dist/collection/components/z-card/index.spec.js +0 -179
- package/dist/collection/components/z-card/index.spec.js.map +0 -1
- package/dist/collection/components/z-chip/index.spec.js +0 -108
- package/dist/collection/components/z-chip/index.spec.js.map +0 -1
- package/dist/collection/components/z-chip/test.e2e.js +0 -32
- package/dist/collection/components/z-chip/test.e2e.js.map +0 -1
- package/dist/collection/components/z-combobox/index.spec.js +0 -475
- package/dist/collection/components/z-combobox/index.spec.js.map +0 -1
- package/dist/collection/components/z-combobox/test.e2e.js +0 -45
- package/dist/collection/components/z-combobox/test.e2e.js.map +0 -1
- package/dist/collection/components/z-divider/index.spec.js +0 -82
- package/dist/collection/components/z-divider/index.spec.js.map +0 -1
- package/dist/collection/components/z-ghost-loading/index.spec.js +0 -16
- package/dist/collection/components/z-ghost-loading/index.spec.js.map +0 -1
- package/dist/collection/components/z-icon/index.spec.js +0 -96
- package/dist/collection/components/z-icon/index.spec.js.map +0 -1
- package/dist/collection/components/z-info-box/index.spec.js +0 -71
- package/dist/collection/components/z-info-box/index.spec.js.map +0 -1
- package/dist/collection/components/z-input/test-checkbox.spec.js +0 -114
- package/dist/collection/components/z-input/test-checkbox.spec.js.map +0 -1
- package/dist/collection/components/z-input/test-methods.spec.js +0 -13
- package/dist/collection/components/z-input/test-methods.spec.js.map +0 -1
- package/dist/collection/components/z-input/test-radio.spec.js +0 -114
- package/dist/collection/components/z-input/test-radio.spec.js.map +0 -1
- package/dist/collection/components/z-input/test-text.spec.js +0 -347
- package/dist/collection/components/z-input/test-text.spec.js.map +0 -1
- package/dist/collection/components/z-input/test-textarea.spec.js +0 -54
- package/dist/collection/components/z-input/test-textarea.spec.js.map +0 -1
- package/dist/collection/components/z-input/test.e2e.js +0 -180
- package/dist/collection/components/z-input/test.e2e.js.map +0 -1
- package/dist/collection/components/z-input-message/index.spec.js +0 -45
- package/dist/collection/components/z-input-message/index.spec.js.map +0 -1
- package/dist/collection/components/z-logo/index.spec.js +0 -74
- package/dist/collection/components/z-logo/index.spec.js.map +0 -1
- package/dist/collection/components/z-menu/index.spec.js +0 -136
- package/dist/collection/components/z-menu/index.spec.js.map +0 -1
- package/dist/collection/components/z-menu-section/index.spec.js +0 -50
- package/dist/collection/components/z-menu-section/index.spec.js.map +0 -1
- package/dist/collection/components/z-modal/index.spec.js +0 -192
- package/dist/collection/components/z-modal/index.spec.js.map +0 -1
- package/dist/collection/components/z-modal/test.e2e.js +0 -81
- package/dist/collection/components/z-modal/test.e2e.js.map +0 -1
- package/dist/collection/components/z-notification/index.spec.js +0 -84
- package/dist/collection/components/z-notification/index.spec.js.map +0 -1
- package/dist/collection/components/z-notification/test.e2e.js +0 -25
- package/dist/collection/components/z-notification/test.e2e.js.map +0 -1
- package/dist/collection/components/z-offcanvas/index.spec.js +0 -42
- package/dist/collection/components/z-offcanvas/index.spec.js.map +0 -1
- package/dist/collection/components/z-pagination/index.spec.js +0 -36
- package/dist/collection/components/z-pagination/index.spec.js.map +0 -1
- package/dist/collection/components/z-panel-elem/index.spec.js +0 -284
- package/dist/collection/components/z-panel-elem/index.spec.js.map +0 -1
- package/dist/collection/components/z-searchbar/index.spec.js +0 -395
- package/dist/collection/components/z-searchbar/index.spec.js.map +0 -1
- package/dist/collection/components/z-searchbar/test.e2e.js +0 -90
- package/dist/collection/components/z-searchbar/test.e2e.js.map +0 -1
- package/dist/collection/components/z-section-title/index.spec.js +0 -27
- package/dist/collection/components/z-section-title/index.spec.js.map +0 -1
- package/dist/collection/components/z-select/index.spec.js +0 -698
- package/dist/collection/components/z-select/index.spec.js.map +0 -1
- package/dist/collection/components/z-select/test.e2e.js +0 -121
- package/dist/collection/components/z-select/test.e2e.js.map +0 -1
- package/dist/collection/components/z-skip-to-content/index.spec.js +0 -28
- package/dist/collection/components/z-skip-to-content/index.spec.js.map +0 -1
- package/dist/collection/components/z-stepper/index.spec.js +0 -38
- package/dist/collection/components/z-stepper/index.spec.js.map +0 -1
- package/dist/collection/components/z-stepper-item/index.spec.js +0 -105
- package/dist/collection/components/z-stepper-item/index.spec.js.map +0 -1
- package/dist/collection/components/z-tag/index.spec.js +0 -58
- package/dist/collection/components/z-tag/index.spec.js.map +0 -1
- package/dist/collection/components/z-toast-notification/index.spec.js +0 -104
- package/dist/collection/components/z-toast-notification/index.spec.js.map +0 -1
- package/dist/collection/components/z-toast-notification-list/index.spec.js +0 -57
- package/dist/collection/components/z-toast-notification-list/index.spec.js.map +0 -1
- package/dist/collection/components/z-toast-notification-list/test.e2e.js +0 -69
- package/dist/collection/components/z-toast-notification-list/test.e2e.js.map +0 -1
- package/dist/collection/components/z-toggle-button/index.spec.js +0 -124
- package/dist/collection/components/z-toggle-button/index.spec.js.map +0 -1
- package/dist/collection/components/z-toggle-button/test.e2e.js +0 -12
- package/dist/collection/components/z-toggle-button/test.e2e.js.map +0 -1
- package/dist/collection/components/z-toggle-switch/index.spec.js +0 -149
- package/dist/collection/components/z-toggle-switch/index.spec.js.map +0 -1
- package/dist/collection/components/z-toggle-switch/test.e2e.js +0 -22
- package/dist/collection/components/z-toggle-switch/test.e2e.js.map +0 -1
- package/dist/collection/components/z-visually-hidden/index.spec.js +0 -18
- package/dist/collection/components/z-visually-hidden/index.spec.js.map +0 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card/index.spec.js +0 -20
- package/dist/collection/snowflakes/myz/card/z-myz-card/index.spec.js.map +0 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.spec.js +0 -128
- package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.spec.js.map +0 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.spec.js +0 -21
- package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.spec.js.map +0 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.spec.js +0 -33
- package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.spec.js.map +0 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.spec.js +0 -121
- package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.spec.js.map +0 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.spec.js +0 -199
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.spec.js.map +0 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.spec.js +0 -54
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.spec.js.map +0 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.spec.js +0 -22
- package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.spec.js.map +0 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.spec.js +0 -56
- package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.spec.js.map +0 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.spec.js +0 -136
- package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.spec.js.map +0 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.spec.js +0 -39
- package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.spec.js.map +0 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list/index.spec.js +0 -140
- package/dist/collection/snowflakes/myz/list/z-myz-list/index.spec.js.map +0 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.spec.js +0 -80
- package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.spec.js.map +0 -1
- package/dist/collection/snowflakes/myz/z-alert/index.spec.js +0 -20
- package/dist/collection/snowflakes/myz/z-alert/index.spec.js.map +0 -1
- package/dist/collection/snowflakes/myz/z-otp/index.spec.js +0 -74
- package/dist/collection/snowflakes/myz/z-otp/index.spec.js.map +0 -1
- package/dist/collection/snowflakes/myz/z-otp/test.e2e.js +0 -23
- package/dist/collection/snowflakes/myz/z-otp/test.e2e.js.map +0 -1
- package/dist/collection/snowflakes/myz/z-slideshow/index.spec.js +0 -193
- package/dist/collection/snowflakes/myz/z-slideshow/index.spec.js.map +0 -1
- package/dist/collection/utils/utils.spec.js +0 -16
- package/dist/collection/utils/utils.spec.js.map +0 -1
- package/dist/docs/grid/index.stories.js +0 -47
- package/dist/docs/grid/index.stories.js.map +0 -1
- package/dist/docs/iconset/index.stories.js +0 -32
- package/dist/docs/iconset/index.stories.js.map +0 -1
- package/dist/docs/themes/index.stories.js +0 -90
- package/dist/docs/themes/index.stories.js.map +0 -1
- package/dist/esm/breakpoints-680e0e56.js +0 -7
- package/dist/esm/breakpoints-680e0e56.js.map +0 -1
- package/dist/esm/index-a2130b6a.js.map +0 -1
- package/dist/esm/utils-8ade9e2d.js.map +0 -1
- package/dist/types/home/runner/work/design-system/design-system/.stencil/.storybook/elements/args-controls.d.ts +0 -13
- package/dist/types/home/runner/work/design-system/design-system/.stencil/.storybook/elements/docs-template.d.ts +0 -5
- package/dist/types/home/runner/work/design-system/design-system/.stencil/docs/grid/index.stories.d.ts +0 -9
- package/dist/types/home/runner/work/design-system/design-system/.stencil/docs/iconset/index.stories.d.ts +0 -11
- package/dist/types/home/runner/work/design-system/design-system/.stencil/docs/themes/index.stories.d.ts +0 -27
- package/dist/web-components-library/p-054484d4.entry.js +0 -2
- package/dist/web-components-library/p-054484d4.entry.js.map +0 -1
- package/dist/web-components-library/p-0794ae16.entry.js +0 -2
- package/dist/web-components-library/p-2c184714.js +0 -2
- package/dist/web-components-library/p-2c184714.js.map +0 -1
- package/dist/web-components-library/p-2c886e8b.js +0 -2
- package/dist/web-components-library/p-2c886e8b.js.map +0 -1
- package/dist/web-components-library/p-385bf4ca.entry.js +0 -2
- package/dist/web-components-library/p-6586441a.entry.js.map +0 -1
- package/dist/web-components-library/p-68822fbc.entry.js +0 -2
- package/dist/web-components-library/p-6a664748.entry.js.map +0 -1
- package/dist/web-components-library/p-6b2cd695.entry.js +0 -2
- package/dist/web-components-library/p-6f4dd02b.entry.js +0 -2
- package/dist/web-components-library/p-74a65c6f.entry.js +0 -2
- package/dist/web-components-library/p-7d827c11.js +0 -2
- package/dist/web-components-library/p-85f84e55.entry.js.map +0 -1
- package/dist/web-components-library/p-89584f19.entry.js +0 -2
- package/dist/web-components-library/p-8a728e82.entry.js +0 -2
- package/dist/web-components-library/p-8a728e82.entry.js.map +0 -1
- package/dist/web-components-library/p-8b309268.entry.js.map +0 -1
- package/dist/web-components-library/p-8c517cd7.entry.js +0 -2
- package/dist/web-components-library/p-8c517cd7.entry.js.map +0 -1
- package/dist/web-components-library/p-8d7323f7.entry.js +0 -2
- package/dist/web-components-library/p-8d7323f7.entry.js.map +0 -1
- package/dist/web-components-library/p-97b0c3b3.entry.js +0 -2
- package/dist/web-components-library/p-a7292e1c.entry.js +0 -2
- package/dist/web-components-library/p-ad76b8ff.entry.js +0 -2
- package/dist/web-components-library/p-cfa39bd3.js +0 -3
- package/dist/web-components-library/p-cfa39bd3.js.map +0 -1
- package/dist/web-components-library/p-df05727f.entry.js +0 -2
- package/dist/web-components-library/p-ed2c8484.entry.js +0 -2
- package/dist/web-components-library/p-f8d45aa4.entry.js +0 -2
- package/dist/web-components-library/p-fe87b081.entry.js +0 -2
- package/dist/web-components-library/p-fe87b081.entry.js.map +0 -1
- package/www/assets/orientamento.svg +0 -14
- package/www/build/p-054484d4.entry.js +0 -2
- package/www/build/p-054484d4.entry.js.map +0 -1
- package/www/build/p-0794ae16.entry.js +0 -2
- package/www/build/p-2c184714.js +0 -2
- package/www/build/p-2c184714.js.map +0 -1
- package/www/build/p-2c886e8b.js +0 -2
- package/www/build/p-2c886e8b.js.map +0 -1
- package/www/build/p-385bf4ca.entry.js +0 -2
- package/www/build/p-6586441a.entry.js.map +0 -1
- package/www/build/p-68822fbc.entry.js +0 -2
- package/www/build/p-6a664748.entry.js.map +0 -1
- package/www/build/p-6b2cd695.entry.js +0 -2
- package/www/build/p-6f4dd02b.entry.js +0 -2
- package/www/build/p-74a65c6f.entry.js +0 -2
- package/www/build/p-7d827c11.js +0 -2
- package/www/build/p-85f84e55.entry.js.map +0 -1
- package/www/build/p-89584f19.entry.js +0 -2
- package/www/build/p-8a728e82.entry.js +0 -2
- package/www/build/p-8a728e82.entry.js.map +0 -1
- package/www/build/p-8b309268.entry.js.map +0 -1
- package/www/build/p-8c517cd7.entry.js +0 -2
- package/www/build/p-8c517cd7.entry.js.map +0 -1
- package/www/build/p-8d7323f7.entry.js +0 -2
- package/www/build/p-8d7323f7.entry.js.map +0 -1
- package/www/build/p-97b0c3b3.entry.js +0 -2
- package/www/build/p-a7292e1c.entry.js +0 -2
- package/www/build/p-ad76b8ff.entry.js +0 -2
- package/www/build/p-cfa39bd3.js +0 -3
- package/www/build/p-cfa39bd3.js.map +0 -1
- package/www/build/p-dc60b359.js +0 -2
- package/www/build/p-df05727f.entry.js +0 -2
- package/www/build/p-ed2c8484.entry.js +0 -2
- package/www/build/p-f8d45aa4.entry.js +0 -2
- package/www/build/p-fe87b081.entry.js +0 -2
- package/www/build/p-fe87b081.entry.js.map +0 -1
- /package/dist/web-components-library/{p-6319b5e2.entry.js.map → p-06d98334.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-2672e36f.entry.js.map → p-100c6243.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-28928bb6.entry.js.map → p-1896cc54.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-19f8c3d2.entry.js.map → p-1cc37aa7.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-c0bdbfb5.entry.js.map → p-273f3c53.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-4f7dd068.entry.js.map → p-28018cd3.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-12d62027.entry.js.map → p-296924ea.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-0794ae16.entry.js.map → p-2b1fd95a.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-99b791d1.entry.js.map → p-2e432a39.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-af856537.entry.js.map → p-2f662fea.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-8a10fec5.entry.js.map → p-38d5e74f.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-6b2cd695.entry.js.map → p-3ae8fb1a.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-304eeab0.js.map → p-3dbad75e.js.map} +0 -0
- /package/dist/web-components-library/{p-be4878f2.entry.js.map → p-4537f922.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-91c04edc.entry.js.map → p-45dc157c.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-e366782c.entry.js.map → p-46d98609.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-7d7c5344.js.map → p-4a2e0034.js.map} +0 -0
- /package/dist/web-components-library/{p-68822fbc.entry.js.map → p-4f3f8578.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-e5dc0719.entry.js.map → p-51f1c9c0.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-e1852de3.entry.js.map → p-5a0f0978.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-26b5c84d.js.map → p-60f410df.js.map} +0 -0
- /package/dist/web-components-library/{p-74a65c6f.entry.js.map → p-63ec7bad.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-7d827c11.js.map → p-64aab82f.js.map} +0 -0
- /package/dist/web-components-library/{p-57eee056.entry.js.map → p-68f4fbc8.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-f21bc3a9.entry.js.map → p-6a1b3e86.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-05e9ae1e.entry.js.map → p-6db2fd46.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-83350b5f.entry.js.map → p-707e5f91.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-b84fa3b6.entry.js.map → p-7aba5af3.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-a7292e1c.entry.js.map → p-7d5bf905.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-324ef970.entry.js.map → p-820b48f6.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-ed2c8484.entry.js.map → p-823c45d4.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-8c9f7cef.entry.js.map → p-855334f4.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-aa0f083b.js.map → p-8a6a4d22.js.map} +0 -0
- /package/dist/web-components-library/{p-d9e1d8c7.js.map → p-95cb8701.js.map} +0 -0
- /package/dist/web-components-library/{p-4552744b.entry.js.map → p-9b9a04ad.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-77d8ad7e.entry.js.map → p-a0fd1323.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-088a31dc.entry.js.map → p-acd911aa.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-a4ada10b.entry.js.map → p-ad97fdc4.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-57ecb5a7.entry.js.map → p-b2356bc7.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-385bf4ca.entry.js.map → p-c1e498ac.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-a5781264.entry.js.map → p-c54d0925.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-89584f19.entry.js.map → p-cc71a90c.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-c90249e5.entry.js.map → p-cd0219b4.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-88e756cd.entry.js.map → p-da7200c2.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-ae96bc09.entry.js.map → p-df8c381a.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-3b266de4.entry.js.map → p-df9c3674.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-609c11d6.entry.js.map → p-e25d7f0a.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-33eea921.entry.js.map → p-e4d97fbf.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-f74f9f3c.entry.js.map → p-e529a714.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-21b85c7f.entry.js.map → p-ea9c0ff3.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-2a7e4988.entry.js.map → p-f06ad42c.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-8499a29d.entry.js.map → p-f15d0a00.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-63e970ee.entry.js.map → p-f425c6f2.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-f8d45aa4.entry.js.map → p-f703660d.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-49e4ce84.entry.js.map → p-f8bbca6e.entry.js.map} +0 -0
- /package/www/build/{p-6319b5e2.entry.js.map → p-06d98334.entry.js.map} +0 -0
- /package/www/build/{p-2672e36f.entry.js.map → p-100c6243.entry.js.map} +0 -0
- /package/www/build/{p-28928bb6.entry.js.map → p-1896cc54.entry.js.map} +0 -0
- /package/www/build/{p-19f8c3d2.entry.js.map → p-1cc37aa7.entry.js.map} +0 -0
- /package/www/build/{p-c0bdbfb5.entry.js.map → p-273f3c53.entry.js.map} +0 -0
- /package/www/build/{p-4f7dd068.entry.js.map → p-28018cd3.entry.js.map} +0 -0
- /package/www/build/{p-12d62027.entry.js.map → p-296924ea.entry.js.map} +0 -0
- /package/www/build/{p-0794ae16.entry.js.map → p-2b1fd95a.entry.js.map} +0 -0
- /package/www/build/{p-99b791d1.entry.js.map → p-2e432a39.entry.js.map} +0 -0
- /package/www/build/{p-af856537.entry.js.map → p-2f662fea.entry.js.map} +0 -0
- /package/www/build/{p-8a10fec5.entry.js.map → p-38d5e74f.entry.js.map} +0 -0
- /package/www/build/{p-6b2cd695.entry.js.map → p-3ae8fb1a.entry.js.map} +0 -0
- /package/www/build/{p-304eeab0.js.map → p-3dbad75e.js.map} +0 -0
- /package/www/build/{p-be4878f2.entry.js.map → p-4537f922.entry.js.map} +0 -0
- /package/www/build/{p-91c04edc.entry.js.map → p-45dc157c.entry.js.map} +0 -0
- /package/www/build/{p-e366782c.entry.js.map → p-46d98609.entry.js.map} +0 -0
- /package/www/build/{p-7d7c5344.js.map → p-4a2e0034.js.map} +0 -0
- /package/www/build/{p-68822fbc.entry.js.map → p-4f3f8578.entry.js.map} +0 -0
- /package/www/build/{p-e5dc0719.entry.js.map → p-51f1c9c0.entry.js.map} +0 -0
- /package/www/build/{p-e1852de3.entry.js.map → p-5a0f0978.entry.js.map} +0 -0
- /package/www/build/{p-26b5c84d.js.map → p-60f410df.js.map} +0 -0
- /package/www/build/{p-74a65c6f.entry.js.map → p-63ec7bad.entry.js.map} +0 -0
- /package/www/build/{p-7d827c11.js.map → p-64aab82f.js.map} +0 -0
- /package/www/build/{p-57eee056.entry.js.map → p-68f4fbc8.entry.js.map} +0 -0
- /package/www/build/{p-f21bc3a9.entry.js.map → p-6a1b3e86.entry.js.map} +0 -0
- /package/www/build/{p-05e9ae1e.entry.js.map → p-6db2fd46.entry.js.map} +0 -0
- /package/www/build/{p-83350b5f.entry.js.map → p-707e5f91.entry.js.map} +0 -0
- /package/www/build/{p-b84fa3b6.entry.js.map → p-7aba5af3.entry.js.map} +0 -0
- /package/www/build/{p-a7292e1c.entry.js.map → p-7d5bf905.entry.js.map} +0 -0
- /package/www/build/{p-324ef970.entry.js.map → p-820b48f6.entry.js.map} +0 -0
- /package/www/build/{p-ed2c8484.entry.js.map → p-823c45d4.entry.js.map} +0 -0
- /package/www/build/{p-8c9f7cef.entry.js.map → p-855334f4.entry.js.map} +0 -0
- /package/www/build/{p-aa0f083b.js.map → p-8a6a4d22.js.map} +0 -0
- /package/www/build/{p-d9e1d8c7.js.map → p-95cb8701.js.map} +0 -0
- /package/www/build/{p-4552744b.entry.js.map → p-9b9a04ad.entry.js.map} +0 -0
- /package/www/build/{p-77d8ad7e.entry.js.map → p-a0fd1323.entry.js.map} +0 -0
- /package/www/build/{p-088a31dc.entry.js.map → p-acd911aa.entry.js.map} +0 -0
- /package/www/build/{p-a4ada10b.entry.js.map → p-ad97fdc4.entry.js.map} +0 -0
- /package/www/build/{p-57ecb5a7.entry.js.map → p-b2356bc7.entry.js.map} +0 -0
- /package/www/build/{p-385bf4ca.entry.js.map → p-c1e498ac.entry.js.map} +0 -0
- /package/www/build/{p-a5781264.entry.js.map → p-c54d0925.entry.js.map} +0 -0
- /package/www/build/{p-89584f19.entry.js.map → p-cc71a90c.entry.js.map} +0 -0
- /package/www/build/{p-c90249e5.entry.js.map → p-cd0219b4.entry.js.map} +0 -0
- /package/www/build/{p-88e756cd.entry.js.map → p-da7200c2.entry.js.map} +0 -0
- /package/www/build/{p-ae96bc09.entry.js.map → p-df8c381a.entry.js.map} +0 -0
- /package/www/build/{p-3b266de4.entry.js.map → p-df9c3674.entry.js.map} +0 -0
- /package/www/build/{p-609c11d6.entry.js.map → p-e25d7f0a.entry.js.map} +0 -0
- /package/www/build/{p-33eea921.entry.js.map → p-e4d97fbf.entry.js.map} +0 -0
- /package/www/build/{p-f74f9f3c.entry.js.map → p-e529a714.entry.js.map} +0 -0
- /package/www/build/{p-21b85c7f.entry.js.map → p-ea9c0ff3.entry.js.map} +0 -0
- /package/www/build/{p-2a7e4988.entry.js.map → p-f06ad42c.entry.js.map} +0 -0
- /package/www/build/{p-8499a29d.entry.js.map → p-f15d0a00.entry.js.map} +0 -0
- /package/www/build/{p-63e970ee.entry.js.map → p-f425c6f2.entry.js.map} +0 -0
- /package/www/build/{p-f8d45aa4.entry.js.map → p-f703660d.entry.js.map} +0 -0
- /package/www/build/{p-49e4ce84.entry.js.map → p-f8bbca6e.entry.js.map} +0 -0
|
@@ -1,152 +1,21 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
import { KeyboardCode } from "../../beans";
|
|
3
|
+
const isZMenuSection = (el) => (el === null || el === void 0 ? void 0 : el.tagName) === "Z-MENU-SECTION";
|
|
3
4
|
/**
|
|
4
5
|
* @slot - Menu label
|
|
5
6
|
* @slot header - Header to display as the first entry of the open menu.
|
|
6
|
-
* @slot item - Single entry of the section. Can be slotted multiple times to insert items onto the menu. Use `z-menu-section` for submenus.
|
|
7
|
+
* @slot item - Single entry of the section. Can be slotted multiple times to insert items onto the menu. Set the `active` HTML attribute on the element to highlight it. Use `z-menu-section` for submenus.
|
|
7
8
|
* @cssprop --z-menu-label-color - Color of the label's text.
|
|
8
9
|
*/
|
|
9
10
|
export class ZMenu {
|
|
11
|
+
get focusableItem() {
|
|
12
|
+
return this.items.find((item) => (isZMenuSection(item) ? item.htmlTabindex === 0 : item.tabIndex === 0));
|
|
13
|
+
}
|
|
10
14
|
toggle() {
|
|
11
15
|
if (!this.hasContent) {
|
|
12
16
|
return;
|
|
13
17
|
}
|
|
14
18
|
this.open = !this.open;
|
|
15
|
-
this.open ? this.opened.emit() : this.closed.emit();
|
|
16
|
-
}
|
|
17
|
-
/** Close the floating list when a click is performed outside of this Element. */
|
|
18
|
-
handleClick(ev) {
|
|
19
|
-
if (!this.floating || !this.open || this.hostElement.contains(ev.target)) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
this.reflow();
|
|
23
|
-
this.open = false;
|
|
24
|
-
this.closed.emit();
|
|
25
|
-
}
|
|
26
|
-
canvasOpenStatusChanged(e) {
|
|
27
|
-
this.currentCanvasOpenStatus = e.detail;
|
|
28
|
-
}
|
|
29
|
-
handleKeyDown(e) {
|
|
30
|
-
if (e.code === KeyboardCode.ENTER) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (this.open && !this.currentCanvasOpenStatus) {
|
|
34
|
-
this.handleNavigationSideArrow(e);
|
|
35
|
-
}
|
|
36
|
-
this.handleArrowsNav(e);
|
|
37
|
-
}
|
|
38
|
-
handleNavigationSideArrow(e) {
|
|
39
|
-
if (e.code !== KeyboardCode.ARROW_RIGHT && e.code !== KeyboardCode.ARROW_LEFT) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
if (e.code === KeyboardCode.ARROW_RIGHT) {
|
|
43
|
-
const nextElement = this.hostElement.nextElementSibling;
|
|
44
|
-
if (!nextElement) {
|
|
45
|
-
const firstMenuItem = this.firstElMenu.shadowRoot.querySelector(".menu-label");
|
|
46
|
-
firstMenuItem.focus();
|
|
47
|
-
this.open = false;
|
|
48
|
-
}
|
|
49
|
-
if (nextElement && nextElement.tagName === "Z-MENU") {
|
|
50
|
-
const menuButton = nextElement.shadowRoot.querySelector(".menu-label");
|
|
51
|
-
menuButton.focus();
|
|
52
|
-
if (nextElement.children.length > 1) {
|
|
53
|
-
nextElement.setAttribute("open", "true");
|
|
54
|
-
}
|
|
55
|
-
this.open = false;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
else if (e.code === KeyboardCode.ARROW_LEFT) {
|
|
59
|
-
const prevElement = this.hostElement.previousElementSibling;
|
|
60
|
-
if (prevElement.tagName !== "Z-MENU") {
|
|
61
|
-
const lastElMenuItem = this.lastElMenu.shadowRoot.querySelector(".menu-label");
|
|
62
|
-
lastElMenuItem.focus();
|
|
63
|
-
this.open = false;
|
|
64
|
-
}
|
|
65
|
-
if (prevElement && prevElement.tagName === "Z-MENU") {
|
|
66
|
-
const menuButton = prevElement.shadowRoot.querySelector(".menu-label");
|
|
67
|
-
menuButton.focus();
|
|
68
|
-
if (prevElement.children.length > 1) {
|
|
69
|
-
prevElement.setAttribute("open", "true");
|
|
70
|
-
}
|
|
71
|
-
this.open = false;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
handleArrowsNav(e) {
|
|
76
|
-
const menuItems = Array.from(this.hostElement.querySelectorAll("[slot='item']"));
|
|
77
|
-
const newMenuItems = menuItems.map((el) => {
|
|
78
|
-
if (el.tagName === "Z-MENU-SECTION") {
|
|
79
|
-
return el.shadowRoot.querySelector("button");
|
|
80
|
-
}
|
|
81
|
-
return el;
|
|
82
|
-
});
|
|
83
|
-
if (this.open) {
|
|
84
|
-
e.preventDefault();
|
|
85
|
-
e.stopPropagation();
|
|
86
|
-
if (e.code === KeyboardCode.ARROW_DOWN || e.code === KeyboardCode.ARROW_UP) {
|
|
87
|
-
let nextFocusableItem;
|
|
88
|
-
// INFO: reset focus on all menu items
|
|
89
|
-
newMenuItems.forEach((item) => item.setAttribute("tabindex", "-1"));
|
|
90
|
-
if (e.code === KeyboardCode.ARROW_DOWN) {
|
|
91
|
-
nextFocusableItem = this.getNextItem(newMenuItems, 1);
|
|
92
|
-
}
|
|
93
|
-
else if (e.code === KeyboardCode.ARROW_UP) {
|
|
94
|
-
nextFocusableItem = this.getNextItem(newMenuItems, -1);
|
|
95
|
-
}
|
|
96
|
-
if (nextFocusableItem) {
|
|
97
|
-
nextFocusableItem.setAttribute("tabindex", "0");
|
|
98
|
-
nextFocusableItem.focus();
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
else if (e.code === KeyboardCode.ESC) {
|
|
102
|
-
this.focusToParentAndCloseMenu();
|
|
103
|
-
}
|
|
104
|
-
else if (e.shiftKey && e.code === KeyboardCode.TAB) {
|
|
105
|
-
this.focusToParentAndCloseMenu();
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
getNextItem(menuItems, direction) {
|
|
110
|
-
if (this.currentIndex === -1) {
|
|
111
|
-
this.currentIndex = direction === 1 ? 0 : menuItems.length - 1;
|
|
112
|
-
return menuItems[this.currentIndex];
|
|
113
|
-
}
|
|
114
|
-
this.currentIndex = (this.currentIndex + direction + menuItems.length) % menuItems.length;
|
|
115
|
-
return menuItems[this.currentIndex];
|
|
116
|
-
}
|
|
117
|
-
focusToParentAndCloseMenu() {
|
|
118
|
-
const menuButton = this.hostElement.shadowRoot.querySelector(".menu-label");
|
|
119
|
-
menuButton.focus();
|
|
120
|
-
this.currentIndex = -1;
|
|
121
|
-
this.open = false;
|
|
122
|
-
}
|
|
123
|
-
onOpenChanged() {
|
|
124
|
-
if (this.open) {
|
|
125
|
-
this.reflow(true);
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
cancelAnimationFrame(this.raf);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
constructor() {
|
|
132
|
-
this.currentIndex = -1;
|
|
133
|
-
this.currentCanvasOpenStatus = false;
|
|
134
|
-
this.active = undefined;
|
|
135
|
-
this.floating = true;
|
|
136
|
-
this.open = false;
|
|
137
|
-
this.verticalContext = false;
|
|
138
|
-
this.hasHeader = undefined;
|
|
139
|
-
this.hasContent = undefined;
|
|
140
|
-
this.toggle = this.toggle.bind(this);
|
|
141
|
-
this.checkContent = this.checkContent.bind(this);
|
|
142
|
-
this.onLabelSlotChange = this.onLabelSlotChange.bind(this);
|
|
143
|
-
this.onItemsChange = this.onItemsChange.bind(this);
|
|
144
|
-
}
|
|
145
|
-
componentWillLoad() {
|
|
146
|
-
const menuItems = Array.from(this.hostElement.parentElement.querySelectorAll('[slot="menu"]'));
|
|
147
|
-
this.firstElMenu = menuItems[0];
|
|
148
|
-
this.lastElMenu = menuItems[menuItems.length - 1];
|
|
149
|
-
this.checkContent();
|
|
150
19
|
}
|
|
151
20
|
/**
|
|
152
21
|
* Sets slotted item text as `data-text` attribute value, to let CSS use it through `attr()`.
|
|
@@ -155,15 +24,16 @@ export class ZMenu {
|
|
|
155
24
|
onLabelSlotChange(ev) {
|
|
156
25
|
const labelElement = ev.target.assignedElements()[0];
|
|
157
26
|
labelElement.dataset.text = labelElement === null || labelElement === void 0 ? void 0 : labelElement.textContent;
|
|
27
|
+
this.setLabelA11yAttrs();
|
|
158
28
|
}
|
|
159
29
|
/**
|
|
160
30
|
* Correctly set position of the floating menu in order to prevent overflow.
|
|
161
31
|
* @param live Should run the method on every refresh frame.
|
|
162
32
|
*/
|
|
163
33
|
reflow(live = false) {
|
|
164
|
-
if (this.content) {
|
|
34
|
+
if (this.content && this.hasContent) {
|
|
165
35
|
const { style } = this.content;
|
|
166
|
-
const { left } = this.
|
|
36
|
+
const { left } = this.host.getBoundingClientRect();
|
|
167
37
|
const widthPx = getComputedStyle(this.content).width;
|
|
168
38
|
const width = widthPx ? parseFloat(widthPx.replace("px", "")) : 375;
|
|
169
39
|
const safeScrollbarSpace = 30;
|
|
@@ -177,37 +47,214 @@ export class ZMenu {
|
|
|
177
47
|
* Check if some content slot is set.
|
|
178
48
|
*/
|
|
179
49
|
checkContent() {
|
|
180
|
-
this.hasHeader = !!this.
|
|
181
|
-
this.hasContent = !!this.
|
|
50
|
+
this.hasHeader = !!this.host.querySelectorAll("[slot=header]").length;
|
|
51
|
+
this.hasContent = !!this.host.querySelectorAll("[slot=item]").length || this.hasHeader;
|
|
182
52
|
}
|
|
183
53
|
/**
|
|
184
|
-
* Set `menuitem` role to all menu items.
|
|
185
|
-
* Set
|
|
54
|
+
* Set `menuitem` role to all menu items (ZMenuSection items already have it).
|
|
55
|
+
* Set -1 to the tabindex of the items and 0 to the first one.
|
|
186
56
|
*/
|
|
57
|
+
setItemsA11yAttrs() {
|
|
58
|
+
this.items.forEach((item, index) => {
|
|
59
|
+
const tabindex = index === 0 ? 0 : -1;
|
|
60
|
+
if (isZMenuSection(item)) {
|
|
61
|
+
item.htmlTabindex = tabindex;
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
item.setAttribute("role", "menuitem");
|
|
65
|
+
item.tabIndex = tabindex;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
187
69
|
onItemsChange() {
|
|
188
70
|
this.checkContent();
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
item
|
|
193
|
-
|
|
71
|
+
this.items = Array.from(this.host.children).filter(({ slot }) => slot === "item");
|
|
72
|
+
this.setItemsA11yAttrs();
|
|
73
|
+
this.items.forEach((item) => {
|
|
74
|
+
if (!isZMenuSection(item)) {
|
|
75
|
+
item.dataset.text = item.textContent;
|
|
76
|
+
}
|
|
194
77
|
});
|
|
195
78
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Move focus and adjust the tabindex value of `receiver` and `current` elements,
|
|
81
|
+
* setting -1 to the `current` and 0 to the `receiver`, then focus the `receiver` element.
|
|
82
|
+
* If the receiver is a ZMenuSection and it's open, focus its first focusable item.
|
|
83
|
+
*/
|
|
84
|
+
moveFocus(receiver, current) {
|
|
85
|
+
if (isZMenuSection(receiver)) {
|
|
86
|
+
receiver.setFocus();
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
receiver.tabIndex = 0;
|
|
90
|
+
setTimeout(() => {
|
|
91
|
+
receiver.focus();
|
|
92
|
+
}, 100);
|
|
93
|
+
}
|
|
94
|
+
if (!current) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (isZMenuSection(current)) {
|
|
98
|
+
current.htmlTabindex = -1;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
current.tabIndex = -1;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
onLabelKeydown(ev) {
|
|
105
|
+
if (ev.key === KeyboardCode.ENTER || ev.key === KeyboardCode.SPACE) {
|
|
106
|
+
ev.preventDefault();
|
|
107
|
+
ev.stopPropagation();
|
|
108
|
+
this.toggle();
|
|
109
|
+
}
|
|
110
|
+
if (!this.verticalContext) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (ev.key === KeyboardCode.ARROW_RIGHT && !this.open) {
|
|
114
|
+
ev.preventDefault();
|
|
115
|
+
ev.stopPropagation();
|
|
116
|
+
this.open = true;
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (ev.key === KeyboardCode.ARROW_LEFT && this.open) {
|
|
120
|
+
ev.preventDefault();
|
|
121
|
+
ev.stopPropagation();
|
|
122
|
+
this.open = false;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/** Set tabindex of the label to 0, then focus it. */
|
|
126
|
+
async setFocus() {
|
|
127
|
+
this.htmlTabindex = 0;
|
|
128
|
+
const label = this.hasContent ? this.labelButton : this.host.firstElementChild;
|
|
129
|
+
label.focus();
|
|
130
|
+
}
|
|
131
|
+
/** Focus the last item. */
|
|
132
|
+
async focusLastItem() {
|
|
133
|
+
this.htmlTabindex = 0;
|
|
134
|
+
this.moveFocus(this.items[this.items.length - 1]);
|
|
135
|
+
}
|
|
136
|
+
onOpenChanged() {
|
|
137
|
+
this.setItemsA11yAttrs();
|
|
138
|
+
if (!this.open) {
|
|
139
|
+
cancelAnimationFrame(this.raf);
|
|
140
|
+
this.closed.emit();
|
|
141
|
+
this.items.forEach((item) => {
|
|
142
|
+
if (isZMenuSection(item) && item.open) {
|
|
143
|
+
item.open = false;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
this.opened.emit();
|
|
149
|
+
if (this.floating) {
|
|
150
|
+
this.reflow(true);
|
|
201
151
|
}
|
|
202
152
|
}
|
|
203
|
-
|
|
153
|
+
setLabelA11yAttrs() {
|
|
154
|
+
if (this.hasContent && !this.labelButton) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
204
157
|
if (this.hasContent) {
|
|
205
|
-
|
|
158
|
+
this.labelButton.tabIndex = this.htmlTabindex;
|
|
159
|
+
return;
|
|
206
160
|
}
|
|
207
|
-
|
|
161
|
+
const slottedLabel = this.host.firstElementChild;
|
|
162
|
+
slottedLabel.role = "menuitem";
|
|
163
|
+
slottedLabel.tabIndex = this.htmlTabindex;
|
|
164
|
+
}
|
|
165
|
+
onKeyDown(ev) {
|
|
166
|
+
if (!this.hasContent) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
switch (ev.key) {
|
|
170
|
+
case KeyboardCode.ESC:
|
|
171
|
+
ev.stopPropagation();
|
|
172
|
+
ev.preventDefault();
|
|
173
|
+
this.open = false;
|
|
174
|
+
this.setFocus();
|
|
175
|
+
break;
|
|
176
|
+
case KeyboardCode.ARROW_DOWN: {
|
|
177
|
+
if (this.verticalContext && document.activeElement === this.host && !this.open) {
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
if (document.activeElement === this.host) {
|
|
181
|
+
if (!this.open) {
|
|
182
|
+
this.open = true;
|
|
183
|
+
}
|
|
184
|
+
ev.stopPropagation();
|
|
185
|
+
ev.preventDefault();
|
|
186
|
+
this.moveFocus(this.items[0]);
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
const currentIndex = this.items.indexOf(this.focusableItem);
|
|
190
|
+
const receiver = this.items[currentIndex + 1];
|
|
191
|
+
if (this.verticalContext && !receiver) {
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
ev.stopPropagation();
|
|
195
|
+
ev.preventDefault();
|
|
196
|
+
// if the last item is already focused, navigate to the first one
|
|
197
|
+
this.moveFocus(receiver !== null && receiver !== void 0 ? receiver : this.items[0], this.focusableItem);
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
case KeyboardCode.ARROW_UP: {
|
|
201
|
+
if (this.verticalContext && document.activeElement === this.host) {
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
if (document.activeElement === this.host) {
|
|
205
|
+
// open the menu and focus the last item
|
|
206
|
+
if (!this.open) {
|
|
207
|
+
this.open = true;
|
|
208
|
+
}
|
|
209
|
+
ev.stopPropagation();
|
|
210
|
+
ev.preventDefault();
|
|
211
|
+
this.moveFocus(this.items[this.items.length - 1], this.focusableItem);
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
ev.stopPropagation();
|
|
215
|
+
ev.preventDefault();
|
|
216
|
+
const currentIndex = this.items.indexOf(this.focusableItem);
|
|
217
|
+
const receiver = this.items[currentIndex - 1];
|
|
218
|
+
if (!receiver && this.verticalContext) {
|
|
219
|
+
this.setFocus();
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
if (isZMenuSection(receiver) && receiver.open) {
|
|
223
|
+
isZMenuSection(this.focusableItem)
|
|
224
|
+
? (this.focusableItem.htmlTabindex = -1)
|
|
225
|
+
: (this.focusableItem.tabIndex = -1);
|
|
226
|
+
receiver.focusLastItem();
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
// if the first item is already focused, navigate to the last one
|
|
230
|
+
this.moveFocus(receiver !== null && receiver !== void 0 ? receiver : this.items[this.items.length - 1], this.focusableItem);
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
constructor() {
|
|
236
|
+
this.active = undefined;
|
|
237
|
+
this.floating = true;
|
|
238
|
+
this.open = false;
|
|
239
|
+
this.verticalContext = false;
|
|
240
|
+
this.htmlTabindex = -1;
|
|
241
|
+
this.hasHeader = undefined;
|
|
242
|
+
this.hasContent = undefined;
|
|
243
|
+
this.toggle = this.toggle.bind(this);
|
|
244
|
+
this.checkContent = this.checkContent.bind(this);
|
|
245
|
+
this.onLabelSlotChange = this.onLabelSlotChange.bind(this);
|
|
246
|
+
this.onItemsChange = this.onItemsChange.bind(this);
|
|
247
|
+
this.onLabelKeydown = this.onLabelKeydown.bind(this);
|
|
248
|
+
}
|
|
249
|
+
connectedCallback() {
|
|
250
|
+
this.onItemsChange();
|
|
251
|
+
this.setLabelA11yAttrs();
|
|
208
252
|
}
|
|
209
253
|
render() {
|
|
210
|
-
|
|
254
|
+
if (!this.hasContent) {
|
|
255
|
+
return (h("div", { class: "menu-wrapper" }, h("div", { class: "menu-label" }, h("div", { class: "menu-label-content" }, h("slot", { onSlotchange: this.onLabelSlotChange })))));
|
|
256
|
+
}
|
|
257
|
+
return (h(Host, null, h("div", { class: "menu-wrapper" }, h("button", { ref: (el) => (this.labelButton = el), class: "menu-label", "aria-expanded": `${!!this.open}`, "aria-haspopup": `${this.hasContent}`, "aria-label": this.open ? "Chiudi menù" : "Apri menù", role: "menuitem", tabindex: this.htmlTabindex, onClick: this.toggle, onKeyDown: this.onLabelKeydown }, h("div", { class: "menu-label-content" }, h("slot", { onSlotchange: this.onLabelSlotChange }), h("z-icon", { name: this.open ? "chevron-up" : "chevron-down" })))), h("div", { class: "content", ref: (el) => (this.content = el) }, this.hasHeader && (h("header", { class: "header" }, h("slot", { name: "header", onSlotchange: this.checkContent }))), h("div", { class: "items", role: "menu" }, h("slot", { name: "item", onSlotchange: this.onItemsChange })))));
|
|
211
258
|
}
|
|
212
259
|
static get is() { return "z-menu"; }
|
|
213
260
|
static get encapsulation() { return "shadow"; }
|
|
@@ -288,11 +335,29 @@ export class ZMenu {
|
|
|
288
335
|
"optional": false,
|
|
289
336
|
"docs": {
|
|
290
337
|
"tags": [],
|
|
291
|
-
"text": "Tells the component that it's placed in a vertical context with other `ZMenu`s (
|
|
338
|
+
"text": "Tells the component that it's placed in a vertical context with other `ZMenu`s (usually in the ZAppHeader's offcanvas).\nA small border is placed under it as a separator from other elements."
|
|
292
339
|
},
|
|
293
340
|
"attribute": "vertical-context",
|
|
294
341
|
"reflect": true,
|
|
295
342
|
"defaultValue": "false"
|
|
343
|
+
},
|
|
344
|
+
"htmlTabindex": {
|
|
345
|
+
"type": "number",
|
|
346
|
+
"mutable": false,
|
|
347
|
+
"complexType": {
|
|
348
|
+
"original": "number",
|
|
349
|
+
"resolved": "number",
|
|
350
|
+
"references": {}
|
|
351
|
+
},
|
|
352
|
+
"required": false,
|
|
353
|
+
"optional": false,
|
|
354
|
+
"docs": {
|
|
355
|
+
"tags": [],
|
|
356
|
+
"text": "Tabindex value to set on the menu label.\nUseful to manage keyboard navigation focus with roving tabindex handled by this component's parent (usually ZAppHeader)."
|
|
357
|
+
},
|
|
358
|
+
"attribute": "html-tabindex",
|
|
359
|
+
"reflect": false,
|
|
360
|
+
"defaultValue": "-1"
|
|
296
361
|
}
|
|
297
362
|
};
|
|
298
363
|
}
|
|
@@ -335,29 +400,62 @@ export class ZMenu {
|
|
|
335
400
|
}
|
|
336
401
|
}];
|
|
337
402
|
}
|
|
338
|
-
static get
|
|
403
|
+
static get methods() {
|
|
404
|
+
return {
|
|
405
|
+
"setFocus": {
|
|
406
|
+
"complexType": {
|
|
407
|
+
"signature": "() => Promise<void>",
|
|
408
|
+
"parameters": [],
|
|
409
|
+
"references": {
|
|
410
|
+
"Promise": {
|
|
411
|
+
"location": "global",
|
|
412
|
+
"id": "global::Promise"
|
|
413
|
+
},
|
|
414
|
+
"HTMLElement": {
|
|
415
|
+
"location": "global",
|
|
416
|
+
"id": "global::HTMLElement"
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
"return": "Promise<void>"
|
|
420
|
+
},
|
|
421
|
+
"docs": {
|
|
422
|
+
"text": "Set tabindex of the label to 0, then focus it.",
|
|
423
|
+
"tags": []
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
"focusLastItem": {
|
|
427
|
+
"complexType": {
|
|
428
|
+
"signature": "() => Promise<void>",
|
|
429
|
+
"parameters": [],
|
|
430
|
+
"references": {
|
|
431
|
+
"Promise": {
|
|
432
|
+
"location": "global",
|
|
433
|
+
"id": "global::Promise"
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"return": "Promise<void>"
|
|
437
|
+
},
|
|
438
|
+
"docs": {
|
|
439
|
+
"text": "Focus the last item.",
|
|
440
|
+
"tags": []
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
static get elementRef() { return "host"; }
|
|
339
446
|
static get watchers() {
|
|
340
447
|
return [{
|
|
341
448
|
"propName": "open",
|
|
342
449
|
"methodName": "onOpenChanged"
|
|
450
|
+
}, {
|
|
451
|
+
"propName": "htmlTabindex",
|
|
452
|
+
"methodName": "setLabelA11yAttrs"
|
|
343
453
|
}];
|
|
344
454
|
}
|
|
345
455
|
static get listeners() {
|
|
346
456
|
return [{
|
|
347
|
-
"name": "click",
|
|
348
|
-
"method": "handleClick",
|
|
349
|
-
"target": "document",
|
|
350
|
-
"capture": false,
|
|
351
|
-
"passive": false
|
|
352
|
-
}, {
|
|
353
|
-
"name": "canvasOpenStatusChanged",
|
|
354
|
-
"method": "canvasOpenStatusChanged",
|
|
355
|
-
"target": "document",
|
|
356
|
-
"capture": false,
|
|
357
|
-
"passive": false
|
|
358
|
-
}, {
|
|
359
457
|
"name": "keydown",
|
|
360
|
-
"method": "
|
|
458
|
+
"method": "onKeyDown",
|
|
361
459
|
"target": undefined,
|
|
362
460
|
"capture": false,
|
|
363
461
|
"passive": false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-menu/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,YAAY,EAAC,MAAM,aAAa,CAAC;AAEzC;;;;;GAKG;AAMH,MAAM,OAAO,KAAK;IAqDR,MAAM;QACZ,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,OAAO;QACT,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,I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GAAS,CAC/C,CACF,CACF,CACP,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACF,IAAI,CAAC,eAAe,EAAE;YAEtB,IAAI,CAAC,UAAU,IAAI,CAClB,4DACE,KAAK,EAAC,SAAS,EACf,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;gBAE/B,IAAI,CAAC,SAAS,IAAI,CACjB,+DAAQ,KAAK,EAAC,QAAQ;oBACpB,6DACE,IAAI,EAAC,QAAQ,EACb,YAAY,EAAE,IAAI,CAAC,YAAY,GACzB,CACD,CACV;gBAED,4DACE,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,MAAM;oBAEX,6DACE,IAAI,EAAC,MAAM,EACX,YAAY,EAAE,IAAI,CAAC,aAAa,GAC1B,CACJ,CACF,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h} from \"@stencil/core\";\nimport {KeyboardCode} from \"../../beans\";\n\n/**\n * @slot - Menu label\n * @slot header - Header to display as the first entry of the open menu.\n * @slot item - Single entry of the section. Can be slotted multiple times to insert items onto the menu. Use `z-menu-section` for submenus.\n * @cssprop --z-menu-label-color - Color of the label's text.\n */\n@Component({\n tag: \"z-menu\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZMenu {\n @Element() hostElement: HTMLZMenuElement;\n\n /** Flag to set the active status of the menu. */\n @Prop({reflect: true})\n active?: boolean;\n\n /**\n * Flag to set the display mode of the list.\n * If true, the list will be absolutely positioned under the menu label,\n * stacked beneath it otherwise.\n */\n @Prop({reflect: true})\n floating? = true;\n\n /** The opening state of the menu. */\n @Prop({mutable: true, reflect: true})\n open = false;\n\n /**\n * Tells the component that it's placed in a vertical context with other `ZMenu`s (e.g. in the ZAppHeader's offcanvas).\n * A small border is placed under it as a separator from other elements.\n */\n @Prop({reflect: true})\n verticalContext = false;\n\n @State()\n hasHeader: boolean;\n\n @State()\n hasContent: boolean;\n\n private content: HTMLElement;\n\n /** Animation frame request id. */\n private raf: number;\n\n /** The menu has been opened. */\n @Event()\n opened: EventEmitter;\n\n /** The menu has been closed. */\n @Event()\n closed: EventEmitter;\n\n private currentIndex = -1;\n\n private currentCanvasOpenStatus = false;\n\n private firstElMenu: HTMLMenuElement;\n\n private lastElMenu: HTMLMenuElement;\n\n private toggle(): void {\n if (!this.hasContent) {\n return;\n }\n\n this.open = !this.open;\n this.open ? this.opened.emit() : this.closed.emit();\n }\n\n /** Close the floating list when a click is performed outside of this Element. */\n @Listen(\"click\", {target: \"document\"})\n handleClick(ev: MouseEvent): void {\n if (!this.floating || !this.open || this.hostElement.contains(ev.target as Element)) {\n return;\n }\n\n this.reflow();\n this.open = false;\n this.closed.emit();\n }\n\n @Listen(\"canvasOpenStatusChanged\", {target: \"document\"})\n canvasOpenStatusChanged(e: CustomEvent): void {\n this.currentCanvasOpenStatus = e.detail;\n }\n\n @Listen(\"keydown\")\n handleKeyDown(e: KeyboardEvent): void {\n if (e.code === KeyboardCode.ENTER) {\n return;\n }\n\n if (this.open && !this.currentCanvasOpenStatus) {\n this.handleNavigationSideArrow(e);\n }\n\n this.handleArrowsNav(e);\n }\n\n private handleNavigationSideArrow(e: KeyboardEvent): void {\n if (e.code !== KeyboardCode.ARROW_RIGHT && e.code !== KeyboardCode.ARROW_LEFT) {\n return;\n }\n\n if (e.code === KeyboardCode.ARROW_RIGHT) {\n const nextElement = this.hostElement.nextElementSibling;\n\n if (!nextElement) {\n const firstMenuItem = this.firstElMenu.shadowRoot.querySelector(\".menu-label\") as HTMLElement;\n firstMenuItem.focus();\n this.open = false;\n }\n\n if (nextElement && nextElement.tagName === \"Z-MENU\") {\n const menuButton = nextElement.shadowRoot.querySelector(\".menu-label\") as HTMLElement;\n menuButton.focus();\n\n if (nextElement.children.length > 1) {\n nextElement.setAttribute(\"open\", \"true\");\n }\n this.open = false;\n }\n } else if (e.code === KeyboardCode.ARROW_LEFT) {\n const prevElement = this.hostElement.previousElementSibling;\n if (prevElement.tagName !== \"Z-MENU\") {\n const lastElMenuItem = this.lastElMenu.shadowRoot.querySelector(\".menu-label\") as HTMLElement;\n lastElMenuItem.focus();\n this.open = false;\n }\n if (prevElement && prevElement.tagName === \"Z-MENU\") {\n const menuButton = prevElement.shadowRoot.querySelector(\".menu-label\") as HTMLElement;\n menuButton.focus();\n if (prevElement.children.length > 1) {\n prevElement.setAttribute(\"open\", \"true\");\n }\n this.open = false;\n }\n }\n }\n\n private handleArrowsNav(e: KeyboardEvent): void {\n const menuItems = Array.from(this.hostElement.querySelectorAll(\"[slot='item']\")) as HTMLElement[];\n const newMenuItems = menuItems.map((el) => {\n if (el.tagName === \"Z-MENU-SECTION\") {\n return el.shadowRoot.querySelector(\"button\");\n }\n\n return el;\n });\n\n if (this.open) {\n e.preventDefault();\n e.stopPropagation();\n\n if (e.code === KeyboardCode.ARROW_DOWN || e.code === KeyboardCode.ARROW_UP) {\n let nextFocusableItem: HTMLElement;\n // INFO: reset focus on all menu items\n newMenuItems.forEach((item: HTMLElement) => item.setAttribute(\"tabindex\", \"-1\"));\n\n if (e.code === KeyboardCode.ARROW_DOWN) {\n nextFocusableItem = this.getNextItem(newMenuItems, 1);\n } else if (e.code === KeyboardCode.ARROW_UP) {\n nextFocusableItem = this.getNextItem(newMenuItems, -1);\n }\n\n if (nextFocusableItem) {\n nextFocusableItem.setAttribute(\"tabindex\", \"0\");\n nextFocusableItem.focus();\n }\n } else if (e.code === KeyboardCode.ESC) {\n this.focusToParentAndCloseMenu();\n } else if (e.shiftKey && e.code === KeyboardCode.TAB) {\n this.focusToParentAndCloseMenu();\n }\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 private focusToParentAndCloseMenu(): void {\n const menuButton = this.hostElement.shadowRoot.querySelector(\".menu-label\") as HTMLElement;\n menuButton.focus();\n this.currentIndex = -1;\n this.open = false;\n }\n\n @Watch(\"open\")\n onOpenChanged(): void {\n if (this.open) {\n this.reflow(true);\n } else {\n cancelAnimationFrame(this.raf);\n }\n }\n\n constructor() {\n this.toggle = this.toggle.bind(this);\n this.checkContent = this.checkContent.bind(this);\n this.onLabelSlotChange = this.onLabelSlotChange.bind(this);\n this.onItemsChange = this.onItemsChange.bind(this);\n }\n\n componentWillLoad(): void {\n const menuItems = Array.from(this.hostElement.parentElement.querySelectorAll('[slot=\"menu\"]'));\n this.firstElMenu = menuItems[0] as HTMLMenuElement;\n this.lastElMenu = menuItems[menuItems.length - 1] as HTMLMenuElement;\n\n this.checkContent();\n }\n\n /**\n * Sets slotted item text as `data-text` attribute value, to let CSS use it through `attr()`.\n * @param ev Slotchange event\n */\n private onLabelSlotChange(ev: Event): void {\n const labelElement = (ev.target as HTMLSlotElement).assignedElements()[0] as HTMLElement;\n labelElement.dataset.text = labelElement?.textContent;\n }\n\n /**\n * Correctly set position of the floating menu in order to prevent overflow.\n * @param live Should run the method on every refresh frame.\n */\n private reflow(live = false): void {\n if (this.content) {\n const {style} = this.content;\n const {left} = this.hostElement.getBoundingClientRect();\n const widthPx = getComputedStyle(this.content).width;\n const width = widthPx ? parseFloat(widthPx.replace(\"px\", \"\")) : 375;\n const safeScrollbarSpace = 30;\n style.left = `${Math.min(window.innerWidth - left - width - safeScrollbarSpace, 0)}px`;\n }\n if (live) {\n this.raf = requestAnimationFrame(this.reflow.bind(this, live));\n }\n }\n\n /**\n * Check if some content slot is set.\n */\n private checkContent(): void {\n this.hasHeader = !!this.hostElement.querySelectorAll(\"[slot=header]\").length;\n this.hasContent = !!this.hostElement.querySelectorAll(\"[slot=item]\").length || this.hasHeader;\n }\n\n /**\n * Set `menuitem` role to all menu items.\n * Set the item's inner text to the `data-text` attribute (this is for using bold text avoiding layout shifts).\n */\n private onItemsChange(): void {\n this.checkContent();\n const items = this.hostElement.querySelectorAll<HTMLElement>(\"[slot=item]\");\n items.forEach((item) => {\n item.setAttribute(\"role\", \"menuitem\");\n item.setAttribute(\"tabindex\", \"-1\");\n item.dataset.text = item.textContent;\n });\n }\n\n private focusFirstItemOnKeyUp(): void {\n const firstElement = this.hostElement.querySelectorAll(\"[slot='item']\")[0] as HTMLElement;\n if (firstElement) {\n firstElement.focus();\n this.currentIndex = 0;\n }\n }\n\n private renderMenuLabel(): HTMLButtonElement | HTMLDivElement {\n if (this.hasContent) {\n return (\n <div class=\"menu-wrapper\">\n <button\n class=\"menu-label\"\n aria-expanded={this.open ? \"true\" : \"false\"}\n aria-label={this.open ? \"Chiudi menù\" : \"Apri menù\"}\n onClick={this.toggle}\n onKeyUp={this.focusFirstItemOnKeyUp.bind(this)}\n >\n <div class=\"menu-label-content\">\n <slot onSlotchange={this.onLabelSlotChange}></slot>\n <z-icon name={this.open ? \"chevron-up\" : \"chevron-down\"} />\n </div>\n </button>\n </div>\n );\n }\n\n return (\n <div class=\"menu-wrapper\">\n <div class=\"menu-label\">\n <div class=\"menu-label-content\">\n <slot onSlotchange={this.onLabelSlotChange}></slot>\n </div>\n </div>\n </div>\n );\n }\n\n render(): HTMLZMenuElement {\n return (\n <Host>\n {this.renderMenuLabel()}\n\n {this.hasContent && (\n <div\n class=\"content\"\n ref={(el) => (this.content = el)}\n >\n {this.hasHeader && (\n <header class=\"header\">\n <slot\n name=\"header\"\n onSlotchange={this.checkContent}\n ></slot>\n </header>\n )}\n\n <div\n class=\"items\"\n role=\"menu\"\n >\n <slot\n name=\"item\"\n onSlotchange={this.onItemsChange}\n ></slot>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/z-menu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AACnH,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAEzC,MAAM,cAAc,GAAG,CAAC,EAAyC,EAAiC,EAAE,CAClG,CAAA,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,OAAO,MAAK,gBAAgB,CAAC;AAEnC;;;;;GAKG;AAMH,MAAM,OAAO,KAAK;IAwDhB,IAAY,aAAa;QACvB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3G,CAAC;IAEO,MAAM;QACZ,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,OAAO;QACT,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IACK,iBAAiB,CAAC,EAAS;QACjC,MAAM,YAAY,GAAI,EAAE,CAAC,MAA0B,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAgB,CAAC;QACzF,YAAY,CAAC,OAAO,CAAC,IAAI,GAAG,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,WAAW,CAAC;QACtD,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACK,MAAM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h} from \"@stencil/core\";\nimport {KeyboardCode} from \"../../beans\";\n\nconst isZMenuSection = (el: HTMLElement | HTMLZMenuSectionElement): el is HTMLZMenuSectionElement =>\n el?.tagName === \"Z-MENU-SECTION\";\n\n/**\n * @slot - Menu label\n * @slot header - Header to display as the first entry of the open menu.\n * @slot item - Single entry of the section. Can be slotted multiple times to insert items onto the menu. Set the `active` HTML attribute on the element to highlight it. Use `z-menu-section` for submenus.\n * @cssprop --z-menu-label-color - Color of the label's text.\n */\n@Component({\n tag: \"z-menu\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZMenu {\n @Element() host: HTMLZMenuElement;\n\n /** Flag to set the active status of the menu. */\n @Prop({reflect: true})\n active?: boolean;\n\n /**\n * Flag to set the display mode of the list.\n * If true, the list will be absolutely positioned under the menu label,\n * stacked beneath it otherwise.\n */\n @Prop({reflect: true})\n floating? = true;\n\n /** The opening state of the menu. */\n @Prop({mutable: true, reflect: true})\n open = false;\n\n /**\n * Tells the component that it's placed in a vertical context with other `ZMenu`s (usually in the ZAppHeader's offcanvas).\n * A small border is placed under it as a separator from other elements.\n */\n @Prop({reflect: true})\n verticalContext = false;\n\n /**\n * Tabindex value to set on the menu label.\n * Useful to manage keyboard navigation focus with roving tabindex handled by this component's parent (usually ZAppHeader).\n */\n @Prop()\n htmlTabindex = -1;\n\n @State()\n hasHeader: boolean;\n\n @State()\n hasContent: boolean;\n\n /** The menu has been opened. */\n @Event()\n opened: EventEmitter;\n\n /** The menu has been closed. */\n @Event()\n closed: EventEmitter;\n\n private labelButton: HTMLButtonElement;\n\n private content: HTMLElement;\n\n private items: (HTMLElement | HTMLZMenuSectionElement)[];\n\n /** Animation frame request id. */\n private raf: number;\n\n private get focusableItem(): HTMLZMenuSectionElement | HTMLElement | null {\n return this.items.find((item) => (isZMenuSection(item) ? item.htmlTabindex === 0 : item.tabIndex === 0));\n }\n\n private toggle(): void {\n if (!this.hasContent) {\n return;\n }\n\n this.open = !this.open;\n }\n\n /**\n * Sets slotted item text as `data-text` attribute value, to let CSS use it through `attr()`.\n * @param ev Slotchange event\n */\n private onLabelSlotChange(ev: Event): void {\n const labelElement = (ev.target as HTMLSlotElement).assignedElements()[0] as HTMLElement;\n labelElement.dataset.text = labelElement?.textContent;\n this.setLabelA11yAttrs();\n }\n\n /**\n * Correctly set position of the floating menu in order to prevent overflow.\n * @param live Should run the method on every refresh frame.\n */\n private reflow(live = false): void {\n if (this.content && this.hasContent) {\n const {style} = this.content;\n const {left} = this.host.getBoundingClientRect();\n const widthPx = getComputedStyle(this.content).width;\n const width = widthPx ? parseFloat(widthPx.replace(\"px\", \"\")) : 375;\n const safeScrollbarSpace = 30;\n style.left = `${Math.min(window.innerWidth - left - width - safeScrollbarSpace, 0)}px`;\n }\n if (live) {\n this.raf = requestAnimationFrame(this.reflow.bind(this, live));\n }\n }\n\n /**\n * Check if some content slot is set.\n */\n private checkContent(): void {\n this.hasHeader = !!this.host.querySelectorAll(\"[slot=header]\").length;\n this.hasContent = !!this.host.querySelectorAll(\"[slot=item]\").length || this.hasHeader;\n }\n\n /**\n * Set `menuitem` role to all menu items (ZMenuSection items already have it).\n * Set -1 to the tabindex of the items and 0 to the first one.\n */\n private setItemsA11yAttrs(): void {\n this.items.forEach((item, index) => {\n const tabindex = index === 0 ? 0 : -1;\n if (isZMenuSection(item)) {\n item.htmlTabindex = tabindex;\n } else {\n item.setAttribute(\"role\", \"menuitem\");\n item.tabIndex = tabindex;\n }\n });\n }\n\n private onItemsChange(): void {\n this.checkContent();\n this.items = Array.from(this.host.children).filter(({slot}) => slot === \"item\") as HTMLElement[];\n this.setItemsA11yAttrs();\n this.items.forEach((item) => {\n if (!isZMenuSection(item)) {\n item.dataset.text = item.textContent;\n }\n });\n }\n\n /**\n * Move focus and adjust the tabindex value of `receiver` and `current` elements,\n * setting -1 to the `current` and 0 to the `receiver`, then focus the `receiver` element.\n * If the receiver is a ZMenuSection and it's open, focus its first focusable item.\n */\n private moveFocus(\n receiver: HTMLElement | HTMLZMenuSectionElement,\n current?: HTMLElement | HTMLZMenuSectionElement\n ): void {\n if (isZMenuSection(receiver)) {\n receiver.setFocus();\n } else {\n receiver.tabIndex = 0;\n setTimeout(() => {\n receiver.focus();\n }, 100);\n }\n if (!current) {\n return;\n }\n\n if (isZMenuSection(current)) {\n current.htmlTabindex = -1;\n } else {\n current.tabIndex = -1;\n }\n }\n\n private onLabelKeydown(ev: KeyboardEvent): void {\n if (ev.key === KeyboardCode.ENTER || ev.key === KeyboardCode.SPACE) {\n ev.preventDefault();\n ev.stopPropagation();\n this.toggle();\n }\n\n if (!this.verticalContext) {\n return;\n }\n\n if (ev.key === KeyboardCode.ARROW_RIGHT && !this.open) {\n ev.preventDefault();\n ev.stopPropagation();\n this.open = true;\n\n return;\n }\n\n if (ev.key === KeyboardCode.ARROW_LEFT && this.open) {\n ev.preventDefault();\n ev.stopPropagation();\n this.open = false;\n }\n }\n\n /** Set tabindex of the label to 0, then focus it. */\n @Method()\n async setFocus(): Promise<void> {\n this.htmlTabindex = 0;\n const label = this.hasContent ? this.labelButton : (this.host.firstElementChild as HTMLElement);\n label.focus();\n }\n\n /** Focus the last item. */\n @Method()\n async focusLastItem(): Promise<void> {\n this.htmlTabindex = 0;\n this.moveFocus(this.items[this.items.length - 1]);\n }\n\n @Watch(\"open\")\n onOpenChanged(): void {\n this.setItemsA11yAttrs();\n if (!this.open) {\n cancelAnimationFrame(this.raf);\n this.closed.emit();\n this.items.forEach((item) => {\n if (isZMenuSection(item) && item.open) {\n item.open = false;\n }\n });\n\n return;\n }\n\n this.opened.emit();\n if (this.floating) {\n this.reflow(true);\n }\n }\n\n @Watch(\"htmlTabindex\")\n setLabelA11yAttrs(): void {\n if (this.hasContent && !this.labelButton) {\n return;\n }\n\n if (this.hasContent) {\n this.labelButton.tabIndex = this.htmlTabindex;\n\n return;\n }\n\n const slottedLabel = this.host.firstElementChild as HTMLElement;\n slottedLabel.role = \"menuitem\";\n slottedLabel.tabIndex = this.htmlTabindex;\n }\n\n @Listen(\"keydown\")\n onKeyDown(ev: KeyboardEvent): void {\n if (!this.hasContent) {\n return;\n }\n\n switch (ev.key) {\n case KeyboardCode.ESC:\n ev.stopPropagation();\n ev.preventDefault();\n this.open = false;\n this.setFocus();\n break;\n case KeyboardCode.ARROW_DOWN: {\n if (this.verticalContext && document.activeElement === this.host && !this.open) {\n break;\n }\n\n if (document.activeElement === this.host) {\n if (!this.open) {\n this.open = true;\n }\n ev.stopPropagation();\n ev.preventDefault();\n this.moveFocus(this.items[0]);\n break;\n }\n\n const currentIndex = this.items.indexOf(this.focusableItem);\n const receiver = this.items[currentIndex + 1];\n if (this.verticalContext && !receiver) {\n break;\n }\n\n ev.stopPropagation();\n ev.preventDefault();\n // if the last item is already focused, navigate to the first one\n this.moveFocus(receiver ?? this.items[0], this.focusableItem);\n break;\n }\n case KeyboardCode.ARROW_UP: {\n if (this.verticalContext && document.activeElement === this.host) {\n break;\n }\n\n if (document.activeElement === this.host) {\n // open the menu and focus the last item\n if (!this.open) {\n this.open = true;\n }\n ev.stopPropagation();\n ev.preventDefault();\n this.moveFocus(this.items[this.items.length - 1], this.focusableItem);\n break;\n }\n\n ev.stopPropagation();\n ev.preventDefault();\n const currentIndex = this.items.indexOf(this.focusableItem);\n const receiver = this.items[currentIndex - 1];\n if (!receiver && this.verticalContext) {\n this.setFocus();\n break;\n }\n\n if (isZMenuSection(receiver) && receiver.open) {\n isZMenuSection(this.focusableItem)\n ? (this.focusableItem.htmlTabindex = -1)\n : (this.focusableItem.tabIndex = -1);\n receiver.focusLastItem();\n break;\n }\n\n // if the first item is already focused, navigate to the last one\n this.moveFocus(receiver ?? this.items[this.items.length - 1], this.focusableItem);\n break;\n }\n }\n }\n\n constructor() {\n this.toggle = this.toggle.bind(this);\n this.checkContent = this.checkContent.bind(this);\n this.onLabelSlotChange = this.onLabelSlotChange.bind(this);\n this.onItemsChange = this.onItemsChange.bind(this);\n this.onLabelKeydown = this.onLabelKeydown.bind(this);\n }\n\n connectedCallback(): void {\n this.onItemsChange();\n this.setLabelA11yAttrs();\n }\n\n render(): HTMLDivElement | HTMLZMenuElement {\n if (!this.hasContent) {\n return (\n <div class=\"menu-wrapper\">\n <div class=\"menu-label\">\n <div class=\"menu-label-content\">\n <slot onSlotchange={this.onLabelSlotChange} />\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <Host>\n <div class=\"menu-wrapper\">\n <button\n ref={(el) => (this.labelButton = el)}\n class=\"menu-label\"\n aria-expanded={`${!!this.open}`}\n aria-haspopup={`${this.hasContent}`}\n aria-label={this.open ? \"Chiudi menù\" : \"Apri menù\"}\n role=\"menuitem\"\n tabindex={this.htmlTabindex}\n onClick={this.toggle}\n onKeyDown={this.onLabelKeydown}\n >\n <div class=\"menu-label-content\">\n <slot onSlotchange={this.onLabelSlotChange} />\n <z-icon name={this.open ? \"chevron-up\" : \"chevron-down\"} />\n </div>\n </button>\n </div>\n\n <div\n class=\"content\"\n ref={(el) => (this.content = el)}\n >\n {this.hasHeader && (\n <header class=\"header\">\n <slot\n name=\"header\"\n onSlotchange={this.checkContent}\n />\n </header>\n )}\n\n <div\n class=\"items\"\n role=\"menu\"\n >\n <slot\n name=\"item\"\n onSlotchange={this.onItemsChange}\n />\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -7,7 +7,6 @@ const StoryMeta = {
|
|
|
7
7
|
args: {
|
|
8
8
|
active: false,
|
|
9
9
|
floating: true,
|
|
10
|
-
verticalContext: false,
|
|
11
10
|
},
|
|
12
11
|
};
|
|
13
12
|
export default StoryMeta;
|
|
@@ -16,7 +15,6 @@ export const FloatingContentLayout = {
|
|
|
16
15
|
<z-menu
|
|
17
16
|
.active=${args.active}
|
|
18
17
|
.floating=${args.floating}
|
|
19
|
-
.verticalContext=${args.verticalContext}
|
|
20
18
|
>
|
|
21
19
|
<h3>Menu label</h3>
|
|
22
20
|
<a
|
|
@@ -68,7 +66,6 @@ export const WithHeader = {
|
|
|
68
66
|
<z-menu
|
|
69
67
|
.active=${args.active}
|
|
70
68
|
.floating=${args.floating}
|
|
71
|
-
.verticalContext=${args.verticalContext}
|
|
72
69
|
>
|
|
73
70
|
<img
|
|
74
71
|
slot="header"
|
|
@@ -113,11 +110,8 @@ export const ActiveWithoutItems = {
|
|
|
113
110
|
exclude: ["floating"],
|
|
114
111
|
},
|
|
115
112
|
},
|
|
116
|
-
render: (
|
|
117
|
-
<z-menu
|
|
118
|
-
.active=${true}
|
|
119
|
-
.verticalContext=${args.verticalContext}
|
|
120
|
-
>
|
|
113
|
+
render: () => html `
|
|
114
|
+
<z-menu .active=${true}>
|
|
121
115
|
<a
|
|
122
116
|
href="https://cataas.com/cat/gif"
|
|
123
117
|
target="_blank"
|