{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Features as cards, tiles or rows with a picture.",
  "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/feature-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/ui/link\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// FeatureGridProps are the props of FeatureGrid; the values are the JSON shapes of the TypeScript props.\ntype FeatureGridProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tFeatures any `json:\"features\"`\n\tEmpty any `json:\"empty\"`\n\tAction any `json:\"action\"`\n\tLayout any `json:\"layout\"`\n\tCols any `json:\"cols\"`\n\tItem any `json:\"item\"`\n\tMediaSide any `json:\"mediaSide\"`\n\tTone any `json:\"tone\"`\n\tDensity any `json:\"density\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// A section with a heading and the features as a grid of cards or tiles, or as rows with a picture. Icons are Lucide names. Axes: layout (grid, rows), columns, item (card, tile, cell: bordered tile with a round icon), media side (rows), density, tone.\ntempl FeatureGrid(p FeatureGridProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vFeatures := p.Features }}\n\t{{ vEmpty := uiutils.Def(p.Empty, \"\") }}\n\t{{ vAction := p.Action }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"grid\") }}\n\t{{ vCols := uiutils.Def(p.Cols, \"1-3\") }}\n\t{{ vItem := uiutils.Def(p.Item, \"card\") }}\n\t{{ vMediaSide := uiutils.Def(p.MediaSide, \"end\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vDensity := uiutils.Def(p.Density, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\tif uiutils.Eq(vItem, \"cell\") {\n\t\t@SectionFrame(SectionFrameProps{Id: vId, Tone: vTone, Density: vDensity, Measure: \"fill\", Class: uiutils.Cnv(\"py-0\"), LandmarkLabel: vLandmarkLabel}) {\n\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"center\", Justify: \"between\", BoxProps: box.BoxProps{Class: \"w-full\"}}) {\n\t\t\t\t@compose.Title(compose.TitleProps{As: \"2\", Size: \"sm\", Weight: \"semibold\", TextProps: text.TextProps{Class: \"leading-7\", Attrs: uiutils.Attrs(\"id\", uiutils.Add(vId, \"-title\"))}}) {\n\t\t\t\t\t{ uiutils.Text(vTitle) }\n\t\t\t\t}\n\t\t\t\tif uiutils.T(uiutils.And(uiutils.Get(vAction, \"label\"), uiutils.Get(vAction, \"href\"))) {\n\t\t\t\t\t@compose.Link(compose.LinkProps{Variant: \"default\", LinkProps: link.LinkProps{Href: uiutils.URL(uiutils.Get(vAction, \"href\"), false), Class: uiutils.S(uiutils.Cnv(uiutils.Get(presetDefaults, \"text\", \"tiny\"), \"shrink-0 font-medium leading-5\")), Attrs: uiutils.Attrs(\"data-slot\", \"section-action\")}}) {\n\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vAction, \"label\")) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif uiutils.Eq(uiutils.Len(vFeatures), float64(0)) {\n\t\t\t\t@EmptyState(EmptyStateProps{Icon: \"layout-grid\", Title: vEmpty})\n\t\t\t} else {\n\t\t\t\t@FeatureCards(FeatureCardsProps{Features: vFeatures, Cols: vCols, Item: vItem})\n\t\t\t}\n\t\t}\n\t} else {\n\t\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Action: vAction, Tone: vTone, Density: vDensity, LandmarkLabel: vLandmarkLabel}) {\n\t\t\tif uiutils.Eq(uiutils.Len(vFeatures), float64(0)) {\n\t\t\t\t@EmptyState(EmptyStateProps{Icon: \"layout-grid\", Title: vEmpty})\n\t\t\t} else if uiutils.Eq(vLayout, \"rows\") {\n\t\t\t\t@FeatureRows(FeatureRowsProps{Features: vFeatures, MediaSide: vMediaSide})\n\t\t\t} else {\n\t\t\t\t@FeatureCards(FeatureCardsProps{Features: vFeatures, Cols: vCols, Item: vItem})\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/feature-grid.templ",
      "target": "blocks/feature-grid.templ"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "features",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "feature-grid",
  "registryDependencies": [
    "empty-state",
    "feature-cards",
    "feature-rows",
    "group",
    "kit-box",
    "kit-link",
    "kit-text",
    "link",
    "presets",
    "section-frame",
    "title",
    "utils"
  ],
  "runtime": "templ",
  "title": "Feature Grid",
  "type": "registry:block"
}
