1
0

forms.pyi 83 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507
  1. """Stub file for reflex/components/el/elements/forms.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Dict, Optional, Tuple, Union, overload
  6. from jinja2 import Environment
  7. from reflex.components.el.element import Element
  8. from reflex.event import BASE_STATE, EventType, KeyInputInfo
  9. from reflex.style import Style
  10. from reflex.utils.imports import ImportDict
  11. from reflex.vars.base import Var
  12. from .base import BaseHTML
  13. FORM_DATA = Var(_js_expr="form_data")
  14. HANDLE_SUBMIT_JS_JINJA2 = Environment().from_string(
  15. "\n const handleSubmit_{{ handle_submit_unique_name }} = useCallback((ev) => {\n const $form = ev.target\n ev.preventDefault()\n const {{ form_data }} = {...Object.fromEntries(new FormData($form).entries()), ...{{ field_ref_mapping }}};\n\n ({{ on_submit_event_chain }}());\n\n if ({{ reset_on_submit }}) {\n $form.reset()\n }\n })\n "
  16. )
  17. class Button(BaseHTML):
  18. @overload
  19. @classmethod
  20. def create( # type: ignore
  21. cls,
  22. *children,
  23. auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  24. disabled: Optional[Union[Var[bool], bool]] = None,
  25. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  26. form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  27. form_enc_type: Optional[
  28. Union[Var[Union[bool, int, str]], bool, int, str]
  29. ] = None,
  30. form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  31. form_no_validate: Optional[
  32. Union[Var[Union[bool, int, str]], bool, int, str]
  33. ] = None,
  34. form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  35. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  36. type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  37. value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  38. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  39. auto_capitalize: Optional[
  40. Union[Var[Union[bool, int, str]], bool, int, str]
  41. ] = None,
  42. content_editable: Optional[
  43. Union[Var[Union[bool, int, str]], bool, int, str]
  44. ] = None,
  45. context_menu: Optional[
  46. Union[Var[Union[bool, int, str]], bool, int, str]
  47. ] = None,
  48. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  49. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  50. enter_key_hint: Optional[
  51. Union[Var[Union[bool, int, str]], bool, int, str]
  52. ] = None,
  53. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  54. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  55. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  56. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  57. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  58. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  59. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  60. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  61. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  62. style: Optional[Style] = None,
  63. key: Optional[Any] = None,
  64. id: Optional[Any] = None,
  65. class_name: Optional[Any] = None,
  66. autofocus: Optional[bool] = None,
  67. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  68. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  69. on_click: Optional[EventType[[], BASE_STATE]] = None,
  70. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  71. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  72. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  73. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  74. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  75. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  76. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  77. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  78. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  79. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  80. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  81. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  82. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  83. **props,
  84. ) -> "Button":
  85. """Create the component.
  86. Args:
  87. *children: The children of the component.
  88. auto_focus: Automatically focuses the button when the page loads
  89. disabled: Disables the button
  90. form: Associates the button with a form (by id)
  91. form_action: URL to send the form data to (for type="submit" buttons)
  92. form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
  93. form_method: HTTP method to use for sending form data (for type="submit" buttons)
  94. form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
  95. form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
  96. name: Name of the button, used when sending form data
  97. type: Type of the button (submit, reset, or button)
  98. value: Value of the button, used when sending form data
  99. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  100. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  101. content_editable: Indicates whether the element's content is editable.
  102. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  103. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  104. draggable: Defines whether the element can be dragged.
  105. enter_key_hint: Hints what media types the media element is able to play.
  106. hidden: Defines whether the element is hidden.
  107. input_mode: Defines the type of the element.
  108. item_prop: Defines the name of the element for metadata purposes.
  109. lang: Defines the language used in the element.
  110. role: Defines the role of the element.
  111. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  112. spell_check: Defines whether the element may be checked for spelling errors.
  113. tab_index: Defines the position of the current element in the tabbing order.
  114. title: Defines a tooltip for the element.
  115. style: The style of the component.
  116. key: A unique key for the component.
  117. id: The id for the component.
  118. class_name: The class name for the component.
  119. autofocus: Whether the component should take the focus once the page is loaded
  120. custom_attrs: custom attribute
  121. **props: The props of the component.
  122. Returns:
  123. The component.
  124. """
  125. ...
  126. class Datalist(BaseHTML):
  127. @overload
  128. @classmethod
  129. def create( # type: ignore
  130. cls,
  131. *children,
  132. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  133. auto_capitalize: Optional[
  134. Union[Var[Union[bool, int, str]], bool, int, str]
  135. ] = None,
  136. content_editable: Optional[
  137. Union[Var[Union[bool, int, str]], bool, int, str]
  138. ] = None,
  139. context_menu: Optional[
  140. Union[Var[Union[bool, int, str]], bool, int, str]
  141. ] = None,
  142. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  143. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  144. enter_key_hint: Optional[
  145. Union[Var[Union[bool, int, str]], bool, int, str]
  146. ] = None,
  147. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  148. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  149. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  150. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  151. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  152. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  153. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  154. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  155. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  156. style: Optional[Style] = None,
  157. key: Optional[Any] = None,
  158. id: Optional[Any] = None,
  159. class_name: Optional[Any] = None,
  160. autofocus: Optional[bool] = None,
  161. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  162. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  163. on_click: Optional[EventType[[], BASE_STATE]] = None,
  164. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  165. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  166. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  167. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  168. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  169. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  170. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  171. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  172. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  173. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  174. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  175. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  176. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  177. **props,
  178. ) -> "Datalist":
  179. """Create the component.
  180. Args:
  181. *children: The children of the component.
  182. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  183. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  184. content_editable: Indicates whether the element's content is editable.
  185. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  186. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  187. draggable: Defines whether the element can be dragged.
  188. enter_key_hint: Hints what media types the media element is able to play.
  189. hidden: Defines whether the element is hidden.
  190. input_mode: Defines the type of the element.
  191. item_prop: Defines the name of the element for metadata purposes.
  192. lang: Defines the language used in the element.
  193. role: Defines the role of the element.
  194. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  195. spell_check: Defines whether the element may be checked for spelling errors.
  196. tab_index: Defines the position of the current element in the tabbing order.
  197. title: Defines a tooltip for the element.
  198. style: The style of the component.
  199. key: A unique key for the component.
  200. id: The id for the component.
  201. class_name: The class name for the component.
  202. autofocus: Whether the component should take the focus once the page is loaded
  203. custom_attrs: custom attribute
  204. **props: The props of the component.
  205. Returns:
  206. The component.
  207. """
  208. ...
  209. class Fieldset(Element):
  210. @overload
  211. @classmethod
  212. def create( # type: ignore
  213. cls,
  214. *children,
  215. disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  216. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  217. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  218. style: Optional[Style] = None,
  219. key: Optional[Any] = None,
  220. id: Optional[Any] = None,
  221. class_name: Optional[Any] = None,
  222. autofocus: Optional[bool] = None,
  223. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  224. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  225. on_click: Optional[EventType[[], BASE_STATE]] = None,
  226. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  227. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  228. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  229. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  230. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  231. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  232. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  233. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  234. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  235. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  236. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  237. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  238. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  239. **props,
  240. ) -> "Fieldset":
  241. """Create the component.
  242. Args:
  243. *children: The children of the component.
  244. disabled: Disables all the form control descendants of the fieldset
  245. form: Associates the fieldset with a form (by id)
  246. name: Name of the fieldset, used for scripting
  247. style: The style of the component.
  248. key: A unique key for the component.
  249. id: The id for the component.
  250. class_name: The class name for the component.
  251. autofocus: Whether the component should take the focus once the page is loaded
  252. custom_attrs: custom attribute
  253. **props: The props of the component.
  254. Returns:
  255. The component.
  256. """
  257. ...
  258. def on_submit_event_spec() -> Tuple[Var[dict[str, Any]]]: ...
  259. def on_submit_string_event_spec() -> Tuple[Var[dict[str, str]]]: ...
  260. class Form(BaseHTML):
  261. @overload
  262. @classmethod
  263. def create( # type: ignore
  264. cls,
  265. *children,
  266. accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  267. accept_charset: Optional[
  268. Union[Var[Union[bool, int, str]], bool, int, str]
  269. ] = None,
  270. action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  271. auto_complete: Optional[
  272. Union[Var[Union[bool, int, str]], bool, int, str]
  273. ] = None,
  274. enc_type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  275. method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  276. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  277. no_validate: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  278. target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  279. reset_on_submit: Optional[Union[Var[bool], bool]] = None,
  280. handle_submit_unique_name: Optional[Union[Var[str], str]] = None,
  281. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  282. auto_capitalize: Optional[
  283. Union[Var[Union[bool, int, str]], bool, int, str]
  284. ] = None,
  285. content_editable: Optional[
  286. Union[Var[Union[bool, int, str]], bool, int, str]
  287. ] = None,
  288. context_menu: Optional[
  289. Union[Var[Union[bool, int, str]], bool, int, str]
  290. ] = None,
  291. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  292. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  293. enter_key_hint: Optional[
  294. Union[Var[Union[bool, int, str]], bool, int, str]
  295. ] = None,
  296. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  297. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  298. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  299. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  300. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  301. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  302. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  303. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  304. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  305. style: Optional[Style] = None,
  306. key: Optional[Any] = None,
  307. id: Optional[Any] = None,
  308. class_name: Optional[Any] = None,
  309. autofocus: Optional[bool] = None,
  310. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  311. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  312. on_click: Optional[EventType[[], BASE_STATE]] = None,
  313. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  314. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  315. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  316. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  317. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  318. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  319. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  320. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  321. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  322. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  323. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  324. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  325. on_submit: Optional[
  326. Union[
  327. Union[
  328. EventType[[], BASE_STATE], EventType[[dict[str, Any]], BASE_STATE]
  329. ],
  330. Union[
  331. EventType[[], BASE_STATE], EventType[[dict[str, str]], BASE_STATE]
  332. ],
  333. ]
  334. ] = None,
  335. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  336. **props,
  337. ) -> "Form":
  338. """Create a form component.
  339. Args:
  340. *children: The children of the form.
  341. accept: MIME types the server accepts for file upload
  342. accept_charset: Character encodings to be used for form submission
  343. action: URL where the form's data should be submitted
  344. auto_complete: Whether the form should have autocomplete enabled
  345. enc_type: Encoding type for the form data when submitted
  346. method: HTTP method to use for form submission
  347. name: Name of the form
  348. no_validate: Indicates that the form should not be validated on submit
  349. target: Where to display the response after submitting the form
  350. reset_on_submit: If true, the form will be cleared after submit.
  351. handle_submit_unique_name: The name used to make this form's submit handler function unique.
  352. on_submit: Fired when the form is submitted
  353. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  354. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  355. content_editable: Indicates whether the element's content is editable.
  356. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  357. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  358. draggable: Defines whether the element can be dragged.
  359. enter_key_hint: Hints what media types the media element is able to play.
  360. hidden: Defines whether the element is hidden.
  361. input_mode: Defines the type of the element.
  362. item_prop: Defines the name of the element for metadata purposes.
  363. lang: Defines the language used in the element.
  364. role: Defines the role of the element.
  365. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  366. spell_check: Defines whether the element may be checked for spelling errors.
  367. tab_index: Defines the position of the current element in the tabbing order.
  368. title: Defines a tooltip for the element.
  369. style: The style of the component.
  370. key: A unique key for the component.
  371. id: The id for the component.
  372. class_name: The class name for the component.
  373. autofocus: Whether the component should take the focus once the page is loaded
  374. custom_attrs: custom attribute
  375. **props: The properties of the form.
  376. Returns:
  377. The form component.
  378. """
  379. ...
  380. def add_imports(self) -> ImportDict: ...
  381. def add_hooks(self) -> list[str]: ...
  382. class Input(BaseHTML):
  383. @overload
  384. @classmethod
  385. def create( # type: ignore
  386. cls,
  387. *children,
  388. accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  389. alt: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  390. auto_complete: Optional[
  391. Union[Var[Union[bool, int, str]], bool, int, str]
  392. ] = None,
  393. auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  394. capture: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  395. checked: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  396. default_checked: Optional[Union[Var[bool], bool]] = None,
  397. default_value: Optional[Union[Var[str], str]] = None,
  398. dirname: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  399. disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  400. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  401. form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  402. form_enc_type: Optional[
  403. Union[Var[Union[bool, int, str]], bool, int, str]
  404. ] = None,
  405. form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  406. form_no_validate: Optional[
  407. Union[Var[Union[bool, int, str]], bool, int, str]
  408. ] = None,
  409. form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  410. list: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  411. max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  412. max_length: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  413. min_length: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  414. min: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  415. multiple: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  416. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  417. pattern: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  418. placeholder: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  419. read_only: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  420. required: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  421. size: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  422. src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  423. step: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  424. type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  425. use_map: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  426. value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
  427. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  428. auto_capitalize: Optional[
  429. Union[Var[Union[bool, int, str]], bool, int, str]
  430. ] = None,
  431. content_editable: Optional[
  432. Union[Var[Union[bool, int, str]], bool, int, str]
  433. ] = None,
  434. context_menu: Optional[
  435. Union[Var[Union[bool, int, str]], bool, int, str]
  436. ] = None,
  437. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  438. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  439. enter_key_hint: Optional[
  440. Union[Var[Union[bool, int, str]], bool, int, str]
  441. ] = None,
  442. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  443. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  444. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  445. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  446. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  447. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  448. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  449. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  450. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  451. style: Optional[Style] = None,
  452. key: Optional[Any] = None,
  453. id: Optional[Any] = None,
  454. class_name: Optional[Any] = None,
  455. autofocus: Optional[bool] = None,
  456. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  457. on_blur: Optional[
  458. Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
  459. ] = None,
  460. on_change: Optional[
  461. Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
  462. ] = None,
  463. on_click: Optional[EventType[[], BASE_STATE]] = None,
  464. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  465. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  466. on_focus: Optional[
  467. Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
  468. ] = None,
  469. on_key_down: Optional[
  470. Union[
  471. EventType[[], BASE_STATE],
  472. EventType[[str], BASE_STATE],
  473. EventType[[str, KeyInputInfo], BASE_STATE],
  474. ]
  475. ] = None,
  476. on_key_up: Optional[
  477. Union[
  478. EventType[[], BASE_STATE],
  479. EventType[[str], BASE_STATE],
  480. EventType[[str, KeyInputInfo], BASE_STATE],
  481. ]
  482. ] = None,
  483. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  484. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  485. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  486. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  487. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  488. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  489. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  490. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  491. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  492. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  493. **props,
  494. ) -> "Input":
  495. """Create an Input component.
  496. Args:
  497. *children: The children of the component.
  498. accept: Accepted types of files when the input is file type
  499. alt: Alternate text for input type="image"
  500. auto_complete: Whether the input should have autocomplete enabled
  501. auto_focus: Automatically focuses the input when the page loads
  502. capture: Captures media from the user (camera or microphone)
  503. checked: Indicates whether the input is checked (for checkboxes and radio buttons)
  504. default_checked: The initial value (for checkboxes and radio buttons)
  505. default_value: The initial value for a text field
  506. dirname: Name part of the input to submit in 'dir' and 'name' pair when form is submitted
  507. disabled: Disables the input
  508. form: Associates the input with a form (by id)
  509. form_action: URL to send the form data to (for type="submit" buttons)
  510. form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
  511. form_method: HTTP method to use for sending form data (for type="submit" buttons)
  512. form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
  513. form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
  514. list: References a datalist for suggested options
  515. max: Specifies the maximum value for the input
  516. max_length: Specifies the maximum number of characters allowed in the input
  517. min_length: Specifies the minimum number of characters required in the input
  518. min: Specifies the minimum value for the input
  519. multiple: Indicates whether multiple values can be entered in an input of the type email or file
  520. name: Name of the input, used when sending form data
  521. pattern: Regex pattern the input's value must match to be valid
  522. placeholder: Placeholder text in the input
  523. read_only: Indicates whether the input is read-only
  524. required: Indicates that the input is required
  525. size: Specifies the visible width of a text control
  526. src: URL for image inputs
  527. step: Specifies the legal number intervals for an input
  528. type: Specifies the type of input
  529. use_map: Name of the image map used with the input
  530. value: Value of the input
  531. on_change: Fired when the input value changes
  532. on_focus: Fired when the input gains focus
  533. on_blur: Fired when the input loses focus
  534. on_key_down: Fired when a key is pressed down
  535. on_key_up: Fired when a key is released
  536. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  537. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  538. content_editable: Indicates whether the element's content is editable.
  539. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  540. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  541. draggable: Defines whether the element can be dragged.
  542. enter_key_hint: Hints what media types the media element is able to play.
  543. hidden: Defines whether the element is hidden.
  544. input_mode: Defines the type of the element.
  545. item_prop: Defines the name of the element for metadata purposes.
  546. lang: Defines the language used in the element.
  547. role: Defines the role of the element.
  548. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  549. spell_check: Defines whether the element may be checked for spelling errors.
  550. tab_index: Defines the position of the current element in the tabbing order.
  551. title: Defines a tooltip for the element.
  552. style: The style of the component.
  553. key: A unique key for the component.
  554. id: The id for the component.
  555. class_name: The class name for the component.
  556. autofocus: Whether the component should take the focus once the page is loaded
  557. custom_attrs: custom attribute
  558. **props: The properties of the component.
  559. Returns:
  560. The component.
  561. """
  562. ...
  563. class Label(BaseHTML):
  564. @overload
  565. @classmethod
  566. def create( # type: ignore
  567. cls,
  568. *children,
  569. html_for: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  570. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  571. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  572. auto_capitalize: Optional[
  573. Union[Var[Union[bool, int, str]], bool, int, str]
  574. ] = None,
  575. content_editable: Optional[
  576. Union[Var[Union[bool, int, str]], bool, int, str]
  577. ] = None,
  578. context_menu: Optional[
  579. Union[Var[Union[bool, int, str]], bool, int, str]
  580. ] = None,
  581. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  582. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  583. enter_key_hint: Optional[
  584. Union[Var[Union[bool, int, str]], bool, int, str]
  585. ] = None,
  586. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  587. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  588. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  589. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  590. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  591. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  592. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  593. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  594. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  595. style: Optional[Style] = None,
  596. key: Optional[Any] = None,
  597. id: Optional[Any] = None,
  598. class_name: Optional[Any] = None,
  599. autofocus: Optional[bool] = None,
  600. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  601. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  602. on_click: Optional[EventType[[], BASE_STATE]] = None,
  603. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  604. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  605. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  606. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  607. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  608. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  609. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  610. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  611. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  612. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  613. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  614. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  615. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  616. **props,
  617. ) -> "Label":
  618. """Create the component.
  619. Args:
  620. *children: The children of the component.
  621. html_for: ID of a form control with which the label is associated
  622. form: Associates the label with a form (by id)
  623. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  624. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  625. content_editable: Indicates whether the element's content is editable.
  626. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  627. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  628. draggable: Defines whether the element can be dragged.
  629. enter_key_hint: Hints what media types the media element is able to play.
  630. hidden: Defines whether the element is hidden.
  631. input_mode: Defines the type of the element.
  632. item_prop: Defines the name of the element for metadata purposes.
  633. lang: Defines the language used in the element.
  634. role: Defines the role of the element.
  635. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  636. spell_check: Defines whether the element may be checked for spelling errors.
  637. tab_index: Defines the position of the current element in the tabbing order.
  638. title: Defines a tooltip for the element.
  639. style: The style of the component.
  640. key: A unique key for the component.
  641. id: The id for the component.
  642. class_name: The class name for the component.
  643. autofocus: Whether the component should take the focus once the page is loaded
  644. custom_attrs: custom attribute
  645. **props: The props of the component.
  646. Returns:
  647. The component.
  648. """
  649. ...
  650. class Legend(BaseHTML):
  651. @overload
  652. @classmethod
  653. def create( # type: ignore
  654. cls,
  655. *children,
  656. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  657. auto_capitalize: Optional[
  658. Union[Var[Union[bool, int, str]], bool, int, str]
  659. ] = None,
  660. content_editable: Optional[
  661. Union[Var[Union[bool, int, str]], bool, int, str]
  662. ] = None,
  663. context_menu: Optional[
  664. Union[Var[Union[bool, int, str]], bool, int, str]
  665. ] = None,
  666. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  667. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  668. enter_key_hint: Optional[
  669. Union[Var[Union[bool, int, str]], bool, int, str]
  670. ] = None,
  671. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  672. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  673. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  674. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  675. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  676. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  677. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  678. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  679. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  680. style: Optional[Style] = None,
  681. key: Optional[Any] = None,
  682. id: Optional[Any] = None,
  683. class_name: Optional[Any] = None,
  684. autofocus: Optional[bool] = None,
  685. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  686. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  687. on_click: Optional[EventType[[], BASE_STATE]] = None,
  688. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  689. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  690. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  691. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  692. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  693. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  694. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  695. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  696. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  697. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  698. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  699. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  700. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  701. **props,
  702. ) -> "Legend":
  703. """Create the component.
  704. Args:
  705. *children: The children of the component.
  706. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  707. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  708. content_editable: Indicates whether the element's content is editable.
  709. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  710. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  711. draggable: Defines whether the element can be dragged.
  712. enter_key_hint: Hints what media types the media element is able to play.
  713. hidden: Defines whether the element is hidden.
  714. input_mode: Defines the type of the element.
  715. item_prop: Defines the name of the element for metadata purposes.
  716. lang: Defines the language used in the element.
  717. role: Defines the role of the element.
  718. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  719. spell_check: Defines whether the element may be checked for spelling errors.
  720. tab_index: Defines the position of the current element in the tabbing order.
  721. title: Defines a tooltip for the element.
  722. style: The style of the component.
  723. key: A unique key for the component.
  724. id: The id for the component.
  725. class_name: The class name for the component.
  726. autofocus: Whether the component should take the focus once the page is loaded
  727. custom_attrs: custom attribute
  728. **props: The props of the component.
  729. Returns:
  730. The component.
  731. """
  732. ...
  733. class Meter(BaseHTML):
  734. @overload
  735. @classmethod
  736. def create( # type: ignore
  737. cls,
  738. *children,
  739. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  740. high: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  741. low: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  742. max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  743. min: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  744. optimum: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  745. value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  746. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  747. auto_capitalize: Optional[
  748. Union[Var[Union[bool, int, str]], bool, int, str]
  749. ] = None,
  750. content_editable: Optional[
  751. Union[Var[Union[bool, int, str]], bool, int, str]
  752. ] = None,
  753. context_menu: Optional[
  754. Union[Var[Union[bool, int, str]], bool, int, str]
  755. ] = None,
  756. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  757. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  758. enter_key_hint: Optional[
  759. Union[Var[Union[bool, int, str]], bool, int, str]
  760. ] = None,
  761. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  762. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  763. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  764. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  765. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  766. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  767. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  768. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  769. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  770. style: Optional[Style] = None,
  771. key: Optional[Any] = None,
  772. id: Optional[Any] = None,
  773. class_name: Optional[Any] = None,
  774. autofocus: Optional[bool] = None,
  775. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  776. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  777. on_click: Optional[EventType[[], BASE_STATE]] = None,
  778. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  779. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  780. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  781. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  782. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  783. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  784. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  785. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  786. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  787. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  788. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  789. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  790. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  791. **props,
  792. ) -> "Meter":
  793. """Create the component.
  794. Args:
  795. *children: The children of the component.
  796. form: Associates the meter with a form (by id)
  797. high: High limit of range (above this is considered high value)
  798. low: Low limit of range (below this is considered low value)
  799. max: Maximum value of the range
  800. min: Minimum value of the range
  801. optimum: Optimum value in the range
  802. value: Current value of the meter
  803. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  804. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  805. content_editable: Indicates whether the element's content is editable.
  806. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  807. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  808. draggable: Defines whether the element can be dragged.
  809. enter_key_hint: Hints what media types the media element is able to play.
  810. hidden: Defines whether the element is hidden.
  811. input_mode: Defines the type of the element.
  812. item_prop: Defines the name of the element for metadata purposes.
  813. lang: Defines the language used in the element.
  814. role: Defines the role of the element.
  815. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  816. spell_check: Defines whether the element may be checked for spelling errors.
  817. tab_index: Defines the position of the current element in the tabbing order.
  818. title: Defines a tooltip for the element.
  819. style: The style of the component.
  820. key: A unique key for the component.
  821. id: The id for the component.
  822. class_name: The class name for the component.
  823. autofocus: Whether the component should take the focus once the page is loaded
  824. custom_attrs: custom attribute
  825. **props: The props of the component.
  826. Returns:
  827. The component.
  828. """
  829. ...
  830. class Optgroup(BaseHTML):
  831. @overload
  832. @classmethod
  833. def create( # type: ignore
  834. cls,
  835. *children,
  836. disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  837. label: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  838. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  839. auto_capitalize: Optional[
  840. Union[Var[Union[bool, int, str]], bool, int, str]
  841. ] = None,
  842. content_editable: Optional[
  843. Union[Var[Union[bool, int, str]], bool, int, str]
  844. ] = None,
  845. context_menu: Optional[
  846. Union[Var[Union[bool, int, str]], bool, int, str]
  847. ] = None,
  848. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  849. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  850. enter_key_hint: Optional[
  851. Union[Var[Union[bool, int, str]], bool, int, str]
  852. ] = None,
  853. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  854. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  855. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  856. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  857. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  858. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  859. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  860. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  861. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  862. style: Optional[Style] = None,
  863. key: Optional[Any] = None,
  864. id: Optional[Any] = None,
  865. class_name: Optional[Any] = None,
  866. autofocus: Optional[bool] = None,
  867. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  868. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  869. on_click: Optional[EventType[[], BASE_STATE]] = None,
  870. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  871. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  872. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  873. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  874. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  875. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  876. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  877. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  878. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  879. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  880. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  881. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  882. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  883. **props,
  884. ) -> "Optgroup":
  885. """Create the component.
  886. Args:
  887. *children: The children of the component.
  888. disabled: Disables the optgroup
  889. label: Label for the optgroup
  890. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  891. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  892. content_editable: Indicates whether the element's content is editable.
  893. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  894. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  895. draggable: Defines whether the element can be dragged.
  896. enter_key_hint: Hints what media types the media element is able to play.
  897. hidden: Defines whether the element is hidden.
  898. input_mode: Defines the type of the element.
  899. item_prop: Defines the name of the element for metadata purposes.
  900. lang: Defines the language used in the element.
  901. role: Defines the role of the element.
  902. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  903. spell_check: Defines whether the element may be checked for spelling errors.
  904. tab_index: Defines the position of the current element in the tabbing order.
  905. title: Defines a tooltip for the element.
  906. style: The style of the component.
  907. key: A unique key for the component.
  908. id: The id for the component.
  909. class_name: The class name for the component.
  910. autofocus: Whether the component should take the focus once the page is loaded
  911. custom_attrs: custom attribute
  912. **props: The props of the component.
  913. Returns:
  914. The component.
  915. """
  916. ...
  917. class Option(BaseHTML):
  918. @overload
  919. @classmethod
  920. def create( # type: ignore
  921. cls,
  922. *children,
  923. disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  924. label: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  925. selected: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  926. value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  927. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  928. auto_capitalize: Optional[
  929. Union[Var[Union[bool, int, str]], bool, int, str]
  930. ] = None,
  931. content_editable: Optional[
  932. Union[Var[Union[bool, int, str]], bool, int, str]
  933. ] = None,
  934. context_menu: Optional[
  935. Union[Var[Union[bool, int, str]], bool, int, str]
  936. ] = None,
  937. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  938. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  939. enter_key_hint: Optional[
  940. Union[Var[Union[bool, int, str]], bool, int, str]
  941. ] = None,
  942. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  943. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  944. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  945. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  946. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  947. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  948. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  949. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  950. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  951. style: Optional[Style] = None,
  952. key: Optional[Any] = None,
  953. id: Optional[Any] = None,
  954. class_name: Optional[Any] = None,
  955. autofocus: Optional[bool] = None,
  956. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  957. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  958. on_click: Optional[EventType[[], BASE_STATE]] = None,
  959. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  960. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  961. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  962. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  963. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  964. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  965. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  966. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  967. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  968. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  969. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  970. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  971. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  972. **props,
  973. ) -> "Option":
  974. """Create the component.
  975. Args:
  976. *children: The children of the component.
  977. disabled: Disables the option
  978. label: Label for the option, if the text is not the label
  979. selected: Indicates that the option is initially selected
  980. value: Value to be sent as form data
  981. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  982. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  983. content_editable: Indicates whether the element's content is editable.
  984. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  985. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  986. draggable: Defines whether the element can be dragged.
  987. enter_key_hint: Hints what media types the media element is able to play.
  988. hidden: Defines whether the element is hidden.
  989. input_mode: Defines the type of the element.
  990. item_prop: Defines the name of the element for metadata purposes.
  991. lang: Defines the language used in the element.
  992. role: Defines the role of the element.
  993. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  994. spell_check: Defines whether the element may be checked for spelling errors.
  995. tab_index: Defines the position of the current element in the tabbing order.
  996. title: Defines a tooltip for the element.
  997. style: The style of the component.
  998. key: A unique key for the component.
  999. id: The id for the component.
  1000. class_name: The class name for the component.
  1001. autofocus: Whether the component should take the focus once the page is loaded
  1002. custom_attrs: custom attribute
  1003. **props: The props of the component.
  1004. Returns:
  1005. The component.
  1006. """
  1007. ...
  1008. class Output(BaseHTML):
  1009. @overload
  1010. @classmethod
  1011. def create( # type: ignore
  1012. cls,
  1013. *children,
  1014. html_for: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1015. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1016. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1017. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1018. auto_capitalize: Optional[
  1019. Union[Var[Union[bool, int, str]], bool, int, str]
  1020. ] = None,
  1021. content_editable: Optional[
  1022. Union[Var[Union[bool, int, str]], bool, int, str]
  1023. ] = None,
  1024. context_menu: Optional[
  1025. Union[Var[Union[bool, int, str]], bool, int, str]
  1026. ] = None,
  1027. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1028. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1029. enter_key_hint: Optional[
  1030. Union[Var[Union[bool, int, str]], bool, int, str]
  1031. ] = None,
  1032. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1033. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1034. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1035. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1036. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1037. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1038. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1039. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1040. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1041. style: Optional[Style] = None,
  1042. key: Optional[Any] = None,
  1043. id: Optional[Any] = None,
  1044. class_name: Optional[Any] = None,
  1045. autofocus: Optional[bool] = None,
  1046. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  1047. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  1048. on_click: Optional[EventType[[], BASE_STATE]] = None,
  1049. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  1050. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  1051. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  1052. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  1053. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  1054. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  1055. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  1056. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  1057. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  1058. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  1059. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  1060. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  1061. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  1062. **props,
  1063. ) -> "Output":
  1064. """Create the component.
  1065. Args:
  1066. *children: The children of the component.
  1067. html_for: Associates the output with one or more elements (by their IDs)
  1068. form: Associates the output with a form (by id)
  1069. name: Name of the output element for form submission
  1070. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  1071. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  1072. content_editable: Indicates whether the element's content is editable.
  1073. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  1074. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  1075. draggable: Defines whether the element can be dragged.
  1076. enter_key_hint: Hints what media types the media element is able to play.
  1077. hidden: Defines whether the element is hidden.
  1078. input_mode: Defines the type of the element.
  1079. item_prop: Defines the name of the element for metadata purposes.
  1080. lang: Defines the language used in the element.
  1081. role: Defines the role of the element.
  1082. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  1083. spell_check: Defines whether the element may be checked for spelling errors.
  1084. tab_index: Defines the position of the current element in the tabbing order.
  1085. title: Defines a tooltip for the element.
  1086. style: The style of the component.
  1087. key: A unique key for the component.
  1088. id: The id for the component.
  1089. class_name: The class name for the component.
  1090. autofocus: Whether the component should take the focus once the page is loaded
  1091. custom_attrs: custom attribute
  1092. **props: The props of the component.
  1093. Returns:
  1094. The component.
  1095. """
  1096. ...
  1097. class Progress(BaseHTML):
  1098. @overload
  1099. @classmethod
  1100. def create( # type: ignore
  1101. cls,
  1102. *children,
  1103. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1104. max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1105. value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1106. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1107. auto_capitalize: Optional[
  1108. Union[Var[Union[bool, int, str]], bool, int, str]
  1109. ] = None,
  1110. content_editable: Optional[
  1111. Union[Var[Union[bool, int, str]], bool, int, str]
  1112. ] = None,
  1113. context_menu: Optional[
  1114. Union[Var[Union[bool, int, str]], bool, int, str]
  1115. ] = None,
  1116. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1117. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1118. enter_key_hint: Optional[
  1119. Union[Var[Union[bool, int, str]], bool, int, str]
  1120. ] = None,
  1121. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1122. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1123. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1124. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1125. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1126. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1127. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1128. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1129. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1130. style: Optional[Style] = None,
  1131. key: Optional[Any] = None,
  1132. id: Optional[Any] = None,
  1133. class_name: Optional[Any] = None,
  1134. autofocus: Optional[bool] = None,
  1135. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  1136. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  1137. on_click: Optional[EventType[[], BASE_STATE]] = None,
  1138. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  1139. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  1140. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  1141. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  1142. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  1143. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  1144. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  1145. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  1146. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  1147. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  1148. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  1149. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  1150. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  1151. **props,
  1152. ) -> "Progress":
  1153. """Create the component.
  1154. Args:
  1155. *children: The children of the component.
  1156. form: Associates the progress element with a form (by id)
  1157. max: Maximum value of the progress indicator
  1158. value: Current value of the progress indicator
  1159. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  1160. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  1161. content_editable: Indicates whether the element's content is editable.
  1162. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  1163. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  1164. draggable: Defines whether the element can be dragged.
  1165. enter_key_hint: Hints what media types the media element is able to play.
  1166. hidden: Defines whether the element is hidden.
  1167. input_mode: Defines the type of the element.
  1168. item_prop: Defines the name of the element for metadata purposes.
  1169. lang: Defines the language used in the element.
  1170. role: Defines the role of the element.
  1171. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  1172. spell_check: Defines whether the element may be checked for spelling errors.
  1173. tab_index: Defines the position of the current element in the tabbing order.
  1174. title: Defines a tooltip for the element.
  1175. style: The style of the component.
  1176. key: A unique key for the component.
  1177. id: The id for the component.
  1178. class_name: The class name for the component.
  1179. autofocus: Whether the component should take the focus once the page is loaded
  1180. custom_attrs: custom attribute
  1181. **props: The props of the component.
  1182. Returns:
  1183. The component.
  1184. """
  1185. ...
  1186. class Select(BaseHTML):
  1187. @overload
  1188. @classmethod
  1189. def create( # type: ignore
  1190. cls,
  1191. *children,
  1192. auto_complete: Optional[
  1193. Union[Var[Union[bool, int, str]], bool, int, str]
  1194. ] = None,
  1195. auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1196. disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1197. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1198. multiple: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1199. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1200. required: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1201. size: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1202. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1203. auto_capitalize: Optional[
  1204. Union[Var[Union[bool, int, str]], bool, int, str]
  1205. ] = None,
  1206. content_editable: Optional[
  1207. Union[Var[Union[bool, int, str]], bool, int, str]
  1208. ] = None,
  1209. context_menu: Optional[
  1210. Union[Var[Union[bool, int, str]], bool, int, str]
  1211. ] = None,
  1212. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1213. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1214. enter_key_hint: Optional[
  1215. Union[Var[Union[bool, int, str]], bool, int, str]
  1216. ] = None,
  1217. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1218. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1219. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1220. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1221. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1222. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1223. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1224. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1225. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1226. style: Optional[Style] = None,
  1227. key: Optional[Any] = None,
  1228. id: Optional[Any] = None,
  1229. class_name: Optional[Any] = None,
  1230. autofocus: Optional[bool] = None,
  1231. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  1232. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  1233. on_change: Optional[
  1234. Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
  1235. ] = None,
  1236. on_click: Optional[EventType[[], BASE_STATE]] = None,
  1237. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  1238. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  1239. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  1240. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  1241. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  1242. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  1243. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  1244. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  1245. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  1246. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  1247. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  1248. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  1249. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  1250. **props,
  1251. ) -> "Select":
  1252. """Create the component.
  1253. Args:
  1254. *children: The children of the component.
  1255. auto_complete: Whether the form control should have autocomplete enabled
  1256. auto_focus: Automatically focuses the select when the page loads
  1257. disabled: Disables the select control
  1258. form: Associates the select with a form (by id)
  1259. multiple: Indicates that multiple options can be selected
  1260. name: Name of the select, used when submitting the form
  1261. required: Indicates that the select control must have a selected option
  1262. size: Number of visible options in a drop-down list
  1263. on_change: Fired when the select value changes
  1264. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  1265. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  1266. content_editable: Indicates whether the element's content is editable.
  1267. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  1268. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  1269. draggable: Defines whether the element can be dragged.
  1270. enter_key_hint: Hints what media types the media element is able to play.
  1271. hidden: Defines whether the element is hidden.
  1272. input_mode: Defines the type of the element.
  1273. item_prop: Defines the name of the element for metadata purposes.
  1274. lang: Defines the language used in the element.
  1275. role: Defines the role of the element.
  1276. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  1277. spell_check: Defines whether the element may be checked for spelling errors.
  1278. tab_index: Defines the position of the current element in the tabbing order.
  1279. title: Defines a tooltip for the element.
  1280. style: The style of the component.
  1281. key: A unique key for the component.
  1282. id: The id for the component.
  1283. class_name: The class name for the component.
  1284. autofocus: Whether the component should take the focus once the page is loaded
  1285. custom_attrs: custom attribute
  1286. **props: The props of the component.
  1287. Returns:
  1288. The component.
  1289. """
  1290. ...
  1291. AUTO_HEIGHT_JS = '\nconst autoHeightOnInput = (e, is_enabled) => {\n if (is_enabled) {\n const el = e.target;\n el.style.overflowY = "scroll";\n el.style.height = "auto";\n el.style.height = (e.target.scrollHeight) + "px";\n if (el.form && !el.form.data_resize_on_reset) {\n el.form.addEventListener("reset", () => window.setTimeout(() => autoHeightOnInput(e, is_enabled), 0))\n el.form.data_resize_on_reset = true;\n }\n }\n}\n'
  1292. ENTER_KEY_SUBMIT_JS = "\nconst enterKeySubmitOnKeyDown = (e, is_enabled) => {\n if (is_enabled && e.which === 13 && !e.shiftKey) {\n e.preventDefault();\n if (!e.repeat) {\n if (e.target.form) {\n e.target.form.requestSubmit();\n }\n }\n }\n}\n"
  1293. class Textarea(BaseHTML):
  1294. @overload
  1295. @classmethod
  1296. def create( # type: ignore
  1297. cls,
  1298. *children,
  1299. auto_complete: Optional[
  1300. Union[Var[Union[bool, int, str]], bool, int, str]
  1301. ] = None,
  1302. auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1303. auto_height: Optional[Union[Var[bool], bool]] = None,
  1304. cols: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1305. default_value: Optional[Union[Var[str], str]] = None,
  1306. dirname: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1307. disabled: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1308. enter_key_submit: Optional[Union[Var[bool], bool]] = None,
  1309. form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1310. max_length: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1311. min_length: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1312. name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1313. placeholder: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1314. read_only: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1315. required: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1316. rows: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1317. value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1318. wrap: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1319. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1320. auto_capitalize: Optional[
  1321. Union[Var[Union[bool, int, str]], bool, int, str]
  1322. ] = None,
  1323. content_editable: Optional[
  1324. Union[Var[Union[bool, int, str]], bool, int, str]
  1325. ] = None,
  1326. context_menu: Optional[
  1327. Union[Var[Union[bool, int, str]], bool, int, str]
  1328. ] = None,
  1329. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1330. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1331. enter_key_hint: Optional[
  1332. Union[Var[Union[bool, int, str]], bool, int, str]
  1333. ] = None,
  1334. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1335. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1336. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1337. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1338. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1339. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1340. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1341. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1342. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  1343. style: Optional[Style] = None,
  1344. key: Optional[Any] = None,
  1345. id: Optional[Any] = None,
  1346. class_name: Optional[Any] = None,
  1347. autofocus: Optional[bool] = None,
  1348. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  1349. on_blur: Optional[
  1350. Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
  1351. ] = None,
  1352. on_change: Optional[
  1353. Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
  1354. ] = None,
  1355. on_click: Optional[EventType[[], BASE_STATE]] = None,
  1356. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  1357. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  1358. on_focus: Optional[
  1359. Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
  1360. ] = None,
  1361. on_key_down: Optional[
  1362. Union[
  1363. EventType[[], BASE_STATE],
  1364. EventType[[str], BASE_STATE],
  1365. EventType[[str, KeyInputInfo], BASE_STATE],
  1366. ]
  1367. ] = None,
  1368. on_key_up: Optional[
  1369. Union[
  1370. EventType[[], BASE_STATE],
  1371. EventType[[str], BASE_STATE],
  1372. EventType[[str, KeyInputInfo], BASE_STATE],
  1373. ]
  1374. ] = None,
  1375. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  1376. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  1377. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  1378. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  1379. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  1380. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  1381. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  1382. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  1383. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  1384. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  1385. **props,
  1386. ) -> "Textarea":
  1387. """Create a textarea component.
  1388. Args:
  1389. *children: The children of the textarea.
  1390. auto_complete: Whether the form control should have autocomplete enabled
  1391. auto_focus: Automatically focuses the textarea when the page loads
  1392. auto_height: Automatically fit the content height to the text (use min-height with this prop)
  1393. cols: Visible width of the text control, in average character widths
  1394. default_value: The default value of the textarea when initially rendered
  1395. dirname: Name part of the textarea to submit in 'dir' and 'name' pair when form is submitted
  1396. disabled: Disables the textarea
  1397. enter_key_submit: Enter key submits form (shift-enter adds new line)
  1398. form: Associates the textarea with a form (by id)
  1399. max_length: Maximum number of characters allowed in the textarea
  1400. min_length: Minimum number of characters required in the textarea
  1401. name: Name of the textarea, used when submitting the form
  1402. placeholder: Placeholder text in the textarea
  1403. read_only: Indicates whether the textarea is read-only
  1404. required: Indicates that the textarea is required
  1405. rows: Visible number of lines in the text control
  1406. value: The controlled value of the textarea, read only unless used with on_change
  1407. wrap: How the text in the textarea is to be wrapped when submitting the form
  1408. on_change: Fired when the input value changes
  1409. on_focus: Fired when the input gains focus
  1410. on_blur: Fired when the input loses focus
  1411. on_key_down: Fired when a key is pressed down
  1412. on_key_up: Fired when a key is released
  1413. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  1414. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  1415. content_editable: Indicates whether the element's content is editable.
  1416. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  1417. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  1418. draggable: Defines whether the element can be dragged.
  1419. enter_key_hint: Hints what media types the media element is able to play.
  1420. hidden: Defines whether the element is hidden.
  1421. input_mode: Defines the type of the element.
  1422. item_prop: Defines the name of the element for metadata purposes.
  1423. lang: Defines the language used in the element.
  1424. role: Defines the role of the element.
  1425. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  1426. spell_check: Defines whether the element may be checked for spelling errors.
  1427. tab_index: Defines the position of the current element in the tabbing order.
  1428. title: Defines a tooltip for the element.
  1429. style: The style of the component.
  1430. key: A unique key for the component.
  1431. id: The id for the component.
  1432. class_name: The class name for the component.
  1433. autofocus: Whether the component should take the focus once the page is loaded
  1434. custom_attrs: custom attribute
  1435. **props: The properties of the textarea.
  1436. Returns:
  1437. The textarea component.
  1438. Raises:
  1439. ValueError: when `enter_key_submit` is combined with `on_key_down`.
  1440. """
  1441. ...
  1442. button = Button.create
  1443. datalist = Datalist.create
  1444. fieldset = Fieldset.create
  1445. form = Form.create
  1446. input = Input.create
  1447. label = Label.create
  1448. legend = Legend.create
  1449. meter = Meter.create
  1450. optgroup = Optgroup.create
  1451. option = Option.create
  1452. output = Output.create
  1453. progress = Progress.create
  1454. select = Select.create
  1455. textarea = Textarea.create