style(ui): atualiza identidade visual

This commit is contained in:
Felipe Coutinho
2026-05-31 15:17:57 -03:00
parent e50eeba36e
commit cdcc677787
9 changed files with 321 additions and 385 deletions

View File

@@ -1,39 +1,125 @@
import { Card, CardContent } from "@/shared/components/ui/card";
import { Skeleton } from "@/shared/components/ui/skeleton";
/**
* Loading state para a página de insights com IA
*/
const providers = [
"openai",
"anthropic",
"google",
"minimax",
"openrouter",
"ollama",
];
const summaryRows = ["period", "data-source"];
export default function InsightsLoading() {
return (
<main className="flex flex-col gap-6">
<div className="space-y-6 pt-4">
{/* Header */}
<div className="space-y-2">
<Skeleton className="h-10 w-64 rounded-md bg-foreground/10" />
<Skeleton className="h-6 w-96 rounded-md bg-foreground/10" />
<Card className="flex w-full flex-row items-center justify-between gap-2 px-3 py-3 sm:px-4">
<div className="flex items-center gap-2">
<Skeleton className="size-8 bg-foreground/10" />
<Skeleton className="h-8 w-40 bg-foreground/10" />
<Skeleton className="size-8 bg-foreground/10" />
</div>
</Card>
{/* Grid de insights */}
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
{Array.from({ length: 4 }).map((_, i) => (
<div key={i} className="rounded-md border p-6 space-y-4">
<div className="flex items-start justify-between">
<div className="space-y-2 flex-1">
<Skeleton className="h-6 w-48 rounded-md bg-foreground/10" />
<Skeleton className="h-4 w-full rounded-md bg-foreground/10" />
<Skeleton className="h-4 w-3/4 rounded-md bg-foreground/10" />
<section className="space-y-4">
<div className="grid items-stretch gap-4 xl:grid-cols-[minmax(0,1fr)_340px]">
<div className="space-y-4">
<Card className="border-border/70 bg-card/95 shadow-sm">
<CardContent className="space-y-6">
<div className="space-y-2">
<Skeleton className="h-8 w-64 bg-foreground/10" />
<Skeleton className="h-4 w-full max-w-2xl bg-foreground/10" />
<Skeleton className="h-4 w-3/4 max-w-xl bg-foreground/10" />
</div>
<div className="space-y-3">
<div className="space-y-2">
<Skeleton className="h-4 w-28 bg-foreground/10" />
<Skeleton className="h-3 w-80 max-w-full bg-foreground/10" />
</div>
<div className="grid gap-3 md:grid-cols-2 xl:grid-cols-3">
{providers.map((provider) => (
<div
className="flex min-h-24 items-start gap-3 rounded-2xl border p-4"
key={provider}
>
<Skeleton className="mt-1 size-4 shrink-0 rounded-full bg-foreground/10" />
<Skeleton className="size-8 shrink-0 rounded-full bg-foreground/10" />
<div className="flex-1 space-y-2">
<Skeleton className="h-4 w-20 bg-foreground/10" />
<Skeleton className="h-3 w-full bg-foreground/10" />
<Skeleton className="h-3 w-3/4 bg-foreground/10" />
</div>
</div>
))}
</div>
</div>
</CardContent>
</Card>
<Card className="border-border/70 bg-card/95 shadow-sm">
<CardContent className="space-y-6">
<div className="space-y-3">
<div className="space-y-2">
<Skeleton className="h-4 w-32 bg-foreground/10" />
<Skeleton className="h-3 w-72 max-w-full bg-foreground/10" />
</div>
<Skeleton className="h-9 w-full max-w-72 bg-foreground/10" />
</div>
<div className="flex items-center justify-between gap-3">
<Skeleton className="h-9 w-24 bg-foreground/10" />
<Skeleton className="h-9 w-32 bg-foreground/10" />
</div>
</CardContent>
</Card>
</div>
<Card className="border-border/70 bg-card/95 shadow-sm">
<CardContent className="flex flex-col gap-4">
<div className="flex items-center gap-3">
<Skeleton className="size-9 rounded-xl bg-foreground/10" />
<div className="space-y-2">
<Skeleton className="h-4 w-32 bg-foreground/10" />
<Skeleton className="h-3 w-24 bg-foreground/10" />
</div>
<Skeleton className="size-8 rounded-full bg-foreground/10" />
</div>
<div className="space-y-2">
<Skeleton className="h-3 w-full rounded-md bg-foreground/10" />
<Skeleton className="h-3 w-full rounded-md bg-foreground/10" />
<Skeleton className="h-3 w-2/3 rounded-md bg-foreground/10" />
<Skeleton className="h-9 w-full bg-foreground/10" />
<Skeleton className="h-8 w-full bg-foreground/10" />
<div className="space-y-4">
{summaryRows.map((row) => (
<div className="flex gap-3" key={row}>
<Skeleton className="size-4 shrink-0 bg-foreground/10" />
<div className="flex-1 space-y-2">
<Skeleton className="h-3 w-24 bg-foreground/10" />
<Skeleton className="h-3 w-full bg-foreground/10" />
</div>
</div>
))}
</div>
</div>
))}
<div className="space-y-3">
<Skeleton className="h-3 w-32 bg-foreground/10" />
<div className="flex items-center gap-3">
<Skeleton className="size-8 rounded-full bg-foreground/10" />
<div className="flex-1 space-y-2">
<Skeleton className="h-4 w-20 bg-foreground/10" />
<Skeleton className="h-3 w-32 bg-foreground/10" />
</div>
</div>
</div>
<Skeleton className="h-20 w-full rounded-2xl bg-foreground/10" />
<Skeleton className="h-20 w-full rounded-2xl bg-foreground/10" />
</CardContent>
</Card>
</div>
</div>
</section>
</main>
);
}

