@zanichelli/albe-web-components 4.1.0 → 4.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 +1788 -0
- package/dist/cjs/{index-6b6a3299.js → index-0e75c8cc.js} +16 -45
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/utils-155eec04.js +2706 -0
- package/dist/cjs/{utils-8cc414c9.js → utils-97262bbd.js} +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-app-switcher_9.cjs.entry.js +736 -0
- 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-button-deprecated.cjs.entry.js +1 -1
- package/dist/cjs/z-button.cjs.entry.js +44 -0
- package/dist/cjs/z-card.cjs.entry.js +69 -0
- package/dist/cjs/z-carousel.cjs.entry.js +24 -0
- package/dist/cjs/z-chip.cjs.entry.js +2 -2
- package/dist/cjs/z-combobox.cjs.entry.js +2 -2
- package/dist/cjs/z-contextual-menu.cjs.entry.js +18 -7
- package/dist/cjs/z-cookiebar.cjs.entry.js +1 -1
- package/dist/cjs/z-date-picker.cjs.entry.js +10 -2701
- package/dist/cjs/z-file-upload.cjs.entry.js +2 -2
- package/dist/cjs/z-file.cjs.entry.js +10 -9
- package/dist/cjs/z-footer.cjs.entry.js +1 -1
- package/dist/cjs/z-ghost-loading.cjs.entry.js +19 -0
- package/dist/cjs/z-input-deprecated.cjs.entry.js +2 -2
- package/dist/cjs/z-input-label_2.cjs.entry.js +2 -2
- package/dist/cjs/z-list-group.cjs.entry.js +1 -1
- package/dist/cjs/z-list_2.cjs.entry.js +1 -1
- package/dist/cjs/z-menu-dropdown_2.cjs.entry.js +2 -2
- package/dist/cjs/z-messages-pocket.cjs.entry.js +1 -1
- package/dist/cjs/z-modal-login.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-info.cjs.entry.js +4 -4
- package/dist/cjs/z-myz-card_4.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-list-item.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-topbar.cjs.entry.js +1 -1
- package/dist/cjs/z-navigation-tab-link.cjs.entry.js +1 -1
- package/dist/cjs/z-navigation-tab.cjs.entry.js +1 -1
- package/dist/cjs/z-navigation-tabs.cjs.entry.js +1 -1
- package/dist/cjs/z-offcanvas.cjs.entry.js +63 -0
- package/dist/cjs/z-otp.cjs.entry.js +1 -1
- package/dist/cjs/z-pagination-bar.cjs.entry.js +2 -2
- package/dist/cjs/z-pocket_3.cjs.entry.js +2 -2
- package/dist/cjs/z-popover-deprecated.cjs.entry.js +338 -0
- package/dist/cjs/z-popover.cjs.entry.js +304 -97
- package/dist/cjs/z-section-title.cjs.entry.js +1 -1
- package/dist/cjs/z-skip-to-content.cjs.entry.js +2 -2
- package/dist/cjs/z-slideshow.cjs.entry.js +2 -2
- package/dist/cjs/z-status-tag.cjs.entry.js +1 -1
- package/dist/cjs/z-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/z-table-header.cjs.entry.js +8 -11
- package/dist/cjs/z-table-row.cjs.entry.js +1 -1
- package/dist/cjs/z-table.cjs.entry.js +1 -1
- package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
- package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
- package/dist/cjs/z-toggle-switch.cjs.entry.js +2 -2
- package/dist/cjs/z-tooltip-deprecated.cjs.entry.js +274 -0
- package/dist/cjs/z-tooltip.cjs.entry.js +8 -251
- package/dist/collection/beans/index.js +16 -45
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/{z-date-picker → date-picker}/styles.css +69 -17
- package/dist/collection/components/date-picker/utils.js +76 -0
- package/dist/collection/components/{z-date-picker → date-picker/z-date-picker}/index.js +13 -84
- package/dist/collection/components/date-picker/z-range-picker/index.js +483 -0
- package/dist/collection/components/file-upload/z-file/index.js +13 -13
- package/dist/collection/components/file-upload/z-file/styles.css +2 -2
- package/dist/collection/components/notification/z-tooltip/index.js +45 -298
- package/dist/collection/components/notification/z-tooltip/styles.css +8 -120
- package/dist/collection/components/z-contextual-menu/index.js +26 -16
- package/dist/collection/components/z-contextual-menu/styles.css +16 -5
- package/dist/collection/components/z-popover/index.js +381 -166
- package/dist/collection/components/z-popover/styles.css +91 -180
- package/dist/collection/components/z-table/z-table-header/index.js +10 -16
- package/dist/collection/components/z-table/z-table-header/styles.css +7 -1
- package/dist/collection/deprecated/z-popover-deprecated/index.js +489 -0
- package/dist/collection/deprecated/z-popover-deprecated/styles.css +134 -0
- package/dist/collection/deprecated/z-tooltip-deprecated/index.js +379 -0
- package/dist/collection/deprecated/z-tooltip-deprecated/styles.css +128 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +2 -2
- package/dist/collection/snowflakes/myz/card/z-myz-card-info/styles.css +1 -1
- package/dist/esm/{index-46ca649a.js → index-c1ce8cab.js} +17 -46
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-5d5963ef.js → utils-99c70c57.js} +2 -2
- package/dist/esm/utils-fa9f38ec.js +2701 -0
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-app-switcher_9.entry.js +724 -0
- package/dist/esm/z-aria-alert.entry.js +1 -1
- package/dist/esm/z-avatar.entry.js +1 -1
- package/dist/esm/z-button-deprecated.entry.js +1 -1
- package/dist/esm/z-button.entry.js +40 -0
- package/dist/esm/z-card.entry.js +65 -0
- package/dist/esm/z-carousel.entry.js +20 -0
- package/dist/esm/z-chip.entry.js +2 -2
- package/dist/esm/z-combobox.entry.js +2 -2
- package/dist/esm/z-contextual-menu.entry.js +19 -8
- package/dist/esm/z-cookiebar.entry.js +1 -1
- package/dist/esm/z-date-picker.entry.js +9 -2700
- package/dist/esm/z-file-upload.entry.js +2 -2
- package/dist/esm/z-file.entry.js +10 -9
- package/dist/esm/z-footer.entry.js +1 -1
- package/dist/esm/z-ghost-loading.entry.js +15 -0
- package/dist/esm/z-input-deprecated.entry.js +2 -2
- package/dist/esm/z-input-label_2.entry.js +2 -2
- package/dist/esm/z-list-group.entry.js +1 -1
- package/dist/esm/z-list_2.entry.js +1 -1
- package/dist/esm/z-menu-dropdown_2.entry.js +2 -2
- package/dist/esm/z-messages-pocket.entry.js +1 -1
- package/dist/esm/z-modal-login.entry.js +1 -1
- package/dist/esm/z-myz-card-alert.entry.js +1 -1
- package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
- package/dist/esm/z-myz-card-footer.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +4 -4
- package/dist/esm/z-myz-card_4.entry.js +1 -1
- package/dist/esm/z-myz-list-item.entry.js +2 -2
- package/dist/esm/z-myz-topbar.entry.js +1 -1
- package/dist/esm/z-navigation-tab-link.entry.js +1 -1
- package/dist/esm/z-navigation-tab.entry.js +1 -1
- package/dist/esm/z-navigation-tabs.entry.js +1 -1
- package/dist/esm/z-offcanvas.entry.js +59 -0
- package/dist/esm/z-otp.entry.js +1 -1
- package/dist/esm/z-pagination-bar.entry.js +2 -2
- package/dist/esm/z-pocket_3.entry.js +2 -2
- package/dist/esm/z-popover-deprecated.entry.js +334 -0
- package/dist/esm/z-popover.entry.js +305 -98
- package/dist/esm/z-section-title.entry.js +1 -1
- package/dist/esm/z-skip-to-content.entry.js +2 -2
- package/dist/esm/z-slideshow.entry.js +2 -2
- package/dist/esm/z-status-tag.entry.js +1 -1
- package/dist/esm/z-table-cell.entry.js +1 -1
- package/dist/esm/z-table-header.entry.js +8 -11
- package/dist/esm/z-table-row.entry.js +1 -1
- package/dist/esm/z-table.entry.js +1 -1
- package/dist/esm/z-toast-notification-list.entry.js +1 -1
- package/dist/esm/z-toast-notification.entry.js +1 -1
- package/dist/esm/z-toggle-switch.entry.js +2 -2
- package/dist/esm/z-tooltip-deprecated.entry.js +270 -0
- package/dist/esm/z-tooltip.entry.js +9 -252
- package/dist/types/beans/index.d.ts +7 -33
- package/dist/types/components/date-picker/utils.d.ts +3 -0
- package/dist/types/components/{z-date-picker → date-picker/z-date-picker}/index.d.ts +3 -8
- package/dist/types/components/date-picker/z-range-picker/index.d.ts +43 -0
- package/dist/types/components/file-upload/z-file/index.d.ts +3 -3
- package/dist/types/components/notification/z-tooltip/index.d.ts +14 -29
- package/dist/types/components/z-contextual-menu/index.d.ts +8 -4
- package/dist/types/components/z-popover/index.d.ts +57 -28
- package/dist/types/components/z-table/z-table-header/index.d.ts +2 -1
- package/dist/types/components.d.ts +210 -35
- package/dist/types/deprecated/z-popover-deprecated/index.d.ts +57 -0
- package/dist/types/deprecated/z-tooltip-deprecated/index.d.ts +41 -0
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/{p-4af112a7.entry.js → p-053846df.entry.js} +1 -1
- package/dist/web-components-library/{p-e2102da3.entry.js → p-0f6edb58.entry.js} +1 -1
- package/dist/web-components-library/p-10be0462.entry.js +1 -0
- package/dist/web-components-library/{p-b15efba3.entry.js → p-15fa8ca4.entry.js} +1 -1
- package/dist/web-components-library/{p-02ea7e49.entry.js → p-1a76a57d.entry.js} +1 -1
- package/{www/build/p-1f73a6d8.entry.js → dist/web-components-library/p-1b1717c9.entry.js} +1 -1
- package/{www/build/p-3edbd35c.entry.js → dist/web-components-library/p-1d5aa37b.entry.js} +1 -1
- package/dist/web-components-library/{p-9074e1a5.entry.js → p-1eb357e8.entry.js} +1 -1
- package/dist/web-components-library/{p-57d1acdc.entry.js → p-28e4abc4.entry.js} +1 -1
- package/dist/web-components-library/p-41f33f7b.entry.js +1 -0
- package/dist/web-components-library/{p-d33fea26.entry.js → p-46aecb12.entry.js} +1 -1
- package/dist/web-components-library/{p-63ccb013.entry.js → p-4be52491.entry.js} +1 -1
- package/dist/web-components-library/{p-55ddbfe9.entry.js → p-4d6f2f01.entry.js} +1 -1
- package/dist/web-components-library/p-514719d2.entry.js +1 -0
- package/dist/web-components-library/p-53dade4b.entry.js +16 -0
- package/{www/build/p-df4e963b.entry.js → dist/web-components-library/p-55f09348.entry.js} +1 -1
- package/dist/web-components-library/p-5789bbe7.entry.js +1 -0
- package/dist/web-components-library/{p-de25c7f0.entry.js → p-5dcbba4e.entry.js} +1 -1
- package/dist/web-components-library/{p-9f9e4266.entry.js → p-659fc25e.entry.js} +1 -1
- package/dist/web-components-library/{p-8fbc2ce9.entry.js → p-6bbd53ec.entry.js} +1 -1
- package/dist/web-components-library/{p-5be162d5.entry.js → p-6c52ed1b.entry.js} +1 -1
- package/dist/web-components-library/p-78df5dbf.entry.js +1 -0
- package/dist/web-components-library/{p-b9da171f.js → p-7f1cc90f.js} +1 -1
- package/dist/web-components-library/{p-0f17db30.entry.js → p-805af37b.entry.js} +1 -1
- package/dist/web-components-library/p-870dabdc.entry.js +1 -0
- package/dist/web-components-library/{p-43329b81.entry.js → p-897f9491.entry.js} +1 -1
- package/dist/web-components-library/{p-3c111c2a.entry.js → p-8ce4b2c4.entry.js} +1 -1
- package/dist/web-components-library/p-8cf3798f.entry.js +1 -0
- package/dist/web-components-library/p-8ddbbe24.entry.js +1 -0
- package/dist/web-components-library/{p-dffdf60a.entry.js → p-91ec5eb4.entry.js} +1 -1
- package/dist/web-components-library/{p-292bc0c4.entry.js → p-92895bce.entry.js} +1 -1
- package/dist/web-components-library/p-970bd07c.entry.js +1 -0
- package/dist/web-components-library/{p-6c6b4e80.entry.js → p-990b8236.entry.js} +1 -1
- package/dist/web-components-library/{p-51cdabeb.entry.js → p-99a562cb.entry.js} +1 -1
- package/dist/web-components-library/p-b359a3b4.entry.js +1 -0
- package/dist/web-components-library/p-b6cd034b.js +1 -0
- package/dist/web-components-library/{p-edb8d2ab.entry.js → p-b9cc2dfc.entry.js} +1 -1
- package/dist/web-components-library/p-bfc78a89.entry.js +1 -0
- package/dist/web-components-library/{p-d995d9dc.entry.js → p-c042e745.entry.js} +1 -1
- package/dist/web-components-library/{p-ccdebe3f.entry.js → p-c8383456.entry.js} +1 -1
- package/dist/web-components-library/{p-0e256fdc.entry.js → p-caa21a6f.entry.js} +1 -1
- package/{www/build/p-bfe5693d.entry.js → dist/web-components-library/p-cd88cead.entry.js} +1 -1
- package/dist/web-components-library/p-d04f3cb6.entry.js +1 -0
- package/{www/build/p-9a5ee6c2.entry.js → dist/web-components-library/p-d6361790.entry.js} +1 -1
- package/{www/build/p-69ef6ddc.entry.js → dist/web-components-library/p-dd0efdbf.entry.js} +1 -1
- package/dist/web-components-library/p-e007cd0b.entry.js +1 -0
- package/dist/web-components-library/{p-0a0aee35.entry.js → p-e74b3fd9.entry.js} +1 -1
- package/{www/build/p-d97a2db9.entry.js → dist/web-components-library/p-eca4cb15.entry.js} +1 -1
- package/dist/web-components-library/p-ed1cd6b1.js +1 -0
- package/dist/web-components-library/p-f26251dd.entry.js +1 -0
- package/dist/web-components-library/p-f61fd81e.entry.js +1 -0
- package/dist/web-components-library/{p-1727c1c8.entry.js → p-f78d6123.entry.js} +1 -1
- package/dist/web-components-library/p-fbfaa699.entry.js +1 -0
- package/dist/web-components-library/{p-ba29bc12.entry.js → p-fdd91263.entry.js} +1 -1
- package/dist/web-components-library/{p-fe927bf4.entry.js → p-ff4a0f6f.entry.js} +1 -1
- package/dist/web-components-library/web-components-library.esm.js +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/src-react/index.ts +1 -0
- package/www/build/index.esm.js +1 -1
- package/www/build/{p-4af112a7.entry.js → p-053846df.entry.js} +1 -1
- package/www/build/{p-e2102da3.entry.js → p-0f6edb58.entry.js} +1 -1
- package/www/build/p-10be0462.entry.js +1 -0
- package/www/build/{p-b15efba3.entry.js → p-15fa8ca4.entry.js} +1 -1
- package/www/build/{p-02ea7e49.entry.js → p-1a76a57d.entry.js} +1 -1
- package/{dist/web-components-library/p-1f73a6d8.entry.js → www/build/p-1b1717c9.entry.js} +1 -1
- package/{dist/web-components-library/p-3edbd35c.entry.js → www/build/p-1d5aa37b.entry.js} +1 -1
- package/www/build/{p-9074e1a5.entry.js → p-1eb357e8.entry.js} +1 -1
- package/www/build/{p-57d1acdc.entry.js → p-28e4abc4.entry.js} +1 -1
- package/www/build/p-41f33f7b.entry.js +1 -0
- package/www/build/{p-d33fea26.entry.js → p-46aecb12.entry.js} +1 -1
- package/www/build/{p-63ccb013.entry.js → p-4be52491.entry.js} +1 -1
- package/www/build/{p-55ddbfe9.entry.js → p-4d6f2f01.entry.js} +1 -1
- package/www/build/p-514719d2.entry.js +1 -0
- package/www/build/p-53dade4b.entry.js +16 -0
- package/{dist/web-components-library/p-df4e963b.entry.js → www/build/p-55f09348.entry.js} +1 -1
- package/www/build/p-5789bbe7.entry.js +1 -0
- package/www/build/{p-de25c7f0.entry.js → p-5dcbba4e.entry.js} +1 -1
- package/www/build/{p-9f9e4266.entry.js → p-659fc25e.entry.js} +1 -1
- package/www/build/{p-8fbc2ce9.entry.js → p-6bbd53ec.entry.js} +1 -1
- package/www/build/{p-5be162d5.entry.js → p-6c52ed1b.entry.js} +1 -1
- package/www/build/p-78df5dbf.entry.js +1 -0
- package/www/build/{p-b9da171f.js → p-7f1cc90f.js} +1 -1
- package/www/build/{p-0f17db30.entry.js → p-805af37b.entry.js} +1 -1
- package/www/build/p-870dabdc.entry.js +1 -0
- package/www/build/{p-43329b81.entry.js → p-897f9491.entry.js} +1 -1
- package/www/build/{p-3c111c2a.entry.js → p-8ce4b2c4.entry.js} +1 -1
- package/www/build/p-8cf3798f.entry.js +1 -0
- package/www/build/p-8ddbbe24.entry.js +1 -0
- package/www/build/{p-dffdf60a.entry.js → p-91ec5eb4.entry.js} +1 -1
- package/www/build/{p-292bc0c4.entry.js → p-92895bce.entry.js} +1 -1
- package/www/build/p-970bd07c.entry.js +1 -0
- package/www/build/p-975e9d42.js +129 -0
- package/www/build/{p-6c6b4e80.entry.js → p-990b8236.entry.js} +1 -1
- package/www/build/{p-51cdabeb.entry.js → p-99a562cb.entry.js} +1 -1
- package/www/build/p-b359a3b4.entry.js +1 -0
- package/www/build/p-b6cd034b.js +1 -0
- package/www/build/{p-edb8d2ab.entry.js → p-b9cc2dfc.entry.js} +1 -1
- package/www/build/p-bfc78a89.entry.js +1 -0
- package/www/build/{p-d995d9dc.entry.js → p-c042e745.entry.js} +1 -1
- package/www/build/{p-ccdebe3f.entry.js → p-c8383456.entry.js} +1 -1
- package/www/build/{p-0e256fdc.entry.js → p-caa21a6f.entry.js} +1 -1
- package/{dist/web-components-library/p-bfe5693d.entry.js → www/build/p-cd88cead.entry.js} +1 -1
- package/www/build/p-d04f3cb6.entry.js +1 -0
- package/{dist/web-components-library/p-9a5ee6c2.entry.js → www/build/p-d6361790.entry.js} +1 -1
- package/{dist/web-components-library/p-69ef6ddc.entry.js → www/build/p-dd0efdbf.entry.js} +1 -1
- package/www/build/p-e007cd0b.entry.js +1 -0
- package/www/build/{p-0a0aee35.entry.js → p-e74b3fd9.entry.js} +1 -1
- package/{dist/web-components-library/p-d97a2db9.entry.js → www/build/p-eca4cb15.entry.js} +1 -1
- package/www/build/p-ed1cd6b1.js +1 -0
- package/www/build/p-f26251dd.entry.js +1 -0
- package/www/build/p-f61fd81e.entry.js +1 -0
- package/www/build/{p-1727c1c8.entry.js → p-f78d6123.entry.js} +1 -1
- package/www/build/p-fbfaa699.entry.js +1 -0
- package/www/build/p-fcff1237.css +812 -0
- package/www/build/{p-ba29bc12.entry.js → p-fdd91263.entry.js} +1 -1
- package/www/build/{p-fe927bf4.entry.js → p-ff4a0f6f.entry.js} +1 -1
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +6 -70
- package/dist/cjs/z-app-switcher_11.cjs.entry.js +0 -377
- package/dist/cjs/z-input_2.cjs.entry.js +0 -228
- package/dist/esm/z-app-switcher_11.entry.js +0 -363
- package/dist/esm/z-input_2.entry.js +0 -223
- package/dist/web-components-library/p-0d29d851.entry.js +0 -1
- package/dist/web-components-library/p-0ef6c549.entry.js +0 -1
- package/dist/web-components-library/p-20d62443.entry.js +0 -1
- package/dist/web-components-library/p-562e2d52.entry.js +0 -1
- package/dist/web-components-library/p-5eacbfc7.entry.js +0 -1
- package/dist/web-components-library/p-6218514a.entry.js +0 -1
- package/dist/web-components-library/p-71accd8e.entry.js +0 -1
- package/dist/web-components-library/p-7c6d4440.entry.js +0 -1
- package/dist/web-components-library/p-93cddf62.entry.js +0 -1
- package/dist/web-components-library/p-9f5d707a.js +0 -1
- package/dist/web-components-library/p-a8875b97.entry.js +0 -16
- package/dist/web-components-library/p-e2431b92.entry.js +0 -1
- package/www/build/p-0d29d851.entry.js +0 -1
- package/www/build/p-0ef6c549.entry.js +0 -1
- package/www/build/p-20d62443.entry.js +0 -1
- package/www/build/p-562e2d52.entry.js +0 -1
- package/www/build/p-5eacbfc7.entry.js +0 -1
- package/www/build/p-6218514a.entry.js +0 -1
- package/www/build/p-71accd8e.entry.js +0 -1
- package/www/build/p-7c6d4440.entry.js +0 -1
- package/www/build/p-88b56b6e.css +0 -1
- package/www/build/p-93cddf62.entry.js +0 -1
- package/www/build/p-9f5d707a.js +0 -1
- package/www/build/p-a8875b97.entry.js +0 -16
- package/www/build/p-e2431b92.entry.js +0 -1
- package/www/build/p-f01941e6.js +0 -1
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-84b7063a.js');
|
|
6
|
+
const index$1 = require('./index-0e75c8cc.js');
|
|
7
|
+
const utils = require('./utils-97262bbd.js');
|
|
8
|
+
require('./breakpoints-88c4fd6c.js');
|
|
9
|
+
|
|
10
|
+
const stylesCss = ":host{--z-popover-theme--surface:var(--color-surface01);--z-popover-theme--text:var(--color-text01);--z-popover-padding:var(--space-unit);--z-popover-shadow-filter:drop-shadow(0 1px 2px var(--shadow-color-base));--arrow-size:6px;--edge-offset:calc(-1 * (var(--arrow-size) + calc(var(--space-unit) * 2)));position:relative;display:flex;align-items:center;justify-content:center;padding:var(--z-popover-padding);min-width:calc(var(--space-unit) * 8);min-height:calc(var(--space-unit) * 4);color:var(--z-popover-theme--text);fill:currentColor;font-family:var(--font-family-sans);text-align:center;border-radius:var(--border-radius-small);background:var(--z-popover-theme--surface);filter:var(--z-popover-shadow-filter)}:host(:not([open])),:host([open=\"false\"]){display:none}:host([center][current-position='top']),:host([center][current-position='bottom']){transform:translateX(-50%)}:host([center][current-position='right']),:host([center][current-position='left']){transform:translateY(-50%)}:host([current-position])::before{--arrow-edge-offset:calc(100% - var(--arrow-size) - var(--space-unit));--arrow-center-x-offset:calc(50% - calc(var(--arrow-size) / 2));--arrow-center-y-offset:calc(100% - calc(var(--arrow-size) / 2));display:block;content:'';position:absolute;width:var(--arrow-size);height:var(--arrow-size);background:var(--z-popover-theme--surface);transform:rotate(45deg)}:host([show-arrow=false])::before,:host(:not([show-arrow]))::before{display:none}:host([current-position^='top'])::before{top:var(--arrow-center-y-offset)}:host([current-position^='bottom'])::before{bottom:var(--arrow-center-y-offset)}:host([current-position='top'])::before,:host([current-position='bottom'])::before{left:var(--arrow-center-x-offset)}:host([current-position='right'])::before,:host([current-position='left'])::before{top:var(--arrow-center-x-offset)}:host([current-position='right'])::before{right:var(--arrow-center-y-offset)}:host([current-position='left'])::before{left:var(--arrow-center-y-offset)}:host([current-position='top_right'])::before,:host([current-position='bottom_right'])::before{right:calc(var(--arrow-edge-offset) + var(--arrow-size))}:host([current-position='top_right']:not([center]))::before,:host([current-position='bottom_right']:not([center]))::before,:host([current-position='top_right'][center=\"false\"])::before,:host([current-position='bottom_right'][center=\"false\"])::before{right:calc(var(--arrow-edge-offset) - var(--arrow-size) + 1px)}:host([current-position='top_left'])::before,:host([current-position='bottom_left'])::before{left:calc(var(--arrow-edge-offset) + var(--arrow-size))}:host([current-position='top_left']:not([center]))::before,:host([current-position='bottom_left']:not([center]))::before,:host([current-position='top_left'][center=\"false\"])::before,:host([current-position='bottom_left'][center=\"false\"])::before{left:calc(var(--arrow-edge-offset) - var(--arrow-size) + 1px)}:host([current-position='right_top'])::before,:host([current-position='left_top'])::before{bottom:var(--arrow-size)}:host([current-position='right_top'])::before,:host([current-position='right_bottom'])::before{right:var(--arrow-center-y-offset)}:host([current-position='left_top'])::before,:host([current-position='left_bottom'])::before{left:var(--arrow-center-y-offset)}:host([current-position='right_bottom'])::before,:host([current-position='left_bottom'])::before{top:var(--arrow-size)}::slotted(*){flex:1 auto;overflow:auto}";
|
|
11
|
+
|
|
12
|
+
const documentElement = document.documentElement;
|
|
13
|
+
function getParentElement(element) {
|
|
14
|
+
if (element.parentNode.host) {
|
|
15
|
+
return element.parentNode.host;
|
|
16
|
+
}
|
|
17
|
+
return element.parentNode;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Find the closest scrollable parent of a node.
|
|
21
|
+
*
|
|
22
|
+
* @param {Element} element The node
|
|
23
|
+
*/
|
|
24
|
+
function findScrollableParent(element) {
|
|
25
|
+
let parent = getParentElement(element);
|
|
26
|
+
while (parent && parent !== documentElement) {
|
|
27
|
+
const { overflow, overflowX, overflowY } = window.getComputedStyle(parent);
|
|
28
|
+
if (overflow === "hidden" ||
|
|
29
|
+
overflowY === "hidden" ||
|
|
30
|
+
overflowX === "hidden") {
|
|
31
|
+
return parent;
|
|
32
|
+
}
|
|
33
|
+
if ((parent.scrollHeight > parent.clientHeight &&
|
|
34
|
+
overflow !== "visible" &&
|
|
35
|
+
overflowY !== "visible") ||
|
|
36
|
+
(parent.scrollWidth > parent.clientWidth &&
|
|
37
|
+
overflow !== "visible" &&
|
|
38
|
+
overflowX !== "visible")) {
|
|
39
|
+
return parent;
|
|
40
|
+
}
|
|
41
|
+
parent = getParentElement(parent);
|
|
42
|
+
}
|
|
43
|
+
return documentElement;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Calculate computed offset.
|
|
47
|
+
* It includes matrix transformations.
|
|
48
|
+
* @param element The target element.
|
|
49
|
+
* @param targetParentOffset The relative offset parent.
|
|
50
|
+
* @return A client rect object.
|
|
51
|
+
*/
|
|
52
|
+
function computeOffset(element, targetParentOffset) {
|
|
53
|
+
const rect = element.getBoundingClientRect();
|
|
54
|
+
const width = rect.width;
|
|
55
|
+
const height = rect.height;
|
|
56
|
+
let top = 0;
|
|
57
|
+
let left = 0;
|
|
58
|
+
let offsetParent = element;
|
|
59
|
+
while (offsetParent && offsetParent != targetParentOffset) {
|
|
60
|
+
left += offsetParent.offsetLeft;
|
|
61
|
+
// document.body sometimes has offsetTop == 0 but still has an
|
|
62
|
+
// offset because of children margins!
|
|
63
|
+
if (offsetParent === document.body) {
|
|
64
|
+
top += offsetParent.getBoundingClientRect().top + window.scrollY;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
top += offsetParent.offsetTop;
|
|
68
|
+
}
|
|
69
|
+
if (window.DOMMatrix) {
|
|
70
|
+
const style = window.getComputedStyle(offsetParent);
|
|
71
|
+
const transform = style.transform || style.webkitTransform;
|
|
72
|
+
const domMatrix = new DOMMatrix(transform);
|
|
73
|
+
if (domMatrix) {
|
|
74
|
+
left += domMatrix.m41;
|
|
75
|
+
if (offsetParent !== document.body) {
|
|
76
|
+
top += domMatrix.m42;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (!offsetParent.offsetParent) {
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
offsetParent = offsetParent.offsetParent;
|
|
84
|
+
}
|
|
85
|
+
let parentWidth;
|
|
86
|
+
let parentHeight;
|
|
87
|
+
if (offsetParent === document.body) {
|
|
88
|
+
parentWidth = window.innerWidth;
|
|
89
|
+
parentHeight = window.innerHeight;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
parentWidth = offsetParent.offsetWidth;
|
|
93
|
+
parentHeight = offsetParent.offsetHeight;
|
|
94
|
+
}
|
|
95
|
+
const right = parentWidth - left - rect.width;
|
|
96
|
+
const bottom = parentHeight - top - rect.height;
|
|
97
|
+
return { top, right, bottom, left, width, height };
|
|
98
|
+
}
|
|
99
|
+
const ZPopoverDeprecated = class {
|
|
100
|
+
constructor(hostRef) {
|
|
101
|
+
index.registerInstance(this, hostRef);
|
|
102
|
+
this.positionChange = index.createEvent(this, "positionChange", 7);
|
|
103
|
+
this.openChange = index.createEvent(this, "openChange", 7);
|
|
104
|
+
/** Popover position. */
|
|
105
|
+
this.position = index$1.PopoverPositions.AUTO;
|
|
106
|
+
/**
|
|
107
|
+
* The open state of the popover.
|
|
108
|
+
*/
|
|
109
|
+
this.open = false;
|
|
110
|
+
/**
|
|
111
|
+
* Whether to show popover's arrow.
|
|
112
|
+
*/
|
|
113
|
+
this.showArrow = false;
|
|
114
|
+
/**
|
|
115
|
+
* Whether center the popup on the main side - according to "position".
|
|
116
|
+
*/
|
|
117
|
+
this.center = false;
|
|
118
|
+
}
|
|
119
|
+
closePopoverWithKeyboard(e) {
|
|
120
|
+
if (e.key === index$1.KeyboardKeys.ESC) {
|
|
121
|
+
this.open = false;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
handleOutsideClick(e) {
|
|
125
|
+
const tree = utils.getElementTree(e.target);
|
|
126
|
+
const parent = tree.find((elem) => elem.nodeName.toLowerCase() === "z-popover");
|
|
127
|
+
if (!parent) {
|
|
128
|
+
this.open = false;
|
|
129
|
+
this.positionChange.emit({ position: this.currentPosition });
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
validatePosition(newValue) {
|
|
133
|
+
if (newValue &&
|
|
134
|
+
Object.values(index$1.PopoverPositions).every((position) => newValue !== position)) {
|
|
135
|
+
this.position = index$1.PopoverPositions.AUTO;
|
|
136
|
+
}
|
|
137
|
+
this.currentPosition = this.position;
|
|
138
|
+
this.positionChange.emit({ position: this.currentPosition });
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Setup popover behaviors on opening.
|
|
142
|
+
*/
|
|
143
|
+
onOpen() {
|
|
144
|
+
cancelAnimationFrame(this.animationFrameRequestId);
|
|
145
|
+
if (this.open) {
|
|
146
|
+
const setPosition = () => {
|
|
147
|
+
if (this.open) {
|
|
148
|
+
this.setPosition();
|
|
149
|
+
this.animationFrameRequestId = requestAnimationFrame(setPosition);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
setPosition();
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
const style = this.host.style;
|
|
156
|
+
style.removeProperty("top");
|
|
157
|
+
style.removeProperty("right");
|
|
158
|
+
style.removeProperty("bottom");
|
|
159
|
+
style.removeProperty("left");
|
|
160
|
+
style.removeProperty("max-width");
|
|
161
|
+
style.removeProperty("max-height");
|
|
162
|
+
this.currentPosition = undefined;
|
|
163
|
+
}
|
|
164
|
+
this.openChange.emit({ open: this.open });
|
|
165
|
+
}
|
|
166
|
+
disconnectedCallback() {
|
|
167
|
+
cancelAnimationFrame(this.animationFrameRequestId);
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Set the position of the popover.
|
|
171
|
+
*/
|
|
172
|
+
setPosition() {
|
|
173
|
+
let element;
|
|
174
|
+
if (typeof this.bindTo === "string") {
|
|
175
|
+
element = this.host.ownerDocument.querySelector(this.bindTo);
|
|
176
|
+
}
|
|
177
|
+
else if (this.bindTo) {
|
|
178
|
+
element = this.bindTo;
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
element = this.host.parentElement;
|
|
182
|
+
}
|
|
183
|
+
if (!element) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
const scrollContainer = findScrollableParent(element);
|
|
187
|
+
const scrollingBoundingRect = scrollContainer.getBoundingClientRect();
|
|
188
|
+
const offsetContainer = this.host.offsetParent;
|
|
189
|
+
const relativeBoundingRect = offsetContainer
|
|
190
|
+
? computeOffset(offsetContainer, scrollContainer)
|
|
191
|
+
: { top: 0, right: 0, bottom: 0, left: 0 };
|
|
192
|
+
const boundingRect = computeOffset(element, scrollContainer);
|
|
193
|
+
const top = boundingRect.top - scrollContainer.scrollTop;
|
|
194
|
+
const bottom = scrollingBoundingRect.height -
|
|
195
|
+
(boundingRect.top + boundingRect.height) +
|
|
196
|
+
scrollContainer.scrollTop;
|
|
197
|
+
const left = boundingRect.left - scrollContainer.scrollLeft;
|
|
198
|
+
const right = scrollingBoundingRect.width -
|
|
199
|
+
(boundingRect.left + boundingRect.width) +
|
|
200
|
+
scrollContainer.scrollLeft;
|
|
201
|
+
const overflowBottom = Math.max(0, scrollingBoundingRect.top +
|
|
202
|
+
scrollingBoundingRect.height -
|
|
203
|
+
window.innerHeight);
|
|
204
|
+
const overflowRight = Math.max(0, scrollingBoundingRect.left +
|
|
205
|
+
scrollingBoundingRect.width -
|
|
206
|
+
window.innerWidth);
|
|
207
|
+
const availableTop = Math.min(top, top + scrollingBoundingRect.top);
|
|
208
|
+
const availableBottom = Math.min(bottom, bottom - overflowBottom);
|
|
209
|
+
const availableLeft = Math.min(left, left + scrollingBoundingRect.left);
|
|
210
|
+
const availableRight = Math.min(right, right - overflowRight);
|
|
211
|
+
const availableHeight = availableTop + availableBottom + boundingRect.height;
|
|
212
|
+
const availableWidth = availableLeft + availableRight + boundingRect.width;
|
|
213
|
+
let position = this.currentPosition;
|
|
214
|
+
const positions = [];
|
|
215
|
+
if (this.position === index$1.PopoverPositions.AUTO) {
|
|
216
|
+
/**
|
|
217
|
+
* The `AUTO` position tries to place the popover in the 'safest' area,
|
|
218
|
+
* where there's more space available.
|
|
219
|
+
*/
|
|
220
|
+
if (availableLeft / availableWidth > 0.6) {
|
|
221
|
+
positions.push(index$1.PopoverPositions.LEFT);
|
|
222
|
+
}
|
|
223
|
+
else if (availableLeft / availableWidth < 0.4) {
|
|
224
|
+
positions.push(index$1.PopoverPositions.RIGHT);
|
|
225
|
+
}
|
|
226
|
+
if (availableTop / availableHeight > 0.9) {
|
|
227
|
+
positions.unshift(index$1.PopoverPositions.TOP);
|
|
228
|
+
}
|
|
229
|
+
else if (availableTop / availableHeight > 0.6) {
|
|
230
|
+
positions.push(index$1.PopoverPositions.TOP);
|
|
231
|
+
}
|
|
232
|
+
else if (availableTop / availableHeight < 0.1) {
|
|
233
|
+
positions.unshift(index$1.PopoverPositions.BOTTOM);
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
positions.push(index$1.PopoverPositions.BOTTOM);
|
|
237
|
+
}
|
|
238
|
+
position = positions.join("_");
|
|
239
|
+
}
|
|
240
|
+
const style = this.host.style;
|
|
241
|
+
style.position = "absolute";
|
|
242
|
+
const offsetTop = boundingRect.top - relativeBoundingRect.top;
|
|
243
|
+
const offsetRight = boundingRect.right - relativeBoundingRect.right;
|
|
244
|
+
const offsetBottom = boundingRect.bottom - relativeBoundingRect.bottom;
|
|
245
|
+
const offsetLeft = boundingRect.left - relativeBoundingRect.left;
|
|
246
|
+
const offsetModifier = this.center ? 0.5 : 0;
|
|
247
|
+
const sizeModifier = this.center ? 0.5 : 0;
|
|
248
|
+
if (position === index$1.PopoverPositions.TOP ||
|
|
249
|
+
position === index$1.PopoverPositions.TOP_RIGHT) {
|
|
250
|
+
style.top = "auto";
|
|
251
|
+
style.right = "auto";
|
|
252
|
+
style.bottom = `${offsetBottom + boundingRect.height}px`;
|
|
253
|
+
style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
|
|
254
|
+
style.maxHeight = `${availableTop}px`;
|
|
255
|
+
if (position === index$1.PopoverPositions.TOP_RIGHT) {
|
|
256
|
+
style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
else if (position === index$1.PopoverPositions.TOP_LEFT) {
|
|
260
|
+
style.top = "auto";
|
|
261
|
+
style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;
|
|
262
|
+
style.bottom = `${offsetBottom + boundingRect.height}px`;
|
|
263
|
+
style.left = "auto";
|
|
264
|
+
style.maxWidth = `${availableLeft}px`;
|
|
265
|
+
style.maxHeight = `${availableTop}px`;
|
|
266
|
+
}
|
|
267
|
+
else if (position === index$1.PopoverPositions.BOTTOM ||
|
|
268
|
+
position === index$1.PopoverPositions.BOTTOM_RIGHT) {
|
|
269
|
+
style.top = `${offsetTop + boundingRect.height}px`;
|
|
270
|
+
style.right = "auto";
|
|
271
|
+
style.bottom = "auto";
|
|
272
|
+
style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
|
|
273
|
+
style.maxHeight = `${availableBottom}px`;
|
|
274
|
+
if (position === index$1.PopoverPositions.BOTTOM_RIGHT) {
|
|
275
|
+
style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
else if (position === index$1.PopoverPositions.BOTTOM_LEFT) {
|
|
279
|
+
style.top = `${offsetTop + boundingRect.height}px`;
|
|
280
|
+
style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;
|
|
281
|
+
style.bottom = "auto";
|
|
282
|
+
style.left = "auto";
|
|
283
|
+
style.maxWidth = `${availableLeft}px`;
|
|
284
|
+
style.maxHeight = `${availableBottom}px`;
|
|
285
|
+
}
|
|
286
|
+
else if (position === index$1.PopoverPositions.RIGHT ||
|
|
287
|
+
position === index$1.PopoverPositions.RIGHT_BOTTOM) {
|
|
288
|
+
style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
|
|
289
|
+
style.right = "auto";
|
|
290
|
+
style.bottom = "auto";
|
|
291
|
+
style.left = `${offsetLeft + boundingRect.width}px`;
|
|
292
|
+
style.maxWidth = `${availableRight}px`;
|
|
293
|
+
style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
|
|
294
|
+
}
|
|
295
|
+
else if (position === index$1.PopoverPositions.RIGHT_TOP) {
|
|
296
|
+
style.top = "auto";
|
|
297
|
+
style.right = "auto";
|
|
298
|
+
style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;
|
|
299
|
+
style.left = `${offsetLeft + boundingRect.width}px`;
|
|
300
|
+
style.maxWidth = `${availableRight}px`;
|
|
301
|
+
style.maxHeight = `${availableTop + boundingRect.height * sizeModifier}px`;
|
|
302
|
+
}
|
|
303
|
+
else if (position === index$1.PopoverPositions.LEFT ||
|
|
304
|
+
position === index$1.PopoverPositions.LEFT_BOTTOM) {
|
|
305
|
+
style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
|
|
306
|
+
style.right = `${offsetRight + boundingRect.width}px`;
|
|
307
|
+
style.bottom = "auto";
|
|
308
|
+
style.left = "auto";
|
|
309
|
+
style.maxWidth = `${availableLeft}px`;
|
|
310
|
+
style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
|
|
311
|
+
}
|
|
312
|
+
else if (position === index$1.PopoverPositions.LEFT_TOP) {
|
|
313
|
+
style.top = "auto";
|
|
314
|
+
style.right = `${offsetRight + boundingRect.width}px`;
|
|
315
|
+
style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;
|
|
316
|
+
style.left = "auto";
|
|
317
|
+
style.maxWidth = `${availableLeft}px`;
|
|
318
|
+
style.maxHeight = `${availableTop + boundingRect.height * sizeModifier}px`;
|
|
319
|
+
}
|
|
320
|
+
this.currentPosition = position || this.position;
|
|
321
|
+
this.host.setAttribute('current-position', this.currentPosition);
|
|
322
|
+
}
|
|
323
|
+
componentWillLoad() {
|
|
324
|
+
this.validatePosition(this.position);
|
|
325
|
+
this.onOpen();
|
|
326
|
+
}
|
|
327
|
+
render() {
|
|
328
|
+
return index.h("slot", null);
|
|
329
|
+
}
|
|
330
|
+
get host() { return index.getElement(this); }
|
|
331
|
+
static get watchers() { return {
|
|
332
|
+
"position": ["validatePosition"],
|
|
333
|
+
"open": ["onOpen"]
|
|
334
|
+
}; }
|
|
335
|
+
};
|
|
336
|
+
ZPopoverDeprecated.style = stylesCss;
|
|
337
|
+
|
|
338
|
+
exports.z_popover_deprecated = ZPopoverDeprecated;
|