grid.pyi 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. """Stub file for reflex/components/layout/grid.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 List
  10. from reflex.components.libs.chakra import ChakraComponent
  11. from reflex.vars import Var
  12. class Grid(ChakraComponent):
  13. @overload
  14. @classmethod
  15. def create( # type: ignore
  16. cls,
  17. *children,
  18. auto_columns: Optional[Union[Var[str], str]] = None,
  19. auto_flow: Optional[Union[Var[str], str]] = None,
  20. auto_rows: Optional[Union[Var[str], str]] = None,
  21. column: Optional[Union[Var[str], str]] = None,
  22. row: Optional[Union[Var[str], str]] = None,
  23. template_columns: Optional[Union[Var[str], str]] = None,
  24. template_rows: Optional[Union[Var[str], str]] = None,
  25. style: Optional[Style] = None,
  26. key: Optional[Any] = None,
  27. id: Optional[Any] = None,
  28. class_name: Optional[Any] = None,
  29. autofocus: Optional[bool] = None,
  30. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  31. on_blur: Optional[
  32. Union[EventHandler, EventSpec, list, function, BaseVar]
  33. ] = None,
  34. on_click: Optional[
  35. Union[EventHandler, EventSpec, list, function, BaseVar]
  36. ] = None,
  37. on_context_menu: Optional[
  38. Union[EventHandler, EventSpec, list, function, BaseVar]
  39. ] = None,
  40. on_double_click: Optional[
  41. Union[EventHandler, EventSpec, list, function, BaseVar]
  42. ] = None,
  43. on_focus: Optional[
  44. Union[EventHandler, EventSpec, list, function, BaseVar]
  45. ] = None,
  46. on_mount: Optional[
  47. Union[EventHandler, EventSpec, list, function, BaseVar]
  48. ] = None,
  49. on_mouse_down: Optional[
  50. Union[EventHandler, EventSpec, list, function, BaseVar]
  51. ] = None,
  52. on_mouse_enter: Optional[
  53. Union[EventHandler, EventSpec, list, function, BaseVar]
  54. ] = None,
  55. on_mouse_leave: Optional[
  56. Union[EventHandler, EventSpec, list, function, BaseVar]
  57. ] = None,
  58. on_mouse_move: Optional[
  59. Union[EventHandler, EventSpec, list, function, BaseVar]
  60. ] = None,
  61. on_mouse_out: Optional[
  62. Union[EventHandler, EventSpec, list, function, BaseVar]
  63. ] = None,
  64. on_mouse_over: Optional[
  65. Union[EventHandler, EventSpec, list, function, BaseVar]
  66. ] = None,
  67. on_mouse_up: Optional[
  68. Union[EventHandler, EventSpec, list, function, BaseVar]
  69. ] = None,
  70. on_scroll: Optional[
  71. Union[EventHandler, EventSpec, list, function, BaseVar]
  72. ] = None,
  73. on_unmount: Optional[
  74. Union[EventHandler, EventSpec, list, function, BaseVar]
  75. ] = None,
  76. **props
  77. ) -> "Grid":
  78. """Create the component.
  79. Args:
  80. *children: The children of the component.
  81. auto_columns: Shorthand prop for gridAutoColumns to provide automatic column sizing based on content. Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-columns)_
  82. auto_flow: Shorthand prop for gridAutoFlow to specify exactly how auto-placed items get flowed into the grid. Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow)_
  83. auto_rows: Shorthand prop for gridAutoRows. Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-rows)_
  84. column: Shorthand prop for gridColumn. Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column)_
  85. row: Shorthand prop for gridRow. Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row)_
  86. template_columns: Shorthand prop for gridTemplateColumns. Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns)_
  87. template_rows: Shorthand prop for gridTemplateRows. Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-rows)_
  88. style: The style of the component.
  89. key: A unique key for the component.
  90. id: The id for the component.
  91. class_name: The class name for the component.
  92. autofocus: Whether the component should take the focus once the page is loaded
  93. custom_attrs: custom attribute
  94. **props: The props of the component.
  95. Returns:
  96. The component.
  97. Raises:
  98. TypeError: If an invalid child is passed.
  99. """
  100. ...
  101. class GridItem(ChakraComponent):
  102. @overload
  103. @classmethod
  104. def create( # type: ignore
  105. cls,
  106. *children,
  107. area: Optional[Union[Var[str], str]] = None,
  108. col_end: Optional[Union[Var[str], str]] = None,
  109. col_start: Optional[Union[Var[int], int]] = None,
  110. col_span: Optional[Union[Var[int], int]] = None,
  111. row_end: Optional[Union[Var[str], str]] = None,
  112. row_start: Optional[Union[Var[int], int]] = None,
  113. row_span: Optional[Union[Var[int], int]] = None,
  114. style: Optional[Style] = None,
  115. key: Optional[Any] = None,
  116. id: Optional[Any] = None,
  117. class_name: Optional[Any] = None,
  118. autofocus: Optional[bool] = None,
  119. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  120. on_blur: Optional[
  121. Union[EventHandler, EventSpec, list, function, BaseVar]
  122. ] = None,
  123. on_click: Optional[
  124. Union[EventHandler, EventSpec, list, function, BaseVar]
  125. ] = None,
  126. on_context_menu: Optional[
  127. Union[EventHandler, EventSpec, list, function, BaseVar]
  128. ] = None,
  129. on_double_click: Optional[
  130. Union[EventHandler, EventSpec, list, function, BaseVar]
  131. ] = None,
  132. on_focus: Optional[
  133. Union[EventHandler, EventSpec, list, function, BaseVar]
  134. ] = None,
  135. on_mount: Optional[
  136. Union[EventHandler, EventSpec, list, function, BaseVar]
  137. ] = None,
  138. on_mouse_down: Optional[
  139. Union[EventHandler, EventSpec, list, function, BaseVar]
  140. ] = None,
  141. on_mouse_enter: Optional[
  142. Union[EventHandler, EventSpec, list, function, BaseVar]
  143. ] = None,
  144. on_mouse_leave: Optional[
  145. Union[EventHandler, EventSpec, list, function, BaseVar]
  146. ] = None,
  147. on_mouse_move: Optional[
  148. Union[EventHandler, EventSpec, list, function, BaseVar]
  149. ] = None,
  150. on_mouse_out: Optional[
  151. Union[EventHandler, EventSpec, list, function, BaseVar]
  152. ] = None,
  153. on_mouse_over: Optional[
  154. Union[EventHandler, EventSpec, list, function, BaseVar]
  155. ] = None,
  156. on_mouse_up: Optional[
  157. Union[EventHandler, EventSpec, list, function, BaseVar]
  158. ] = None,
  159. on_scroll: Optional[
  160. Union[EventHandler, EventSpec, list, function, BaseVar]
  161. ] = None,
  162. on_unmount: Optional[
  163. Union[EventHandler, EventSpec, list, function, BaseVar]
  164. ] = None,
  165. **props
  166. ) -> "GridItem":
  167. """Create the component.
  168. Args:
  169. *children: The children of the component.
  170. area: Shorthand prop for gridArea Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area)_
  171. col_end: Shorthand prop for gridColumnEnd Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end)_
  172. col_start: The column number the grid item should start.
  173. col_span: The number of columns the grid item should span.
  174. row_end: Shorthand prop for gridRowEnd Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-end)_
  175. row_start: The row number the grid item should start.
  176. row_span: The number of rows the grid item should span.
  177. style: The style of the component.
  178. key: A unique key for the component.
  179. id: The id for the component.
  180. class_name: The class name for the component.
  181. autofocus: Whether the component should take the focus once the page is loaded
  182. custom_attrs: custom attribute
  183. **props: The props of the component.
  184. Returns:
  185. The component.
  186. Raises:
  187. TypeError: If an invalid child is passed.
  188. """
  189. ...
  190. class ResponsiveGrid(ChakraComponent):
  191. @overload
  192. @classmethod
  193. def create( # type: ignore
  194. cls,
  195. *children,
  196. auto_columns: Optional[Union[Var[str], str]] = None,
  197. auto_flow: Optional[Union[Var[str], str]] = None,
  198. auto_rows: Optional[Union[Var[str], str]] = None,
  199. column: Optional[Union[Var[str], str]] = None,
  200. row: Optional[Union[Var[str], str]] = None,
  201. columns: Optional[Union[Var[List[int]], List[int]]] = None,
  202. min_child_width: Optional[Union[Var[str], str]] = None,
  203. spacing: Optional[Union[Var[str], str]] = None,
  204. spacing_x: Optional[Union[Var[str], str]] = None,
  205. spacing_y: Optional[Union[Var[str], str]] = None,
  206. template_areas: Optional[Union[Var[str], str]] = None,
  207. template_columns: Optional[Union[Var[str], str]] = None,
  208. template_rows: Optional[Union[Var[str], str]] = None,
  209. style: Optional[Style] = None,
  210. key: Optional[Any] = None,
  211. id: Optional[Any] = None,
  212. class_name: Optional[Any] = None,
  213. autofocus: Optional[bool] = None,
  214. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  215. on_blur: Optional[
  216. Union[EventHandler, EventSpec, list, function, BaseVar]
  217. ] = None,
  218. on_click: Optional[
  219. Union[EventHandler, EventSpec, list, function, BaseVar]
  220. ] = None,
  221. on_context_menu: Optional[
  222. Union[EventHandler, EventSpec, list, function, BaseVar]
  223. ] = None,
  224. on_double_click: Optional[
  225. Union[EventHandler, EventSpec, list, function, BaseVar]
  226. ] = None,
  227. on_focus: Optional[
  228. Union[EventHandler, EventSpec, list, function, BaseVar]
  229. ] = None,
  230. on_mount: Optional[
  231. Union[EventHandler, EventSpec, list, function, BaseVar]
  232. ] = None,
  233. on_mouse_down: Optional[
  234. Union[EventHandler, EventSpec, list, function, BaseVar]
  235. ] = None,
  236. on_mouse_enter: Optional[
  237. Union[EventHandler, EventSpec, list, function, BaseVar]
  238. ] = None,
  239. on_mouse_leave: Optional[
  240. Union[EventHandler, EventSpec, list, function, BaseVar]
  241. ] = None,
  242. on_mouse_move: Optional[
  243. Union[EventHandler, EventSpec, list, function, BaseVar]
  244. ] = None,
  245. on_mouse_out: Optional[
  246. Union[EventHandler, EventSpec, list, function, BaseVar]
  247. ] = None,
  248. on_mouse_over: Optional[
  249. Union[EventHandler, EventSpec, list, function, BaseVar]
  250. ] = None,
  251. on_mouse_up: Optional[
  252. Union[EventHandler, EventSpec, list, function, BaseVar]
  253. ] = None,
  254. on_scroll: Optional[
  255. Union[EventHandler, EventSpec, list, function, BaseVar]
  256. ] = None,
  257. on_unmount: Optional[
  258. Union[EventHandler, EventSpec, list, function, BaseVar]
  259. ] = None,
  260. **props
  261. ) -> "ResponsiveGrid":
  262. """Create the component.
  263. Args:
  264. *children: The children of the component.
  265. auto_columns: Shorthand prop for gridAutoColumns to provide automatic column sizing based on content. Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-columns)_
  266. auto_flow: Shorthand prop for gridAutoFlow to specify exactly how auto-placed items get flowed into the grid. Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow)_
  267. auto_rows: Shorthand prop for gridAutoRows. Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-rows)_
  268. column: Shorthand prop for gridColumn. Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column)_
  269. row: Shorthand prop for gridRow. Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row)_
  270. columns: A list that defines the number of columns for each breakpoint.
  271. min_child_width: The width at which child elements will break into columns. Pass a number for pixel values or a string for any other valid CSS length.
  272. spacing: The gap between the grid items
  273. spacing_x: The column gap between the grid items
  274. spacing_y: The row gap between the grid items
  275. template_areas: Shorthand prop for gridTemplateAreas Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas)_
  276. template_columns: Shorthand prop for gridTemplateColumns. Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns)_
  277. template_rows: Shorthand prop for gridTemplateRows. Learn more _[here](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-rows)_
  278. style: The style of the component.
  279. key: A unique key for the component.
  280. id: The id for the component.
  281. class_name: The class name for the component.
  282. autofocus: Whether the component should take the focus once the page is loaded
  283. custom_attrs: custom attribute
  284. **props: The props of the component.
  285. Returns:
  286. The component.
  287. Raises:
  288. TypeError: If an invalid child is passed.
  289. """
  290. ...