slider.pyi 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. """Stub file for reflex/components/chakra/forms/slider.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 Any, Literal, Union
  10. from reflex.components.chakra import ChakraComponent, LiteralChakraDirection
  11. from reflex.components.component import Component
  12. from reflex.constants import EventTriggers
  13. from reflex.vars import Var
  14. LiteralLayout = Literal["horizontal", "vertical"]
  15. class BaseSlider(ChakraComponent):
  16. @overload
  17. @classmethod
  18. def create( # type: ignore
  19. cls,
  20. *children,
  21. style: Optional[Style] = None,
  22. key: Optional[Any] = None,
  23. id: Optional[Any] = None,
  24. class_name: Optional[Any] = None,
  25. autofocus: Optional[bool] = None,
  26. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  27. on_blur: Optional[
  28. Union[EventHandler, EventSpec, list, function, BaseVar]
  29. ] = None,
  30. on_click: Optional[
  31. Union[EventHandler, EventSpec, list, function, BaseVar]
  32. ] = None,
  33. on_context_menu: Optional[
  34. Union[EventHandler, EventSpec, list, function, BaseVar]
  35. ] = None,
  36. on_double_click: Optional[
  37. Union[EventHandler, EventSpec, list, function, BaseVar]
  38. ] = None,
  39. on_focus: Optional[
  40. Union[EventHandler, EventSpec, list, function, BaseVar]
  41. ] = None,
  42. on_mount: Optional[
  43. Union[EventHandler, EventSpec, list, function, BaseVar]
  44. ] = None,
  45. on_mouse_down: Optional[
  46. Union[EventHandler, EventSpec, list, function, BaseVar]
  47. ] = None,
  48. on_mouse_enter: Optional[
  49. Union[EventHandler, EventSpec, list, function, BaseVar]
  50. ] = None,
  51. on_mouse_leave: Optional[
  52. Union[EventHandler, EventSpec, list, function, BaseVar]
  53. ] = None,
  54. on_mouse_move: Optional[
  55. Union[EventHandler, EventSpec, list, function, BaseVar]
  56. ] = None,
  57. on_mouse_out: Optional[
  58. Union[EventHandler, EventSpec, list, function, BaseVar]
  59. ] = None,
  60. on_mouse_over: Optional[
  61. Union[EventHandler, EventSpec, list, function, BaseVar]
  62. ] = None,
  63. on_mouse_up: Optional[
  64. Union[EventHandler, EventSpec, list, function, BaseVar]
  65. ] = None,
  66. on_scroll: Optional[
  67. Union[EventHandler, EventSpec, list, function, BaseVar]
  68. ] = None,
  69. on_unmount: Optional[
  70. Union[EventHandler, EventSpec, list, function, BaseVar]
  71. ] = None,
  72. **props
  73. ) -> "BaseSlider":
  74. """Create the component.
  75. Args:
  76. *children: The children of the component.
  77. style: The style of the component.
  78. key: A unique key for the component.
  79. id: The id for the component.
  80. class_name: The class name for the component.
  81. autofocus: Whether the component should take the focus once the page is loaded
  82. custom_attrs: custom attribute
  83. **props: The props of the component.
  84. Returns:
  85. The component.
  86. Raises:
  87. TypeError: If an invalid child is passed.
  88. """
  89. ...
  90. class Slider(BaseSlider):
  91. def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
  92. @overload
  93. @classmethod
  94. def create( # type: ignore
  95. cls,
  96. *children,
  97. value: Optional[Union[Var[int], int]] = None,
  98. color_scheme: Optional[Union[Var[str], str]] = None,
  99. default_value: Optional[Union[Var[int], int]] = None,
  100. direction: Optional[
  101. Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]
  102. ] = None,
  103. focus_thumb_on_change: Optional[Union[Var[bool], bool]] = None,
  104. is_disabled: Optional[Union[Var[bool], bool]] = None,
  105. is_read_only: Optional[Union[Var[bool], bool]] = None,
  106. is_reversed: Optional[Union[Var[bool], bool]] = None,
  107. min_: Optional[Union[Var[int], int]] = None,
  108. max_: Optional[Union[Var[int], int]] = None,
  109. step: Optional[Union[Var[int], int]] = None,
  110. min_steps_between_thumbs: Optional[Union[Var[int], int]] = None,
  111. orientation: Optional[
  112. Union[
  113. Var[Literal["horizontal", "vertical"]],
  114. Literal["horizontal", "vertical"],
  115. ]
  116. ] = None,
  117. min_h: Optional[Union[Var[str], str]] = None,
  118. min_w: Optional[Union[Var[str], str]] = None,
  119. max_h: Optional[Union[Var[str], str]] = None,
  120. max_w: Optional[Union[Var[str], str]] = None,
  121. name: Optional[Union[Var[str], str]] = None,
  122. style: Optional[Style] = None,
  123. key: Optional[Any] = None,
  124. id: Optional[Any] = None,
  125. class_name: Optional[Any] = None,
  126. autofocus: Optional[bool] = None,
  127. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  128. on_blur: Optional[
  129. Union[EventHandler, EventSpec, list, function, BaseVar]
  130. ] = None,
  131. on_change: Optional[
  132. Union[EventHandler, EventSpec, list, function, BaseVar]
  133. ] = None,
  134. on_change_end: Optional[
  135. Union[EventHandler, EventSpec, list, function, BaseVar]
  136. ] = None,
  137. on_change_start: Optional[
  138. Union[EventHandler, EventSpec, list, function, BaseVar]
  139. ] = None,
  140. on_click: Optional[
  141. Union[EventHandler, EventSpec, list, function, BaseVar]
  142. ] = None,
  143. on_context_menu: Optional[
  144. Union[EventHandler, EventSpec, list, function, BaseVar]
  145. ] = None,
  146. on_double_click: Optional[
  147. Union[EventHandler, EventSpec, list, function, BaseVar]
  148. ] = None,
  149. on_focus: Optional[
  150. Union[EventHandler, EventSpec, list, function, BaseVar]
  151. ] = None,
  152. on_mount: Optional[
  153. Union[EventHandler, EventSpec, list, function, BaseVar]
  154. ] = None,
  155. on_mouse_down: Optional[
  156. Union[EventHandler, EventSpec, list, function, BaseVar]
  157. ] = None,
  158. on_mouse_enter: Optional[
  159. Union[EventHandler, EventSpec, list, function, BaseVar]
  160. ] = None,
  161. on_mouse_leave: Optional[
  162. Union[EventHandler, EventSpec, list, function, BaseVar]
  163. ] = None,
  164. on_mouse_move: Optional[
  165. Union[EventHandler, EventSpec, list, function, BaseVar]
  166. ] = None,
  167. on_mouse_out: Optional[
  168. Union[EventHandler, EventSpec, list, function, BaseVar]
  169. ] = None,
  170. on_mouse_over: Optional[
  171. Union[EventHandler, EventSpec, list, function, BaseVar]
  172. ] = None,
  173. on_mouse_up: Optional[
  174. Union[EventHandler, EventSpec, list, function, BaseVar]
  175. ] = None,
  176. on_scroll: Optional[
  177. Union[EventHandler, EventSpec, list, function, BaseVar]
  178. ] = None,
  179. on_unmount: Optional[
  180. Union[EventHandler, EventSpec, list, function, BaseVar]
  181. ] = None,
  182. **props
  183. ) -> "Slider":
  184. """Create a slider component.
  185. If no children are provided, a default slider will be created.
  186. Args:
  187. *children: The children of the component.
  188. value: State var to bind the input.
  189. color_scheme: The color scheme.
  190. default_value: The placeholder text.
  191. direction: The writing mode ("ltr" | "rtl")
  192. focus_thumb_on_change: If false, the slider handle will not capture focus when value changes.
  193. is_disabled: If true, the slider will be disabled
  194. is_read_only: If true, the slider will be in `read-only` state.
  195. is_reversed: If true, the value will be incremented or decremented in reverse.
  196. min_: The minimum value of the slider.
  197. max_: The maximum value of the slider.
  198. step: The step in which increments/decrements have to be made
  199. min_steps_between_thumbs: The minimum distance between slider thumbs. Useful for preventing the thumbs from being too close together.
  200. orientation: Oreintation of the slider vertical | horizontal.
  201. min_h: Minimum height of the slider.
  202. min_w: Minimum width of the slider.
  203. max_h: Maximum height of the slider.
  204. max_w: Maximum width of the slider.
  205. name: The name of the form field
  206. style: The style of the component.
  207. key: A unique key for the component.
  208. id: The id for the component.
  209. class_name: The class name for the component.
  210. autofocus: Whether the component should take the focus once the page is loaded
  211. custom_attrs: custom attribute
  212. **props: The properties of the component.
  213. Returns:
  214. The slider component.
  215. """
  216. ...
  217. class SliderTrack(BaseSlider):
  218. @overload
  219. @classmethod
  220. def create( # type: ignore
  221. cls,
  222. *children,
  223. style: Optional[Style] = None,
  224. key: Optional[Any] = None,
  225. id: Optional[Any] = None,
  226. class_name: Optional[Any] = None,
  227. autofocus: Optional[bool] = None,
  228. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  229. on_blur: Optional[
  230. Union[EventHandler, EventSpec, list, function, BaseVar]
  231. ] = None,
  232. on_click: Optional[
  233. Union[EventHandler, EventSpec, list, function, BaseVar]
  234. ] = None,
  235. on_context_menu: Optional[
  236. Union[EventHandler, EventSpec, list, function, BaseVar]
  237. ] = None,
  238. on_double_click: Optional[
  239. Union[EventHandler, EventSpec, list, function, BaseVar]
  240. ] = None,
  241. on_focus: Optional[
  242. Union[EventHandler, EventSpec, list, function, BaseVar]
  243. ] = None,
  244. on_mount: Optional[
  245. Union[EventHandler, EventSpec, list, function, BaseVar]
  246. ] = None,
  247. on_mouse_down: Optional[
  248. Union[EventHandler, EventSpec, list, function, BaseVar]
  249. ] = None,
  250. on_mouse_enter: Optional[
  251. Union[EventHandler, EventSpec, list, function, BaseVar]
  252. ] = None,
  253. on_mouse_leave: Optional[
  254. Union[EventHandler, EventSpec, list, function, BaseVar]
  255. ] = None,
  256. on_mouse_move: Optional[
  257. Union[EventHandler, EventSpec, list, function, BaseVar]
  258. ] = None,
  259. on_mouse_out: Optional[
  260. Union[EventHandler, EventSpec, list, function, BaseVar]
  261. ] = None,
  262. on_mouse_over: Optional[
  263. Union[EventHandler, EventSpec, list, function, BaseVar]
  264. ] = None,
  265. on_mouse_up: Optional[
  266. Union[EventHandler, EventSpec, list, function, BaseVar]
  267. ] = None,
  268. on_scroll: Optional[
  269. Union[EventHandler, EventSpec, list, function, BaseVar]
  270. ] = None,
  271. on_unmount: Optional[
  272. Union[EventHandler, EventSpec, list, function, BaseVar]
  273. ] = None,
  274. **props
  275. ) -> "SliderTrack":
  276. """Create the component.
  277. Args:
  278. *children: The children of the component.
  279. style: The style of the component.
  280. key: A unique key for the component.
  281. id: The id for the component.
  282. class_name: The class name for the component.
  283. autofocus: Whether the component should take the focus once the page is loaded
  284. custom_attrs: custom attribute
  285. **props: The props of the component.
  286. Returns:
  287. The component.
  288. Raises:
  289. TypeError: If an invalid child is passed.
  290. """
  291. ...
  292. class SliderFilledTrack(BaseSlider):
  293. @overload
  294. @classmethod
  295. def create( # type: ignore
  296. cls,
  297. *children,
  298. style: Optional[Style] = None,
  299. key: Optional[Any] = None,
  300. id: Optional[Any] = None,
  301. class_name: Optional[Any] = None,
  302. autofocus: Optional[bool] = None,
  303. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  304. on_blur: Optional[
  305. Union[EventHandler, EventSpec, list, function, BaseVar]
  306. ] = None,
  307. on_click: Optional[
  308. Union[EventHandler, EventSpec, list, function, BaseVar]
  309. ] = None,
  310. on_context_menu: Optional[
  311. Union[EventHandler, EventSpec, list, function, BaseVar]
  312. ] = None,
  313. on_double_click: Optional[
  314. Union[EventHandler, EventSpec, list, function, BaseVar]
  315. ] = None,
  316. on_focus: Optional[
  317. Union[EventHandler, EventSpec, list, function, BaseVar]
  318. ] = None,
  319. on_mount: Optional[
  320. Union[EventHandler, EventSpec, list, function, BaseVar]
  321. ] = None,
  322. on_mouse_down: Optional[
  323. Union[EventHandler, EventSpec, list, function, BaseVar]
  324. ] = None,
  325. on_mouse_enter: Optional[
  326. Union[EventHandler, EventSpec, list, function, BaseVar]
  327. ] = None,
  328. on_mouse_leave: Optional[
  329. Union[EventHandler, EventSpec, list, function, BaseVar]
  330. ] = None,
  331. on_mouse_move: Optional[
  332. Union[EventHandler, EventSpec, list, function, BaseVar]
  333. ] = None,
  334. on_mouse_out: Optional[
  335. Union[EventHandler, EventSpec, list, function, BaseVar]
  336. ] = None,
  337. on_mouse_over: Optional[
  338. Union[EventHandler, EventSpec, list, function, BaseVar]
  339. ] = None,
  340. on_mouse_up: Optional[
  341. Union[EventHandler, EventSpec, list, function, BaseVar]
  342. ] = None,
  343. on_scroll: Optional[
  344. Union[EventHandler, EventSpec, list, function, BaseVar]
  345. ] = None,
  346. on_unmount: Optional[
  347. Union[EventHandler, EventSpec, list, function, BaseVar]
  348. ] = None,
  349. **props
  350. ) -> "SliderFilledTrack":
  351. """Create the component.
  352. Args:
  353. *children: The children of the component.
  354. style: The style of the component.
  355. key: A unique key for the component.
  356. id: The id for the component.
  357. class_name: The class name for the component.
  358. autofocus: Whether the component should take the focus once the page is loaded
  359. custom_attrs: custom attribute
  360. **props: The props of the component.
  361. Returns:
  362. The component.
  363. Raises:
  364. TypeError: If an invalid child is passed.
  365. """
  366. ...
  367. class SliderThumb(BaseSlider):
  368. @overload
  369. @classmethod
  370. def create( # type: ignore
  371. cls,
  372. *children,
  373. box_size: Optional[Union[Var[str], str]] = None,
  374. style: Optional[Style] = None,
  375. key: Optional[Any] = None,
  376. id: Optional[Any] = None,
  377. class_name: Optional[Any] = None,
  378. autofocus: Optional[bool] = None,
  379. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  380. on_blur: Optional[
  381. Union[EventHandler, EventSpec, list, function, BaseVar]
  382. ] = None,
  383. on_click: Optional[
  384. Union[EventHandler, EventSpec, list, function, BaseVar]
  385. ] = None,
  386. on_context_menu: Optional[
  387. Union[EventHandler, EventSpec, list, function, BaseVar]
  388. ] = None,
  389. on_double_click: Optional[
  390. Union[EventHandler, EventSpec, list, function, BaseVar]
  391. ] = None,
  392. on_focus: Optional[
  393. Union[EventHandler, EventSpec, list, function, BaseVar]
  394. ] = None,
  395. on_mount: Optional[
  396. Union[EventHandler, EventSpec, list, function, BaseVar]
  397. ] = None,
  398. on_mouse_down: Optional[
  399. Union[EventHandler, EventSpec, list, function, BaseVar]
  400. ] = None,
  401. on_mouse_enter: Optional[
  402. Union[EventHandler, EventSpec, list, function, BaseVar]
  403. ] = None,
  404. on_mouse_leave: Optional[
  405. Union[EventHandler, EventSpec, list, function, BaseVar]
  406. ] = None,
  407. on_mouse_move: Optional[
  408. Union[EventHandler, EventSpec, list, function, BaseVar]
  409. ] = None,
  410. on_mouse_out: Optional[
  411. Union[EventHandler, EventSpec, list, function, BaseVar]
  412. ] = None,
  413. on_mouse_over: Optional[
  414. Union[EventHandler, EventSpec, list, function, BaseVar]
  415. ] = None,
  416. on_mouse_up: Optional[
  417. Union[EventHandler, EventSpec, list, function, BaseVar]
  418. ] = None,
  419. on_scroll: Optional[
  420. Union[EventHandler, EventSpec, list, function, BaseVar]
  421. ] = None,
  422. on_unmount: Optional[
  423. Union[EventHandler, EventSpec, list, function, BaseVar]
  424. ] = None,
  425. **props
  426. ) -> "SliderThumb":
  427. """Create the component.
  428. Args:
  429. *children: The children of the component.
  430. box_size: The size of the thumb.
  431. style: The style of the component.
  432. key: A unique key for the component.
  433. id: The id for the component.
  434. class_name: The class name for the component.
  435. autofocus: Whether the component should take the focus once the page is loaded
  436. custom_attrs: custom attribute
  437. **props: The props of the component.
  438. Returns:
  439. The component.
  440. Raises:
  441. TypeError: If an invalid child is passed.
  442. """
  443. ...
  444. class SliderMark(BaseSlider):
  445. @overload
  446. @classmethod
  447. def create( # type: ignore
  448. cls,
  449. *children,
  450. style: Optional[Style] = None,
  451. key: Optional[Any] = None,
  452. id: Optional[Any] = None,
  453. class_name: Optional[Any] = None,
  454. autofocus: Optional[bool] = None,
  455. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  456. on_blur: Optional[
  457. Union[EventHandler, EventSpec, list, function, BaseVar]
  458. ] = None,
  459. on_click: Optional[
  460. Union[EventHandler, EventSpec, list, function, BaseVar]
  461. ] = None,
  462. on_context_menu: Optional[
  463. Union[EventHandler, EventSpec, list, function, BaseVar]
  464. ] = None,
  465. on_double_click: Optional[
  466. Union[EventHandler, EventSpec, list, function, BaseVar]
  467. ] = None,
  468. on_focus: Optional[
  469. Union[EventHandler, EventSpec, list, function, BaseVar]
  470. ] = None,
  471. on_mount: Optional[
  472. Union[EventHandler, EventSpec, list, function, BaseVar]
  473. ] = None,
  474. on_mouse_down: Optional[
  475. Union[EventHandler, EventSpec, list, function, BaseVar]
  476. ] = None,
  477. on_mouse_enter: Optional[
  478. Union[EventHandler, EventSpec, list, function, BaseVar]
  479. ] = None,
  480. on_mouse_leave: Optional[
  481. Union[EventHandler, EventSpec, list, function, BaseVar]
  482. ] = None,
  483. on_mouse_move: Optional[
  484. Union[EventHandler, EventSpec, list, function, BaseVar]
  485. ] = None,
  486. on_mouse_out: Optional[
  487. Union[EventHandler, EventSpec, list, function, BaseVar]
  488. ] = None,
  489. on_mouse_over: Optional[
  490. Union[EventHandler, EventSpec, list, function, BaseVar]
  491. ] = None,
  492. on_mouse_up: Optional[
  493. Union[EventHandler, EventSpec, list, function, BaseVar]
  494. ] = None,
  495. on_scroll: Optional[
  496. Union[EventHandler, EventSpec, list, function, BaseVar]
  497. ] = None,
  498. on_unmount: Optional[
  499. Union[EventHandler, EventSpec, list, function, BaseVar]
  500. ] = None,
  501. **props
  502. ) -> "SliderMark":
  503. """Create the component.
  504. Args:
  505. *children: The children of the component.
  506. style: The style of the component.
  507. key: A unique key for the component.
  508. id: The id for the component.
  509. class_name: The class name for the component.
  510. autofocus: Whether the component should take the focus once the page is loaded
  511. custom_attrs: custom attribute
  512. **props: The props of the component.
  513. Returns:
  514. The component.
  515. Raises:
  516. TypeError: If an invalid child is passed.
  517. """
  518. ...