import { OverrideProps } from '@mui/types'; import type { DropzoneOptions } from 'react-dropzone'; import { FilePickerBlockProps } from '../FilePickerBlock'; import { FilePickerPanelProps } from '../FilePickerPanel'; import { CreateSlotsAndSlotProps, SlotCommonProps, SlotProps } from '../types/slot'; export type FilePickerSlot = 'root' | 'pickerBlock' | 'filePanel'; export interface FilePickerSlots { /** * The component that renders the root. * @default 'div' */ root?: React.ElementType; /** * The component that renders the picker block. * @default FilePickerBlock */ pickerBlock?: React.ElementType; /** * The component that renders the inner html file input. */ htmlInput?: React.ElementType; /** * The component that renders the file panel. * @default FilePickerPanel */ filePanel?: React.ElementType; } export type FilePickerSlotsAndSlotProps = CreateSlotsAndSlotProps; pickerBlock: SlotProps<'div', FilePickerBlockProps, FilePickerOwnerState>; htmlInput: SlotProps<'input', object, FilePickerOwnerState>; filePanel: SlotProps<'div', FilePickerPanelProps, FilePickerOwnerState>; }>; export interface FilePickerTypeMap

{ props: P & FilePickerSlotsAndSlotProps & { /** * Options to configure the react-dropzone root element. This may be useful to define on drop callback, accepted file types, maximum file number and size,... * * Refer to the [react-dropzone documentation](https://react-dropzone.js.org/#src) for more details. */ dropzoneOptions: DropzoneOptions; /** * If `true`, the file picker is disabled. * @default false */ disabled?: boolean; }; defaultComponent: D; } export type FilePickerProps = OverrideProps, D>; export interface FilePickerOwnerState extends FilePickerProps { } export { DropzoneOptions };