slider.pyi 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  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 Slider(ChakraComponent):
  16. def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
  17. @overload
  18. @classmethod
  19. def create( # type: ignore
  20. cls,
  21. *children,
  22. value: Optional[Union[Var[int], int]] = None,
  23. color_scheme: Optional[Union[Var[str], str]] = None,
  24. default_value: Optional[Union[Var[int], int]] = None,
  25. direction: Optional[
  26. Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]
  27. ] = None,
  28. focus_thumb_on_change: Optional[Union[Var[bool], bool]] = None,
  29. is_disabled: Optional[Union[Var[bool], bool]] = None,
  30. is_read_only: Optional[Union[Var[bool], bool]] = None,
  31. is_reversed: Optional[Union[Var[bool], bool]] = None,
  32. min_: Optional[Union[Var[int], int]] = None,
  33. max_: Optional[Union[Var[int], int]] = None,
  34. step: Optional[Union[Var[int], int]] = None,
  35. min_steps_between_thumbs: Optional[Union[Var[int], int]] = None,
  36. orientation: Optional[
  37. Union[
  38. Var[Literal["horizontal", "vertical"]],
  39. Literal["horizontal", "vertical"],
  40. ]
  41. ] = None,
  42. min_h: Optional[Union[Var[str], str]] = None,
  43. min_w: Optional[Union[Var[str], str]] = None,
  44. max_h: Optional[Union[Var[str], str]] = None,
  45. max_w: Optional[Union[Var[str], str]] = None,
  46. name: Optional[Union[Var[str], str]] = None,
  47. style: Optional[Style] = None,
  48. key: Optional[Any] = None,
  49. id: Optional[Any] = None,
  50. class_name: Optional[Any] = None,
  51. autofocus: Optional[bool] = None,
  52. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  53. on_blur: Optional[
  54. Union[EventHandler, EventSpec, list, function, BaseVar]
  55. ] = None,
  56. on_change: Optional[
  57. Union[EventHandler, EventSpec, list, function, BaseVar]
  58. ] = None,
  59. on_change_end: Optional[
  60. Union[EventHandler, EventSpec, list, function, BaseVar]
  61. ] = None,
  62. on_change_start: Optional[
  63. Union[EventHandler, EventSpec, list, function, BaseVar]
  64. ] = None,
  65. on_click: Optional[
  66. Union[EventHandler, EventSpec, list, function, BaseVar]
  67. ] = None,
  68. on_context_menu: Optional[
  69. Union[EventHandler, EventSpec, list, function, BaseVar]
  70. ] = None,
  71. on_double_click: Optional[
  72. Union[EventHandler, EventSpec, list, function, BaseVar]
  73. ] = None,
  74. on_focus: Optional[
  75. Union[EventHandler, EventSpec, list, function, BaseVar]
  76. ] = None,
  77. on_mount: Optional[
  78. Union[EventHandler, EventSpec, list, function, BaseVar]
  79. ] = None,
  80. on_mouse_down: Optional[
  81. Union[EventHandler, EventSpec, list, function, BaseVar]
  82. ] = None,
  83. on_mouse_enter: Optional[
  84. Union[EventHandler, EventSpec, list, function, BaseVar]
  85. ] = None,
  86. on_mouse_leave: Optional[
  87. Union[EventHandler, EventSpec, list, function, BaseVar]
  88. ] = None,
  89. on_mouse_move: Optional[
  90. Union[EventHandler, EventSpec, list, function, BaseVar]
  91. ] = None,
  92. on_mouse_out: Optional[
  93. Union[EventHandler, EventSpec, list, function, BaseVar]
  94. ] = None,
  95. on_mouse_over: Optional[
  96. Union[EventHandler, EventSpec, list, function, BaseVar]
  97. ] = None,
  98. on_mouse_up: Optional[
  99. Union[EventHandler, EventSpec, list, function, BaseVar]
  100. ] = None,
  101. on_scroll: Optional[
  102. Union[EventHandler, EventSpec, list, function, BaseVar]
  103. ] = None,
  104. on_unmount: Optional[
  105. Union[EventHandler, EventSpec, list, function, BaseVar]
  106. ] = None,
  107. **props
  108. ) -> "Slider":
  109. """Create a slider component.
  110. If no children are provided, a default slider will be created.
  111. Args:
  112. *children: The children of the component.
  113. value: State var to bind the input.
  114. color_scheme: The color scheme.
  115. default_value: The placeholder text.
  116. direction: The writing mode ("ltr" | "rtl")
  117. focus_thumb_on_change: If false, the slider handle will not capture focus when value changes.
  118. is_disabled: If true, the slider will be disabled
  119. is_read_only: If true, the slider will be in `read-only` state.
  120. is_reversed: If true, the value will be incremented or decremented in reverse.
  121. min_: The minimum value of the slider.
  122. max_: The maximum value of the slider.
  123. step: The step in which increments/decrements have to be made
  124. min_steps_between_thumbs: The minimum distance between slider thumbs. Useful for preventing the thumbs from being too close together.
  125. orientation: Oreintation of the slider vertical | horizontal.
  126. min_h: Minimum height of the slider.
  127. min_w: Minimum width of the slider.
  128. max_h: Maximum height of the slider.
  129. max_w: Maximum width of the slider.
  130. name: The name of the form field
  131. style: The style of the component.
  132. key: A unique key for the component.
  133. id: The id for the component.
  134. class_name: The class name for the component.
  135. autofocus: Whether the component should take the focus once the page is loaded
  136. custom_attrs: custom attribute
  137. **props: The properties of the component.
  138. Returns:
  139. The slider component.
  140. """
  141. ...
  142. class SliderTrack(ChakraComponent):
  143. @overload
  144. @classmethod
  145. def create( # type: ignore
  146. cls,
  147. *children,
  148. style: Optional[Style] = None,
  149. key: Optional[Any] = None,
  150. id: Optional[Any] = None,
  151. class_name: Optional[Any] = None,
  152. autofocus: Optional[bool] = None,
  153. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  154. on_blur: Optional[
  155. Union[EventHandler, EventSpec, list, function, BaseVar]
  156. ] = None,
  157. on_click: Optional[
  158. Union[EventHandler, EventSpec, list, function, BaseVar]
  159. ] = None,
  160. on_context_menu: Optional[
  161. Union[EventHandler, EventSpec, list, function, BaseVar]
  162. ] = None,
  163. on_double_click: Optional[
  164. Union[EventHandler, EventSpec, list, function, BaseVar]
  165. ] = None,
  166. on_focus: Optional[
  167. Union[EventHandler, EventSpec, list, function, BaseVar]
  168. ] = None,
  169. on_mount: Optional[
  170. Union[EventHandler, EventSpec, list, function, BaseVar]
  171. ] = None,
  172. on_mouse_down: Optional[
  173. Union[EventHandler, EventSpec, list, function, BaseVar]
  174. ] = None,
  175. on_mouse_enter: Optional[
  176. Union[EventHandler, EventSpec, list, function, BaseVar]
  177. ] = None,
  178. on_mouse_leave: Optional[
  179. Union[EventHandler, EventSpec, list, function, BaseVar]
  180. ] = None,
  181. on_mouse_move: Optional[
  182. Union[EventHandler, EventSpec, list, function, BaseVar]
  183. ] = None,
  184. on_mouse_out: Optional[
  185. Union[EventHandler, EventSpec, list, function, BaseVar]
  186. ] = None,
  187. on_mouse_over: Optional[
  188. Union[EventHandler, EventSpec, list, function, BaseVar]
  189. ] = None,
  190. on_mouse_up: Optional[
  191. Union[EventHandler, EventSpec, list, function, BaseVar]
  192. ] = None,
  193. on_scroll: Optional[
  194. Union[EventHandler, EventSpec, list, function, BaseVar]
  195. ] = None,
  196. on_unmount: Optional[
  197. Union[EventHandler, EventSpec, list, function, BaseVar]
  198. ] = None,
  199. **props
  200. ) -> "SliderTrack":
  201. """Create the component.
  202. Args:
  203. *children: The children of the component.
  204. style: The style of the component.
  205. key: A unique key for the component.
  206. id: The id for the component.
  207. class_name: The class name for the component.
  208. autofocus: Whether the component should take the focus once the page is loaded
  209. custom_attrs: custom attribute
  210. **props: The props of the component.
  211. Returns:
  212. The component.
  213. Raises:
  214. TypeError: If an invalid child is passed.
  215. """
  216. ...
  217. class SliderFilledTrack(ChakraComponent):
  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. ) -> "SliderFilledTrack":
  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 SliderThumb(ChakraComponent):
  293. @overload
  294. @classmethod
  295. def create( # type: ignore
  296. cls,
  297. *children,
  298. box_size: Optional[Union[Var[str], str]] = None,
  299. style: Optional[Style] = None,
  300. key: Optional[Any] = None,
  301. id: Optional[Any] = None,
  302. class_name: Optional[Any] = None,
  303. autofocus: Optional[bool] = None,
  304. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  305. on_blur: Optional[
  306. Union[EventHandler, EventSpec, list, function, BaseVar]
  307. ] = None,
  308. on_click: Optional[
  309. Union[EventHandler, EventSpec, list, function, BaseVar]
  310. ] = None,
  311. on_context_menu: Optional[
  312. Union[EventHandler, EventSpec, list, function, BaseVar]
  313. ] = None,
  314. on_double_click: Optional[
  315. Union[EventHandler, EventSpec, list, function, BaseVar]
  316. ] = None,
  317. on_focus: Optional[
  318. Union[EventHandler, EventSpec, list, function, BaseVar]
  319. ] = None,
  320. on_mount: Optional[
  321. Union[EventHandler, EventSpec, list, function, BaseVar]
  322. ] = None,
  323. on_mouse_down: Optional[
  324. Union[EventHandler, EventSpec, list, function, BaseVar]
  325. ] = None,
  326. on_mouse_enter: Optional[
  327. Union[EventHandler, EventSpec, list, function, BaseVar]
  328. ] = None,
  329. on_mouse_leave: Optional[
  330. Union[EventHandler, EventSpec, list, function, BaseVar]
  331. ] = None,
  332. on_mouse_move: Optional[
  333. Union[EventHandler, EventSpec, list, function, BaseVar]
  334. ] = None,
  335. on_mouse_out: Optional[
  336. Union[EventHandler, EventSpec, list, function, BaseVar]
  337. ] = None,
  338. on_mouse_over: Optional[
  339. Union[EventHandler, EventSpec, list, function, BaseVar]
  340. ] = None,
  341. on_mouse_up: Optional[
  342. Union[EventHandler, EventSpec, list, function, BaseVar]
  343. ] = None,
  344. on_scroll: Optional[
  345. Union[EventHandler, EventSpec, list, function, BaseVar]
  346. ] = None,
  347. on_unmount: Optional[
  348. Union[EventHandler, EventSpec, list, function, BaseVar]
  349. ] = None,
  350. **props
  351. ) -> "SliderThumb":
  352. """Create the component.
  353. Args:
  354. *children: The children of the component.
  355. box_size: The size of the thumb.
  356. style: The style of the component.
  357. key: A unique key for the component.
  358. id: The id for the component.
  359. class_name: The class name for the component.
  360. autofocus: Whether the component should take the focus once the page is loaded
  361. custom_attrs: custom attribute
  362. **props: The props of the component.
  363. Returns:
  364. The component.
  365. Raises:
  366. TypeError: If an invalid child is passed.
  367. """
  368. ...
  369. class SliderMark(ChakraComponent):
  370. @overload
  371. @classmethod
  372. def create( # type: ignore
  373. cls,
  374. *children,
  375. style: Optional[Style] = None,
  376. key: Optional[Any] = None,
  377. id: Optional[Any] = None,
  378. class_name: Optional[Any] = None,
  379. autofocus: Optional[bool] = None,
  380. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  381. on_blur: Optional[
  382. Union[EventHandler, EventSpec, list, function, BaseVar]
  383. ] = None,
  384. on_click: Optional[
  385. Union[EventHandler, EventSpec, list, function, BaseVar]
  386. ] = None,
  387. on_context_menu: Optional[
  388. Union[EventHandler, EventSpec, list, function, BaseVar]
  389. ] = None,
  390. on_double_click: Optional[
  391. Union[EventHandler, EventSpec, list, function, BaseVar]
  392. ] = None,
  393. on_focus: Optional[
  394. Union[EventHandler, EventSpec, list, function, BaseVar]
  395. ] = None,
  396. on_mount: Optional[
  397. Union[EventHandler, EventSpec, list, function, BaseVar]
  398. ] = None,
  399. on_mouse_down: Optional[
  400. Union[EventHandler, EventSpec, list, function, BaseVar]
  401. ] = None,
  402. on_mouse_enter: Optional[
  403. Union[EventHandler, EventSpec, list, function, BaseVar]
  404. ] = None,
  405. on_mouse_leave: Optional[
  406. Union[EventHandler, EventSpec, list, function, BaseVar]
  407. ] = None,
  408. on_mouse_move: Optional[
  409. Union[EventHandler, EventSpec, list, function, BaseVar]
  410. ] = None,
  411. on_mouse_out: Optional[
  412. Union[EventHandler, EventSpec, list, function, BaseVar]
  413. ] = None,
  414. on_mouse_over: Optional[
  415. Union[EventHandler, EventSpec, list, function, BaseVar]
  416. ] = None,
  417. on_mouse_up: Optional[
  418. Union[EventHandler, EventSpec, list, function, BaseVar]
  419. ] = None,
  420. on_scroll: Optional[
  421. Union[EventHandler, EventSpec, list, function, BaseVar]
  422. ] = None,
  423. on_unmount: Optional[
  424. Union[EventHandler, EventSpec, list, function, BaseVar]
  425. ] = None,
  426. **props
  427. ) -> "SliderMark":
  428. """Create the component.
  429. Args:
  430. *children: The children of the component.
  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. ...