{
  "$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/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n/**\n * A page section: the landmark named by its heading, the heading (h1 or h2), an optional lead, the body\n * (`children`) and optional media. `layout` stacks everything or puts the media beside the text; `boxed` puts\n * the body in a card. Axes: layout, media side, tone, density, align.\n */\nimport { type ReactNode } from \"react\";\nimport { Block, Box, Container, Grid, Stack } from \"../compose\";\nimport { SectionBox } from \"../components/section-box\";\nimport { SectionColumn } from \"../components/section-column\";\nimport { SectionHeader } from \"../components/section-header\";\nimport { defaults } from \"../presets/defaults\";\nimport { cn, variants } from \"../utils\";\nimport type { SectionHeading, HeadLink, SectionMedia } from \"./section-frame.types\";\n\n/** SectionFrame: the classes of each value (shadcn/cva style). */\nexport const sectionFrameVariants = variants({\n  base: \"w-full\",\n  variants: {\n    tone: {\n      default: \"\",\n      muted: \"bg-muted\",\n      inverse: \"bg-foreground text-background [&_.text-muted-foreground]:text-background/70\",\n    },\n    density: {\n      roomy: \"py-16\",\n      default: \"py-10\",\n      compact: \"py-6\",\n      flush: \"py-0\",\n    },\n    align: {\n      start: \"\",\n      center: \"text-center\",\n    },\n  },\n  defaultVariants: { tone: \"default\", density: \"default\", align: \"start\" },\n});\n\nexport type SectionFrameProps = {\n  id: string;\n  title?: string;\n  lead?: string;\n  heading?: SectionHeading;\n  action?: HeadLink;\n  layout?: \"stack\" | \"split\";\n  media?: SectionMedia;\n  boxed?: boolean;\n  tone?: \"default\" | \"muted\" | \"inverse\";\n  density?: \"roomy\" | \"default\" | \"compact\" | \"flush\";\n  align?: \"start\" | \"center\";\n  measure?: \"default\" | \"landing\" | \"fill\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\";\n  landmarkLabel?: string;\n  className?: string;\n  children?: ReactNode;\n  aside?: ReactNode;\n};\n\nexport function SectionFrame({\n  id,\n  title = \"\",\n  lead,\n  heading,\n  action,\n  layout = \"stack\",\n  media,\n  boxed = false,\n  tone = \"default\",\n  density = \"default\",\n  align = \"start\",\n  measure = \"default\",\n  landmarkLabel,\n  className,\n  children,\n  aside,\n}: SectionFrameProps) {\n  const titleId = id + \"-title\";\n  const sectionTone = boxed ? \"default\" : tone;\n  const center = (align as string) === \"center\";\n  return (\n    <Block\n      tag=\"section\"\n      className={cn(\n        sectionFrameVariants({ tone: sectionTone, density: density, align: align }),\n        className\n      )}\n      aria-labelledby={(landmarkLabel ? undefined : (((title as string) !== \"\") ? titleId : undefined))}\n      aria-label={(landmarkLabel ?? (((title as string) === \"\") ? id : undefined))}\n      data-tone={tone}\n      data-density={density}\n      data-slot=\"section\"\n    >\n      <Container\n        className={\n          (measure as string) === \"landing\" ? cn(\"mx-auto w-full px-4\", defaults.section.landing)\n          : (measure as string) === \"fill\" ? \"w-full\"\n          : \"mx-auto w-full max-w-6xl px-4\"\n        }\n        data-slot=\"container\"\n      >\n        <SectionBox boxed={boxed}>\n          {((layout as string) === \"split\") ? (\n            <Grid cols=\"1-2\" className={cn(\"gap-8\", ((media?.align === \"start\") ? \"items-start\" : \"items-center\"))}>\n              {(media?.show && (media?.side === \"start\")) ? (\n                <Box className=\"w-full\" data-slot=\"media\">\n                  {aside}\n                </Box>\n              ) : null}\n              <Stack gap=\"6\" align=\"stretch\">\n                <SectionHeader titleId={titleId} title={title} heading={heading} action={action} lead={lead} center={center} />\n                {children}\n              </Stack>\n              {(media?.show && (media?.side !== \"start\")) ? (\n                <Box className=\"w-full\" data-slot=\"media\">\n                  {aside}\n                </Box>\n              ) : null}\n            </Grid>\n          ) : (\n            <SectionColumn measure={measure}>\n              <SectionHeader titleId={titleId} title={title} heading={heading} action={action} lead={lead} center={center} />\n              {children}\n              {media?.show ? (\n                <Box className=\"w-full\" data-slot=\"media\">\n                  {aside}\n                </Box>\n              ) : null}\n            </SectionColumn>\n          )}\n        </SectionBox>\n      </Container>\n    </Block>\n  );\n}\n",
      "path": "components/section-frame.tsx",
      "target": "components/section-frame.tsx"
    },
    {
      "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\nexport type SectionHeading = {\n  /** heading level */\n  level?: 1 | 2;\n  /** display: an oversized heading */\n  scale?: \"default\" | \"display\";\n  /** a short pill above the heading (e.g. New) */\n  badge?: string;\n};\n\nexport type HeadLink = {\n  /** text of the link (View all, Browse all); none: no link */\n  label?: string;\n  /** href of the link; none: no link */\n  href?: string;\n};\n\nexport type SectionMedia = {\n  /** the `aside` slot is shown */\n  show?: boolean;\n  /** side of the media in the split layout */\n  side?: \"end\" | \"start\";\n  /** split layout: the body and the media centred on each other, or both from the top */\n  align?: \"center\" | \"start\";\n};\n",
      "path": "components/section-frame.types.ts",
      "target": "components/section-frame.types.ts"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "react",
      "component"
    ]
  },
  "name": "section-frame",
  "registryDependencies": [
    "compose",
    "presets",
    "section-box",
    "section-column",
    "section-header",
    "utils"
  ],
  "runtime": "react",
  "title": "Section Frame",
  "type": "registry:component"
}
