feat(dashboard): ajustar layout e estilos

- Adiciona o PrivacyProvider ao layout do dashboard
- Atualiza variáveis de cor no CSS para o tema
- Modifica largura máxima de elementos no componente de tabela
- Remove fonte antropic-sans e substitui por Barlow
- Ajusta classes de estilo em componentes de cartão e sidebar
This commit is contained in:
Felipe Coutinho
2025-12-11 17:43:33 +00:00
parent 0744991edd
commit 0767636eed
10 changed files with 24 additions and 33 deletions

View File

@@ -1,5 +1,5 @@
import { PrivacyProvider } from "@/components/privacy-provider";
import { SiteHeader } from "@/components/header-dashboard"; import { SiteHeader } from "@/components/header-dashboard";
import { PrivacyProvider } from "@/components/privacy-provider";
import { AppSidebar } from "@/components/sidebar/app-sidebar"; import { AppSidebar } from "@/components/sidebar/app-sidebar";
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar"; import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
import { getUserSession } from "@/lib/auth/server"; import { getUserSession } from "@/lib/auth/server";
@@ -52,7 +52,7 @@ export default async function DashboardLayout({
avatarUrl: item.avatarUrl, avatarUrl: item.avatarUrl,
canEdit: item.canEdit, canEdit: item.canEdit,
}))} }))}
variant="inset" variant="sidebar"
/> />
<SidebarInset> <SidebarInset>
<SiteHeader notificationsSnapshot={notificationsSnapshot} /> <SiteHeader notificationsSnapshot={notificationsSnapshot} />

View File

