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

+19 -34
View File
@@ -33,37 +33,31 @@ export function ProcessingIndicator({
key: ProcessingStep;
label: string;
icon: React.ReactNode;
emoji: string;
}> = [
{
key: 'collecting',
label: 'Coletando Dados',
icon: <Search className="w-4 h-4" />,
emoji: '🔍',
},
{
key: 'processing',
label: 'Processando...',
icon: <Brain className="w-4 h-4" />,
emoji: '🤖',
},
{
key: 'searching',
label: sourcesCount > 0 ? `Buscando na Web (${sourcesCount} fontes)...` : 'Buscando na Web...',
icon: <Globe className="w-4 h-4" />,
emoji: '🌐',
},
{
key: 'preparing',
label: 'Preparando Contexto',
icon: <Package className="w-4 h-4" />,
emoji: '📦',
},
{
key: 'streaming',
label: 'Gerando Resposta...',
icon: <Loader2 className="w-4 h-4 animate-spin" />,
emoji: '💬',
},
];
@@ -73,24 +67,15 @@ export function ProcessingIndicator({
return (
<div
className={cn(
"mx-4 mb-3 px-4 py-3 rounded-lg border border-muted/50 bg-muted/20 transition-all duration-300",
"mx-4 mb-3 px-4 py-3 rounded-lg border bg-surface transition-[opacity,transform] duration-200 ease-out",
isVisible ? "opacity-100 translate-y-0" : "opacity-0 -translate-y-2"
)}
>
{/* Card de Status Atual */}
<div className="flex items-center gap-3 mb-3">
<div className="flex-shrink-0">
<div className="relative w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center">
{currentStep === 'collecting' && (
<div className="absolute inset-0 rounded-full border-2 border-primary/30 animate-ping" />
)}
{currentStep === 'processing' && (
<div className="absolute inset-0 rounded-full border-2 border-primary/30 animate-pulse" />
)}
{currentStep === 'searching' && (
<div className="absolute inset-0 rounded-full border-2 border-primary/30 animate-spin" style={{ animationDuration: '2s' }} />
)}
<span className="text-xl relative z-10">{currentStepData.emoji}</span>
<div className="w-10 h-10 rounded-full bg-accent-soft text-foreground flex items-center justify-center">
{currentStepData.icon}
</div>
</div>
<div className="flex-1 min-w-0">
@@ -98,9 +83,9 @@ export function ProcessingIndicator({
{currentStepData.label}
</div>
{progress > 0 && progress < 100 && (
<div className="mt-1.5 h-1.5 bg-muted rounded-full overflow-hidden">
<div className="mt-2 h-1 bg-hover rounded-full overflow-hidden">
<div
className="h-full bg-primary transition-all duration-300 ease-out"
className="h-full bg-primary"
style={{ width: `${progress}%` }}
/>
</div>
@@ -115,13 +100,13 @@ export function ProcessingIndicator({
const isPast = idx < currentStepIndex;
return (
<div key={step.key} className="flex items-center gap-1.5">
<div key={step.key} className="flex items-center gap-1">
<div
className={cn(
"flex items-center justify-center w-6 h-6 rounded-full transition-all duration-300",
isPast && "bg-green-500/20 text-green-600 dark:text-green-400",
isActive && "bg-primary/20 text-primary animate-pulse",
!isActive && !isPast && "bg-muted text-muted-foreground"
"flex items-center justify-center w-6 h-6 rounded-full transition-colors duration-150",
isPast && "bg-success/15 text-success",
isActive && "bg-accent-soft text-foreground",
!isActive && !isPast && "bg-hover text-muted-foreground"
)}
>
{isPast ? (
@@ -134,15 +119,15 @@ export function ProcessingIndicator({
</div>
<span
className={cn(
"transition-colors duration-300",
"transition-colors duration-150",
isActive && "text-foreground font-medium",
isPast && "text-muted-foreground opacity-60"
isPast && "text-muted-foreground"
)}
>
{step.label.split(' ')[0]} {/* Mostrar apenas primeira palavra na timeline */}
</span>
{idx < currentStepIndex && (
<div className="w-6 h-px bg-muted mx-1" />
<div className="w-6 h-px bg-border mx-1" />
)}
</div>
);
@@ -159,10 +144,10 @@ export function ProcessingIndicator({
<div key={step.key} className="flex items-center gap-2">
<div
className={cn(
"flex items-center justify-center w-5 h-5 rounded-full transition-all",
isPast && "bg-green-500/20 text-green-600 dark:text-green-400",
isActive && "bg-primary/20 text-primary animate-pulse",
!isActive && !isPast && "bg-muted text-muted-foreground"
"flex items-center justify-center w-5 h-5 rounded-full transition-colors duration-150",
isPast && "bg-success/15 text-success",
isActive && "bg-accent-soft text-foreground",
!isActive && !isPast && "bg-hover text-muted-foreground"
)}
>
{isPast ? (
@@ -175,9 +160,9 @@ export function ProcessingIndicator({
</div>
<span
className={cn(
"text-xs transition-colors",
"text-xs transition-colors duration-150",
isActive && "text-foreground font-medium",
isPast && "text-muted-foreground opacity-60"
isPast && "text-muted-foreground"
)}
>
{step.label}