@@ -27,67 +27,56 @@ const TreeNodeComponent = ({
2727
2828 return (
2929 < div className = "relative" >
30- { /* Connecting line for siblings (visual aid, tricky to do perfectly without depth context, so we focus on the left border of the container) */ }
31-
3230 < div
3331 className = { cn (
34- 'group flex items-center py-1.5 px-2 rounded-sm cursor-pointer transition-all duration-200 border border-transparent ' ,
35- 'hover:bg-cyan-950/30 hover:border-cyan-500/20 hover:shadow-[inset_0_0_10px_-5px_cyan] ' ,
36- isOpen && hasChildren && 'bg-slate-900/40' // Active parent state
32+ 'group flex items-center py-1.5 px-2 rounded-sm cursor-pointer transition-colors ' ,
33+ 'hover:bg-accent hover:text-accent-foreground ' ,
34+ isOpen && hasChildren && 'bg-accent/50'
3735 ) }
3836 onClick = { handleClick }
3937 >
40- { /* Indentation adjustment triggered by parent's padding/margin, not calculated prop here to allow CSS lines */ }
41-
4238 { hasChildren ? (
4339 < button
4440 onClick = { handleToggle }
45- className = "mr-2 p-0.5 h-5 w-5 flex items-center justify-center rounded-sm hover:bg-cyan-500/20 text-cyan-600 transition-colors"
41+ className = "mr-2 p-0.5 h-5 w-5 flex items-center justify-center rounded-sm hover:bg-muted text-muted-foreground transition-colors"
4642 >
4743 { isOpen ? (
48- < ChevronDown className = "h-4 w-4 drop-shadow-[0_0_5px_cyan] " />
44+ < ChevronDown className = "h-4 w-4" />
4945 ) : (
5046 < ChevronRight className = "h-4 w-4" />
5147 ) }
5248 </ button >
5349 ) : (
5450 < span className = "mr-2 w-5 flex justify-center" >
55- < div className = "w-1 h-1 rounded-full bg-slate-700/50 group-hover:bg-cyan-500 /50" />
51+ < div className = "w-1 h-1 rounded-full bg-muted-foreground /50" />
5652 </ span >
5753 ) }
5854
5955 { node . icon === 'folder' || hasChildren ? (
6056 isOpen ?
61- < FolderOpen className = "h-4 w-4 mr-2 text-cyan-400 drop-shadow-[0_0_5px_rgba(6,182,212,0.5)] " /> :
62- < Folder className = "h-4 w-4 mr-2 text-cyan-600 group-hover:text-cyan-400 transition-colors" />
57+ < FolderOpen className = "h-4 w-4 mr-2 text-primary " /> :
58+ < Folder className = "h-4 w-4 mr-2 text-muted-foreground group-hover:text-primary transition-colors" />
6359 ) : (
64- < File className = "h-4 w-4 mr-2 text-slate-500 group-hover:text-cyan-200 transition-colors" />
60+ < File className = "h-4 w-4 mr-2 text-muted-foreground group-hover:text-primary transition-colors" />
6561 ) }
6662
6763 < span className = { cn (
68- "text-sm font-mono tracking-wide transition-colors" ,
69- isOpen ? "text-cyan-100 font-bold shadow-cyan-500/20 " : "text-slate-400 group-hover:text-cyan-300 "
64+ "text-sm transition-colors" ,
65+ isOpen ? "font-medium text-foreground " : "text-muted-foreground group-hover:text-foreground "
7066 ) } >
7167 { node . label }
7268 </ span >
7369 </ div >
7470
75- { /* Children Container with Circuit Line */ }
7671 { hasChildren && isOpen && (
77- < div className = "relative ml-[11px] pl-3 border-l border-cyan-800/40 animate-in slide-in-from-left-2 fade-in duration-200" >
78- { /* Decorative little bulb at the junction */ }
79- < div className = "absolute top-0 -left-[1px] -translate-x-1/2 w-1.5 h-1.5 bg-cyan-700/50 rounded-full" />
80-
72+ < div className = "relative ml-[11px] pl-3 border-l border-border animate-in slide-in-from-left-2 fade-in duration-200" >
8173 { node . children ! . map ( ( child ) => (
8274 < TreeNodeComponent
8375 key = { child . id }
8476 node = { child }
8577 onNodeClick = { onNodeClick }
8678 />
8779 ) ) }
88-
89- { /* Decorative end cap */ }
90- < div className = "absolute bottom-0 -left-[1px] -translate-x-1/2 w-1 h-1 bg-cyan-800/50 rounded-full" />
9180 </ div >
9281 ) }
9382 </ div >
@@ -104,23 +93,18 @@ ComponentRegistry.register('tree-view',
10493
10594 return (
10695 < div className = { cn (
107- 'relative border border-border/60 rounded-lg p-3 bg-card/40 backdrop-blur-md overflow-hidden' ,
108- 'shadow-lg shadow-primary/5' ,
96+ 'relative border rounded-lg p-3 bg-card text-card-foreground' ,
10997 className
11098 ) }
11199 { ...props }
112100 >
113- { /* Background Grid */ }
114- < div className = "absolute inset-0 bg-[linear-gradient(to_right,hsl(var(--border)/0.1)_1px,transparent_1px),linear-gradient(to_bottom,hsl(var(--border)/0.1)_1px,transparent_1px)] bg-[size:24px_24px] pointer-events-none" />
115-
116101 { schema . title && (
117- < div className = "flex items-center gap-2 mb-3 pb-2 border-b border-primary/20 relative z-10" >
118- < CircuitBoard className = "w-4 h-4 text-primary" />
119- < h3 className = "text-xs font-bold font-mono uppercase tracking-widest text-primary" > { schema . title } </ h3 >
102+ < div className = "flex items-center gap-2 mb-3 pb-2 border-b" >
103+ < h3 className = "text-sm font-semibold" > { schema . title } </ h3 >
120104 </ div >
121105 ) }
122- < div className = "space-y-1 relative z-10 " >
123- { schema . nodes ?. map ( ( node : TreeNode ) => (
106+ < div className = "space-y-1" >
107+ { ( schema . nodes || schema . data ) ?. map ( ( node : TreeNode ) => (
124108 < TreeNodeComponent
125109 key = { node . id }
126110 node = { node }
0 commit comments