stack.pyi 22 KB

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