slider.pyi 17 KB

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