@accelint/design-toolkit
Version:
An open-source component library to serve as part of the entire ecosystem of UX for Accelint.
54 lines (51 loc) • 1.97 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as react from 'react';
import { ComponentProps } from 'react';
import { DialogTrigger, HeadingProps, ContextValue } from 'react-aria-components';
import { DialogProps } from './types.js';
declare const DialogContext: react.Context<ContextValue<DialogProps, HTMLDivElement>>;
declare function DialogTitle({ children, className }: HeadingProps): react_jsx_runtime.JSX.Element;
declare namespace DialogTitle {
var displayName: string;
}
declare function DialogContent({ children, className }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
declare namespace DialogContent {
var displayName: string;
}
declare function DialogFooter({ children, className }: ComponentProps<'footer'>): react_jsx_runtime.JSX.Element;
declare namespace DialogFooter {
var displayName: string;
}
/**
* Dialog - A modal dialog component for important content and interactions
*
* Provides accessible modal functionality with focus management, backdrop handling,
* and keyboard navigation. Supports multiple sizes and customizable dismissal behavior.
* Perfect for confirmations, forms, or any content requiring user focus.
*
* @example
* // Basic dialog with trigger
* <Dialog.Trigger>
* <Button>Open Dialog</Button>
* <Dialog>
* {({ close }) => (
* <>
* <Dialog.Title>Confirm Action</Dialog.Title>
* <p>Are you sure you want to continue?</p>
* <Dialog.Footer>
* <Dialog.Button onPress={close}>Confirm</Dialog.Button>
* </Dialog.Footer>
* </>
* )}
* </Dialog>
* </Dialog.Trigger>
*/
declare function Dialog({ ref, ...props }: DialogProps): react_jsx_runtime.JSX.Element;
declare namespace Dialog {
var displayName: string;
var Trigger: typeof DialogTrigger;
var Title: typeof DialogTitle;
var Content: typeof DialogContent;
var Footer: typeof DialogFooter;
}
export { Dialog, DialogContext };