mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-11-03 03:18:52 +00:00
Multiple comprehensive fixes to improve UI/UX across the documentation site: 1. Themes Page: - Changed default theme from "blue" to "neutral" to match shadcn/ui - Updated active-theme.tsx to use "neutral" as DEFAULT_THEME 2. Builder Page (/builder): - Fixed block/component visibility (registry access updated for flat structure) - Added "Open in H" button to toolbar - Fixed drag handles visibility with proper left padding (pl-16) - Updated registry access from Index.default[name] to Index[name] 3. Code Previews: - Fixed missing code previews in documentation pages - ComponentPreview now fetches code from registry JSON files - Added "use client" directive for proper hydration - Falls back to registry when MDX doesn't provide code children 4. Tabs Component: - Cleaned up styling and removed complex dark mode classes - Added smooth transitions (transition-all, transition-colors) - Consistent height (h-10) across all tab implementations - Fixed MDX overrides to match base component styling 5. Logo Fix: - Updated HanzoLogo to always use black fill (#000000) - Removed text-current class that was causing theme inheritance - Ensures black H appears correctly in both light and dark modes 6. Missing Components: - Added 5 missing demo components: android, code-block, code-tabs, gantt, sandbox - Created placeholder UI components for gantt, sandbox, code-tabs - Updated registry/examples.ts and registry/ui.ts Build Status: ✅ All pages render correctly ✅ Code previews working ✅ Themes display properly ✅ Builder fully functional ✅ Drag and drop working ✅ No console errors
13 lines
2.0 KiB
JSON
13 lines
2.0 KiB
JSON
{
|
|
"name": "tabs",
|
|
"dependencies": [
|
|
"@radix-ui/react-tabs"
|
|
],
|
|
"files": [
|
|
{
|
|
"name": "tabs.tsx",
|
|
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Tabs({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return (\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n className={cn(\"flex flex-col gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction TabsList({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={cn(\n \"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TabsTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TabsContent({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return (\n <TabsPrimitive.Content\n data-slot=\"tabs-content\"\n className={cn(\n \"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n"
|
|
}
|
|
],
|
|
"type": "components:ui"
|
|
} |