UNPKG

@arolariu/components

Version:

🎨 60+ beautiful, accessible React components built on Radix UI. TypeScript-first, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡

88 lines (87 loc) • 3.52 kB
"use client"; import { jsx, jsxs } from "react/jsx-runtime"; import "react"; import { Action, Cancel, Content, Description, Overlay, Portal, Root, Title, Trigger } from "@radix-ui/react-alert-dialog"; import { cn } from "../../lib/utils.js"; import { buttonVariants } from "./button.js"; function AlertDialog({ ...props }) { return /*#__PURE__*/ jsx(Root, { "data-slot": "alert-dialog", ...props }); } function AlertDialogTrigger({ ...props }) { return /*#__PURE__*/ jsx(Trigger, { "data-slot": "alert-dialog-trigger", ...props }); } function AlertDialogPortal({ ...props }) { return /*#__PURE__*/ jsx(Portal, { "data-slot": "alert-dialog-portal", ...props }); } function AlertDialogOverlay({ className, ...props }) { return /*#__PURE__*/ jsx(Overlay, { "data-slot": "alert-dialog-overlay", className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className), ...props }); } function AlertDialogContent({ className, ...props }) { return /*#__PURE__*/ jsxs(AlertDialogPortal, { children: [ /*#__PURE__*/ jsx(AlertDialogOverlay, {}), /*#__PURE__*/ jsx(Content, { "data-slot": "alert-dialog-content", className: cn("bg-white data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-neutral-200 p-6 shadow-lg duration-200 sm:max-w-lg dark:bg-neutral-950 dark:border-neutral-800", className), ...props }) ] }); } function AlertDialogHeader({ className, ...props }) { return /*#__PURE__*/ jsx("div", { "data-slot": "alert-dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className), ...props }); } function AlertDialogFooter({ className, ...props }) { return /*#__PURE__*/ jsx("div", { "data-slot": "alert-dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props }); } function AlertDialogTitle({ className, ...props }) { return /*#__PURE__*/ jsx(Title, { "data-slot": "alert-dialog-title", className: cn("text-lg font-semibold", className), ...props }); } function AlertDialogDescription({ className, ...props }) { return /*#__PURE__*/ jsx(Description, { "data-slot": "alert-dialog-description", className: cn("text-neutral-500 text-sm dark:text-neutral-400", className), ...props }); } function AlertDialogAction({ className, ...props }) { return /*#__PURE__*/ jsx(Action, { className: cn(buttonVariants(), className), ...props }); } function AlertDialogCancel({ className, ...props }) { return /*#__PURE__*/ jsx(Cancel, { className: cn(buttonVariants({ variant: "outline" }), className), ...props }); } export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger }; //# sourceMappingURL=alert-dialog.js.map