{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Section Header 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<!--\n  The head of a section: an optional badge, the heading (h1 or h2) with an optional link opposite it, and an\n  optional lead. No wrapper: its parts are children of the section stack.\n-->\n<script lang=\"ts\">\nimport type { SectionHeading, HeadLink } from \"./section-frame.types\";\n\nexport type SectionHeaderProps = {\n  titleId: string;\n  title?: string;\n  heading?: SectionHeading;\n  action?: HeadLink;\n  lead?: string;\n  center?: boolean;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport Badge from \"../compose/Badge.vue\";\nimport Group from \"../compose/Group.vue\";\nimport Link from \"../compose/Link.vue\";\nimport Text from \"../compose/Text.vue\";\nimport Title from \"../compose/Title.vue\";\nimport { defaults } from \"../presets/defaults\";\nimport { cn, urlOf } from \"../utils\";\n\nconst { titleId, title = \"\", heading, action, lead, center = false } = defineProps<SectionHeaderProps>();\nconst level = computed(() => heading?.level ?? 2);\nconst scale = computed(() => heading?.scale ?? \"default\");\nconst hasAction = computed(() => action?.label && action?.href);\n</script>\n\n<template>\n  <Badge v-if=\"heading?.badge\" variant=\"outline\" size=\"lg\" :class=\"(center ? 'mx-auto w-fit' : 'w-fit')\">\n    {{ heading?.badge }}\n  </Badge>\n  <Group\n    v-if=\"(((title as string) !== '') && hasAction)\"\n    gap=\"4\"\n    align=\"center\"\n    justify=\"between\"\n    class=\"w-full flex-wrap\"\n    data-slot=\"section-header\"\n  >\n    <Title\n      :as=\"level\"\n      :size=\"((level === 1) ? '5xl' : 'xl')\"\n      weight=\"semibold\"\n      :class=\"\n        (scale as string) === 'display' ? 'text-6xl tracking-tight md:text-8xl'\n        : level === 1 ? 'leading-tight'\n        : 'leading-7'\n      \"\n      :id=\"titleId\"\n    >\n      {{ title }}\n    </Title>\n    <Link\n      :href=\"urlOf(action?.href)\"\n      variant=\"default\"\n      :class=\"cn(defaults.text.tiny, 'shrink-0 font-medium leading-5')\"\n      data-slot=\"section-action\"\n    >\n      {{ action?.label }}\n    </Link>\n  </Group>\n  <Title v-if=\"(((title as string) !== '') && !hasAction)\"\n    :as=\"level\"\n    :size=\"((level === 1) ? '5xl' : 'xl')\"\n    weight=\"semibold\"\n    :class=\"\n      (scale as string) === 'display' ? 'text-6xl tracking-tight md:text-8xl'\n      : level === 1 ? 'leading-tight'\n      : 'leading-7'\n    \"\n    :id=\"titleId\"\n    data-slot=\"section-header\"\n  >\n    {{ title }}\n  </Title>\n  <Group\n    v-if=\"(((title as string) === '') && hasAction)\"\n    gap=\"4\"\n    align=\"center\"\n    justify=\"end\"\n    class=\"w-full\"\n    data-slot=\"section-header\"\n  >\n    <Link\n      :href=\"urlOf(action?.href)\"\n      variant=\"default\"\n      :class=\"cn(defaults.text.tiny, 'shrink-0 font-medium leading-5')\"\n      data-slot=\"section-action\"\n    >\n      {{ action?.label }}\n    </Link>\n  </Group>\n  <Text v-if=\"lead\"\n    size=\"base\"\n    :class=\"cn('max-w-2xl text-muted-foreground', (center ? 'mx-auto' : ''))\"\n    data-slot=\"section-header\"\n  >\n    {{ lead }}\n  </Text>\n</template>\n",
      "path": "components/section-header.vue",
      "target": "components/section-header.vue"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "vue",
      "component"
    ]
  },
  "name": "section-header",
  "registryDependencies": [
    "badge",
    "group",
    "link",
    "presets",
    "section-frame",
    "text",
    "title",
    "utils"
  ],
  "runtime": "vue",
  "title": "Section Header",
  "type": "registry:component"
}
