{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "timeline",
  "type": "registry:ui",
  "title": "Timeline",
  "description": "Timeline is a vertical, chronological event list built on Content/Timeline Item rows — Default outlined-ring or Highlighted solid-dot markers, connector suppression purely positional.",
  "author": "Skrewww",
  "dependencies": [],
  "registryDependencies": [
    "@skrewww/foundation"
  ],
  "docs": "Host requirements (assumed already present, not installed by this command): react, react-dom.",
  "files": [
    {
      "path": "components/ui/Timeline.tsx",
      "content": "/** @skrewww-component timeline */\nimport { cn } from \"@/lib/cn\";\nimport { TimelineItemRow, type TimelineEntry } from \"@/components/ui/internal/TimelineItemRow\";\nimport styles from \"@/components/ui/timeline.module.css\";\n\nexport type { TimelineEntry };\n\nexport type TimelineProps = {\n  data: TimelineEntry[];\n  className?: string;\n};\n\n/**\n * Built against Figma's \"Content/Timeline Item\" component set (State:\n * Default/Highlighted), node 2058:2092 — confirmed via direct Figma\n * inspection; see lib/timeline-figma-metadata.ts. Connector suppression is\n * purely positional (only the last\n * item omits it) — independent of `state`, not derived from it. No\n * established empty-array convention exists anywhere in this codebase\n * (checked Table, Tree View, Bar Chart, Line Chart, and any internal\n * EmptyState composition — none found), so an empty `data` array renders\n * nothing rather than inventing a new empty-state pattern here.\n */\nexport function Timeline({ data, className }: TimelineProps) {\n  if (data.length === 0) return null;\n\n  return (\n    <ol className={cn(styles.list, className)}>\n      {data.map((entry, index) => (\n        <TimelineItemRow key={index} entry={entry} isLast={index === data.length - 1} />\n      ))}\n    </ol>\n  );\n}\n",
      "type": "registry:ui",
      "target": "~/components/ui/Timeline.tsx"
    },
    {
      "path": "components/ui/timeline.module.css",
      "content": ".list {\n  display: flex;\n  flex-direction: column;\n  list-style: none;\n  margin: 0;\n  padding: 0;\n}\n",
      "type": "registry:ui",
      "target": "~/components/ui/timeline.module.css"
    },
    {
      "path": "lib/cn.ts",
      "content": "export function cn(...classes: Array<string | false | null | undefined>): string {\n  return classes.filter(Boolean).join(\" \");\n}\n",
      "type": "registry:lib",
      "target": "~/lib/cn.ts"
    },
    {
      "path": "components/ui/internal/TimelineItemRow.tsx",
      "content": "import { cn } from \"@/lib/cn\";\nimport styles from \"@/components/ui/internal/timeline-item-row.module.css\";\n\nexport type TimelineEntry = {\n  title: string;\n  timestamp: string;\n  description: string;\n  /** Default is an outlined ring, Highlighted is a larger solid dot. */\n  state?: \"default\" | \"highlighted\";\n};\n\nexport type TimelineItemRowProps = {\n  entry: TimelineEntry;\n  /**\n   * Connector suppression is purely positional — the last item never\n   * renders a connector, regardless of its own `state`. This is a\n   * deliberately separate concern from `state`, not derived from it.\n   */\n  isLast: boolean;\n};\n\n/**\n * Internal row for components/ui/Timeline.tsx — not publicly exported,\n * matching TreeItem's precedent (Tree View / Tree Item split).\n */\nexport function TimelineItemRow({ entry, isLast }: TimelineItemRowProps) {\n  const { title, timestamp, description, state = \"default\" } = entry;\n\n  return (\n    <li className={styles.item}>\n      <div className={styles.markerColumn}>\n        <span\n          className={cn(styles.marker, state === \"highlighted\" && styles.markerHighlighted)}\n          aria-hidden=\"true\"\n        />\n        {!isLast ? <span className={styles.connector} aria-hidden=\"true\" /> : null}\n      </div>\n      <div className={styles.content}>\n        <div className={styles.header}>\n          <span className={styles.title}>{title}</span>\n          <span className={styles.timestamp}>{timestamp}</span>\n        </div>\n        <p className={styles.description}>{description}</p>\n      </div>\n    </li>\n  );\n}\n",
      "type": "registry:ui",
      "target": "~/components/ui/internal/TimelineItemRow.tsx"
    },
    {
      "path": "components/ui/internal/timeline-item-row.module.css",
      "content": ".item {\n  display: grid;\n  grid-template-columns: auto 1fr;\n  column-gap: var(--timeline-gap);\n  align-items: stretch;\n}\n\n.markerColumn {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n\n.marker {\n  flex-shrink: 0;\n  box-sizing: border-box;\n  width: var(--timeline-marker-size);\n  height: var(--timeline-marker-size);\n  border-radius: 9999px;\n  border: var(--timeline-marker-border-width) solid var(--timeline-marker-color);\n  background: transparent;\n}\n\n.markerHighlighted {\n  width: var(--timeline-marker-highlighted-size);\n  height: var(--timeline-marker-highlighted-size);\n  border: 0;\n  background: var(--timeline-marker-color);\n}\n\n/*\n * flex: 1 lets the connector stretch to fill whatever vertical space\n * remains in the row after the marker — since .item is a grid row with\n * align-items: stretch, .markerColumn's height always matches the taller\n * of the two columns (usually .content, which grows with description\n * length). This makes the connector reach the next item's dot regardless\n * of how tall this row's content is, rather than a fixed pixel value.\n */\n.connector {\n  flex: 1;\n  width: var(--timeline-connector-width);\n  min-height: var(--timeline-connector-min-height);\n  margin-top: 2px;\n  background: var(--timeline-connector-color);\n}\n\n.content {\n  min-width: 0;\n  padding-bottom: var(--timeline-item-gap);\n}\n\n.header {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: baseline;\n  gap: var(--timeline-header-gap);\n}\n\n.title {\n  font-weight: 600;\n  color: var(--timeline-title-text);\n}\n\n.timestamp {\n  font-size: 0.75rem;\n  color: var(--timeline-timestamp-text);\n}\n\n.description {\n  margin: 0.25rem 0 0;\n  max-width: var(--timeline-description-max-width);\n  color: var(--timeline-description-text);\n}\n",
      "type": "registry:ui",
      "target": "~/components/ui/internal/timeline-item-row.module.css"
    }
  ]
}
