{
  "$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/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n/**\n * A sidebar section heading with optional right actions. Set `expanded` and it becomes a disclosure button\n * (aria-expanded, the toggle event).\n */\nimport { type JSX } from \"solid-js\";\nimport { Box, ButtonPlain, Inline } from \"../compose\";\nimport { cn, variants } from \"../utils\";\n\n/** SectionHead: the classes of each value (shadcn/cva style). */\nexport const sectionHeadVariants = variants({\n  base: \"flex items-center justify-between pr-4 pl-4\",\n  variants: {\n    size: {\n      default: \"h-8 py-2 text-xs font-semibold\",\n      lg: \"h-12 py-2 text-sm font-bold\",\n    },\n  },\n  defaultVariants: { size: \"default\" },\n});\n\nexport type SectionHeadProps = {\n  size?: \"default\" | \"lg\";\n  expanded?: boolean;\n  controls?: string;\n  class?: string;\n  children?: JSX.Element;\n  right?: JSX.Element;\n  onToggle?: () => void;\n};\n\nexport function SectionHead({\n  size = \"default\",\n  expanded,\n  controls,\n  class: className,\n  children,\n  right,\n  onToggle,\n}: SectionHeadProps) {\n  const cls =\n    cn(\n      sectionHeadVariants({ size: size }),\n      \"rounded text-foreground in-data-[nav=collapsed]:hidden\",\n      className,\n    );\n  return (\n    <>\n      {(expanded != null) ? (\n        <ButtonPlain\n          type=\"button\"\n          class={cn(cls, \"w-full text-left\")}\n          aria-expanded={expanded}\n          aria-controls={controls}\n          data-slot=\"section-head\"\n          data-expanded={expanded}\n          onClick={() => onToggle?.()}\n        >\n          <Inline data-slot=\"section-head-title\">\n            {children}\n          </Inline>\n          {right ? (\n            <Inline class=\"flex items-center gap-2\" data-slot=\"section-head-right\">\n              {right}\n            </Inline>\n          ) : null}\n        </ButtonPlain>\n      ) : (\n        <Box class={cls} data-slot=\"section-head\">\n          <Inline data-slot=\"section-head-title\">\n            {children}\n          </Inline>\n          {right ? (\n            <Inline class=\"flex items-center gap-2\" data-slot=\"section-head-right\">\n              {right}\n            </Inline>\n          ) : null}\n        </Box>\n      )}\n    </>\n  );\n}\n",
      "path": "components/section-head.tsx",
      "target": "components/section-head.tsx"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "solid",
      "component"
    ]
  },
  "name": "section-head",
  "registryDependencies": [
    "compose",
    "utils"
  ],
  "runtime": "solid",
  "title": "Section Head",
  "type": "registry:component"
}
