progress.pyi 22 KB

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