tooltip.pyi 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. """Stub file for reflex/components/chakra/overlay/tooltip.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `scripts/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Dict, Literal, Optional, Union, overload
  6. from reflex.vars import Var, BaseVar, ComputedVar
  7. from reflex.event import EventChain, EventHandler, EventSpec
  8. from reflex.style import Style
  9. from typing import Any, Union
  10. from reflex.components.chakra import ChakraComponent, LiteralChakraDirection
  11. from reflex.vars import Var
  12. class Tooltip(ChakraComponent):
  13. def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
  14. @overload
  15. @classmethod
  16. def create( # type: ignore
  17. cls,
  18. *children,
  19. arrow_padding: Optional[Union[Var[int], int]] = None,
  20. arrow_shadow_color: Optional[Union[Var[str], str]] = None,
  21. arrow_size: Optional[Union[Var[int], int]] = None,
  22. delay: Optional[Union[Var[int], int]] = None,
  23. close_on_click: Optional[Union[Var[bool], bool]] = None,
  24. close_on_esc: Optional[Union[Var[bool], bool]] = None,
  25. close_on_mouse_down: Optional[Union[Var[bool], bool]] = None,
  26. default_is_open: Optional[Union[Var[bool], bool]] = None,
  27. direction: Optional[
  28. Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]
  29. ] = None,
  30. gutter: Optional[Union[Var[int], int]] = None,
  31. has_arrow: Optional[Union[Var[bool], bool]] = None,
  32. is_disabled: Optional[Union[Var[bool], bool]] = None,
  33. is_open: Optional[Union[Var[bool], bool]] = None,
  34. label: Optional[Union[Var[str], str]] = None,
  35. open_delay: Optional[Union[Var[int], int]] = None,
  36. placement: Optional[Union[Var[str], str]] = None,
  37. should_wrap_children: Optional[Union[Var[bool], bool]] = None,
  38. style: Optional[Style] = None,
  39. key: Optional[Any] = None,
  40. id: Optional[Any] = None,
  41. class_name: Optional[Any] = None,
  42. autofocus: Optional[bool] = None,
  43. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  44. on_blur: Optional[
  45. Union[EventHandler, EventSpec, list, function, BaseVar]
  46. ] = None,
  47. on_click: Optional[
  48. Union[EventHandler, EventSpec, list, function, BaseVar]
  49. ] = None,
  50. on_close: Optional[
  51. Union[EventHandler, EventSpec, list, function, BaseVar]
  52. ] = None,
  53. on_context_menu: Optional[
  54. Union[EventHandler, EventSpec, list, function, BaseVar]
  55. ] = None,
  56. on_double_click: Optional[
  57. Union[EventHandler, EventSpec, list, function, BaseVar]
  58. ] = None,
  59. on_focus: Optional[
  60. Union[EventHandler, EventSpec, list, function, BaseVar]
  61. ] = None,
  62. on_mount: Optional[
  63. Union[EventHandler, EventSpec, list, function, BaseVar]
  64. ] = None,
  65. on_mouse_down: Optional[
  66. Union[EventHandler, EventSpec, list, function, BaseVar]
  67. ] = None,
  68. on_mouse_enter: Optional[
  69. Union[EventHandler, EventSpec, list, function, BaseVar]
  70. ] = None,
  71. on_mouse_leave: Optional[
  72. Union[EventHandler, EventSpec, list, function, BaseVar]
  73. ] = None,
  74. on_mouse_move: Optional[
  75. Union[EventHandler, EventSpec, list, function, BaseVar]
  76. ] = None,
  77. on_mouse_out: Optional[
  78. Union[EventHandler, EventSpec, list, function, BaseVar]
  79. ] = None,
  80. on_mouse_over: Optional[
  81. Union[EventHandler, EventSpec, list, function, BaseVar]
  82. ] = None,
  83. on_mouse_up: Optional[
  84. Union[EventHandler, EventSpec, list, function, BaseVar]
  85. ] = None,
  86. on_open: Optional[
  87. Union[EventHandler, EventSpec, list, function, BaseVar]
  88. ] = None,
  89. on_scroll: Optional[
  90. Union[EventHandler, EventSpec, list, function, BaseVar]
  91. ] = None,
  92. on_unmount: Optional[
  93. Union[EventHandler, EventSpec, list, function, BaseVar]
  94. ] = None,
  95. **props
  96. ) -> "Tooltip":
  97. """Create the component.
  98. Args:
  99. *children: The children of the component.
  100. arrow_padding: The padding required to prevent the arrow from reaching the very edge of the popper.
  101. arrow_shadow_color: The color of the arrow shadow.
  102. arrow_size: Size of the arrow.
  103. delay: Delay (in ms) before hiding the tooltip
  104. close_on_click: If true, the tooltip will hide on click
  105. close_on_esc: If true, the tooltip will hide on pressing Esc key
  106. close_on_mouse_down: If true, the tooltip will hide while the mouse is down
  107. default_is_open: If true, the tooltip will be initially shown
  108. direction: Theme direction ltr or rtl. Popper's placement will be set accordingly
  109. gutter: The distance or margin between the reference and popper. It is used internally to create an offset modifier. NB: If you define offset prop, it'll override the gutter.
  110. has_arrow: If true, the tooltip will show an arrow tip
  111. is_disabled: If true, the tooltip with be disabled.
  112. is_open: If true, the tooltip will be open.
  113. label: The label of the tooltip
  114. open_delay: Delay (in ms) before showing the tooltip
  115. placement: The placement of the popper relative to its reference.
  116. should_wrap_children: If true, the tooltip will wrap its children in a `<span/>` with `tabIndex=0`
  117. style: The style of the component.
  118. key: A unique key for the component.
  119. id: The id for the component.
  120. class_name: The class name for the component.
  121. autofocus: Whether the component should take the focus once the page is loaded
  122. custom_attrs: custom attribute
  123. **props: The props of the component.
  124. Returns:
  125. The component.
  126. Raises:
  127. TypeError: If an invalid child is passed.
  128. """
  129. ...