import type { ReactNode, Ref } from 'react'; import type { OverlayOpenChangeDetails } from '../overlays/_shared/overlayTypes.js'; /** BU render-prop shape, declared locally — .types.ts no headless-lib imports allowed here. */ export type RenderProp = import('react').ReactElement | ((props: any, state?: any) => import('react').ReactElement); export type DialogSize = 'sm' | 'md' | 'lg'; /** Wide gallery layouts and edge-to-edge fullscreen are appearances, not sizes. */ export type DialogAppearance = 'default' | 'wide' | 'fullscreen'; export type DialogPlacement = 'center' | 'top'; export type DialogVariant = 'regular' | 'identity'; export interface DialogRootProps { /** Controlled open state. Pair with `onOpenChange`. */ open?: boolean; /** Initial open state when uncontrolled. */ defaultOpen?: boolean; /** Called with the next open state when it changes. */ onOpenChange?: ((open: boolean, details: OverlayOpenChangeDetails) => void) | undefined; /** Modal (default true) traps focus, inerts the page and registers the LayerStack scroll lock; false is a non-modal dialog. */ modal?: boolean; /** Outside press closes; `false` maps to BU disablePointerDismissal. */ dismissible?: boolean; /** Localisable strings. */ labels?: { close?: string; }; /** Content rendered inside the component. */ children?: ReactNode; } export interface DialogTriggerProps { children?: ReactNode; className?: string; ref?: Ref; [key: string]: unknown; } export interface DialogCloseProps { children?: ReactNode; className?: string; ref?: Ref; [key: string]: unknown; } export interface DialogPortalProps { children?: ReactNode; keepMounted?: boolean; } export interface DialogBackdropProps { className?: string; ref?: Ref; } export interface DialogPopupProps { size?: DialogSize; appearance?: DialogAppearance; placement?: DialogPlacement; /** 'identity' carries the product shell variant; 'regular' is the default overlay material. */ variant?: DialogVariant; prominent?: boolean; /** BU initialFocus — ref, element getter, or boolean; default first tabbable in Body else popup. */ initialFocus?: unknown; /** BU finalFocus — ref, element getter, or boolean. */ finalFocus?: unknown; /** BU render prop — accepts
; submitting a form inside does not close the dialog. */ render?: RenderProp; children?: ReactNode; className?: string; ref?: Ref; [key: string]: unknown; } export interface DialogTitleProps { children?: ReactNode; className?: string; ref?: Ref; [key: string]: unknown; } export interface DialogDescriptionProps { children?: ReactNode; className?: string; ref?: Ref; [key: string]: unknown; } export interface DialogLayoutProps { children?: ReactNode; className?: string; padding?: 'default' | 'none'; } export interface DialogContentProps extends DialogPopupProps { keepMounted?: boolean; /** Set false to opt out of the backdrop even when modal (default: render when modal). */ backdrop?: boolean; } //# sourceMappingURL=Dialog.types.d.ts.map