chakra.pyi 14 KB

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