From 2452e30a0f8a0b38132294ca093057891fd340a5 Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Sun, 21 Dec 2025 13:38:59 +0100 Subject: [PATCH] feat: enhance card components across the application with consistent hover effects and improved layout; update spacing in categories page for better visual hierarchy --- app/categories/page.tsx | 8 ++++---- app/login/page.tsx | 2 +- app/transactions/page.tsx | 6 +++--- components/categories/parent-category-row.tsx | 5 +++-- components/rules/rule-group-card.tsx | 5 +++-- components/statistics/balance-line-chart.tsx | 2 +- components/statistics/category-bar-chart.tsx | 4 +++- components/statistics/category-pie-chart.tsx | 2 +- components/statistics/category-trend-chart.tsx | 2 +- components/statistics/income-expense-trend-chart.tsx | 2 +- components/statistics/monthly-chart.tsx | 4 ++-- components/statistics/savings-trend-chart.tsx | 2 +- components/statistics/top-expenses-list.tsx | 2 +- components/statistics/year-over-year-chart.tsx | 2 +- 14 files changed, 26 insertions(+), 22 deletions(-) diff --git a/app/categories/page.tsx b/app/categories/page.tsx index 7127f0f..27456bc 100644 --- a/app/categories/page.tsx +++ b/app/categories/page.tsx @@ -351,7 +351,7 @@ export default function CategoriesPage() { onToggleAll={allExpanded ? collapseAll : expandAll} /> -
+
{filteredParentCategories.map((parent: Category) => { const allChildren = childrenByParent[parent.id] || []; const children = searchQuery.trim() @@ -387,8 +387,8 @@ export default function CategoriesPage() { })} {orphanCategories.length > 0 && ( -
-
+ +
Catégories non classées ({orphanCategories.length}) @@ -405,7 +405,7 @@ export default function CategoriesPage() { /> ))}
-
+ )}
diff --git a/app/login/page.tsx b/app/login/page.tsx index 28201fb..52ea34c 100644 --- a/app/login/page.tsx +++ b/app/login/page.tsx @@ -48,7 +48,7 @@ export default function LoginPage() { return (
- +
diff --git a/app/transactions/page.tsx b/app/transactions/page.tsx index 12a7c7a..6b43d23 100644 --- a/app/transactions/page.tsx +++ b/app/transactions/page.tsx @@ -238,7 +238,7 @@ export default function TransactionsPage() { /> {(!isLoadingChart || !isLoadingTransactions) && ( - + @@ -272,7 +272,7 @@ export default function TransactionsPage() { {/* Summary cards */} {!isLoadingTransactions && (
- +
@@ -287,7 +287,7 @@ export default function TransactionsPage() {
- +
diff --git a/components/categories/parent-category-row.tsx b/components/categories/parent-category-row.tsx index 9820797..5bffb8b 100644 --- a/components/categories/parent-category-row.tsx +++ b/components/categories/parent-category-row.tsx @@ -13,6 +13,7 @@ import { CollapsibleContent, CollapsibleTrigger, } from "@/components/ui/collapsible"; +import { Card } from "@/components/ui/card"; import { CategoryIcon } from "@/components/ui/category-icon"; import { Plus, @@ -54,7 +55,7 @@ export function ParentCategoryRow({ const isMobile = useIsMobile(); return ( -
+
@@ -155,6 +156,6 @@ export function ParentCategoryRow({ )} -
+
); } diff --git a/components/rules/rule-group-card.tsx b/components/rules/rule-group-card.tsx index ddcd6a9..9aeb9b3 100644 --- a/components/rules/rule-group-card.tsx +++ b/components/rules/rule-group-card.tsx @@ -5,6 +5,7 @@ import { ChevronDown, ChevronRight, Plus, Tag } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { CategoryCombobox } from "@/components/ui/category-combobox"; +import { Card } from "@/components/ui/card"; import { useIsMobile } from "@/hooks/use-mobile"; import { cn } from "@/lib/utils"; import type { Transaction, Category } from "@/lib/types"; @@ -54,7 +55,7 @@ export function RuleGroupCard({ }; return ( -
+ {/* Header */}
)} -
+
); } diff --git a/components/statistics/balance-line-chart.tsx b/components/statistics/balance-line-chart.tsx index bdd7824..fdbefee 100644 --- a/components/statistics/balance-line-chart.tsx +++ b/components/statistics/balance-line-chart.tsx @@ -57,7 +57,7 @@ export function BalanceLineChart({ }; return ( - + Évolution du solde
diff --git a/components/statistics/category-bar-chart.tsx b/components/statistics/category-bar-chart.tsx index 031f0ee..6510485 100644 --- a/components/statistics/category-bar-chart.tsx +++ b/components/statistics/category-bar-chart.tsx @@ -73,7 +73,7 @@ export function CategoryBarChart({ }; return ( - + {title} @@ -154,3 +154,5 @@ export function CategoryBarChart({ ); } + +// Find the Card component in this file diff --git a/components/statistics/category-pie-chart.tsx b/components/statistics/category-pie-chart.tsx index 8607b26..14ae242 100644 --- a/components/statistics/category-pie-chart.tsx +++ b/components/statistics/category-pie-chart.tsx @@ -51,7 +51,7 @@ export function CategoryPieChart({ const currentData = isExpanded ? baseData : baseData.slice(0, maxItems); return ( - + {title}
diff --git a/components/statistics/category-trend-chart.tsx b/components/statistics/category-trend-chart.tsx index f99aa24..689754d 100644 --- a/components/statistics/category-trend-chart.tsx +++ b/components/statistics/category-trend-chart.tsx @@ -96,7 +96,7 @@ export function CategoryTrendChart({ }; return ( - + Évolution des dépenses par catégorie
diff --git a/components/statistics/income-expense-trend-chart.tsx b/components/statistics/income-expense-trend-chart.tsx index d490168..6c2852c 100644 --- a/components/statistics/income-expense-trend-chart.tsx +++ b/components/statistics/income-expense-trend-chart.tsx @@ -28,7 +28,7 @@ export function IncomeExpenseTrendChart({ formatCurrency, }: IncomeExpenseTrendChartProps) { return ( - + Tendances revenus et dépenses diff --git a/components/statistics/monthly-chart.tsx b/components/statistics/monthly-chart.tsx index 140e5fc..649e29c 100644 --- a/components/statistics/monthly-chart.tsx +++ b/components/statistics/monthly-chart.tsx @@ -127,7 +127,7 @@ export function MonthlyChart({ if (!collapsible) { return ( - + Revenus vs Dépenses par mois @@ -137,7 +137,7 @@ export function MonthlyChart({ } return ( - + diff --git a/components/statistics/savings-trend-chart.tsx b/components/statistics/savings-trend-chart.tsx index 175f548..d5f2286 100644 --- a/components/statistics/savings-trend-chart.tsx +++ b/components/statistics/savings-trend-chart.tsx @@ -31,7 +31,7 @@ export function SavingsTrendChart({ const isPositive = latestSavings >= 0; return ( - + Évolution des économies
diff --git a/components/statistics/top-expenses-list.tsx b/components/statistics/top-expenses-list.tsx index 0174fef..15113ed 100644 --- a/components/statistics/top-expenses-list.tsx +++ b/components/statistics/top-expenses-list.tsx @@ -21,7 +21,7 @@ export function TopExpensesList({ const isMobile = useIsMobile(); return ( - + Top 5 dépenses diff --git a/components/statistics/year-over-year-chart.tsx b/components/statistics/year-over-year-chart.tsx index c54c9f3..3b77f37 100644 --- a/components/statistics/year-over-year-chart.tsx +++ b/components/statistics/year-over-year-chart.tsx @@ -33,7 +33,7 @@ export function YearOverYearChart({ previousYearLabel = "Année précédente", }: YearOverYearChartProps) { return ( - + Comparaison année sur année