editable.pyi 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. """Stub file for reflex/components/chakra/forms/editable.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/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. """
  114. ...
  115. class EditableInput(ChakraComponent):
  116. @overload
  117. @classmethod
  118. def create( # type: ignore
  119. cls,
  120. *children,
  121. style: Optional[Style] = None,
  122. key: Optional[Any] = None,
  123. id: Optional[Any] = None,
  124. class_name: Optional[Any] = None,
  125. autofocus: Optional[bool] = None,
  126. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  127. on_blur: Optional[
  128. Union[EventHandler, EventSpec, list, function, BaseVar]
  129. ] = None,
  130. on_click: Optional[
  131. Union[EventHandler, EventSpec, list, function, BaseVar]
  132. ] = None,
  133. on_context_menu: Optional[
  134. Union[EventHandler, EventSpec, list, function, BaseVar]
  135. ] = None,
  136. on_double_click: Optional[
  137. Union[EventHandler, EventSpec, list, function, BaseVar]
  138. ] = None,
  139. on_focus: Optional[
  140. Union[EventHandler, EventSpec, list, function, BaseVar]
  141. ] = None,
  142. on_mount: Optional[
  143. Union[EventHandler, EventSpec, list, function, BaseVar]
  144. ] = None,
  145. on_mouse_down: Optional[
  146. Union[EventHandler, EventSpec, list, function, BaseVar]
  147. ] = None,
  148. on_mouse_enter: Optional[
  149. Union[EventHandler, EventSpec, list, function, BaseVar]
  150. ] = None,
  151. on_mouse_leave: Optional[
  152. Union[EventHandler, EventSpec, list, function, BaseVar]
  153. ] = None,
  154. on_mouse_move: Optional[
  155. Union[EventHandler, EventSpec, list, function, BaseVar]
  156. ] = None,
  157. on_mouse_out: Optional[
  158. Union[EventHandler, EventSpec, list, function, BaseVar]
  159. ] = None,
  160. on_mouse_over: Optional[
  161. Union[EventHandler, EventSpec, list, function, BaseVar]
  162. ] = None,
  163. on_mouse_up: Optional[
  164. Union[EventHandler, EventSpec, list, function, BaseVar]
  165. ] = None,
  166. on_scroll: Optional[
  167. Union[EventHandler, EventSpec, list, function, BaseVar]
  168. ] = None,
  169. on_unmount: Optional[
  170. Union[EventHandler, EventSpec, list, function, BaseVar]
  171. ] = None,
  172. **props
  173. ) -> "EditableInput":
  174. """Create the component.
  175. Args:
  176. *children: The children of the component.
  177. style: The style of the component.
  178. key: A unique key for the component.
  179. id: The id for the component.
  180. class_name: The class name for the component.
  181. autofocus: Whether the component should take the focus once the page is loaded
  182. custom_attrs: custom attribute
  183. **props: The props of the component.
  184. Returns:
  185. The component.
  186. """
  187. ...
  188. class EditableTextarea(ChakraComponent):
  189. @overload
  190. @classmethod
  191. def create( # type: ignore
  192. cls,
  193. *children,
  194. style: Optional[Style] = None,
  195. key: Optional[Any] = None,
  196. id: Optional[Any] = None,
  197. class_name: Optional[Any] = None,
  198. autofocus: Optional[bool] = None,
  199. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  200. on_blur: Optional[
  201. Union[EventHandler, EventSpec, list, function, BaseVar]
  202. ] = None,
  203. on_click: Optional[
  204. Union[EventHandler, EventSpec, list, function, BaseVar]
  205. ] = None,
  206. on_context_menu: Optional[
  207. Union[EventHandler, EventSpec, list, function, BaseVar]
  208. ] = None,
  209. on_double_click: Optional[
  210. Union[EventHandler, EventSpec, list, function, BaseVar]
  211. ] = None,
  212. on_focus: Optional[
  213. Union[EventHandler, EventSpec, list, function, BaseVar]
  214. ] = None,
  215. on_mount: Optional[
  216. Union[EventHandler, EventSpec, list, function, BaseVar]
  217. ] = None,
  218. on_mouse_down: Optional[
  219. Union[EventHandler, EventSpec, list, function, BaseVar]
  220. ] = None,
  221. on_mouse_enter: Optional[
  222. Union[EventHandler, EventSpec, list, function, BaseVar]
  223. ] = None,
  224. on_mouse_leave: Optional[
  225. Union[EventHandler, EventSpec, list, function, BaseVar]
  226. ] = None,
  227. on_mouse_move: Optional[
  228. Union[EventHandler, EventSpec, list, function, BaseVar]
  229. ] = None,
  230. on_mouse_out: Optional[
  231. Union[EventHandler, EventSpec, list, function, BaseVar]
  232. ] = None,
  233. on_mouse_over: Optional[
  234. Union[EventHandler, EventSpec, list, function, BaseVar]
  235. ] = None,
  236. on_mouse_up: Optional[
  237. Union[EventHandler, EventSpec, list, function, BaseVar]
  238. ] = None,
  239. on_scroll: Optional[
  240. Union[EventHandler, EventSpec, list, function, BaseVar]
  241. ] = None,
  242. on_unmount: Optional[
  243. Union[EventHandler, EventSpec, list, function, BaseVar]
  244. ] = None,
  245. **props
  246. ) -> "EditableTextarea":
  247. """Create the component.
  248. Args:
  249. *children: The children of the component.
  250. style: The style of the component.
  251. key: A unique key for the component.
  252. id: The id for the component.
  253. class_name: The class name for the component.
  254. autofocus: Whether the component should take the focus once the page is loaded
  255. custom_attrs: custom attribute
  256. **props: The props of the component.
  257. Returns:
  258. The component.
  259. """
  260. ...
  261. class EditablePreview(ChakraComponent):
  262. @overload
  263. @classmethod
  264. def create( # type: ignore
  265. cls,
  266. *children,
  267. style: Optional[Style] = None,
  268. key: Optional[Any] = None,
  269. id: Optional[Any] = None,
  270. class_name: Optional[Any] = None,
  271. autofocus: Optional[bool] = None,
  272. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  273. on_blur: Optional[
  274. Union[EventHandler, EventSpec, list, function, BaseVar]
  275. ] = None,
  276. on_click: Optional[
  277. Union[EventHandler, EventSpec, list, function, BaseVar]
  278. ] = None,
  279. on_context_menu: Optional[
  280. Union[EventHandler, EventSpec, list, function, BaseVar]
  281. ] = None,
  282. on_double_click: Optional[
  283. Union[EventHandler, EventSpec, list, function, BaseVar]
  284. ] = None,
  285. on_focus: Optional[
  286. Union[EventHandler, EventSpec, list, function, BaseVar]
  287. ] = None,
  288. on_mount: Optional[
  289. Union[EventHandler, EventSpec, list, function, BaseVar]
  290. ] = None,
  291. on_mouse_down: Optional[
  292. Union[EventHandler, EventSpec, list, function, BaseVar]
  293. ] = None,
  294. on_mouse_enter: Optional[
  295. Union[EventHandler, EventSpec, list, function, BaseVar]
  296. ] = None,
  297. on_mouse_leave: Optional[
  298. Union[EventHandler, EventSpec, list, function, BaseVar]
  299. ] = None,
  300. on_mouse_move: Optional[
  301. Union[EventHandler, EventSpec, list, function, BaseVar]
  302. ] = None,
  303. on_mouse_out: Optional[
  304. Union[EventHandler, EventSpec, list, function, BaseVar]
  305. ] = None,
  306. on_mouse_over: Optional[
  307. Union[EventHandler, EventSpec, list, function, BaseVar]
  308. ] = None,
  309. on_mouse_up: Optional[
  310. Union[EventHandler, EventSpec, list, function, BaseVar]
  311. ] = None,
  312. on_scroll: Optional[
  313. Union[EventHandler, EventSpec, list, function, BaseVar]
  314. ] = None,
  315. on_unmount: Optional[
  316. Union[EventHandler, EventSpec, list, function, BaseVar]
  317. ] = None,
  318. **props
  319. ) -> "EditablePreview":
  320. """Create the component.
  321. Args:
  322. *children: The children of the component.
  323. style: The style of the component.
  324. key: A unique key for the component.
  325. id: The id for the component.
  326. class_name: The class name for the component.
  327. autofocus: Whether the component should take the focus once the page is loaded
  328. custom_attrs: custom attribute
  329. **props: The props of the component.
  330. Returns:
  331. The component.
  332. """
  333. ...