numberinput.pyi 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  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. _rename_props: Optional[Dict[str, str]] = None,
  57. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  58. on_blur: Optional[
  59. Union[EventHandler, EventSpec, list, function, BaseVar]
  60. ] = None,
  61. on_change: Optional[
  62. Union[EventHandler, EventSpec, list, function, BaseVar]
  63. ] = None,
  64. on_click: Optional[
  65. Union[EventHandler, EventSpec, list, function, BaseVar]
  66. ] = None,
  67. on_context_menu: Optional[
  68. Union[EventHandler, EventSpec, list, function, BaseVar]
  69. ] = None,
  70. on_double_click: Optional[
  71. Union[EventHandler, EventSpec, list, function, BaseVar]
  72. ] = None,
  73. on_focus: Optional[
  74. Union[EventHandler, EventSpec, list, function, BaseVar]
  75. ] = None,
  76. on_mount: Optional[
  77. Union[EventHandler, EventSpec, list, function, BaseVar]
  78. ] = None,
  79. on_mouse_down: Optional[
  80. Union[EventHandler, EventSpec, list, function, BaseVar]
  81. ] = None,
  82. on_mouse_enter: Optional[
  83. Union[EventHandler, EventSpec, list, function, BaseVar]
  84. ] = None,
  85. on_mouse_leave: Optional[
  86. Union[EventHandler, EventSpec, list, function, BaseVar]
  87. ] = None,
  88. on_mouse_move: Optional[
  89. Union[EventHandler, EventSpec, list, function, BaseVar]
  90. ] = None,
  91. on_mouse_out: Optional[
  92. Union[EventHandler, EventSpec, list, function, BaseVar]
  93. ] = None,
  94. on_mouse_over: Optional[
  95. Union[EventHandler, EventSpec, list, function, BaseVar]
  96. ] = None,
  97. on_mouse_up: Optional[
  98. Union[EventHandler, EventSpec, list, function, BaseVar]
  99. ] = None,
  100. on_scroll: Optional[
  101. Union[EventHandler, EventSpec, list, function, BaseVar]
  102. ] = None,
  103. on_unmount: Optional[
  104. Union[EventHandler, EventSpec, list, function, BaseVar]
  105. ] = None,
  106. **props
  107. ) -> "NumberInput":
  108. """Create a number input component.
  109. If no children are provided, a default stepper will be used.
  110. Args:
  111. *children: The children of the component.
  112. value: State var to bind the input.
  113. allow_mouse_wheel: If true, the input's value will change based on mouse wheel.
  114. 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.
  115. default_value: The initial value of the counter. Should be less than max and greater than min
  116. error_border_color: The border color when the input is invalid.
  117. focus_border_color: The border color when the input is focused.
  118. focus_input_on_change: If true, the input will be focused as you increment or decrement the value with the stepper
  119. 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.
  120. is_invalid: If true, the input will have `aria-invalid` set to true
  121. is_read_only: If true, the input will be in readonly mode
  122. is_required: Whether the input is required
  123. 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+\\-.]$/
  124. 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.
  125. max_: The maximum value of the counter
  126. min_: The minimum value of the counter
  127. variant: "outline" | "filled" | "flushed" | "unstyled"
  128. size: "lg" | "md" | "sm" | "xs"
  129. name: The name of the form field
  130. style: The style of the component.
  131. key: A unique key for the component.
  132. id: The id for the component.
  133. class_name: The class name for the component.
  134. autofocus: Whether the component should take the focus once the page is loaded
  135. _rename_props: props to change the name of
  136. custom_attrs: custom attribute
  137. **props: The props of the component.
  138. Returns:
  139. The component.
  140. """
  141. ...
  142. class NumberInputField(ChakraComponent):
  143. @overload
  144. @classmethod
  145. def create( # type: ignore
  146. cls,
  147. *children,
  148. style: Optional[Style] = None,
  149. key: Optional[Any] = None,
  150. id: Optional[Any] = None,
  151. class_name: Optional[Any] = None,
  152. autofocus: Optional[bool] = None,
  153. _rename_props: Optional[Dict[str, str]] = None,
  154. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  155. on_blur: Optional[
  156. Union[EventHandler, EventSpec, list, function, BaseVar]
  157. ] = None,
  158. on_click: Optional[
  159. Union[EventHandler, EventSpec, list, function, BaseVar]
  160. ] = None,
  161. on_context_menu: Optional[
  162. Union[EventHandler, EventSpec, list, function, BaseVar]
  163. ] = None,
  164. on_double_click: Optional[
  165. Union[EventHandler, EventSpec, list, function, BaseVar]
  166. ] = None,
  167. on_focus: Optional[
  168. Union[EventHandler, EventSpec, list, function, BaseVar]
  169. ] = None,
  170. on_mount: Optional[
  171. Union[EventHandler, EventSpec, list, function, BaseVar]
  172. ] = None,
  173. on_mouse_down: Optional[
  174. Union[EventHandler, EventSpec, list, function, BaseVar]
  175. ] = None,
  176. on_mouse_enter: Optional[
  177. Union[EventHandler, EventSpec, list, function, BaseVar]
  178. ] = None,
  179. on_mouse_leave: Optional[
  180. Union[EventHandler, EventSpec, list, function, BaseVar]
  181. ] = None,
  182. on_mouse_move: Optional[
  183. Union[EventHandler, EventSpec, list, function, BaseVar]
  184. ] = None,
  185. on_mouse_out: Optional[
  186. Union[EventHandler, EventSpec, list, function, BaseVar]
  187. ] = None,
  188. on_mouse_over: Optional[
  189. Union[EventHandler, EventSpec, list, function, BaseVar]
  190. ] = None,
  191. on_mouse_up: Optional[
  192. Union[EventHandler, EventSpec, list, function, BaseVar]
  193. ] = None,
  194. on_scroll: Optional[
  195. Union[EventHandler, EventSpec, list, function, BaseVar]
  196. ] = None,
  197. on_unmount: Optional[
  198. Union[EventHandler, EventSpec, list, function, BaseVar]
  199. ] = None,
  200. **props
  201. ) -> "NumberInputField":
  202. """Create the component.
  203. Args:
  204. *children: The children of the component.
  205. style: The style of the component.
  206. key: A unique key for the component.
  207. id: The id for the component.
  208. class_name: The class name for the component.
  209. autofocus: Whether the component should take the focus once the page is loaded
  210. _rename_props: props to change the name of
  211. custom_attrs: custom attribute
  212. **props: The props of the component.
  213. Returns:
  214. The component.
  215. Raises:
  216. TypeError: If an invalid child is passed.
  217. """
  218. ...
  219. class NumberInputStepper(ChakraComponent):
  220. @overload
  221. @classmethod
  222. def create( # type: ignore
  223. cls,
  224. *children,
  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. _rename_props: Optional[Dict[str, str]] = None,
  231. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  232. on_blur: Optional[
  233. Union[EventHandler, EventSpec, list, function, BaseVar]
  234. ] = None,
  235. on_click: Optional[
  236. Union[EventHandler, EventSpec, list, function, BaseVar]
  237. ] = None,
  238. on_context_menu: Optional[
  239. Union[EventHandler, EventSpec, list, function, BaseVar]
  240. ] = None,
  241. on_double_click: Optional[
  242. Union[EventHandler, EventSpec, list, function, BaseVar]
  243. ] = None,
  244. on_focus: Optional[
  245. Union[EventHandler, EventSpec, list, function, BaseVar]
  246. ] = None,
  247. on_mount: Optional[
  248. Union[EventHandler, EventSpec, list, function, BaseVar]
  249. ] = None,
  250. on_mouse_down: Optional[
  251. Union[EventHandler, EventSpec, list, function, BaseVar]
  252. ] = None,
  253. on_mouse_enter: Optional[
  254. Union[EventHandler, EventSpec, list, function, BaseVar]
  255. ] = None,
  256. on_mouse_leave: Optional[
  257. Union[EventHandler, EventSpec, list, function, BaseVar]
  258. ] = None,
  259. on_mouse_move: Optional[
  260. Union[EventHandler, EventSpec, list, function, BaseVar]
  261. ] = None,
  262. on_mouse_out: Optional[
  263. Union[EventHandler, EventSpec, list, function, BaseVar]
  264. ] = None,
  265. on_mouse_over: Optional[
  266. Union[EventHandler, EventSpec, list, function, BaseVar]
  267. ] = None,
  268. on_mouse_up: Optional[
  269. Union[EventHandler, EventSpec, list, function, BaseVar]
  270. ] = None,
  271. on_scroll: Optional[
  272. Union[EventHandler, EventSpec, list, function, BaseVar]
  273. ] = None,
  274. on_unmount: Optional[
  275. Union[EventHandler, EventSpec, list, function, BaseVar]
  276. ] = None,
  277. **props
  278. ) -> "NumberInputStepper":
  279. """Create the component.
  280. Args:
  281. *children: The children of the component.
  282. style: The style of the component.
  283. key: A unique key for the component.
  284. id: The id for the component.
  285. class_name: The class name for the component.
  286. autofocus: Whether the component should take the focus once the page is loaded
  287. _rename_props: props to change the name of
  288. custom_attrs: custom attribute
  289. **props: The props of the component.
  290. Returns:
  291. The component.
  292. Raises:
  293. TypeError: If an invalid child is passed.
  294. """
  295. ...
  296. class NumberIncrementStepper(ChakraComponent):
  297. @overload
  298. @classmethod
  299. def create( # type: ignore
  300. cls,
  301. *children,
  302. style: Optional[Style] = None,
  303. key: Optional[Any] = None,
  304. id: Optional[Any] = None,
  305. class_name: Optional[Any] = None,
  306. autofocus: Optional[bool] = None,
  307. _rename_props: Optional[Dict[str, str]] = None,
  308. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  309. on_blur: Optional[
  310. Union[EventHandler, EventSpec, list, function, BaseVar]
  311. ] = None,
  312. on_click: Optional[
  313. Union[EventHandler, EventSpec, list, function, BaseVar]
  314. ] = None,
  315. on_context_menu: Optional[
  316. Union[EventHandler, EventSpec, list, function, BaseVar]
  317. ] = None,
  318. on_double_click: Optional[
  319. Union[EventHandler, EventSpec, list, function, BaseVar]
  320. ] = None,
  321. on_focus: Optional[
  322. Union[EventHandler, EventSpec, list, function, BaseVar]
  323. ] = None,
  324. on_mount: Optional[
  325. Union[EventHandler, EventSpec, list, function, BaseVar]
  326. ] = None,
  327. on_mouse_down: Optional[
  328. Union[EventHandler, EventSpec, list, function, BaseVar]
  329. ] = None,
  330. on_mouse_enter: Optional[
  331. Union[EventHandler, EventSpec, list, function, BaseVar]
  332. ] = None,
  333. on_mouse_leave: Optional[
  334. Union[EventHandler, EventSpec, list, function, BaseVar]
  335. ] = None,
  336. on_mouse_move: Optional[
  337. Union[EventHandler, EventSpec, list, function, BaseVar]
  338. ] = None,
  339. on_mouse_out: Optional[
  340. Union[EventHandler, EventSpec, list, function, BaseVar]
  341. ] = None,
  342. on_mouse_over: Optional[
  343. Union[EventHandler, EventSpec, list, function, BaseVar]
  344. ] = None,
  345. on_mouse_up: Optional[
  346. Union[EventHandler, EventSpec, list, function, BaseVar]
  347. ] = None,
  348. on_scroll: Optional[
  349. Union[EventHandler, EventSpec, list, function, BaseVar]
  350. ] = None,
  351. on_unmount: Optional[
  352. Union[EventHandler, EventSpec, list, function, BaseVar]
  353. ] = None,
  354. **props
  355. ) -> "NumberIncrementStepper":
  356. """Create the component.
  357. Args:
  358. *children: The children of the component.
  359. style: The style of the component.
  360. key: A unique key for the component.
  361. id: The id for the component.
  362. class_name: The class name for the component.
  363. autofocus: Whether the component should take the focus once the page is loaded
  364. _rename_props: props to change the name of
  365. custom_attrs: custom attribute
  366. **props: The props of the component.
  367. Returns:
  368. The component.
  369. Raises:
  370. TypeError: If an invalid child is passed.
  371. """
  372. ...
  373. class NumberDecrementStepper(ChakraComponent):
  374. @overload
  375. @classmethod
  376. def create( # type: ignore
  377. cls,
  378. *children,
  379. style: Optional[Style] = None,
  380. key: Optional[Any] = None,
  381. id: Optional[Any] = None,
  382. class_name: Optional[Any] = None,
  383. autofocus: Optional[bool] = None,
  384. _rename_props: Optional[Dict[str, str]] = None,
  385. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  386. on_blur: Optional[
  387. Union[EventHandler, EventSpec, list, function, BaseVar]
  388. ] = None,
  389. on_click: Optional[
  390. Union[EventHandler, EventSpec, list, function, BaseVar]
  391. ] = None,
  392. on_context_menu: Optional[
  393. Union[EventHandler, EventSpec, list, function, BaseVar]
  394. ] = None,
  395. on_double_click: Optional[
  396. Union[EventHandler, EventSpec, list, function, BaseVar]
  397. ] = None,
  398. on_focus: Optional[
  399. Union[EventHandler, EventSpec, list, function, BaseVar]
  400. ] = None,
  401. on_mount: Optional[
  402. Union[EventHandler, EventSpec, list, function, BaseVar]
  403. ] = None,
  404. on_mouse_down: Optional[
  405. Union[EventHandler, EventSpec, list, function, BaseVar]
  406. ] = None,
  407. on_mouse_enter: Optional[
  408. Union[EventHandler, EventSpec, list, function, BaseVar]
  409. ] = None,
  410. on_mouse_leave: Optional[
  411. Union[EventHandler, EventSpec, list, function, BaseVar]
  412. ] = None,
  413. on_mouse_move: Optional[
  414. Union[EventHandler, EventSpec, list, function, BaseVar]
  415. ] = None,
  416. on_mouse_out: Optional[
  417. Union[EventHandler, EventSpec, list, function, BaseVar]
  418. ] = None,
  419. on_mouse_over: Optional[
  420. Union[EventHandler, EventSpec, list, function, BaseVar]
  421. ] = None,
  422. on_mouse_up: Optional[
  423. Union[EventHandler, EventSpec, list, function, BaseVar]
  424. ] = None,
  425. on_scroll: Optional[
  426. Union[EventHandler, EventSpec, list, function, BaseVar]
  427. ] = None,
  428. on_unmount: Optional[
  429. Union[EventHandler, EventSpec, list, function, BaseVar]
  430. ] = None,
  431. **props
  432. ) -> "NumberDecrementStepper":
  433. """Create the component.
  434. Args:
  435. *children: The children of the component.
  436. style: The style of the component.
  437. key: A unique key for the component.
  438. id: The id for the component.
  439. class_name: The class name for the component.
  440. autofocus: Whether the component should take the focus once the page is loaded
  441. _rename_props: props to change the name of
  442. custom_attrs: custom attribute
  443. **props: The props of the component.
  444. Returns:
  445. The component.
  446. Raises:
  447. TypeError: If an invalid child is passed.
  448. """
  449. ...