handleBoxClick(i)}
+ className={cn(
+ "relative flex h-11 w-11 items-center justify-center rounded-lg border-2 border-input bg-background text-base font-semibold transition-all cursor-text hover:border-ring/50",
+ isActive && "border-ring ring-2 ring-ring/20 ring-offset-1",
+ isFilled && "border-primary/50 bg-primary/5",
+ className,
+ )}
+ >
+
{char}
+ {isActive && !char && (
+
+ )}
+
+ );
+ });
return (
-
- {char}
- {hasFakeCaret && (
-
- )}
+
+
setFocusedIndex(value.length)}
+ onBlur={() => setFocusedIndex(null)}
+ autoComplete="one-time-code"
+ inputMode="numeric"
+ pattern="[0-9]*"
+ maxLength={maxLength}
+ className="absolute inset-0 w-full h-full opacity-0 cursor-default"
+ style={{ caretColor: "transparent" }}
+ {...props}
+ />
+
{slots}
);
});
-InputOTPSlot.displayName = "InputOTPSlot";
+InputOTP.displayName = "InputOTP";
-const InputOTPSeparator = React.forwardRef<
- React.ElementRef<"div">,
- React.ComponentPropsWithoutRef<"div">
->(({ ...props }, ref) => (
-
-
-
-));
-InputOTPSeparator.displayName = "InputOTPSeparator";
-
-export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
+export { InputOTP };
diff --git a/apps/dokploy/pages/index.tsx b/apps/dokploy/pages/index.tsx
index e589da3b6..aab788ad9 100644
--- a/apps/dokploy/pages/index.tsx
+++ b/apps/dokploy/pages/index.tsx
@@ -33,11 +33,7 @@ import {
FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
-import {
- InputOTP,
- InputOTPGroup,
- InputOTPSlot,
-} from "@/components/ui/input-otp";
+import { InputOTP } from "@/components/ui/input-otp";
import { Label } from "@/components/ui/label";
import { authClient } from "@/lib/auth-client";
import { api } from "@/utils/api";
@@ -253,26 +249,20 @@ export default function Home({ IS_CLOUD }: Props) {
onSubmit={onTwoFactorSubmit}
className="space-y-4"
id="two-factor-form"
- autoComplete="off"
+ autoComplete="on"
>
-
+
-
-
-
-
-
-
-
-
-
+ />
Enter the 6-digit code from your authenticator app