slider.pyi 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. """Stub file for reflex/components/chakra/forms/slider.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 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. """
  214. ...
  215. class SliderFilledTrack(ChakraComponent):
  216. @overload
  217. @classmethod
  218. def create( # type: ignore
  219. cls,
  220. *children,
  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[
  228. Union[EventHandler, EventSpec, list, function, BaseVar]
  229. ] = None,
  230. on_click: Optional[
  231. Union[EventHandler, EventSpec, list, function, BaseVar]
  232. ] = None,
  233. on_context_menu: Optional[
  234. Union[EventHandler, EventSpec, list, function, BaseVar]
  235. ] = None,
  236. on_double_click: Optional[
  237. Union[EventHandler, EventSpec, list, function, BaseVar]
  238. ] = None,
  239. on_focus: Optional[
  240. Union[EventHandler, EventSpec, list, function, BaseVar]
  241. ] = None,
  242. on_mount: Optional[
  243. Union[EventHandler, EventSpec, list, function, BaseVar]
  244. ] = None,
  245. on_mouse_down: Optional[
  246. Union[EventHandler, EventSpec, list, function, BaseVar]
  247. ] = None,
  248. on_mouse_enter: Optional[
  249. Union[EventHandler, EventSpec, list, function, BaseVar]
  250. ] = None,
  251. on_mouse_leave: Optional[
  252. Union[EventHandler, EventSpec, list, function, BaseVar]
  253. ] = None,
  254. on_mouse_move: Optional[
  255. Union[EventHandler, EventSpec, list, function, BaseVar]
  256. ] = None,
  257. on_mouse_out: Optional[
  258. Union[EventHandler, EventSpec, list, function, BaseVar]
  259. ] = None,
  260. on_mouse_over: Optional[
  261. Union[EventHandler, EventSpec, list, function, BaseVar]
  262. ] = None,
  263. on_mouse_up: Optional[
  264. Union[EventHandler, EventSpec, list, function, BaseVar]
  265. ] = None,
  266. on_scroll: Optional[
  267. Union[EventHandler, EventSpec, list, function, BaseVar]
  268. ] = None,
  269. on_unmount: Optional[
  270. Union[EventHandler, EventSpec, list, function, BaseVar]
  271. ] = None,
  272. **props
  273. ) -> "SliderFilledTrack":
  274. """Create the component.
  275. Args:
  276. *children: The children of the component.
  277. style: The style of the component.
  278. key: A unique key for the component.
  279. id: The id for the component.
  280. class_name: The class name for the component.
  281. autofocus: Whether the component should take the focus once the page is loaded
  282. custom_attrs: custom attribute
  283. **props: The props of the component.
  284. Returns:
  285. The component.
  286. """
  287. ...
  288. class SliderThumb(ChakraComponent):
  289. @overload
  290. @classmethod
  291. def create( # type: ignore
  292. cls,
  293. *children,
  294. box_size: Optional[Union[Var[str], str]] = None,
  295. style: Optional[Style] = None,
  296. key: Optional[Any] = None,
  297. id: Optional[Any] = None,
  298. class_name: Optional[Any] = None,
  299. autofocus: Optional[bool] = None,
  300. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  301. on_blur: Optional[
  302. Union[EventHandler, EventSpec, list, function, BaseVar]
  303. ] = None,
  304. on_click: Optional[
  305. Union[EventHandler, EventSpec, list, function, BaseVar]
  306. ] = None,
  307. on_context_menu: Optional[
  308. Union[EventHandler, EventSpec, list, function, BaseVar]
  309. ] = None,
  310. on_double_click: Optional[
  311. Union[EventHandler, EventSpec, list, function, BaseVar]
  312. ] = None,
  313. on_focus: Optional[
  314. Union[EventHandler, EventSpec, list, function, BaseVar]
  315. ] = None,
  316. on_mount: Optional[
  317. Union[EventHandler, EventSpec, list, function, BaseVar]
  318. ] = None,
  319. on_mouse_down: Optional[
  320. Union[EventHandler, EventSpec, list, function, BaseVar]
  321. ] = None,
  322. on_mouse_enter: Optional[
  323. Union[EventHandler, EventSpec, list, function, BaseVar]
  324. ] = None,
  325. on_mouse_leave: Optional[
  326. Union[EventHandler, EventSpec, list, function, BaseVar]
  327. ] = None,
  328. on_mouse_move: Optional[
  329. Union[EventHandler, EventSpec, list, function, BaseVar]
  330. ] = None,
  331. on_mouse_out: Optional[
  332. Union[EventHandler, EventSpec, list, function, BaseVar]
  333. ] = None,
  334. on_mouse_over: Optional[
  335. Union[EventHandler, EventSpec, list, function, BaseVar]
  336. ] = None,
  337. on_mouse_up: Optional[
  338. Union[EventHandler, EventSpec, list, function, BaseVar]
  339. ] = None,
  340. on_scroll: Optional[
  341. Union[EventHandler, EventSpec, list, function, BaseVar]
  342. ] = None,
  343. on_unmount: Optional[
  344. Union[EventHandler, EventSpec, list, function, BaseVar]
  345. ] = None,
  346. **props
  347. ) -> "SliderThumb":
  348. """Create the component.
  349. Args:
  350. *children: The children of the component.
  351. box_size: The size of the thumb.
  352. style: The style of the component.
  353. key: A unique key for the component.
  354. id: The id for the component.
  355. class_name: The class name for the component.
  356. autofocus: Whether the component should take the focus once the page is loaded
  357. custom_attrs: custom attribute
  358. **props: The props of the component.
  359. Returns:
  360. The component.
  361. """
  362. ...
  363. class SliderMark(ChakraComponent):
  364. @overload
  365. @classmethod
  366. def create( # type: ignore
  367. cls,
  368. *children,
  369. style: Optional[Style] = None,
  370. key: Optional[Any] = None,
  371. id: Optional[Any] = None,
  372. class_name: Optional[Any] = None,
  373. autofocus: Optional[bool] = None,
  374. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  375. on_blur: Optional[
  376. Union[EventHandler, EventSpec, list, function, BaseVar]
  377. ] = None,
  378. on_click: Optional[
  379. Union[EventHandler, EventSpec, list, function, BaseVar]
  380. ] = None,
  381. on_context_menu: Optional[
  382. Union[EventHandler, EventSpec, list, function, BaseVar]
  383. ] = None,
  384. on_double_click: Optional[
  385. Union[EventHandler, EventSpec, list, function, BaseVar]
  386. ] = None,
  387. on_focus: Optional[
  388. Union[EventHandler, EventSpec, list, function, BaseVar]
  389. ] = None,
  390. on_mount: Optional[
  391. Union[EventHandler, EventSpec, list, function, BaseVar]
  392. ] = None,
  393. on_mouse_down: Optional[
  394. Union[EventHandler, EventSpec, list, function, BaseVar]
  395. ] = None,
  396. on_mouse_enter: Optional[
  397. Union[EventHandler, EventSpec, list, function, BaseVar]
  398. ] = None,
  399. on_mouse_leave: Optional[
  400. Union[EventHandler, EventSpec, list, function, BaseVar]
  401. ] = None,
  402. on_mouse_move: Optional[
  403. Union[EventHandler, EventSpec, list, function, BaseVar]
  404. ] = None,
  405. on_mouse_out: Optional[
  406. Union[EventHandler, EventSpec, list, function, BaseVar]
  407. ] = None,
  408. on_mouse_over: Optional[
  409. Union[EventHandler, EventSpec, list, function, BaseVar]
  410. ] = None,
  411. on_mouse_up: Optional[
  412. Union[EventHandler, EventSpec, list, function, BaseVar]
  413. ] = None,
  414. on_scroll: Optional[
  415. Union[EventHandler, EventSpec, list, function, BaseVar]
  416. ] = None,
  417. on_unmount: Optional[
  418. Union[EventHandler, EventSpec, list, function, BaseVar]
  419. ] = None,
  420. **props
  421. ) -> "SliderMark":
  422. """Create the component.
  423. Args:
  424. *children: The children of the component.
  425. style: The style of the component.
  426. key: A unique key for the component.
  427. id: The id for the component.
  428. class_name: The class name for the component.
  429. autofocus: Whether the component should take the focus once the page is loaded
  430. custom_attrs: custom attribute
  431. **props: The props of the component.
  432. Returns:
  433. The component.
  434. """
  435. ...