import React from 'react'; import { MDCDialogFoundation } from '@material/dialog/foundation'; import { MDCDialogAdapter } from '@material/dialog/adapter'; import DialogContent, { DialogContentProps } from './DialogContent'; import DialogFooter, { DialogFooterProps } from './DialogFooter'; import DialogTitle, { DialogTitleProps } from './DialogTitle'; import DialogButton from './DialogButton'; import { FocusTrap } from 'focus-trap'; export declare type ChildTypes = DialogTitle> | DialogContent> | DialogFooter>; export interface DialogProps, ContentProps extends {} = DialogContentProps, FooterProps extends {} = DialogFooterProps> extends React.HTMLProps { autoStackButtons?: boolean; children?: (React.ReactElement | React.ReactElement | React.ReactElement)[] | React.ReactElement | React.ReactElement | React.ReactElement; className?: string; escapeKeyAction?: string; id?: string; onClose?: (action: string) => void; onClosing?: (action: string) => void; onOpen?: () => void; onOpening?: () => void; open?: boolean; role?: 'alertdialog' | 'dialog'; scrimClickAction?: string; tag?: string; } interface DialogState { classList: Set; } declare class Dialog extends React.Component, DialogState> { focusTrap?: FocusTrap; foundation: MDCDialogFoundation; dialogElement: React.RefObject; labelledBy?: string; describedBy?: string; static defaultProps: Partial>; state: DialogState; componentDidMount(): void; componentWillUnmount(): void; componentDidUpdate(prevProps: DialogProps): void; readonly classes: string; readonly buttons: HTMLButtonElement[]; readonly content: HTMLElement | null; readonly defaultButton: HTMLButtonElement | null; private open; private initializeFocusTrap; readonly adapter: MDCDialogAdapter; handleOpening: () => void; handleClosing: (action: string) => void; handleInteraction: (e: React.KeyboardEvent | React.MouseEvent) => void; handleDocumentKeyDown: (e: KeyboardEvent) => void; handleLayout: () => void; render(): JSX.Element; renderContainer: (children?: ChildTypes[] | undefined) => React.ReactElement React.ReactElement React.Component)> | null) | (new (props: any) => React.Component)> | undefined; renderChild: (child: ChildTypes, i: number) => ChildTypes; setId: (child: ChildTypes, componentId?: string | undefined) => string; } export default Dialog; export { DialogTitle, DialogContent, DialogFooter, DialogButton };