{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Features as tabs; the chosen one fills the panel beside or below the tab list.",
  "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-tabs.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// FeatureTabsProps are the props of FeatureTabs; the values are the JSON shapes of the TypeScript props.\ntype FeatureTabsProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tFeatures any `json:\"features\"`\n\tEmpty any `json:\"empty\"`\n\tTabsLabel any `json:\"tabsLabel\"`\n\tActive any `json:\"active\"`\n\tPanel any `json:\"panel\"`\n\tTone any `json:\"tone\"`\n\tDensity any `json:\"density\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// Features behind a tab list: the chosen tab shows its text and a picture. The page keeps the chosen tab (`active`, empty for the first) and updates it on the `select` event. Axes: panel (split: text beside the picture, stack: picture below), tone, density.\ntempl FeatureTabs(p FeatureTabsProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vFeatures := p.Features }}\n\t{{ vEmpty := uiutils.Def(p.Empty, \"\") }}\n\t{{ vTabsLabel := p.TabsLabel }}\n\t{{ vActive := uiutils.Def(p.Active, \"\") }}\n\t{{ vPanel := uiutils.Def(p.Panel, \"split\") }}\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(vFeatures), float64(0)) {\n\t\t\t@EmptyState(EmptyStateProps{Icon: \"layout-grid\", Title: vEmpty})\n\t\t} else {\n\t\t\t@compose.Stack(compose.StackProps{Gap: \"6\", Align: \"stretch\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t@Switcher(SwitcherProps{Label: vTabsLabel, Class: uiutils.Cnv(\"w-fit max-w-full flex-wrap\")}) {\n\t\t\t\t\tfor vI, vF := range uiutils.L(vFeatures) {\n\t\t\t\t\t\t@SwitcherItem(SwitcherItemProps{Active: uiutils.Or(uiutils.Eq(uiutils.Get(vF, \"id\"), vActive), uiutils.And(uiutils.Eq(vActive, \"\"), uiutils.Eq(float64(vI), float64(0))))}) {\n\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vF, \"title\")) }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor vI, vF := range uiutils.L(vFeatures) {\n\t\t\t\t\tif uiutils.T(uiutils.Or(uiutils.Eq(uiutils.Get(vF, \"id\"), vActive), uiutils.And(uiutils.Eq(vActive, \"\"), uiutils.Eq(float64(vI), float64(0))))) {\n\t\t\t\t\t\t@compose.Grid(compose.GridProps{Cols: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vPanel, \"split\")), \"1-2\", \"1\")), BoxProps: box.BoxProps{Class: \"items-center gap-8\", Attrs: uiutils.Attrs(\"role\", \"tabpanel\", \"data-slot\", \"tab-panel\")}}) {\n\t\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"4\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vF, \"icon\")), Size: 24})\n\t\t\t\t\t\t\t\t@compose.Title(compose.TitleProps{As: \"3\", Size: \"2xl\", Weight: \"bold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vF, \"title\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"base\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vF, \"text\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vF, \"title\"), Src: uiutils.Get(vF, \"image\"), Ratio: \"4/3\"})\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/feature-tabs.templ",
      "target": "blocks/feature-tabs.templ"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "features",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "feature-tabs",
  "registryDependencies": [
    "empty-state",
    "grid",
    "kit-box",
    "kit-text",
    "lucide-icon",
    "media-frame",
    "section-frame",
    "stack",
    "switcher",
    "switcher-item",
    "text",
    "title",
    "utils"
  ],
  "runtime": "templ",
  "title": "Feature Tabs",
  "type": "registry:block"
}
