refactor(ui): extract Dialog into dialog module
- Add dialog/ with types, Dialog, DialogHeader, DialogBody, DialogFooter,
DialogContent, DialogDescription, DialogTitle, DialogTrigger, DialogSkeleton
- Re-export from dialog.tsx via dialog/index for backward compatibility
- Stories: Default, Alert, Composition (max-w-md), Loading (DialogSkeleton)
- Test: assert Kodo destructive classes (text-kodo-red) for alert variant
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-05 21:59:48 +00:00
|
|
|
/**
|
|
|
|
|
* Skeleton for Dialog content. Uses layout primitives; no arbitrary values.
|
|
|
|
|
* Use when dialog is open but content is loading.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import { cn } from '@/lib/utils';
|
|
|
|
|
|
|
|
|
|
interface DialogSkeletonProps {
|
|
|
|
|
className?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function DialogSkeleton({ className }: DialogSkeletonProps) {
|
|
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
|
className={cn(
|
2026-02-07 14:08:52 +00:00
|
|
|
'rounded-xl border border-border bg-card',
|
refactor(ui): extract Dialog into dialog module
- Add dialog/ with types, Dialog, DialogHeader, DialogBody, DialogFooter,
DialogContent, DialogDescription, DialogTitle, DialogTrigger, DialogSkeleton
- Re-export from dialog.tsx via dialog/index for backward compatibility
- Stories: Default, Alert, Composition (max-w-md), Loading (DialogSkeleton)
- Test: assert Kodo destructive classes (text-kodo-red) for alert variant
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-05 21:59:48 +00:00
|
|
|
'min-h-layout-story',
|
|
|
|
|
className,
|
|
|
|
|
)}
|
|
|
|
|
role="status"
|
|
|
|
|
aria-label="Chargement du dialogue"
|
|
|
|
|
>
|
2026-02-07 14:08:52 +00:00
|
|
|
<div className="p-8 border-b border-border">
|
|
|
|
|
<div className="h-8 w-2/3 max-w-md rounded bg-muted animate-pulse" />
|
refactor(ui): extract Dialog into dialog module
- Add dialog/ with types, Dialog, DialogHeader, DialogBody, DialogFooter,
DialogContent, DialogDescription, DialogTitle, DialogTrigger, DialogSkeleton
- Re-export from dialog.tsx via dialog/index for backward compatibility
- Stories: Default, Alert, Composition (max-w-md), Loading (DialogSkeleton)
- Test: assert Kodo destructive classes (text-kodo-red) for alert variant
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-05 21:59:48 +00:00
|
|
|
</div>
|
|
|
|
|
<div className="p-8 space-y-2">
|
2026-02-07 14:08:52 +00:00
|
|
|
<div className="h-4 w-full rounded bg-muted animate-pulse" />
|
|
|
|
|
<div className="h-4 w-3/4 rounded bg-muted animate-pulse" />
|
|
|
|
|
<div className="h-4 w-1/2 rounded bg-muted animate-pulse" />
|
refactor(ui): extract Dialog into dialog module
- Add dialog/ with types, Dialog, DialogHeader, DialogBody, DialogFooter,
DialogContent, DialogDescription, DialogTitle, DialogTrigger, DialogSkeleton
- Re-export from dialog.tsx via dialog/index for backward compatibility
- Stories: Default, Alert, Composition (max-w-md), Loading (DialogSkeleton)
- Test: assert Kodo destructive classes (text-kodo-red) for alert variant
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-05 21:59:48 +00:00
|
|
|
</div>
|
2026-02-07 14:08:52 +00:00
|
|
|
<div className="flex justify-end gap-2 p-8 border-t border-border">
|
|
|
|
|
<div className="h-10 w-24 rounded bg-muted animate-pulse" />
|
|
|
|
|
<div className="h-10 w-24 rounded bg-muted animate-pulse" />
|
refactor(ui): extract Dialog into dialog module
- Add dialog/ with types, Dialog, DialogHeader, DialogBody, DialogFooter,
DialogContent, DialogDescription, DialogTitle, DialogTrigger, DialogSkeleton
- Re-export from dialog.tsx via dialog/index for backward compatibility
- Stories: Default, Alert, Composition (max-w-md), Loading (DialogSkeleton)
- Test: assert Kodo destructive classes (text-kodo-red) for alert variant
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-05 21:59:48 +00:00
|
|
|
</div>
|
|
|
|
|
<span className="sr-only">Chargement du dialogue en cours...</span>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|