{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "dashboard-template",
  "title": "Dashboard template",
  "author": "andongmin94",
  "description": "A project overview with task search, status filters, and progress summaries.",
  "dependencies": [
    "lucide-react@^1.72.0"
  ],
  "registryDependencies": [
    "https://neobrutal-ui.andongmin.com/r/badge.json",
    "https://neobrutal-ui.andongmin.com/r/button.json",
    "https://neobrutal-ui.andongmin.com/r/checkbox.json",
    "https://neobrutal-ui.andongmin.com/r/input.json",
    "https://neobrutal-ui.andongmin.com/r/progress.json"
  ],
  "files": [
    {
      "path": "src/blocks/templates/dashboard-template.tsx",
      "content": "\"use client\";\n\nimport { CheckCheck, Layers, RotateCcw, Search } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Checkbox } from \"@/components/ui/checkbox\";\nimport { Input } from \"@/components/ui/input\";\nimport { Progress, ProgressLabel, ProgressValue } from \"@/components/ui/progress\";\n\ntype Task = {\n  id: string;\n  title: string;\n  project: string;\n  owner: string;\n  done: boolean;\n};\n\ntype StatusFilter = \"all\" | \"open\" | \"done\";\n\nconst INITIAL_TASKS: Task[] = [\n  {\n    id: \"brief\",\n    title: \"Finalize the product brief\",\n    project: \"Website refresh\",\n    owner: \"You\",\n    done: true,\n  },\n  {\n    id: \"pages\",\n    title: \"Build the core pages\",\n    project: \"Website refresh\",\n    owner: \"You\",\n    done: false,\n  },\n  {\n    id: \"content\",\n    title: \"Review launch content\",\n    project: \"Website refresh\",\n    owner: \"Maya\",\n    done: false,\n  },\n  {\n    id: \"audit\",\n    title: \"Audit existing components\",\n    project: \"Design system\",\n    owner: \"Leo\",\n    done: true,\n  },\n  {\n    id: \"forms\",\n    title: \"Document form patterns\",\n    project: \"Design system\",\n    owner: \"You\",\n    done: false,\n  },\n  {\n    id: \"interviews\",\n    title: \"Complete customer interviews\",\n    project: \"Customer research\",\n    owner: \"Maya\",\n    done: true,\n  },\n  {\n    id: \"findings\",\n    title: \"Share research findings\",\n    project: \"Customer research\",\n    owner: \"Leo\",\n    done: false,\n  },\n];\n\nconst PROJECTS = [\"Website refresh\", \"Design system\", \"Customer research\"];\nconst FILTERS: { label: string; value: StatusFilter }[] = [\n  { label: \"All\", value: \"all\" },\n  { label: \"Open\", value: \"open\" },\n  { label: \"Done\", value: \"done\" },\n];\n\nexport default function DashboardTemplate() {\n  const [tasks, setTasks] = React.useState(INITIAL_TASKS);\n  const [query, setQuery] = React.useState(\"\");\n  const [statusFilter, setStatusFilter] = React.useState<StatusFilter>(\"all\");\n  const [feedback, setFeedback] = React.useState(\"\");\n  const searchRef = React.useRef<HTMLInputElement>(null);\n  const fieldId = React.useId();\n\n  const completeCount = tasks.filter((task) => task.done).length;\n  const openCount = tasks.length - completeCount;\n  const completion = Math.round((completeCount / tasks.length) * 100);\n  const activeProjects = PROJECTS.filter((project) =>\n    tasks.some((task) => task.project === project && !task.done),\n  ).length;\n  const normalizedQuery = query.trim().toLowerCase();\n  const filteredTasks = tasks.filter((task) => {\n    const matchesStatus = statusFilter === \"all\" || task.done === (statusFilter === \"done\");\n    return (\n      matchesStatus &&\n      `${task.title} ${task.project} ${task.owner}`.toLowerCase().includes(normalizedQuery)\n    );\n  });\n\n  const clearFilters = () => {\n    setQuery(\"\");\n    setStatusFilter(\"all\");\n    searchRef.current?.focus();\n  };\n\n  const resetDemo = () => {\n    setTasks(INITIAL_TASKS);\n    clearFilters();\n    setFeedback(\"Sample tasks restored. All filters cleared.\");\n  };\n\n  return (\n    <div className=\"min-h-dvh bg-background text-foreground\">\n      <header className=\"border-b-2 border-border bg-secondary-background\">\n        <div className=\"mx-auto flex min-h-16 max-w-screen-xl flex-wrap items-center justify-between gap-3 px-4 py-3 sm:px-6\">\n          <div className=\"flex items-center gap-2.5 font-heading\">\n            <span className=\"grid size-8 place-items-center rounded-base border-2 border-border bg-main text-main-foreground\">\n              <Layers aria-hidden=\"true\" className=\"size-4\" />\n            </span>\n            Workroom\n          </div>\n          <Badge variant=\"neutral\">Demo workspace</Badge>\n        </div>\n      </header>\n\n      <main className=\"mx-auto max-w-screen-xl space-y-7 px-4 py-7 sm:px-6 sm:py-10\">\n        <div className=\"flex flex-wrap items-end justify-between gap-5\">\n          <div className=\"max-w-xl\">\n            <p className=\"text-xs font-heading uppercase tracking-widest text-foreground/70\">\n              Workspace overview\n            </p>\n            <h1 className=\"mt-2 text-3xl font-heading tracking-tight sm:text-4xl\">\n              Make room for good work.\n            </h1>\n            <p className=\"mt-3 text-sm leading-6 text-foreground/70\">\n              Your projects, priorities, and progress in one place. Check off a task to see the\n              whole workspace update.\n            </p>\n          </div>\n          <Button type=\"button\" variant=\"neutral\" onClick={resetDemo}>\n            <RotateCcw aria-hidden=\"true\" />\n            Reset demo\n          </Button>\n        </div>\n\n        <dl className=\"grid overflow-hidden rounded-base border-2 border-border bg-secondary-background sm:grid-cols-3\">\n          {[\n            {\n              label: \"Active projects\",\n              value: activeProjects,\n              detail: `${PROJECTS.length} projects in this workspace`,\n            },\n            {\n              label: \"Open tasks\",\n              value: openCount,\n              detail: `${completeCount} of ${tasks.length} tasks complete`,\n            },\n            { label: \"Completion\", value: `${completion}%`, detail: \"Across all projects\" },\n          ].map((metric) => (\n            <div\n              key={metric.label}\n              className=\"border-b-2 border-border p-5 last:border-b-0 sm:border-r-2 sm:border-b-0 sm:last:border-r-0\"\n            >\n              <dt className=\"text-sm text-foreground/70\">{metric.label}</dt>\n              <dd className=\"mt-2 text-4xl font-heading tabular-nums\">{metric.value}</dd>\n              <dd className=\"mt-2 text-xs text-foreground/60\">{metric.detail}</dd>\n            </div>\n          ))}\n        </dl>\n\n        <div className=\"grid items-start gap-7 lg:grid-cols-[minmax(0,1fr)_19rem]\">\n          <section\n            aria-labelledby={`${fieldId}-work-heading`}\n            className=\"min-w-0 overflow-hidden rounded-base border-2 border-border bg-secondary-background\"\n          >\n            <div className=\"space-y-4 border-b-2 border-border p-4 sm:p-5\">\n              <div className=\"flex flex-wrap items-center justify-between gap-2\">\n                <h2 id={`${fieldId}-work-heading`} className=\"text-lg font-heading\">\n                  Your work\n                </h2>\n                <p className=\"text-xs text-foreground/70\" role=\"status\">\n                  {filteredTasks.length} of {tasks.length} tasks\n                </p>\n              </div>\n\n              <div className=\"space-y-1.5\">\n                <label htmlFor={`${fieldId}-search`} className=\"block text-sm font-heading\">\n                  Find a task\n                </label>\n                <div className=\"relative\">\n                  <Search\n                    aria-hidden=\"true\"\n                    className=\"pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-foreground/60\"\n                  />\n                  <Input\n                    ref={searchRef}\n                    id={`${fieldId}-search`}\n                    type=\"search\"\n                    className=\"pl-9\"\n                    placeholder=\"Task, project, or person\"\n                    value={query}\n                    onChange={(event) => setQuery(event.target.value)}\n                  />\n                </div>\n              </div>\n\n              <div\n                role=\"group\"\n                aria-label=\"Filter tasks by status\"\n                className=\"grid grid-cols-3 overflow-hidden rounded-base border-2 border-border\"\n              >\n                {FILTERS.map((filter) => (\n                  <button\n                    key={filter.value}\n                    type=\"button\"\n                    aria-pressed={statusFilter === filter.value}\n                    className={`relative min-h-10 border-r-2 border-border px-2 text-sm font-heading outline-none last:border-r-0 focus-visible:z-10 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring ${statusFilter === filter.value ? \"bg-main text-main-foreground\" : \"bg-secondary-background text-foreground hover:bg-background\"}`}\n                    onClick={() => setStatusFilter(filter.value)}\n                  >\n                    {filter.label}\n                  </button>\n                ))}\n              </div>\n            </div>\n\n            {filteredTasks.length ? (\n              <ul>\n                {filteredTasks.map((task) => (\n                  <li\n                    key={task.id}\n                    className=\"flex items-start gap-3 border-b-2 border-border px-4 py-4 last:border-b-0 sm:px-5\"\n                  >\n                    <Checkbox\n                      id={`${fieldId}-${task.id}`}\n                      checked={task.done}\n                      className=\"mt-1 size-5\"\n                      onCheckedChange={(done) => {\n                        setTasks((current) =>\n                          current.map((item) => (item.id === task.id ? { ...item, done } : item)),\n                        );\n                        setFeedback(`${task.title} marked ${done ? \"done\" : \"open\"}.`);\n                        if (statusFilter !== \"all\") searchRef.current?.focus();\n                      }}\n                    />\n                    <div className=\"min-w-0 flex-1\">\n                      <label\n                        htmlFor={`${fieldId}-${task.id}`}\n                        className={`block cursor-pointer text-sm font-heading leading-6 ${task.done ? \"text-foreground/60 line-through\" : \"\"}`}\n                      >\n                        {task.title}\n                      </label>\n                      <p className=\"mt-1 text-xs leading-5 text-foreground/60\">\n                        {task.project} <span aria-hidden=\"true\">/</span> {task.owner}\n                      </p>\n                    </div>\n                  </li>\n                ))}\n              </ul>\n            ) : (\n              <div className=\"grid justify-items-center gap-3 px-5 py-12 text-center\">\n                <Search aria-hidden=\"true\" className=\"size-6 text-foreground/60\" />\n                <h3 className=\"font-heading\">No matching tasks</h3>\n                <p className=\"max-w-xs text-sm leading-6 text-foreground/70\">\n                  Try a different search or clear the filters to see all your work.\n                </p>\n                <Button type=\"button\" variant=\"neutral\" onClick={clearFilters}>\n                  Clear filters\n                </Button>\n              </div>\n            )}\n          </section>\n\n          <aside className=\"space-y-5\">\n            <section\n              aria-labelledby={`${fieldId}-projects-heading`}\n              className=\"rounded-base border-2 border-border bg-secondary-background\"\n            >\n              <div className=\"border-b-2 border-border p-5\">\n                <h2 id={`${fieldId}-projects-heading`} className=\"text-lg font-heading\">\n                  Project progress\n                </h2>\n                <p className=\"mt-1 text-xs leading-5 text-foreground/60\">\n                  All tasks, regardless of the current filters.\n                </p>\n              </div>\n              <div className=\"divide-y-2 divide-border\">\n                {PROJECTS.map((project) => {\n                  const projectTasks = tasks.filter((task) => task.project === project);\n                  const doneCount = projectTasks.filter((task) => task.done).length;\n                  return (\n                    <div key={project} className=\"space-y-2 p-5\">\n                      <Progress value={Math.round((doneCount / projectTasks.length) * 100)}>\n                        <ProgressLabel>{project}</ProgressLabel>\n                        <ProgressValue />\n                      </Progress>\n                      <p className=\"text-xs text-foreground/60\">\n                        {doneCount} of {projectTasks.length} tasks complete\n                      </p>\n                    </div>\n                  );\n                })}\n              </div>\n            </section>\n\n            <div className=\"border-l-4 border-main py-1 pl-4\">\n              <CheckCheck aria-hidden=\"true\" className=\"mb-2 size-5\" />\n              <h2 className=\"text-sm font-heading\">\n                {openCount ? \"One task at a time.\" : \"Everything is wrapped up.\"}\n              </h2>\n              <p className=\"mt-2 text-sm leading-6 text-foreground/70\">\n                {openCount\n                  ? `${openCount} tasks left across ${activeProjects} projects. A small next step moves the whole team forward.`\n                  : \"Every project is complete. Reset the demo to explore the workflow again.\"}\n              </p>\n            </div>\n          </aside>\n        </div>\n\n        <footer className=\"space-y-2 border-t-2 border-border pt-4 text-xs leading-5 text-foreground/70\">\n          <p>Sample workspace. Changes stay on this page and reset when you refresh.</p>\n          <p role=\"status\" className=\"min-h-5 text-foreground\">\n            {feedback}\n          </p>\n        </footer>\n      </main>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "@components/templates/dashboard-template.tsx"
    },
    {
      "path": "src/blocks/templates/pages/dashboard/page.tsx",
      "content": "import DashboardTemplate from \"@/components/templates/dashboard-template\";\n\nexport default function Page() {\n  return <DashboardTemplate />;\n}\n",
      "type": "registry:page",
      "target": "app/dashboard/page.tsx"
    }
  ],
  "categories": [
    "template",
    "dashboard"
  ],
  "type": "registry:block"
}