numberinput.pyi 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  1. """Stub file for reflex/components/chakra/forms/numberinput.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 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. Raises:
  212. TypeError: If an invalid child is passed.
  213. """
  214. ...
  215. class NumberInputStepper(ChakraComponent):
  216. @overload
  217. @classmethod
  218. def create( # type: ignore
  219. cls,
  220. *children,
  221. style: Optional[Style] = None,
  222. key: Optional[Any] = None,
  223. id: Optional[Any] = None,
  224. class_name: Optional[Any] = None,
  225. autofocus: Optional[bool] = None,
  226. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  227. on_blur: Optional[
  228. Union[EventHandler, EventSpec, list, function, BaseVar]
  229. ] = None,
  230. on_click: Optional[
  231. Union[EventHandler, EventSpec, list, function, BaseVar]
  232. ] = None,
  233. on_context_menu: Optional[
  234. Union[EventHandler, EventSpec, list, function, BaseVar]
  235. ] = None,
  236. on_double_click: Optional[
  237. Union[EventHandler, EventSpec, list, function, BaseVar]
  238. ] = None,
  239. on_focus: Optional[
  240. Union[EventHandler, EventSpec, list, function, BaseVar]
  241. ] = None,
  242. on_mount: Optional[
  243. Union[EventHandler, EventSpec, list, function, BaseVar]
  244. ] = None,
  245. on_mouse_down: Optional[
  246. Union[EventHandler, EventSpec, list, function, BaseVar]
  247. ] = None,
  248. on_mouse_enter: Optional[
  249. Union[EventHandler, EventSpec, list, function, BaseVar]
  250. ] = None,
  251. on_mouse_leave: Optional[
  252. Union[EventHandler, EventSpec, list, function, BaseVar]
  253. ] = None,
  254. on_mouse_move: Optional[
  255. Union[EventHandler, EventSpec, list, function, BaseVar]
  256. ] = None,
  257. on_mouse_out: Optional[
  258. Union[EventHandler, EventSpec, list, function, BaseVar]
  259. ] = None,
  260. on_mouse_over: Optional[
  261. Union[EventHandler, EventSpec, list, function, BaseVar]
  262. ] = None,
  263. on_mouse_up: Optional[
  264. Union[EventHandler, EventSpec, list, function, BaseVar]
  265. ] = None,
  266. on_scroll: Optional[
  267. Union[EventHandler, EventSpec, list, function, BaseVar]
  268. ] = None,
  269. on_unmount: Optional[
  270. Union[EventHandler, EventSpec, list, function, BaseVar]
  271. ] = None,
  272. **props
  273. ) -> "NumberInputStepper":
  274. """Create the component.
  275. Args:
  276. *children: The children of the component.
  277. style: The style of the component.
  278. key: A unique key for the component.
  279. id: The id for the component.
  280. class_name: The class name for the component.
  281. autofocus: Whether the component should take the focus once the page is loaded
  282. custom_attrs: custom attribute
  283. **props: The props of the component.
  284. Returns:
  285. The component.
  286. Raises:
  287. TypeError: If an invalid child is passed.
  288. """
  289. ...
  290. class NumberIncrementStepper(ChakraComponent):
  291. @overload
  292. @classmethod
  293. def create( # type: ignore
  294. cls,
  295. *children,
  296. style: Optional[Style] = None,
  297. key: Optional[Any] = None,
  298. id: Optional[Any] = None,
  299. class_name: Optional[Any] = None,
  300. autofocus: Optional[bool] = None,
  301. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  302. on_blur: Optional[
  303. Union[EventHandler, EventSpec, list, function, BaseVar]
  304. ] = None,
  305. on_click: Optional[
  306. Union[EventHandler, EventSpec, list, function, BaseVar]
  307. ] = None,
  308. on_context_menu: Optional[
  309. Union[EventHandler, EventSpec, list, function, BaseVar]
  310. ] = None,
  311. on_double_click: Optional[
  312. Union[EventHandler, EventSpec, list, function, BaseVar]
  313. ] = None,
  314. on_focus: Optional[
  315. Union[EventHandler, EventSpec, list, function, BaseVar]
  316. ] = None,
  317. on_mount: Optional[
  318. Union[EventHandler, EventSpec, list, function, BaseVar]
  319. ] = None,
  320. on_mouse_down: Optional[
  321. Union[EventHandler, EventSpec, list, function, BaseVar]
  322. ] = None,
  323. on_mouse_enter: Optional[
  324. Union[EventHandler, EventSpec, list, function, BaseVar]
  325. ] = None,
  326. on_mouse_leave: Optional[
  327. Union[EventHandler, EventSpec, list, function, BaseVar]
  328. ] = None,
  329. on_mouse_move: Optional[
  330. Union[EventHandler, EventSpec, list, function, BaseVar]
  331. ] = None,
  332. on_mouse_out: Optional[
  333. Union[EventHandler, EventSpec, list, function, BaseVar]
  334. ] = None,
  335. on_mouse_over: Optional[
  336. Union[EventHandler, EventSpec, list, function, BaseVar]
  337. ] = None,
  338. on_mouse_up: Optional[
  339. Union[EventHandler, EventSpec, list, function, BaseVar]
  340. ] = None,
  341. on_scroll: Optional[
  342. Union[EventHandler, EventSpec, list, function, BaseVar]
  343. ] = None,
  344. on_unmount: Optional[
  345. Union[EventHandler, EventSpec, list, function, BaseVar]
  346. ] = None,
  347. **props
  348. ) -> "NumberIncrementStepper":
  349. """Create the component.
  350. Args:
  351. *children: The children of the component.
  352. style: The style of the component.
  353. key: A unique key for the component.
  354. id: The id for the component.
  355. class_name: The class name for the component.
  356. autofocus: Whether the component should take the focus once the page is loaded
  357. custom_attrs: custom attribute
  358. **props: The props of the component.
  359. Returns:
  360. The component.
  361. Raises:
  362. TypeError: If an invalid child is passed.
  363. """
  364. ...
  365. class NumberDecrementStepper(ChakraComponent):
  366. @overload
  367. @classmethod
  368. def create( # type: ignore
  369. cls,
  370. *children,
  371. style: Optional[Style] = None,
  372. key: Optional[Any] = None,
  373. id: Optional[Any] = None,
  374. class_name: Optional[Any] = None,
  375. autofocus: Optional[bool] = None,
  376. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  377. on_blur: Optional[
  378. Union[EventHandler, EventSpec, list, function, BaseVar]
  379. ] = None,
  380. on_click: Optional[
  381. Union[EventHandler, EventSpec, list, function, BaseVar]
  382. ] = None,
  383. on_context_menu: Optional[
  384. Union[EventHandler, EventSpec, list, function, BaseVar]
  385. ] = None,
  386. on_double_click: Optional[
  387. Union[EventHandler, EventSpec, list, function, BaseVar]
  388. ] = None,
  389. on_focus: Optional[
  390. Union[EventHandler, EventSpec, list, function, BaseVar]
  391. ] = None,
  392. on_mount: Optional[
  393. Union[EventHandler, EventSpec, list, function, BaseVar]
  394. ] = None,
  395. on_mouse_down: Optional[
  396. Union[EventHandler, EventSpec, list, function, BaseVar]
  397. ] = None,
  398. on_mouse_enter: Optional[
  399. Union[EventHandler, EventSpec, list, function, BaseVar]
  400. ] = None,
  401. on_mouse_leave: Optional[
  402. Union[EventHandler, EventSpec, list, function, BaseVar]
  403. ] = None,
  404. on_mouse_move: Optional[
  405. Union[EventHandler, EventSpec, list, function, BaseVar]
  406. ] = None,
  407. on_mouse_out: Optional[
  408. Union[EventHandler, EventSpec, list, function, BaseVar]
  409. ] = None,
  410. on_mouse_over: Optional[
  411. Union[EventHandler, EventSpec, list, function, BaseVar]
  412. ] = None,
  413. on_mouse_up: Optional[
  414. Union[EventHandler, EventSpec, list, function, BaseVar]
  415. ] = None,
  416. on_scroll: Optional[
  417. Union[EventHandler, EventSpec, list, function, BaseVar]
  418. ] = None,
  419. on_unmount: Optional[
  420. Union[EventHandler, EventSpec, list, function, BaseVar]
  421. ] = None,
  422. **props
  423. ) -> "NumberDecrementStepper":
  424. """Create the component.
  425. Args:
  426. *children: The children of the component.
  427. style: The style of the component.
  428. key: A unique key for the component.
  429. id: The id for the component.
  430. class_name: The class name for the component.
  431. autofocus: Whether the component should take the focus once the page is loaded
  432. custom_attrs: custom attribute
  433. **props: The props of the component.
  434. Returns:
  435. The component.
  436. Raises:
  437. TypeError: If an invalid child is passed.
  438. """
  439. ...