stack.pyi 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. """Stub file for reflex/components/radix/themes/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.components.core.breakpoints import Breakpoints
  7. from reflex.event import EventType
  8. from reflex.style import Style
  9. from reflex.vars.base import Var
  10. from .flex import Flex
  11. class Stack(Flex):
  12. @overload
  13. @classmethod
  14. def create( # type: ignore
  15. cls,
  16. *children,
  17. spacing: Optional[
  18. Union[
  19. Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  20. Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  21. ]
  22. ] = None,
  23. align: Optional[
  24. Union[
  25. Literal["baseline", "center", "end", "start", "stretch"],
  26. Var[Literal["baseline", "center", "end", "start", "stretch"]],
  27. ]
  28. ] = None,
  29. as_child: Optional[Union[Var[bool], bool]] = None,
  30. direction: Optional[
  31. Union[
  32. Breakpoints[
  33. str, Literal["column", "column-reverse", "row", "row-reverse"]
  34. ],
  35. Literal["column", "column-reverse", "row", "row-reverse"],
  36. Var[
  37. Union[
  38. Breakpoints[
  39. str,
  40. Literal["column", "column-reverse", "row", "row-reverse"],
  41. ],
  42. Literal["column", "column-reverse", "row", "row-reverse"],
  43. ]
  44. ],
  45. ]
  46. ] = None,
  47. justify: Optional[
  48. Union[
  49. Breakpoints[str, Literal["between", "center", "end", "start"]],
  50. Literal["between", "center", "end", "start"],
  51. Var[
  52. Union[
  53. Breakpoints[str, Literal["between", "center", "end", "start"]],
  54. Literal["between", "center", "end", "start"],
  55. ]
  56. ],
  57. ]
  58. ] = None,
  59. wrap: Optional[
  60. Union[
  61. Breakpoints[str, Literal["nowrap", "wrap", "wrap-reverse"]],
  62. Literal["nowrap", "wrap", "wrap-reverse"],
  63. Var[
  64. Union[
  65. Breakpoints[str, Literal["nowrap", "wrap", "wrap-reverse"]],
  66. Literal["nowrap", "wrap", "wrap-reverse"],
  67. ]
  68. ],
  69. ]
  70. ] = None,
  71. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  72. auto_capitalize: Optional[
  73. Union[Var[Union[bool, int, str]], bool, int, str]
  74. ] = None,
  75. content_editable: Optional[
  76. Union[Var[Union[bool, int, str]], bool, int, str]
  77. ] = None,
  78. context_menu: Optional[
  79. Union[Var[Union[bool, int, str]], bool, int, str]
  80. ] = None,
  81. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  82. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  83. enter_key_hint: Optional[
  84. Union[Var[Union[bool, int, str]], bool, int, str]
  85. ] = None,
  86. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  87. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  88. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  89. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  90. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  91. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  92. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  93. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  94. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  95. style: Optional[Style] = None,
  96. key: Optional[Any] = None,
  97. id: Optional[Any] = None,
  98. class_name: Optional[Any] = None,
  99. autofocus: Optional[bool] = None,
  100. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  101. on_blur: Optional[EventType[()]] = None,
  102. on_click: Optional[EventType[()]] = None,
  103. on_context_menu: Optional[EventType[()]] = None,
  104. on_double_click: Optional[EventType[()]] = None,
  105. on_focus: Optional[EventType[()]] = None,
  106. on_mount: Optional[EventType[()]] = None,
  107. on_mouse_down: Optional[EventType[()]] = None,
  108. on_mouse_enter: Optional[EventType[()]] = None,
  109. on_mouse_leave: Optional[EventType[()]] = None,
  110. on_mouse_move: Optional[EventType[()]] = None,
  111. on_mouse_out: Optional[EventType[()]] = None,
  112. on_mouse_over: Optional[EventType[()]] = None,
  113. on_mouse_up: Optional[EventType[()]] = None,
  114. on_scroll: Optional[EventType[()]] = None,
  115. on_unmount: Optional[EventType[()]] = None,
  116. **props,
  117. ) -> "Stack":
  118. """Create a new instance of the component.
  119. Args:
  120. *children: The children of the stack.
  121. spacing: Gap between children: "0" - "9"
  122. align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
  123. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
  124. direction: How child items are laid out: "row" | "column" | "row-reverse" | "column-reverse"
  125. justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between"
  126. wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse"
  127. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  128. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  129. content_editable: Indicates whether the element's content is editable.
  130. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  131. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  132. draggable: Defines whether the element can be dragged.
  133. enter_key_hint: Hints what media types the media element is able to play.
  134. hidden: Defines whether the element is hidden.
  135. input_mode: Defines the type of the element.
  136. item_prop: Defines the name of the element for metadata purposes.
  137. lang: Defines the language used in the element.
  138. role: Defines the role of the element.
  139. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  140. spell_check: Defines whether the element may be checked for spelling errors.
  141. tab_index: Defines the position of the current element in the tabbing order.
  142. title: Defines a tooltip for the element.
  143. style: The style of the component.
  144. key: A unique key for the component.
  145. id: The id for the component.
  146. class_name: The class name for the component.
  147. autofocus: Whether the component should take the focus once the page is loaded
  148. custom_attrs: custom attribute
  149. **props: The properties of the stack.
  150. Returns:
  151. The stack component.
  152. """
  153. ...
  154. class VStack(Stack):
  155. @overload
  156. @classmethod
  157. def create( # type: ignore
  158. cls,
  159. *children,
  160. direction: Optional[
  161. Union[
  162. Literal["column", "column-reverse", "row", "row-reverse"],
  163. Var[Literal["column", "column-reverse", "row", "row-reverse"]],
  164. ]
  165. ] = None,
  166. spacing: Optional[
  167. Union[
  168. Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  169. Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  170. ]
  171. ] = None,
  172. align: Optional[
  173. Union[
  174. Literal["baseline", "center", "end", "start", "stretch"],
  175. Var[Literal["baseline", "center", "end", "start", "stretch"]],
  176. ]
  177. ] = None,
  178. as_child: Optional[Union[Var[bool], bool]] = None,
  179. justify: Optional[
  180. Union[
  181. Breakpoints[str, Literal["between", "center", "end", "start"]],
  182. Literal["between", "center", "end", "start"],
  183. Var[
  184. Union[
  185. Breakpoints[str, Literal["between", "center", "end", "start"]],
  186. Literal["between", "center", "end", "start"],
  187. ]
  188. ],
  189. ]
  190. ] = None,
  191. wrap: Optional[
  192. Union[
  193. Breakpoints[str, Literal["nowrap", "wrap", "wrap-reverse"]],
  194. Literal["nowrap", "wrap", "wrap-reverse"],
  195. Var[
  196. Union[
  197. Breakpoints[str, Literal["nowrap", "wrap", "wrap-reverse"]],
  198. Literal["nowrap", "wrap", "wrap-reverse"],
  199. ]
  200. ],
  201. ]
  202. ] = None,
  203. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  204. auto_capitalize: Optional[
  205. Union[Var[Union[bool, int, str]], bool, int, str]
  206. ] = None,
  207. content_editable: Optional[
  208. Union[Var[Union[bool, int, str]], bool, int, str]
  209. ] = None,
  210. context_menu: Optional[
  211. Union[Var[Union[bool, int, str]], bool, int, str]
  212. ] = None,
  213. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  214. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  215. enter_key_hint: Optional[
  216. Union[Var[Union[bool, int, str]], bool, int, str]
  217. ] = None,
  218. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  219. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  220. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  221. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  222. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  223. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  224. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  225. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  226. title: Optional[Union[Var[Union[bool, int, str]], bool, int, 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. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  233. on_blur: Optional[EventType[()]] = None,
  234. on_click: Optional[EventType[()]] = None,
  235. on_context_menu: Optional[EventType[()]] = None,
  236. on_double_click: Optional[EventType[()]] = None,
  237. on_focus: Optional[EventType[()]] = None,
  238. on_mount: Optional[EventType[()]] = None,
  239. on_mouse_down: Optional[EventType[()]] = None,
  240. on_mouse_enter: Optional[EventType[()]] = None,
  241. on_mouse_leave: Optional[EventType[()]] = None,
  242. on_mouse_move: Optional[EventType[()]] = None,
  243. on_mouse_out: Optional[EventType[()]] = None,
  244. on_mouse_over: Optional[EventType[()]] = None,
  245. on_mouse_up: Optional[EventType[()]] = None,
  246. on_scroll: Optional[EventType[()]] = None,
  247. on_unmount: Optional[EventType[()]] = None,
  248. **props,
  249. ) -> "VStack":
  250. """Create a new instance of the component.
  251. Args:
  252. *children: The children of the stack.
  253. direction: How child items are laid out: "row" | "column" | "row-reverse" | "column-reverse"
  254. spacing: Gap between children: "0" - "9"
  255. align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
  256. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
  257. justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between"
  258. wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse"
  259. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  260. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  261. content_editable: Indicates whether the element's content is editable.
  262. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  263. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  264. draggable: Defines whether the element can be dragged.
  265. enter_key_hint: Hints what media types the media element is able to play.
  266. hidden: Defines whether the element is hidden.
  267. input_mode: Defines the type of the element.
  268. item_prop: Defines the name of the element for metadata purposes.
  269. lang: Defines the language used in the element.
  270. role: Defines the role of the element.
  271. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  272. spell_check: Defines whether the element may be checked for spelling errors.
  273. tab_index: Defines the position of the current element in the tabbing order.
  274. title: Defines a tooltip for the element.
  275. style: The style of the component.
  276. key: A unique key for the component.
  277. id: The id for the component.
  278. class_name: The class name for the component.
  279. autofocus: Whether the component should take the focus once the page is loaded
  280. custom_attrs: custom attribute
  281. **props: The properties of the stack.
  282. Returns:
  283. The stack component.
  284. """
  285. ...
  286. class HStack(Stack):
  287. @overload
  288. @classmethod
  289. def create( # type: ignore
  290. cls,
  291. *children,
  292. direction: Optional[
  293. Union[
  294. Literal["column", "column-reverse", "row", "row-reverse"],
  295. Var[Literal["column", "column-reverse", "row", "row-reverse"]],
  296. ]
  297. ] = None,
  298. spacing: Optional[
  299. Union[
  300. Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  301. Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  302. ]
  303. ] = None,
  304. align: Optional[
  305. Union[
  306. Literal["baseline", "center", "end", "start", "stretch"],
  307. Var[Literal["baseline", "center", "end", "start", "stretch"]],
  308. ]
  309. ] = None,
  310. as_child: Optional[Union[Var[bool], bool]] = None,
  311. justify: Optional[
  312. Union[
  313. Breakpoints[str, Literal["between", "center", "end", "start"]],
  314. Literal["between", "center", "end", "start"],
  315. Var[
  316. Union[
  317. Breakpoints[str, Literal["between", "center", "end", "start"]],
  318. Literal["between", "center", "end", "start"],
  319. ]
  320. ],
  321. ]
  322. ] = None,
  323. wrap: Optional[
  324. Union[
  325. Breakpoints[str, Literal["nowrap", "wrap", "wrap-reverse"]],
  326. Literal["nowrap", "wrap", "wrap-reverse"],
  327. Var[
  328. Union[
  329. Breakpoints[str, Literal["nowrap", "wrap", "wrap-reverse"]],
  330. Literal["nowrap", "wrap", "wrap-reverse"],
  331. ]
  332. ],
  333. ]
  334. ] = None,
  335. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  336. auto_capitalize: Optional[
  337. Union[Var[Union[bool, int, str]], bool, int, str]
  338. ] = None,
  339. content_editable: Optional[
  340. Union[Var[Union[bool, int, str]], bool, int, str]
  341. ] = None,
  342. context_menu: Optional[
  343. Union[Var[Union[bool, int, str]], bool, int, str]
  344. ] = None,
  345. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  346. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  347. enter_key_hint: Optional[
  348. Union[Var[Union[bool, int, str]], bool, int, str]
  349. ] = None,
  350. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  351. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  352. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  353. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  354. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  355. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  356. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  357. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  358. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  359. style: Optional[Style] = None,
  360. key: Optional[Any] = None,
  361. id: Optional[Any] = None,
  362. class_name: Optional[Any] = None,
  363. autofocus: Optional[bool] = None,
  364. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  365. on_blur: Optional[EventType[()]] = None,
  366. on_click: Optional[EventType[()]] = None,
  367. on_context_menu: Optional[EventType[()]] = None,
  368. on_double_click: Optional[EventType[()]] = None,
  369. on_focus: Optional[EventType[()]] = None,
  370. on_mount: Optional[EventType[()]] = None,
  371. on_mouse_down: Optional[EventType[()]] = None,
  372. on_mouse_enter: Optional[EventType[()]] = None,
  373. on_mouse_leave: Optional[EventType[()]] = None,
  374. on_mouse_move: Optional[EventType[()]] = None,
  375. on_mouse_out: Optional[EventType[()]] = None,
  376. on_mouse_over: Optional[EventType[()]] = None,
  377. on_mouse_up: Optional[EventType[()]] = None,
  378. on_scroll: Optional[EventType[()]] = None,
  379. on_unmount: Optional[EventType[()]] = None,
  380. **props,
  381. ) -> "HStack":
  382. """Create a new instance of the component.
  383. Args:
  384. *children: The children of the stack.
  385. direction: How child items are laid out: "row" | "column" | "row-reverse" | "column-reverse"
  386. spacing: Gap between children: "0" - "9"
  387. align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
  388. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
  389. justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between"
  390. wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse"
  391. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  392. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  393. content_editable: Indicates whether the element's content is editable.
  394. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  395. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  396. draggable: Defines whether the element can be dragged.
  397. enter_key_hint: Hints what media types the media element is able to play.
  398. hidden: Defines whether the element is hidden.
  399. input_mode: Defines the type of the element.
  400. item_prop: Defines the name of the element for metadata purposes.
  401. lang: Defines the language used in the element.
  402. role: Defines the role of the element.
  403. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  404. spell_check: Defines whether the element may be checked for spelling errors.
  405. tab_index: Defines the position of the current element in the tabbing order.
  406. title: Defines a tooltip for the element.
  407. style: The style of the component.
  408. key: A unique key for the component.
  409. id: The id for the component.
  410. class_name: The class name for the component.
  411. autofocus: Whether the component should take the focus once the page is loaded
  412. custom_attrs: custom attribute
  413. **props: The properties of the stack.
  414. Returns:
  415. The stack component.
  416. """
  417. ...
  418. stack = Stack.create
  419. hstack = HStack.create
  420. vstack = VStack.create