{
  "$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\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"
    },
    {
      "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-->\n<script lang=\"ts\">\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</script>\n\n<script setup lang=\"ts\">\nimport Disclosure from \"../compose/Disclosure.vue\";\nimport IconBadge from \"../compose/IconBadge.vue\";\nimport List from \"../compose/List.vue\";\nimport ListItem from \"../compose/ListItem.vue\";\nimport LucideIcon from \"../icons/LucideIcon.vue\";\nimport Progress from \"../compose/Progress.vue\";\nimport Stack from \"../compose/Stack.vue\";\nimport Summary from \"../compose/Summary.vue\";\nimport Text from \"../compose/Text.vue\";\nimport EmptyState from \"../components/empty-state.vue\";\nimport SectionFrame from \"../components/section-frame.vue\";\nimport { tpl } from \"../utils\";\n\nconst {\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} = defineProps<ChecklistProps>();\n</script>\n\n<template>\n  <SectionFrame :id=\"id\" :title=\"title\" :tone=\"tone\" measure=\"2xl\" :landmarkLabel=\"landmarkLabel\">\n    <EmptyState v-if=\"((tasks?.length ?? 0) === 0)\" icon=\"list-checks\" :title=\"empty\" />\n    <Stack v-else\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 v-if=\"((progress as string) === 'bar')\"\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      <Text\n        v-if=\"((progress as string) === 'text')\"\n        size=\"sm\"\n        class=\"text-muted-foreground\"\n        data-slot=\"progress-text\"\n      >\n        {{ tpl(progressLabel, tasks.filter((i) => i[\"done\"]).length, (tasks?.length ?? 0)) }}\n      </Text>\n      <List class=\"m-0 flex list-none flex-col gap-4 p-0\" data-slot=\"items\">\n        <ListItem v-for=\"(task, i) in tasks\" :key=\"task.id\"\n          class=\"flex items-start gap-4\"\n          :data-done=\"(task.done == null ? undefined : String(task.done))\"\n          data-slot=\"item\"\n        >\n          <IconBadge v-if=\"((marker as string) === 'number')\" :variant=\"(task.done ? 'primary' : 'outline')\" size=\"xs\">\n            {{ ((i + 1) == null ? undefined : String((i + 1))) }}\n          </IconBadge>\n          <LucideIcon v-else\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          <Disclosure v-if=\"((detail as string) === 'expand')\" 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          <Stack v-else 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        </ListItem>\n      </List>\n    </Stack>\n  </SectionFrame>\n</template>\n",
      "path": "blocks/checklist.vue",
      "target": "blocks/checklist.vue"
    }
  ],
  "meta": {
    "category": "onboarding",
    "group": "setup",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "checklist",
  "registryDependencies": [
    "disclosure",
    "empty-state",
    "icon-badge",
    "list",
    "list-item",
    "lucide-icon",
    "progress",
    "section-frame",
    "stack",
    "summary",
    "text",
    "utils"
  ],
  "runtime": "vue",
  "title": "Checklist",
  "type": "registry:block"
}
