scripts.pyi 20 KB

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