feat: Implement an Apple-inspired design system with dark/light modes and introduce the initial dashboard layout including a heatmap grid component.

This commit is contained in:
Michael committed 2026-03-05 14:08:29 +01:00
1 parent 3ba16d0895
commit c7fa25a5d1
4 files changed
+21 -17

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ export default async function DashboardLayout({ children }: { children: React.Re
<Sidebar /> <Sidebar />
<main className="flex-1 flex flex-col h-full min-w-0 overflow-hidden"> <main className="flex-1 flex flex-col h-full min-w-0 overflow-hidden">
<Header /> <Header />
<div className="flex-1 overflow-auto p-4 md:p-8"> <div className="flex-1 overflow-hidden flex flex-col p-4 md:p-8">
{children} {children}
</div> </div>
</main> </main>
+2 -2
View File
@@ -192,8 +192,8 @@
/* ── Refined scrollbar ── */ /* ── Refined scrollbar ── */
.overflow-auto::-webkit-scrollbar { .overflow-auto::-webkit-scrollbar {
width: 5px; width: 8px;
height: 5px; height: 8px;
} }
.overflow-auto::-webkit-scrollbar-track { .overflow-auto::-webkit-scrollbar-track {
+16 -10
View File
@@ -78,9 +78,9 @@ export function GridClient({ initialRows, nomFournisseur, fournisseurs, magasins
const activeStoreNom = magasins.find(m => m.code === magasin)?.nom || "National (Total)"; const activeStoreNom = magasins.find(m => m.code === magasin)?.nom || "National (Total)";
return ( return (
<div className="space-y-3 pb-20"> <div className="flex flex-col h-full space-y-3 min-h-0 pb-12">
{/* Header */} {/* Header */}
<div className="flex items-end justify-between"> <div className="flex items-end justify-between shrink-0">
<div> <div>
<h1 className="text-2xl font-bold tracking-tight">Révision d&apos;Assortiment</h1> <h1 className="text-2xl font-bold tracking-tight">Révision d&apos;Assortiment</h1>
<p className="text-[13px] mt-0.5" style={{ color: "var(--text-secondary)" }}> <p className="text-[13px] mt-0.5" style={{ color: "var(--text-secondary)" }}>
@@ -114,18 +114,24 @@ export function GridClient({ initialRows, nomFournisseur, fournisseurs, magasins
</div> </div>
{/* Filters */} {/* Filters */}
<GridFilterBar fournisseurs={fournisseurs} magasins={magasins} nomenclature={nomenclature} /> <div className="shrink-0">
<GridFilterBar fournisseurs={fournisseurs} magasins={magasins} nomenclature={nomenclature} />
</div>
{/* Bulk toolbar (contextual) */} {/* Bulk toolbar (contextual) */}
<BulkActionToolbar <div className="shrink-0">
selectedCodeins={selectedCodeins} <BulkActionToolbar
onClearSelection={() => setSelectedCodeins([])} selectedCodeins={selectedCodeins}
/> onClearSelection={() => setSelectedCodeins([])}
/>
</div>
{/* Main grid */} {/* Main grid */}
<HeatmapGrid <div className="flex-1 min-h-0 min-w-0">
onSelectionChange={setSelectedCodeins} <HeatmapGrid
/> onSelectionChange={setSelectedCodeins}
/>
</div>
{/* Summary bar */} {/* Summary bar */}
<FloatingSummaryBar /> <FloatingSummaryBar />
@@ -441,9 +441,8 @@ export function HeatmapGrid({ onSelectionChange }: HeatmapGridProps) {
if (!isMounted) { if (!isMounted) {
return ( return (
<div <div
className="overflow-auto rounded-[12px] flex items-center justify-center" className="h-full w-full overflow-auto rounded-[12px] flex items-center justify-center"
style={{ style={{
height: "calc(100vh - 240px)",
background: "var(--bg-surface)", background: "var(--bg-surface)",
border: "1px solid var(--border)", border: "1px solid var(--border)",
}} }}
@@ -456,9 +455,8 @@ export function HeatmapGrid({ onSelectionChange }: HeatmapGridProps) {
return ( return (
<div <div
ref={tableContainerRef} ref={tableContainerRef}
className="overflow-auto rounded-[12px] scroll-smooth" className="h-full w-full overflow-auto rounded-[12px] scroll-smooth"
style={{ style={{
height: "calc(100vh - 240px)",
background: "var(--bg-surface)", background: "var(--bg-surface)",
border: "1px solid var(--border)", border: "1px solid var(--border)",
boxShadow: "var(--shadow-sm)" boxShadow: "var(--shadow-sm)"