clipboard.pyi 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 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[()]] = None,
  28. on_click: Optional[EventType[()]] = None,
  29. on_context_menu: Optional[EventType[()]] = None,
  30. on_double_click: Optional[EventType[()]] = None,
  31. on_focus: Optional[EventType[()]] = None,
  32. on_mount: Optional[EventType[()]] = None,
  33. on_mouse_down: Optional[EventType[()]] = None,
  34. on_mouse_enter: Optional[EventType[()]] = None,
  35. on_mouse_leave: Optional[EventType[()]] = None,
  36. on_mouse_move: Optional[EventType[()]] = None,
  37. on_mouse_out: Optional[EventType[()]] = None,
  38. on_mouse_over: Optional[EventType[()]] = None,
  39. on_mouse_up: Optional[EventType[()]] = None,
  40. on_paste: Optional[
  41. Union[EventType[()], EventType[list[tuple[str, str]]]]
  42. ] = None,
  43. on_scroll: Optional[EventType[()]] = None,
  44. on_unmount: Optional[EventType[()]] = None,
  45. **props,
  46. ) -> "Clipboard":
  47. """Create a Clipboard component.
  48. Args:
  49. *children: The children of the component.
  50. targets: The element ids to attach the event listener to. Defaults to all child components or the document.
  51. 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.
  52. on_paste_event_actions: Save the original event actions for the on_paste event.
  53. style: The style of the component.
  54. key: A unique key for the component.
  55. id: The id for the component.
  56. class_name: The class name for the component.
  57. autofocus: Whether the component should take the focus once the page is loaded
  58. custom_attrs: custom attribute
  59. **props: The properties of the component.
  60. Returns:
  61. The Clipboard Component.
  62. """
  63. ...
  64. def add_imports(self) -> dict[str, ImportVar]: ...
  65. def add_hooks(self) -> list[str | Var[str]]: ...
  66. clipboard = Clipboard.create