{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A sign-up in steps with a progress bar or a list of steps; back and next move between them.",
  "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 WizardStep = {\n  id: string;\n  title: string;\n  text: string;\n  icon: string;\n  fieldA: string;\n  fieldB: string;\n};\n\nexport type WizardLabels = {\n  stepOf: string;\n  steps: string;\n  back: string;\n  next: string;\n  finish: string;\n};\n",
      "path": "blocks/signup-wizard.types.ts",
      "target": "blocks/signup-wizard.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 sign-up in steps: the progress, the fields of the current step, back and next. `current` is the step shown,\n  counted from 1. Axes: progress (bar, list: every step named), layout (card, plain). Keeping the typed values\n  between steps is the page's job.\n-->\n<script lang=\"ts\">\nimport type { WizardStep, WizardLabels } from \"./signup-wizard.types\";\n\nexport type SignupWizardProps = {\n  id: string;\n  title: string;\n  steps: WizardStep[];\n  labels: WizardLabels;\n  current?: number;\n  level?: 1 | 2;\n  progress?: \"bar\" | \"list\";\n  layout?: \"card\" | \"plain\";\n  landmarkLabel?: string;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport Block from \"../compose/Block.vue\";\nimport Box from \"../compose/Box.vue\";\nimport Button from \"../compose/Button.vue\";\nimport Group from \"../compose/Group.vue\";\nimport Input from \"../compose/Input.vue\";\nimport List from \"../compose/List.vue\";\nimport ListItem from \"../compose/ListItem.vue\";\nimport LucideIcon from \"../icons/LucideIcon.vue\";\nimport Progress from \"../compose/Progress.vue\";\nimport Stack from \"../compose/Stack.vue\";\nimport Text from \"../compose/Text.vue\";\nimport Title from \"../compose/Title.vue\";\nimport Field from \"../components/field.vue\";\nimport { cn, tpl } from \"../utils\";\n\nconst {\n  id,\n  title,\n  steps,\n  labels,\n  current = 1,\n  level = 2,\n  progress = \"bar\",\n  layout = \"card\",\n  landmarkLabel,\n} = defineProps<SignupWizardProps>();\nconst emit = defineEmits<{ go: [step: number] }>();\n</script>\n\n<template>\n  <Block v-if=\"((steps?.length ?? 0) > 0)\"\n    tag=\"section\"\n    :class=\"cn(\n      'mx-auto flex w-full max-w-lg flex-col gap-6 px-4 py-8',\n      (((layout as string) === 'card') ? 'rounded bg-card p-6 inset-ring inset-ring-border' : '')\n    )\"\n    :aria-labelledby=\"(landmarkLabel ? undefined : tpl('{0}-title', id))\"\n    :data-current=\"(current == null ? undefined : String(current))\"\n    :aria-label=\"landmarkLabel\"\n    data-slot=\"wizard\"\n  >\n    <Title :as=\"level\" size=\"2xl\" weight=\"bold\" :id=\"tpl('{0}-title', id)\">\n      {{ title }}\n    </Title>\n    <Text size=\"sm\" class=\"text-muted-foreground\" data-slot=\"step-of\">\n      {{ tpl(labels.stepOf, current, (steps?.length ?? 0)) }}\n    </Text>\n    <Progress v-if=\"((progress as string) === 'bar')\"\n      :value=\"(current == null ? undefined : String(current))\"\n      :max=\"((steps?.length ?? 0) == null ? undefined : String((steps?.length ?? 0)))\"\n      :aria-label=\"labels.steps\"\n    />\n    <List\n      v-if=\"((progress as string) === 'list')\"\n      class=\"m-0 flex list-none flex-col gap-2 p-0\"\n      :aria-label=\"labels.steps\"\n      data-slot=\"step-list\"\n    >\n      <ListItem v-for=\"(s, i) in steps\" :key=\"s.id\"\n        :class=\"cn(\n          'flex items-center gap-4 text-sm',\n          (((i + 1) === current) ? 'font-semibold' : 'text-muted-foreground')\n        )\"\n        :aria-current=\"(((i + 1) === current) ? 'step' : undefined)\"\n        data-slot=\"step-item\"\n      >\n        <LucideIcon :name=\"(((i + 1) < current) ? 'circle-check' : s.icon)\" :size=\"16\" />\n        {{ s.title }}\n      </ListItem>\n    </List>\n    <template v-for=\"(s, i) in steps\" :key=\"s.id\">\n      <Stack v-if=\"((i + 1) === current)\" gap=\"4\" align=\"stretch\" data-slot=\"step\">\n        <Title :as=\"3\" size=\"xl\" weight=\"bold\">\n          {{ s.title }}\n        </Title>\n        <Text size=\"sm\" class=\"text-muted-foreground\">\n          {{ s.text }}\n        </Text>\n        <Box class=\"grid gap-4\">\n          <Field :label=\"s.fieldA\" :htmlFor=\"tpl('{0}-a', id)\">\n            <Input type=\"text\" :name=\"tpl('{0}-a', id)\" :id=\"tpl('{0}-a', id)\" data-slot=\"field\" />\n          </Field>\n          <Field :label=\"s.fieldB\" :htmlFor=\"tpl('{0}-b', id)\">\n            <Input type=\"text\" :name=\"tpl('{0}-b', id)\" :id=\"tpl('{0}-b', id)\" data-slot=\"field\" />\n          </Field>\n        </Box>\n      </Stack>\n    </template>\n    <Group gap=\"2\" justify=\"between\">\n      <Button\n        variant=\"outline\"\n        size=\"default\"\n        type=\"button\"\n        :disabled=\"(current < 2)\"\n        @click=\"() => emit('go', (current - 1))\"\n      >\n        {{ labels.back }}\n      </Button>\n      <Button variant=\"default\" size=\"default\" type=\"button\" @click=\"() => emit('go', (current + 1))\">\n        {{ ((current >= (steps?.length ?? 0)) ? labels.finish : labels.next) }}\n      </Button>\n    </Group>\n  </Block>\n</template>\n",
      "path": "blocks/signup-wizard.vue",
      "target": "blocks/signup-wizard.vue"
    }
  ],
  "meta": {
    "category": "account",
    "group": "auth",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "signup-wizard",
  "registryDependencies": [
    "block",
    "box",
    "button",
    "field",
    "group",
    "input",
    "list",
    "list-item",
    "lucide-icon",
    "progress",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "vue",
  "title": "Signup Wizard",
  "type": "registry:block"
}
