{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Auth Form 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 form of AuthCard: the fields of the mode (sign-in, sign-up, reset, magic link), remember me and the forgot\n  link, the terms, the submit button.\n-->\n<script lang=\"ts\">\nimport type { AuthLabels } from \"../blocks/auth-card.types\";\n\nexport type AuthFormProps = {\n  id: string;\n  mode?: \"signin\" | \"signup\" | \"reset\" | \"magic\";\n  labels: AuthLabels;\n  submit: 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 Group from \"../compose/Group.vue\";\nimport Input from \"../compose/Input.vue\";\nimport Label from \"../compose/Label.vue\";\nimport Field from \"../components/field.vue\";\nimport { cn, tpl } from \"../utils\";\n\nconst { id, mode = \"signin\", labels, submit } = defineProps<AuthFormProps>();\n</script>\n\n<template>\n  <Form method=\"dialog\" class=\"gap-4\" data-slot=\"auth-form\">\n    <Field v-if=\"((mode as string) === 'signup')\" :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\n      v-if=\"(((mode as string) !== 'reset') && ((mode as string) !== 'magic'))\"\n      :label=\"labels.password\"\n      :htmlFor=\"tpl('{0}-password', id)\"\n    >\n      <Input\n        type=\"password\"\n        name=\"password\"\n        :autocomplete=\"(((mode as string) === 'signup') ? 'new-password' : 'current-password')\"\n        :id=\"tpl('{0}-password', id)\"\n        data-slot=\"field\"\n      />\n    </Field>\n    <Group v-if=\"((mode as string) === 'signin')\" justify=\"between\" align=\"center\" class=\"flex-wrap gap-2\">\n      <Group gap=\"2\" align=\"center\" :class=\"cn('w-fit', '')\">\n        <Checkbox name=\"remember\" :id=\"tpl('{0}-remember', id)\" />\n        <Label :for=\"tpl('{0}-remember', id)\" class=\"text-sm\">\n          {{ labels.remember }}\n        </Label>\n      </Group>\n      <Button variant=\"link\" size=\"sm\" class=\"px-0\">\n        {{ labels.forgot }}\n      </Button>\n    </Group>\n    <Group v-if=\"((mode as string) === 'signup')\" gap=\"2\" align=\"center\" :class=\"cn('w-fit', '')\">\n      <Checkbox name=\"terms\" :id=\"tpl('{0}-terms', id)\" />\n      <Label :for=\"tpl('{0}-terms', id)\" class=\"text-sm\">\n        {{ labels.terms }}\n      </Label>\n    </Group>\n    <Button variant=\"default\" size=\"default\" type=\"submit\" class=\"w-full\">\n      {{ submit }}\n    </Button>\n  </Form>\n</template>\n",
      "path": "components/auth-form.vue",
      "target": "components/auth-form.vue"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "vue",
      "component"
    ]
  },
  "name": "auth-form",
  "registryDependencies": [
    "auth-card",
    "button",
    "checkbox",
    "field",
    "form",
    "group",
    "input",
    "label",
    "utils"
  ],
  "runtime": "vue",
  "title": "Auth Form",
  "type": "registry:component"
}
