{"name":"alert-dialog","dependencies":["@base-ui/react"],"registryDependencies":["@herocn/button"],"files":[{"path":"alert-dialog.tsx","content":"\"use client\";\n\nimport { AlertDialog as AlertDialogPrimitive } from \"@base-ui/react/alert-dialog\";\nimport { cn } from \"cn\";\nimport type * as React from \"react\";\nimport { Button } from \"@/components/ui/button\";\n\nfunction AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {\n\treturn <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {\n\treturn (\n\t\t<AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n\t);\n}\n\nfunction AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {\n\treturn (\n\t\t<AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />\n\t);\n}\n\nfunction AlertDialogOverlay({\n\tclassName,\n\tvariant = \"opaque\",\n\t...props\n}: AlertDialogPrimitive.Backdrop.Props & {\n\tvariant?: \"opaque\" | \"blur\" | \"transparent\";\n}) {\n\treturn (\n\t\t<AlertDialogPrimitive.Backdrop\n\t\t\tdata-slot=\"alert-dialog-overlay\"\n\t\t\tdata-variant={variant}\n\t\t\tclassName={cn(\n\t\t\t\t\"fixed inset-0 isolate z-50 opacity-100 transition-opacity duration-150 ease-[cubic-bezier(0.22,1,0.36,1)] data-[variant=blur]:bg-black/50 data-[variant=opaque]:bg-black/50 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[variant=blur]:backdrop-blur-md data-ending-style:duration-100 dark:data-[variant=blur]:bg-black/60 dark:data-[variant=opaque]:bg-black/60\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogContent({\n\tclassName,\n\toverlayVariant = \"opaque\",\n\tsize = \"default\",\n\t...props\n}: AlertDialogPrimitive.Popup.Props & {\n\tsize?: \"default\" | \"sm\";\n\toverlayVariant?: \"opaque\" | \"blur\" | \"transparent\";\n}) {\n\treturn (\n\t\t<AlertDialogPortal>\n\t\t\t<AlertDialogOverlay variant={overlayVariant} />\n\t\t\t<AlertDialogPrimitive.Popup\n\t\t\t\tdata-slot=\"alert-dialog-content\"\n\t\t\t\tdata-size={size}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"group/alert-dialog-content fixed start-1/2 top-1/2 z-50 flex w-full -translate-x-1/2 -translate-y-1/2 flex-col rounded-3xl bg-popover p-6 text-popover-foreground outline-none ring-1 ring-foreground/5 transition-[opacity,scale,translate] duration-250 ease-[cubic-bezier(0.22,1,0.36,1)] data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-starting-style:translate-y-[calc(-50%+0.25rem)] data-ending-style:scale-[0.95] data-starting-style:scale-[1.05] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:duration-100 data-[size=default]:sm:max-w-md rtl:translate-x-1/2\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</AlertDialogPortal>\n\t);\n}\n\nfunction AlertDialogHeader({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-header\"\n\t\t\tclassName={cn(\"flex flex-col gap-3\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogFooter({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-footer\"\n\t\t\tclassName={cn(\n\t\t\t\t\"mt-5 flex flex-row items-center justify-end gap-2\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogMedia({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-media\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex size-10 shrink-0 select-none items-center justify-center rounded-3xl bg-muted *:[svg:not([class*='size-'])]:size-5.5\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogTitle({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Title\n\t\t\tdata-slot=\"alert-dialog-title\"\n\t\t\tclassName={cn(\"font-medium text-base text-foreground\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogDescription({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Description\n\t\t\tdata-slot=\"alert-dialog-description\"\n\t\t\tclassName={cn(\n\t\t\t\t\"text-balance text-muted-foreground text-sm leading-[1.43] md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogAction({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof Button>) {\n\treturn (\n\t\t<Button\n\t\t\tdata-slot=\"alert-dialog-action\"\n\t\t\tclassName={cn(className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogCancel({\n\tclassName,\n\tvariant = \"tertiary\",\n\tsize = \"default\",\n\t...props\n}: AlertDialogPrimitive.Close.Props &\n\tPick<React.ComponentProps<typeof Button>, \"variant\" | \"size\">) {\n\treturn (\n\t\t<AlertDialogPrimitive.Close\n\t\t\tdata-slot=\"alert-dialog-cancel\"\n\t\t\tclassName={cn(className)}\n\t\t\trender={<Button variant={variant} size={size} />}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogMedia,\n\tAlertDialogOverlay,\n\tAlertDialogPortal,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n};\n","type":"registry:ui"}],"type":"registry:ui"}