AppSidebar: menu icon turns teal and gently grows on hover
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
bc92a9b1f7
commit
5d137d4ae6
|
|
@ -215,11 +215,18 @@ function SidebarLink({ item, collapsed }: { item: SidebarNavItem; collapsed: boo
|
|||
aria-current={active ? "page" : undefined}
|
||||
className={cn(
|
||||
base,
|
||||
"group/link",
|
||||
active ? "bg-sidebar-accent text-white" : "text-sidebar-foreground/85 hover:bg-white/[0.04] hover:text-white",
|
||||
)}
|
||||
>
|
||||
{active && <span className="absolute top-2 bottom-2 left-0 w-[3px] rounded-r-full bg-sidebar-primary" />}
|
||||
<Icon className={cn("size-[18px] shrink-0", active && "text-sidebar-primary")} />
|
||||
{/* При наведении иконка окрашивается и чуть увеличивается (без анимации, если в системе «уменьшить движение»). */}
|
||||
<Icon
|
||||
className={cn(
|
||||
"size-[18px] shrink-0 transition-colors group-hover/link:text-sidebar-primary motion-safe:group-hover/link:animate-nav-icon",
|
||||
active && "text-sidebar-primary",
|
||||
)}
|
||||
/>
|
||||
{!collapsed && <span className="truncate">{item.label}</span>}
|
||||
{count > 0 ? (
|
||||
<span
|
||||
|
|
|
|||
|
|
@ -188,6 +188,13 @@
|
|||
50% { opacity: 0.3; }
|
||||
}
|
||||
|
||||
/* Иконка пункта меню при наведении: чуть увеличивается и плавно возвращается */
|
||||
--animate-nav-icon: nav-icon 0.35s ease-out;
|
||||
@keyframes nav-icon {
|
||||
0%, 100% { transform: scale(1); }
|
||||
40% { transform: scale(1.1); }
|
||||
}
|
||||
|
||||
/* Progress без value и LoadingBar: отрезок бежит слева направо */
|
||||
--animate-progress-indeterminate: progress-indeterminate 1.2s ease-in-out infinite;
|
||||
@keyframes progress-indeterminate {
|
||||
|
|
|
|||
Loading…
Reference in New Issue