{
  "$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/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n/**\n * An onboarding checklist: the tasks with a done mark, a progress bar or a count. Axes: layout (card, plain),\n * progress (bar, text, none), marker (check, number), tone (default, muted).\n */\nimport { For, type JSX } from \"solid-js\";\nimport { Disclosure, IconBadge, List, ListItem, Progress, Stack, Summary, Text } from \"../compose\";\nimport { LucideIcon } from \"../icons/LucideIcon\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { tpl } from \"../utils\";\nimport type { Task } from \"./checklist.types\";\n\nexport type ChecklistProps = {\n  id: string;\n  title: string;\n  tasks: Task[];\n  empty?: string;\n  progressLabel: string;\n  layout?: \"card\" | \"plain\";\n  progress?: \"bar\" | \"text\" | \"none\";\n  marker?: \"check\" | \"number\";\n  detail?: \"always\" | \"expand\";\n  tone?: \"default\" | \"muted\";\n  landmarkLabel?: string;\n};\n\nexport function Checklist({\n  id,\n  title,\n  tasks,\n  empty = \"\",\n  progressLabel,\n  layout = \"card\",\n  progress = \"bar\",\n  marker = \"check\",\n  detail = \"always\",\n  tone = \"default\",\n  landmarkLabel,\n}: ChecklistProps) {\n  return (\n    <SectionFrame id={id} title={title} tone={tone} measure=\"2xl\" landmarkLabel={landmarkLabel}>\n      {((tasks?.length ?? 0) === 0) ? (\n        <EmptyState icon=\"list-checks\" title={empty} />\n      ) : (\n        <Stack\n          gap=\"4\"\n          align=\"stretch\"\n          class={(((layout as string) === \"card\") ? \"rounded bg-card p-6 inset-ring inset-ring-border\" : \"\")}\n          data-slot=\"checklist\"\n        >\n          {((progress as string) === \"bar\") ? (\n            <Progress\n              value={\n                Math.round(((tasks.filter((i) => i[\"done\"]).length * 100) / (tasks?.length ?? 0))) == null ? undefined\n                : String(Math.round(((tasks.filter((i) => i[\"done\"]).length * 100) / (tasks?.length ?? 0))))\n              }\n              max=\"100\"\n              aria-label={tpl(progressLabel, tasks.filter((i) => i[\"done\"]).length, (tasks?.length ?? 0))}\n            />\n          ) : null}\n          {((progress as string) === \"text\") ? (\n            <Text size=\"sm\" class=\"text-muted-foreground\" data-slot=\"progress-text\">\n              {tpl(progressLabel, tasks.filter((i) => i[\"done\"]).length, (tasks?.length ?? 0))}\n            </Text>\n          ) : null}\n          <List class=\"m-0 flex list-none flex-col gap-4 p-0\" data-slot=\"items\">\n            <For each={tasks ?? []}>{(task, iOf) => { const i = iOf(); return (\n              <ListItem\n                class=\"flex items-start gap-4\"\n                data-done={(task.done == null ? undefined : String(task.done))}\n                data-slot=\"item\"\n              >\n                {((marker as string) === \"number\") ? (\n                  <IconBadge variant={(task.done ? \"primary\" : \"outline\")} size=\"xs\">\n                    {((i + 1) == null ? undefined : String((i + 1)))}\n                  </IconBadge>\n                ) : (\n                  <LucideIcon\n                    name={(task.done ? \"circle-check\" : \"circle\")}\n                    size={24}\n                    class={(task.done ? \"shrink-0 text-primary\" : \"shrink-0 text-muted-foreground\")}\n                  />\n                )}\n                {((detail as string) === \"expand\") ? (\n                  <Disclosure variant=\"ghost\" class=\"flex-1\" data-slot=\"task-detail\">\n                    <Summary variant=\"ghost\">\n                      {task.title}\n                    </Summary>\n                    <Text size=\"sm\" class=\"pb-2 text-muted-foreground\">\n                      {task.text}\n                    </Text>\n                  </Disclosure>\n                ) : (\n                  <Stack gap=\"0\">\n                    <Text size=\"base\" weight=\"semibold\">\n                      {task.title}\n                    </Text>\n                    <Text size=\"sm\" class=\"text-muted-foreground\">\n                      {task.text}\n                    </Text>\n                  </Stack>\n                )}\n              </ListItem>\n            ); }}</For>\n          </List>\n        </Stack>\n      )}\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/checklist.tsx",
      "target": "blocks/checklist.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 Task = {\n  id: string;\n  title: string;\n  text: string;\n  done: boolean;\n};\n",
      "path": "blocks/checklist.types.ts",
      "target": "blocks/checklist.types.ts"
    }
  ],
  "meta": {
    "category": "onboarding",
    "group": "setup",
    "kind": "block",
    "tags": [
      "solid",
      "block"
    ]
  },
  "name": "checklist",
  "registryDependencies": [
    "compose",
    "empty-state",
    "lucide-icon",
    "section-frame",
    "utils"
  ],
  "runtime": "solid",
  "title": "Checklist",
  "type": "registry:block"
}
