{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Tiles of different sizes in one grid; the large tiles hold the main features.",
  "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 * Tiles of different sizes in one grid: the large and wide tiles hold the important features. Sizes come from\n * the data (large, wide, small). Axes: layout (bento, even: all tiles alike), media (none, image: a picture in\n * the large tiles), tone, density.\n */\nimport { type ReactNode } from \"react\";\nimport { Card, CardContent, Grid, Text, Title } from \"../compose\";\nimport { LucideIcon } from \"../icons/LucideIcon\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { MediaFrame } from \"../components/media-frame\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { at, cn } from \"../utils\";\nimport type { Tile } from \"./bento-grid.types\";\n\nconst SPAN: Record<string, string> = {\n  \"large\": \"md:col-span-2 md:row-span-2\",\n  \"wide\": \"md:col-span-2\",\n  \"small\": \"\",\n};\n\nexport type BentoGridProps = {\n  id: string;\n  title: string;\n  tiles: Tile[];\n  empty?: string;\n  layout?: \"bento\" | \"even\";\n  media?: \"none\" | \"image\";\n  tone?: \"default\" | \"muted\";\n  density?: \"default\" | \"compact\";\n  landmarkLabel?: string;\n};\n\nexport function BentoGrid({\n  id,\n  title,\n  tiles,\n  empty = \"\",\n  layout = \"bento\",\n  media = \"none\",\n  tone = \"default\",\n  density = \"default\",\n  landmarkLabel,\n}: BentoGridProps) {\n  return (\n    <SectionFrame id={id} title={title} tone={tone} density={density} landmarkLabel={landmarkLabel}>\n      {((tiles?.length ?? 0) === 0) ? (\n        <EmptyState icon=\"layout-dashboard\" title={empty} />\n      ) : (\n        <Grid cols=\"1-4\" className=\"auto-rows-fr gap-4\" data-slot=\"items\">\n          {(tiles ?? []).map((tile) => (\n            <Card key={tile.id}\n              variant=\"default\"\n              className={cn(\n                \"h-full overflow-hidden\",\n                (((density as string) === \"compact\") ? \"gap-4 p-4\" : \"\"),\n                (((layout as string) === \"bento\") ? at(SPAN, tile.size) : \"\")\n              )}\n              data-size={(((layout as string) === \"bento\") ? tile.size : \"even\")}\n            >\n              <CardContent className=\"flex h-full flex-col gap-4\">\n                <LucideIcon name={tile.icon} size={24} />\n                <Title as={3} size=\"xl\" weight=\"bold\">\n                  {tile.title}\n                </Title>\n                <Text size=\"sm\" className=\"text-muted-foreground\">\n                  {tile.text}\n                </Text>\n                {(((media as string) === \"image\") && ((tile.size === \"large\") || ((layout as string) === \"even\"))) ? (\n                  <MediaFrame alt={tile.title} src={tile.image} ratio=\"4/3\" className=\"mt-auto\" />\n                ) : null}\n              </CardContent>\n            </Card>\n          ))}\n        </Grid>\n      )}\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/bento-grid.tsx",
      "target": "blocks/bento-grid.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 Tile = {\n  id: string;\n  title: string;\n  text: string;\n  icon: string;\n  size: string;\n  image?: string;\n};\n",
      "path": "blocks/bento-grid.types.ts",
      "target": "blocks/bento-grid.types.ts"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "features",
    "kind": "block",
    "tags": [
      "react",
      "block"
    ]
  },
  "name": "bento-grid",
  "registryDependencies": [
    "compose",
    "empty-state",
    "lucide-icon",
    "media-frame",
    "section-frame",
    "utils"
  ],
  "runtime": "react",
  "title": "Bento Grid",
  "type": "registry:block"
}
