banner.pyi 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. """Stub file for reflex/components/core/banner.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 Optional
  10. from reflex.components.base.bare import Bare
  11. from reflex.components.component import Component
  12. from reflex.components.core.cond import cond
  13. from reflex.components.el.elements.typography import Div
  14. from reflex.components.lucide.icon import Icon
  15. from reflex.components.radix.themes.components.dialog import (
  16. DialogContent,
  17. DialogRoot,
  18. DialogTitle,
  19. )
  20. from reflex.components.radix.themes.layout import Flex
  21. from reflex.components.radix.themes.typography.text import Text
  22. from reflex.constants import Dirs, Hooks, Imports
  23. from reflex.state import State
  24. from reflex.utils import imports
  25. from reflex.vars import Var, VarData
  26. connect_error_var_data: VarData
  27. connection_error: Var
  28. connection_errors_count: Var
  29. has_connection_errors: Var
  30. has_too_many_connection_errors: Var
  31. class WebsocketTargetURL(Bare):
  32. @overload
  33. @classmethod
  34. def create( # type: ignore
  35. cls,
  36. *children,
  37. contents: Optional[Union[Var[str], str]] = None,
  38. style: Optional[Style] = None,
  39. key: Optional[Any] = None,
  40. id: Optional[Any] = None,
  41. class_name: Optional[Any] = None,
  42. autofocus: Optional[bool] = None,
  43. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  44. on_blur: Optional[
  45. Union[EventHandler, EventSpec, list, function, BaseVar]
  46. ] = None,
  47. on_click: Optional[
  48. Union[EventHandler, EventSpec, list, function, BaseVar]
  49. ] = None,
  50. on_context_menu: Optional[
  51. Union[EventHandler, EventSpec, list, function, BaseVar]
  52. ] = None,
  53. on_double_click: Optional[
  54. Union[EventHandler, EventSpec, list, function, BaseVar]
  55. ] = None,
  56. on_focus: Optional[
  57. Union[EventHandler, EventSpec, list, function, BaseVar]
  58. ] = None,
  59. on_mount: Optional[
  60. Union[EventHandler, EventSpec, list, function, BaseVar]
  61. ] = None,
  62. on_mouse_down: Optional[
  63. Union[EventHandler, EventSpec, list, function, BaseVar]
  64. ] = None,
  65. on_mouse_enter: Optional[
  66. Union[EventHandler, EventSpec, list, function, BaseVar]
  67. ] = None,
  68. on_mouse_leave: Optional[
  69. Union[EventHandler, EventSpec, list, function, BaseVar]
  70. ] = None,
  71. on_mouse_move: Optional[
  72. Union[EventHandler, EventSpec, list, function, BaseVar]
  73. ] = None,
  74. on_mouse_out: Optional[
  75. Union[EventHandler, EventSpec, list, function, BaseVar]
  76. ] = None,
  77. on_mouse_over: Optional[
  78. Union[EventHandler, EventSpec, list, function, BaseVar]
  79. ] = None,
  80. on_mouse_up: Optional[
  81. Union[EventHandler, EventSpec, list, function, BaseVar]
  82. ] = None,
  83. on_scroll: Optional[
  84. Union[EventHandler, EventSpec, list, function, BaseVar]
  85. ] = None,
  86. on_unmount: Optional[
  87. Union[EventHandler, EventSpec, list, function, BaseVar]
  88. ] = None,
  89. **props
  90. ) -> "WebsocketTargetURL":
  91. """Create a websocket target URL component.
  92. Returns:
  93. The websocket target URL component.
  94. """
  95. ...
  96. def default_connection_error() -> list[str | Var | Component]: ...
  97. class ConnectionBanner(Component):
  98. @overload
  99. @classmethod
  100. def create( # type: ignore
  101. cls,
  102. *children,
  103. style: Optional[Style] = None,
  104. key: Optional[Any] = None,
  105. id: Optional[Any] = None,
  106. class_name: Optional[Any] = None,
  107. autofocus: Optional[bool] = None,
  108. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  109. on_blur: Optional[
  110. Union[EventHandler, EventSpec, list, function, BaseVar]
  111. ] = None,
  112. on_click: Optional[
  113. Union[EventHandler, EventSpec, list, function, BaseVar]
  114. ] = None,
  115. on_context_menu: Optional[
  116. Union[EventHandler, EventSpec, list, function, BaseVar]
  117. ] = None,
  118. on_double_click: Optional[
  119. Union[EventHandler, EventSpec, list, function, BaseVar]
  120. ] = None,
  121. on_focus: Optional[
  122. Union[EventHandler, EventSpec, list, function, BaseVar]
  123. ] = None,
  124. on_mount: Optional[
  125. Union[EventHandler, EventSpec, list, function, BaseVar]
  126. ] = None,
  127. on_mouse_down: Optional[
  128. Union[EventHandler, EventSpec, list, function, BaseVar]
  129. ] = None,
  130. on_mouse_enter: Optional[
  131. Union[EventHandler, EventSpec, list, function, BaseVar]
  132. ] = None,
  133. on_mouse_leave: Optional[
  134. Union[EventHandler, EventSpec, list, function, BaseVar]
  135. ] = None,
  136. on_mouse_move: Optional[
  137. Union[EventHandler, EventSpec, list, function, BaseVar]
  138. ] = None,
  139. on_mouse_out: Optional[
  140. Union[EventHandler, EventSpec, list, function, BaseVar]
  141. ] = None,
  142. on_mouse_over: Optional[
  143. Union[EventHandler, EventSpec, list, function, BaseVar]
  144. ] = None,
  145. on_mouse_up: Optional[
  146. Union[EventHandler, EventSpec, list, function, BaseVar]
  147. ] = None,
  148. on_scroll: Optional[
  149. Union[EventHandler, EventSpec, list, function, BaseVar]
  150. ] = None,
  151. on_unmount: Optional[
  152. Union[EventHandler, EventSpec, list, function, BaseVar]
  153. ] = None,
  154. **props
  155. ) -> "ConnectionBanner":
  156. """Create a connection banner component.
  157. Args:
  158. comp: The component to render when there's a server connection error.
  159. Returns:
  160. The connection banner component.
  161. """
  162. ...
  163. class ConnectionModal(Component):
  164. @overload
  165. @classmethod
  166. def create( # type: ignore
  167. cls,
  168. *children,
  169. style: Optional[Style] = None,
  170. key: Optional[Any] = None,
  171. id: Optional[Any] = None,
  172. class_name: Optional[Any] = None,
  173. autofocus: Optional[bool] = None,
  174. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  175. on_blur: Optional[
  176. Union[EventHandler, EventSpec, list, function, BaseVar]
  177. ] = None,
  178. on_click: Optional[
  179. Union[EventHandler, EventSpec, list, function, BaseVar]
  180. ] = None,
  181. on_context_menu: Optional[
  182. Union[EventHandler, EventSpec, list, function, BaseVar]
  183. ] = None,
  184. on_double_click: Optional[
  185. Union[EventHandler, EventSpec, list, function, BaseVar]
  186. ] = None,
  187. on_focus: Optional[
  188. Union[EventHandler, EventSpec, list, function, BaseVar]
  189. ] = None,
  190. on_mount: Optional[
  191. Union[EventHandler, EventSpec, list, function, BaseVar]
  192. ] = None,
  193. on_mouse_down: Optional[
  194. Union[EventHandler, EventSpec, list, function, BaseVar]
  195. ] = None,
  196. on_mouse_enter: Optional[
  197. Union[EventHandler, EventSpec, list, function, BaseVar]
  198. ] = None,
  199. on_mouse_leave: Optional[
  200. Union[EventHandler, EventSpec, list, function, BaseVar]
  201. ] = None,
  202. on_mouse_move: Optional[
  203. Union[EventHandler, EventSpec, list, function, BaseVar]
  204. ] = None,
  205. on_mouse_out: Optional[
  206. Union[EventHandler, EventSpec, list, function, BaseVar]
  207. ] = None,
  208. on_mouse_over: Optional[
  209. Union[EventHandler, EventSpec, list, function, BaseVar]
  210. ] = None,
  211. on_mouse_up: Optional[
  212. Union[EventHandler, EventSpec, list, function, BaseVar]
  213. ] = None,
  214. on_scroll: Optional[
  215. Union[EventHandler, EventSpec, list, function, BaseVar]
  216. ] = None,
  217. on_unmount: Optional[
  218. Union[EventHandler, EventSpec, list, function, BaseVar]
  219. ] = None,
  220. **props
  221. ) -> "ConnectionModal":
  222. """Create a connection banner component.
  223. Args:
  224. comp: The component to render when there's a server connection error.
  225. Returns:
  226. The connection banner component.
  227. """
  228. ...
  229. class WifiOffPulse(Icon):
  230. @overload
  231. @classmethod
  232. def create( # type: ignore
  233. cls,
  234. *children,
  235. size: Optional[Union[Var[int], int]] = None,
  236. style: Optional[Style] = None,
  237. key: Optional[Any] = None,
  238. id: Optional[Any] = None,
  239. class_name: Optional[Any] = None,
  240. autofocus: Optional[bool] = None,
  241. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  242. on_blur: Optional[
  243. Union[EventHandler, EventSpec, list, function, BaseVar]
  244. ] = None,
  245. on_click: Optional[
  246. Union[EventHandler, EventSpec, list, function, BaseVar]
  247. ] = None,
  248. on_context_menu: Optional[
  249. Union[EventHandler, EventSpec, list, function, BaseVar]
  250. ] = None,
  251. on_double_click: Optional[
  252. Union[EventHandler, EventSpec, list, function, BaseVar]
  253. ] = None,
  254. on_focus: Optional[
  255. Union[EventHandler, EventSpec, list, function, BaseVar]
  256. ] = None,
  257. on_mount: Optional[
  258. Union[EventHandler, EventSpec, list, function, BaseVar]
  259. ] = None,
  260. on_mouse_down: Optional[
  261. Union[EventHandler, EventSpec, list, function, BaseVar]
  262. ] = None,
  263. on_mouse_enter: Optional[
  264. Union[EventHandler, EventSpec, list, function, BaseVar]
  265. ] = None,
  266. on_mouse_leave: Optional[
  267. Union[EventHandler, EventSpec, list, function, BaseVar]
  268. ] = None,
  269. on_mouse_move: Optional[
  270. Union[EventHandler, EventSpec, list, function, BaseVar]
  271. ] = None,
  272. on_mouse_out: Optional[
  273. Union[EventHandler, EventSpec, list, function, BaseVar]
  274. ] = None,
  275. on_mouse_over: Optional[
  276. Union[EventHandler, EventSpec, list, function, BaseVar]
  277. ] = None,
  278. on_mouse_up: Optional[
  279. Union[EventHandler, EventSpec, list, function, BaseVar]
  280. ] = None,
  281. on_scroll: Optional[
  282. Union[EventHandler, EventSpec, list, function, BaseVar]
  283. ] = None,
  284. on_unmount: Optional[
  285. Union[EventHandler, EventSpec, list, function, BaseVar]
  286. ] = None,
  287. **props
  288. ) -> "WifiOffPulse":
  289. """Create a wifi_off icon with an animated opacity pulse.
  290. Args:
  291. size: The size of the icon in pixels.
  292. style: The style of the component.
  293. key: A unique key for the component.
  294. id: The id for the component.
  295. class_name: The class name for the component.
  296. autofocus: Whether the component should take the focus once the page is loaded
  297. custom_attrs: custom attribute
  298. **props: The properties of the component.
  299. Returns:
  300. The icon component with default props applied.
  301. """
  302. ...
  303. class ConnectionPulser(Div):
  304. @overload
  305. @classmethod
  306. def create( # type: ignore
  307. cls,
  308. *children,
  309. access_key: Optional[
  310. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  311. ] = None,
  312. auto_capitalize: Optional[
  313. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  314. ] = None,
  315. content_editable: Optional[
  316. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  317. ] = None,
  318. context_menu: Optional[
  319. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  320. ] = None,
  321. dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  322. draggable: Optional[
  323. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  324. ] = None,
  325. enter_key_hint: Optional[
  326. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  327. ] = None,
  328. hidden: Optional[
  329. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  330. ] = None,
  331. input_mode: Optional[
  332. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  333. ] = None,
  334. item_prop: Optional[
  335. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  336. ] = None,
  337. lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  338. role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  339. slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  340. spell_check: Optional[
  341. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  342. ] = None,
  343. tab_index: Optional[
  344. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  345. ] = None,
  346. title: Optional[
  347. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  348. ] = None,
  349. style: Optional[Style] = None,
  350. key: Optional[Any] = None,
  351. id: Optional[Any] = None,
  352. class_name: Optional[Any] = None,
  353. autofocus: Optional[bool] = None,
  354. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  355. on_blur: Optional[
  356. Union[EventHandler, EventSpec, list, function, BaseVar]
  357. ] = None,
  358. on_click: Optional[
  359. Union[EventHandler, EventSpec, list, function, BaseVar]
  360. ] = None,
  361. on_context_menu: Optional[
  362. Union[EventHandler, EventSpec, list, function, BaseVar]
  363. ] = None,
  364. on_double_click: Optional[
  365. Union[EventHandler, EventSpec, list, function, BaseVar]
  366. ] = None,
  367. on_focus: Optional[
  368. Union[EventHandler, EventSpec, list, function, BaseVar]
  369. ] = None,
  370. on_mount: Optional[
  371. Union[EventHandler, EventSpec, list, function, BaseVar]
  372. ] = None,
  373. on_mouse_down: Optional[
  374. Union[EventHandler, EventSpec, list, function, BaseVar]
  375. ] = None,
  376. on_mouse_enter: Optional[
  377. Union[EventHandler, EventSpec, list, function, BaseVar]
  378. ] = None,
  379. on_mouse_leave: Optional[
  380. Union[EventHandler, EventSpec, list, function, BaseVar]
  381. ] = None,
  382. on_mouse_move: Optional[
  383. Union[EventHandler, EventSpec, list, function, BaseVar]
  384. ] = None,
  385. on_mouse_out: Optional[
  386. Union[EventHandler, EventSpec, list, function, BaseVar]
  387. ] = None,
  388. on_mouse_over: Optional[
  389. Union[EventHandler, EventSpec, list, function, BaseVar]
  390. ] = None,
  391. on_mouse_up: Optional[
  392. Union[EventHandler, EventSpec, list, function, BaseVar]
  393. ] = None,
  394. on_scroll: Optional[
  395. Union[EventHandler, EventSpec, list, function, BaseVar]
  396. ] = None,
  397. on_unmount: Optional[
  398. Union[EventHandler, EventSpec, list, function, BaseVar]
  399. ] = None,
  400. **props
  401. ) -> "ConnectionPulser":
  402. """Create a connection pulser component.
  403. Args:
  404. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  405. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  406. content_editable: Indicates whether the element's content is editable.
  407. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  408. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  409. draggable: Defines whether the element can be dragged.
  410. enter_key_hint: Hints what media types the media element is able to play.
  411. hidden: Defines whether the element is hidden.
  412. input_mode: Defines the type of the element.
  413. item_prop: Defines the name of the element for metadata purposes.
  414. lang: Defines the language used in the element.
  415. role: Defines the role of the element.
  416. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  417. spell_check: Defines whether the element may be checked for spelling errors.
  418. tab_index: Defines the position of the current element in the tabbing order.
  419. title: Defines a tooltip for the element.
  420. style: The style of the component.
  421. key: A unique key for the component.
  422. id: The id for the component.
  423. class_name: The class name for the component.
  424. autofocus: Whether the component should take the focus once the page is loaded
  425. custom_attrs: custom attribute
  426. **props: The properties of the component.
  427. Returns:
  428. The connection pulser component.
  429. """
  430. ...