registry/tealmac/signup-02.tsx
/**
* Signup 02 - adapted for tealmac UI from the shadcn/ui block "signup-02"
* (https://github.com/shadcn-ui/ui), MIT License, Copyright (c) 2023 shadcn.
* The full licence text is in THIRD_PARTY_NOTICES.md. Changes: tealmac UI
* import paths, one self-contained file, neutral demo content and no
* third-party assets.
*/
import { GalleryVerticalEnd } from "lucide-react"
import { cn } from "@/lib/utils"
import { Button } from "@/components/ui/button"
import {
Field,
FieldDescription,
FieldGroup,
FieldLabel,
FieldSeparator,
} from "@/components/ui/field"
import { Input } from "@/components/ui/input"
export function SignupForm({
className,
...props
}: React.ComponentProps<"form">) {
return (
<form className={cn("flex flex-col gap-6", className)} {...props}>
<FieldGroup>
<div className="flex flex-col items-center gap-1 text-center">
<h1 className="text-2xl font-bold">Create your account</h1>
<p className="text-muted-foreground text-sm text-balance">
Fill in the form below to create your account
</p>
</div>
<Field>
<FieldLabel htmlFor="name">Full Name</FieldLabel>
<Input id="name" type="text" placeholder="John Doe" required />
</Field>
<Field>
<FieldLabel htmlFor="email">Email</FieldLabel>
<Input id="email" type="email" placeholder="m@example.com" required />
<FieldDescription>
We'll use this to contact you. We will not share your email
with anyone else.
</FieldDescription>
</Field>
<Field>
<FieldLabel htmlFor="password">Password</FieldLabel>
<Input id="password" type="password" required />
<FieldDescription>
Must be at least 8 characters long.
</FieldDescription>
</Field>
<Field>
<FieldLabel htmlFor="confirm-password">Confirm Password</FieldLabel>
<Input id="confirm-password" type="password" required />
<FieldDescription>Please confirm your password.</FieldDescription>
</Field>
<Field>
<Button type="submit">Create Account</Button>
</Field>
<FieldSeparator>Or continue with</FieldSeparator>
<Field>
<Button variant="outline" type="button">
Sign up with GitHub
</Button>
<FieldDescription className="px-6 text-center">
Already have an account? <a href="#sign-in">Sign in</a>
</FieldDescription>
</Field>
</FieldGroup>
</form>
)
}
export function Signup02() {
return (
<div className="grid min-h-svh lg:grid-cols-2">
<div className="flex flex-col gap-4 p-6 md:p-10">
<div className="flex justify-center gap-2 md:justify-start">
<a href="#top" className="flex items-center gap-2 font-medium">
<div className="bg-primary text-primary-foreground flex size-6 items-center justify-center rounded-md">
<GalleryVerticalEnd className="size-4" />
</div>
Your Company
</a>
</div>
<div className="flex flex-1 items-center justify-center">
<div className="w-full max-w-xs">
<SignupForm />
</div>
</div>
</div>
<div className="bg-muted relative hidden lg:block">
<div
aria-hidden="true"
className="from-primary/25 via-muted to-secondary absolute inset-0 bg-linear-to-br"
/>
</div>
</div>
)
}