{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Work items in lanes with a count; cards with a tag and a person. Moving cards is a port contract (SortableList).",
  "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 * Work items in lanes. Each lane has a title, a count and its cards; a card has a title, an optional tag and the\n * person it belongs to. Axes: card (simple, detail: tag and person), cols (2, 3), tone, density. Moving a card\n * between lanes is a port contract.\n */\nimport { type ReactNode } from \"react\";\nimport { Grid, Group, List, ListItem, Stack, Text, Title } from \"../compose\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { Pill } from \"../components/pill\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { cn, tpl } from \"../utils\";\nimport type { Lane, BoardCard } from \"./kanban-board.types\";\n\nexport type KanbanBoardProps = {\n  id: string;\n  title: string;\n  lanes: Lane[];\n  empty?: string;\n  cards: BoardCard[];\n  countLabel: string;\n  card?: \"simple\" | \"detail\";\n  cols?: \"2\" | \"3\";\n  tone?: \"default\" | \"muted\";\n  density?: \"default\" | \"compact\";\n  landmarkLabel?: string;\n};\n\nexport function KanbanBoard({\n  id,\n  title,\n  lanes,\n  empty = \"\",\n  cards,\n  countLabel,\n  card = \"detail\",\n  cols = \"3\",\n  tone = \"default\",\n  density = \"default\",\n  landmarkLabel,\n}: KanbanBoardProps) {\n  return (\n    <SectionFrame id={id} title={title} tone={tone} density={density} landmarkLabel={landmarkLabel}>\n      {((lanes?.length ?? 0) === 0) ? (\n        <EmptyState icon=\"kanban\" title={empty} />\n      ) : (\n        <Grid cols={(((cols as string) === \"2\") ? \"1-2\" : \"1-3\")} className=\"items-start gap-4\" data-slot=\"lanes\">\n          {(lanes ?? []).map((lane) => (\n            <Stack key={lane.id} gap=\"4\" align=\"stretch\" className=\"rounded bg-muted p-4\" data-slot=\"lane\">\n              <Group gap=\"2\" align=\"center\" justify=\"between\">\n                <Title as={3} size=\"base\" weight=\"bold\">\n                  {lane.title}\n                </Title>\n                <Text size=\"xs\" className=\"text-muted-foreground\">\n                  {tpl(countLabel, (cards.filter((i) => !lane.key || i[\"lane\"] === lane.key)?.length ?? 0))}\n                </Text>\n              </Group>\n              <List className=\"m-0 flex list-none flex-col gap-2 p-0\">\n                {(cards.filter((i) => !lane.key || i[\"lane\"] === lane.key) ?? []).map((c) => (\n                  <ListItem key={c.id}\n                    className={cn(\n                      \"flex flex-col rounded bg-card inset-ring inset-ring-border\",\n                      (((density as string) === \"compact\") ? \"gap-2 p-2\" : \"gap-2 p-4\")\n                    )}\n                    data-slot=\"item\"\n                  >\n                    <Text size=\"sm\" weight=\"semibold\">\n                      {c.title}\n                    </Text>\n                    {((card as string) === \"detail\") ? (\n                      <Group gap=\"2\" align=\"center\" justify=\"between\" className=\"flex-wrap\">\n                        <Pill tone=\"blue\" icon=\"tag\">\n                          {c.tag}\n                        </Pill>\n                        <Text size=\"xs\" className=\"text-muted-foreground\">\n                          {c.who}\n                        </Text>\n                      </Group>\n                    ) : null}\n                  </ListItem>\n                ))}\n              </List>\n            </Stack>\n          ))}\n        </Grid>\n      )}\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/kanban-board.tsx",
      "target": "blocks/kanban-board.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 Lane = {\n  id: string;\n  key: string;\n  title: string;\n};\n\nexport type BoardCard = {\n  id: string;\n  lane: string;\n  title: string;\n  tag: string;\n  who: string;\n};\n",
      "path": "blocks/kanban-board.types.ts",
      "target": "blocks/kanban-board.types.ts"
    }
  ],
  "meta": {
    "category": "dashboard",
    "group": "widgets",
    "kind": "block",
    "tags": [
      "react",
      "block"
    ]
  },
  "name": "kanban-board",
  "registryDependencies": [
    "compose",
    "empty-state",
    "pill",
    "section-frame",
    "utils"
  ],
  "runtime": "react",
  "title": "Kanban Board",
  "type": "registry:block"
}
