@zanichelli/albe-web-components 4.2.0 → 5.0.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 +14 -0
- package/dist/cjs/{index-0e75c8cc.js → index-5c16dc2b.js} +33 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-97262bbd.js → utils-15c8b978.js} +1 -1
- package/dist/cjs/{utils-155eec04.js → utils-58afb908.js} +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-app-switcher_9.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-button-deprecated.cjs.entry.js +1 -1
- package/dist/cjs/z-button.cjs.entry.js +1 -1
- package/dist/cjs/z-card.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/z-cookiebar.cjs.entry.js +1 -1
- package/dist/cjs/z-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/z-file-upload.cjs.entry.js +2 -2
- package/dist/cjs/z-file.cjs.entry.js +1 -1
- package/dist/cjs/z-footer.cjs.entry.js +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +97 -303
- package/dist/cjs/z-popover.cjs.entry.js +2 -2
- 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 +2 -2
- 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 +1 -1
- package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
- package/dist/collection/beans/index.js +33 -0
- package/dist/collection/deprecated/z-popover-deprecated/index.js +173 -368
- package/dist/collection/deprecated/z-popover-deprecated/styles.css +188 -86
- package/dist/esm/{index-c1ce8cab.js → index-3786a7ff.js} +34 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-fa9f38ec.js → utils-14da09de.js} +1 -1
- package/dist/esm/{utils-99c70c57.js → utils-d49ae9f0.js} +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-app-switcher_9.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-button-deprecated.entry.js +1 -1
- package/dist/esm/z-button.entry.js +1 -1
- package/dist/esm/z-card.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/z-cookiebar.entry.js +1 -1
- package/dist/esm/z-date-picker.entry.js +2 -2
- package/dist/esm/z-file-upload.entry.js +2 -2
- package/dist/esm/z-file.entry.js +1 -1
- package/dist/esm/z-footer.entry.js +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +98 -304
- package/dist/esm/z-popover.entry.js +2 -2
- 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 +2 -2
- 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 +1 -1
- package/dist/esm/z-tooltip.entry.js +1 -1
- package/dist/types/beans/index.d.ts +30 -0
- package/dist/types/components.d.ts +28 -24
- package/dist/types/deprecated/z-popover-deprecated/index.d.ts +27 -51
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/{p-805af37b.entry.js → p-044edef0.entry.js} +1 -1
- package/dist/web-components-library/{p-897f9491.entry.js → p-0487d5f1.entry.js} +1 -1
- package/dist/web-components-library/{p-28e4abc4.entry.js → p-0610360b.entry.js} +1 -1
- package/{www/build/p-b6cd034b.js → dist/web-components-library/p-0b222589.js} +1 -1
- package/dist/web-components-library/{p-10be0462.entry.js → p-0bcc78d4.entry.js} +1 -1
- package/{www/build/p-91ec5eb4.entry.js → dist/web-components-library/p-0ccda54f.entry.js} +1 -1
- package/dist/web-components-library/{p-514719d2.entry.js → p-10c3285d.entry.js} +1 -1
- package/dist/web-components-library/{p-e007cd0b.entry.js → p-13174553.entry.js} +1 -1
- package/dist/web-components-library/{p-55f09348.entry.js → p-18c0f701.entry.js} +1 -1
- package/dist/web-components-library/{p-41f33f7b.entry.js → p-1c2331a4.entry.js} +1 -1
- package/dist/web-components-library/{p-f61fd81e.entry.js → p-206e5b31.entry.js} +1 -1
- package/dist/web-components-library/{p-e74b3fd9.entry.js → p-248e6c7d.entry.js} +1 -1
- package/dist/web-components-library/{p-8ddbbe24.entry.js → p-24ec049a.entry.js} +1 -1
- package/dist/web-components-library/{p-c8383456.entry.js → p-24f3a39e.entry.js} +1 -1
- package/dist/web-components-library/{p-970bd07c.entry.js → p-25b1a634.entry.js} +1 -1
- package/{www/build/p-870dabdc.entry.js → dist/web-components-library/p-286a2d0e.entry.js} +1 -1
- package/dist/web-components-library/{p-6bbd53ec.entry.js → p-286c4c99.entry.js} +1 -1
- package/dist/web-components-library/{p-f78d6123.entry.js → p-287678e2.entry.js} +1 -1
- package/dist/web-components-library/{p-ff4a0f6f.entry.js → p-2c86d1ea.entry.js} +1 -1
- package/dist/web-components-library/{p-5dcbba4e.entry.js → p-2d93e9e9.entry.js} +1 -1
- package/dist/web-components-library/{p-15fa8ca4.entry.js → p-33120ebd.entry.js} +1 -1
- package/{www/build/p-cd88cead.entry.js → dist/web-components-library/p-35f7cac2.entry.js} +1 -1
- package/dist/web-components-library/{p-46aecb12.entry.js → p-3dc21b58.entry.js} +1 -1
- package/dist/web-components-library/{p-b9cc2dfc.entry.js → p-4906f5a6.entry.js} +1 -1
- package/{www/build/p-1a76a57d.entry.js → dist/web-components-library/p-49602979.entry.js} +1 -1
- package/dist/web-components-library/{p-fdd91263.entry.js → p-49f8c86b.entry.js} +1 -1
- package/dist/web-components-library/{p-92895bce.entry.js → p-4a8fe1e0.entry.js} +1 -1
- package/dist/web-components-library/{p-1d5aa37b.entry.js → p-5553f117.entry.js} +1 -1
- package/dist/web-components-library/{p-053846df.entry.js → p-5a2dd46c.entry.js} +1 -1
- package/dist/web-components-library/{p-4be52491.entry.js → p-5c20338f.entry.js} +1 -1
- package/dist/web-components-library/{p-d04f3cb6.entry.js → p-60e042a0.entry.js} +1 -1
- package/dist/web-components-library/p-6897ca8c.js +1 -0
- package/dist/web-components-library/{p-53dade4b.entry.js → p-6d79baec.entry.js} +1 -1
- package/{www/build/p-78df5dbf.entry.js → dist/web-components-library/p-6db40dac.entry.js} +1 -1
- package/{www/build/p-fbfaa699.entry.js → dist/web-components-library/p-71f19680.entry.js} +1 -1
- package/{www/build/p-d6361790.entry.js → dist/web-components-library/p-7ce57dfd.entry.js} +1 -1
- package/dist/web-components-library/{p-8ce4b2c4.entry.js → p-80044bc0.entry.js} +1 -1
- package/{www/build/p-dd0efdbf.entry.js → dist/web-components-library/p-82217c76.entry.js} +1 -1
- package/dist/web-components-library/{p-0f6edb58.entry.js → p-95414290.entry.js} +1 -1
- package/dist/web-components-library/{p-659fc25e.entry.js → p-987f1f8a.entry.js} +1 -1
- package/dist/web-components-library/{p-1b1717c9.entry.js → p-99a76b4d.entry.js} +1 -1
- package/{www/build/p-4d6f2f01.entry.js → dist/web-components-library/p-9b563575.entry.js} +1 -1
- package/dist/web-components-library/{p-caa21a6f.entry.js → p-9c81ed70.entry.js} +1 -1
- package/dist/web-components-library/{p-c042e745.entry.js → p-a4245c8a.entry.js} +1 -1
- package/dist/web-components-library/{p-990b8236.entry.js → p-a88f4e49.entry.js} +1 -1
- package/dist/web-components-library/{p-bfc78a89.entry.js → p-a98ccf36.entry.js} +1 -1
- package/dist/web-components-library/{p-6c52ed1b.entry.js → p-bf3ea7b5.entry.js} +1 -1
- package/dist/web-components-library/{p-7f1cc90f.js → p-d41ca4c3.js} +1 -1
- package/{www/build/p-eca4cb15.entry.js → dist/web-components-library/p-e30a093f.entry.js} +1 -1
- package/dist/web-components-library/p-e9628876.entry.js +1 -0
- package/dist/web-components-library/p-ec0c7a06.entry.js +1 -0
- package/dist/web-components-library/{p-1eb357e8.entry.js → p-f9f5ab0b.entry.js} +1 -1
- package/dist/web-components-library/{p-99a562cb.entry.js → p-fd404599.entry.js} +1 -1
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/index.esm.js +1 -1
- package/www/build/{p-805af37b.entry.js → p-044edef0.entry.js} +1 -1
- package/www/build/{p-897f9491.entry.js → p-0487d5f1.entry.js} +1 -1
- package/www/build/{p-28e4abc4.entry.js → p-0610360b.entry.js} +1 -1
- package/{dist/web-components-library/p-b6cd034b.js → www/build/p-0b222589.js} +1 -1
- package/www/build/{p-10be0462.entry.js → p-0bcc78d4.entry.js} +1 -1
- package/{dist/web-components-library/p-91ec5eb4.entry.js → www/build/p-0ccda54f.entry.js} +1 -1
- package/www/build/{p-514719d2.entry.js → p-10c3285d.entry.js} +1 -1
- package/www/build/{p-e007cd0b.entry.js → p-13174553.entry.js} +1 -1
- package/www/build/{p-55f09348.entry.js → p-18c0f701.entry.js} +1 -1
- package/www/build/{p-41f33f7b.entry.js → p-1c2331a4.entry.js} +1 -1
- package/www/build/{p-f61fd81e.entry.js → p-206e5b31.entry.js} +1 -1
- package/www/build/{p-e74b3fd9.entry.js → p-248e6c7d.entry.js} +1 -1
- package/www/build/{p-8ddbbe24.entry.js → p-24ec049a.entry.js} +1 -1
- package/www/build/{p-c8383456.entry.js → p-24f3a39e.entry.js} +1 -1
- package/www/build/{p-970bd07c.entry.js → p-25b1a634.entry.js} +1 -1
- package/{dist/web-components-library/p-870dabdc.entry.js → www/build/p-286a2d0e.entry.js} +1 -1
- package/www/build/{p-6bbd53ec.entry.js → p-286c4c99.entry.js} +1 -1
- package/www/build/{p-f78d6123.entry.js → p-287678e2.entry.js} +1 -1
- package/www/build/{p-ff4a0f6f.entry.js → p-2c86d1ea.entry.js} +1 -1
- package/www/build/{p-5dcbba4e.entry.js → p-2d93e9e9.entry.js} +1 -1
- package/www/build/{p-15fa8ca4.entry.js → p-33120ebd.entry.js} +1 -1
- package/{dist/web-components-library/p-cd88cead.entry.js → www/build/p-35f7cac2.entry.js} +1 -1
- package/www/build/{p-46aecb12.entry.js → p-3dc21b58.entry.js} +1 -1
- package/www/build/{p-b9cc2dfc.entry.js → p-4906f5a6.entry.js} +1 -1
- package/{dist/web-components-library/p-1a76a57d.entry.js → www/build/p-49602979.entry.js} +1 -1
- package/www/build/{p-fdd91263.entry.js → p-49f8c86b.entry.js} +1 -1
- package/www/build/{p-92895bce.entry.js → p-4a8fe1e0.entry.js} +1 -1
- package/www/build/{p-1d5aa37b.entry.js → p-5553f117.entry.js} +1 -1
- package/www/build/{p-053846df.entry.js → p-5a2dd46c.entry.js} +1 -1
- package/www/build/{p-4be52491.entry.js → p-5c20338f.entry.js} +1 -1
- package/www/build/{p-d04f3cb6.entry.js → p-60e042a0.entry.js} +1 -1
- package/www/build/p-6897ca8c.js +1 -0
- package/www/build/{p-53dade4b.entry.js → p-6d79baec.entry.js} +1 -1
- package/{dist/web-components-library/p-78df5dbf.entry.js → www/build/p-6db40dac.entry.js} +1 -1
- package/{dist/web-components-library/p-fbfaa699.entry.js → www/build/p-71f19680.entry.js} +1 -1
- package/{dist/web-components-library/p-d6361790.entry.js → www/build/p-7ce57dfd.entry.js} +1 -1
- package/www/build/{p-8ce4b2c4.entry.js → p-80044bc0.entry.js} +1 -1
- package/{dist/web-components-library/p-dd0efdbf.entry.js → www/build/p-82217c76.entry.js} +1 -1
- package/www/build/p-88b56b6e.css +1 -0
- package/www/build/{p-0f6edb58.entry.js → p-95414290.entry.js} +1 -1
- package/www/build/{p-659fc25e.entry.js → p-987f1f8a.entry.js} +1 -1
- package/www/build/{p-1b1717c9.entry.js → p-99a76b4d.entry.js} +1 -1
- package/{dist/web-components-library/p-4d6f2f01.entry.js → www/build/p-9b563575.entry.js} +1 -1
- package/www/build/{p-caa21a6f.entry.js → p-9c81ed70.entry.js} +1 -1
- package/www/build/{p-c042e745.entry.js → p-a4245c8a.entry.js} +1 -1
- package/www/build/{p-990b8236.entry.js → p-a88f4e49.entry.js} +1 -1
- package/www/build/{p-bfc78a89.entry.js → p-a98ccf36.entry.js} +1 -1
- package/www/build/p-ae4eff83.js +1 -0
- package/www/build/{p-6c52ed1b.entry.js → p-bf3ea7b5.entry.js} +1 -1
- package/www/build/{p-7f1cc90f.js → p-d41ca4c3.js} +1 -1
- package/{dist/web-components-library/p-eca4cb15.entry.js → www/build/p-e30a093f.entry.js} +1 -1
- package/www/build/p-e9628876.entry.js +1 -0
- package/www/build/p-ec0c7a06.entry.js +1 -0
- package/www/build/{p-1eb357e8.entry.js → p-f9f5ab0b.entry.js} +1 -1
- package/www/build/{p-99a562cb.entry.js → p-fd404599.entry.js} +1 -1
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +1 -1
- package/dist/web-components-library/p-b359a3b4.entry.js +0 -1
- package/dist/web-components-library/p-ed1cd6b1.js +0 -1
- package/dist/web-components-library/p-f26251dd.entry.js +0 -1
- package/www/build/p-975e9d42.js +0 -129
- package/www/build/p-b359a3b4.entry.js +0 -1
- package/www/build/p-ed1cd6b1.js +0 -1
- package/www/build/p-f26251dd.entry.js +0 -1
- package/www/build/p-fcff1237.css +0 -812
|
@@ -1,330 +1,126 @@
|
|
|
1
|
-
import { Component, Prop, h,
|
|
2
|
-
import
|
|
1
|
+
import { Component, Prop, h, Host, State, Listen, Event, } from "@stencil/core";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import { PopoverPosition, PopoverBorderRadius, PopoverShadow, KeyboardKeys, } from "../../beans";
|
|
3
4
|
import { getElementTree } from "../../utils/utils";
|
|
4
|
-
const documentElement = document.documentElement;
|
|
5
|
-
function getParentElement(element) {
|
|
6
|
-
if (element.parentNode.host) {
|
|
7
|
-
return element.parentNode.host;
|
|
8
|
-
}
|
|
9
|
-
return element.parentNode;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Find the closest scrollable parent of a node.
|
|
13
|
-
*
|
|
14
|
-
* @param {Element} element The node
|
|
15
|
-
*/
|
|
16
|
-
function findScrollableParent(element) {
|
|
17
|
-
let parent = getParentElement(element);
|
|
18
|
-
while (parent && parent !== documentElement) {
|
|
19
|
-
const { overflow, overflowX, overflowY } = window.getComputedStyle(parent);
|
|
20
|
-
if (overflow === "hidden" ||
|
|
21
|
-
overflowY === "hidden" ||
|
|
22
|
-
overflowX === "hidden") {
|
|
23
|
-
return parent;
|
|
24
|
-
}
|
|
25
|
-
if ((parent.scrollHeight > parent.clientHeight &&
|
|
26
|
-
overflow !== "visible" &&
|
|
27
|
-
overflowY !== "visible") ||
|
|
28
|
-
(parent.scrollWidth > parent.clientWidth &&
|
|
29
|
-
overflow !== "visible" &&
|
|
30
|
-
overflowX !== "visible")) {
|
|
31
|
-
return parent;
|
|
32
|
-
}
|
|
33
|
-
parent = getParentElement(parent);
|
|
34
|
-
}
|
|
35
|
-
return documentElement;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Calculate computed offset.
|
|
39
|
-
* It includes matrix transformations.
|
|
40
|
-
* @param element The target element.
|
|
41
|
-
* @param targetParentOffset The relative offset parent.
|
|
42
|
-
* @return A client rect object.
|
|
43
|
-
*/
|
|
44
|
-
function computeOffset(element, targetParentOffset) {
|
|
45
|
-
const rect = element.getBoundingClientRect();
|
|
46
|
-
const width = rect.width;
|
|
47
|
-
const height = rect.height;
|
|
48
|
-
let top = 0;
|
|
49
|
-
let left = 0;
|
|
50
|
-
let offsetParent = element;
|
|
51
|
-
while (offsetParent && offsetParent != targetParentOffset) {
|
|
52
|
-
left += offsetParent.offsetLeft;
|
|
53
|
-
// document.body sometimes has offsetTop == 0 but still has an
|
|
54
|
-
// offset because of children margins!
|
|
55
|
-
if (offsetParent === document.body) {
|
|
56
|
-
top += offsetParent.getBoundingClientRect().top + window.scrollY;
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
top += offsetParent.offsetTop;
|
|
60
|
-
}
|
|
61
|
-
if (window.DOMMatrix) {
|
|
62
|
-
const style = window.getComputedStyle(offsetParent);
|
|
63
|
-
const transform = style.transform || style.webkitTransform;
|
|
64
|
-
const domMatrix = new DOMMatrix(transform);
|
|
65
|
-
if (domMatrix) {
|
|
66
|
-
left += domMatrix.m41;
|
|
67
|
-
if (offsetParent !== document.body) {
|
|
68
|
-
top += domMatrix.m42;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
if (!offsetParent.offsetParent) {
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
offsetParent = offsetParent.offsetParent;
|
|
76
|
-
}
|
|
77
|
-
let parentWidth;
|
|
78
|
-
let parentHeight;
|
|
79
|
-
if (offsetParent === document.body) {
|
|
80
|
-
parentWidth = window.innerWidth;
|
|
81
|
-
parentHeight = window.innerHeight;
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
parentWidth = offsetParent.offsetWidth;
|
|
85
|
-
parentHeight = offsetParent.offsetHeight;
|
|
86
|
-
}
|
|
87
|
-
const right = parentWidth - left - rect.width;
|
|
88
|
-
const bottom = parentHeight - top - rect.height;
|
|
89
|
-
return { top, right, bottom, left, width, height };
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Popover component.
|
|
93
|
-
*
|
|
94
|
-
* @cssprop --z-popover-theme--surface - background color of the popover.
|
|
95
|
-
* @cssprop --z-popover-theme--text - foreground color of the popover.
|
|
96
|
-
* @cssprop --z-popover-shadow - shadow of the popover.
|
|
97
|
-
*/
|
|
98
5
|
export class ZPopoverDeprecated {
|
|
99
|
-
constructor() {
|
|
100
|
-
/** Popover position. */
|
|
101
|
-
this.position = PopoverPositions.AUTO;
|
|
102
|
-
/**
|
|
103
|
-
* The open state of the popover.
|
|
104
|
-
*/
|
|
105
|
-
this.open = false;
|
|
106
|
-
/**
|
|
107
|
-
* Whether to show popover's arrow.
|
|
108
|
-
*/
|
|
109
|
-
this.showArrow = false;
|
|
110
|
-
/**
|
|
111
|
-
* Whether center the popup on the main side - according to "position".
|
|
112
|
-
*/
|
|
113
|
-
this.center = false;
|
|
114
|
-
}
|
|
115
|
-
closePopoverWithKeyboard(e) {
|
|
116
|
-
if (e.key === KeyboardKeys.ESC) {
|
|
117
|
-
this.open = false;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
handleOutsideClick(e) {
|
|
121
|
-
const tree = getElementTree(e.target);
|
|
122
|
-
const parent = tree.find((elem) => elem.nodeName.toLowerCase() === "z-popover");
|
|
123
|
-
if (!parent) {
|
|
124
|
-
this.open = false;
|
|
125
|
-
this.positionChange.emit({ position: this.currentPosition });
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
validatePosition(newValue) {
|
|
129
|
-
if (newValue &&
|
|
130
|
-
Object.values(PopoverPositions).every((position) => newValue !== position)) {
|
|
131
|
-
this.position = PopoverPositions.AUTO;
|
|
132
|
-
}
|
|
133
|
-
this.currentPosition = this.position;
|
|
134
|
-
this.positionChange.emit({ position: this.currentPosition });
|
|
135
|
-
}
|
|
136
6
|
/**
|
|
137
|
-
*
|
|
7
|
+
* Constructor.
|
|
138
8
|
*/
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
style.removeProperty("left");
|
|
156
|
-
style.removeProperty("max-width");
|
|
157
|
-
style.removeProperty("max-height");
|
|
158
|
-
this.currentPosition = undefined;
|
|
159
|
-
}
|
|
160
|
-
this.openChange.emit({ open: this.open });
|
|
9
|
+
constructor() {
|
|
10
|
+
/** [optional] Popover position */
|
|
11
|
+
this.position = PopoverPosition["after-up"];
|
|
12
|
+
/** [optional] Background color token for popover */
|
|
13
|
+
this.backgroundColor = "color-white";
|
|
14
|
+
/** [optional] Border radius token for popover */
|
|
15
|
+
this.borderRadius = PopoverBorderRadius.small;
|
|
16
|
+
/** [optional] Box shadow token for popover */
|
|
17
|
+
this.boxShadow = PopoverShadow["shadow-1"];
|
|
18
|
+
/** [optional] Show or hide arrow */
|
|
19
|
+
this.showArrow = false;
|
|
20
|
+
/** [optional] Sets padding for Popover container */
|
|
21
|
+
this.padding = "8px";
|
|
22
|
+
this.isVisible = false;
|
|
23
|
+
this.popoverPosition = this.position;
|
|
24
|
+
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
161
25
|
}
|
|
162
|
-
|
|
163
|
-
|
|
26
|
+
emitTriggerClick() {
|
|
27
|
+
this.triggerClick.emit({
|
|
28
|
+
isVisible: this.isVisible,
|
|
29
|
+
});
|
|
164
30
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
if (!element) {
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
const scrollContainer = findScrollableParent(element);
|
|
183
|
-
const scrollingBoundingRect = scrollContainer.getBoundingClientRect();
|
|
184
|
-
const offsetContainer = this.host.offsetParent;
|
|
185
|
-
const relativeBoundingRect = offsetContainer
|
|
186
|
-
? computeOffset(offsetContainer, scrollContainer)
|
|
187
|
-
: { top: 0, right: 0, bottom: 0, left: 0 };
|
|
188
|
-
const boundingRect = computeOffset(element, scrollContainer);
|
|
189
|
-
const top = boundingRect.top - scrollContainer.scrollTop;
|
|
190
|
-
const bottom = scrollingBoundingRect.height -
|
|
191
|
-
(boundingRect.top + boundingRect.height) +
|
|
192
|
-
scrollContainer.scrollTop;
|
|
193
|
-
const left = boundingRect.left - scrollContainer.scrollLeft;
|
|
194
|
-
const right = scrollingBoundingRect.width -
|
|
195
|
-
(boundingRect.left + boundingRect.width) +
|
|
196
|
-
scrollContainer.scrollLeft;
|
|
197
|
-
const overflowBottom = Math.max(0, scrollingBoundingRect.top +
|
|
198
|
-
scrollingBoundingRect.height -
|
|
199
|
-
window.innerHeight);
|
|
200
|
-
const overflowRight = Math.max(0, scrollingBoundingRect.left +
|
|
201
|
-
scrollingBoundingRect.width -
|
|
202
|
-
window.innerWidth);
|
|
203
|
-
const availableTop = Math.min(top, top + scrollingBoundingRect.top);
|
|
204
|
-
const availableBottom = Math.min(bottom, bottom - overflowBottom);
|
|
205
|
-
const availableLeft = Math.min(left, left + scrollingBoundingRect.left);
|
|
206
|
-
const availableRight = Math.min(right, right - overflowRight);
|
|
207
|
-
const availableHeight = availableTop + availableBottom + boundingRect.height;
|
|
208
|
-
const availableWidth = availableLeft + availableRight + boundingRect.width;
|
|
209
|
-
let position = this.currentPosition;
|
|
210
|
-
const positions = [];
|
|
211
|
-
if (this.position === PopoverPositions.AUTO) {
|
|
212
|
-
/**
|
|
213
|
-
* The `AUTO` position tries to place the popover in the 'safest' area,
|
|
214
|
-
* where there's more space available.
|
|
215
|
-
*/
|
|
216
|
-
if (availableLeft / availableWidth > 0.6) {
|
|
217
|
-
positions.push(PopoverPositions.LEFT);
|
|
31
|
+
openPopover() {
|
|
32
|
+
const width = document.body.clientWidth;
|
|
33
|
+
const height = window.innerHeight;
|
|
34
|
+
const rect = this.popoverElem.getBoundingClientRect();
|
|
35
|
+
const l = rect.left;
|
|
36
|
+
const r = rect.right;
|
|
37
|
+
const t = rect.top;
|
|
38
|
+
const b = rect.bottom;
|
|
39
|
+
let firstSide = this.position.split("-")[0];
|
|
40
|
+
let secondSide = this.position.split("-")[1];
|
|
41
|
+
// If top is outside viewport
|
|
42
|
+
if (t < 0) {
|
|
43
|
+
if (this.position.startsWith("above")) {
|
|
44
|
+
firstSide = "below";
|
|
218
45
|
}
|
|
219
|
-
else
|
|
220
|
-
|
|
46
|
+
else {
|
|
47
|
+
secondSide = "down";
|
|
221
48
|
}
|
|
222
|
-
|
|
223
|
-
|
|
49
|
+
}
|
|
50
|
+
// If bottom is outside viewport
|
|
51
|
+
if (b > height) {
|
|
52
|
+
if (this.position.startsWith("below")) {
|
|
53
|
+
firstSide = "above";
|
|
224
54
|
}
|
|
225
|
-
else
|
|
226
|
-
|
|
55
|
+
else {
|
|
56
|
+
secondSide = "up";
|
|
227
57
|
}
|
|
228
|
-
|
|
229
|
-
|
|
58
|
+
}
|
|
59
|
+
// If right is outside viewport
|
|
60
|
+
if (r > width) {
|
|
61
|
+
if (this.position.startsWith("above") ||
|
|
62
|
+
this.position.startsWith("below")) {
|
|
63
|
+
secondSide = "left";
|
|
230
64
|
}
|
|
231
65
|
else {
|
|
232
|
-
|
|
66
|
+
firstSide = "before";
|
|
233
67
|
}
|
|
234
|
-
position = positions.join("_");
|
|
235
68
|
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
const offsetLeft = boundingRect.left - relativeBoundingRect.left;
|
|
242
|
-
const offsetModifier = this.center ? 0.5 : 0;
|
|
243
|
-
const sizeModifier = this.center ? 0.5 : 0;
|
|
244
|
-
if (position === PopoverPositions.TOP ||
|
|
245
|
-
position === PopoverPositions.TOP_RIGHT) {
|
|
246
|
-
style.top = "auto";
|
|
247
|
-
style.right = "auto";
|
|
248
|
-
style.bottom = `${offsetBottom + boundingRect.height}px`;
|
|
249
|
-
style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
|
|
250
|
-
style.maxHeight = `${availableTop}px`;
|
|
251
|
-
if (position === PopoverPositions.TOP_RIGHT) {
|
|
252
|
-
style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
|
|
69
|
+
// If left is outside viewport
|
|
70
|
+
if (l < 0) {
|
|
71
|
+
if (this.position.startsWith("above") ||
|
|
72
|
+
this.position.startsWith("below")) {
|
|
73
|
+
secondSide = "right";
|
|
253
74
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
style.top = "auto";
|
|
257
|
-
style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;
|
|
258
|
-
style.bottom = `${offsetBottom + boundingRect.height}px`;
|
|
259
|
-
style.left = "auto";
|
|
260
|
-
style.maxWidth = `${availableLeft}px`;
|
|
261
|
-
style.maxHeight = `${availableTop}px`;
|
|
262
|
-
}
|
|
263
|
-
else if (position === PopoverPositions.BOTTOM ||
|
|
264
|
-
position === PopoverPositions.BOTTOM_RIGHT) {
|
|
265
|
-
style.top = `${offsetTop + boundingRect.height}px`;
|
|
266
|
-
style.right = "auto";
|
|
267
|
-
style.bottom = "auto";
|
|
268
|
-
style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
|
|
269
|
-
style.maxHeight = `${availableBottom}px`;
|
|
270
|
-
if (position === PopoverPositions.BOTTOM_RIGHT) {
|
|
271
|
-
style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
|
|
75
|
+
else {
|
|
76
|
+
firstSide = "after";
|
|
272
77
|
}
|
|
273
78
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
|
|
285
|
-
style.right = "auto";
|
|
286
|
-
style.bottom = "auto";
|
|
287
|
-
style.left = `${offsetLeft + boundingRect.width}px`;
|
|
288
|
-
style.maxWidth = `${availableRight}px`;
|
|
289
|
-
style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
|
|
290
|
-
}
|
|
291
|
-
else if (position === PopoverPositions.RIGHT_TOP) {
|
|
292
|
-
style.top = "auto";
|
|
293
|
-
style.right = "auto";
|
|
294
|
-
style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;
|
|
295
|
-
style.left = `${offsetLeft + boundingRect.width}px`;
|
|
296
|
-
style.maxWidth = `${availableRight}px`;
|
|
297
|
-
style.maxHeight = `${availableTop + boundingRect.height * sizeModifier}px`;
|
|
298
|
-
}
|
|
299
|
-
else if (position === PopoverPositions.LEFT ||
|
|
300
|
-
position === PopoverPositions.LEFT_BOTTOM) {
|
|
301
|
-
style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
|
|
302
|
-
style.right = `${offsetRight + boundingRect.width}px`;
|
|
303
|
-
style.bottom = "auto";
|
|
304
|
-
style.left = "auto";
|
|
305
|
-
style.maxWidth = `${availableLeft}px`;
|
|
306
|
-
style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
|
|
79
|
+
this.popoverPosition = PopoverPosition[`${firstSide}-${secondSide}`];
|
|
80
|
+
this.isVisible = true;
|
|
81
|
+
}
|
|
82
|
+
closePopover() {
|
|
83
|
+
this.popoverPosition = this.position;
|
|
84
|
+
this.isVisible = false;
|
|
85
|
+
}
|
|
86
|
+
closePopoverWithKeyboard(e) {
|
|
87
|
+
if (e.key === KeyboardKeys.ESC) {
|
|
88
|
+
this.closePopover();
|
|
307
89
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
90
|
+
}
|
|
91
|
+
handleClick(event) {
|
|
92
|
+
this.isVisible ? this.closePopover() : this.openPopover();
|
|
93
|
+
this.emitTriggerClick();
|
|
94
|
+
event.stopPropagation();
|
|
95
|
+
}
|
|
96
|
+
handleKeyDown(event) {
|
|
97
|
+
if (event.code === KeyboardKeys.ENTER) {
|
|
98
|
+
this.isVisible ? this.closePopover() : this.openPopover();
|
|
315
99
|
}
|
|
316
|
-
this.currentPosition = position || this.position;
|
|
317
|
-
this.host.setAttribute('current-position', this.currentPosition);
|
|
318
100
|
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
101
|
+
handleOutsideClick(e) {
|
|
102
|
+
const tree = getElementTree(e.target);
|
|
103
|
+
const parent = tree.find((elem) => elem.nodeName.toLowerCase() === "z-popover-deprecated");
|
|
104
|
+
if (!parent) {
|
|
105
|
+
this.closePopover();
|
|
106
|
+
}
|
|
322
107
|
}
|
|
323
108
|
render() {
|
|
324
|
-
return h(
|
|
109
|
+
return (h(Host, { onKeyDown: this.handleKeyDown },
|
|
110
|
+
h("div", { tabindex: "0", onClick: (event) => this.handleClick(event), onKeyDown: (event) => {
|
|
111
|
+
if (event.key === KeyboardKeys.ENTER) {
|
|
112
|
+
this.handleClick(event);
|
|
113
|
+
}
|
|
114
|
+
} },
|
|
115
|
+
h("slot", { name: "trigger" })),
|
|
116
|
+
h("div", { ref: (e) => (this.popoverElem = e), class: classNames("popover-content-container", this.popoverPosition, `border-radius-${this.borderRadius}`, this.boxShadow, { "show-arrow": this.showArrow }, { visible: this.isVisible }), style: {
|
|
117
|
+
backgroundColor: `var(--${this.backgroundColor})`,
|
|
118
|
+
padding: this.padding,
|
|
119
|
+
} },
|
|
120
|
+
h("slot", { name: "popover" }))));
|
|
325
121
|
}
|
|
326
122
|
static get is() { return "z-popover-deprecated"; }
|
|
327
|
-
static get encapsulation() { return "
|
|
123
|
+
static get encapsulation() { return "scoped"; }
|
|
328
124
|
static get originalStyleUrls() { return {
|
|
329
125
|
"$": ["styles.css"]
|
|
330
126
|
}; }
|
|
@@ -334,54 +130,78 @@ export class ZPopoverDeprecated {
|
|
|
334
130
|
static get properties() { return {
|
|
335
131
|
"position": {
|
|
336
132
|
"type": "string",
|
|
337
|
-
"mutable":
|
|
133
|
+
"mutable": false,
|
|
338
134
|
"complexType": {
|
|
339
|
-
"original": "
|
|
340
|
-
"resolved": "
|
|
135
|
+
"original": "PopoverPosition",
|
|
136
|
+
"resolved": "typeof PopoverPosition[\"above-center\"] | typeof PopoverPosition[\"above-left\"] | typeof PopoverPosition[\"above-right\"] | typeof PopoverPosition[\"after-center\"] | typeof PopoverPosition[\"after-down\"] | typeof PopoverPosition[\"after-up\"] | typeof PopoverPosition[\"before-center\"] | typeof PopoverPosition[\"before-down\"] | typeof PopoverPosition[\"before-up\"] | typeof PopoverPosition[\"below-center\"] | typeof PopoverPosition[\"below-left\"] | typeof PopoverPosition[\"below-right\"]",
|
|
341
137
|
"references": {
|
|
342
|
-
"
|
|
138
|
+
"PopoverPosition": {
|
|
343
139
|
"location": "import",
|
|
344
140
|
"path": "../../beans"
|
|
345
141
|
}
|
|
346
142
|
}
|
|
347
143
|
},
|
|
348
144
|
"required": false,
|
|
349
|
-
"optional":
|
|
145
|
+
"optional": true,
|
|
350
146
|
"docs": {
|
|
351
147
|
"tags": [],
|
|
352
|
-
"text": "Popover position
|
|
148
|
+
"text": "[optional] Popover position"
|
|
353
149
|
},
|
|
354
150
|
"attribute": "position",
|
|
355
|
-
"reflect":
|
|
356
|
-
"defaultValue": "
|
|
151
|
+
"reflect": false,
|
|
152
|
+
"defaultValue": "PopoverPosition[\"after-up\"]"
|
|
357
153
|
},
|
|
358
|
-
"
|
|
359
|
-
"type": "
|
|
360
|
-
"mutable":
|
|
154
|
+
"backgroundColor": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"mutable": false,
|
|
361
157
|
"complexType": {
|
|
362
|
-
"original": "
|
|
363
|
-
"resolved": "
|
|
158
|
+
"original": "string",
|
|
159
|
+
"resolved": "string",
|
|
364
160
|
"references": {}
|
|
365
161
|
},
|
|
366
162
|
"required": false,
|
|
367
|
-
"optional":
|
|
163
|
+
"optional": true,
|
|
368
164
|
"docs": {
|
|
369
165
|
"tags": [],
|
|
370
|
-
"text": "
|
|
166
|
+
"text": "[optional] Background color token for popover"
|
|
371
167
|
},
|
|
372
|
-
"attribute": "
|
|
373
|
-
"reflect":
|
|
374
|
-
"defaultValue": "
|
|
168
|
+
"attribute": "background-color",
|
|
169
|
+
"reflect": false,
|
|
170
|
+
"defaultValue": "\"color-white\""
|
|
171
|
+
},
|
|
172
|
+
"borderRadius": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"mutable": false,
|
|
175
|
+
"complexType": {
|
|
176
|
+
"original": "PopoverBorderRadius",
|
|
177
|
+
"resolved": "PopoverBorderRadius.medium | PopoverBorderRadius.none | PopoverBorderRadius.small",
|
|
178
|
+
"references": {
|
|
179
|
+
"PopoverBorderRadius": {
|
|
180
|
+
"location": "import",
|
|
181
|
+
"path": "../../beans"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"required": false,
|
|
186
|
+
"optional": true,
|
|
187
|
+
"docs": {
|
|
188
|
+
"tags": [],
|
|
189
|
+
"text": "[optional] Border radius token for popover"
|
|
190
|
+
},
|
|
191
|
+
"attribute": "border-radius",
|
|
192
|
+
"reflect": false,
|
|
193
|
+
"defaultValue": "PopoverBorderRadius.small"
|
|
375
194
|
},
|
|
376
|
-
"
|
|
195
|
+
"boxShadow": {
|
|
377
196
|
"type": "string",
|
|
378
197
|
"mutable": false,
|
|
379
198
|
"complexType": {
|
|
380
|
-
"original": "
|
|
381
|
-
"resolved": "
|
|
199
|
+
"original": "PopoverShadow",
|
|
200
|
+
"resolved": "typeof PopoverShadow[\"shadow-1\"] | typeof PopoverShadow[\"shadow-12\"] | typeof PopoverShadow[\"shadow-16\"] | typeof PopoverShadow[\"shadow-2\"] | typeof PopoverShadow[\"shadow-24\"] | typeof PopoverShadow[\"shadow-3\"] | typeof PopoverShadow[\"shadow-4\"] | typeof PopoverShadow[\"shadow-6\"] | typeof PopoverShadow[\"shadow-8\"]",
|
|
382
201
|
"references": {
|
|
383
|
-
"
|
|
384
|
-
"location": "
|
|
202
|
+
"PopoverShadow": {
|
|
203
|
+
"location": "import",
|
|
204
|
+
"path": "../../beans"
|
|
385
205
|
}
|
|
386
206
|
}
|
|
387
207
|
},
|
|
@@ -389,10 +209,11 @@ export class ZPopoverDeprecated {
|
|
|
389
209
|
"optional": true,
|
|
390
210
|
"docs": {
|
|
391
211
|
"tags": [],
|
|
392
|
-
"text": "
|
|
212
|
+
"text": "[optional] Box shadow token for popover"
|
|
393
213
|
},
|
|
394
|
-
"attribute": "
|
|
395
|
-
"reflect": false
|
|
214
|
+
"attribute": "box-shadow",
|
|
215
|
+
"reflect": false,
|
|
216
|
+
"defaultValue": "PopoverShadow[\"shadow-1\"]"
|
|
396
217
|
},
|
|
397
218
|
"showArrow": {
|
|
398
219
|
"type": "boolean",
|
|
@@ -403,61 +224,47 @@ export class ZPopoverDeprecated {
|
|
|
403
224
|
"references": {}
|
|
404
225
|
},
|
|
405
226
|
"required": false,
|
|
406
|
-
"optional":
|
|
227
|
+
"optional": true,
|
|
407
228
|
"docs": {
|
|
408
229
|
"tags": [],
|
|
409
|
-
"text": "
|
|
230
|
+
"text": "[optional] Show or hide arrow"
|
|
410
231
|
},
|
|
411
232
|
"attribute": "show-arrow",
|
|
412
|
-
"reflect":
|
|
233
|
+
"reflect": false,
|
|
413
234
|
"defaultValue": "false"
|
|
414
235
|
},
|
|
415
|
-
"
|
|
416
|
-
"type": "
|
|
236
|
+
"padding": {
|
|
237
|
+
"type": "string",
|
|
417
238
|
"mutable": false,
|
|
418
239
|
"complexType": {
|
|
419
|
-
"original": "
|
|
420
|
-
"resolved": "
|
|
240
|
+
"original": "string",
|
|
241
|
+
"resolved": "string",
|
|
421
242
|
"references": {}
|
|
422
243
|
},
|
|
423
244
|
"required": false,
|
|
424
|
-
"optional":
|
|
245
|
+
"optional": true,
|
|
425
246
|
"docs": {
|
|
426
247
|
"tags": [],
|
|
427
|
-
"text": "
|
|
248
|
+
"text": "[optional] Sets padding for Popover container"
|
|
428
249
|
},
|
|
429
|
-
"attribute": "
|
|
430
|
-
"reflect":
|
|
431
|
-
"defaultValue": "
|
|
250
|
+
"attribute": "padding",
|
|
251
|
+
"reflect": false,
|
|
252
|
+
"defaultValue": "\"8px\""
|
|
432
253
|
}
|
|
433
254
|
}; }
|
|
434
255
|
static get states() { return {
|
|
435
|
-
"
|
|
256
|
+
"isVisible": {},
|
|
257
|
+
"popoverPosition": {}
|
|
436
258
|
}; }
|
|
437
259
|
static get events() { return [{
|
|
438
|
-
"method": "
|
|
439
|
-
"name": "
|
|
440
|
-
"bubbles": true,
|
|
441
|
-
"cancelable": true,
|
|
442
|
-
"composed": true,
|
|
443
|
-
"docs": {
|
|
444
|
-
"tags": [],
|
|
445
|
-
"text": "Position change event."
|
|
446
|
-
},
|
|
447
|
-
"complexType": {
|
|
448
|
-
"original": "any",
|
|
449
|
-
"resolved": "any",
|
|
450
|
-
"references": {}
|
|
451
|
-
}
|
|
452
|
-
}, {
|
|
453
|
-
"method": "openChange",
|
|
454
|
-
"name": "openChange",
|
|
260
|
+
"method": "triggerClick",
|
|
261
|
+
"name": "triggerClick",
|
|
455
262
|
"bubbles": true,
|
|
456
263
|
"cancelable": true,
|
|
457
264
|
"composed": true,
|
|
458
265
|
"docs": {
|
|
459
266
|
"tags": [],
|
|
460
|
-
"text": "
|
|
267
|
+
"text": "Emitted on popover click, returns isVisible state"
|
|
461
268
|
},
|
|
462
269
|
"complexType": {
|
|
463
270
|
"original": "any",
|
|
@@ -465,15 +272,13 @@ export class ZPopoverDeprecated {
|
|
|
465
272
|
"references": {}
|
|
466
273
|
}
|
|
467
274
|
}]; }
|
|
468
|
-
static get elementRef() { return "host"; }
|
|
469
|
-
static get watchers() { return [{
|
|
470
|
-
"propName": "position",
|
|
471
|
-
"methodName": "validatePosition"
|
|
472
|
-
}, {
|
|
473
|
-
"propName": "open",
|
|
474
|
-
"methodName": "onOpen"
|
|
475
|
-
}]; }
|
|
476
275
|
static get listeners() { return [{
|
|
276
|
+
"name": "closePopover",
|
|
277
|
+
"method": "closePopover",
|
|
278
|
+
"target": undefined,
|
|
279
|
+
"capture": false,
|
|
280
|
+
"passive": false
|
|
281
|
+
}, {
|
|
477
282
|
"name": "keyup",
|
|
478
283
|
"method": "closePopoverWithKeyboard",
|
|
479
284
|
"target": "window",
|