{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Plans, or a product and its rivals, in columns, and the features in rows; yes and no as marks.",
  "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/comparison-table.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\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// ComparisonTableProps are the props of ComparisonTable; the values are the JSON shapes of the TypeScript props.\ntype ComparisonTableProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tRows any `json:\"rows\"`\n\tEmpty any `json:\"empty\"`\n\tLabels any `json:\"labels\"`\n\tHighlight any `json:\"highlight\"`\n\tTone any `json:\"tone\"`\n\tDensity any `json:\"density\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// Plans, or a product and its competitors, as three columns and the features as rows. A value of yes shows a check, no a dash (both with a hidden word), anything else is shown as text. Axes: highlight (none, middle column), tone, density.\ntempl ComparisonTable(p ComparisonTableProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vRows := p.Rows }}\n\t{{ vEmpty := uiutils.Def(p.Empty, \"\") }}\n\t{{ vLabels := p.Labels }}\n\t{{ vHighlight := uiutils.Def(p.Highlight, \"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(vRows), float64(0)) {\n\t\t\t@EmptyState(EmptyStateProps{Icon: \"table\", Title: vEmpty})\n\t\t} else {\n\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"relative w-full overflow-x-auto\"}}) {\n\t\t\t\t@compose.Table(compose.TableProps{BoxProps: box.BoxProps{Class: \"w-full text-left text-sm\", Attrs: uiutils.Attrs(\"data-slot\", \"compare\")}}) {\n\t\t\t\t\t@compose.TableCaption(compose.TableCaptionProps{BoxProps: box.BoxProps{Class: \"sr-only\"}}) {\n\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"caption\")) }\n\t\t\t\t\t}\n\t\t\t\t\t@compose.TableHead(compose.TableHeadProps{BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t@compose.TableRow(compose.TableRowProps{BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t@compose.TableHeadCell(compose.TableHeadCellProps{BoxProps: box.BoxProps{Class: \"py-4\", Attrs: uiutils.Attrs(\"scope\", \"col\")}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"feature\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.TableHeadCell(compose.TableHeadCellProps{BoxProps: box.BoxProps{Class: \"py-4\", Attrs: uiutils.Attrs(\"scope\", \"col\")}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"a\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.TableHeadCell(compose.TableHeadCellProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"py-4\", uiutils.Cond(uiutils.T(uiutils.Eq(vHighlight, \"middle\")), \"bg-muted\", \"\"))), Attrs: uiutils.Attrs(\"scope\", \"col\", \"data-highlight\", uiutils.Cond(uiutils.T(uiutils.Eq(vHighlight, \"middle\")), \"true\", \"false\"))}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"b\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.TableHeadCell(compose.TableHeadCellProps{BoxProps: box.BoxProps{Class: \"py-4\", Attrs: uiutils.Attrs(\"scope\", \"col\")}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"c\")) }\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\t@compose.TableBody(compose.TableBodyProps{BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\tfor _, vRow := range uiutils.L(vRows) {\n\t\t\t\t\t\t\t@compose.TableRow(compose.TableRowProps{BoxProps: box.BoxProps{Class: \"border-t border-border\", Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t\t\t@compose.TableHeadCell(compose.TableHeadCellProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"font-medium\", uiutils.Cond(uiutils.T(uiutils.Eq(vDensity, \"compact\")), \"py-2\", \"py-4\"))), Attrs: uiutils.Attrs(\"scope\", \"row\")}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vRow, \"label\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.TableCell(compose.TableCellProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(uiutils.Cond(uiutils.T(uiutils.Eq(vDensity, \"compact\")), \"py-2\", \"py-4\")))}}) {\n\t\t\t\t\t\t\t\t\t@CompareMark(CompareMarkProps{Value: uiutils.Get(vRow, \"a\"), Yes: uiutils.Get(vLabels, \"yes\"), No: uiutils.Get(vLabels, \"no\")})\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.TableCell(compose.TableCellProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(uiutils.Cond(uiutils.T(uiutils.Eq(vDensity, \"compact\")), \"py-2\", \"py-4\"), uiutils.Cond(uiutils.T(uiutils.Eq(vHighlight, \"middle\")), \"bg-muted font-semibold\", \"\")))}}) {\n\t\t\t\t\t\t\t\t\t@CompareMark(CompareMarkProps{Value: uiutils.Get(vRow, \"b\"), Yes: uiutils.Get(vLabels, \"yes\"), No: uiutils.Get(vLabels, \"no\")})\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.TableCell(compose.TableCellProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vDensity, \"compact\")), \"py-2\", \"py-4\"))}}) {\n\t\t\t\t\t\t\t\t\t@CompareMark(CompareMarkProps{Value: uiutils.Get(vRow, \"c\"), Yes: uiutils.Get(vLabels, \"yes\"), No: uiutils.Get(vLabels, \"no\")})\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}\n\t}\n}\n",
      "path": "blocks/comparison-table.templ",
      "target": "blocks/comparison-table.templ"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "pricing",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "comparison-table",
  "registryDependencies": [
    "box",
    "compare-mark",
    "empty-state",
    "kit-box",
    "section-frame",
    "table",
    "table-body",
    "table-caption",
    "table-cell",
    "table-head",
    "table-head-cell",
    "table-row",
    "utils"
  ],
  "runtime": "templ",
  "title": "Comparison Table",
  "type": "registry:block"
}
