@zanichelli/albe-web-components 18.5.3 → 18.5.4-RC1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-6ba31c6e.js → index-10fe85fc.js} +2 -2
- package/dist/cjs/{index-6ba31c6e.js.map → index-10fe85fc.js.map} +1 -1
- package/dist/cjs/{index-339004f9.js → index-152c983a.js} +4 -4
- package/dist/cjs/{index-339004f9.js.map → index-152c983a.js.map} +1 -1
- package/dist/cjs/{index-97a4c18d.js → index-2d4fb043.js} +1 -6
- package/dist/cjs/index-2d4fb043.js.map +1 -0
- package/dist/cjs/{index-aeea3159.js → index-6b856bc1.js} +2 -2
- package/dist/cjs/{index-aeea3159.js.map → index-6b856bc1.js.map} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-7f9d5a78.js → utils-7bfaaf8c.js} +2 -2
- package/dist/cjs/{utils-7f9d5a78.js.map → utils-7bfaaf8c.js.map} +1 -1
- package/dist/cjs/{utils-93961cb6.js → utils-ecc8ba50.js} +2 -2
- package/dist/cjs/{utils-93961cb6.js.map → utils-ecc8ba50.js.map} +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-accordion.cjs.entry.js +1 -1
- package/dist/cjs/z-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-anchor-navigation.cjs.entry.js +1 -1
- package/dist/cjs/z-app-header-deprecated.cjs.entry.js +1 -1
- package/dist/cjs/z-app-header_12.cjs.entry.js +3 -3
- package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-avatar.cjs.entry.js +1 -1
- package/dist/cjs/z-book-card-app.cjs.entry.js +1 -1
- package/dist/cjs/z-book-card-deprecated.cjs.entry.js +2 -2
- package/dist/cjs/z-book-card.cjs.entry.js +1 -1
- package/dist/cjs/z-breadcrumb.cjs.entry.js +2 -2
- 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 +1 -1
- package/dist/cjs/z-combobox.cjs.entry.js +2 -2
- package/dist/cjs/z-cover-hero.cjs.entry.js +1 -1
- package/dist/cjs/z-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +1 -1
- package/dist/cjs/z-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/z-file.cjs.entry.js +1 -1
- package/dist/cjs/z-info-reveal.cjs.entry.js +1 -1
- package/dist/cjs/z-menu-section.cjs.entry.js +1 -1
- package/dist/cjs/z-menu.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/z-navigation-tabs.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-popover.cjs.entry.js +153 -307
- package/dist/cjs/z-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/z-range-picker.cjs.entry.js +2 -2
- package/dist/cjs/z-section-title.cjs.entry.js +1 -1
- package/dist/cjs/z-select.cjs.entry.js +2 -2
- 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 +5 -5
- package/dist/cjs/z-td.cjs.entry.js +2 -2
- package/dist/cjs/z-th.cjs.entry.js +2 -2
- package/dist/cjs/z-toast-notification-list.cjs.entry.js +2 -2
- package/dist/cjs/z-toast-notification.cjs.entry.js +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-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/z-tr.cjs.entry.js +5 -5
- package/dist/cjs/z-tree-list.cjs.entry.js +1 -1
- package/dist/collection/beans/index.js +0 -5
- package/dist/collection/beans/index.js.map +1 -1
- package/dist/collection/components/z-navigation-tabs/styles.css +1 -1
- package/dist/collection/components/z-popover/index.js +156 -316
- package/dist/collection/components/z-popover/index.js.map +1 -1
- package/dist/collection/components/z-popover/index.stories.js +41 -124
- package/dist/collection/components/z-popover/index.stories.js.map +1 -1
- package/dist/collection/components/z-popover/styles.css +10 -16
- package/dist/collection/components/z-searchbar/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-toast-notification/index.js +1 -1
- package/dist/collection/components/z-toast-notification-list/index.js +1 -1
- package/dist/collection/components/z-toggle-button/index.js +2 -2
- package/dist/collection/components/z-toggle-switch/index.js +3 -3
- package/dist/collection/components/z-tooltip/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +1 -1
- package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
- package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
- package/dist/components/index17.js +1 -1
- package/dist/components/index18.js +1 -1
- package/dist/components/index19.js +1 -1
- package/dist/components/index2.js +0 -5
- 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/index23.js +154 -308
- package/dist/components/index23.js.map +1 -1
- package/dist/components/index24.js +1 -1
- package/dist/components/index3.js +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 +1 -1
- package/dist/components/z-navigation-tabs.js.map +1 -1
- package/dist/components/z-otp.js +2 -2
- 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 +0 -1
- package/dist/components/z-table.js.map +1 -1
- package/dist/components/z-toast-notification-list.js +1 -1
- package/dist/components/z-toast-notification.js +1 -1
- package/dist/components/z-toggle-button.js +2 -2
- package/dist/components/z-toggle-switch.js +3 -3
- package/dist/components/z-tooltip.js +1 -1
- package/dist/components/z-tr.js +0 -1
- package/dist/components/z-tr.js.map +1 -1
- package/dist/esm/{index-eb99d165.js → index-6b637355.js} +2 -2
- package/dist/esm/{index-eb99d165.js.map → index-6b637355.js.map} +1 -1
- package/dist/esm/{index-2a6324f8.js → index-cb76b648.js} +1 -6
- package/dist/esm/index-cb76b648.js.map +1 -0
- package/dist/esm/{index-5e18fc4b.js → index-d02d53b4.js} +2 -2
- package/dist/esm/{index-5e18fc4b.js.map → index-d02d53b4.js.map} +1 -1
- package/dist/esm/{index-3e140e28.js → index-d0f93a38.js} +4 -4
- package/dist/esm/{index-3e140e28.js.map → index-d0f93a38.js.map} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-227ef1c0.js → utils-26154cbf.js} +2 -2
- package/dist/esm/{utils-227ef1c0.js.map → utils-26154cbf.js.map} +1 -1
- package/dist/esm/{utils-c8abef2f.js → utils-f6ae5714.js} +2 -2
- package/dist/esm/{utils-c8abef2f.js.map → utils-f6ae5714.js.map} +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-accordion.entry.js +1 -1
- package/dist/esm/z-alert.entry.js +1 -1
- package/dist/esm/z-anchor-navigation.entry.js +1 -1
- package/dist/esm/z-app-header-deprecated.entry.js +1 -1
- package/dist/esm/z-app-header_12.entry.js +3 -3
- package/dist/esm/z-aria-alert.entry.js +1 -1
- package/dist/esm/z-avatar.entry.js +1 -1
- package/dist/esm/z-book-card-app.entry.js +1 -1
- package/dist/esm/z-book-card-deprecated.entry.js +2 -2
- package/dist/esm/z-book-card.entry.js +1 -1
- package/dist/esm/z-breadcrumb.entry.js +2 -2
- 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 +1 -1
- package/dist/esm/z-combobox.entry.js +2 -2
- package/dist/esm/z-cover-hero.entry.js +1 -1
- package/dist/esm/z-date-picker.entry.js +2 -2
- package/dist/esm/z-dragdrop-area_2.entry.js +1 -1
- package/dist/esm/z-file-upload.entry.js +1 -1
- package/dist/esm/z-file.entry.js +1 -1
- package/dist/esm/z-info-reveal.entry.js +1 -1
- package/dist/esm/z-menu-section.entry.js +1 -1
- package/dist/esm/z-menu.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/z-navigation-tabs.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-popover.entry.js +154 -308
- package/dist/esm/z-popover.entry.js.map +1 -1
- package/dist/esm/z-range-picker.entry.js +2 -2
- package/dist/esm/z-section-title.entry.js +1 -1
- package/dist/esm/z-select.entry.js +2 -2
- 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 +5 -5
- package/dist/esm/z-td.entry.js +2 -2
- package/dist/esm/z-th.entry.js +2 -2
- 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-tooltip.entry.js +2 -2
- package/dist/esm/z-tr.entry.js +5 -5
- package/dist/esm/z-tree-list.entry.js +1 -1
- package/dist/types/beans/index.d.ts +0 -5
- package/dist/types/components/z-popover/index.d.ts +4 -50
- package/dist/types/components/z-popover/index.stories.d.ts +6 -26
- package/dist/types/components.d.ts +3 -23
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/{p-a06fbbc0.js → p-02c55ed9.js} +2 -2
- package/{www/build/p-ac888c48.entry.js → dist/web-components-library/p-064c29b7.entry.js} +2 -2
- package/dist/web-components-library/{p-8f4a90dc.entry.js → p-0c61db99.entry.js} +2 -2
- package/{www/build/p-c4b78535.entry.js → dist/web-components-library/p-10345a6d.entry.js} +2 -2
- package/dist/web-components-library/{p-12900bf7.js → p-171ee634.js} +2 -2
- package/dist/web-components-library/{p-7c69b70a.entry.js → p-173b1867.entry.js} +2 -2
- package/dist/web-components-library/{p-a35c1fab.js → p-2174d968.js} +2 -2
- package/dist/web-components-library/p-22a8071a.entry.js +2 -0
- package/dist/web-components-library/{p-97294823.entry.js.map → p-22a8071a.entry.js.map} +1 -1
- package/dist/web-components-library/{p-afea8173.entry.js → p-22aab9d2.entry.js} +2 -2
- package/dist/web-components-library/{p-817689d5.entry.js → p-23d669a8.entry.js} +2 -2
- package/dist/web-components-library/p-28b41569.entry.js +2 -0
- package/dist/web-components-library/p-2aa75dee.entry.js +2 -0
- package/dist/web-components-library/p-2aa75dee.entry.js.map +1 -0
- package/dist/web-components-library/{p-fb232d07.entry.js → p-2afe6219.entry.js} +2 -2
- package/dist/web-components-library/{p-e3b82454.entry.js → p-2fd165a0.entry.js} +2 -2
- package/dist/web-components-library/p-305d294a.entry.js +2 -0
- package/dist/web-components-library/p-3315c3e1.entry.js +2 -0
- package/{www/build/p-2fb52cd0.entry.js → dist/web-components-library/p-333e3cef.entry.js} +2 -2
- package/{www/build/p-252ef047.entry.js → dist/web-components-library/p-33c8d043.entry.js} +2 -2
- package/dist/web-components-library/{p-98fdc6b5.entry.js → p-35b5c549.entry.js} +2 -2
- package/{www/build/p-def1bcc7.entry.js → dist/web-components-library/p-38ffeac0.entry.js} +2 -2
- package/dist/web-components-library/{p-cebc9451.entry.js → p-40ac080b.entry.js} +2 -2
- package/dist/web-components-library/{p-342b0eb0.entry.js → p-411e98ab.entry.js} +2 -2
- package/dist/web-components-library/{p-4cfe0f87.entry.js → p-440db280.entry.js} +2 -2
- package/dist/web-components-library/{p-57b8bd19.entry.js → p-49f5ad13.entry.js} +2 -2
- package/dist/web-components-library/p-56156e0e.entry.js +2 -0
- package/{www/build/p-7fbdf8f9.entry.js → dist/web-components-library/p-59c1d10c.entry.js} +2 -2
- package/dist/web-components-library/{p-0df112c4.entry.js → p-5cca3cf8.entry.js} +2 -2
- package/dist/web-components-library/{p-9047fe2a.entry.js → p-60ea979a.entry.js} +2 -2
- package/dist/web-components-library/{p-1477f263.entry.js → p-62aaee7a.entry.js} +2 -2
- package/dist/web-components-library/{p-b63c8e8b.entry.js → p-634b9589.entry.js} +2 -2
- package/dist/web-components-library/{p-ca525798.js → p-6a5bf3df.js} +2 -2
- package/dist/web-components-library/{p-c2ba8a6c.entry.js → p-6ba6ed17.entry.js} +2 -2
- package/dist/web-components-library/{p-3a9405b3.entry.js → p-6efc0b32.entry.js} +2 -2
- package/dist/web-components-library/{p-afc9e99e.entry.js → p-76102f08.entry.js} +2 -2
- package/dist/web-components-library/{p-ee08aec0.entry.js → p-800bd543.entry.js} +2 -2
- package/{www/build/p-956d977d.entry.js → dist/web-components-library/p-892f03fc.entry.js} +2 -2
- package/dist/web-components-library/{p-c6ae7dfa.entry.js → p-8ec302f8.entry.js} +2 -2
- package/{www/build/p-eb6f59a8.entry.js → dist/web-components-library/p-9425d3d1.entry.js} +2 -2
- package/dist/web-components-library/{p-ae8b17a1.entry.js → p-98148b01.entry.js} +2 -2
- package/dist/web-components-library/{p-757415e9.entry.js → p-99e3d7f4.entry.js} +2 -2
- package/dist/web-components-library/{p-f5efb3fc.entry.js → p-9c6fc3a6.entry.js} +2 -2
- package/dist/web-components-library/{p-a3aef2c0.entry.js → p-a1d45a8b.entry.js} +2 -2
- package/dist/web-components-library/p-a2217ed8.entry.js +2 -0
- package/dist/web-components-library/{p-d0a18050.entry.js → p-a372e8cb.entry.js} +2 -2
- package/dist/web-components-library/{p-f36d7044.entry.js → p-a61cb9dc.entry.js} +2 -2
- package/dist/web-components-library/{p-a905df88.entry.js → p-a840eb59.entry.js} +2 -2
- package/dist/web-components-library/p-a9d05a92.entry.js +2 -0
- package/{www/build/p-4cec3345.entry.js → dist/web-components-library/p-b2bb23bb.entry.js} +2 -2
- package/{www/build/p-17af7fb2.js → dist/web-components-library/p-b49aeff4.js} +1 -1
- package/dist/web-components-library/p-b49aeff4.js.map +1 -0
- package/{www/build/p-8c164e0d.entry.js → dist/web-components-library/p-c96b2352.entry.js} +2 -2
- package/{www/build/p-8b0c8e6d.entry.js → dist/web-components-library/p-cbc1f955.entry.js} +2 -2
- package/dist/web-components-library/{p-30e42fb1.js → p-d67e2f1b.js} +2 -2
- package/dist/web-components-library/{p-3cc02ff9.entry.js → p-dc46730d.entry.js} +2 -2
- package/{www/build/p-512033d3.entry.js → dist/web-components-library/p-dd350f70.entry.js} +4 -4
- package/dist/web-components-library/{p-1174942e.entry.js → p-dd66d76e.entry.js} +2 -2
- package/dist/web-components-library/p-e2f36e53.entry.js +2 -0
- package/dist/web-components-library/p-e2f36e53.entry.js.map +1 -0
- package/dist/web-components-library/{p-c231ed32.entry.js → p-e853ccde.entry.js} +2 -2
- package/dist/web-components-library/{p-dc566d6d.entry.js → p-edceccad.entry.js} +2 -2
- package/dist/web-components-library/{p-b2313d3c.entry.js → p-ee7185cf.entry.js} +2 -2
- package/{www/build/p-914f9d32.entry.js → dist/web-components-library/p-fa9fdeb5.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/www/build/index.esm.js +1 -1
- package/www/build/{p-a06fbbc0.js → p-02c55ed9.js} +2 -2
- package/{dist/web-components-library/p-ac888c48.entry.js → www/build/p-064c29b7.entry.js} +2 -2
- package/www/build/{p-8f4a90dc.entry.js → p-0c61db99.entry.js} +2 -2
- package/{dist/web-components-library/p-c4b78535.entry.js → www/build/p-10345a6d.entry.js} +2 -2
- package/www/build/{p-12900bf7.js → p-171ee634.js} +2 -2
- package/www/build/{p-7c69b70a.entry.js → p-173b1867.entry.js} +2 -2
- package/www/build/{p-a35c1fab.js → p-2174d968.js} +2 -2
- package/www/build/p-22a8071a.entry.js +2 -0
- package/www/build/{p-97294823.entry.js.map → p-22a8071a.entry.js.map} +1 -1
- package/www/build/{p-afea8173.entry.js → p-22aab9d2.entry.js} +2 -2
- package/www/build/{p-817689d5.entry.js → p-23d669a8.entry.js} +2 -2
- package/www/build/p-28b41569.entry.js +2 -0
- package/www/build/p-2aa75dee.entry.js +2 -0
- package/www/build/p-2aa75dee.entry.js.map +1 -0
- package/www/build/{p-fb232d07.entry.js → p-2afe6219.entry.js} +2 -2
- package/www/build/{p-e3b82454.entry.js → p-2fd165a0.entry.js} +2 -2
- package/www/build/p-305d294a.entry.js +2 -0
- package/www/build/p-3315c3e1.entry.js +2 -0
- package/{dist/web-components-library/p-2fb52cd0.entry.js → www/build/p-333e3cef.entry.js} +2 -2
- package/{dist/web-components-library/p-252ef047.entry.js → www/build/p-33c8d043.entry.js} +2 -2
- package/www/build/{p-98fdc6b5.entry.js → p-35b5c549.entry.js} +2 -2
- package/{dist/web-components-library/p-def1bcc7.entry.js → www/build/p-38ffeac0.entry.js} +2 -2
- package/www/build/{p-cebc9451.entry.js → p-40ac080b.entry.js} +2 -2
- package/www/build/{p-342b0eb0.entry.js → p-411e98ab.entry.js} +2 -2
- package/www/build/{p-4cfe0f87.entry.js → p-440db280.entry.js} +2 -2
- package/www/build/{p-57b8bd19.entry.js → p-49f5ad13.entry.js} +2 -2
- package/www/build/p-56156e0e.entry.js +2 -0
- package/{dist/web-components-library/p-7fbdf8f9.entry.js → www/build/p-59c1d10c.entry.js} +2 -2
- package/www/build/{p-0df112c4.entry.js → p-5cca3cf8.entry.js} +2 -2
- package/www/build/{p-9047fe2a.entry.js → p-60ea979a.entry.js} +2 -2
- package/www/build/{p-1477f263.entry.js → p-62aaee7a.entry.js} +2 -2
- package/www/build/{p-23b6a1e1.js → p-62dcf5d1.js} +1 -1
- package/www/build/{p-b63c8e8b.entry.js → p-634b9589.entry.js} +2 -2
- package/www/build/{p-ca525798.js → p-6a5bf3df.js} +2 -2
- package/www/build/{p-c2ba8a6c.entry.js → p-6ba6ed17.entry.js} +2 -2
- package/www/build/{p-3a9405b3.entry.js → p-6efc0b32.entry.js} +2 -2
- package/www/build/{p-afc9e99e.entry.js → p-76102f08.entry.js} +2 -2
- package/www/build/{p-ee08aec0.entry.js → p-800bd543.entry.js} +2 -2
- package/{dist/web-components-library/p-956d977d.entry.js → www/build/p-892f03fc.entry.js} +2 -2
- package/www/build/{p-c6ae7dfa.entry.js → p-8ec302f8.entry.js} +2 -2
- package/{dist/web-components-library/p-eb6f59a8.entry.js → www/build/p-9425d3d1.entry.js} +2 -2
- package/www/build/{p-ae8b17a1.entry.js → p-98148b01.entry.js} +2 -2
- package/www/build/{p-757415e9.entry.js → p-99e3d7f4.entry.js} +2 -2
- package/www/build/{p-f5efb3fc.entry.js → p-9c6fc3a6.entry.js} +2 -2
- package/www/build/{p-a3aef2c0.entry.js → p-a1d45a8b.entry.js} +2 -2
- package/www/build/p-a2217ed8.entry.js +2 -0
- package/www/build/{p-d0a18050.entry.js → p-a372e8cb.entry.js} +2 -2
- package/www/build/{p-f36d7044.entry.js → p-a61cb9dc.entry.js} +2 -2
- package/www/build/{p-a905df88.entry.js → p-a840eb59.entry.js} +2 -2
- package/www/build/p-a9d05a92.entry.js +2 -0
- package/{dist/web-components-library/p-4cec3345.entry.js → www/build/p-b2bb23bb.entry.js} +2 -2
- package/{dist/web-components-library/p-17af7fb2.js → www/build/p-b49aeff4.js} +1 -1
- package/www/build/p-b49aeff4.js.map +1 -0
- package/{dist/web-components-library/p-8c164e0d.entry.js → www/build/p-c96b2352.entry.js} +2 -2
- package/{dist/web-components-library/p-8b0c8e6d.entry.js → www/build/p-cbc1f955.entry.js} +2 -2
- package/www/build/{p-30e42fb1.js → p-d67e2f1b.js} +2 -2
- package/www/build/{p-3cc02ff9.entry.js → p-dc46730d.entry.js} +2 -2
- package/{dist/web-components-library/p-512033d3.entry.js → www/build/p-dd350f70.entry.js} +4 -4
- package/www/build/{p-1174942e.entry.js → p-dd66d76e.entry.js} +2 -2
- package/www/build/p-e2f36e53.entry.js +2 -0
- package/www/build/p-e2f36e53.entry.js.map +1 -0
- package/www/build/{p-c231ed32.entry.js → p-e853ccde.entry.js} +2 -2
- package/www/build/{p-dc566d6d.entry.js → p-edceccad.entry.js} +2 -2
- package/www/build/{p-b2313d3c.entry.js → p-ee7185cf.entry.js} +2 -2
- package/{dist/web-components-library/p-914f9d32.entry.js → www/build/p-fa9fdeb5.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/esm/index-2a6324f8.js.map +0 -1
- package/dist/web-components-library/p-05348da8.entry.js +0 -2
- package/dist/web-components-library/p-17af7fb2.js.map +0 -1
- package/dist/web-components-library/p-42819df4.entry.js +0 -2
- package/dist/web-components-library/p-42819df4.entry.js.map +0 -1
- package/dist/web-components-library/p-651250c2.entry.js +0 -2
- package/dist/web-components-library/p-76ee5c89.entry.js +0 -2
- package/dist/web-components-library/p-7ad751e7.entry.js +0 -2
- package/dist/web-components-library/p-92cc912e.entry.js +0 -2
- package/dist/web-components-library/p-97294823.entry.js +0 -2
- package/dist/web-components-library/p-ae82ba49.entry.js +0 -2
- package/dist/web-components-library/p-ae82ba49.entry.js.map +0 -1
- package/dist/web-components-library/p-e1687f75.entry.js +0 -2
- package/www/build/p-05348da8.entry.js +0 -2
- package/www/build/p-17af7fb2.js.map +0 -1
- package/www/build/p-42819df4.entry.js +0 -2
- package/www/build/p-42819df4.entry.js.map +0 -1
- package/www/build/p-651250c2.entry.js +0 -2
- package/www/build/p-76ee5c89.entry.js +0 -2
- package/www/build/p-7ad751e7.entry.js +0 -2
- package/www/build/p-92cc912e.entry.js +0 -2
- package/www/build/p-97294823.entry.js +0 -2
- package/www/build/p-ae82ba49.entry.js +0 -2
- package/www/build/p-ae82ba49.entry.js.map +0 -1
- package/www/build/p-e1687f75.entry.js +0 -2
- /package/dist/web-components-library/{p-a06fbbc0.js.map → p-02c55ed9.js.map} +0 -0
- /package/dist/web-components-library/{p-ac888c48.entry.js.map → p-064c29b7.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-8f4a90dc.entry.js.map → p-0c61db99.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-c4b78535.entry.js.map → p-10345a6d.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-12900bf7.js.map → p-171ee634.js.map} +0 -0
- /package/dist/web-components-library/{p-7c69b70a.entry.js.map → p-173b1867.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-a35c1fab.js.map → p-2174d968.js.map} +0 -0
- /package/dist/web-components-library/{p-afea8173.entry.js.map → p-22aab9d2.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-817689d5.entry.js.map → p-23d669a8.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-05348da8.entry.js.map → p-28b41569.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-fb232d07.entry.js.map → p-2afe6219.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-e3b82454.entry.js.map → p-2fd165a0.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-7ad751e7.entry.js.map → p-305d294a.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-e1687f75.entry.js.map → p-3315c3e1.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-2fb52cd0.entry.js.map → p-333e3cef.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-252ef047.entry.js.map → p-33c8d043.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-98fdc6b5.entry.js.map → p-35b5c549.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-def1bcc7.entry.js.map → p-38ffeac0.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-cebc9451.entry.js.map → p-40ac080b.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-342b0eb0.entry.js.map → p-411e98ab.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-4cfe0f87.entry.js.map → p-440db280.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-57b8bd19.entry.js.map → p-49f5ad13.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-92cc912e.entry.js.map → p-56156e0e.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-7fbdf8f9.entry.js.map → p-59c1d10c.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-0df112c4.entry.js.map → p-5cca3cf8.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-9047fe2a.entry.js.map → p-60ea979a.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-1477f263.entry.js.map → p-62aaee7a.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-b63c8e8b.entry.js.map → p-634b9589.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-ca525798.js.map → p-6a5bf3df.js.map} +0 -0
- /package/dist/web-components-library/{p-c2ba8a6c.entry.js.map → p-6ba6ed17.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-3a9405b3.entry.js.map → p-6efc0b32.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-afc9e99e.entry.js.map → p-76102f08.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-ee08aec0.entry.js.map → p-800bd543.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-956d977d.entry.js.map → p-892f03fc.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-c6ae7dfa.entry.js.map → p-8ec302f8.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-eb6f59a8.entry.js.map → p-9425d3d1.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-ae8b17a1.entry.js.map → p-98148b01.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-757415e9.entry.js.map → p-99e3d7f4.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-f5efb3fc.entry.js.map → p-9c6fc3a6.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-a3aef2c0.entry.js.map → p-a1d45a8b.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-651250c2.entry.js.map → p-a2217ed8.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-d0a18050.entry.js.map → p-a372e8cb.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-f36d7044.entry.js.map → p-a61cb9dc.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-a905df88.entry.js.map → p-a840eb59.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-76ee5c89.entry.js.map → p-a9d05a92.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-4cec3345.entry.js.map → p-b2bb23bb.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-8c164e0d.entry.js.map → p-c96b2352.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-8b0c8e6d.entry.js.map → p-cbc1f955.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-30e42fb1.js.map → p-d67e2f1b.js.map} +0 -0
- /package/dist/web-components-library/{p-3cc02ff9.entry.js.map → p-dc46730d.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-512033d3.entry.js.map → p-dd350f70.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-1174942e.entry.js.map → p-dd66d76e.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-c231ed32.entry.js.map → p-e853ccde.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-dc566d6d.entry.js.map → p-edceccad.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-b2313d3c.entry.js.map → p-ee7185cf.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-914f9d32.entry.js.map → p-fa9fdeb5.entry.js.map} +0 -0
- /package/www/build/{p-a06fbbc0.js.map → p-02c55ed9.js.map} +0 -0
- /package/www/build/{p-ac888c48.entry.js.map → p-064c29b7.entry.js.map} +0 -0
- /package/www/build/{p-8f4a90dc.entry.js.map → p-0c61db99.entry.js.map} +0 -0
- /package/www/build/{p-c4b78535.entry.js.map → p-10345a6d.entry.js.map} +0 -0
- /package/www/build/{p-12900bf7.js.map → p-171ee634.js.map} +0 -0
- /package/www/build/{p-7c69b70a.entry.js.map → p-173b1867.entry.js.map} +0 -0
- /package/www/build/{p-a35c1fab.js.map → p-2174d968.js.map} +0 -0
- /package/www/build/{p-afea8173.entry.js.map → p-22aab9d2.entry.js.map} +0 -0
- /package/www/build/{p-817689d5.entry.js.map → p-23d669a8.entry.js.map} +0 -0
- /package/www/build/{p-05348da8.entry.js.map → p-28b41569.entry.js.map} +0 -0
- /package/www/build/{p-fb232d07.entry.js.map → p-2afe6219.entry.js.map} +0 -0
- /package/www/build/{p-e3b82454.entry.js.map → p-2fd165a0.entry.js.map} +0 -0
- /package/www/build/{p-7ad751e7.entry.js.map → p-305d294a.entry.js.map} +0 -0
- /package/www/build/{p-e1687f75.entry.js.map → p-3315c3e1.entry.js.map} +0 -0
- /package/www/build/{p-2fb52cd0.entry.js.map → p-333e3cef.entry.js.map} +0 -0
- /package/www/build/{p-252ef047.entry.js.map → p-33c8d043.entry.js.map} +0 -0
- /package/www/build/{p-98fdc6b5.entry.js.map → p-35b5c549.entry.js.map} +0 -0
- /package/www/build/{p-def1bcc7.entry.js.map → p-38ffeac0.entry.js.map} +0 -0
- /package/www/build/{p-cebc9451.entry.js.map → p-40ac080b.entry.js.map} +0 -0
- /package/www/build/{p-342b0eb0.entry.js.map → p-411e98ab.entry.js.map} +0 -0
- /package/www/build/{p-4cfe0f87.entry.js.map → p-440db280.entry.js.map} +0 -0
- /package/www/build/{p-57b8bd19.entry.js.map → p-49f5ad13.entry.js.map} +0 -0
- /package/www/build/{p-92cc912e.entry.js.map → p-56156e0e.entry.js.map} +0 -0
- /package/www/build/{p-7fbdf8f9.entry.js.map → p-59c1d10c.entry.js.map} +0 -0
- /package/www/build/{p-0df112c4.entry.js.map → p-5cca3cf8.entry.js.map} +0 -0
- /package/www/build/{p-9047fe2a.entry.js.map → p-60ea979a.entry.js.map} +0 -0
- /package/www/build/{p-1477f263.entry.js.map → p-62aaee7a.entry.js.map} +0 -0
- /package/www/build/{p-b63c8e8b.entry.js.map → p-634b9589.entry.js.map} +0 -0
- /package/www/build/{p-ca525798.js.map → p-6a5bf3df.js.map} +0 -0
- /package/www/build/{p-c2ba8a6c.entry.js.map → p-6ba6ed17.entry.js.map} +0 -0
- /package/www/build/{p-3a9405b3.entry.js.map → p-6efc0b32.entry.js.map} +0 -0
- /package/www/build/{p-afc9e99e.entry.js.map → p-76102f08.entry.js.map} +0 -0
- /package/www/build/{p-ee08aec0.entry.js.map → p-800bd543.entry.js.map} +0 -0
- /package/www/build/{p-956d977d.entry.js.map → p-892f03fc.entry.js.map} +0 -0
- /package/www/build/{p-c6ae7dfa.entry.js.map → p-8ec302f8.entry.js.map} +0 -0
- /package/www/build/{p-eb6f59a8.entry.js.map → p-9425d3d1.entry.js.map} +0 -0
- /package/www/build/{p-ae8b17a1.entry.js.map → p-98148b01.entry.js.map} +0 -0
- /package/www/build/{p-757415e9.entry.js.map → p-99e3d7f4.entry.js.map} +0 -0
- /package/www/build/{p-f5efb3fc.entry.js.map → p-9c6fc3a6.entry.js.map} +0 -0
- /package/www/build/{p-a3aef2c0.entry.js.map → p-a1d45a8b.entry.js.map} +0 -0
- /package/www/build/{p-651250c2.entry.js.map → p-a2217ed8.entry.js.map} +0 -0
- /package/www/build/{p-d0a18050.entry.js.map → p-a372e8cb.entry.js.map} +0 -0
- /package/www/build/{p-f36d7044.entry.js.map → p-a61cb9dc.entry.js.map} +0 -0
- /package/www/build/{p-a905df88.entry.js.map → p-a840eb59.entry.js.map} +0 -0
- /package/www/build/{p-76ee5c89.entry.js.map → p-a9d05a92.entry.js.map} +0 -0
- /package/www/build/{p-4cec3345.entry.js.map → p-b2bb23bb.entry.js.map} +0 -0
- /package/www/build/{p-8c164e0d.entry.js.map → p-c96b2352.entry.js.map} +0 -0
- /package/www/build/{p-8b0c8e6d.entry.js.map → p-cbc1f955.entry.js.map} +0 -0
- /package/www/build/{p-30e42fb1.js.map → p-d67e2f1b.js.map} +0 -0
- /package/www/build/{p-3cc02ff9.entry.js.map → p-dc46730d.entry.js.map} +0 -0
- /package/www/build/{p-512033d3.entry.js.map → p-dd350f70.entry.js.map} +0 -0
- /package/www/build/{p-1174942e.entry.js.map → p-dd66d76e.entry.js.map} +0 -0
- /package/www/build/{p-c231ed32.entry.js.map → p-e853ccde.entry.js.map} +0 -0
- /package/www/build/{p-dc566d6d.entry.js.map → p-edceccad.entry.js.map} +0 -0
- /package/www/build/{p-b2313d3c.entry.js.map → p-ee7185cf.entry.js.map} +0 -0
- /package/www/build/{p-914f9d32.entry.js.map → p-fa9fdeb5.entry.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
2
|
import { KeyboardCode, PopoverPosition } from "../../beans";
|
|
3
3
|
const DOCUMENT_ELEMENT = document.documentElement;
|
|
4
4
|
function getParentElement(element) {
|
|
@@ -15,18 +15,12 @@ function getParentElement(element) {
|
|
|
15
15
|
function findScrollableParent(element) {
|
|
16
16
|
let parent = getParentElement(element);
|
|
17
17
|
while (parent && parent !== DOCUMENT_ELEMENT) {
|
|
18
|
-
const
|
|
19
|
-
const { overflow, overflowX, overflowY } = style;
|
|
20
|
-
// Check for hidden overflow first (early return)
|
|
18
|
+
const { overflow, overflowX, overflowY } = window.getComputedStyle(parent);
|
|
21
19
|
if (overflow === "hidden" || overflowY === "hidden" || overflowX === "hidden") {
|
|
22
20
|
return parent;
|
|
23
21
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const isOverflowYNotVisible = overflowY !== "visible";
|
|
27
|
-
const isOverflowXNotVisible = overflowX !== "visible";
|
|
28
|
-
if ((parent.scrollHeight > parent.clientHeight && isOverflowNotVisible && isOverflowYNotVisible) ||
|
|
29
|
-
(parent.scrollWidth > parent.clientWidth && isOverflowNotVisible && isOverflowXNotVisible)) {
|
|
22
|
+
if ((parent.scrollHeight > parent.clientHeight && overflow !== "visible" && overflowY !== "visible") ||
|
|
23
|
+
(parent.scrollWidth > parent.clientWidth && overflow !== "visible" && overflowX !== "visible")) {
|
|
30
24
|
return parent;
|
|
31
25
|
}
|
|
32
26
|
parent = getParentElement(parent);
|
|
@@ -38,28 +32,30 @@ function findScrollableParent(element) {
|
|
|
38
32
|
* It includes matrix transformations.
|
|
39
33
|
* @param element The target element.
|
|
40
34
|
* @param targetParentOffset The relative offset parent.
|
|
35
|
+
* @return A client rect object.
|
|
41
36
|
*/
|
|
42
37
|
function computeOffset(element, targetParentOffset) {
|
|
43
38
|
const rect = element.getBoundingClientRect();
|
|
44
|
-
const
|
|
39
|
+
const width = rect.width;
|
|
40
|
+
const height = rect.height;
|
|
45
41
|
let top = 0;
|
|
46
42
|
let left = 0;
|
|
47
43
|
let offsetParent = element;
|
|
48
|
-
while (offsetParent && offsetParent
|
|
44
|
+
while (offsetParent && offsetParent != targetParentOffset) {
|
|
49
45
|
left += offsetParent.offsetLeft;
|
|
50
|
-
// document.body sometimes has offsetTop == 0 but still has an
|
|
46
|
+
// document.body sometimes has offsetTop == 0 but still has an
|
|
47
|
+
// offset because of children margins!
|
|
51
48
|
if (offsetParent === document.body) {
|
|
52
49
|
top += offsetParent.getBoundingClientRect().top + window.scrollY;
|
|
53
50
|
}
|
|
54
51
|
else {
|
|
55
52
|
top += offsetParent.offsetTop;
|
|
56
53
|
}
|
|
57
|
-
// Handle CSS transforms only when DOMMatrix is available
|
|
58
54
|
if (window.DOMMatrix) {
|
|
59
55
|
const style = window.getComputedStyle(offsetParent);
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
const transform = style.transform || style.webkitTransform;
|
|
57
|
+
const domMatrix = new DOMMatrix(transform);
|
|
58
|
+
if (domMatrix) {
|
|
63
59
|
left += domMatrix.m41;
|
|
64
60
|
if (offsetParent !== document.body) {
|
|
65
61
|
top += domMatrix.m42;
|
|
@@ -81,18 +77,12 @@ function computeOffset(element, targetParentOffset) {
|
|
|
81
77
|
parentWidth = offsetParent.offsetWidth;
|
|
82
78
|
parentHeight = offsetParent.offsetHeight;
|
|
83
79
|
}
|
|
84
|
-
const right = parentWidth - left - width;
|
|
85
|
-
const bottom = parentHeight - top - height;
|
|
80
|
+
const right = parentWidth - left - rect.width;
|
|
81
|
+
const bottom = parentHeight - top - rect.height;
|
|
86
82
|
return { top, right, bottom, left, width, height };
|
|
87
83
|
}
|
|
88
84
|
/**
|
|
89
85
|
* Popover component.
|
|
90
|
-
* This component displays a popover that can be bound to an element.
|
|
91
|
-
* It supports various positions and can automatically adjust its position based on available space.
|
|
92
|
-
*
|
|
93
|
-
* Notes:
|
|
94
|
-
* - To ensure the positioning algorithm finds the right container when calculating the position, set its container's `position` to `relative`.
|
|
95
|
-
* - Consider manually adjusting the size of the slotted element (using `max-width`, `max-height`, etc...) when its content is "fluid" (like a big 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 that the popover doesn't fit in the available space).
|
|
96
86
|
*
|
|
97
87
|
* @cssprop --z-popover-theme--surface - background color of the popover.
|
|
98
88
|
* @cssprop --z-popover-theme--text - foreground color of the popover.
|
|
@@ -101,8 +91,7 @@ function computeOffset(element, targetParentOffset) {
|
|
|
101
91
|
*/
|
|
102
92
|
export class ZPopover {
|
|
103
93
|
constructor() {
|
|
104
|
-
this.
|
|
105
|
-
this.position = PopoverPosition.TOP;
|
|
94
|
+
this.position = PopoverPosition.AUTO;
|
|
106
95
|
this.open = false;
|
|
107
96
|
this.bindTo = undefined;
|
|
108
97
|
this.showArrow = false;
|
|
@@ -125,18 +114,10 @@ export class ZPopover {
|
|
|
125
114
|
if (!this.closable || !this.open) {
|
|
126
115
|
return;
|
|
127
116
|
}
|
|
128
|
-
|
|
129
|
-
if (!eventPath.includes(this.host)) {
|
|
117
|
+
if (!e.composedPath().includes(this.host)) {
|
|
130
118
|
const target = e.target;
|
|
131
|
-
|
|
132
|
-
if (typeof this.bindTo === "string") {
|
|
133
|
-
triggerElemClicked = !!target.closest(this.bindTo);
|
|
134
|
-
}
|
|
135
|
-
else if (this.bindTo) {
|
|
136
|
-
triggerElemClicked = this.bindTo.contains(target);
|
|
137
|
-
}
|
|
119
|
+
const triggerElemClicked = this.bindTo instanceof HTMLElement ? this.bindTo.contains(target) : target.closest(this.bindTo);
|
|
138
120
|
if (triggerElemClicked) {
|
|
139
|
-
// stop propagation if the click was on the trigger element to prevent close and reopen glitches
|
|
140
121
|
e.stopPropagation();
|
|
141
122
|
}
|
|
142
123
|
this.open = false;
|
|
@@ -144,13 +125,11 @@ export class ZPopover {
|
|
|
144
125
|
}
|
|
145
126
|
}
|
|
146
127
|
validatePosition(newValue) {
|
|
147
|
-
if (!Object.values(PopoverPosition).includes(newValue)
|
|
148
|
-
|
|
128
|
+
if (newValue && !Object.values(PopoverPosition).includes(newValue)) {
|
|
129
|
+
this.position = PopoverPosition.AUTO;
|
|
149
130
|
}
|
|
150
|
-
this.
|
|
151
|
-
this.currentPosition = newValue;
|
|
131
|
+
this.currentPosition = this.position;
|
|
152
132
|
this.positionChange.emit({ position: this.currentPosition });
|
|
153
|
-
this.setPosition();
|
|
154
133
|
}
|
|
155
134
|
/**
|
|
156
135
|
* Setup popover behaviors on opening.
|
|
@@ -164,289 +143,165 @@ export class ZPopover {
|
|
|
164
143
|
this.animationFrameRequestId = requestAnimationFrame(setPosition);
|
|
165
144
|
}
|
|
166
145
|
};
|
|
167
|
-
|
|
168
|
-
setTimeout(() => {
|
|
169
|
-
setPosition();
|
|
170
|
-
}, 0);
|
|
171
|
-
}
|
|
172
|
-
this.openChange.emit({ open: this.open });
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Helper functions for space calculation
|
|
176
|
-
*/
|
|
177
|
-
hasCenteredHorizontalSpace(availableLeft, availableRight, hostWidth, boundWidth, offsetModifier) {
|
|
178
|
-
const requiredSpace = (hostWidth - boundWidth) * (1 - offsetModifier);
|
|
179
|
-
return (availableLeft >= requiredSpace - this.spaceTolerance && availableRight >= requiredSpace - this.spaceTolerance);
|
|
180
|
-
}
|
|
181
|
-
hasCenteredVerticalSpace(availableTop, availableBottom, hostHeight, boundHeight, offsetModifier) {
|
|
182
|
-
const requiredSpace = (hostHeight - boundHeight) * (1 - offsetModifier);
|
|
183
|
-
return (availableTop >= requiredSpace - this.spaceTolerance && availableBottom >= requiredSpace - this.spaceTolerance);
|
|
184
|
-
}
|
|
185
|
-
hasOffsetSpace(availableSpace, hostSize, boundSize, offsetModifier) {
|
|
186
|
-
return availableSpace >= hostSize - boundSize * (1 - offsetModifier) - this.spaceTolerance;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Given a desired position and available space around the bound element, returns the best position
|
|
190
|
-
* that fits the popover, trying all positions if needed.
|
|
191
|
-
* Takes into account offsetModifier for centering.
|
|
192
|
-
* @param desiredPosition The desired position of the popover.
|
|
193
|
-
* @param availableSpace The available space around the bound element.
|
|
194
|
-
* @param boundElemSizes The sizes of the bound element.
|
|
195
|
-
* @param offsetModifier The modifier to apply to the offset for centering.
|
|
196
|
-
*/
|
|
197
|
-
getOptimalPopoverPosition(desiredPosition, availableSpace, boundElemSizes, offsetModifier) {
|
|
198
|
-
const hostWidth = this.host.offsetWidth;
|
|
199
|
-
const hostHeight = this.host.offsetHeight;
|
|
200
|
-
// Check if the desired position has enough space
|
|
201
|
-
const fits = (pos) => {
|
|
202
|
-
switch (pos) {
|
|
203
|
-
case PopoverPosition.TOP:
|
|
204
|
-
return (availableSpace.top >= hostHeight &&
|
|
205
|
-
this.hasCenteredHorizontalSpace(availableSpace.left, availableSpace.right, hostWidth, boundElemSizes.width, offsetModifier));
|
|
206
|
-
case PopoverPosition.TOP_RIGHT:
|
|
207
|
-
return (availableSpace.top >= hostHeight &&
|
|
208
|
-
this.hasOffsetSpace(availableSpace.right, hostWidth, boundElemSizes.width, offsetModifier));
|
|
209
|
-
case PopoverPosition.TOP_LEFT:
|
|
210
|
-
return (availableSpace.top >= hostHeight &&
|
|
211
|
-
this.hasOffsetSpace(availableSpace.left, hostWidth, boundElemSizes.width, offsetModifier));
|
|
212
|
-
case PopoverPosition.RIGHT:
|
|
213
|
-
return (availableSpace.right >= hostWidth &&
|
|
214
|
-
this.hasCenteredVerticalSpace(availableSpace.top, availableSpace.bottom, hostHeight, boundElemSizes.height, offsetModifier));
|
|
215
|
-
case PopoverPosition.RIGHT_BOTTOM:
|
|
216
|
-
return (availableSpace.right >= hostWidth &&
|
|
217
|
-
this.hasOffsetSpace(availableSpace.bottom, hostHeight, boundElemSizes.height, offsetModifier));
|
|
218
|
-
case PopoverPosition.RIGHT_TOP:
|
|
219
|
-
return (availableSpace.right >= hostWidth &&
|
|
220
|
-
this.hasOffsetSpace(availableSpace.top, hostHeight, boundElemSizes.height, offsetModifier));
|
|
221
|
-
case PopoverPosition.BOTTOM:
|
|
222
|
-
return (availableSpace.bottom >= hostHeight &&
|
|
223
|
-
this.hasCenteredHorizontalSpace(availableSpace.left, availableSpace.right, hostWidth, boundElemSizes.width, offsetModifier));
|
|
224
|
-
case PopoverPosition.BOTTOM_LEFT:
|
|
225
|
-
return (availableSpace.bottom >= hostHeight &&
|
|
226
|
-
this.hasOffsetSpace(availableSpace.left, hostWidth, boundElemSizes.width, offsetModifier));
|
|
227
|
-
case PopoverPosition.BOTTOM_RIGHT:
|
|
228
|
-
return (availableSpace.bottom >= hostHeight &&
|
|
229
|
-
this.hasOffsetSpace(availableSpace.right, hostWidth, boundElemSizes.width, offsetModifier));
|
|
230
|
-
case PopoverPosition.LEFT:
|
|
231
|
-
return (availableSpace.left >= hostWidth &&
|
|
232
|
-
this.hasCenteredVerticalSpace(availableSpace.top, availableSpace.bottom, hostHeight, boundElemSizes.height, offsetModifier));
|
|
233
|
-
case PopoverPosition.LEFT_TOP:
|
|
234
|
-
return (availableSpace.left >= hostWidth &&
|
|
235
|
-
this.hasOffsetSpace(availableSpace.top, hostHeight, boundElemSizes.height, offsetModifier));
|
|
236
|
-
case PopoverPosition.LEFT_BOTTOM:
|
|
237
|
-
return (availableSpace.left >= hostWidth &&
|
|
238
|
-
this.hasOffsetSpace(availableSpace.bottom, hostHeight, boundElemSizes.height, offsetModifier));
|
|
239
|
-
default:
|
|
240
|
-
return false;
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
// Check desired position first
|
|
244
|
-
if (fits(desiredPosition)) {
|
|
245
|
-
return desiredPosition;
|
|
146
|
+
setPosition();
|
|
246
147
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
if (startIndex === -1) {
|
|
251
|
-
return desiredPosition; // fallback if position not found
|
|
148
|
+
else if (this.host.hasAttribute("current-position")) {
|
|
149
|
+
this.host.removeAttribute("current-position");
|
|
150
|
+
this.currentPosition = undefined;
|
|
252
151
|
}
|
|
253
|
-
|
|
254
|
-
for (let i = 1; i < positions.length; i++) {
|
|
255
|
-
const posIndex = (startIndex + i) % positions.length;
|
|
256
|
-
const pos = positions[posIndex];
|
|
257
|
-
if (fits(pos)) {
|
|
258
|
-
return pos;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
// If no position fits, find the best fallback based on available space
|
|
262
|
-
return this.findBestFallbackPosition(availableSpace);
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* Find the best fallback position based on available space when no position fits perfectly
|
|
266
|
-
*/
|
|
267
|
-
findBestFallbackPosition(availableSpace) {
|
|
268
|
-
// Determine the directions with the most space
|
|
269
|
-
const bestHorizontalDirection = availableSpace.right >= availableSpace.left ? PopoverPosition.RIGHT : PopoverPosition.LEFT;
|
|
270
|
-
const bestVerticalDirection = availableSpace.bottom >= availableSpace.top ? PopoverPosition.BOTTOM : PopoverPosition.TOP;
|
|
271
|
-
// Choose the main direction based on which has more space
|
|
272
|
-
const maxHorizontalSpace = Math.max(availableSpace.right, availableSpace.left);
|
|
273
|
-
const maxVerticalSpace = Math.max(availableSpace.bottom, availableSpace.top);
|
|
274
|
-
const mainDirection = maxVerticalSpace >= maxHorizontalSpace ? bestVerticalDirection : bestHorizontalDirection;
|
|
275
|
-
// Check if secondary direction is necessary
|
|
276
|
-
// Only add secondary direction if the difference between min and max in that direction is at least double
|
|
277
|
-
let needsSecondaryDirection = false;
|
|
278
|
-
if (mainDirection === bestVerticalDirection) {
|
|
279
|
-
// Main direction is vertical, check horizontal space difference
|
|
280
|
-
const minHorizontalSpace = Math.min(availableSpace.right, availableSpace.left);
|
|
281
|
-
needsSecondaryDirection = maxHorizontalSpace >= minHorizontalSpace * 2;
|
|
282
|
-
}
|
|
283
|
-
else {
|
|
284
|
-
// Main direction is horizontal, check vertical space difference
|
|
285
|
-
const minVerticalSpace = Math.min(availableSpace.bottom, availableSpace.top);
|
|
286
|
-
needsSecondaryDirection = maxVerticalSpace >= minVerticalSpace * 2;
|
|
287
|
-
}
|
|
288
|
-
if (!needsSecondaryDirection) {
|
|
289
|
-
return mainDirection;
|
|
290
|
-
}
|
|
291
|
-
const secondaryDirection = mainDirection === bestVerticalDirection ? bestHorizontalDirection : bestVerticalDirection;
|
|
292
|
-
// Create a combined position (e.g., "bottom_right")
|
|
293
|
-
return `${mainDirection}_${secondaryDirection}`;
|
|
294
|
-
}
|
|
295
|
-
/**
|
|
296
|
-
* Calculate available space around the bound element
|
|
297
|
-
*/
|
|
298
|
-
calculateAvailableSpace(boundElementRect, scrollContainer, scrollingBoundingRect) {
|
|
299
|
-
const top = boundElementRect.top - scrollContainer.scrollTop;
|
|
300
|
-
const bottom = scrollingBoundingRect.height - (boundElementRect.top + boundElementRect.height) + scrollContainer.scrollTop;
|
|
301
|
-
const left = boundElementRect.left - scrollContainer.scrollLeft;
|
|
302
|
-
const right = scrollingBoundingRect.width - (boundElementRect.left + boundElementRect.width) + scrollContainer.scrollLeft;
|
|
303
|
-
const overflowBottom = Math.max(0, scrollingBoundingRect.top + scrollingBoundingRect.height - window.innerHeight);
|
|
304
|
-
const overflowRight = Math.max(0, scrollingBoundingRect.left + scrollingBoundingRect.width - window.innerWidth);
|
|
305
|
-
return {
|
|
306
|
-
top: Math.min(top, top + scrollingBoundingRect.top),
|
|
307
|
-
bottom: Math.min(bottom, bottom - overflowBottom),
|
|
308
|
-
left: Math.min(left, left + scrollingBoundingRect.left),
|
|
309
|
-
right: Math.min(right, right - overflowRight),
|
|
310
|
-
};
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* Calculate relative offsets for positioning
|
|
314
|
-
*/
|
|
315
|
-
calculateRelativeOffsets(boundElementRect, relativeBoundingRect) {
|
|
316
|
-
return {
|
|
317
|
-
top: boundElementRect.top - relativeBoundingRect.top,
|
|
318
|
-
right: boundElementRect.right - relativeBoundingRect.right,
|
|
319
|
-
bottom: boundElementRect.bottom - relativeBoundingRect.bottom,
|
|
320
|
-
left: boundElementRect.left - relativeBoundingRect.left,
|
|
321
|
-
};
|
|
152
|
+
this.openChange.emit({ open: this.open });
|
|
322
153
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
*/
|
|
326
|
-
applyPositionStyles(position, style, offsets, boundElementSizes, availableSpace, offsetModifier, arrowModifier) {
|
|
327
|
-
const distanceFromBound = 8; // 8px is the distance of the popover from the bound element
|
|
328
|
-
// Reset all positioning properties
|
|
329
|
-
style.top = "auto";
|
|
330
|
-
style.right = "auto";
|
|
331
|
-
style.bottom = "auto";
|
|
332
|
-
style.left = "auto";
|
|
333
|
-
style.maxWidth = "";
|
|
334
|
-
style.maxHeight = "";
|
|
335
|
-
switch (position) {
|
|
336
|
-
case PopoverPosition.TOP:
|
|
337
|
-
case PopoverPosition.TOP_RIGHT:
|
|
338
|
-
style.bottom = `${offsets.bottom + boundElementSizes.height}px`;
|
|
339
|
-
style.left = `${offsets.left + boundElementSizes.width * offsetModifier - (position === PopoverPosition.TOP_RIGHT ? arrowModifier : 0)}px`;
|
|
340
|
-
style.maxHeight = `${availableSpace.top - distanceFromBound}px`;
|
|
341
|
-
if (position === PopoverPosition.TOP_RIGHT) {
|
|
342
|
-
style.maxWidth = `${availableSpace.right + boundElementSizes.width * offsetModifier}px`;
|
|
343
|
-
}
|
|
344
|
-
break;
|
|
345
|
-
case PopoverPosition.TOP_LEFT:
|
|
346
|
-
style.right = `${offsets.right + boundElementSizes.width * offsetModifier - arrowModifier}px`;
|
|
347
|
-
style.bottom = `${offsets.bottom + boundElementSizes.height}px`;
|
|
348
|
-
style.maxWidth = `${availableSpace.left}px`;
|
|
349
|
-
style.maxHeight = `${availableSpace.top - distanceFromBound}px`;
|
|
350
|
-
break;
|
|
351
|
-
case PopoverPosition.BOTTOM:
|
|
352
|
-
case PopoverPosition.BOTTOM_RIGHT:
|
|
353
|
-
style.top = `${offsets.top + boundElementSizes.height}px`;
|
|
354
|
-
style.left = `${offsets.left + boundElementSizes.width * offsetModifier - (position === PopoverPosition.BOTTOM_RIGHT ? arrowModifier : 0)}px`;
|
|
355
|
-
style.maxHeight = `${availableSpace.bottom - distanceFromBound}px`;
|
|
356
|
-
if (position === PopoverPosition.BOTTOM_RIGHT) {
|
|
357
|
-
style.maxWidth = `${availableSpace.right + boundElementSizes.width * offsetModifier}px`;
|
|
358
|
-
}
|
|
359
|
-
break;
|
|
360
|
-
case PopoverPosition.BOTTOM_LEFT:
|
|
361
|
-
style.top = `${offsets.top + boundElementSizes.height}px`;
|
|
362
|
-
style.right = `${offsets.right + boundElementSizes.width * offsetModifier - arrowModifier}px`;
|
|
363
|
-
style.maxWidth = `${availableSpace.left}px`;
|
|
364
|
-
style.maxHeight = `${availableSpace.bottom - distanceFromBound}px`;
|
|
365
|
-
break;
|
|
366
|
-
case PopoverPosition.RIGHT:
|
|
367
|
-
case PopoverPosition.RIGHT_BOTTOM:
|
|
368
|
-
style.top = `${offsets.top + boundElementSizes.height * offsetModifier - (position === PopoverPosition.RIGHT_BOTTOM ? arrowModifier : 0)}px`;
|
|
369
|
-
style.left = `${offsets.left + boundElementSizes.width}px`;
|
|
370
|
-
style.maxWidth = `${availableSpace.right - distanceFromBound}px`;
|
|
371
|
-
if (position === PopoverPosition.RIGHT) {
|
|
372
|
-
style.maxHeight = `${Math.min(availableSpace.top + availableSpace.bottom + boundElementSizes.height, window.innerHeight - 20)}px`;
|
|
373
|
-
}
|
|
374
|
-
else {
|
|
375
|
-
style.maxHeight = `${availableSpace.bottom + boundElementSizes.height * offsetModifier}px`;
|
|
376
|
-
}
|
|
377
|
-
break;
|
|
378
|
-
case PopoverPosition.RIGHT_TOP:
|
|
379
|
-
style.bottom = `${offsets.bottom + boundElementSizes.height * offsetModifier - arrowModifier}px`;
|
|
380
|
-
style.left = `${offsets.left + boundElementSizes.width}px`;
|
|
381
|
-
style.maxWidth = `${availableSpace.right - distanceFromBound}px`;
|
|
382
|
-
if (position === PopoverPosition.RIGHT_TOP) {
|
|
383
|
-
style.maxHeight = `${availableSpace.top + boundElementSizes.height * offsetModifier}px`;
|
|
384
|
-
}
|
|
385
|
-
break;
|
|
386
|
-
case PopoverPosition.LEFT:
|
|
387
|
-
case PopoverPosition.LEFT_BOTTOM:
|
|
388
|
-
style.top = `${offsets.top + boundElementSizes.height * offsetModifier - (position === PopoverPosition.LEFT_BOTTOM ? arrowModifier : 0)}px`;
|
|
389
|
-
style.right = `${offsets.right + boundElementSizes.width}px`;
|
|
390
|
-
style.maxWidth = `${availableSpace.left - distanceFromBound}px`;
|
|
391
|
-
if (position === PopoverPosition.LEFT_BOTTOM) {
|
|
392
|
-
style.maxHeight = `${availableSpace.bottom + boundElementSizes.height * offsetModifier}px`;
|
|
393
|
-
}
|
|
394
|
-
break;
|
|
395
|
-
case PopoverPosition.LEFT_TOP:
|
|
396
|
-
style.right = `${offsets.right + boundElementSizes.width}px`;
|
|
397
|
-
style.bottom = `${offsets.bottom + boundElementSizes.height * offsetModifier - arrowModifier}px`;
|
|
398
|
-
style.maxWidth = `${availableSpace.left - distanceFromBound}px`;
|
|
399
|
-
if (position === PopoverPosition.LEFT_TOP) {
|
|
400
|
-
style.maxHeight = `${availableSpace.top + boundElementSizes.height * offsetModifier}px`;
|
|
401
|
-
}
|
|
402
|
-
break;
|
|
403
|
-
}
|
|
154
|
+
disconnectedCallback() {
|
|
155
|
+
cancelAnimationFrame(this.animationFrameRequestId);
|
|
404
156
|
}
|
|
405
157
|
/**
|
|
406
158
|
* Set the position of the popover.
|
|
407
159
|
*/
|
|
408
160
|
setPosition() {
|
|
409
|
-
let
|
|
161
|
+
let element;
|
|
410
162
|
if (typeof this.bindTo === "string") {
|
|
411
|
-
|
|
163
|
+
element = this.host.ownerDocument.querySelector(this.bindTo);
|
|
412
164
|
}
|
|
413
165
|
else if (this.bindTo) {
|
|
414
|
-
|
|
166
|
+
element = this.bindTo;
|
|
415
167
|
}
|
|
416
168
|
else {
|
|
417
|
-
|
|
169
|
+
element = this.host.parentElement;
|
|
418
170
|
}
|
|
419
|
-
if (!
|
|
171
|
+
if (!element) {
|
|
420
172
|
return;
|
|
421
173
|
}
|
|
422
|
-
const scrollContainer = findScrollableParent(
|
|
174
|
+
const scrollContainer = findScrollableParent(element);
|
|
423
175
|
const scrollingBoundingRect = scrollContainer.getBoundingClientRect();
|
|
424
176
|
const offsetContainer = this.host.offsetParent;
|
|
425
177
|
const relativeBoundingRect = offsetContainer
|
|
426
178
|
? computeOffset(offsetContainer, scrollContainer)
|
|
427
179
|
: { top: 0, right: 0, bottom: 0, left: 0 };
|
|
428
|
-
const
|
|
429
|
-
const
|
|
430
|
-
const
|
|
431
|
-
const
|
|
432
|
-
const
|
|
433
|
-
const
|
|
180
|
+
const boundingRect = computeOffset(element, scrollContainer);
|
|
181
|
+
const top = boundingRect.top - scrollContainer.scrollTop;
|
|
182
|
+
const bottom = scrollingBoundingRect.height - (boundingRect.top + boundingRect.height) + scrollContainer.scrollTop;
|
|
183
|
+
const left = boundingRect.left - scrollContainer.scrollLeft;
|
|
184
|
+
const right = scrollingBoundingRect.width - (boundingRect.left + boundingRect.width) + scrollContainer.scrollLeft;
|
|
185
|
+
const overflowBottom = Math.max(0, scrollingBoundingRect.top + scrollingBoundingRect.height - window.innerHeight);
|
|
186
|
+
const overflowRight = Math.max(0, scrollingBoundingRect.left + scrollingBoundingRect.width - window.innerWidth);
|
|
187
|
+
const availableTop = Math.min(top, top + scrollingBoundingRect.top);
|
|
188
|
+
const availableBottom = Math.min(bottom, bottom - overflowBottom);
|
|
189
|
+
const availableLeft = Math.min(left, left + scrollingBoundingRect.left);
|
|
190
|
+
const availableRight = Math.min(right, right - overflowRight);
|
|
191
|
+
const availableHeight = availableTop + availableBottom + boundingRect.height;
|
|
192
|
+
const availableWidth = availableLeft + availableRight + boundingRect.width;
|
|
193
|
+
let position = this.currentPosition;
|
|
194
|
+
const positions = [];
|
|
195
|
+
if (this.position === PopoverPosition.AUTO) {
|
|
196
|
+
/**
|
|
197
|
+
* The `AUTO` position tries to place the popover in the 'safest' area,
|
|
198
|
+
* where there's more space available.
|
|
199
|
+
*/
|
|
200
|
+
if (availableLeft / availableWidth > 0.6) {
|
|
201
|
+
positions.push(PopoverPosition.LEFT);
|
|
202
|
+
}
|
|
203
|
+
else if (availableLeft / availableWidth < 0.4) {
|
|
204
|
+
positions.push(PopoverPosition.RIGHT);
|
|
205
|
+
}
|
|
206
|
+
if (availableTop / availableHeight > 0.9) {
|
|
207
|
+
positions.unshift(PopoverPosition.TOP);
|
|
208
|
+
}
|
|
209
|
+
else if (availableTop / availableHeight > 0.6) {
|
|
210
|
+
positions.push(PopoverPosition.TOP);
|
|
211
|
+
}
|
|
212
|
+
else if (availableTop / availableHeight < 0.1) {
|
|
213
|
+
positions.unshift(PopoverPosition.BOTTOM);
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
positions.push(PopoverPosition.BOTTOM);
|
|
217
|
+
}
|
|
218
|
+
position = positions.join("_");
|
|
219
|
+
}
|
|
434
220
|
const style = this.host.style;
|
|
435
|
-
|
|
436
|
-
|
|
221
|
+
style.position = "absolute";
|
|
222
|
+
const offsetTop = boundingRect.top - relativeBoundingRect.top;
|
|
223
|
+
const offsetRight = boundingRect.right - relativeBoundingRect.right;
|
|
224
|
+
const offsetBottom = boundingRect.bottom - relativeBoundingRect.bottom;
|
|
225
|
+
const offsetLeft = boundingRect.left - relativeBoundingRect.left;
|
|
226
|
+
const offsetModifier = this.center ? 0.5 : 0;
|
|
227
|
+
const sizeModifier = this.center ? 0.5 : 0;
|
|
228
|
+
if (position === PopoverPosition.TOP || position === PopoverPosition.TOP_RIGHT) {
|
|
229
|
+
style.top = "auto";
|
|
230
|
+
style.right = "auto";
|
|
231
|
+
style.bottom = `${offsetBottom + boundingRect.height}px`;
|
|
232
|
+
style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
|
|
233
|
+
style.maxHeight = `${availableTop}px`;
|
|
234
|
+
if (position === PopoverPosition.TOP_RIGHT) {
|
|
235
|
+
style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
else if (position === PopoverPosition.TOP_LEFT) {
|
|
239
|
+
style.top = "auto";
|
|
240
|
+
style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;
|
|
241
|
+
style.bottom = `${offsetBottom + boundingRect.height}px`;
|
|
242
|
+
style.left = "auto";
|
|
243
|
+
style.maxWidth = `${availableLeft}px`;
|
|
244
|
+
style.maxHeight = `${availableTop}px`;
|
|
245
|
+
}
|
|
246
|
+
else if (position === PopoverPosition.BOTTOM || position === PopoverPosition.BOTTOM_RIGHT) {
|
|
247
|
+
style.top = `${offsetTop + boundingRect.height}px`;
|
|
248
|
+
style.right = "auto";
|
|
249
|
+
style.bottom = "auto";
|
|
250
|
+
style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
|
|
251
|
+
style.maxHeight = `${availableBottom}px`;
|
|
252
|
+
if (position === PopoverPosition.BOTTOM_RIGHT) {
|
|
253
|
+
style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
else if (position === PopoverPosition.BOTTOM_LEFT) {
|
|
257
|
+
style.top = `${offsetTop + boundingRect.height}px`;
|
|
258
|
+
style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;
|
|
259
|
+
style.bottom = "auto";
|
|
260
|
+
style.left = "auto";
|
|
261
|
+
style.maxWidth = `${availableLeft}px`;
|
|
262
|
+
style.maxHeight = `${availableBottom}px`;
|
|
263
|
+
}
|
|
264
|
+
else if (position === PopoverPosition.RIGHT || position === PopoverPosition.RIGHT_BOTTOM) {
|
|
265
|
+
style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
|
|
266
|
+
style.right = "auto";
|
|
267
|
+
style.bottom = "auto";
|
|
268
|
+
style.left = `${offsetLeft + boundingRect.width}px`;
|
|
269
|
+
style.maxWidth = `${availableRight}px`;
|
|
270
|
+
style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
|
|
271
|
+
}
|
|
272
|
+
else if (position === PopoverPosition.RIGHT_TOP) {
|
|
273
|
+
style.top = "auto";
|
|
274
|
+
style.right = "auto";
|
|
275
|
+
style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;
|
|
276
|
+
style.left = `${offsetLeft + boundingRect.width}px`;
|
|
277
|
+
style.maxWidth = `${availableRight}px`;
|
|
278
|
+
style.maxHeight = `${availableTop + boundingRect.height * sizeModifier}px`;
|
|
279
|
+
}
|
|
280
|
+
else if (position === PopoverPosition.LEFT || position === PopoverPosition.LEFT_BOTTOM) {
|
|
281
|
+
style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
|
|
282
|
+
style.right = `${offsetRight + boundingRect.width}px`;
|
|
283
|
+
style.bottom = "auto";
|
|
284
|
+
style.left = "auto";
|
|
285
|
+
style.maxWidth = `${availableLeft}px`;
|
|
286
|
+
style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
|
|
287
|
+
}
|
|
288
|
+
else if (position === PopoverPosition.LEFT_TOP) {
|
|
289
|
+
style.top = "auto";
|
|
290
|
+
style.right = `${offsetRight + boundingRect.width}px`;
|
|
291
|
+
style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;
|
|
292
|
+
style.left = "auto";
|
|
293
|
+
style.maxWidth = `${availableLeft}px`;
|
|
294
|
+
style.maxHeight = `${availableTop + boundingRect.height * sizeModifier}px`;
|
|
295
|
+
}
|
|
296
|
+
this.currentPosition = position || this.position;
|
|
297
|
+
this.host.setAttribute("current-position", this.currentPosition);
|
|
437
298
|
}
|
|
438
299
|
componentWillLoad() {
|
|
439
300
|
this.validatePosition(this.position);
|
|
440
301
|
this.onOpen();
|
|
441
302
|
}
|
|
442
|
-
componentDidLoad() {
|
|
443
|
-
this.setPosition();
|
|
444
|
-
}
|
|
445
|
-
disconnectedCallback() {
|
|
446
|
-
cancelAnimationFrame(this.animationFrameRequestId);
|
|
447
|
-
}
|
|
448
303
|
render() {
|
|
449
|
-
return
|
|
304
|
+
return h("slot", { key: 'f7f6f81dc2698b5d560503a984dcd47e377de0bc' });
|
|
450
305
|
}
|
|
451
306
|
static get is() { return "z-popover"; }
|
|
452
307
|
static get encapsulation() { return "shadow"; }
|
|
@@ -464,7 +319,7 @@ export class ZPopover {
|
|
|
464
319
|
return {
|
|
465
320
|
"position": {
|
|
466
321
|
"type": "string",
|
|
467
|
-
"mutable":
|
|
322
|
+
"mutable": false,
|
|
468
323
|
"complexType": {
|
|
469
324
|
"original": "PopoverPosition",
|
|
470
325
|
"resolved": "PopoverPosition.AUTO | PopoverPosition.BOTTOM | PopoverPosition.BOTTOM_LEFT | PopoverPosition.BOTTOM_RIGHT | PopoverPosition.LEFT | PopoverPosition.LEFT_BOTTOM | PopoverPosition.LEFT_TOP | PopoverPosition.RIGHT | PopoverPosition.RIGHT_BOTTOM | PopoverPosition.RIGHT_TOP | PopoverPosition.TOP | PopoverPosition.TOP_LEFT | PopoverPosition.TOP_RIGHT",
|
|
@@ -477,14 +332,14 @@ export class ZPopover {
|
|
|
477
332
|
}
|
|
478
333
|
},
|
|
479
334
|
"required": false,
|
|
480
|
-
"optional":
|
|
335
|
+
"optional": false,
|
|
481
336
|
"docs": {
|
|
482
337
|
"tags": [],
|
|
483
|
-
"text": "
|
|
338
|
+
"text": "Popover position."
|
|
484
339
|
},
|
|
485
340
|
"attribute": "position",
|
|
486
341
|
"reflect": true,
|
|
487
|
-
"defaultValue": "PopoverPosition.
|
|
342
|
+
"defaultValue": "PopoverPosition.AUTO"
|
|
488
343
|
},
|
|
489
344
|
"open": {
|
|
490
345
|
"type": "boolean",
|
|
@@ -646,19 +501,4 @@ export class ZPopover {
|
|
|
646
501
|
}];
|
|
647
502
|
}
|
|
648
503
|
}
|
|
649
|
-
// Clockwise order of positions.
|
|
650
|
-
ZPopover.positionOrder = [
|
|
651
|
-
PopoverPosition.TOP_RIGHT,
|
|
652
|
-
PopoverPosition.TOP,
|
|
653
|
-
PopoverPosition.TOP_LEFT,
|
|
654
|
-
PopoverPosition.RIGHT_BOTTOM,
|
|
655
|
-
PopoverPosition.RIGHT,
|
|
656
|
-
PopoverPosition.RIGHT_TOP,
|
|
657
|
-
PopoverPosition.BOTTOM_LEFT,
|
|
658
|
-
PopoverPosition.BOTTOM,
|
|
659
|
-
PopoverPosition.BOTTOM_RIGHT,
|
|
660
|
-
PopoverPosition.LEFT_TOP,
|
|
661
|
-
PopoverPosition.LEFT,
|
|
662
|
-
PopoverPosition.LEFT_BOTTOM,
|
|
663
|
-
];
|
|
664
504
|
//# sourceMappingURL=index.js.map
|