refactor: implement unified border design system

- Define custom border utilities in @layer utilities for consistent theming
- Add border-default (1px gray), border-active (2px primary), border-hover (40% primary), and border-dragging (60% primary) classes
- Update all UI components (Input, Select, TextArea, Button, Dialog, Dropdown) to use unified border classes
- Replace hardcoded border colors (gray-200/300/600/700) with theme-responsive border-border-default
- Update provider cards, MCP components, settings, and forms with new border system
- Remove dark mode border overrides to simplify CSS and improve maintainability
- Ensure all borders automatically adapt to light/dark themes via CSS variables
This commit is contained in:
Jason
2025-10-20 23:44:06 +08:00
parent 13acc5323c
commit 3626880663
23 changed files with 74 additions and 44 deletions

View File

@@ -92,10 +92,10 @@ export function ProviderCard({
className={cn(
"rounded-lg bg-card p-4 shadow-sm transition-all duration-200",
isCurrent
? "border-2 border-[hsl(var(--primary))] bg-primary/5"
: "border border-[hsl(var(--border))] hover:border-primary/40",
? "border-active border-border-active bg-primary/5"
: "border border-border-default hover:border-border-hover",
dragHandleProps?.isDragging &&
"cursor-grabbing border-2 border-[hsl(var(--primary)/.6)] shadow-lg",
"cursor-grabbing border-active border-border-dragging shadow-lg",
)}
>
<div className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
@@ -105,9 +105,9 @@ export function ProviderCard({
className={cn(
"mt-1 flex h-8 flex-shrink-0 items-center justify-center overflow-hidden rounded-md border text-muted-foreground transition-all duration-200",
isEditMode
? "w-8 mr-3 border-muted hover:border-primary hover:text-foreground opacity-100"
? "w-8 mr-3 border-muted hover:border-border-hover hover:text-foreground opacity-100"
: "w-0 mr-0 border-transparent opacity-0 pointer-events-none",
dragHandleProps?.isDragging && "border-primary text-primary",
dragHandleProps?.isDragging && "border-border-active text-primary",
)}
aria-label={t("provider.dragHandle")}
{...(dragHandleProps?.attributes ?? {})}