@castlekit/castle 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -1
- package/bin/castle.js +94 -0
- package/install.sh +722 -0
- package/next.config.ts +7 -0
- package/package.json +54 -5
- package/postcss.config.mjs +7 -0
- package/src/app/api/avatars/[id]/route.ts +75 -0
- package/src/app/api/openclaw/agents/route.ts +107 -0
- package/src/app/api/openclaw/config/route.ts +94 -0
- package/src/app/api/openclaw/events/route.ts +96 -0
- package/src/app/api/openclaw/logs/route.ts +59 -0
- package/src/app/api/openclaw/ping/route.ts +68 -0
- package/src/app/api/openclaw/restart/route.ts +65 -0
- package/src/app/api/openclaw/sessions/route.ts +62 -0
- package/src/app/globals.css +286 -0
- package/src/app/icon.png +0 -0
- package/src/app/layout.tsx +42 -0
- package/src/app/page.tsx +269 -0
- package/src/app/ui-kit/page.tsx +684 -0
- package/src/cli/onboarding.ts +576 -0
- package/src/components/dashboard/agent-status.tsx +107 -0
- package/src/components/dashboard/glass-card.tsx +28 -0
- package/src/components/dashboard/goal-widget.tsx +174 -0
- package/src/components/dashboard/greeting-widget.tsx +78 -0
- package/src/components/dashboard/index.ts +7 -0
- package/src/components/dashboard/stat-widget.tsx +61 -0
- package/src/components/dashboard/stock-widget.tsx +164 -0
- package/src/components/dashboard/weather-widget.tsx +68 -0
- package/src/components/icons/castle-icon.tsx +21 -0
- package/src/components/kanban/index.ts +3 -0
- package/src/components/kanban/kanban-board.tsx +391 -0
- package/src/components/kanban/kanban-card.tsx +137 -0
- package/src/components/kanban/kanban-column.tsx +98 -0
- package/src/components/layout/index.ts +4 -0
- package/src/components/layout/page-header.tsx +20 -0
- package/src/components/layout/sidebar.tsx +128 -0
- package/src/components/layout/theme-toggle.tsx +59 -0
- package/src/components/layout/user-menu.tsx +72 -0
- package/src/components/ui/alert.tsx +72 -0
- package/src/components/ui/avatar.tsx +87 -0
- package/src/components/ui/badge.tsx +39 -0
- package/src/components/ui/button.tsx +43 -0
- package/src/components/ui/card.tsx +107 -0
- package/src/components/ui/checkbox.tsx +56 -0
- package/src/components/ui/clock.tsx +171 -0
- package/src/components/ui/dialog.tsx +105 -0
- package/src/components/ui/index.ts +34 -0
- package/src/components/ui/input.tsx +112 -0
- package/src/components/ui/option-card.tsx +151 -0
- package/src/components/ui/progress.tsx +103 -0
- package/src/components/ui/radio.tsx +109 -0
- package/src/components/ui/select.tsx +46 -0
- package/src/components/ui/slider.tsx +62 -0
- package/src/components/ui/tabs.tsx +132 -0
- package/src/components/ui/toggle-group.tsx +85 -0
- package/src/components/ui/toggle.tsx +78 -0
- package/src/components/ui/tooltip.tsx +145 -0
- package/src/components/ui/uptime.tsx +106 -0
- package/src/lib/config.ts +195 -0
- package/src/lib/gateway-connection.ts +391 -0
- package/src/lib/hooks/use-openclaw.ts +163 -0
- package/src/lib/utils.ts +6 -0
- package/tsconfig.json +34 -0
|
@@ -0,0 +1,684 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import {
|
|
5
|
+
Users,
|
|
6
|
+
TrendingUp,
|
|
7
|
+
Clock,
|
|
8
|
+
Activity,
|
|
9
|
+
Database,
|
|
10
|
+
LayoutDashboard,
|
|
11
|
+
List,
|
|
12
|
+
Table,
|
|
13
|
+
} from "lucide-react";
|
|
14
|
+
|
|
15
|
+
// UI Components
|
|
16
|
+
import {
|
|
17
|
+
Button,
|
|
18
|
+
Card,
|
|
19
|
+
CardHeader,
|
|
20
|
+
CardTitle,
|
|
21
|
+
CardDescription,
|
|
22
|
+
CardContent,
|
|
23
|
+
CardFooter,
|
|
24
|
+
Input,
|
|
25
|
+
Textarea,
|
|
26
|
+
Badge,
|
|
27
|
+
Avatar,
|
|
28
|
+
AvatarFallback,
|
|
29
|
+
Toggle,
|
|
30
|
+
Select,
|
|
31
|
+
Checkbox,
|
|
32
|
+
Dialog,
|
|
33
|
+
DialogHeader,
|
|
34
|
+
DialogTitle,
|
|
35
|
+
DialogDescription,
|
|
36
|
+
DialogFooter,
|
|
37
|
+
Alert,
|
|
38
|
+
Slider,
|
|
39
|
+
Tooltip,
|
|
40
|
+
RadioGroup,
|
|
41
|
+
RadioGroupItem,
|
|
42
|
+
OptionCardGroup,
|
|
43
|
+
OptionCard,
|
|
44
|
+
CheckboxCard,
|
|
45
|
+
ToggleGroup,
|
|
46
|
+
ToggleGroupItem,
|
|
47
|
+
Uptime,
|
|
48
|
+
Tabs,
|
|
49
|
+
TabsList,
|
|
50
|
+
TabsTrigger,
|
|
51
|
+
TabsContent,
|
|
52
|
+
Progress,
|
|
53
|
+
Clock as AnalogClock,
|
|
54
|
+
} from "@/components/ui";
|
|
55
|
+
|
|
56
|
+
// Dashboard Components
|
|
57
|
+
import {
|
|
58
|
+
GlassCard,
|
|
59
|
+
GreetingWidget,
|
|
60
|
+
WeatherWidget,
|
|
61
|
+
AgentStatusWidget,
|
|
62
|
+
StatWidget,
|
|
63
|
+
StockWidget,
|
|
64
|
+
GoalWidget,
|
|
65
|
+
} from "@/components/dashboard";
|
|
66
|
+
|
|
67
|
+
// Kanban Components
|
|
68
|
+
import { KanbanBoard } from "@/components/kanban";
|
|
69
|
+
|
|
70
|
+
// Layout Components
|
|
71
|
+
import { Sidebar, UserMenu } from "@/components/layout";
|
|
72
|
+
|
|
73
|
+
// Demo section wrapper
|
|
74
|
+
function DemoSection({
|
|
75
|
+
title,
|
|
76
|
+
description,
|
|
77
|
+
children,
|
|
78
|
+
className = "",
|
|
79
|
+
}: {
|
|
80
|
+
title: string;
|
|
81
|
+
description?: string;
|
|
82
|
+
children: React.ReactNode;
|
|
83
|
+
className?: string;
|
|
84
|
+
}) {
|
|
85
|
+
return (
|
|
86
|
+
<section className={`mb-16 ${className}`}>
|
|
87
|
+
<div className="mb-6">
|
|
88
|
+
<h2 className="text-2xl font-semibold text-foreground">{title}</h2>
|
|
89
|
+
{description && <p className="text-foreground-secondary mt-1">{description}</p>}
|
|
90
|
+
</div>
|
|
91
|
+
{children}
|
|
92
|
+
</section>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Subsection wrapper
|
|
97
|
+
function DemoSubsection({ title, children }: { title: string; children: React.ReactNode }) {
|
|
98
|
+
return (
|
|
99
|
+
<div className="mb-8">
|
|
100
|
+
<h3 className="text-sm font-medium text-foreground-muted uppercase tracking-wider mb-4">
|
|
101
|
+
{title}
|
|
102
|
+
</h3>
|
|
103
|
+
{children}
|
|
104
|
+
</div>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export default function UiKitPage() {
|
|
109
|
+
const [toggleState, setToggleState] = useState(false);
|
|
110
|
+
const [toggleState2, setToggleState2] = useState(true);
|
|
111
|
+
const [radioValue, setRadioValue] = useState("option1");
|
|
112
|
+
const [optionCardValue, setOptionCardValue] = useState("plan1");
|
|
113
|
+
const [checkboxCard1, setCheckboxCard1] = useState(true);
|
|
114
|
+
const [checkboxCard2, setCheckboxCard2] = useState(false);
|
|
115
|
+
const [viewMode, setViewMode] = useState("grid");
|
|
116
|
+
const [activeTab, setActiveTab] = useState("general");
|
|
117
|
+
const [checkboxState, setCheckboxState] = useState(false);
|
|
118
|
+
const [dialogOpen, setDialogOpen] = useState(false);
|
|
119
|
+
|
|
120
|
+
return (
|
|
121
|
+
<div className="min-h-screen bg-background">
|
|
122
|
+
<Sidebar variant="solid" />
|
|
123
|
+
<UserMenu className="fixed top-5 right-6 z-50" variant="solid" />
|
|
124
|
+
|
|
125
|
+
<main className="min-h-screen ml-[80px]">
|
|
126
|
+
<div className="p-8 w-full">
|
|
127
|
+
<DemoSection
|
|
128
|
+
title="UI Kit"
|
|
129
|
+
description="Design system + components for Castle"
|
|
130
|
+
>
|
|
131
|
+
<Alert variant="info">
|
|
132
|
+
This is the internal UI kit page. All components from the Castle design system are shown here as a living reference.
|
|
133
|
+
</Alert>
|
|
134
|
+
</DemoSection>
|
|
135
|
+
|
|
136
|
+
{/* Section 1: Design Tokens */}
|
|
137
|
+
<DemoSection
|
|
138
|
+
title="Design Tokens"
|
|
139
|
+
description="The foundation of the Castle design system"
|
|
140
|
+
>
|
|
141
|
+
<DemoSubsection title="Colors">
|
|
142
|
+
<div className="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4">
|
|
143
|
+
<div className="space-y-2">
|
|
144
|
+
<div className="h-16 rounded-[var(--radius-md)] bg-background border border-border" />
|
|
145
|
+
<p className="text-xs text-foreground-muted">Background</p>
|
|
146
|
+
</div>
|
|
147
|
+
<div className="space-y-2">
|
|
148
|
+
<div className="h-16 rounded-[var(--radius-md)] bg-background-secondary border border-border" />
|
|
149
|
+
<p className="text-xs text-foreground-muted">Background Secondary</p>
|
|
150
|
+
</div>
|
|
151
|
+
<div className="space-y-2">
|
|
152
|
+
<div className="h-16 rounded-[var(--radius-md)] bg-surface border border-border" />
|
|
153
|
+
<p className="text-xs text-foreground-muted">Surface</p>
|
|
154
|
+
</div>
|
|
155
|
+
<div className="space-y-2">
|
|
156
|
+
<div className="h-16 rounded-[var(--radius-md)] bg-accent" />
|
|
157
|
+
<p className="text-xs text-foreground-muted">Accent</p>
|
|
158
|
+
</div>
|
|
159
|
+
<div className="space-y-2">
|
|
160
|
+
<div className="h-16 rounded-[var(--radius-md)] bg-success" />
|
|
161
|
+
<p className="text-xs text-foreground-muted">Success</p>
|
|
162
|
+
</div>
|
|
163
|
+
<div className="space-y-2">
|
|
164
|
+
<div className="h-16 rounded-[var(--radius-md)] bg-error" />
|
|
165
|
+
<p className="text-xs text-foreground-muted">Error</p>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
</DemoSubsection>
|
|
169
|
+
|
|
170
|
+
<DemoSubsection title="Typography">
|
|
171
|
+
<div className="space-y-4">
|
|
172
|
+
<div>
|
|
173
|
+
<p className="text-5xl font-semibold text-foreground">Display Text</p>
|
|
174
|
+
<p className="text-xs text-foreground-muted mt-1">48px / Semibold</p>
|
|
175
|
+
</div>
|
|
176
|
+
<div>
|
|
177
|
+
<p className="text-3xl font-semibold text-foreground">Heading 1</p>
|
|
178
|
+
<p className="text-xs text-foreground-muted mt-1">32px / Semibold</p>
|
|
179
|
+
</div>
|
|
180
|
+
<div>
|
|
181
|
+
<p className="text-2xl font-semibold text-foreground">Heading 2</p>
|
|
182
|
+
<p className="text-xs text-foreground-muted mt-1">24px / Semibold</p>
|
|
183
|
+
</div>
|
|
184
|
+
<div>
|
|
185
|
+
<p className="text-lg font-medium text-foreground">Heading 3</p>
|
|
186
|
+
<p className="text-xs text-foreground-muted mt-1">18px / Medium</p>
|
|
187
|
+
</div>
|
|
188
|
+
<div>
|
|
189
|
+
<p className="text-base text-foreground">
|
|
190
|
+
Body text - The quick brown fox jumps over the lazy dog.
|
|
191
|
+
</p>
|
|
192
|
+
<p className="text-xs text-foreground-muted mt-1">16px / Regular</p>
|
|
193
|
+
</div>
|
|
194
|
+
<div>
|
|
195
|
+
<p className="text-sm text-foreground-secondary">
|
|
196
|
+
Small text - Secondary content and descriptions.
|
|
197
|
+
</p>
|
|
198
|
+
<p className="text-xs text-foreground-muted mt-1">14px / Regular</p>
|
|
199
|
+
</div>
|
|
200
|
+
<div>
|
|
201
|
+
<p className="text-xs text-foreground-muted">Tiny text - Labels and metadata</p>
|
|
202
|
+
<p className="text-xs text-foreground-muted mt-1">12px / Regular</p>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
</DemoSubsection>
|
|
206
|
+
|
|
207
|
+
<DemoSubsection title="Border Radius">
|
|
208
|
+
<div className="flex gap-4 items-end">
|
|
209
|
+
<div className="space-y-2">
|
|
210
|
+
<div className="h-16 w-16 bg-accent rounded-[var(--radius-sm)]" />
|
|
211
|
+
<p className="text-xs text-foreground-muted">Small (6px)</p>
|
|
212
|
+
</div>
|
|
213
|
+
<div className="space-y-2">
|
|
214
|
+
<div className="h-16 w-16 bg-accent rounded-[var(--radius-md)]" />
|
|
215
|
+
<p className="text-xs text-foreground-muted">Medium (12px)</p>
|
|
216
|
+
</div>
|
|
217
|
+
<div className="space-y-2">
|
|
218
|
+
<div className="h-16 w-16 bg-accent rounded-[var(--radius-lg)]" />
|
|
219
|
+
<p className="text-xs text-foreground-muted">Large (16px)</p>
|
|
220
|
+
</div>
|
|
221
|
+
<div className="space-y-2">
|
|
222
|
+
<div className="h-16 w-16 bg-accent rounded-[var(--radius-full)]" />
|
|
223
|
+
<p className="text-xs text-foreground-muted">Full</p>
|
|
224
|
+
</div>
|
|
225
|
+
</div>
|
|
226
|
+
</DemoSubsection>
|
|
227
|
+
</DemoSection>
|
|
228
|
+
|
|
229
|
+
{/* Section 2: App Components */}
|
|
230
|
+
<DemoSection
|
|
231
|
+
title="App Components"
|
|
232
|
+
description="Solid components for Projects and Watchtower pages"
|
|
233
|
+
>
|
|
234
|
+
<DemoSubsection title="Buttons">
|
|
235
|
+
<div className="flex flex-wrap gap-4 items-center">
|
|
236
|
+
<Button variant="primary">Primary</Button>
|
|
237
|
+
<Button variant="secondary">Secondary</Button>
|
|
238
|
+
<Button variant="outline">Outline</Button>
|
|
239
|
+
<Button variant="ghost">Ghost</Button>
|
|
240
|
+
<Button variant="destructive">Destructive</Button>
|
|
241
|
+
</div>
|
|
242
|
+
<div className="flex flex-wrap gap-4 items-center mt-4">
|
|
243
|
+
<Button size="sm">Small</Button>
|
|
244
|
+
<Button size="md">Medium</Button>
|
|
245
|
+
<Button size="lg">Large</Button>
|
|
246
|
+
<Button size="icon">
|
|
247
|
+
<Activity className="h-4 w-4" />
|
|
248
|
+
</Button>
|
|
249
|
+
</div>
|
|
250
|
+
<div className="flex flex-wrap gap-4 items-center mt-4">
|
|
251
|
+
<Button disabled>Disabled</Button>
|
|
252
|
+
</div>
|
|
253
|
+
</DemoSubsection>
|
|
254
|
+
|
|
255
|
+
<DemoSubsection title="Form Controls">
|
|
256
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 max-w-2xl">
|
|
257
|
+
<Input label="Title" placeholder="Enter text..." />
|
|
258
|
+
<Input label="With Error" placeholder="Invalid input" error />
|
|
259
|
+
<Input label="Price" startAddon="$" type="number" placeholder="0.00" />
|
|
260
|
+
<Input label="Percentage" endAddon="%" type="number" placeholder="0" />
|
|
261
|
+
<Select label="Agent">
|
|
262
|
+
<option value="">Choose an option</option>
|
|
263
|
+
<option value="atlas">Atlas</option>
|
|
264
|
+
<option value="sage">Sage</option>
|
|
265
|
+
<option value="max">Max</option>
|
|
266
|
+
<option value="mason">Mason</option>
|
|
267
|
+
</Select>
|
|
268
|
+
<Input label="Disabled" placeholder="Disabled" disabled />
|
|
269
|
+
<div className="md:col-span-2">
|
|
270
|
+
<Textarea label="Description" placeholder="Enter a longer message..." />
|
|
271
|
+
</div>
|
|
272
|
+
</div>
|
|
273
|
+
|
|
274
|
+
<div className="flex flex-wrap gap-8 mt-6">
|
|
275
|
+
<Checkbox checked={checkboxState} onCheckedChange={setCheckboxState} label="Checkbox" />
|
|
276
|
+
<Toggle pressed={toggleState} onPressedChange={setToggleState} label="Toggle" />
|
|
277
|
+
<Toggle pressed={toggleState2} onPressedChange={setToggleState2} size="sm" label="Small Toggle" />
|
|
278
|
+
<ToggleGroup value={viewMode} onValueChange={setViewMode}>
|
|
279
|
+
<ToggleGroupItem value="grid">
|
|
280
|
+
<LayoutDashboard className="h-4 w-4" />
|
|
281
|
+
</ToggleGroupItem>
|
|
282
|
+
<ToggleGroupItem value="list">
|
|
283
|
+
<List className="h-4 w-4" />
|
|
284
|
+
</ToggleGroupItem>
|
|
285
|
+
<ToggleGroupItem value="table">
|
|
286
|
+
<Table className="h-4 w-4" />
|
|
287
|
+
</ToggleGroupItem>
|
|
288
|
+
</ToggleGroup>
|
|
289
|
+
</div>
|
|
290
|
+
|
|
291
|
+
<div className="mt-8">
|
|
292
|
+
<RadioGroup value={radioValue} onValueChange={setRadioValue}>
|
|
293
|
+
<RadioGroupItem value="option1" label="Option One" />
|
|
294
|
+
<RadioGroupItem value="option2" label="Option Two" />
|
|
295
|
+
<RadioGroupItem value="option3" label="Option Three" />
|
|
296
|
+
</RadioGroup>
|
|
297
|
+
</div>
|
|
298
|
+
|
|
299
|
+
<div className="mt-8 max-w-md">
|
|
300
|
+
<p className="text-sm text-foreground-muted mb-3">Option Cards (single select)</p>
|
|
301
|
+
<OptionCardGroup value={optionCardValue} onValueChange={setOptionCardValue}>
|
|
302
|
+
<OptionCard value="plan1">
|
|
303
|
+
<div className="font-medium text-foreground">Basic Plan</div>
|
|
304
|
+
<div className="text-sm text-foreground-secondary">$9/month</div>
|
|
305
|
+
</OptionCard>
|
|
306
|
+
<OptionCard value="plan2">
|
|
307
|
+
<div className="font-medium text-foreground">Pro Plan</div>
|
|
308
|
+
<div className="text-sm text-foreground-secondary">$29/month</div>
|
|
309
|
+
</OptionCard>
|
|
310
|
+
</OptionCardGroup>
|
|
311
|
+
</div>
|
|
312
|
+
|
|
313
|
+
<div className="mt-8 max-w-md">
|
|
314
|
+
<p className="text-sm text-foreground-muted mb-3">Checkbox Cards (multi-select)</p>
|
|
315
|
+
<div className="flex flex-col gap-3">
|
|
316
|
+
<CheckboxCard checked={checkboxCard1} onCheckedChange={setCheckboxCard1}>
|
|
317
|
+
<div className="font-medium text-foreground">Email notifications</div>
|
|
318
|
+
<div className="text-sm text-foreground-secondary">Receive updates via email</div>
|
|
319
|
+
</CheckboxCard>
|
|
320
|
+
<CheckboxCard checked={checkboxCard2} onCheckedChange={setCheckboxCard2}>
|
|
321
|
+
<div className="font-medium text-foreground">SMS notifications</div>
|
|
322
|
+
<div className="text-sm text-foreground-secondary">Receive updates via text</div>
|
|
323
|
+
</CheckboxCard>
|
|
324
|
+
</div>
|
|
325
|
+
</div>
|
|
326
|
+
|
|
327
|
+
<div className="max-w-sm mt-8">
|
|
328
|
+
<Slider label="Slider" defaultValue={[56]} max={100} showValue />
|
|
329
|
+
</div>
|
|
330
|
+
</DemoSubsection>
|
|
331
|
+
|
|
332
|
+
<DemoSubsection title="Cards">
|
|
333
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
334
|
+
<Card>
|
|
335
|
+
<CardHeader>
|
|
336
|
+
<CardTitle>Default Card</CardTitle>
|
|
337
|
+
<CardDescription>A basic card component</CardDescription>
|
|
338
|
+
</CardHeader>
|
|
339
|
+
<CardContent>
|
|
340
|
+
<p className="text-sm text-foreground-secondary">
|
|
341
|
+
Card content goes here. This is a versatile container.
|
|
342
|
+
</p>
|
|
343
|
+
</CardContent>
|
|
344
|
+
</Card>
|
|
345
|
+
<Card variant="bordered">
|
|
346
|
+
<CardHeader>
|
|
347
|
+
<CardTitle>Bordered Card</CardTitle>
|
|
348
|
+
<CardDescription>With visible border</CardDescription>
|
|
349
|
+
</CardHeader>
|
|
350
|
+
<CardContent>
|
|
351
|
+
<p className="text-sm text-foreground-secondary">
|
|
352
|
+
Use for content that needs clear separation.
|
|
353
|
+
</p>
|
|
354
|
+
</CardContent>
|
|
355
|
+
<CardFooter>
|
|
356
|
+
<Button size="sm">Action</Button>
|
|
357
|
+
</CardFooter>
|
|
358
|
+
</Card>
|
|
359
|
+
<Card variant="elevated">
|
|
360
|
+
<CardHeader>
|
|
361
|
+
<CardTitle>Elevated Card</CardTitle>
|
|
362
|
+
<CardDescription>With shadow</CardDescription>
|
|
363
|
+
</CardHeader>
|
|
364
|
+
<CardContent>
|
|
365
|
+
<p className="text-sm text-foreground-secondary">
|
|
366
|
+
Use for emphasized or interactive content.
|
|
367
|
+
</p>
|
|
368
|
+
</CardContent>
|
|
369
|
+
</Card>
|
|
370
|
+
</div>
|
|
371
|
+
</DemoSubsection>
|
|
372
|
+
|
|
373
|
+
<DemoSubsection title="Badges">
|
|
374
|
+
<div className="flex flex-wrap gap-3">
|
|
375
|
+
<Badge>Default</Badge>
|
|
376
|
+
<Badge variant="success">Success</Badge>
|
|
377
|
+
<Badge variant="warning">Warning</Badge>
|
|
378
|
+
<Badge variant="error">Error</Badge>
|
|
379
|
+
<Badge variant="info">Info</Badge>
|
|
380
|
+
<Badge variant="outline">Outline</Badge>
|
|
381
|
+
</div>
|
|
382
|
+
</DemoSubsection>
|
|
383
|
+
|
|
384
|
+
<DemoSubsection title="Avatars">
|
|
385
|
+
<div className="flex flex-wrap gap-4 items-end">
|
|
386
|
+
<Avatar size="sm">
|
|
387
|
+
<AvatarFallback>SM</AvatarFallback>
|
|
388
|
+
</Avatar>
|
|
389
|
+
<Avatar size="md">
|
|
390
|
+
<AvatarFallback>MD</AvatarFallback>
|
|
391
|
+
</Avatar>
|
|
392
|
+
<Avatar size="lg">
|
|
393
|
+
<AvatarFallback>LG</AvatarFallback>
|
|
394
|
+
</Avatar>
|
|
395
|
+
</div>
|
|
396
|
+
</DemoSubsection>
|
|
397
|
+
|
|
398
|
+
<DemoSubsection title="Alerts">
|
|
399
|
+
<div className="space-y-4 max-w-2xl">
|
|
400
|
+
<Alert variant="info">This is an informational alert message.</Alert>
|
|
401
|
+
<Alert variant="success">Operation completed successfully!</Alert>
|
|
402
|
+
<Alert variant="warning">Please review before proceeding.</Alert>
|
|
403
|
+
<Alert variant="error" dismissible onDismiss={() => {}}>
|
|
404
|
+
Something went wrong. This alert can be dismissed.
|
|
405
|
+
</Alert>
|
|
406
|
+
</div>
|
|
407
|
+
</DemoSubsection>
|
|
408
|
+
|
|
409
|
+
<DemoSubsection title="Tabs">
|
|
410
|
+
<div className="max-w-2xl">
|
|
411
|
+
<Tabs value={activeTab} onValueChange={setActiveTab}>
|
|
412
|
+
<TabsList>
|
|
413
|
+
<TabsTrigger value="general">General</TabsTrigger>
|
|
414
|
+
<TabsTrigger value="security">Security</TabsTrigger>
|
|
415
|
+
<TabsTrigger value="notifications">Notifications</TabsTrigger>
|
|
416
|
+
<TabsTrigger value="advanced" disabled>
|
|
417
|
+
Advanced
|
|
418
|
+
</TabsTrigger>
|
|
419
|
+
</TabsList>
|
|
420
|
+
<TabsContent value="general">
|
|
421
|
+
<Card variant="bordered">
|
|
422
|
+
<CardContent>
|
|
423
|
+
<p className="text-foreground-secondary">
|
|
424
|
+
General settings and preferences for your account.
|
|
425
|
+
</p>
|
|
426
|
+
</CardContent>
|
|
427
|
+
</Card>
|
|
428
|
+
</TabsContent>
|
|
429
|
+
<TabsContent value="security">
|
|
430
|
+
<Card variant="bordered">
|
|
431
|
+
<CardContent>
|
|
432
|
+
<p className="text-foreground-secondary">
|
|
433
|
+
Security settings, passwords, and two-factor authentication.
|
|
434
|
+
</p>
|
|
435
|
+
</CardContent>
|
|
436
|
+
</Card>
|
|
437
|
+
</TabsContent>
|
|
438
|
+
<TabsContent value="notifications">
|
|
439
|
+
<Card variant="bordered">
|
|
440
|
+
<CardContent>
|
|
441
|
+
<p className="text-foreground-secondary">
|
|
442
|
+
Configure how and when you receive notifications.
|
|
443
|
+
</p>
|
|
444
|
+
</CardContent>
|
|
445
|
+
</Card>
|
|
446
|
+
</TabsContent>
|
|
447
|
+
</Tabs>
|
|
448
|
+
</div>
|
|
449
|
+
</DemoSubsection>
|
|
450
|
+
|
|
451
|
+
<DemoSubsection title="Tooltips">
|
|
452
|
+
<div className="flex flex-wrap gap-8 items-center">
|
|
453
|
+
<Tooltip content="Shows on the right" side="right">
|
|
454
|
+
<Button variant="secondary">Hover me (right)</Button>
|
|
455
|
+
</Tooltip>
|
|
456
|
+
<Tooltip content="Shows on the top" side="top">
|
|
457
|
+
<Button variant="secondary">Hover me (top)</Button>
|
|
458
|
+
</Tooltip>
|
|
459
|
+
</div>
|
|
460
|
+
</DemoSubsection>
|
|
461
|
+
|
|
462
|
+
<DemoSubsection title="Dialog">
|
|
463
|
+
<Button onClick={() => setDialogOpen(true)}>Open Dialog</Button>
|
|
464
|
+
<Dialog open={dialogOpen} onClose={() => setDialogOpen(false)}>
|
|
465
|
+
<DialogHeader>
|
|
466
|
+
<DialogTitle>Example Dialog</DialogTitle>
|
|
467
|
+
<DialogDescription>This is a modal dialog for confirmations or forms.</DialogDescription>
|
|
468
|
+
</DialogHeader>
|
|
469
|
+
<div className="py-4">
|
|
470
|
+
<Input placeholder="Enter something..." />
|
|
471
|
+
</div>
|
|
472
|
+
<DialogFooter>
|
|
473
|
+
<Button variant="ghost" onClick={() => setDialogOpen(false)}>
|
|
474
|
+
Cancel
|
|
475
|
+
</Button>
|
|
476
|
+
<Button onClick={() => setDialogOpen(false)}>Confirm</Button>
|
|
477
|
+
</DialogFooter>
|
|
478
|
+
</Dialog>
|
|
479
|
+
</DemoSubsection>
|
|
480
|
+
</DemoSection>
|
|
481
|
+
|
|
482
|
+
<DemoSection
|
|
483
|
+
title="Kanban Components"
|
|
484
|
+
description="Components for Projects management"
|
|
485
|
+
>
|
|
486
|
+
<div className="overflow-x-auto -mx-8 px-8">
|
|
487
|
+
<KanbanBoard />
|
|
488
|
+
</div>
|
|
489
|
+
</DemoSection>
|
|
490
|
+
|
|
491
|
+
<DemoSection title="Widgets" description="Dashboard widgets (solid variant)">
|
|
492
|
+
<DemoSubsection title="Clock">
|
|
493
|
+
<div className="flex flex-wrap gap-8 items-center">
|
|
494
|
+
<AnalogClock size={200} variant="solid" />
|
|
495
|
+
<AnalogClock size={150} variant="solid" />
|
|
496
|
+
<AnalogClock size={100} variant="solid" />
|
|
497
|
+
</div>
|
|
498
|
+
</DemoSubsection>
|
|
499
|
+
|
|
500
|
+
<DemoSubsection title="Uptime">
|
|
501
|
+
<Card variant="bordered" className="max-w-md">
|
|
502
|
+
<CardContent>
|
|
503
|
+
<Uptime
|
|
504
|
+
title="Database"
|
|
505
|
+
status="degraded"
|
|
506
|
+
uptimePercent={98.5}
|
|
507
|
+
message="Slow queries detected"
|
|
508
|
+
data={[
|
|
509
|
+
100, 100, 100, 100, 95, 100, 100, 100, 100, 100, 100, 100, 100, 100,
|
|
510
|
+
100, 85, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
|
|
511
|
+
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
|
|
512
|
+
100, 100, 92,
|
|
513
|
+
]}
|
|
514
|
+
labels={["30 days ago", "", "", "", "Today"]}
|
|
515
|
+
/>
|
|
516
|
+
</CardContent>
|
|
517
|
+
</Card>
|
|
518
|
+
</DemoSubsection>
|
|
519
|
+
|
|
520
|
+
<DemoSubsection title="Progress">
|
|
521
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-8">
|
|
522
|
+
<Card variant="bordered">
|
|
523
|
+
<CardContent>
|
|
524
|
+
<Progress value={522} max={600} trend={32} trendLabel="Over the last 30 days" />
|
|
525
|
+
</CardContent>
|
|
526
|
+
</Card>
|
|
527
|
+
<Card variant="bordered">
|
|
528
|
+
<CardContent>
|
|
529
|
+
<Progress
|
|
530
|
+
value={45}
|
|
531
|
+
max={100}
|
|
532
|
+
variant="accent"
|
|
533
|
+
trend={-8}
|
|
534
|
+
trendLabel="From last week"
|
|
535
|
+
/>
|
|
536
|
+
</CardContent>
|
|
537
|
+
</Card>
|
|
538
|
+
</div>
|
|
539
|
+
</DemoSubsection>
|
|
540
|
+
|
|
541
|
+
<DemoSubsection title="Stats">
|
|
542
|
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
|
|
543
|
+
<StatWidget
|
|
544
|
+
variant="solid"
|
|
545
|
+
label="Total Tokens"
|
|
546
|
+
value="2.4M"
|
|
547
|
+
change="+18% from last month"
|
|
548
|
+
changeType="positive"
|
|
549
|
+
icon={Database}
|
|
550
|
+
/>
|
|
551
|
+
<StatWidget
|
|
552
|
+
variant="solid"
|
|
553
|
+
label="Uptime"
|
|
554
|
+
value="99.9%"
|
|
555
|
+
change="Last 30 days"
|
|
556
|
+
changeType="neutral"
|
|
557
|
+
icon={Activity}
|
|
558
|
+
/>
|
|
559
|
+
<StatWidget
|
|
560
|
+
variant="solid"
|
|
561
|
+
label="Active Agents"
|
|
562
|
+
value="5"
|
|
563
|
+
change="+2 this week"
|
|
564
|
+
changeType="positive"
|
|
565
|
+
icon={Users}
|
|
566
|
+
/>
|
|
567
|
+
<StatWidget
|
|
568
|
+
variant="solid"
|
|
569
|
+
label="API Costs"
|
|
570
|
+
value="$42"
|
|
571
|
+
change="-8% from last month"
|
|
572
|
+
changeType="positive"
|
|
573
|
+
icon={TrendingUp}
|
|
574
|
+
/>
|
|
575
|
+
</div>
|
|
576
|
+
</DemoSubsection>
|
|
577
|
+
|
|
578
|
+
<DemoSubsection title="Stock + Goals">
|
|
579
|
+
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
|
580
|
+
<div className="rounded-xl overflow-hidden">
|
|
581
|
+
<StockWidget
|
|
582
|
+
ticker="BTC"
|
|
583
|
+
companyName="Bitcoin"
|
|
584
|
+
price={104850}
|
|
585
|
+
change={24580}
|
|
586
|
+
changePercent={30.62}
|
|
587
|
+
currency="$"
|
|
588
|
+
updatedAt="1m ago"
|
|
589
|
+
chartData={[80270, 80400, 80350, 80600, 80500, 80800, 80700, 81000, 80900, 81200, 81100, 81500]}
|
|
590
|
+
/>
|
|
591
|
+
</div>
|
|
592
|
+
<GoalWidget
|
|
593
|
+
title="Agents Online"
|
|
594
|
+
value={5}
|
|
595
|
+
max={5}
|
|
596
|
+
size="lg"
|
|
597
|
+
status="All Active"
|
|
598
|
+
statusColor="#22c55e"
|
|
599
|
+
description="Atlas, Mason, Max, Merlin, Sage"
|
|
600
|
+
/>
|
|
601
|
+
</div>
|
|
602
|
+
</DemoSubsection>
|
|
603
|
+
</DemoSection>
|
|
604
|
+
|
|
605
|
+
<DemoSection
|
|
606
|
+
title="Dashboard Preview"
|
|
607
|
+
description="How the ambient dashboard looks over the background image"
|
|
608
|
+
>
|
|
609
|
+
<div
|
|
610
|
+
className="relative rounded-[var(--radius-lg)] bg-cover bg-center bg-no-repeat overflow-hidden min-h-[600px]"
|
|
611
|
+
style={{ backgroundImage: "url('/bg.jpg')" }}
|
|
612
|
+
>
|
|
613
|
+
<div
|
|
614
|
+
className="absolute inset-0 pointer-events-none"
|
|
615
|
+
style={{ backgroundColor: "var(--dashboard-overlay)" }}
|
|
616
|
+
/>
|
|
617
|
+
|
|
618
|
+
<Sidebar
|
|
619
|
+
variant="glass"
|
|
620
|
+
className="!absolute !top-4 !left-4 !bottom-4"
|
|
621
|
+
activeItem="dashboard"
|
|
622
|
+
onNavigate={() => {}}
|
|
623
|
+
/>
|
|
624
|
+
<UserMenu variant="glass" className="!absolute !top-4 !right-4 z-50" />
|
|
625
|
+
|
|
626
|
+
<div className="p-8 relative z-10" style={{ marginLeft: "calc(var(--spacing) * 18)" }}>
|
|
627
|
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
628
|
+
<GreetingWidget variant="glass" className="lg:col-span-2" />
|
|
629
|
+
<div className="flex justify-end">
|
|
630
|
+
<AnalogClock size={160} variant="glass" />
|
|
631
|
+
</div>
|
|
632
|
+
<WeatherWidget variant="glass" />
|
|
633
|
+
<StatWidget
|
|
634
|
+
variant="glass"
|
|
635
|
+
label="Active Sessions"
|
|
636
|
+
value="24"
|
|
637
|
+
change="+3 today"
|
|
638
|
+
changeType="positive"
|
|
639
|
+
icon={Users}
|
|
640
|
+
/>
|
|
641
|
+
<StatWidget
|
|
642
|
+
variant="glass"
|
|
643
|
+
label="Tasks Completed"
|
|
644
|
+
value="156"
|
|
645
|
+
change="This month"
|
|
646
|
+
changeType="neutral"
|
|
647
|
+
icon={TrendingUp}
|
|
648
|
+
/>
|
|
649
|
+
<AgentStatusWidget variant="glass" className="lg:col-span-2" />
|
|
650
|
+
<GlassCard>
|
|
651
|
+
<div className="flex items-center gap-3 mb-3">
|
|
652
|
+
<Clock className="h-5 w-5 text-foreground-secondary" />
|
|
653
|
+
<h3 className="text-sm font-medium text-foreground">Recent Activity</h3>
|
|
654
|
+
</div>
|
|
655
|
+
<div className="space-y-3 text-sm">
|
|
656
|
+
<div className="flex justify-between">
|
|
657
|
+
<span className="text-foreground-secondary">Mason completed PR #42</span>
|
|
658
|
+
<span className="text-foreground-muted">2m ago</span>
|
|
659
|
+
</div>
|
|
660
|
+
<div className="flex justify-between">
|
|
661
|
+
<span className="text-foreground-secondary">Sage updated research notes</span>
|
|
662
|
+
<span className="text-foreground-muted">15m ago</span>
|
|
663
|
+
</div>
|
|
664
|
+
<div className="flex justify-between">
|
|
665
|
+
<span className="text-foreground-secondary">Atlas scheduled reminder</span>
|
|
666
|
+
<span className="text-foreground-muted">1h ago</span>
|
|
667
|
+
</div>
|
|
668
|
+
</div>
|
|
669
|
+
</GlassCard>
|
|
670
|
+
</div>
|
|
671
|
+
</div>
|
|
672
|
+
</div>
|
|
673
|
+
</DemoSection>
|
|
674
|
+
|
|
675
|
+
<footer className="mt-16 pt-8 border-t border-border text-center">
|
|
676
|
+
<p className="text-sm text-foreground-muted">
|
|
677
|
+
Castle v0.0.1
|
|
678
|
+
</p>
|
|
679
|
+
</footer>
|
|
680
|
+
</div>
|
|
681
|
+
</main>
|
|
682
|
+
</div>
|
|
683
|
+
);
|
|
684
|
+
}
|