Files
zeekay 05fc512820 feat: sync upstream shadcn/ui — [email protected], v4 app, font system, chart improvements
Upstream sync from shadcn-ui/ui (1686 commits since last merge base).

Key changes:
- packages/shadcn upgraded to 4.1.0 (CLI font transformers, scaffold from github, chart colors)
- apps/v4 replaces apps/www as the primary docs/registry app
- Font system: 25+ heading font registries, font markers utility, @supports override
- Chart improvements: recharts v3 compat, radial chart fixes
- templates/ updated with monorepo variants (astro, vite, react-router, start)
- skills/shadcn AI skill definitions added
- deprecated/ removed (auth, auth-firebase, cli, www)

Preserved Hanzo-only paths: app/, pkg/, demo/, docs/, template/next/
2026-03-24 19:04:31 -07:00

56 lines
1.4 KiB
TypeScript

"use client"
import Link from "next/link"
import { usePathname } from "next/navigation"
import { registryCategories } from "@/lib/categories"
import { ScrollArea, ScrollBar } from "@/registry/new-york-v4/ui/scroll-area"
export function BlocksNav() {
const pathname = usePathname()
return (
<div className="relative overflow-hidden">
<ScrollArea className="max-w-none">
<div className="flex items-center">
<BlocksNavLink
category={{ name: "Featured", slug: "", hidden: false }}
isActive={pathname === "/blocks"}
/>
{registryCategories.map((category) => (
<BlocksNavLink
key={category.slug}
category={category}
isActive={pathname === `/blocks/${category.slug}`}
/>
))}
</div>
<ScrollBar orientation="horizontal" className="invisible" />
</ScrollArea>
</div>
)
}
function BlocksNavLink({
category,
isActive,
}: {
category: (typeof registryCategories)[number]
isActive: boolean
}) {
if (category.hidden) {
return null
}
return (
<Link
href={`/blocks/${category.slug}`}
key={category.slug}
className="flex h-7 items-center justify-center px-4 text-center text-base font-medium text-muted-foreground transition-colors hover:text-primary data-[active=true]:text-primary"
data-active={isActive}
>
{category.name}
</Link>
)
}