form.pyi 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  1. """Stub file for reflex/components/chakra/forms/form.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 reflex.components.chakra import ChakraComponent
  10. from reflex.components.component import Component
  11. from reflex.components.el.elements.forms import Form as HTMLForm
  12. from reflex.vars import Var
  13. class Form(ChakraComponent, HTMLForm):
  14. @overload
  15. @classmethod
  16. def create( # type: ignore
  17. cls,
  18. *children,
  19. as_: Optional[Union[Var[str], str]] = None,
  20. accept: Optional[
  21. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  22. ] = None,
  23. accept_charset: Optional[
  24. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  25. ] = None,
  26. action: Optional[
  27. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  28. ] = None,
  29. auto_complete: Optional[
  30. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  31. ] = None,
  32. enc_type: Optional[
  33. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  34. ] = None,
  35. method: Optional[
  36. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  37. ] = None,
  38. name: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  39. no_validate: Optional[
  40. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  41. ] = None,
  42. target: Optional[
  43. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  44. ] = None,
  45. reset_on_submit: Optional[Union[Var[bool], bool]] = None,
  46. handle_submit_unique_name: Optional[Union[Var[str], str]] = None,
  47. access_key: Optional[
  48. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  49. ] = None,
  50. auto_capitalize: Optional[
  51. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  52. ] = None,
  53. content_editable: Optional[
  54. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  55. ] = None,
  56. context_menu: Optional[
  57. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  58. ] = None,
  59. dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  60. draggable: Optional[
  61. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  62. ] = None,
  63. enter_key_hint: Optional[
  64. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  65. ] = None,
  66. hidden: Optional[
  67. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  68. ] = None,
  69. input_mode: Optional[
  70. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  71. ] = None,
  72. item_prop: Optional[
  73. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  74. ] = None,
  75. lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  76. role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  77. slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  78. spell_check: Optional[
  79. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  80. ] = None,
  81. tab_index: Optional[
  82. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  83. ] = None,
  84. title: Optional[
  85. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  86. ] = None,
  87. style: Optional[Style] = None,
  88. key: Optional[Any] = None,
  89. id: Optional[Any] = None,
  90. class_name: Optional[Any] = None,
  91. autofocus: Optional[bool] = None,
  92. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  93. on_blur: Optional[
  94. Union[EventHandler, EventSpec, list, function, BaseVar]
  95. ] = None,
  96. on_click: Optional[
  97. Union[EventHandler, EventSpec, list, function, BaseVar]
  98. ] = None,
  99. on_context_menu: Optional[
  100. Union[EventHandler, EventSpec, list, function, BaseVar]
  101. ] = None,
  102. on_double_click: Optional[
  103. Union[EventHandler, EventSpec, list, function, BaseVar]
  104. ] = None,
  105. on_focus: Optional[
  106. Union[EventHandler, EventSpec, list, function, BaseVar]
  107. ] = None,
  108. on_mount: Optional[
  109. Union[EventHandler, EventSpec, list, function, BaseVar]
  110. ] = None,
  111. on_mouse_down: Optional[
  112. Union[EventHandler, EventSpec, list, function, BaseVar]
  113. ] = None,
  114. on_mouse_enter: Optional[
  115. Union[EventHandler, EventSpec, list, function, BaseVar]
  116. ] = None,
  117. on_mouse_leave: Optional[
  118. Union[EventHandler, EventSpec, list, function, BaseVar]
  119. ] = None,
  120. on_mouse_move: Optional[
  121. Union[EventHandler, EventSpec, list, function, BaseVar]
  122. ] = None,
  123. on_mouse_out: Optional[
  124. Union[EventHandler, EventSpec, list, function, BaseVar]
  125. ] = None,
  126. on_mouse_over: Optional[
  127. Union[EventHandler, EventSpec, list, function, BaseVar]
  128. ] = None,
  129. on_mouse_up: Optional[
  130. Union[EventHandler, EventSpec, list, function, BaseVar]
  131. ] = None,
  132. on_scroll: Optional[
  133. Union[EventHandler, EventSpec, list, function, BaseVar]
  134. ] = None,
  135. on_submit: Optional[
  136. Union[EventHandler, EventSpec, list, function, BaseVar]
  137. ] = None,
  138. on_unmount: Optional[
  139. Union[EventHandler, EventSpec, list, function, BaseVar]
  140. ] = None,
  141. **props
  142. ) -> "Form":
  143. """Create a form component.
  144. Args:
  145. *children: The children of the form.
  146. as_: What the form renders to.
  147. accept: MIME types the server accepts for file upload
  148. accept_charset: Character encodings to be used for form submission
  149. action: URL where the form's data should be submitted
  150. auto_complete: Whether the form should have autocomplete enabled
  151. enc_type: Encoding type for the form data when submitted
  152. method: HTTP method to use for form submission
  153. name: Name of the form
  154. no_validate: Indicates that the form should not be validated on submit
  155. target: Where to display the response after submitting the form
  156. reset_on_submit: If true, the form will be cleared after submit.
  157. handle_submit_unique_name: The name used to make this form's submit handler function unique.
  158. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  159. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  160. content_editable: Indicates whether the element's content is editable.
  161. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  162. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  163. draggable: Defines whether the element can be dragged.
  164. enter_key_hint: Hints what media types the media element is able to play.
  165. hidden: Defines whether the element is hidden.
  166. input_mode: Defines the type of the element.
  167. item_prop: Defines the name of the element for metadata purposes.
  168. lang: Defines the language used in the element.
  169. role: Defines the role of the element.
  170. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  171. spell_check: Defines whether the element may be checked for spelling errors.
  172. tab_index: Defines the position of the current element in the tabbing order.
  173. title: Defines a tooltip for the element.
  174. style: The style of the component.
  175. key: A unique key for the component.
  176. id: The id for the component.
  177. class_name: The class name for the component.
  178. autofocus: Whether the component should take the focus once the page is loaded
  179. custom_attrs: custom attribute
  180. **props: The properties of the form.
  181. Returns:
  182. The form component.
  183. """
  184. ...
  185. class FormControl(ChakraComponent):
  186. @overload
  187. @classmethod
  188. def create( # type: ignore
  189. cls,
  190. *children,
  191. label=None,
  192. input=None,
  193. help_text=None,
  194. error_message=None,
  195. is_disabled: Optional[Union[Var[bool], bool]] = None,
  196. is_invalid: Optional[Union[Var[bool], bool]] = None,
  197. is_read_only: Optional[Union[Var[bool], bool]] = None,
  198. is_required: Optional[Union[Var[bool], bool]] = None,
  199. style: Optional[Style] = None,
  200. key: Optional[Any] = None,
  201. id: Optional[Any] = None,
  202. class_name: Optional[Any] = None,
  203. autofocus: Optional[bool] = None,
  204. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  205. on_blur: Optional[
  206. Union[EventHandler, EventSpec, list, function, BaseVar]
  207. ] = None,
  208. on_click: Optional[
  209. Union[EventHandler, EventSpec, list, function, BaseVar]
  210. ] = None,
  211. on_context_menu: Optional[
  212. Union[EventHandler, EventSpec, list, function, BaseVar]
  213. ] = None,
  214. on_double_click: Optional[
  215. Union[EventHandler, EventSpec, list, function, BaseVar]
  216. ] = None,
  217. on_focus: Optional[
  218. Union[EventHandler, EventSpec, list, function, BaseVar]
  219. ] = None,
  220. on_mount: Optional[
  221. Union[EventHandler, EventSpec, list, function, BaseVar]
  222. ] = None,
  223. on_mouse_down: Optional[
  224. Union[EventHandler, EventSpec, list, function, BaseVar]
  225. ] = None,
  226. on_mouse_enter: Optional[
  227. Union[EventHandler, EventSpec, list, function, BaseVar]
  228. ] = None,
  229. on_mouse_leave: Optional[
  230. Union[EventHandler, EventSpec, list, function, BaseVar]
  231. ] = None,
  232. on_mouse_move: Optional[
  233. Union[EventHandler, EventSpec, list, function, BaseVar]
  234. ] = None,
  235. on_mouse_out: Optional[
  236. Union[EventHandler, EventSpec, list, function, BaseVar]
  237. ] = None,
  238. on_mouse_over: Optional[
  239. Union[EventHandler, EventSpec, list, function, BaseVar]
  240. ] = None,
  241. on_mouse_up: Optional[
  242. Union[EventHandler, EventSpec, list, function, BaseVar]
  243. ] = None,
  244. on_scroll: Optional[
  245. Union[EventHandler, EventSpec, list, function, BaseVar]
  246. ] = None,
  247. on_unmount: Optional[
  248. Union[EventHandler, EventSpec, list, function, BaseVar]
  249. ] = None,
  250. **props
  251. ) -> "FormControl":
  252. """Create a form control component.
  253. Args:
  254. *children: The children of the form control.
  255. label: The label of the form control.
  256. input: The input of the form control.
  257. help_text: The help text of the form control.
  258. error_message: The error message of the form control.
  259. is_disabled: If true, the form control will be disabled.
  260. is_invalid: If true, the form control will be invalid.
  261. is_read_only: If true, the form control will be readonly
  262. is_required: If true, the form control will be required.
  263. style: The style of the component.
  264. key: A unique key for the component.
  265. id: The id for the component.
  266. class_name: The class name for the component.
  267. autofocus: Whether the component should take the focus once the page is loaded
  268. custom_attrs: custom attribute
  269. **props: The properties of the form control.
  270. Raises:
  271. AttributeError: raise an error if missing required kwargs.
  272. Returns:
  273. The form control component.
  274. """
  275. ...
  276. class FormHelperText(ChakraComponent):
  277. @overload
  278. @classmethod
  279. def create( # type: ignore
  280. cls,
  281. *children,
  282. style: Optional[Style] = None,
  283. key: Optional[Any] = None,
  284. id: Optional[Any] = None,
  285. class_name: Optional[Any] = None,
  286. autofocus: Optional[bool] = None,
  287. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  288. on_blur: Optional[
  289. Union[EventHandler, EventSpec, list, function, BaseVar]
  290. ] = None,
  291. on_click: Optional[
  292. Union[EventHandler, EventSpec, list, function, BaseVar]
  293. ] = None,
  294. on_context_menu: Optional[
  295. Union[EventHandler, EventSpec, list, function, BaseVar]
  296. ] = None,
  297. on_double_click: Optional[
  298. Union[EventHandler, EventSpec, list, function, BaseVar]
  299. ] = None,
  300. on_focus: Optional[
  301. Union[EventHandler, EventSpec, list, function, BaseVar]
  302. ] = None,
  303. on_mount: Optional[
  304. Union[EventHandler, EventSpec, list, function, BaseVar]
  305. ] = None,
  306. on_mouse_down: Optional[
  307. Union[EventHandler, EventSpec, list, function, BaseVar]
  308. ] = None,
  309. on_mouse_enter: Optional[
  310. Union[EventHandler, EventSpec, list, function, BaseVar]
  311. ] = None,
  312. on_mouse_leave: Optional[
  313. Union[EventHandler, EventSpec, list, function, BaseVar]
  314. ] = None,
  315. on_mouse_move: Optional[
  316. Union[EventHandler, EventSpec, list, function, BaseVar]
  317. ] = None,
  318. on_mouse_out: Optional[
  319. Union[EventHandler, EventSpec, list, function, BaseVar]
  320. ] = None,
  321. on_mouse_over: Optional[
  322. Union[EventHandler, EventSpec, list, function, BaseVar]
  323. ] = None,
  324. on_mouse_up: Optional[
  325. Union[EventHandler, EventSpec, list, function, BaseVar]
  326. ] = None,
  327. on_scroll: Optional[
  328. Union[EventHandler, EventSpec, list, function, BaseVar]
  329. ] = None,
  330. on_unmount: Optional[
  331. Union[EventHandler, EventSpec, list, function, BaseVar]
  332. ] = None,
  333. **props
  334. ) -> "FormHelperText":
  335. """Create the component.
  336. Args:
  337. *children: The children of the component.
  338. style: The style of the component.
  339. key: A unique key for the component.
  340. id: The id for the component.
  341. class_name: The class name for the component.
  342. autofocus: Whether the component should take the focus once the page is loaded
  343. custom_attrs: custom attribute
  344. **props: The props of the component.
  345. Returns:
  346. The component.
  347. Raises:
  348. TypeError: If an invalid child is passed.
  349. """
  350. ...
  351. class FormLabel(ChakraComponent):
  352. @overload
  353. @classmethod
  354. def create( # type: ignore
  355. cls,
  356. *children,
  357. html_for: Optional[Union[Var[str], str]] = None,
  358. style: Optional[Style] = None,
  359. key: Optional[Any] = None,
  360. id: Optional[Any] = None,
  361. class_name: Optional[Any] = None,
  362. autofocus: Optional[bool] = None,
  363. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  364. on_blur: Optional[
  365. Union[EventHandler, EventSpec, list, function, BaseVar]
  366. ] = None,
  367. on_click: Optional[
  368. Union[EventHandler, EventSpec, list, function, BaseVar]
  369. ] = None,
  370. on_context_menu: Optional[
  371. Union[EventHandler, EventSpec, list, function, BaseVar]
  372. ] = None,
  373. on_double_click: Optional[
  374. Union[EventHandler, EventSpec, list, function, BaseVar]
  375. ] = None,
  376. on_focus: Optional[
  377. Union[EventHandler, EventSpec, list, function, BaseVar]
  378. ] = None,
  379. on_mount: Optional[
  380. Union[EventHandler, EventSpec, list, function, BaseVar]
  381. ] = None,
  382. on_mouse_down: Optional[
  383. Union[EventHandler, EventSpec, list, function, BaseVar]
  384. ] = None,
  385. on_mouse_enter: Optional[
  386. Union[EventHandler, EventSpec, list, function, BaseVar]
  387. ] = None,
  388. on_mouse_leave: Optional[
  389. Union[EventHandler, EventSpec, list, function, BaseVar]
  390. ] = None,
  391. on_mouse_move: Optional[
  392. Union[EventHandler, EventSpec, list, function, BaseVar]
  393. ] = None,
  394. on_mouse_out: Optional[
  395. Union[EventHandler, EventSpec, list, function, BaseVar]
  396. ] = None,
  397. on_mouse_over: Optional[
  398. Union[EventHandler, EventSpec, list, function, BaseVar]
  399. ] = None,
  400. on_mouse_up: Optional[
  401. Union[EventHandler, EventSpec, list, function, BaseVar]
  402. ] = None,
  403. on_scroll: Optional[
  404. Union[EventHandler, EventSpec, list, function, BaseVar]
  405. ] = None,
  406. on_unmount: Optional[
  407. Union[EventHandler, EventSpec, list, function, BaseVar]
  408. ] = None,
  409. **props
  410. ) -> "FormLabel":
  411. """Create the component.
  412. Args:
  413. *children: The children of the component.
  414. html_for: Link
  415. style: The style of the component.
  416. key: A unique key for the component.
  417. id: The id for the component.
  418. class_name: The class name for the component.
  419. autofocus: Whether the component should take the focus once the page is loaded
  420. custom_attrs: custom attribute
  421. **props: The props of the component.
  422. Returns:
  423. The component.
  424. Raises:
  425. TypeError: If an invalid child is passed.
  426. """
  427. ...
  428. class FormErrorMessage(ChakraComponent):
  429. @overload
  430. @classmethod
  431. def create( # type: ignore
  432. cls,
  433. *children,
  434. style: Optional[Style] = None,
  435. key: Optional[Any] = None,
  436. id: Optional[Any] = None,
  437. class_name: Optional[Any] = None,
  438. autofocus: Optional[bool] = None,
  439. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  440. on_blur: Optional[
  441. Union[EventHandler, EventSpec, list, function, BaseVar]
  442. ] = None,
  443. on_click: Optional[
  444. Union[EventHandler, EventSpec, list, function, BaseVar]
  445. ] = None,
  446. on_context_menu: Optional[
  447. Union[EventHandler, EventSpec, list, function, BaseVar]
  448. ] = None,
  449. on_double_click: Optional[
  450. Union[EventHandler, EventSpec, list, function, BaseVar]
  451. ] = None,
  452. on_focus: Optional[
  453. Union[EventHandler, EventSpec, list, function, BaseVar]
  454. ] = None,
  455. on_mount: Optional[
  456. Union[EventHandler, EventSpec, list, function, BaseVar]
  457. ] = None,
  458. on_mouse_down: Optional[
  459. Union[EventHandler, EventSpec, list, function, BaseVar]
  460. ] = None,
  461. on_mouse_enter: Optional[
  462. Union[EventHandler, EventSpec, list, function, BaseVar]
  463. ] = None,
  464. on_mouse_leave: Optional[
  465. Union[EventHandler, EventSpec, list, function, BaseVar]
  466. ] = None,
  467. on_mouse_move: Optional[
  468. Union[EventHandler, EventSpec, list, function, BaseVar]
  469. ] = None,
  470. on_mouse_out: Optional[
  471. Union[EventHandler, EventSpec, list, function, BaseVar]
  472. ] = None,
  473. on_mouse_over: Optional[
  474. Union[EventHandler, EventSpec, list, function, BaseVar]
  475. ] = None,
  476. on_mouse_up: Optional[
  477. Union[EventHandler, EventSpec, list, function, BaseVar]
  478. ] = None,
  479. on_scroll: Optional[
  480. Union[EventHandler, EventSpec, list, function, BaseVar]
  481. ] = None,
  482. on_unmount: Optional[
  483. Union[EventHandler, EventSpec, list, function, BaseVar]
  484. ] = None,
  485. **props
  486. ) -> "FormErrorMessage":
  487. """Create the component.
  488. Args:
  489. *children: The children of the component.
  490. style: The style of the component.
  491. key: A unique key for the component.
  492. id: The id for the component.
  493. class_name: The class name for the component.
  494. autofocus: Whether the component should take the focus once the page is loaded
  495. custom_attrs: custom attribute
  496. **props: The props of the component.
  497. Returns:
  498. The component.
  499. Raises:
  500. TypeError: If an invalid child is passed.
  501. """
  502. ...