{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "workflow55",
  "title": "Process Weight Spectrum",
  "description": "A process sizer that answers with a position rather than a verdict: a photographic band opens the section, four weighted questions sit beside an avatar cluster of the people a heavier answer pulls in, they add up to a score, and the band that score falls in takes the page over with its title, its summary, and the practices it asks for.",
  "dependencies": [
    "clsx",
    "tailwind-merge",
    "lucide-react"
  ],
  "registryDependencies": [
    "questionnaire",
    "avatar",
    "button"
  ],
  "files": [
    {
      "path": "registry/workflow55/workflow55.tsx",
      "content": "\"use client\";\n\nimport Link from \"next/link\";\nimport { type FormEvent, type ReactNode, useState } from \"react\";\nimport { Badge6 } from \"@/components/beste/component/badge6\";\nimport { Button1 } from \"@/components/beste/component/button1\";\nimport { Socialproof24 } from \"@/components/beste/piece/socialproof24\";\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 BandImage {\n  src: string;\n  alt: string;\n}\n\ninterface WeightChoice {\n  value: string;\n  label: string;\n  description?: string;\n  /** Added to the score. The highest weight in each question sets the ceiling. */\n  weight: number;\n}\n\ninterface WeightQuestion {\n  /** Form field name. Must be unique across the flow. */\n  name: string;\n  title: string;\n  description?: string;\n  choices?: WeightChoice[];\n}\n\ninterface Band {\n  /** Upper edge of this band as a percent. Bands are read in order. */\n  upTo: number;\n  title: string;\n  summary: string;\n  /** What this band actually asks a team to do */\n  practices?: string[];\n  image?: BandImage;\n  button?: ActionButton;\n}\n\ninterface Aside {\n  title?: string;\n  note?: string;\n  /** Piece shown in the banner beside the questions */\n  media?: ReactNode;\n}\n\ninterface Workflow55Labels {\n  previous?: string;\n  next?: string;\n  submit?: string;\n  restart?: string;\n  railTitle?: string;\n  scoreLabel?: string;\n  practicesTitle?: string;\n}\n\ninterface Workflow55Props {\n  badge?: Badge;\n  /** Short line beside the eyebrow, across the hairline divider */\n  meta?: string;\n  heading?: string;\n  description?: string;\n  questions?: WeightQuestion[];\n  /** Prints a scoped shortcut on every choice and binds it while the question is active */\n  shortcuts?: \"letters\" | \"numbers\";\n  /** Read in order; the first band whose `upTo` covers the score wins. */\n  bands?: Band[];\n  /** Band across the top, shown until the score is placed */\n  image?: BandImage;\n  /** Small banner beside the questions, so the column is not empty while answering */\n  aside?: Aside;\n  labels?: Workflow55Labels;\n  className?: string;\n}\n\nexport const workflow55Demo: Workflow55Props = {\n  badge: { label: \"How much process\" },\n  meta: \"Four questions\",\n  heading: \"Most teams are running the wrong amount of process\",\n  description:\n    \"Not too much or too little in general, just the wrong amount for this piece of work. Four questions put you somewhere on the line, and the line has an honest bottom end.\",\n  shortcuts: \"numbers\",\n  image: {\n    src: \"https://images.unsplash.com/photo-1777873106116-4f29e3988626?q=80&w=1887&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n    alt: \"Empty meeting room with chairs pulled back\",\n  },\n  aside: {\n    title: \"Who it ends up involving\",\n    note: \"Every rung up the scale adds a name that has to say yes before the work can move.\",\n    media: (\n      <Socialproof24\n        items={[\n          {\n            src: \"https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=160&h=160&fit=crop\",\n            alt: \"Portrait of the engineer writing the change\",\n          },\n          {\n            src: \"https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=160&h=160&fit=crop\",\n            alt: \"Portrait of the reviewer on the same team\",\n          },\n          {\n            src: \"https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=160&h=160&fit=crop\",\n            alt: \"Portrait of the approver from the platform team\",\n            name: \"Waiting on Dana\",\n          },\n          {\n            src: \"https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=160&h=160&fit=crop\",\n            alt: \"Portrait of the person who has to be told afterwards\",\n          },\n        ]}\n      />\n    ),\n  },\n  labels: {\n    submit: \"Place me on the line\",\n    restart: \"Answer again\",\n    railTitle: \"How much process this needs\",\n    scoreLabel: \"on the line\",\n    practicesTitle: \"What that actually means\",\n  },\n  questions: [\n    {\n      name: \"blast\",\n      title: \"If this goes wrong on a Friday, who notices?\",\n      description: \"The honest blast radius, not the one in the risk register.\",\n      choices: [\n        { value: \"team\", label: \"The team, and nobody else\", weight: 0 },\n        { value: \"company\", label: \"The rest of the company\", weight: 2 },\n        { value: \"customers\", label: \"Paying customers, immediately\", weight: 4 },\n      ],\n    },\n    {\n      name: \"reverse\",\n      title: \"How hard is it to undo?\",\n      choices: [\n        { value: \"easy\", label: \"One command, under a minute\", weight: 0 },\n        { value: \"awkward\", label: \"A morning of work and an apology\", weight: 2 },\n        { value: \"never\", label: \"It cannot be undone\", weight: 4 },\n      ],\n    },\n    {\n      name: \"people\",\n      title: \"How many people have to agree?\",\n      choices: [\n        { value: \"one\", label: \"One, and they are writing it\", weight: 0 },\n        { value: \"few\", label: \"Two or three in the same team\", weight: 1 },\n        { value: \"many\", label: \"Several teams, plus somebody senior\", weight: 3 },\n      ],\n    },\n    {\n      name: \"rules\",\n      title: \"Is anybody outside the company allowed to ask about it?\",\n      description: \"Auditors, regulators, or a customer with a contract clause.\",\n      choices: [\n        { value: \"no\", label: \"No\", weight: 0 },\n        { value: \"maybe\", label: \"In theory, never in practice\", weight: 1 },\n        { value: \"yes\", label: \"Yes, and they do\", weight: 4 },\n      ],\n    },\n  ],\n  bands: [\n    {\n      upTo: 20,\n      title: \"Just ship it\",\n      summary:\n        \"Nothing here justifies a process. A review board on this work would cost more than the mistake it is meant to prevent.\",\n      practices: [\n        \"One person writes it and one person looks at it\",\n        \"No document, no ticket, no meeting\",\n        \"Fix forward rather than plan around failure\",\n      ],\n      image: {\n        src: \"https://images.unsplash.com/photo-1505236858219-8359eb29e329?w=1200&h=1000&fit=crop\",\n        alt: \"Single desk with a laptop and a notebook\",\n      },\n      button: { label: \"See the lightweight kit\", href: \"https://beste.co\" },\n    },\n    {\n      upTo: 45,\n      title: \"Light checkpoints\",\n      summary:\n        \"Enough at stake to write things down, not enough to stop and gather people. Two checkpoints, both asynchronous.\",\n      practices: [\n        \"A one-page note before, a one-page note after\",\n        \"A named reviewer rather than a committee\",\n        \"Rollback rehearsed once, not documented three times\",\n      ],\n      image: {\n        src: \"https://images.unsplash.com/photo-1524178232363-1fb2b075b655?w=1200&h=1000&fit=crop\",\n        alt: \"Two people reviewing work on a shared screen\",\n      },\n      button: { label: \"See the checkpoint template\", href: \"https://beste.co\" },\n    },\n    {\n      upTo: 70,\n      title: \"Staged review\",\n      summary:\n        \"Several teams and a change that is awkward to reverse. Stage it, and let each stage prove the next one is safe.\",\n      practices: [\n        \"Three stages with a named owner and an exit condition each\",\n        \"A dry run against production data before the first stage\",\n        \"One meeting, at the start, with everyone who can say no\",\n      ],\n      image: {\n        src: \"https://images.unsplash.com/photo-1540575467063-178a50c2df87?w=1200&h=1000&fit=crop\",\n        alt: \"Small team standing around a table mid-discussion\",\n      },\n      button: { label: \"See the staging plan\", href: \"https://beste.co\" },\n    },\n    {\n      upTo: 100,\n      title: \"Full change control\",\n      summary:\n        \"Irreversible, externally visible, and somebody outside the company is entitled to ask how it was done. This is the one case where the paperwork is the cheap part.\",\n      practices: [\n        \"Written change request, approved before any work starts\",\n        \"Evidence captured as it happens rather than reconstructed after\",\n        \"A rehearsed rollback, signed off by somebody who did not write it\",\n      ],\n      image: {\n        src: \"https://images.unsplash.com/photo-1497366216548-37526070297c?w=1200&h=1000&fit=crop\",\n        alt: \"Empty meeting room with chairs pulled back\",\n      },\n      button: { label: \"See the change control pack\", href: \"https://beste.co\" },\n    },\n  ],\n};\n\nexport function Workflow55({\n  badge,\n  meta,\n  heading,\n  description,\n  questions = [],\n  shortcuts,\n  bands = [],\n  image,\n  aside,\n  labels = {},\n  className,\n}: Workflow55Props) {\n  const {\n    previous: previousLabel,\n    next: nextLabel,\n    submit: submitLabel,\n    restart: restartLabel,\n    railTitle,\n    scoreLabel,\n    practicesTitle,\n  } = labels;\n\n  const [percent, setPercent] = useState<number | null>(null);\n\n  /** The ceiling is the heaviest answer to every question, so the rail is always full scale. */\n  const ceiling = questions.reduce(\n    (sum, question) =>\n      sum + Math.max(0, ...(question.choices ?? []).map((choice) => choice.weight)),\n    0\n  );\n\n  const handleSubmit = (event: FormEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    const data = new FormData(event.currentTarget);\n\n    let score = 0;\n    for (const question of questions) {\n      const value = String(data.get(question.name) ?? \"\");\n      const choice = question.choices?.find((entry) => entry.value === value);\n      score += choice?.weight ?? 0;\n    }\n\n    setPercent(ceiling > 0 ? Math.round((score / ceiling) * 100) : 0);\n  };\n\n  const restart = () => setPercent(null);\n\n  const band =\n    percent === null ? undefined : (bands.find((entry) => percent <= entry.upTo) ?? bands.at(-1));\n\n  const shownImage = band?.image ?? image;\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        <div className=\"relative mt-12 h-64 overflow-hidden rounded-md bg-muted md:h-[26rem]\">\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        {percent === null ? (\n          <div className=\"mt-12 grid gap-10 lg:grid-cols-[1.2fr_1fr] lg:gap-16\">\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            {aside && (\n              <div>\n                {aside.title && (\n                  <p className=\"text-base font-bold uppercase tracking-widest text-muted-foreground\">\n                    {aside.title}\n                  </p>\n                )}\n                {aside.media && (\n                  <div className=\"mt-6 flex min-h-56 items-center justify-center rounded-md border\">\n                    {aside.media}\n                  </div>\n                )}\n                {aside.note && (\n                  <p className=\"mt-4 text-base text-muted-foreground\">{aside.note}</p>\n                )}\n              </div>\n            )}\n          </div>\n        ) : (\n          <div className=\"mt-12 grid gap-10 lg:grid-cols-[1fr_1.1fr] lg:gap-16\">\n            <div>\n              {railTitle && (\n                <p className=\"text-base font-bold uppercase tracking-widest text-muted-foreground\">\n                  {railTitle}\n                </p>\n              )}\n              <p className=\"mt-6 text-6xl font-bold leading-none tabular-nums tracking-tight text-foreground md:text-8xl\">\n                {percent}%\n              </p>\n              <p className=\"mt-4 text-base font-bold uppercase tracking-widest text-muted-foreground\">\n                {scoreLabel ?? \"on the line\"}\n              </p>\n\n              {band && (\n                <>\n                  <p className=\"mt-10 text-2xl font-bold tracking-tight text-foreground md:text-3xl\">\n                    {band.title}\n                  </p>\n                  <p className=\"mt-4 max-w-md text-lg leading-relaxed text-muted-foreground\">\n                    {band.summary}\n                  </p>\n                </>\n              )}\n\n              <div className=\"mt-8 flex flex-wrap items-center gap-5\">\n                {band?.button && (\n                  <Button1 asChild label={band.button.label}>\n                    <Link href={band.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            </div>\n\n            {band?.practices && band.practices.length > 0 && (\n              <div>\n                {practicesTitle && (\n                  <p className=\"text-base font-bold uppercase tracking-widest text-muted-foreground\">\n                    {practicesTitle}\n                  </p>\n                )}\n                <ol className=\"mt-6 border-b\">\n                  {band.practices.map((practice, index) => (\n                    <li key={index} className=\"flex gap-4 border-t py-5\">\n                      <span className=\"flex size-8 shrink-0 items-center justify-center rounded-md bg-primary text-base font-bold tabular-nums text-primary-foreground\">\n                        {index + 1}\n                      </span>\n                      <p className=\"text-lg text-foreground\">{practice}</p>\n                    </li>\n                  ))}\n                </ol>\n              </div>\n            )}\n          </div>\n        )}\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/block/workflow55.tsx"
    },
    {
      "path": "registry-pieces/socialproof24/socialproof24.tsx",
      "content": "\"use client\";\n\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\";\nimport { cn } from \"@/lib/utils\";\n\ntype Surface = \"card\" | \"glass\";\n\ninterface Member {\n  src: string;\n  alt: string;\n  name?: string;\n}\n\ninterface Socialproof24Props {\n  items?: Member[];\n  surface?: Surface;\n  bordered?: boolean;\n  inverted?: boolean;\n  className?: string;\n}\n\n\n/* The card sets the colour and everything inside it is drawn in `current`, so\n   inverting is two classes rather than a condition on every element.\n   `glass` is a deliberate exception to the solid-surface rule: these pieces sit\n   over section background images, and a frosted panel is the point of it. */\nconst surfaceClasses: Record<Surface, { plain: string; inverted: string }> = {\n  card: {\n    plain: \"bg-card text-card-foreground\",\n    inverted: \"bg-foreground text-background\",\n  },\n  glass: {\n    plain: \"bg-card/60 text-card-foreground backdrop-blur-md\",\n    inverted: \"bg-foreground/60 text-background backdrop-blur-md\",\n  },\n};\n\nexport const socialproof24Demo: Socialproof24Props = {\n  surface: \"card\",\n  bordered: false,\n  inverted: false,\n  items: [\n    {\n      src: \"https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=160&h=160&fit=crop\",\n      alt: \"Portrait of a product designer\",\n    },\n    {\n      src: \"https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=160&h=160&fit=crop\",\n      alt: \"Portrait of a frontend engineer\",\n    },\n    {\n      src: \"https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=160&h=160&fit=crop\",\n      alt: \"Portrait of a content strategist\",\n      name: \"Dana Whitlock\",\n    },\n    {\n      src: \"https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=160&h=160&fit=crop\",\n      alt: \"Portrait of a product manager\",\n    },\n  ],\n};\n\nexport function Socialproof24({ items = [], surface = \"card\", bordered = false, inverted = false, className }: Socialproof24Props) {\n  const surfaceTone = surfaceClasses[surface][inverted ? \"inverted\" : \"plain\"];\n\n  return (\n    <div\n      className={cn(\n        \"relative flex size-full items-center justify-center p-4\",\n        className\n      )}\n    >\n      <div className=\"flex items-center -space-x-4\">\n        {items.map((member, index) => (\n          <div key={index} className=\"relative\">\n            {member.name && (\n              <div className=\"absolute -top-9 left-1/2 z-10 -translate-x-1/2\">\n                <div className={cn(\"whitespace-nowrap rounded-md px-2.5 py-1 text-xs font-medium shadow-md\", surfaceTone, bordered && \"border border-current/15\")}>\n                  {member.name}\n                </div>\n                <span\n                  className={cn(\"absolute left-1/2 top-full size-2 -translate-x-1/2 -translate-y-1 rotate-45 border-b border-r border-current/15 \", surfaceTone)}\n                  aria-hidden=\"true\"\n                />\n              </div>\n            )}\n            <Avatar className=\"size-14 border-2 border-background shadow-sm\">\n              <AvatarImage\n                src={member.src}\n                alt={member.alt}\n                className=\"object-cover\"\n              />\n              <AvatarFallback>\n                {member.alt\n                  .split(\" \")\n                  .map((word) => word[0])\n                  .join(\"\")\n                  .slice(0, 2)}\n              </AvatarFallback>\n            </Avatar>\n          </div>\n        ))}\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/piece/socialproof24.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"
}