slider.pyi 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  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, Dict, List, Literal, Optional, Tuple, Union, overload
  6. from reflex.components.component import Component, ComponentNamespace
  7. from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
  8. from reflex.event import EventType
  9. from reflex.style import Style
  10. from reflex.vars.base import Var
  11. LiteralSliderOrientation = Literal["horizontal", "vertical"]
  12. LiteralSliderDir = Literal["ltr", "rtl"]
  13. class SliderComponent(RadixPrimitiveComponentWithClassName):
  14. @overload
  15. @classmethod
  16. def create( # type: ignore
  17. cls,
  18. *children,
  19. as_child: Optional[Union[Var[bool], bool]] = None,
  20. style: Optional[Style] = None,
  21. key: Optional[Any] = None,
  22. id: Optional[Any] = None,
  23. class_name: Optional[Any] = None,
  24. autofocus: Optional[bool] = None,
  25. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  26. on_blur: Optional[EventType[()]] = None,
  27. on_click: Optional[EventType[()]] = None,
  28. on_context_menu: Optional[EventType[()]] = None,
  29. on_double_click: Optional[EventType[()]] = None,
  30. on_focus: Optional[EventType[()]] = None,
  31. on_mount: Optional[EventType[()]] = None,
  32. on_mouse_down: Optional[EventType[()]] = None,
  33. on_mouse_enter: Optional[EventType[()]] = None,
  34. on_mouse_leave: Optional[EventType[()]] = None,
  35. on_mouse_move: Optional[EventType[()]] = None,
  36. on_mouse_out: Optional[EventType[()]] = None,
  37. on_mouse_over: Optional[EventType[()]] = None,
  38. on_mouse_up: Optional[EventType[()]] = None,
  39. on_scroll: Optional[EventType[()]] = None,
  40. on_unmount: Optional[EventType[()]] = None,
  41. **props,
  42. ) -> "SliderComponent":
  43. """Create the component.
  44. Args:
  45. *children: The children of the component.
  46. as_child: Change the default rendered element for the one passed as a child.
  47. style: The style of the component.
  48. key: A unique key for the component.
  49. id: The id for the component.
  50. class_name: The class name for the component.
  51. autofocus: Whether the component should take the focus once the page is loaded
  52. custom_attrs: custom attribute
  53. **props: The props of the component.
  54. Returns:
  55. The component.
  56. """
  57. ...
  58. def on_value_event_spec(value: Var[List[int]]) -> Tuple[Var[List[int]]]: ...
  59. class SliderRoot(SliderComponent):
  60. def add_style(self) -> dict[str, Any] | None: ...
  61. @overload
  62. @classmethod
  63. def create( # type: ignore
  64. cls,
  65. *children,
  66. default_value: Optional[Union[List[int], Var[List[int]]]] = None,
  67. value: Optional[Union[List[int], Var[List[int]]]] = None,
  68. name: Optional[Union[Var[str], str]] = None,
  69. disabled: Optional[Union[Var[bool], bool]] = None,
  70. orientation: Optional[
  71. Union[
  72. Literal["horizontal", "vertical"],
  73. Var[Literal["horizontal", "vertical"]],
  74. ]
  75. ] = None,
  76. dir: Optional[Union[Literal["ltr", "rtl"], Var[Literal["ltr", "rtl"]]]] = None,
  77. inverted: Optional[Union[Var[bool], bool]] = None,
  78. min: Optional[Union[Var[int], int]] = None,
  79. max: Optional[Union[Var[int], int]] = None,
  80. step: Optional[Union[Var[int], int]] = None,
  81. min_steps_between_thumbs: Optional[Union[Var[int], int]] = None,
  82. as_child: Optional[Union[Var[bool], bool]] = None,
  83. style: Optional[Style] = None,
  84. key: Optional[Any] = None,
  85. id: Optional[Any] = None,
  86. class_name: Optional[Any] = None,
  87. autofocus: Optional[bool] = None,
  88. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  89. on_blur: Optional[EventType[()]] = None,
  90. on_click: Optional[EventType[()]] = None,
  91. on_context_menu: Optional[EventType[()]] = None,
  92. on_double_click: Optional[EventType[()]] = None,
  93. on_focus: Optional[EventType[()]] = None,
  94. on_mount: Optional[EventType[()]] = None,
  95. on_mouse_down: Optional[EventType[()]] = None,
  96. on_mouse_enter: Optional[EventType[()]] = None,
  97. on_mouse_leave: Optional[EventType[()]] = None,
  98. on_mouse_move: Optional[EventType[()]] = None,
  99. on_mouse_out: Optional[EventType[()]] = None,
  100. on_mouse_over: Optional[EventType[()]] = None,
  101. on_mouse_up: Optional[EventType[()]] = None,
  102. on_scroll: Optional[EventType[()]] = None,
  103. on_unmount: Optional[EventType[()]] = None,
  104. on_value_change: Optional[Union[EventType[()], EventType[List[int]]]] = None,
  105. on_value_commit: Optional[Union[EventType[()], EventType[List[int]]]] = None,
  106. **props,
  107. ) -> "SliderRoot":
  108. """Create the component.
  109. Args:
  110. *children: The children of the component.
  111. on_value_change: Fired when the value of a thumb changes.
  112. on_value_commit: Fired when a thumb is released.
  113. as_child: Change the default rendered element for the one passed as a child.
  114. style: The style of the component.
  115. key: A unique key for the component.
  116. id: The id for the component.
  117. class_name: The class name for the component.
  118. autofocus: Whether the component should take the focus once the page is loaded
  119. custom_attrs: custom attribute
  120. **props: The props of the component.
  121. Returns:
  122. The component.
  123. """
  124. ...
  125. class SliderTrack(SliderComponent):
  126. def add_style(self) -> dict[str, Any] | None: ...
  127. @overload
  128. @classmethod
  129. def create( # type: ignore
  130. cls,
  131. *children,
  132. as_child: Optional[Union[Var[bool], bool]] = None,
  133. style: Optional[Style] = None,
  134. key: Optional[Any] = None,
  135. id: Optional[Any] = None,
  136. class_name: Optional[Any] = None,
  137. autofocus: Optional[bool] = None,
  138. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  139. on_blur: Optional[EventType[()]] = None,
  140. on_click: Optional[EventType[()]] = None,
  141. on_context_menu: Optional[EventType[()]] = None,
  142. on_double_click: Optional[EventType[()]] = None,
  143. on_focus: Optional[EventType[()]] = None,
  144. on_mount: Optional[EventType[()]] = None,
  145. on_mouse_down: Optional[EventType[()]] = None,
  146. on_mouse_enter: Optional[EventType[()]] = None,
  147. on_mouse_leave: Optional[EventType[()]] = None,
  148. on_mouse_move: Optional[EventType[()]] = None,
  149. on_mouse_out: Optional[EventType[()]] = None,
  150. on_mouse_over: Optional[EventType[()]] = None,
  151. on_mouse_up: Optional[EventType[()]] = None,
  152. on_scroll: Optional[EventType[()]] = None,
  153. on_unmount: Optional[EventType[()]] = None,
  154. **props,
  155. ) -> "SliderTrack":
  156. """Create the component.
  157. Args:
  158. *children: The children of the component.
  159. as_child: Change the default rendered element for the one passed as a child.
  160. style: The style of the component.
  161. key: A unique key for the component.
  162. id: The id for the component.
  163. class_name: The class name for the component.
  164. autofocus: Whether the component should take the focus once the page is loaded
  165. custom_attrs: custom attribute
  166. **props: The props of the component.
  167. Returns:
  168. The component.
  169. """
  170. ...
  171. class SliderRange(SliderComponent):
  172. def add_style(self) -> dict[str, Any] | None: ...
  173. @overload
  174. @classmethod
  175. def create( # type: ignore
  176. cls,
  177. *children,
  178. as_child: Optional[Union[Var[bool], bool]] = None,
  179. style: Optional[Style] = None,
  180. key: Optional[Any] = None,
  181. id: Optional[Any] = None,
  182. class_name: Optional[Any] = None,
  183. autofocus: Optional[bool] = None,
  184. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  185. on_blur: Optional[EventType[()]] = None,
  186. on_click: Optional[EventType[()]] = None,
  187. on_context_menu: Optional[EventType[()]] = None,
  188. on_double_click: Optional[EventType[()]] = None,
  189. on_focus: Optional[EventType[()]] = None,
  190. on_mount: Optional[EventType[()]] = None,
  191. on_mouse_down: Optional[EventType[()]] = None,
  192. on_mouse_enter: Optional[EventType[()]] = None,
  193. on_mouse_leave: Optional[EventType[()]] = None,
  194. on_mouse_move: Optional[EventType[()]] = None,
  195. on_mouse_out: Optional[EventType[()]] = None,
  196. on_mouse_over: Optional[EventType[()]] = None,
  197. on_mouse_up: Optional[EventType[()]] = None,
  198. on_scroll: Optional[EventType[()]] = None,
  199. on_unmount: Optional[EventType[()]] = None,
  200. **props,
  201. ) -> "SliderRange":
  202. """Create the component.
  203. Args:
  204. *children: The children of the component.
  205. as_child: Change the default rendered element for the one passed as a child.
  206. style: The style of the component.
  207. key: A unique key for the component.
  208. id: The id for the component.
  209. class_name: The class name for the component.
  210. autofocus: Whether the component should take the focus once the page is loaded
  211. custom_attrs: custom attribute
  212. **props: The props of the component.
  213. Returns:
  214. The component.
  215. """
  216. ...
  217. class SliderThumb(SliderComponent):
  218. def add_style(self) -> dict[str, Any] | None: ...
  219. @overload
  220. @classmethod
  221. def create( # type: ignore
  222. cls,
  223. *children,
  224. as_child: Optional[Union[Var[bool], bool]] = None,
  225. style: Optional[Style] = None,
  226. key: Optional[Any] = None,
  227. id: Optional[Any] = None,
  228. class_name: Optional[Any] = None,
  229. autofocus: Optional[bool] = None,
  230. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  231. on_blur: Optional[EventType[()]] = None,
  232. on_click: Optional[EventType[()]] = None,
  233. on_context_menu: Optional[EventType[()]] = None,
  234. on_double_click: Optional[EventType[()]] = None,
  235. on_focus: Optional[EventType[()]] = None,
  236. on_mount: Optional[EventType[()]] = None,
  237. on_mouse_down: Optional[EventType[()]] = None,
  238. on_mouse_enter: Optional[EventType[()]] = None,
  239. on_mouse_leave: Optional[EventType[()]] = None,
  240. on_mouse_move: Optional[EventType[()]] = None,
  241. on_mouse_out: Optional[EventType[()]] = None,
  242. on_mouse_over: Optional[EventType[()]] = None,
  243. on_mouse_up: Optional[EventType[()]] = None,
  244. on_scroll: Optional[EventType[()]] = None,
  245. on_unmount: Optional[EventType[()]] = None,
  246. **props,
  247. ) -> "SliderThumb":
  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 Slider(ComponentNamespace):
  264. root = staticmethod(SliderRoot.create)
  265. track = staticmethod(SliderTrack.create)
  266. range = staticmethod(SliderRange.create)
  267. thumb = staticmethod(SliderThumb.create)
  268. @staticmethod
  269. def __call__(**props) -> Component: ...
  270. slider = Slider()