refactor: migrate page components to Design System v4
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -630,17 +630,17 @@ export function ProceduralNavigationPage() {
|
||||
return (
|
||||
<div className="flex h-full min-h-0 flex-col overflow-hidden">
|
||||
{/* Top bar */}
|
||||
<div className="border-b border-border px-4 py-3 sm:px-6">
|
||||
<div className="border-b border-[#1e2130] px-4 py-3 sm:px-6">
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<div className="flex items-center gap-3">
|
||||
<button
|
||||
onClick={() => setSidebarOpen(!sidebarOpen)}
|
||||
className="rounded-md p-1.5 text-muted-foreground hover:bg-accent hover:text-foreground lg:hidden"
|
||||
className="rounded-md p-1.5 text-[#848b9b] hover:bg-accent hover:text-[#e2e5eb] lg:hidden"
|
||||
>
|
||||
{sidebarOpen ? <ChevronLeft className="h-4 w-4" /> : <ChevronRight className="h-4 w-4" />}
|
||||
</button>
|
||||
<ListOrdered className="h-5 w-5 text-muted-foreground" />
|
||||
<h1 className="text-sm font-semibold text-foreground sm:text-base">{tree.name}</h1>
|
||||
<ListOrdered className="h-5 w-5 text-[#848b9b]" />
|
||||
<h1 className="text-sm font-semibold text-[#e2e5eb] sm:text-base">{tree.name}</h1>
|
||||
</div>
|
||||
<button
|
||||
onClick={() => {
|
||||
@@ -650,7 +650,7 @@ export function ProceduralNavigationPage() {
|
||||
navigate('/trees')
|
||||
}
|
||||
}}
|
||||
className="rounded-md border border-border px-3 py-1.5 text-xs font-medium text-muted-foreground hover:bg-accent hover:text-foreground transition-colors"
|
||||
className="rounded-md border border-[#1e2130] px-3 py-1.5 text-xs font-medium text-[#848b9b] hover:bg-accent hover:text-[#e2e5eb] transition-colors"
|
||||
>
|
||||
<X className="mr-1 inline h-3.5 w-3.5" />
|
||||
Exit
|
||||
@@ -693,7 +693,7 @@ export function ProceduralNavigationPage() {
|
||||
{/* Left sidebar - step checklist */}
|
||||
<div
|
||||
className={cn(
|
||||
'min-h-0 border-r border-border bg-card transition-all duration-200',
|
||||
'min-h-0 border-r border-[#1e2130] bg-[#14161d] transition-all duration-200',
|
||||
sidebarOpen ? 'w-72 overflow-y-auto p-3' : 'w-0 overflow-hidden p-0'
|
||||
)}
|
||||
>
|
||||
@@ -708,7 +708,7 @@ export function ProceduralNavigationPage() {
|
||||
|
||||
{/* PSA Ticket Context Panel */}
|
||||
{session?.psa_ticket_id && (
|
||||
<div className="mt-3 border-t border-border pt-3">
|
||||
<div className="mt-3 border-t border-[#1e2130] pt-3">
|
||||
<TicketContextPanel
|
||||
context={ticketContext}
|
||||
loading={ticketContextLoading}
|
||||
@@ -720,10 +720,10 @@ export function ProceduralNavigationPage() {
|
||||
|
||||
{/* Session Variables button */}
|
||||
{intakeFields.length > 0 && (
|
||||
<div className="mt-3 border-t border-border pt-3">
|
||||
<div className="mt-3 border-t border-[#1e2130] pt-3">
|
||||
<button
|
||||
onClick={() => setParamsOpen(true)}
|
||||
className="flex w-full items-center gap-2 rounded-lg border border-border px-3 py-2 text-xs text-muted-foreground hover:bg-accent hover:text-muted-foreground"
|
||||
className="flex w-full items-center gap-2 rounded-lg border border-[#1e2130] px-3 py-2 text-xs text-[#848b9b] hover:bg-accent hover:text-[#848b9b]"
|
||||
>
|
||||
<Settings2 className="h-3.5 w-3.5" />
|
||||
Session Variables
|
||||
@@ -780,7 +780,7 @@ export function ProceduralNavigationPage() {
|
||||
<div className="mt-4">
|
||||
<button
|
||||
onClick={() => setShowCustomStepModal(true)}
|
||||
className="flex w-full items-center justify-center gap-2 rounded-lg border border-dashed border-border px-4 py-2.5 text-sm text-muted-foreground transition-colors hover:border-primary/50 hover:text-foreground"
|
||||
className="flex w-full items-center justify-center gap-2 rounded-lg border border-dashed border-[#1e2130] px-4 py-2.5 text-sm text-[#848b9b] transition-colors hover:border-primary/50 hover:text-[#e2e5eb]"
|
||||
>
|
||||
<Plus className="h-4 w-4" />
|
||||
Add Step
|
||||
@@ -845,15 +845,15 @@ export function ProceduralNavigationPage() {
|
||||
{paramsOpen && (
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center">
|
||||
<div
|
||||
className="absolute inset-0 bg-background/60 backdrop-blur-xs"
|
||||
className="absolute inset-0 bg-[#0c0d10]/60"
|
||||
onClick={() => setParamsOpen(false)}
|
||||
/>
|
||||
<div className="relative w-full max-w-md rounded-2xl border border-border bg-card shadow-2xl backdrop-blur-xs">
|
||||
<div className="flex items-center justify-between border-b border-border px-5 py-4">
|
||||
<h3 className="text-sm font-semibold text-foreground">Session Variables</h3>
|
||||
<div className="relative w-full max-w-md rounded-2xl border border-[#1e2130] bg-[#14161d] shadow-2xl">
|
||||
<div className="flex items-center justify-between border-b border-[#1e2130] px-5 py-4">
|
||||
<h3 className="text-sm font-semibold text-[#e2e5eb]">Session Variables</h3>
|
||||
<button
|
||||
onClick={() => setParamsOpen(false)}
|
||||
className="rounded-lg p-1 text-muted-foreground hover:bg-accent hover:text-foreground"
|
||||
className="rounded-lg p-1 text-[#848b9b] hover:bg-accent hover:text-[#e2e5eb]"
|
||||
>
|
||||
<X className="h-4 w-4" />
|
||||
</button>
|
||||
@@ -872,7 +872,7 @@ export function ProceduralNavigationPage() {
|
||||
key={field.variable_name}
|
||||
className={cn(
|
||||
'rounded-lg border px-3 py-2.5',
|
||||
isFilled ? 'border-border bg-accent' : 'border-cyan-500/20 bg-cyan-500/5'
|
||||
isFilled ? 'border-[#1e2130] bg-accent' : 'border-cyan-500/20 bg-cyan-500/5'
|
||||
)}
|
||||
>
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
@@ -882,7 +882,7 @@ export function ProceduralNavigationPage() {
|
||||
) : (
|
||||
<AlertCircle className="h-3.5 w-3.5 shrink-0 text-cyan-400" />
|
||||
)}
|
||||
<span className="text-xs font-medium text-muted-foreground truncate">
|
||||
<span className="text-xs font-medium text-[#848b9b] truncate">
|
||||
{field.label}
|
||||
{field.required && <span className="ml-1 text-amber-400">*</span>}
|
||||
</span>
|
||||
@@ -890,7 +890,7 @@ export function ProceduralNavigationPage() {
|
||||
{!isEditing && (
|
||||
<button
|
||||
onClick={() => startEditingVar(field.variable_name)}
|
||||
className="shrink-0 rounded px-2 py-0.5 text-xs text-muted-foreground hover:bg-card hover:text-foreground"
|
||||
className="shrink-0 rounded px-2 py-0.5 text-xs text-[#848b9b] hover:bg-[#14161d] hover:text-[#e2e5eb]"
|
||||
>
|
||||
{isFilled ? 'Edit' : 'Fill'}
|
||||
</button>
|
||||
@@ -903,7 +903,7 @@ export function ProceduralNavigationPage() {
|
||||
value={editingVarValue}
|
||||
onChange={(e) => setEditingVarValue(e.target.value)}
|
||||
autoFocus
|
||||
className="w-full rounded-md border border-cyan-500/30 bg-card px-2.5 py-1.5 text-sm text-foreground focus:border-cyan-400 focus:outline-hidden focus:ring-1 focus:ring-cyan-400/30"
|
||||
className="w-full rounded-md border border-cyan-500/30 bg-[#14161d] px-2.5 py-1.5 text-sm text-[#e2e5eb] focus:border-cyan-400 focus:outline-hidden focus:ring-1 focus:ring-cyan-400/30"
|
||||
>
|
||||
<option value="">{field.placeholder || 'Select...'}</option>
|
||||
{field.options.map((opt) => (
|
||||
@@ -917,7 +917,7 @@ export function ProceduralNavigationPage() {
|
||||
autoFocus
|
||||
rows={3}
|
||||
placeholder={field.placeholder}
|
||||
className="w-full rounded-md border border-cyan-500/30 bg-card px-2.5 py-1.5 text-sm text-foreground placeholder:text-muted-foreground focus:border-cyan-400 focus:outline-hidden focus:ring-1 focus:ring-cyan-400/30"
|
||||
className="w-full rounded-md border border-cyan-500/30 bg-[#14161d] px-2.5 py-1.5 text-sm text-[#e2e5eb] placeholder:text-[#848b9b] focus:border-cyan-400 focus:outline-hidden focus:ring-1 focus:ring-cyan-400/30"
|
||||
/>
|
||||
) : (
|
||||
<input
|
||||
@@ -927,30 +927,30 @@ export function ProceduralNavigationPage() {
|
||||
onKeyDown={(e) => { if (e.key === 'Enter') saveEditingVar() }}
|
||||
autoFocus
|
||||
placeholder={field.placeholder}
|
||||
className="w-full rounded-md border border-cyan-500/30 bg-card px-2.5 py-1.5 text-sm text-foreground placeholder:text-muted-foreground focus:border-cyan-400 focus:outline-hidden focus:ring-1 focus:ring-cyan-400/30"
|
||||
className="w-full rounded-md border border-cyan-500/30 bg-[#14161d] px-2.5 py-1.5 text-sm text-[#e2e5eb] placeholder:text-[#848b9b] focus:border-cyan-400 focus:outline-hidden focus:ring-1 focus:ring-cyan-400/30"
|
||||
/>
|
||||
)}
|
||||
{field.help_text && (
|
||||
<p className="mt-1 text-[0.625rem] text-muted-foreground">{field.help_text}</p>
|
||||
<p className="mt-1 text-[0.625rem] text-[#848b9b]">{field.help_text}</p>
|
||||
)}
|
||||
<div className="mt-2 flex justify-end gap-2">
|
||||
<button
|
||||
onClick={() => { setEditingVarName(null); setEditingVarValue('') }}
|
||||
className="rounded px-2.5 py-1 text-xs text-muted-foreground hover:text-foreground"
|
||||
className="rounded px-2.5 py-1 text-xs text-[#848b9b] hover:text-[#e2e5eb]"
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
<button
|
||||
onClick={saveEditingVar}
|
||||
disabled={!editingVarValue.trim()}
|
||||
className="rounded bg-gradient-brand px-2.5 py-1 text-xs font-medium text-[#101114] disabled:opacity-40"
|
||||
className="rounded bg-[#22d3ee] px-2.5 py-1 text-xs font-medium text-white disabled:opacity-40"
|
||||
>
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
) : isFilled ? (
|
||||
<p className="mt-1 text-sm text-foreground truncate">{value}</p>
|
||||
<p className="mt-1 text-sm text-[#e2e5eb] truncate">{value}</p>
|
||||
) : null}
|
||||
</div>
|
||||
)
|
||||
@@ -961,8 +961,8 @@ export function ProceduralNavigationPage() {
|
||||
.filter(([key]) => !intakeFields.some(f => f.variable_name === key))
|
||||
.map(([key, value]) => (
|
||||
<div key={key} className="flex items-baseline justify-between gap-4 rounded-lg bg-accent px-3 py-2">
|
||||
<span className="text-xs font-medium text-muted-foreground">{key.replace(/_/g, ' ')}</span>
|
||||
<span className="text-right text-sm text-muted-foreground">{value || 'N/A'}</span>
|
||||
<span className="text-xs font-medium text-[#848b9b]">{key.replace(/_/g, ' ')}</span>
|
||||
<span className="text-right text-sm text-[#848b9b]">{value || 'N/A'}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user