mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-03-10 04:51:47 +00:00
feat: melhora responsividade e dialogos da interface
This commit is contained in:
@@ -36,7 +36,7 @@ export function CardCategoryBreakdown({ data }: CardCategoryBreakdownProps) {
|
||||
const _totalAmount = data.reduce((acc, c) => acc + c.amount, 0);
|
||||
|
||||
return (
|
||||
<Card className="h-full">
|
||||
<Card className="h-full overflow-hidden">
|
||||
<CardHeader className="pb-3">
|
||||
<CardTitle className="flex items-center gap-1.5 text-base">
|
||||
<RiPieChartLine className="size-4 text-primary" />
|
||||
@@ -44,7 +44,7 @@ export function CardCategoryBreakdown({ data }: CardCategoryBreakdownProps) {
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
|
||||
<CardContent className="pt-0">
|
||||
<CardContent className="overflow-x-hidden pt-0">
|
||||
<div className="flex flex-col">
|
||||
{data.map((category, index) => (
|
||||
<div
|
||||
@@ -80,7 +80,7 @@ export function CardCategoryBreakdown({ data }: CardCategoryBreakdownProps) {
|
||||
</div>
|
||||
|
||||
{/* Progress bar */}
|
||||
<div className="ml-11 mt-1.5">
|
||||
<div className="pl-11 mt-1.5">
|
||||
<Progress className="h-1.5" value={category.percent} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -38,14 +38,14 @@ export function CardTopExpenses({ data }: CardTopExpensesProps) {
|
||||
const maxAmount = Math.max(...data.map((e) => e.amount));
|
||||
|
||||
return (
|
||||
<Card className="h-full">
|
||||
<Card className="h-full overflow-hidden">
|
||||
<CardHeader className="pb-3">
|
||||
<CardTitle className="flex items-center gap-1.5 text-base">
|
||||
<RiShoppingBag3Line className="size-4 text-primary" />
|
||||
Top 10 Gastos do Mês
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent className="pt-0">
|
||||
<CardContent className="overflow-x-hidden pt-0">
|
||||
<div className="flex flex-col">
|
||||
{data.map((expense, index) => (
|
||||
<div
|
||||
@@ -66,14 +66,14 @@ export function CardTopExpenses({ data }: CardTopExpensesProps) {
|
||||
<span className="text-sm font-medium truncate block">
|
||||
{expense.name}
|
||||
</span>
|
||||
<div className="flex items-center gap-1 mt-0.5 flex-wrap">
|
||||
<div className="mt-0.5 flex min-w-0 flex-col gap-0.5">
|
||||
<span className="text-xs text-muted-foreground">
|
||||
{expense.date}
|
||||
</span>
|
||||
{expense.category && (
|
||||
<Badge
|
||||
variant="secondary"
|
||||
className="text-xs px-1.5 py-0 h-5"
|
||||
className="h-5 max-w-full px-1.5 py-0 text-xs truncate"
|
||||
>
|
||||
{expense.category}
|
||||
</Badge>
|
||||
@@ -92,7 +92,7 @@ export function CardTopExpenses({ data }: CardTopExpensesProps) {
|
||||
</div>
|
||||
|
||||
{/* Progress bar */}
|
||||
<div className="ml-12 mt-1.5">
|
||||
<div className="pl-12 mt-1.5">
|
||||
<Progress
|
||||
className="h-1.5"
|
||||
value={(expense.amount / maxAmount) * 100}
|
||||
|
||||
@@ -80,14 +80,14 @@ export function CardUsageChart({ data, limit, card }: CardUsageChartProps) {
|
||||
return (
|
||||
<Card>
|
||||
<CardHeader className="pb-2">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<CardTitle className="flex items-center gap-1.5 text-base">
|
||||
<RiBarChartBoxLine className="size-4 text-primary" />
|
||||
Histórico de Uso
|
||||
</CardTitle>
|
||||
|
||||
{/* Card logo and name */}
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="flex min-w-0 items-center gap-2">
|
||||
{logoPath ? (
|
||||
<Image
|
||||
src={logoPath}
|
||||
@@ -99,13 +99,13 @@ export function CardUsageChart({ data, limit, card }: CardUsageChartProps) {
|
||||
) : (
|
||||
<RiBankCard2Line className="size-5 text-muted-foreground" />
|
||||
)}
|
||||
<span className="text-sm font-medium text-muted-foreground">
|
||||
<span className="max-w-24 truncate text-sm font-medium text-muted-foreground sm:max-w-none">
|
||||
{card.name}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<CardContent className="px-2 sm:px-6">
|
||||
<ChartContainer config={chartConfig} className="h-[280px] w-full">
|
||||
<BarChart
|
||||
data={chartData}
|
||||
|
||||
Reference in New Issue
Block a user