clipboard.pyi 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. """Stub file for reflex/components/core/clipboard.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Dict, List, Optional, Union, overload
  6. from reflex.components.base.fragment import Fragment
  7. from reflex.event import BASE_STATE, EventType
  8. from reflex.style import Style
  9. from reflex.utils.imports import ImportVar
  10. from reflex.vars.base import Var
  11. class Clipboard(Fragment):
  12. @overload
  13. @classmethod
  14. def create( # type: ignore
  15. cls,
  16. *children,
  17. targets: Optional[Union[List[str], Var[List[str]]]] = None,
  18. on_paste_event_actions: Optional[
  19. Union[Dict[str, Union[bool, int]], Var[Dict[str, Union[bool, int]]]]
  20. ] = None,
  21. style: Optional[Style] = None,
  22. key: Optional[Any] = None,
  23. id: Optional[Any] = None,
  24. class_name: Optional[Any] = None,
  25. autofocus: Optional[bool] = None,
  26. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  27. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  28. on_click: Optional[EventType[[], BASE_STATE]] = None,
  29. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  30. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  31. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  32. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  33. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  34. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  35. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  36. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  37. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  38. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  39. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  40. on_paste: Optional[
  41. Union[
  42. EventType[[], BASE_STATE],
  43. EventType[[list[tuple[str, str]]], BASE_STATE],
  44. ]
  45. ] = None,
  46. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  47. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  48. **props,
  49. ) -> "Clipboard":
  50. """Create a Clipboard component.
  51. Args:
  52. *children: The children of the component.
  53. targets: The element ids to attach the event listener to. Defaults to all child components or the document.
  54. on_paste: Called when the user pastes data into the document. Data is a list of tuples of (mime_type, data). Binary types will be base64 encoded as a data uri.
  55. on_paste_event_actions: Save the original event actions for the on_paste event.
  56. style: The style of the component.
  57. key: A unique key for the component.
  58. id: The id for the component.
  59. class_name: The class name for the component.
  60. autofocus: Whether the component should take the focus once the page is loaded
  61. custom_attrs: custom attribute
  62. **props: The properties of the component.
  63. Returns:
  64. The Clipboard Component.
  65. """
  66. ...
  67. def add_imports(self) -> dict[str, ImportVar]: ...
  68. def add_hooks(self) -> list[str | Var[str]]: ...
  69. clipboard = Clipboard.create