base.pyi 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. """Stub file for reflex/components/chakra/base.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 functools import lru_cache
  10. from typing import List, Literal
  11. from reflex.components.component import Component
  12. from reflex.utils import imports
  13. from reflex.vars import Var
  14. class ChakraComponent(Component):
  15. @overload
  16. @classmethod
  17. def create( # type: ignore
  18. cls,
  19. *children,
  20. style: Optional[Style] = None,
  21. key: Optional[Any] = None,
  22. id: Optional[Any] = None,
  23. class_name: Optional[Any] = None,
  24. autofocus: Optional[bool] = None,
  25. _rename_props: Optional[Dict[str, str]] = None,
  26. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  27. on_blur: Optional[
  28. Union[EventHandler, EventSpec, list, function, BaseVar]
  29. ] = None,
  30. on_click: Optional[
  31. Union[EventHandler, EventSpec, list, function, BaseVar]
  32. ] = None,
  33. on_context_menu: Optional[
  34. Union[EventHandler, EventSpec, list, function, BaseVar]
  35. ] = None,
  36. on_double_click: Optional[
  37. Union[EventHandler, EventSpec, list, function, BaseVar]
  38. ] = None,
  39. on_focus: Optional[
  40. Union[EventHandler, EventSpec, list, function, BaseVar]
  41. ] = None,
  42. on_mount: Optional[
  43. Union[EventHandler, EventSpec, list, function, BaseVar]
  44. ] = None,
  45. on_mouse_down: Optional[
  46. Union[EventHandler, EventSpec, list, function, BaseVar]
  47. ] = None,
  48. on_mouse_enter: Optional[
  49. Union[EventHandler, EventSpec, list, function, BaseVar]
  50. ] = None,
  51. on_mouse_leave: Optional[
  52. Union[EventHandler, EventSpec, list, function, BaseVar]
  53. ] = None,
  54. on_mouse_move: Optional[
  55. Union[EventHandler, EventSpec, list, function, BaseVar]
  56. ] = None,
  57. on_mouse_out: Optional[
  58. Union[EventHandler, EventSpec, list, function, BaseVar]
  59. ] = None,
  60. on_mouse_over: Optional[
  61. Union[EventHandler, EventSpec, list, function, BaseVar]
  62. ] = None,
  63. on_mouse_up: Optional[
  64. Union[EventHandler, EventSpec, list, function, BaseVar]
  65. ] = None,
  66. on_scroll: Optional[
  67. Union[EventHandler, EventSpec, list, function, BaseVar]
  68. ] = None,
  69. on_unmount: Optional[
  70. Union[EventHandler, EventSpec, list, function, BaseVar]
  71. ] = None,
  72. **props
  73. ) -> "ChakraComponent":
  74. """Create the component.
  75. Args:
  76. *children: The children of the component.
  77. style: The style of the component.
  78. key: A unique key for the component.
  79. id: The id for the component.
  80. class_name: The class name for the component.
  81. autofocus: Whether the component should take the focus once the page is loaded
  82. _rename_props: props to change the name of
  83. custom_attrs: custom attribute
  84. **props: The props of the component.
  85. Returns:
  86. The component.
  87. Raises:
  88. TypeError: If an invalid child is passed.
  89. """
  90. ...
  91. class ChakraProvider(ChakraComponent):
  92. @overload
  93. @classmethod
  94. def create( # type: ignore
  95. cls,
  96. *children,
  97. theme: Optional[Union[Var[str], str]] = None,
  98. style: Optional[Style] = None,
  99. key: Optional[Any] = None,
  100. id: Optional[Any] = None,
  101. class_name: Optional[Any] = None,
  102. autofocus: Optional[bool] = None,
  103. _rename_props: Optional[Dict[str, str]] = None,
  104. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  105. on_blur: Optional[
  106. Union[EventHandler, EventSpec, list, function, BaseVar]
  107. ] = None,
  108. on_click: Optional[
  109. Union[EventHandler, EventSpec, list, function, BaseVar]
  110. ] = None,
  111. on_context_menu: Optional[
  112. Union[EventHandler, EventSpec, list, function, BaseVar]
  113. ] = None,
  114. on_double_click: Optional[
  115. Union[EventHandler, EventSpec, list, function, BaseVar]
  116. ] = None,
  117. on_focus: Optional[
  118. Union[EventHandler, EventSpec, list, function, BaseVar]
  119. ] = None,
  120. on_mount: Optional[
  121. Union[EventHandler, EventSpec, list, function, BaseVar]
  122. ] = None,
  123. on_mouse_down: Optional[
  124. Union[EventHandler, EventSpec, list, function, BaseVar]
  125. ] = None,
  126. on_mouse_enter: Optional[
  127. Union[EventHandler, EventSpec, list, function, BaseVar]
  128. ] = None,
  129. on_mouse_leave: Optional[
  130. Union[EventHandler, EventSpec, list, function, BaseVar]
  131. ] = None,
  132. on_mouse_move: Optional[
  133. Union[EventHandler, EventSpec, list, function, BaseVar]
  134. ] = None,
  135. on_mouse_out: Optional[
  136. Union[EventHandler, EventSpec, list, function, BaseVar]
  137. ] = None,
  138. on_mouse_over: Optional[
  139. Union[EventHandler, EventSpec, list, function, BaseVar]
  140. ] = None,
  141. on_mouse_up: Optional[
  142. Union[EventHandler, EventSpec, list, function, BaseVar]
  143. ] = None,
  144. on_scroll: Optional[
  145. Union[EventHandler, EventSpec, list, function, BaseVar]
  146. ] = None,
  147. on_unmount: Optional[
  148. Union[EventHandler, EventSpec, list, function, BaseVar]
  149. ] = None,
  150. **props
  151. ) -> "ChakraProvider":
  152. """Create a new ChakraProvider component.
  153. Returns:
  154. A new ChakraProvider component.
  155. """
  156. ...
  157. chakra_provider = ChakraProvider.create()
  158. class ChakraColorModeProvider(Component):
  159. @overload
  160. @classmethod
  161. def create( # type: ignore
  162. cls,
  163. *children,
  164. style: Optional[Style] = None,
  165. key: Optional[Any] = None,
  166. id: Optional[Any] = None,
  167. class_name: Optional[Any] = None,
  168. autofocus: Optional[bool] = None,
  169. _rename_props: Optional[Dict[str, str]] = None,
  170. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  171. on_blur: Optional[
  172. Union[EventHandler, EventSpec, list, function, BaseVar]
  173. ] = None,
  174. on_click: Optional[
  175. Union[EventHandler, EventSpec, list, function, BaseVar]
  176. ] = None,
  177. on_context_menu: Optional[
  178. Union[EventHandler, EventSpec, list, function, BaseVar]
  179. ] = None,
  180. on_double_click: Optional[
  181. Union[EventHandler, EventSpec, list, function, BaseVar]
  182. ] = None,
  183. on_focus: Optional[
  184. Union[EventHandler, EventSpec, list, function, BaseVar]
  185. ] = None,
  186. on_mount: Optional[
  187. Union[EventHandler, EventSpec, list, function, BaseVar]
  188. ] = None,
  189. on_mouse_down: Optional[
  190. Union[EventHandler, EventSpec, list, function, BaseVar]
  191. ] = None,
  192. on_mouse_enter: Optional[
  193. Union[EventHandler, EventSpec, list, function, BaseVar]
  194. ] = None,
  195. on_mouse_leave: Optional[
  196. Union[EventHandler, EventSpec, list, function, BaseVar]
  197. ] = None,
  198. on_mouse_move: Optional[
  199. Union[EventHandler, EventSpec, list, function, BaseVar]
  200. ] = None,
  201. on_mouse_out: Optional[
  202. Union[EventHandler, EventSpec, list, function, BaseVar]
  203. ] = None,
  204. on_mouse_over: Optional[
  205. Union[EventHandler, EventSpec, list, function, BaseVar]
  206. ] = None,
  207. on_mouse_up: Optional[
  208. Union[EventHandler, EventSpec, list, function, BaseVar]
  209. ] = None,
  210. on_scroll: Optional[
  211. Union[EventHandler, EventSpec, list, function, BaseVar]
  212. ] = None,
  213. on_unmount: Optional[
  214. Union[EventHandler, EventSpec, list, function, BaseVar]
  215. ] = None,
  216. **props
  217. ) -> "ChakraColorModeProvider":
  218. """Create the component.
  219. Args:
  220. *children: The children of the component.
  221. style: The style of the component.
  222. key: A unique key for the component.
  223. id: The id for the component.
  224. class_name: The class name for the component.
  225. autofocus: Whether the component should take the focus once the page is loaded
  226. _rename_props: props to change the name of
  227. custom_attrs: custom attribute
  228. **props: The props of the component.
  229. Returns:
  230. The component.
  231. Raises:
  232. TypeError: If an invalid child is passed.
  233. """
  234. ...
  235. chakra_color_mode_provider = ChakraColorModeProvider.create()
  236. LiteralColorScheme = Literal[
  237. "none",
  238. "gray",
  239. "red",
  240. "orange",
  241. "yellow",
  242. "green",
  243. "teal",
  244. "blue",
  245. "cyan",
  246. "purple",
  247. "pink",
  248. "whiteAlpha",
  249. "blackAlpha",
  250. "linkedin",
  251. "facebook",
  252. "messenger",
  253. "whatsapp",
  254. "twitter",
  255. "telegram",
  256. ]
  257. LiteralVariant = Literal["solid", "subtle", "outline"]
  258. LiteralDividerVariant = Literal["solid", "dashed"]
  259. LiteralTheme = Literal["light", "dark"]
  260. LiteralTagColorScheme = Literal[
  261. "gray", "red", "orange", "yellow", "green", "teal", "blue", "cyan", "purple", "pink"
  262. ]
  263. LiteralTagAlign = Literal["center", "end", "start"]
  264. LiteralTabsVariant = Literal[
  265. "line", "enclosed", "enclosed-colored", "soft-rounded", "solid-rounded", "unstyled"
  266. ]
  267. LiteralStatus = Literal["success", "info", "warning", "error"]
  268. LiteralAlertVariant = Literal["subtle", "left-accent", "top-accent", "solid"]
  269. LiteralButtonVariant = Literal["ghost", "outline", "solid", "link", "unstyled"]
  270. LiteralSpinnerPlacement = Literal["start", "end"]
  271. LiteralLanguage = Literal[
  272. "en",
  273. "da",
  274. "de",
  275. "es",
  276. "fr",
  277. "ja",
  278. "ko",
  279. "pt_br",
  280. "ru",
  281. "zh_cn",
  282. "ro",
  283. "pl",
  284. "ckb",
  285. "lv",
  286. "se",
  287. "ua",
  288. "he",
  289. "it",
  290. ]
  291. LiteralInputVariant = Literal["outline", "filled", "flushed", "unstyled"]
  292. LiteralInputNumberMode = [
  293. "text",
  294. "search",
  295. "none",
  296. "tel",
  297. "url",
  298. "email",
  299. "numeric",
  300. "decimal",
  301. ]
  302. LiteralChakraDirection = Literal["ltr", "rtl"]
  303. LiteralCardVariant = Literal["outline", "filled", "elevated", "unstyled"]
  304. LiteralStackDirection = Literal["row", "column"]
  305. LiteralImageLoading = Literal["eager", "lazy"]
  306. LiteralTagSize = Literal["sm", "md", "lg"]
  307. LiteralSpinnerSize = Literal[Literal[LiteralTagSize], "xs", "xl"]
  308. LiteralAvatarSize = Literal[Literal[LiteralTagSize], "xl", "xs", "2xl", "full", "2xs"]
  309. LiteralButtonSize = Literal["sm", "md", "lg", "xs"]
  310. LiteralAlertDialogSize = Literal[
  311. "sm", "md", "lg", "xs", "2xl", "full", "3xl", "4xl", "5xl", "6xl"
  312. ]
  313. LiteralDrawerSize = Literal[Literal[LiteralSpinnerSize], "xl", "full"]
  314. LiteralMenuStrategy = Literal["fixed", "absolute"]
  315. LiteralMenuOption = Literal["checkbox", "radio"]
  316. LiteralPopOverTrigger = Literal["click", "hover"]
  317. LiteralHeadingSize = Literal["lg", "md", "sm", "xs", "xl", "2xl", "3xl", "4xl"]