stack.pyi 22 KB

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