registry/tealmac/signup-04.tsx
/**
* Signup 04 - adapted for tealmac UI from the shadcn/ui block "signup-04"
* (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 { cn } from "@/lib/utils"
import { Button } from "@/components/ui/button"
import { Card, CardContent } from "@/components/ui/card"
import {
Field,
FieldDescription,
FieldGroup,
FieldLabel,
FieldSeparator,
} from "@/components/ui/field"
import { Input } from "@/components/ui/input"
export function SignupForm({
className,
...props
}: React.ComponentProps<"div">) {
return (
<div className={cn("flex flex-col gap-6", className)} {...props}>
<Card className="overflow-hidden p-0">
<CardContent className="grid p-0 md:grid-cols-2">
<form className="p-6 md:p-8">
<FieldGroup>
<div className="flex flex-col items-center gap-2 text-center">
<h1 className="text-2xl font-bold">Create your account</h1>
<p className="text-muted-foreground text-sm text-balance">
Enter your email below to create your account
</p>
</div>
<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>
<Field className="grid grid-cols-2 gap-4">
<Field>
<FieldLabel htmlFor="password">Password</FieldLabel>
<Input id="password" type="password" required />
</Field>
<Field>
<FieldLabel htmlFor="confirm-password">
Confirm Password
</FieldLabel>
<Input id="confirm-password" type="password" required />
</Field>
</Field>
<FieldDescription>
Must be at least 8 characters long.
</FieldDescription>
</Field>
<Field>
<Button type="submit">Create Account</Button>
</Field>
<FieldSeparator className="*:data-[slot=field-separator-content]:bg-card">
Or continue with
</FieldSeparator>
<Field className="grid grid-cols-3 gap-4">
<Button variant="outline" type="button">
Apple
</Button>
<Button variant="outline" type="button">
Google
</Button>
<Button variant="outline" type="button">
Meta
</Button>
</Field>
<FieldDescription className="text-center">
Already have an account? <a href="#sign-in">Sign in</a>
</FieldDescription>
</FieldGroup>
</form>
<div className="bg-muted relative hidden md:block">
<div
aria-hidden="true"
className="from-primary/25 via-muted to-secondary absolute inset-0 bg-linear-to-br"
/>
</div>
</CardContent>
</Card>
<FieldDescription className="px-6 text-center">
By clicking continue, you agree to our{" "}
<a href="#terms-of-service">Terms of Service</a> and{" "}
<a href="#privacy-policy">Privacy Policy</a>.
</FieldDescription>
</div>
)
}
export function Signup04() {
return (
<div className="bg-muted flex min-h-svh flex-col items-center justify-center p-6 md:p-10">
<div className="w-full max-w-sm md:max-w-4xl">
<SignupForm />
</div>
</div>
)
}