You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.3 KiB
39 lines
1.3 KiB
export interface ModalInstance {
|
|
dialog: Element;
|
|
backdrop: Element;
|
|
}
|
|
export interface ModalManagerOptions {
|
|
ownerDocument?: Document;
|
|
handleContainerOverflow?: boolean;
|
|
isRTL?: boolean;
|
|
}
|
|
export declare type ContainerState = {
|
|
scrollBarWidth: number;
|
|
style: Record<string, any>;
|
|
[key: string]: any;
|
|
};
|
|
export declare const OPEN_DATA_ATTRIBUTE: "data-rr-ui-modal-open";
|
|
/**
|
|
* Manages a stack of Modals as well as ensuring
|
|
* body scrolling is is disabled and padding accounted for
|
|
*/
|
|
declare class ModalManager {
|
|
readonly handleContainerOverflow: boolean;
|
|
readonly isRTL: boolean;
|
|
readonly modals: ModalInstance[];
|
|
protected state: ContainerState;
|
|
protected ownerDocument: Document | undefined;
|
|
constructor({ ownerDocument, handleContainerOverflow, isRTL, }?: ModalManagerOptions);
|
|
getScrollbarWidth(): number;
|
|
getElement(): HTMLElement;
|
|
setModalAttributes(_modal: ModalInstance): void;
|
|
removeModalAttributes(_modal: ModalInstance): void;
|
|
setContainerStyle(containerState: ContainerState): void;
|
|
reset(): void;
|
|
removeContainerStyle(containerState: ContainerState): void;
|
|
add(modal: ModalInstance): number;
|
|
remove(modal: ModalInstance): void;
|
|
isTopModal(modal: ModalInstance): boolean;
|
|
}
|
|
export default ModalManager;
|