progress.pyi 22 KB

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