@lax-wp/design-system 0.3.15 → 0.3.17

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.
@@ -37,5 +37,5 @@ export interface ModalProps extends AntDModalProps {
37
37
  * </Modal>
38
38
  * ```
39
39
  */
40
- export declare const Modal: (props: ModalProps) => import("react").ReactPortal;
40
+ export declare const Modal: (props: ModalProps) => import("react/jsx-runtime").JSX.Element;
41
41
  export default Modal;
@@ -0,0 +1,23 @@
1
+ export interface UseModalContainerOptions {
2
+ /** Primary container ID to search for */
3
+ primaryContainerId?: string;
4
+ /** Fallback container ID if primary not found */
5
+ fallbackContainerId?: string;
6
+ /** Maximum number of retry attempts */
7
+ maxRetries?: number;
8
+ /** Delay between retries in milliseconds */
9
+ retryDelay?: number;
10
+ }
11
+ /**
12
+ * Hook to find a modal container element with retry mechanism
13
+ * Searches across current document and parent frame if available
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * const container = useModalContainer({
18
+ * primaryContainerId: 'layout-app-main-content-container',
19
+ * fallbackContainerId: 'full-screen-container'
20
+ * });
21
+ * ```
22
+ */
23
+ export declare const useModalContainer: (options?: UseModalContainerOptions) => HTMLElement;
package/dist/index.d.ts CHANGED
@@ -85,3 +85,5 @@ export { SearchBar } from "./components/forms/search-bar/SearchBar";
85
85
  export type { TSearchBarProps, TSearchConfig } from "./components/forms/search-bar/SearchBar";
86
86
  export { useOutsideClick } from "./hooks/useOutsideClick";
87
87
  export type { UseOutsideClickProps } from "./hooks/useOutsideClick";
88
+ export { useModalContainer } from "./hooks/useModalContainer";
89
+ export type { UseModalContainerOptions } from "./hooks/useModalContainer";