"use client"; import * as React from "react"; import { DashIcon } from "@radix-ui/react-icons"; import { OTPInput, OTPInputContext } from "input-otp"; import { cn } from "@/lib/utils"; 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 };