{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "alert-dialog",
  "title": "Alert Dialog",
  "description": "Astro confirmation dialogs for actions that need an explicit decision.",
  "dependencies": [
    "@data-slot/alert-dialog",
    "cn"
  ],
  "registryDependencies": [
    "@gnostic/button"
  ],
  "files": [
    {
      "path": "packages/ui/src/components/ui/alert-dialog/alert-dialog-action.astro",
      "content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { Button } from \"../button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { ...props } = Astro.props\n---\n\n<Button data-slot=\"alert-dialog-action\" {...props}>\n  <slot />\n</Button>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/alert-dialog/alert-dialog-action.astro"
    },
    {
      "path": "packages/ui/src/components/ui/alert-dialog/alert-dialog-cancel.astro",
      "content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { Button } from \"../button/index.ts\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { variant = \"outline\", ...props } = Astro.props\n---\n\n<Button data-slot=\"alert-dialog-cancel\" variant={variant} {...props}>\n  <slot />\n</Button>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/alert-dialog/alert-dialog-cancel.astro"
    },
    {
      "path": "packages/ui/src/components/ui/alert-dialog/alert-dialog-content.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\nimport AlertDialogOverlay from \"./alert-dialog-overlay.astro\"\nimport AlertDialogPortal from \"./alert-dialog-portal.astro\"\nimport type { AlertDialogContentProps } from \"./types.ts\"\n\ntype Props = HTMLAttributes<\"div\"> & AlertDialogContentProps\n\nconst { class: className, size = \"default\", style, ...props } = Astro.props\n---\n\n<AlertDialogPortal>\n  <AlertDialogOverlay />\n  <div\n    data-slot=\"alert-dialog-content\"\n    data-size={size}\n    hidden\n    class={cn(\"@container/dialog fixed top-1/2 left-1/2 z-50 flex w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col rounded-2xl text-popover-foreground outline-none data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 before:pointer-events-none before:absolute before:inset-0 before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)] before:rounded-[calc(var(--radius-2xl)-1px)] transition-[scale,opacity] duration-200 data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0 group/alert-dialog-content\", className)}\n    style={`z-index: calc(var(--alert-dialog-content-stack-index, 0) * 2 + 101);${style ? ` ${style}` : \"\"}`}\n    {...props}\n  >\n    <slot />\n  </div>\n</AlertDialogPortal>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/alert-dialog/alert-dialog-content.astro"
    },
    {
      "path": "packages/ui/src/components/ui/alert-dialog/alert-dialog-description.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"p\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<p\n  data-slot=\"alert-dialog-description\"\n  class={cn(\"text-muted-foreground text-sm\", className)}\n  {...props}\n>\n  <slot />\n</p>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/alert-dialog/alert-dialog-description.astro"
    },
    {
      "path": "packages/ui/src/components/ui/alert-dialog/alert-dialog-footer.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"alert-dialog-footer\"\n  class={cn(\n    \"flex flex-col-reverse gap-2 px-6 sm:flex-row sm:justify-end sm:rounded-b-[calc(var(--radius-2xl)-1px)] border-t bg-muted/72 py-4\",\n    className,\n  )}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/alert-dialog/alert-dialog-footer.astro"
    },
    {
      "path": "packages/ui/src/components/ui/alert-dialog/alert-dialog-header.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"alert-dialog-header\"\n  class={cn(\"flex flex-col gap-2 p-6 text-center max-sm:pb-4 sm:text-left\", className)}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/alert-dialog/alert-dialog-header.astro"
    },
    {
      "path": "packages/ui/src/components/ui/alert-dialog/alert-dialog-media.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"alert-dialog-media\"\n  class={cn(\"bg-muted mb-2 inline-flex size-16 items-center justify-center rounded-md @min-sm/dialog:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8\", className)}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/alert-dialog/alert-dialog-media.astro"
    },
    {
      "path": "packages/ui/src/components/ui/alert-dialog/alert-dialog-overlay.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, style, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"alert-dialog-overlay\"\n  hidden\n  class={cn(\"fixed inset-0 z-50 bg-black/32 backdrop-blur-sm transition-all duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0\", className)}\n  style={`z-index: calc(var(--alert-dialog-overlay-stack-index, 0) * 2 + 100);${style ? ` ${style}` : \"\"}`}\n  {...props}\n></div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/alert-dialog/alert-dialog-overlay.astro"
    },
    {
      "path": "packages/ui/src/components/ui/alert-dialog/alert-dialog-portal.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div data-slot=\"alert-dialog-portal\" class={cn(className)} {...props}>\n  <slot />\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/alert-dialog/alert-dialog-portal.astro"
    },
    {
      "path": "packages/ui/src/components/ui/alert-dialog/alert-dialog-title.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"h2\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<h2\n  data-slot=\"alert-dialog-title\"\n  class={cn(\"font-heading font-semibold text-xl leading-none\", className)}\n  {...props}\n>\n  <slot />\n</h2>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/alert-dialog/alert-dialog-title.astro"
    },
    {
      "path": "packages/ui/src/components/ui/alert-dialog/alert-dialog-trigger.astro",
      "content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { Button } from \"../button/index.ts\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { ...props } = Astro.props\n---\n\n<Button data-slot=\"alert-dialog-trigger\" {...props}>\n  <slot />\n</Button>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/alert-dialog/alert-dialog-trigger.astro"
    },
    {
      "path": "packages/ui/src/components/ui/alert-dialog/alert-dialog.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { AlertDialogProps } from \"./types.ts\"\n\ntype Props = HTMLAttributes<\"div\"> & AlertDialogProps\n\nconst {\n  class: className,\n  defaultOpen,\n  closeOnClickOutside,\n  closeOnEscape,\n  lockScroll,\n  ...props\n} = Astro.props\n---\n\n<div\n  data-slot=\"alert-dialog\"\n  data-default-open={defaultOpen}\n  data-close-on-click-outside={closeOnClickOutside}\n  data-close-on-escape={closeOnEscape}\n  data-lock-scroll={lockScroll}\n  class={className}\n  {...props}\n>\n  <slot />\n</div>\n\n<script>\n  import type { AlertDialogController } from \"@data-slot/alert-dialog\"\n  import { create } from \"@data-slot/alert-dialog\"\n\n  // Destroy bindings before a view transition so the next page-load binds once.\n  const controllers: AlertDialogController[] = []\n  const initialize = () => controllers.push(...create())\n  initialize()\n  document.addEventListener(\"astro:page-load\", initialize)\n  document.addEventListener(\"astro:before-swap\", () => {\n    for (const controller of controllers) controller.destroy()\n    controllers.length = 0\n  })\n</script>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/alert-dialog/alert-dialog.astro"
    },
    {
      "path": "packages/ui/src/components/ui/alert-dialog/index.ts",
      "content": "export { default as AlertDialog } from './alert-dialog.astro'\nexport { default as AlertDialogAction } from './alert-dialog-action.astro'\nexport { default as AlertDialogCancel } from './alert-dialog-cancel.astro'\nexport { default as AlertDialogContent } from './alert-dialog-content.astro'\nexport { default as AlertDialogDescription } from './alert-dialog-description.astro'\nexport { default as AlertDialogFooter } from './alert-dialog-footer.astro'\nexport { default as AlertDialogHeader } from './alert-dialog-header.astro'\nexport { default as AlertDialogMedia } from './alert-dialog-media.astro'\nexport { default as AlertDialogOverlay } from './alert-dialog-overlay.astro'\nexport { default as AlertDialogPortal } from './alert-dialog-portal.astro'\nexport { default as AlertDialogTitle } from './alert-dialog-title.astro'\nexport { default as AlertDialogTrigger } from './alert-dialog-trigger.astro'\nexport type { AlertDialogProps, AlertDialogContentProps } from './types.ts'\n",
      "type": "registry:file",
      "target": "~/src/components/ui/alert-dialog/index.ts"
    },
    {
      "path": "packages/ui/src/components/ui/alert-dialog/types.ts",
      "content": "import type { AlertDialogOptions } from '@data-slot/alert-dialog'\n\n/**\n * Alert dialog configuration rendered as data attributes.\n */\nexport type AlertDialogProps = Pick<\n    AlertDialogOptions,\n    'defaultOpen' | 'closeOnClickOutside' | 'closeOnEscape' | 'lockScroll'\n>\n\n/**\n * Width of the alert dialog panel.\n */\nexport type AlertDialogContentProps = {\n    /**\n     * Panel width.\n     *\n     * @default \"default\"\n     */\n    size?: 'default' | 'sm'\n}\n",
      "type": "registry:file",
      "target": "~/src/components/ui/alert-dialog/types.ts"
    }
  ],
  "meta": {
    "framework": "astro",
    "source": "@gnostic/ui",
    "testedDependencies": {
      "@data-slot/alert-dialog": "^1.1.2",
      "cn": "0.5.2"
    }
  },
  "docs": "https://ui.gnosticai.com/components/alert-dialog",
  "categories": [
    "ui"
  ],
  "type": "registry:ui"
}
