grid.pyi 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. """Stub file for reflex/components/radix/themes/layout/grid.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Dict, Literal, Optional, Union, overload
  6. from reflex.components.core.breakpoints import Breakpoints
  7. from reflex.components.el import elements
  8. from reflex.event import BASE_STATE, EventType
  9. from reflex.style import Style
  10. from reflex.vars.base import Var
  11. from ..base import RadixThemesComponent
  12. LiteralGridFlow = Literal["row", "column", "dense", "row-dense", "column-dense"]
  13. class Grid(elements.Div, RadixThemesComponent):
  14. @overload
  15. @classmethod
  16. def create( # type: ignore
  17. cls,
  18. *children,
  19. as_child: Optional[Union[Var[bool], bool]] = None,
  20. columns: Optional[
  21. Union[Breakpoints[str, str], Var[Union[Breakpoints[str, str], str]], str]
  22. ] = None,
  23. rows: Optional[
  24. Union[Breakpoints[str, str], Var[Union[Breakpoints[str, str], str]], str]
  25. ] = None,
  26. flow: Optional[
  27. Union[
  28. Breakpoints[
  29. str, Literal["column", "column-dense", "dense", "row", "row-dense"]
  30. ],
  31. Literal["column", "column-dense", "dense", "row", "row-dense"],
  32. Var[
  33. Union[
  34. Breakpoints[
  35. str,
  36. Literal[
  37. "column", "column-dense", "dense", "row", "row-dense"
  38. ],
  39. ],
  40. Literal["column", "column-dense", "dense", "row", "row-dense"],
  41. ]
  42. ],
  43. ]
  44. ] = None,
  45. align: Optional[
  46. Union[
  47. Breakpoints[
  48. str, Literal["baseline", "center", "end", "start", "stretch"]
  49. ],
  50. Literal["baseline", "center", "end", "start", "stretch"],
  51. Var[
  52. Union[
  53. Breakpoints[
  54. str,
  55. Literal["baseline", "center", "end", "start", "stretch"],
  56. ],
  57. Literal["baseline", "center", "end", "start", "stretch"],
  58. ]
  59. ],
  60. ]
  61. ] = None,
  62. justify: Optional[
  63. Union[
  64. Breakpoints[str, Literal["between", "center", "end", "start"]],
  65. Literal["between", "center", "end", "start"],
  66. Var[
  67. Union[
  68. Breakpoints[str, Literal["between", "center", "end", "start"]],
  69. Literal["between", "center", "end", "start"],
  70. ]
  71. ],
  72. ]
  73. ] = None,
  74. spacing: Optional[
  75. Union[
  76. Breakpoints[
  77. str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
  78. ],
  79. Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  80. Var[
  81. Union[
  82. Breakpoints[
  83. str,
  84. Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  85. ],
  86. Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  87. ]
  88. ],
  89. ]
  90. ] = None,
  91. spacing_x: Optional[
  92. Union[
  93. Breakpoints[
  94. str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
  95. ],
  96. Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  97. Var[
  98. Union[
  99. Breakpoints[
  100. str,
  101. Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  102. ],
  103. Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  104. ]
  105. ],
  106. ]
  107. ] = None,
  108. spacing_y: Optional[
  109. Union[
  110. Breakpoints[
  111. str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
  112. ],
  113. Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  114. Var[
  115. Union[
  116. Breakpoints[
  117. str,
  118. Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  119. ],
  120. Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  121. ]
  122. ],
  123. ]
  124. ] = None,
  125. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  126. auto_capitalize: Optional[
  127. Union[Var[Union[bool, int, str]], bool, int, str]
  128. ] = None,
  129. content_editable: Optional[
  130. Union[Var[Union[bool, int, str]], bool, int, str]
  131. ] = None,
  132. context_menu: Optional[
  133. Union[Var[Union[bool, int, str]], bool, int, str]
  134. ] = None,
  135. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  136. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  137. enter_key_hint: Optional[
  138. Union[Var[Union[bool, int, str]], bool, int, str]
  139. ] = None,
  140. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  141. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  142. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  143. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  144. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  145. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  146. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  147. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  148. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  149. style: Optional[Style] = None,
  150. key: Optional[Any] = None,
  151. id: Optional[Any] = None,
  152. class_name: Optional[Any] = None,
  153. autofocus: Optional[bool] = None,
  154. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  155. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  156. on_click: Optional[EventType[[], BASE_STATE]] = None,
  157. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  158. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  159. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  160. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  161. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  162. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  163. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  164. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  165. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  166. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  167. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  168. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  169. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  170. **props,
  171. ) -> "Grid":
  172. """Create a new component instance.
  173. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  174. other UI libraries for common names, like Text and Button.
  175. Args:
  176. *children: Child components.
  177. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
  178. columns: Number of columns
  179. rows: Number of rows
  180. flow: How the grid items are layed out: "row" | "column" | "dense" | "row-dense" | "column-dense"
  181. align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
  182. justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between"
  183. spacing: Gap between children: "0" - "9"
  184. spacing_x: Gap between children horizontal: "0" - "9"
  185. spacing_y: Gap between children vertical: "0" - "9"
  186. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  187. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  188. content_editable: Indicates whether the element's content is editable.
  189. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  190. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  191. draggable: Defines whether the element can be dragged.
  192. enter_key_hint: Hints what media types the media element is able to play.
  193. hidden: Defines whether the element is hidden.
  194. input_mode: Defines the type of the element.
  195. item_prop: Defines the name of the element for metadata purposes.
  196. lang: Defines the language used in the element.
  197. role: Defines the role of the element.
  198. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  199. spell_check: Defines whether the element may be checked for spelling errors.
  200. tab_index: Defines the position of the current element in the tabbing order.
  201. title: Defines a tooltip for the element.
  202. style: The style of the component.
  203. key: A unique key for the component.
  204. id: The id for the component.
  205. class_name: The class name for the component.
  206. autofocus: Whether the component should take the focus once the page is loaded
  207. custom_attrs: custom attribute
  208. **props: Component properties.
  209. Returns:
  210. A new component instance.
  211. """
  212. ...
  213. grid = Grid.create