{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A vertical list of events (an order's history): a dot on a line, the title, an optional text and the time. Newest first or oldest first is the caller's order.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n/**\n * A vertical list of events (an order's history): a dot on a line, the title, an optional text and the time.\n * Newest first or oldest first is the caller's order.\n */\nimport { type ReactNode } from \"react\";\nimport { Box, Inline, List, ListItem, Text } from \"../compose\";\nimport { at, cn } from \"../utils\";\nimport type { TimelineItem } from \"./timeline.types\";\n\nconst TONE_DOT: Record<string, string> = {\n  \"gray\": \"bg-muted-foreground\",\n  \"green\": \"bg-emerald-500\",\n  \"blue\": \"bg-blue-500\",\n  \"amber\": \"bg-amber-500\",\n  \"red\": \"bg-red-500\",\n};\n\nexport type TimelineProps = {\n  items: TimelineItem[];\n  className?: string;\n};\n\nexport function Timeline({ items, className }: TimelineProps) {\n  return (\n    <Box className={cn(\"min-w-0\", className)} data-slot=\"timeline\">\n      <List className=\"m-0 flex list-none flex-col p-0\">\n        {(items ?? []).map((item, i) => (\n          <ListItem key={item.id} className=\"relative flex min-w-0 gap-4 pb-4 last:pb-0\" data-event={item.id} data-slot=\"timeline-item\">\n            <Box className=\"relative flex w-2 shrink-0 justify-center\">\n              {(i < ((items?.length ?? 0) - 1)) ? (\n                <Inline className=\"absolute top-4 -bottom-0 w-px bg-border\" />\n              ) : null}\n              <Inline className={cn(\"mt-2 size-2 rounded-full\", at(TONE_DOT, (item.tone ?? \"gray\")))} />\n            </Box>\n            <Box className=\"flex min-w-0 flex-1 flex-col gap-0\">\n              <Box className=\"flex flex-wrap items-baseline justify-between gap-x-4\">\n                <Text className=\"m-0 text-sm font-bold text-foreground\">\n                  {item.title}\n                </Text>\n                <Text className=\"m-0 shrink-0 text-xs font-medium text-muted-foreground\">\n                  {item.time}\n                </Text>\n              </Box>\n              {item.text ? (\n                <Text className=\"m-0 text-xs font-medium text-muted-foreground\">\n                  {item.text}\n                </Text>\n              ) : null}\n            </Box>\n          </ListItem>\n        ))}\n      </List>\n    </Box>\n  );\n}\n",
      "path": "components/timeline.tsx",
      "target": "components/timeline.tsx"
    },
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n\nexport type TimelineItem = {\n  id: string;\n  title: string;\n  text?: string;\n  time: string;\n  tone?: string;\n};\n",
      "path": "components/timeline.types.ts",
      "target": "components/timeline.types.ts"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "react",
      "component"
    ]
  },
  "name": "timeline",
  "registryDependencies": [
    "compose",
    "utils"
  ],
  "runtime": "react",
  "title": "Timeline",
  "type": "registry:component"
}
