Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
feat(ui): Phase 4 cleanup - 5 final leaf files to shadcn
trohitgcbea6c327020
diff --git a/client/src/components/onboarding/OnboardingWizard.tsx b/client/src/components/onboarding/OnboardingWizard.tsxindex 6e7b9245..9b013ea8 100644--- a/client/src/components/onboarding/OnboardingWizard.tsx+++ b/client/src/components/onboarding/OnboardingWizard.tsx@@ -1,8 +1,8 @@import React from 'react';-import { Steps } from 'antd';import { ArrowLeft, ArrowRight, Check } from 'lucide-react';import { Button } from '@/components/ui/button';+import { cn } from '@/lib/utils';import Modal from '../ui/Modal';import { useOnboarding } from '../../hooks/useOnboarding';import { useAppTheme } from '../../hooks/useAppTheme';@@ -69,12 +69,43 @@ const OnboardingWizard: React.FC<OnboardingWizardProps> = ({ onOpenCredentials,padding: '16px 20px 12px',}}>{/* Progress steps */}- <Steps- current={currentStep}- size="small"- items={stepItems}- style={{ marginBottom: 16 }}- />+ <ol className="mb-4 flex w-full items-center">+ {stepItems.map((item, idx) => {+ const status: 'completed' | 'active' | 'upcoming' =+ idx < currentStep ? 'completed' : idx === currentStep ? 'active' : 'upcoming';+ const isLast = idx === stepItems.length - 1;+ return (+ <li key={item.title} className="flex flex-1 items-center gap-2">+ <div+ className={cn(+ 'flex h-7 w-7 shrink-0 items-center justify-center rounded-full border text-xs font-medium transition-colors',+ status === 'completed' && 'border-primary bg-primary text-primary-foreground',+ status === 'active' && 'border-primary text-primary',+ status === 'upcoming' && 'border-border text-muted-foreground',+ )}+ >+ {status === 'completed' ? <Check className="h-4 w-4" /> : idx + 1}+ </div>+ <span+ className={cn(+ 'whitespace-nowrap text-xs',+ status === 'upcoming' ? 'text-muted-foreground' : 'text-foreground',+ )}+ >+ {item.title}+ </span>+ {!isLast && (+ <div+ className={cn(+ 'h-px flex-1',+ idx < currentStep ? 'bg-primary' : 'bg-border',+ )}+ />+ )}+ </li>+ );+ })}+ </ol>{/* Step content */}<div style={{diff --git a/client/src/components/parameterPanel/MasterSkillEditor.tsx b/client/src/components/parameterPanel/MasterSkillEditor.tsxindex f8d66a45..4c0d7b49 100644--- a/client/src/components/parameterPanel/MasterSkillEditor.tsx+++ b/client/src/components/parameterPanel/MasterSkillEditor.tsx@@ -11,8 +11,19 @@*/import React, { useState, useEffect, useCallback, useMemo, useRef } from 'react';-import { Input, Select, Checkbox, List, Badge, Empty } from 'antd';-import { Loader2, Info, Plus, Trash2, Save, X, RotateCcw } from 'lucide-react';+import { Loader2, Info, Plus, Trash2, Save, X, RotateCcw, Search, Folder, Inbox } from 'lucide-react';++import { Input } from '@/components/ui/input';+import { Textarea } from '@/components/ui/textarea';+import { Checkbox } from '@/components/ui/checkbox';+import { Badge as DSBadge } from '@/components/ui/badge';+import {+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue,+} from '@/components/ui/select';import { Button } from '@/components/ui/button';import { Alert as DSAlert, AlertDescription } from '@/components/ui/alert';@@ -34,7 +45,7 @@ import {AlertDialogTrigger,} from '@/components/ui/alert-dialog';import { toast } from 'sonner';-import { SearchOutlined, FolderOutlined, PlusOutlined } from '@ant-design/icons';+import { PlusOutlined } from '@ant-design/icons';import { useAppTheme } from '../../hooks/useAppTheme';import { useWebSocket } from '../../contexts/WebSocketContext';import { skillNodes, SKILL_NODE_TYPES } from '../../nodeDefinitions/skillNodes';@@ -607,7 +618,12 @@ const MasterSkillEditor: React.FC<MasterSkillEditorProps> = ({Skills</span><div style={{ display: 'flex', alignItems: 'center', gap: theme.spacing.xs }}>- <Badge count={enabledCount} style={{ backgroundColor: theme.dracula.purple }} showZero />+ <DSBadge+ style={{ backgroundColor: theme.dracula.purple, color: '#fff' }}+ className="h-5 min-w-5 justify-center rounded-full px-1.5"+ >+ {enabledCount}+ </DSBadge><TooltipProvider><Tooltip><TooltipTrigger asChild>@@ -632,38 +648,52 @@ const MasterSkillEditor: React.FC<MasterSkillEditorProps> = ({</div>{/* Search */}- <div style={{ padding: theme.spacing.sm, borderBottom: `1px solid ${theme.colors.border}` }}>- <Input- placeholder="Search skills..."- prefix={<SearchOutlined style={{ color: theme.colors.textSecondary }} />}- value={searchQuery}- onChange={e => setSearchQuery(e.target.value)}- allowClear- style={{- backgroundColor: theme.colors.background,- borderColor: theme.colors.border,- }}- />+ <div className="border-b border-border p-2">+ <div className="relative">+ <Search className="pointer-events-none absolute top-1/2 left-2 h-4 w-4 -translate-y-1/2 text-muted-foreground" />+ <Input+ placeholder="Search skills..."+ value={searchQuery}+ onChange={(e) => setSearchQuery(e.target.value)}+ className="h-9 pl-8 pr-8"+ />+ {searchQuery && (+ <button+ type="button"+ onClick={() => setSearchQuery('')}+ className="absolute top-1/2 right-2 -translate-y-1/2 text-muted-foreground hover:text-foreground"+ aria-label="Clear search"+ >+ <X className="h-4 w-4" />+ </button>+ )}+ </div></div>{/* Skill Folder Dropdown */}- <div style={{ padding: theme.spacing.sm, borderBottom: `1px solid ${theme.colors.border}`, flexShrink: 0 }}>+ <div className="shrink-0 border-b border-border p-2"><Selectvalue={skillFolder || 'assistant'}- onChange={(value) => {+ onValueChange={(value) => {onSkillFolderChange?.(value);setSelectedSkillName(null);}}- loading={!foldersLoaded}disabled={!foldersLoaded}- getPopupContainer={(trigger) => trigger.parentElement || document.body}- style={{ width: '100%' }}- suffixIcon={<FolderOutlined style={{ color: theme.colors.textSecondary }} />}- options={availableFolders.map(f => ({- value: f.name,- label: `${f.name} (${f.skill_count})`,- }))}- />+ >+ <SelectTrigger className="w-full">+ <div className="flex items-center gap-2">+ <Folder className="h-4 w-4 text-muted-foreground" />+ <SelectValue placeholder="Choose folder" />+ </div>+ </SelectTrigger>+ <SelectContent>+ {availableFolders.map((f) => (+ <SelectItem key={f.name} value={f.name}>+ {f.name} ({f.skill_count})+ </SelectItem>+ ))}+ </SelectContent>+ </Select></div>{/* Skills List */}@@ -674,26 +704,23 @@ const MasterSkillEditor: React.FC<MasterSkillEditorProps> = ({Scanning folder...</div>) : filteredSkills.length === 0 ? (- <Empty- image={Empty.PRESENTED_IMAGE_SIMPLE}- description={skillFolder ? `No skills found in skills/${skillFolder}/` : 'No skills found'}- style={{ marginTop: theme.spacing.lg }}- />+ <div className="mt-6 flex flex-col items-center gap-2 p-6 text-center text-sm text-muted-foreground">+ <Inbox className="h-10 w-10 opacity-50" />+ <p>{skillFolder ? `No skills found in skills/${skillFolder}/` : 'No skills found'}</p>+ </div>) : (- <List- size="small"- dataSource={filteredSkills}- renderItem={(skill) => {+ <div className="divide-y divide-border">+ {filteredSkills.map((skill) => {const config = skillsConfig[skill.skillName];const isSelected = selectedSkillName === skill.skillName && !isCreatingNew;const isEnabled = config?.enabled || false;const isCustomized = config?.isCustomized || false;return (- <List.Item+ <div+ key={skill.skillName}onClick={() => {if (isCreatingNew) {- // Confirm cancel if creating newif (hasUnsavedChanges) {if (!confirm('Discard unsaved changes?')) return;}@@ -701,33 +728,28 @@ const MasterSkillEditor: React.FC<MasterSkillEditorProps> = ({}setSelectedSkillName(skill.skillName);}}+ className="cursor-pointer border-l-[3px] px-3 py-2 transition-colors"style={{- padding: `${theme.spacing.sm} ${theme.spacing.md}`,- cursor: 'pointer',backgroundColor: isSelected ? `${skill.color}15` : 'transparent',- borderLeft: isSelected ? `3px solid ${skill.color}` : '3px solid transparent',- transition: 'all 0.15s ease'+ borderLeftColor: isSelected ? skill.color : 'transparent',}}>- <div style={{ display: 'flex', alignItems: 'center', gap: theme.spacing.sm, width: '100%' }}>+ <div className="flex w-full items-center gap-2"><Checkboxchecked={isEnabled}- onChange={(e) => {- e.stopPropagation();- handleToggleSkill(skill.skillName, e.target.checked);+ onCheckedChange={(checked) => {+ handleToggleSkill(skill.skillName, checked === true);}}onClick={(e) => e.stopPropagation()}/>{renderSkillIcon(skill.icon || '', 16)}- <span style={{- flex: 1,- fontSize: theme.fontSize.sm,- fontWeight: isSelected ? theme.fontWeight.semibold : theme.fontWeight.medium,- color: isEnabled ? theme.colors.text : theme.colors.textSecondary,- overflow: 'hidden',- textOverflow: 'ellipsis',- whiteSpace: 'nowrap'- }}>+ <span+ className="flex-1 overflow-hidden text-sm whitespace-nowrap text-ellipsis"+ style={{+ fontWeight: isSelected ? theme.fontWeight.semibold : theme.fontWeight.medium,+ color: isEnabled ? theme.colors.text : theme.colors.textSecondary,+ }}+ >{skill.displayName}</span>{isCustomized && (@@ -735,13 +757,8 @@ const MasterSkillEditor: React.FC<MasterSkillEditorProps> = ({<Tooltip><TooltipTrigger asChild><div- style={{- width: 8,- height: 8,- borderRadius: '50%',- backgroundColor: theme.dracula.orange,- flexShrink: 0,- }}+ className="h-2 w-2 shrink-0 rounded-full"+ style={{ backgroundColor: theme.dracula.orange }}/></TooltipTrigger><TooltipContent>Customized</TooltipContent>@@ -749,23 +766,21 @@ const MasterSkillEditor: React.FC<MasterSkillEditorProps> = ({</TooltipProvider>)}{skill.isUserSkill && (- <Badge- count="Custom"+ <DSBadge+ className="h-4 px-1 text-[10px]"style={{backgroundColor: `${theme.dracula.cyan}20`,color: theme.dracula.cyan,- fontSize: 10,- padding: '0 4px',- height: 16,- lineHeight: '16px'}}- />+ >+ Custom+ </DSBadge>)}</div>- </List.Item>+ </div>);- }}- />+ })}+ </div>)}</div></div>@@ -904,19 +919,13 @@ const MasterSkillEditor: React.FC<MasterSkillEditorProps> = ({<label style={{ display: 'block', fontSize: theme.fontSize.xs, color: theme.colors.textSecondary, marginBottom: 4 }}>Instructions *</label>- <Input.TextArea+ <Textareavalue={pendingSkillData.instructions}- onChange={(e) => handlePendingDataChange('instructions', e.target.value)}+ onChange={(e: React.ChangeEvent<HTMLTextAreaElement>) => handlePendingDataChange('instructions', e.target.value)}placeholder="# Skill Instructions..."spellCheck={false}- autoSize={false}+ className="flex-1 min-h-0 resize-none font-mono text-[13px] leading-[1.5]"style={{- flex: 1,- minHeight: 0,- resize: 'none',- fontFamily: "'Consolas', 'Monaco', 'Fira Code', monospace",- fontSize: 13,- lineHeight: 1.5,backgroundColor: theme.colors.backgroundAlt,color: theme.colors.text,borderColor: theme.colors.border,@@ -962,14 +971,15 @@ const MasterSkillEditor: React.FC<MasterSkillEditorProps> = ({}}>{selectedSkillInfo.displayName}{selectedSkillConfig?.isCustomized && (- <Badge- count="Customized"+ <DSBadge+ className="h-4 text-xs"style={{backgroundColor: `${theme.dracula.orange}20`,color: theme.dracula.orange,- fontSize: theme.fontSize.xs}}- />+ >+ Customized+ </DSBadge>)}</div>)}@@ -1074,13 +1084,13 @@ const MasterSkillEditor: React.FC<MasterSkillEditorProps> = ({Loading...</div>) : (- <Input.TextArea+ <Textareavalue={isEditingUserSkill? pendingSkillData?.instructions || '': (selectedSkillConfig?.instructions || defaultInstructions[selectedSkillName!] || '')}- onChange={(e) => {+ onChange={(e: React.ChangeEvent<HTMLTextAreaElement>) => {if (isEditingUserSkill) {handlePendingDataChange('instructions', e.target.value);} else {@@ -1089,14 +1099,8 @@ const MasterSkillEditor: React.FC<MasterSkillEditorProps> = ({}}placeholder="Loading skill instructions..."spellCheck={false}- autoSize={false}+ className="flex-1 min-h-0 resize-none font-mono text-[13px] leading-[1.5]"style={{- flex: 1,- minHeight: 0,- resize: 'none',- fontFamily: "'Consolas', 'Monaco', 'Fira Code', monospace",- fontSize: 13,- lineHeight: 1.5,backgroundColor: theme.colors.backgroundAlt,color: theme.colors.text,borderColor: theme.colors.border,@@ -1117,10 +1121,10 @@ const MasterSkillEditor: React.FC<MasterSkillEditorProps> = ({</div></>) : (- <Empty- description="Select a skill to view instructions"- style={{ margin: 'auto' }}- />+ <div className="m-auto flex flex-col items-center gap-2 p-6 text-center text-sm text-muted-foreground">+ <Inbox className="h-10 w-10 opacity-50" />+ <p>Select a skill to view instructions</p>+ </div>)}</div></div>diff --git a/client/src/components/parameterPanel/MiddleSection.tsx b/client/src/components/parameterPanel/MiddleSection.tsxindex c6263a1c..e042bbee 100644--- a/client/src/components/parameterPanel/MiddleSection.tsx+++ b/client/src/components/parameterPanel/MiddleSection.tsx@@ -1,9 +1,11 @@import React, { useState, useEffect } from 'react';-import { Progress, Statistic, Row, Col, InputNumber } from 'antd';import { Loader2, Save } from 'lucide-react';import { toast } from 'sonner';import { Button } from '@/components/ui/button';+import { Input } from '@/components/ui/input';+import { Progress } from '@/components/ui/progress';+import { cn } from '@/lib/utils';import {Accordion,AccordionItem,@@ -26,6 +28,13 @@ import { SKILL_NODE_TYPES, skillNodes } from '../../nodeDefinitions/skillNodes';// Tool node types that support schema editingconst TOOL_NODE_TYPES = ['androidTool', 'calculatorTool', 'currentTimeTool', 'duckduckgoSearch'];+const Stat: React.FC<{ title: React.ReactNode; value: React.ReactNode }> = ({ title, value }) => (+ <div className="flex flex-col">+ <span className="text-xs text-muted-foreground">{title}</span>+ <span className="text-lg font-semibold tabular-nums">{value}</span>+ </div>+);+// Agent node types that support skills (have input-skill handle)const AGENT_WITH_SKILLS_TYPES = ['aiAgent',@@ -818,29 +827,31 @@ const MiddleSection: React.FC<MiddleSectionProps> = ({return (<><Progress- percent={Math.min(percent, 100)}- status={isWarning ? 'exception' : 'active'}+ value={Math.min(percent, 100)}+ className={cn(isWarning && '[&>div]:bg-destructive')}/>{hasContext && compactionStats.threshold > 0 && (<span className="mt-1 block text-[11px] text-muted-foreground">Compaction at {Math.round(compactionStats.threshold / 1000)}K ({Math.round(compactionStats.threshold / ctxLen * 100)}% of context)</span>)}- <Row gutter={16} style={{ marginTop: 12 }}>- <Col span={8}><Statistic title="Total" value={compactionStats.total} /></Col>- <Col span={8}>+ <div className="mt-3 grid grid-cols-12 gap-4">+ <div className="col-span-4">+ <Stat title="Total" value={compactionStats.total} />+ </div>+ <div className="col-span-4">{isEditingThreshold ? (<div><span className="text-xs text-muted-foreground">Threshold</span>- <div style={{ display: 'flex', gap: 4, marginTop: 4 }}>- <InputNumber- size="small"+ <div className="mt-1 flex gap-1">+ <Input+ type="number"value={editThresholdValue}- onChange={(v) => setEditThresholdValue(v || compactionStats.threshold)}+ onChange={(e) => setEditThresholdValue(Number(e.target.value) || compactionStats.threshold)}min={10000}max={2000000}step={10000}- style={{ width: 100 }}+ className="h-7 w-28 text-xs"/><Buttonsize="icon-sm"@@ -869,16 +880,28 @@ const MiddleSection: React.FC<MiddleSectionProps> = ({</div></div>) : (- <div onClick={() => { setEditThresholdValue(compactionStats.threshold); setIsEditingThreshold(true); }} style={{ cursor: 'pointer' }}>- <Statistic title={<span>Threshold <EditOutlined style={{ fontSize: 10, marginLeft: 4 }} /></span>} value={compactionStats.threshold} />+ <div onClick={() => { setEditThresholdValue(compactionStats.threshold); setIsEditingThreshold(true); }} className="cursor-pointer">+ <Stat+ title={+ <span className="inline-flex items-center gap-1">+ Threshold+ <EditOutlined style={{ fontSize: 10 }} />+ </span>+ }+ value={compactionStats.threshold}+ /></div>)}- </Col>- <Col span={hasContext ? 4 : 8}><Statistic title="Compactions" value={compactionStats.count} /></Col>+ </div>+ <div className={hasContext ? 'col-span-2' : 'col-span-4'}>+ <Stat title="Compactions" value={compactionStats.count} />+ </div>{hasContext && (- <Col span={4}><Statistic title="Context" value={`${Math.round(ctxLen / 1000)}K`} /></Col>+ <div className="col-span-2">+ <Stat title="Context" value={`${Math.round(ctxLen / 1000)}K`} />+ </div>)}- </Row>+ </div><span className="mt-2 block text-xs text-muted-foreground">Session: {compactionStats.session_id}</span>diff --git a/client/src/components/ui/ConsolePanel.tsx b/client/src/components/ui/ConsolePanel.tsxindex 4a7fa276..62f05ce2 100644--- a/client/src/components/ui/ConsolePanel.tsx+++ b/client/src/components/ui/ConsolePanel.tsx@@ -16,7 +16,7 @@ import remarkBreaks from 'remark-breaks';import { useWebSocket, ConsoleLogEntry } from '../../contexts/WebSocketContext';import { useAppTheme } from '../../hooks/useAppTheme';import { useTheme } from '../../contexts/ThemeContext';-import { InputNumber } from 'antd';+import { Input } from '@/components/ui/input';import Prism from 'prismjs';import 'prismjs/components/prism-json';@@ -1068,14 +1068,16 @@ const ConsolePanel: React.FC<ConsolePanelProps> = ({Pretty</label>)}- <InputNumber- size="small"+ <Input+ type="number"value={consoleFontSize}- onChange={v => v != null && setConsoleFontSize(v)}+ onChange={(e) => {+ const v = Number(e.target.value);+ if (!Number.isNaN(v)) setConsoleFontSize(v);+ }}min={minFontSize}max={maxFontSize}- style={{ width: 52 }}- controls={false}+ className="h-7 w-14 text-xs"/>{((consoleTab === 'console' && consoleLogs.length > 0) || (consoleTab === 'terminal' && terminalLogs.length > 0)) && (<buttondiff --git a/client/src/components/ui/SettingsPanel.tsx b/client/src/components/ui/SettingsPanel.tsxindex 14b7118d..44011ef2 100644--- a/client/src/components/ui/SettingsPanel.tsx+++ b/client/src/components/ui/SettingsPanel.tsx@@ -1,10 +1,11 @@import React, { useState, useEffect, useCallback } from 'react';-import { InputNumber, Slider } from 'antd';import { toast } from 'sonner';import { HelpCircle } from 'lucide-react';import { Button } from '@/components/ui/button';import { Switch } from '@/components/ui/switch';+import { Slider } from '@/components/ui/slider';+import { Input } from '@/components/ui/input';import Modal from './Modal';import { useAppTheme } from '../../hooks/useAppTheme';import { useWebSocket } from '../../contexts/WebSocketContext';@@ -396,17 +397,21 @@ const SettingsPanel: React.FC<SettingsPanelProps> = ({<div style={labelTextStyle}>Auto-save Interval</div><div style={descriptionStyle}>How often to auto-save (10-300 seconds)</div></div>- <InputNumber-- min={10}- max={300}- step={5}- value={settings.autoSaveInterval}- onChange={(value) => handleChange('autoSaveInterval', value ?? 30)}- disabled={isSaving}- style={{ width: 80 }}- suffix="s"- />+ <div className="relative w-24">+ <Input+ type="number"+ min={10}+ max={300}+ step={5}+ value={settings.autoSaveInterval}+ onChange={(e) => handleChange('autoSaveInterval', Number(e.target.value) || 30)}+ disabled={isSaving}+ className="pr-6"+ />+ <span className="pointer-events-none absolute top-1/2 right-2 -translate-y-1/2 text-xs text-muted-foreground">+ s+ </span>+ </div></div>)}</div>@@ -423,15 +428,15 @@ const SettingsPanel: React.FC<SettingsPanelProps> = ({<div style={labelTextStyle}>Default Window Size</div><div style={descriptionStyle}>Number of message pairs to keep in short-term memory (1-100)</div></div>- <InputNumber-+ <Input+ type="number"min={1}max={100}step={1}value={settings.memoryWindowSize}- onChange={(value) => handleChange('memoryWindowSize', value ?? 100)}+ onChange={(e) => handleChange('memoryWindowSize', Number(e.target.value) || 100)}disabled={isSaving}- style={{ width: 80 }}+ className="w-20"/></div>@@ -459,16 +464,16 @@ const SettingsPanel: React.FC<SettingsPanelProps> = ({min={10}max={90}step={5}- value={Math.round(settings.compactionRatio * 100)}- onChange={(value) => handleChange('compactionRatio', value / 100)}+ value={[Math.round(settings.compactionRatio * 100)]}+ onValueChange={(value) => handleChange('compactionRatio', (value[0] ?? 50) / 100)}disabled={isSaving}- tooltip={{ formatter: (val) => `${val}%` }}- marks={{- 10: { label: '10%', style: { fontSize: 10, color: theme.colors.textMuted } },- 50: { label: '50%', style: { fontSize: 10, color: theme.colors.textMuted } },- 90: { label: '90%', style: { fontSize: 10, color: theme.colors.textMuted } },- }}+ className="my-3"/>+ <div className="flex justify-between text-[10px] text-muted-foreground">+ <span>10%</span>+ <span>50%</span>+ <span>90%</span>+ </div><div style={{fontSize: theme.fontSize.xs,color: theme.colors.textMuted,@@ -492,15 +497,15 @@ const SettingsPanel: React.FC<SettingsPanelProps> = ({<div style={labelTextStyle}>Max Concurrent Processes</div><div style={descriptionStyle}>Maximum number of running processes per workflow (1-50)</div></div>- <InputNumber-+ <Input+ type="number"min={1}max={50}step={1}value={settings.maxProcesses ?? 10}- onChange={(value) => handleChange('maxProcesses', value ?? 10)}+ onChange={(e) => handleChange('maxProcesses', Number(e.target.value) || 10)}disabled={isSaving}- style={{ width: 80 }}+ className="w-20"/></div></div>diff --git a/client/src/components/ui/checkbox.tsx b/client/src/components/ui/checkbox.tsxnew file mode 100644index 00000000..cec7a77c--- /dev/null+++ b/client/src/components/ui/checkbox.tsx@@ -0,0 +1,31 @@+import * as React from "react"+import { Checkbox as CheckboxPrimitive } from "radix-ui"++import { cn } from "@/lib/utils"+import { CheckIcon } from "lucide-react"++function Checkbox({+ className,+ ...props+}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {+ return (+ <CheckboxPrimitive.Root+ data-slot="checkbox"+ className={cn(+ "peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",+ className+ )}+ {...props}+ >+ <CheckboxPrimitive.Indicator+ data-slot="checkbox-indicator"+ className="grid place-content-center text-current transition-none [&>svg]:size-3.5"+ >+ <CheckIcon+ />+ </CheckboxPrimitive.Indicator>+ </CheckboxPrimitive.Root>+ )+}++export { Checkbox }diff --git a/client/src/components/ui/progress.tsx b/client/src/components/ui/progress.tsxnew file mode 100644index 00000000..97774e9e--- /dev/null+++ b/client/src/components/ui/progress.tsx@@ -0,0 +1,29 @@+import * as React from "react"+import { Progress as ProgressPrimitive } from "radix-ui"++import { cn } from "@/lib/utils"++function Progress({+ className,+ value,+ ...props+}: React.ComponentProps<typeof ProgressPrimitive.Root>) {+ return (+ <ProgressPrimitive.Root+ data-slot="progress"+ className={cn(+ "relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",+ className+ )}+ {...props}+ >+ <ProgressPrimitive.Indicator+ data-slot="progress-indicator"+ className="size-full flex-1 bg-primary transition-all"+ style={{ transform: `translateX(-${100 - (value || 0)}%)` }}+ />+ </ProgressPrimitive.Root>+ )+}++export { Progress }diff --git a/client/src/components/ui/slider.tsx b/client/src/components/ui/slider.tsxnew file mode 100644index 00000000..5fa21f0c--- /dev/null+++ b/client/src/components/ui/slider.tsx@@ -0,0 +1,57 @@+import * as React from "react"+import { Slider as SliderPrimitive } from "radix-ui"++import { cn } from "@/lib/utils"++function Slider({+ className,+ defaultValue,+ value,+ min = 0,+ max = 100,+ ...props+}: React.ComponentProps<typeof SliderPrimitive.Root>) {+ const _values = React.useMemo(+ () =>+ Array.isArray(value)+ ? value+ : Array.isArray(defaultValue)+ ? defaultValue+ : [min, max],+ [value, defaultValue, min, max]+ )++ return (+ <SliderPrimitive.Root+ data-slot="slider"+ defaultValue={defaultValue}+ value={value}+ min={min}+ max={max}+ className={cn(+ "relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col",+ className+ )}+ {...props}+ >+ <SliderPrimitive.Track+ data-slot="slider-track"+ className="relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1"+ >+ <SliderPrimitive.Range+ data-slot="slider-range"+ className="absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full"+ />+ </SliderPrimitive.Track>+ {Array.from({ length: _values.length }, (_, index) => (+ <SliderPrimitive.Thumb+ data-slot="slider-thumb"+ key={index}+ className="relative block size-3 shrink-0 rounded-full border border-ring bg-white ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 disabled:pointer-events-none disabled:opacity-50"+ />+ ))}+ </SliderPrimitive.Root>+ )+}++export { Slider }diff --git a/client/src/components/ui/textarea.tsx b/client/src/components/ui/textarea.tsxnew file mode 100644index 00000000..04d27f7d--- /dev/null+++ b/client/src/components/ui/textarea.tsx@@ -0,0 +1,18 @@+import * as React from "react"++import { cn } from "@/lib/utils"++function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {+ return (+ <textarea+ data-slot="textarea"+ className={cn(+ "flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",+ className+ )}+ {...props}+ />+ )+}++export { Textarea }