{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "event-timeline",
  "type": "registry:component",
  "title": "Event timeline",
  "description": "Tell the story of a project through decisions, reviews, and completed steps.",
  "categories": [
    "tables-&-lists"
  ],
  "dependencies": [],
  "registryDependencies": [],
  "files": [
    {
      "path": "src/registry/overtrue/event-timeline.tsx",
      "type": "registry:component",
      "target": "components/overtrue/event-timeline.tsx",
      "content": "/** Adapted from dashboardcn (MIT), copyright 2026 dashboardcn contributors.\n * Source: https://github.com/NoahGdev/dashboardcn/tree/b1ffacbca0f7a0be60135c8665b9e8c267205c48\n *\n * MIT License\n *\n * Copyright (c) 2026 dashboardcn contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * ---\n *\n * Portions of this project are derived from shadcn/ui and shadcn/registry-template\n * (https://github.com/shadcn-ui/ui), Copyright (c) 2023 shadcn, licensed under the\n * MIT License. The notice above applies to those portions as well.\n */\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport type TimelineStatus = \"default\" | \"current\" | \"done\";\n\n/**\n * Timeline owns only the chronology layout: an ordered list of items, each\n * with a rail (marker + connector) beside its content. Put your own semantic\n * content (headings, time, badges, avatars, cards) inside TimelineContent.\n */\nfunction Timeline({ className, ...props }: React.ComponentProps<\"ol\">) {\n  return (\n    <ol\n      data-slot=\"timeline\"\n      className={cn(\"flex flex-col\", className)}\n      {...props}\n    />\n  );\n}\n\nexport interface TimelineItemProps extends React.ComponentProps<\"li\"> {\n  /**\n   * \"current\" marks the item as the present step (sets aria-current) and\n   * highlights its marker. \"done\" fills the marker.\n   */\n  status?: TimelineStatus;\n}\n\nfunction TimelineItem({\n  status = \"default\",\n  className,\n  ...props\n}: TimelineItemProps) {\n  return (\n    <li\n      data-slot=\"timeline-item\"\n      data-status={status}\n      aria-current={status === \"current\" ? \"true\" : undefined}\n      className={cn(\"group/timeline-item relative flex gap-3\", className)}\n      {...props}\n    />\n  );\n}\n\n/** The column beside the content that holds the marker and connector. */\nfunction TimelineRail({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"timeline-rail\"\n      className={cn(\"flex w-6 shrink-0 flex-col items-center\", className)}\n      {...props}\n    />\n  );\n}\n\n/**\n * The dot on the rail. Pass an icon, avatar, or image as children; with no\n * children it renders a plain ring and is hidden from assistive technology.\n */\nfunction TimelineMarker({\n  className,\n  children,\n  ...props\n}: React.ComponentProps<\"span\">) {\n  const empty = React.Children.count(children) === 0;\n  return (\n    <span\n      data-slot=\"timeline-marker\"\n      aria-hidden={empty ? \"true\" : undefined}\n      className={cn(\n        \"relative flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full border border-border/80 bg-card text-muted-foreground\",\n        \"shadow-[0_1px_2px_rgb(0_0_0/0.06)] dark:shadow-[inset_0_1px_0_rgb(255_255_255/0.06),0_1px_2px_rgb(0_0_0/0.4)]\",\n        \"transition-[color,background-color,border-color,box-shadow] duration-150 motion-reduce:transition-none\",\n        \"[&>svg]:size-3 [&>img]:size-full [&>img]:object-cover\",\n        // The present step carries a soft primary halo, and a faint glow on dark surfaces.\n        \"group-data-[status=current]/timeline-item:border-primary group-data-[status=current]/timeline-item:text-primary group-data-[status=current]/timeline-item:shadow-[0_0_0_4px_color-mix(in_oklab,var(--color-primary)_14%,transparent)]\",\n        \"dark:group-data-[status=current]/timeline-item:shadow-[0_0_0_4px_color-mix(in_oklab,var(--color-primary)_18%,transparent),0_0_14px_color-mix(in_oklab,var(--color-primary)_45%,transparent)]\",\n        \"group-data-[status=done]/timeline-item:border-primary group-data-[status=done]/timeline-item:bg-primary group-data-[status=done]/timeline-item:text-primary-foreground\",\n        className,\n      )}\n      {...props}\n    >\n      {children}\n    </span>\n  );\n}\n\n/** The line between markers. Decorative; hidden on the last item. */\nfunction TimelineConnector({\n  className,\n  ...props\n}: React.ComponentProps<\"span\">) {\n  return (\n    <span\n      data-slot=\"timeline-connector\"\n      aria-hidden=\"true\"\n      className={cn(\n        \"my-1.5 w-px flex-1 bg-linear-to-b from-border to-border/40 group-last/timeline-item:hidden\",\n        // Completed steps draw the rail in the accent, so progress reads at a glance.\n        \"group-data-[status=done]/timeline-item:from-primary/50 group-data-[status=done]/timeline-item:to-primary/25\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction TimelineContent({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"timeline-content\"\n      className={cn(\n        \"flex min-w-0 flex-1 flex-col gap-1 pt-0.5 pb-6 group-last/timeline-item:pb-0\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\n/** A row for the title, badges, and time. Time floats right via TimelineTime. */\nfunction TimelineHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"timeline-header\"\n      className={cn(\"flex flex-wrap items-center gap-x-2 gap-y-1\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction TimelineTitle({ className, ...props }: React.ComponentProps<\"h3\">) {\n  return (\n    <h3\n      data-slot=\"timeline-title\"\n      className={cn(\n        \"m-0 text-sm leading-5 font-medium tracking-tight text-foreground\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction TimelineTime({ className, ...props }: React.ComponentProps<\"time\">) {\n  return (\n    <time\n      data-slot=\"timeline-time\"\n      className={cn(\n        \"ml-auto text-xs whitespace-nowrap text-muted-foreground tabular-nums\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction TimelineDescription({\n  className,\n  ...props\n}: React.ComponentProps<\"p\">) {\n  return (\n    <p\n      data-slot=\"timeline-description\"\n      className={cn(\n        \"m-0 text-[13px] leading-5 text-muted-foreground\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport {\n  Timeline,\n  TimelineItem,\n  TimelineRail,\n  TimelineMarker,\n  TimelineConnector,\n  TimelineContent,\n  TimelineHeader,\n  TimelineTitle,\n  TimelineTime,\n  TimelineDescription,\n};\n"
    }
  ],
  "docs": "Documentation: https://ui.overtrue.xyz/components/event-timeline. Requires an initialized shadcn/ui project with Tailwind CSS v4."
}
