diff --git a/src/app/globals.css b/src/app/globals.css index 4d198cf..d7f8f05 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -4,7 +4,7 @@ @custom-variant dark (&:is(.dark *)); @theme { - --spacing-custom-height-card: 29rem; + --spacing-custom-height-card: 30rem; --spacing-8xl: 90rem; } @@ -117,7 +117,7 @@ --destructive: oklch(62% 0.2 28); --destructive-foreground: oklch(98% 0.005 30); - --border: oklch(24.576% 0.0072 67.399); + --border: oklch(29.675% 0.01144 67.3); --input: var(--border); --ring: var(--primary); diff --git a/src/features/dashboard/components/bills/bill-list-item.tsx b/src/features/dashboard/components/bills/bill-list-item.tsx index 69ed460..c1aea55 100644 --- a/src/features/dashboard/components/bills/bill-list-item.tsx +++ b/src/features/dashboard/components/bills/bill-list-item.tsx @@ -65,7 +65,7 @@ export function BillListItem({ bill, period, onPay }: BillListItemProps) { - + {category.percentageChange !== null ? ( + + + vs. mês ant. + + ) : null} diff --git a/src/features/dashboard/components/installment-analysis/installment-group-card.tsx b/src/features/dashboard/components/installment-analysis/installment-group-card.tsx index 9af2294..9d184e8 100644 --- a/src/features/dashboard/components/installment-analysis/installment-group-card.tsx +++ b/src/features/dashboard/components/installment-analysis/installment-group-card.tsx @@ -2,6 +2,7 @@ import { RiBankCard2Line, + RiChat1Line, RiCheckboxCircleFill, RiFileList2Line, RiTimeLine, @@ -30,6 +31,11 @@ import { DialogTitle, } from "@/shared/components/ui/dialog"; import { Progress } from "@/shared/components/ui/progress"; +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from "@/shared/components/ui/tooltip"; import { resolveLogoSrc } from "@/shared/lib/logo"; import { cn } from "@/shared/utils"; import type { InstallmentGroup } from "./types"; @@ -83,6 +89,7 @@ export function InstallmentGroupCard({ ); const cardLogoSrc = resolveLogoSrc(group.cartaoLogo); const cardName = group.cartaoName ?? "Compra parcelada"; + const hasNote = Boolean(group.note?.trim().length); const untrackedLabel = group.untrackedInstallments === 1 ? "1 parcela anterior fora do acompanhamento" @@ -121,8 +128,28 @@ export function InstallmentGroupCard({
- - {group.name} + + {group.name} + {hasNote ? ( + + + + + Ver anotação + + + + {group.note} + + + ) : null} {cardLogoSrc ? ( @@ -235,8 +262,28 @@ export function InstallmentGroupCard({
- - {group.name} + + {group.name} + {hasNote ? ( + + + + + Ver anotação + + + + {group.note} + + + ) : null}
{cardLogoSrc ? ( diff --git a/src/features/dashboard/components/invoices/invoice-list-item.tsx b/src/features/dashboard/components/invoices/invoice-list-item.tsx index afc7761..393e04a 100644 --- a/src/features/dashboard/components/invoices/invoice-list-item.tsx +++ b/src/features/dashboard/components/invoices/invoice-list-item.tsx @@ -123,9 +123,14 @@ export function InvoiceListItem({ invoice, onPay }: InvoiceListItemProps) { className="font-medium" amount={share.amount} /> - + {share.percentageChange !== null ? ( + + + vs. mês ant. + + ) : null}
))} diff --git a/src/features/dashboard/components/widgets/category-trends-widget.tsx b/src/features/dashboard/components/widgets/category-trends-widget.tsx index d8ed241..58a7ea9 100644 --- a/src/features/dashboard/components/widgets/category-trends-widget.tsx +++ b/src/features/dashboard/components/widgets/category-trends-widget.tsx @@ -81,17 +81,20 @@ export function CategoryTrendsWidget({

- + + + vs. mês ant. +
); diff --git a/src/features/dashboard/components/widgets/my-accounts-widget.tsx b/src/features/dashboard/components/widgets/my-accounts-widget.tsx index af87e60..4030273 100644 --- a/src/features/dashboard/components/widgets/my-accounts-widget.tsx +++ b/src/features/dashboard/components/widgets/my-accounts-widget.tsx @@ -144,7 +144,7 @@ export function MyAccountsWidget({ className="flex items-center justify-between py-1.5 transition-all duration-300" >
-
+
{logoSrc ? ( (); const checkOverflow = () => { cancelAnimationFrame(frameId); @@ -44,13 +45,33 @@ export function ExpandableWidgetCard({ }); }; + const observeContentElements = (resizeObserver: ResizeObserver) => { + for (const child of Array.from(element.children)) { + if (!observedElements.has(child)) { + resizeObserver.observe(child); + observedElements.add(child); + } + } + }; + checkOverflow(); const resizeObserver = new ResizeObserver(checkOverflow); resizeObserver.observe(element); + observeContentElements(resizeObserver); + + const mutationObserver = new MutationObserver(() => { + observeContentElements(resizeObserver); + checkOverflow(); + }); + mutationObserver.observe(element, { + childList: true, + subtree: true, + }); return () => { cancelAnimationFrame(frameId); + mutationObserver.disconnect(); resizeObserver.disconnect(); }; }, []);