base.pyi 11 KB

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