1
0

upload.pyi 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. """Stub file for upload.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `scripts/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Dict, List, Optional, Union, overload
  6. from reflex.components.component import Component
  7. from reflex.vars import Var, BaseVar, ComputedVar
  8. from reflex.event import EventHandler, EventChain, EventSpec
  9. files_state: str
  10. upload_file: BaseVar
  11. selected_files: BaseVar
  12. clear_selected_files: BaseVar
  13. class Upload(Component):
  14. @overload
  15. @classmethod
  16. def create(cls, *children, accept: Optional[Union[Var[Optional[Dict[str, List]]], Optional[Dict[str, List]]]] = None, disabled: Optional[Union[Var[bool], bool]] = None, max_files: Optional[Union[Var[int], int]] = None, max_size: Optional[Union[Var[int], int]] = None, min_size: Optional[Union[Var[int], int]] = None, multiple: Optional[Union[Var[bool], bool]] = None, no_click: Optional[Union[Var[bool], bool]] = None, no_drag: Optional[Union[Var[bool], bool]] = None, no_keyboard: Optional[Union[Var[bool], bool]] = None, on_blur: Optional[Union[EventHandler, EventSpec, List, function, BaseVar]] = None, on_click: Optional[Union[EventHandler, EventSpec, List, function, BaseVar]] = None, on_context_menu: Optional[Union[EventHandler, EventSpec, List, function, BaseVar]] = None, on_double_click: Optional[Union[EventHandler, EventSpec, List, function, BaseVar]] = None, on_drop: Optional[Union[EventHandler, EventSpec, List, function, BaseVar]] = None, on_focus: Optional[Union[EventHandler, EventSpec, List, function, BaseVar]] = None, on_mount: Optional[Union[EventHandler, EventSpec, List, function, BaseVar]] = None, on_mouse_down: Optional[Union[EventHandler, EventSpec, List, function, BaseVar]] = None, on_mouse_enter: Optional[Union[EventHandler, EventSpec, List, function, BaseVar]] = None, on_mouse_leave: Optional[Union[EventHandler, EventSpec, List, function, BaseVar]] = None, on_mouse_move: Optional[Union[EventHandler, EventSpec, List, function, BaseVar]] = None, on_mouse_out: Optional[Union[EventHandler, EventSpec, List, function, BaseVar]] = None, on_mouse_over: Optional[Union[EventHandler, EventSpec, List, function, BaseVar]] = None, on_mouse_up: Optional[Union[EventHandler, EventSpec, List, function, BaseVar]] = None, on_scroll: Optional[Union[EventHandler, EventSpec, List, function, BaseVar]] = None, on_unmount: Optional[Union[EventHandler, EventSpec, List, function, BaseVar]] = None, **props) -> "Upload": # type: ignore
  17. """Create an upload component.
  18. Args:
  19. *children: The children of the component.
  20. accept: The list of accepted file types. This should be a dictionary of MIME types as keys and array of file formats as
  21. values.
  22. supported MIME types: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
  23. disabled: Whether the dropzone is disabled.
  24. max_files: The maximum number of files that can be uploaded.
  25. max_size: The maximum file size (bytes) that can be uploaded.
  26. min_size: The minimum file size (bytes) that can be uploaded.
  27. multiple: Whether to allow multiple files to be uploaded.
  28. no_click: Whether to disable click to upload.
  29. no_drag: Whether to disable drag and drop.
  30. no_keyboard: Whether to disable using the space/enter keys to upload.
  31. **props: The properties of the component.
  32. Returns:
  33. The upload component.
  34. """
  35. ...