{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A message form, alone or beside the ways to reach us.",
  "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 ContactLabels = {\n  name: string;\n  email: string;\n  subject: string;\n  message: string;\n  consent: string;\n  submit: string;\n};\n",
      "path": "blocks/contact-form.types.ts",
      "target": "blocks/contact-form.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 contact section: a form (name, email, subject, message, consent) and, in the split layout, the ways to reach\n  us beside it. Axes: layout (single, split), fields (short: email and message, full), terms (show, hide), tone\n  (default, muted).\n-->\n<script lang=\"ts\">\nimport type { ContactLabels } from \"./contact-form.types\";\nimport type { Feature } from \"./feature-grid.types\";\n\nexport type ContactFormProps = {\n  id: string;\n  title: string;\n  text: string;\n  labels: ContactLabels;\n  details: Feature[];\n  layout?: \"single\" | \"split\";\n  fields?: \"short\" | \"full\";\n  terms?: \"show\" | \"hide\";\n  level?: 1 | 2;\n  page?: \"section\" | \"full\";\n  tone?: \"default\" | \"muted\";\n  landmarkLabel?: string;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport Button from \"../compose/Button.vue\";\nimport Checkbox from \"../compose/Checkbox.vue\";\nimport Form from \"../compose/Form.vue\";\nimport Grid from \"../compose/Grid.vue\";\nimport Group from \"../compose/Group.vue\";\nimport Input from \"../compose/Input.vue\";\nimport Label from \"../compose/Label.vue\";\nimport LucideIcon from \"../icons/LucideIcon.vue\";\nimport Stack from \"../compose/Stack.vue\";\nimport Text from \"../compose/Text.vue\";\nimport Textarea from \"../compose/Textarea.vue\";\nimport Field from \"../components/field.vue\";\nimport SectionFrame from \"../components/section-frame.vue\";\nimport { cn, tpl } from \"../utils\";\n\nconst {\n  id,\n  title,\n  text,\n  labels,\n  details,\n  layout = \"single\",\n  fields = \"full\",\n  terms = \"hide\",\n  level = 2,\n  page = \"section\",\n  tone = \"default\",\n  landmarkLabel,\n} = defineProps<ContactFormProps>();\n</script>\n\n<template>\n  <SectionFrame\n    :id=\"id\"\n    :title=\"title\"\n    :lead=\"text\"\n    :heading=\"{ level }\"\n    :tone=\"tone\"\n    :density=\"(((page as string) === 'full') ? 'roomy' : 'default')\"\n    :align=\"(((page as string) === 'full') ? 'center' : 'start')\"\n    :measure=\"(((layout as string) === 'single') ? 'xl' : 'default')\"\n    :landmarkLabel=\"landmarkLabel\"\n  >\n    <Grid :cols=\"(((layout as string) === 'split') ? '1-2' : '1')\" class=\"items-start gap-8\">\n      <Form method=\"dialog\" class=\"w-full gap-4\" data-slot=\"contact-form\">\n        <Field v-if=\"((fields as string) === 'full')\" :label=\"labels.name\" :htmlFor=\"tpl('{0}-name', id)\">\n          <Input type=\"text\" name=\"name\" autocomplete=\"name\" :id=\"tpl('{0}-name', id)\" data-slot=\"field\" />\n        </Field>\n        <Field :label=\"labels.email\" :htmlFor=\"tpl('{0}-email', id)\">\n          <Input type=\"email\" name=\"email\" autocomplete=\"email\" :id=\"tpl('{0}-email', id)\" data-slot=\"field\" />\n        </Field>\n        <Field v-if=\"((fields as string) === 'full')\" :label=\"labels.subject\" :htmlFor=\"tpl('{0}-subject', id)\">\n          <Input type=\"text\" name=\"subject\" :id=\"tpl('{0}-subject', id)\" data-slot=\"field\" />\n        </Field>\n        <Field :label=\"labels.message\" :htmlFor=\"tpl('{0}-message', id)\">\n          <Textarea :rows=\"4\" name=\"message\" :id=\"tpl('{0}-message', id)\" data-slot=\"field\" />\n        </Field>\n        <Group v-if=\"((terms as string) === 'show')\" gap=\"2\" align=\"center\" :class=\"cn('w-fit', '')\">\n          <Checkbox name=\"consent\" :id=\"tpl('{0}-consent', id)\" />\n          <Label :for=\"tpl('{0}-consent', id)\" class=\"text-sm\">\n            {{ labels.consent }}\n          </Label>\n        </Group>\n        <Button variant=\"default\" size=\"default\" type=\"submit\" class=\"w-fit\">\n          {{ labels.submit }}\n        </Button>\n      </Form>\n      <Stack v-if=\"(((layout as string) === 'split') && ((details?.length ?? 0) > 0))\" gap=\"4\" data-slot=\"details\">\n        <Group v-for=\"d in details\" :key=\"d.id\" gap=\"4\" align=\"start\" data-slot=\"detail\">\n          <LucideIcon :name=\"d.icon\" :size=\"20\" />\n          <Stack gap=\"0\">\n            <Text size=\"base\" weight=\"semibold\">\n              {{ d.title }}\n            </Text>\n            <Text size=\"sm\" class=\"text-muted-foreground\">\n              {{ d.text }}\n            </Text>\n          </Stack>\n        </Group>\n      </Stack>\n    </Grid>\n  </SectionFrame>\n</template>\n",
      "path": "blocks/contact-form.vue",
      "target": "blocks/contact-form.vue"
    }
  ],
  "meta": {
    "category": "support",
    "group": "contact",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "contact-form",
  "registryDependencies": [
    "button",
    "checkbox",
    "feature-grid",
    "field",
    "form",
    "grid",
    "group",
    "input",
    "label",
    "lucide-icon",
    "section-frame",
    "stack",
    "text",
    "textarea",
    "utils"
  ],
  "runtime": "vue",
  "title": "Contact Form",
  "type": "registry:block"
}
