style(ui): família visual de IA local

This commit is contained in:
evandro committed 2026-11-16 00:42:44 -03:00
1 parent f0b7db8c12
commit 07b0eaadca
62 files changed
+918 -853

No files matched your search

+21 -30
View File
@@ -106,26 +106,26 @@ export function SidebarList({
return (
<TooltipProvider delayDuration={300}>
<div className="flex flex-col h-full border-r border-sidebar-border bg-sidebar w-full overflow-x-hidden">
<div className="flex flex-col h-full border-r border-border bg-surface w-full overflow-x-hidden">
{/* Header com busca e botão Nova Conversa */}
<div className="p-3 border-b border-sidebar-border flex-shrink-0 space-y-2.5">
<div className="p-3 border-b border-border flex-shrink-0 space-y-2">
{/* Campo de busca */}
<div className="relative">
<Search className="absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground" />
<Search className="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground" />
<Input
type="text"
placeholder="Buscar conversas..."
value={localSearchInput}
onChange={(e) => setLocalSearchInput(e.target.value)}
className="pl-8 pr-8 h-9 text-sm"
className="pl-9 pr-9 h-9 text-sm"
/>
{isSearching && (
<Loader2 className="absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground animate-spin" />
<Loader2 className="absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary animate-spin" />
)}
{localSearchInput && !isSearching && (
<button
onClick={handleClearSearch}
className="absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors"
className="absolute right-3 top-1/2 -translate-y-1/2 rounded-sm text-muted-foreground hover:text-foreground transition-colors duration-150"
aria-label="Limpar busca"
>
<X className="w-4 h-4" />
@@ -145,15 +145,15 @@ export function SidebarList({
</div>
{/* Lista de chats com scroll customizado */}
<div className="flex-1 overflow-y-auto min-h-0 sidebar-chat-list">
<div className="p-2 space-y-1.5">
<div className="flex-1 overflow-y-auto min-h-0">
<div className="p-2 space-y-1">
{sessions.length === 0 && (
<div className="flex flex-col items-center justify-center py-12 px-4 text-center">
<MessageSquare className="w-10 h-10 text-muted-foreground/40 mb-3" />
<MessageSquare className="w-8 h-8 text-muted-foreground mb-3" />
<p className="text-sm text-muted-foreground">
{searchQuery ? 'Nenhuma conversa encontrada' : 'Nenhuma conversa salva'}
</p>
<p className="text-xs text-muted-foreground/70 mt-1">
<p className="text-xs text-muted-foreground mt-1">
{searchQuery
? 'Tente buscar por outro termo'
: 'Comece uma nova conversa para começar'}
@@ -170,11 +170,8 @@ export function SidebarList({
<TooltipTrigger asChild>
<div
className={cn(
"sidebar-chat-item group relative bg-card border rounded-lg cursor-pointer transition-all duration-200",
"hover:shadow-md hover:border-primary/20 hover:-translate-y-0.5",
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
isSelected && "border-primary/40 shadow-sm bg-accent/50",
"active:scale-[0.98]"
"sidebar-chat-item group relative rounded-md cursor-pointer transition-colors duration-150",
isSelected ? "bg-accent-soft" : "hover:bg-hover"
)}
onClick={() => onSelectSession(session.id)}
role="button"
@@ -187,15 +184,15 @@ export function SidebarList({
}}
>
{/* Conteúdo do card */}
<div className="sidebar-chat-item-content p-2.5">
<div className="sidebar-chat-item-content p-2">
{/* Ícone/Emoji */}
<div className="shrink-0 flex items-center justify-center w-8 h-8 rounded-md bg-muted/50 text-base">
{session.emoji || '💬'}
<div className="shrink-0 flex items-center justify-center w-8 h-8 rounded-md bg-background/60 text-base text-muted-foreground">
{session.emoji || <MessageSquare className="w-4 h-4" />}
</div>
{/* Texto do card */}
<div className="sidebar-chat-item-text flex-1 min-w-0">
<h3 className="sidebar-chat-item-title text-sm font-medium text-card-foreground leading-tight mb-0.5">
<h3 className="sidebar-chat-item-title text-sm font-medium text-foreground leading-tight">
{session.title}
</h3>
@@ -204,7 +201,7 @@ export function SidebarList({
{formatDate(session.updated_at)}
</p>
{searchQuery && session.match_count !== undefined && session.match_count > 0 && (
<span className="text-xs px-1.5 py-0.5 rounded bg-primary/10 text-primary font-medium">
<span className="text-xs px-1 rounded-sm bg-accent-soft text-foreground font-medium">
{session.match_count} {session.match_count === 1 ? 'ocorrência' : 'ocorrências'}
</span>
)}
@@ -213,7 +210,7 @@ export function SidebarList({
{/* Navegação de matches - aparece apenas quando selecionado e há busca ativa */}
{isSelected && searchQuery && session.match_count !== undefined && session.match_count > 0 && onNavigateMatch && (
<div className="flex flex-col gap-0.5 mr-1">
<div className="flex flex-col gap-1 mr-1">
<Button
variant="ghost"
size="icon"
@@ -248,10 +245,9 @@ export function SidebarList({
variant="ghost"
size="icon"
className={cn(
"h-7 w-7 shrink-0 transition-all duration-200",
"opacity-0 group-hover:opacity-100",
"hover:bg-destructive/10 hover:text-destructive",
"active:scale-95"
"h-8 w-8 shrink-0 transition-opacity duration-150",
"opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100",
"hover:bg-destructive/10 hover:text-destructive"
)}
onClick={(e) => {
e.stopPropagation();
@@ -263,11 +259,6 @@ export function SidebarList({
<Trash2 className="w-3.5 h-3.5" />
</Button>
</div>
{/* Indicador de seleção */}
{isSelected && (
<div className="absolute left-0 top-0 bottom-0 w-1 bg-primary rounded-l-lg" />
)}
</div>
</TooltipTrigger>
{showTooltip && (