Home / File/ dialog.tsx — ui Source File

dialog.tsx — ui Source File

Architecture documentation for dialog.tsx, a tsx file in the ui codebase. 4 imports, 0 dependents.

File tsx ComponentRegistry ChartRegistry 4 imports 6 functions

Entity Profile

Dependency Diagram

graph LR
  36891808_81b9_d07b_b985_926005ae20db["dialog.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  36891808_81b9_d07b_b985_926005ae20db --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  ebff4254_a5ce_f52c_8b1c_5635efd1973d["react-dialog"]
  36891808_81b9_d07b_b985_926005ae20db --> ebff4254_a5ce_f52c_8b1c_5635efd1973d
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  36891808_81b9_d07b_b985_926005ae20db --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"]
  36891808_81b9_d07b_b985_926005ae20db --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81
  style 36891808_81b9_d07b_b985_926005ae20db fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import * as DialogPrimitive from "@radix-ui/react-dialog"
import { X } from "lucide-react"

import { cn } from "@/lib/utils"

const Dialog = DialogPrimitive.Root

const DialogTrigger = DialogPrimitive.Trigger

const DialogPortal = DialogPrimitive.Portal

const DialogClose = DialogPrimitive.Close

const DialogOverlay = React.forwardRef<
  React.ElementRef<typeof DialogPrimitive.Overlay>,
  React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
>(({ className, ...props }, ref) => (
  <DialogPrimitive.Overlay
    ref={ref}
    className={cn(
      "fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
      className
    )}
    {...props}
  />
))
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName

const DialogContent = React.forwardRef<
  React.ElementRef<typeof DialogPrimitive.Content>,
  React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
>(({ className, children, ...props }, ref) => (
  <DialogPortal>
    <DialogOverlay />
    <DialogPrimitive.Content
      ref={ref}
      className={cn(
        "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
        className
      )}
      {...props}
    >
      {children}
      <DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
        <X className="h-4 w-4" />
        <span className="sr-only">Close</span>
      </DialogPrimitive.Close>
    </DialogPrimitive.Content>
  </DialogPortal>
))
DialogContent.displayName = DialogPrimitive.Content.displayName

const DialogHeader = ({
  className,
  ...props
}: React.HTMLAttributes<HTMLDivElement>) => (
  <div
// ... (63 more lines)

Subdomains

Dependencies

  • lucide-react
  • react
  • react-dialog
  • utils

Frequently Asked Questions

What does dialog.tsx do?
dialog.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in dialog.tsx?
dialog.tsx defines 6 function(s): DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogTitle.
What does dialog.tsx depend on?
dialog.tsx imports 4 module(s): lucide-react, react, react-dialog, utils.
Where is dialog.tsx in the architecture?
dialog.tsx is located at deprecated/www/registry/new-york/ui/dialog.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/new-york/ui).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free