{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Account settings: picture, name, email, bio and notifications.",
  "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 ProfileLabels = {\n  picture: string;\n  change: string;\n  name: string;\n  email: string;\n  bio: string;\n  prefs: string;\n  updates: string;\n  alerts: string;\n  save: string;\n  cancel: string;\n};\n",
      "path": "blocks/profile-form.types.ts",
      "target": "blocks/profile-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  An account settings form: a picture with a change button, name, email, bio and two notification switches, with\n  save and cancel. Axes: layout (stacked, split), avatar (show, hide), prefs (show, hide), tone (default,\n  muted).\n-->\n<script lang=\"ts\">\nimport type { ProfileLabels } from \"./profile-form.types\";\n\nexport type ProfileFormProps = {\n  id: string;\n  title: string;\n  text: string;\n  labels: ProfileLabels;\n  layout?: \"stacked\" | \"split\";\n  avatar?: \"show\" | \"hide\";\n  prefs?: \"show\" | \"hide\";\n  tone?: \"default\" | \"muted\";\n  landmarkLabel?: string;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport Block from \"../compose/Block.vue\";\nimport Button from \"../compose/Button.vue\";\nimport Container from \"../compose/Container.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 Stack from \"../compose/Stack.vue\";\nimport Switch from \"../compose/Switch.vue\";\nimport Textarea from \"../compose/Textarea.vue\";\nimport Title from \"../compose/Title.vue\";\nimport Field from \"../components/field.vue\";\nimport MediaFrame from \"../components/media-frame.vue\";\nimport Panel from \"../components/panel.vue\";\nimport { cn, tpl } from \"../utils\";\n\nconst {\n  id,\n  title,\n  text,\n  labels,\n  layout = \"stacked\",\n  avatar = \"show\",\n  prefs = \"show\",\n  tone = \"default\",\n  landmarkLabel,\n} = defineProps<ProfileFormProps>();\n</script>\n\n<template>\n  <Block\n    tag=\"section\"\n    :aria-labelledby=\"(landmarkLabel ? undefined : ((title && id) ? tpl('{0}-t', id) : undefined))\"\n    :aria-label=\"landmarkLabel\"\n    data-slot=\"panel-section\"\n  >\n    <Container class=\"mx-auto w-full max-w-6xl px-4 py-8\" data-slot=\"container\">\n      <Panel\n        :title=\"title\"\n        :description=\"text\"\n        :id=\"id\"\n        :class=\"cn((((tone as string) === 'muted') ? 'bg-muted' : ''))\"\n      >\n        <Form method=\"dialog\" class=\"gap-6\" data-slot=\"profile-form\">\n          <Grid :cols=\"(((layout as string) === 'split') ? '1-2' : '1')\" class=\"items-start gap-8\">\n            <Stack gap=\"4\" align=\"stretch\">\n              <Group v-if=\"((avatar as string) === 'show')\" gap=\"4\" align=\"center\" data-slot=\"avatar\">\n                <MediaFrame :alt=\"labels.picture\" ratio=\"1/1\" class=\"size-16 shrink-0 rounded-full\" />\n                <Button variant=\"outline\" size=\"sm\" type=\"button\">\n                  {{ labels.change }}\n                </Button>\n              </Group>\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              <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 :label=\"labels.bio\" :htmlFor=\"tpl('{0}-bio', id)\">\n                <Textarea :rows=\"4\" name=\"bio\" :id=\"tpl('{0}-bio', id)\" data-slot=\"field\" />\n              </Field>\n            </Stack>\n            <Stack v-if=\"((prefs as string) === 'show')\" gap=\"4\" align=\"stretch\" data-slot=\"prefs\">\n              <Title :as=\"3\" size=\"base\" weight=\"bold\">\n                {{ labels.prefs }}\n              </Title>\n              <Group gap=\"4\" align=\"center\" justify=\"between\">\n                <Label :for=\"tpl('{0}-updates', id)\" class=\"text-sm\" :id=\"tpl('{0}-updates-label', id)\">\n                  {{ labels.updates }}\n                </Label>\n                <Switch name=\"updates\" :id=\"tpl('{0}-updates', id)\" :aria-labelledby=\"tpl('{0}-updates-label', id)\" />\n              </Group>\n              <Group gap=\"4\" align=\"center\" justify=\"between\">\n                <Label :for=\"tpl('{0}-alerts', id)\" class=\"text-sm\" :id=\"tpl('{0}-alerts-label', id)\">\n                  {{ labels.alerts }}\n                </Label>\n                <Switch name=\"alerts\" :id=\"tpl('{0}-alerts', id)\" :aria-labelledby=\"tpl('{0}-alerts-label', id)\" />\n              </Group>\n            </Stack>\n          </Grid>\n          <Group gap=\"2\" class=\"flex-wrap\">\n            <Button variant=\"default\" size=\"default\" type=\"submit\">\n              {{ labels.save }}\n            </Button>\n            <Button variant=\"outline\" size=\"default\" type=\"button\">\n              {{ labels.cancel }}\n            </Button>\n          </Group>\n        </Form>\n      </Panel>\n    </Container>\n  </Block>\n</template>\n",
      "path": "blocks/profile-form.vue",
      "target": "blocks/profile-form.vue"
    }
  ],
  "meta": {
    "category": "account",
    "group": "settings",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "profile-form",
  "registryDependencies": [
    "block",
    "button",
    "container",
    "field",
    "form",
    "grid",
    "group",
    "input",
    "label",
    "media-frame",
    "panel",
    "stack",
    "switch",
    "textarea",
    "title",
    "utils"
  ],
  "runtime": "vue",
  "title": "Profile Form",
  "type": "registry:block"
}
