From d2610b2eef3e2077713387c842460e75b994dea2 Mon Sep 17 00:00:00 2001 From: Carlos Escalante Date: Sat, 4 Jul 2026 10:42:20 -0600 Subject: [PATCH] Add shadcn sidebar/breadcrumb/collapsible/avatar/tooltip (base-nova) Registry-installed Base UI flavor; existing ui components untouched. Also drops the meaningless empty registries key from components.json. Co-Authored-By: Claude Opus 4.8 (1M context) --- frontend/components.json | 3 +- frontend/src/components/ui/avatar.tsx | 109 ++++ frontend/src/components/ui/breadcrumb.tsx | 125 ++++ frontend/src/components/ui/collapsible.tsx | 19 + frontend/src/components/ui/sidebar.tsx | 723 +++++++++++++++++++++ frontend/src/components/ui/tooltip.tsx | 64 ++ frontend/src/hooks/use-mobile.ts | 19 + 7 files changed, 1060 insertions(+), 2 deletions(-) create mode 100644 frontend/src/components/ui/avatar.tsx create mode 100644 frontend/src/components/ui/breadcrumb.tsx create mode 100644 frontend/src/components/ui/collapsible.tsx create mode 100644 frontend/src/components/ui/sidebar.tsx create mode 100644 frontend/src/components/ui/tooltip.tsx create mode 100644 frontend/src/hooks/use-mobile.ts diff --git a/frontend/components.json b/frontend/components.json index a0fd556..16eea30 100644 --- a/frontend/components.json +++ b/frontend/components.json @@ -20,6 +20,5 @@ "hooks": "@/hooks" }, "menuColor": "default-translucent", - "menuAccent": "subtle", - "registries": {} + "menuAccent": "subtle" } diff --git a/frontend/src/components/ui/avatar.tsx b/frontend/src/components/ui/avatar.tsx new file mode 100644 index 0000000..e4fed86 --- /dev/null +++ b/frontend/src/components/ui/avatar.tsx @@ -0,0 +1,109 @@ +"use client" + +import * as React from "react" +import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar" + +import { cn } from "@/lib/utils" + +function Avatar({ + className, + size = "default", + ...props +}: AvatarPrimitive.Root.Props & { + size?: "default" | "sm" | "lg" +}) { + return ( + + ) +} + +function AvatarImage({ className, ...props }: AvatarPrimitive.Image.Props) { + return ( + + ) +} + +function AvatarFallback({ + className, + ...props +}: AvatarPrimitive.Fallback.Props) { + return ( + + ) +} + +function AvatarBadge({ className, ...props }: React.ComponentProps<"span">) { + return ( + svg]:hidden", + "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", + "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", + className + )} + {...props} + /> + ) +} + +function AvatarGroup({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function AvatarGroupCount({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3", + className + )} + {...props} + /> + ) +} + +export { + Avatar, + AvatarImage, + AvatarFallback, + AvatarGroup, + AvatarGroupCount, + AvatarBadge, +} diff --git a/frontend/src/components/ui/breadcrumb.tsx b/frontend/src/components/ui/breadcrumb.tsx new file mode 100644 index 0000000..3d85c18 --- /dev/null +++ b/frontend/src/components/ui/breadcrumb.tsx @@ -0,0 +1,125 @@ +import * as React from "react" +import { mergeProps } from "@base-ui/react/merge-props" +import { useRender } from "@base-ui/react/use-render" + +import { cn } from "@/lib/utils" +import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react" + +function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) { + return ( +