"use client" import * as React from "react" import { OTPInput, OTPInputContext } from "input-otp" import { Dot } from "lucide-react" import { cn } from "@app/lib/cn" const InputOTP = ( { ref, className, containerClassName, ...props }: React.ComponentPropsWithoutRef & { ref: React.RefObject>; } ) => () InputOTP.displayName = "InputOTP" const InputOTPGroup = ( { ref, className, ...props }: React.ComponentPropsWithoutRef<"div"> & { ref: React.RefObject>; } ) => (
) InputOTPGroup.displayName = "InputOTPGroup" const InputOTPSlot = ( { ref, index, className, ...props } ) => { const inputOTPContext = React.useContext(OTPInputContext) const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index] return (
{char} {hasFakeCaret && (
)}
) } InputOTPSlot.displayName = "InputOTPSlot" const InputOTPSeparator = ( { ref, ...props }: React.ComponentPropsWithoutRef<"div"> & { ref: React.RefObject>; } ) => (
) InputOTPSeparator.displayName = "InputOTPSeparator" export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }