{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Section Frame component",
  "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\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"
    },
    {
      "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-->\n<script lang=\"ts\">\nimport type { SectionHeading, HeadLink, SectionMedia } from \"./section-frame.types\";\nimport { variants } from \"../utils\";\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  class?: string;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport Block from \"../compose/Block.vue\";\nimport Box from \"../compose/Box.vue\";\nimport Container from \"../compose/Container.vue\";\nimport Grid from \"../compose/Grid.vue\";\nimport Stack from \"../compose/Stack.vue\";\nimport SectionBox from \"../components/section-box.vue\";\nimport SectionColumn from \"../components/section-column.vue\";\nimport SectionHeader from \"../components/section-header.vue\";\nimport { defaults } from \"../presets/defaults\";\nimport { cn } from \"../utils\";\n\nconst {\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  class: className,\n} = defineProps<SectionFrameProps>();\ndefineSlots<{ default?(): unknown, aside?(): unknown }>();\nconst titleId = computed(() => id + \"-title\");\nconst sectionTone = computed(() => boxed ? \"default\" : tone);\nconst center = computed(() => (align as string) === \"center\");\n</script>\n\n<template>\n  <Block\n    tag=\"section\"\n    :class=\"cn(sectionFrameVariants({ tone: sectionTone, density: density, align: align }), className)\"\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      :class=\"\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        <Grid\n          v-if=\"((layout as string) === 'split')\"\n          cols=\"1-2\"\n          :class=\"cn('gap-8', ((media?.align === 'start') ? 'items-start' : 'items-center'))\"\n        >\n          <Box v-if=\"(media?.show && (media?.side === 'start'))\" class=\"w-full\" data-slot=\"media\">\n            <slot name=\"aside\" />\n          </Box>\n          <Stack gap=\"6\" align=\"stretch\">\n            <SectionHeader\n              :titleId=\"titleId\"\n              :title=\"title\"\n              :heading=\"heading\"\n              :action=\"action\"\n              :lead=\"lead\"\n              :center=\"center\"\n            />\n            <slot />\n          </Stack>\n          <Box v-if=\"(media?.show && (media?.side !== 'start'))\" class=\"w-full\" data-slot=\"media\">\n            <slot name=\"aside\" />\n          </Box>\n        </Grid>\n        <SectionColumn v-else :measure=\"measure\">\n          <SectionHeader\n            :titleId=\"titleId\"\n            :title=\"title\"\n            :heading=\"heading\"\n            :action=\"action\"\n            :lead=\"lead\"\n            :center=\"center\"\n          />\n          <slot />\n          <Box v-if=\"media?.show\" class=\"w-full\" data-slot=\"media\">\n            <slot name=\"aside\" />\n          </Box>\n        </SectionColumn>\n      </SectionBox>\n    </Container>\n  </Block>\n</template>\n",
      "path": "components/section-frame.vue",
      "target": "components/section-frame.vue"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "vue",
      "component"
    ]
  },
  "name": "section-frame",
  "registryDependencies": [
    "block",
    "box",
    "container",
    "grid",
    "presets",
    "section-box",
    "section-column",
    "section-header",
    "stack",
    "utils"
  ],
  "runtime": "vue",
  "title": "Section Frame",
  "type": "registry:component"
}
