refactor(nav): remover sidebar, unificar navegação na navbar

Componentes da sidebar lateral (app-sidebar, nav-main, nav-secondary,
nav-user, nav-link), sidebar.tsx e use-mobile.ts removidos.
Barrel exports órfãos de shared/hooks, shared/components/providers,
shared/lib/schemas e shared/lib/types também removidos.
Navbar recebe ajustes menores de markup e acessibilidade.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Felipe Coutinho
2026-04-20 17:52:07 +00:00
parent ba05985725
commit 5d84ae928a
19 changed files with 25 additions and 1382 deletions

View File

@@ -25,10 +25,10 @@ export function NavDropdown({ items }: NavDropdownProps) {
href={item.href}
preservePeriod={item.preservePeriod}
className={cn(
"flex items-center gap-3 rounded-sm px-2 py-2 text-sm transition-colors",
"flex items-center gap-3 rounded-sm px-2 py-3 text-sm transition-colors",
isActive
? "bg-accent text-foreground"
: "text-foreground hover:bg-accent",
? "border-primary bg-accent text-foreground"
: "border-transparent text-foreground hover:bg-accent",
)}
>
<span

View File

@@ -29,9 +29,10 @@ import { NavPill } from "./nav-pill";
import { MobileTools, NavToolsDropdown } from "./nav-tools";
const triggerClass =
"h-8! rounded-md! px-2! py-0! text-sm! font-medium! bg-transparent! shadow-none! capitalize! [&_svg]:text-current! text-black/75! hover:text-black! hover:bg-black/10! focus:text-black! focus:bg-black/10! focus-visible:ring-black/20! data-[state=open]:text-black! data-[state=open]:bg-black/10!";
"h-8! rounded-md! px-2! py-0! text-sm! font-medium! bg-transparent! shadow-none! capitalize! [&_svg]:text-current! text-black/75! hover:text-black! hover:bg-black/10! focus:text-black! focus:bg-black/10! focus-visible:ring-black/20! data-[state=open]:text-black! data-[state=open]:bg-black/10! dark:text-white/75! dark:hover:text-white! dark:hover:bg-white/10! dark:focus:text-white! dark:focus:bg-white/10! dark:focus-visible:ring-white/20! dark:data-[state=open]:text-white! dark:data-[state=open]:bg-white/10!";
const triggerActiveClass = "bg-black/15! text-black!";
const triggerActiveClass =
"bg-black/15! text-black! dark:bg-white/15! dark:text-white!";
export function NavMenu() {
const pathname = usePathname();

View File

@@ -26,7 +26,7 @@ export function NavPill({ href, preservePeriod, children }: NavPillProps) {
className={cn(
buttonVariants({ variant: "navbar", size: "sm" }),
"capitalize",
isActive && "bg-black/15 text-black",
isActive && "bg-black/15 text-black dark:bg-white/15 dark:text-white",
)}
>
{children}

View File

@@ -5,7 +5,7 @@ import { usePrivacyMode } from "@/shared/components/providers/privacy-provider";
import { Badge } from "@/shared/components/ui/badge";
const itemClass =
"flex w-full items-center gap-2.5 rounded-sm px-2 py-2 text-sm text-foreground hover:bg-accent transition-colors cursor-pointer";
"flex w-full items-center gap-2.5 rounded-sm px-2 py-3 text-sm text-foreground hover:bg-accent transition-colors cursor-pointer";
type NavToolsDropdownProps = {
onOpenCalculator: () => void;
@@ -22,7 +22,7 @@ export function NavToolsDropdown({ onOpenCalculator }: NavToolsDropdownProps) {
<RiCalculatorLine className="size-4" />
</span>
<span className="flex flex-col flex-1 text-left">
<span className="font-medium">Calculadora</span>
<span className="font-semibold">Calculadora</span>
<span className="text-xs text-muted-foreground lowercase">
Faça cálculos rápidos
</span>
@@ -39,7 +39,7 @@ export function NavToolsDropdown({ onOpenCalculator }: NavToolsDropdownProps) {
)}
</span>
<span className="flex flex-col flex-1 text-left">
<span className="font-medium">Privacidade</span>
<span className="font-semibold">Privacidade</span>
<span className="text-xs text-muted-foreground lowercase">
Oculta valores na tela
</span>

View File

@@ -16,15 +16,21 @@ export function NavbarShell({
return (
<header
className={`${positionClass} z-50 flex h-16 shrink-0 items-center bg-primary`}
className={`${positionClass} z-50 flex h-16 shrink-0 items-center bg-primary border-b dark:bg-card dark:border-b-border/60`}
>
<div className="relative z-10 mx-auto flex h-full w-full max-w-8xl items-center gap-4 px-4">
{logoHref ? (
<Link href={logoHref} className="shrink-0">
<Logo variant="compact" invertTextOnDark={false} />
<Logo
variant="compact"
iconClassName="dark:brightness-100 dark:saturate-100"
/>
</Link>
) : (
<Logo variant="compact" invertTextOnDark={false} />
<Logo
variant="compact"
iconClassName="dark:brightness-100 dark:saturate-100"
/>
)}
{children}
</div>

View File

@@ -34,9 +34,11 @@ export function NotificationBellTrigger({
className={cn(
buttonVariants({ variant: "ghost", size: "icon-sm" }),
"group relative shadow-none transition-all duration-200",
"hover:border-black/20 hover:bg-black/10 hover:text-black focus-visible:ring-2 focus-visible:ring-black/20",
"data-[state=open]:bg-black/10 data-[state=open]:text-black",
hasAnySourceItems ? "text-black" : "text-black/75",
"hover:border-black/20 hover:bg-black/10 hover:text-black focus-visible:ring-2 focus-visible:ring-black/20 dark:hover:border-white/20 dark:hover:bg-white/10 dark:hover:text-white dark:focus-visible:ring-white/20",
"data-[state=open]:bg-black/10 data-[state=open]:text-black dark:data-[state=open]:bg-white/10 dark:data-[state=open]:text-white",
hasAnySourceItems
? "text-black dark:text-white"
: "text-black/75 dark:text-white/75",
)}
>
<RiNotification2Line

View File

@@ -8,7 +8,7 @@ import {
markDashboardNotificationAsReadAction,
markDashboardNotificationAsUnreadAction,
unarchiveDashboardNotificationAction,
} from "@/features/dashboard/notifications-actions";
} from "@/features/dashboard/notifications/notifications-actions";
import type {
NotificationActionState,
NotificationBellProps,