mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-11-03 03:18:52 +00:00
Squash merge of shadcn-ui/ui main branch into hanzo/ui, bringing in: - [email protected] through [email protected] releases - New apps/v4 directory structure - Registry system improvements and MCP server - Framework support (Vue, Svelte, React Native) - New templates (vite-app, monorepo-next, laravel) - Zod 4 compatibility (scoped override for zod@>4) - Test fixture corrections for alias resolution All 867 merge conflicts resolved preserving Hanzo customizations. 1020/1020 shadcn tests pass.
277 lines
5.5 KiB
TypeScript
277 lines
5.5 KiB
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
import {
|
|
AudioWaveform,
|
|
Blocks,
|
|
Calendar,
|
|
Command,
|
|
Home,
|
|
Inbox,
|
|
MessageCircleQuestion,
|
|
Search,
|
|
Settings2,
|
|
Sparkles,
|
|
Trash2,
|
|
} from "lucide-react"
|
|
|
|
import { NavFavorites } from "@/registry/new-york-v4/blocks/sidebar-10/components/nav-favorites"
|
|
import { NavMain } from "@/registry/new-york-v4/blocks/sidebar-10/components/nav-main"
|
|
import { NavSecondary } from "@/registry/new-york-v4/blocks/sidebar-10/components/nav-secondary"
|
|
import { NavWorkspaces } from "@/registry/new-york-v4/blocks/sidebar-10/components/nav-workspaces"
|
|
import { TeamSwitcher } from "@/registry/new-york-v4/blocks/sidebar-10/components/team-switcher"
|
|
import {
|
|
Sidebar,
|
|
SidebarContent,
|
|
SidebarHeader,
|
|
SidebarRail,
|
|
} from "@/registry/new-york-v4/ui/sidebar"
|
|
|
|
// This is sample data.
|
|
const data = {
|
|
teams: [
|
|
{
|
|
name: "Acme Inc",
|
|
logo: Command,
|
|
plan: "Enterprise",
|
|
},
|
|
{
|
|
name: "Acme Corp.",
|
|
logo: AudioWaveform,
|
|
plan: "Startup",
|
|
},
|
|
{
|
|
name: "Evil Corp.",
|
|
logo: Command,
|
|
plan: "Free",
|
|
},
|
|
],
|
|
navMain: [
|
|
{
|
|
title: "Search",
|
|
url: "#",
|
|
icon: Search,
|
|
},
|
|
{
|
|
title: "Ask AI",
|
|
url: "#",
|
|
icon: Sparkles,
|
|
},
|
|
{
|
|
title: "Home",
|
|
url: "#",
|
|
icon: Home,
|
|
isActive: true,
|
|
},
|
|
{
|
|
title: "Inbox",
|
|
url: "#",
|
|
icon: Inbox,
|
|
badge: "10",
|
|
},
|
|
],
|
|
navSecondary: [
|
|
{
|
|
title: "Calendar",
|
|
url: "#",
|
|
icon: Calendar,
|
|
},
|
|
{
|
|
title: "Settings",
|
|
url: "#",
|
|
icon: Settings2,
|
|
},
|
|
{
|
|
title: "Templates",
|
|
url: "#",
|
|
icon: Blocks,
|
|
},
|
|
{
|
|
title: "Trash",
|
|
url: "#",
|
|
icon: Trash2,
|
|
},
|
|
{
|
|
title: "Help",
|
|
url: "#",
|
|
icon: MessageCircleQuestion,
|
|
},
|
|
],
|
|
favorites: [
|
|
{
|
|
name: "Project Management & Task Tracking",
|
|
url: "#",
|
|
emoji: "π",
|
|
},
|
|
{
|
|
name: "Family Recipe Collection & Meal Planning",
|
|
url: "#",
|
|
emoji: "π³",
|
|
},
|
|
{
|
|
name: "Fitness Tracker & Workout Routines",
|
|
url: "#",
|
|
emoji: "πͺ",
|
|
},
|
|
{
|
|
name: "Book Notes & Reading List",
|
|
url: "#",
|
|
emoji: "π",
|
|
},
|
|
{
|
|
name: "Sustainable Gardening Tips & Plant Care",
|
|
url: "#",
|
|
emoji: "π±",
|
|
},
|
|
{
|
|
name: "Language Learning Progress & Resources",
|
|
url: "#",
|
|
emoji: "π£οΈ",
|
|
},
|
|
{
|
|
name: "Home Renovation Ideas & Budget Tracker",
|
|
url: "#",
|
|
emoji: "π ",
|
|
},
|
|
{
|
|
name: "Personal Finance & Investment Portfolio",
|
|
url: "#",
|
|
emoji: "π°",
|
|
},
|
|
{
|
|
name: "Movie & TV Show Watchlist with Reviews",
|
|
url: "#",
|
|
emoji: "π¬",
|
|
},
|
|
{
|
|
name: "Daily Habit Tracker & Goal Setting",
|
|
url: "#",
|
|
emoji: "β
",
|
|
},
|
|
],
|
|
workspaces: [
|
|
{
|
|
name: "Personal Life Management",
|
|
emoji: "π ",
|
|
pages: [
|
|
{
|
|
name: "Daily Journal & Reflection",
|
|
url: "#",
|
|
emoji: "π",
|
|
},
|
|
{
|
|
name: "Health & Wellness Tracker",
|
|
url: "#",
|
|
emoji: "π",
|
|
},
|
|
{
|
|
name: "Personal Growth & Learning Goals",
|
|
url: "#",
|
|
emoji: "π",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "Professional Development",
|
|
emoji: "πΌ",
|
|
pages: [
|
|
{
|
|
name: "Career Objectives & Milestones",
|
|
url: "#",
|
|
emoji: "π―",
|
|
},
|
|
{
|
|
name: "Skill Acquisition & Training Log",
|
|
url: "#",
|
|
emoji: "π§ ",
|
|
},
|
|
{
|
|
name: "Networking Contacts & Events",
|
|
url: "#",
|
|
emoji: "π€",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "Creative Projects",
|
|
emoji: "π¨",
|
|
pages: [
|
|
{
|
|
name: "Writing Ideas & Story Outlines",
|
|
url: "#",
|
|
emoji: "βοΈ",
|
|
},
|
|
{
|
|
name: "Art & Design Portfolio",
|
|
url: "#",
|
|
emoji: "πΌοΈ",
|
|
},
|
|
{
|
|
name: "Music Composition & Practice Log",
|
|
url: "#",
|
|
emoji: "π΅",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "Home Management",
|
|
emoji: "π‘",
|
|
pages: [
|
|
{
|
|
name: "Household Budget & Expense Tracking",
|
|
url: "#",
|
|
emoji: "π°",
|
|
},
|
|
{
|
|
name: "Home Maintenance Schedule & Tasks",
|
|
url: "#",
|
|
emoji: "π§",
|
|
},
|
|
{
|
|
name: "Family Calendar & Event Planning",
|
|
url: "#",
|
|
emoji: "π
",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "Travel & Adventure",
|
|
emoji: "π§³",
|
|
pages: [
|
|
{
|
|
name: "Trip Planning & Itineraries",
|
|
url: "#",
|
|
emoji: "πΊοΈ",
|
|
},
|
|
{
|
|
name: "Travel Bucket List & Inspiration",
|
|
url: "#",
|
|
emoji: "π",
|
|
},
|
|
{
|
|
name: "Travel Journal & Photo Gallery",
|
|
url: "#",
|
|
emoji: "πΈ",
|
|
},
|
|
],
|
|
},
|
|
],
|
|
}
|
|
|
|
export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
|
return (
|
|
<Sidebar className="border-r-0" {...props}>
|
|
<SidebarHeader>
|
|
<TeamSwitcher teams={data.teams} />
|
|
<NavMain items={data.navMain} />
|
|
</SidebarHeader>
|
|
<SidebarContent>
|
|
<NavFavorites favorites={data.favorites} />
|
|
<NavWorkspaces workspaces={data.workspaces} />
|
|
<NavSecondary items={data.navSecondary} className="mt-auto" />
|
|
</SidebarContent>
|
|
<SidebarRail />
|
|
</Sidebar>
|
|
)
|
|
}
|