slider.pyi 17 KB

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