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

35 lines (27 loc) 973 B
import { getLibraryConfig } from "../Provider/Config.js"; const Registry = { lastOpenedGroup: [], popups: {}, scrollBlockedListenerPopupRef: undefined, scrollableListenerPopupRef: undefined, getOpenedPopups() { return Object.values(Registry.popups).flat().filter(popup => popup.state.isPopupOpen); }, getOpenedScrollBlockedFixedPopups() { return Registry.getOpenedPopups().filter(popup => popup.getIsOutsideScrollBlocked(popup) && !popup.getIsAbsolutePopup(popup)); }, getOpenedScrollableFixedPopups() { return Registry.getOpenedPopups().filter(popup => !popup.getIsOutsideScrollBlocked(popup) && !popup.getIsAbsolutePopup(popup)); }, getRootElement() { const getRootElement = getLibraryConfig('getRootElement'); if (getRootElement && typeof getRootElement === 'function') { const parent = getRootElement(); if (parent) { return parent; } } return document; } }; export default Registry;