{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "file-list",
  "type": "registry:component",
  "title": "File list",
  "description": "Readable attachment rows with metadata, links, and caller-owned actions.",
  "categories": [
    "tables-&-lists"
  ],
  "dependencies": [
    "@tabler/icons-react"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "src/registry/overtrue/file-list.tsx",
      "type": "registry:component",
      "target": "components/overtrue/file-list.tsx",
      "content": "import type { ReactNode } from \"react\";\nimport { IconFileText } from \"@tabler/icons-react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface FileListItem {\n  id: string;\n  name: string;\n  description?: string;\n  href?: string;\n  icon?: ReactNode;\n  actions?: ReactNode;\n}\n/** Supply a real destination or an action; this component does not upload files. */\nexport function FileList({\n  items,\n  label = \"Files\",\n  emptyMessage = \"No files attached.\",\n  className,\n}: {\n  items: readonly FileListItem[];\n  label?: string;\n  emptyMessage?: string;\n  className?: string;\n}) {\n  return items.length ? (\n    <ul\n      data-slot=\"file-list\"\n      aria-label={label}\n      className={cn(\"m-0 list-none divide-y divide-border/60 p-0\", className)}\n    >\n      {items.map((file) => (\n        <li\n          key={file.id}\n          data-slot=\"file-list-item\"\n          className=\"group/file flex items-center gap-3 py-3 first:pt-0 last:pb-0\"\n        >\n          <span\n            aria-hidden=\"true\"\n            data-slot=\"file-list-icon\"\n            className=\"relative flex size-10 shrink-0 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground ring-1 ring-border/60 ring-inset transition-colors duration-150 group-hover/file:text-foreground motion-reduce:transition-none [&_svg]:size-5 [&_svg]:stroke-[1.75]\"\n          >\n            <span className=\"pointer-events-none absolute inset-x-2 top-0 h-px bg-gradient-to-r from-transparent via-foreground/10 to-transparent dark:via-foreground/15\" />\n            {file.icon ?? <IconFileText />}\n          </span>\n          <div className=\"min-w-0 flex-1\">\n            {file.href ? (\n              <a\n                className=\"rounded-sm text-sm font-medium tracking-tight break-words text-foreground underline-offset-4 decoration-foreground/30 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-primary/30\"\n                href={file.href}\n              >\n                {file.name}\n              </a>\n            ) : (\n              <p className=\"m-0 text-sm font-medium tracking-tight break-words text-foreground\">\n                {file.name}\n              </p>\n            )}\n            {file.description && (\n              <p className=\"m-0 mt-0.5 text-xs leading-5 break-words text-muted-foreground tabular-nums\">\n                {file.description}\n              </p>\n            )}\n          </div>\n          {file.actions && (\n            <div\n              data-slot=\"file-list-actions\"\n              className=\"flex shrink-0 items-center gap-1\"\n            >\n              {file.actions}\n            </div>\n          )}\n        </li>\n      ))}\n    </ul>\n  ) : (\n    <p\n      data-slot=\"file-list-empty\"\n      className={cn(\n        \"m-0 rounded-xl border border-dashed border-border/80 px-4 py-6 text-center text-[13px] text-muted-foreground\",\n        className,\n      )}\n    >\n      {emptyMessage}\n    </p>\n  );\n}\n"
    }
  ],
  "docs": "Documentation: https://ui.overtrue.xyz/components/file-list. Requires an initialized shadcn/ui project with Tailwind CSS v4."
}