@@ -8,7 +8,7 @@
:root { :root {
/* Base surfaces - warm cream with subtle orange undertone */ /* Base surfaces - warm cream with subtle orange undertone */
--background: oklch(97.512% 0.00674 67.377); --background: oklch(96.563% 0.00504 67.275);
--foreground: oklch(18% 0.02 45); --foreground: oklch(18% 0.02 45);
--card: oklch(100% 0.00011 271.152); --card: oklch(100% 0.00011 271.152);
--card-foreground: oklch(18% 0.02 45); --card-foreground: oklch(18% 0.02 45);
@@ -49,11 +49,11 @@
--chart-6: var(--color-stone-400); --chart-6: var(--color-stone-400);
/* Sidebar - slight elevation from background */ /* Sidebar - slight elevation from background */
--sidebar: oklch(94.637% 0.00925 62.27); --sidebar: oklch(100% 0.00011 271.152);
--sidebar-foreground: oklch(20% 0.02 45); --sidebar-foreground: oklch(20% 0.02 45);
--sidebar-primary: oklch(25% 0.025 45); --sidebar-primary: oklch(25% 0.025 45);
--sidebar-primary-foreground: oklch(98% 0.008 80); --sidebar-primary-foreground: oklch(98% 0.008 80);
--sidebar-accent: oklch(88.94% 0.02161 65.18); --sidebar-accent: oklch(96.563% 0.00504 67.275);
--sidebar-accent-foreground: oklch(22% 0.025 45); --sidebar-accent-foreground: oklch(22% 0.025 45);
--sidebar-border: oklch(58.814% 0.15852 38.26); --sidebar-border: oklch(58.814% 0.15852 38.26);
--sidebar-ring: oklch(69.18% 0.18855 38.353); --sidebar-ring: oklch(69.18% 0.18855 38.353);
@@ -79,7 +79,7 @@
--spacing: 0.25rem; --spacing: 0.25rem;
/* Special components */ /* Special components */
--month-picker: oklch(92.929% 0.01274 63.703); --month-picker: oklch(100% 0.00011 271.152);
--month-picker-foreground: oklch(22% 0.015 45); --month-picker-foreground: oklch(22% 0.015 45);
--dark: oklch(22% 0.015 45); --dark: oklch(22% 0.015 45);
--dark-foreground: oklch(94% 0.008 80); --dark-foreground: oklch(94% 0.008 80);

View File

@@ -188,7 +188,7 @@ const buildColumns = ({
<EstabelecimentoLogo name={name} size={28} /> <EstabelecimentoLogo name={name} size={28} />
<Tooltip> <Tooltip>
<TooltipTrigger asChild> <TooltipTrigger asChild>
<span className="line-clamp-2 max-w-[180px] font-bold truncate"> <span className="line-clamp-2 max-w-[160px] font-semibold truncate">
{name} {name}
</span> </span>
</TooltipTrigger> </TooltipTrigger>

View File

@@ -2,7 +2,6 @@
import { Card } from "@/components/ui/card"; import { Card } from "@/components/ui/card";
import { useMonthPeriod } from "@/hooks/use-month-period"; import { useMonthPeriod } from "@/hooks/use-month-period";
import { main_font } from "@/public/fonts/font_index";
import { useRouter } from "next/navigation"; import { useRouter } from "next/navigation";
import { useEffect, useMemo, useTransition } from "react"; import { useEffect, useMemo, useTransition } from "react";
import LoadingSpinner from "./loading-spinner"; import LoadingSpinner from "./loading-spinner";
@@ -80,9 +79,7 @@ export default function MonthPicker() {
}; };
return ( return (
<Card <Card className="sticky top-0 z-30 w-full flex-row bg-month-picker text-month-picker-foreground p-5">
className={`${main_font.className} sticky top-0 z-30 w-full flex-row border-none bg-month-picker text-month-picker-foreground p-5 shadow-none drop-shadow-none`}
>
<div className="flex items-center gap-1"> <div className="flex items-center gap-1">
<NavigationButton <NavigationButton
direction="left" direction="left"
@@ -92,7 +89,7 @@ export default function MonthPicker() {
<div className="flex items-center"> <div className="flex items-center">
<div <div
className="mx-1 space-x-1 capitalize font-bold tracking-wide" className="mx-1 space-x-1 capitalize font-medium"
aria-current={!isDifferentFromCurrent ? "date" : undefined} aria-current={!isDifferentFromCurrent ? "date" : undefined}
aria-label={`Período selecionado: ${currentMonthLabel} de ${currentYear}`} aria-label={`Período selecionado: ${currentMonthLabel} de ${currentYear}`}
> >

View File

@@ -51,7 +51,7 @@ export function AppSidebar({
<SidebarMenuItem> <SidebarMenuItem>
<SidebarMenuButton <SidebarMenuButton
asChild asChild
className="data-[slot=sidebar-menu-button]:p-1.5!" className="data-[slot=sidebar-menu-button]:px-1.5! hover:bg-transparent"
> >
<a href="/dashboard"> <a href="/dashboard">
<LogoContent /> <LogoContent />

View File

@@ -120,7 +120,7 @@ export function NavMain({ sections }: { sections: NavSection[] }) {
className={itemIsActive ? activeLinkClasses : ""} className={itemIsActive ? activeLinkClasses : ""}
> >
<Link prefetch href={buildHrefWithPeriod(item.url)}> <Link prefetch href={buildHrefWithPeriod(item.url)}>
<item.icon className={"h-4 w-4"} /> <item.icon className="size-4" />
{item.title} {item.title}
</Link> </Link>
</SidebarMenuButton> </SidebarMenuButton>

View File

@@ -7,7 +7,7 @@ function Card({ className, ...props }: React.ComponentProps<"div">) {
<div <div
data-slot="card" data-slot="card"
className={cn( className={cn(
"bg-card text-card-foreground flex flex-col gap-6 border drop-shadow-xs py-6 rounded-md hover:border-primary/50 transition-colors", "bg-card text-card-foreground flex flex-col gap-6 border-transparent border drop-shadow-xs py-6 rounded-md hover:border-primary/50 transition-colors",
className className
)} )}
{...props} {...props}

View File

@@ -235,7 +235,7 @@ function Sidebar({
// Adjust the padding for floating and inset variants. // Adjust the padding for floating and inset variants.
variant === "floating" || variant === "inset" variant === "floating" || variant === "inset"
? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"
: "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=right]:border-l",
className className
)} )}
{...props} {...props}

Binary file not shown.

View File

@@ -1,23 +1,17 @@
import { Funnel_Display } from "next/font/google"; import { Barlow, Inter } from "next/font/google";
import localFont from "next/font/local";
const anthropic_sans = localFont({ const inter = Inter({
src: [
{
path: "../fonts/anthropic-sans.woff2",
weight: "400",
style: "normal",
},
],
});
const funnel_display = Funnel_Display({
subsets: ["latin"], subsets: ["latin"],
weight: ["400", "500", "600", "700"], weight: ["500", "600", "700"],
}); });
const main_font = funnel_display; const barlow = Barlow({
const money_font = anthropic_sans; subsets: ["latin"],
const title_font = funnel_display; weight: "500",
});
const main_font = inter;
const money_font = barlow;
const title_font = inter;
export { main_font, money_font, title_font }; export { main_font, money_font, title_font };