UNPKG

@zohodesk/components

Version:

Dot UI is a customizable React component library built to deliver a clean, accessible, and developer-friendly UI experience. It offers a growing set of reusable components designed to align with modern design systems and streamline application development

45 lines (39 loc) 1.33 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Config = require("../Provider/Config.js"); var Registry = { lastOpenedGroup: [], popups: {}, scrollBlockedListenerPopupRef: undefined, scrollableListenerPopupRef: undefined, getOpenedPopups: function getOpenedPopups() { return Object.values(Registry.popups).flat().filter(function (popup) { return popup.state.isPopupOpen; }); }, getOpenedScrollBlockedFixedPopups: function getOpenedScrollBlockedFixedPopups() { return Registry.getOpenedPopups().filter(function (popup) { return popup.getIsOutsideScrollBlocked(popup) && !popup.getIsAbsolutePopup(popup); }); }, getOpenedScrollableFixedPopups: function getOpenedScrollableFixedPopups() { return Registry.getOpenedPopups().filter(function (popup) { return !popup.getIsOutsideScrollBlocked(popup) && !popup.getIsAbsolutePopup(popup); }); }, getRootElement: function getRootElement() { var getRootElement = (0, _Config.getLibraryConfig)('getRootElement'); if (getRootElement && typeof getRootElement === 'function') { var parent = getRootElement(); if (parent) { return parent; } } return document; } }; var _default = Registry; exports["default"] = _default;