alert.pyi 12 KB

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