{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "careers56",
  "title": "Role Fit Finder",
  "description": "A hiring section that answers three questions instead of listing a job board: the answers land on one open role with its team, its location, and its published pay band, and the photograph beside it changes to the part of the studio that role sits in.",
  "dependencies": [
    "clsx",
    "tailwind-merge",
    "lucide-react"
  ],
  "registryDependencies": [
    "questionnaire",
    "button"
  ],
  "files": [
    {
      "path": "registry/careers56/careers56.tsx",
      "content": "\"use client\";\n\nimport { type FormEvent, useState } from \"react\";\nimport Link from \"next/link\";\nimport { Badge6 } from \"@/components/beste/component/badge6\";\nimport { Button1 } from \"@/components/beste/component/button1\";\nimport {\n  Questionnaire,\n  QuestionnaireActions,\n  QuestionnaireChoice,\n  QuestionnaireChoiceDescription,\n  QuestionnaireChoices,\n  QuestionnaireDescription,\n  QuestionnaireError,\n  QuestionnaireItem,\n  QuestionnaireNext,\n  QuestionnairePrevious,\n  QuestionnaireProgress,\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 RoleImage {\n  src: string;\n  alt: string;\n}\n\ninterface Fact {\n  title: string;\n  value: string;\n}\n\ninterface FitChoice {\n  value: string;\n  label: string;\n  description?: string;\n}\n\ninterface FitQuestion {\n  /** Form field name. Must be unique across the flow. */\n  name: string;\n  title: string;\n  description?: string;\n  choices?: FitChoice[];\n}\n\ninterface Role {\n  /**\n   * Field name to answer value. A role is only matched when every pair fits.\n   * Leave it out on the last role, which is the catch-all.\n   */\n  match?: Record<string, string>;\n  title: string;\n  summary: string;\n  facts?: Fact[];\n  /** Replaces the standing photograph once this role is matched */\n  image?: RoleImage;\n  caption?: string;\n  button?: ActionButton;\n}\n\ninterface Careers56Labels {\n  previous?: string;\n  next?: string;\n  submit?: string;\n  restart?: string;\n  matchTitle?: string;\n}\n\ninterface Careers56Props {\n  badge?: Badge;\n  /** Short line beside the eyebrow, across the hairline divider */\n  meta?: string;\n  heading?: string;\n  description?: string;\n  questions?: FitQuestion[];\n  /** Prints a scoped shortcut on every choice and binds it while the question is active */\n  shortcuts?: \"letters\" | \"numbers\";\n  /** Checked in order; the first one whose `match` fits the answers wins. */\n  roles?: Role[];\n  /** Standing photograph, shown until a role is matched */\n  image?: RoleImage;\n  caption?: string;\n  /** Two bordered cells under the photograph */\n  stats?: Fact[];\n  labels?: Careers56Labels;\n  className?: string;\n}\n\nexport const careers56Demo: Careers56Props = {\n  badge: { label: \"Careers\" },\n  meta: \"Six open roles\",\n  heading: \"Skip the job board and answer three questions\",\n  description:\n    \"Every open role here wants a different kind of week. Tell us what yours looks like and we will name the one that fits, including the pay band, before you write anything.\",\n  shortcuts: \"numbers\",\n  labels: {\n    submit: \"Find my role\",\n    restart: \"Answer again\",\n    matchTitle: \"Closest role\",\n  },\n  image: {\n    src: \"https://images.unsplash.com/photo-1594100165806-939c3fbb5b6a?q=80&w=1747&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n    alt: \"Studio wall covered in pinned work in progress\",\n  },\n  caption: \"Twenty-two people, one floor, and a wall that is never empty.\",\n  stats: [\n    { title: \"Median reply\", value: \"3 days\" },\n    { title: \"Interview rounds\", value: \"Two\" },\n  ],\n  questions: [\n    {\n      name: \"craft\",\n      title: \"What do you want to spend the day doing?\",\n      description: \"The part of the work you would keep if the rest went away.\",\n      choices: [\n        {\n          value: \"build\",\n          label: \"Building the thing\",\n          description: \"Code, performance, and the parts nobody sees.\",\n        },\n        {\n          value: \"design\",\n          label: \"Deciding how it looks\",\n          description: \"Type, systems, and the argument behind both.\",\n        },\n        {\n          value: \"client\",\n          label: \"Holding it together\",\n          description: \"Scope, schedules, and the people paying for it.\",\n        },\n      ],\n    },\n    {\n      name: \"experience\",\n      title: \"How long have you been at it?\",\n      choices: [\n        { value: \"early\", label: \"Under three years\" },\n        { value: \"mid\", label: \"Three to six years\" },\n        { value: \"senior\", label: \"Seven or more\" },\n      ],\n    },\n    {\n      name: \"place\",\n      title: \"Where do you want to work from?\",\n      choices: [\n        { value: \"studio\", label: \"In the studio, most days\" },\n        { value: \"hybrid\", label: \"A couple of days in\" },\n        { value: \"remote\", label: \"Wherever I am\" },\n      ],\n    },\n  ],\n  roles: [\n    {\n      match: { craft: \"build\", experience: \"senior\" },\n      title: \"Engineering lead\",\n      summary:\n        \"You set how the work is built and you still write a good share of it. Two engineers report to you, and the first thing you would inherit is a rebuild already underway.\",\n      facts: [\n        { title: \"Team\", value: \"Engineering, 4 people\" },\n        { title: \"Based\", value: \"Studio or hybrid\" },\n        { title: \"Band\", value: \"£82,000 to £95,000\" },\n        { title: \"Closing\", value: \"End of the month\" },\n      ],\n      image: {\n        src: \"https://images.unsplash.com/photo-1754390754756-16ee0e29cf36?q=80&w=1735&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n        alt: \"Desk with a laptop, notes, and printed schedules\",\n      },\n      caption: \"The engineering corner, where most of the arguing about scope happens.\",\n      button: { label: \"Read the full role\", href: \"https://beste.co\" },\n    },\n    {\n      match: { craft: \"build\" },\n      title: \"Engineer\",\n      summary:\n        \"Front of the stack, on client work, with someone senior in the same room. You would ship something to production in your first fortnight.\",\n      facts: [\n        { title: \"Team\", value: \"Engineering, 4 people\" },\n        { title: \"Based\", value: \"Studio, hybrid, or remote\" },\n        { title: \"Band\", value: \"£54,000 to £68,000\" },\n        { title: \"Closing\", value: \"Rolling\" },\n      ],\n      button: { label: \"Read the full role\", href: \"https://beste.co\" },\n    },\n    {\n      match: { craft: \"design\" },\n      title: \"Designer, brand systems\",\n      summary:\n        \"Identity work that has to survive being handed over. You would own the type, the rules, and the document that stops both from being ignored.\",\n      facts: [\n        { title: \"Team\", value: \"Design, 6 people\" },\n        { title: \"Based\", value: \"Studio, most days\" },\n        { title: \"Band\", value: \"£48,000 to £62,000\" },\n        { title: \"Closing\", value: \"In three weeks\" },\n      ],\n      image: {\n        src: \"https://images.unsplash.com/photo-1583201173319-a4efa99605cf?q=80&w=1674&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n        alt: \"Printed identity material laid out across a table\",\n      },\n      caption: \"Everything the design team makes is printed before it is signed off.\",\n      button: { label: \"Read the full role\", href: \"https://beste.co\" },\n    },\n    {\n      match: { craft: \"client\" },\n      title: \"Producer\",\n      summary:\n        \"You hold the schedule, the budget, and the awkward conversation. Three projects at a time, and the authority to say no to a fourth.\",\n      facts: [\n        { title: \"Team\", value: \"Production, 3 people\" },\n        { title: \"Based\", value: \"Studio or hybrid\" },\n        { title: \"Band\", value: \"£46,000 to £58,000\" },\n        { title: \"Closing\", value: \"End of the month\" },\n      ],\n      image: {\n        src: \"https://images.unsplash.com/photo-1777523743687-233bbfdbd894?q=80&w=2075&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n        alt: \"Two people talking across a studio desk\",\n      },\n      caption: \"Production sits between the studio and everyone who is waiting on it.\",\n      button: { label: \"Read the full role\", href: \"https://beste.co\" },\n    },\n    {\n      title: \"Open application\",\n      summary:\n        \"Nothing on the list matched, which happens. Tell us what you do and what you would want the first six months to look like, and we will read it properly.\",\n      facts: [\n        { title: \"Team\", value: \"Wherever you fit\" },\n        { title: \"Based\", value: \"Tell us\" },\n        { title: \"Band\", value: \"Set against the role\" },\n        { title: \"Closing\", value: \"Always open\" },\n      ],\n      button: { label: \"Write to us\", href: \"https://beste.co\" },\n    },\n  ],\n};\n\nexport function Careers56({\n  badge,\n  meta,\n  heading,\n  description,\n  questions = [],\n  shortcuts,\n  roles = [],\n  image,\n  caption,\n  stats = [],\n  labels = {},\n  className,\n}: Careers56Props) {\n  const {\n    previous: previousLabel,\n    next: nextLabel,\n    submit: submitLabel,\n    restart: restartLabel,\n    matchTitle,\n  } = labels;\n\n  const [role, setRole] = useState<Role | null>(null);\n\n  const handleSubmit = (event: FormEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    const data = new FormData(event.currentTarget);\n    const given: Record<string, string> = {};\n    for (const question of questions) {\n      given[question.name] = String(data.get(question.name) ?? \"\");\n    }\n\n    // The last role stands in when nothing fits, so a submit never dead-ends.\n    const matched = roles.find((entry) =>\n      Object.entries(entry.match ?? {}).every(([name, value]) => given[name] === value)\n    );\n    setRole(matched ?? roles[roles.length - 1] ?? null);\n  };\n\n  const restart = () => setRole(null);\n\n  const shownImage = role?.image ?? image;\n  const shownCaption = role?.caption ?? caption;\n\n  return (\n    <section className={cn(\"w-full py-16 md:py-24\", className)}>\n      <div className=\"mx-auto max-w-6xl px-4 md:px-6\">\n        <div className=\"flex flex-wrap items-center gap-5\">\n          {badge && <Badge6 label={badge.label} />}\n          {badge && meta && <span className=\"h-9 w-px bg-border\" />}\n          {meta && (\n            <span className=\"text-base font-bold uppercase tracking-widest text-muted-foreground\">\n              {meta}\n            </span>\n          )}\n        </div>\n\n        <div className=\"mt-6 border-b\" />\n\n        {heading && (\n          <h2 className=\"mt-10 max-w-3xl text-balance text-3xl font-bold leading-[1.05] tracking-tight text-foreground md:text-5xl\">\n            {heading}\n          </h2>\n        )}\n        {description && (\n          <p className=\"mt-6 max-w-2xl text-lg text-muted-foreground md:text-xl\">{description}</p>\n        )}\n\n        <div className=\"mt-12 grid gap-8 lg:grid-cols-[1fr_1.1fr] lg:gap-12\">\n          <div>\n            <div className=\"relative h-80 overflow-hidden rounded-md border bg-muted lg:h-[30rem]\">\n              {shownImage && (\n                <img\n                  className=\"absolute inset-0 size-full object-cover\"\n                  src={shownImage.src}\n                  alt={shownImage.alt}\n                />\n              )}\n            </div>\n\n            {shownCaption && (\n              <p className=\"mt-4 text-base text-muted-foreground\">{shownCaption}</p>\n            )}\n\n            {stats.length > 0 && (\n              <div className=\"mt-6 grid gap-4 sm:grid-cols-2\">\n                {stats.map((stat, index) => (\n                  <div key={index} className=\"rounded-md border bg-muted p-5\">\n                    <p className=\"text-base font-bold uppercase tracking-widest text-muted-foreground\">\n                      {stat.title}\n                    </p>\n                    <p className=\"mt-2 text-2xl font-bold tracking-tight text-foreground\">\n                      {stat.value}\n                    </p>\n                  </div>\n                ))}\n              </div>\n            )}\n          </div>\n\n          <div>\n            {role ? (\n              <>\n                {matchTitle && (\n                  <p className=\"text-base font-bold uppercase tracking-widest text-muted-foreground\">\n                    {matchTitle}\n                  </p>\n                )}\n                <p className=\"mt-4 text-2xl font-bold tracking-tight text-foreground md:text-3xl\">\n                  {role.title}\n                </p>\n                <p className=\"mt-4 text-lg leading-relaxed text-muted-foreground\">{role.summary}</p>\n\n                {role.facts && role.facts.length > 0 && (\n                  <dl className=\"mt-8 grid gap-4 sm:grid-cols-2\">\n                    {role.facts.map((fact, index) => (\n                      <div key={index} className=\"rounded-md border bg-muted p-5\">\n                        <dt className=\"text-base font-bold uppercase tracking-widest text-muted-foreground\">\n                          {fact.title}\n                        </dt>\n                        <dd className=\"mt-2 text-lg font-bold tracking-tight text-foreground\">\n                          {fact.value}\n                        </dd>\n                      </div>\n                    ))}\n                  </dl>\n                )}\n\n                <div className=\"mt-8 flex flex-wrap items-center gap-5\">\n                  {role.button && (\n                    <Button1 asChild label={role.button.label}>\n                      <Link href={role.button.href} />\n                    </Button1>\n                  )}\n                  <button\n                    type=\"button\"\n                    onClick={restart}\n                    className=\"cursor-pointer text-lg font-bold text-foreground underline underline-offset-4 hover:text-primary\"\n                  >\n                    {restartLabel ?? \"Answer again\"}\n                  </button>\n                </div>\n              </>\n            ) : (\n              <Questionnaire\n                defaultItem={questions[0]?.name}\n                shortcuts={shortcuts}\n                onSubmit={handleSubmit}\n                className=\"gap-6\"\n              >\n                {questions.length > 0 && <QuestionnaireProgress className=\"text-base\" />}\n\n                {questions.map((question, index) => (\n                  <QuestionnaireItem key={index} name={question.name} required>\n                    <QuestionnaireTitle className=\"text-xl font-bold tracking-tight text-foreground md:text-2xl\">\n                      {question.title}\n                    </QuestionnaireTitle>\n                    {question.description && (\n                      <QuestionnaireDescription className=\"text-base text-muted-foreground md:text-lg\">\n                        {question.description}\n                      </QuestionnaireDescription>\n                    )}\n                    <QuestionnaireChoices>\n                      {question.choices?.map((choice, choiceIndex) => (\n                        <QuestionnaireChoice\n                          key={choiceIndex}\n                          value={choice.value}\n                          className=\"rounded-md p-4 text-base data-checked:border-primary\"\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                    </QuestionnaireChoices>\n                    <QuestionnaireError className=\"text-base\" />\n                  </QuestionnaireItem>\n                ))}\n\n                <QuestionnaireActions>\n                  <QuestionnairePrevious className=\"cursor-pointer rounded-md text-base\">\n                    {previousLabel}\n                  </QuestionnairePrevious>\n                  <QuestionnaireNext className=\"cursor-pointer rounded-md text-base\">\n                    {nextLabel}\n                  </QuestionnaireNext>\n                  <QuestionnaireSubmit className=\"cursor-pointer rounded-md text-base\">\n                    {submitLabel}\n                  </QuestionnaireSubmit>\n                </QuestionnaireActions>\n              </Questionnaire>\n            )}\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/block/careers56.tsx"
    },
    {
      "path": "registry-components/badge6/badge6.tsx",
      "content": "import { cn } from \"@/lib/utils\";\n\ntype Tone = \"primary\" | \"foreground\" | \"muted\";\ntype Badge6Orientation = \"horizontal\" | \"vertical\";\n\ninterface Badge6Props {\n  /** Eyebrow label (rendered uppercase) */\n  label: string;\n  /** Accent square color */\n  tone?: Tone;\n  /** Layout: square beside the label (default) or stacked above it */\n  orientation?: Badge6Orientation;\n  /** Override the label classes, e.g. \"text-background/70\" on dark surfaces */\n  labelClassName?: string;\n  /** Additional classes merged onto the root */\n  className?: string;\n}\n\nconst toneStyles: Record<Tone, string> = {\n  primary: \"bg-primary\",\n  foreground: \"bg-foreground\",\n  muted: \"bg-muted-foreground\",\n};\n\nexport const badge6Demo: Badge6Props = {\n  label: \"About Us\",\n};\n\nexport function Badge6({\n  label,\n  tone = \"primary\",\n  orientation = \"horizontal\",\n  labelClassName,\n  className,\n}: Badge6Props) {\n  const vertical = orientation === \"vertical\";\n\n  return (\n    <div className={cn(\"flex\", vertical ? \"flex-col gap-3\" : \"items-center gap-2.5\", className)}>\n      <span className={cn(\"size-2.5 shrink-0\", toneStyles[tone])} />\n      <span\n        className={cn(\n          \"text-base font-bold uppercase tracking-widest text-muted-foreground\",\n          vertical && \"leading-tight\",\n          labelClassName\n        )}\n      >\n        {label}\n      </span>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/component/badge6.tsx"
    },
    {
      "path": "registry-components/button1/button1.tsx",
      "content": "\"use client\";\n\nimport { ArrowRight, type LucideIcon } from \"lucide-react\";\nimport * as React from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\ntype Tone = \"dark\" | \"primary\";\n\ninterface Button1Props {\n  /** Button label */\n  label: string;\n  /**\n   * Compose the rendered element shadcn-style (radix asChild):\n   * `<Button1 asChild label=\"Read More\"><Link href=\"/x\" /></Button1>`\n   * The child element receives the pill content (label + seal) as its\n   * children, so pass it without children of its own.\n   */\n  asChild?: boolean;\n  /** The element to render when `asChild` is set (e.g. your router'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  /** Trailing seal icon (defaults to ArrowRight) */\n  icon?: LucideIcon;\n  /** Surface tone: dark pill (default) or primary pill (for dark backgrounds) */\n  tone?: Tone;\n  /** Fully round the pill and seal (shorthand for className=\"rounded-full\") */\n  roundedFull?: boolean;\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-primary text-primary-foreground\",\n  },\n  primary: {\n    pill: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n    seal: \"bg-primary-foreground text-primary\",\n  },\n};\n\nexport const button1Demo: Button1Props = {\n  label: \"Read More\",\n};\n\nexport function Button1({\n  label,\n  asChild = false,\n  children,\n  href,\n  icon: Icon = ArrowRight,\n  tone = \"dark\",\n  roundedFull = false,\n  onClick,\n  className,\n}: Button1Props) {\n  const styles = toneStyles[tone];\n\n  // Mirror the pill's border radius onto the seal so the arrow chip always\n  // matches the pill. Priority: an explicit `rounded-*` in className wins,\n  // then the `roundedFull` shorthand, otherwise the default rounded-md.\n  const explicitRadius = className?.match(/\\brounded-(?:none|sm|md|lg|xl|2xl|3xl|full)\\b/)?.[0];\n  const sealRadius = explicitRadius ?? (roundedFull ? \"rounded-full\" : \"rounded-md\");\n\n  const inner = (\n    <>\n      {label}\n      <span\n        className={cn(\n          \"flex size-8 items-center justify-center transition-transform motion-safe:group-hover/button1:translate-x-0.5\",\n          sealRadius,\n          styles.seal\n        )}\n      >\n        <Icon className=\"size-4\" />\n      </span>\n    </>\n  );\n\n  const classes = cn(\n    // justify-between keeps the label left and the seal pinned right when the\n    // pill is full-width; at w-fit there's no free space so they stay together.\n    \"group/button1 h-auto w-fit justify-between gap-3 rounded-md py-3 pl-6 pr-3 text-base font-bold transition-colors\",\n    roundedFull && \"rounded-full\",\n    styles.pill,\n    className\n  );\n\n  if (asChild && React.isValidElement(children)) {\n    // The consumer's element (e.g. next/link's <Link href>) becomes the\n    // rendered element; the pill content is injected as its children.\n    return (\n      <Button asChild className={classes}>\n        {React.cloneElement(children, undefined, inner)}\n      </Button>\n    );\n  }\n\n  if (href) {\n    return (\n      <Button asChild className={classes}>\n        <a href={href}>{inner}</a>\n      </Button>\n    );\n  }\n\n  return (\n    <Button type=\"button\" className={classes} onClick={onClick}>\n      {inner}\n    </Button>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/component/button1.tsx"
    }
  ],
  "type": "registry:block"
}