import React, { RefObject } from 'react'; import '../../styles/base.module.css'; import { AllElementPropsWithoutRef } from '../../utils/elementTypings'; export interface DialogCustomTheme { '--accent-line-color'?: string; '--overlay-color'?: string; } export type DialogVariant = 'primary' | 'danger'; type DialogCloseProps = { /** * A function to set isOpen property to `false`. The dialog header will have a close-button if this property exists. The dialog will also close on Escape keypress. */ close: () => void; /** * The aria-label for the close button. Required with close property. */ closeButtonLabelText: string; } | { close?: undefined; closeButtonLabelText?: undefined; }; export type DialogProps = AllElementPropsWithoutRef<'div'> & React.PropsWithChildren<{ /** * The id of the dialog element. */ id: string; /** * The id of the heading element. */ 'aria-labelledby': string; /** * The id of the content description element which is usually a paragraph. The paragraph should be part of the content. */ 'aria-describedby'?: string; /** * Boolean indicating whether dialog has box shadow or not. */ boxShadow?: boolean; /** * When `true`, dialog is visible, */ isOpen: boolean; /** * The element ref which will get focus after the dialog is closed. */ focusAfterCloseRef?: RefObject; /** * The element which will get focus after the dialog is closed. */ focusAfterCloseElement?: HTMLElement; /** * When `true` dialog content is scrollable if needed. Use only for long text contents. */ scrollable?: boolean; /** * Defines the dialog variant */ variant?: DialogVariant; /** * Additional styles */ style?: React.CSSProperties; /** * Custom theme styles */ theme?: DialogCustomTheme; /** * Additional class names to apply to the dialog. */ className?: string; /** * Target element where dialog is rendered. The dialog is rendered into the document.body by default. */ targetElement?: HTMLElement; }> & DialogCloseProps; export declare const Dialog: { ({ boxShadow, isOpen, children, close, closeButtonLabelText, focusAfterCloseElement, focusAfterCloseRef, scrollable, variant, theme, className, targetElement, ...rest }: DialogProps): React.ReactPortal; Header: { ({ title, iconStart, className, ...rest }: import("./dialogHeader/DialogHeader").DialogHeaderProps): React.JSX.Element; componentName: string; }; Content: { ({ children, className, ...rest }: import("./dialogContent/DialogContent").DialogContentProps): React.JSX.Element; componentName: string; }; ActionButtons: { ({ children, className, ...rest }: import("./dialogActionButtons/DialogActionButtons").DialogActionButtonProps): React.JSX.Element; componentName: string; }; }; export {};