textarea.pyi 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. """Stub file for reflex/components/radix/themes/components/textarea.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 typing import Any, Dict, Literal
  10. from reflex import el
  11. from reflex.components.component import Component
  12. from reflex.components.core.debounce import DebounceInput
  13. from reflex.constants import EventTriggers
  14. from reflex.vars import Var
  15. from ..base import LiteralAccentColor, RadixThemesComponent
  16. LiteralTextAreaSize = Literal["1", "2", "3"]
  17. class TextArea(RadixThemesComponent, el.Textarea):
  18. @overload
  19. @classmethod
  20. def create( # type: ignore
  21. cls,
  22. *children,
  23. size: Optional[
  24. Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
  25. ] = None,
  26. variant: Optional[
  27. Union[
  28. Var[Literal["classic", "surface", "soft"]],
  29. Literal["classic", "surface", "soft"],
  30. ]
  31. ] = None,
  32. color_scheme: Optional[
  33. Union[
  34. Var[
  35. Literal[
  36. "tomato",
  37. "red",
  38. "ruby",
  39. "crimson",
  40. "pink",
  41. "plum",
  42. "purple",
  43. "violet",
  44. "iris",
  45. "indigo",
  46. "blue",
  47. "cyan",
  48. "teal",
  49. "jade",
  50. "green",
  51. "grass",
  52. "brown",
  53. "orange",
  54. "sky",
  55. "mint",
  56. "lime",
  57. "yellow",
  58. "amber",
  59. "gold",
  60. "bronze",
  61. "gray",
  62. ]
  63. ],
  64. Literal[
  65. "tomato",
  66. "red",
  67. "ruby",
  68. "crimson",
  69. "pink",
  70. "plum",
  71. "purple",
  72. "violet",
  73. "iris",
  74. "indigo",
  75. "blue",
  76. "cyan",
  77. "teal",
  78. "jade",
  79. "green",
  80. "grass",
  81. "brown",
  82. "orange",
  83. "sky",
  84. "mint",
  85. "lime",
  86. "yellow",
  87. "amber",
  88. "gold",
  89. "bronze",
  90. "gray",
  91. ],
  92. ]
  93. ] = None,
  94. auto_complete: Optional[
  95. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  96. ] = None,
  97. auto_focus: Optional[
  98. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  99. ] = None,
  100. cols: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  101. dirname: Optional[
  102. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  103. ] = None,
  104. disabled: Optional[
  105. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  106. ] = None,
  107. form: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  108. max_length: Optional[
  109. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  110. ] = None,
  111. min_length: Optional[
  112. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  113. ] = None,
  114. name: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  115. placeholder: Optional[
  116. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  117. ] = None,
  118. read_only: Optional[
  119. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  120. ] = None,
  121. required: Optional[
  122. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  123. ] = None,
  124. rows: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  125. value: Optional[
  126. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  127. ] = None,
  128. wrap: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  129. access_key: Optional[
  130. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  131. ] = None,
  132. auto_capitalize: Optional[
  133. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  134. ] = None,
  135. content_editable: Optional[
  136. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  137. ] = None,
  138. context_menu: Optional[
  139. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  140. ] = None,
  141. dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  142. draggable: Optional[
  143. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  144. ] = None,
  145. enter_key_hint: Optional[
  146. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  147. ] = None,
  148. hidden: Optional[
  149. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  150. ] = None,
  151. input_mode: Optional[
  152. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  153. ] = None,
  154. item_prop: Optional[
  155. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  156. ] = None,
  157. lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  158. role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  159. slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  160. spell_check: Optional[
  161. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  162. ] = None,
  163. tab_index: Optional[
  164. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  165. ] = None,
  166. title: Optional[
  167. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  168. ] = None,
  169. translate: Optional[
  170. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  171. ] = None,
  172. style: Optional[Style] = None,
  173. key: Optional[Any] = None,
  174. id: Optional[Any] = None,
  175. class_name: Optional[Any] = None,
  176. autofocus: Optional[bool] = None,
  177. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  178. on_blur: Optional[
  179. Union[EventHandler, EventSpec, list, function, BaseVar]
  180. ] = None,
  181. on_change: Optional[
  182. Union[EventHandler, EventSpec, list, function, BaseVar]
  183. ] = None,
  184. on_click: Optional[
  185. Union[EventHandler, EventSpec, list, function, BaseVar]
  186. ] = None,
  187. on_context_menu: Optional[
  188. Union[EventHandler, EventSpec, list, function, BaseVar]
  189. ] = None,
  190. on_double_click: Optional[
  191. Union[EventHandler, EventSpec, list, function, BaseVar]
  192. ] = None,
  193. on_focus: Optional[
  194. Union[EventHandler, EventSpec, list, function, BaseVar]
  195. ] = None,
  196. on_key_down: Optional[
  197. Union[EventHandler, EventSpec, list, function, BaseVar]
  198. ] = None,
  199. on_key_up: Optional[
  200. Union[EventHandler, EventSpec, list, function, BaseVar]
  201. ] = None,
  202. on_mount: Optional[
  203. Union[EventHandler, EventSpec, list, function, BaseVar]
  204. ] = None,
  205. on_mouse_down: Optional[
  206. Union[EventHandler, EventSpec, list, function, BaseVar]
  207. ] = None,
  208. on_mouse_enter: Optional[
  209. Union[EventHandler, EventSpec, list, function, BaseVar]
  210. ] = None,
  211. on_mouse_leave: Optional[
  212. Union[EventHandler, EventSpec, list, function, BaseVar]
  213. ] = None,
  214. on_mouse_move: Optional[
  215. Union[EventHandler, EventSpec, list, function, BaseVar]
  216. ] = None,
  217. on_mouse_out: Optional[
  218. Union[EventHandler, EventSpec, list, function, BaseVar]
  219. ] = None,
  220. on_mouse_over: Optional[
  221. Union[EventHandler, EventSpec, list, function, BaseVar]
  222. ] = None,
  223. on_mouse_up: Optional[
  224. Union[EventHandler, EventSpec, list, function, BaseVar]
  225. ] = None,
  226. on_scroll: Optional[
  227. Union[EventHandler, EventSpec, list, function, BaseVar]
  228. ] = None,
  229. on_unmount: Optional[
  230. Union[EventHandler, EventSpec, list, function, BaseVar]
  231. ] = None,
  232. **props
  233. ) -> "TextArea":
  234. """Create an Input component.
  235. Args:
  236. *children: The children of the component.
  237. size: The size of the text area: "1" | "2" | "3"
  238. variant: The variant of the text area
  239. color_scheme: The color of the text area
  240. auto_complete: Whether the form control should have autocomplete enabled
  241. auto_focus: Automatically focuses the textarea when the page loads
  242. cols: Visible width of the text control, in average character widths
  243. dirname: Name part of the textarea to submit in 'dir' and 'name' pair when form is submitted
  244. disabled: Disables the textarea
  245. form: Associates the textarea with a form (by id)
  246. max_length: Maximum number of characters allowed in the textarea
  247. min_length: Minimum number of characters required in the textarea
  248. name: Name of the textarea, used when submitting the form
  249. placeholder: Placeholder text in the textarea
  250. read_only: Indicates whether the textarea is read-only
  251. required: Indicates that the textarea is required
  252. rows: Visible number of lines in the text control
  253. value: The controlled value of the textarea, read only unless used with on_change
  254. wrap: How the text in the textarea is to be wrapped when submitting the form
  255. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  256. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  257. content_editable: Indicates whether the element's content is editable.
  258. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  259. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  260. draggable: Defines whether the element can be dragged.
  261. enter_key_hint: Hints what media types the media element is able to play.
  262. hidden: Defines whether the element is hidden.
  263. input_mode: Defines the type of the element.
  264. item_prop: Defines the name of the element for metadata purposes.
  265. lang: Defines the language used in the element.
  266. role: Defines the role of the element.
  267. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  268. spell_check: Defines whether the element may be checked for spelling errors.
  269. tab_index: Defines the position of the current element in the tabbing order.
  270. title: Defines a tooltip for the element.
  271. translate: Specifies whether the content of an element should be translated or not.
  272. style: The style of the component.
  273. key: A unique key for the component.
  274. id: The id for the component.
  275. class_name: The class name for the component.
  276. autofocus: Whether the component should take the focus once the page is loaded
  277. custom_attrs: custom attribute
  278. **props: The properties of the component.
  279. Returns:
  280. The component.
  281. """
  282. ...
  283. def get_event_triggers(self) -> Dict[str, Any]: ...
  284. text_area = TextArea.create