import type { ComponentProps } from 'react';
import { Check } from 'lucide-react';
import { cn } from '../../lib/cn';
/**
* Left half of the login and register screens.
*
*
*
*
* Gruppenarbeit, die einfach funktioniert!
* …
*
*
*/
export function AuthBrandPanel({ className, ...props }: ComponentProps<'div'>) {
return (
);
}
export function AuthBrandContent({ className, ...props }: ComponentProps<'div'>) {
return (
);
}
export function AuthHeadline({ className, ...props }: ComponentProps<'p'>) {
return (
);
}
export function FeatureList({ className, ...props }: ComponentProps<'ul'>) {
return ;
}
export function FeatureItem({ className, ...props }: ComponentProps<'li'>) {
return ;
}
export function FeatureIcon({ className, ...props }: ComponentProps<'span'>) {
return (
);
}
export function FeatureContent(props: ComponentProps<'div'>) {
return ;
}
export function FeatureTitle({ className, ...props }: ComponentProps<'div'>) {
return ;
}
export function FeatureDescription({ className, ...props }: ComponentProps<'div'>) {
return (
);
}
export interface PasswordRuleCheck {
label: string;
met: boolean;
}
/** Checks a password against the design's three rules. */
export function passwordRules(pw: string): PasswordRuleCheck[] {
return [
{ label: 'Mindestens 8 Zeichen', met: pw.length >= 8 },
{ label: 'Groß- und Kleinbuchstaben', met: /[a-zäöü]/.test(pw) && /[A-ZÄÖÜ]/.test(pw) },
{ label: 'Mindestens eine Zahl', met: /\d/.test(pw) },
];
}
/** Live checklist under a password field: `PasswordRule`s. Link it with `aria-describedby`. */
export function PasswordRules({ className, ...props }: ComponentProps<'ul'>) {
return (
);
}
export interface PasswordRuleProps extends ComponentProps<'li'> {
met: boolean;
/** Show it in red while unmet (after a submit attempt). */
showError?: boolean;
}
export function PasswordRule({ met, showError, className, children, ...props }: PasswordRuleProps) {
return (
{met ? (
) : (
)}
{children}
{met ? 'erfüllt' : 'nicht erfüllt'}
);
}