Plan UI premium 6–8 semaines (design system, shell, Storybook, a11y): - Design system: DESIGN_TOKENS.md, APP_SHELL.md, FULL_LAYOUT_PAGE.md. Single source for layout/shell (index.css), shadows (design-system.css), durations/easing. - Tokens: shadow-cover-depth, shadow-gold-glow, shadow-fab-glow; layout max-height (max-h-layout-drawer, max-h-layout-panel, max-h-layout-list). All duration-200/300/500 replaced by --duration-fast/normal/slow. Arbitrary shadows replaced by token classes. - Shell & player: Sidebar, Header, GlobalPlayer, MiniPlayer, PlayerQueue, PlayerControls, AudioPlayer use tokens; focus-visible on Sidebar, PlayerQueue, DropdownMenuTrigger/Item, TabsTrigger. Typography: text-[10px]/[9px] → text-xs where applicable. - ESLint: no-restricted-syntax (warn) for w-/h-/rounded-/shadow-/text-/spacing arbitrary. - Scripts: report-arbitrary-values.mjs, capture/compare/generate visual; visual-complete.spec.ts. - Stories full layout: Dashboard, Playlists, Library, Settings, Profile in DashboardLayout.stories. - .cursorrules + README: DESIGN_TOKENS, APP_SHELL, visual commands, no arbitrary without justification. - apps/web/.gitignore: e2e test artifacts (test-results-visual, playwright-report-visual). Co-authored-by: Cursor <cursoragent@cursor.com>
92 lines
2.8 KiB
TypeScript
92 lines
2.8 KiB
TypeScript
import React from 'react';
|
|
import { Link } from 'react-router-dom';
|
|
import { cn } from '@/lib/utils';
|
|
|
|
import { Card } from '@/components/ui/card';
|
|
|
|
interface AuthLayoutProps {
|
|
title: string;
|
|
subtitle?: string;
|
|
children: React.ReactNode;
|
|
footerLinks?: Array<{ label: string; to: string }>;
|
|
className?: string;
|
|
}
|
|
|
|
export function AuthLayout({
|
|
title,
|
|
subtitle,
|
|
children,
|
|
footerLinks,
|
|
className,
|
|
}: AuthLayoutProps) {
|
|
return (
|
|
<div
|
|
className={cn(
|
|
'min-h-screen flex items-center justify-center bg-background py-12 px-4 sm:px-6 lg:px-8 relative overflow-hidden',
|
|
className,
|
|
)}
|
|
role="main"
|
|
aria-label="Page d'authentification"
|
|
>
|
|
{/* Background Effects */}
|
|
<div className="absolute inset-0 overflow-hidden pointer-events-none">
|
|
<div className="absolute top-0 right-0 w-96 h-96 bg-cyan/10 rounded-full blur-3xl animate-pulse" />
|
|
<div className="absolute bottom-0 left-0 w-96 h-96 bg-magenta/10 rounded-full blur-3xl animate-pulse" style={{ animationDelay: '1s' }} />
|
|
</div>
|
|
|
|
<div className="max-w-md w-full mx-auto space-y-8 relative z-10 animate-fade-in">
|
|
{/* Logo and Title */}
|
|
<header className="text-center">
|
|
<div className="flex items-center justify-center mb-6">
|
|
<div
|
|
className="h-12 w-12 rounded-xl bg-primary flex items-center justify-center shadow-button-primary-glow"
|
|
aria-hidden="true"
|
|
>
|
|
<span className="text-background font-bold text-2xl">V</span>
|
|
</div>
|
|
<span className="ml-3 font-bold text-3xl text-foreground">Veza</span>
|
|
</div>
|
|
<h1
|
|
id="auth-form-title"
|
|
className="text-3xl font-bold text-foreground mb-2"
|
|
>
|
|
{title}
|
|
</h1>
|
|
{subtitle && (
|
|
<p className="text-sm text-muted-foreground" role="doc-subtitle">
|
|
{subtitle}
|
|
</p>
|
|
)}
|
|
</header>
|
|
|
|
{/* Content Card */}
|
|
<Card
|
|
variant="surface"
|
|
padding="lg"
|
|
className="w-full"
|
|
aria-labelledby="auth-form-title"
|
|
>
|
|
{children}
|
|
</Card>
|
|
|
|
{/* Footer Links */}
|
|
{footerLinks && footerLinks.length > 0 && (
|
|
<nav
|
|
className="text-center space-x-4"
|
|
aria-label="Navigation d'authentification"
|
|
>
|
|
{footerLinks.map((link) => (
|
|
<Link
|
|
key={link.to}
|
|
to={link.to}
|
|
className="text-sm text-muted-foreground hover:text-foreground transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded"
|
|
>
|
|
{link.label}
|
|
</Link>
|
|
))}
|
|
</nav>
|
|
)}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|