stack.pyi 12 KB

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