{
  "$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/**\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 */\nimport { For, type JSX } from \"solid-js\";\nimport { Button, Checkbox, Form, Grid, Group, Input, Label, Stack, Text, Textarea } from \"../compose\";\nimport { LucideIcon } from \"../icons/LucideIcon\";\nimport { Field } from \"../components/field\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { cn, tpl } from \"../utils\";\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\nexport function ContactForm({\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}: ContactFormProps) {\n  return (\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          {((fields as string) === \"full\") ? (\n            <Field 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          ) : null}\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          {((fields as string) === \"full\") ? (\n            <Field 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          ) : null}\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          {((terms as string) === \"show\") ? (\n            <Group 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          ) : null}\n          <Button variant=\"default\" size=\"default\" type=\"submit\" class=\"w-fit\">\n            {labels.submit}\n          </Button>\n        </Form>\n        {(((layout as string) === \"split\") && ((details?.length ?? 0) > 0)) ? (\n          <Stack gap=\"4\" data-slot=\"details\">\n            <For each={details ?? []}>{(d) => (\n              <Group 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            )}</For>\n          </Stack>\n        ) : null}\n      </Grid>\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/contact-form.tsx",
      "target": "blocks/contact-form.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 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"
    }
  ],
  "meta": {
    "category": "support",
    "group": "contact",
    "kind": "block",
    "tags": [
      "solid",
      "block"
    ]
  },
  "name": "contact-form",
  "registryDependencies": [
    "compose",
    "feature-grid",
    "field",
    "lucide-icon",
    "section-frame",
    "utils"
  ],
  "runtime": "solid",
  "title": "Contact Form",
  "type": "registry:block"
}
