list.pyi 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. """Stub file for reflex/components/datadisplay/list.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 import Component
  10. from reflex.components.layout.foreach import Foreach
  11. from reflex.components.libs.chakra import ChakraComponent
  12. from reflex.vars import Var
  13. class List(ChakraComponent):
  14. @overload
  15. @classmethod
  16. def create( # type: ignore
  17. cls,
  18. *children,
  19. items: Optional[list | Var[list] | None] = None,
  20. spacing: Optional[Union[Var[str], str]] = None,
  21. style_position: Optional[Union[Var[str], str]] = None,
  22. style_type: Optional[Union[Var[str], str]] = None,
  23. style: Optional[Style] = None,
  24. key: Optional[Any] = None,
  25. id: Optional[Any] = None,
  26. class_name: Optional[Any] = None,
  27. autofocus: Optional[bool] = None,
  28. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  29. on_blur: Optional[
  30. Union[EventHandler, EventSpec, list, function, BaseVar]
  31. ] = None,
  32. on_click: Optional[
  33. Union[EventHandler, EventSpec, list, function, BaseVar]
  34. ] = None,
  35. on_context_menu: Optional[
  36. Union[EventHandler, EventSpec, list, function, BaseVar]
  37. ] = None,
  38. on_double_click: Optional[
  39. Union[EventHandler, EventSpec, list, function, BaseVar]
  40. ] = None,
  41. on_focus: Optional[
  42. Union[EventHandler, EventSpec, list, function, BaseVar]
  43. ] = None,
  44. on_mount: Optional[
  45. Union[EventHandler, EventSpec, list, function, BaseVar]
  46. ] = None,
  47. on_mouse_down: Optional[
  48. Union[EventHandler, EventSpec, list, function, BaseVar]
  49. ] = None,
  50. on_mouse_enter: Optional[
  51. Union[EventHandler, EventSpec, list, function, BaseVar]
  52. ] = None,
  53. on_mouse_leave: Optional[
  54. Union[EventHandler, EventSpec, list, function, BaseVar]
  55. ] = None,
  56. on_mouse_move: Optional[
  57. Union[EventHandler, EventSpec, list, function, BaseVar]
  58. ] = None,
  59. on_mouse_out: Optional[
  60. Union[EventHandler, EventSpec, list, function, BaseVar]
  61. ] = None,
  62. on_mouse_over: Optional[
  63. Union[EventHandler, EventSpec, list, function, BaseVar]
  64. ] = None,
  65. on_mouse_up: Optional[
  66. Union[EventHandler, EventSpec, list, function, BaseVar]
  67. ] = None,
  68. on_scroll: Optional[
  69. Union[EventHandler, EventSpec, list, function, BaseVar]
  70. ] = None,
  71. on_unmount: Optional[
  72. Union[EventHandler, EventSpec, list, function, BaseVar]
  73. ] = None,
  74. **props
  75. ) -> "List":
  76. """Create a list component.
  77. Args:
  78. *children: The children of the component.
  79. items: A list of items to add to the list.
  80. spacing: The space between each list item
  81. style_position: Shorthand prop for listStylePosition
  82. style_type: Shorthand prop for listStyleType
  83. style: The style of the component.
  84. key: A unique key for the component.
  85. id: The id for the component.
  86. class_name: The class name for the component.
  87. autofocus: Whether the component should take the focus once the page is loaded
  88. custom_attrs: custom attribute
  89. **props: The properties of the component.
  90. Returns:
  91. The list component.
  92. """
  93. ...
  94. class ListItem(ChakraComponent):
  95. @overload
  96. @classmethod
  97. def create( # type: ignore
  98. cls,
  99. *children,
  100. style: Optional[Style] = None,
  101. key: Optional[Any] = None,
  102. id: Optional[Any] = None,
  103. class_name: Optional[Any] = None,
  104. autofocus: Optional[bool] = None,
  105. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  106. on_blur: Optional[
  107. Union[EventHandler, EventSpec, list, function, BaseVar]
  108. ] = None,
  109. on_click: Optional[
  110. Union[EventHandler, EventSpec, list, function, BaseVar]
  111. ] = None,
  112. on_context_menu: Optional[
  113. Union[EventHandler, EventSpec, list, function, BaseVar]
  114. ] = None,
  115. on_double_click: Optional[
  116. Union[EventHandler, EventSpec, list, function, BaseVar]
  117. ] = None,
  118. on_focus: Optional[
  119. Union[EventHandler, EventSpec, list, function, BaseVar]
  120. ] = None,
  121. on_mount: Optional[
  122. Union[EventHandler, EventSpec, list, function, BaseVar]
  123. ] = None,
  124. on_mouse_down: Optional[
  125. Union[EventHandler, EventSpec, list, function, BaseVar]
  126. ] = None,
  127. on_mouse_enter: Optional[
  128. Union[EventHandler, EventSpec, list, function, BaseVar]
  129. ] = None,
  130. on_mouse_leave: Optional[
  131. Union[EventHandler, EventSpec, list, function, BaseVar]
  132. ] = None,
  133. on_mouse_move: Optional[
  134. Union[EventHandler, EventSpec, list, function, BaseVar]
  135. ] = None,
  136. on_mouse_out: Optional[
  137. Union[EventHandler, EventSpec, list, function, BaseVar]
  138. ] = None,
  139. on_mouse_over: Optional[
  140. Union[EventHandler, EventSpec, list, function, BaseVar]
  141. ] = None,
  142. on_mouse_up: Optional[
  143. Union[EventHandler, EventSpec, list, function, BaseVar]
  144. ] = None,
  145. on_scroll: Optional[
  146. Union[EventHandler, EventSpec, list, function, BaseVar]
  147. ] = None,
  148. on_unmount: Optional[
  149. Union[EventHandler, EventSpec, list, function, BaseVar]
  150. ] = None,
  151. **props
  152. ) -> "ListItem":
  153. """Create the component.
  154. Args:
  155. *children: The children of the component.
  156. style: The style of the component.
  157. key: A unique key for the component.
  158. id: The id for the component.
  159. class_name: The class name for the component.
  160. autofocus: Whether the component should take the focus once the page is loaded
  161. custom_attrs: custom attribute
  162. **props: The props of the component.
  163. Returns:
  164. The component.
  165. Raises:
  166. TypeError: If an invalid child is passed.
  167. """
  168. ...
  169. class OrderedList(List):
  170. @overload
  171. @classmethod
  172. def create( # type: ignore
  173. cls,
  174. *children,
  175. items: Optional[list | Var[list] | None] = None,
  176. spacing: Optional[Union[Var[str], str]] = None,
  177. style_position: Optional[Union[Var[str], str]] = None,
  178. style_type: Optional[Union[Var[str], str]] = None,
  179. style: Optional[Style] = None,
  180. key: Optional[Any] = None,
  181. id: Optional[Any] = None,
  182. class_name: Optional[Any] = None,
  183. autofocus: Optional[bool] = None,
  184. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  185. on_blur: Optional[
  186. Union[EventHandler, EventSpec, list, function, BaseVar]
  187. ] = None,
  188. on_click: Optional[
  189. Union[EventHandler, EventSpec, list, function, BaseVar]
  190. ] = None,
  191. on_context_menu: Optional[
  192. Union[EventHandler, EventSpec, list, function, BaseVar]
  193. ] = None,
  194. on_double_click: Optional[
  195. Union[EventHandler, EventSpec, list, function, BaseVar]
  196. ] = None,
  197. on_focus: Optional[
  198. Union[EventHandler, EventSpec, list, function, BaseVar]
  199. ] = None,
  200. on_mount: Optional[
  201. Union[EventHandler, EventSpec, list, function, BaseVar]
  202. ] = None,
  203. on_mouse_down: Optional[
  204. Union[EventHandler, EventSpec, list, function, BaseVar]
  205. ] = None,
  206. on_mouse_enter: Optional[
  207. Union[EventHandler, EventSpec, list, function, BaseVar]
  208. ] = None,
  209. on_mouse_leave: Optional[
  210. Union[EventHandler, EventSpec, list, function, BaseVar]
  211. ] = None,
  212. on_mouse_move: Optional[
  213. Union[EventHandler, EventSpec, list, function, BaseVar]
  214. ] = None,
  215. on_mouse_out: Optional[
  216. Union[EventHandler, EventSpec, list, function, BaseVar]
  217. ] = None,
  218. on_mouse_over: Optional[
  219. Union[EventHandler, EventSpec, list, function, BaseVar]
  220. ] = None,
  221. on_mouse_up: Optional[
  222. Union[EventHandler, EventSpec, list, function, BaseVar]
  223. ] = None,
  224. on_scroll: Optional[
  225. Union[EventHandler, EventSpec, list, function, BaseVar]
  226. ] = None,
  227. on_unmount: Optional[
  228. Union[EventHandler, EventSpec, list, function, BaseVar]
  229. ] = None,
  230. **props
  231. ) -> "OrderedList":
  232. """Create a list component.
  233. Args:
  234. *children: The children of the component.
  235. items: A list of items to add to the list.
  236. spacing: The space between each list item
  237. style_position: Shorthand prop for listStylePosition
  238. style_type: Shorthand prop for listStyleType
  239. style: The style of the component.
  240. key: A unique key for the component.
  241. id: The id for the component.
  242. class_name: The class name for the component.
  243. autofocus: Whether the component should take the focus once the page is loaded
  244. custom_attrs: custom attribute
  245. **props: The properties of the component.
  246. Returns:
  247. The list component.
  248. """
  249. ...
  250. class UnorderedList(List):
  251. @overload
  252. @classmethod
  253. def create( # type: ignore
  254. cls,
  255. *children,
  256. items: Optional[list | Var[list] | None] = None,
  257. spacing: Optional[Union[Var[str], str]] = None,
  258. style_position: Optional[Union[Var[str], str]] = None,
  259. style_type: Optional[Union[Var[str], str]] = None,
  260. style: Optional[Style] = None,
  261. key: Optional[Any] = None,
  262. id: Optional[Any] = None,
  263. class_name: Optional[Any] = None,
  264. autofocus: Optional[bool] = None,
  265. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  266. on_blur: Optional[
  267. Union[EventHandler, EventSpec, list, function, BaseVar]
  268. ] = None,
  269. on_click: Optional[
  270. Union[EventHandler, EventSpec, list, function, BaseVar]
  271. ] = None,
  272. on_context_menu: Optional[
  273. Union[EventHandler, EventSpec, list, function, BaseVar]
  274. ] = None,
  275. on_double_click: Optional[
  276. Union[EventHandler, EventSpec, list, function, BaseVar]
  277. ] = None,
  278. on_focus: Optional[
  279. Union[EventHandler, EventSpec, list, function, BaseVar]
  280. ] = None,
  281. on_mount: Optional[
  282. Union[EventHandler, EventSpec, list, function, BaseVar]
  283. ] = None,
  284. on_mouse_down: Optional[
  285. Union[EventHandler, EventSpec, list, function, BaseVar]
  286. ] = None,
  287. on_mouse_enter: Optional[
  288. Union[EventHandler, EventSpec, list, function, BaseVar]
  289. ] = None,
  290. on_mouse_leave: Optional[
  291. Union[EventHandler, EventSpec, list, function, BaseVar]
  292. ] = None,
  293. on_mouse_move: Optional[
  294. Union[EventHandler, EventSpec, list, function, BaseVar]
  295. ] = None,
  296. on_mouse_out: Optional[
  297. Union[EventHandler, EventSpec, list, function, BaseVar]
  298. ] = None,
  299. on_mouse_over: Optional[
  300. Union[EventHandler, EventSpec, list, function, BaseVar]
  301. ] = None,
  302. on_mouse_up: Optional[
  303. Union[EventHandler, EventSpec, list, function, BaseVar]
  304. ] = None,
  305. on_scroll: Optional[
  306. Union[EventHandler, EventSpec, list, function, BaseVar]
  307. ] = None,
  308. on_unmount: Optional[
  309. Union[EventHandler, EventSpec, list, function, BaseVar]
  310. ] = None,
  311. **props
  312. ) -> "UnorderedList":
  313. """Create a list component.
  314. Args:
  315. *children: The children of the component.
  316. items: A list of items to add to the list.
  317. spacing: The space between each list item
  318. style_position: Shorthand prop for listStylePosition
  319. style_type: Shorthand prop for listStyleType
  320. style: The style of the component.
  321. key: A unique key for the component.
  322. id: The id for the component.
  323. class_name: The class name for the component.
  324. autofocus: Whether the component should take the focus once the page is loaded
  325. custom_attrs: custom attribute
  326. **props: The properties of the component.
  327. Returns:
  328. The list component.
  329. """
  330. ...