feat: adicionar super manual didatico com fluxos 2d e sheet panel

This commit is contained in:
2026-07-09 23:40:06 +00:00
parent 9fece3f174
commit 40e73e734a
34 changed files with 1443 additions and 390 deletions
+74
View File
@@ -0,0 +1,74 @@
import { BookOpen, HelpCircle } from 'lucide-react';
import { Button } from '@/components/ui/button';
import {
Sheet,
SheetContent,
SheetDescription,
SheetHeader,
SheetTitle,
SheetTrigger,
} from '@/components/ui/sheet';
import { manuals } from '@/data/manuals';
import { WindFlowGrid2D } from './WindFlowGrid2D';
interface EducationalManualProps {
type: string;
params: Record<string, any>;
}
export function EducationalManual({ type, params }: EducationalManualProps) {
const manual = manuals[type];
if (!manual) {
return null;
}
return (
<Sheet>
<SheetTrigger asChild>
<Button
variant="outline"
size="icon"
className="size-10 bg-background/80 backdrop-blur-xs border border-border shadow-md hover:bg-accent/80 transition-all rounded-full flex items-center justify-center"
title="Manual Didático da Norma NBR 6123"
>
<BookOpen className="size-5 text-primary animate-pulse" />
</Button>
</SheetTrigger>
<SheetContent className="overflow-y-auto w-full sm:max-w-xl p-6 flex flex-col gap-6 border-l border-border bg-card">
<SheetHeader className="border-b border-border pb-4 flex flex-col gap-1.5">
<div className="flex items-center gap-2 text-primary">
<HelpCircle className="size-5" />
<SheetTitle className="text-xl font-bold tracking-tight">{manual.title}</SheetTitle>
</div>
<SheetDescription className="text-sm text-muted-foreground leading-relaxed">
{manual.intro}
</SheetDescription>
</SheetHeader>
{/* Simulador Interativo 2D no topo do manual */}
<WindFlowGrid2D type={type} params={params} />
{/* Seções de Texto e Fórmulas */}
<div className="flex flex-col gap-6 text-foreground leading-relaxed">
{manual.sections.map((section, idx) => (
<div key={idx} className="flex flex-col gap-3 bg-muted/20 p-4 rounded-xl border border-border/40">
<h3 className="text-base font-bold text-primary flex items-center gap-2 border-b border-border/60 pb-1.5">
{section.title}
</h3>
<div className="text-sm prose prose-neutral dark:prose-invert max-w-none text-muted-foreground">
{section.content}
</div>
</div>
))}
</div>
<div className="mt-auto border-t border-border pt-4 text-center">
<p className="text-[10px] text-muted-foreground font-mono">
VentoApp Referência: ABNT NBR 6123:2023
</p>
</div>
</SheetContent>
</Sheet>
);
}