UNPKG

ds-smart-ui

Version:

Smart UI v1.0.5 — A production-ready React component library by PT Praisindo Teknologi. Covers inputs, navigation, data display, feedback, and layout with a unified design system, semantic Typography tokens, and full Storybook documentation.

45 lines (44 loc) 1.66 kB
import { default as React } from 'react'; import { Accept, FileRejection } from 'react-dropzone'; export interface UploadZoneProps { /** Callback when files are selected */ onFileSelect?: (files: File[]) => void; /** Callback when files are rejected (due to size or type) */ onFileReject?: (fileRejections: FileRejection[]) => void; /** Callback when template download is clicked */ onTemplateDownload?: () => void; /** Accepted file types in react-dropzone format (e.g. { 'application/vnd.ms-excel': ['.xls'], 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': ['.xlsx'] }) */ accept?: Accept; /** Maximum file size in bytes */ maxSize?: number; /** Error state */ error?: boolean; /** Error or helper message */ helperText?: string; /** Custom title */ title?: string; /** Custom description */ description?: string; /** Whether to show download template link */ showTemplate?: boolean; /** Button label */ buttonLabel?: string; /** HTML ID */ id?: string; /** Additional class name */ className?: string; /** Label for accepted files display */ acceptLabel?: string; /** Loading state - shows upload progress animation */ isLoading?: boolean; /** Upload progress percentage (0-100) */ uploadProgress?: number; /** Loading message */ loadingMessage?: string; /** Callback to cancel upload */ onCancelUpload?: () => void; /** Optional icon shown to the left of helperText */ helperIcon?: React.ReactNode; } declare const UploadZone: React.FC<UploadZoneProps>; export default UploadZone;