slider.pyi 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. """Stub file for reflex/components/radix/primitives/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, Dict, List, Literal
  10. from reflex.components.component import Component
  11. from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
  12. from reflex.style import Style
  13. from reflex.vars import Var
  14. LiteralSliderOrientation = Literal["horizontal", "vertical"]
  15. LiteralSliderDir = Literal["ltr", "rtl"]
  16. class SliderComponent(RadixPrimitiveComponentWithClassName):
  17. @overload
  18. @classmethod
  19. def create( # type: ignore
  20. cls,
  21. *children,
  22. as_child: Optional[Union[Var[bool], bool]] = None,
  23. style: Optional[Style] = None,
  24. key: Optional[Any] = None,
  25. id: Optional[Any] = None,
  26. class_name: Optional[Any] = None,
  27. autofocus: Optional[bool] = None,
  28. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  29. on_blur: Optional[
  30. Union[EventHandler, EventSpec, list, function, BaseVar]
  31. ] = None,
  32. on_click: Optional[
  33. Union[EventHandler, EventSpec, list, function, BaseVar]
  34. ] = None,
  35. on_context_menu: Optional[
  36. Union[EventHandler, EventSpec, list, function, BaseVar]
  37. ] = None,
  38. on_double_click: Optional[
  39. Union[EventHandler, EventSpec, list, function, BaseVar]
  40. ] = None,
  41. on_focus: Optional[
  42. Union[EventHandler, EventSpec, list, function, BaseVar]
  43. ] = None,
  44. on_mount: Optional[
  45. Union[EventHandler, EventSpec, list, function, BaseVar]
  46. ] = None,
  47. on_mouse_down: Optional[
  48. Union[EventHandler, EventSpec, list, function, BaseVar]
  49. ] = None,
  50. on_mouse_enter: Optional[
  51. Union[EventHandler, EventSpec, list, function, BaseVar]
  52. ] = None,
  53. on_mouse_leave: Optional[
  54. Union[EventHandler, EventSpec, list, function, BaseVar]
  55. ] = None,
  56. on_mouse_move: Optional[
  57. Union[EventHandler, EventSpec, list, function, BaseVar]
  58. ] = None,
  59. on_mouse_out: Optional[
  60. Union[EventHandler, EventSpec, list, function, BaseVar]
  61. ] = None,
  62. on_mouse_over: Optional[
  63. Union[EventHandler, EventSpec, list, function, BaseVar]
  64. ] = None,
  65. on_mouse_up: Optional[
  66. Union[EventHandler, EventSpec, list, function, BaseVar]
  67. ] = None,
  68. on_scroll: Optional[
  69. Union[EventHandler, EventSpec, list, function, BaseVar]
  70. ] = None,
  71. on_unmount: Optional[
  72. Union[EventHandler, EventSpec, list, function, BaseVar]
  73. ] = None,
  74. **props
  75. ) -> "SliderComponent":
  76. """Create the component.
  77. Args:
  78. *children: The children of the component.
  79. as_child: Change the default rendered element for the one passed as a child.
  80. style: The style of the component.
  81. key: A unique key for the component.
  82. id: The id for the component.
  83. class_name: The class name for the component.
  84. autofocus: Whether the component should take the focus once the page is loaded
  85. custom_attrs: custom attribute
  86. **props: The props of the component.
  87. Returns:
  88. The component.
  89. Raises:
  90. TypeError: If an invalid child is passed.
  91. """
  92. ...
  93. class SliderRoot(SliderComponent):
  94. def get_event_triggers(self) -> Dict[str, Any]: ...
  95. @overload
  96. @classmethod
  97. def create( # type: ignore
  98. cls,
  99. *children,
  100. default_value: Optional[Union[Var[List[int]], List[int]]] = None,
  101. value: Optional[Union[Var[List[int]], List[int]]] = None,
  102. name: Optional[Union[Var[str], str]] = None,
  103. disabled: Optional[Union[Var[bool], bool]] = None,
  104. orientation: Optional[
  105. Union[
  106. Var[Literal["horizontal", "vertical"]],
  107. Literal["horizontal", "vertical"],
  108. ]
  109. ] = None,
  110. dir: Optional[Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]] = None,
  111. inverted: Optional[Union[Var[bool], bool]] = None,
  112. min: Optional[Union[Var[int], int]] = None,
  113. max: Optional[Union[Var[int], int]] = None,
  114. step: Optional[Union[Var[int], int]] = None,
  115. min_steps_between_thumbs: Optional[Union[Var[int], int]] = None,
  116. as_child: Optional[Union[Var[bool], bool]] = None,
  117. style: Optional[Style] = None,
  118. key: Optional[Any] = None,
  119. id: Optional[Any] = None,
  120. class_name: Optional[Any] = None,
  121. autofocus: Optional[bool] = None,
  122. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  123. on_blur: Optional[
  124. Union[EventHandler, EventSpec, list, function, BaseVar]
  125. ] = None,
  126. on_click: Optional[
  127. Union[EventHandler, EventSpec, list, function, BaseVar]
  128. ] = None,
  129. on_context_menu: Optional[
  130. Union[EventHandler, EventSpec, list, function, BaseVar]
  131. ] = None,
  132. on_double_click: Optional[
  133. Union[EventHandler, EventSpec, list, function, BaseVar]
  134. ] = None,
  135. on_focus: Optional[
  136. Union[EventHandler, EventSpec, list, function, BaseVar]
  137. ] = None,
  138. on_mount: Optional[
  139. Union[EventHandler, EventSpec, list, function, BaseVar]
  140. ] = None,
  141. on_mouse_down: Optional[
  142. Union[EventHandler, EventSpec, list, function, BaseVar]
  143. ] = None,
  144. on_mouse_enter: Optional[
  145. Union[EventHandler, EventSpec, list, function, BaseVar]
  146. ] = None,
  147. on_mouse_leave: Optional[
  148. Union[EventHandler, EventSpec, list, function, BaseVar]
  149. ] = None,
  150. on_mouse_move: Optional[
  151. Union[EventHandler, EventSpec, list, function, BaseVar]
  152. ] = None,
  153. on_mouse_out: Optional[
  154. Union[EventHandler, EventSpec, list, function, BaseVar]
  155. ] = None,
  156. on_mouse_over: Optional[
  157. Union[EventHandler, EventSpec, list, function, BaseVar]
  158. ] = None,
  159. on_mouse_up: Optional[
  160. Union[EventHandler, EventSpec, list, function, BaseVar]
  161. ] = None,
  162. on_scroll: Optional[
  163. Union[EventHandler, EventSpec, list, function, BaseVar]
  164. ] = None,
  165. on_unmount: Optional[
  166. Union[EventHandler, EventSpec, list, function, BaseVar]
  167. ] = None,
  168. on_value_change: Optional[
  169. Union[EventHandler, EventSpec, list, function, BaseVar]
  170. ] = None,
  171. on_value_commit: Optional[
  172. Union[EventHandler, EventSpec, list, function, BaseVar]
  173. ] = None,
  174. **props
  175. ) -> "SliderRoot":
  176. """Create the component.
  177. Args:
  178. *children: The children of the component.
  179. as_child: Change the default rendered element for the one passed as a child.
  180. style: The style of the component.
  181. key: A unique key for the component.
  182. id: The id for the component.
  183. class_name: The class name for the component.
  184. autofocus: Whether the component should take the focus once the page is loaded
  185. custom_attrs: custom attribute
  186. **props: The props of the component.
  187. Returns:
  188. The component.
  189. Raises:
  190. TypeError: If an invalid child is passed.
  191. """
  192. ...
  193. class SliderTrack(SliderComponent):
  194. @overload
  195. @classmethod
  196. def create( # type: ignore
  197. cls,
  198. *children,
  199. as_child: Optional[Union[Var[bool], bool]] = None,
  200. style: Optional[Style] = None,
  201. key: Optional[Any] = None,
  202. id: Optional[Any] = None,
  203. class_name: Optional[Any] = None,
  204. autofocus: Optional[bool] = None,
  205. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  206. on_blur: Optional[
  207. Union[EventHandler, EventSpec, list, function, BaseVar]
  208. ] = None,
  209. on_click: Optional[
  210. Union[EventHandler, EventSpec, list, function, BaseVar]
  211. ] = None,
  212. on_context_menu: Optional[
  213. Union[EventHandler, EventSpec, list, function, BaseVar]
  214. ] = None,
  215. on_double_click: Optional[
  216. Union[EventHandler, EventSpec, list, function, BaseVar]
  217. ] = None,
  218. on_focus: Optional[
  219. Union[EventHandler, EventSpec, list, function, BaseVar]
  220. ] = None,
  221. on_mount: Optional[
  222. Union[EventHandler, EventSpec, list, function, BaseVar]
  223. ] = None,
  224. on_mouse_down: Optional[
  225. Union[EventHandler, EventSpec, list, function, BaseVar]
  226. ] = None,
  227. on_mouse_enter: Optional[
  228. Union[EventHandler, EventSpec, list, function, BaseVar]
  229. ] = None,
  230. on_mouse_leave: Optional[
  231. Union[EventHandler, EventSpec, list, function, BaseVar]
  232. ] = None,
  233. on_mouse_move: Optional[
  234. Union[EventHandler, EventSpec, list, function, BaseVar]
  235. ] = None,
  236. on_mouse_out: Optional[
  237. Union[EventHandler, EventSpec, list, function, BaseVar]
  238. ] = None,
  239. on_mouse_over: Optional[
  240. Union[EventHandler, EventSpec, list, function, BaseVar]
  241. ] = None,
  242. on_mouse_up: Optional[
  243. Union[EventHandler, EventSpec, list, function, BaseVar]
  244. ] = None,
  245. on_scroll: Optional[
  246. Union[EventHandler, EventSpec, list, function, BaseVar]
  247. ] = None,
  248. on_unmount: Optional[
  249. Union[EventHandler, EventSpec, list, function, BaseVar]
  250. ] = None,
  251. **props
  252. ) -> "SliderTrack":
  253. """Create the component.
  254. Args:
  255. *children: The children of the component.
  256. as_child: Change the default rendered element for the one passed as a child.
  257. style: The style of the component.
  258. key: A unique key for the component.
  259. id: The id for the component.
  260. class_name: The class name for the component.
  261. autofocus: Whether the component should take the focus once the page is loaded
  262. custom_attrs: custom attribute
  263. **props: The props of the component.
  264. Returns:
  265. The component.
  266. Raises:
  267. TypeError: If an invalid child is passed.
  268. """
  269. ...
  270. class SliderRange(SliderComponent):
  271. @overload
  272. @classmethod
  273. def create( # type: ignore
  274. cls,
  275. *children,
  276. as_child: Optional[Union[Var[bool], bool]] = None,
  277. style: Optional[Style] = None,
  278. key: Optional[Any] = None,
  279. id: Optional[Any] = None,
  280. class_name: Optional[Any] = None,
  281. autofocus: Optional[bool] = None,
  282. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  283. on_blur: Optional[
  284. Union[EventHandler, EventSpec, list, function, BaseVar]
  285. ] = None,
  286. on_click: Optional[
  287. Union[EventHandler, EventSpec, list, function, BaseVar]
  288. ] = None,
  289. on_context_menu: Optional[
  290. Union[EventHandler, EventSpec, list, function, BaseVar]
  291. ] = None,
  292. on_double_click: Optional[
  293. Union[EventHandler, EventSpec, list, function, BaseVar]
  294. ] = None,
  295. on_focus: Optional[
  296. Union[EventHandler, EventSpec, list, function, BaseVar]
  297. ] = None,
  298. on_mount: Optional[
  299. Union[EventHandler, EventSpec, list, function, BaseVar]
  300. ] = None,
  301. on_mouse_down: Optional[
  302. Union[EventHandler, EventSpec, list, function, BaseVar]
  303. ] = None,
  304. on_mouse_enter: Optional[
  305. Union[EventHandler, EventSpec, list, function, BaseVar]
  306. ] = None,
  307. on_mouse_leave: Optional[
  308. Union[EventHandler, EventSpec, list, function, BaseVar]
  309. ] = None,
  310. on_mouse_move: Optional[
  311. Union[EventHandler, EventSpec, list, function, BaseVar]
  312. ] = None,
  313. on_mouse_out: Optional[
  314. Union[EventHandler, EventSpec, list, function, BaseVar]
  315. ] = None,
  316. on_mouse_over: Optional[
  317. Union[EventHandler, EventSpec, list, function, BaseVar]
  318. ] = None,
  319. on_mouse_up: Optional[
  320. Union[EventHandler, EventSpec, list, function, BaseVar]
  321. ] = None,
  322. on_scroll: Optional[
  323. Union[EventHandler, EventSpec, list, function, BaseVar]
  324. ] = None,
  325. on_unmount: Optional[
  326. Union[EventHandler, EventSpec, list, function, BaseVar]
  327. ] = None,
  328. **props
  329. ) -> "SliderRange":
  330. """Create the component.
  331. Args:
  332. *children: The children of the component.
  333. as_child: Change the default rendered element for the one passed as a child.
  334. style: The style of the component.
  335. key: A unique key for the component.
  336. id: The id for the component.
  337. class_name: The class name for the component.
  338. autofocus: Whether the component should take the focus once the page is loaded
  339. custom_attrs: custom attribute
  340. **props: The props of the component.
  341. Returns:
  342. The component.
  343. Raises:
  344. TypeError: If an invalid child is passed.
  345. """
  346. ...
  347. class SliderThumb(SliderComponent):
  348. @overload
  349. @classmethod
  350. def create( # type: ignore
  351. cls,
  352. *children,
  353. as_child: Optional[Union[Var[bool], bool]] = None,
  354. style: Optional[Style] = None,
  355. key: Optional[Any] = None,
  356. id: Optional[Any] = None,
  357. class_name: Optional[Any] = None,
  358. autofocus: Optional[bool] = None,
  359. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  360. on_blur: Optional[
  361. Union[EventHandler, EventSpec, list, function, BaseVar]
  362. ] = None,
  363. on_click: Optional[
  364. Union[EventHandler, EventSpec, list, function, BaseVar]
  365. ] = None,
  366. on_context_menu: Optional[
  367. Union[EventHandler, EventSpec, list, function, BaseVar]
  368. ] = None,
  369. on_double_click: Optional[
  370. Union[EventHandler, EventSpec, list, function, BaseVar]
  371. ] = None,
  372. on_focus: Optional[
  373. Union[EventHandler, EventSpec, list, function, BaseVar]
  374. ] = None,
  375. on_mount: Optional[
  376. Union[EventHandler, EventSpec, list, function, BaseVar]
  377. ] = None,
  378. on_mouse_down: Optional[
  379. Union[EventHandler, EventSpec, list, function, BaseVar]
  380. ] = None,
  381. on_mouse_enter: Optional[
  382. Union[EventHandler, EventSpec, list, function, BaseVar]
  383. ] = None,
  384. on_mouse_leave: Optional[
  385. Union[EventHandler, EventSpec, list, function, BaseVar]
  386. ] = None,
  387. on_mouse_move: Optional[
  388. Union[EventHandler, EventSpec, list, function, BaseVar]
  389. ] = None,
  390. on_mouse_out: Optional[
  391. Union[EventHandler, EventSpec, list, function, BaseVar]
  392. ] = None,
  393. on_mouse_over: Optional[
  394. Union[EventHandler, EventSpec, list, function, BaseVar]
  395. ] = None,
  396. on_mouse_up: Optional[
  397. Union[EventHandler, EventSpec, list, function, BaseVar]
  398. ] = None,
  399. on_scroll: Optional[
  400. Union[EventHandler, EventSpec, list, function, BaseVar]
  401. ] = None,
  402. on_unmount: Optional[
  403. Union[EventHandler, EventSpec, list, function, BaseVar]
  404. ] = None,
  405. **props
  406. ) -> "SliderThumb":
  407. """Create the component.
  408. Args:
  409. *children: The children of the component.
  410. as_child: Change the default rendered element for the one passed as a child.
  411. style: The style of the component.
  412. key: A unique key for the component.
  413. id: The id for the component.
  414. class_name: The class name for the component.
  415. autofocus: Whether the component should take the focus once the page is loaded
  416. custom_attrs: custom attribute
  417. **props: The props of the component.
  418. Returns:
  419. The component.
  420. Raises:
  421. TypeError: If an invalid child is passed.
  422. """
  423. ...
  424. slider_root = SliderRoot.create
  425. slider_track = SliderTrack.create
  426. slider_range = SliderRange.create
  427. slider_thumb = SliderThumb.create
  428. def slider(**props) -> Component: ...