{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "input-otp",
  "title": "Input OTP",
  "description": "Inputs for one-time code entry.",
  "dependencies": [
    "input-otp"
  ],
  "files": [
    {
      "path": "registry/new-york/ui/input-otp.tsx",
      "content": "\"use client\";\n\nimport { OTPInput, OTPInputContext } from \"input-otp\";\nimport { MinusIcon } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst InputOTP = React.forwardRef<\n  React.ComponentRef<typeof OTPInput>,\n  React.ComponentProps<typeof OTPInput> & { containerClassName?: string }\n>(function InputOTP({ className, containerClassName, ...props }, ref) {\n  return (\n    <OTPInput\n      aria-busy={\n        typeof (props as any).value === \"string\" &&\n        typeof (props as any).maxLength === \"number\"\n          ? (props as any).value.length < (props as any).maxLength\n            ? true\n            : undefined\n          : undefined\n      }\n      aria-disabled={(props as any).disabled ? true : undefined}\n      aria-invalid={(props as any)[\"aria-invalid\"] ? true : undefined}\n      className={cn(\"disabled:cursor-not-allowed\", className)}\n      containerClassName={cn(\n        \"flex touch-manipulation items-center gap-2 has-disabled:opacity-50\",\n        containerClassName\n      )}\n      data-slot=\"input-otp\"\n      ref={ref}\n      {...props}\n    />\n  );\n});\n\nconst InputOTPGroup = React.forwardRef<\n  HTMLDivElement,\n  React.ComponentProps<\"div\">\n>(function InputOTPGroup({ className, ...props }, ref) {\n  return (\n    <div\n      className={cn(\"flex items-center\", className)}\n      data-slot=\"input-otp-group\"\n      ref={ref}\n      {...props}\n    />\n  );\n});\n\nconst InputOTPSlot = React.forwardRef<\n  HTMLDivElement,\n  React.ComponentProps<\"div\"> & { index: number }\n>(function InputOTPSlot({ index, className, ...props }, ref) {\n  const inputOTPContext = React.useContext(OTPInputContext);\n  const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};\n\n  return (\n    <div\n      className={cn(\n        \"relative flex size-9 items-center justify-center border-input border-y border-r text-sm tabular-nums shadow-xs outline-none transition-[color,box-shadow] first:rounded-l-md first:border-l last:rounded-r-md aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-[3px] data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 motion-safe:duration-200 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40\",\n        className\n      )}\n      data-active={isActive}\n      data-slot=\"input-otp-slot\"\n      ref={ref}\n      {...props}\n    >\n      {char}\n      {hasFakeCaret && (\n        <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n          <div className=\"h-4 w-px animate-caret-blink bg-foreground duration-1000 motion-reduce:animate-none\" />\n        </div>\n      )}\n    </div>\n  );\n});\n\nconst InputOTPSeparator = React.forwardRef<\n  HTMLDivElement,\n  React.ComponentProps<\"div\">\n>(function InputOTPSeparator({ ...props }, ref) {\n  return (\n    <div data-slot=\"input-otp-separator\" ref={ref} role=\"separator\" {...props}>\n      <MinusIcon aria-hidden=\"true\" />\n    </div>\n  );\n});\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\n",
      "type": "registry:ui"
    }
  ],
  "docs": "https://input-otp.rodz.dev/",
  "categories": [
    "component"
  ],
  "type": "registry:ui"
}