import React from "react"; import { ChevronDown, ChevronUp, Check, Upload } from "lucide-react"; export const IS: React.CSSProperties = { width: "100%", padding: "8px 12px", border: "1px solid var(--border)", borderRadius: "var(--radius-button)", background: "var(--input-background)", fontSize: "var(--text-sm)", fontFamily: "var(--font-noto-sans)", color: "var(--card-foreground)", outline: "none", boxSizing: "border-box", }; export const SS: React.CSSProperties = { ...IS, cursor: "pointer", appearance: "none", paddingRight: "32px" }; export function Label({ text, required }: { text: string; required?: boolean }) { return ( ); } export function Field({ children, error }: { children: React.ReactNode; error?: string }) { return (
{children} {error ? (

{error}

) : null}
); } export function Row({ children }: { children: React.ReactNode }) { return
{children}
; } export function SelectWrap({ children }: { children: React.ReactNode }) { return (
{children}
); } export function RadioGroup({ name, value, onChange, options, disabled, }: { name: string; value: string; onChange: (v: string) => void; options: { label: string; value: string }[]; disabled?: boolean; }) { return (
{options.map((o) => ( ))}
); } export function UploadZone({ label, preview, error, inputRef, onFile, }: { label: string; preview: string | null; error?: string; inputRef: React.RefObject; onFile: (dataUrl: string) => void; }) { return (
inputRef.current?.click()} onDragOver={(e) => e.preventDefault()} onDrop={(e) => { e.preventDefault(); const file = e.dataTransfer.files[0]; if (file?.type.startsWith("image/")) { const r = new FileReader(); r.onload = () => { if (typeof r.result === "string") onFile(r.result); }; r.readAsDataURL(file); } }} style={{ border: `1.5px dashed ${error ? "var(--destructive)" : "var(--primary)"}`, borderRadius: "var(--radius-button)", background: "var(--secondary)", padding: "16px 12px", display: "flex", flexDirection: "column", alignItems: "center", gap: "6px", cursor: "pointer", }} > { const file = e.target.files?.[0]; if (file) { const r = new FileReader(); r.onload = () => { if (typeof r.result === "string") onFile(r.result); }; r.readAsDataURL(file); } }} /> {preview ? ( ) : ( )}

Drag and drop or select {label}

{error ?

{error}

: null}
); } export function StepCircle({ n, state }: { n: number; state: "todo" | "active" | "done" }) { const bg = state === "todo" ? "var(--muted)" : "var(--primary)"; return (
{state === "done" ? ( ) : ( {n} )}
); } export function AccordionSection({ n, title, subtitle, open, completed, onToggle, children, onNext, nextLabel, nextDisabled, }: { n: number; title: string; subtitle: string; open: boolean; completed: boolean; onToggle: () => void; children: React.ReactNode; onNext: () => void; nextLabel: string; nextDisabled?: boolean; }) { const state: "todo" | "active" | "done" = open ? "active" : completed ? "done" : "todo"; return (
{open && (

{subtitle}

{children}
{completed && (
Complete
)}
)}
); }