{
  "$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/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/parts/timeline.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// TimelineProps are the props of Timeline; the values are the JSON shapes of the TypeScript props.\ntype TimelineProps struct {\n\tItems any `json:\"items\"`\n\tClass string `json:\"className\"`\n}\n\nvar timelineToneDot = map[string]any{\n\t\"gray\": \"bg-muted-foreground\",\n\t\"green\": \"bg-emerald-500\",\n\t\"blue\": \"bg-blue-500\",\n\t\"amber\": \"bg-amber-500\",\n\t\"red\": \"bg-red-500\",\n}\n\n// 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.\ntempl Timeline(p TimelineProps) {\n\t{{ vItems := p.Items }}\n\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"min-w-0\", p.Class)), Attrs: uiutils.Attrs(\"data-slot\", \"timeline\")}}) {\n\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Class: \"m-0 flex list-none flex-col p-0\"}}) {\n\t\t\tfor vI, vItem := range uiutils.L(vItems) {\n\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: \"relative flex min-w-0 gap-4 pb-4 last:pb-0\", Attrs: uiutils.Attrs(\"data-event\", uiutils.Get(vItem, \"id\"), \"data-slot\", \"timeline-item\")}}) {\n\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"relative flex w-2 shrink-0 justify-center\"}}) {\n\t\t\t\t\t\tif uiutils.T(uiutils.Lt(float64(vI), uiutils.Sub(uiutils.Len(vItems), float64(1)))) {\n\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"absolute top-4 -bottom-0 w-px bg-border\"}})\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: uiutils.S(uiutils.Cnv(\"mt-2 size-2 rounded-full\", uiutils.At(timelineToneDot, uiutils.Coalesce(uiutils.Get(vItem, \"tone\"), \"gray\"))))}})\n\t\t\t\t\t}\n\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"flex min-w-0 flex-1 flex-col gap-0\"}}) {\n\t\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"flex flex-wrap items-baseline justify-between gap-x-4\"}}) {\n\t\t\t\t\t\t\t@compose.Text(compose.TextProps{TextProps: text.TextProps{Class: \"m-0 text-sm font-bold text-foreground\"}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vItem, \"title\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.Text(compose.TextProps{TextProps: text.TextProps{Class: \"m-0 shrink-0 text-xs font-medium text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vItem, \"time\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif uiutils.T(uiutils.Get(vItem, \"text\")) {\n\t\t\t\t\t\t\t@compose.Text(compose.TextProps{TextProps: text.TextProps{Class: \"m-0 text-xs font-medium text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vItem, \"text\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/timeline.templ",
      "target": "blocks/timeline.templ"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "templ",
      "component"
    ]
  },
  "name": "timeline",
  "registryDependencies": [
    "box",
    "inline",
    "kit-box",
    "kit-text",
    "list",
    "list-item",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Timeline",
  "type": "registry:component"
}
