{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A page section: the landmark named by its heading, the heading (h1 or h2), an optional lead, the body (`children`) and optional media. `layout` stacks everything or puts the media beside the text; `boxed` puts the body in a card. Axes: layout, media side, tone, density, align.",
  "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-frame.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// SectionFrameProps are the props of SectionFrame; the values are the JSON shapes of the TypeScript props.\ntype SectionFrameProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tLead any `json:\"lead\"`\n\tHeading any `json:\"heading\"`\n\tAction any `json:\"action\"`\n\tLayout any `json:\"layout\"`\n\tMedia any `json:\"media\"`\n\tBoxed any `json:\"boxed\"`\n\tTone any `json:\"tone\"`\n\tDensity any `json:\"density\"`\n\tAlign any `json:\"align\"`\n\tMeasure any `json:\"measure\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n\tClass string `json:\"className\"`\n\tAside templ.Component `json:\"-\"`\n}\n\n// A page section: the landmark named by its heading, the heading (h1 or h2), an optional lead, the body (`children`) and optional media. `layout` stacks everything or puts the media beside the text; `boxed` puts the body in a card. Axes: layout, media side, tone, density, align.\ntempl SectionFrame(p SectionFrameProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := uiutils.Def(p.Title, \"\") }}\n\t{{ vLead := p.Lead }}\n\t{{ vHeading := p.Heading }}\n\t{{ vAction := p.Action }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"stack\") }}\n\t{{ vMedia := p.Media }}\n\t{{ vBoxed := uiutils.Def(p.Boxed, false) }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vDensity := uiutils.Def(p.Density, \"default\") }}\n\t{{ vAlign := uiutils.Def(p.Align, \"start\") }}\n\t{{ vMeasure := uiutils.Def(p.Measure, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t{{ vTitleId := any(uiutils.Add(vId, \"-title\")) }}\n\t{{ vSectionTone := any(uiutils.Cond(uiutils.T(vBoxed), \"default\", vTone)) }}\n\t{{ vCenter := any(uiutils.Eq(vAlign, \"center\")) }}\n\t@compose.Block(compose.BlockProps{BoxProps: box.BoxProps{Tag: \"section\", Class: uiutils.S(uiutils.Cnv(recipeSectionFrame.Of(map[string]any{\"tone\": vSectionTone, \"density\": vDensity, \"align\": vAlign}), p.Class)), Attrs: uiutils.Attrs(\"aria-labelledby\", uiutils.Cond(uiutils.T(vLandmarkLabel), nil, uiutils.Cond(uiutils.T(!uiutils.Eq(vTitle, \"\")), vTitleId, nil)), \"aria-label\", uiutils.Coalesce(vLandmarkLabel, uiutils.Cond(uiutils.T(uiutils.Eq(vTitle, \"\")), vId, nil)), \"data-tone\", vTone, \"data-density\", vDensity, \"data-slot\", \"section\")}}) {\n\t\t@compose.Container(compose.ContainerProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vMeasure, \"landing\")), uiutils.Cnv(\"mx-auto w-full px-4\", uiutils.Get(presetDefaults, \"section\", \"landing\")), uiutils.Cond(uiutils.T(uiutils.Eq(vMeasure, \"fill\")), \"w-full\", \"mx-auto w-full max-w-6xl px-4\"))), Attrs: uiutils.Attrs(\"data-slot\", \"container\")}}) {\n\t\t\t@SectionBox(SectionBoxProps{Boxed: vBoxed}) {\n\t\t\t\tif uiutils.Eq(vLayout, \"split\") {\n\t\t\t\t\t@compose.Grid(compose.GridProps{Cols: \"1-2\", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"gap-8\", uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vMedia, \"align\"), \"start\")), \"items-start\", \"items-center\")))}}) {\n\t\t\t\t\t\tif uiutils.T(uiutils.And(uiutils.Get(vMedia, \"show\"), uiutils.Eq(uiutils.Get(vMedia, \"side\"), \"start\"))) {\n\t\t\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"w-full\", Attrs: uiutils.Attrs(\"data-slot\", \"media\")}}) {\n\t\t\t\t\t\t\t\tif p.Aside != nil {\n\t\t\t\t\t\t\t\t\t@p.Aside\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\t@compose.Stack(compose.StackProps{Gap: \"6\", Align: \"stretch\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t@SectionHeader(SectionHeaderProps{TitleId: vTitleId, Title: vTitle, Heading: vHeading, Action: vAction, Lead: vLead, Center: vCenter})\n\t\t\t\t\t\t\t{ children... }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif uiutils.T(uiutils.And(uiutils.Get(vMedia, \"show\"), !uiutils.Eq(uiutils.Get(vMedia, \"side\"), \"start\"))) {\n\t\t\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"w-full\", Attrs: uiutils.Attrs(\"data-slot\", \"media\")}}) {\n\t\t\t\t\t\t\t\tif p.Aside != nil {\n\t\t\t\t\t\t\t\t\t@p.Aside\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} else {\n\t\t\t\t\t@SectionColumn(SectionColumnProps{Measure: vMeasure}) {\n\t\t\t\t\t\t@SectionHeader(SectionHeaderProps{TitleId: vTitleId, Title: vTitle, Heading: vHeading, Action: vAction, Lead: vLead, Center: vCenter})\n\t\t\t\t\t\t{ children... }\n\t\t\t\t\t\tif uiutils.T(uiutils.Get(vMedia, \"show\")) {\n\t\t\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"w-full\", Attrs: uiutils.Attrs(\"data-slot\", \"media\")}}) {\n\t\t\t\t\t\t\t\tif p.Aside != nil {\n\t\t\t\t\t\t\t\t\t@p.Aside\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/section-frame.templ",
      "target": "blocks/section-frame.templ"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "templ",
      "component"
    ]
  },
  "name": "section-frame",
  "registryDependencies": [
    "block",
    "box",
    "container",
    "grid",
    "kit-box",
    "presets",
    "section-box",
    "section-column",
    "section-header",
    "stack",
    "utils"
  ],
  "runtime": "templ",
  "title": "Section Frame",
  "type": "registry:component"
}
