{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "auth-06",
  "title": "注册向导",
  "description": "多步注册：账号、资料、实名（可跳过）三步，左侧步骤栏可回退，前后切换保留已填值，最后统一提交。",
  "dependencies": [
    "lucide-react",
    "motion",
    "zod"
  ],
  "registryDependencies": [
    "button",
    "checkbox",
    "https://yiui.dev/r/grid-layout.json",
    "https://yiui.dev/r/steps.json",
    "https://yiui.dev/r/bar-field.json",
    "https://yiui.dev/r/phone-input.json",
    "https://yiui.dev/r/region-picker.json",
    "https://yiui.dev/r/segmented-control.json",
    "https://yiui.dev/r/id-number-input.json",
    "https://yiui.dev/r/china-regions.json"
  ],
  "files": [
    {
      "path": "src/registry/blocks/auth-06/auth-06.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { motion, useReducedMotion } from \"motion/react\"\nimport { Button } from \"@/components/ui/button\"\nimport { cn } from \"@/lib/utils\"\nimport { useControllableState } from \"@/hooks/use-controllable-state\"\nimport {\n  GridContainer,\n  GridSection,\n  GridSeparator,\n} from \"@/components/ui/grid-layout/grid-layout\"\nimport { DEFAULT_LABELS, DEFAULT_TEAM_SIZES } from \"./config\"\nimport { Auth06DonePanel } from \"./done-panel\"\nimport { Auth06FormError } from \"./form-parts\"\nimport { Auth06Progress } from \"./progress\"\nimport {\n  createAccountSchema,\n  createIdentitySchema,\n  createProfileSchema,\n  fieldErrors,\n} from \"./schemas\"\nimport {\n  Auth06AccountForm,\n  Auth06IdentityForm,\n  Auth06ProfileForm,\n} from \"./step-forms\"\nimport type {\n  Auth06Draft,\n  Auth06Errors,\n  Auth06Props,\n  Auth06Step,\n  Auth06Values,\n} from \"./types\"\nimport { useAsyncAction } from \"./use-auth-form\"\n\n/** 多步注册向导：账号 → 资料 → 实名（可跳过），最后统一提交；真实注册由回调接入。 */\nfunction Auth06({\n  regions,\n  onSubmit,\n  onCheckEmail,\n  onSuccess,\n  onSignIn,\n  identityStep = \"optional\",\n  teamSizes = DEFAULT_TEAM_SIZES,\n  agreementLinks,\n  brand,\n  labels: labelsProp,\n  step: stepProp,\n  defaultStep = \"account\",\n  onStepChange,\n  className,\n  ...props\n}: Auth06Props) {\n  const labels = { ...DEFAULT_LABELS, ...labelsProp }\n  const [rawStep, setStep] = useControllableState<Auth06Step>({\n    prop: stepProp,\n    defaultProp: defaultStep,\n    onChange: onStepChange,\n  })\n  // 关闭实名时，外部传入的 identity 按资料步处理\n  const step =\n    rawStep === \"identity\" && identityStep === \"off\" ? \"profile\" : rawStep\n  const order: Auth06Step[] =\n    identityStep === \"off\"\n      ? [\"account\", \"profile\"]\n      : [\"account\", \"profile\", \"identity\"]\n  const [draft, setDraft] = React.useState<Auth06Draft>(() => ({\n    email: \"\",\n    password: \"\",\n    agreed: false,\n    name: \"\",\n    phone: \"\",\n    region: null,\n    regionPath: [],\n    teamSize: teamSizes[0]?.value ?? \"\",\n    realName: \"\",\n    idNumber: \"\",\n  }))\n  const [errors, setErrors] = React.useState<Auth06Errors>({})\n  const [submitted, setSubmitted] = React.useState<Auth06Values | null>(null)\n  const [submitKind, setSubmitKind] = React.useState<\n    \"identity\" | \"skip\" | null\n  >(null)\n  // 真实姓名默认取第 2 步的姓名，用户改过之后不再覆盖\n  const realNameEdited = React.useRef(false)\n  const checking = useAsyncAction(labels.failed)\n  const submitting = useAsyncAction(labels.failed)\n  const pending = checking.pending || submitting.pending\n  const titleRef = React.useRef<HTMLHeadingElement>(null)\n  const previousStep = React.useRef(step)\n  const focusTarget = React.useRef<string | null>(null)\n  const reduced = useReducedMotion()\n  const id = React.useId()\n  const formErrorId = `${id}-form-error`\n\n  React.useEffect(() => {\n    if (previousStep.current !== step) titleRef.current?.focus()\n    previousStep.current = step\n  }, [step])\n  // 校验失败后等错误渲染完，再把焦点交给第一个出错的字段\n  React.useEffect(() => {\n    if (!focusTarget.current) return\n    document.getElementById(`${id}-${focusTarget.current}`)?.focus()\n    focusTarget.current = null\n  })\n\n  function update(patch: Partial<Auth06Draft>) {\n    if (\"realName\" in patch) realNameEdited.current = true\n    setDraft((current) => ({ ...current, ...patch }))\n    setErrors((current) => {\n      const next = { ...current }\n      for (const key of Object.keys(patch) as (keyof Auth06Draft)[])\n        delete next[key]\n      // 地区的值和路径一起变\n      if (\"region\" in patch) delete next.regionPath\n      return next\n    })\n    if (\"email\" in patch) checking.setError(\"\")\n    submitting.setError(\"\")\n  }\n\n  function fail(next: Auth06Errors) {\n    setErrors(next)\n    focusTarget.current = Object.keys(next)[0] ?? null\n  }\n\n  function goTo(next: Auth06Step) {\n    submitting.setError(\"\")\n    if (next === \"identity\" && !realNameEdited.current)\n      setDraft((current) => ({ ...current, realName: current.name }))\n    setStep(next)\n  }\n\n  async function submitAll(withIdentity: boolean) {\n    if (pending) return\n    if (withIdentity) {\n      const result = createIdentitySchema(labels).safeParse(draft)\n      if (!result.success) return fail(fieldErrors(result.error))\n    }\n    const values: Auth06Values = {\n      email: draft.email.trim(),\n      password: draft.password,\n      name: draft.name.trim(),\n      phone: draft.phone,\n      region: { code: draft.region ?? \"\", path: draft.regionPath },\n      teamSize: draft.teamSize,\n      ...(withIdentity && {\n        identity: {\n          realName: draft.realName.trim(),\n          idNumber: draft.idNumber,\n        },\n      }),\n    }\n    setSubmitKind(withIdentity ? \"identity\" : \"skip\")\n    const ok = await submitting.run(() => onSubmit(values))\n    setSubmitKind(null)\n    if (ok) {\n      setSubmitted(values)\n      setStep(\"done\")\n    }\n  }\n\n  async function nextFromAccount() {\n    if (pending) return\n    const result = createAccountSchema(labels).safeParse(draft)\n    if (!result.success) return fail(fieldErrors(result.error))\n    const email = draft.email.trim()\n    if (onCheckEmail && !(await checking.run(() => onCheckEmail(email)))) {\n      focusTarget.current = \"email\"\n      return\n    }\n    goTo(\"profile\")\n  }\n\n  function nextFromProfile() {\n    if (pending) return\n    const result = createProfileSchema(labels).safeParse({\n      ...draft,\n      region: draft.region ?? \"\",\n    })\n    if (!result.success) return fail(fieldErrors(result.error))\n    if (identityStep === \"off\") void submitAll(false)\n    else goTo(\"identity\")\n  }\n\n  const titles = {\n    account: [labels.accountTitle, labels.accountDescription],\n    profile: [labels.profileTitle, labels.profileDescription],\n    identity: [labels.identityTitle, labels.identityDescription],\n    done: [labels.doneTitle, labels.doneDescription],\n  } satisfies Record<Auth06Step, string[]>\n  const shortTitles = {\n    account: labels.accountStep,\n    profile: labels.profileStep,\n    identity: labels.identityStep,\n  }\n  const skippedIdentity =\n    step === \"done\" && identityStep !== \"off\" && !submitted?.identity\n  const index = step === \"done\" ? order.length - 1 : order.indexOf(step)\n  const shared = {\n    id,\n    labels,\n    draft,\n    errors,\n    pending,\n    update,\n    describedBy: submitting.error ? formErrorId : undefined,\n  }\n\n  return (\n    <div\n      data-slot=\"auth-06\"\n      data-step={step}\n      data-state={pending ? \"pending\" : step === \"done\" ? \"success\" : \"idle\"}\n      className={cn(\n        \"w-full overflow-x-clip bg-background text-foreground\",\n        className,\n      )}\n      {...props}\n    >\n      <GridContainer className=\"max-w-4xl\">\n        <GridSection\n          topLine\n          className=\"grid divide-y divide-dashed divide-edge lg:grid-cols-[15rem_minmax(0,1fr)] lg:divide-x lg:divide-y-0\"\n        >\n          <aside\n            data-slot=\"auth-06-sidebar\"\n            className=\"flex flex-col gap-6 px-4 py-6 sm:px-6 lg:gap-10 lg:py-8\"\n          >\n            <div>\n              {brand && (\n                <div className=\"mb-6 flex items-center gap-2 text-sm font-medium lg:mb-8\">\n                  {brand.logo}\n                  {brand.name}\n                </div>\n              )}\n              <h1 className=\"text-2xl font-semibold tracking-tight\">\n                {labels.title}\n              </h1>\n              <p className=\"mt-2 text-sm leading-6 text-muted-foreground\">\n                {labels.description}\n              </p>\n            </div>\n            <Auth06Progress\n              labels={labels}\n              items={order.map((item) => ({\n                title: shortTitles[item as keyof typeof shortTitles],\n                description:\n                  item !== \"identity\" || identityStep !== \"optional\"\n                    ? undefined\n                    : skippedIdentity\n                      ? labels.skipped\n                      : labels.optional,\n                // 跳过实名后，结果页里这一步保持未完成\n                skipped: item === \"identity\" && skippedIdentity,\n              }))}\n              index={index}\n              done={step === \"done\"}\n              locked={pending || step === \"done\"}\n              onSelect={(target) => goTo(order[target] ?? \"account\")}\n            />\n          </aside>\n          <div className=\"min-w-0 px-4 py-8 sm:px-6 lg:px-10 lg:py-10\">\n            <motion.div\n              key={step}\n              data-slot=\"auth-06-step\"\n              initial={false}\n              animate={\n                reduced\n                  ? { opacity: 1, y: 0 }\n                  : { opacity: [0.7, 1], y: [4, 0] }\n              }\n              transition={{ duration: reduced ? 0 : 0.18 }}\n            >\n              <h2\n                ref={titleRef}\n                tabIndex={-1}\n                className=\"text-lg font-medium tracking-tight outline-none focus-visible:underline\"\n              >\n                {titles[step][0]}\n              </h2>\n              <p className=\"mt-1.5 mb-6 text-sm leading-6 text-muted-foreground\">\n                {titles[step][1]}\n              </p>\n              <Auth06FormError id={formErrorId} message={submitting.error} />\n              {step === \"account\" ? (\n                <Auth06AccountForm\n                  {...shared}\n                  errors={{ ...errors, email: errors.email || checking.error }}\n                  checking={checking.pending}\n                  agreementLinks={agreementLinks}\n                  onNext={() => void nextFromAccount()}\n                />\n              ) : step === \"profile\" ? (\n                <Auth06ProfileForm\n                  {...shared}\n                  regions={regions}\n                  teamSizes={teamSizes}\n                  last={identityStep === \"off\"}\n                  submitting={submitting.pending}\n                  onBack={() => goTo(\"account\")}\n                  onNext={nextFromProfile}\n                />\n              ) : step === \"identity\" ? (\n                <Auth06IdentityForm\n                  {...shared}\n                  mode={identityStep === \"required\" ? \"required\" : \"optional\"}\n                  submitting={submitKind}\n                  onBack={() => goTo(\"profile\")}\n                  onSubmit={(withIdentity) => void submitAll(withIdentity)}\n                />\n              ) : (\n                <Auth06DonePanel\n                  labels={labels}\n                  identity={\n                    identityStep === \"off\"\n                      ? \"off\"\n                      : submitted?.identity\n                        ? \"submitted\"\n                        : \"pending\"\n                  }\n                  onEnter={() => submitted && onSuccess?.(submitted)}\n                />\n              )}\n            </motion.div>\n          </div>\n        </GridSection>\n        {onSignIn && step !== \"done\" && (\n          <>\n            <GridSeparator />\n            <GridSection className=\"px-4 py-4 text-center sm:px-6\">\n              <Button type=\"button\" variant=\"link\" size=\"lg\" onClick={onSignIn}>\n                {labels.signIn}\n              </Button>\n            </GridSection>\n          </>\n        )}\n      </GridContainer>\n    </div>\n  )\n}\n\nexport { Auth06 }\nexport type {\n  Auth06IdentityMode,\n  Auth06Props,\n  Auth06Region,\n  Auth06Step,\n  Auth06TeamSize,\n  Auth06Values,\n} from \"./types\"\nexport type { Auth06Labels } from \"./config\"\n",
      "type": "registry:component",
      "target": "@components/auth-06/auth-06.tsx"
    },
    {
      "path": "src/registry/hooks/use-controllable-state.ts",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\ntype UseControllableStateParams<T> = {\n  /** 受控值；传入后组件不再维护内部状态 */\n  prop?: T\n  /** 非受控时的初始值 */\n  defaultProp: T\n  /** 值变化时回调（受控与非受控都会触发） */\n  onChange?: (value: T) => void\n}\n\n/**\n * 同时支持受控与非受控的状态 hook。\n * 约定见 component-conventions 技能第 4 节：open/defaultOpen/onOpenChange 等成对 props 都用它实现。\n */\nfunction useControllableState<T>({\n  prop,\n  defaultProp,\n  onChange,\n}: UseControllableStateParams<T>) {\n  const [uncontrolled, setUncontrolled] = React.useState(defaultProp)\n  const isControlled = prop !== undefined\n  const value = isControlled ? prop : uncontrolled\n\n  // 用 ref 保存最新的回调和值，保证 setValue 引用稳定\n  const onChangeRef = React.useRef(onChange)\n  const valueRef = React.useRef(value)\n  React.useEffect(() => {\n    onChangeRef.current = onChange\n    valueRef.current = value\n  })\n\n  const setValue = React.useCallback(\n    (next: React.SetStateAction<T>) => {\n      const resolved =\n        typeof next === \"function\"\n          ? (next as (prev: T) => T)(valueRef.current)\n          : next\n      if (Object.is(resolved, valueRef.current)) return\n      valueRef.current = resolved\n      if (!isControlled) setUncontrolled(resolved)\n      onChangeRef.current?.(resolved)\n    },\n    [isControlled],\n  )\n\n  return [value, setValue] as const\n}\n\nexport { useControllableState }\n",
      "type": "registry:hook",
      "target": "hooks/use-controllable-state.ts"
    },
    {
      "path": "src/registry/blocks/auth-06/page.tsx",
      "content": "\"use client\"\nimport * as React from \"react\"\nimport { Auth06 } from \"@/components/auth-06/auth-06\"\n\nconst wait = () => new Promise((resolve) => setTimeout(resolve, 350))\n\n// 放在组件外保持引用稳定；import() 让地区数据单独成块，首次打开地区选择时才下载\nconst loadRegions = () =>\n  import(\"@/lib/china-regions\").then((m) => m.chinaRegions)\n\n/** 演示后端仅用于体验界面，接入时替换为真实的注册服务。 */\nexport default function SignUpPage() {\n  const [notice, setNotice] = React.useState(\"\")\n  return (\n    <main\n      data-slot=\"auth-06-demo\"\n      className=\"flex min-h-screen flex-col justify-center bg-background py-8 text-foreground\"\n    >\n      <p className=\"mb-4 px-4 text-center text-xs text-muted-foreground\">\n        演示：邮箱 taken@example.com 视为已注册；手机号以 0000 结尾时提交失败\n      </p>\n      <Auth06\n        brand={{ name: \"云间工作台\" }}\n        regions={loadRegions}\n        onCheckEmail={async (email) => {\n          await wait()\n          if (email.toLowerCase() === \"taken@example.com\")\n            throw new Error(\"该邮箱已注册，可以直接登录\")\n        }}\n        onSubmit={async (values) => {\n          await wait()\n          if (values.phone.endsWith(\"0000\"))\n            throw new Error(\"注册服务暂时不可用，请稍后重试\")\n        }}\n        onSuccess={() => setNotice(\"请在接入后跳转到工作台\")}\n        onSignIn={() => setNotice(\"请在接入后打开登录页面\")}\n      />\n      <p\n        role=\"status\"\n        className=\"mt-4 px-4 text-center text-xs text-muted-foreground\"\n      >\n        {notice}\n      </p>\n    </main>\n  )\n}\n",
      "type": "registry:page",
      "target": "app/sign-up/page.tsx"
    },
    {
      "path": "src/registry/blocks/auth-06/config.ts",
      "content": "const DEFAULT_LABELS = {\n  title: \"注册账号\",\n  description: \"三步完成注册，实名认证可以稍后再补。\",\n  /** 纵向步骤条的读屏名称 */\n  steps: \"注册步骤\",\n  /** 步骤短名：步骤栏、手机顶部进度共用 */\n  accountStep: \"账号\",\n  profileStep: \"资料\",\n  identityStep: \"实名\",\n  /** 可跳过的步骤在步骤栏里的标注 */\n  optional: \"可跳过\",\n  /** 完成注册时实名被跳过 */\n  skipped: \"已跳过\",\n  /** 手机顶部进度，支持 {current}、{total}、{title} */\n  progress: \"步骤 {current} / {total} · {title}\",\n  progressDone: \"注册完成\",\n  /** 每一步的标题，切换步骤时焦点落在这里 */\n  accountTitle: \"创建账号\",\n  accountDescription: \"用邮箱登录，密码至少 8 位。\",\n  profileTitle: \"完善资料\",\n  profileDescription: \"方便同事找到你，也用于开通对应的团队版本。\",\n  identityTitle: \"实名认证\",\n  identityDescription:\n    \"实名只在开具发票、提现和合规核验时用到，现在可以先跳过。\",\n  identityNote: \"证件信息加密存储，只用于核验身份，不会对外展示。\",\n  email: \"邮箱\",\n  emailPlaceholder: \"name@example.com\",\n  password: \"密码\",\n  passwordPlaceholder: \"至少 8 位\",\n  showPassword: \"显示密码\",\n  hidePassword: \"隐藏密码\",\n  /** 强度文字，{level} 为下面四档之一 */\n  passwordStrength: \"强度：{level}\",\n  passwordStrengthEmpty: \"未输入\",\n  strengthWeak: \"弱\",\n  strengthFair: \"一般\",\n  strengthGood: \"较强\",\n  strengthStrong: \"强\",\n  agreement: \"我已阅读并同意\",\n  terms: \"《用户协议》\",\n  and: \"和\",\n  privacy: \"《隐私政策》\",\n  name: \"姓名\",\n  namePlaceholder: \"你的称呼\",\n  phone: \"手机号\",\n  region: \"所在地区\",\n  regionPlaceholder: \"请选择省 / 市\",\n  teamSize: \"团队规模\",\n  realName: \"真实姓名\",\n  realNamePlaceholder: \"与证件一致\",\n  idNumber: \"身份证号\",\n  back: \"上一步\",\n  next: \"下一步\",\n  checking: \"检查中…\",\n  skip: \"跳过\",\n  skipAndFinish: \"跳过并完成注册\",\n  submitAndFinish: \"提交并完成注册\",\n  finish: \"完成注册\",\n  submitting: \"提交中…\",\n  emailError: \"请输入正确的邮箱地址\",\n  passwordError: \"密码至少 8 位\",\n  agreementError: \"请先阅读并同意用户协议和隐私政策\",\n  nameError: \"请输入姓名\",\n  phoneError: \"请输入正确的 11 位手机号\",\n  regionError: \"请选择所在地区\",\n  realNameError: \"请输入与证件一致的真实姓名\",\n  idNumberError: \"请输入正确的 18 位身份证号\",\n  failed: \"请求失败，请稍后重试\",\n  doneTitle: \"注册完成\",\n  doneDescription: \"账号已经可以使用，下面是这次注册的结果。\",\n  doneAccount: \"账号已创建\",\n  doneProfile: \"资料已填写\",\n  doneIdentity: \"实名认证\",\n  identitySubmitted: \"已提交\",\n  identityPending: \"待完成\",\n  enter: \"进入工作台\",\n  signIn: \"已有账号？去登录\",\n}\n\ntype Auth06Labels = typeof DEFAULT_LABELS\n\n/** 团队规模的默认选项，可用 `teamSizes` 覆盖。 */\nconst DEFAULT_TEAM_SIZES = [\n  { value: \"solo\", label: \"仅自己\" },\n  { value: \"2-10\", label: \"2–10 人\" },\n  { value: \"11-50\", label: \"11–50 人\" },\n  { value: \"50+\", label: \"50 人以上\" },\n]\n\nfunction formatLabel(\n  template: string,\n  values: Record<string, string | number>,\n) {\n  return template.replace(/\\{(\\w+)\\}/g, (_, key: string) =>\n    String(values[key] ?? \"\"),\n  )\n}\n\nexport { DEFAULT_LABELS, DEFAULT_TEAM_SIZES, formatLabel }\nexport type { Auth06Labels }\n",
      "type": "registry:component",
      "target": "@components/auth-06/config.ts"
    },
    {
      "path": "src/registry/blocks/auth-06/types.ts",
      "content": "import type * as React from \"react\"\nimport type { RegionsSource } from \"@/components/ui/region-picker/region-picker\"\nimport type { Auth06Labels } from \"./config\"\n\n/** 向导所处的位置；`done` 是提交成功后的结果页，不算一步。 */\ntype Auth06Step = \"account\" | \"profile\" | \"identity\" | \"done\"\n\n/** 实名步骤：可跳过、必填或不出现（整个向导只有两步）。 */\ntype Auth06IdentityMode = \"optional\" | \"required\" | \"off\"\n\ntype Auth06Region = {\n  /** 最末一级的行政区划代码 */\n  code: string\n  /** 从省到市的名称，如 `[\"浙江省\", \"杭州市\"]` */\n  path: string[]\n}\n\ntype Auth06Values = {\n  email: string\n  password: string\n  name: string\n  /** 11 位纯数字，不带区号 */\n  phone: string\n  region: Auth06Region\n  /** 所选团队规模选项的 `value` */\n  teamSize: string\n  /** 跳过实名时没有这一项 */\n  identity?: { realName: string; idNumber: string }\n}\n\ntype Auth06TeamSize = { value: string; label: string }\n\n/** 向导内部的草稿：前后切换步骤时全部保留。 */\ntype Auth06Draft = {\n  email: string\n  password: string\n  agreed: boolean\n  name: string\n  phone: string\n  region: string | null\n  regionPath: string[]\n  teamSize: string\n  realName: string\n  idNumber: string\n}\n\ntype Auth06Errors = Partial<Record<keyof Auth06Draft, string>>\n\ntype Auth06Props = Omit<React.ComponentProps<\"div\">, \"onSubmit\"> & {\n  /** 地区数据，传数组或惰性加载函数，同 `RegionPicker` 的 `regions`。 */\n  regions: RegionsSource\n  /** 最后一步统一提交，失败时抛出 Error，`message` 显示在当前步骤表单上方。 */\n  onSubmit: (values: Auth06Values) => Promise<void>\n  /** 第一步「下一步」时检查邮箱是否可用；抛出的 `message` 显示在邮箱下方。 */\n  onCheckEmail?: (email: string) => Promise<void>\n  /** 结果页点「进入工作台」时触发，参数为已提交的值。 */\n  onSuccess?: (values: Auth06Values) => void\n  /** 传入后底部显示「已有账号？去登录」，导航由接入方处理。 */\n  onSignIn?: () => void\n  /** 实名步骤。@default \"optional\" */\n  identityStep?: Auth06IdentityMode\n  /** 团队规模选项，第一项为默认值。@default 仅自己 / 2–10 人 / 11–50 人 / 50 人以上 */\n  teamSizes?: Auth06TeamSize[]\n  /** 协议链接；未提供时只显示协议名称。 */\n  agreementLinks?: { terms?: string; privacy?: string }\n  /** 品牌名称和标志。 */\n  brand?: { name: string; logo?: React.ReactNode }\n  /** 覆盖默认中文文案。 */\n  labels?: Partial<Auth06Labels>\n  /** 受控步骤。 */\n  step?: Auth06Step\n  /** 初始步骤。@default \"account\" */\n  defaultStep?: Auth06Step\n  /** 步骤变化通知（前进、返回、点步骤栏、完成）。 */\n  onStepChange?: (step: Auth06Step) => void\n}\n\nexport type {\n  Auth06Draft,\n  Auth06Errors,\n  Auth06IdentityMode,\n  Auth06Props,\n  Auth06Region,\n  Auth06Step,\n  Auth06TeamSize,\n  Auth06Values,\n}\n",
      "type": "registry:component",
      "target": "@components/auth-06/types.ts"
    },
    {
      "path": "src/registry/blocks/auth-06/schemas.ts",
      "content": "import { z } from \"zod\"\nimport { isValidIdCard } from \"@/components/ui/id-number-input/id-number-input\"\nimport { isValidPhone } from \"@/components/ui/phone-input/phone-input\"\nimport type { Auth06Labels } from \"./config\"\n\nfunction createAccountSchema(labels: Auth06Labels) {\n  return z.object({\n    email: z.string().trim().email(labels.emailError),\n    password: z.string().min(8, labels.passwordError),\n    agreed: z.boolean().refine(Boolean, labels.agreementError),\n  })\n}\n\nfunction createProfileSchema(labels: Auth06Labels) {\n  return z.object({\n    name: z.string().trim().min(1, labels.nameError),\n    phone: z.string().refine(isValidPhone, labels.phoneError),\n    region: z.string().min(1, labels.regionError),\n  })\n}\n\nfunction createIdentitySchema(labels: Auth06Labels) {\n  return z.object({\n    realName: z.string().trim().min(2, labels.realNameError),\n    idNumber: z\n      .string()\n      .refine((value) => isValidIdCard(value), labels.idNumberError),\n  })\n}\n\n/** 把 zod 的错误按字段名收成「字段 → 第一条信息」。 */\nfunction fieldErrors(error: z.ZodError) {\n  const result: Record<string, string> = {}\n  for (const issue of error.issues) {\n    const key = String(issue.path[0] ?? \"\")\n    if (!result[key]) result[key] = issue.message\n  }\n  return result\n}\n\nexport {\n  createAccountSchema,\n  createIdentitySchema,\n  createProfileSchema,\n  fieldErrors,\n}\n",
      "type": "registry:component",
      "target": "@components/auth-06/schemas.ts"
    },
    {
      "path": "src/registry/blocks/auth-06/use-auth-form.ts",
      "content": "\"use client\"\nimport * as React from \"react\"\n/** 用同步锁拦截自动提交与回车的重复请求。 */\nfunction useAsyncAction(fallback: string) {\n  const lock = React.useRef(false)\n  const [pending, setPending] = React.useState(false)\n  const [error, setError] = React.useState(\"\")\n  async function run(action: () => Promise<void>) {\n    if (lock.current) return false\n    lock.current = true\n    setPending(true)\n    setError(\"\")\n    try {\n      await action()\n      return true\n    } catch (caught) {\n      setError(caught instanceof Error ? caught.message : fallback)\n      return false\n    } finally {\n      lock.current = false\n      setPending(false)\n    }\n  }\n  return { pending, error, setError, run }\n}\nexport { useAsyncAction }\n",
      "type": "registry:component",
      "target": "@components/auth-06/use-auth-form.ts"
    },
    {
      "path": "src/registry/blocks/auth-06/form-parts.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { ChevronLeft, Eye, EyeOff } from \"lucide-react\"\nimport { Button } from \"@/components/ui/button\"\nimport { Checkbox } from \"@/components/ui/checkbox\"\nimport { cn } from \"@/lib/utils\"\nimport { BarField, type BarFieldProps } from \"@/components/ui/bar-field/bar-field\"\nimport type { Auth06Labels } from \"./config\"\n\n/** 带显示 / 隐藏切换的密码方条；切换键与条同高，放在条内右侧。 */\nfunction Auth06PasswordField({\n  labels,\n  ...props\n}: Omit<BarFieldProps, \"type\" | \"suffix\"> & { labels: Auth06Labels }) {\n  const [visible, setVisible] = React.useState(false)\n  return (\n    <BarField\n      {...props}\n      type={visible ? \"text\" : \"password\"}\n      suffix={\n        <Button\n          type=\"button\"\n          variant=\"ghost\"\n          size=\"icon-lg\"\n          aria-label={visible ? labels.hidePassword : labels.showPassword}\n          aria-pressed={visible}\n          onClick={() => setVisible((value) => !value)}\n          className=\"text-muted-foreground hover:text-foreground\"\n        >\n          {visible ? <EyeOff aria-hidden=\"true\" /> : <Eye aria-hidden=\"true\" />}\n        </Button>\n      }\n    />\n  )\n}\n\n/** 协议勾选：错误文字用 role=\"alert\" 播报，并通过 aria-describedby 关联到复选框。 */\nfunction Auth06Agreement({\n  id,\n  labels,\n  checked,\n  error,\n  disabled,\n  links,\n  onCheckedChange,\n}: {\n  id: string\n  labels: Auth06Labels\n  checked: boolean\n  error?: string\n  disabled?: boolean\n  links?: { terms?: string; privacy?: string }\n  onCheckedChange: (checked: boolean) => void\n}) {\n  const errorId = `${id}-error`\n  const link = (href: string | undefined, text: string) =>\n    href ? (\n      <a href={href} className=\"text-foreground underline underline-offset-4\">\n        {text}\n      </a>\n    ) : (\n      text\n    )\n  return (\n    <div data-slot=\"auth-06-agreement\" className=\"space-y-1.5\">\n      <div className=\"flex items-start gap-3 text-xs leading-6 text-muted-foreground\">\n        <Checkbox\n          id={id}\n          checked={checked}\n          disabled={disabled}\n          onCheckedChange={(value) => onCheckedChange(value)}\n          aria-invalid={error ? true : undefined}\n          aria-describedby={error ? errorId : undefined}\n          className=\"mt-1\"\n        />\n        <p>\n          <label htmlFor={id}>{labels.agreement}</label>\n          {link(links?.terms, labels.terms)}\n          {labels.and}\n          {link(links?.privacy, labels.privacy)}\n        </p>\n      </div>\n      {error && (\n        <p role=\"alert\" id={errorId} className=\"text-xs text-destructive\">\n          {error}\n        </p>\n      )}\n    </div>\n  )\n}\n\n/** 表单级错误（提交失败的原因），出现时读屏立即朗读。 */\nfunction Auth06FormError({ id, message }: { id: string; message: string }) {\n  if (!message) return null\n  return (\n    <p\n      id={id}\n      role=\"alert\"\n      data-slot=\"auth-06-form-error\"\n      className=\"mb-5 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive\"\n    >\n      {message}\n    </p>\n  )\n}\n\n/** 每步底部的按钮行：左「上一步」，右侧次要操作 + 主按钮，同一档高度。 */\nfunction Auth06Actions({\n  labels,\n  onBack,\n  disabled,\n  children,\n}: {\n  labels: Auth06Labels\n  onBack?: () => void\n  disabled?: boolean\n  children: React.ReactNode\n}) {\n  return (\n    <div\n      data-slot=\"auth-06-actions\"\n      className=\"mt-8 flex items-center gap-2 border-t border-dashed border-edge pt-5\"\n    >\n      {onBack && (\n        <Button\n          type=\"button\"\n          variant=\"ghost\"\n          size=\"lg\"\n          disabled={disabled}\n          onClick={onBack}\n          className=\"-ml-2.5 text-muted-foreground\"\n        >\n          <ChevronLeft aria-hidden=\"true\" />\n          {labels.back}\n        </Button>\n      )}\n      <div className=\"ml-auto flex items-center gap-2\">{children}</div>\n    </div>\n  )\n}\n\n/** 按钮文字在几种状态间切换时叠放全部候选，按钮宽度取最长的一个，不跳动。 */\nfunction Auth06ButtonLabel({\n  current,\n  options,\n}: {\n  current: string\n  options: string[]\n}) {\n  return (\n    <span data-slot=\"auth-06-button-label\" className=\"grid\">\n      {options.map((option) => (\n        <span\n          key={option}\n          className={cn(\n            \"col-start-1 row-start-1\",\n            option !== current && \"invisible\",\n          )}\n        >\n          {option}\n        </span>\n      ))}\n    </span>\n  )\n}\n\nexport {\n  Auth06Actions,\n  Auth06ButtonLabel,\n  Auth06Agreement,\n  Auth06FormError,\n  Auth06PasswordField,\n}\n",
      "type": "registry:component",
      "target": "@components/auth-06/form-parts.tsx"
    },
    {
      "path": "src/registry/blocks/auth-06/step-forms.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { ShieldCheck } from \"lucide-react\"\nimport { Button } from \"@/components/ui/button\"\nimport { BarField } from \"@/components/ui/bar-field/bar-field\"\nimport { IdNumberInput } from \"@/components/ui/id-number-input/id-number-input\"\nimport { PhoneInput } from \"@/components/ui/phone-input/phone-input\"\nimport { RegionPicker } from \"@/components/ui/region-picker/region-picker\"\nimport { SegmentedControl } from \"@/components/ui/segmented-control/segmented-control\"\nimport type { Auth06Labels } from \"./config\"\nimport {\n  Auth06Actions,\n  Auth06Agreement,\n  Auth06ButtonLabel,\n  Auth06PasswordField,\n} from \"./form-parts\"\nimport { Auth06PasswordStrength } from \"./password-strength\"\nimport type {\n  Auth06Draft,\n  Auth06Errors,\n  Auth06IdentityMode,\n  Auth06TeamSize,\n} from \"./types\"\nimport type { RegionsSource } from \"@/components/ui/region-picker/region-picker\"\n\ntype StepFormProps = {\n  /** 字段 id 前缀：`${id}-email` 等，校验失败时据此聚焦第一个出错字段 */\n  id: string\n  labels: Auth06Labels\n  draft: Auth06Draft\n  errors: Auth06Errors\n  pending: boolean\n  /** 表单级错误的 id，存在时挂到 form 的 aria-describedby */\n  describedBy?: string\n  update: (patch: Partial<Auth06Draft>) => void\n}\n\nfunction StepForm({\n  slot,\n  describedBy,\n  onSubmit,\n  children,\n}: {\n  slot: string\n  describedBy?: string\n  onSubmit: () => void\n  children: React.ReactNode\n}) {\n  return (\n    <form\n      noValidate\n      data-slot={slot}\n      aria-describedby={describedBy}\n      onSubmit={(event) => {\n        event.preventDefault()\n        onSubmit()\n      }}\n    >\n      <div className=\"space-y-4\">{children}</div>\n    </form>\n  )\n}\n\nfunction Auth06AccountForm({\n  id,\n  labels,\n  draft,\n  errors,\n  pending,\n  describedBy,\n  update,\n  checking,\n  agreementLinks,\n  onNext,\n}: StepFormProps & {\n  checking: boolean\n  agreementLinks?: { terms?: string; privacy?: string }\n  onNext: () => void\n}) {\n  return (\n    <StepForm\n      slot=\"auth-06-account\"\n      describedBy={describedBy}\n      onSubmit={onNext}\n    >\n      <BarField\n        id={`${id}-email`}\n        size=\"lg\"\n        type=\"email\"\n        inputMode=\"email\"\n        autoComplete=\"email\"\n        spellCheck={false}\n        label={labels.email}\n        placeholder={labels.emailPlaceholder}\n        value={draft.email}\n        error={errors.email}\n        disabled={pending}\n        onValueChange={(email) => update({ email })}\n      />\n      <div className=\"space-y-2\">\n        <Auth06PasswordField\n          id={`${id}-password`}\n          size=\"lg\"\n          autoComplete=\"new-password\"\n          label={labels.password}\n          placeholder={labels.passwordPlaceholder}\n          labels={labels}\n          value={draft.password}\n          error={errors.password}\n          disabled={pending}\n          onValueChange={(password) => update({ password })}\n        />\n        <Auth06PasswordStrength password={draft.password} labels={labels} />\n      </div>\n      <Auth06Agreement\n        id={`${id}-agreed`}\n        labels={labels}\n        checked={draft.agreed}\n        error={errors.agreed}\n        disabled={pending}\n        links={agreementLinks}\n        onCheckedChange={(agreed) => update({ agreed })}\n      />\n      <Auth06Actions labels={labels}>\n        <Button type=\"submit\" size=\"lg\" disabled={pending}>\n          <Auth06ButtonLabel\n            current={checking ? labels.checking : labels.next}\n            options={[labels.next, labels.checking]}\n          />\n        </Button>\n      </Auth06Actions>\n    </StepForm>\n  )\n}\n\nfunction Auth06ProfileForm({\n  id,\n  labels,\n  draft,\n  errors,\n  pending,\n  describedBy,\n  update,\n  regions,\n  teamSizes,\n  last,\n  submitting,\n  onBack,\n  onNext,\n}: StepFormProps & {\n  regions: RegionsSource\n  teamSizes: Auth06TeamSize[]\n  /** 实名关闭时这是最后一步，主按钮直接完成注册 */\n  last: boolean\n  submitting: boolean\n  onBack: () => void\n  onNext: () => void\n}) {\n  return (\n    <StepForm\n      slot=\"auth-06-profile\"\n      describedBy={describedBy}\n      onSubmit={onNext}\n    >\n      <BarField\n        id={`${id}-name`}\n        size=\"lg\"\n        autoComplete=\"name\"\n        label={labels.name}\n        placeholder={labels.namePlaceholder}\n        value={draft.name}\n        error={errors.name}\n        disabled={pending}\n        onValueChange={(name) => update({ name })}\n      />\n      <PhoneInput\n        id={`${id}-phone`}\n        size=\"lg\"\n        label={labels.phone}\n        value={draft.phone}\n        error={errors.phone}\n        disabled={pending}\n        labels={{ invalid: labels.phoneError, required: labels.phoneError }}\n        onValueChange={(phone) => update({ phone })}\n      />\n      <RegionPicker\n        id={`${id}-region`}\n        size=\"lg\"\n        depth={2}\n        regions={regions}\n        label={labels.region}\n        placeholder={labels.regionPlaceholder}\n        value={draft.region}\n        error={errors.region}\n        disabled={pending}\n        onValueChange={(region, path) =>\n          update({ region, regionPath: path.map((item) => item.name) })\n        }\n      />\n      {/* 四个选项在手机宽度下放不下条内标签，标签统一放在条上方 */}\n      <div className=\"space-y-1.5\">\n        <p\n          id={`${id}-team-size-label`}\n          className=\"text-xs text-muted-foreground\"\n        >\n          {labels.teamSize}\n        </p>\n        <SegmentedControl\n          size=\"lg\"\n          aria-labelledby={`${id}-team-size-label`}\n          options={teamSizes}\n          value={draft.teamSize}\n          disabled={pending}\n          onValueChange={(teamSize) => update({ teamSize })}\n        />\n      </div>\n      <Auth06Actions labels={labels} onBack={onBack} disabled={pending}>\n        <Button type=\"submit\" size=\"lg\" disabled={pending}>\n          <Auth06ButtonLabel\n            current={\n              submitting\n                ? labels.submitting\n                : last\n                  ? labels.finish\n                  : labels.next\n            }\n            options={[last ? labels.finish : labels.next, labels.submitting]}\n          />\n        </Button>\n      </Auth06Actions>\n    </StepForm>\n  )\n}\n\nfunction Auth06IdentityForm({\n  id,\n  labels,\n  draft,\n  errors,\n  pending,\n  describedBy,\n  update,\n  mode,\n  submitting,\n  onBack,\n  onSubmit,\n}: StepFormProps & {\n  mode: Exclude<Auth06IdentityMode, \"off\">\n  submitting: \"identity\" | \"skip\" | null\n  onBack: () => void\n  onSubmit: (withIdentity: boolean) => void\n}) {\n  // 身份证号为空时主按钮是「跳过并完成注册」；填了号码才校验并提交\n  const filled = draft.idNumber !== \"\"\n  const submitIdentity = mode === \"required\" || filled\n  return (\n    <StepForm\n      slot=\"auth-06-identity\"\n      describedBy={describedBy}\n      onSubmit={() => onSubmit(submitIdentity)}\n    >\n      <div\n        data-slot=\"auth-06-identity-note\"\n        className=\"flex gap-2.5 rounded-md border border-edge bg-muted/40 px-3 py-2.5 text-xs leading-5 text-muted-foreground\"\n      >\n        <ShieldCheck aria-hidden=\"true\" className=\"mt-0.5 size-4 shrink-0\" />\n        <p>{labels.identityNote}</p>\n      </div>\n      <BarField\n        id={`${id}-realName`}\n        size=\"lg\"\n        autoComplete=\"name\"\n        label={labels.realName}\n        placeholder={labels.realNamePlaceholder}\n        value={draft.realName}\n        error={errors.realName}\n        disabled={pending}\n        onValueChange={(realName) => update({ realName })}\n      />\n      <IdNumberInput\n        id={`${id}-idNumber`}\n        size=\"lg\"\n        label={labels.idNumber}\n        value={draft.idNumber}\n        error={errors.idNumber}\n        disabled={pending}\n        labels={{ invalid: labels.idNumberError }}\n        onValueChange={(idNumber) => update({ idNumber })}\n      />\n      <Auth06Actions labels={labels} onBack={onBack} disabled={pending}>\n        {mode === \"optional\" && filled && (\n          <Button\n            type=\"button\"\n            variant=\"outline\"\n            size=\"lg\"\n            disabled={pending}\n            onClick={() => onSubmit(false)}\n          >\n            <Auth06ButtonLabel\n              current={submitting === \"skip\" ? labels.submitting : labels.skip}\n              options={[labels.skip, labels.submitting]}\n            />\n          </Button>\n        )}\n        <Button type=\"submit\" size=\"lg\" disabled={pending}>\n          <Auth06ButtonLabel\n            current={\n              submitting === (submitIdentity ? \"identity\" : \"skip\")\n                ? labels.submitting\n                : submitIdentity\n                  ? labels.submitAndFinish\n                  : labels.skipAndFinish\n            }\n            options={[\n              labels.skipAndFinish,\n              labels.submitAndFinish,\n              labels.submitting,\n            ]}\n          />\n        </Button>\n      </Auth06Actions>\n    </StepForm>\n  )\n}\n\nexport { Auth06AccountForm, Auth06IdentityForm, Auth06ProfileForm }\n",
      "type": "registry:component",
      "target": "@components/auth-06/step-forms.tsx"
    },
    {
      "path": "src/registry/blocks/auth-06/password-strength.tsx",
      "content": "import { cn } from \"@/lib/utils\"\nimport { formatLabel, type Auth06Labels } from \"./config\"\n\n// 四段强度条：颜色从 destructive 过渡到主色，跟随主题\nconst levels = [\n  { label: \"strengthWeak\", bar: \"bg-destructive\" },\n  { label: \"strengthFair\", bar: \"bg-destructive/50\" },\n  { label: \"strengthGood\", bar: \"bg-primary/60\" },\n  { label: \"strengthStrong\", bar: \"bg-primary\" },\n] as const satisfies readonly { label: keyof Auth06Labels; bar: string }[]\n\n/** 按长度与字符种类打分：0 表示尚未输入，1–4 对应 弱 / 一般 / 较强 / 强。 */\nfunction getPasswordStrength(password: string) {\n  if (!password) return 0\n  const score =\n    Number(password.length >= 8) +\n    Number(password.length >= 12) +\n    Number(/[a-z]/.test(password) && /[A-Z]/.test(password)) +\n    Number(/\\d/.test(password)) +\n    Number(/[^A-Za-z0-9]/.test(password))\n  return Math.min(4, Math.max(1, score))\n}\n\n/** 四段强度条 + 文字；文字只在档位变化时播报。 */\nfunction Auth06PasswordStrength({\n  password,\n  labels,\n}: {\n  password: string\n  labels: Auth06Labels\n}) {\n  const strength = getPasswordStrength(password)\n  const level = strength ? levels[strength - 1] : null\n  return (\n    <div\n      data-slot=\"auth-06-password-strength\"\n      data-strength={strength}\n      className=\"flex items-center gap-3\"\n    >\n      <div aria-hidden=\"true\" className=\"grid flex-1 grid-cols-4 gap-1\">\n        {levels.map((item, index) => (\n          <span\n            key={item.label}\n            className={cn(\n              \"h-1 rounded-full bg-muted transition-colors motion-reduce:transition-none\",\n              index < strength && item.bar,\n            )}\n          />\n        ))}\n      </div>\n      <span\n        aria-live=\"polite\"\n        className=\"w-16 text-right text-xs whitespace-nowrap text-muted-foreground\"\n      >\n        {level\n          ? formatLabel(labels.passwordStrength, {\n              level: labels[level.label],\n            })\n          : labels.passwordStrengthEmpty}\n      </span>\n    </div>\n  )\n}\n\nexport { Auth06PasswordStrength, getPasswordStrength }\n",
      "type": "registry:component",
      "target": "@components/auth-06/password-strength.tsx"
    },
    {
      "path": "src/registry/blocks/auth-06/progress.tsx",
      "content": "\"use client\"\n\nimport { Steps } from \"@/components/ui/steps/steps\"\nimport { formatLabel, type Auth06Labels } from \"./config\"\n\ntype ProgressItem = {\n  title: string\n  description?: string\n  /** 已跳过：完成后仍显示为未完成 */\n  skipped?: boolean\n}\n\n/**\n * 步骤栏：`lg` 起是纵向步骤（已完成的可以点回去），以下收成一行「步骤 2 / 3 · 资料」加细进度条。\n * 两种形态只显示一种，另一种 display: none，读屏也只读到一份。\n */\nfunction Auth06Progress({\n  labels,\n  items,\n  index,\n  done,\n  locked,\n  onSelect,\n}: {\n  labels: Auth06Labels\n  items: ProgressItem[]\n  /** 当前步骤序号，从 0 开始 */\n  index: number\n  done: boolean\n  /** 提交中或已完成时不允许点回去 */\n  locked: boolean\n  onSelect: (index: number) => void\n}) {\n  const total = items.length\n  const ratio = done ? 1 : (index + 1) / total\n  return (\n    <div data-slot=\"auth-06-progress\">\n      <div data-slot=\"auth-06-progress-compact\" className=\"lg:hidden\">\n        <p\n          aria-live=\"polite\"\n          className=\"text-sm text-muted-foreground tabular-nums\"\n        >\n          {done\n            ? labels.progressDone\n            : formatLabel(labels.progress, {\n                current: index + 1,\n                total,\n                title: items[index]?.title ?? \"\",\n              })}\n        </p>\n        <div\n          aria-hidden=\"true\"\n          className=\"mt-2 h-1 overflow-hidden rounded-full bg-muted\"\n        >\n          <div\n            data-slot=\"auth-06-progress-bar\"\n            className=\"h-full rounded-full bg-primary transition-[width] duration-300 motion-reduce:transition-none\"\n            style={{ width: `${ratio * 100}%` }}\n          />\n        </div>\n      </div>\n      <Steps\n        // 圆点自带 6px 内边距，向左让出，与上方标题左对齐\n        className=\"-ml-1.5 hidden lg:block\"\n        orientation=\"vertical\"\n        items={items.map(({ skipped, ...item }) => ({\n          ...item,\n          status: done ? (skipped ? \"wait\" : \"finish\") : undefined,\n        }))}\n        value={index}\n        clickable={locked ? \"none\" : \"completed\"}\n        labels={{ list: labels.steps }}\n        onValueChange={onSelect}\n      />\n    </div>\n  )\n}\n\nexport { Auth06Progress }\n",
      "type": "registry:component",
      "target": "@components/auth-06/progress.tsx"
    },
    {
      "path": "src/registry/blocks/auth-06/done-panel.tsx",
      "content": "\"use client\"\n\nimport type * as React from \"react\"\nimport { Check, Minus } from \"lucide-react\"\nimport { Button } from \"@/components/ui/button\"\nimport { cn } from \"@/lib/utils\"\nimport type { Auth06Labels } from \"./config\"\n\nfunction DoneItem({\n  done,\n  children,\n  meta,\n}: {\n  done: boolean\n  children: React.ReactNode\n  meta?: React.ReactNode\n}) {\n  return (\n    <li\n      data-slot=\"auth-06-done-item\"\n      data-state={done ? \"done\" : \"pending\"}\n      className=\"flex items-center gap-3 px-3 py-2.5 text-sm\"\n    >\n      <span\n        aria-hidden=\"true\"\n        className={cn(\n          \"flex size-5 shrink-0 items-center justify-center rounded-full [&_svg]:size-3\",\n          done\n            ? \"bg-primary text-primary-foreground\"\n            : \"border border-edge text-muted-foreground\",\n        )}\n      >\n        {done ? <Check strokeWidth={3} /> : <Minus />}\n      </span>\n      <span className=\"min-w-0 flex-1\">{children}</span>\n      {meta && (\n        <span\n          className={cn(\n            \"shrink-0 text-xs\",\n            done ? \"text-muted-foreground\" : \"text-foreground\",\n          )}\n        >\n          {meta}\n        </span>\n      )}\n    </li>\n  )\n}\n\n/** 结果页：列出这次注册完成了什么，实名跳过时那一条标为待完成。 */\nfunction Auth06DonePanel({\n  labels,\n  identity,\n  onEnter,\n}: {\n  labels: Auth06Labels\n  /** `off` 时不列实名这一条 */\n  identity: \"submitted\" | \"pending\" | \"off\"\n  onEnter: () => void\n}) {\n  return (\n    <div data-slot=\"auth-06-done\" className=\"space-y-6\">\n      <ul className=\"divide-y divide-dashed divide-edge rounded-lg border border-edge\">\n        <DoneItem done>{labels.doneAccount}</DoneItem>\n        <DoneItem done>{labels.doneProfile}</DoneItem>\n        {identity !== \"off\" && (\n          <DoneItem\n            done={identity === \"submitted\"}\n            meta={\n              identity === \"submitted\"\n                ? labels.identitySubmitted\n                : labels.identityPending\n            }\n          >\n            {labels.doneIdentity}\n          </DoneItem>\n        )}\n      </ul>\n      <Button\n        type=\"button\"\n        size=\"lg\"\n        className=\"w-full sm:w-auto\"\n        onClick={onEnter}\n      >\n        {labels.enter}\n      </Button>\n    </div>\n  )\n}\n\nexport { Auth06DonePanel }\n",
      "type": "registry:component",
      "target": "@components/auth-06/done-panel.tsx"
    }
  ],
  "cssVars": {
    "theme": {
      "color-edge": "var(--edge)"
    },
    "light": {
      "edge": "color-mix(in oklch, var(--foreground) 12%, transparent)"
    },
    "dark": {
      "edge": "color-mix(in oklch, var(--foreground) 18%, transparent)"
    }
  },
  "meta": {
    "iframeHeight": "860px"
  },
  "type": "registry:block"
}
