banner.pyi 17 KB

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