hover_card.pyi 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. """Stub file for reflex/components/radix/themes/components/hover_card.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Callable, Dict, Literal, Optional, Union, overload
  6. from reflex.components.component import ComponentNamespace
  7. from reflex.components.core.breakpoints import Breakpoints
  8. from reflex.components.el import elements
  9. from reflex.event import EventHandler, EventSpec
  10. from reflex.ivars.base import ImmutableVar
  11. from reflex.style import Style
  12. from reflex.vars import Var
  13. from ..base import RadixThemesComponent, RadixThemesTriggerComponent
  14. class HoverCardRoot(RadixThemesComponent):
  15. @overload
  16. @classmethod
  17. def create( # type: ignore
  18. cls,
  19. *children,
  20. default_open: Optional[Union[Var[bool], bool]] = None,
  21. open: Optional[Union[Var[bool], bool]] = None,
  22. open_delay: Optional[Union[Var[int], int]] = None,
  23. close_delay: Optional[Union[Var[int], int]] = 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[ImmutableVar, str]]] = None,
  30. on_blur: Optional[
  31. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  32. ] = None,
  33. on_click: Optional[
  34. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  35. ] = None,
  36. on_context_menu: Optional[
  37. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  38. ] = None,
  39. on_double_click: Optional[
  40. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  41. ] = None,
  42. on_focus: Optional[
  43. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  44. ] = None,
  45. on_mount: Optional[
  46. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  47. ] = None,
  48. on_mouse_down: Optional[
  49. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  50. ] = None,
  51. on_mouse_enter: Optional[
  52. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  53. ] = None,
  54. on_mouse_leave: Optional[
  55. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  56. ] = None,
  57. on_mouse_move: Optional[
  58. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  59. ] = None,
  60. on_mouse_out: Optional[
  61. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  62. ] = None,
  63. on_mouse_over: Optional[
  64. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  65. ] = None,
  66. on_mouse_up: Optional[
  67. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  68. ] = None,
  69. on_open_change: Optional[
  70. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  71. ] = None,
  72. on_scroll: Optional[
  73. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  74. ] = None,
  75. on_unmount: Optional[
  76. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  77. ] = None,
  78. **props,
  79. ) -> "HoverCardRoot":
  80. """Create a new component instance.
  81. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  82. other UI libraries for common names, like Text and Button.
  83. Args:
  84. *children: Child components.
  85. default_open: The open state of the hover card when it is initially rendered. Use when you do not need to control its open state.
  86. open: The controlled open state of the hover card. Must be used in conjunction with onOpenChange.
  87. open_delay: The duration from when the mouse enters the trigger until the hover card opens.
  88. close_delay: The duration from when the mouse leaves the trigger until the hover card closes.
  89. style: The style of the component.
  90. key: A unique key for the component.
  91. id: The id for the component.
  92. class_name: The class name for the component.
  93. autofocus: Whether the component should take the focus once the page is loaded
  94. custom_attrs: custom attribute
  95. **props: Component properties.
  96. Returns:
  97. A new component instance.
  98. """
  99. ...
  100. class HoverCardTrigger(RadixThemesTriggerComponent):
  101. @overload
  102. @classmethod
  103. def create( # type: ignore
  104. cls,
  105. *children,
  106. style: Optional[Style] = None,
  107. key: Optional[Any] = None,
  108. id: Optional[Any] = None,
  109. class_name: Optional[Any] = None,
  110. autofocus: Optional[bool] = None,
  111. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  112. on_blur: Optional[
  113. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  114. ] = None,
  115. on_click: Optional[
  116. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  117. ] = None,
  118. on_context_menu: Optional[
  119. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  120. ] = None,
  121. on_double_click: Optional[
  122. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  123. ] = None,
  124. on_focus: Optional[
  125. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  126. ] = None,
  127. on_mount: Optional[
  128. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  129. ] = None,
  130. on_mouse_down: Optional[
  131. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  132. ] = None,
  133. on_mouse_enter: Optional[
  134. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  135. ] = None,
  136. on_mouse_leave: Optional[
  137. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  138. ] = None,
  139. on_mouse_move: Optional[
  140. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  141. ] = None,
  142. on_mouse_out: Optional[
  143. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  144. ] = None,
  145. on_mouse_over: Optional[
  146. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  147. ] = None,
  148. on_mouse_up: Optional[
  149. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  150. ] = None,
  151. on_scroll: Optional[
  152. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  153. ] = None,
  154. on_unmount: Optional[
  155. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  156. ] = None,
  157. **props,
  158. ) -> "HoverCardTrigger":
  159. """Create a new RadixThemesTriggerComponent instance.
  160. Args:
  161. children: The children of the component.
  162. props: The properties of the component.
  163. Returns:
  164. The new RadixThemesTriggerComponent instance.
  165. """
  166. ...
  167. class HoverCardContent(elements.Div, RadixThemesComponent):
  168. @overload
  169. @classmethod
  170. def create( # type: ignore
  171. cls,
  172. *children,
  173. side: Optional[
  174. Union[
  175. Var[
  176. Union[
  177. Breakpoints[str, Literal["top", "right", "bottom", "left"]],
  178. Literal["top", "right", "bottom", "left"],
  179. ]
  180. ],
  181. Literal["top", "right", "bottom", "left"],
  182. Breakpoints[str, Literal["top", "right", "bottom", "left"]],
  183. ]
  184. ] = None,
  185. side_offset: Optional[Union[Var[int], int]] = None,
  186. align: Optional[
  187. Union[
  188. Var[Literal["start", "center", "end"]],
  189. Literal["start", "center", "end"],
  190. ]
  191. ] = None,
  192. avoid_collisions: Optional[Union[Var[bool], bool]] = None,
  193. access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  194. auto_capitalize: Optional[
  195. Union[Var[Union[bool, int, str]], str, int, bool]
  196. ] = None,
  197. content_editable: Optional[
  198. Union[Var[Union[bool, int, str]], str, int, bool]
  199. ] = None,
  200. context_menu: Optional[
  201. Union[Var[Union[bool, int, str]], str, int, bool]
  202. ] = None,
  203. dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  204. draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  205. enter_key_hint: Optional[
  206. Union[Var[Union[bool, int, str]], str, int, bool]
  207. ] = None,
  208. hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  209. input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  210. item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  211. lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  212. role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  213. slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  214. spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  215. tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  216. title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  217. style: Optional[Style] = None,
  218. key: Optional[Any] = None,
  219. id: Optional[Any] = None,
  220. class_name: Optional[Any] = None,
  221. autofocus: Optional[bool] = None,
  222. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  223. on_blur: Optional[
  224. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  225. ] = None,
  226. on_click: Optional[
  227. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  228. ] = None,
  229. on_context_menu: Optional[
  230. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  231. ] = None,
  232. on_double_click: Optional[
  233. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  234. ] = None,
  235. on_focus: Optional[
  236. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  237. ] = None,
  238. on_mount: Optional[
  239. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  240. ] = None,
  241. on_mouse_down: Optional[
  242. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  243. ] = None,
  244. on_mouse_enter: Optional[
  245. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  246. ] = None,
  247. on_mouse_leave: Optional[
  248. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  249. ] = None,
  250. on_mouse_move: Optional[
  251. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  252. ] = None,
  253. on_mouse_out: Optional[
  254. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  255. ] = None,
  256. on_mouse_over: Optional[
  257. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  258. ] = None,
  259. on_mouse_up: Optional[
  260. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  261. ] = None,
  262. on_scroll: Optional[
  263. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  264. ] = None,
  265. on_unmount: Optional[
  266. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  267. ] = None,
  268. **props,
  269. ) -> "HoverCardContent":
  270. """Create a new component instance.
  271. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  272. other UI libraries for common names, like Text and Button.
  273. Args:
  274. *children: Child components.
  275. side: The preferred side of the trigger to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled.
  276. side_offset: The distance in pixels from the trigger.
  277. align: The preferred alignment against the trigger. May change when collisions occur.
  278. avoid_collisions: Whether or not the hover card should avoid collisions with its trigger.
  279. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  280. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  281. content_editable: Indicates whether the element's content is editable.
  282. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  283. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  284. draggable: Defines whether the element can be dragged.
  285. enter_key_hint: Hints what media types the media element is able to play.
  286. hidden: Defines whether the element is hidden.
  287. input_mode: Defines the type of the element.
  288. item_prop: Defines the name of the element for metadata purposes.
  289. lang: Defines the language used in the element.
  290. role: Defines the role of the element.
  291. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  292. spell_check: Defines whether the element may be checked for spelling errors.
  293. tab_index: Defines the position of the current element in the tabbing order.
  294. title: Defines a tooltip for the element.
  295. style: The style of the component.
  296. key: A unique key for the component.
  297. id: The id for the component.
  298. class_name: The class name for the component.
  299. autofocus: Whether the component should take the focus once the page is loaded
  300. custom_attrs: custom attribute
  301. **props: Component properties.
  302. Returns:
  303. A new component instance.
  304. """
  305. ...
  306. class HoverCard(ComponentNamespace):
  307. root = staticmethod(HoverCardRoot.create)
  308. trigger = staticmethod(HoverCardTrigger.create)
  309. content = staticmethod(HoverCardContent.create)
  310. @staticmethod
  311. def __call__(
  312. *children,
  313. default_open: Optional[Union[Var[bool], bool]] = None,
  314. open: Optional[Union[Var[bool], bool]] = None,
  315. open_delay: Optional[Union[Var[int], int]] = None,
  316. close_delay: Optional[Union[Var[int], int]] = None,
  317. style: Optional[Style] = None,
  318. key: Optional[Any] = None,
  319. id: Optional[Any] = None,
  320. class_name: Optional[Any] = None,
  321. autofocus: Optional[bool] = None,
  322. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  323. on_blur: Optional[
  324. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  325. ] = None,
  326. on_click: Optional[
  327. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  328. ] = None,
  329. on_context_menu: Optional[
  330. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  331. ] = None,
  332. on_double_click: Optional[
  333. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  334. ] = None,
  335. on_focus: Optional[
  336. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  337. ] = None,
  338. on_mount: Optional[
  339. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  340. ] = None,
  341. on_mouse_down: Optional[
  342. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  343. ] = None,
  344. on_mouse_enter: Optional[
  345. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  346. ] = None,
  347. on_mouse_leave: Optional[
  348. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  349. ] = None,
  350. on_mouse_move: Optional[
  351. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  352. ] = None,
  353. on_mouse_out: Optional[
  354. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  355. ] = None,
  356. on_mouse_over: Optional[
  357. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  358. ] = None,
  359. on_mouse_up: Optional[
  360. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  361. ] = None,
  362. on_open_change: Optional[
  363. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  364. ] = None,
  365. on_scroll: Optional[
  366. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  367. ] = None,
  368. on_unmount: Optional[
  369. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  370. ] = None,
  371. **props,
  372. ) -> "HoverCardRoot":
  373. """Create a new component instance.
  374. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  375. other UI libraries for common names, like Text and Button.
  376. Args:
  377. *children: Child components.
  378. default_open: The open state of the hover card when it is initially rendered. Use when you do not need to control its open state.
  379. open: The controlled open state of the hover card. Must be used in conjunction with onOpenChange.
  380. open_delay: The duration from when the mouse enters the trigger until the hover card opens.
  381. close_delay: The duration from when the mouse leaves the trigger until the hover card closes.
  382. style: The style of the component.
  383. key: A unique key for the component.
  384. id: The id for the component.
  385. class_name: The class name for the component.
  386. autofocus: Whether the component should take the focus once the page is loaded
  387. custom_attrs: custom attribute
  388. **props: Component properties.
  389. Returns:
  390. A new component instance.
  391. """
  392. ...
  393. hover_card = HoverCard()