stack.pyi 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. """Stub file for reflex/components/chakra/layout/stack.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/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. 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. """
  105. ...
  106. class Hstack(Stack):
  107. @overload
  108. @classmethod
  109. def create( # type: ignore
  110. cls,
  111. *children,
  112. align_items: Optional[Union[Var[str], str]] = None,
  113. direction: Optional[
  114. Union[
  115. Var[Union[Literal["row", "column"], List[str]]],
  116. Union[Literal["row", "column"], List[str]],
  117. ]
  118. ] = None,
  119. is_inline: Optional[Union[Var[bool], bool]] = None,
  120. justify_content: Optional[Union[Var[str], str]] = None,
  121. should_wrap_children: Optional[Union[Var[bool], bool]] = None,
  122. spacing: Optional[Union[Var[str], str]] = None,
  123. wrap: Optional[Union[Var[str], str]] = None,
  124. justify: Optional[Union[Var[str], str]] = None,
  125. style: Optional[Style] = None,
  126. key: Optional[Any] = None,
  127. id: Optional[Any] = None,
  128. class_name: Optional[Any] = None,
  129. autofocus: Optional[bool] = None,
  130. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  131. on_blur: Optional[
  132. Union[EventHandler, EventSpec, list, function, BaseVar]
  133. ] = None,
  134. on_click: Optional[
  135. Union[EventHandler, EventSpec, list, function, BaseVar]
  136. ] = None,
  137. on_context_menu: Optional[
  138. Union[EventHandler, EventSpec, list, function, BaseVar]
  139. ] = None,
  140. on_double_click: Optional[
  141. Union[EventHandler, EventSpec, list, function, BaseVar]
  142. ] = None,
  143. on_focus: Optional[
  144. Union[EventHandler, EventSpec, list, function, BaseVar]
  145. ] = None,
  146. on_mount: Optional[
  147. Union[EventHandler, EventSpec, list, function, BaseVar]
  148. ] = None,
  149. on_mouse_down: Optional[
  150. Union[EventHandler, EventSpec, list, function, BaseVar]
  151. ] = None,
  152. on_mouse_enter: Optional[
  153. Union[EventHandler, EventSpec, list, function, BaseVar]
  154. ] = None,
  155. on_mouse_leave: Optional[
  156. Union[EventHandler, EventSpec, list, function, BaseVar]
  157. ] = None,
  158. on_mouse_move: Optional[
  159. Union[EventHandler, EventSpec, list, function, BaseVar]
  160. ] = None,
  161. on_mouse_out: Optional[
  162. Union[EventHandler, EventSpec, list, function, BaseVar]
  163. ] = None,
  164. on_mouse_over: Optional[
  165. Union[EventHandler, EventSpec, list, function, BaseVar]
  166. ] = None,
  167. on_mouse_up: Optional[
  168. Union[EventHandler, EventSpec, list, function, BaseVar]
  169. ] = None,
  170. on_scroll: Optional[
  171. Union[EventHandler, EventSpec, list, function, BaseVar]
  172. ] = None,
  173. on_unmount: Optional[
  174. Union[EventHandler, EventSpec, list, function, BaseVar]
  175. ] = None,
  176. **props
  177. ) -> "Hstack":
  178. """Create the component.
  179. Args:
  180. *children: The children of the component.
  181. align_items: Shorthand for alignItems style prop
  182. direction: The direction to stack the items.
  183. is_inline: If true the items will be stacked horizontally.
  184. justify_content: Shorthand for justifyContent style prop
  185. should_wrap_children: If true, the children will be wrapped in a Box, and the Box will take the spacing props
  186. spacing: The space between each stack item
  187. wrap: Shorthand for flexWrap style prop
  188. justify: Alignment of contents.
  189. style: The style of the component.
  190. key: A unique key for the component.
  191. id: The id for the component.
  192. class_name: The class name for the component.
  193. autofocus: Whether the component should take the focus once the page is loaded
  194. custom_attrs: custom attribute
  195. **props: The props of the component.
  196. Returns:
  197. The component.
  198. """
  199. ...
  200. class Vstack(Stack):
  201. @overload
  202. @classmethod
  203. def create( # type: ignore
  204. cls,
  205. *children,
  206. align_items: Optional[Union[Var[str], str]] = None,
  207. direction: Optional[
  208. Union[
  209. Var[Union[Literal["row", "column"], List[str]]],
  210. Union[Literal["row", "column"], List[str]],
  211. ]
  212. ] = None,
  213. is_inline: Optional[Union[Var[bool], bool]] = None,
  214. justify_content: Optional[Union[Var[str], str]] = None,
  215. should_wrap_children: Optional[Union[Var[bool], bool]] = None,
  216. spacing: Optional[Union[Var[str], str]] = None,
  217. wrap: Optional[Union[Var[str], str]] = None,
  218. justify: Optional[Union[Var[str], str]] = None,
  219. style: Optional[Style] = None,
  220. key: Optional[Any] = None,
  221. id: Optional[Any] = None,
  222. class_name: Optional[Any] = None,
  223. autofocus: Optional[bool] = None,
  224. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  225. on_blur: Optional[
  226. Union[EventHandler, EventSpec, list, function, BaseVar]
  227. ] = None,
  228. on_click: Optional[
  229. Union[EventHandler, EventSpec, list, function, BaseVar]
  230. ] = None,
  231. on_context_menu: Optional[
  232. Union[EventHandler, EventSpec, list, function, BaseVar]
  233. ] = None,
  234. on_double_click: Optional[
  235. Union[EventHandler, EventSpec, list, function, BaseVar]
  236. ] = None,
  237. on_focus: Optional[
  238. Union[EventHandler, EventSpec, list, function, BaseVar]
  239. ] = None,
  240. on_mount: Optional[
  241. Union[EventHandler, EventSpec, list, function, BaseVar]
  242. ] = None,
  243. on_mouse_down: Optional[
  244. Union[EventHandler, EventSpec, list, function, BaseVar]
  245. ] = None,
  246. on_mouse_enter: Optional[
  247. Union[EventHandler, EventSpec, list, function, BaseVar]
  248. ] = None,
  249. on_mouse_leave: Optional[
  250. Union[EventHandler, EventSpec, list, function, BaseVar]
  251. ] = None,
  252. on_mouse_move: Optional[
  253. Union[EventHandler, EventSpec, list, function, BaseVar]
  254. ] = None,
  255. on_mouse_out: Optional[
  256. Union[EventHandler, EventSpec, list, function, BaseVar]
  257. ] = None,
  258. on_mouse_over: Optional[
  259. Union[EventHandler, EventSpec, list, function, BaseVar]
  260. ] = None,
  261. on_mouse_up: Optional[
  262. Union[EventHandler, EventSpec, list, function, BaseVar]
  263. ] = None,
  264. on_scroll: Optional[
  265. Union[EventHandler, EventSpec, list, function, BaseVar]
  266. ] = None,
  267. on_unmount: Optional[
  268. Union[EventHandler, EventSpec, list, function, BaseVar]
  269. ] = None,
  270. **props
  271. ) -> "Vstack":
  272. """Create the component.
  273. Args:
  274. *children: The children of the component.
  275. align_items: Shorthand for alignItems style prop
  276. direction: The direction to stack the items.
  277. is_inline: If true the items will be stacked horizontally.
  278. justify_content: Shorthand for justifyContent style prop
  279. should_wrap_children: If true, the children will be wrapped in a Box, and the Box will take the spacing props
  280. spacing: The space between each stack item
  281. wrap: Shorthand for flexWrap style prop
  282. justify: Alignment of contents.
  283. style: The style of the component.
  284. key: A unique key for the component.
  285. id: The id for the component.
  286. class_name: The class name for the component.
  287. autofocus: Whether the component should take the focus once the page is loaded
  288. custom_attrs: custom attribute
  289. **props: The props of the component.
  290. Returns:
  291. The component.
  292. """
  293. ...