{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A sidebar section heading with optional right actions. Set `expanded` and it becomes a disclosure button (aria-expanded, the toggle event).",
  "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/patterns/section-head.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/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// SectionHeadProps are the props of SectionHead; the values are the JSON shapes of the TypeScript props.\ntype SectionHeadProps struct {\n\tSize any `json:\"size\"`\n\tExpanded any `json:\"expanded\"`\n\tControls any `json:\"controls\"`\n\tClass string `json:\"className\"`\n\tRight templ.Component `json:\"-\"`\n}\n\n// A sidebar section heading with optional right actions. Set `expanded` and it becomes a disclosure button (aria-expanded, the toggle event).\ntempl SectionHead(p SectionHeadProps) {\n\t{{ vSize := uiutils.Def(p.Size, \"default\") }}\n\t{{ vExpanded := p.Expanded }}\n\t{{ vControls := p.Controls }}\n\t{{ vCls := any(uiutils.Cnv(recipeSectionHead.Of(map[string]any{\"size\": vSize}), \"rounded text-foreground in-data-[nav=collapsed]:hidden\", p.Class)) }}\n\tif uiutils.Has(vExpanded) {\n\t\t@compose.ButtonPlain(compose.ButtonPlainProps{ButtonProps: button.ButtonProps{Type: \"button\", Class: uiutils.S(uiutils.Cnv(vCls, \"w-full text-left\")), Attrs: uiutils.Attrs(\"aria-expanded\", vExpanded, \"aria-controls\", vControls, \"data-slot\", \"section-head\", \"data-expanded\", vExpanded)}}) {\n\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Attrs: uiutils.Attrs(\"data-slot\", \"section-head-title\")}}) {\n\t\t\t\t{ children... }\n\t\t\t}\n\t\t\tif uiutils.T((p.Right != nil)) {\n\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"flex items-center gap-2\", Attrs: uiutils.Attrs(\"data-slot\", \"section-head-right\")}}) {\n\t\t\t\t\tif p.Right != nil {\n\t\t\t\t\t\t@p.Right\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(vCls), Attrs: uiutils.Attrs(\"data-slot\", \"section-head\")}}) {\n\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Attrs: uiutils.Attrs(\"data-slot\", \"section-head-title\")}}) {\n\t\t\t\t{ children... }\n\t\t\t}\n\t\t\tif uiutils.T((p.Right != nil)) {\n\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"flex items-center gap-2\", Attrs: uiutils.Attrs(\"data-slot\", \"section-head-right\")}}) {\n\t\t\t\t\tif p.Right != nil {\n\t\t\t\t\t\t@p.Right\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/section-head.templ",
      "target": "blocks/section-head.templ"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "templ",
      "component"
    ]
  },
  "name": "section-head",
  "registryDependencies": [
    "box",
    "button-plain",
    "inline",
    "kit-box",
    "kit-button",
    "kit-text",
    "presets",
    "utils"
  ],
  "runtime": "templ",
  "title": "Section Head",
  "type": "registry:component"
}
