numberinput.pyi 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. """Stub file for reflex/components/chakra/forms/numberinput.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/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 numbers import Number
  10. from typing import Any, Dict
  11. from reflex.components.chakra import (
  12. ChakraComponent,
  13. LiteralButtonSize,
  14. LiteralInputVariant,
  15. )
  16. from reflex.components.component import Component
  17. from reflex.constants import EventTriggers
  18. from reflex.vars import Var
  19. class NumberInput(ChakraComponent):
  20. def get_event_triggers(self) -> Dict[str, Any]: ...
  21. @overload
  22. @classmethod
  23. def create( # type: ignore
  24. cls,
  25. *children,
  26. value: Optional[Union[Var[Number], Number]] = None,
  27. allow_mouse_wheel: Optional[Union[Var[bool], bool]] = None,
  28. clamped_value_on_blur: Optional[Union[Var[bool], bool]] = None,
  29. default_value: Optional[Union[Var[Number], Number]] = None,
  30. error_border_color: Optional[Union[Var[str], str]] = None,
  31. focus_border_color: Optional[Union[Var[str], str]] = None,
  32. focus_input_on_change: Optional[Union[Var[bool], bool]] = None,
  33. is_disabled: Optional[Union[Var[bool], bool]] = None,
  34. is_invalid: Optional[Union[Var[bool], bool]] = None,
  35. is_read_only: Optional[Union[Var[bool], bool]] = None,
  36. is_required: Optional[Union[Var[bool], bool]] = None,
  37. is_valid_character: Optional[Union[Var[str], str]] = None,
  38. keep_within_range: Optional[Union[Var[bool], bool]] = None,
  39. max_: Optional[Union[Var[Number], Number]] = None,
  40. min_: Optional[Union[Var[Number], Number]] = None,
  41. variant: Optional[
  42. Union[
  43. Var[Literal["outline", "filled", "flushed", "unstyled"]],
  44. Literal["outline", "filled", "flushed", "unstyled"],
  45. ]
  46. ] = None,
  47. size: Optional[
  48. Union[Var[Literal["sm", "md", "lg", "xs"]], Literal["sm", "md", "lg", "xs"]]
  49. ] = None,
  50. name: Optional[Union[Var[str], str]] = None,
  51. style: Optional[Style] = None,
  52. key: Optional[Any] = None,
  53. id: Optional[Any] = None,
  54. class_name: Optional[Any] = None,
  55. autofocus: Optional[bool] = None,
  56. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  57. on_blur: Optional[
  58. Union[EventHandler, EventSpec, list, function, BaseVar]
  59. ] = None,
  60. on_change: Optional[
  61. Union[EventHandler, EventSpec, list, function, BaseVar]
  62. ] = None,
  63. on_click: Optional[
  64. Union[EventHandler, EventSpec, list, function, BaseVar]
  65. ] = None,
  66. on_context_menu: Optional[
  67. Union[EventHandler, EventSpec, list, function, BaseVar]
  68. ] = None,
  69. on_double_click: Optional[
  70. Union[EventHandler, EventSpec, list, function, BaseVar]
  71. ] = None,
  72. on_focus: Optional[
  73. Union[EventHandler, EventSpec, list, function, BaseVar]
  74. ] = None,
  75. on_mount: Optional[
  76. Union[EventHandler, EventSpec, list, function, BaseVar]
  77. ] = None,
  78. on_mouse_down: Optional[
  79. Union[EventHandler, EventSpec, list, function, BaseVar]
  80. ] = None,
  81. on_mouse_enter: Optional[
  82. Union[EventHandler, EventSpec, list, function, BaseVar]
  83. ] = None,
  84. on_mouse_leave: Optional[
  85. Union[EventHandler, EventSpec, list, function, BaseVar]
  86. ] = None,
  87. on_mouse_move: Optional[
  88. Union[EventHandler, EventSpec, list, function, BaseVar]
  89. ] = None,
  90. on_mouse_out: Optional[
  91. Union[EventHandler, EventSpec, list, function, BaseVar]
  92. ] = None,
  93. on_mouse_over: Optional[
  94. Union[EventHandler, EventSpec, list, function, BaseVar]
  95. ] = None,
  96. on_mouse_up: Optional[
  97. Union[EventHandler, EventSpec, list, function, BaseVar]
  98. ] = None,
  99. on_scroll: Optional[
  100. Union[EventHandler, EventSpec, list, function, BaseVar]
  101. ] = None,
  102. on_unmount: Optional[
  103. Union[EventHandler, EventSpec, list, function, BaseVar]
  104. ] = None,
  105. **props
  106. ) -> "NumberInput":
  107. """Create a number input component.
  108. If no children are provided, a default stepper will be used.
  109. Args:
  110. *children: The children of the component.
  111. value: State var to bind the input.
  112. allow_mouse_wheel: If true, the input's value will change based on mouse wheel.
  113. clamped_value_on_blur: This controls the value update when you blur out of the input. - If true and the value is greater than max, the value will be reset to max - Else, the value remains the same.
  114. default_value: The initial value of the counter. Should be less than max and greater than min
  115. error_border_color: The border color when the input is invalid.
  116. focus_border_color: The border color when the input is focused.
  117. focus_input_on_change: If true, the input will be focused as you increment or decrement the value with the stepper
  118. is_disabled: Hints at the type of data that might be entered by the user. It also determines the type of keyboard shown to the user on mobile devices ("text" | "search" | "none" | "tel" | "url" | "email" | "numeric" | "decimal") input_mode: Var[LiteralInputNumberMode] Whether the input should be disabled.
  119. is_invalid: If true, the input will have `aria-invalid` set to true
  120. is_read_only: If true, the input will be in readonly mode
  121. is_required: Whether the input is required
  122. is_valid_character: Whether the pressed key should be allowed in the input. The default behavior is to allow DOM floating point characters defined by /^[Ee0-9+\\-.]$/
  123. keep_within_range: This controls the value update behavior in general. - If true and you use the stepper or up/down arrow keys, the value will not exceed the max or go lower than min - If false, the value will be allowed to go out of range.
  124. max_: The maximum value of the counter
  125. min_: The minimum value of the counter
  126. variant: "outline" | "filled" | "flushed" | "unstyled"
  127. size: "lg" | "md" | "sm" | "xs"
  128. name: The name of the form field
  129. style: The style of the component.
  130. key: A unique key for the component.
  131. id: The id for the component.
  132. class_name: The class name for the component.
  133. autofocus: Whether the component should take the focus once the page is loaded
  134. custom_attrs: custom attribute
  135. **props: The props of the component.
  136. Returns:
  137. The component.
  138. """
  139. ...
  140. class NumberInputField(ChakraComponent):
  141. @overload
  142. @classmethod
  143. def create( # type: ignore
  144. cls,
  145. *children,
  146. style: Optional[Style] = None,
  147. key: Optional[Any] = None,
  148. id: Optional[Any] = None,
  149. class_name: Optional[Any] = None,
  150. autofocus: Optional[bool] = None,
  151. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  152. on_blur: Optional[
  153. Union[EventHandler, EventSpec, list, function, BaseVar]
  154. ] = None,
  155. on_click: Optional[
  156. Union[EventHandler, EventSpec, list, function, BaseVar]
  157. ] = None,
  158. on_context_menu: Optional[
  159. Union[EventHandler, EventSpec, list, function, BaseVar]
  160. ] = None,
  161. on_double_click: Optional[
  162. Union[EventHandler, EventSpec, list, function, BaseVar]
  163. ] = None,
  164. on_focus: Optional[
  165. Union[EventHandler, EventSpec, list, function, BaseVar]
  166. ] = None,
  167. on_mount: Optional[
  168. Union[EventHandler, EventSpec, list, function, BaseVar]
  169. ] = None,
  170. on_mouse_down: Optional[
  171. Union[EventHandler, EventSpec, list, function, BaseVar]
  172. ] = None,
  173. on_mouse_enter: Optional[
  174. Union[EventHandler, EventSpec, list, function, BaseVar]
  175. ] = None,
  176. on_mouse_leave: Optional[
  177. Union[EventHandler, EventSpec, list, function, BaseVar]
  178. ] = None,
  179. on_mouse_move: Optional[
  180. Union[EventHandler, EventSpec, list, function, BaseVar]
  181. ] = None,
  182. on_mouse_out: Optional[
  183. Union[EventHandler, EventSpec, list, function, BaseVar]
  184. ] = None,
  185. on_mouse_over: Optional[
  186. Union[EventHandler, EventSpec, list, function, BaseVar]
  187. ] = None,
  188. on_mouse_up: Optional[
  189. Union[EventHandler, EventSpec, list, function, BaseVar]
  190. ] = None,
  191. on_scroll: Optional[
  192. Union[EventHandler, EventSpec, list, function, BaseVar]
  193. ] = None,
  194. on_unmount: Optional[
  195. Union[EventHandler, EventSpec, list, function, BaseVar]
  196. ] = None,
  197. **props
  198. ) -> "NumberInputField":
  199. """Create the component.
  200. Args:
  201. *children: The children of the component.
  202. style: The style of the component.
  203. key: A unique key for the component.
  204. id: The id for the component.
  205. class_name: The class name for the component.
  206. autofocus: Whether the component should take the focus once the page is loaded
  207. custom_attrs: custom attribute
  208. **props: The props of the component.
  209. Returns:
  210. The component.
  211. """
  212. ...
  213. class NumberInputStepper(ChakraComponent):
  214. @overload
  215. @classmethod
  216. def create( # type: ignore
  217. cls,
  218. *children,
  219. style: Optional[Style] = None,
  220. key: Optional[Any] = None,
  221. id: Optional[Any] = None,
  222. class_name: Optional[Any] = None,
  223. autofocus: Optional[bool] = None,
  224. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  225. on_blur: Optional[
  226. Union[EventHandler, EventSpec, list, function, BaseVar]
  227. ] = None,
  228. on_click: Optional[
  229. Union[EventHandler, EventSpec, list, function, BaseVar]
  230. ] = None,
  231. on_context_menu: Optional[
  232. Union[EventHandler, EventSpec, list, function, BaseVar]
  233. ] = None,
  234. on_double_click: Optional[
  235. Union[EventHandler, EventSpec, list, function, BaseVar]
  236. ] = None,
  237. on_focus: Optional[
  238. Union[EventHandler, EventSpec, list, function, BaseVar]
  239. ] = None,
  240. on_mount: Optional[
  241. Union[EventHandler, EventSpec, list, function, BaseVar]
  242. ] = None,
  243. on_mouse_down: Optional[
  244. Union[EventHandler, EventSpec, list, function, BaseVar]
  245. ] = None,
  246. on_mouse_enter: Optional[
  247. Union[EventHandler, EventSpec, list, function, BaseVar]
  248. ] = None,
  249. on_mouse_leave: Optional[
  250. Union[EventHandler, EventSpec, list, function, BaseVar]
  251. ] = None,
  252. on_mouse_move: Optional[
  253. Union[EventHandler, EventSpec, list, function, BaseVar]
  254. ] = None,
  255. on_mouse_out: Optional[
  256. Union[EventHandler, EventSpec, list, function, BaseVar]
  257. ] = None,
  258. on_mouse_over: Optional[
  259. Union[EventHandler, EventSpec, list, function, BaseVar]
  260. ] = None,
  261. on_mouse_up: Optional[
  262. Union[EventHandler, EventSpec, list, function, BaseVar]
  263. ] = None,
  264. on_scroll: Optional[
  265. Union[EventHandler, EventSpec, list, function, BaseVar]
  266. ] = None,
  267. on_unmount: Optional[
  268. Union[EventHandler, EventSpec, list, function, BaseVar]
  269. ] = None,
  270. **props
  271. ) -> "NumberInputStepper":
  272. """Create the component.
  273. Args:
  274. *children: The children of the component.
  275. style: The style of the component.
  276. key: A unique key for the component.
  277. id: The id for the component.
  278. class_name: The class name for the component.
  279. autofocus: Whether the component should take the focus once the page is loaded
  280. custom_attrs: custom attribute
  281. **props: The props of the component.
  282. Returns:
  283. The component.
  284. """
  285. ...
  286. class NumberIncrementStepper(ChakraComponent):
  287. @overload
  288. @classmethod
  289. def create( # type: ignore
  290. cls,
  291. *children,
  292. style: Optional[Style] = None,
  293. key: Optional[Any] = None,
  294. id: Optional[Any] = None,
  295. class_name: Optional[Any] = None,
  296. autofocus: Optional[bool] = None,
  297. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  298. on_blur: Optional[
  299. Union[EventHandler, EventSpec, list, function, BaseVar]
  300. ] = None,
  301. on_click: Optional[
  302. Union[EventHandler, EventSpec, list, function, BaseVar]
  303. ] = None,
  304. on_context_menu: Optional[
  305. Union[EventHandler, EventSpec, list, function, BaseVar]
  306. ] = None,
  307. on_double_click: Optional[
  308. Union[EventHandler, EventSpec, list, function, BaseVar]
  309. ] = None,
  310. on_focus: Optional[
  311. Union[EventHandler, EventSpec, list, function, BaseVar]
  312. ] = None,
  313. on_mount: Optional[
  314. Union[EventHandler, EventSpec, list, function, BaseVar]
  315. ] = None,
  316. on_mouse_down: Optional[
  317. Union[EventHandler, EventSpec, list, function, BaseVar]
  318. ] = None,
  319. on_mouse_enter: Optional[
  320. Union[EventHandler, EventSpec, list, function, BaseVar]
  321. ] = None,
  322. on_mouse_leave: Optional[
  323. Union[EventHandler, EventSpec, list, function, BaseVar]
  324. ] = None,
  325. on_mouse_move: Optional[
  326. Union[EventHandler, EventSpec, list, function, BaseVar]
  327. ] = None,
  328. on_mouse_out: Optional[
  329. Union[EventHandler, EventSpec, list, function, BaseVar]
  330. ] = None,
  331. on_mouse_over: Optional[
  332. Union[EventHandler, EventSpec, list, function, BaseVar]
  333. ] = None,
  334. on_mouse_up: Optional[
  335. Union[EventHandler, EventSpec, list, function, BaseVar]
  336. ] = None,
  337. on_scroll: Optional[
  338. Union[EventHandler, EventSpec, list, function, BaseVar]
  339. ] = None,
  340. on_unmount: Optional[
  341. Union[EventHandler, EventSpec, list, function, BaseVar]
  342. ] = None,
  343. **props
  344. ) -> "NumberIncrementStepper":
  345. """Create the component.
  346. Args:
  347. *children: The children of the component.
  348. style: The style of the component.
  349. key: A unique key for the component.
  350. id: The id for the component.
  351. class_name: The class name for the component.
  352. autofocus: Whether the component should take the focus once the page is loaded
  353. custom_attrs: custom attribute
  354. **props: The props of the component.
  355. Returns:
  356. The component.
  357. """
  358. ...
  359. class NumberDecrementStepper(ChakraComponent):
  360. @overload
  361. @classmethod
  362. def create( # type: ignore
  363. cls,
  364. *children,
  365. style: Optional[Style] = None,
  366. key: Optional[Any] = None,
  367. id: Optional[Any] = None,
  368. class_name: Optional[Any] = None,
  369. autofocus: Optional[bool] = None,
  370. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  371. on_blur: Optional[
  372. Union[EventHandler, EventSpec, list, function, BaseVar]
  373. ] = None,
  374. on_click: Optional[
  375. Union[EventHandler, EventSpec, list, function, BaseVar]
  376. ] = None,
  377. on_context_menu: Optional[
  378. Union[EventHandler, EventSpec, list, function, BaseVar]
  379. ] = None,
  380. on_double_click: Optional[
  381. Union[EventHandler, EventSpec, list, function, BaseVar]
  382. ] = None,
  383. on_focus: Optional[
  384. Union[EventHandler, EventSpec, list, function, BaseVar]
  385. ] = None,
  386. on_mount: Optional[
  387. Union[EventHandler, EventSpec, list, function, BaseVar]
  388. ] = None,
  389. on_mouse_down: Optional[
  390. Union[EventHandler, EventSpec, list, function, BaseVar]
  391. ] = None,
  392. on_mouse_enter: Optional[
  393. Union[EventHandler, EventSpec, list, function, BaseVar]
  394. ] = None,
  395. on_mouse_leave: Optional[
  396. Union[EventHandler, EventSpec, list, function, BaseVar]
  397. ] = None,
  398. on_mouse_move: Optional[
  399. Union[EventHandler, EventSpec, list, function, BaseVar]
  400. ] = None,
  401. on_mouse_out: Optional[
  402. Union[EventHandler, EventSpec, list, function, BaseVar]
  403. ] = None,
  404. on_mouse_over: Optional[
  405. Union[EventHandler, EventSpec, list, function, BaseVar]
  406. ] = None,
  407. on_mouse_up: Optional[
  408. Union[EventHandler, EventSpec, list, function, BaseVar]
  409. ] = None,
  410. on_scroll: Optional[
  411. Union[EventHandler, EventSpec, list, function, BaseVar]
  412. ] = None,
  413. on_unmount: Optional[
  414. Union[EventHandler, EventSpec, list, function, BaseVar]
  415. ] = None,
  416. **props
  417. ) -> "NumberDecrementStepper":
  418. """Create the component.
  419. Args:
  420. *children: The children of the component.
  421. style: The style of the component.
  422. key: A unique key for the component.
  423. id: The id for the component.
  424. class_name: The class name for the component.
  425. autofocus: Whether the component should take the focus once the page is loaded
  426. custom_attrs: custom attribute
  427. **props: The props of the component.
  428. Returns:
  429. The component.
  430. """
  431. ...