+
+
)
}
diff --git a/src/components/molecules/DataCard.tsx b/src/components/molecules/DataCard.tsx
index 98fc7d1..b0db6ff 100644
--- a/src/components/molecules/DataCard.tsx
+++ b/src/components/molecules/DataCard.tsx
@@ -1,5 +1,4 @@
-import { Card, CardContent } from '@/components/ui/card'
-import { Skeleton } from '@/components/ui/skeleton'
+import { Card, Stack, Text, Heading, Skeleton, Flex, IconWrapper } from '@/components/atoms'
interface DataCardProps {
title?: string
@@ -27,46 +26,49 @@ export function DataCard({
if (isLoading) {
return (
-
-
-
-
-
+
+
+
+
+
+
+
)
}
return (
-
-
-
+
+
+
{title && (
-
+
{title}
-
+
)}
-
+
{value}
-
+
{description && (
-
+
{description}
-
+
)}
{trend && (
-
+
{trend.positive ? '↑' : '↓'} {trend.value} {trend.label}
-
+
)}
-
+
{icon && (
-
- {icon}
-
+
)}
-
-
+
+
)
}
diff --git a/src/components/molecules/DataSourceCard.tsx b/src/components/molecules/DataSourceCard.tsx
index 1a4b36b..2387604 100644
--- a/src/components/molecules/DataSourceCard.tsx
+++ b/src/components/molecules/DataSourceCard.tsx
@@ -1,11 +1,7 @@
-import { Card, CardContent } from '@/components/ui/card'
-import { Button } from '@/components/ui/button'
-import { Input } from '@/components/ui/input'
-import { Label } from '@/components/ui/label'
+import { Card, Badge, IconButton, Stack, Flex, Text } from '@/components/atoms'
import { DataSourceBadge } from '@/components/atoms/DataSourceBadge'
import { DataSource } from '@/types/json-ui'
import { Pencil, Trash, ArrowsDownUp } from '@phosphor-icons/react'
-import { Badge } from '@/components/ui/badge'
interface DataSourceCardProps {
dataSource: DataSource
@@ -25,21 +21,21 @@ export function DataSourceCard({ dataSource, dependents = [], onEdit, onDelete }
const renderTypeSpecificInfo = () => {
if (dataSource.type === 'kv') {
return (
-
+
Key: {dataSource.key || 'Not set'}
-
+
)
}
if (dataSource.type === 'computed') {
const depCount = getDependencyCount()
return (
-
+
{depCount} {depCount === 1 ? 'dependency' : 'dependencies'}
-
+
)
}
@@ -48,48 +44,45 @@ export function DataSourceCard({ dataSource, dependents = [], onEdit, onDelete }
return (
-
-
-
-
+
+
+
+
-
+
{dataSource.id}
-
-
+
+
{renderTypeSpecificInfo()}
{dependents.length > 0 && (
-
-
+
+
Used by {dependents.length} computed {dependents.length === 1 ? 'source' : 'sources'}
-
+
)}
-
+
-
-
-
+
}
variant="ghost"
+ size="sm"
onClick={() => onDelete(dataSource.id)}
- className="h-8 w-8 p-0 text-destructive hover:text-destructive"
+ className="text-destructive hover:text-destructive"
disabled={dependents.length > 0}
- >
-
-
-
-
-
+ />
+
+
+
)
}
diff --git a/src/components/molecules/EditorActions.tsx b/src/components/molecules/EditorActions.tsx
index 2b01fc6..e004d03 100644
--- a/src/components/molecules/EditorActions.tsx
+++ b/src/components/molecules/EditorActions.tsx
@@ -1,4 +1,4 @@
-import { Button } from '@/components/ui/button'
+import { Button, Flex } from '@/components/atoms'
import { Info, Sparkle } from '@phosphor-icons/react'
interface EditorActionsProps {
@@ -8,14 +8,14 @@ interface EditorActionsProps {
export function EditorActions({ onExplain, onImprove }: EditorActionsProps) {
return (
-
+
}
>
-
Explain
}
>
-
Improve
-
+
)
}
diff --git a/src/components/molecules/EmptyEditorState.tsx b/src/components/molecules/EmptyEditorState.tsx
index e7bca92..587a428 100644
--- a/src/components/molecules/EmptyEditorState.tsx
+++ b/src/components/molecules/EmptyEditorState.tsx
@@ -1,12 +1,13 @@
+import { EmptyStateIcon, Stack, Text } from '@/components/atoms'
import { FileCode } from '@phosphor-icons/react'
export function EmptyEditorState() {
return (
-
-
-
-
Select a file to edit
-
+
+
+ } />
+ Select a file to edit
+
)
}
diff --git a/src/components/molecules/FileTabs.tsx b/src/components/molecules/FileTabs.tsx
index 6fadda6..7d2b83b 100644
--- a/src/components/molecules/FileTabs.tsx
+++ b/src/components/molecules/FileTabs.tsx
@@ -1,5 +1,6 @@
import { ProjectFile } from '@/types/project'
import { FileCode, X } from '@phosphor-icons/react'
+import { Flex } from '@/components/atoms'
interface FileTabsProps {
files: ProjectFile[]
@@ -10,7 +11,7 @@ interface FileTabsProps {
export function FileTabs({ files, activeFileId, onFileSelect, onFileClose }: FileTabsProps) {
return (
-
+
{files.map((file) => (
))}
-
+
)
}
diff --git a/src/components/molecules/LabelWithBadge.tsx b/src/components/molecules/LabelWithBadge.tsx
index b560028..799eea6 100644
--- a/src/components/molecules/LabelWithBadge.tsx
+++ b/src/components/molecules/LabelWithBadge.tsx
@@ -1,4 +1,4 @@
-import { Badge } from '@/components/ui/badge'
+import { Badge, Flex, Text } from '@/components/atoms'
interface LabelWithBadgeProps {
label: string
@@ -12,13 +12,13 @@ export function LabelWithBadge({
badgeVariant = 'secondary'
}: LabelWithBadgeProps) {
return (
-
- {label}
+
+ {label}
{badge !== undefined && (
{badge}
)}
-
+
)
}
diff --git a/src/components/molecules/NavigationItem.tsx b/src/components/molecules/NavigationItem.tsx
index 62b8e67..b5977ab 100644
--- a/src/components/molecules/NavigationItem.tsx
+++ b/src/components/molecules/NavigationItem.tsx
@@ -1,4 +1,4 @@
-import { Badge } from '@/components/ui/badge'
+import { Badge, Flex, Text, IconWrapper } from '@/components/atoms'
interface NavigationItemProps {
icon: React.ReactNode
@@ -24,12 +24,14 @@ export function NavigationItem({
: 'hover:bg-muted text-foreground'
}`}
>
-
- {icon}
-
-
+
+
{label}
-
+
{badge !== undefined && badge > 0 && (
-
- No component selected
- Select a component to edit its properties
+
+
+ } />
+
+ No component selected
+ Select a component to edit its properties
+
+
)
}
@@ -106,33 +108,32 @@ export function PropertyEditor({ component, onUpdate, onDelete }: PropertyEditor
+
{def?.label || component.type}
- #{component.id}
-
+
#{component.id}
+
}
icon={
}
actions={
-
}
variant="ghost"
size="sm"
onClick={onDelete}
className="text-destructive hover:text-destructive hover:bg-destructive/10"
- >
-
-
+ />
}
/>
-
-
-
+
+
+
Component Properties
-
+
{props.map((prop) => (
))}
-
+
-
-
+
+
Common Properties
-
+
{commonProps.map((prop) => (
))}
-
-
+
+
)
diff --git a/src/components/molecules/SearchBar.tsx b/src/components/molecules/SearchBar.tsx
index 36e5da5..f104953 100644
--- a/src/components/molecules/SearchBar.tsx
+++ b/src/components/molecules/SearchBar.tsx
@@ -1,7 +1,5 @@
-import { Input } from '@/components/ui/input'
-import { Button } from '@/components/ui/button'
+import { Input, IconButton, Flex } from '@/components/atoms'
import { MagnifyingGlass, X } from '@phosphor-icons/react'
-import { cn } from '@/lib/utils'
interface SearchBarProps {
value: string
@@ -12,7 +10,7 @@ interface SearchBarProps {
export function SearchBar({ value, onChange, placeholder = 'Search...', className }: SearchBarProps) {
return (
-