stack.pyi 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. """Stub file for reflex/components/layout/stack.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 List, Union
  10. from reflex.components.libs.chakra import ChakraComponent, LiteralStackDirection
  11. from reflex.vars import Var
  12. class Stack(ChakraComponent):
  13. @overload
  14. @classmethod
  15. def create( # type: ignore
  16. cls,
  17. *children,
  18. align_items: Optional[Union[Var[str], str]] = None,
  19. direction: Optional[
  20. Union[
  21. Var[Union[Literal["row", "column"], List[str]]],
  22. Union[Literal["row", "column"], List[str]],
  23. ]
  24. ] = None,
  25. is_inline: Optional[Union[Var[bool], bool]] = None,
  26. justify_content: Optional[Union[Var[str], str]] = None,
  27. should_wrap_children: Optional[Union[Var[bool], bool]] = None,
  28. spacing: Optional[Union[Var[str], str]] = None,
  29. wrap: Optional[Union[Var[str], str]] = None,
  30. justify: Optional[Union[Var[str], str]] = None,
  31. style: Optional[Style] = None,
  32. key: Optional[Any] = None,
  33. id: Optional[Any] = None,
  34. class_name: Optional[Any] = None,
  35. autofocus: Optional[bool] = None,
  36. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  37. on_blur: Optional[
  38. Union[EventHandler, EventSpec, list, function, BaseVar]
  39. ] = None,
  40. on_click: Optional[
  41. Union[EventHandler, EventSpec, list, function, BaseVar]
  42. ] = None,
  43. on_context_menu: Optional[
  44. Union[EventHandler, EventSpec, list, function, BaseVar]
  45. ] = None,
  46. on_double_click: Optional[
  47. Union[EventHandler, EventSpec, list, function, BaseVar]
  48. ] = None,
  49. on_focus: Optional[
  50. Union[EventHandler, EventSpec, list, function, BaseVar]
  51. ] = None,
  52. on_mount: Optional[
  53. Union[EventHandler, EventSpec, list, function, BaseVar]
  54. ] = None,
  55. on_mouse_down: Optional[
  56. Union[EventHandler, EventSpec, list, function, BaseVar]
  57. ] = None,
  58. on_mouse_enter: Optional[
  59. Union[EventHandler, EventSpec, list, function, BaseVar]
  60. ] = None,
  61. on_mouse_leave: Optional[
  62. Union[EventHandler, EventSpec, list, function, BaseVar]
  63. ] = None,
  64. on_mouse_move: Optional[
  65. Union[EventHandler, EventSpec, list, function, BaseVar]
  66. ] = None,
  67. on_mouse_out: Optional[
  68. Union[EventHandler, EventSpec, list, function, BaseVar]
  69. ] = None,
  70. on_mouse_over: Optional[
  71. Union[EventHandler, EventSpec, list, function, BaseVar]
  72. ] = None,
  73. on_mouse_up: Optional[
  74. Union[EventHandler, EventSpec, list, function, BaseVar]
  75. ] = None,
  76. on_scroll: Optional[
  77. Union[EventHandler, EventSpec, list, function, BaseVar]
  78. ] = None,
  79. on_unmount: Optional[
  80. Union[EventHandler, EventSpec, list, function, BaseVar]
  81. ] = None,
  82. **props
  83. ) -> "Stack":
  84. """Create the component.
  85. Args:
  86. *children: The children of the component.
  87. align_items: Shorthand for alignItems style prop
  88. direction: The direction to stack the items.
  89. is_inline: If true the items will be stacked horizontally.
  90. justify_content: Shorthand for justifyContent style prop
  91. should_wrap_children: If true, the children will be wrapped in a Box, and the Box will take the spacing props
  92. spacing: The space between each stack item
  93. wrap: Shorthand for flexWrap style prop
  94. justify: Alignment of contents.
  95. style: The style of the component.
  96. key: A unique key for the component.
  97. id: The id for the component.
  98. class_name: The class name for the component.
  99. autofocus: Whether the component should take the focus once the page is loaded
  100. custom_attrs: custom attribute
  101. **props: The props of the component.
  102. Returns:
  103. The component.
  104. Raises:
  105. TypeError: If an invalid child is passed.
  106. """
  107. ...
  108. class Hstack(Stack):
  109. @overload
  110. @classmethod
  111. def create( # type: ignore
  112. cls,
  113. *children,
  114. align_items: Optional[Union[Var[str], str]] = None,
  115. direction: Optional[
  116. Union[
  117. Var[Union[Literal["row", "column"], List[str]]],
  118. Union[Literal["row", "column"], List[str]],
  119. ]
  120. ] = None,
  121. is_inline: Optional[Union[Var[bool], bool]] = None,
  122. justify_content: Optional[Union[Var[str], str]] = None,
  123. should_wrap_children: Optional[Union[Var[bool], bool]] = None,
  124. spacing: Optional[Union[Var[str], str]] = None,
  125. wrap: Optional[Union[Var[str], str]] = None,
  126. justify: Optional[Union[Var[str], str]] = None,
  127. style: Optional[Style] = None,
  128. key: Optional[Any] = None,
  129. id: Optional[Any] = None,
  130. class_name: Optional[Any] = None,
  131. autofocus: Optional[bool] = None,
  132. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  133. on_blur: Optional[
  134. Union[EventHandler, EventSpec, list, function, BaseVar]
  135. ] = None,
  136. on_click: Optional[
  137. Union[EventHandler, EventSpec, list, function, BaseVar]
  138. ] = None,
  139. on_context_menu: Optional[
  140. Union[EventHandler, EventSpec, list, function, BaseVar]
  141. ] = None,
  142. on_double_click: Optional[
  143. Union[EventHandler, EventSpec, list, function, BaseVar]
  144. ] = None,
  145. on_focus: Optional[
  146. Union[EventHandler, EventSpec, list, function, BaseVar]
  147. ] = None,
  148. on_mount: Optional[
  149. Union[EventHandler, EventSpec, list, function, BaseVar]
  150. ] = None,
  151. on_mouse_down: Optional[
  152. Union[EventHandler, EventSpec, list, function, BaseVar]
  153. ] = None,
  154. on_mouse_enter: Optional[
  155. Union[EventHandler, EventSpec, list, function, BaseVar]
  156. ] = None,
  157. on_mouse_leave: Optional[
  158. Union[EventHandler, EventSpec, list, function, BaseVar]
  159. ] = None,
  160. on_mouse_move: Optional[
  161. Union[EventHandler, EventSpec, list, function, BaseVar]
  162. ] = None,
  163. on_mouse_out: Optional[
  164. Union[EventHandler, EventSpec, list, function, BaseVar]
  165. ] = None,
  166. on_mouse_over: Optional[
  167. Union[EventHandler, EventSpec, list, function, BaseVar]
  168. ] = None,
  169. on_mouse_up: Optional[
  170. Union[EventHandler, EventSpec, list, function, BaseVar]
  171. ] = None,
  172. on_scroll: Optional[
  173. Union[EventHandler, EventSpec, list, function, BaseVar]
  174. ] = None,
  175. on_unmount: Optional[
  176. Union[EventHandler, EventSpec, list, function, BaseVar]
  177. ] = None,
  178. **props
  179. ) -> "Hstack":
  180. """Create the component.
  181. Args:
  182. *children: The children of the component.
  183. align_items: Shorthand for alignItems style prop
  184. direction: The direction to stack the items.
  185. is_inline: If true the items will be stacked horizontally.
  186. justify_content: Shorthand for justifyContent style prop
  187. should_wrap_children: If true, the children will be wrapped in a Box, and the Box will take the spacing props
  188. spacing: The space between each stack item
  189. wrap: Shorthand for flexWrap style prop
  190. justify: Alignment of contents.
  191. style: The style of the component.
  192. key: A unique key for the component.
  193. id: The id for the component.
  194. class_name: The class name for the component.
  195. autofocus: Whether the component should take the focus once the page is loaded
  196. custom_attrs: custom attribute
  197. **props: The props of the component.
  198. Returns:
  199. The component.
  200. Raises:
  201. TypeError: If an invalid child is passed.
  202. """
  203. ...
  204. class Vstack(Stack):
  205. @overload
  206. @classmethod
  207. def create( # type: ignore
  208. cls,
  209. *children,
  210. align_items: Optional[Union[Var[str], str]] = None,
  211. direction: Optional[
  212. Union[
  213. Var[Union[Literal["row", "column"], List[str]]],
  214. Union[Literal["row", "column"], List[str]],
  215. ]
  216. ] = None,
  217. is_inline: Optional[Union[Var[bool], bool]] = None,
  218. justify_content: Optional[Union[Var[str], str]] = None,
  219. should_wrap_children: Optional[Union[Var[bool], bool]] = None,
  220. spacing: Optional[Union[Var[str], str]] = None,
  221. wrap: Optional[Union[Var[str], str]] = None,
  222. justify: Optional[Union[Var[str], str]] = None,
  223. style: Optional[Style] = None,
  224. key: Optional[Any] = None,
  225. id: Optional[Any] = None,
  226. class_name: Optional[Any] = None,
  227. autofocus: Optional[bool] = None,
  228. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  229. on_blur: Optional[
  230. Union[EventHandler, EventSpec, list, function, BaseVar]
  231. ] = None,
  232. on_click: Optional[
  233. Union[EventHandler, EventSpec, list, function, BaseVar]
  234. ] = None,
  235. on_context_menu: Optional[
  236. Union[EventHandler, EventSpec, list, function, BaseVar]
  237. ] = None,
  238. on_double_click: Optional[
  239. Union[EventHandler, EventSpec, list, function, BaseVar]
  240. ] = None,
  241. on_focus: Optional[
  242. Union[EventHandler, EventSpec, list, function, BaseVar]
  243. ] = None,
  244. on_mount: Optional[
  245. Union[EventHandler, EventSpec, list, function, BaseVar]
  246. ] = None,
  247. on_mouse_down: Optional[
  248. Union[EventHandler, EventSpec, list, function, BaseVar]
  249. ] = None,
  250. on_mouse_enter: Optional[
  251. Union[EventHandler, EventSpec, list, function, BaseVar]
  252. ] = None,
  253. on_mouse_leave: Optional[
  254. Union[EventHandler, EventSpec, list, function, BaseVar]
  255. ] = None,
  256. on_mouse_move: Optional[
  257. Union[EventHandler, EventSpec, list, function, BaseVar]
  258. ] = None,
  259. on_mouse_out: Optional[
  260. Union[EventHandler, EventSpec, list, function, BaseVar]
  261. ] = None,
  262. on_mouse_over: Optional[
  263. Union[EventHandler, EventSpec, list, function, BaseVar]
  264. ] = None,
  265. on_mouse_up: Optional[
  266. Union[EventHandler, EventSpec, list, function, BaseVar]
  267. ] = None,
  268. on_scroll: Optional[
  269. Union[EventHandler, EventSpec, list, function, BaseVar]
  270. ] = None,
  271. on_unmount: Optional[
  272. Union[EventHandler, EventSpec, list, function, BaseVar]
  273. ] = None,
  274. **props
  275. ) -> "Vstack":
  276. """Create the component.
  277. Args:
  278. *children: The children of the component.
  279. align_items: Shorthand for alignItems style prop
  280. direction: The direction to stack the items.
  281. is_inline: If true the items will be stacked horizontally.
  282. justify_content: Shorthand for justifyContent style prop
  283. should_wrap_children: If true, the children will be wrapped in a Box, and the Box will take the spacing props
  284. spacing: The space between each stack item
  285. wrap: Shorthand for flexWrap style prop
  286. justify: Alignment of contents.
  287. style: The style of the component.
  288. key: A unique key for the component.
  289. id: The id for the component.
  290. class_name: The class name for the component.
  291. autofocus: Whether the component should take the focus once the page is loaded
  292. custom_attrs: custom attribute
  293. **props: The props of the component.
  294. Returns:
  295. The component.
  296. Raises:
  297. TypeError: If an invalid child is passed.
  298. """
  299. ...