registry/default/sections/register-4.tsx
"use client";
import { Eye, EyeOff, User } from "lucide-react";
import * as React from "react";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { Separator } from "@/components/ui/separator";
import { cn } from "@/lib/utils";
// Google Icon
function GoogleIcon({ className }: { className?: string }) {
return (
<svg className={cn("h-5 w-5", className)} viewBox="0 0 24 24">
<path
d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"
fill="#4285F4"
/>
<path
d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"
fill="#34A853"
/>
<path
d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"
fill="#FBBC05"
/>
<path
d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"
fill="#EA4335"
/>
</svg>
);
}
// Yellow cloud/blob decoration
function CloudDecoration({ className }: { className?: string }) {
return (
<svg
className={cn("pointer-events-none absolute", className)}
fill="none"
viewBox="0 0 500 400"
>
<ellipse cx="100" cy="200" fill="#f7d94c" rx="100" ry="150" />
<ellipse cx="250" cy="180" fill="#f7d94c" rx="150" ry="180" />
<ellipse cx="400" cy="200" fill="#f7d94c" rx="100" ry="150" />
<ellipse cx="175" cy="280" fill="#f7d94c" rx="80" ry="100" />
<ellipse cx="325" cy="280" fill="#f7d94c" rx="80" ry="100" />
</svg>
);
}
export function Register4() {
const [showPassword, setShowPassword] = React.useState(false);
return (
<section className="relative flex min-h-screen w-full items-center justify-center overflow-hidden bg-gray-50 px-4 py-12 dark:bg-neutral-900">
{/* Yellow cloud decoration */}
<CloudDecoration className="top-1/2 left-1/2 h-140 w-175 -translate-x-1/2 -translate-y-1/2" />
{/* Card */}
<div className="relative z-10 w-full max-w-md rounded-3xl bg-white p-8 shadow-xl md:p-10 dark:bg-neutral-800">
{/* Header */}
<div className="mb-8 text-center">
<h1 className="mb-2 font-bold text-3xl text-gray-900 md:text-4xl dark:text-gray-100">
Create an account
</h1>
<p className="text-gray-600 text-sm dark:text-gray-400">
Already have an account yet?{" "}
<a
className="font-medium text-gray-900 underline dark:text-gray-100"
href="#"
>
Sign in
</a>
</p>
</div>
{/* Form */}
<form className="space-y-4">
<div className="grid grid-cols-2 gap-3">
<div>
<Label className="mb-2 block font-semibold text-gray-600 text-xs uppercase tracking-wide dark:text-gray-400">
FIRST NAME
</Label>
<div className="relative">
<Input
className="h-12 rounded-xl border-gray-200 pr-10 dark:border-neutral-700"
placeholder="John"
type="text"
/>
<User className="absolute top-1/2 right-3 h-4 w-4 -translate-y-1/2 text-neutral-400" />
</div>
</div>
<div>
<Label className="mb-2 block font-semibold text-gray-600 text-xs uppercase tracking-wide dark:text-gray-400">
LAST NAME
</Label>
<div className="relative">
<Input
className="h-12 rounded-xl border-gray-200 pr-10 dark:border-neutral-700"
placeholder="Smith"
type="text"
/>
<User className="absolute top-1/2 right-3 h-4 w-4 -translate-y-1/2 text-neutral-400" />
</div>
</div>
</div>
<div>
<Label className="mb-2 block font-semibold text-gray-600 text-xs uppercase tracking-wide dark:text-gray-400">
EMAIL
</Label>
<Input
className="h-12 rounded-xl border-gray-200 dark:border-neutral-700"
placeholder="johnsmith@gmail.com"
type="email"
/>
</div>
<div>
<Label className="mb-2 block font-semibold text-gray-600 text-xs uppercase tracking-wide dark:text-gray-400">
PASSWORD
</Label>
<div className="relative">
<Input
className="h-12 rounded-xl border-gray-200 pr-12 dark:border-neutral-700"
placeholder="min. 8 characters"
type={showPassword ? "text" : "password"}
/>
<button
className="absolute top-1/2 right-4 -translate-y-1/2 text-neutral-400 hover:text-neutral-600"
onClick={() => setShowPassword(!showPassword)}
type="button"
>
{showPassword ? (
<Eye className="h-5 w-5" />
) : (
<EyeOff className="h-5 w-5" />
)}
</button>
</div>
</div>
<Button
className="mt-2 h-12 w-full rounded-xl bg-neutral-900 font-medium text-white hover:bg-neutral-800"
type="submit"
>
Create account
</Button>
</form>
{/* Divider */}
<div className="my-6 flex items-center gap-4">
<Separator className="flex-1" />
<span className="font-medium text-neutral-400 text-xs">OR</span>
<Separator className="flex-1" />
</div>
{/* Google Sign Up */}
<Button
className="h-12 w-full rounded-xl border-gray-200 bg-neutral-50 hover:bg-neutral-100 dark:border-neutral-700"
variant="outline"
>
<GoogleIcon className="mr-3" />
<span className="font-medium text-neutral-700">
Continue with Google
</span>
</Button>
</div>
</section>
);
}
export default Register4;