stat.pyi 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  1. """Stub file for reflex/components/datadisplay/stat.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 reflex.components.component import Component
  10. from reflex.components.libs.chakra import ChakraComponent
  11. from reflex.vars import Var
  12. class Stat(ChakraComponent):
  13. @overload
  14. @classmethod
  15. def create( # type: ignore
  16. cls,
  17. *children,
  18. label=None,
  19. number=0,
  20. help_text=None,
  21. arrow_type=None,
  22. style: Optional[Style] = None,
  23. key: Optional[Any] = None,
  24. id: Optional[Any] = None,
  25. class_name: Optional[Any] = None,
  26. autofocus: Optional[bool] = None,
  27. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  28. on_blur: Optional[
  29. Union[EventHandler, EventSpec, list, function, BaseVar]
  30. ] = None,
  31. on_click: Optional[
  32. Union[EventHandler, EventSpec, list, function, BaseVar]
  33. ] = None,
  34. on_context_menu: Optional[
  35. Union[EventHandler, EventSpec, list, function, BaseVar]
  36. ] = None,
  37. on_double_click: Optional[
  38. Union[EventHandler, EventSpec, list, function, BaseVar]
  39. ] = None,
  40. on_focus: Optional[
  41. Union[EventHandler, EventSpec, list, function, BaseVar]
  42. ] = None,
  43. on_mount: Optional[
  44. Union[EventHandler, EventSpec, list, function, BaseVar]
  45. ] = None,
  46. on_mouse_down: Optional[
  47. Union[EventHandler, EventSpec, list, function, BaseVar]
  48. ] = None,
  49. on_mouse_enter: Optional[
  50. Union[EventHandler, EventSpec, list, function, BaseVar]
  51. ] = None,
  52. on_mouse_leave: Optional[
  53. Union[EventHandler, EventSpec, list, function, BaseVar]
  54. ] = None,
  55. on_mouse_move: Optional[
  56. Union[EventHandler, EventSpec, list, function, BaseVar]
  57. ] = None,
  58. on_mouse_out: Optional[
  59. Union[EventHandler, EventSpec, list, function, BaseVar]
  60. ] = None,
  61. on_mouse_over: Optional[
  62. Union[EventHandler, EventSpec, list, function, BaseVar]
  63. ] = None,
  64. on_mouse_up: Optional[
  65. Union[EventHandler, EventSpec, list, function, BaseVar]
  66. ] = None,
  67. on_scroll: Optional[
  68. Union[EventHandler, EventSpec, list, function, BaseVar]
  69. ] = None,
  70. on_unmount: Optional[
  71. Union[EventHandler, EventSpec, list, function, BaseVar]
  72. ] = None,
  73. **props
  74. ) -> "Stat":
  75. """Create a stat component.
  76. Args:
  77. *children: The children of the component.
  78. label: A label for the stat component.
  79. number: The value of the stat component.
  80. help_text: A text added to the stat component.
  81. arrow_type: The type of the arrow ("increase", "decrease", None)
  82. style: The style of the component.
  83. key: A unique key for the component.
  84. id: The id for the component.
  85. class_name: The class name for the component.
  86. autofocus: Whether the component should take the focus once the page is loaded
  87. custom_attrs: custom attribute
  88. **props: The properties of the component.
  89. Returns:
  90. The stat component.
  91. """
  92. ...
  93. class StatLabel(ChakraComponent):
  94. @overload
  95. @classmethod
  96. def create( # type: ignore
  97. cls,
  98. *children,
  99. style: Optional[Style] = None,
  100. key: Optional[Any] = None,
  101. id: Optional[Any] = None,
  102. class_name: Optional[Any] = None,
  103. autofocus: Optional[bool] = 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. ) -> "StatLabel":
  152. """Create the component.
  153. Args:
  154. *children: The children of the component.
  155. style: The style of the component.
  156. key: A unique key for the component.
  157. id: The id for the component.
  158. class_name: The class name for the component.
  159. autofocus: Whether the component should take the focus once the page is loaded
  160. custom_attrs: custom attribute
  161. **props: The props of the component.
  162. Returns:
  163. The component.
  164. Raises:
  165. TypeError: If an invalid child is passed.
  166. """
  167. ...
  168. class StatNumber(ChakraComponent):
  169. @overload
  170. @classmethod
  171. def create( # type: ignore
  172. cls,
  173. *children,
  174. style: Optional[Style] = None,
  175. key: Optional[Any] = None,
  176. id: Optional[Any] = None,
  177. class_name: Optional[Any] = None,
  178. autofocus: Optional[bool] = None,
  179. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  180. on_blur: Optional[
  181. Union[EventHandler, EventSpec, list, function, BaseVar]
  182. ] = None,
  183. on_click: Optional[
  184. Union[EventHandler, EventSpec, list, function, BaseVar]
  185. ] = None,
  186. on_context_menu: Optional[
  187. Union[EventHandler, EventSpec, list, function, BaseVar]
  188. ] = None,
  189. on_double_click: Optional[
  190. Union[EventHandler, EventSpec, list, function, BaseVar]
  191. ] = None,
  192. on_focus: Optional[
  193. Union[EventHandler, EventSpec, list, function, BaseVar]
  194. ] = None,
  195. on_mount: Optional[
  196. Union[EventHandler, EventSpec, list, function, BaseVar]
  197. ] = None,
  198. on_mouse_down: Optional[
  199. Union[EventHandler, EventSpec, list, function, BaseVar]
  200. ] = None,
  201. on_mouse_enter: Optional[
  202. Union[EventHandler, EventSpec, list, function, BaseVar]
  203. ] = None,
  204. on_mouse_leave: Optional[
  205. Union[EventHandler, EventSpec, list, function, BaseVar]
  206. ] = None,
  207. on_mouse_move: Optional[
  208. Union[EventHandler, EventSpec, list, function, BaseVar]
  209. ] = None,
  210. on_mouse_out: Optional[
  211. Union[EventHandler, EventSpec, list, function, BaseVar]
  212. ] = None,
  213. on_mouse_over: Optional[
  214. Union[EventHandler, EventSpec, list, function, BaseVar]
  215. ] = None,
  216. on_mouse_up: Optional[
  217. Union[EventHandler, EventSpec, list, function, BaseVar]
  218. ] = None,
  219. on_scroll: Optional[
  220. Union[EventHandler, EventSpec, list, function, BaseVar]
  221. ] = None,
  222. on_unmount: Optional[
  223. Union[EventHandler, EventSpec, list, function, BaseVar]
  224. ] = None,
  225. **props
  226. ) -> "StatNumber":
  227. """Create the component.
  228. Args:
  229. *children: The children of the component.
  230. style: The style of the component.
  231. key: A unique key for the component.
  232. id: The id for the component.
  233. class_name: The class name for the component.
  234. autofocus: Whether the component should take the focus once the page is loaded
  235. custom_attrs: custom attribute
  236. **props: The props of the component.
  237. Returns:
  238. The component.
  239. Raises:
  240. TypeError: If an invalid child is passed.
  241. """
  242. ...
  243. class StatHelpText(ChakraComponent):
  244. @overload
  245. @classmethod
  246. def create( # type: ignore
  247. cls,
  248. *children,
  249. style: Optional[Style] = None,
  250. key: Optional[Any] = None,
  251. id: Optional[Any] = None,
  252. class_name: Optional[Any] = None,
  253. autofocus: Optional[bool] = None,
  254. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  255. on_blur: Optional[
  256. Union[EventHandler, EventSpec, list, function, BaseVar]
  257. ] = None,
  258. on_click: Optional[
  259. Union[EventHandler, EventSpec, list, function, BaseVar]
  260. ] = None,
  261. on_context_menu: Optional[
  262. Union[EventHandler, EventSpec, list, function, BaseVar]
  263. ] = None,
  264. on_double_click: Optional[
  265. Union[EventHandler, EventSpec, list, function, BaseVar]
  266. ] = None,
  267. on_focus: Optional[
  268. Union[EventHandler, EventSpec, list, function, BaseVar]
  269. ] = None,
  270. on_mount: Optional[
  271. Union[EventHandler, EventSpec, list, function, BaseVar]
  272. ] = None,
  273. on_mouse_down: Optional[
  274. Union[EventHandler, EventSpec, list, function, BaseVar]
  275. ] = None,
  276. on_mouse_enter: Optional[
  277. Union[EventHandler, EventSpec, list, function, BaseVar]
  278. ] = None,
  279. on_mouse_leave: Optional[
  280. Union[EventHandler, EventSpec, list, function, BaseVar]
  281. ] = None,
  282. on_mouse_move: Optional[
  283. Union[EventHandler, EventSpec, list, function, BaseVar]
  284. ] = None,
  285. on_mouse_out: Optional[
  286. Union[EventHandler, EventSpec, list, function, BaseVar]
  287. ] = None,
  288. on_mouse_over: Optional[
  289. Union[EventHandler, EventSpec, list, function, BaseVar]
  290. ] = None,
  291. on_mouse_up: Optional[
  292. Union[EventHandler, EventSpec, list, function, BaseVar]
  293. ] = None,
  294. on_scroll: Optional[
  295. Union[EventHandler, EventSpec, list, function, BaseVar]
  296. ] = None,
  297. on_unmount: Optional[
  298. Union[EventHandler, EventSpec, list, function, BaseVar]
  299. ] = None,
  300. **props
  301. ) -> "StatHelpText":
  302. """Create the component.
  303. Args:
  304. *children: The children of the component.
  305. style: The style of the component.
  306. key: A unique key for the component.
  307. id: The id for the component.
  308. class_name: The class name for the component.
  309. autofocus: Whether the component should take the focus once the page is loaded
  310. custom_attrs: custom attribute
  311. **props: The props of the component.
  312. Returns:
  313. The component.
  314. Raises:
  315. TypeError: If an invalid child is passed.
  316. """
  317. ...
  318. class StatArrow(ChakraComponent):
  319. @overload
  320. @classmethod
  321. def create( # type: ignore
  322. cls,
  323. *children,
  324. type_: Optional[Union[Var[str], str]] = None,
  325. style: Optional[Style] = None,
  326. key: Optional[Any] = None,
  327. id: Optional[Any] = None,
  328. class_name: Optional[Any] = None,
  329. autofocus: Optional[bool] = None,
  330. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  331. on_blur: Optional[
  332. Union[EventHandler, EventSpec, list, function, BaseVar]
  333. ] = None,
  334. on_click: Optional[
  335. Union[EventHandler, EventSpec, list, function, BaseVar]
  336. ] = None,
  337. on_context_menu: Optional[
  338. Union[EventHandler, EventSpec, list, function, BaseVar]
  339. ] = None,
  340. on_double_click: Optional[
  341. Union[EventHandler, EventSpec, list, function, BaseVar]
  342. ] = None,
  343. on_focus: Optional[
  344. Union[EventHandler, EventSpec, list, function, BaseVar]
  345. ] = None,
  346. on_mount: Optional[
  347. Union[EventHandler, EventSpec, list, function, BaseVar]
  348. ] = None,
  349. on_mouse_down: Optional[
  350. Union[EventHandler, EventSpec, list, function, BaseVar]
  351. ] = None,
  352. on_mouse_enter: Optional[
  353. Union[EventHandler, EventSpec, list, function, BaseVar]
  354. ] = None,
  355. on_mouse_leave: Optional[
  356. Union[EventHandler, EventSpec, list, function, BaseVar]
  357. ] = None,
  358. on_mouse_move: Optional[
  359. Union[EventHandler, EventSpec, list, function, BaseVar]
  360. ] = None,
  361. on_mouse_out: Optional[
  362. Union[EventHandler, EventSpec, list, function, BaseVar]
  363. ] = None,
  364. on_mouse_over: Optional[
  365. Union[EventHandler, EventSpec, list, function, BaseVar]
  366. ] = None,
  367. on_mouse_up: Optional[
  368. Union[EventHandler, EventSpec, list, function, BaseVar]
  369. ] = None,
  370. on_scroll: Optional[
  371. Union[EventHandler, EventSpec, list, function, BaseVar]
  372. ] = None,
  373. on_unmount: Optional[
  374. Union[EventHandler, EventSpec, list, function, BaseVar]
  375. ] = None,
  376. **props
  377. ) -> "StatArrow":
  378. """Create the component.
  379. Args:
  380. *children: The children of the component.
  381. type_: The type of arrow, either increase or decrease.
  382. style: The style of the component.
  383. key: A unique key for the component.
  384. id: The id for the component.
  385. class_name: The class name for the component.
  386. autofocus: Whether the component should take the focus once the page is loaded
  387. custom_attrs: custom attribute
  388. **props: The props of the component.
  389. Returns:
  390. The component.
  391. Raises:
  392. TypeError: If an invalid child is passed.
  393. """
  394. ...
  395. class StatGroup(ChakraComponent):
  396. @overload
  397. @classmethod
  398. def create( # type: ignore
  399. cls,
  400. *children,
  401. style: Optional[Style] = None,
  402. key: Optional[Any] = None,
  403. id: Optional[Any] = None,
  404. class_name: Optional[Any] = None,
  405. autofocus: Optional[bool] = None,
  406. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  407. on_blur: Optional[
  408. Union[EventHandler, EventSpec, list, function, BaseVar]
  409. ] = None,
  410. on_click: Optional[
  411. Union[EventHandler, EventSpec, list, function, BaseVar]
  412. ] = None,
  413. on_context_menu: Optional[
  414. Union[EventHandler, EventSpec, list, function, BaseVar]
  415. ] = None,
  416. on_double_click: Optional[
  417. Union[EventHandler, EventSpec, list, function, BaseVar]
  418. ] = None,
  419. on_focus: Optional[
  420. Union[EventHandler, EventSpec, list, function, BaseVar]
  421. ] = None,
  422. on_mount: Optional[
  423. Union[EventHandler, EventSpec, list, function, BaseVar]
  424. ] = None,
  425. on_mouse_down: Optional[
  426. Union[EventHandler, EventSpec, list, function, BaseVar]
  427. ] = None,
  428. on_mouse_enter: Optional[
  429. Union[EventHandler, EventSpec, list, function, BaseVar]
  430. ] = None,
  431. on_mouse_leave: Optional[
  432. Union[EventHandler, EventSpec, list, function, BaseVar]
  433. ] = None,
  434. on_mouse_move: Optional[
  435. Union[EventHandler, EventSpec, list, function, BaseVar]
  436. ] = None,
  437. on_mouse_out: Optional[
  438. Union[EventHandler, EventSpec, list, function, BaseVar]
  439. ] = None,
  440. on_mouse_over: Optional[
  441. Union[EventHandler, EventSpec, list, function, BaseVar]
  442. ] = None,
  443. on_mouse_up: Optional[
  444. Union[EventHandler, EventSpec, list, function, BaseVar]
  445. ] = None,
  446. on_scroll: Optional[
  447. Union[EventHandler, EventSpec, list, function, BaseVar]
  448. ] = None,
  449. on_unmount: Optional[
  450. Union[EventHandler, EventSpec, list, function, BaseVar]
  451. ] = None,
  452. **props
  453. ) -> "StatGroup":
  454. """Create the component.
  455. Args:
  456. *children: The children of the component.
  457. style: The style of the component.
  458. key: A unique key for the component.
  459. id: The id for the component.
  460. class_name: The class name for the component.
  461. autofocus: Whether the component should take the focus once the page is loaded
  462. custom_attrs: custom attribute
  463. **props: The props of the component.
  464. Returns:
  465. The component.
  466. Raises:
  467. TypeError: If an invalid child is passed.
  468. """
  469. ...