import type { ButtonHTMLAttributes, HTMLAttributes, InputHTMLAttributes, ReactNode, SelectHTMLAttributes } from 'react'; import { AlertCircle, CheckCircle2, Info, type LucideIcon } from 'lucide-react'; import { cn } from '../lib/cn'; export function PageShell({ className, ...props }: HTMLAttributes) { return ; } export function PageContainer({ className, ...props }: HTMLAttributes) { return ; } export function SectionHeader({ eyebrow, title, description, actions, className, }: { eyebrow?: string; title: string; description?: string; actions?: ReactNode; className?: string; }) { return ( {eyebrow ? {eyebrow} : null} {title} {description ? {description} : null} {actions ? {actions} : null} ); } export function Card({ className, ...props }: HTMLAttributes) { return ; } export function Surface({ className, ...props }: HTMLAttributes) { return ; } const buttonVariants = { primary: 'bg-emerald-600 text-white shadow-sm hover:bg-emerald-700 focus-visible:ring-emerald-500', secondary: 'border border-stone-200 bg-white text-stone-700 hover:bg-stone-50 focus-visible:ring-emerald-500', subtle: 'bg-stone-100 text-stone-700 hover:bg-stone-200 focus-visible:ring-emerald-500', danger: 'bg-red-600 text-white shadow-sm hover:bg-red-700 focus-visible:ring-red-500', } as const; const buttonSizes = { sm: 'h-10 px-4 text-sm', md: 'h-11 px-4 text-sm', lg: 'h-12 px-6 text-sm', icon: 'h-10 w-10', } as const; export function Button({ className, variant = 'primary', size = 'md', ...props }: ButtonHTMLAttributes & { variant?: keyof typeof buttonVariants; size?: keyof typeof buttonSizes; }) { return ( ); } export function Input({ className, ...props }: InputHTMLAttributes) { return ( ); } export function Select({ className, ...props }: SelectHTMLAttributes) { return ( ); } export function FieldLabel({ className, ...props }: HTMLAttributes) { return ; } const alertVariants = { error: { shell: 'border-red-100 bg-red-50 text-red-700', icon: AlertCircle, title: 'Issue', }, success: { shell: 'border-emerald-200 bg-emerald-50/80 text-emerald-900', icon: CheckCircle2, title: 'Success', }, info: { shell: 'border-stone-200 bg-stone-50 text-stone-700', icon: Info, title: 'Info', }, } as const; export function Alert({ variant = 'info', title, children, className, }: { variant?: keyof typeof alertVariants; title?: string; children: ReactNode; className?: string; }) { const config = alertVariants[variant]; const Icon = config.icon; return ( {title ? {title} : null} {children} ); } const badgeVariants = { neutral: 'border-stone-200 bg-stone-100 text-stone-700', primary: 'border-emerald-200 bg-emerald-50 text-emerald-700', success: 'border-emerald-200 bg-emerald-50 text-emerald-700', warning: 'border-amber-200 bg-amber-50 text-amber-700', danger: 'border-red-200 bg-red-50 text-red-700', info: 'border-sky-200 bg-sky-50 text-sky-700', } as const; export function Badge({ className, variant = 'neutral', icon: Icon, children, }: { className?: string; variant?: keyof typeof badgeVariants; icon?: LucideIcon; children: ReactNode; }) { return ( {Icon ? : null} {children} ); } export function MetricPill({ className, ...props }: HTMLAttributes) { return ; } export function EmptyState({ icon: Icon, title, description, action, className, }: { icon?: LucideIcon; title: string; description: string; action?: ReactNode; className?: string; }) { return ( {Icon ? ( ) : null} {title} {description} {action ? {action} : null} ); } export function LoadingState({ message }: { message: string }) { return ( {message} ); } export function SegmentedTabs({ tabs, value, onChange, }: { tabs: Array<{ value: T; label: string; icon?: LucideIcon }>; value: T; onChange: (value: T) => void; }) { return ( {tabs.map((tab) => { const Icon = tab.icon; const isActive = tab.value === value; return ( onChange(tab.value)} className={cn( 'flex items-center justify-center gap-2 rounded-2xl px-4 py-3 text-sm font-semibold transition', isActive ? 'bg-stone-900 text-white shadow-sm' : 'text-stone-600 hover:bg-stone-50 hover:text-stone-900', )} > {Icon ? : null} {tab.label} ); })} ); } export function StatCard({ title, value, icon: Icon, }: { title: string; value: ReactNode; icon: LucideIcon; }) { return ( {title} {value} ); }
{eyebrow}
{description}
{title}
{value}