{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "An email field and a button, inline, stacked or beside a picture.",
  "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  An email sign-up: heading, one sentence, an email field and a button, with an optional consent line and\n  picture. Axes: layout (inline, stacked, split), terms (show, hide), tone (default, muted), align (start,\n  center).\n-->\n<script lang=\"ts\">\nexport type NewsletterFormProps = {\n  id: string;\n  title: string;\n  text: string;\n  label: string;\n  submit: string;\n  consent?: string;\n  layout?: \"inline\" | \"stacked\" | \"split\";\n  terms?: \"show\" | \"hide\";\n  tone?: \"default\" | \"muted\";\n  align?: \"start\" | \"center\";\n  image?: string;\n  imageAlt?: string;\n  landmarkLabel?: string;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport Button from \"../compose/Button.vue\";\nimport Form from \"../compose/Form.vue\";\nimport Group from \"../compose/Group.vue\";\nimport Input from \"../compose/Input.vue\";\nimport Label from \"../compose/Label.vue\";\nimport Text from \"../compose/Text.vue\";\nimport MediaFrame from \"../components/media-frame.vue\";\nimport SectionFrame from \"../components/section-frame.vue\";\nimport { cn, tpl } from \"../utils\";\n\nconst {\n  id,\n  title,\n  text,\n  label,\n  submit,\n  consent,\n  layout = \"inline\",\n  terms = \"hide\",\n  tone = \"default\",\n  align = \"center\",\n  image,\n  imageAlt,\n  landmarkLabel,\n} = defineProps<NewsletterFormProps>();\n</script>\n\n<template>\n  <SectionFrame\n    :id=\"id\"\n    :title=\"title\"\n    :lead=\"text\"\n    :tone=\"tone\"\n    :align=\"align\"\n    :layout=\"(((layout as string) === 'split') ? 'split' : 'stack')\"\n    :media=\"{ show: ((layout as string) === 'split') }\"\n    :landmarkLabel=\"landmarkLabel\"\n  >\n    <Form\n      method=\"dialog\"\n      :class=\"cn('w-full max-w-md', (((align as string) === 'center') ? 'mx-auto' : ''))\"\n      data-slot=\"newsletter-form\"\n    >\n      <Label :for=\"tpl('{0}-email', id)\" class=\"sr-only\">\n        {{ label }}\n      </Label>\n      <Group\n        gap=\"2\"\n        align=\"start\"\n        :class=\"cn('w-full', (((layout as string) === 'stacked') ? 'flex-col items-stretch' : 'flex-wrap'))\"\n      >\n        <Input type=\"email\" name=\"email\" class=\"min-w-0 flex-1\" :id=\"tpl('{0}-email', id)\" data-slot=\"field\" />\n        <Button variant=\"default\" size=\"default\" type=\"submit\">\n          {{ submit }}\n        </Button>\n      </Group>\n      <Text\n        v-if=\"(((terms as string) === 'show') && consent)\"\n        size=\"xs\"\n        class=\"text-muted-foreground\"\n        data-slot=\"consent\"\n      >\n        {{ consent }}\n      </Text>\n    </Form>\n    <template #aside>\n      <MediaFrame :alt=\"(imageAlt ? imageAlt : title)\" :src=\"image\" ratio=\"4/3\" />\n    </template>\n  </SectionFrame>\n</template>\n",
      "path": "blocks/newsletter-form.vue",
      "target": "blocks/newsletter-form.vue"
    }
  ],
  "meta": {
    "category": "promo",
    "group": "forms",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "newsletter-form",
  "registryDependencies": [
    "button",
    "form",
    "group",
    "input",
    "label",
    "media-frame",
    "section-frame",
    "text",
    "utils"
  ],
  "runtime": "vue",
  "title": "Newsletter Form",
  "type": "registry:block"
}
