textfield.pyi 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105
  1. """Stub file for reflex/components/radix/themes/components/textfield.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 types import SimpleNamespace
  10. from typing import Any, Dict, Literal
  11. import reflex as rx
  12. from reflex.components import el
  13. from reflex.components.component import Component
  14. from reflex.components.core.debounce import DebounceInput
  15. from reflex.components.radix.themes.components.icons import Icon
  16. from reflex.constants import EventTriggers
  17. from reflex.vars import Var
  18. from ..base import LiteralAccentColor, LiteralRadius, LiteralSize, RadixThemesComponent
  19. LiteralTextFieldSize = Literal["1", "2", "3"]
  20. LiteralTextFieldVariant = Literal["classic", "surface", "soft"]
  21. class TextFieldRoot(el.Div, RadixThemesComponent):
  22. @overload
  23. @classmethod
  24. def create( # type: ignore
  25. cls,
  26. *children,
  27. color: Optional[Union[Var[str], str]] = None,
  28. color_scheme: Optional[
  29. Union[
  30. Var[
  31. Literal[
  32. "tomato",
  33. "red",
  34. "ruby",
  35. "crimson",
  36. "pink",
  37. "plum",
  38. "purple",
  39. "violet",
  40. "iris",
  41. "indigo",
  42. "blue",
  43. "cyan",
  44. "teal",
  45. "jade",
  46. "green",
  47. "grass",
  48. "brown",
  49. "orange",
  50. "sky",
  51. "mint",
  52. "lime",
  53. "yellow",
  54. "amber",
  55. "gold",
  56. "bronze",
  57. "gray",
  58. ]
  59. ],
  60. Literal[
  61. "tomato",
  62. "red",
  63. "ruby",
  64. "crimson",
  65. "pink",
  66. "plum",
  67. "purple",
  68. "violet",
  69. "iris",
  70. "indigo",
  71. "blue",
  72. "cyan",
  73. "teal",
  74. "jade",
  75. "green",
  76. "grass",
  77. "brown",
  78. "orange",
  79. "sky",
  80. "mint",
  81. "lime",
  82. "yellow",
  83. "amber",
  84. "gold",
  85. "bronze",
  86. "gray",
  87. ],
  88. ]
  89. ] = None,
  90. size: Optional[
  91. Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
  92. ] = None,
  93. variant: Optional[
  94. Union[
  95. Var[Literal["classic", "surface", "soft"]],
  96. Literal["classic", "surface", "soft"],
  97. ]
  98. ] = None,
  99. radius: Optional[
  100. Union[
  101. Var[Literal["none", "small", "medium", "large", "full"]],
  102. Literal["none", "small", "medium", "large", "full"],
  103. ]
  104. ] = None,
  105. access_key: Optional[
  106. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  107. ] = None,
  108. auto_capitalize: Optional[
  109. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  110. ] = None,
  111. content_editable: Optional[
  112. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  113. ] = None,
  114. context_menu: Optional[
  115. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  116. ] = None,
  117. dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  118. draggable: Optional[
  119. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  120. ] = None,
  121. enter_key_hint: Optional[
  122. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  123. ] = None,
  124. hidden: Optional[
  125. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  126. ] = None,
  127. input_mode: Optional[
  128. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  129. ] = None,
  130. item_prop: Optional[
  131. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  132. ] = None,
  133. lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  134. role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  135. slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  136. spell_check: Optional[
  137. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  138. ] = None,
  139. tab_index: Optional[
  140. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  141. ] = None,
  142. title: Optional[
  143. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  144. ] = None,
  145. translate: Optional[
  146. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  147. ] = None,
  148. style: Optional[Style] = None,
  149. key: Optional[Any] = None,
  150. id: Optional[Any] = None,
  151. class_name: Optional[Any] = None,
  152. autofocus: Optional[bool] = None,
  153. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  154. on_blur: Optional[
  155. Union[EventHandler, EventSpec, list, function, BaseVar]
  156. ] = None,
  157. on_click: Optional[
  158. Union[EventHandler, EventSpec, list, function, BaseVar]
  159. ] = None,
  160. on_context_menu: Optional[
  161. Union[EventHandler, EventSpec, list, function, BaseVar]
  162. ] = None,
  163. on_double_click: Optional[
  164. Union[EventHandler, EventSpec, list, function, BaseVar]
  165. ] = None,
  166. on_focus: Optional[
  167. Union[EventHandler, EventSpec, list, function, BaseVar]
  168. ] = None,
  169. on_mount: Optional[
  170. Union[EventHandler, EventSpec, list, function, BaseVar]
  171. ] = None,
  172. on_mouse_down: Optional[
  173. Union[EventHandler, EventSpec, list, function, BaseVar]
  174. ] = None,
  175. on_mouse_enter: Optional[
  176. Union[EventHandler, EventSpec, list, function, BaseVar]
  177. ] = None,
  178. on_mouse_leave: Optional[
  179. Union[EventHandler, EventSpec, list, function, BaseVar]
  180. ] = None,
  181. on_mouse_move: Optional[
  182. Union[EventHandler, EventSpec, list, function, BaseVar]
  183. ] = None,
  184. on_mouse_out: Optional[
  185. Union[EventHandler, EventSpec, list, function, BaseVar]
  186. ] = None,
  187. on_mouse_over: Optional[
  188. Union[EventHandler, EventSpec, list, function, BaseVar]
  189. ] = None,
  190. on_mouse_up: Optional[
  191. Union[EventHandler, EventSpec, list, function, BaseVar]
  192. ] = None,
  193. on_scroll: Optional[
  194. Union[EventHandler, EventSpec, list, function, BaseVar]
  195. ] = None,
  196. on_unmount: Optional[
  197. Union[EventHandler, EventSpec, list, function, BaseVar]
  198. ] = None,
  199. **props
  200. ) -> "TextFieldRoot":
  201. """Create a new component instance.
  202. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  203. other UI libraries for common names, like Text and Button.
  204. Args:
  205. *children: Child components.
  206. color: map to CSS default color property.
  207. color_scheme: map to radix color property.
  208. size: Text field size "1" - "3"
  209. variant: Variant of text field: "classic" | "surface" | "soft"
  210. radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
  211. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  212. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  213. content_editable: Indicates whether the element's content is editable.
  214. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  215. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  216. draggable: Defines whether the element can be dragged.
  217. enter_key_hint: Hints what media types the media element is able to play.
  218. hidden: Defines whether the element is hidden.
  219. input_mode: Defines the type of the element.
  220. item_prop: Defines the name of the element for metadata purposes.
  221. lang: Defines the language used in the element.
  222. role: Defines the role of the element.
  223. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  224. spell_check: Defines whether the element may be checked for spelling errors.
  225. tab_index: Defines the position of the current element in the tabbing order.
  226. title: Defines a tooltip for the element.
  227. translate: Specifies whether the content of an element should be translated or not.
  228. style: The style of the component.
  229. key: A unique key for the component.
  230. id: The id for the component.
  231. class_name: The class name for the component.
  232. autofocus: Whether the component should take the focus once the page is loaded
  233. custom_attrs: custom attribute
  234. **props: Component properties.
  235. Returns:
  236. A new component instance.
  237. """
  238. ...
  239. class TextFieldInput(el.Input, TextFieldRoot):
  240. @overload
  241. @classmethod
  242. def create( # type: ignore
  243. cls,
  244. *children,
  245. accept: Optional[
  246. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  247. ] = None,
  248. alt: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  249. auto_complete: Optional[
  250. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  251. ] = None,
  252. auto_focus: Optional[
  253. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  254. ] = None,
  255. capture: Optional[
  256. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  257. ] = None,
  258. checked: Optional[
  259. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  260. ] = None,
  261. dirname: Optional[
  262. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  263. ] = None,
  264. disabled: Optional[
  265. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  266. ] = None,
  267. form: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  268. form_action: Optional[
  269. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  270. ] = None,
  271. form_enc_type: Optional[
  272. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  273. ] = None,
  274. form_method: Optional[
  275. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  276. ] = None,
  277. form_no_validate: Optional[
  278. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  279. ] = None,
  280. form_target: Optional[
  281. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  282. ] = None,
  283. height: Optional[
  284. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  285. ] = None,
  286. list: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  287. max: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  288. max_length: Optional[
  289. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  290. ] = None,
  291. min_length: Optional[
  292. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  293. ] = None,
  294. min: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  295. multiple: Optional[
  296. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  297. ] = None,
  298. name: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  299. pattern: Optional[
  300. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  301. ] = None,
  302. placeholder: Optional[
  303. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  304. ] = None,
  305. read_only: Optional[
  306. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  307. ] = None,
  308. required: Optional[
  309. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  310. ] = None,
  311. size: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  312. src: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  313. step: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  314. type: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  315. use_map: Optional[
  316. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  317. ] = None,
  318. value: Optional[
  319. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  320. ] = None,
  321. width: Optional[
  322. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  323. ] = None,
  324. variant: Optional[
  325. Union[
  326. Var[Literal["classic", "surface", "soft"]],
  327. Literal["classic", "surface", "soft"],
  328. ]
  329. ] = None,
  330. color_scheme: Optional[
  331. Union[
  332. Var[
  333. Literal[
  334. "tomato",
  335. "red",
  336. "ruby",
  337. "crimson",
  338. "pink",
  339. "plum",
  340. "purple",
  341. "violet",
  342. "iris",
  343. "indigo",
  344. "blue",
  345. "cyan",
  346. "teal",
  347. "jade",
  348. "green",
  349. "grass",
  350. "brown",
  351. "orange",
  352. "sky",
  353. "mint",
  354. "lime",
  355. "yellow",
  356. "amber",
  357. "gold",
  358. "bronze",
  359. "gray",
  360. ]
  361. ],
  362. Literal[
  363. "tomato",
  364. "red",
  365. "ruby",
  366. "crimson",
  367. "pink",
  368. "plum",
  369. "purple",
  370. "violet",
  371. "iris",
  372. "indigo",
  373. "blue",
  374. "cyan",
  375. "teal",
  376. "jade",
  377. "green",
  378. "grass",
  379. "brown",
  380. "orange",
  381. "sky",
  382. "mint",
  383. "lime",
  384. "yellow",
  385. "amber",
  386. "gold",
  387. "bronze",
  388. "gray",
  389. ],
  390. ]
  391. ] = None,
  392. radius: Optional[
  393. Union[
  394. Var[Literal["none", "small", "medium", "large", "full"]],
  395. Literal["none", "small", "medium", "large", "full"],
  396. ]
  397. ] = None,
  398. access_key: Optional[
  399. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  400. ] = None,
  401. auto_capitalize: Optional[
  402. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  403. ] = None,
  404. content_editable: Optional[
  405. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  406. ] = None,
  407. context_menu: Optional[
  408. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  409. ] = None,
  410. dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  411. draggable: Optional[
  412. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  413. ] = None,
  414. enter_key_hint: Optional[
  415. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  416. ] = None,
  417. hidden: Optional[
  418. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  419. ] = None,
  420. input_mode: Optional[
  421. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  422. ] = None,
  423. item_prop: Optional[
  424. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  425. ] = None,
  426. lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  427. role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  428. slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  429. spell_check: Optional[
  430. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  431. ] = None,
  432. tab_index: Optional[
  433. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  434. ] = None,
  435. title: Optional[
  436. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  437. ] = None,
  438. translate: Optional[
  439. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  440. ] = None,
  441. style: Optional[Style] = None,
  442. key: Optional[Any] = None,
  443. id: Optional[Any] = None,
  444. class_name: Optional[Any] = None,
  445. autofocus: Optional[bool] = None,
  446. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  447. on_blur: Optional[
  448. Union[EventHandler, EventSpec, list, function, BaseVar]
  449. ] = None,
  450. on_change: Optional[
  451. Union[EventHandler, EventSpec, list, function, BaseVar]
  452. ] = None,
  453. on_click: Optional[
  454. Union[EventHandler, EventSpec, list, function, BaseVar]
  455. ] = None,
  456. on_context_menu: Optional[
  457. Union[EventHandler, EventSpec, list, function, BaseVar]
  458. ] = None,
  459. on_double_click: Optional[
  460. Union[EventHandler, EventSpec, list, function, BaseVar]
  461. ] = None,
  462. on_focus: Optional[
  463. Union[EventHandler, EventSpec, list, function, BaseVar]
  464. ] = None,
  465. on_key_down: Optional[
  466. Union[EventHandler, EventSpec, list, function, BaseVar]
  467. ] = None,
  468. on_key_up: Optional[
  469. Union[EventHandler, EventSpec, list, function, BaseVar]
  470. ] = None,
  471. on_mount: Optional[
  472. Union[EventHandler, EventSpec, list, function, BaseVar]
  473. ] = None,
  474. on_mouse_down: Optional[
  475. Union[EventHandler, EventSpec, list, function, BaseVar]
  476. ] = None,
  477. on_mouse_enter: Optional[
  478. Union[EventHandler, EventSpec, list, function, BaseVar]
  479. ] = None,
  480. on_mouse_leave: Optional[
  481. Union[EventHandler, EventSpec, list, function, BaseVar]
  482. ] = None,
  483. on_mouse_move: Optional[
  484. Union[EventHandler, EventSpec, list, function, BaseVar]
  485. ] = None,
  486. on_mouse_out: Optional[
  487. Union[EventHandler, EventSpec, list, function, BaseVar]
  488. ] = None,
  489. on_mouse_over: Optional[
  490. Union[EventHandler, EventSpec, list, function, BaseVar]
  491. ] = None,
  492. on_mouse_up: Optional[
  493. Union[EventHandler, EventSpec, list, function, BaseVar]
  494. ] = None,
  495. on_scroll: Optional[
  496. Union[EventHandler, EventSpec, list, function, BaseVar]
  497. ] = None,
  498. on_unmount: Optional[
  499. Union[EventHandler, EventSpec, list, function, BaseVar]
  500. ] = None,
  501. **props
  502. ) -> "TextFieldInput":
  503. """Create an Input component.
  504. Args:
  505. *children: The children of the component.
  506. accept: Accepted types of files when the input is file type
  507. alt: Alternate text for input type="image"
  508. auto_complete: Whether the input should have autocomplete enabled
  509. auto_focus: Automatically focuses the input when the page loads
  510. capture: Captures media from the user (camera or microphone)
  511. checked: Indicates whether the input is checked (for checkboxes and radio buttons)
  512. dirname: Name part of the input to submit in 'dir' and 'name' pair when form is submitted
  513. disabled: Disables the input
  514. form: Associates the input with a form (by id)
  515. form_action: URL to send the form data to (for type="submit" buttons)
  516. form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
  517. form_method: HTTP method to use for sending form data (for type="submit" buttons)
  518. form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
  519. form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
  520. height: The height of the input (only for type="image")
  521. list: References a datalist for suggested options
  522. max: Specifies the maximum value for the input
  523. max_length: Specifies the maximum number of characters allowed in the input
  524. min_length: Specifies the minimum number of characters required in the input
  525. min: Specifies the minimum value for the input
  526. multiple: Indicates whether multiple values can be entered in an input of the type email or file
  527. name: Name of the input, used when sending form data
  528. pattern: Regex pattern the input's value must match to be valid
  529. placeholder: Placeholder text in the input
  530. read_only: Indicates whether the input is read-only
  531. required: Indicates that the input is required
  532. size: Text field size "1" - "3"
  533. src: URL for image inputs
  534. step: Specifies the legal number intervals for an input
  535. type: Specifies the type of input
  536. use_map: Name of the image map used with the input
  537. value: Value of the input
  538. width: The width of the input (only for type="image")
  539. variant: Variant of text field: "classic" | "surface" | "soft"
  540. color_scheme: Override theme color for text field
  541. radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
  542. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  543. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  544. content_editable: Indicates whether the element's content is editable.
  545. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  546. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  547. draggable: Defines whether the element can be dragged.
  548. enter_key_hint: Hints what media types the media element is able to play.
  549. hidden: Defines whether the element is hidden.
  550. input_mode: Defines the type of the element.
  551. item_prop: Defines the name of the element for metadata purposes.
  552. lang: Defines the language used in the element.
  553. role: Defines the role of the element.
  554. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  555. spell_check: Defines whether the element may be checked for spelling errors.
  556. tab_index: Defines the position of the current element in the tabbing order.
  557. title: Defines a tooltip for the element.
  558. translate: Specifies whether the content of an element should be translated or not.
  559. style: The style of the component.
  560. key: A unique key for the component.
  561. id: The id for the component.
  562. class_name: The class name for the component.
  563. autofocus: Whether the component should take the focus once the page is loaded
  564. custom_attrs: custom attribute
  565. **props: The properties of the component.
  566. Returns:
  567. The component.
  568. """
  569. ...
  570. def get_event_triggers(self) -> Dict[str, Any]: ...
  571. class TextFieldSlot(RadixThemesComponent):
  572. @overload
  573. @classmethod
  574. def create( # type: ignore
  575. cls,
  576. *children,
  577. color: Optional[Union[Var[str], str]] = None,
  578. color_scheme: Optional[
  579. Union[
  580. Var[
  581. Literal[
  582. "tomato",
  583. "red",
  584. "ruby",
  585. "crimson",
  586. "pink",
  587. "plum",
  588. "purple",
  589. "violet",
  590. "iris",
  591. "indigo",
  592. "blue",
  593. "cyan",
  594. "teal",
  595. "jade",
  596. "green",
  597. "grass",
  598. "brown",
  599. "orange",
  600. "sky",
  601. "mint",
  602. "lime",
  603. "yellow",
  604. "amber",
  605. "gold",
  606. "bronze",
  607. "gray",
  608. ]
  609. ],
  610. Literal[
  611. "tomato",
  612. "red",
  613. "ruby",
  614. "crimson",
  615. "pink",
  616. "plum",
  617. "purple",
  618. "violet",
  619. "iris",
  620. "indigo",
  621. "blue",
  622. "cyan",
  623. "teal",
  624. "jade",
  625. "green",
  626. "grass",
  627. "brown",
  628. "orange",
  629. "sky",
  630. "mint",
  631. "lime",
  632. "yellow",
  633. "amber",
  634. "gold",
  635. "bronze",
  636. "gray",
  637. ],
  638. ]
  639. ] = None,
  640. gap: Optional[
  641. Union[
  642. Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  643. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  644. ]
  645. ] = None,
  646. style: Optional[Style] = None,
  647. key: Optional[Any] = None,
  648. id: Optional[Any] = None,
  649. class_name: Optional[Any] = None,
  650. autofocus: Optional[bool] = None,
  651. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  652. on_blur: Optional[
  653. Union[EventHandler, EventSpec, list, function, BaseVar]
  654. ] = None,
  655. on_click: Optional[
  656. Union[EventHandler, EventSpec, list, function, BaseVar]
  657. ] = None,
  658. on_context_menu: Optional[
  659. Union[EventHandler, EventSpec, list, function, BaseVar]
  660. ] = None,
  661. on_double_click: Optional[
  662. Union[EventHandler, EventSpec, list, function, BaseVar]
  663. ] = None,
  664. on_focus: Optional[
  665. Union[EventHandler, EventSpec, list, function, BaseVar]
  666. ] = None,
  667. on_mount: Optional[
  668. Union[EventHandler, EventSpec, list, function, BaseVar]
  669. ] = None,
  670. on_mouse_down: Optional[
  671. Union[EventHandler, EventSpec, list, function, BaseVar]
  672. ] = None,
  673. on_mouse_enter: Optional[
  674. Union[EventHandler, EventSpec, list, function, BaseVar]
  675. ] = None,
  676. on_mouse_leave: Optional[
  677. Union[EventHandler, EventSpec, list, function, BaseVar]
  678. ] = None,
  679. on_mouse_move: Optional[
  680. Union[EventHandler, EventSpec, list, function, BaseVar]
  681. ] = None,
  682. on_mouse_out: Optional[
  683. Union[EventHandler, EventSpec, list, function, BaseVar]
  684. ] = None,
  685. on_mouse_over: Optional[
  686. Union[EventHandler, EventSpec, list, function, BaseVar]
  687. ] = None,
  688. on_mouse_up: Optional[
  689. Union[EventHandler, EventSpec, list, function, BaseVar]
  690. ] = None,
  691. on_scroll: Optional[
  692. Union[EventHandler, EventSpec, list, function, BaseVar]
  693. ] = None,
  694. on_unmount: Optional[
  695. Union[EventHandler, EventSpec, list, function, BaseVar]
  696. ] = None,
  697. **props
  698. ) -> "TextFieldSlot":
  699. """Create a new component instance.
  700. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  701. other UI libraries for common names, like Text and Button.
  702. Args:
  703. *children: Child components.
  704. color: map to CSS default color property.
  705. color_scheme: map to radix color property.
  706. gap: Override the gap spacing between slot and input: "1" - "9"
  707. style: The style of the component.
  708. key: A unique key for the component.
  709. id: The id for the component.
  710. class_name: The class name for the component.
  711. autofocus: Whether the component should take the focus once the page is loaded
  712. custom_attrs: custom attribute
  713. **props: Component properties.
  714. Returns:
  715. A new component instance.
  716. """
  717. ...
  718. class Input(RadixThemesComponent):
  719. @overload
  720. @classmethod
  721. def create( # type: ignore
  722. cls,
  723. *children,
  724. icon: Optional[Union[Var[str], str]] = None,
  725. size: Optional[
  726. Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
  727. ] = None,
  728. variant: Optional[
  729. Union[
  730. Var[Literal["classic", "surface", "soft"]],
  731. Literal["classic", "surface", "soft"],
  732. ]
  733. ] = None,
  734. color_scheme: Optional[
  735. Union[
  736. Var[
  737. Literal[
  738. "tomato",
  739. "red",
  740. "ruby",
  741. "crimson",
  742. "pink",
  743. "plum",
  744. "purple",
  745. "violet",
  746. "iris",
  747. "indigo",
  748. "blue",
  749. "cyan",
  750. "teal",
  751. "jade",
  752. "green",
  753. "grass",
  754. "brown",
  755. "orange",
  756. "sky",
  757. "mint",
  758. "lime",
  759. "yellow",
  760. "amber",
  761. "gold",
  762. "bronze",
  763. "gray",
  764. ]
  765. ],
  766. Literal[
  767. "tomato",
  768. "red",
  769. "ruby",
  770. "crimson",
  771. "pink",
  772. "plum",
  773. "purple",
  774. "violet",
  775. "iris",
  776. "indigo",
  777. "blue",
  778. "cyan",
  779. "teal",
  780. "jade",
  781. "green",
  782. "grass",
  783. "brown",
  784. "orange",
  785. "sky",
  786. "mint",
  787. "lime",
  788. "yellow",
  789. "amber",
  790. "gold",
  791. "bronze",
  792. "gray",
  793. ],
  794. ]
  795. ] = None,
  796. radius: Optional[
  797. Union[
  798. Var[Literal["none", "small", "medium", "large", "full"]],
  799. Literal["none", "small", "medium", "large", "full"],
  800. ]
  801. ] = None,
  802. auto_complete: Optional[Union[Var[bool], bool]] = None,
  803. default_value: Optional[Union[Var[str], str]] = None,
  804. disabled: Optional[Union[Var[bool], bool]] = None,
  805. max_length: Optional[Union[Var[str], str]] = None,
  806. min_length: Optional[Union[Var[str], str]] = None,
  807. name: Optional[Union[Var[str], str]] = None,
  808. placeholder: Optional[Union[Var[str], str]] = None,
  809. required: Optional[Union[Var[bool], bool]] = None,
  810. value: Optional[Union[Var[str], str]] = None,
  811. style: Optional[Style] = None,
  812. key: Optional[Any] = None,
  813. id: Optional[Any] = None,
  814. class_name: Optional[Any] = None,
  815. autofocus: Optional[bool] = None,
  816. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  817. on_blur: Optional[
  818. Union[EventHandler, EventSpec, list, function, BaseVar]
  819. ] = None,
  820. on_change: Optional[
  821. Union[EventHandler, EventSpec, list, function, BaseVar]
  822. ] = None,
  823. on_click: Optional[
  824. Union[EventHandler, EventSpec, list, function, BaseVar]
  825. ] = None,
  826. on_context_menu: Optional[
  827. Union[EventHandler, EventSpec, list, function, BaseVar]
  828. ] = None,
  829. on_double_click: Optional[
  830. Union[EventHandler, EventSpec, list, function, BaseVar]
  831. ] = None,
  832. on_focus: Optional[
  833. Union[EventHandler, EventSpec, list, function, BaseVar]
  834. ] = None,
  835. on_key_down: Optional[
  836. Union[EventHandler, EventSpec, list, function, BaseVar]
  837. ] = None,
  838. on_key_up: Optional[
  839. Union[EventHandler, EventSpec, list, function, BaseVar]
  840. ] = None,
  841. on_mount: Optional[
  842. Union[EventHandler, EventSpec, list, function, BaseVar]
  843. ] = None,
  844. on_mouse_down: Optional[
  845. Union[EventHandler, EventSpec, list, function, BaseVar]
  846. ] = None,
  847. on_mouse_enter: Optional[
  848. Union[EventHandler, EventSpec, list, function, BaseVar]
  849. ] = None,
  850. on_mouse_leave: Optional[
  851. Union[EventHandler, EventSpec, list, function, BaseVar]
  852. ] = None,
  853. on_mouse_move: Optional[
  854. Union[EventHandler, EventSpec, list, function, BaseVar]
  855. ] = None,
  856. on_mouse_out: Optional[
  857. Union[EventHandler, EventSpec, list, function, BaseVar]
  858. ] = None,
  859. on_mouse_over: Optional[
  860. Union[EventHandler, EventSpec, list, function, BaseVar]
  861. ] = None,
  862. on_mouse_up: Optional[
  863. Union[EventHandler, EventSpec, list, function, BaseVar]
  864. ] = None,
  865. on_scroll: Optional[
  866. Union[EventHandler, EventSpec, list, function, BaseVar]
  867. ] = None,
  868. on_unmount: Optional[
  869. Union[EventHandler, EventSpec, list, function, BaseVar]
  870. ] = None,
  871. **props
  872. ) -> "Input":
  873. """Create an Input component.
  874. Args:
  875. icon: The icon to render before the input.
  876. size: Text field size "1" - "3"
  877. variant: Variant of text field: "classic" | "surface" | "soft"
  878. color_scheme: Override theme color for text field
  879. radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
  880. auto_complete: Whether the input should have autocomplete enabled
  881. default_value: The value of the input when initially rendered.
  882. disabled: Disables the input
  883. max_length: Specifies the maximum number of characters allowed in the input
  884. min_length: Specifies the minimum number of characters required in the input
  885. name: Name of the input, used when sending form data
  886. placeholder: Placeholder text in the input
  887. required: Indicates that the input is required
  888. value: Value of the input
  889. style: The style of the component.
  890. key: A unique key for the component.
  891. id: The id for the component.
  892. class_name: The class name for the component.
  893. autofocus: Whether the component should take the focus once the page is loaded
  894. custom_attrs: custom attribute
  895. **props: The properties of the component.
  896. Returns:
  897. The component.
  898. """
  899. ...
  900. def get_event_triggers(self) -> Dict[str, Any]: ...
  901. class TextField(SimpleNamespace):
  902. root = staticmethod(TextFieldRoot.create)
  903. input = staticmethod(TextFieldInput.create)
  904. slot = staticmethod(TextFieldSlot.create)
  905. @staticmethod
  906. def __call__(
  907. *children,
  908. icon: Optional[Union[Var[str], str]] = None,
  909. size: Optional[
  910. Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
  911. ] = None,
  912. variant: Optional[
  913. Union[
  914. Var[Literal["classic", "surface", "soft"]],
  915. Literal["classic", "surface", "soft"],
  916. ]
  917. ] = None,
  918. color_scheme: Optional[
  919. Union[
  920. Var[
  921. Literal[
  922. "tomato",
  923. "red",
  924. "ruby",
  925. "crimson",
  926. "pink",
  927. "plum",
  928. "purple",
  929. "violet",
  930. "iris",
  931. "indigo",
  932. "blue",
  933. "cyan",
  934. "teal",
  935. "jade",
  936. "green",
  937. "grass",
  938. "brown",
  939. "orange",
  940. "sky",
  941. "mint",
  942. "lime",
  943. "yellow",
  944. "amber",
  945. "gold",
  946. "bronze",
  947. "gray",
  948. ]
  949. ],
  950. Literal[
  951. "tomato",
  952. "red",
  953. "ruby",
  954. "crimson",
  955. "pink",
  956. "plum",
  957. "purple",
  958. "violet",
  959. "iris",
  960. "indigo",
  961. "blue",
  962. "cyan",
  963. "teal",
  964. "jade",
  965. "green",
  966. "grass",
  967. "brown",
  968. "orange",
  969. "sky",
  970. "mint",
  971. "lime",
  972. "yellow",
  973. "amber",
  974. "gold",
  975. "bronze",
  976. "gray",
  977. ],
  978. ]
  979. ] = None,
  980. radius: Optional[
  981. Union[
  982. Var[Literal["none", "small", "medium", "large", "full"]],
  983. Literal["none", "small", "medium", "large", "full"],
  984. ]
  985. ] = None,
  986. auto_complete: Optional[Union[Var[bool], bool]] = None,
  987. default_value: Optional[Union[Var[str], str]] = None,
  988. disabled: Optional[Union[Var[bool], bool]] = None,
  989. max_length: Optional[Union[Var[str], str]] = None,
  990. min_length: Optional[Union[Var[str], str]] = None,
  991. name: Optional[Union[Var[str], str]] = None,
  992. placeholder: Optional[Union[Var[str], str]] = None,
  993. required: Optional[Union[Var[bool], bool]] = None,
  994. value: Optional[Union[Var[str], str]] = None,
  995. style: Optional[Style] = None,
  996. key: Optional[Any] = None,
  997. id: Optional[Any] = None,
  998. class_name: Optional[Any] = None,
  999. autofocus: Optional[bool] = None,
  1000. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  1001. on_blur: Optional[
  1002. Union[EventHandler, EventSpec, list, function, BaseVar]
  1003. ] = None,
  1004. on_change: Optional[
  1005. Union[EventHandler, EventSpec, list, function, BaseVar]
  1006. ] = None,
  1007. on_click: Optional[
  1008. Union[EventHandler, EventSpec, list, function, BaseVar]
  1009. ] = None,
  1010. on_context_menu: Optional[
  1011. Union[EventHandler, EventSpec, list, function, BaseVar]
  1012. ] = None,
  1013. on_double_click: Optional[
  1014. Union[EventHandler, EventSpec, list, function, BaseVar]
  1015. ] = None,
  1016. on_focus: Optional[
  1017. Union[EventHandler, EventSpec, list, function, BaseVar]
  1018. ] = None,
  1019. on_key_down: Optional[
  1020. Union[EventHandler, EventSpec, list, function, BaseVar]
  1021. ] = None,
  1022. on_key_up: Optional[
  1023. Union[EventHandler, EventSpec, list, function, BaseVar]
  1024. ] = None,
  1025. on_mount: Optional[
  1026. Union[EventHandler, EventSpec, list, function, BaseVar]
  1027. ] = None,
  1028. on_mouse_down: Optional[
  1029. Union[EventHandler, EventSpec, list, function, BaseVar]
  1030. ] = None,
  1031. on_mouse_enter: Optional[
  1032. Union[EventHandler, EventSpec, list, function, BaseVar]
  1033. ] = None,
  1034. on_mouse_leave: Optional[
  1035. Union[EventHandler, EventSpec, list, function, BaseVar]
  1036. ] = None,
  1037. on_mouse_move: Optional[
  1038. Union[EventHandler, EventSpec, list, function, BaseVar]
  1039. ] = None,
  1040. on_mouse_out: Optional[
  1041. Union[EventHandler, EventSpec, list, function, BaseVar]
  1042. ] = None,
  1043. on_mouse_over: Optional[
  1044. Union[EventHandler, EventSpec, list, function, BaseVar]
  1045. ] = None,
  1046. on_mouse_up: Optional[
  1047. Union[EventHandler, EventSpec, list, function, BaseVar]
  1048. ] = None,
  1049. on_scroll: Optional[
  1050. Union[EventHandler, EventSpec, list, function, BaseVar]
  1051. ] = None,
  1052. on_unmount: Optional[
  1053. Union[EventHandler, EventSpec, list, function, BaseVar]
  1054. ] = None,
  1055. **props
  1056. ) -> "Input":
  1057. """Create an Input component.
  1058. Args:
  1059. icon: The icon to render before the input.
  1060. size: Text field size "1" - "3"
  1061. variant: Variant of text field: "classic" | "surface" | "soft"
  1062. color_scheme: Override theme color for text field
  1063. radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
  1064. auto_complete: Whether the input should have autocomplete enabled
  1065. default_value: The value of the input when initially rendered.
  1066. disabled: Disables the input
  1067. max_length: Specifies the maximum number of characters allowed in the input
  1068. min_length: Specifies the minimum number of characters required in the input
  1069. name: Name of the input, used when sending form data
  1070. placeholder: Placeholder text in the input
  1071. required: Indicates that the input is required
  1072. value: Value of the input
  1073. style: The style of the component.
  1074. key: A unique key for the component.
  1075. id: The id for the component.
  1076. class_name: The class name for the component.
  1077. autofocus: Whether the component should take the focus once the page is loaded
  1078. custom_attrs: custom attribute
  1079. **props: The properties of the component.
  1080. Returns:
  1081. The component.
  1082. """
  1083. ...
  1084. text_field = TextField()