alert.pyi 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. """Stub file for reflex/components/chakra/feedback/alert.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 reflex.components.chakra import ChakraComponent, LiteralAlertVariant, LiteralStatus
  10. from reflex.components.component import Component
  11. from reflex.vars import Var
  12. class Alert(ChakraComponent):
  13. @overload
  14. @classmethod
  15. def create( # type: ignore
  16. cls,
  17. *children,
  18. icon=True,
  19. title="Alert title",
  20. desc=None,
  21. status: Optional[
  22. Union[
  23. Var[Literal["success", "info", "warning", "error"]],
  24. Literal["success", "info", "warning", "error"],
  25. ]
  26. ] = None,
  27. variant: Optional[
  28. Union[
  29. Var[Literal["subtle", "left-accent", "top-accent", "solid"]],
  30. Literal["subtle", "left-accent", "top-accent", "solid"],
  31. ]
  32. ] = None,
  33. style: Optional[Style] = None,
  34. key: Optional[Any] = None,
  35. id: Optional[Any] = None,
  36. class_name: Optional[Any] = None,
  37. autofocus: Optional[bool] = None,
  38. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  39. on_blur: Optional[
  40. Union[EventHandler, EventSpec, list, function, BaseVar]
  41. ] = None,
  42. on_click: Optional[
  43. Union[EventHandler, EventSpec, list, function, BaseVar]
  44. ] = None,
  45. on_context_menu: Optional[
  46. Union[EventHandler, EventSpec, list, function, BaseVar]
  47. ] = None,
  48. on_double_click: Optional[
  49. Union[EventHandler, EventSpec, list, function, BaseVar]
  50. ] = None,
  51. on_focus: Optional[
  52. Union[EventHandler, EventSpec, list, function, BaseVar]
  53. ] = None,
  54. on_mount: Optional[
  55. Union[EventHandler, EventSpec, list, function, BaseVar]
  56. ] = None,
  57. on_mouse_down: Optional[
  58. Union[EventHandler, EventSpec, list, function, BaseVar]
  59. ] = None,
  60. on_mouse_enter: Optional[
  61. Union[EventHandler, EventSpec, list, function, BaseVar]
  62. ] = None,
  63. on_mouse_leave: Optional[
  64. Union[EventHandler, EventSpec, list, function, BaseVar]
  65. ] = None,
  66. on_mouse_move: Optional[
  67. Union[EventHandler, EventSpec, list, function, BaseVar]
  68. ] = None,
  69. on_mouse_out: Optional[
  70. Union[EventHandler, EventSpec, list, function, BaseVar]
  71. ] = None,
  72. on_mouse_over: Optional[
  73. Union[EventHandler, EventSpec, list, function, BaseVar]
  74. ] = None,
  75. on_mouse_up: Optional[
  76. Union[EventHandler, EventSpec, list, function, BaseVar]
  77. ] = None,
  78. on_scroll: Optional[
  79. Union[EventHandler, EventSpec, list, function, BaseVar]
  80. ] = None,
  81. on_unmount: Optional[
  82. Union[EventHandler, EventSpec, list, function, BaseVar]
  83. ] = None,
  84. **props
  85. ) -> "Alert":
  86. """Create an alert component.
  87. Args:
  88. *children: The children of the component.
  89. icon: The icon of the alert.
  90. title: The title of the alert.
  91. desc: The description of the alert
  92. status: The status of the alert ("success" | "info" | "warning" | "error")
  93. variant: "subtle" | "left-accent" | "top-accent" | "solid"
  94. style: The style of the component.
  95. key: A unique key for the component.
  96. id: The id for the component.
  97. class_name: The class name for the component.
  98. autofocus: Whether the component should take the focus once the page is loaded
  99. custom_attrs: custom attribute
  100. **props: The properties of the component.
  101. Returns:
  102. The alert component.
  103. """
  104. ...
  105. class AlertIcon(ChakraComponent):
  106. @overload
  107. @classmethod
  108. def create( # type: ignore
  109. cls,
  110. *children,
  111. style: Optional[Style] = None,
  112. key: Optional[Any] = None,
  113. id: Optional[Any] = None,
  114. class_name: Optional[Any] = None,
  115. autofocus: Optional[bool] = None,
  116. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  117. on_blur: Optional[
  118. Union[EventHandler, EventSpec, list, function, BaseVar]
  119. ] = None,
  120. on_click: Optional[
  121. Union[EventHandler, EventSpec, list, function, BaseVar]
  122. ] = None,
  123. on_context_menu: Optional[
  124. Union[EventHandler, EventSpec, list, function, BaseVar]
  125. ] = None,
  126. on_double_click: Optional[
  127. Union[EventHandler, EventSpec, list, function, BaseVar]
  128. ] = None,
  129. on_focus: Optional[
  130. Union[EventHandler, EventSpec, list, function, BaseVar]
  131. ] = None,
  132. on_mount: Optional[
  133. Union[EventHandler, EventSpec, list, function, BaseVar]
  134. ] = None,
  135. on_mouse_down: Optional[
  136. Union[EventHandler, EventSpec, list, function, BaseVar]
  137. ] = None,
  138. on_mouse_enter: Optional[
  139. Union[EventHandler, EventSpec, list, function, BaseVar]
  140. ] = None,
  141. on_mouse_leave: Optional[
  142. Union[EventHandler, EventSpec, list, function, BaseVar]
  143. ] = None,
  144. on_mouse_move: Optional[
  145. Union[EventHandler, EventSpec, list, function, BaseVar]
  146. ] = None,
  147. on_mouse_out: Optional[
  148. Union[EventHandler, EventSpec, list, function, BaseVar]
  149. ] = None,
  150. on_mouse_over: Optional[
  151. Union[EventHandler, EventSpec, list, function, BaseVar]
  152. ] = None,
  153. on_mouse_up: Optional[
  154. Union[EventHandler, EventSpec, list, function, BaseVar]
  155. ] = None,
  156. on_scroll: Optional[
  157. Union[EventHandler, EventSpec, list, function, BaseVar]
  158. ] = None,
  159. on_unmount: Optional[
  160. Union[EventHandler, EventSpec, list, function, BaseVar]
  161. ] = None,
  162. **props
  163. ) -> "AlertIcon":
  164. """Create the component.
  165. Args:
  166. *children: The children of the component.
  167. style: The style of the component.
  168. key: A unique key for the component.
  169. id: The id for the component.
  170. class_name: The class name for the component.
  171. autofocus: Whether the component should take the focus once the page is loaded
  172. custom_attrs: custom attribute
  173. **props: The props of the component.
  174. Returns:
  175. The component.
  176. Raises:
  177. TypeError: If an invalid child is passed.
  178. """
  179. ...
  180. class AlertTitle(ChakraComponent):
  181. @overload
  182. @classmethod
  183. def create( # type: ignore
  184. cls,
  185. *children,
  186. style: Optional[Style] = None,
  187. key: Optional[Any] = None,
  188. id: Optional[Any] = None,
  189. class_name: Optional[Any] = None,
  190. autofocus: Optional[bool] = None,
  191. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  192. on_blur: Optional[
  193. Union[EventHandler, EventSpec, list, function, BaseVar]
  194. ] = None,
  195. on_click: Optional[
  196. Union[EventHandler, EventSpec, list, function, BaseVar]
  197. ] = None,
  198. on_context_menu: Optional[
  199. Union[EventHandler, EventSpec, list, function, BaseVar]
  200. ] = None,
  201. on_double_click: Optional[
  202. Union[EventHandler, EventSpec, list, function, BaseVar]
  203. ] = None,
  204. on_focus: Optional[
  205. Union[EventHandler, EventSpec, list, function, BaseVar]
  206. ] = None,
  207. on_mount: Optional[
  208. Union[EventHandler, EventSpec, list, function, BaseVar]
  209. ] = None,
  210. on_mouse_down: Optional[
  211. Union[EventHandler, EventSpec, list, function, BaseVar]
  212. ] = None,
  213. on_mouse_enter: Optional[
  214. Union[EventHandler, EventSpec, list, function, BaseVar]
  215. ] = None,
  216. on_mouse_leave: Optional[
  217. Union[EventHandler, EventSpec, list, function, BaseVar]
  218. ] = None,
  219. on_mouse_move: Optional[
  220. Union[EventHandler, EventSpec, list, function, BaseVar]
  221. ] = None,
  222. on_mouse_out: Optional[
  223. Union[EventHandler, EventSpec, list, function, BaseVar]
  224. ] = None,
  225. on_mouse_over: Optional[
  226. Union[EventHandler, EventSpec, list, function, BaseVar]
  227. ] = None,
  228. on_mouse_up: Optional[
  229. Union[EventHandler, EventSpec, list, function, BaseVar]
  230. ] = None,
  231. on_scroll: Optional[
  232. Union[EventHandler, EventSpec, list, function, BaseVar]
  233. ] = None,
  234. on_unmount: Optional[
  235. Union[EventHandler, EventSpec, list, function, BaseVar]
  236. ] = None,
  237. **props
  238. ) -> "AlertTitle":
  239. """Create the component.
  240. Args:
  241. *children: The children of the component.
  242. style: The style of the component.
  243. key: A unique key for the component.
  244. id: The id for the component.
  245. class_name: The class name for the component.
  246. autofocus: Whether the component should take the focus once the page is loaded
  247. custom_attrs: custom attribute
  248. **props: The props of the component.
  249. Returns:
  250. The component.
  251. Raises:
  252. TypeError: If an invalid child is passed.
  253. """
  254. ...
  255. class AlertDescription(ChakraComponent):
  256. @overload
  257. @classmethod
  258. def create( # type: ignore
  259. cls,
  260. *children,
  261. style: Optional[Style] = None,
  262. key: Optional[Any] = None,
  263. id: Optional[Any] = None,
  264. class_name: Optional[Any] = None,
  265. autofocus: Optional[bool] = None,
  266. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  267. on_blur: Optional[
  268. Union[EventHandler, EventSpec, list, function, BaseVar]
  269. ] = None,
  270. on_click: Optional[
  271. Union[EventHandler, EventSpec, list, function, BaseVar]
  272. ] = None,
  273. on_context_menu: Optional[
  274. Union[EventHandler, EventSpec, list, function, BaseVar]
  275. ] = None,
  276. on_double_click: Optional[
  277. Union[EventHandler, EventSpec, list, function, BaseVar]
  278. ] = None,
  279. on_focus: Optional[
  280. Union[EventHandler, EventSpec, list, function, BaseVar]
  281. ] = None,
  282. on_mount: Optional[
  283. Union[EventHandler, EventSpec, list, function, BaseVar]
  284. ] = None,
  285. on_mouse_down: Optional[
  286. Union[EventHandler, EventSpec, list, function, BaseVar]
  287. ] = None,
  288. on_mouse_enter: Optional[
  289. Union[EventHandler, EventSpec, list, function, BaseVar]
  290. ] = None,
  291. on_mouse_leave: Optional[
  292. Union[EventHandler, EventSpec, list, function, BaseVar]
  293. ] = None,
  294. on_mouse_move: Optional[
  295. Union[EventHandler, EventSpec, list, function, BaseVar]
  296. ] = None,
  297. on_mouse_out: Optional[
  298. Union[EventHandler, EventSpec, list, function, BaseVar]
  299. ] = None,
  300. on_mouse_over: Optional[
  301. Union[EventHandler, EventSpec, list, function, BaseVar]
  302. ] = None,
  303. on_mouse_up: Optional[
  304. Union[EventHandler, EventSpec, list, function, BaseVar]
  305. ] = None,
  306. on_scroll: Optional[
  307. Union[EventHandler, EventSpec, list, function, BaseVar]
  308. ] = None,
  309. on_unmount: Optional[
  310. Union[EventHandler, EventSpec, list, function, BaseVar]
  311. ] = None,
  312. **props
  313. ) -> "AlertDescription":
  314. """Create the component.
  315. Args:
  316. *children: The children of the component.
  317. style: The style of the component.
  318. key: A unique key for the component.
  319. id: The id for the component.
  320. class_name: The class name for the component.
  321. autofocus: Whether the component should take the focus once the page is loaded
  322. custom_attrs: custom attribute
  323. **props: The props of the component.
  324. Returns:
  325. The component.
  326. Raises:
  327. TypeError: If an invalid child is passed.
  328. """
  329. ...