editable.pyi 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. """Stub file for reflex/components/chakra/forms/editable.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, Union
  10. from reflex.components.chakra import ChakraComponent
  11. from reflex.constants import EventTriggers
  12. from reflex.vars import Var
  13. class Editable(ChakraComponent):
  14. def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
  15. @overload
  16. @classmethod
  17. def create( # type: ignore
  18. cls,
  19. *children,
  20. is_disabled: Optional[Union[Var[bool], bool]] = None,
  21. is_preview_focusable: Optional[Union[Var[bool], bool]] = None,
  22. placeholder: Optional[Union[Var[str], str]] = None,
  23. select_all_on_focus: Optional[Union[Var[bool], bool]] = None,
  24. start_with_edit_view: Optional[Union[Var[bool], bool]] = None,
  25. submit_on_blur: Optional[Union[Var[bool], bool]] = None,
  26. value: Optional[Union[Var[str], str]] = None,
  27. default_value: Optional[Union[Var[str], str]] = None,
  28. style: Optional[Style] = None,
  29. key: Optional[Any] = None,
  30. id: Optional[Any] = None,
  31. class_name: Optional[Any] = None,
  32. autofocus: Optional[bool] = None,
  33. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  34. on_blur: Optional[
  35. Union[EventHandler, EventSpec, list, function, BaseVar]
  36. ] = None,
  37. on_cancel: Optional[
  38. Union[EventHandler, EventSpec, list, function, BaseVar]
  39. ] = None,
  40. on_change: Optional[
  41. Union[EventHandler, EventSpec, list, function, BaseVar]
  42. ] = None,
  43. on_click: Optional[
  44. Union[EventHandler, EventSpec, list, function, BaseVar]
  45. ] = None,
  46. on_context_menu: Optional[
  47. Union[EventHandler, EventSpec, list, function, BaseVar]
  48. ] = None,
  49. on_double_click: Optional[
  50. Union[EventHandler, EventSpec, list, function, BaseVar]
  51. ] = None,
  52. on_edit: Optional[
  53. Union[EventHandler, EventSpec, list, function, BaseVar]
  54. ] = None,
  55. on_focus: Optional[
  56. Union[EventHandler, EventSpec, list, function, BaseVar]
  57. ] = None,
  58. on_mount: Optional[
  59. Union[EventHandler, EventSpec, list, function, BaseVar]
  60. ] = None,
  61. on_mouse_down: Optional[
  62. Union[EventHandler, EventSpec, list, function, BaseVar]
  63. ] = None,
  64. on_mouse_enter: Optional[
  65. Union[EventHandler, EventSpec, list, function, BaseVar]
  66. ] = None,
  67. on_mouse_leave: Optional[
  68. Union[EventHandler, EventSpec, list, function, BaseVar]
  69. ] = None,
  70. on_mouse_move: Optional[
  71. Union[EventHandler, EventSpec, list, function, BaseVar]
  72. ] = None,
  73. on_mouse_out: Optional[
  74. Union[EventHandler, EventSpec, list, function, BaseVar]
  75. ] = None,
  76. on_mouse_over: Optional[
  77. Union[EventHandler, EventSpec, list, function, BaseVar]
  78. ] = None,
  79. on_mouse_up: Optional[
  80. Union[EventHandler, EventSpec, list, function, BaseVar]
  81. ] = None,
  82. on_scroll: Optional[
  83. Union[EventHandler, EventSpec, list, function, BaseVar]
  84. ] = None,
  85. on_submit: Optional[
  86. Union[EventHandler, EventSpec, list, function, BaseVar]
  87. ] = None,
  88. on_unmount: Optional[
  89. Union[EventHandler, EventSpec, list, function, BaseVar]
  90. ] = None,
  91. **props
  92. ) -> "Editable":
  93. """Create the component.
  94. Args:
  95. *children: The children of the component.
  96. is_disabled: If true, the Editable will be disabled.
  97. is_preview_focusable: If true, the read only view, has a tabIndex set to 0 so it can receive focus via the keyboard or click.
  98. placeholder: The placeholder text when the value is empty.
  99. select_all_on_focus: If true, the input's text will be highlighted on focus.
  100. start_with_edit_view: If true, the Editable will start with edit mode by default.
  101. submit_on_blur: If true, it'll update the value onBlur and turn off the edit mode.
  102. value: The value of the Editable in both edit & preview mode
  103. default_value: The initial value of the Editable in both edit and preview mode.
  104. style: The style of the component.
  105. key: A unique key for the component.
  106. id: The id for the component.
  107. class_name: The class name for the component.
  108. autofocus: Whether the component should take the focus once the page is loaded
  109. custom_attrs: custom attribute
  110. **props: The props of the component.
  111. Returns:
  112. The component.
  113. Raises:
  114. TypeError: If an invalid child is passed.
  115. """
  116. ...
  117. class EditableInput(ChakraComponent):
  118. @overload
  119. @classmethod
  120. def create( # type: ignore
  121. cls,
  122. *children,
  123. style: Optional[Style] = None,
  124. key: Optional[Any] = None,
  125. id: Optional[Any] = None,
  126. class_name: Optional[Any] = None,
  127. autofocus: Optional[bool] = None,
  128. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  129. on_blur: Optional[
  130. Union[EventHandler, EventSpec, list, function, BaseVar]
  131. ] = None,
  132. on_click: Optional[
  133. Union[EventHandler, EventSpec, list, function, BaseVar]
  134. ] = None,
  135. on_context_menu: Optional[
  136. Union[EventHandler, EventSpec, list, function, BaseVar]
  137. ] = None,
  138. on_double_click: Optional[
  139. Union[EventHandler, EventSpec, list, function, BaseVar]
  140. ] = None,
  141. on_focus: Optional[
  142. Union[EventHandler, EventSpec, list, function, BaseVar]
  143. ] = None,
  144. on_mount: Optional[
  145. Union[EventHandler, EventSpec, list, function, BaseVar]
  146. ] = None,
  147. on_mouse_down: Optional[
  148. Union[EventHandler, EventSpec, list, function, BaseVar]
  149. ] = None,
  150. on_mouse_enter: Optional[
  151. Union[EventHandler, EventSpec, list, function, BaseVar]
  152. ] = None,
  153. on_mouse_leave: Optional[
  154. Union[EventHandler, EventSpec, list, function, BaseVar]
  155. ] = None,
  156. on_mouse_move: Optional[
  157. Union[EventHandler, EventSpec, list, function, BaseVar]
  158. ] = None,
  159. on_mouse_out: Optional[
  160. Union[EventHandler, EventSpec, list, function, BaseVar]
  161. ] = None,
  162. on_mouse_over: Optional[
  163. Union[EventHandler, EventSpec, list, function, BaseVar]
  164. ] = None,
  165. on_mouse_up: Optional[
  166. Union[EventHandler, EventSpec, list, function, BaseVar]
  167. ] = None,
  168. on_scroll: Optional[
  169. Union[EventHandler, EventSpec, list, function, BaseVar]
  170. ] = None,
  171. on_unmount: Optional[
  172. Union[EventHandler, EventSpec, list, function, BaseVar]
  173. ] = None,
  174. **props
  175. ) -> "EditableInput":
  176. """Create the component.
  177. Args:
  178. *children: The children of the component.
  179. style: The style of the component.
  180. key: A unique key for the component.
  181. id: The id for the component.
  182. class_name: The class name for the component.
  183. autofocus: Whether the component should take the focus once the page is loaded
  184. custom_attrs: custom attribute
  185. **props: The props of the component.
  186. Returns:
  187. The component.
  188. Raises:
  189. TypeError: If an invalid child is passed.
  190. """
  191. ...
  192. class EditableTextarea(ChakraComponent):
  193. @overload
  194. @classmethod
  195. def create( # type: ignore
  196. cls,
  197. *children,
  198. style: Optional[Style] = None,
  199. key: Optional[Any] = None,
  200. id: Optional[Any] = None,
  201. class_name: Optional[Any] = None,
  202. autofocus: Optional[bool] = None,
  203. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  204. on_blur: Optional[
  205. Union[EventHandler, EventSpec, list, function, BaseVar]
  206. ] = None,
  207. on_click: Optional[
  208. Union[EventHandler, EventSpec, list, function, BaseVar]
  209. ] = None,
  210. on_context_menu: Optional[
  211. Union[EventHandler, EventSpec, list, function, BaseVar]
  212. ] = None,
  213. on_double_click: Optional[
  214. Union[EventHandler, EventSpec, list, function, BaseVar]
  215. ] = None,
  216. on_focus: Optional[
  217. Union[EventHandler, EventSpec, list, function, BaseVar]
  218. ] = None,
  219. on_mount: Optional[
  220. Union[EventHandler, EventSpec, list, function, BaseVar]
  221. ] = None,
  222. on_mouse_down: Optional[
  223. Union[EventHandler, EventSpec, list, function, BaseVar]
  224. ] = None,
  225. on_mouse_enter: Optional[
  226. Union[EventHandler, EventSpec, list, function, BaseVar]
  227. ] = None,
  228. on_mouse_leave: Optional[
  229. Union[EventHandler, EventSpec, list, function, BaseVar]
  230. ] = None,
  231. on_mouse_move: Optional[
  232. Union[EventHandler, EventSpec, list, function, BaseVar]
  233. ] = None,
  234. on_mouse_out: Optional[
  235. Union[EventHandler, EventSpec, list, function, BaseVar]
  236. ] = None,
  237. on_mouse_over: Optional[
  238. Union[EventHandler, EventSpec, list, function, BaseVar]
  239. ] = None,
  240. on_mouse_up: Optional[
  241. Union[EventHandler, EventSpec, list, function, BaseVar]
  242. ] = None,
  243. on_scroll: Optional[
  244. Union[EventHandler, EventSpec, list, function, BaseVar]
  245. ] = None,
  246. on_unmount: Optional[
  247. Union[EventHandler, EventSpec, list, function, BaseVar]
  248. ] = None,
  249. **props
  250. ) -> "EditableTextarea":
  251. """Create the component.
  252. Args:
  253. *children: The children of the component.
  254. style: The style of the component.
  255. key: A unique key for the component.
  256. id: The id for the component.
  257. class_name: The class name for the component.
  258. autofocus: Whether the component should take the focus once the page is loaded
  259. custom_attrs: custom attribute
  260. **props: The props of the component.
  261. Returns:
  262. The component.
  263. Raises:
  264. TypeError: If an invalid child is passed.
  265. """
  266. ...
  267. class EditablePreview(ChakraComponent):
  268. @overload
  269. @classmethod
  270. def create( # type: ignore
  271. cls,
  272. *children,
  273. style: Optional[Style] = None,
  274. key: Optional[Any] = None,
  275. id: Optional[Any] = None,
  276. class_name: Optional[Any] = None,
  277. autofocus: Optional[bool] = None,
  278. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  279. on_blur: Optional[
  280. Union[EventHandler, EventSpec, list, function, BaseVar]
  281. ] = None,
  282. on_click: Optional[
  283. Union[EventHandler, EventSpec, list, function, BaseVar]
  284. ] = None,
  285. on_context_menu: Optional[
  286. Union[EventHandler, EventSpec, list, function, BaseVar]
  287. ] = None,
  288. on_double_click: Optional[
  289. Union[EventHandler, EventSpec, list, function, BaseVar]
  290. ] = None,
  291. on_focus: Optional[
  292. Union[EventHandler, EventSpec, list, function, BaseVar]
  293. ] = None,
  294. on_mount: Optional[
  295. Union[EventHandler, EventSpec, list, function, BaseVar]
  296. ] = None,
  297. on_mouse_down: Optional[
  298. Union[EventHandler, EventSpec, list, function, BaseVar]
  299. ] = None,
  300. on_mouse_enter: Optional[
  301. Union[EventHandler, EventSpec, list, function, BaseVar]
  302. ] = None,
  303. on_mouse_leave: Optional[
  304. Union[EventHandler, EventSpec, list, function, BaseVar]
  305. ] = None,
  306. on_mouse_move: Optional[
  307. Union[EventHandler, EventSpec, list, function, BaseVar]
  308. ] = None,
  309. on_mouse_out: Optional[
  310. Union[EventHandler, EventSpec, list, function, BaseVar]
  311. ] = None,
  312. on_mouse_over: Optional[
  313. Union[EventHandler, EventSpec, list, function, BaseVar]
  314. ] = None,
  315. on_mouse_up: Optional[
  316. Union[EventHandler, EventSpec, list, function, BaseVar]
  317. ] = None,
  318. on_scroll: Optional[
  319. Union[EventHandler, EventSpec, list, function, BaseVar]
  320. ] = None,
  321. on_unmount: Optional[
  322. Union[EventHandler, EventSpec, list, function, BaseVar]
  323. ] = None,
  324. **props
  325. ) -> "EditablePreview":
  326. """Create the component.
  327. Args:
  328. *children: The children of the component.
  329. style: The style of the component.
  330. key: A unique key for the component.
  331. id: The id for the component.
  332. class_name: The class name for the component.
  333. autofocus: Whether the component should take the focus once the page is loaded
  334. custom_attrs: custom attribute
  335. **props: The props of the component.
  336. Returns:
  337. The component.
  338. Raises:
  339. TypeError: If an invalid child is passed.
  340. """
  341. ...