1
0

chakra.pyi 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  1. """Stub file for reflex/components/libs/chakra.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. def get_imports(self) -> imports.ImportDict: ...
  16. @overload
  17. @classmethod
  18. def create( # type: ignore
  19. cls,
  20. *children,
  21. style: Optional[Style] = None,
  22. key: Optional[Any] = None,
  23. id: Optional[Any] = None,
  24. class_name: Optional[Any] = None,
  25. autofocus: Optional[bool] = 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. custom_attrs: custom attribute
  83. **props: The props of the component.
  84. Returns:
  85. The component.
  86. Raises:
  87. TypeError: If an invalid child is passed.
  88. """
  89. ...
  90. class Global(Component):
  91. @overload
  92. @classmethod
  93. def create( # type: ignore
  94. cls,
  95. *children,
  96. styles: Optional[Union[Var[str], str]] = None,
  97. style: Optional[Style] = None,
  98. key: Optional[Any] = None,
  99. id: Optional[Any] = None,
  100. class_name: Optional[Any] = None,
  101. autofocus: Optional[bool] = None,
  102. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  103. on_blur: Optional[
  104. Union[EventHandler, EventSpec, list, function, BaseVar]
  105. ] = None,
  106. on_click: Optional[
  107. Union[EventHandler, EventSpec, list, function, BaseVar]
  108. ] = None,
  109. on_context_menu: Optional[
  110. Union[EventHandler, EventSpec, list, function, BaseVar]
  111. ] = None,
  112. on_double_click: Optional[
  113. Union[EventHandler, EventSpec, list, function, BaseVar]
  114. ] = None,
  115. on_focus: Optional[
  116. Union[EventHandler, EventSpec, list, function, BaseVar]
  117. ] = None,
  118. on_mount: Optional[
  119. Union[EventHandler, EventSpec, list, function, BaseVar]
  120. ] = None,
  121. on_mouse_down: Optional[
  122. Union[EventHandler, EventSpec, list, function, BaseVar]
  123. ] = None,
  124. on_mouse_enter: Optional[
  125. Union[EventHandler, EventSpec, list, function, BaseVar]
  126. ] = None,
  127. on_mouse_leave: Optional[
  128. Union[EventHandler, EventSpec, list, function, BaseVar]
  129. ] = None,
  130. on_mouse_move: Optional[
  131. Union[EventHandler, EventSpec, list, function, BaseVar]
  132. ] = None,
  133. on_mouse_out: Optional[
  134. Union[EventHandler, EventSpec, list, function, BaseVar]
  135. ] = None,
  136. on_mouse_over: Optional[
  137. Union[EventHandler, EventSpec, list, function, BaseVar]
  138. ] = None,
  139. on_mouse_up: Optional[
  140. Union[EventHandler, EventSpec, list, function, BaseVar]
  141. ] = None,
  142. on_scroll: Optional[
  143. Union[EventHandler, EventSpec, list, function, BaseVar]
  144. ] = None,
  145. on_unmount: Optional[
  146. Union[EventHandler, EventSpec, list, function, BaseVar]
  147. ] = None,
  148. **props
  149. ) -> "Global":
  150. """Create the component.
  151. Args:
  152. *children: The children of the component.
  153. style: The style of the component.
  154. key: A unique key for the component.
  155. id: The id for the component.
  156. class_name: The class name for the component.
  157. autofocus: Whether the component should take the focus once the page is loaded
  158. custom_attrs: custom attribute
  159. **props: The props of the component.
  160. Returns:
  161. The component.
  162. Raises:
  163. TypeError: If an invalid child is passed.
  164. """
  165. ...
  166. class ChakraProvider(ChakraComponent):
  167. @overload
  168. @classmethod
  169. def create( # type: ignore
  170. cls,
  171. *children,
  172. theme: Optional[Union[Var[str], str]] = None,
  173. style: Optional[Style] = None,
  174. key: Optional[Any] = None,
  175. id: Optional[Any] = None,
  176. class_name: Optional[Any] = None,
  177. autofocus: Optional[bool] = None,
  178. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  179. on_blur: Optional[
  180. Union[EventHandler, EventSpec, list, function, BaseVar]
  181. ] = None,
  182. on_click: Optional[
  183. Union[EventHandler, EventSpec, list, function, BaseVar]
  184. ] = None,
  185. on_context_menu: Optional[
  186. Union[EventHandler, EventSpec, list, function, BaseVar]
  187. ] = None,
  188. on_double_click: Optional[
  189. Union[EventHandler, EventSpec, list, function, BaseVar]
  190. ] = None,
  191. on_focus: Optional[
  192. Union[EventHandler, EventSpec, list, function, BaseVar]
  193. ] = None,
  194. on_mount: Optional[
  195. Union[EventHandler, EventSpec, list, function, BaseVar]
  196. ] = None,
  197. on_mouse_down: Optional[
  198. Union[EventHandler, EventSpec, list, function, BaseVar]
  199. ] = None,
  200. on_mouse_enter: Optional[
  201. Union[EventHandler, EventSpec, list, function, BaseVar]
  202. ] = None,
  203. on_mouse_leave: Optional[
  204. Union[EventHandler, EventSpec, list, function, BaseVar]
  205. ] = None,
  206. on_mouse_move: Optional[
  207. Union[EventHandler, EventSpec, list, function, BaseVar]
  208. ] = None,
  209. on_mouse_out: Optional[
  210. Union[EventHandler, EventSpec, list, function, BaseVar]
  211. ] = None,
  212. on_mouse_over: Optional[
  213. Union[EventHandler, EventSpec, list, function, BaseVar]
  214. ] = None,
  215. on_mouse_up: Optional[
  216. Union[EventHandler, EventSpec, list, function, BaseVar]
  217. ] = None,
  218. on_scroll: Optional[
  219. Union[EventHandler, EventSpec, list, function, BaseVar]
  220. ] = None,
  221. on_unmount: Optional[
  222. Union[EventHandler, EventSpec, list, function, BaseVar]
  223. ] = None,
  224. **props
  225. ) -> "ChakraProvider":
  226. """Create a new ChakraProvider component.
  227. Returns:
  228. A new ChakraProvider component.
  229. """
  230. ...
  231. chakra_provider = ChakraProvider.create()
  232. class ChakraColorModeProvider(Component):
  233. @overload
  234. @classmethod
  235. def create( # type: ignore
  236. cls,
  237. *children,
  238. style: Optional[Style] = None,
  239. key: Optional[Any] = None,
  240. id: Optional[Any] = None,
  241. class_name: Optional[Any] = None,
  242. autofocus: Optional[bool] = None,
  243. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  244. on_blur: Optional[
  245. Union[EventHandler, EventSpec, list, function, BaseVar]
  246. ] = None,
  247. on_click: Optional[
  248. Union[EventHandler, EventSpec, list, function, BaseVar]
  249. ] = None,
  250. on_context_menu: Optional[
  251. Union[EventHandler, EventSpec, list, function, BaseVar]
  252. ] = None,
  253. on_double_click: Optional[
  254. Union[EventHandler, EventSpec, list, function, BaseVar]
  255. ] = None,
  256. on_focus: Optional[
  257. Union[EventHandler, EventSpec, list, function, BaseVar]
  258. ] = None,
  259. on_mount: Optional[
  260. Union[EventHandler, EventSpec, list, function, BaseVar]
  261. ] = None,
  262. on_mouse_down: Optional[
  263. Union[EventHandler, EventSpec, list, function, BaseVar]
  264. ] = None,
  265. on_mouse_enter: Optional[
  266. Union[EventHandler, EventSpec, list, function, BaseVar]
  267. ] = None,
  268. on_mouse_leave: Optional[
  269. Union[EventHandler, EventSpec, list, function, BaseVar]
  270. ] = None,
  271. on_mouse_move: Optional[
  272. Union[EventHandler, EventSpec, list, function, BaseVar]
  273. ] = None,
  274. on_mouse_out: Optional[
  275. Union[EventHandler, EventSpec, list, function, BaseVar]
  276. ] = None,
  277. on_mouse_over: Optional[
  278. Union[EventHandler, EventSpec, list, function, BaseVar]
  279. ] = None,
  280. on_mouse_up: Optional[
  281. Union[EventHandler, EventSpec, list, function, BaseVar]
  282. ] = None,
  283. on_scroll: Optional[
  284. Union[EventHandler, EventSpec, list, function, BaseVar]
  285. ] = None,
  286. on_unmount: Optional[
  287. Union[EventHandler, EventSpec, list, function, BaseVar]
  288. ] = None,
  289. **props
  290. ) -> "ChakraColorModeProvider":
  291. """Create the component.
  292. Args:
  293. *children: The children of the component.
  294. style: The style of the component.
  295. key: A unique key for the component.
  296. id: The id for the component.
  297. class_name: The class name for the component.
  298. autofocus: Whether the component should take the focus once the page is loaded
  299. custom_attrs: custom attribute
  300. **props: The props of the component.
  301. Returns:
  302. The component.
  303. Raises:
  304. TypeError: If an invalid child is passed.
  305. """
  306. ...
  307. chakra_color_mode_provider = ChakraColorModeProvider.create()
  308. LiteralColorScheme = Literal[
  309. "none",
  310. "gray",
  311. "red",
  312. "orange",
  313. "yellow",
  314. "green",
  315. "teal",
  316. "blue",
  317. "cyan",
  318. "purple",
  319. "pink",
  320. "whiteAlpha",
  321. "blackAlpha",
  322. "linkedin",
  323. "facebook",
  324. "messenger",
  325. "whatsapp",
  326. "twitter",
  327. "telegram",
  328. ]
  329. LiteralVariant = Literal["solid", "subtle", "outline"]
  330. LiteralDividerVariant = Literal["solid", "dashed"]
  331. LiteralTheme = Literal["light", "dark"]
  332. LiteralTagColorScheme = Literal[
  333. "gray", "red", "orange", "yellow", "green", "teal", "blue", "cyan", "purple", "pink"
  334. ]
  335. LiteralTagAlign = Literal["center", "end", "start"]
  336. LiteralTabsVariant = Literal[
  337. "line", "enclosed", "enclosed-colored", "soft-rounded", "solid-rounded", "unstyled"
  338. ]
  339. LiteralStatus = Literal["success", "info", "warning", "error"]
  340. LiteralAlertVariant = Literal["subtle", "left-accent", "top-accent", "solid"]
  341. LiteralButtonVariant = Literal["ghost", "outline", "solid", "link", "unstyled"]
  342. LiteralSpinnerPlacement = Literal["start", "end"]
  343. LiteralLanguage = Literal[
  344. "en",
  345. "da",
  346. "de",
  347. "es",
  348. "fr",
  349. "ja",
  350. "ko",
  351. "pt_br",
  352. "ru",
  353. "zh_cn",
  354. "ro",
  355. "pl",
  356. "ckb",
  357. "lv",
  358. "se",
  359. "ua",
  360. "he",
  361. "it",
  362. ]
  363. LiteralInputVariant = Literal["outline", "filled", "flushed", "unstyled"]
  364. LiteralInputNumberMode = [
  365. "text",
  366. "search",
  367. "none",
  368. "tel",
  369. "url",
  370. "email",
  371. "numeric",
  372. "decimal",
  373. ]
  374. LiteralChakraDirection = Literal["ltr", "rtl"]
  375. LiteralCardVariant = Literal["outline", "filled", "elevated", "unstyled"]
  376. LiteralStackDirection = Literal["row", "column"]
  377. LiteralImageLoading = Literal["eager", "lazy"]
  378. LiteralTagSize = Literal["sm", "md", "lg"]
  379. LiteralSpinnerSize = Literal[Literal[LiteralTagSize], "xs", "xl"]
  380. LiteralAvatarSize = Literal[Literal[LiteralTagSize], "xl", "xs", "2xl", "full", "2xs"]
  381. LiteralButtonSize = Literal["sm", "md", "lg", "xs"]
  382. LiteralAlertDialogSize = Literal[
  383. "sm", "md", "lg", "xs", "2xl", "full", "3xl", "4xl", "5xl", "6xl"
  384. ]
  385. LiteralDrawerSize = Literal[Literal[LiteralSpinnerSize], "xl", "full"]
  386. LiteralMenuStrategy = Literal["fixed", "absolute"]
  387. LiteralMenuOption = Literal["checkbox", "radio"]
  388. LiteralPopOverTrigger = Literal["click", "hover"]
  389. LiteralHeadingSize = Literal["lg", "md", "sm", "xs", "xl", "2xl", "3xl", "4xl"]