{
  "$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/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/organisms/bento-grid.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/icons\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// BentoGridProps are the props of BentoGrid; the values are the JSON shapes of the TypeScript props.\ntype BentoGridProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tTiles any `json:\"tiles\"`\n\tEmpty any `json:\"empty\"`\n\tLayout any `json:\"layout\"`\n\tMedia any `json:\"media\"`\n\tTone any `json:\"tone\"`\n\tDensity any `json:\"density\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\nvar bentoGridSpan = map[string]any{\n\t\"large\": \"md:col-span-2 md:row-span-2\",\n\t\"wide\": \"md:col-span-2\",\n\t\"small\": \"\",\n}\n\n// Tiles of different sizes in one grid: the large and wide tiles hold the important features. Sizes come from the data (large, wide, small). Axes: layout (bento, even: all tiles alike), media (none, image: a picture in the large tiles), tone, density.\ntempl BentoGrid(p BentoGridProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vTiles := p.Tiles }}\n\t{{ vEmpty := uiutils.Def(p.Empty, \"\") }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"bento\") }}\n\t{{ vMedia := uiutils.Def(p.Media, \"none\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vDensity := uiutils.Def(p.Density, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Tone: vTone, Density: vDensity, LandmarkLabel: vLandmarkLabel}) {\n\t\tif uiutils.Eq(uiutils.Len(vTiles), float64(0)) {\n\t\t\t@EmptyState(EmptyStateProps{Icon: \"layout-dashboard\", Title: vEmpty})\n\t\t} else {\n\t\t\t@compose.Grid(compose.GridProps{Cols: \"1-4\", BoxProps: box.BoxProps{Class: \"auto-rows-fr gap-4\", Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\t\tfor _, vTile := range uiutils.L(vTiles) {\n\t\t\t\t\t@compose.Card(compose.CardProps{Variant: \"default\", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"h-full overflow-hidden\", uiutils.Cond(uiutils.T(uiutils.Eq(vDensity, \"compact\")), \"gap-4 p-4\", \"\"), uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"bento\")), uiutils.At(bentoGridSpan, uiutils.Get(vTile, \"size\")), \"\"))), Attrs: uiutils.Attrs(\"data-size\", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"bento\")), uiutils.Get(vTile, \"size\"), \"even\"))}}) {\n\t\t\t\t\t\t@compose.CardContent(compose.CardContentProps{BoxProps: box.BoxProps{Class: \"flex h-full flex-col gap-4\"}}) {\n\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vTile, \"icon\")), Size: 24})\n\t\t\t\t\t\t\t@compose.Title(compose.TitleProps{As: \"3\", Size: \"xl\", Weight: \"bold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vTile, \"title\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vTile, \"text\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif uiutils.T(uiutils.And(uiutils.Eq(vMedia, \"image\"), uiutils.Or(uiutils.Eq(uiutils.Get(vTile, \"size\"), \"large\"), uiutils.Eq(vLayout, \"even\")))) {\n\t\t\t\t\t\t\t\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vTile, \"title\"), Src: uiutils.Get(vTile, \"image\"), Ratio: \"4/3\", Class: uiutils.Cnv(\"mt-auto\")})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/bento-grid.templ",
      "target": "blocks/bento-grid.templ"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "features",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "bento-grid",
  "registryDependencies": [
    "card",
    "card-content",
    "empty-state",
    "grid",
    "kit-box",
    "kit-text",
    "lucide-icon",
    "media-frame",
    "section-frame",
    "text",
    "title",
    "utils"
  ],
  "runtime": "templ",
  "title": "Bento Grid",
  "type": "registry:block"
}
