feat: trocar cores da topbar de primary-foreground para foreground
Links, triggers, ícones e ações passam a usar text-foreground e hover:bg-foreground/10, removendo o override de CSS vars. Logo text usa dark:invert ao invés de invert sempre. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -29,7 +29,7 @@ export function AppTopbar({
|
|||||||
notificationsSnapshot,
|
notificationsSnapshot,
|
||||||
}: AppTopbarProps) {
|
}: AppTopbarProps) {
|
||||||
return (
|
return (
|
||||||
<header className="fixed top-0 left-0 right-0 z-50 bg-primary shadow-md h-14 shrink-0 flex items-center">
|
<header className="fixed top-0 left-0 right-0 z-50 bg-primary h-14 shrink-0 flex items-center shadow-md">
|
||||||
<div className="w-full max-w-8xl mx-auto px-4 flex items-center gap-3 h-full">
|
<div className="w-full max-w-8xl mx-auto px-4 flex items-center gap-3 h-full">
|
||||||
{/* Logo */}
|
{/* Logo */}
|
||||||
<Link
|
<Link
|
||||||
@@ -49,7 +49,7 @@ export function AppTopbar({
|
|||||||
alt="OpenMonetis"
|
alt="OpenMonetis"
|
||||||
width={90}
|
width={90}
|
||||||
height={28}
|
height={28}
|
||||||
className="object-contain invert hidden sm:block"
|
className="object-contain dark:invert hidden sm:block"
|
||||||
priority
|
priority
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
@@ -57,22 +57,8 @@ export function AppTopbar({
|
|||||||
{/* Navigation */}
|
{/* Navigation */}
|
||||||
<TopNavMenu preLancamentosCount={preLancamentosCount} />
|
<TopNavMenu preLancamentosCount={preLancamentosCount} />
|
||||||
|
|
||||||
{/* Right-side actions — CSS vars overridden so icons render light on primary bg */}
|
{/* Right-side actions */}
|
||||||
<div
|
<div className="ml-auto flex items-center gap-1">
|
||||||
className="ml-auto flex items-center gap-1"
|
|
||||||
style={
|
|
||||||
{
|
|
||||||
"--foreground": "var(--primary-foreground)",
|
|
||||||
"--muted-foreground":
|
|
||||||
"color-mix(in oklch, var(--primary-foreground) 70%, transparent)",
|
|
||||||
"--accent":
|
|
||||||
"color-mix(in oklch, var(--primary-foreground) 15%, transparent)",
|
|
||||||
"--accent-foreground": "var(--primary-foreground)",
|
|
||||||
"--border":
|
|
||||||
"color-mix(in oklch, var(--primary-foreground) 30%, transparent)",
|
|
||||||
} as React.CSSProperties
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<NotificationBell
|
<NotificationBell
|
||||||
notifications={notificationsSnapshot.notifications}
|
notifications={notificationsSnapshot.notifications}
|
||||||
totalCount={notificationsSnapshot.totalCount}
|
totalCount={notificationsSnapshot.totalCount}
|
||||||
@@ -83,12 +69,12 @@ export function AppTopbar({
|
|||||||
<AnimatedThemeToggler />
|
<AnimatedThemeToggler />
|
||||||
<span
|
<span
|
||||||
aria-hidden
|
aria-hidden
|
||||||
className="h-5 w-px bg-primary-foreground/30 mx-1 hidden sm:block"
|
className="h-5 w-px bg-foreground/20 mx-1 hidden sm:block"
|
||||||
/>
|
/>
|
||||||
<FeedbackDialog />
|
<FeedbackDialog />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* User avatar — outside the var-override div so dropdown stays normal */}
|
{/* User avatar */}
|
||||||
<TopbarUser user={user} pagadorAvatarUrl={pagadorAvatarUrl} />
|
<TopbarUser user={user} pagadorAvatarUrl={pagadorAvatarUrl} />
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ type TopNavMenuProps = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const triggerClass =
|
const triggerClass =
|
||||||
"!bg-transparent !text-primary-foreground/90 hover:!bg-primary-foreground/15 hover:!text-primary-foreground focus:!bg-primary-foreground/15 focus:!text-primary-foreground data-[state=open]:!bg-primary-foreground/20 data-[state=open]:!text-primary-foreground";
|
"!bg-transparent !text-foreground/80 hover:!bg-foreground/10 hover:!text-foreground focus:!bg-foreground/10 focus:!text-foreground data-[state=open]:!bg-foreground/10 data-[state=open]:!text-foreground";
|
||||||
|
|
||||||
function SimpleNavLink({
|
function SimpleNavLink({
|
||||||
href,
|
href,
|
||||||
@@ -61,8 +61,8 @@ function SimpleNavLink({
|
|||||||
href={href}
|
href={href}
|
||||||
className={cn(
|
className={cn(
|
||||||
"inline-flex h-9 items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors",
|
"inline-flex h-9 items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors",
|
||||||
"text-primary-foreground/90 hover:text-primary-foreground hover:bg-primary-foreground/15",
|
"text-foreground/80 hover:text-foreground hover:bg-foreground/10",
|
||||||
isActive && "bg-primary-foreground/20 text-primary-foreground",
|
isActive && "bg-foreground/10 text-foreground",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
@@ -128,7 +128,7 @@ function MobileNavLink({
|
|||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",
|
"flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",
|
||||||
"text-foreground hover:bg-accent",
|
"text-card-foreground hover:bg-accent",
|
||||||
isActive && "bg-accent font-medium",
|
isActive && "bg-accent font-medium",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
@@ -268,7 +268,7 @@ export function TopNavMenu({ preLancamentosCount = 0 }: TopNavMenuProps) {
|
|||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="icon"
|
size="icon"
|
||||||
className="md:hidden text-primary-foreground hover:bg-primary-foreground/15 hover:text-primary-foreground"
|
className="md:hidden text-foreground hover:bg-foreground/10 hover:text-foreground"
|
||||||
>
|
>
|
||||||
<RiMenuLine className="size-5" />
|
<RiMenuLine className="size-5" />
|
||||||
<span className="sr-only">Abrir menu</span>
|
<span className="sr-only">Abrir menu</span>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export function TopbarUser({ user, pagadorAvatarUrl }: TopbarUserProps) {
|
|||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="flex items-center rounded-full ring-2 ring-primary-foreground/40 hover:ring-primary-foreground/80 transition-all focus-visible:outline-none focus-visible:ring-primary-foreground"
|
className="flex items-center rounded-full ring-2 ring-foreground/30 hover:ring-foreground/60 transition-all focus-visible:outline-none focus-visible:ring-foreground"
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
src={avatarSrc}
|
src={avatarSrc}
|
||||||
|
|||||||
Reference in New Issue
Block a user