{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Tasks to finish after sign-up, with progress.",
  "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/checklist.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/disclosure\"\n\t\"github.com/ui8kit/codegen/generated/templ/icons\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/progress\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// ChecklistProps are the props of Checklist; the values are the JSON shapes of the TypeScript props.\ntype ChecklistProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tTasks any `json:\"tasks\"`\n\tEmpty any `json:\"empty\"`\n\tProgressLabel any `json:\"progressLabel\"`\n\tLayout any `json:\"layout\"`\n\tProgress any `json:\"progress\"`\n\tMarker any `json:\"marker\"`\n\tDetail any `json:\"detail\"`\n\tTone any `json:\"tone\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// An onboarding checklist: the tasks with a done mark, a progress bar or a count. Axes: layout (card, plain), progress (bar, text, none), marker (check, number), tone (default, muted).\ntempl Checklist(p ChecklistProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vTasks := p.Tasks }}\n\t{{ vEmpty := uiutils.Def(p.Empty, \"\") }}\n\t{{ vProgressLabel := p.ProgressLabel }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"card\") }}\n\t{{ vProgress := uiutils.Def(p.Progress, \"bar\") }}\n\t{{ vMarker := uiutils.Def(p.Marker, \"check\") }}\n\t{{ vDetail := uiutils.Def(p.Detail, \"always\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Tone: vTone, Measure: \"2xl\", LandmarkLabel: vLandmarkLabel}) {\n\t\tif uiutils.Eq(uiutils.Len(vTasks), float64(0)) {\n\t\t\t@EmptyState(EmptyStateProps{Icon: \"list-checks\", Title: vEmpty})\n\t\t} else {\n\t\t\t@compose.Stack(compose.StackProps{Gap: \"4\", Align: \"stretch\", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"card\")), \"rounded bg-card p-6 inset-ring inset-ring-border\", \"\")), Attrs: uiutils.Attrs(\"data-slot\", \"checklist\")}}) {\n\t\t\t\tif uiutils.Eq(vProgress, \"bar\") {\n\t\t\t\t\t@compose.Progress(compose.ProgressProps{ProgressProps: progress.ProgressProps{Value: uiutils.SP(uiutils.Str(uiutils.Round(uiutils.Div(uiutils.Mul(uiutils.Count(vTasks, \"done\"), float64(100)), uiutils.Len(vTasks))))), Max: \"100\", Attrs: uiutils.Attrs(\"aria-label\", uiutils.Tpl(vProgressLabel, uiutils.Count(vTasks, \"done\"), uiutils.Len(vTasks)))}})\n\t\t\t\t}\n\t\t\t\tif uiutils.Eq(vProgress, \"text\") {\n\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{Class: \"text-muted-foreground\", Attrs: uiutils.Attrs(\"data-slot\", \"progress-text\")}}) {\n\t\t\t\t\t\t{ uiutils.Text(uiutils.Tpl(vProgressLabel, uiutils.Count(vTasks, \"done\"), uiutils.Len(vTasks))) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Class: \"m-0 flex list-none flex-col gap-4 p-0\", Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\t\t\tfor vI, vTask := range uiutils.L(vTasks) {\n\t\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: \"flex items-start gap-4\", Attrs: uiutils.Attrs(\"data-done\", uiutils.Str(uiutils.Get(vTask, \"done\")), \"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t\tif uiutils.Eq(vMarker, \"number\") {\n\t\t\t\t\t\t\t\t@compose.IconBadge(compose.IconBadgeProps{Variant: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Get(vTask, \"done\")), \"primary\", \"outline\")), Size: \"xs\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Str(uiutils.Add(float64(vI), float64(1)))) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Get(vTask, \"done\")), \"circle-check\", \"circle\")), Size: 24, Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Get(vTask, \"done\")), \"shrink-0 text-primary\", \"shrink-0 text-muted-foreground\"))})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif uiutils.Eq(vDetail, \"expand\") {\n\t\t\t\t\t\t\t\t@compose.Disclosure(compose.DisclosureProps{Variant: \"ghost\", DisclosureProps: disclosure.DisclosureProps{Class: \"flex-1\", Attrs: uiutils.Attrs(\"data-slot\", \"task-detail\")}}) {\n\t\t\t\t\t\t\t\t\t@compose.Summary(compose.SummaryProps{Variant: \"ghost\", SummaryProps: disclosure.SummaryProps{}}) {\n\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vTask, \"title\")) }\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{Class: \"pb-2 text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vTask, \"text\")) }\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"0\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"base\", Weight: \"semibold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vTask, \"title\")) }\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\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\t\t\t{ uiutils.Text(uiutils.Get(vTask, \"text\")) }\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\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/checklist.templ",
      "target": "blocks/checklist.templ"
    }
  ],
  "meta": {
    "category": "onboarding",
    "group": "setup",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "checklist",
  "registryDependencies": [
    "disclosure",
    "empty-state",
    "icon-badge",
    "kit-box",
    "kit-disclosure",
    "kit-progress",
    "kit-text",
    "list",
    "list-item",
    "lucide-icon",
    "progress",
    "section-frame",
    "stack",
    "summary",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Checklist",
  "type": "registry:block"
}
