{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Milestones on a vertical line beside a picture, in a narrow column, or in a row.",
  "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/organisms/milestone-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// MilestoneTimelineProps are the props of MilestoneTimeline; the values are the JSON shapes of the TypeScript props.\ntype MilestoneTimelineProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tLead any `json:\"lead\"`\n\tMilestones any `json:\"milestones\"`\n\tEmpty any `json:\"empty\"`\n\tLayout any `json:\"layout\"`\n\tTone any `json:\"tone\"`\n\tDensity any `json:\"density\"`\n\tImage any `json:\"image\"`\n\tImageAlt any `json:\"imageAlt\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// Milestones on a line: the year, a tag, a title and a sentence each. Axes: layout (split: a vertical line beside a picture, stacked: a vertical line in a narrow column, row: a horizontal line of columns), tone, density.\ntempl MilestoneTimeline(p MilestoneTimelineProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vLead := uiutils.Def(p.Lead, \"\") }}\n\t{{ vMilestones := p.Milestones }}\n\t{{ vEmpty := uiutils.Def(p.Empty, \"\") }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"split\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vDensity := uiutils.Def(p.Density, \"default\") }}\n\t{{ vImage := p.Image }}\n\t{{ vImageAlt := p.ImageAlt }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Tone: vTone, Density: vDensity, Layout: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"split\")), \"split\", \"stack\"), Media: map[string]any{\"show\": uiutils.Eq(vLayout, \"split\"), \"side\": \"start\", \"align\": \"start\"}, Measure: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"stacked\")), \"2xl\", \"default\"), LandmarkLabel: vLandmarkLabel, Aside: milestoneTimelineFill1(p, vTitle, vImage, vImageAlt)}) {\n\t\tif uiutils.Eq(uiutils.Len(vMilestones), float64(0)) {\n\t\t\t@EmptyState(EmptyStateProps{Icon: \"milestone\", Title: vEmpty})\n\t\t} else {\n\t\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Tag: \"ol\", Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"row\")), \"grid grid-cols-1 gap-8 border-t border-border sm:grid-cols-2 lg:grid-cols-4\", \"flex flex-col gap-8 border-l border-border\")), Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\t\tfor _, vM := range uiutils.L(vMilestones) {\n\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"row\")), \"relative flex flex-col gap-2 pt-6\", \"relative flex flex-col gap-2 pl-6\")), Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"row\")), \"absolute top-0 left-0 size-2 -translate-y-1/2 rounded bg-primary\", \"absolute top-2 left-0 size-2 -translate-x-1/2 rounded bg-primary\")), Attrs: uiutils.Attrs(\"aria-hidden\", \"true\")}})\n\t\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"2\", Align: \"center\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", Weight: \"semibold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vM, \"date\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.Badge(compose.BadgeProps{Variant: \"outline\", Size: \"sm\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vM, \"tag\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@compose.Title(compose.TitleProps{As: \"3\", Size: \"lg\", Weight: \"bold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vM, \"title\")) }\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vM, \"text\")) }\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\ntempl milestoneTimelineFill1(p MilestoneTimelineProps, vTitle any, vImage any, vImageAlt any) {\n\t@MediaFrame(MediaFrameProps{Alt: uiutils.Cond(uiutils.T(vImageAlt), vImageAlt, vTitle), Src: vImage, Ratio: \"3/4\"})\n}\n",
      "path": "blocks/milestone-timeline.templ",
      "target": "blocks/milestone-timeline.templ"
    }
  ],
  "meta": {
    "category": "content",
    "group": "story",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "milestone-timeline",
  "registryDependencies": [
    "badge",
    "empty-state",
    "group",
    "inline",
    "kit-box",
    "kit-text",
    "list",
    "list-item",
    "media-frame",
    "section-frame",
    "text",
    "title",
    "utils"
  ],
  "runtime": "templ",
  "title": "Milestone Timeline",
  "type": "registry:block"
}
