{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "stepper",
  "type": "registry:ui",
  "title": "Stepper",
  "dependencies": [
    "@base-ui-next/react",
    "class-variance-authority"
  ],
  "registryDependencies": [
    "https://hamur.dev/r/react/utils.json",
    "https://hamur.dev/r/react/button.json"
  ],
  "files": [
    {
      "path": "react/stepper.tsx",
      "content": "'use client'\n\nimport type * as React from 'react' // base-ui-next/ui stepper@0.1.1\nimport { Stepper as StepperPrimitive } from '@base-ui-next/react/stepper'\nimport type { VariantProps } from 'class-variance-authority'\nimport { cn } from '@/lib/utils'\nimport { buttonVariants } from '@/components/ui/button'\n\nconst stepperClassName = 'group/stepper flex w-full flex-col gap-6 text-sm'\n\nconst stepperListClassName =\n  'flex w-full [counter-reset:stepper] data-[orientation=horizontal]:items-center data-[orientation=horizontal]:gap-3 data-[orientation=vertical]:flex-col'\n\nconst stepperItemClassName =\n  'group/stepper-item relative flex min-w-0 [counter-increment:stepper] data-[orientation=horizontal]:flex-1 data-[orientation=horizontal]:items-center data-[orientation=horizontal]:gap-3 data-[orientation=horizontal]:last:flex-none data-[orientation=vertical]:flex-col data-[orientation=vertical]:pb-6 data-[orientation=vertical]:last:pb-0'\n\n/** The indicator beside the title and the description below it; the ring has room in its margin. */\nconst stepperTriggerClassName =\n  'group/stepper-trigger -m-1 grid shrink-0 grid-cols-[auto_1fr] items-center gap-x-3 gap-y-0.5 rounded-md p-1 text-start outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-disabled:cursor-not-allowed data-disabled:opacity-50 data-[orientation=vertical]:self-start [&_svg]:pointer-events-none'\n\n/** A circle: outlined and ringed while current, filled `primary` once completed, `destructive` while invalid. */\nconst stepperIndicatorClassName =\n  'row-span-2 flex size-8 shrink-0 items-center justify-center rounded-full border border-input bg-background text-sm font-medium text-muted-foreground tabular-nums transition-[color,background-color,border-color,box-shadow] data-current:ring-[3px] data-current:ring-primary/20 data-current:not-data-completed:not-data-invalid:border-primary data-current:not-data-completed:not-data-invalid:text-foreground data-completed:not-data-invalid:border-primary data-completed:not-data-invalid:bg-primary data-completed:not-data-invalid:text-primary-foreground data-invalid:border-destructive data-invalid:bg-destructive data-invalid:text-white data-current:data-invalid:ring-destructive/20 forced-colors:data-current:outline-2 forced-colors:data-current:outline-offset-2 forced-colors:data-current:outline-solid [&>svg]:size-4'\n\n/** The step's 1-based position, from the List's counter; hidden once a check or an X stands in. */\nconst stepperIndicatorNumberClassName =\n  'before:content-[counter(stepper)] [[data-completed]>&]:hidden [[data-invalid]>&]:hidden'\n\n/** lucide's Check, shown on a completed step that is not invalid. */\nconst stepperIndicatorCheckClassName =\n  'hidden [[data-completed]:not([data-invalid])>&]:block'\n\n/** lucide's X, shown on an invalid step. */\nconst stepperIndicatorErrorClassName = 'hidden [[data-invalid]>&]:block'\n\nconst stepperTitleClassName =\n  'col-start-2 min-w-0 text-sm leading-snug font-medium text-foreground data-unreachable:not-data-invalid:text-muted-foreground data-invalid:text-destructive'\n\nconst stepperDescriptionClassName =\n  'col-start-2 min-w-0 text-xs leading-normal text-muted-foreground'\n\n/** A line after the step: across the row when horizontal, down from the indicator when vertical. */\nconst stepperSeparatorClassName =\n  'bg-border transition-colors data-completed:bg-primary data-[orientation=horizontal]:h-px data-[orientation=horizontal]:min-w-6 data-[orientation=horizontal]:flex-1 data-[orientation=vertical]:absolute data-[orientation=vertical]:start-[calc(--spacing(4)-0.5px)] data-[orientation=vertical]:top-10 data-[orientation=vertical]:bottom-2 data-[orientation=vertical]:w-px'\n\n/** Indented to the title when it sits inside its Item. */\nconst stepperPanelClassName =\n  'flex-1 text-sm outline-none in-data-[slot=stepper-item]:ps-11 in-data-[slot=stepper-item]:pt-3'\n\n/** Previous and Next over `buttonVariants`: dimmed at their bound, where they stay focusable. */\nconst stepperNavigationClassName =\n  'data-disabled:cursor-not-allowed data-disabled:opacity-50'\n\nconst stepperValueClassName = 'text-sm text-muted-foreground tabular-nums'\n\ntype ButtonVariants = VariantProps<typeof buttonVariants>\n\n// lucide's icons, inline and hidden from assistive technology (10 · As built, BN-309).\nfunction SvgIcon({ children, ...props }: React.ComponentProps<'svg'>) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth=\"2\"\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      {children}\n    </svg>\n  )\n}\n\n// No shadcn item: one name per Base UI part (docs/design/log/stepper.md, decision 42).\nfunction Stepper({ className, ...props }: StepperPrimitive.Root.Props) {\n  return (\n    <StepperPrimitive.Root\n      data-slot=\"stepper\"\n      className={cn(stepperClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction StepperList({ className, ...props }: StepperPrimitive.List.Props) {\n  return (\n    <StepperPrimitive.List\n      data-slot=\"stepper-list\"\n      className={cn(stepperListClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction StepperItem({ className, ...props }: StepperPrimitive.Item.Props) {\n  return (\n    <StepperPrimitive.Item\n      data-slot=\"stepper-item\"\n      className={cn(stepperItemClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction StepperTrigger({ className, ...props }: StepperPrimitive.Trigger.Props) {\n  return (\n    <StepperPrimitive.Trigger\n      data-slot=\"stepper-trigger\"\n      className={cn(stepperTriggerClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction StepperIndicator({ className, children, ...props }: StepperPrimitive.Indicator.Props) {\n  return (\n    <StepperPrimitive.Indicator\n      data-slot=\"stepper-indicator\"\n      className={cn(stepperIndicatorClassName, className)}\n      {...props}\n    >\n      {children ?? (\n        <>\n          <span className={stepperIndicatorNumberClassName} />\n          <SvgIcon className={stepperIndicatorCheckClassName}>\n            <path d=\"M20 6 9 17l-5-5\" />\n          </SvgIcon>\n          <SvgIcon className={stepperIndicatorErrorClassName}>\n            <path d=\"M18 6 6 18\" />\n            <path d=\"m6 6 12 12\" />\n          </SvgIcon>\n        </>\n      )}\n    </StepperPrimitive.Indicator>\n  )\n}\n\nfunction StepperTitle({ className, ...props }: StepperPrimitive.Title.Props) {\n  return (\n    <StepperPrimitive.Title\n      data-slot=\"stepper-title\"\n      className={cn(stepperTitleClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction StepperDescription({ className, ...props }: StepperPrimitive.Description.Props) {\n  return (\n    <StepperPrimitive.Description\n      data-slot=\"stepper-description\"\n      className={cn(stepperDescriptionClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction StepperSeparator({ className, ...props }: StepperPrimitive.Separator.Props) {\n  return (\n    <StepperPrimitive.Separator\n      data-slot=\"stepper-separator\"\n      className={cn(stepperSeparatorClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction StepperPanel({ className, ...props }: StepperPrimitive.Panel.Props) {\n  return (\n    <StepperPrimitive.Panel\n      data-slot=\"stepper-panel\"\n      className={cn(stepperPanelClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction StepperPrevious({\n  className,\n  variant = 'outline',\n  size = 'default',\n  ...props\n}: StepperPrimitive.Previous.Props & ButtonVariants) {\n  return (\n    <StepperPrimitive.Previous\n      data-slot=\"stepper-previous\"\n      className={cn(buttonVariants({ variant, size }), stepperNavigationClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction StepperNext({\n  className,\n  variant = 'default',\n  size = 'default',\n  ...props\n}: StepperPrimitive.Next.Props & ButtonVariants) {\n  return (\n    <StepperPrimitive.Next\n      data-slot=\"stepper-next\"\n      className={cn(buttonVariants({ variant, size }), stepperNavigationClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction StepperValue({ className, ...props }: StepperPrimitive.Value.Props) {\n  return (\n    <StepperPrimitive.Value\n      data-slot=\"stepper-value\"\n      className={cn(stepperValueClassName, className)}\n      {...props}\n    />\n  )\n}\n\nexport {\n  Stepper,\n  StepperDescription,\n  StepperIndicator,\n  StepperItem,\n  StepperList,\n  StepperNext,\n  StepperPanel,\n  StepperPrevious,\n  StepperSeparator,\n  StepperTitle,\n  StepperTrigger,\n  StepperValue,\n}\n",
      "type": "registry:ui",
      "target": "@ui/stepper.tsx"
    }
  ],
  "meta": {
    "baseUiNext": {
      "version": "0.1.1",
      "hash": "4d3dd1a50b986640a1a0a0f351bbd227aecd5d039193fc6dcb924faa48f25b24",
      "files": {
        "@ui/stepper.tsx": "0e854a4f844efe184bd9a7c22fea6ee108ff18369630ceb4e87f012f03a0ebdc"
      }
    }
  }
}
