stack.pyi 23 KB

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