registry/tealmac/login-04.tsx
/**
* Login 04 - adapted for tealmac UI from the shadcn/ui block "login-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 LoginForm({
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">Welcome back</h1>
<p className="text-muted-foreground text-balance">
Login to your Your Company account
</p>
</div>
<Field>
<FieldLabel htmlFor="email">Email</FieldLabel>
<Input
id="email"
type="email"
placeholder="m@example.com"
required
/>
</Field>
<Field>
<div className="flex items-center">
<FieldLabel htmlFor="password">Password</FieldLabel>
<a
href="#forgot-your-password"
className="ml-auto text-sm underline-offset-2 hover:underline"
>
Forgot your password?
</a>
</div>
<Input id="password" type="password" required />
</Field>
<Field>
<Button type="submit">Login</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">
Don't have an account? <a href="#sign-up">Sign up</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 Login04() {
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">
<LoginForm />
</div>
</div>
)
}