{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "timeline",
  "title": "Timeline",
  "description": "A vertical list of events with a coloured dot for each status and a line joining them.",
  "registryDependencies": [
    "@corsair-ui/utils"
  ],
  "files": [
    {
      "path": "registry/default/ui/timeline.tsx",
      "content": "import type { ComponentProps } from \"react\";\nimport { cn } from \"@/registry/default/lib/utils\";\n\ntype TimelineStatus = \"default\" | \"success\" | \"warning\" | \"destructive\";\n\n/**\n * A vertical list of events in order: a ship's log, an order's history, a\n * deploy log. It is an ordered list (`<ol>`), so screen readers announce how\n * many events there are and where each one sits. Each `TimelineItem` has a\n * `status` that colours its dot; the dot and the line joining the dots are\n * decorative, so when the status matters, say it in the title or the\n * description too. Dates go in `TimelineTime`, a `<time>` with a\n * machine-readable `dateTime`; format the visible text for your locale.\n * Nothing animates.\n *\n * @example\n * <Timeline>\n *   <TimelineItem status=\"success\">\n *     <TimelineDot />\n *     <TimelineConnector />\n *     <TimelineContent>\n *       <TimelineTitle>Left port</TimelineTitle>\n *       <TimelineTime dateTime=\"2025-03-02T08:00\">2 March, 08:00</TimelineTime>\n *       <TimelineDescription>Cleared the harbour with a fair wind.</TimelineDescription>\n *     </TimelineContent>\n *   </TimelineItem>\n *   <TimelineItem>\n *     <TimelineDot />\n *     <TimelineConnector />\n *     <TimelineContent>\n *       <TimelineTitle>At sea</TimelineTitle>\n *     </TimelineContent>\n *   </TimelineItem>\n * </Timeline>\n */\nfunction Timeline({ className, ...props }: ComponentProps<\"ol\">) {\n  return <ol data-slot=\"timeline\" className={cn(\"flex flex-col\", className)} {...props} />;\n}\n\ninterface TimelineItemProps extends ComponentProps<\"li\"> {\n  /** Colours the dot, and is exposed as `data-status` for your own styles. */\n  status?: TimelineStatus;\n}\n\n/** One event. Holds a `TimelineDot`, a `TimelineConnector` and a `TimelineContent`. */\nfunction TimelineItem({ className, status = \"default\", ...props }: TimelineItemProps) {\n  return (\n    <li\n      data-slot=\"timeline-item\"\n      data-status={status}\n      className={cn(\"group/timeline-item relative flex gap-3 pb-6 last:pb-0\", className)}\n      {...props}\n    />\n  );\n}\n\n/** The marker of an event, coloured by the item's `status`. Decorative: hidden from screen readers. */\nfunction TimelineDot({ className, ...props }: ComponentProps<\"span\">) {\n  return (\n    <span\n      data-slot=\"timeline-dot\"\n      aria-hidden=\"true\"\n      className={cn(\n        \"bg-primary ring-background relative z-[1] mt-1.5 size-3 shrink-0 rounded-full ring-4\",\n        \"group-data-[status=success]/timeline-item:bg-success\",\n        \"group-data-[status=warning]/timeline-item:bg-warning\",\n        \"group-data-[status=destructive]/timeline-item:bg-destructive\",\n        className\n      )}\n      {...props}\n    />\n  );\n}\n\n/**\n * The line from this event's dot down to the next one. Decorative: hidden\n * from screen readers, and not drawn on the last item.\n */\nfunction TimelineConnector({ className, ...props }: ComponentProps<\"span\">) {\n  return (\n    <span\n      data-slot=\"timeline-connector\"\n      aria-hidden=\"true\"\n      className={cn(\n        \"bg-border absolute top-6 bottom-0 left-[calc(0.375rem-0.5px)] w-px group-last/timeline-item:hidden\",\n        className\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction TimelineContent({ className, ...props }: ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"timeline-content\"\n      className={cn(\"flex min-w-0 flex-1 flex-col gap-1\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction TimelineTitle({ className, ...props }: ComponentProps<\"p\">) {\n  return (\n    <p\n      data-slot=\"timeline-title\"\n      className={cn(\"text-sm leading-6 font-medium\", className)}\n      {...props}\n    />\n  );\n}\n\ninterface TimelineTimeProps extends ComponentProps<\"time\"> {\n  /** The moment in a machine-readable format (`2025-03-02`, `2025-03-02T08:00Z`). */\n  dateTime: string;\n}\n\n/** When the event happened: a `<time>`; its text is yours to format for the reader's locale. */\nfunction TimelineTime({ className, ...props }: TimelineTimeProps) {\n  return (\n    <time\n      data-slot=\"timeline-time\"\n      className={cn(\"text-muted-foreground text-xs\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction TimelineDescription({ className, ...props }: ComponentProps<\"p\">) {\n  return (\n    <p\n      data-slot=\"timeline-description\"\n      className={cn(\"text-muted-foreground text-sm\", className)}\n      {...props}\n    />\n  );\n}\n\nexport {\n  Timeline,\n  TimelineConnector,\n  TimelineContent,\n  TimelineDescription,\n  TimelineDot,\n  TimelineItem,\n  TimelineTime,\n  TimelineTitle,\n  type TimelineItemProps,\n  type TimelineStatus,\n  type TimelineTimeProps,\n};\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}