From c2dbaa7fbc144ba1dc836d279d4ffe44bc24541d Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 21 Feb 2026 18:52:11 +0100 Subject: [PATCH] style(ux): harmonize ui according to ergonomics specification (silent ui, tabular nums, muted icons) --- .../grid/components/grid-filter-bar.tsx | 34 ++++++++++++++----- src/features/grid/components/heatmap-grid.tsx | 28 ++++++++------- 2 files changed, 40 insertions(+), 22 deletions(-) diff --git a/src/features/grid/components/grid-filter-bar.tsx b/src/features/grid/components/grid-filter-bar.tsx index 8a967b4..e990961 100644 --- a/src/features/grid/components/grid-filter-bar.tsx +++ b/src/features/grid/components/grid-filter-bar.tsx @@ -101,30 +101,46 @@ export function GridFilterBar({ fournisseurs, magasins, nomenclature }: GridFilt {/* Gamme quick filter */}
{GAMME_FILTERS.map(({ label, value }) => { const count = value === null ? rows.length : gammeCounts[value]; + const isActive = filters.codeGamme === value; + + // Semantic colors for the badge based on Gamme + const getBadgeStyles = () => { + if (!isActive) return { background: "rgba(0,0,0,0.05)", color: "var(--text-muted)" }; + switch (value) { + case "A": return { background: "rgba(16, 185, 129, 0.15)", color: "rgb(5, 150, 105)" }; // Emerald + case "B": return { background: "rgba(59, 130, 246, 0.15)", color: "rgb(37, 99, 235)" }; // Blue + case "C": return { background: "rgba(245, 158, 11, 0.15)", color: "rgb(217, 119, 6)" }; // Amber + case "Z": return { background: "rgba(244, 63, 94, 0.15)", color: "rgb(225, 29, 72)" }; // Rose + default: return { background: "rgba(0,0,0,0.1)", color: "var(--text-primary)" }; + } + }; + + const badgeStyles = getBadgeStyles(); + return (