dgz-ui
Version:
Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript
76 lines • 4.18 kB
TypeScript
import { ElementDataType } from '../../types';
import * as DialogPrimitive from '@radix-ui/react-dialog';
import * as React from 'react';
/**
* Dialog primitives for building modal dialogs.
* Use Dialog as the root, DialogTrigger to open, and DialogContent for the modal body.
*/
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
/**
* Full-screen overlay that appears behind the dialog content.
* @returns {JSX.Element} The rendered DialogOverlay component.
*/
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
export type DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {
/**
* If true, a close button will be rendered inside the dialog content.
*/
hasCloseButton?: true;
};
/**
* The main dialog content container positioned in the viewport center.
* @returns {JSX.Element} The rendered DialogContent component.
*/
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
/**
* If true, a close button will be rendered inside the dialog content.
*/
hasCloseButton?: true;
} & React.RefAttributes<HTMLDivElement>>;
/**
* Container for dialog header content (title, actions).
* @returns {JSX.Element} The rendered DialogHeader component.
*/
declare const DialogHeader: {
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
/**
* Container for dialog footer actions.
* @returns {JSX.Element} The rendered DialogFooter component.
*/
declare const DialogFooter: {
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
/**
* DialogTitle - The accessible dialog title.
* @returns {JSX.Element} The rendered DialogTitle component.
*/
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
/**
* DialogDescription - Additional descriptive text for the dialog.
* @returns {JSX.Element} The rendered DialogDescription component.
*/
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
/**
* Props aggregation for components that wrap Dialog primitives.
* Useful for high-level components needing to forward props to specific Dialog parts.
*/
/**
* Props aggregation for components that wrap Dialog primitives.
* Useful for high-level components needing to forward props to specific Dialog parts.
* @property {React.ComponentPropsWithoutRef<typeof DialogTrigger> & ElementDataType} [triggerProps] - Props for the DialogTrigger component.
* @property {React.ComponentPropsWithoutRef<typeof DialogContent> & ElementDataType} [contentProps] - Props for the DialogContent component.
* @property {React.ComponentPropsWithoutRef<typeof DialogClose> & ElementDataType} [closeProps] - Props for the DialogClose component.
*/
interface DialogContainerProps {
triggerProps?: React.ComponentPropsWithoutRef<typeof DialogTrigger> & ElementDataType;
contentProps?: React.ComponentPropsWithoutRef<typeof DialogContent> & ElementDataType;
closeProps?: React.ComponentPropsWithoutRef<typeof DialogClose> & ElementDataType;
}
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type DialogContainerProps, };
//# sourceMappingURL=dialog.d.ts.map