@als-tp/als-react-ts-ui
Version:
A comprehensive React TypeScript UI component library built with Base UI by ALSInnovation
79 lines • 3.05 kB
TypeScript
import React from "react";
type DialogVariant = "default" | "centered";
type DialogSize = "sm" | "md" | "lg";
interface ALSDialogRootProps {
/** Whether the dialog is open (controlled) */
open?: boolean;
/** Default open state (uncontrolled) */
defaultOpen?: boolean;
/** Callback when open state changes */
onOpenChange?: (open: boolean) => void;
/** Whether the dialog is modal (blocks interaction with the rest of the page) */
modal?: boolean;
/** Visual variant of the dialog */
variant?: DialogVariant;
/** Size variant */
size?: DialogSize;
/** Additional class name */
className?: string;
/** Children */
children: React.ReactNode;
}
interface ALSDialogTriggerProps {
/** Additional class name */
className?: string;
/** Children */
children: React.ReactNode;
/** Whether to render as child element */
asChild?: boolean;
}
interface ALSDialogBackdropProps {
/** Additional class name */
className?: string;
/** Whether to keep the backdrop mounted when closed */
keepMounted?: boolean;
}
interface ALSDialogPortalProps {
/** Container element to portal into */
container?: HTMLElement | null;
/** Whether to keep the portal mounted when closed */
keepMounted?: boolean;
/** Children */
children: React.ReactNode;
}
interface ALSDialogPopupProps {
/** Additional class name */
className?: string;
/** Children */
children: React.ReactNode;
}
interface ALSDialogTitleProps {
/** Additional class name */
className?: string;
/** Children */
children: React.ReactNode;
}
interface ALSDialogDescriptionProps {
/** Additional class name */
className?: string;
/** Children */
children: React.ReactNode;
}
interface ALSDialogCloseProps {
/** Additional class name */
className?: string;
/** Children (optional, defaults to X icon) */
children?: React.ReactNode;
}
export declare const ALSDialog: {
Root: React.ForwardRefExoticComponent<ALSDialogRootProps & React.RefAttributes<HTMLDivElement>>;
Trigger: React.ForwardRefExoticComponent<ALSDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
Backdrop: React.ForwardRefExoticComponent<ALSDialogBackdropProps & React.RefAttributes<HTMLDivElement>>;
Portal: React.FC<ALSDialogPortalProps>;
Popup: React.ForwardRefExoticComponent<ALSDialogPopupProps & React.RefAttributes<HTMLDivElement>>;
Title: React.ForwardRefExoticComponent<ALSDialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
Description: React.ForwardRefExoticComponent<ALSDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
Close: React.ForwardRefExoticComponent<ALSDialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
};
export type { ALSDialogRootProps, ALSDialogTriggerProps, ALSDialogBackdropProps, ALSDialogPortalProps, ALSDialogPopupProps, ALSDialogTitleProps, ALSDialogDescriptionProps, ALSDialogCloseProps, DialogVariant, DialogSize, };
//# sourceMappingURL=index.d.ts.map