@zanichelli/albe-web-components 19.1.3 → 19.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/dist/cjs/iconset-5d47610c.js +1016 -0
- package/dist/cjs/iconset-5d47610c.js.map +1 -0
- package/dist/cjs/{index-f011b2e3.js → index-1ee051ca.js} +2 -2
- package/dist/cjs/{index-f011b2e3.js.map → index-1ee051ca.js.map} +1 -1
- package/dist/cjs/{index-09238e31.js → index-43dfc8b2.js} +3 -3
- package/dist/cjs/{index-09238e31.js.map → index-43dfc8b2.js.map} +1 -1
- package/dist/cjs/{index-1c7cd5df.js → index-5eb95b44.js} +2 -2
- package/dist/cjs/{index-1c7cd5df.js.map → index-5eb95b44.js.map} +1 -1
- package/dist/cjs/{index-805390c8.js → index-844c7a99.js} +5 -5
- package/dist/cjs/{index-805390c8.js.map → index-844c7a99.js.map} +1 -1
- package/dist/cjs/{index-62712250.js → index-8770e71a.js} +2 -2
- package/dist/cjs/{index-62712250.js.map → index-8770e71a.js.map} +1 -1
- package/dist/cjs/index-96af6326.js +14 -2
- package/dist/cjs/{index-66928615.js → index-d214a119.js} +3 -3
- package/dist/cjs/{index-66928615.js.map → index-d214a119.js.map} +1 -1
- package/dist/cjs/{index-97a4c18d.js → index-e30d0503.js} +51 -1
- package/dist/cjs/index-e30d0503.js.map +1 -0
- package/dist/cjs/index.cjs.js +5 -2
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-7f9d5a78.js → utils-4f7b4830.js} +2 -2
- package/dist/cjs/{utils-7f9d5a78.js.map → utils-4f7b4830.js.map} +1 -1
- package/dist/cjs/{utils-5148245a.js → utils-e8b453d5.js} +35 -6
- package/dist/cjs/utils-e8b453d5.js.map +1 -0
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-accordion.cjs.entry.js +2 -2
- package/dist/cjs/z-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-anchor-navigation.cjs.entry.js +2 -2
- package/dist/cjs/z-app-header-deprecated.cjs.entry.js +2 -2
- package/dist/cjs/z-app-header_12.cjs.entry.js +139 -1051
- 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-app.cjs.entry.js +2 -2
- package/dist/cjs/z-book-card-deprecated.cjs.entry.js +3 -3
- package/dist/cjs/z-book-card.cjs.entry.js +1 -1
- package/dist/cjs/z-book-cover.cjs.entry.js +1 -1
- package/dist/cjs/z-breadcrumb.cjs.entry.js +4 -4
- package/dist/cjs/z-button-sort.cjs.entry.js +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-color-picker.cjs.entry.js +212 -0
- package/dist/cjs/z-color-picker.cjs.entry.js.map +1 -0
- package/dist/cjs/z-combobox.cjs.entry.js +3 -3
- package/dist/cjs/z-cover-hero.cjs.entry.js +3 -3
- package/dist/cjs/z-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +7 -7
- package/dist/cjs/z-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/z-file.cjs.entry.js +2 -2
- package/dist/cjs/z-ghost-loading.cjs.entry.js +1 -1
- package/dist/cjs/z-info-box.cjs.entry.js +1 -1
- package/dist/cjs/z-info-reveal.cjs.entry.js +2 -2
- package/dist/cjs/z-logo.cjs.entry.js +1 -1
- 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 +2 -2
- package/dist/cjs/z-menu.cjs.entry.js +2 -2
- 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 +1 -1
- package/dist/cjs/z-myz-card-footer.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-info.cjs.entry.js +3 -3
- package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card_4.cjs.entry.js +5 -5
- package/dist/cjs/z-myz-list-item.cjs.entry.js +3 -3
- package/dist/cjs/z-myz-list.cjs.entry.js +1 -1
- 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-notification.cjs.entry.js.map +1 -1
- 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 +2 -2
- package/dist/cjs/z-popover.cjs.entry.js +20 -16
- package/dist/cjs/z-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/z-range-picker.cjs.entry.js +5 -5
- package/dist/cjs/z-section-title.cjs.entry.js +2 -2
- package/dist/cjs/z-select.cjs.entry.js +3 -3
- package/dist/cjs/z-skip-to-content.cjs.entry.js +3 -3
- package/dist/cjs/z-slideshow.cjs.entry.js +2 -2
- package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/z-stepper.cjs.entry.js +1 -1
- package/dist/cjs/z-table.cjs.entry.js +9 -9
- package/dist/cjs/z-tbody.cjs.entry.js +1 -1
- package/dist/cjs/z-td.cjs.entry.js +2 -2
- package/dist/cjs/z-tfoot.cjs.entry.js +1 -1
- package/dist/cjs/z-th.cjs.entry.js +2 -2
- package/dist/cjs/z-thead.cjs.entry.js +1 -1
- package/dist/cjs/z-toast-notification-list.cjs.entry.js +2 -2
- package/dist/cjs/z-toast-notification.cjs.entry.js +2 -2
- package/dist/cjs/z-toggle-button.cjs.entry.js +2 -2
- package/dist/cjs/z-toggle-switch.cjs.entry.js +5 -5
- package/dist/cjs/z-tool.cjs.entry.js +210 -0
- package/dist/cjs/z-tool.cjs.entry.js.map +1 -0
- package/dist/cjs/z-toolbar.cjs.entry.js +148 -0
- package/dist/cjs/z-toolbar.cjs.entry.js.map +1 -0
- package/dist/cjs/z-tooltip.cjs.entry.js +3 -2
- package/dist/cjs/z-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/z-tr.cjs.entry.js +5 -5
- package/dist/cjs/z-tree-list.cjs.entry.js +2 -2
- package/dist/cjs/z-visually-hidden.cjs.entry.js +1 -1
- package/dist/collection/beans/index.js +48 -0
- package/dist/collection/beans/index.js.map +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/book-card/z-book-card-app/index.js +1 -1
- package/dist/collection/components/css-components/z-label/styles.css +10 -0
- package/dist/collection/components/date-picker/z-date-picker/index.js +1 -1
- package/dist/collection/components/date-picker/z-range-picker/index.js +3 -3
- package/dist/collection/components/deprecated/z-app-header-deprecated/index.js +1 -1
- package/dist/collection/components/deprecated/z-book-card-deprecated/index.js +1 -1
- package/dist/collection/components/deprecated/z-menu-deprecated/index.js +1 -1
- package/dist/collection/components/deprecated/z-menu-section-deprecated/index.js +1 -1
- package/dist/collection/components/deprecated/z-section-title/index.js +1 -1
- package/dist/collection/components/file-upload/z-dragdrop-area/index.js +2 -2
- package/dist/collection/components/file-upload/z-file/index.js +1 -1
- package/dist/collection/components/list/z-list/index.js +1 -1
- package/dist/collection/components/list/z-list-element/index.js +1 -1
- package/dist/collection/components/list/z-list-group/index.js +2 -2
- package/dist/collection/components/list/z-tree-list/index.js +1 -1
- package/dist/collection/components/table/cells/z-td/index.js +1 -1
- package/dist/collection/components/table/cells/z-th/index.js +1 -1
- package/dist/collection/components/table/z-table/index.js +1 -1
- package/dist/collection/components/table/z-tbody/index.js +1 -1
- package/dist/collection/components/table/z-tfoot/index.js +1 -1
- package/dist/collection/components/table/z-thead/index.js +1 -1
- package/dist/collection/components/table/z-tr/index.js +1 -1
- package/dist/collection/components/z-accordion/index.js +1 -1
- package/dist/collection/components/z-anchor-navigation/index.js +1 -1
- package/dist/collection/components/z-app-header/index.js +1 -1
- package/dist/collection/components/z-app-header/index.js.map +1 -1
- package/dist/collection/components/z-app-header/index.stories.js +42 -0
- package/dist/collection/components/z-app-header/index.stories.js.map +1 -1
- package/dist/collection/components/z-app-header/styles.css +8 -0
- package/dist/collection/components/z-aria-alert/index.js +1 -1
- package/dist/collection/components/z-avatar/index.js +2 -2
- package/dist/collection/components/z-book-cover/index.js +1 -1
- package/dist/collection/components/z-breadcrumb/index.js +2 -2
- package/dist/collection/components/z-button-sort/index.js +1 -1
- package/dist/collection/components/z-chip/index.js +2 -2
- package/dist/collection/components/z-color-picker/index.js +367 -0
- package/dist/collection/components/z-color-picker/index.js.map +1 -0
- package/dist/collection/components/z-color-picker/index.stories.js +34 -0
- package/dist/collection/components/z-color-picker/index.stories.js.map +1 -0
- package/dist/collection/components/z-color-picker/styles.css +74 -0
- package/dist/collection/components/z-combobox/index.js +1 -1
- package/dist/collection/components/z-cover-hero/index.js +2 -2
- package/dist/collection/components/z-divider/index.js +1 -1
- package/dist/collection/components/z-ghost-loading/index.js +1 -1
- package/dist/collection/components/z-icon/index.js +40 -9
- package/dist/collection/components/z-icon/index.js.map +1 -1
- package/dist/collection/components/z-icon/index.stories.js +34 -18
- package/dist/collection/components/z-icon/index.stories.js.map +1 -1
- package/dist/collection/components/z-icon/styles.css +15 -2
- package/dist/collection/components/z-info-box/index.js +1 -1
- package/dist/collection/components/z-info-reveal/index.js +1 -1
- package/dist/collection/components/z-input/index.js +1 -1
- package/dist/collection/components/z-input-message/index.js +1 -1
- package/dist/collection/components/z-logo/index.js +1 -1
- package/dist/collection/components/z-menu/index.js +1 -1
- package/dist/collection/components/z-menu/index.js.map +1 -1
- package/dist/collection/components/z-menu-section/index.js +1 -1
- package/dist/collection/components/z-modal/index.js +4 -4
- package/dist/collection/components/z-navigation-tabs/index.js +2 -2
- package/dist/collection/components/z-notification/index.js +1 -1
- package/dist/collection/components/z-notification/styles.css +2 -2
- package/dist/collection/components/z-offcanvas/index.js +89 -10
- package/dist/collection/components/z-offcanvas/index.js.map +1 -1
- package/dist/collection/components/z-panel-elem/index.js +2 -2
- package/dist/collection/components/z-popover/index.js +31 -21
- package/dist/collection/components/z-popover/index.js.map +1 -1
- package/dist/collection/components/z-popover/styles.css +18 -3
- package/dist/collection/components/z-searchbar/index.js +41 -5
- package/dist/collection/components/z-searchbar/index.js.map +1 -1
- package/dist/collection/components/z-searchbar/index.stories.js +13 -1
- package/dist/collection/components/z-searchbar/index.stories.js.map +1 -1
- package/dist/collection/components/z-select/index.js +1 -1
- package/dist/collection/components/z-skip-to-content/index.js +1 -1
- package/dist/collection/components/z-stepper/index.js +1 -1
- package/dist/collection/components/z-stepper-item/index.js +1 -1
- package/dist/collection/components/z-tag/index.js +2 -2
- package/dist/collection/components/z-toast-notification/index.js +1 -1
- package/dist/collection/components/z-toast-notification-list/index.js +1 -1
- package/dist/collection/components/z-toggle-button/index.js +2 -2
- package/dist/collection/components/z-toggle-switch/index.js +3 -3
- package/dist/collection/components/z-tool/index.js +501 -0
- package/dist/collection/components/z-tool/index.js.map +1 -0
- package/dist/collection/components/z-tool/index.stories.js +147 -0
- package/dist/collection/components/z-tool/index.stories.js.map +1 -0
- package/dist/collection/components/z-tool/styles.css +90 -0
- package/dist/collection/components/z-toolbar/index.js +208 -0
- package/dist/collection/components/z-toolbar/index.js.map +1 -0
- package/dist/collection/components/z-toolbar/index.stories.js +318 -0
- package/dist/collection/components/z-toolbar/index.stories.js.map +1 -0
- package/dist/collection/components/z-toolbar/styles.css +46 -0
- package/dist/collection/components/z-tooltip/index.js +19 -1
- package/dist/collection/components/z-tooltip/index.js.map +1 -1
- package/dist/collection/components/z-visually-hidden/index.js +1 -1
- package/dist/collection/constants/iconset.js +152 -142
- package/dist/collection/constants/iconset.js.map +1 -1
- package/dist/collection/index.js +1 -0
- 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-alert/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +1 -1
- package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
- package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
- package/dist/collection/utils/utils.js +33 -4
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/iconset.js +152 -143
- package/dist/components/iconset.js.map +1 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +5 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/index10.js +17 -6
- package/dist/components/index10.js.map +1 -1
- package/dist/components/index11.js +1 -1
- package/dist/components/index12.js +1 -1
- package/dist/components/index13.js +1 -1
- package/dist/components/index14.js +1 -1
- package/dist/components/index15.js +1 -1
- package/dist/components/index16.js +2 -2
- package/dist/components/index17.js +4 -4
- package/dist/components/index18.js +1 -1
- package/dist/components/index19.js +1 -1
- package/dist/components/index2.js +49 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/index20.js +1 -1
- package/dist/components/index21.js +1 -1
- package/dist/components/index22.js +1 -1
- package/dist/components/index23.js +84 -11
- package/dist/components/index23.js.map +1 -1
- package/dist/components/index24.js +19 -15
- package/dist/components/index24.js.map +1 -1
- package/dist/components/index25.js +13 -6
- package/dist/components/index25.js.map +1 -1
- package/dist/components/index26.js +2 -2
- package/dist/components/index27.js +55 -0
- package/dist/components/index27.js.map +1 -0
- package/dist/components/index3.js +1 -1
- package/dist/components/index4.js +1 -1
- package/dist/components/index6.js +2 -2
- package/dist/components/index7.js +1 -1
- package/dist/components/index8.js +2 -2
- package/dist/components/index9.js +1 -1
- package/dist/components/utils.js +33 -4
- package/dist/components/utils.js.map +1 -1
- package/dist/components/z-accordion.js +1 -1
- package/dist/components/z-anchor-navigation.js +1 -1
- package/dist/components/z-app-header-deprecated.js +1 -1
- package/dist/components/z-app-header.js +2 -2
- 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-app.js +1 -1
- package/dist/components/z-book-card-deprecated.js +1 -1
- package/dist/components/z-breadcrumb.js +2 -2
- package/dist/components/z-button-sort.js +1 -1
- package/dist/components/z-color-picker.d.ts +11 -0
- package/dist/components/z-color-picker.js +234 -0
- package/dist/components/z-color-picker.js.map +1 -0
- package/dist/components/z-combobox.js +1 -1
- package/dist/components/z-cover-hero.js +2 -2
- package/dist/components/z-date-picker.js +1 -1
- package/dist/components/z-file.js +1 -1
- package/dist/components/z-info-box.js +1 -1
- package/dist/components/z-logo.js +1 -1
- package/dist/components/z-menu-deprecated.js +1 -1
- package/dist/components/z-menu-section-deprecated.js +1 -1
- package/dist/components/z-menu-section.js +1 -1
- package/dist/components/z-menu.js +1 -1
- 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 +2 -2
- package/dist/components/z-notification.js.map +1 -1
- package/dist/components/z-otp.js +2 -2
- package/dist/components/z-panel-elem.js +2 -2
- package/dist/components/z-range-picker.js +3 -3
- package/dist/components/z-section-title.js +1 -1
- package/dist/components/z-select.js +1 -1
- package/dist/components/z-skip-to-content.js +1 -1
- package/dist/components/z-stepper-item.js +1 -1
- package/dist/components/z-stepper.js +1 -1
- package/dist/components/z-table.js +1 -1
- package/dist/components/z-tbody.js +1 -1
- package/dist/components/z-td.js +1 -1
- package/dist/components/z-tfoot.js +1 -1
- package/dist/components/z-th.js +1 -1
- package/dist/components/z-thead.js +1 -1
- package/dist/components/z-toast-notification-list.js +1 -1
- package/dist/components/z-toast-notification.js +1 -1
- package/dist/components/z-toggle-button.js +2 -2
- package/dist/components/z-toggle-switch.js +3 -3
- package/dist/components/z-tool.d.ts +11 -0
- package/dist/components/z-tool.js +260 -0
- package/dist/components/z-tool.js.map +1 -0
- package/dist/components/z-toolbar.d.ts +11 -0
- package/dist/components/z-toolbar.js +165 -0
- package/dist/components/z-toolbar.js.map +1 -0
- package/dist/components/z-tooltip.js +1 -50
- package/dist/components/z-tooltip.js.map +1 -1
- package/dist/components/z-tr.js +1 -1
- package/dist/components/z-tree-list.js +1 -1
- package/dist/components/z-visually-hidden.js +1 -1
- package/dist/esm/iconset-d7823b13.js +1013 -0
- package/dist/esm/iconset-d7823b13.js.map +1 -0
- package/dist/esm/{index-2a6324f8.js → index-106473a8.js} +50 -2
- package/dist/esm/index-106473a8.js.map +1 -0
- package/dist/esm/{index-0bcacbd3.js → index-21176e80.js} +2 -2
- package/dist/esm/{index-0bcacbd3.js.map → index-21176e80.js.map} +1 -1
- package/dist/esm/{index-b64ced16.js → index-39a920c4.js} +3 -3
- package/dist/esm/{index-b64ced16.js.map → index-39a920c4.js.map} +1 -1
- package/dist/esm/{index-36122d8f.js → index-41934729.js} +2 -2
- package/dist/esm/{index-36122d8f.js.map → index-41934729.js.map} +1 -1
- package/dist/esm/{index-f20179ad.js → index-4845b32f.js} +3 -3
- package/dist/esm/{index-f20179ad.js.map → index-4845b32f.js.map} +1 -1
- package/dist/esm/{index-0ea3c7c8.js → index-599cd05a.js} +2 -2
- package/dist/esm/{index-0ea3c7c8.js.map → index-599cd05a.js.map} +1 -1
- package/dist/esm/index-c8ceadeb.js +14 -2
- package/dist/esm/{index-8a9f6d27.js → index-d003e5d7.js} +5 -5
- package/dist/esm/{index-8a9f6d27.js.map → index-d003e5d7.js.map} +1 -1
- package/dist/esm/index.js +3 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-e66d94c3.js → utils-1b64bcd9.js} +35 -6
- package/dist/esm/utils-1b64bcd9.js.map +1 -0
- package/dist/esm/{utils-227ef1c0.js → utils-93ac0e6c.js} +2 -2
- package/dist/esm/{utils-227ef1c0.js.map → utils-93ac0e6c.js.map} +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-accordion.entry.js +2 -2
- package/dist/esm/z-alert.entry.js +1 -1
- package/dist/esm/z-anchor-navigation.entry.js +2 -2
- package/dist/esm/z-app-header-deprecated.entry.js +2 -2
- package/dist/esm/z-app-header_12.entry.js +139 -1051
- 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-app.entry.js +2 -2
- package/dist/esm/z-book-card-deprecated.entry.js +3 -3
- package/dist/esm/z-book-card.entry.js +1 -1
- package/dist/esm/z-book-cover.entry.js +1 -1
- package/dist/esm/z-breadcrumb.entry.js +4 -4
- package/dist/esm/z-button-sort.entry.js +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-color-picker.entry.js +208 -0
- package/dist/esm/z-color-picker.entry.js.map +1 -0
- package/dist/esm/z-combobox.entry.js +3 -3
- package/dist/esm/z-cover-hero.entry.js +3 -3
- package/dist/esm/z-date-picker.entry.js +3 -3
- package/dist/esm/z-dragdrop-area_2.entry.js +7 -7
- package/dist/esm/z-file-upload.entry.js +1 -1
- package/dist/esm/z-file.entry.js +2 -2
- package/dist/esm/z-ghost-loading.entry.js +1 -1
- package/dist/esm/z-info-box.entry.js +1 -1
- package/dist/esm/z-info-reveal.entry.js +2 -2
- package/dist/esm/z-logo.entry.js +1 -1
- 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 +2 -2
- package/dist/esm/z-menu.entry.js +2 -2
- 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 +1 -1
- package/dist/esm/z-myz-card-footer.entry.js +2 -2
- package/dist/esm/z-myz-card-icon.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +3 -3
- package/dist/esm/z-myz-card-list.entry.js +1 -1
- package/dist/esm/z-myz-card_4.entry.js +5 -5
- package/dist/esm/z-myz-list-item.entry.js +3 -3
- package/dist/esm/z-myz-list.entry.js +1 -1
- package/dist/esm/z-navigation-tabs.entry.js +3 -3
- package/dist/esm/z-notification.entry.js +2 -2
- package/dist/esm/z-notification.entry.js.map +1 -1
- 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 +2 -2
- package/dist/esm/z-popover.entry.js +20 -16
- package/dist/esm/z-popover.entry.js.map +1 -1
- package/dist/esm/z-range-picker.entry.js +5 -5
- package/dist/esm/z-section-title.entry.js +2 -2
- package/dist/esm/z-select.entry.js +3 -3
- package/dist/esm/z-skip-to-content.entry.js +3 -3
- package/dist/esm/z-slideshow.entry.js +2 -2
- package/dist/esm/z-stepper-item.entry.js +1 -1
- package/dist/esm/z-stepper.entry.js +1 -1
- package/dist/esm/z-table.entry.js +9 -9
- package/dist/esm/z-tbody.entry.js +1 -1
- package/dist/esm/z-td.entry.js +2 -2
- package/dist/esm/z-tfoot.entry.js +1 -1
- package/dist/esm/z-th.entry.js +2 -2
- package/dist/esm/z-thead.entry.js +1 -1
- package/dist/esm/z-toast-notification-list.entry.js +2 -2
- package/dist/esm/z-toast-notification.entry.js +2 -2
- package/dist/esm/z-toggle-button.entry.js +2 -2
- package/dist/esm/z-toggle-switch.entry.js +5 -5
- package/dist/esm/z-tool.entry.js +206 -0
- package/dist/esm/z-tool.entry.js.map +1 -0
- package/dist/esm/z-toolbar.entry.js +144 -0
- package/dist/esm/z-toolbar.entry.js.map +1 -0
- package/dist/esm/z-tooltip.entry.js +4 -3
- package/dist/esm/z-tooltip.entry.js.map +1 -1
- package/dist/esm/z-tr.entry.js +5 -5
- package/dist/esm/z-tree-list.entry.js +2 -2
- package/dist/esm/z-visually-hidden.entry.js +1 -1
- package/dist/types/beans/index.d.ts +184 -0
- package/dist/types/components/z-app-header/index.stories.d.ts +16 -0
- package/dist/types/components/z-color-picker/index.d.ts +64 -0
- package/dist/types/components/z-color-picker/index.stories.d.ts +33 -0
- package/dist/types/components/z-icon/index.d.ts +19 -5
- package/dist/types/components/z-icon/index.stories.d.ts +23 -10
- package/dist/types/components/z-offcanvas/index.d.ts +24 -0
- package/dist/types/components/z-popover/index.d.ts +9 -4
- package/dist/types/components/z-searchbar/index.d.ts +4 -0
- package/dist/types/components/z-searchbar/index.stories.d.ts +2 -0
- package/dist/types/components/z-tool/index.d.ts +103 -0
- package/dist/types/components/z-tool/index.stories.d.ts +70 -0
- package/dist/types/components/z-toolbar/index.d.ts +46 -0
- package/dist/types/components/z-toolbar/index.stories.d.ts +52 -0
- package/dist/types/components/z-tooltip/index.d.ts +8 -0
- package/dist/types/components.d.ts +338 -19
- package/dist/types/constants/iconset.d.ts +281 -141
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +3 -2
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/index.esm.js.map +1 -1
- package/{www/build/p-5a24e268.entry.js → dist/web-components-library/p-03a558ef.entry.js} +2 -2
- package/dist/web-components-library/p-0989655c.entry.js +2 -0
- package/dist/web-components-library/p-0989655c.entry.js.map +1 -0
- package/dist/web-components-library/p-0a192ddf.entry.js +2 -0
- package/dist/web-components-library/p-0a192ddf.entry.js.map +1 -0
- package/dist/web-components-library/{p-460b2068.entry.js → p-15951fc6.entry.js} +2 -2
- package/dist/web-components-library/p-17e2fed2.entry.js +2 -0
- package/dist/web-components-library/{p-b7ec2cc4.entry.js → p-19172b2c.entry.js} +2 -2
- package/{www/build/p-94916bdf.entry.js → dist/web-components-library/p-1939116a.entry.js} +2 -2
- package/dist/web-components-library/p-1a0c206d.js +2 -0
- package/dist/web-components-library/p-1a0c206d.js.map +1 -0
- package/dist/web-components-library/{p-b71a3f69.entry.js → p-1e0d85d5.entry.js} +2 -2
- package/dist/web-components-library/{p-2ffdfbb1.entry.js → p-215b1fa5.entry.js} +2 -2
- package/dist/web-components-library/{p-99210133.entry.js → p-2501dd29.entry.js} +2 -2
- package/dist/web-components-library/p-2a04c00e.entry.js +2 -0
- package/{www/build/p-816fd6dc.entry.js.map → dist/web-components-library/p-2a04c00e.entry.js.map} +1 -1
- package/{www/build/p-1fd1cf02.entry.js → dist/web-components-library/p-2bba665d.entry.js} +2 -2
- package/dist/web-components-library/{p-5a1f98a2.entry.js → p-2f45f1ff.entry.js} +2 -2
- package/dist/web-components-library/{p-86160fe3.entry.js → p-332e0361.entry.js} +2 -2
- package/{www/build/p-4cec3345.entry.js → dist/web-components-library/p-3d02ad75.entry.js} +2 -2
- package/dist/web-components-library/{p-240de9aa.entry.js → p-3f66654f.entry.js} +2 -2
- package/{www/build/p-8c164e0d.entry.js → dist/web-components-library/p-41891d34.entry.js} +2 -2
- package/dist/web-components-library/{p-ceeb3e2a.entry.js → p-4df66afe.entry.js} +2 -2
- package/dist/web-components-library/{p-748fa3ae.js → p-54cd104c.js} +2 -2
- package/dist/web-components-library/{p-01f941c2.entry.js → p-57dcff49.entry.js} +2 -2
- package/{www/build/p-b96900bb.entry.js → dist/web-components-library/p-59baa7f5.entry.js} +2 -2
- package/dist/web-components-library/{p-4551b0df.entry.js → p-5cdd431e.entry.js} +2 -2
- package/dist/web-components-library/{p-f19f12b1.js → p-5f1e17cb.js} +2 -2
- package/{www/build/p-c778bf87.entry.js → dist/web-components-library/p-5fda8769.entry.js} +3 -3
- package/dist/web-components-library/{p-4affbb99.entry.js → p-661bce1c.entry.js} +2 -2
- package/dist/web-components-library/{p-ee695830.entry.js → p-66c0f993.entry.js} +2 -2
- package/dist/web-components-library/{p-e9e2ceb4.entry.js → p-684142d7.entry.js} +2 -2
- package/dist/web-components-library/p-6af67a60.entry.js +2 -0
- package/dist/web-components-library/p-6af67a60.entry.js.map +1 -0
- package/dist/web-components-library/p-6c3d141b.entry.js +2 -0
- package/dist/web-components-library/{p-22ba2a17.entry.js → p-6d11da08.entry.js} +2 -2
- package/dist/web-components-library/{p-b7b972c0.entry.js → p-6d61933f.entry.js} +2 -2
- package/dist/web-components-library/{p-dc086eb5.entry.js → p-6ef58a14.entry.js} +2 -2
- package/dist/web-components-library/{p-a905df88.entry.js → p-71f62226.entry.js} +2 -2
- package/dist/web-components-library/p-76003048.entry.js +2 -0
- package/dist/web-components-library/p-76003048.entry.js.map +1 -0
- package/dist/web-components-library/{p-0a49dd1c.entry.js → p-7b199026.entry.js} +2 -2
- package/dist/web-components-library/p-7d6c4b21.entry.js +2 -0
- package/dist/web-components-library/p-7d6c4b21.entry.js.map +1 -0
- package/dist/web-components-library/{p-d7f12672.js → p-80285500.js} +2 -2
- package/dist/web-components-library/{p-a2e87cec.entry.js → p-80ddecaf.entry.js} +2 -2
- package/dist/web-components-library/p-839e2478.entry.js +2 -0
- package/{www/build/p-daa1ffe9.entry.js → dist/web-components-library/p-84ed6163.entry.js} +2 -2
- package/dist/web-components-library/p-86618221.js +2 -0
- package/dist/web-components-library/p-86618221.js.map +1 -0
- package/dist/web-components-library/{p-757415e9.entry.js → p-88a9865c.entry.js} +2 -2
- package/{www/build/p-1844a4f4.entry.js → dist/web-components-library/p-8a53fefb.entry.js} +2 -2
- package/dist/web-components-library/{p-d6a7b7f3.entry.js → p-8b562dca.entry.js} +2 -2
- package/dist/web-components-library/{p-28534fb5.entry.js → p-90690d4d.entry.js} +2 -2
- package/dist/web-components-library/{p-307c9c33.entry.js → p-9a63ec80.entry.js} +2 -2
- package/dist/web-components-library/p-9af837bb.entry.js +2 -0
- package/dist/web-components-library/p-a32ebcc3.entry.js +2 -0
- package/dist/web-components-library/p-a7bb5e87.js +2 -0
- package/{www/build/p-030257b3.js.map → dist/web-components-library/p-a7bb5e87.js.map} +1 -1
- package/dist/web-components-library/p-b06af2fc.js +2 -0
- package/{www/build/p-817689d5.entry.js → dist/web-components-library/p-b1f2388a.entry.js} +3 -3
- package/{www/build/p-342b0eb0.entry.js → dist/web-components-library/p-b421424f.entry.js} +2 -2
- package/dist/web-components-library/{p-fb232d07.entry.js → p-b4b264b1.entry.js} +2 -2
- package/dist/web-components-library/{p-cc18a2b7.entry.js → p-b8211903.entry.js} +2 -2
- package/{www/build/p-b63c8e8b.entry.js → dist/web-components-library/p-b854cc3d.entry.js} +2 -2
- package/dist/web-components-library/{p-4a257653.entry.js → p-c03767a4.entry.js} +2 -2
- package/dist/web-components-library/{p-2bdac94e.entry.js → p-c0b4f29d.entry.js} +2 -2
- package/dist/web-components-library/{p-7a4f6a5b.entry.js → p-c57bb632.entry.js} +2 -2
- package/{www/build/p-3f5aa623.entry.js → dist/web-components-library/p-c5d52872.entry.js} +2 -2
- package/dist/web-components-library/p-c5d52872.entry.js.map +1 -0
- package/dist/web-components-library/p-c5e032de.entry.js +2 -0
- package/dist/web-components-library/p-c5e032de.entry.js.map +1 -0
- package/{www/build/p-028dd72a.entry.js → dist/web-components-library/p-c645dc11.entry.js} +2 -2
- package/dist/web-components-library/p-c93c6135.entry.js +2 -0
- package/dist/web-components-library/{p-deb7f8d7.entry.js.map → p-c93c6135.entry.js.map} +1 -1
- package/dist/web-components-library/{p-30e42fb1.js → p-cb395500.js} +2 -2
- package/dist/web-components-library/{p-5989465b.entry.js → p-cc87d814.entry.js} +2 -2
- package/dist/web-components-library/{p-1c7550f9.entry.js → p-d1a04722.entry.js} +2 -2
- package/{www/build/p-e3b82454.entry.js → dist/web-components-library/p-d1fe7960.entry.js} +2 -2
- package/dist/web-components-library/{p-863fd1c4.entry.js → p-d5ebbfdf.entry.js} +2 -2
- package/dist/web-components-library/p-d65aeb54.entry.js +2 -0
- package/dist/web-components-library/{p-2612e3a2.entry.js → p-daa442e6.entry.js} +2 -2
- package/dist/web-components-library/p-db2c3235.entry.js +2 -0
- package/dist/web-components-library/p-db2c3235.entry.js.map +1 -0
- package/dist/web-components-library/{p-e0b88075.entry.js → p-dba260f2.entry.js} +2 -2
- package/dist/web-components-library/{p-943db3a8.entry.js → p-ddae9016.entry.js} +2 -2
- package/dist/web-components-library/p-de313d96.entry.js +2 -0
- package/dist/web-components-library/{p-5c5882c6.entry.js → p-e38a5dd2.entry.js} +2 -2
- package/dist/web-components-library/p-eb15536d.js +2 -0
- package/dist/web-components-library/p-eb15536d.js.map +1 -0
- package/{www/build/p-f4bac89b.entry.js → dist/web-components-library/p-eb9161bc.entry.js} +2 -2
- package/dist/web-components-library/{p-f487290e.entry.js → p-f0f53bb2.entry.js} +2 -2
- package/dist/web-components-library/p-f79010de.js +2 -0
- package/{www/build/p-19f5b6a9.entry.js → dist/web-components-library/p-f9e41b2e.entry.js} +2 -2
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/dist/web-components-library/web-components-library.esm.js.map +1 -1
- package/package.json +1 -1
- package/react/components.d.ts +3 -0
- package/react/components.js +5 -2
- package/react/components.js.map +1 -1
- package/www/build/index.esm.js +1 -1
- package/www/build/index.esm.js.map +1 -1
- package/{dist/web-components-library/p-5a24e268.entry.js → www/build/p-03a558ef.entry.js} +2 -2
- package/www/build/p-0989655c.entry.js +2 -0
- package/www/build/p-0989655c.entry.js.map +1 -0
- package/www/build/p-0a192ddf.entry.js +2 -0
- package/www/build/p-0a192ddf.entry.js.map +1 -0
- package/www/build/{p-460b2068.entry.js → p-15951fc6.entry.js} +2 -2
- package/www/build/p-17e2fed2.entry.js +2 -0
- package/www/build/{p-b7ec2cc4.entry.js → p-19172b2c.entry.js} +2 -2
- package/{dist/web-components-library/p-94916bdf.entry.js → www/build/p-1939116a.entry.js} +2 -2
- package/www/build/p-1a0c206d.js +2 -0
- package/www/build/p-1a0c206d.js.map +1 -0
- package/www/build/{p-b71a3f69.entry.js → p-1e0d85d5.entry.js} +2 -2
- package/www/build/{p-2ffdfbb1.entry.js → p-215b1fa5.entry.js} +2 -2
- package/www/build/{p-99210133.entry.js → p-2501dd29.entry.js} +2 -2
- package/www/build/p-2a04c00e.entry.js +2 -0
- package/{dist/web-components-library/p-816fd6dc.entry.js.map → www/build/p-2a04c00e.entry.js.map} +1 -1
- package/{dist/web-components-library/p-1fd1cf02.entry.js → www/build/p-2bba665d.entry.js} +2 -2
- package/www/build/{p-5a1f98a2.entry.js → p-2f45f1ff.entry.js} +2 -2
- package/www/build/{p-86160fe3.entry.js → p-332e0361.entry.js} +2 -2
- package/www/build/p-385363df.js +2 -0
- package/{dist/web-components-library/p-4cec3345.entry.js → www/build/p-3d02ad75.entry.js} +2 -2
- package/www/build/{p-240de9aa.entry.js → p-3f66654f.entry.js} +2 -2
- package/{dist/web-components-library/p-8c164e0d.entry.js → www/build/p-41891d34.entry.js} +2 -2
- package/www/build/{p-ceeb3e2a.entry.js → p-4df66afe.entry.js} +2 -2
- package/www/build/{p-748fa3ae.js → p-54cd104c.js} +2 -2
- package/www/build/{p-01f941c2.entry.js → p-57dcff49.entry.js} +2 -2
- package/{dist/web-components-library/p-b96900bb.entry.js → www/build/p-59baa7f5.entry.js} +2 -2
- package/www/build/{p-4551b0df.entry.js → p-5cdd431e.entry.js} +2 -2
- package/www/build/{p-f19f12b1.js → p-5f1e17cb.js} +2 -2
- package/{dist/web-components-library/p-c778bf87.entry.js → www/build/p-5fda8769.entry.js} +3 -3
- package/www/build/{p-4affbb99.entry.js → p-661bce1c.entry.js} +2 -2
- package/www/build/{p-ee695830.entry.js → p-66c0f993.entry.js} +2 -2
- package/www/build/{p-e9e2ceb4.entry.js → p-684142d7.entry.js} +2 -2
- package/www/build/p-6af67a60.entry.js +2 -0
- package/www/build/p-6af67a60.entry.js.map +1 -0
- package/www/build/p-6c3d141b.entry.js +2 -0
- package/www/build/{p-22ba2a17.entry.js → p-6d11da08.entry.js} +2 -2
- package/www/build/{p-b7b972c0.entry.js → p-6d61933f.entry.js} +2 -2
- package/www/build/{p-dc086eb5.entry.js → p-6ef58a14.entry.js} +2 -2
- package/www/build/{p-a905df88.entry.js → p-71f62226.entry.js} +2 -2
- package/www/build/p-76003048.entry.js +2 -0
- package/www/build/p-76003048.entry.js.map +1 -0
- package/www/build/{p-0a49dd1c.entry.js → p-7b199026.entry.js} +2 -2
- package/www/build/p-7d6c4b21.entry.js +2 -0
- package/www/build/p-7d6c4b21.entry.js.map +1 -0
- package/www/build/{p-d7f12672.js → p-80285500.js} +2 -2
- package/www/build/{p-a2e87cec.entry.js → p-80ddecaf.entry.js} +2 -2
- package/www/build/p-839e2478.entry.js +2 -0
- package/{dist/web-components-library/p-daa1ffe9.entry.js → www/build/p-84ed6163.entry.js} +2 -2
- package/www/build/p-86618221.js +2 -0
- package/www/build/p-86618221.js.map +1 -0
- package/www/build/{p-757415e9.entry.js → p-88a9865c.entry.js} +2 -2
- package/{dist/web-components-library/p-1844a4f4.entry.js → www/build/p-8a53fefb.entry.js} +2 -2
- package/www/build/{p-d6a7b7f3.entry.js → p-8b562dca.entry.js} +2 -2
- package/www/build/{p-28534fb5.entry.js → p-90690d4d.entry.js} +2 -2
- package/www/build/{p-307c9c33.entry.js → p-9a63ec80.entry.js} +2 -2
- package/www/build/p-9af837bb.entry.js +2 -0
- package/www/build/p-a32ebcc3.entry.js +2 -0
- package/www/build/p-a7bb5e87.js +2 -0
- package/{dist/web-components-library/p-030257b3.js.map → www/build/p-a7bb5e87.js.map} +1 -1
- package/www/build/p-b06af2fc.js +2 -0
- package/{dist/web-components-library/p-817689d5.entry.js → www/build/p-b1f2388a.entry.js} +3 -3
- package/{dist/web-components-library/p-342b0eb0.entry.js → www/build/p-b421424f.entry.js} +2 -2
- package/www/build/{p-fb232d07.entry.js → p-b4b264b1.entry.js} +2 -2
- package/www/build/{p-cc18a2b7.entry.js → p-b8211903.entry.js} +2 -2
- package/{dist/web-components-library/p-b63c8e8b.entry.js → www/build/p-b854cc3d.entry.js} +2 -2
- package/www/build/{p-4a257653.entry.js → p-c03767a4.entry.js} +2 -2
- package/www/build/{p-2bdac94e.entry.js → p-c0b4f29d.entry.js} +2 -2
- package/www/build/{p-7a4f6a5b.entry.js → p-c57bb632.entry.js} +2 -2
- package/{dist/web-components-library/p-3f5aa623.entry.js → www/build/p-c5d52872.entry.js} +2 -2
- package/www/build/p-c5d52872.entry.js.map +1 -0
- package/www/build/p-c5e032de.entry.js +2 -0
- package/www/build/p-c5e032de.entry.js.map +1 -0
- package/{dist/web-components-library/p-028dd72a.entry.js → www/build/p-c645dc11.entry.js} +2 -2
- package/www/build/p-c93c6135.entry.js +2 -0
- package/www/build/{p-deb7f8d7.entry.js.map → p-c93c6135.entry.js.map} +1 -1
- package/www/build/{p-30e42fb1.js → p-cb395500.js} +2 -2
- package/www/build/{p-5989465b.entry.js → p-cc87d814.entry.js} +2 -2
- package/www/build/{p-1c7550f9.entry.js → p-d1a04722.entry.js} +2 -2
- package/{dist/web-components-library/p-e3b82454.entry.js → www/build/p-d1fe7960.entry.js} +2 -2
- package/www/build/{p-863fd1c4.entry.js → p-d5ebbfdf.entry.js} +2 -2
- package/www/build/p-d65aeb54.entry.js +2 -0
- package/www/build/{p-2612e3a2.entry.js → p-daa442e6.entry.js} +2 -2
- package/www/build/p-db2c3235.entry.js +2 -0
- package/www/build/p-db2c3235.entry.js.map +1 -0
- package/www/build/{p-e0b88075.entry.js → p-dba260f2.entry.js} +2 -2
- package/www/build/{p-943db3a8.entry.js → p-ddae9016.entry.js} +2 -2
- package/www/build/p-de313d96.entry.js +2 -0
- package/www/build/{p-5c5882c6.entry.js → p-e38a5dd2.entry.js} +2 -2
- package/www/build/p-eb15536d.js +2 -0
- package/www/build/p-eb15536d.js.map +1 -0
- package/{dist/web-components-library/p-f4bac89b.entry.js → www/build/p-eb9161bc.entry.js} +2 -2
- package/www/build/{p-f487290e.entry.js → p-f0f53bb2.entry.js} +2 -2
- package/www/build/p-f79010de.js +2 -0
- package/{dist/web-components-library/p-19f5b6a9.entry.js → www/build/p-f9e41b2e.entry.js} +2 -2
- package/www/build/web-components-library.esm.js +1 -1
- package/www/build/web-components-library.esm.js.map +1 -1
- package/www/index.html +1 -1
- package/dist/cjs/index-97a4c18d.js.map +0 -1
- package/dist/cjs/utils-5148245a.js.map +0 -1
- package/dist/esm/index-2a6324f8.js.map +0 -1
- package/dist/esm/utils-e66d94c3.js.map +0 -1
- package/dist/web-components-library/p-030257b3.js +0 -2
- package/dist/web-components-library/p-1170826b.js +0 -2
- package/dist/web-components-library/p-17af7fb2.js +0 -2
- package/dist/web-components-library/p-17af7fb2.js.map +0 -1
- package/dist/web-components-library/p-237fcaa9.entry.js +0 -2
- package/dist/web-components-library/p-334cba5d.entry.js +0 -2
- package/dist/web-components-library/p-334cba5d.entry.js.map +0 -1
- package/dist/web-components-library/p-33d2a5db.entry.js +0 -2
- package/dist/web-components-library/p-33d2a5db.entry.js.map +0 -1
- package/dist/web-components-library/p-3f5aa623.entry.js.map +0 -1
- package/dist/web-components-library/p-4c9bf42d.js +0 -2
- package/dist/web-components-library/p-6cffbabc.entry.js +0 -2
- package/dist/web-components-library/p-6cffbabc.entry.js.map +0 -1
- package/dist/web-components-library/p-75e47ecf.entry.js +0 -2
- package/dist/web-components-library/p-75e47ecf.entry.js.map +0 -1
- package/dist/web-components-library/p-816fd6dc.entry.js +0 -2
- package/dist/web-components-library/p-9e3da0b7.entry.js +0 -2
- package/dist/web-components-library/p-af5e8524.entry.js +0 -2
- package/dist/web-components-library/p-d2035d26.entry.js +0 -2
- package/dist/web-components-library/p-d75f8bbb.entry.js +0 -2
- package/dist/web-components-library/p-d90d2698.entry.js +0 -2
- package/dist/web-components-library/p-deb7f8d7.entry.js +0 -2
- package/dist/web-components-library/p-e5407cc1.entry.js +0 -2
- package/dist/web-components-library/p-e6778114.js +0 -2
- package/dist/web-components-library/p-e6778114.js.map +0 -1
- package/www/build/p-030257b3.js +0 -2
- package/www/build/p-1170826b.js +0 -2
- package/www/build/p-17af7fb2.js +0 -2
- package/www/build/p-17af7fb2.js.map +0 -1
- package/www/build/p-237fcaa9.entry.js +0 -2
- package/www/build/p-334cba5d.entry.js +0 -2
- package/www/build/p-334cba5d.entry.js.map +0 -1
- package/www/build/p-33d2a5db.entry.js +0 -2
- package/www/build/p-33d2a5db.entry.js.map +0 -1
- package/www/build/p-3f5aa623.entry.js.map +0 -1
- package/www/build/p-4c9bf42d.js +0 -2
- package/www/build/p-6cffbabc.entry.js +0 -2
- package/www/build/p-6cffbabc.entry.js.map +0 -1
- package/www/build/p-75e47ecf.entry.js +0 -2
- package/www/build/p-75e47ecf.entry.js.map +0 -1
- package/www/build/p-7646bea0.js +0 -2
- package/www/build/p-816fd6dc.entry.js +0 -2
- package/www/build/p-9e3da0b7.entry.js +0 -2
- package/www/build/p-af5e8524.entry.js +0 -2
- package/www/build/p-d2035d26.entry.js +0 -2
- package/www/build/p-d75f8bbb.entry.js +0 -2
- package/www/build/p-d90d2698.entry.js +0 -2
- package/www/build/p-deb7f8d7.entry.js +0 -2
- package/www/build/p-e5407cc1.entry.js +0 -2
- package/www/build/p-e6778114.js +0 -2
- package/www/build/p-e6778114.js.map +0 -1
- /package/dist/web-components-library/{p-5a24e268.entry.js.map → p-03a558ef.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-460b2068.entry.js.map → p-15951fc6.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-237fcaa9.entry.js.map → p-17e2fed2.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-b7ec2cc4.entry.js.map → p-19172b2c.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-94916bdf.entry.js.map → p-1939116a.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-b71a3f69.entry.js.map → p-1e0d85d5.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-2ffdfbb1.entry.js.map → p-215b1fa5.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-99210133.entry.js.map → p-2501dd29.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-1fd1cf02.entry.js.map → p-2bba665d.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-5a1f98a2.entry.js.map → p-2f45f1ff.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-86160fe3.entry.js.map → p-332e0361.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-4cec3345.entry.js.map → p-3d02ad75.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-240de9aa.entry.js.map → p-3f66654f.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-8c164e0d.entry.js.map → p-41891d34.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-ceeb3e2a.entry.js.map → p-4df66afe.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-748fa3ae.js.map → p-54cd104c.js.map} +0 -0
- /package/dist/web-components-library/{p-01f941c2.entry.js.map → p-57dcff49.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-b96900bb.entry.js.map → p-59baa7f5.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-4551b0df.entry.js.map → p-5cdd431e.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-f19f12b1.js.map → p-5f1e17cb.js.map} +0 -0
- /package/dist/web-components-library/{p-c778bf87.entry.js.map → p-5fda8769.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-4affbb99.entry.js.map → p-661bce1c.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-ee695830.entry.js.map → p-66c0f993.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-e9e2ceb4.entry.js.map → p-684142d7.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-9e3da0b7.entry.js.map → p-6c3d141b.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-22ba2a17.entry.js.map → p-6d11da08.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-b7b972c0.entry.js.map → p-6d61933f.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-dc086eb5.entry.js.map → p-6ef58a14.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-a905df88.entry.js.map → p-71f62226.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-0a49dd1c.entry.js.map → p-7b199026.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-d7f12672.js.map → p-80285500.js.map} +0 -0
- /package/dist/web-components-library/{p-a2e87cec.entry.js.map → p-80ddecaf.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-d2035d26.entry.js.map → p-839e2478.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-daa1ffe9.entry.js.map → p-84ed6163.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-757415e9.entry.js.map → p-88a9865c.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-1844a4f4.entry.js.map → p-8a53fefb.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-d6a7b7f3.entry.js.map → p-8b562dca.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-28534fb5.entry.js.map → p-90690d4d.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-307c9c33.entry.js.map → p-9a63ec80.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-d75f8bbb.entry.js.map → p-9af837bb.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-d90d2698.entry.js.map → p-a32ebcc3.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-4c9bf42d.js.map → p-b06af2fc.js.map} +0 -0
- /package/dist/web-components-library/{p-817689d5.entry.js.map → p-b1f2388a.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-342b0eb0.entry.js.map → p-b421424f.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-fb232d07.entry.js.map → p-b4b264b1.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-cc18a2b7.entry.js.map → p-b8211903.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-b63c8e8b.entry.js.map → p-b854cc3d.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-4a257653.entry.js.map → p-c03767a4.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-2bdac94e.entry.js.map → p-c0b4f29d.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-7a4f6a5b.entry.js.map → p-c57bb632.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-028dd72a.entry.js.map → p-c645dc11.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-30e42fb1.js.map → p-cb395500.js.map} +0 -0
- /package/dist/web-components-library/{p-5989465b.entry.js.map → p-cc87d814.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-1c7550f9.entry.js.map → p-d1a04722.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-e3b82454.entry.js.map → p-d1fe7960.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-863fd1c4.entry.js.map → p-d5ebbfdf.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-e5407cc1.entry.js.map → p-d65aeb54.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-2612e3a2.entry.js.map → p-daa442e6.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-e0b88075.entry.js.map → p-dba260f2.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-943db3a8.entry.js.map → p-ddae9016.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-af5e8524.entry.js.map → p-de313d96.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-5c5882c6.entry.js.map → p-e38a5dd2.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-f4bac89b.entry.js.map → p-eb9161bc.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-f487290e.entry.js.map → p-f0f53bb2.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-1170826b.js.map → p-f79010de.js.map} +0 -0
- /package/dist/web-components-library/{p-19f5b6a9.entry.js.map → p-f9e41b2e.entry.js.map} +0 -0
- /package/www/build/{p-5a24e268.entry.js.map → p-03a558ef.entry.js.map} +0 -0
- /package/www/build/{p-460b2068.entry.js.map → p-15951fc6.entry.js.map} +0 -0
- /package/www/build/{p-237fcaa9.entry.js.map → p-17e2fed2.entry.js.map} +0 -0
- /package/www/build/{p-b7ec2cc4.entry.js.map → p-19172b2c.entry.js.map} +0 -0
- /package/www/build/{p-94916bdf.entry.js.map → p-1939116a.entry.js.map} +0 -0
- /package/www/build/{p-b71a3f69.entry.js.map → p-1e0d85d5.entry.js.map} +0 -0
- /package/www/build/{p-2ffdfbb1.entry.js.map → p-215b1fa5.entry.js.map} +0 -0
- /package/www/build/{p-99210133.entry.js.map → p-2501dd29.entry.js.map} +0 -0
- /package/www/build/{p-1fd1cf02.entry.js.map → p-2bba665d.entry.js.map} +0 -0
- /package/www/build/{p-5a1f98a2.entry.js.map → p-2f45f1ff.entry.js.map} +0 -0
- /package/www/build/{p-86160fe3.entry.js.map → p-332e0361.entry.js.map} +0 -0
- /package/www/build/{p-4cec3345.entry.js.map → p-3d02ad75.entry.js.map} +0 -0
- /package/www/build/{p-240de9aa.entry.js.map → p-3f66654f.entry.js.map} +0 -0
- /package/www/build/{p-8c164e0d.entry.js.map → p-41891d34.entry.js.map} +0 -0
- /package/www/build/{p-ceeb3e2a.entry.js.map → p-4df66afe.entry.js.map} +0 -0
- /package/www/build/{p-748fa3ae.js.map → p-54cd104c.js.map} +0 -0
- /package/www/build/{p-01f941c2.entry.js.map → p-57dcff49.entry.js.map} +0 -0
- /package/www/build/{p-b96900bb.entry.js.map → p-59baa7f5.entry.js.map} +0 -0
- /package/www/build/{p-4551b0df.entry.js.map → p-5cdd431e.entry.js.map} +0 -0
- /package/www/build/{p-f19f12b1.js.map → p-5f1e17cb.js.map} +0 -0
- /package/www/build/{p-c778bf87.entry.js.map → p-5fda8769.entry.js.map} +0 -0
- /package/www/build/{p-4affbb99.entry.js.map → p-661bce1c.entry.js.map} +0 -0
- /package/www/build/{p-ee695830.entry.js.map → p-66c0f993.entry.js.map} +0 -0
- /package/www/build/{p-e9e2ceb4.entry.js.map → p-684142d7.entry.js.map} +0 -0
- /package/www/build/{p-9e3da0b7.entry.js.map → p-6c3d141b.entry.js.map} +0 -0
- /package/www/build/{p-22ba2a17.entry.js.map → p-6d11da08.entry.js.map} +0 -0
- /package/www/build/{p-b7b972c0.entry.js.map → p-6d61933f.entry.js.map} +0 -0
- /package/www/build/{p-dc086eb5.entry.js.map → p-6ef58a14.entry.js.map} +0 -0
- /package/www/build/{p-a905df88.entry.js.map → p-71f62226.entry.js.map} +0 -0
- /package/www/build/{p-0a49dd1c.entry.js.map → p-7b199026.entry.js.map} +0 -0
- /package/www/build/{p-d7f12672.js.map → p-80285500.js.map} +0 -0
- /package/www/build/{p-a2e87cec.entry.js.map → p-80ddecaf.entry.js.map} +0 -0
- /package/www/build/{p-d2035d26.entry.js.map → p-839e2478.entry.js.map} +0 -0
- /package/www/build/{p-daa1ffe9.entry.js.map → p-84ed6163.entry.js.map} +0 -0
- /package/www/build/{p-757415e9.entry.js.map → p-88a9865c.entry.js.map} +0 -0
- /package/www/build/{p-1844a4f4.entry.js.map → p-8a53fefb.entry.js.map} +0 -0
- /package/www/build/{p-d6a7b7f3.entry.js.map → p-8b562dca.entry.js.map} +0 -0
- /package/www/build/{p-28534fb5.entry.js.map → p-90690d4d.entry.js.map} +0 -0
- /package/www/build/{p-307c9c33.entry.js.map → p-9a63ec80.entry.js.map} +0 -0
- /package/www/build/{p-d75f8bbb.entry.js.map → p-9af837bb.entry.js.map} +0 -0
- /package/www/build/{p-d90d2698.entry.js.map → p-a32ebcc3.entry.js.map} +0 -0
- /package/www/build/{p-4c9bf42d.js.map → p-b06af2fc.js.map} +0 -0
- /package/www/build/{p-817689d5.entry.js.map → p-b1f2388a.entry.js.map} +0 -0
- /package/www/build/{p-342b0eb0.entry.js.map → p-b421424f.entry.js.map} +0 -0
- /package/www/build/{p-fb232d07.entry.js.map → p-b4b264b1.entry.js.map} +0 -0
- /package/www/build/{p-cc18a2b7.entry.js.map → p-b8211903.entry.js.map} +0 -0
- /package/www/build/{p-b63c8e8b.entry.js.map → p-b854cc3d.entry.js.map} +0 -0
- /package/www/build/{p-4a257653.entry.js.map → p-c03767a4.entry.js.map} +0 -0
- /package/www/build/{p-2bdac94e.entry.js.map → p-c0b4f29d.entry.js.map} +0 -0
- /package/www/build/{p-7a4f6a5b.entry.js.map → p-c57bb632.entry.js.map} +0 -0
- /package/www/build/{p-028dd72a.entry.js.map → p-c645dc11.entry.js.map} +0 -0
- /package/www/build/{p-30e42fb1.js.map → p-cb395500.js.map} +0 -0
- /package/www/build/{p-5989465b.entry.js.map → p-cc87d814.entry.js.map} +0 -0
- /package/www/build/{p-1c7550f9.entry.js.map → p-d1a04722.entry.js.map} +0 -0
- /package/www/build/{p-e3b82454.entry.js.map → p-d1fe7960.entry.js.map} +0 -0
- /package/www/build/{p-863fd1c4.entry.js.map → p-d5ebbfdf.entry.js.map} +0 -0
- /package/www/build/{p-e5407cc1.entry.js.map → p-d65aeb54.entry.js.map} +0 -0
- /package/www/build/{p-2612e3a2.entry.js.map → p-daa442e6.entry.js.map} +0 -0
- /package/www/build/{p-e0b88075.entry.js.map → p-dba260f2.entry.js.map} +0 -0
- /package/www/build/{p-943db3a8.entry.js.map → p-ddae9016.entry.js.map} +0 -0
- /package/www/build/{p-af5e8524.entry.js.map → p-de313d96.entry.js.map} +0 -0
- /package/www/build/{p-5c5882c6.entry.js.map → p-e38a5dd2.entry.js.map} +0 -0
- /package/www/build/{p-f4bac89b.entry.js.map → p-eb9161bc.entry.js.map} +0 -0
- /package/www/build/{p-f487290e.entry.js.map → p-f0f53bb2.entry.js.map} +0 -0
- /package/www/build/{p-1170826b.js.map → p-f79010de.js.map} +0 -0
- /package/www/build/{p-19f5b6a9.entry.js.map → p-f9e41b2e.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { OffCanvasVariant, TransitionDirection } from "../../beans";
|
|
2
|
+
import { KeyboardCode, OffCanvasVariant, TransitionDirection } from "../../beans";
|
|
3
3
|
/**
|
|
4
4
|
* @slot canvasContent - Slot for the offcanvas content.
|
|
5
5
|
* @cssprop --z-offcanvas--top-space - Top offset of the offcanvas, for `overlay` variant. Useful when there is some fixed element above the offcanvas. Default: `0`.
|
|
@@ -8,6 +8,8 @@ import { OffCanvasVariant, TransitionDirection } from "../../beans";
|
|
|
8
8
|
*/
|
|
9
9
|
export class ZOffcanvas {
|
|
10
10
|
constructor() {
|
|
11
|
+
this.allFocusableElements = [];
|
|
12
|
+
this.previouslyFocusedElement = null;
|
|
11
13
|
this.variant = OffCanvasVariant.PUSHCONTENT;
|
|
12
14
|
this.open = false;
|
|
13
15
|
this.transitiondirection = TransitionDirection.LEFT;
|
|
@@ -15,6 +17,65 @@ export class ZOffcanvas {
|
|
|
15
17
|
this.showBackdrop = true;
|
|
16
18
|
this.skipAnimation = false;
|
|
17
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Returns all focusable elements inside the offcanvas content.
|
|
22
|
+
* Elements are considered focusable if:
|
|
23
|
+
* - They are not disabled
|
|
24
|
+
* - They are visible in the layout
|
|
25
|
+
* - They have a non-negative tabIndex or an explicit tabindex="0"
|
|
26
|
+
*/
|
|
27
|
+
getFocusableElements() {
|
|
28
|
+
if (!this.canvasContent) {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
const all = Array.from(this.canvasContent.querySelectorAll("*"));
|
|
32
|
+
return all.filter((el) => {
|
|
33
|
+
const tabindex = el.getAttribute("tabindex");
|
|
34
|
+
const isDisabled = el.hasAttribute("disabled");
|
|
35
|
+
const isHidden = el.offsetParent === null;
|
|
36
|
+
return !isDisabled && !isHidden && (el.tabIndex >= 0 || tabindex === "0");
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Keeps keyboard navigation trapped inside the offcanvas when it is open.
|
|
41
|
+
* Implements circular tab navigation:
|
|
42
|
+
* - If Shift + Tab is pressed on the first focusable element, move focus to the last.
|
|
43
|
+
* - If Tab is pressed on the last focusable element, move focus to the first.
|
|
44
|
+
*/
|
|
45
|
+
trapFocus(event) {
|
|
46
|
+
if (!this.allFocusableElements.length) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const first = this.allFocusableElements[0];
|
|
50
|
+
const last = this.allFocusableElements[this.allFocusableElements.length - 1];
|
|
51
|
+
const active = document.activeElement;
|
|
52
|
+
if (event.shiftKey && active === first) {
|
|
53
|
+
event.preventDefault();
|
|
54
|
+
last.focus();
|
|
55
|
+
}
|
|
56
|
+
if (!event.shiftKey && active === last) {
|
|
57
|
+
event.preventDefault();
|
|
58
|
+
first.focus();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Handles keyboard interactions when the offcanvas is open.
|
|
63
|
+
* - Closes the offcanvas when the Escape key is pressed.
|
|
64
|
+
* - Traps focus inside the component when the Tab key is used.
|
|
65
|
+
*/
|
|
66
|
+
handleKeyDown(event) {
|
|
67
|
+
if (!this.open) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (event.key === KeyboardCode.ESC) {
|
|
71
|
+
event.preventDefault();
|
|
72
|
+
this.open = false;
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (event.key === KeyboardCode.TAB) {
|
|
76
|
+
this.trapFocus(event);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
18
79
|
/**
|
|
19
80
|
* Stop the event default behavior and propagation when the offcanvas is closed.
|
|
20
81
|
*/
|
|
@@ -35,18 +96,29 @@ export class ZOffcanvas {
|
|
|
35
96
|
document.body.style[overflow] = this.open ? "hidden" : "";
|
|
36
97
|
}
|
|
37
98
|
onOpenChanged() {
|
|
38
|
-
var _a;
|
|
99
|
+
var _a, _b, _c;
|
|
39
100
|
this.canvasOpenStatusChanged.emit(this.open);
|
|
40
|
-
if (
|
|
41
|
-
//
|
|
101
|
+
if (this.open) {
|
|
102
|
+
// Store the element that was focused before the offcanvas opens, this allows restoring the focus when the offcanvas closes.
|
|
103
|
+
this.previouslyFocusedElement = document.activeElement;
|
|
104
|
+
// Move focus inside the offcanvas once it is rendered.
|
|
105
|
+
if (this.allFocusableElements.length > 0) {
|
|
106
|
+
this.allFocusableElements[0].focus();
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
(_a = this.canvasContent) === null || _a === void 0 ? void 0 : _a.focus();
|
|
110
|
+
}
|
|
111
|
+
this.handlePageOverflow();
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
// Restore focus to the element that was focused before the offcanvas was opened.
|
|
115
|
+
(_b = this.previouslyFocusedElement) === null || _b === void 0 ? void 0 : _b.focus();
|
|
116
|
+
// When the offcanvas is closing, wait for the transitionend event before restoring the page overflow.
|
|
42
117
|
const listenerCallback = () => {
|
|
43
118
|
this.handlePageOverflow();
|
|
44
119
|
this.canvasContainer.removeEventListener("transitionend", listenerCallback);
|
|
45
120
|
};
|
|
46
|
-
(
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
this.handlePageOverflow();
|
|
121
|
+
(_c = this.canvasContainer) === null || _c === void 0 ? void 0 : _c.addEventListener("transitionend", listenerCallback);
|
|
50
122
|
}
|
|
51
123
|
}
|
|
52
124
|
componentWillLoad() {
|
|
@@ -59,6 +131,7 @@ export class ZOffcanvas {
|
|
|
59
131
|
}
|
|
60
132
|
componentDidRender() {
|
|
61
133
|
this.skipAnimation = false;
|
|
134
|
+
this.allFocusableElements = this.getFocusableElements();
|
|
62
135
|
}
|
|
63
136
|
connectedCallback() {
|
|
64
137
|
this.handlePageOverflow();
|
|
@@ -67,8 +140,8 @@ export class ZOffcanvas {
|
|
|
67
140
|
this.open = false;
|
|
68
141
|
}
|
|
69
142
|
render() {
|
|
70
|
-
return (h(Host, { key: '
|
|
71
|
-
this.showBackdrop && (h("div", { key: '
|
|
143
|
+
return (h(Host, { key: '8d7045110c92bf5ef1ef2f8d60ddaf1af55ace92', "skip-animation": this.skipAnimation, "aria-hidden": !this.open ? "true" : null }, h("div", { key: 'ef823ffd39a7f63aae8ef95333da611ec4485292', class: "canvas-container", role: "presentation", ref: (el) => (this.canvasContainer = el) }, h("div", { key: '7a6586d273275f1686fe0b1406d71e782d5d71c3', class: "canvas-content z-scrollbar", role: "presentation", ref: (el) => (this.canvasContent = el) }, h("slot", { key: '5930bb55687c9dd286828dc262c1f2cb18ebdd75', name: "canvasContent" }))), (this.variant == OffCanvasVariant.OVERLAY || this.transitiondirection === TransitionDirection.UP) &&
|
|
144
|
+
this.showBackdrop && (h("div", { key: 'a65de1a8b0e92e0520d410a88c98edfe5bb56100', class: "backdrop", onClick: () => (this.open = false) }))));
|
|
72
145
|
}
|
|
73
146
|
static get is() { return "z-offcanvas"; }
|
|
74
147
|
static get encapsulation() { return "scoped"; }
|
|
@@ -225,6 +298,12 @@ export class ZOffcanvas {
|
|
|
225
298
|
}
|
|
226
299
|
static get listeners() {
|
|
227
300
|
return [{
|
|
301
|
+
"name": "keydown",
|
|
302
|
+
"method": "handleKeyDown",
|
|
303
|
+
"target": "document",
|
|
304
|
+
"capture": false,
|
|
305
|
+
"passive": false
|
|
306
|
+
}, {
|
|
228
307
|
"name": "click",
|
|
229
308
|
"method": "stopEvent",
|
|
230
309
|
"target": undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-offcanvas/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,eAAe,CAAC;AAClG,OAAO,EAAC,gBAAgB,EAAE,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAElE;;;;;GAKG;AAOH,MAAM,OAAO,UAAU;;uBASQ,gBAAgB,CAAC,WAAW;oBAIlD,KAAK;mCAOgC,mBAAmB,CAAC,IAAI;iCAQhD,KAAK;4BAIV,IAAI;6BAQK,KAAK;;IAI7B;;OAEG;IAGH,SAAS,CAAC,KAAY;QACpB,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO;QACT,CAAC;QAED,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,KAAK,CAAC,eAAe,EAAE,CAAC;IAC1B,CAAC;IAED;;OAEG;IAEK,kBAAkB;QACxB,MAAM,QAAQ,GACZ,IAAI,CAAC,OAAO,KAAK,gBAAgB,CAAC,OAAO,IAAI,IAAI,CAAC,mBAAmB,KAAK,mBAAmB,CAAC,EAAE;YAC9F,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,YAAY,CAAC;QAEnB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5D,CAAC;IAGD,aAAa;;QACX,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE7C,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACf,2GAA2G;YAC3G,MAAM,gBAAgB,GAAG,GAAS,EAAE;gBAClC,IA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nB,4DACE,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,GAC7B,CACR,CACE,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Event, EventEmitter, h, Host, Listen, Prop, State, Watch} from \"@stencil/core\";\nimport {OffCanvasVariant, TransitionDirection} from \"../../beans\";\n\n/**\n * @slot canvasContent - Slot for the offcanvas content.\n * @cssprop --z-offcanvas--top-space - Top offset of the offcanvas, for `overlay` variant. Useful when there is some fixed element above the offcanvas. Default: `0`.\n * @cssprop --z-offcanvas--container-width - Width of the offcanvas for `left` and `right` direction. Default: `375px`.\n * @cssprop --z-offcanvas--container-height - Height of the offcanvas for `up` direction. Default: `90%`.\n */\n@Component({\n tag: \"z-offcanvas\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZOffcanvas {\n /**\n * Offcanvas variant.\n * - `overlay`: The offcanvas covers the page content putting an overlay.\n * - `pushcontent`: The offcanvas isn't absolutely positioned and \"pushes\" the page content.\n * > NB: `pushcontent` variant may need some extra style tuning of the context around the component to work properly.\n * Also, the `pushcontent` variant doesn't have the open/close transition.\n */\n @Prop({reflect: true})\n variant?: OffCanvasVariant = OffCanvasVariant.PUSHCONTENT;\n\n /** Whether the offcanvas is open. Default: false */\n @Prop({reflect: true, mutable: true})\n open = false;\n\n /**\n * Open the content transitioning to a specified direction.\n * The `up` direction always show the `overlay`, also when the variant is `pushcontent`.\n */\n @Prop({reflect: true})\n transitiondirection?: TransitionDirection = TransitionDirection.LEFT;\n\n /**\n * Skip the opening transition when the offcanvas is already open at the first render.\n * @deprecated This prop is not needed anymore, the component will automatically skip the transition\n * when it starts with `open` set to `true`. Only exists for Typescript backward compatibility.\n */\n @Prop()\n skipLoadAnimation = false;\n\n /** Whether to show the backdrop when the offcanvas is open. Default: true */\n @Prop()\n showBackdrop = true;\n\n /** emitted when `open` prop changes */\n @Event()\n canvasOpenStatusChanged: EventEmitter;\n\n /** Used to skip the opening transition when the offcanvas is already open at the first render. */\n @State()\n private skipAnimation = false;\n\n private canvasContainer: HTMLElement;\n\n /**\n * Stop the event default behavior and propagation when the offcanvas is closed.\n */\n @Listen(\"click\", {capture: true})\n @Listen(\"focusin\", {capture: true})\n stopEvent(event: Event): void {\n if (this.open) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n }\n\n /**\n * Hide the body overflow when the offcanvas is open.\n */\n @Watch(\"variant\")\n private handlePageOverflow(): void {\n const overflow =\n this.variant === OffCanvasVariant.OVERLAY || this.transitiondirection === TransitionDirection.UP\n ? \"overflow-y\"\n : \"overflow-x\";\n\n document.body.style[overflow] = this.open ? \"hidden\" : \"\";\n }\n\n @Watch(\"open\")\n onOpenChanged(): void {\n this.canvasOpenStatusChanged.emit(this.open);\n\n if (!this.open) {\n // when the offcanvas is closing, wait for the transitionend event to end before handling the body overflow\n const listenerCallback = (): void => {\n this.handlePageOverflow();\n this.canvasContainer.removeEventListener(\"transitionend\", listenerCallback);\n };\n\n this.canvasContainer?.addEventListener(\"transitionend\", listenerCallback);\n } else {\n this.handlePageOverflow();\n }\n }\n\n componentWillLoad(): void {\n if (this.open) {\n this.skipAnimation = true;\n }\n }\n\n componentDidLoad(): void {\n this.handlePageOverflow();\n }\n\n componentDidRender(): void {\n this.skipAnimation = false;\n }\n\n connectedCallback(): void {\n this.handlePageOverflow();\n }\n\n disconnectedCallback(): void {\n this.open = false;\n }\n\n render(): HTMLZOffcanvasElement {\n return (\n <Host\n skip-animation={this.skipAnimation}\n aria-hidden={!this.open ? \"true\" : null}\n >\n <div\n class=\"canvas-container\"\n role=\"presentation\"\n ref={(el) => (this.canvasContainer = el)}\n >\n <div\n class=\"canvas-content z-scrollbar\"\n role=\"presentation\"\n >\n <slot name=\"canvasContent\"></slot>\n </div>\n </div>\n {(this.variant == OffCanvasVariant.OVERLAY || this.transitiondirection === TransitionDirection.UP) &&\n this.showBackdrop && (\n <div\n class=\"backdrop\"\n onClick={() => (this.open = false)}\n ></div>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-offcanvas/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,eAAe,CAAC;AAClG,OAAO,EAAC,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAEhF;;;;;GAKG;AAOH,MAAM,OAAO,UAAU;;QA8Cb,yBAAoB,GAAkB,EAAE,CAAC;QAEzC,6BAAwB,GAAuB,IAAI,CAAC;uBAvC/B,gBAAgB,CAAC,WAAW;oBAIlD,KAAK;mCAOgC,mBAAmB,CAAC,IAAI;iCAQhD,KAAK;4BAIV,IAAI;6BAQK,KAAK;;IAU7B;;;;;;OAMG;IACK,oBAAoB;QAC1B,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACxB,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAc,GAAG,CAAC,CAAC,CAAC;QAE9E,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE;YACvB,MAAM,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;YAC7C,MAAM,UAAU,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;YAC/C,MAAM,QAAQ,GAAG,EA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IAAI,IAAI,CAAC,mBAAmB,KAAK,mBAAmB,CAAC,EAAE,CAAC;gBAChG,IAAI,CAAC,YAAY,IAAI,CACnB,4DACE,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,GAC7B,CACR,CACE,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Event, EventEmitter, h, Host, Listen, Prop, State, Watch} from \"@stencil/core\";\nimport {KeyboardCode, OffCanvasVariant, TransitionDirection} from \"../../beans\";\n\n/**\n * @slot canvasContent - Slot for the offcanvas content.\n * @cssprop --z-offcanvas--top-space - Top offset of the offcanvas, for `overlay` variant. Useful when there is some fixed element above the offcanvas. Default: `0`.\n * @cssprop --z-offcanvas--container-width - Width of the offcanvas for `left` and `right` direction. Default: `375px`.\n * @cssprop --z-offcanvas--container-height - Height of the offcanvas for `up` direction. Default: `90%`.\n */\n@Component({\n tag: \"z-offcanvas\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZOffcanvas {\n /**\n * Offcanvas variant.\n * - `overlay`: The offcanvas covers the page content putting an overlay.\n * - `pushcontent`: The offcanvas isn't absolutely positioned and \"pushes\" the page content.\n * > NB: `pushcontent` variant may need some extra style tuning of the context around the component to work properly.\n * Also, the `pushcontent` variant doesn't have the open/close transition.\n */\n @Prop({reflect: true})\n variant?: OffCanvasVariant = OffCanvasVariant.PUSHCONTENT;\n\n /** Whether the offcanvas is open. Default: false */\n @Prop({reflect: true, mutable: true})\n open = false;\n\n /**\n * Open the content transitioning to a specified direction.\n * The `up` direction always show the `overlay`, also when the variant is `pushcontent`.\n */\n @Prop({reflect: true})\n transitiondirection?: TransitionDirection = TransitionDirection.LEFT;\n\n /**\n * Skip the opening transition when the offcanvas is already open at the first render.\n * @deprecated This prop is not needed anymore, the component will automatically skip the transition\n * when it starts with `open` set to `true`. Only exists for Typescript backward compatibility.\n */\n @Prop()\n skipLoadAnimation = false;\n\n /** Whether to show the backdrop when the offcanvas is open. Default: true */\n @Prop()\n showBackdrop = true;\n\n /** emitted when `open` prop changes */\n @Event()\n canvasOpenStatusChanged: EventEmitter;\n\n /** Used to skip the opening transition when the offcanvas is already open at the first render. */\n @State()\n private skipAnimation = false;\n\n private canvasContainer: HTMLElement;\n\n private canvasContent: HTMLElement;\n\n private allFocusableElements: HTMLElement[] = [];\n\n private previouslyFocusedElement: HTMLElement | null = null;\n\n /**\n * Returns all focusable elements inside the offcanvas content.\n * Elements are considered focusable if:\n * - They are not disabled\n * - They are visible in the layout\n * - They have a non-negative tabIndex or an explicit tabindex=\"0\"\n */\n private getFocusableElements(): HTMLElement[] {\n if (!this.canvasContent) {\n return [];\n }\n\n const all = Array.from(this.canvasContent.querySelectorAll<HTMLElement>(\"*\"));\n\n return all.filter((el) => {\n const tabindex = el.getAttribute(\"tabindex\");\n const isDisabled = el.hasAttribute(\"disabled\");\n const isHidden = el.offsetParent === null;\n\n return !isDisabled && !isHidden && (el.tabIndex >= 0 || tabindex === \"0\");\n });\n }\n\n /**\n * Keeps keyboard navigation trapped inside the offcanvas when it is open.\n * Implements circular tab navigation:\n * - If Shift + Tab is pressed on the first focusable element, move focus to the last.\n * - If Tab is pressed on the last focusable element, move focus to the first.\n */\n private trapFocus(event: KeyboardEvent): void {\n if (!this.allFocusableElements.length) {\n return;\n }\n\n const first = this.allFocusableElements[0];\n const last = this.allFocusableElements[this.allFocusableElements.length - 1];\n const active = document.activeElement as HTMLElement;\n\n if (event.shiftKey && active === first) {\n event.preventDefault();\n last.focus();\n }\n\n if (!event.shiftKey && active === last) {\n event.preventDefault();\n first.focus();\n }\n }\n\n /**\n * Handles keyboard interactions when the offcanvas is open.\n * - Closes the offcanvas when the Escape key is pressed.\n * - Traps focus inside the component when the Tab key is used.\n */\n @Listen(\"keydown\", {target: \"document\"})\n handleKeyDown(event: KeyboardEvent): void {\n if (!this.open) {\n return;\n }\n\n if (event.key === KeyboardCode.ESC) {\n event.preventDefault();\n this.open = false;\n\n return;\n }\n\n if (event.key === KeyboardCode.TAB) {\n this.trapFocus(event);\n }\n }\n\n /**\n * Stop the event default behavior and propagation when the offcanvas is closed.\n */\n @Listen(\"click\", {capture: true})\n @Listen(\"focusin\", {capture: true})\n stopEvent(event: Event): void {\n if (this.open) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n }\n\n /**\n * Hide the body overflow when the offcanvas is open.\n */\n @Watch(\"variant\")\n private handlePageOverflow(): void {\n const overflow =\n this.variant === OffCanvasVariant.OVERLAY || this.transitiondirection === TransitionDirection.UP\n ? \"overflow-y\"\n : \"overflow-x\";\n\n document.body.style[overflow] = this.open ? \"hidden\" : \"\";\n }\n\n @Watch(\"open\")\n onOpenChanged(): void {\n this.canvasOpenStatusChanged.emit(this.open);\n\n if (this.open) {\n // Store the element that was focused before the offcanvas opens, this allows restoring the focus when the offcanvas closes.\n this.previouslyFocusedElement = document.activeElement as HTMLElement;\n\n // Move focus inside the offcanvas once it is rendered.\n if (this.allFocusableElements.length > 0) {\n this.allFocusableElements[0].focus();\n } else {\n this.canvasContent?.focus();\n }\n\n this.handlePageOverflow();\n } else {\n // Restore focus to the element that was focused before the offcanvas was opened.\n this.previouslyFocusedElement?.focus();\n\n // When the offcanvas is closing, wait for the transitionend event before restoring the page overflow.\n const listenerCallback = (): void => {\n this.handlePageOverflow();\n this.canvasContainer.removeEventListener(\"transitionend\", listenerCallback);\n };\n\n this.canvasContainer?.addEventListener(\"transitionend\", listenerCallback);\n }\n }\n\n componentWillLoad(): void {\n if (this.open) {\n this.skipAnimation = true;\n }\n }\n\n componentDidLoad(): void {\n this.handlePageOverflow();\n }\n\n componentDidRender(): void {\n this.skipAnimation = false;\n this.allFocusableElements = this.getFocusableElements();\n }\n\n connectedCallback(): void {\n this.handlePageOverflow();\n }\n\n disconnectedCallback(): void {\n this.open = false;\n }\n\n render(): HTMLZOffcanvasElement {\n return (\n <Host\n skip-animation={this.skipAnimation}\n aria-hidden={!this.open ? \"true\" : null}\n >\n <div\n class=\"canvas-container\"\n role=\"presentation\"\n ref={(el) => (this.canvasContainer = el)}\n >\n <div\n class=\"canvas-content z-scrollbar\"\n role=\"presentation\"\n ref={(el) => (this.canvasContent = el)}\n >\n <slot name=\"canvasContent\"></slot>\n </div>\n </div>\n {(this.variant == OffCanvasVariant.OVERLAY || this.transitiondirection === TransitionDirection.UP) &&\n this.showBackdrop && (\n <div\n class=\"backdrop\"\n onClick={() => (this.open = false)}\n ></div>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -16,12 +16,12 @@ export class ZPanelElem {
|
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
18
|
const elemId = this.elemid ? this.elemid : "";
|
|
19
|
-
return (h("div", { key: '
|
|
19
|
+
return (h("div", { key: '28f5d98850bf13270b4ddf9585722c39f87ee12e', class: "panel-elem-container" }, (this.imgurl || this.imgalt) && (h("div", { key: '065c198cfef6d982df79871d084454f425e0d57d', "aria-hidden": "true", class: "panel-elem-icon" }, h("img", { key: '5b42b99982e78dea89cf144a717e619b65904ab9', src: this.imgurl, alt: this.imgalt }))), h("div", { key: 'd15c0e008ca2f5172228217b5418d263a59af932', class: "panel-elem-link" }, h("a", { key: 'ca5a726f71b2dd8de6ddf1f32864bc2cdd823730', class: {
|
|
20
20
|
"z-link": true,
|
|
21
21
|
"z-link-disabled": this.isdisabled,
|
|
22
22
|
"z-link-icon": true,
|
|
23
23
|
"z-link-blue": true,
|
|
24
|
-
}, id: elemId + "link_id", href: this.url, target: this.target }, h("z-icon", { key: '
|
|
24
|
+
}, id: elemId + "link_id", href: this.url, target: this.target }, h("z-icon", { key: 'b8f07a80e9260bb0a142037d3f6a64a64acebafb', height: 14, width: 14, name: this.linkicon }), this.linklabel)), this.descrSlotName && (h("div", { key: '8d6524f5e8b70798cd846d4c99a2631161ae265d', class: "panel-elem-desc" }, h("slot", { key: 'b122e24bbb3ee418a393b348157f54fad3a6f1a9', name: this.descrSlotName })))));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "z-panel-elem"; }
|
|
27
27
|
static get encapsulation() { return "scoped"; }
|
|
@@ -28,6 +28,7 @@ export class ZPopover {
|
|
|
28
28
|
}
|
|
29
29
|
closePopoverWithKeyboard(e) {
|
|
30
30
|
if (this.closable && e.key === KeyboardCode.ESC) {
|
|
31
|
+
e.stopPropagation();
|
|
31
32
|
this.open = false;
|
|
32
33
|
}
|
|
33
34
|
}
|
|
@@ -258,7 +259,7 @@ export class ZPopover {
|
|
|
258
259
|
if (parent === element.ownerDocument.documentElement) {
|
|
259
260
|
return parent;
|
|
260
261
|
}
|
|
261
|
-
const style =
|
|
262
|
+
const style = getComputedStyle(parent);
|
|
262
263
|
const { overflow, overflowX, overflowY } = style;
|
|
263
264
|
const hasHiddenOverflow = overflow === "hidden" || overflowY === "hidden" || overflowX === "hidden";
|
|
264
265
|
const isScrollable = (parent.scrollHeight > parent.clientHeight && overflow !== "visible" && overflowY !== "visible") ||
|
|
@@ -360,11 +361,14 @@ export class ZPopover {
|
|
|
360
361
|
const boundElementWidth = this.boundElement.offsetWidth;
|
|
361
362
|
const boundElementHeight = this.boundElement.offsetHeight;
|
|
362
363
|
const offsetModifier = this.offsetModifier;
|
|
363
|
-
/**
|
|
364
|
+
/**
|
|
365
|
+
* Distance between the arrow center and the popover edge.
|
|
366
|
+
* Needed to align the center of the arrow with the center of the bound element when `showArrow` and `center` are enabled.
|
|
367
|
+
*/
|
|
364
368
|
const arrowModifier = this.showArrow && this.center ? 8 : 0;
|
|
365
369
|
const hostStyle = this.host.style;
|
|
366
|
-
/** Gap between the popover and the bound element. */
|
|
367
|
-
const distanceFromBound =
|
|
370
|
+
/** Gap between the popover and the bound element, set as margin in CSS. */
|
|
371
|
+
const distanceFromBound = parseFloat(getComputedStyle(this.host).marginTop.replace("px", "")) || 0;
|
|
368
372
|
const positionOffsets = this.computePositionOffsets();
|
|
369
373
|
/**
|
|
370
374
|
* Precomputed bases to reduce repeated arithmetic in the switch below.
|
|
@@ -381,7 +385,7 @@ export class ZPopover {
|
|
|
381
385
|
switch (position) {
|
|
382
386
|
case PopoverPosition.TOP:
|
|
383
387
|
case PopoverPosition.TOP_RIGHT:
|
|
384
|
-
hostStyle.bottom = `${bottomBase
|
|
388
|
+
hostStyle.bottom = `${bottomBase}px`;
|
|
385
389
|
hostStyle.left = `${leftBase - (position === PopoverPosition.TOP_RIGHT ? arrowModifier : 0)}px`;
|
|
386
390
|
maxHeight = availableSpace.top - distanceFromBound;
|
|
387
391
|
if (position === PopoverPosition.TOP_RIGHT) {
|
|
@@ -390,13 +394,13 @@ export class ZPopover {
|
|
|
390
394
|
break;
|
|
391
395
|
case PopoverPosition.TOP_LEFT:
|
|
392
396
|
hostStyle.right = `${rightBase - arrowModifier}px`;
|
|
393
|
-
hostStyle.bottom = `${bottomBase
|
|
397
|
+
hostStyle.bottom = `${bottomBase}px`;
|
|
394
398
|
maxWidth = availableSpace.left + boundElementWidth * offsetModifier;
|
|
395
399
|
maxHeight = availableSpace.top - distanceFromBound;
|
|
396
400
|
break;
|
|
397
401
|
case PopoverPosition.BOTTOM:
|
|
398
402
|
case PopoverPosition.BOTTOM_RIGHT:
|
|
399
|
-
hostStyle.top = `${topBase
|
|
403
|
+
hostStyle.top = `${topBase}px`;
|
|
400
404
|
hostStyle.left = `${leftBase - (position === PopoverPosition.BOTTOM_RIGHT ? arrowModifier : 0)}px`;
|
|
401
405
|
maxHeight = availableSpace.bottom - distanceFromBound;
|
|
402
406
|
if (position === PopoverPosition.BOTTOM_RIGHT) {
|
|
@@ -404,7 +408,7 @@ export class ZPopover {
|
|
|
404
408
|
}
|
|
405
409
|
break;
|
|
406
410
|
case PopoverPosition.BOTTOM_LEFT:
|
|
407
|
-
hostStyle.top = `${topBase
|
|
411
|
+
hostStyle.top = `${topBase}px`;
|
|
408
412
|
hostStyle.right = `${rightBase - arrowModifier}px`;
|
|
409
413
|
maxWidth = availableSpace.left + boundElementWidth * offsetModifier;
|
|
410
414
|
maxHeight = availableSpace.bottom - distanceFromBound;
|
|
@@ -412,7 +416,7 @@ export class ZPopover {
|
|
|
412
416
|
case PopoverPosition.RIGHT:
|
|
413
417
|
case PopoverPosition.RIGHT_BOTTOM:
|
|
414
418
|
hostStyle.top = `${sideTopBase - (position === PopoverPosition.RIGHT_BOTTOM ? arrowModifier : 0)}px`;
|
|
415
|
-
hostStyle.left = `${positionOffsets.left + boundElementWidth
|
|
419
|
+
hostStyle.left = `${positionOffsets.left + boundElementWidth}px`;
|
|
416
420
|
maxWidth = availableSpace.right - distanceFromBound;
|
|
417
421
|
if (position === PopoverPosition.RIGHT) {
|
|
418
422
|
maxHeight = availableSpace.top + availableSpace.bottom + boundElementHeight;
|
|
@@ -423,21 +427,21 @@ export class ZPopover {
|
|
|
423
427
|
break;
|
|
424
428
|
case PopoverPosition.RIGHT_TOP:
|
|
425
429
|
hostStyle.bottom = `${sideBottomBase - arrowModifier}px`;
|
|
426
|
-
hostStyle.left = `${positionOffsets.left + boundElementWidth
|
|
430
|
+
hostStyle.left = `${positionOffsets.left + boundElementWidth}px`;
|
|
427
431
|
maxWidth = availableSpace.right - distanceFromBound;
|
|
428
432
|
maxHeight = availableSpace.top + boundElementHeight * offsetModifier;
|
|
429
433
|
break;
|
|
430
434
|
case PopoverPosition.LEFT:
|
|
431
435
|
case PopoverPosition.LEFT_BOTTOM:
|
|
432
436
|
hostStyle.top = `${sideTopBase - (position === PopoverPosition.LEFT_BOTTOM ? arrowModifier : 0)}px`;
|
|
433
|
-
hostStyle.right = `${positionOffsets.right + boundElementWidth
|
|
437
|
+
hostStyle.right = `${positionOffsets.right + boundElementWidth}px`;
|
|
434
438
|
maxWidth = availableSpace.left - distanceFromBound;
|
|
435
439
|
if (position === PopoverPosition.LEFT_BOTTOM) {
|
|
436
440
|
maxHeight = availableSpace.bottom + boundElementHeight * offsetModifier;
|
|
437
441
|
}
|
|
438
442
|
break;
|
|
439
443
|
case PopoverPosition.LEFT_TOP:
|
|
440
|
-
hostStyle.right = `${positionOffsets.right + boundElementWidth
|
|
444
|
+
hostStyle.right = `${positionOffsets.right + boundElementWidth}px`;
|
|
441
445
|
hostStyle.bottom = `${sideBottomBase - arrowModifier}px`;
|
|
442
446
|
maxWidth = availableSpace.left - distanceFromBound;
|
|
443
447
|
maxHeight = availableSpace.top + boundElementHeight * offsetModifier;
|
|
@@ -493,7 +497,7 @@ export class ZPopover {
|
|
|
493
497
|
cancelAnimationFrame(this.animationFrameRequestId);
|
|
494
498
|
}
|
|
495
499
|
render() {
|
|
496
|
-
return (h(Host, { key: '
|
|
500
|
+
return (h(Host, { key: '83d24ed11a01f0ff29486a6c2e3a3716960d44a1', "current-position": this.currentPosition }, h("slot", { key: '7c048c564bc76ee6dda7df4dfb55eb80c5b5ebae' })));
|
|
497
501
|
}
|
|
498
502
|
static get is() { return "z-popover"; }
|
|
499
503
|
static get encapsulation() { return "shadow"; }
|
|
@@ -621,7 +625,7 @@ export class ZPopover {
|
|
|
621
625
|
"optional": false,
|
|
622
626
|
"docs": {
|
|
623
627
|
"tags": [],
|
|
624
|
-
"text": "
|
|
628
|
+
"text": "Whether the popover can be closed by clicking outside of it or pressing the escape key.\nOtherwise, it will be closed only programmatically (by setting `open` to `false`).\nDefault: `true`."
|
|
625
629
|
},
|
|
626
630
|
"attribute": "closable",
|
|
627
631
|
"reflect": false,
|
|
@@ -646,9 +650,15 @@ export class ZPopover {
|
|
|
646
650
|
"text": "Fired when the position changes."
|
|
647
651
|
},
|
|
648
652
|
"complexType": {
|
|
649
|
-
"original": "
|
|
650
|
-
"resolved": "
|
|
651
|
-
"references": {
|
|
653
|
+
"original": "{position: PopoverPosition}",
|
|
654
|
+
"resolved": "{ position: PopoverPosition; }",
|
|
655
|
+
"references": {
|
|
656
|
+
"PopoverPosition": {
|
|
657
|
+
"location": "import",
|
|
658
|
+
"path": "../../beans",
|
|
659
|
+
"id": "src/beans/index.tsx::PopoverPosition"
|
|
660
|
+
}
|
|
661
|
+
}
|
|
652
662
|
}
|
|
653
663
|
}, {
|
|
654
664
|
"method": "openChange",
|
|
@@ -658,11 +668,11 @@ export class ZPopover {
|
|
|
658
668
|
"composed": true,
|
|
659
669
|
"docs": {
|
|
660
670
|
"tags": [],
|
|
661
|
-
"text": "
|
|
671
|
+
"text": "Event emitted when the open state of the popover changes (e.g. when the user clicks outside the popover to close it, if `closable` is true)."
|
|
662
672
|
},
|
|
663
673
|
"complexType": {
|
|
664
|
-
"original": "
|
|
665
|
-
"resolved": "
|
|
674
|
+
"original": "{open: boolean}",
|
|
675
|
+
"resolved": "{ open: boolean; }",
|
|
666
676
|
"references": {}
|
|
667
677
|
}
|
|
668
678
|
}];
|
|
@@ -685,7 +695,7 @@ export class ZPopover {
|
|
|
685
695
|
"name": "keyup",
|
|
686
696
|
"method": "closePopoverWithKeyboard",
|
|
687
697
|
"target": "window",
|
|
688
|
-
"capture":
|
|
698
|
+
"capture": true,
|
|
689
699
|
"passive": false
|
|
690
700
|
}, {
|
|
691
701
|
"name": "click",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-popover/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,MAAM,EAAE,YAAY,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC;AAClE,OAAO,EACL,eAAe,EACf,2BAA2B,EAC3B,SAAS,EACT,gBAAgB,EAChB,2BAA2B,GAC5B,MAAM,mBAAmB,CAA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} from \"@stencil/core\";\nimport {Device, KeyboardCode, PopoverPosition} from \"../../beans\";\nimport {\n containsElement,\n findContainingBlockAncestor,\n getDevice,\n getParentElement,\n isElementVisibleInContainer,\n} from \"../../utils/utils\";\n\n/** Centering offset modifier. 0 for no offset, 0.5 for centering. */\ntype OffsetModifier = 0 | 0.5;\ntype Offsets = {top: number; right: number; bottom: number; left: number};\n\n/**\n * Popover component.\n * This component displays a popover bound to an element.\n * It supports various positions and can automatically adjust it based on available space, accounting for scrollable containers.\n *\n * Notes:\n * - If positioning has an odd behavior, consider manually adjusting the size of the slotted elements (using `width`, `height`, `max-width`, `max-height`, etc...) when its content is \"fluid\" (like text), because it can interfere with the position calculation (for example a long text on one single line can be bigger than the available space, letting the algorithm think the popover doesn't fits).\n *\n * @cssprop --z-popover-theme--surface - background color of the popover.\n * @cssprop --z-popover-theme--text - foreground color of the popover.\n * @cssprop --z-popover-padding - padding of the popover.\n * @cssprop --z-popover-shadow-filter - drop-shadow filter of the popover. Defaults to `drop-shadow(0 1px 2px var(--shadow-color-base))`.\n */\n@Component({\n tag: \"z-popover\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZPopover {\n /**\n * The preferred position to render the popover.\n * The popover will automatically search another position if not enough space is available for the preferred position.\n * If the preferred position is not available, it will try to find the best position starting from `TOP` and going clockwise.\n */\n @Prop({reflect: true, mutable: true})\n position?: PopoverPosition = PopoverPosition.TOP;\n\n /**\n * The initial open state of the popover.\n * Internal changes of this prop are emitted through the `openChange` event.\n * Make sure to listen to that event if you need the updated state of the popover from the outside, to avoid inconsistent values.\n */\n @Prop({reflect: true, mutable: true})\n open = false;\n\n /**\n * The selector or the element bound with the popover.\n * If string css selector is provided make sure to use a valid selector.\n */\n @Prop()\n bindTo?: string | HTMLElement;\n\n /** Whether to show popover's arrow. */\n @Prop({reflect: true})\n showArrow = false;\n\n /** Whether to center the popup on the main side (according to \"position\"). */\n @Prop({reflect: true})\n center = false;\n\n /**\n * If true, the popover can be closed by clicking outside of it or pressing the escape key.\n * Otherwise, it will be closed only programmatically (by setting `open` to `false`).\n */\n @Prop()\n closable = true;\n\n /**\n * The current position of the popover.\n * It differs from `position` only when calculated automatically for space reasons.\n */\n @State()\n currentPosition?: PopoverPosition;\n\n @Element() host: HTMLZPopoverElement;\n\n // Clockwise order of positions.\n private static readonly positionOrder: PopoverPosition[] = [\n PopoverPosition.TOP,\n PopoverPosition.TOP_RIGHT,\n PopoverPosition.TOP_LEFT,\n PopoverPosition.RIGHT,\n PopoverPosition.RIGHT_BOTTOM,\n PopoverPosition.RIGHT_TOP,\n PopoverPosition.BOTTOM,\n PopoverPosition.BOTTOM_LEFT,\n PopoverPosition.BOTTOM_RIGHT,\n PopoverPosition.LEFT,\n PopoverPosition.LEFT_TOP,\n PopoverPosition.LEFT_BOTTOM,\n ] as const;\n\n private animationFrameRequestId?: number;\n\n /** space tolerance for space calculations */\n private readonly spaceTolerance = 3;\n\n /** The element bound to the popover. */\n private boundElement?: HTMLElement;\n\n /** Cached available space around the bound element to avoid unnecessary recalculations */\n private cachedAvailableSpace?: Offsets;\n\n /** Last bounding rect of the bound element to detect changes and eventually invalidate the caches. */\n private lastBoundRect?: DOMRect;\n\n /** Fired when the position changes. */\n @Event()\n positionChange: EventEmitter;\n\n /** Open change event. */\n @Event()\n openChange: EventEmitter;\n\n @Listen(\"keyup\", {target: \"window\"})\n closePopoverWithKeyboard(e: KeyboardEvent): void {\n if (this.closable && e.key === KeyboardCode.ESC) {\n this.open = false;\n }\n }\n\n /**\n * Close the popover when clicking outside of its content.\n * Stop event propagation if the click was fired by popover's trigger element,\n * to prevent close and reopen glitches.\n */\n @Listen(\"click\", {target: \"body\", capture: true})\n handleOutsideClick(e: MouseEvent): void {\n const target = e.target as Element;\n if (!this.closable || !this.open || containsElement(this.host, target)) {\n return;\n }\n\n if (containsElement(this.boundElement, target)) {\n // stop propagation if the click was on the trigger element to prevent close and reopen glitches\n e.stopPropagation();\n }\n this.open = false;\n }\n\n @Watch(\"position\")\n validatePosition(newValue: PopoverPosition): void {\n if (!Object.values(PopoverPosition).includes(newValue as PopoverPosition) || newValue === PopoverPosition.AUTO) {\n newValue = PopoverPosition.TOP;\n this.position = newValue;\n }\n this.currentPosition = newValue;\n if (this.open) {\n this.setPosition();\n }\n }\n\n /** Setup popover behaviors when `open` changes. */\n @Watch(\"open\")\n onOpen(): void {\n cancelAnimationFrame(this.animationFrameRequestId);\n this.openChange.emit({open: this.open});\n if (!this.open) {\n Object.assign(this.host.style, {\n // Reset all positioning properties\n top: \"auto\",\n right: \"auto\",\n bottom: \"auto\",\n left: \"auto\",\n maxWidth: \"\",\n maxHeight: \"\",\n // Set initial visibility to hidden while calculating position...\n visibility: \"hidden\",\n });\n this.currentPosition = undefined;\n\n return;\n }\n\n const updatePositionLoop = (): void => {\n if (!this.open) {\n return;\n }\n\n this.setPosition();\n this.animationFrameRequestId = requestAnimationFrame(updatePositionLoop);\n };\n\n // call `setPosition` after a tick to ensure the DOM is ready and sizes are available\n setTimeout(() => {\n updatePositionLoop();\n }, 0);\n }\n\n @Watch(\"bindTo\")\n onBindingChange(): void {\n this.findBoundElement();\n }\n\n /** Returns the offset modifier to use in calculations to align the popover with the bound element. */\n private get offsetModifier(): OffsetModifier {\n return this.center ? 0.5 : 0;\n }\n\n private findBoundElement(): void {\n if (typeof this.bindTo === \"string\") {\n this.boundElement = this.host.ownerDocument.querySelector(this.bindTo) as HTMLElement;\n } else if (this.bindTo) {\n this.boundElement = this.bindTo;\n } else {\n this.boundElement = getParentElement(this.host) as HTMLElement;\n if (this.boundElement.tagName.toLowerCase() === \"z-tooltip\") {\n // If the popover is used inside a tooltip without a specified `bindTo`, bind it to the parent of the tooltip.\n this.boundElement = getParentElement(this.boundElement) as HTMLElement;\n }\n }\n }\n\n /**\n * Check if element has enough space to the right and left to be centered.\n * Used for `TOP` and `BOTTOM` position.\n * When `center` is not enabled, only one side needs to be checked and `RIGHT` is the default.\n */\n private hasCenteredHorizontalSpace(\n availableLeft: number,\n availableRight: number,\n hostWidth: number,\n boundElementWidth: number\n ): boolean {\n const requiredSideSpace = (hostWidth - boundElementWidth) * (1 - this.offsetModifier);\n\n if (!this.center) {\n return availableRight >= requiredSideSpace - this.spaceTolerance;\n }\n\n return (\n availableRight >= requiredSideSpace - this.spaceTolerance &&\n availableLeft >= requiredSideSpace - this.spaceTolerance\n );\n }\n\n /**\n * Check if element has enough space to the top and bottom to be centered.\n * Used for `RIGHT` and `LEFT` position.\n * When `center` is not enabled, only one side needs to be checked and `BOTTOM` is the default.\n */\n private hasCenteredVerticalSpace(\n availableTop: number,\n availableBottom: number,\n hostHeight: number,\n boundElementHeight: number\n ): boolean {\n const requiredSideSpace = (hostHeight - boundElementHeight) * (1 - this.offsetModifier);\n\n if (!this.center) {\n return availableBottom >= requiredSideSpace - this.spaceTolerance;\n }\n\n return (\n availableTop >= requiredSideSpace - this.spaceTolerance &&\n availableBottom >= requiredSideSpace - this.spaceTolerance\n );\n }\n\n /**\n * Check if there is enough space in the given direction to fit the popover.\n * Used for composed positions like TOP_RIGHT, LEFT_BOTTOM, etc.\n */\n private hasEnoughSideSpace(\n availableSpace: number,\n hostSize: number,\n boundElementSize: number,\n offsetModifier: OffsetModifier\n ): boolean {\n return availableSpace >= hostSize - boundElementSize * (1 - offsetModifier) - this.spaceTolerance;\n }\n\n /**\n * Given a desired position and available space around the bound element, returns the best position\n * that fits the popover, trying all positions if needed.\n * Takes into account offsetModifier for centering.\n * @param desiredPosition The desired position of the popover.\n * @param availableSpace The available space around the bound element.\n */\n private getOptimalPopoverPosition(desiredPosition: PopoverPosition, availableSpace: Offsets): PopoverPosition {\n const hostWidth = this.host.offsetWidth;\n const hostHeight = this.host.offsetHeight;\n const boundElementWidth = this.boundElement.getBoundingClientRect().width;\n const boundElementHeight = this.boundElement.getBoundingClientRect().height;\n const offsetModifier = this.offsetModifier;\n\n /** Check if there is enough space to fit the popover in the desired position */\n const fits = (pos: PopoverPosition): boolean => {\n switch (pos) {\n case PopoverPosition.TOP:\n return (\n availableSpace.top >= hostHeight - this.spaceTolerance &&\n this.hasCenteredHorizontalSpace(availableSpace.left, availableSpace.right, hostWidth, boundElementWidth)\n );\n case PopoverPosition.TOP_RIGHT:\n return (\n availableSpace.top >= hostHeight &&\n this.hasEnoughSideSpace(availableSpace.right, hostWidth, boundElementWidth, offsetModifier)\n );\n case PopoverPosition.TOP_LEFT:\n return (\n availableSpace.top >= hostHeight &&\n this.hasEnoughSideSpace(availableSpace.left, hostWidth, boundElementWidth, offsetModifier)\n );\n case PopoverPosition.RIGHT:\n return (\n availableSpace.right >= hostWidth &&\n this.hasCenteredVerticalSpace(availableSpace.top, availableSpace.bottom, hostHeight, boundElementHeight)\n );\n case PopoverPosition.RIGHT_BOTTOM:\n return (\n availableSpace.right >= hostWidth &&\n this.hasEnoughSideSpace(availableSpace.bottom, hostHeight, boundElementHeight, offsetModifier)\n );\n case PopoverPosition.RIGHT_TOP:\n return (\n availableSpace.right >= hostWidth &&\n this.hasEnoughSideSpace(availableSpace.top, hostHeight, boundElementHeight, offsetModifier)\n );\n case PopoverPosition.BOTTOM:\n return (\n availableSpace.bottom >= hostHeight &&\n this.hasCenteredHorizontalSpace(availableSpace.left, availableSpace.right, hostWidth, boundElementWidth)\n );\n case PopoverPosition.BOTTOM_LEFT:\n return (\n availableSpace.bottom >= hostHeight &&\n this.hasEnoughSideSpace(availableSpace.left, hostWidth, boundElementWidth, offsetModifier)\n );\n case PopoverPosition.BOTTOM_RIGHT:\n return (\n availableSpace.bottom >= hostHeight &&\n this.hasEnoughSideSpace(availableSpace.right, hostWidth, boundElementWidth, offsetModifier)\n );\n case PopoverPosition.LEFT:\n return (\n availableSpace.left >= hostWidth &&\n this.hasCenteredVerticalSpace(availableSpace.top, availableSpace.bottom, hostHeight, boundElementHeight)\n );\n case PopoverPosition.LEFT_TOP:\n return (\n availableSpace.left >= hostWidth &&\n this.hasEnoughSideSpace(availableSpace.top, hostHeight, boundElementHeight, offsetModifier)\n );\n case PopoverPosition.LEFT_BOTTOM:\n return (\n availableSpace.left >= hostWidth &&\n this.hasEnoughSideSpace(availableSpace.bottom, hostHeight, boundElementHeight, offsetModifier)\n );\n\n default:\n return false;\n }\n };\n\n // Check desired position first\n if (fits(desiredPosition)) {\n return desiredPosition;\n }\n\n // Find position index and create rotation starting from next position\n const positions = ZPopover.positionOrder;\n const startIndex = positions.indexOf(desiredPosition);\n\n if (startIndex === -1) {\n return desiredPosition; // fallback if position not found\n }\n\n // Try all other positions starting from the next one\n for (let i = 1; i < positions.length; i++) {\n const posIndex = (startIndex + i) % positions.length;\n const pos = positions[posIndex];\n if (fits(pos)) {\n return pos;\n }\n }\n\n return this.findBestFallbackPosition(availableSpace);\n }\n\n /** Find the best fallback position based on available space when no position fits perfectly. */\n private findBestFallbackPosition(availableSpace: Offsets): PopoverPosition {\n // Determine which horizontal and vertical direction has the most available space\n const bestHorizontalDirection =\n availableSpace.right >= availableSpace.left ? PopoverPosition.RIGHT : PopoverPosition.LEFT;\n\n const bestVerticalDirection =\n availableSpace.bottom >= availableSpace.top ? PopoverPosition.BOTTOM : PopoverPosition.TOP;\n\n // Choose the main direction based on which axis has more space overall\n const maxHorizontalSpace = Math.max(availableSpace.right, availableSpace.left);\n const maxVerticalSpace = Math.max(availableSpace.bottom, availableSpace.top);\n\n const mainDirection = maxVerticalSpace >= maxHorizontalSpace ? bestVerticalDirection : bestHorizontalDirection;\n\n // Decide if a secondary direction is needed\n // Only add a secondary direction if the difference between min and max in that axis is at least double\n let needsSecondaryDirection = false;\n\n if (mainDirection === bestVerticalDirection) {\n // If main direction is vertical, check horizontal space difference\n const minHorizontalSpace = Math.min(availableSpace.right, availableSpace.left);\n needsSecondaryDirection = maxHorizontalSpace >= minHorizontalSpace * 2;\n } else {\n // If main direction is horizontal, check vertical space difference\n const minVerticalSpace = Math.min(availableSpace.bottom, availableSpace.top);\n needsSecondaryDirection = maxVerticalSpace >= minVerticalSpace * 2;\n }\n\n if (!needsSecondaryDirection) {\n return mainDirection;\n }\n\n const secondaryDirection =\n mainDirection === bestVerticalDirection ? bestHorizontalDirection : bestVerticalDirection;\n\n // Return a combined position (e.g., \"bottom_right\")\n return `${mainDirection}_${secondaryDirection}` as PopoverPosition;\n }\n\n /**\n * Find the nearest scrollable ancestor of an element to take as a reference for positioning.\n * The ancestor is considered scrollable if it doesn't have `overflow` property set to `hidden` and its scroll size is bigger than its client size.\n */\n private findScrollableAncestor(element: HTMLElement): HTMLElement {\n let parent = getParentElement(element);\n\n while (parent) {\n if (parent === element.ownerDocument.documentElement) {\n return parent as HTMLElement;\n }\n\n const style = window.getComputedStyle(parent);\n const {overflow, overflowX, overflowY} = style;\n const hasHiddenOverflow = overflow === \"hidden\" || overflowY === \"hidden\" || overflowX === \"hidden\";\n const isScrollable =\n (parent.scrollHeight > parent.clientHeight && overflow !== \"visible\" && overflowY !== \"visible\") ||\n (parent.scrollWidth > parent.clientWidth && overflow !== \"visible\" && overflowX !== \"visible\");\n\n if (!hasHiddenOverflow && isScrollable) {\n return parent as HTMLElement;\n }\n\n parent = getParentElement(parent);\n }\n\n return element.ownerDocument.documentElement;\n }\n\n /**\n * Calculate available space around the element bound with the popover, based on its nearest scrollable ancestor.\n *\n * Calculations for `right` and `bottom` can be a little bit confusing because `boundingRect.right` and `bottom` may not be what you expect...\n * For more information see the explanation in the docs.\n * @link https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#return_value\n */\n private calculateAvailableSpace(): Offsets {\n const boundElementRect = this.boundElement.getBoundingClientRect();\n\n if (\n this.lastBoundRect &&\n this.lastBoundRect.x === boundElementRect.x &&\n this.lastBoundRect.y === boundElementRect.y &&\n this.lastBoundRect.width === boundElementRect.width &&\n this.lastBoundRect.height === boundElementRect.height &&\n this.cachedAvailableSpace\n ) {\n // If the bound element's rect hasn't changed, return the cached rect\n return this.cachedAvailableSpace;\n }\n\n this.lastBoundRect = boundElementRect;\n const scrollableAncestor = this.findScrollableAncestor(this.boundElement);\n const scrollableAncestorRect = scrollableAncestor.getBoundingClientRect();\n const isScrollableAncestorNested = scrollableAncestor !== this.boundElement.ownerDocument.documentElement;\n const documentWidth = this.boundElement.ownerDocument.documentElement.clientWidth;\n const documentHeight = this.boundElement.ownerDocument.documentElement.clientHeight;\n const safeSpace = 8; // extra space to avoid popover being too close to the edges\n\n // These deltas represent the offset between the scrollable ancestor and the viewport.\n // They are used to adjust the available space calculations when the scrollable ancestor is not the document or body,\n // to try to fit the popover inside the scrollable ancestor.\n const deltaTop = isScrollableAncestorNested ? scrollableAncestorRect.top : 0;\n const deltaRight = isScrollableAncestorNested ? documentWidth - scrollableAncestorRect.right : 0;\n const deltaBottom = isScrollableAncestorNested ? documentHeight - scrollableAncestorRect.bottom : 0;\n const deltaLeft = isScrollableAncestorNested ? scrollableAncestorRect.left : 0;\n\n this.cachedAvailableSpace = {\n top: boundElementRect.top - deltaTop - safeSpace,\n right: documentWidth - boundElementRect.right - deltaRight - safeSpace,\n bottom: documentHeight - boundElementRect.bottom - deltaBottom - safeSpace,\n left: boundElementRect.left - deltaLeft - safeSpace,\n };\n\n return this.cachedAvailableSpace;\n }\n\n /** Calculate the space around the bound element relative to the viewport. */\n private getBoundElementOffsets(): Offsets {\n const elementRect = this.boundElement.getBoundingClientRect();\n const documentWidth = this.boundElement.ownerDocument.documentElement.clientWidth;\n const documentHeight = this.boundElement.ownerDocument.documentElement.clientHeight;\n\n return {\n top: elementRect.top,\n right: documentWidth - elementRect.right,\n bottom: documentHeight - elementRect.bottom,\n left: elementRect.left,\n };\n }\n\n /** Compute positioning offsets in the appropriate coordinate space, accounting for transformed containing blocks and scroll. */\n private computePositionOffsets(): Offsets {\n const boundElementOffsets = this.getBoundElementOffsets();\n const containingBlockAncestor = findContainingBlockAncestor(this.host);\n const isDocumentElement = containingBlockAncestor === this.host.ownerDocument.documentElement;\n\n if (isDocumentElement) {\n return boundElementOffsets;\n }\n\n const containingBlockRect = containingBlockAncestor.getBoundingClientRect();\n const containingBlockStyle = getComputedStyle(containingBlockAncestor);\n /** Padding box of the containing block, accounting for borders. */\n const paddingBox = {\n top: containingBlockRect.top + parseFloat(containingBlockStyle.borderTopWidth),\n right: containingBlockRect.right - parseFloat(containingBlockStyle.borderRightWidth),\n bottom: containingBlockRect.bottom - parseFloat(containingBlockStyle.borderBottomWidth),\n left: containingBlockRect.left + parseFloat(containingBlockStyle.borderLeftWidth),\n };\n\n const boundElementRect = this.boundElement.getBoundingClientRect();\n /** Bound element offsets relative to the containing block padding box. */\n const relativeOffsets = {\n top: boundElementRect.top - paddingBox.top,\n right: paddingBox.right - boundElementRect.right,\n bottom: paddingBox.bottom - boundElementRect.bottom,\n left: boundElementRect.left - paddingBox.left,\n };\n\n /** Account for scroll to keep the popover aligned while the containing block scrolls. */\n return {\n top: relativeOffsets.top + containingBlockAncestor.scrollTop,\n right: relativeOffsets.right - containingBlockAncestor.scrollLeft,\n bottom: relativeOffsets.bottom - containingBlockAncestor.scrollTop,\n left: relativeOffsets.left + containingBlockAncestor.scrollLeft,\n };\n }\n\n /** Apply positioning styles based on `position` parameter. */\n private applyPositionStyles(position: PopoverPosition, availableSpace: Offsets): void {\n const boundElementWidth = this.boundElement.offsetWidth;\n const boundElementHeight = this.boundElement.offsetHeight;\n const offsetModifier = this.offsetModifier;\n /** Distance between the arrow center and the popover edge. Needed to align the center of the arrow with the center of the bound element when `showArrow` and `center` are enabled. */\n const arrowModifier = this.showArrow && this.center ? 8 : 0;\n const hostStyle = this.host.style;\n /** Gap between the popover and the bound element. */\n const distanceFromBound = parseInt(hostStyle.getPropertyValue(\"--space-unit\")) || 8;\n const positionOffsets = this.computePositionOffsets();\n\n /**\n * Precomputed bases to reduce repeated arithmetic in the switch below.\n * They represent the bound element edges plus optional centering offsets.\n */\n const leftBase = positionOffsets.left + boundElementWidth * offsetModifier;\n const rightBase = positionOffsets.right + boundElementWidth * offsetModifier;\n const topBase = positionOffsets.top + boundElementHeight;\n const bottomBase = positionOffsets.bottom + boundElementHeight;\n const sideTopBase = positionOffsets.top + boundElementHeight * offsetModifier;\n const sideBottomBase = positionOffsets.bottom + boundElementHeight * offsetModifier;\n\n let maxWidth: number;\n let maxHeight: number;\n\n switch (position) {\n case PopoverPosition.TOP:\n case PopoverPosition.TOP_RIGHT:\n hostStyle.bottom = `${bottomBase + distanceFromBound}px`;\n hostStyle.left = `${leftBase - (position === PopoverPosition.TOP_RIGHT ? arrowModifier : 0)}px`;\n maxHeight = availableSpace.top - distanceFromBound;\n if (position === PopoverPosition.TOP_RIGHT) {\n maxWidth = availableSpace.right + boundElementWidth * offsetModifier;\n }\n break;\n\n case PopoverPosition.TOP_LEFT:\n hostStyle.right = `${rightBase - arrowModifier}px`;\n hostStyle.bottom = `${bottomBase + distanceFromBound}px`;\n maxWidth = availableSpace.left + boundElementWidth * offsetModifier;\n maxHeight = availableSpace.top - distanceFromBound;\n break;\n\n case PopoverPosition.BOTTOM:\n case PopoverPosition.BOTTOM_RIGHT:\n hostStyle.top = `${topBase + distanceFromBound}px`;\n hostStyle.left = `${leftBase - (position === PopoverPosition.BOTTOM_RIGHT ? arrowModifier : 0)}px`;\n maxHeight = availableSpace.bottom - distanceFromBound;\n if (position === PopoverPosition.BOTTOM_RIGHT) {\n maxWidth = availableSpace.right + boundElementWidth * offsetModifier;\n }\n break;\n\n case PopoverPosition.BOTTOM_LEFT:\n hostStyle.top = `${topBase + distanceFromBound}px`;\n hostStyle.right = `${rightBase - arrowModifier}px`;\n maxWidth = availableSpace.left + boundElementWidth * offsetModifier;\n maxHeight = availableSpace.bottom - distanceFromBound;\n break;\n\n case PopoverPosition.RIGHT:\n case PopoverPosition.RIGHT_BOTTOM:\n hostStyle.top = `${sideTopBase - (position === PopoverPosition.RIGHT_BOTTOM ? arrowModifier : 0)}px`;\n hostStyle.left = `${positionOffsets.left + boundElementWidth + distanceFromBound}px`;\n maxWidth = availableSpace.right - distanceFromBound;\n if (position === PopoverPosition.RIGHT) {\n maxHeight = availableSpace.top + availableSpace.bottom + boundElementHeight;\n } else {\n maxHeight = availableSpace.bottom + boundElementHeight * offsetModifier;\n }\n break;\n\n case PopoverPosition.RIGHT_TOP:\n hostStyle.bottom = `${sideBottomBase - arrowModifier}px`;\n hostStyle.left = `${positionOffsets.left + boundElementWidth + distanceFromBound}px`;\n maxWidth = availableSpace.right - distanceFromBound;\n maxHeight = availableSpace.top + boundElementHeight * offsetModifier;\n break;\n\n case PopoverPosition.LEFT:\n case PopoverPosition.LEFT_BOTTOM:\n hostStyle.top = `${sideTopBase - (position === PopoverPosition.LEFT_BOTTOM ? arrowModifier : 0)}px`;\n hostStyle.right = `${positionOffsets.right + boundElementWidth + distanceFromBound}px`;\n maxWidth = availableSpace.left - distanceFromBound;\n if (position === PopoverPosition.LEFT_BOTTOM) {\n maxHeight = availableSpace.bottom + boundElementHeight * offsetModifier;\n }\n break;\n\n case PopoverPosition.LEFT_TOP:\n hostStyle.right = `${positionOffsets.right + boundElementWidth + distanceFromBound}px`;\n hostStyle.bottom = `${sideBottomBase - arrowModifier}px`;\n maxWidth = availableSpace.left - distanceFromBound;\n maxHeight = availableSpace.top + boundElementHeight * offsetModifier;\n break;\n }\n\n if (getDevice() !== Device.MOBILE) {\n // Only force max sizes on non-mobile viewports\n Object.assign(hostStyle, {\n maxWidth: maxWidth ? `${maxWidth}px` : \"\",\n maxHeight: maxHeight ? `${maxHeight}px` : \"\",\n });\n }\n }\n\n /** Set the position of the popover. */\n private setPosition(): void {\n if (!this.boundElement) {\n return;\n }\n\n if (!isElementVisibleInContainer(this.boundElement, this.findScrollableAncestor(this.boundElement))) {\n // If the bound element is not visible, hide the popover too\n this.open = false;\n\n return;\n }\n\n Object.assign(this.host.style, {\n // Reset all positioning properties\n top: \"auto\",\n right: \"auto\",\n bottom: \"auto\",\n left: \"auto\",\n maxWidth: \"\",\n maxHeight: \"\",\n // Set initial visibility to hidden while calculating position...\n visibility: \"hidden\",\n });\n\n const availableSpace = this.calculateAvailableSpace();\n const position = this.getOptimalPopoverPosition(this.position, availableSpace);\n\n this.applyPositionStyles(position, availableSpace);\n this.currentPosition = position;\n this.positionChange.emit({position: this.currentPosition});\n\n // ...then restore the visibility\n this.host.style.visibility = \"visible\";\n }\n\n componentWillLoad(): void {\n this.validatePosition(this.position);\n }\n\n componentDidLoad(): void {\n this.findBoundElement();\n if (this.open) {\n this.onOpen();\n }\n }\n\n disconnectedCallback(): void {\n cancelAnimationFrame(this.animationFrameRequestId);\n }\n\n render(): HTMLZPopoverElement {\n return (\n <Host current-position={this.currentPosition}>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-popover/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,MAAM,EAAE,YAAY,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC;AAClE,OAAO,EACL,eAAe,EACf,2BAA2B,EAC3B,SAAS,EACT,gBAAgB,EAChB,2BAA2B,GAC5B,MAAM,mBAAmB,CAAC;AAM3B;;;;;;;;;;;;GAYG;AAMH,MAAM,OAAO,QAAQ;;QAmEnB,6CAA6C;QAC5B,mBAAc,GAAG,CAAC,CAAC;wBA7DP,eAAe,CAAC,GAAG;oBAQzC,KAAK;;yBAWA,KAAK;sBAIR,KAAK;wBAQH,IAAI;;;IAkDf,wBAAwB,CAAC,CAAgB;QACvC,IAAI,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,KAAK,YAAY,CAAC,GAAG,EAAE,CAAC;YAChD,CAAC,CAAC,eAAe,EAAE,CAAC;YACpB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;QACpB,CAAC;IACH,CAAC;IAED;;;;OAIG;IAEH,kBAAkB,CAAC,CAAa;QAC9B,MAAM,MAAM,GAAG,CAAC,CAAC,MAAi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AI,yEAAmB,IAAI,CAAC,eAAe;YAC1C,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAjoBD,gCAAgC;AACR,sBAAa,GAAsB;IACzD,eAAe,CAAC,GAAG;IACnB,eAAe,CAAC,SAAS;IACzB,eAAe,CAAC,QAAQ;IACxB,eAAe,CAAC,KAAK;IACrB,eAAe,CAAC,YAAY;IAC5B,eAAe,CAAC,SAAS;IACzB,eAAe,CAAC,MAAM;IACtB,eAAe,CAAC,WAAW;IAC3B,eAAe,CAAC,YAAY;IAC5B,eAAe,CAAC,IAAI;IACpB,eAAe,CAAC,QAAQ;IACxB,eAAe,CAAC,WAAW;CACnB,AAb2B,CAa1B","sourcesContent":["import {Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h} from \"@stencil/core\";\nimport {Device, KeyboardCode, PopoverPosition} from \"../../beans\";\nimport {\n containsElement,\n findContainingBlockAncestor,\n getDevice,\n getParentElement,\n isElementVisibleInContainer,\n} from \"../../utils/utils\";\n\n/** Centering offset modifier. 0 for no offset, 0.5 for centering. */\ntype OffsetModifier = 0 | 0.5;\ntype Offsets = {top: number; right: number; bottom: number; left: number};\n\n/**\n * Popover component.\n * This component displays a popover bound to an element.\n * It supports various positions and can automatically adjust it based on available space, accounting for scrollable containers.\n *\n * Notes:\n * - If positioning has an odd behavior, consider manually adjusting the size of the slotted elements (using `width`, `height`, `max-width`, `max-height`, etc...) when its content is \"fluid\" (like text), because it can interfere with the position calculation (for example a long text on one single line can be bigger than the available space, letting the algorithm think the popover doesn't fits).\n *\n * @cssprop --z-popover-theme--surface - background color of the popover.\n * @cssprop --z-popover-theme--text - foreground color of the popover.\n * @cssprop --z-popover-padding - padding of the popover.\n * @cssprop --z-popover-shadow-filter - drop-shadow filter of the popover. Defaults to `drop-shadow(0 1px 2px var(--shadow-color-base))`.\n */\n@Component({\n tag: \"z-popover\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZPopover {\n /**\n * The preferred position to render the popover.\n * The popover will automatically search another position if not enough space is available for the preferred position.\n * If the preferred position is not available, it will try to find the best position starting from `TOP` and going clockwise.\n */\n @Prop({reflect: true, mutable: true})\n position?: PopoverPosition = PopoverPosition.TOP;\n\n /**\n * The initial open state of the popover.\n * Internal changes of this prop are emitted through the `openChange` event.\n * Make sure to listen to that event if you need the updated state of the popover from the outside, to avoid inconsistent values.\n */\n @Prop({reflect: true, mutable: true})\n open = false;\n\n /**\n * The selector or the element bound with the popover.\n * If string css selector is provided make sure to use a valid selector.\n */\n @Prop()\n bindTo?: string | HTMLElement;\n\n /** Whether to show popover's arrow. */\n @Prop({reflect: true})\n showArrow = false;\n\n /** Whether to center the popup on the main side (according to \"position\"). */\n @Prop({reflect: true})\n center = false;\n\n /**\n * Whether the popover can be closed by clicking outside of it or pressing the escape key.\n * Otherwise, it will be closed only programmatically (by setting `open` to `false`).\n * Default: `true`.\n */\n @Prop()\n closable = true;\n\n /**\n * The current position of the popover.\n * It differs from `position` only when calculated automatically for space reasons.\n */\n @State()\n currentPosition?: PopoverPosition;\n\n @Element() host: HTMLZPopoverElement;\n\n // Clockwise order of positions.\n private static readonly positionOrder: PopoverPosition[] = [\n PopoverPosition.TOP,\n PopoverPosition.TOP_RIGHT,\n PopoverPosition.TOP_LEFT,\n PopoverPosition.RIGHT,\n PopoverPosition.RIGHT_BOTTOM,\n PopoverPosition.RIGHT_TOP,\n PopoverPosition.BOTTOM,\n PopoverPosition.BOTTOM_LEFT,\n PopoverPosition.BOTTOM_RIGHT,\n PopoverPosition.LEFT,\n PopoverPosition.LEFT_TOP,\n PopoverPosition.LEFT_BOTTOM,\n ] as const;\n\n private animationFrameRequestId?: number;\n\n /** space tolerance for space calculations */\n private readonly spaceTolerance = 3;\n\n /** The element bound to the popover. */\n private boundElement?: HTMLElement;\n\n /** Cached available space around the bound element to avoid unnecessary recalculations */\n private cachedAvailableSpace?: Offsets;\n\n /** Last bounding rect of the bound element to detect changes and eventually invalidate the caches. */\n private lastBoundRect?: DOMRect;\n\n /** Fired when the position changes. */\n @Event()\n positionChange: EventEmitter<{position: PopoverPosition}>;\n\n /** Event emitted when the open state of the popover changes (e.g. when the user clicks outside the popover to close it, if `closable` is true). */\n @Event()\n openChange: EventEmitter<{open: boolean}>;\n\n @Listen(\"keyup\", {target: \"window\", capture: true})\n closePopoverWithKeyboard(e: KeyboardEvent): void {\n if (this.closable && e.key === KeyboardCode.ESC) {\n e.stopPropagation();\n this.open = false;\n }\n }\n\n /**\n * Close the popover when clicking outside of its content.\n * Stop event propagation if the click was fired by popover's trigger element,\n * to prevent close and reopen glitches.\n */\n @Listen(\"click\", {target: \"body\", capture: true})\n handleOutsideClick(e: MouseEvent): void {\n const target = e.target as Element;\n if (!this.closable || !this.open || containsElement(this.host, target)) {\n return;\n }\n\n if (containsElement(this.boundElement, target)) {\n // stop propagation if the click was on the trigger element to prevent close and reopen glitches\n e.stopPropagation();\n }\n this.open = false;\n }\n\n @Watch(\"position\")\n validatePosition(newValue: PopoverPosition): void {\n if (!Object.values(PopoverPosition).includes(newValue as PopoverPosition) || newValue === PopoverPosition.AUTO) {\n newValue = PopoverPosition.TOP;\n this.position = newValue;\n }\n this.currentPosition = newValue;\n if (this.open) {\n this.setPosition();\n }\n }\n\n /** Setup popover behaviors when `open` changes. */\n @Watch(\"open\")\n onOpen(): void {\n cancelAnimationFrame(this.animationFrameRequestId);\n this.openChange.emit({open: this.open});\n if (!this.open) {\n Object.assign(this.host.style, {\n // Reset all positioning properties\n top: \"auto\",\n right: \"auto\",\n bottom: \"auto\",\n left: \"auto\",\n maxWidth: \"\",\n maxHeight: \"\",\n // Set initial visibility to hidden while calculating position...\n visibility: \"hidden\",\n });\n this.currentPosition = undefined;\n\n return;\n }\n\n const updatePositionLoop = (): void => {\n if (!this.open) {\n return;\n }\n\n this.setPosition();\n this.animationFrameRequestId = requestAnimationFrame(updatePositionLoop);\n };\n\n // call `setPosition` after a tick to ensure the DOM is ready and sizes are available\n setTimeout(() => {\n updatePositionLoop();\n }, 0);\n }\n\n @Watch(\"bindTo\")\n onBindingChange(): void {\n this.findBoundElement();\n }\n\n /** Returns the offset modifier to use in calculations to align the popover with the bound element. */\n private get offsetModifier(): OffsetModifier {\n return this.center ? 0.5 : 0;\n }\n\n private findBoundElement(): void {\n if (typeof this.bindTo === \"string\") {\n this.boundElement = this.host.ownerDocument.querySelector(this.bindTo) as HTMLElement;\n } else if (this.bindTo) {\n this.boundElement = this.bindTo;\n } else {\n this.boundElement = getParentElement(this.host) as HTMLElement;\n if (this.boundElement.tagName.toLowerCase() === \"z-tooltip\") {\n // If the popover is used inside a tooltip without a specified `bindTo`, bind it to the parent of the tooltip.\n this.boundElement = getParentElement(this.boundElement) as HTMLElement;\n }\n }\n }\n\n /**\n * Check if element has enough space to the right and left to be centered.\n * Used for `TOP` and `BOTTOM` position.\n * When `center` is not enabled, only one side needs to be checked and `RIGHT` is the default.\n */\n private hasCenteredHorizontalSpace(\n availableLeft: number,\n availableRight: number,\n hostWidth: number,\n boundElementWidth: number\n ): boolean {\n const requiredSideSpace = (hostWidth - boundElementWidth) * (1 - this.offsetModifier);\n\n if (!this.center) {\n return availableRight >= requiredSideSpace - this.spaceTolerance;\n }\n\n return (\n availableRight >= requiredSideSpace - this.spaceTolerance &&\n availableLeft >= requiredSideSpace - this.spaceTolerance\n );\n }\n\n /**\n * Check if element has enough space to the top and bottom to be centered.\n * Used for `RIGHT` and `LEFT` position.\n * When `center` is not enabled, only one side needs to be checked and `BOTTOM` is the default.\n */\n private hasCenteredVerticalSpace(\n availableTop: number,\n availableBottom: number,\n hostHeight: number,\n boundElementHeight: number\n ): boolean {\n const requiredSideSpace = (hostHeight - boundElementHeight) * (1 - this.offsetModifier);\n\n if (!this.center) {\n return availableBottom >= requiredSideSpace - this.spaceTolerance;\n }\n\n return (\n availableTop >= requiredSideSpace - this.spaceTolerance &&\n availableBottom >= requiredSideSpace - this.spaceTolerance\n );\n }\n\n /**\n * Check if there is enough space in the given direction to fit the popover.\n * Used for composed positions like TOP_RIGHT, LEFT_BOTTOM, etc.\n */\n private hasEnoughSideSpace(\n availableSpace: number,\n hostSize: number,\n boundElementSize: number,\n offsetModifier: OffsetModifier\n ): boolean {\n return availableSpace >= hostSize - boundElementSize * (1 - offsetModifier) - this.spaceTolerance;\n }\n\n /**\n * Given a desired position and available space around the bound element, returns the best position\n * that fits the popover, trying all positions if needed.\n * Takes into account offsetModifier for centering.\n * @param desiredPosition The desired position of the popover.\n * @param availableSpace The available space around the bound element.\n */\n private getOptimalPopoverPosition(desiredPosition: PopoverPosition, availableSpace: Offsets): PopoverPosition {\n const hostWidth = this.host.offsetWidth;\n const hostHeight = this.host.offsetHeight;\n const boundElementWidth = this.boundElement.getBoundingClientRect().width;\n const boundElementHeight = this.boundElement.getBoundingClientRect().height;\n const offsetModifier = this.offsetModifier;\n\n /** Check if there is enough space to fit the popover in the desired position */\n const fits = (pos: PopoverPosition): boolean => {\n switch (pos) {\n case PopoverPosition.TOP:\n return (\n availableSpace.top >= hostHeight - this.spaceTolerance &&\n this.hasCenteredHorizontalSpace(availableSpace.left, availableSpace.right, hostWidth, boundElementWidth)\n );\n case PopoverPosition.TOP_RIGHT:\n return (\n availableSpace.top >= hostHeight &&\n this.hasEnoughSideSpace(availableSpace.right, hostWidth, boundElementWidth, offsetModifier)\n );\n case PopoverPosition.TOP_LEFT:\n return (\n availableSpace.top >= hostHeight &&\n this.hasEnoughSideSpace(availableSpace.left, hostWidth, boundElementWidth, offsetModifier)\n );\n case PopoverPosition.RIGHT:\n return (\n availableSpace.right >= hostWidth &&\n this.hasCenteredVerticalSpace(availableSpace.top, availableSpace.bottom, hostHeight, boundElementHeight)\n );\n case PopoverPosition.RIGHT_BOTTOM:\n return (\n availableSpace.right >= hostWidth &&\n this.hasEnoughSideSpace(availableSpace.bottom, hostHeight, boundElementHeight, offsetModifier)\n );\n case PopoverPosition.RIGHT_TOP:\n return (\n availableSpace.right >= hostWidth &&\n this.hasEnoughSideSpace(availableSpace.top, hostHeight, boundElementHeight, offsetModifier)\n );\n case PopoverPosition.BOTTOM:\n return (\n availableSpace.bottom >= hostHeight &&\n this.hasCenteredHorizontalSpace(availableSpace.left, availableSpace.right, hostWidth, boundElementWidth)\n );\n case PopoverPosition.BOTTOM_LEFT:\n return (\n availableSpace.bottom >= hostHeight &&\n this.hasEnoughSideSpace(availableSpace.left, hostWidth, boundElementWidth, offsetModifier)\n );\n case PopoverPosition.BOTTOM_RIGHT:\n return (\n availableSpace.bottom >= hostHeight &&\n this.hasEnoughSideSpace(availableSpace.right, hostWidth, boundElementWidth, offsetModifier)\n );\n case PopoverPosition.LEFT:\n return (\n availableSpace.left >= hostWidth &&\n this.hasCenteredVerticalSpace(availableSpace.top, availableSpace.bottom, hostHeight, boundElementHeight)\n );\n case PopoverPosition.LEFT_TOP:\n return (\n availableSpace.left >= hostWidth &&\n this.hasEnoughSideSpace(availableSpace.top, hostHeight, boundElementHeight, offsetModifier)\n );\n case PopoverPosition.LEFT_BOTTOM:\n return (\n availableSpace.left >= hostWidth &&\n this.hasEnoughSideSpace(availableSpace.bottom, hostHeight, boundElementHeight, offsetModifier)\n );\n\n default:\n return false;\n }\n };\n\n // Check desired position first\n if (fits(desiredPosition)) {\n return desiredPosition;\n }\n\n // Find position index and create rotation starting from next position\n const positions = ZPopover.positionOrder;\n const startIndex = positions.indexOf(desiredPosition);\n\n if (startIndex === -1) {\n return desiredPosition; // fallback if position not found\n }\n\n // Try all other positions starting from the next one\n for (let i = 1; i < positions.length; i++) {\n const posIndex = (startIndex + i) % positions.length;\n const pos = positions[posIndex];\n if (fits(pos)) {\n return pos;\n }\n }\n\n return this.findBestFallbackPosition(availableSpace);\n }\n\n /** Find the best fallback position based on available space when no position fits perfectly. */\n private findBestFallbackPosition(availableSpace: Offsets): PopoverPosition {\n // Determine which horizontal and vertical direction has the most available space\n const bestHorizontalDirection =\n availableSpace.right >= availableSpace.left ? PopoverPosition.RIGHT : PopoverPosition.LEFT;\n\n const bestVerticalDirection =\n availableSpace.bottom >= availableSpace.top ? PopoverPosition.BOTTOM : PopoverPosition.TOP;\n\n // Choose the main direction based on which axis has more space overall\n const maxHorizontalSpace = Math.max(availableSpace.right, availableSpace.left);\n const maxVerticalSpace = Math.max(availableSpace.bottom, availableSpace.top);\n\n const mainDirection = maxVerticalSpace >= maxHorizontalSpace ? bestVerticalDirection : bestHorizontalDirection;\n\n // Decide if a secondary direction is needed\n // Only add a secondary direction if the difference between min and max in that axis is at least double\n let needsSecondaryDirection = false;\n\n if (mainDirection === bestVerticalDirection) {\n // If main direction is vertical, check horizontal space difference\n const minHorizontalSpace = Math.min(availableSpace.right, availableSpace.left);\n needsSecondaryDirection = maxHorizontalSpace >= minHorizontalSpace * 2;\n } else {\n // If main direction is horizontal, check vertical space difference\n const minVerticalSpace = Math.min(availableSpace.bottom, availableSpace.top);\n needsSecondaryDirection = maxVerticalSpace >= minVerticalSpace * 2;\n }\n\n if (!needsSecondaryDirection) {\n return mainDirection;\n }\n\n const secondaryDirection =\n mainDirection === bestVerticalDirection ? bestHorizontalDirection : bestVerticalDirection;\n\n // Return a combined position (e.g., \"bottom_right\")\n return `${mainDirection}_${secondaryDirection}` as PopoverPosition;\n }\n\n /**\n * Find the nearest scrollable ancestor of an element to take as a reference for positioning.\n * The ancestor is considered scrollable if it doesn't have `overflow` property set to `hidden` and its scroll size is bigger than its client size.\n */\n private findScrollableAncestor(element: HTMLElement): HTMLElement {\n let parent = getParentElement(element);\n\n while (parent) {\n if (parent === element.ownerDocument.documentElement) {\n return parent as HTMLElement;\n }\n\n const style = getComputedStyle(parent);\n const {overflow, overflowX, overflowY} = style;\n const hasHiddenOverflow = overflow === \"hidden\" || overflowY === \"hidden\" || overflowX === \"hidden\";\n const isScrollable =\n (parent.scrollHeight > parent.clientHeight && overflow !== \"visible\" && overflowY !== \"visible\") ||\n (parent.scrollWidth > parent.clientWidth && overflow !== \"visible\" && overflowX !== \"visible\");\n\n if (!hasHiddenOverflow && isScrollable) {\n return parent as HTMLElement;\n }\n\n parent = getParentElement(parent);\n }\n\n return element.ownerDocument.documentElement;\n }\n\n /**\n * Calculate available space around the element bound with the popover, based on its nearest scrollable ancestor.\n *\n * Calculations for `right` and `bottom` can be a little bit confusing because `boundingRect.right` and `bottom` may not be what you expect...\n * For more information see the explanation in the docs.\n * @link https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#return_value\n */\n private calculateAvailableSpace(): Offsets {\n const boundElementRect = this.boundElement.getBoundingClientRect();\n\n if (\n this.lastBoundRect &&\n this.lastBoundRect.x === boundElementRect.x &&\n this.lastBoundRect.y === boundElementRect.y &&\n this.lastBoundRect.width === boundElementRect.width &&\n this.lastBoundRect.height === boundElementRect.height &&\n this.cachedAvailableSpace\n ) {\n // If the bound element's rect hasn't changed, return the cached rect\n return this.cachedAvailableSpace;\n }\n\n this.lastBoundRect = boundElementRect;\n const scrollableAncestor = this.findScrollableAncestor(this.boundElement);\n const scrollableAncestorRect = scrollableAncestor.getBoundingClientRect();\n const isScrollableAncestorNested = scrollableAncestor !== this.boundElement.ownerDocument.documentElement;\n const documentWidth = this.boundElement.ownerDocument.documentElement.clientWidth;\n const documentHeight = this.boundElement.ownerDocument.documentElement.clientHeight;\n const safeSpace = 8; // extra space to avoid popover being too close to the edges\n\n // These deltas represent the offset between the scrollable ancestor and the viewport.\n // They are used to adjust the available space calculations when the scrollable ancestor is not the document or body,\n // to try to fit the popover inside the scrollable ancestor.\n const deltaTop = isScrollableAncestorNested ? scrollableAncestorRect.top : 0;\n const deltaRight = isScrollableAncestorNested ? documentWidth - scrollableAncestorRect.right : 0;\n const deltaBottom = isScrollableAncestorNested ? documentHeight - scrollableAncestorRect.bottom : 0;\n const deltaLeft = isScrollableAncestorNested ? scrollableAncestorRect.left : 0;\n\n this.cachedAvailableSpace = {\n top: boundElementRect.top - deltaTop - safeSpace,\n right: documentWidth - boundElementRect.right - deltaRight - safeSpace,\n bottom: documentHeight - boundElementRect.bottom - deltaBottom - safeSpace,\n left: boundElementRect.left - deltaLeft - safeSpace,\n };\n\n return this.cachedAvailableSpace;\n }\n\n /** Calculate the space around the bound element relative to the viewport. */\n private getBoundElementOffsets(): Offsets {\n const elementRect = this.boundElement.getBoundingClientRect();\n const documentWidth = this.boundElement.ownerDocument.documentElement.clientWidth;\n const documentHeight = this.boundElement.ownerDocument.documentElement.clientHeight;\n\n return {\n top: elementRect.top,\n right: documentWidth - elementRect.right,\n bottom: documentHeight - elementRect.bottom,\n left: elementRect.left,\n };\n }\n\n /** Compute positioning offsets in the appropriate coordinate space, accounting for transformed containing blocks and scroll. */\n private computePositionOffsets(): Offsets {\n const boundElementOffsets = this.getBoundElementOffsets();\n const containingBlockAncestor = findContainingBlockAncestor(this.host);\n const isDocumentElement = containingBlockAncestor === this.host.ownerDocument.documentElement;\n\n if (isDocumentElement) {\n return boundElementOffsets;\n }\n\n const containingBlockRect = containingBlockAncestor.getBoundingClientRect();\n const containingBlockStyle = getComputedStyle(containingBlockAncestor);\n /** Padding box of the containing block, accounting for borders. */\n const paddingBox = {\n top: containingBlockRect.top + parseFloat(containingBlockStyle.borderTopWidth),\n right: containingBlockRect.right - parseFloat(containingBlockStyle.borderRightWidth),\n bottom: containingBlockRect.bottom - parseFloat(containingBlockStyle.borderBottomWidth),\n left: containingBlockRect.left + parseFloat(containingBlockStyle.borderLeftWidth),\n };\n\n const boundElementRect = this.boundElement.getBoundingClientRect();\n /** Bound element offsets relative to the containing block padding box. */\n const relativeOffsets = {\n top: boundElementRect.top - paddingBox.top,\n right: paddingBox.right - boundElementRect.right,\n bottom: paddingBox.bottom - boundElementRect.bottom,\n left: boundElementRect.left - paddingBox.left,\n };\n\n /** Account for scroll to keep the popover aligned while the containing block scrolls. */\n return {\n top: relativeOffsets.top + containingBlockAncestor.scrollTop,\n right: relativeOffsets.right - containingBlockAncestor.scrollLeft,\n bottom: relativeOffsets.bottom - containingBlockAncestor.scrollTop,\n left: relativeOffsets.left + containingBlockAncestor.scrollLeft,\n };\n }\n\n /** Apply positioning styles based on `position` parameter. */\n private applyPositionStyles(position: PopoverPosition, availableSpace: Offsets): void {\n const boundElementWidth = this.boundElement.offsetWidth;\n const boundElementHeight = this.boundElement.offsetHeight;\n const offsetModifier = this.offsetModifier;\n /**\n * Distance between the arrow center and the popover edge.\n * Needed to align the center of the arrow with the center of the bound element when `showArrow` and `center` are enabled.\n */\n const arrowModifier = this.showArrow && this.center ? 8 : 0;\n const hostStyle = this.host.style;\n /** Gap between the popover and the bound element, set as margin in CSS. */\n const distanceFromBound = parseFloat(getComputedStyle(this.host).marginTop.replace(\"px\", \"\")) || 0;\n const positionOffsets = this.computePositionOffsets();\n\n /**\n * Precomputed bases to reduce repeated arithmetic in the switch below.\n * They represent the bound element edges plus optional centering offsets.\n */\n const leftBase = positionOffsets.left + boundElementWidth * offsetModifier;\n const rightBase = positionOffsets.right + boundElementWidth * offsetModifier;\n const topBase = positionOffsets.top + boundElementHeight;\n const bottomBase = positionOffsets.bottom + boundElementHeight;\n const sideTopBase = positionOffsets.top + boundElementHeight * offsetModifier;\n const sideBottomBase = positionOffsets.bottom + boundElementHeight * offsetModifier;\n\n let maxWidth: number;\n let maxHeight: number;\n\n switch (position) {\n case PopoverPosition.TOP:\n case PopoverPosition.TOP_RIGHT:\n hostStyle.bottom = `${bottomBase}px`;\n hostStyle.left = `${leftBase - (position === PopoverPosition.TOP_RIGHT ? arrowModifier : 0)}px`;\n maxHeight = availableSpace.top - distanceFromBound;\n if (position === PopoverPosition.TOP_RIGHT) {\n maxWidth = availableSpace.right + boundElementWidth * offsetModifier;\n }\n break;\n\n case PopoverPosition.TOP_LEFT:\n hostStyle.right = `${rightBase - arrowModifier}px`;\n hostStyle.bottom = `${bottomBase}px`;\n maxWidth = availableSpace.left + boundElementWidth * offsetModifier;\n maxHeight = availableSpace.top - distanceFromBound;\n break;\n\n case PopoverPosition.BOTTOM:\n case PopoverPosition.BOTTOM_RIGHT:\n hostStyle.top = `${topBase}px`;\n hostStyle.left = `${leftBase - (position === PopoverPosition.BOTTOM_RIGHT ? arrowModifier : 0)}px`;\n maxHeight = availableSpace.bottom - distanceFromBound;\n if (position === PopoverPosition.BOTTOM_RIGHT) {\n maxWidth = availableSpace.right + boundElementWidth * offsetModifier;\n }\n break;\n\n case PopoverPosition.BOTTOM_LEFT:\n hostStyle.top = `${topBase}px`;\n hostStyle.right = `${rightBase - arrowModifier}px`;\n maxWidth = availableSpace.left + boundElementWidth * offsetModifier;\n maxHeight = availableSpace.bottom - distanceFromBound;\n break;\n\n case PopoverPosition.RIGHT:\n case PopoverPosition.RIGHT_BOTTOM:\n hostStyle.top = `${sideTopBase - (position === PopoverPosition.RIGHT_BOTTOM ? arrowModifier : 0)}px`;\n hostStyle.left = `${positionOffsets.left + boundElementWidth}px`;\n maxWidth = availableSpace.right - distanceFromBound;\n if (position === PopoverPosition.RIGHT) {\n maxHeight = availableSpace.top + availableSpace.bottom + boundElementHeight;\n } else {\n maxHeight = availableSpace.bottom + boundElementHeight * offsetModifier;\n }\n break;\n\n case PopoverPosition.RIGHT_TOP:\n hostStyle.bottom = `${sideBottomBase - arrowModifier}px`;\n hostStyle.left = `${positionOffsets.left + boundElementWidth}px`;\n maxWidth = availableSpace.right - distanceFromBound;\n maxHeight = availableSpace.top + boundElementHeight * offsetModifier;\n break;\n\n case PopoverPosition.LEFT:\n case PopoverPosition.LEFT_BOTTOM:\n hostStyle.top = `${sideTopBase - (position === PopoverPosition.LEFT_BOTTOM ? arrowModifier : 0)}px`;\n hostStyle.right = `${positionOffsets.right + boundElementWidth}px`;\n maxWidth = availableSpace.left - distanceFromBound;\n if (position === PopoverPosition.LEFT_BOTTOM) {\n maxHeight = availableSpace.bottom + boundElementHeight * offsetModifier;\n }\n break;\n\n case PopoverPosition.LEFT_TOP:\n hostStyle.right = `${positionOffsets.right + boundElementWidth}px`;\n hostStyle.bottom = `${sideBottomBase - arrowModifier}px`;\n maxWidth = availableSpace.left - distanceFromBound;\n maxHeight = availableSpace.top + boundElementHeight * offsetModifier;\n break;\n }\n\n if (getDevice() !== Device.MOBILE) {\n // Only force max sizes on non-mobile viewports\n Object.assign(hostStyle, {\n maxWidth: maxWidth ? `${maxWidth}px` : \"\",\n maxHeight: maxHeight ? `${maxHeight}px` : \"\",\n });\n }\n }\n\n /** Set the position of the popover. */\n private setPosition(): void {\n if (!this.boundElement) {\n return;\n }\n\n if (!isElementVisibleInContainer(this.boundElement, this.findScrollableAncestor(this.boundElement))) {\n // If the bound element is not visible, hide the popover too\n this.open = false;\n\n return;\n }\n\n Object.assign(this.host.style, {\n // Reset all positioning properties\n top: \"auto\",\n right: \"auto\",\n bottom: \"auto\",\n left: \"auto\",\n maxWidth: \"\",\n maxHeight: \"\",\n // Set initial visibility to hidden while calculating position...\n visibility: \"hidden\",\n });\n\n const availableSpace = this.calculateAvailableSpace();\n const position = this.getOptimalPopoverPosition(this.position, availableSpace);\n\n this.applyPositionStyles(position, availableSpace);\n this.currentPosition = position;\n this.positionChange.emit({position: this.currentPosition});\n\n // ...then restore the visibility\n this.host.style.visibility = \"visible\";\n }\n\n componentWillLoad(): void {\n this.validatePosition(this.position);\n }\n\n componentDidLoad(): void {\n this.findBoundElement();\n if (this.open) {\n this.onOpen();\n }\n }\n\n disconnectedCallback(): void {\n cancelAnimationFrame(this.animationFrameRequestId);\n }\n\n render(): HTMLZPopoverElement {\n return (\n <Host current-position={this.currentPosition}>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|