{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "onboarding43",
  "title": "Guided Workspace Setup",
  "description": "A two-column setup section: the pitch and what each answer changes on the left, and a one-question-at-a-time wizard on the right that ends in a review of everything it is about to create.",
  "dependencies": [
    "clsx",
    "tailwind-merge",
    "lucide-react",
    "@radix-ui/react-slot"
  ],
  "registryDependencies": [
    "questionnaire"
  ],
  "files": [
    {
      "path": "registry/onboarding43/onboarding43.tsx",
      "content": "\"use client\";\n\nimport { CheckCircle2, RotateCcw } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { type FormEvent, useState } from \"react\";\nimport { Badge7 } from \"@/components/beste/component/badge7\";\nimport { Button12 } from \"@/components/beste/component/button12\";\nimport {\n  Questionnaire,\n  QuestionnaireActions,\n  QuestionnaireChoice,\n  QuestionnaireChoiceDescription,\n  QuestionnaireChoices,\n  QuestionnaireDescription,\n  QuestionnaireError,\n  QuestionnaireInput,\n  QuestionnaireItem,\n  QuestionnaireNext,\n  QuestionnairePrevious,\n  QuestionnaireProgress,\n  QuestionnaireSkip,\n  QuestionnaireSubmit,\n  QuestionnaireTitle,\n} from \"@/components/ui/questionnaire\";\nimport { cn } from \"@/lib/utils\";\n\ninterface Badge {\n  label: string;\n}\n\ninterface ActionButton {\n  label: string;\n  href: string;\n}\n\ninterface SetupPoint {\n  title: string;\n  description: string;\n}\n\ninterface WizardChoice {\n  value: string;\n  label: string;\n  description?: string;\n}\n\ninterface WizardStep {\n  /** Form field name. Must be unique across the flow. */\n  name: string;\n  title: string;\n  description?: string;\n  choices?: WizardChoice[];\n  /** Free-text escape hatch rendered under the fixed choices */\n  input?: { label: string; placeholder?: string };\n  /** Blocks Next and hides Skip until the step is answered */\n  required?: boolean;\n  /** Renders the choices as checkboxes instead of radios */\n  multiple?: boolean;\n}\n\ninterface WizardLabels {\n  previous?: string;\n  skip?: string;\n  next?: string;\n  submit?: string;\n  restart?: string;\n}\n\ninterface WizardSummary {\n  title?: string;\n  description?: string;\n  /** Stands in for a step that was skipped or left blank */\n  emptyLabel?: string;\n}\n\ninterface Onboarding43Props {\n  badge?: Badge;\n  heading?: string;\n  description?: string;\n  points?: SetupPoint[];\n  note?: string;\n  button?: ActionButton;\n  wizardHeading?: string;\n  wizardDescription?: string;\n  steps?: WizardStep[];\n  /** Prints a scoped shortcut on every choice and binds it while the step is active */\n  shortcuts?: \"letters\" | \"numbers\";\n  /** The bar and the \"Question n of m\" line above the active step */\n  showProgress?: boolean;\n  labels?: WizardLabels;\n  /** The panel that replaces the flow once it is submitted */\n  summary?: WizardSummary;\n  className?: string;\n}\n\nexport const onboarding43Demo: Onboarding43Props = {\n  badge: { label: \"Setup\" },\n  heading: \"Four questions, then your workspace is ready\",\n  description:\n    \"Nothing here is permanent. Every answer maps to a setting you can change later, and skipping one just leaves the default in place.\",\n  points: [\n    {\n      title: \"One question at a time\",\n      description:\n        \"The whole form is one field wide, so there is never a screen of empty inputs waiting for you.\",\n    },\n    {\n      title: \"Answers become settings\",\n      description:\n        \"Your role picks the home screen, the tools you choose are the first integrations we connect.\",\n    },\n    {\n      title: \"Nothing is locked in\",\n      description:\n        \"The summary at the end lists what we are about to create, and every line of it stays editable.\",\n    },\n  ],\n  note: \"Takes about a minute. You can leave and pick it up from the same question.\",\n  button: { label: \"See what each answer changes\", href: \"https://beste.co\" },\n  wizardHeading: \"Set up your workspace\",\n  wizardDescription: \"Press a number key to answer without reaching for the mouse.\",\n  shortcuts: \"numbers\",\n  labels: { submit: \"Create workspace\", restart: \"Start over\" },\n  summary: {\n    title: \"Workspace ready\",\n    description: \"Here is what we will start you on. Everything stays editable in settings.\",\n    emptyLabel: \"Skipped\",\n  },\n  steps: [\n    {\n      name: \"role\",\n      title: \"What do you do most days?\",\n      description: \"This picks the home screen you land on.\",\n      required: true,\n      choices: [\n        { value: \"engineering\", label: \"Engineering\", description: \"Ship, review, and deploy.\" },\n        { value: \"design\", label: \"Design\", description: \"Files, handoff, and feedback.\" },\n        { value: \"operations\", label: \"Operations\", description: \"Numbers, reports, and access.\" },\n      ],\n    },\n    {\n      name: \"team-size\",\n      title: \"How many people will use this workspace?\",\n      required: true,\n      choices: [\n        { value: \"1\", label: \"Just me\" },\n        { value: \"2-10\", label: \"2 to 10\" },\n        { value: \"11-50\", label: \"11 to 50\" },\n        { value: \"51+\", label: \"More than 50\" },\n      ],\n    },\n    {\n      name: \"tools\",\n      title: \"What should we connect first?\",\n      description: \"Pick as many as you like. You can add the rest later.\",\n      multiple: true,\n      choices: [\n        { value: \"github\", label: \"GitHub\", description: \"Pull requests and deploy status.\" },\n        { value: \"slack\", label: \"Slack\", description: \"Alerts in the channel you choose.\" },\n        { value: \"figma\", label: \"Figma\", description: \"Frames pinned next to the issue.\" },\n        { value: \"linear\", label: \"Linear\", description: \"Two-way issue sync.\" },\n      ],\n    },\n    {\n      name: \"goal\",\n      title: \"What would make the first week a success?\",\n      description: \"Optional, and it goes straight to the person setting you up.\",\n      input: { label: \"Your goal\", placeholder: \"Cut our release checklist in half...\" },\n    },\n  ],\n};\n\nexport function Onboarding43({\n  badge,\n  heading,\n  description,\n  points = [],\n  note,\n  button,\n  wizardHeading,\n  wizardDescription,\n  steps = [],\n  shortcuts,\n  showProgress = true,\n  labels = {},\n  summary = {},\n  className,\n}: Onboarding43Props) {\n  const {\n    previous: previousLabel,\n    skip: skipLabel,\n    next: nextLabel,\n    submit: submitLabel,\n    restart: restartLabel,\n  } = labels;\n  const { title: summaryTitle, description: summaryDescription, emptyLabel } = summary;\n\n  const [answers, setAnswers] = useState<Record<string, string[]> | null>(null);\n  /**\n   * Only observed, never enforced: the flow stays uncontrolled so the primitive\n   * keeps owning navigation, and this is here purely to draw the bar.\n   */\n  const [activeName, setActiveName] = useState(steps[0]?.name);\n\n  const activeIndex = Math.max(\n    0,\n    steps.findIndex((step) => step.name === activeName)\n  );\n  const percent = steps.length > 0 ? ((activeIndex + 1) / steps.length) * 100 : 0;\n\n  const handleSubmit = (event: FormEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    const data = new FormData(event.currentTarget);\n    const collected: Record<string, string[]> = {};\n    for (const step of steps) {\n      collected[step.name] = data\n        .getAll(step.name)\n        .map((entry) => String(entry).trim())\n        .filter((entry) => entry.length > 0);\n    }\n    setAnswers(collected);\n  };\n\n  const restart = () => {\n    setAnswers(null);\n    setActiveName(steps[0]?.name);\n  };\n\n  /** A stored value is a choice value first, and whatever was typed otherwise. */\n  const readable = (step: WizardStep, value: string) =>\n    step.choices?.find((choice) => choice.value === value)?.label ?? value;\n\n  return (\n    <section className={cn(\"w-full py-16 md:py-24\", className)}>\n      <div className=\"mx-auto max-w-7xl px-4 md:px-6\">\n        <div className=\"grid gap-12 lg:grid-cols-2 lg:items-start lg:gap-20\">\n          <div>\n            {badge && <Badge7 label={badge.label} />}\n            {heading && (\n              <h2 className=\"mt-6 max-w-xl text-balance text-3xl font-bold leading-tight tracking-tight text-foreground md:text-4xl lg:text-5xl\">\n                {heading}\n              </h2>\n            )}\n            {description && (\n              <p className=\"mt-6 max-w-md text-lg leading-relaxed text-muted-foreground md:text-xl\">\n                {description}\n              </p>\n            )}\n\n            {(note || button) && (\n              <div className=\"mt-10 border-t border-current/10 pt-8\">\n                {note && <p className=\"max-w-md text-lg text-muted-foreground\">{note}</p>}\n                {button && (\n                  <div className=\"mt-6\">\n                    <Button12 asChild label={button.label} tone=\"outline\">\n                      <Link href={button.href} />\n                    </Button12>\n                  </div>\n                )}\n              </div>\n            )}\n          </div>\n\n          <div className=\"w-full\">\n            {answers ? (\n              <>\n                <div className=\"flex items-start gap-4\">\n                  <CheckCircle2 className=\"mt-1 size-6 shrink-0 text-foreground\" />\n                  <div className=\"min-w-0\">\n                    <p className=\"text-xl font-bold tracking-tight text-foreground md:text-2xl\">\n                      {summaryTitle ?? \"All set\"}\n                    </p>\n                    {summaryDescription && (\n                      <p className=\"mt-3 text-lg leading-relaxed text-muted-foreground\">\n                        {summaryDescription}\n                      </p>\n                    )}\n                  </div>\n                </div>\n\n                <dl className=\"mt-8 flex flex-col\">\n                  {steps.map((step, index) => {\n                    const given = answers[step.name] ?? [];\n                    return (\n                      <div\n                        key={index}\n                        className=\"grid gap-1 border-t border-current/10 py-5 sm:grid-cols-[minmax(0,1fr)_minmax(0,1.2fr)] sm:gap-6\"\n                      >\n                        <dt className=\"text-base text-muted-foreground md:text-lg\">{step.title}</dt>\n                        <dd className=\"text-base font-bold text-foreground md:text-lg\">\n                          {given.length > 0\n                            ? given.map((value) => readable(step, value)).join(\", \")\n                            : (emptyLabel ?? \"Skipped\")}\n                        </dd>\n                      </div>\n                    );\n                  })}\n                </dl>\n\n                <div className=\"mt-8\">\n                  <Button12\n                    label={restartLabel ?? \"Start over\"}\n                    tone=\"outline\"\n                    icon={RotateCcw}\n                    onClick={restart}\n                  />\n                </div>\n              </>\n            ) : (\n              <>\n                {(wizardHeading || wizardDescription) && (\n                  <div className=\"mb-8\">\n                    {wizardHeading && (\n                      <p className=\"text-xl font-bold tracking-tight text-foreground md:text-2xl\">\n                        {wizardHeading}\n                      </p>\n                    )}\n                    {wizardDescription && (\n                      <p className=\"mt-3 text-lg leading-relaxed text-muted-foreground\">\n                        {wizardDescription}\n                      </p>\n                    )}\n                  </div>\n                )}\n\n                <Questionnaire\n                  defaultItem={steps[0]?.name}\n                  onItemChange={setActiveName}\n                  shortcuts={shortcuts}\n                  onSubmit={handleSubmit}\n                  className=\"gap-6\"\n                >\n                  {showProgress && steps.length > 0 && (\n                    <div className=\"flex flex-col gap-3\">\n                      <QuestionnaireProgress className=\"text-base\" />\n                      <div className=\"h-1 w-full overflow-hidden rounded-full bg-current/10\">\n                        <div\n                          className=\"h-full rounded-full bg-foreground transition-all duration-300\"\n                          style={{ width: `${percent}%` }}\n                        />\n                      </div>\n                    </div>\n                  )}\n\n                  {steps.map((step, index) => (\n                    <QuestionnaireItem\n                      key={index}\n                      name={step.name}\n                      required={step.required}\n                      multiple={step.multiple}\n                    >\n                      <QuestionnaireTitle className=\"text-xl font-bold tracking-tight text-foreground md:text-2xl\">\n                        {step.title}\n                      </QuestionnaireTitle>\n                      {step.description && (\n                        <QuestionnaireDescription className=\"text-base text-muted-foreground md:text-lg\">\n                          {step.description}\n                        </QuestionnaireDescription>\n                      )}\n                      <QuestionnaireChoices>\n                        {step.choices?.map((choice, choiceIndex) => (\n                          <QuestionnaireChoice\n                            key={choiceIndex}\n                            value={choice.value}\n                            className=\"rounded-md p-4 text-base data-checked:border-foreground\"\n                          >\n                            <span className=\"font-bold text-foreground\">{choice.label}</span>\n                            {choice.description && (\n                              <QuestionnaireChoiceDescription className=\"text-base\">\n                                {choice.description}\n                              </QuestionnaireChoiceDescription>\n                            )}\n                          </QuestionnaireChoice>\n                        ))}\n                        {step.input && (\n                          <QuestionnaireInput\n                            aria-label={step.input.label}\n                            placeholder={step.input.placeholder}\n                            className=\"h-11 rounded-md px-4 text-base md:text-base\"\n                          />\n                        )}\n                      </QuestionnaireChoices>\n                      <QuestionnaireError className=\"text-base\" />\n                    </QuestionnaireItem>\n                  ))}\n\n                  <QuestionnaireActions>\n                    <QuestionnairePrevious className=\"cursor-pointer rounded-full text-base\">\n                      {previousLabel}\n                    </QuestionnairePrevious>\n                    <QuestionnaireSkip className=\"cursor-pointer rounded-full text-base\">\n                      {skipLabel}\n                    </QuestionnaireSkip>\n                    <QuestionnaireNext className=\"cursor-pointer rounded-full bg-foreground text-base text-background hover:bg-foreground/90\">\n                      {nextLabel}\n                    </QuestionnaireNext>\n                    <QuestionnaireSubmit className=\"cursor-pointer rounded-full bg-foreground text-base text-background hover:bg-foreground/90\">\n                      {submitLabel}\n                    </QuestionnaireSubmit>\n                  </QuestionnaireActions>\n                </Questionnaire>\n              </>\n            )}\n          </div>\n        </div>\n\n        {points.length > 0 && (\n          <div className=\"mt-16 grid gap-8 md:grid-cols-3 md:gap-12\">\n            {points.map((point, index) => (\n              <div key={index} className=\"border-t border-current/10 pt-6\">\n                <p className=\"text-xl font-bold tracking-tight text-foreground md:text-2xl\">\n                  {point.title}\n                </p>\n                <p className=\"mt-3 text-lg leading-relaxed text-muted-foreground\">\n                  {point.description}\n                </p>\n              </div>\n            ))}\n          </div>\n        )}\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/block/onboarding43.tsx"
    },
    {
      "path": "registry-components/badge7/badge7.tsx",
      "content": "import { cn } from \"@/lib/utils\";\n\n/** Allowed wrapper styles, a fixed set, not arbitrary characters. */\ntype Badge7Bracket = \"round\" | \"square\" | \"curly\" | \"angle\" | \"none\";\n\nconst BRACKETS: Record<Badge7Bracket, [open: string, close: string]> = {\n  round: [\"(\", \")\"],\n  square: [\"[\", \"]\"],\n  curly: [\"{\", \"}\"],\n  angle: [\"<\", \">\"],\n  none: [\"\", \"\"],\n};\n\ntype Tone = \"muted\" | \"foreground\" | \"primary\";\n\ninterface Badge7Props {\n  /** Eyebrow label */\n  label: string;\n  /** Which characters wrap the label. Limited to the BRACKETS set. */\n  bracket?: Badge7Bracket;\n  /** Label color */\n  tone?: Tone;\n  /** Render rotated for vertical edge placement (e.g. along a hero side) */\n  vertical?: boolean;\n  /** Additional classes merged onto the root */\n  className?: string;\n}\n\nconst toneStyles: Record<Tone, string> = {\n  muted: \"text-muted-foreground\",\n  foreground: \"text-foreground\",\n  primary: \"text-primary\",\n};\n\nexport const badge7Demo: Badge7Props = {\n  label: \"About\",\n};\n\nexport function Badge7({\n  label,\n  bracket = \"round\",\n  tone = \"muted\",\n  vertical = false,\n  className,\n}: Badge7Props) {\n  const [open, close] = BRACKETS[bracket];\n\n  return (\n    <span\n      className={cn(\n        \"text-base font-medium\",\n        toneStyles[tone],\n        vertical ? \"rotate-180 [writing-mode:vertical-rl]\" : \"inline-block\",\n        className\n      )}\n    >\n      {`${open}${label}${close}`}\n    </span>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/component/badge7.tsx"
    },
    {
      "path": "registry-components/button12/button12.tsx",
      "content": "\"use client\";\n\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { ArrowUpRight, type LucideIcon } from \"lucide-react\";\nimport * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\ntype Tone = \"dark\" | \"primary\" | \"outline\";\n\ninterface Button12Props {\n  /** Button label */\n  label: string;\n  /**\n   * Compose the rendered element shadcn-style (radix asChild): your element\n   * (e.g. a router Link) becomes the root and the button content is injected\n   * as its children. Pass the element without children of its own.\n   */\n  asChild?: boolean;\n  /** The element to render when `asChild` is set (e.g. your framework's Link) */\n  children?: React.ReactElement;\n  /**\n   * Fallback link: renders a plain `<a>`. Prefer `asChild` with your\n   * framework's Link component for client-side navigation.\n   */\n  href?: string;\n  /** Seal icon (defaults to ArrowUpRight) */\n  icon?: LucideIcon;\n  /** Surface tone: solid dark (default), solid primary, or bordered outline */\n  tone?: Tone;\n  /** Click handler (used when there is no href and no asChild) */\n  onClick?: React.MouseEventHandler<HTMLButtonElement>;\n  /** Additional classes merged onto the button */\n  className?: string;\n}\n\nconst toneStyles: Record<Tone, { pill: string; seal: string }> = {\n  dark: {\n    pill: \"bg-foreground text-background hover:bg-foreground/90\",\n    seal: \"bg-background text-foreground\",\n  },\n  primary: {\n    pill: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n    seal: \"bg-primary-foreground text-primary\",\n  },\n  outline: {\n    pill: \"border bg-background text-foreground hover:bg-muted\",\n    seal: \"bg-foreground text-background\",\n  },\n};\n\nexport const button12Demo: Button12Props = {\n  label: \"Book an intro call\",\n};\n\nexport function Button12({\n  label,\n  asChild = false,\n  children,\n  href,\n  icon: Icon = ArrowUpRight,\n  tone = \"dark\",\n  onClick,\n  className,\n}: Button12Props) {\n  const styles = toneStyles[tone];\n\n  const classes = cn(\n    \"group/button12 inline-flex w-fit cursor-pointer items-center gap-3 rounded-full py-2 pl-8 pr-2 text-base font-bold transition-colors\",\n    styles.pill,\n    className\n  );\n\n  const inner = (\n    <>\n      {/* Label slides out the bottom while a copy drops in from the top */}\n      <span className=\"relative block overflow-hidden\">\n        <span className=\"block transition-transform duration-300 ease-out motion-safe:group-hover/button12:translate-y-full\">\n          {label}\n        </span>\n        <span\n          aria-hidden=\"true\"\n          className=\"absolute inset-0 block -translate-y-full transition-transform duration-300 ease-out motion-safe:group-hover/button12:translate-y-0\"\n        >\n          {label}\n        </span>\n      </span>\n\n      {/* Seal: icon exits the top-right corner as a copy enters from bottom-left */}\n      <span\n        className={cn(\n          \"relative flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-full\",\n          styles.seal\n        )}\n      >\n        <Icon className=\"size-4 transition-transform duration-300 ease-out motion-safe:group-hover/button12:translate-x-[160%] motion-safe:group-hover/button12:-translate-y-[160%]\" />\n        <Icon\n          aria-hidden=\"true\"\n          className=\"absolute size-4 -translate-x-[160%] translate-y-[160%] transition-transform duration-300 ease-out motion-safe:group-hover/button12:translate-x-0 motion-safe:group-hover/button12:translate-y-0\"\n        />\n      </span>\n    </>\n  );\n\n  if (asChild && React.isValidElement(children)) {\n    return (\n      <Slot className={classes}>\n        {React.cloneElement(children, undefined, inner)}\n      </Slot>\n    );\n  }\n\n  if (href) {\n    return (\n      <a href={href} className={classes}>\n        {inner}\n      </a>\n    );\n  }\n\n  return (\n    <button type=\"button\" onClick={onClick} className={classes}>\n      {inner}\n    </button>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/component/button12.tsx"
    }
  ],
  "type": "registry:block"
}