{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "tracker",
  "title": "Tracker",
  "description": "A row of status blocks — uptime, or a habit's last 30 days.",
  "dependencies": [
    "cn"
  ],
  "registryDependencies": [
    "https://glasscn.app/r/glass-style.json"
  ],
  "files": [
    {
      "path": "src/components/glass/tracker.tsx",
      "content": "import * as React from \"react\"\nimport { cn } from \"@/lib/glass-cn\"\n\nexport interface TrackerBlock {\n  /** Shown on hover and read by screen readers. */\n  title: string\n  /** A status from `colors`; unknown statuses render as empty. */\n  status?: string\n  key?: string\n}\n\nconst DEFAULT_COLORS: Record<string, string> = {\n  done: \"bg-primary\",\n  partial: \"bg-primary/45\",\n  missed: \"bg-foreground/25\",\n  rest: \"bg-fill\",\n}\n\n/**\n * A row of status blocks — uptime, a habit's last 30 days. Blocks stretch to\n * fill the width. Map your statuses to colour classes with `colors`.\n */\nfunction Tracker({\n  data,\n  colors = DEFAULT_COLORS,\n  className,\n  ...props\n}: React.ComponentProps<\"div\"> & {\n  data: TrackerBlock[]\n  /** Status → colour class (`bg-chart-2`, `bg-primary/40`). */\n  colors?: Record<string, string>\n}) {\n  return (\n    <div data-slot=\"tracker\" role=\"list\" className={cn(\"flex h-control-sm w-full gap-[calc(0.125rem*var(--glass-density))]\", className)} {...props}>\n      {data.map((b, i) => (\n        <div\n          key={b.key ?? i}\n          role=\"listitem\"\n          data-slot=\"tracker-block\"\n          data-status={b.status}\n          title={b.title}\n          aria-label={b.title}\n          className={cn(\n            \"min-w-0 flex-1 transition-transform duration-(--glass-duration) ease-glass first:rounded-s-control-sm last:rounded-e-control-sm hover:scale-y-110 motion-reduce:hover:scale-y-100\",\n            (b.status && colors[b.status]) || \"bg-fill\"\n          )}\n        />\n      ))}\n    </div>\n  )\n}\n\nexport { Tracker }\n",
      "type": "registry:ui",
      "target": "@components/glass/tracker.tsx"
    }
  ],
  "categories": [
    "glass",
    "data"
  ],
  "type": "registry:ui"
}