slider.pyi 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  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, Literal, Optional, Sequence, 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: Var[bool] | bool | None = None,
  20. style: Style | None = None,
  21. key: Any | None = None,
  22. id: Any | None = None,
  23. class_name: Any | None = None,
  24. autofocus: bool | None = None,
  25. custom_attrs: dict[str, Var | Any] | None = 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: Sequence[int] | Var[Sequence[int]] | None = None,
  67. value: Sequence[int] | Var[Sequence[int]] | None = None,
  68. name: Var[str] | str | None = None,
  69. disabled: Var[bool] | bool | None = None,
  70. orientation: Literal["horizontal", "vertical"]
  71. | Var[Literal["horizontal", "vertical"]]
  72. | None = None,
  73. dir: Literal["ltr", "rtl"] | Var[Literal["ltr", "rtl"]] | None = None,
  74. inverted: Var[bool] | bool | None = None,
  75. min: Var[int] | int | None = None,
  76. max: Var[int] | int | None = None,
  77. step: Var[int] | int | None = None,
  78. min_steps_between_thumbs: Var[int] | int | None = None,
  79. as_child: Var[bool] | bool | None = None,
  80. style: Style | None = None,
  81. key: Any | None = None,
  82. id: Any | None = None,
  83. class_name: Any | None = None,
  84. autofocus: bool | None = None,
  85. custom_attrs: dict[str, Var | Any] | None = None,
  86. on_blur: Optional[EventType[()]] = None,
  87. on_click: Optional[EventType[()]] = None,
  88. on_context_menu: Optional[EventType[()]] = None,
  89. on_double_click: Optional[EventType[()]] = None,
  90. on_focus: Optional[EventType[()]] = None,
  91. on_mount: Optional[EventType[()]] = None,
  92. on_mouse_down: Optional[EventType[()]] = None,
  93. on_mouse_enter: Optional[EventType[()]] = None,
  94. on_mouse_leave: Optional[EventType[()]] = None,
  95. on_mouse_move: Optional[EventType[()]] = None,
  96. on_mouse_out: Optional[EventType[()]] = None,
  97. on_mouse_over: Optional[EventType[()]] = None,
  98. on_mouse_up: Optional[EventType[()]] = None,
  99. on_scroll: Optional[EventType[()]] = None,
  100. on_unmount: Optional[EventType[()]] = None,
  101. on_value_change: Optional[EventType[()] | EventType[list[int]]] = None,
  102. on_value_commit: Optional[EventType[()] | EventType[list[int]]] = None,
  103. **props,
  104. ) -> "SliderRoot":
  105. """Create the component.
  106. Args:
  107. *children: The children of the component.
  108. on_value_change: Fired when the value of a thumb changes.
  109. on_value_commit: Fired when a thumb is released.
  110. as_child: Change the default rendered element for the one passed as a child.
  111. style: The style of the component.
  112. key: A unique key for the component.
  113. id: The id for the component.
  114. class_name: The class name for the component.
  115. autofocus: Whether the component should take the focus once the page is loaded
  116. custom_attrs: custom attribute
  117. **props: The props of the component.
  118. Returns:
  119. The component.
  120. """
  121. ...
  122. class SliderTrack(SliderComponent):
  123. def add_style(self) -> dict[str, Any] | None: ...
  124. @overload
  125. @classmethod
  126. def create( # type: ignore
  127. cls,
  128. *children,
  129. as_child: Var[bool] | bool | None = None,
  130. style: Style | None = None,
  131. key: Any | None = None,
  132. id: Any | None = None,
  133. class_name: Any | None = None,
  134. autofocus: bool | None = None,
  135. custom_attrs: dict[str, Var | Any] | None = None,
  136. on_blur: Optional[EventType[()]] = None,
  137. on_click: Optional[EventType[()]] = None,
  138. on_context_menu: Optional[EventType[()]] = None,
  139. on_double_click: Optional[EventType[()]] = None,
  140. on_focus: Optional[EventType[()]] = None,
  141. on_mount: Optional[EventType[()]] = None,
  142. on_mouse_down: Optional[EventType[()]] = None,
  143. on_mouse_enter: Optional[EventType[()]] = None,
  144. on_mouse_leave: Optional[EventType[()]] = None,
  145. on_mouse_move: Optional[EventType[()]] = None,
  146. on_mouse_out: Optional[EventType[()]] = None,
  147. on_mouse_over: Optional[EventType[()]] = None,
  148. on_mouse_up: Optional[EventType[()]] = None,
  149. on_scroll: Optional[EventType[()]] = None,
  150. on_unmount: Optional[EventType[()]] = None,
  151. **props,
  152. ) -> "SliderTrack":
  153. """Create the component.
  154. Args:
  155. *children: The children of the component.
  156. as_child: Change the default rendered element for the one passed as a child.
  157. style: The style of the component.
  158. key: A unique key for the component.
  159. id: The id for the component.
  160. class_name: The class name for the component.
  161. autofocus: Whether the component should take the focus once the page is loaded
  162. custom_attrs: custom attribute
  163. **props: The props of the component.
  164. Returns:
  165. The component.
  166. """
  167. ...
  168. class SliderRange(SliderComponent):
  169. def add_style(self) -> dict[str, Any] | None: ...
  170. @overload
  171. @classmethod
  172. def create( # type: ignore
  173. cls,
  174. *children,
  175. as_child: Var[bool] | bool | None = None,
  176. style: Style | None = None,
  177. key: Any | None = None,
  178. id: Any | None = None,
  179. class_name: Any | None = None,
  180. autofocus: bool | None = None,
  181. custom_attrs: dict[str, Var | Any] | None = None,
  182. on_blur: Optional[EventType[()]] = None,
  183. on_click: Optional[EventType[()]] = None,
  184. on_context_menu: Optional[EventType[()]] = None,
  185. on_double_click: Optional[EventType[()]] = None,
  186. on_focus: Optional[EventType[()]] = None,
  187. on_mount: Optional[EventType[()]] = None,
  188. on_mouse_down: Optional[EventType[()]] = None,
  189. on_mouse_enter: Optional[EventType[()]] = None,
  190. on_mouse_leave: Optional[EventType[()]] = None,
  191. on_mouse_move: Optional[EventType[()]] = None,
  192. on_mouse_out: Optional[EventType[()]] = None,
  193. on_mouse_over: Optional[EventType[()]] = None,
  194. on_mouse_up: Optional[EventType[()]] = None,
  195. on_scroll: Optional[EventType[()]] = None,
  196. on_unmount: Optional[EventType[()]] = None,
  197. **props,
  198. ) -> "SliderRange":
  199. """Create the component.
  200. Args:
  201. *children: The children of the component.
  202. as_child: Change the default rendered element for the one passed as a child.
  203. style: The style of the component.
  204. key: A unique key for the component.
  205. id: The id for the component.
  206. class_name: The class name for the component.
  207. autofocus: Whether the component should take the focus once the page is loaded
  208. custom_attrs: custom attribute
  209. **props: The props of the component.
  210. Returns:
  211. The component.
  212. """
  213. ...
  214. class SliderThumb(SliderComponent):
  215. def add_style(self) -> dict[str, Any] | None: ...
  216. @overload
  217. @classmethod
  218. def create( # type: ignore
  219. cls,
  220. *children,
  221. as_child: Var[bool] | bool | None = None,
  222. style: Style | None = None,
  223. key: Any | None = None,
  224. id: Any | None = None,
  225. class_name: Any | None = None,
  226. autofocus: bool | None = None,
  227. custom_attrs: dict[str, Var | Any] | None = None,
  228. on_blur: Optional[EventType[()]] = None,
  229. on_click: Optional[EventType[()]] = None,
  230. on_context_menu: Optional[EventType[()]] = None,
  231. on_double_click: Optional[EventType[()]] = None,
  232. on_focus: Optional[EventType[()]] = None,
  233. on_mount: Optional[EventType[()]] = None,
  234. on_mouse_down: Optional[EventType[()]] = None,
  235. on_mouse_enter: Optional[EventType[()]] = None,
  236. on_mouse_leave: Optional[EventType[()]] = None,
  237. on_mouse_move: Optional[EventType[()]] = None,
  238. on_mouse_out: Optional[EventType[()]] = None,
  239. on_mouse_over: Optional[EventType[()]] = None,
  240. on_mouse_up: Optional[EventType[()]] = None,
  241. on_scroll: Optional[EventType[()]] = None,
  242. on_unmount: Optional[EventType[()]] = None,
  243. **props,
  244. ) -> "SliderThumb":
  245. """Create the component.
  246. Args:
  247. *children: The children of the component.
  248. as_child: Change the default rendered element for the one passed as a child.
  249. style: The style of the component.
  250. key: A unique key for the component.
  251. id: The id for the component.
  252. class_name: The class name for the component.
  253. autofocus: Whether the component should take the focus once the page is loaded
  254. custom_attrs: custom attribute
  255. **props: The props of the component.
  256. Returns:
  257. The component.
  258. """
  259. ...
  260. class Slider(ComponentNamespace):
  261. root = staticmethod(SliderRoot.create)
  262. track = staticmethod(SliderTrack.create)
  263. range = staticmethod(SliderRange.create)
  264. thumb = staticmethod(SliderThumb.create)
  265. @staticmethod
  266. def __call__(**props) -> Component: ...
  267. slider = Slider()