{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Template gallery: filters, a browse-all button and an 8-card MediaFrame grid.",
  "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/template-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/ui/button\"\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// TemplateGridProps are the props of TemplateGrid; the values are the JSON shapes of the TypeScript props.\ntype TemplateGridProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tTemplates any `json:\"templates\"`\n\tFilters any `json:\"filters\"`\n\tBrowseHref any `json:\"browseHref\"`\n\tLabels any `json:\"labels\"`\n\tCols any `json:\"cols\"`\n\tTone any `json:\"tone\"`\n\tDensity any `json:\"density\"`\n\tEmpty any `json:\"empty\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// Template gallery: a heading, outline filter pills, a grid of template cards and a full-width browse-all button.\ntempl TemplateGrid(p TemplateGridProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vTemplates := p.Templates }}\n\t{{ vFilters := p.Filters }}\n\t{{ vBrowseHref := p.BrowseHref }}\n\t{{ vLabels := p.Labels }}\n\t{{ vCols := uiutils.Def(p.Cols, \"1-4\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vDensity := uiutils.Def(p.Density, \"compact\") }}\n\t{{ vEmpty := uiutils.Def(p.Empty, \"\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Tone: vTone, Density: vDensity, Measure: \"fill\", Class: uiutils.Cnv(\"py-0\"), LandmarkLabel: vLandmarkLabel}) {\n\t\t@compose.Stack(compose.StackProps{Gap: \"8\", Align: \"stretch\", BoxProps: box.BoxProps{}}) {\n\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"center\", Justify: \"between\", BoxProps: box.BoxProps{Class: \"h-8 w-full flex-wrap\"}}) {\n\t\t\t\t@compose.Title(compose.TitleProps{As: \"2\", Size: \"2xl\", Weight: \"semibold\", TextProps: text.TextProps{Class: \"leading-9\", 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.Gt(uiutils.Len(vFilters), float64(0)) {\n\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"center\", BoxProps: box.BoxProps{Class: \"flex-wrap\", Attrs: uiutils.Attrs(\"role\", \"group\", \"aria-label\", uiutils.Get(vLabels, \"filters\"), \"data-slot\", \"template-filters\")}}) {\n\t\t\t\t\t\tfor _, vF := range uiutils.L(vFilters) {\n\t\t\t\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"outline\", Size: \"sm\", ButtonProps: button.ButtonProps{Type: \"button\", Class: \"gap-2\"}}) {\n\t\t\t\t\t\t\t\tif uiutils.T(uiutils.Get(vF, \"icon\")) {\n\t\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vF, \"icon\")), Size: 16})\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vF, \"title\")) }\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\tif uiutils.Eq(uiutils.Len(vTemplates), float64(0)) {\n\t\t\t\t@EmptyState(EmptyStateProps{Icon: \"layout-template\", Title: vEmpty})\n\t\t\t} else {\n\t\t\t\t@compose.Grid(compose.GridProps{Cols: uiutils.S(vCols), BoxProps: box.BoxProps{Class: \"w-full gap-6\", Attrs: uiutils.Attrs(\"data-slot\", \"template-grid\")}}) {\n\t\t\t\t\tfor _, vT := range uiutils.L(vTemplates) {\n\t\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"flex flex-col gap-2 overflow-hidden rounded p-4 inset-ring inset-ring-border\", uiutils.Get(presetDefaults, \"templates\", \"card\"))), Attrs: uiutils.Attrs(\"data-slot\", \"template-card\")}}) {\n\t\t\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"shrink-0 overflow-hidden\", uiutils.Get(presetDefaults, \"templates\", \"image\")))}}) {\n\t\t\t\t\t\t\t\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vT, \"title\"), Src: uiutils.Get(vT, \"image\"), Class: uiutils.Cnv(uiutils.Cnv(\"size-full\", uiutils.Get(presetDefaults, \"media\", \"rounded\")))})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"center\", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"w-full\", uiutils.Get(presetDefaults, \"templates\", \"footer\"))), Attrs: uiutils.Attrs(\"data-slot\", \"template-footer\")}}) {\n\t\t\t\t\t\t\t\t@compose.IconBadge(compose.IconBadgeProps{Size: \"sm\", TextProps: text.TextProps{Class: \"overflow-hidden\", Attrs: uiutils.Attrs(\"data-slot\", \"template-avatar\")}}) {\n\t\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"layout-template\", Size: 16})\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"0\", BoxProps: box.BoxProps{Class: \"min-w-0 flex-1\"}}) {\n\t\t\t\t\t\t\t\t\t@compose.Title(compose.TitleProps{As: \"3\", Size: \"base\", Weight: \"semibold\", TextProps: text.TextProps{Class: \"truncate leading-6\"}}) {\n\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vT, \"title\")) }\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"center\", BoxProps: box.BoxProps{Class: \"h-4 text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"2\", Align: \"center\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"eye\", Size: 16})\n\t\t\t\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"sr-only\"}}) {\n\t\t\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"views\")) }\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"xs\", Weight: \"bold\", TextProps: text.TextProps{Class: \"leading-4\"}}) {\n\t\t\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vT, \"views\")) }\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"2\", Align: \"center\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"heart\", Size: 16})\n\t\t\t\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"sr-only\"}}) {\n\t\t\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"likes\")) }\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"xs\", Weight: \"bold\", TextProps: text.TextProps{Class: \"leading-4\"}}) {\n\t\t\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vT, \"likes\")) }\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\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\t@compose.Button(compose.ButtonProps{Variant: \"outline\", Size: \"sm\", ButtonProps: button.ButtonProps{Href: uiutils.URL(vBrowseHref, false), Class: \"w-full\"}}) {\n\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"browse\")) }\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/template-grid.templ",
      "target": "blocks/template-grid.templ"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "gallery",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "template-grid",
  "registryDependencies": [
    "box",
    "button",
    "empty-state",
    "grid",
    "group",
    "icon-badge",
    "inline",
    "kit-box",
    "kit-button",
    "kit-text",
    "lucide-icon",
    "media-frame",
    "presets",
    "section-frame",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "templ",
  "title": "Template Grid",
  "type": "registry:block"
}
