card.pyi 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. """Stub file for reflex/components/layout/card.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 Optional
  10. from reflex.components.component import Component
  11. from reflex.components.libs.chakra import (
  12. ChakraComponent,
  13. LiteralCardVariant,
  14. LiteralColorScheme,
  15. LiteralTagSize,
  16. )
  17. from reflex.vars import Var
  18. class CardHeader(ChakraComponent):
  19. @overload
  20. @classmethod
  21. def create( # type: ignore
  22. cls,
  23. *children,
  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[
  31. Union[EventHandler, EventSpec, list, function, BaseVar]
  32. ] = None,
  33. on_click: Optional[
  34. Union[EventHandler, EventSpec, list, function, BaseVar]
  35. ] = None,
  36. on_context_menu: Optional[
  37. Union[EventHandler, EventSpec, list, function, BaseVar]
  38. ] = None,
  39. on_double_click: Optional[
  40. Union[EventHandler, EventSpec, list, function, BaseVar]
  41. ] = None,
  42. on_focus: Optional[
  43. Union[EventHandler, EventSpec, list, function, BaseVar]
  44. ] = None,
  45. on_mount: Optional[
  46. Union[EventHandler, EventSpec, list, function, BaseVar]
  47. ] = None,
  48. on_mouse_down: Optional[
  49. Union[EventHandler, EventSpec, list, function, BaseVar]
  50. ] = None,
  51. on_mouse_enter: Optional[
  52. Union[EventHandler, EventSpec, list, function, BaseVar]
  53. ] = None,
  54. on_mouse_leave: Optional[
  55. Union[EventHandler, EventSpec, list, function, BaseVar]
  56. ] = None,
  57. on_mouse_move: Optional[
  58. Union[EventHandler, EventSpec, list, function, BaseVar]
  59. ] = None,
  60. on_mouse_out: Optional[
  61. Union[EventHandler, EventSpec, list, function, BaseVar]
  62. ] = None,
  63. on_mouse_over: Optional[
  64. Union[EventHandler, EventSpec, list, function, BaseVar]
  65. ] = None,
  66. on_mouse_up: Optional[
  67. Union[EventHandler, EventSpec, list, function, BaseVar]
  68. ] = None,
  69. on_scroll: Optional[
  70. Union[EventHandler, EventSpec, list, function, BaseVar]
  71. ] = None,
  72. on_unmount: Optional[
  73. Union[EventHandler, EventSpec, list, function, BaseVar]
  74. ] = None,
  75. **props
  76. ) -> "CardHeader":
  77. """Create the component.
  78. Args:
  79. *children: The children of the component.
  80. style: The style of the component.
  81. key: A unique key for the component.
  82. id: The id for the component.
  83. class_name: The class name for the component.
  84. autofocus: Whether the component should take the focus once the page is loaded
  85. custom_attrs: custom attribute
  86. **props: The props of the component.
  87. Returns:
  88. The component.
  89. Raises:
  90. TypeError: If an invalid child is passed.
  91. """
  92. ...
  93. class CardBody(ChakraComponent):
  94. @overload
  95. @classmethod
  96. def create( # type: ignore
  97. cls,
  98. *children,
  99. style: Optional[Style] = None,
  100. key: Optional[Any] = None,
  101. id: Optional[Any] = None,
  102. class_name: Optional[Any] = None,
  103. autofocus: Optional[bool] = None,
  104. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  105. on_blur: Optional[
  106. Union[EventHandler, EventSpec, list, function, BaseVar]
  107. ] = None,
  108. on_click: Optional[
  109. Union[EventHandler, EventSpec, list, function, BaseVar]
  110. ] = None,
  111. on_context_menu: Optional[
  112. Union[EventHandler, EventSpec, list, function, BaseVar]
  113. ] = None,
  114. on_double_click: Optional[
  115. Union[EventHandler, EventSpec, list, function, BaseVar]
  116. ] = None,
  117. on_focus: Optional[
  118. Union[EventHandler, EventSpec, list, function, BaseVar]
  119. ] = None,
  120. on_mount: Optional[
  121. Union[EventHandler, EventSpec, list, function, BaseVar]
  122. ] = None,
  123. on_mouse_down: Optional[
  124. Union[EventHandler, EventSpec, list, function, BaseVar]
  125. ] = None,
  126. on_mouse_enter: Optional[
  127. Union[EventHandler, EventSpec, list, function, BaseVar]
  128. ] = None,
  129. on_mouse_leave: Optional[
  130. Union[EventHandler, EventSpec, list, function, BaseVar]
  131. ] = None,
  132. on_mouse_move: Optional[
  133. Union[EventHandler, EventSpec, list, function, BaseVar]
  134. ] = None,
  135. on_mouse_out: Optional[
  136. Union[EventHandler, EventSpec, list, function, BaseVar]
  137. ] = None,
  138. on_mouse_over: Optional[
  139. Union[EventHandler, EventSpec, list, function, BaseVar]
  140. ] = None,
  141. on_mouse_up: Optional[
  142. Union[EventHandler, EventSpec, list, function, BaseVar]
  143. ] = None,
  144. on_scroll: Optional[
  145. Union[EventHandler, EventSpec, list, function, BaseVar]
  146. ] = None,
  147. on_unmount: Optional[
  148. Union[EventHandler, EventSpec, list, function, BaseVar]
  149. ] = None,
  150. **props
  151. ) -> "CardBody":
  152. """Create the component.
  153. Args:
  154. *children: The children of the component.
  155. style: The style of the component.
  156. key: A unique key for the component.
  157. id: The id for the component.
  158. class_name: The class name for the component.
  159. autofocus: Whether the component should take the focus once the page is loaded
  160. custom_attrs: custom attribute
  161. **props: The props of the component.
  162. Returns:
  163. The component.
  164. Raises:
  165. TypeError: If an invalid child is passed.
  166. """
  167. ...
  168. class CardFooter(ChakraComponent):
  169. @overload
  170. @classmethod
  171. def create( # type: ignore
  172. cls,
  173. *children,
  174. style: Optional[Style] = None,
  175. key: Optional[Any] = None,
  176. id: Optional[Any] = None,
  177. class_name: Optional[Any] = None,
  178. autofocus: Optional[bool] = None,
  179. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  180. on_blur: Optional[
  181. Union[EventHandler, EventSpec, list, function, BaseVar]
  182. ] = None,
  183. on_click: Optional[
  184. Union[EventHandler, EventSpec, list, function, BaseVar]
  185. ] = None,
  186. on_context_menu: Optional[
  187. Union[EventHandler, EventSpec, list, function, BaseVar]
  188. ] = None,
  189. on_double_click: Optional[
  190. Union[EventHandler, EventSpec, list, function, BaseVar]
  191. ] = None,
  192. on_focus: Optional[
  193. Union[EventHandler, EventSpec, list, function, BaseVar]
  194. ] = None,
  195. on_mount: Optional[
  196. Union[EventHandler, EventSpec, list, function, BaseVar]
  197. ] = None,
  198. on_mouse_down: Optional[
  199. Union[EventHandler, EventSpec, list, function, BaseVar]
  200. ] = None,
  201. on_mouse_enter: Optional[
  202. Union[EventHandler, EventSpec, list, function, BaseVar]
  203. ] = None,
  204. on_mouse_leave: Optional[
  205. Union[EventHandler, EventSpec, list, function, BaseVar]
  206. ] = None,
  207. on_mouse_move: Optional[
  208. Union[EventHandler, EventSpec, list, function, BaseVar]
  209. ] = None,
  210. on_mouse_out: Optional[
  211. Union[EventHandler, EventSpec, list, function, BaseVar]
  212. ] = None,
  213. on_mouse_over: Optional[
  214. Union[EventHandler, EventSpec, list, function, BaseVar]
  215. ] = None,
  216. on_mouse_up: Optional[
  217. Union[EventHandler, EventSpec, list, function, BaseVar]
  218. ] = None,
  219. on_scroll: Optional[
  220. Union[EventHandler, EventSpec, list, function, BaseVar]
  221. ] = None,
  222. on_unmount: Optional[
  223. Union[EventHandler, EventSpec, list, function, BaseVar]
  224. ] = None,
  225. **props
  226. ) -> "CardFooter":
  227. """Create the component.
  228. Args:
  229. *children: The children of the component.
  230. style: The style of the component.
  231. key: A unique key for the component.
  232. id: The id for the component.
  233. class_name: The class name for the component.
  234. autofocus: Whether the component should take the focus once the page is loaded
  235. custom_attrs: custom attribute
  236. **props: The props of the component.
  237. Returns:
  238. The component.
  239. Raises:
  240. TypeError: If an invalid child is passed.
  241. """
  242. ...
  243. class Card(ChakraComponent):
  244. @overload
  245. @classmethod
  246. def create( # type: ignore
  247. cls,
  248. *children,
  249. header: Optional[Component] = None,
  250. footer: Optional[Component] = None,
  251. align: Optional[Union[Var[str], str]] = None,
  252. direction: Optional[Union[Var[str], str]] = None,
  253. justify: Optional[Union[Var[str], str]] = None,
  254. color_scheme: Optional[
  255. Union[
  256. Var[
  257. Literal[
  258. "none",
  259. "gray",
  260. "red",
  261. "orange",
  262. "yellow",
  263. "green",
  264. "teal",
  265. "blue",
  266. "cyan",
  267. "purple",
  268. "pink",
  269. "whiteAlpha",
  270. "blackAlpha",
  271. "linkedin",
  272. "facebook",
  273. "messenger",
  274. "whatsapp",
  275. "twitter",
  276. "telegram",
  277. ]
  278. ],
  279. Literal[
  280. "none",
  281. "gray",
  282. "red",
  283. "orange",
  284. "yellow",
  285. "green",
  286. "teal",
  287. "blue",
  288. "cyan",
  289. "purple",
  290. "pink",
  291. "whiteAlpha",
  292. "blackAlpha",
  293. "linkedin",
  294. "facebook",
  295. "messenger",
  296. "whatsapp",
  297. "twitter",
  298. "telegram",
  299. ],
  300. ]
  301. ] = None,
  302. size: Optional[
  303. Union[Var[Literal["sm", "md", "lg"]], Literal["sm", "md", "lg"]]
  304. ] = None,
  305. variant: Optional[
  306. Union[
  307. Var[Literal["outline", "filled", "elevated", "unstyled"]],
  308. Literal["outline", "filled", "elevated", "unstyled"],
  309. ]
  310. ] = None,
  311. style: Optional[Style] = None,
  312. key: Optional[Any] = None,
  313. id: Optional[Any] = None,
  314. class_name: Optional[Any] = None,
  315. autofocus: Optional[bool] = None,
  316. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  317. on_blur: Optional[
  318. Union[EventHandler, EventSpec, list, function, BaseVar]
  319. ] = None,
  320. on_click: Optional[
  321. Union[EventHandler, EventSpec, list, function, BaseVar]
  322. ] = None,
  323. on_context_menu: Optional[
  324. Union[EventHandler, EventSpec, list, function, BaseVar]
  325. ] = None,
  326. on_double_click: Optional[
  327. Union[EventHandler, EventSpec, list, function, BaseVar]
  328. ] = None,
  329. on_focus: Optional[
  330. Union[EventHandler, EventSpec, list, function, BaseVar]
  331. ] = None,
  332. on_mount: Optional[
  333. Union[EventHandler, EventSpec, list, function, BaseVar]
  334. ] = None,
  335. on_mouse_down: Optional[
  336. Union[EventHandler, EventSpec, list, function, BaseVar]
  337. ] = None,
  338. on_mouse_enter: Optional[
  339. Union[EventHandler, EventSpec, list, function, BaseVar]
  340. ] = None,
  341. on_mouse_leave: Optional[
  342. Union[EventHandler, EventSpec, list, function, BaseVar]
  343. ] = None,
  344. on_mouse_move: Optional[
  345. Union[EventHandler, EventSpec, list, function, BaseVar]
  346. ] = None,
  347. on_mouse_out: Optional[
  348. Union[EventHandler, EventSpec, list, function, BaseVar]
  349. ] = None,
  350. on_mouse_over: Optional[
  351. Union[EventHandler, EventSpec, list, function, BaseVar]
  352. ] = None,
  353. on_mouse_up: Optional[
  354. Union[EventHandler, EventSpec, list, function, BaseVar]
  355. ] = None,
  356. on_scroll: Optional[
  357. Union[EventHandler, EventSpec, list, function, BaseVar]
  358. ] = None,
  359. on_unmount: Optional[
  360. Union[EventHandler, EventSpec, list, function, BaseVar]
  361. ] = None,
  362. **props
  363. ) -> "Card":
  364. """Creates a Chakra Card with a body and optionally header and/or footer, and returns it.
  365. If header, body or footer are not already instances of Chead, Cbody or Cfoot respectively,
  366. they will be wrapped as such for layout purposes. If you want to modify their props,
  367. e.g. padding_left, you should wrap them yourself.
  368. Args:
  369. body (Component): The main content of the Card that will be created.
  370. header (Optional[Component]): The header of the Card.
  371. footer (Optional[Component]): The footer of the Card.
  372. props: The properties to be passed to the component.
  373. Returns:
  374. The `create()` method returns a Card object.
  375. """
  376. ...