View File

@@ -0,0 +1,61 @@
import { Card, CardContent, CardHeader } from "@/shared/components/ui/card";
import { Skeleton } from "@/shared/components/ui/skeleton";
const installmentCards = ["first", "second", "third"];
export default function Loading() {
return (
<main className="flex flex-col gap-4 pb-8">
<Card className="border-none bg-primary/10 shadow-none">
<CardContent className="flex flex-col items-start justify-center gap-2 py-2">
<Skeleton className="h-4 w-64 bg-foreground/10" />
<Skeleton className="h-9 w-36 bg-foreground/10" />
<Skeleton className="h-4 w-32 bg-foreground/10" />
</CardContent>
</Card>
<Skeleton className="h-8 w-36 bg-foreground/10" />
<div className="grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3">
{installmentCards.map((card) => (
<Card key={card} className="overflow-hidden">
<CardHeader className="pb-0">
<div className="flex items-start gap-2">
<Skeleton className="mt-1 size-4 shrink-0 bg-foreground/10" />
<Skeleton className="size-10 shrink-0 rounded-full bg-foreground/10" />
<div className="flex-1 space-y-2">
<Skeleton className="h-5 w-32 bg-foreground/10" />
<Skeleton className="h-4 w-24 bg-foreground/10" />
</div>
<Skeleton className="h-5 w-16 rounded-full bg-foreground/10" />
</div>
</CardHeader>
<CardContent>
<div className="mb-4 grid grid-cols-2 gap-4 rounded-lg bg-primary/5 p-4">
<div className="space-y-2">
<Skeleton className="h-3 w-24 bg-foreground/10" />
<Skeleton className="h-6 w-20 bg-foreground/10" />
</div>
<div className="flex flex-col items-end gap-2">
<Skeleton className="h-3 w-16 bg-foreground/10" />
<Skeleton className="h-6 w-20 bg-foreground/10" />
</div>
</div>
<div className="mb-4 space-y-2">
<div className="flex items-center justify-between">
<Skeleton className="h-3 w-40 bg-foreground/10" />
<Skeleton className="h-3 w-16 bg-foreground/10" />
</div>
<Skeleton className="h-2.5 w-full bg-foreground/10" />
</div>
<Skeleton className="h-8 w-full bg-foreground/10" />
</CardContent>
</Card>
))}
</div>
</main>
);
}

View File

@@ -117,7 +117,7 @@
--destructive: oklch(62% 0.2 28);
--destructive-foreground: oklch(98% 0.005 30);
--border: oklch(31.987% 0.00462 39.069);
--border: oklch(24.576% 0.0072 67.399);
--input: var(--border);
--ring: var(--primary);
@@ -170,7 +170,7 @@
}
@theme inline {
--default-font-family: var(--font-inter);
--default-font-family: var(--font-bricolage);
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-card: var(--card);

View File

@@ -4,7 +4,7 @@ import { QueryProvider } from "@/shared/components/providers/query-provider";
import { ThemeProvider } from "@/shared/components/providers/theme-provider";
import { Toaster } from "@/shared/components/ui/sonner";
import "./globals.css";
import { inter } from "@/public/fonts/font_index";
import { bricolage } from "@/public/fonts/font_index";
export const metadata: Metadata = {
title: {
@@ -24,7 +24,7 @@ export default function RootLayout({
<html
data-scroll-behavior="smooth"
lang="pt-BR"
className={`${inter.variable}`}
className={`${bricolage.className}`}
suppressHydrationWarning
>
<head>