{
  "$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-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import type { Lane, BoardCard } from \"./kanban-board.types\";\n\n  export 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</script>\n\n<script lang=\"ts\">\n  import Grid from \"../compose/Grid.svelte\";\n  import Group from \"../compose/Group.svelte\";\n  import List from \"../compose/List.svelte\";\n  import ListItem from \"../compose/ListItem.svelte\";\n  import Stack from \"../compose/Stack.svelte\";\n  import Text from \"../compose/Text.svelte\";\n  import Title from \"../compose/Title.svelte\";\n  import EmptyState from \"../components/empty-state.svelte\";\n  import Pill from \"../components/pill.svelte\";\n  import SectionFrame from \"../components/section-frame.svelte\";\n  import { cn, tpl } from \"../utils\";\n\n  let {\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 = $props();\n</script>\n\n<SectionFrame id={id} title={title} tone={tone} density={density} landmarkLabel={landmarkLabel}>\n  {#if ((lanes?.length ?? 0) === 0)}\n    <EmptyState icon=\"kanban\" title={empty} />\n  {:else}\n    <Grid cols={(((cols as string) === \"2\") ? \"1-2\" : \"1-3\")} class=\"items-start gap-4\" data-slot=\"lanes\">\n      {#each lanes as lane (lane.id)}\n        <Stack gap=\"4\" align=\"stretch\" class=\"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\" class=\"text-muted-foreground\">\n              {tpl(countLabel, (cards.filter((i) => !lane.key || i[\"lane\"] === lane.key)?.length ?? 0))}\n            </Text>\n          </Group>\n          <List class=\"m-0 flex list-none flex-col gap-2 p-0\">\n            {#each cards.filter((i) => !lane.key || i[\"lane\"] === lane.key) as c (c.id)}\n              <ListItem\n                class={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                {#if ((card as string) === \"detail\")}\n                  <Group gap=\"2\" align=\"center\" justify=\"between\" class=\"flex-wrap\">\n                    <Pill tone=\"blue\" icon=\"tag\">\n                      {c.tag}\n                    </Pill>\n                    <Text size=\"xs\" class=\"text-muted-foreground\">\n                      {c.who}\n                    </Text>\n                  </Group>\n                {/if}\n              </ListItem>\n            {/each}\n          </List>\n        </Stack>\n      {/each}\n    </Grid>\n  {/if}\n</SectionFrame>\n",
      "path": "blocks/kanban-board.svelte",
      "target": "blocks/kanban-board.svelte"
    },
    {
      "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": [
      "svelte",
      "block"
    ]
  },
  "name": "kanban-board",
  "registryDependencies": [
    "empty-state",
    "grid",
    "group",
    "list",
    "list-item",
    "pill",
    "section-frame",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Kanban Board",
  "type": "registry:block"
}
