progress.pyi 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577
  1. """Stub file for reflex/components/radix/primitives/progress.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Callable, Dict, Literal, Optional, Union, overload
  6. from reflex.components.component import ComponentNamespace
  7. from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
  8. from reflex.event import EventHandler, EventSpec
  9. from reflex.style import Style
  10. from reflex.vars import Var
  11. class ProgressComponent(RadixPrimitiveComponentWithClassName):
  12. @overload
  13. @classmethod
  14. def create( # type: ignore
  15. cls,
  16. *children,
  17. as_child: Optional[Union[Var[bool], bool]] = None,
  18. style: Optional[Style] = None,
  19. key: Optional[Any] = None,
  20. id: Optional[Any] = None,
  21. class_name: Optional[Any] = None,
  22. autofocus: Optional[bool] = None,
  23. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  24. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  25. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  26. on_context_menu: Optional[
  27. Union[EventHandler, EventSpec, list, Callable, Var]
  28. ] = None,
  29. on_double_click: Optional[
  30. Union[EventHandler, EventSpec, list, Callable, Var]
  31. ] = None,
  32. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  33. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  34. on_mouse_down: Optional[
  35. Union[EventHandler, EventSpec, list, Callable, Var]
  36. ] = None,
  37. on_mouse_enter: Optional[
  38. Union[EventHandler, EventSpec, list, Callable, Var]
  39. ] = None,
  40. on_mouse_leave: Optional[
  41. Union[EventHandler, EventSpec, list, Callable, Var]
  42. ] = None,
  43. on_mouse_move: Optional[
  44. Union[EventHandler, EventSpec, list, Callable, Var]
  45. ] = None,
  46. on_mouse_out: Optional[
  47. Union[EventHandler, EventSpec, list, Callable, Var]
  48. ] = None,
  49. on_mouse_over: Optional[
  50. Union[EventHandler, EventSpec, list, Callable, Var]
  51. ] = None,
  52. on_mouse_up: Optional[
  53. Union[EventHandler, EventSpec, list, Callable, Var]
  54. ] = None,
  55. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  56. on_unmount: Optional[
  57. Union[EventHandler, EventSpec, list, Callable, Var]
  58. ] = None,
  59. **props,
  60. ) -> "ProgressComponent":
  61. """Create the component.
  62. Args:
  63. *children: The children of the component.
  64. as_child: Change the default rendered element for the one passed as a child.
  65. style: The style of the component.
  66. key: A unique key for the component.
  67. id: The id for the component.
  68. class_name: The class name for the component.
  69. autofocus: Whether the component should take the focus once the page is loaded
  70. custom_attrs: custom attribute
  71. **props: The props of the component.
  72. Returns:
  73. The component.
  74. """
  75. ...
  76. class ProgressRoot(ProgressComponent):
  77. def add_style(self) -> dict[str, Any] | None: ...
  78. @overload
  79. @classmethod
  80. def create( # type: ignore
  81. cls,
  82. *children,
  83. radius: Optional[
  84. Union[
  85. Var[Literal["none", "small", "medium", "large", "full"]],
  86. Literal["none", "small", "medium", "large", "full"],
  87. ]
  88. ] = None,
  89. as_child: Optional[Union[Var[bool], bool]] = None,
  90. style: Optional[Style] = None,
  91. key: Optional[Any] = None,
  92. id: Optional[Any] = None,
  93. class_name: Optional[Any] = None,
  94. autofocus: Optional[bool] = None,
  95. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  96. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  97. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  98. on_context_menu: Optional[
  99. Union[EventHandler, EventSpec, list, Callable, Var]
  100. ] = None,
  101. on_double_click: Optional[
  102. Union[EventHandler, EventSpec, list, Callable, Var]
  103. ] = None,
  104. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  105. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  106. on_mouse_down: Optional[
  107. Union[EventHandler, EventSpec, list, Callable, Var]
  108. ] = None,
  109. on_mouse_enter: Optional[
  110. Union[EventHandler, EventSpec, list, Callable, Var]
  111. ] = None,
  112. on_mouse_leave: Optional[
  113. Union[EventHandler, EventSpec, list, Callable, Var]
  114. ] = None,
  115. on_mouse_move: Optional[
  116. Union[EventHandler, EventSpec, list, Callable, Var]
  117. ] = None,
  118. on_mouse_out: Optional[
  119. Union[EventHandler, EventSpec, list, Callable, Var]
  120. ] = None,
  121. on_mouse_over: Optional[
  122. Union[EventHandler, EventSpec, list, Callable, Var]
  123. ] = None,
  124. on_mouse_up: Optional[
  125. Union[EventHandler, EventSpec, list, Callable, Var]
  126. ] = None,
  127. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  128. on_unmount: Optional[
  129. Union[EventHandler, EventSpec, list, Callable, Var]
  130. ] = None,
  131. **props,
  132. ) -> "ProgressRoot":
  133. """Create the component.
  134. Args:
  135. *children: The children of the component.
  136. radius: Override theme radius for progress bar: "none" | "small" | "medium" | "large" | "full"
  137. as_child: Change the default rendered element for the one passed as a child.
  138. style: The style of the component.
  139. key: A unique key for the component.
  140. id: The id for the component.
  141. class_name: The class name for the component.
  142. autofocus: Whether the component should take the focus once the page is loaded
  143. custom_attrs: custom attribute
  144. **props: The props of the component.
  145. Returns:
  146. The component.
  147. """
  148. ...
  149. class ProgressIndicator(ProgressComponent):
  150. def add_style(self) -> dict[str, Any] | None: ...
  151. @overload
  152. @classmethod
  153. def create( # type: ignore
  154. cls,
  155. *children,
  156. value: Optional[Union[Var[Optional[int]], int]] = None,
  157. max: Optional[Union[Var[Optional[int]], int]] = None,
  158. color_scheme: Optional[
  159. Union[
  160. Var[
  161. Literal[
  162. "tomato",
  163. "red",
  164. "ruby",
  165. "crimson",
  166. "pink",
  167. "plum",
  168. "purple",
  169. "violet",
  170. "iris",
  171. "indigo",
  172. "blue",
  173. "cyan",
  174. "teal",
  175. "jade",
  176. "green",
  177. "grass",
  178. "brown",
  179. "orange",
  180. "sky",
  181. "mint",
  182. "lime",
  183. "yellow",
  184. "amber",
  185. "gold",
  186. "bronze",
  187. "gray",
  188. ]
  189. ],
  190. Literal[
  191. "tomato",
  192. "red",
  193. "ruby",
  194. "crimson",
  195. "pink",
  196. "plum",
  197. "purple",
  198. "violet",
  199. "iris",
  200. "indigo",
  201. "blue",
  202. "cyan",
  203. "teal",
  204. "jade",
  205. "green",
  206. "grass",
  207. "brown",
  208. "orange",
  209. "sky",
  210. "mint",
  211. "lime",
  212. "yellow",
  213. "amber",
  214. "gold",
  215. "bronze",
  216. "gray",
  217. ],
  218. ]
  219. ] = None,
  220. as_child: Optional[Union[Var[bool], bool]] = None,
  221. style: Optional[Style] = None,
  222. key: Optional[Any] = None,
  223. id: Optional[Any] = None,
  224. class_name: Optional[Any] = None,
  225. autofocus: Optional[bool] = None,
  226. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  227. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  228. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  229. on_context_menu: Optional[
  230. Union[EventHandler, EventSpec, list, Callable, Var]
  231. ] = None,
  232. on_double_click: Optional[
  233. Union[EventHandler, EventSpec, list, Callable, Var]
  234. ] = None,
  235. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  236. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  237. on_mouse_down: Optional[
  238. Union[EventHandler, EventSpec, list, Callable, Var]
  239. ] = None,
  240. on_mouse_enter: Optional[
  241. Union[EventHandler, EventSpec, list, Callable, Var]
  242. ] = None,
  243. on_mouse_leave: Optional[
  244. Union[EventHandler, EventSpec, list, Callable, Var]
  245. ] = None,
  246. on_mouse_move: Optional[
  247. Union[EventHandler, EventSpec, list, Callable, Var]
  248. ] = None,
  249. on_mouse_out: Optional[
  250. Union[EventHandler, EventSpec, list, Callable, Var]
  251. ] = None,
  252. on_mouse_over: Optional[
  253. Union[EventHandler, EventSpec, list, Callable, Var]
  254. ] = None,
  255. on_mouse_up: Optional[
  256. Union[EventHandler, EventSpec, list, Callable, Var]
  257. ] = None,
  258. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  259. on_unmount: Optional[
  260. Union[EventHandler, EventSpec, list, Callable, Var]
  261. ] = None,
  262. **props,
  263. ) -> "ProgressIndicator":
  264. """Create the component.
  265. Args:
  266. *children: The children of the component.
  267. value: The current progress value.
  268. max: The maximum progress value.
  269. color_scheme: The color scheme of the progress indicator.
  270. as_child: Change the default rendered element for the one passed as a child.
  271. style: The style of the component.
  272. key: A unique key for the component.
  273. id: The id for the component.
  274. class_name: The class name for the component.
  275. autofocus: Whether the component should take the focus once the page is loaded
  276. custom_attrs: custom attribute
  277. **props: The props of the component.
  278. Returns:
  279. The component.
  280. """
  281. ...
  282. class Progress(ProgressRoot):
  283. @overload
  284. @classmethod
  285. def create( # type: ignore
  286. cls,
  287. *children,
  288. color_scheme: Optional[
  289. Union[
  290. Var[
  291. Literal[
  292. "tomato",
  293. "red",
  294. "ruby",
  295. "crimson",
  296. "pink",
  297. "plum",
  298. "purple",
  299. "violet",
  300. "iris",
  301. "indigo",
  302. "blue",
  303. "cyan",
  304. "teal",
  305. "jade",
  306. "green",
  307. "grass",
  308. "brown",
  309. "orange",
  310. "sky",
  311. "mint",
  312. "lime",
  313. "yellow",
  314. "amber",
  315. "gold",
  316. "bronze",
  317. "gray",
  318. ]
  319. ],
  320. Literal[
  321. "tomato",
  322. "red",
  323. "ruby",
  324. "crimson",
  325. "pink",
  326. "plum",
  327. "purple",
  328. "violet",
  329. "iris",
  330. "indigo",
  331. "blue",
  332. "cyan",
  333. "teal",
  334. "jade",
  335. "green",
  336. "grass",
  337. "brown",
  338. "orange",
  339. "sky",
  340. "mint",
  341. "lime",
  342. "yellow",
  343. "amber",
  344. "gold",
  345. "bronze",
  346. "gray",
  347. ],
  348. ]
  349. ] = None,
  350. value: Optional[Union[Var[Optional[int]], int]] = None,
  351. max: Optional[Union[Var[Optional[int]], int]] = None,
  352. radius: Optional[
  353. Union[
  354. Var[Literal["none", "small", "medium", "large", "full"]],
  355. Literal["none", "small", "medium", "large", "full"],
  356. ]
  357. ] = None,
  358. as_child: Optional[Union[Var[bool], bool]] = None,
  359. style: Optional[Style] = None,
  360. key: Optional[Any] = None,
  361. id: Optional[Any] = None,
  362. class_name: Optional[Any] = None,
  363. autofocus: Optional[bool] = None,
  364. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  365. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  366. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  367. on_context_menu: Optional[
  368. Union[EventHandler, EventSpec, list, Callable, Var]
  369. ] = None,
  370. on_double_click: Optional[
  371. Union[EventHandler, EventSpec, list, Callable, Var]
  372. ] = None,
  373. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  374. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  375. on_mouse_down: Optional[
  376. Union[EventHandler, EventSpec, list, Callable, Var]
  377. ] = None,
  378. on_mouse_enter: Optional[
  379. Union[EventHandler, EventSpec, list, Callable, Var]
  380. ] = None,
  381. on_mouse_leave: Optional[
  382. Union[EventHandler, EventSpec, list, Callable, Var]
  383. ] = None,
  384. on_mouse_move: Optional[
  385. Union[EventHandler, EventSpec, list, Callable, Var]
  386. ] = None,
  387. on_mouse_out: Optional[
  388. Union[EventHandler, EventSpec, list, Callable, Var]
  389. ] = None,
  390. on_mouse_over: Optional[
  391. Union[EventHandler, EventSpec, list, Callable, Var]
  392. ] = None,
  393. on_mouse_up: Optional[
  394. Union[EventHandler, EventSpec, list, Callable, Var]
  395. ] = None,
  396. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  397. on_unmount: Optional[
  398. Union[EventHandler, EventSpec, list, Callable, Var]
  399. ] = None,
  400. **props,
  401. ) -> "Progress":
  402. """High-level API for progress bar.
  403. Args:
  404. color_scheme: Override theme color for progress bar indicator
  405. value: The current progress value.
  406. max: The maximum progress value.
  407. radius: Override theme radius for progress bar: "none" | "small" | "medium" | "large" | "full"
  408. as_child: Change the default rendered element for the one passed as a child.
  409. style: The style of the component.
  410. key: A unique key for the component.
  411. id: The id for the component.
  412. class_name: The class name for the component.
  413. autofocus: Whether the component should take the focus once the page is loaded
  414. custom_attrs: custom attribute
  415. **props: The props of the progress bar.
  416. Returns:
  417. The progress bar.
  418. """
  419. ...
  420. class ProgressNamespace(ComponentNamespace):
  421. root = staticmethod(ProgressRoot.create)
  422. indicator = staticmethod(ProgressIndicator.create)
  423. @staticmethod
  424. def __call__(
  425. *children,
  426. color_scheme: Optional[
  427. Union[
  428. Var[
  429. Literal[
  430. "tomato",
  431. "red",
  432. "ruby",
  433. "crimson",
  434. "pink",
  435. "plum",
  436. "purple",
  437. "violet",
  438. "iris",
  439. "indigo",
  440. "blue",
  441. "cyan",
  442. "teal",
  443. "jade",
  444. "green",
  445. "grass",
  446. "brown",
  447. "orange",
  448. "sky",
  449. "mint",
  450. "lime",
  451. "yellow",
  452. "amber",
  453. "gold",
  454. "bronze",
  455. "gray",
  456. ]
  457. ],
  458. Literal[
  459. "tomato",
  460. "red",
  461. "ruby",
  462. "crimson",
  463. "pink",
  464. "plum",
  465. "purple",
  466. "violet",
  467. "iris",
  468. "indigo",
  469. "blue",
  470. "cyan",
  471. "teal",
  472. "jade",
  473. "green",
  474. "grass",
  475. "brown",
  476. "orange",
  477. "sky",
  478. "mint",
  479. "lime",
  480. "yellow",
  481. "amber",
  482. "gold",
  483. "bronze",
  484. "gray",
  485. ],
  486. ]
  487. ] = None,
  488. value: Optional[Union[Var[Optional[int]], int]] = None,
  489. max: Optional[Union[Var[Optional[int]], int]] = None,
  490. radius: Optional[
  491. Union[
  492. Var[Literal["none", "small", "medium", "large", "full"]],
  493. Literal["none", "small", "medium", "large", "full"],
  494. ]
  495. ] = None,
  496. as_child: Optional[Union[Var[bool], bool]] = None,
  497. style: Optional[Style] = None,
  498. key: Optional[Any] = None,
  499. id: Optional[Any] = None,
  500. class_name: Optional[Any] = None,
  501. autofocus: Optional[bool] = None,
  502. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  503. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  504. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  505. on_context_menu: Optional[
  506. Union[EventHandler, EventSpec, list, Callable, Var]
  507. ] = None,
  508. on_double_click: Optional[
  509. Union[EventHandler, EventSpec, list, Callable, Var]
  510. ] = None,
  511. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  512. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  513. on_mouse_down: Optional[
  514. Union[EventHandler, EventSpec, list, Callable, Var]
  515. ] = None,
  516. on_mouse_enter: Optional[
  517. Union[EventHandler, EventSpec, list, Callable, Var]
  518. ] = None,
  519. on_mouse_leave: Optional[
  520. Union[EventHandler, EventSpec, list, Callable, Var]
  521. ] = None,
  522. on_mouse_move: Optional[
  523. Union[EventHandler, EventSpec, list, Callable, Var]
  524. ] = None,
  525. on_mouse_out: Optional[
  526. Union[EventHandler, EventSpec, list, Callable, Var]
  527. ] = None,
  528. on_mouse_over: Optional[
  529. Union[EventHandler, EventSpec, list, Callable, Var]
  530. ] = None,
  531. on_mouse_up: Optional[
  532. Union[EventHandler, EventSpec, list, Callable, Var]
  533. ] = None,
  534. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  535. on_unmount: Optional[
  536. Union[EventHandler, EventSpec, list, Callable, Var]
  537. ] = None,
  538. **props,
  539. ) -> "Progress":
  540. """High-level API for progress bar.
  541. Args:
  542. color_scheme: Override theme color for progress bar indicator
  543. value: The current progress value.
  544. max: The maximum progress value.
  545. radius: Override theme radius for progress bar: "none" | "small" | "medium" | "large" | "full"
  546. as_child: Change the default rendered element for the one passed as a child.
  547. style: The style of the component.
  548. key: A unique key for the component.
  549. id: The id for the component.
  550. class_name: The class name for the component.
  551. autofocus: Whether the component should take the focus once the page is loaded
  552. custom_attrs: custom attribute
  553. **props: The props of the progress bar.
  554. Returns:
  555. The progress bar.
  556. """
  557. ...
  558. progress = ProgressNamespace()