clipboard.pyi 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 (
  8. BASE_STATE,
  9. EventType,
  10. )
  11. from reflex.style import Style
  12. from reflex.utils.imports import ImportVar
  13. from reflex.vars.base import Var
  14. class Clipboard(Fragment):
  15. @overload
  16. @classmethod
  17. def create( # type: ignore
  18. cls,
  19. *children,
  20. targets: Optional[Union[List[str], Var[List[str]]]] = None,
  21. on_paste_event_actions: Optional[
  22. Union[Dict[str, Union[bool, int]], Var[Dict[str, Union[bool, int]]]]
  23. ] = None,
  24. style: Optional[Style] = None,
  25. key: Optional[Any] = None,
  26. id: Optional[Any] = None,
  27. class_name: Optional[Any] = None,
  28. autofocus: Optional[bool] = None,
  29. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  30. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  31. on_click: Optional[EventType[[], BASE_STATE]] = None,
  32. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  33. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  34. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  35. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  36. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  37. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  38. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  39. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  40. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  41. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  42. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  43. on_paste: Optional[EventType[[list[tuple[str, str]]], BASE_STATE]] = None,
  44. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  45. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  46. **props,
  47. ) -> "Clipboard":
  48. """Create a Clipboard component.
  49. Args:
  50. *children: The children of the component.
  51. targets: The element ids to attach the event listener to. Defaults to all child components or the document.
  52. 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.
  53. on_paste_event_actions: Save the original event actions for the on_paste event.
  54. style: The style of the component.
  55. key: A unique key for the component.
  56. id: The id for the component.
  57. class_name: The class name for the component.
  58. autofocus: Whether the component should take the focus once the page is loaded
  59. custom_attrs: custom attribute
  60. **props: The properties of the component.
  61. Returns:
  62. The Clipboard Component.
  63. """
  64. ...
  65. def add_imports(self) -> dict[str, ImportVar]: ...
  66. def add_hooks(self) -> list[str]: ...
  67. clipboard = Clipboard.create