progress.pyi 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. """Stub file for reflex/components/radix/primitives/progress.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 typing import Optional, Union
  10. from reflex.components.component import Component, ComponentNamespace
  11. from reflex.components.core.colors import color
  12. from reflex.components.radix.primitives.accordion import DEFAULT_ANIMATION_DURATION
  13. from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
  14. from reflex.components.radix.themes.base import LiteralAccentColor
  15. from reflex.style import Style
  16. from reflex.vars import Var
  17. class ProgressComponent(RadixPrimitiveComponentWithClassName):
  18. @overload
  19. @classmethod
  20. def create( # type: ignore
  21. cls,
  22. *children,
  23. as_child: Optional[Union[Var[bool], bool]] = None,
  24. style: Optional[Style] = None,
  25. key: Optional[Any] = None,
  26. id: Optional[Any] = None,
  27. class_name: Optional[Any] = None,
  28. autofocus: Optional[bool] = None,
  29. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  30. on_blur: Optional[
  31. Union[EventHandler, EventSpec, list, function, BaseVar]
  32. ] = None,
  33. on_click: Optional[
  34. Union[EventHandler, EventSpec, list, function, BaseVar]
  35. ] = None,
  36. on_context_menu: Optional[
  37. Union[EventHandler, EventSpec, list, function, BaseVar]
  38. ] = None,
  39. on_double_click: Optional[
  40. Union[EventHandler, EventSpec, list, function, BaseVar]
  41. ] = None,
  42. on_focus: Optional[
  43. Union[EventHandler, EventSpec, list, function, BaseVar]
  44. ] = None,
  45. on_mount: Optional[
  46. Union[EventHandler, EventSpec, list, function, BaseVar]
  47. ] = None,
  48. on_mouse_down: Optional[
  49. Union[EventHandler, EventSpec, list, function, BaseVar]
  50. ] = None,
  51. on_mouse_enter: Optional[
  52. Union[EventHandler, EventSpec, list, function, BaseVar]
  53. ] = None,
  54. on_mouse_leave: Optional[
  55. Union[EventHandler, EventSpec, list, function, BaseVar]
  56. ] = None,
  57. on_mouse_move: Optional[
  58. Union[EventHandler, EventSpec, list, function, BaseVar]
  59. ] = None,
  60. on_mouse_out: Optional[
  61. Union[EventHandler, EventSpec, list, function, BaseVar]
  62. ] = None,
  63. on_mouse_over: Optional[
  64. Union[EventHandler, EventSpec, list, function, BaseVar]
  65. ] = None,
  66. on_mouse_up: Optional[
  67. Union[EventHandler, EventSpec, list, function, BaseVar]
  68. ] = None,
  69. on_scroll: Optional[
  70. Union[EventHandler, EventSpec, list, function, BaseVar]
  71. ] = None,
  72. on_unmount: Optional[
  73. Union[EventHandler, EventSpec, list, function, BaseVar]
  74. ] = None,
  75. **props
  76. ) -> "ProgressComponent":
  77. """Create the component.
  78. Args:
  79. *children: The children of the component.
  80. as_child: Change the default rendered element for the one passed as a child.
  81. style: The style of the component.
  82. key: A unique key for the component.
  83. id: The id for the component.
  84. class_name: The class name for the component.
  85. autofocus: Whether the component should take the focus once the page is loaded
  86. custom_attrs: custom attribute
  87. **props: The props of the component.
  88. Returns:
  89. The component.
  90. Raises:
  91. TypeError: If an invalid child is passed.
  92. """
  93. ...
  94. class ProgressRoot(ProgressComponent):
  95. @overload
  96. @classmethod
  97. def create( # type: ignore
  98. cls,
  99. *children,
  100. value: Optional[Union[Var[Optional[int]], Optional[int]]] = None,
  101. max: Optional[Union[Var[int], int]] = None,
  102. as_child: Optional[Union[Var[bool], bool]] = None,
  103. style: Optional[Style] = None,
  104. key: Optional[Any] = None,
  105. id: Optional[Any] = None,
  106. class_name: Optional[Any] = None,
  107. autofocus: Optional[bool] = None,
  108. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  109. on_blur: Optional[
  110. Union[EventHandler, EventSpec, list, function, BaseVar]
  111. ] = None,
  112. on_click: Optional[
  113. Union[EventHandler, EventSpec, list, function, BaseVar]
  114. ] = None,
  115. on_context_menu: Optional[
  116. Union[EventHandler, EventSpec, list, function, BaseVar]
  117. ] = None,
  118. on_double_click: Optional[
  119. Union[EventHandler, EventSpec, list, function, BaseVar]
  120. ] = None,
  121. on_focus: Optional[
  122. Union[EventHandler, EventSpec, list, function, BaseVar]
  123. ] = None,
  124. on_mount: Optional[
  125. Union[EventHandler, EventSpec, list, function, BaseVar]
  126. ] = None,
  127. on_mouse_down: Optional[
  128. Union[EventHandler, EventSpec, list, function, BaseVar]
  129. ] = None,
  130. on_mouse_enter: Optional[
  131. Union[EventHandler, EventSpec, list, function, BaseVar]
  132. ] = None,
  133. on_mouse_leave: Optional[
  134. Union[EventHandler, EventSpec, list, function, BaseVar]
  135. ] = None,
  136. on_mouse_move: Optional[
  137. Union[EventHandler, EventSpec, list, function, BaseVar]
  138. ] = None,
  139. on_mouse_out: Optional[
  140. Union[EventHandler, EventSpec, list, function, BaseVar]
  141. ] = None,
  142. on_mouse_over: Optional[
  143. Union[EventHandler, EventSpec, list, function, BaseVar]
  144. ] = None,
  145. on_mouse_up: Optional[
  146. Union[EventHandler, EventSpec, list, function, BaseVar]
  147. ] = None,
  148. on_scroll: Optional[
  149. Union[EventHandler, EventSpec, list, function, BaseVar]
  150. ] = None,
  151. on_unmount: Optional[
  152. Union[EventHandler, EventSpec, list, function, BaseVar]
  153. ] = None,
  154. **props
  155. ) -> "ProgressRoot":
  156. """Create the component.
  157. Args:
  158. *children: The children of the component.
  159. value: The current progress value.
  160. max: The maximum progress value.
  161. as_child: Change the default rendered element for the one passed as a child.
  162. style: The style of the component.
  163. key: A unique key for the component.
  164. id: The id for the component.
  165. class_name: The class name for the component.
  166. autofocus: Whether the component should take the focus once the page is loaded
  167. custom_attrs: custom attribute
  168. **props: The props of the component.
  169. Returns:
  170. The component.
  171. Raises:
  172. TypeError: If an invalid child is passed.
  173. """
  174. ...
  175. class ProgressIndicator(ProgressComponent):
  176. @overload
  177. @classmethod
  178. def create( # type: ignore
  179. cls,
  180. *children,
  181. value: Optional[Union[Var[Optional[int]], Optional[int]]] = None,
  182. max: Optional[Union[Var[Optional[int]], Optional[int]]] = None,
  183. color_scheme: Optional[
  184. Union[
  185. Var[
  186. Literal[
  187. "tomato",
  188. "red",
  189. "ruby",
  190. "crimson",
  191. "pink",
  192. "plum",
  193. "purple",
  194. "violet",
  195. "iris",
  196. "indigo",
  197. "blue",
  198. "cyan",
  199. "teal",
  200. "jade",
  201. "green",
  202. "grass",
  203. "brown",
  204. "orange",
  205. "sky",
  206. "mint",
  207. "lime",
  208. "yellow",
  209. "amber",
  210. "gold",
  211. "bronze",
  212. "gray",
  213. ]
  214. ],
  215. Literal[
  216. "tomato",
  217. "red",
  218. "ruby",
  219. "crimson",
  220. "pink",
  221. "plum",
  222. "purple",
  223. "violet",
  224. "iris",
  225. "indigo",
  226. "blue",
  227. "cyan",
  228. "teal",
  229. "jade",
  230. "green",
  231. "grass",
  232. "brown",
  233. "orange",
  234. "sky",
  235. "mint",
  236. "lime",
  237. "yellow",
  238. "amber",
  239. "gold",
  240. "bronze",
  241. "gray",
  242. ],
  243. ]
  244. ] = None,
  245. as_child: Optional[Union[Var[bool], bool]] = None,
  246. style: Optional[Style] = None,
  247. key: Optional[Any] = None,
  248. id: Optional[Any] = None,
  249. class_name: Optional[Any] = None,
  250. autofocus: Optional[bool] = None,
  251. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  252. on_blur: Optional[
  253. Union[EventHandler, EventSpec, list, function, BaseVar]
  254. ] = None,
  255. on_click: Optional[
  256. Union[EventHandler, EventSpec, list, function, BaseVar]
  257. ] = None,
  258. on_context_menu: Optional[
  259. Union[EventHandler, EventSpec, list, function, BaseVar]
  260. ] = None,
  261. on_double_click: Optional[
  262. Union[EventHandler, EventSpec, list, function, BaseVar]
  263. ] = None,
  264. on_focus: Optional[
  265. Union[EventHandler, EventSpec, list, function, BaseVar]
  266. ] = None,
  267. on_mount: Optional[
  268. Union[EventHandler, EventSpec, list, function, BaseVar]
  269. ] = None,
  270. on_mouse_down: Optional[
  271. Union[EventHandler, EventSpec, list, function, BaseVar]
  272. ] = None,
  273. on_mouse_enter: Optional[
  274. Union[EventHandler, EventSpec, list, function, BaseVar]
  275. ] = None,
  276. on_mouse_leave: Optional[
  277. Union[EventHandler, EventSpec, list, function, BaseVar]
  278. ] = None,
  279. on_mouse_move: Optional[
  280. Union[EventHandler, EventSpec, list, function, BaseVar]
  281. ] = None,
  282. on_mouse_out: Optional[
  283. Union[EventHandler, EventSpec, list, function, BaseVar]
  284. ] = None,
  285. on_mouse_over: Optional[
  286. Union[EventHandler, EventSpec, list, function, BaseVar]
  287. ] = None,
  288. on_mouse_up: Optional[
  289. Union[EventHandler, EventSpec, list, function, BaseVar]
  290. ] = None,
  291. on_scroll: Optional[
  292. Union[EventHandler, EventSpec, list, function, BaseVar]
  293. ] = None,
  294. on_unmount: Optional[
  295. Union[EventHandler, EventSpec, list, function, BaseVar]
  296. ] = None,
  297. **props
  298. ) -> "ProgressIndicator":
  299. """Create the component.
  300. Args:
  301. *children: The children of the component.
  302. value: The current progress value.
  303. max: The maximum progress value.
  304. color_scheme: The color scheme of the progress indicator.
  305. as_child: Change the default rendered element for the one passed as a child.
  306. style: The style of the component.
  307. key: A unique key for the component.
  308. id: The id for the component.
  309. class_name: The class name for the component.
  310. autofocus: Whether the component should take the focus once the page is loaded
  311. custom_attrs: custom attribute
  312. **props: The props of the component.
  313. Returns:
  314. The component.
  315. Raises:
  316. TypeError: If an invalid child is passed.
  317. """
  318. ...
  319. class Progress(ComponentNamespace):
  320. root = staticmethod(ProgressRoot.create)
  321. indicator = staticmethod(ProgressIndicator.create)
  322. @staticmethod
  323. def __call__(
  324. width: Optional[str] = "100%",
  325. color_scheme: Optional[Union[Var, LiteralAccentColor]] = None,
  326. **props
  327. ) -> Component: ...
  328. progress = Progress()