@zanichelli/albe-web-components 4.0.4 → 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 +66 -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/inputs/z-input/styles.css +2 -0
- 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/{www/build/p-55ddbfe9.entry.js → dist/web-components-library/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/{www/build/p-dffdf60a.entry.js → dist/web-components-library/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/dist/web-components-library/{p-69ef6ddc.entry.js → 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/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/{dist/web-components-library/p-55ddbfe9.entry.js → www/build/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/{dist/web-components-library/p-dffdf60a.entry.js → www/build/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/www/build/{p-69ef6ddc.entry.js → 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-0e408871.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-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-0e408871.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-7614383b.js +0 -1
- package/www/build/p-7c6d4440.entry.js +0 -1
- package/www/build/p-88b56b6e.css +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
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import { Component, Prop, h, Host, Watch, Element, State, Event, } from "@stencil/core";
|
|
2
|
+
import { PopoverPositions } from "../../beans/index";
|
|
3
|
+
const documentElement = document.documentElement;
|
|
4
|
+
/**
|
|
5
|
+
* Find the closest scrollable parent of a node.
|
|
6
|
+
*
|
|
7
|
+
* @param {Element} element The node
|
|
8
|
+
*/
|
|
9
|
+
function findScrollableParent(element) {
|
|
10
|
+
let parent = element.parentNode;
|
|
11
|
+
while (parent && parent !== documentElement) {
|
|
12
|
+
const { overflow, overflowX, overflowY } = window.getComputedStyle(parent);
|
|
13
|
+
if (overflow === 'hidden' ||
|
|
14
|
+
overflowY === 'hidden' ||
|
|
15
|
+
overflowX === 'hidden') {
|
|
16
|
+
return parent;
|
|
17
|
+
}
|
|
18
|
+
if ((parent.scrollHeight > parent.clientHeight && overflow !== 'visible' && overflowY !== 'visible') ||
|
|
19
|
+
(parent.scrollWidth > parent.clientWidth && overflow !== 'visible' && overflowX !== 'visible')) {
|
|
20
|
+
return parent;
|
|
21
|
+
}
|
|
22
|
+
parent = parent.parentNode;
|
|
23
|
+
}
|
|
24
|
+
return documentElement;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Calculate computed offset.
|
|
28
|
+
* It includes matrix transformations.
|
|
29
|
+
* @param element The target element.
|
|
30
|
+
* @param targetParentOffset The relative offset parent.
|
|
31
|
+
* @return A client rect object.
|
|
32
|
+
*/
|
|
33
|
+
function computeOffset(element, targetParentOffset) {
|
|
34
|
+
const rect = element.getBoundingClientRect();
|
|
35
|
+
const width = rect.width;
|
|
36
|
+
const height = rect.height;
|
|
37
|
+
let top = 0;
|
|
38
|
+
let left = 0;
|
|
39
|
+
let offsetParent = element;
|
|
40
|
+
while (offsetParent && offsetParent != targetParentOffset) {
|
|
41
|
+
left += offsetParent.offsetLeft;
|
|
42
|
+
// document.body sometimes has offsetTop == 0 but still has an
|
|
43
|
+
// offset because of children margins!
|
|
44
|
+
if (offsetParent === document.body) {
|
|
45
|
+
top += offsetParent.getBoundingClientRect().top + window.scrollY;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
top += offsetParent.offsetTop;
|
|
49
|
+
}
|
|
50
|
+
if (window.DOMMatrix) {
|
|
51
|
+
const style = window.getComputedStyle(offsetParent);
|
|
52
|
+
const transform = style.transform || style.webkitTransform;
|
|
53
|
+
const domMatrix = new DOMMatrix(transform);
|
|
54
|
+
if (domMatrix) {
|
|
55
|
+
left += domMatrix.m41;
|
|
56
|
+
if (offsetParent !== document.body) {
|
|
57
|
+
top += domMatrix.m42;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (!offsetParent.offsetParent) {
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
offsetParent = offsetParent.offsetParent;
|
|
65
|
+
}
|
|
66
|
+
let parentWidth;
|
|
67
|
+
let parentHeight;
|
|
68
|
+
if (offsetParent === document.body) {
|
|
69
|
+
parentWidth = window.innerWidth;
|
|
70
|
+
parentHeight = window.innerHeight;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
parentWidth = offsetParent.offsetWidth;
|
|
74
|
+
parentHeight = offsetParent.offsetHeight;
|
|
75
|
+
}
|
|
76
|
+
const right = parentWidth - left - rect.width;
|
|
77
|
+
const bottom = parentHeight - top - rect.height;
|
|
78
|
+
return { top, right, bottom, left, width, height };
|
|
79
|
+
}
|
|
80
|
+
export class ZTooltipDeprecated {
|
|
81
|
+
constructor() {
|
|
82
|
+
/** Tooltip position. */
|
|
83
|
+
this.type = PopoverPositions.AUTO;
|
|
84
|
+
/**
|
|
85
|
+
* The open state of the tooltip.
|
|
86
|
+
*/
|
|
87
|
+
this.open = false;
|
|
88
|
+
}
|
|
89
|
+
validateType(newValue) {
|
|
90
|
+
if (newValue &&
|
|
91
|
+
Object
|
|
92
|
+
.values(PopoverPositions)
|
|
93
|
+
.every((position) => newValue !== position)) {
|
|
94
|
+
this.type = PopoverPositions.AUTO;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
onPositionChange() {
|
|
98
|
+
this.positionChange.emit({ position: this.position });
|
|
99
|
+
}
|
|
100
|
+
disconnectedCallback() {
|
|
101
|
+
cancelAnimationFrame(this.animationFrameRequestId);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Setup tooltip behaviors on opening.
|
|
105
|
+
*/
|
|
106
|
+
onOpen() {
|
|
107
|
+
cancelAnimationFrame(this.animationFrameRequestId);
|
|
108
|
+
if (this.content) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (this.open) {
|
|
112
|
+
const setPosition = () => {
|
|
113
|
+
if (this.open) {
|
|
114
|
+
this.setPosition();
|
|
115
|
+
this.animationFrameRequestId = requestAnimationFrame(setPosition);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
setPosition();
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
const style = this.host.style;
|
|
122
|
+
style.removeProperty("top");
|
|
123
|
+
style.removeProperty("right");
|
|
124
|
+
style.removeProperty("bottom");
|
|
125
|
+
style.removeProperty("left");
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Set the position of the tooltip.
|
|
130
|
+
*/
|
|
131
|
+
setPosition() {
|
|
132
|
+
let element;
|
|
133
|
+
if (typeof this.bindTo === "string") {
|
|
134
|
+
element = this.host.ownerDocument.querySelector(this.bindTo);
|
|
135
|
+
}
|
|
136
|
+
else if (this.bindTo) {
|
|
137
|
+
element = this.bindTo;
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
element = this.host.parentElement;
|
|
141
|
+
}
|
|
142
|
+
if (!element) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const scrollContainer = findScrollableParent(element);
|
|
146
|
+
const scrollingBoundingRect = scrollContainer.getBoundingClientRect();
|
|
147
|
+
const offsetContainer = this.host.offsetParent;
|
|
148
|
+
const relativeBoundingRect = offsetContainer ? computeOffset(offsetContainer, scrollContainer) : { top: 0, right: 0, bottom: 0, left: 0 };
|
|
149
|
+
const boundingRect = computeOffset(element, scrollContainer);
|
|
150
|
+
const top = boundingRect.top - scrollContainer.scrollTop;
|
|
151
|
+
const bottom = scrollingBoundingRect.height - (boundingRect.top + boundingRect.height) + scrollContainer.scrollTop;
|
|
152
|
+
const left = boundingRect.left - scrollContainer.scrollLeft;
|
|
153
|
+
const right = scrollingBoundingRect.width - (boundingRect.left + boundingRect.width) + scrollContainer.scrollLeft;
|
|
154
|
+
const overflowBottom = Math.max(0, scrollingBoundingRect.top + scrollingBoundingRect.height - window.innerHeight);
|
|
155
|
+
const overflowRight = Math.max(0, scrollingBoundingRect.left + scrollingBoundingRect.width - window.innerWidth);
|
|
156
|
+
const availableTop = Math.min(top, top + scrollingBoundingRect.top);
|
|
157
|
+
const availableBottom = Math.min(bottom, bottom - overflowBottom);
|
|
158
|
+
const availableLeft = Math.min(left, left + scrollingBoundingRect.left);
|
|
159
|
+
const availableRight = Math.min(right, right - overflowRight);
|
|
160
|
+
const availableHeight = availableTop + availableBottom + boundingRect.height;
|
|
161
|
+
const availableWidth = availableLeft + availableRight + boundingRect.width;
|
|
162
|
+
let position = this.type;
|
|
163
|
+
if (position === PopoverPositions.AUTO) {
|
|
164
|
+
/**
|
|
165
|
+
* The `AUTO` position tries to place the tooltip in the "safest" area,
|
|
166
|
+
* where there's more space available.
|
|
167
|
+
*/
|
|
168
|
+
const positions = [];
|
|
169
|
+
if (availableTop / availableHeight > 0.9) {
|
|
170
|
+
positions.unshift(PopoverPositions.TOP);
|
|
171
|
+
}
|
|
172
|
+
else if (availableTop / availableHeight > 0.6) {
|
|
173
|
+
positions.push(PopoverPositions.TOP);
|
|
174
|
+
}
|
|
175
|
+
else if (availableTop / availableHeight < 0.1) {
|
|
176
|
+
positions.unshift(PopoverPositions.BOTTOM);
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
positions.push(PopoverPositions.BOTTOM);
|
|
180
|
+
}
|
|
181
|
+
if (availableLeft / availableWidth > 0.6) {
|
|
182
|
+
positions.push(PopoverPositions.LEFT);
|
|
183
|
+
}
|
|
184
|
+
else if (availableLeft / availableWidth < 0.4) {
|
|
185
|
+
positions.push(PopoverPositions.RIGHT);
|
|
186
|
+
}
|
|
187
|
+
position = positions.join("_");
|
|
188
|
+
}
|
|
189
|
+
const style = this.host.style;
|
|
190
|
+
if (!this.content) {
|
|
191
|
+
style.position = "absolute";
|
|
192
|
+
}
|
|
193
|
+
const offsetTop = boundingRect.top - relativeBoundingRect.top;
|
|
194
|
+
const offsetRight = boundingRect.right - relativeBoundingRect.right;
|
|
195
|
+
const offsetBottom = boundingRect.bottom - relativeBoundingRect.bottom;
|
|
196
|
+
const offsetLeft = boundingRect.left - relativeBoundingRect.left;
|
|
197
|
+
if (position === PopoverPositions.TOP ||
|
|
198
|
+
position === PopoverPositions.TOP_RIGHT ||
|
|
199
|
+
position === PopoverPositions.TOP_LEFT) {
|
|
200
|
+
style.top = "auto";
|
|
201
|
+
style.bottom = `${offsetBottom + boundingRect.height}px`;
|
|
202
|
+
}
|
|
203
|
+
if (position === PopoverPositions.BOTTOM ||
|
|
204
|
+
position === PopoverPositions.BOTTOM_RIGHT ||
|
|
205
|
+
position === PopoverPositions.BOTTOM_LEFT) {
|
|
206
|
+
style.top = `${offsetTop + boundingRect.height}px`;
|
|
207
|
+
style.bottom = "auto";
|
|
208
|
+
}
|
|
209
|
+
if (position === PopoverPositions.TOP ||
|
|
210
|
+
position === PopoverPositions.BOTTOM) {
|
|
211
|
+
style.left = `${offsetLeft +
|
|
212
|
+
(boundingRect.width / 2) -
|
|
213
|
+
(this.host.clientWidth / 2)}px`;
|
|
214
|
+
}
|
|
215
|
+
if (position === PopoverPositions.TOP_RIGHT ||
|
|
216
|
+
position === PopoverPositions.BOTTOM_RIGHT) {
|
|
217
|
+
style.right = "auto";
|
|
218
|
+
style.left = `${offsetLeft + boundingRect.width}px`;
|
|
219
|
+
}
|
|
220
|
+
if (position === PopoverPositions.TOP_LEFT ||
|
|
221
|
+
position === PopoverPositions.BOTTOM_LEFT) {
|
|
222
|
+
style.left = "auto";
|
|
223
|
+
style.right = `${offsetRight + boundingRect.width}px`;
|
|
224
|
+
}
|
|
225
|
+
if (position === PopoverPositions.RIGHT ||
|
|
226
|
+
position === PopoverPositions.LEFT) {
|
|
227
|
+
style.top = `${offsetTop +
|
|
228
|
+
(boundingRect.height / 2) -
|
|
229
|
+
(this.host.clientHeight / 2)}px`;
|
|
230
|
+
style.bottom = "auto";
|
|
231
|
+
}
|
|
232
|
+
if (position === PopoverPositions.RIGHT) {
|
|
233
|
+
style.right = "auto";
|
|
234
|
+
style.left = `${offsetLeft + boundingRect.width}px`;
|
|
235
|
+
}
|
|
236
|
+
if (position === PopoverPositions.LEFT) {
|
|
237
|
+
style.left = "auto";
|
|
238
|
+
style.right = `${offsetRight + boundingRect.width}px`;
|
|
239
|
+
}
|
|
240
|
+
this.position = position;
|
|
241
|
+
}
|
|
242
|
+
componentWillLoad() {
|
|
243
|
+
// Keep backward compatibility
|
|
244
|
+
if (this.content) {
|
|
245
|
+
this.open = true;
|
|
246
|
+
}
|
|
247
|
+
this.validateType(this.type);
|
|
248
|
+
this.onOpen();
|
|
249
|
+
}
|
|
250
|
+
render() {
|
|
251
|
+
if (this.content) {
|
|
252
|
+
return (h(Host, { class: "legacy", position: this.type }, this.content));
|
|
253
|
+
}
|
|
254
|
+
return (h(Host, { position: this.position },
|
|
255
|
+
h("slot", null)));
|
|
256
|
+
}
|
|
257
|
+
static get is() { return "z-tooltip-deprecated"; }
|
|
258
|
+
static get encapsulation() { return "shadow"; }
|
|
259
|
+
static get originalStyleUrls() { return {
|
|
260
|
+
"$": ["styles.css"]
|
|
261
|
+
}; }
|
|
262
|
+
static get styleUrls() { return {
|
|
263
|
+
"$": ["styles.css"]
|
|
264
|
+
}; }
|
|
265
|
+
static get properties() { return {
|
|
266
|
+
"content": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"mutable": false,
|
|
269
|
+
"complexType": {
|
|
270
|
+
"original": "string",
|
|
271
|
+
"resolved": "string",
|
|
272
|
+
"references": {}
|
|
273
|
+
},
|
|
274
|
+
"required": false,
|
|
275
|
+
"optional": false,
|
|
276
|
+
"docs": {
|
|
277
|
+
"tags": [{
|
|
278
|
+
"name": "deprecated",
|
|
279
|
+
"text": undefined
|
|
280
|
+
}],
|
|
281
|
+
"text": "Content text."
|
|
282
|
+
},
|
|
283
|
+
"attribute": "content",
|
|
284
|
+
"reflect": false
|
|
285
|
+
},
|
|
286
|
+
"type": {
|
|
287
|
+
"type": "string",
|
|
288
|
+
"mutable": true,
|
|
289
|
+
"complexType": {
|
|
290
|
+
"original": "PopoverPositions",
|
|
291
|
+
"resolved": "PopoverPositions.AUTO | PopoverPositions.BOTTOM | PopoverPositions.BOTTOM_LEFT | PopoverPositions.BOTTOM_RIGHT | PopoverPositions.LEFT | PopoverPositions.LEFT_BOTTOM | PopoverPositions.LEFT_TOP | PopoverPositions.RIGHT | PopoverPositions.RIGHT_BOTTOM | PopoverPositions.RIGHT_TOP | PopoverPositions.TOP | PopoverPositions.TOP_LEFT | PopoverPositions.TOP_RIGHT",
|
|
292
|
+
"references": {
|
|
293
|
+
"PopoverPositions": {
|
|
294
|
+
"location": "import",
|
|
295
|
+
"path": "../../beans/index"
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"required": false,
|
|
300
|
+
"optional": false,
|
|
301
|
+
"docs": {
|
|
302
|
+
"tags": [],
|
|
303
|
+
"text": "Tooltip position."
|
|
304
|
+
},
|
|
305
|
+
"attribute": "type",
|
|
306
|
+
"reflect": false,
|
|
307
|
+
"defaultValue": "PopoverPositions.AUTO"
|
|
308
|
+
},
|
|
309
|
+
"open": {
|
|
310
|
+
"type": "boolean",
|
|
311
|
+
"mutable": true,
|
|
312
|
+
"complexType": {
|
|
313
|
+
"original": "boolean",
|
|
314
|
+
"resolved": "boolean",
|
|
315
|
+
"references": {}
|
|
316
|
+
},
|
|
317
|
+
"required": false,
|
|
318
|
+
"optional": false,
|
|
319
|
+
"docs": {
|
|
320
|
+
"tags": [],
|
|
321
|
+
"text": "The open state of the tooltip."
|
|
322
|
+
},
|
|
323
|
+
"attribute": "open",
|
|
324
|
+
"reflect": true,
|
|
325
|
+
"defaultValue": "false"
|
|
326
|
+
},
|
|
327
|
+
"bindTo": {
|
|
328
|
+
"type": "string",
|
|
329
|
+
"mutable": false,
|
|
330
|
+
"complexType": {
|
|
331
|
+
"original": "string | HTMLElement",
|
|
332
|
+
"resolved": "HTMLElement | string",
|
|
333
|
+
"references": {
|
|
334
|
+
"HTMLElement": {
|
|
335
|
+
"location": "global"
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
"required": false,
|
|
340
|
+
"optional": true,
|
|
341
|
+
"docs": {
|
|
342
|
+
"tags": [],
|
|
343
|
+
"text": "The selector or the element bound with the tooltip."
|
|
344
|
+
},
|
|
345
|
+
"attribute": "bind-to",
|
|
346
|
+
"reflect": false
|
|
347
|
+
}
|
|
348
|
+
}; }
|
|
349
|
+
static get states() { return {
|
|
350
|
+
"position": {}
|
|
351
|
+
}; }
|
|
352
|
+
static get events() { return [{
|
|
353
|
+
"method": "positionChange",
|
|
354
|
+
"name": "positionChange",
|
|
355
|
+
"bubbles": true,
|
|
356
|
+
"cancelable": true,
|
|
357
|
+
"composed": true,
|
|
358
|
+
"docs": {
|
|
359
|
+
"tags": [],
|
|
360
|
+
"text": "Position change event."
|
|
361
|
+
},
|
|
362
|
+
"complexType": {
|
|
363
|
+
"original": "any",
|
|
364
|
+
"resolved": "any",
|
|
365
|
+
"references": {}
|
|
366
|
+
}
|
|
367
|
+
}]; }
|
|
368
|
+
static get elementRef() { return "host"; }
|
|
369
|
+
static get watchers() { return [{
|
|
370
|
+
"propName": "type",
|
|
371
|
+
"methodName": "validateType"
|
|
372
|
+
}, {
|
|
373
|
+
"propName": "position",
|
|
374
|
+
"methodName": "onPositionChange"
|
|
375
|
+
}, {
|
|
376
|
+
"propName": "open",
|
|
377
|
+
"methodName": "onOpen"
|
|
378
|
+
}]; }
|
|
379
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--z-tooltip-theme--surface: var(--color-surface01);
|
|
3
|
+
--z-tooltip-theme--text: var(--color-text01);
|
|
4
|
+
--arrow-size: 6px;
|
|
5
|
+
--edge-offset: calc(-1 * (var(--arrow-size) + calc(var(--space-unit) * 2)));
|
|
6
|
+
|
|
7
|
+
position: relative;
|
|
8
|
+
display: none;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
padding: var(--space-unit);
|
|
12
|
+
min-width: calc(var(--space-unit) * 8);
|
|
13
|
+
min-height: calc(var(--space-unit) * 4);
|
|
14
|
+
color: var(--z-tooltip-theme--text);
|
|
15
|
+
fill: currentColor;
|
|
16
|
+
font-family: var(--font-family-sans);
|
|
17
|
+
text-align: center;
|
|
18
|
+
border-radius: var(--border-radius-small);
|
|
19
|
+
background: var(--z-tooltip-theme--surface);
|
|
20
|
+
filter: drop-shadow(0 4px 8px var(--shadow-color-base));
|
|
21
|
+
will-change: filter;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host(.legacy) {
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
padding: calc(var(--space-unit) * 2);
|
|
27
|
+
min-width: auto;
|
|
28
|
+
min-height: auto;
|
|
29
|
+
max-width: 200px;
|
|
30
|
+
font-style: italic;
|
|
31
|
+
line-height: 16px;
|
|
32
|
+
letter-spacing: 0.32px;
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
border: var(--border-size-small) solid var(--gray200);
|
|
35
|
+
border-radius: var(--border-radius);
|
|
36
|
+
filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.08));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host(.legacy)::before {
|
|
40
|
+
--arrow-size: 14px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:host([position])::before {
|
|
44
|
+
--arrow-edge-offset: calc(100% - var(--arrow-size) - var(--space-unit));
|
|
45
|
+
--arrow-center-x-offset: calc(50% - calc(var(--arrow-size) / 2));
|
|
46
|
+
--arrow-center-y-offset: calc(100% - calc(var(--arrow-size) / 2));
|
|
47
|
+
|
|
48
|
+
content: '';
|
|
49
|
+
position: absolute;
|
|
50
|
+
width: var(--arrow-size);
|
|
51
|
+
height: var(--arrow-size);
|
|
52
|
+
background: inherit;
|
|
53
|
+
transform: rotate(45deg);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host([open][style*='top:']),
|
|
57
|
+
:host([open][style*='inset:']) {
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:host([position^='top']) {
|
|
62
|
+
margin-bottom: var(--space-unit);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
:host([position='right']) {
|
|
66
|
+
margin-left: var(--space-unit);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:host([position='top_right']),
|
|
70
|
+
:host([position='bottom_right']) {
|
|
71
|
+
margin-left: var(--edge-offset);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:host([position^='bottom']) {
|
|
75
|
+
margin-top: var(--space-unit);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:host([position='left']) {
|
|
79
|
+
margin-right: var(--space-unit);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:host([position='top_left']),
|
|
83
|
+
:host([position='bottom_left']) {
|
|
84
|
+
margin-right: var(--edge-offset);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Arrow style */
|
|
88
|
+
|
|
89
|
+
:host([position^='top'])::before {
|
|
90
|
+
top: var(--arrow-center-y-offset);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:host([position^='bottom'])::before {
|
|
94
|
+
bottom: var(--arrow-center-y-offset);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:host([position='top'])::before,
|
|
98
|
+
:host([position='bottom'])::before {
|
|
99
|
+
left: var(--arrow-center-x-offset);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
:host([position='right'])::before,
|
|
103
|
+
:host([position='left'])::before {
|
|
104
|
+
top: var(--arrow-center-x-offset);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:host([position='right'])::before {
|
|
108
|
+
right: var(--arrow-center-y-offset);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
:host([position='top_right'])::before,
|
|
112
|
+
:host([position='bottom_right'])::before {
|
|
113
|
+
right: var(--arrow-edge-offset);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:host([position='left'])::before {
|
|
117
|
+
left: var(--arrow-center-y-offset);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
:host([position='top_left'])::before,
|
|
121
|
+
:host([position='bottom_left'])::before {
|
|
122
|
+
left: var(--arrow-edge-offset);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
::slotted(*) {
|
|
126
|
+
flex: 1 auto;
|
|
127
|
+
overflow: auto;
|
|
128
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, Prop, h, Event, State } from "@stencil/core";
|
|
2
|
-
import {
|
|
2
|
+
import { PopoverPositions } from "../../../../beans";
|
|
3
3
|
import { handleKeyboardSubmit } from "../../../../utils/utils";
|
|
4
4
|
/**
|
|
5
5
|
* @slot - content
|
|
@@ -90,7 +90,7 @@ export class ZMyzCardInfo {
|
|
|
90
90
|
if (!this.cardData)
|
|
91
91
|
return;
|
|
92
92
|
const { title, year, author, description } = this.cardData;
|
|
93
|
-
return (h("z-
|
|
93
|
+
return (h("z-popover", { position: PopoverPositions.RIGHT, onClick: () => (this.tooltip = false) }, `${title} ${year} ${author} ${description}`));
|
|
94
94
|
}
|
|
95
95
|
setExpirationLicenseMessage(type) {
|
|
96
96
|
if ((type === "online" && this.cardData.onlineLicense.expired) ||
|
|
@@ -57,18 +57,22 @@ var InputStatusEnum;
|
|
|
57
57
|
InputStatusEnum["error"] = "error";
|
|
58
58
|
InputStatusEnum["warning"] = "warning";
|
|
59
59
|
})(InputStatusEnum || (InputStatusEnum = {}));
|
|
60
|
-
var
|
|
61
|
-
(function (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
var PopoverPositions;
|
|
61
|
+
(function (PopoverPositions) {
|
|
62
|
+
PopoverPositions["AUTO"] = "auto";
|
|
63
|
+
PopoverPositions["TOP"] = "top";
|
|
64
|
+
PopoverPositions["RIGHT"] = "right";
|
|
65
|
+
PopoverPositions["BOTTOM"] = "bottom";
|
|
66
|
+
PopoverPositions["LEFT"] = "left";
|
|
67
|
+
PopoverPositions["TOP_RIGHT"] = "top_right";
|
|
68
|
+
PopoverPositions["TOP_LEFT"] = "top_left";
|
|
69
|
+
PopoverPositions["BOTTOM_RIGHT"] = "bottom_right";
|
|
70
|
+
PopoverPositions["BOTTOM_LEFT"] = "bottom_left";
|
|
71
|
+
PopoverPositions["RIGHT_TOP"] = "right_top";
|
|
72
|
+
PopoverPositions["RIGHT_BOTTOM"] = "right_bottom";
|
|
73
|
+
PopoverPositions["LEFT_TOP"] = "left_top";
|
|
74
|
+
PopoverPositions["LEFT_BOTTOM"] = "left_bottom";
|
|
75
|
+
})(PopoverPositions || (PopoverPositions = {}));
|
|
72
76
|
var KeyboardKeyCodeEnum;
|
|
73
77
|
(function (KeyboardKeyCodeEnum) {
|
|
74
78
|
KeyboardKeyCodeEnum[KeyboardKeyCodeEnum["TAB"] = 9] = "TAB";
|
|
@@ -104,39 +108,6 @@ var ThemeVariant;
|
|
|
104
108
|
ThemeVariant["dark"] = "dark";
|
|
105
109
|
ThemeVariant["light"] = "light";
|
|
106
110
|
})(ThemeVariant || (ThemeVariant = {}));
|
|
107
|
-
var PopoverPosition;
|
|
108
|
-
(function (PopoverPosition) {
|
|
109
|
-
PopoverPosition["after-down"] = "after-down";
|
|
110
|
-
PopoverPosition["after-center"] = "after-center";
|
|
111
|
-
PopoverPosition["after-up"] = "after-up";
|
|
112
|
-
PopoverPosition["below-right"] = "below-right";
|
|
113
|
-
PopoverPosition["below-center"] = "below-center";
|
|
114
|
-
PopoverPosition["below-left"] = "below-left";
|
|
115
|
-
PopoverPosition["before-down"] = "before-down";
|
|
116
|
-
PopoverPosition["before-center"] = "before-center";
|
|
117
|
-
PopoverPosition["before-up"] = "before-up";
|
|
118
|
-
PopoverPosition["above-right"] = "above-right";
|
|
119
|
-
PopoverPosition["above-center"] = "above-center";
|
|
120
|
-
PopoverPosition["above-left"] = "above-left";
|
|
121
|
-
})(PopoverPosition || (PopoverPosition = {}));
|
|
122
|
-
var PopoverBorderRadius;
|
|
123
|
-
(function (PopoverBorderRadius) {
|
|
124
|
-
PopoverBorderRadius["none"] = "none";
|
|
125
|
-
PopoverBorderRadius["small"] = "small";
|
|
126
|
-
PopoverBorderRadius["medium"] = "medium";
|
|
127
|
-
})(PopoverBorderRadius || (PopoverBorderRadius = {}));
|
|
128
|
-
var PopoverShadow;
|
|
129
|
-
(function (PopoverShadow) {
|
|
130
|
-
PopoverShadow["shadow-1"] = "shadow-1";
|
|
131
|
-
PopoverShadow["shadow-2"] = "shadow-2";
|
|
132
|
-
PopoverShadow["shadow-3"] = "shadow-3";
|
|
133
|
-
PopoverShadow["shadow-4"] = "shadow-4";
|
|
134
|
-
PopoverShadow["shadow-6"] = "shadow-6";
|
|
135
|
-
PopoverShadow["shadow-8"] = "shadow-8";
|
|
136
|
-
PopoverShadow["shadow-12"] = "shadow-12";
|
|
137
|
-
PopoverShadow["shadow-16"] = "shadow-16";
|
|
138
|
-
PopoverShadow["shadow-24"] = "shadow-24";
|
|
139
|
-
})(PopoverShadow || (PopoverShadow = {}));
|
|
140
111
|
var DividerSize;
|
|
141
112
|
(function (DividerSize) {
|
|
142
113
|
DividerSize["small"] = "small";
|
|
@@ -312,4 +283,4 @@ var StatusTagStatus;
|
|
|
312
283
|
StatusTagStatus["default"] = "default";
|
|
313
284
|
})(StatusTagStatus || (StatusTagStatus = {}));
|
|
314
285
|
|
|
315
|
-
export { AvatarSize as A, ButtonTypeEnum as B, CardVariants as C, DeviceEnum as D, ExpandableListButtonAlign as E,
|
|
286
|
+
export { AvatarSize as A, ButtonTypeEnum as B, CardVariants as C, DeviceEnum as D, ExpandableListButtonAlign as E, InputTypeEnum as I, KeyboardCodeEnum as K, LabelPositions as L, NavigationTabsOrientations as N, OffCanvasVariantsEnum as O, PopoverPositions as P, StatusTagStatus as S, ThemeVariant as T, ZDatePickerMode as Z, DividerOrientation as a, DividerSize as b, ZDatePickerPosition as c, ZDatePickerModeValues as d, ZAriaAlertMode as e, ButtonVariantEnum as f, ButtonSizeEnum as g, KeyboardKeyCodeEnum as h, ZChipType as i, ZFileUploadTypeEnum as j, PocketStatusEnum as k, InputStatusEnum as l, AlertTypesEnum as m, LicenseTypeEnum as n, NavigationTabsSizes as o, TransitionDirectionEnum as p, KeyboardKeys as q, ZSectionTitleDividerPositions as r, ZTableRowExpandedType as s, ToastNotificationTransitionsEnum as t, ToastNotificationPositionsEnum as u, ListDividerType as v, ListSize as w, Size as x, SortDirectionEnum as y, ExpandableListStyle as z };
|
package/dist/esm/index.js
CHANGED