{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "extends": "none",
  "name": "input-otp",
  "title": "input-otp",
  "description": "input-otp",
  "dependencies": [
    "@heroicons/react",
    "input-otp",
    "tailwind-merge"
  ],
  "registryDependencies": [
    "https://intentui.com/r/field"
  ],
  "files": [
    {
      "path": "src/components/ui/input-otp.tsx",
      "content": "'use client'\n\nimport { MinusIcon } from '@heroicons/react/20/solid'\nimport { OTPInput, OTPInputContext } from 'input-otp'\nimport { use } from 'react'\nimport { twMerge } from 'tailwind-merge'\nimport { fieldStyles, Label } from '@/components/ui/field'\n\nexport function InputOTP({\n  containerClassName,\n  ...props\n}: React.ComponentPropsWithoutRef<typeof OTPInput>) {\n  return (\n    <span data-slot=\"control\" className=\"relative block\">\n      <OTPInput\n        data-slot=\"input-otp\"\n        containerClassName={twMerge(\n          fieldStyles({ className: 'has-[:disabled]:opacity-50' }),\n          containerClassName\n        )}\n        {...props}\n      />\n    </span>\n  )\n}\n\nexport function InputOTPControl({ className, ...props }: React.ComponentProps<'span'>) {\n  return (\n    <span\n      data-slot=\"control\"\n      className={twMerge('flex items-center gap-2 has-disabled:opacity-50', className)}\n      {...props}\n    />\n  )\n}\n\nexport function InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>) {\n  return (\n    <div\n      data-slot=\"input-otp-group\"\n      className={twMerge('flex items-center', className)}\n      {...props}\n    />\n  )\n}\n\nexport function InputOTPSlot({\n  index,\n  className,\n  ...props\n}: React.ComponentProps<'div'> & {\n  index: number\n}) {\n  const inputOTPContext = use(OTPInputContext)\n  const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\n\n  return (\n    <div\n      data-slot=\"input-otp-slot\"\n      data-active={isActive}\n      className={twMerge(\n        'relative flex size-9 items-center justify-center border-input border-y border-r shadow-xs outline-none transition-all [--input-otp-radius:calc(var(--radius-lg)-1px)] first:rounded-s-(--input-otp-radius) first:border-l last:rounded-e-(--input-otp-radius) aria-invalid:border-danger data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:bg-primary-subtle/10 data-[active=true]:ring-3 data-[active=true]:ring-ring/20 data-[active=true]:aria-invalid:border-danger-subtle-fg/70 data-[active=true]:aria-invalid:ring-danger-subtle-fg/20 sm:text-sm/6 dark:data-[active=true]:aria-invalid:ring-danger-subtle-fg/70',\n        className\n      )}\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-fg duration-1000\" />\n        </div>\n      )}\n    </div>\n  )\n}\n\nexport function InputOTPSeparator({ ...props }: React.ComponentProps<'div'>) {\n  return (\n    <div data-slot=\"input-otp-separator\" {...props}>\n      <MinusIcon className=\"size-4\" />\n    </div>\n  )\n}\n\nexport function InputOTPLabel(props: React.ComponentProps<typeof Label>) {\n  return <Label elementType=\"span\" data-slot=\"control-label\" {...props} />\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}