UNPKG

aura-glass

Version:

A comprehensive glassmorphism design system for React applications with 142+ production-ready components

103 lines 2.24 kB
import React from "react"; export interface UploadedFile { id: string; file: File; name: string; size: number; type: string; url?: string; preview?: string; status: "pending" | "uploading" | "completed" | "error"; progress?: number; error?: string; } export interface GlassFileUploadProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> { /** * File input accept attribute */ accept?: string; /** * Allow multiple files */ multiple?: boolean; /** * Maximum file size in bytes */ maxSize?: number; /** * Maximum number of files */ maxFiles?: number; /** * Upload variant */ variant?: "default" | "compact" | "minimal" | "grid"; /** * Upload size */ size?: "sm" | "md" | "lg"; /** * Disabled state */ disabled?: boolean; /** * Files array */ files?: UploadedFile[]; /** * File change handler */ onChange?: (files: UploadedFile[]) => void; /** * Upload function */ onUpload?: (file: File) => Promise<{ url: string; } | void>; /** * File remove handler */ onRemove?: (fileId: string) => void; /** * File preview handler */ onPreview?: (file: UploadedFile) => void; /** * Show file previews */ showPreviews?: boolean; /** * Show upload progress */ showProgress?: boolean; /** * Upload instruction text */ instruction?: string; /** * Helper text */ helperText?: string; /** * Error text */ error?: string; /** * Auto upload on file selection */ autoUpload?: boolean; /** * Custom file renderer */ renderFile?: (file: UploadedFile, index: number) => React.ReactNode; /** * Custom dropzone content */ children?: React.ReactNode; } /** * GlassFileUpload component * File upload with drag-and-drop functionality and glassmorphism styling */ export declare const GlassFileUpload: React.ForwardRefExoticComponent<GlassFileUploadProps & React.RefAttributes<HTMLDivElement>>; //# sourceMappingURL=GlassFileUpload.d.ts.map