scripts.pyi 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. """Stub file for reflex/components/el/elements/scripts.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Callable, Dict, Optional, Union, overload
  6. from reflex.event import EventHandler, EventSpec
  7. from reflex.style import Style
  8. from reflex.vars import Var
  9. from .base import BaseHTML
  10. class Canvas(BaseHTML):
  11. @overload
  12. @classmethod
  13. def create( # type: ignore
  14. cls,
  15. *children,
  16. access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  17. auto_capitalize: Optional[
  18. Union[Var[Union[bool, int, str]], str, int, bool]
  19. ] = None,
  20. content_editable: Optional[
  21. Union[Var[Union[bool, int, str]], str, int, bool]
  22. ] = None,
  23. context_menu: Optional[
  24. Union[Var[Union[bool, int, str]], str, int, bool]
  25. ] = None,
  26. dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  27. draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  28. enter_key_hint: Optional[
  29. Union[Var[Union[bool, int, str]], str, int, bool]
  30. ] = None,
  31. hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  32. input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  33. item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  34. lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  35. role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  36. slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  37. spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  38. tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  39. title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  40. style: Optional[Style] = None,
  41. key: Optional[Any] = None,
  42. id: Optional[Any] = None,
  43. class_name: Optional[Any] = None,
  44. autofocus: Optional[bool] = None,
  45. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  46. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  47. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  48. on_context_menu: Optional[
  49. Union[EventHandler, EventSpec, list, Callable, Var]
  50. ] = None,
  51. on_double_click: Optional[
  52. Union[EventHandler, EventSpec, list, Callable, Var]
  53. ] = None,
  54. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  55. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  56. on_mouse_down: Optional[
  57. Union[EventHandler, EventSpec, list, Callable, Var]
  58. ] = None,
  59. on_mouse_enter: Optional[
  60. Union[EventHandler, EventSpec, list, Callable, Var]
  61. ] = None,
  62. on_mouse_leave: Optional[
  63. Union[EventHandler, EventSpec, list, Callable, Var]
  64. ] = None,
  65. on_mouse_move: Optional[
  66. Union[EventHandler, EventSpec, list, Callable, Var]
  67. ] = None,
  68. on_mouse_out: Optional[
  69. Union[EventHandler, EventSpec, list, Callable, Var]
  70. ] = None,
  71. on_mouse_over: Optional[
  72. Union[EventHandler, EventSpec, list, Callable, Var]
  73. ] = None,
  74. on_mouse_up: Optional[
  75. Union[EventHandler, EventSpec, list, Callable, Var]
  76. ] = None,
  77. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  78. on_unmount: Optional[
  79. Union[EventHandler, EventSpec, list, Callable, Var]
  80. ] = None,
  81. **props,
  82. ) -> "Canvas":
  83. """Create the component.
  84. Args:
  85. *children: The children of the component.
  86. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  87. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  88. content_editable: Indicates whether the element's content is editable.
  89. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  90. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  91. draggable: Defines whether the element can be dragged.
  92. enter_key_hint: Hints what media types the media element is able to play.
  93. hidden: Defines whether the element is hidden.
  94. input_mode: Defines the type of the element.
  95. item_prop: Defines the name of the element for metadata purposes.
  96. lang: Defines the language used in the element.
  97. role: Defines the role of the element.
  98. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  99. spell_check: Defines whether the element may be checked for spelling errors.
  100. tab_index: Defines the position of the current element in the tabbing order.
  101. title: Defines a tooltip for the element.
  102. style: The style of the component.
  103. key: A unique key for the component.
  104. id: The id for the component.
  105. class_name: The class name for the component.
  106. autofocus: Whether the component should take the focus once the page is loaded
  107. custom_attrs: custom attribute
  108. **props: The props of the component.
  109. Returns:
  110. The component.
  111. """
  112. ...
  113. class Noscript(BaseHTML):
  114. @overload
  115. @classmethod
  116. def create( # type: ignore
  117. cls,
  118. *children,
  119. access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  120. auto_capitalize: Optional[
  121. Union[Var[Union[bool, int, str]], str, int, bool]
  122. ] = None,
  123. content_editable: Optional[
  124. Union[Var[Union[bool, int, str]], str, int, bool]
  125. ] = None,
  126. context_menu: Optional[
  127. Union[Var[Union[bool, int, str]], str, int, bool]
  128. ] = None,
  129. dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  130. draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  131. enter_key_hint: Optional[
  132. Union[Var[Union[bool, int, str]], str, int, bool]
  133. ] = None,
  134. hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  135. input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  136. item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  137. lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  138. role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  139. slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  140. spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  141. tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  142. title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  143. style: Optional[Style] = None,
  144. key: Optional[Any] = None,
  145. id: Optional[Any] = None,
  146. class_name: Optional[Any] = None,
  147. autofocus: Optional[bool] = None,
  148. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  149. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  150. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  151. on_context_menu: Optional[
  152. Union[EventHandler, EventSpec, list, Callable, Var]
  153. ] = None,
  154. on_double_click: Optional[
  155. Union[EventHandler, EventSpec, list, Callable, Var]
  156. ] = None,
  157. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  158. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  159. on_mouse_down: Optional[
  160. Union[EventHandler, EventSpec, list, Callable, Var]
  161. ] = None,
  162. on_mouse_enter: Optional[
  163. Union[EventHandler, EventSpec, list, Callable, Var]
  164. ] = None,
  165. on_mouse_leave: Optional[
  166. Union[EventHandler, EventSpec, list, Callable, Var]
  167. ] = None,
  168. on_mouse_move: Optional[
  169. Union[EventHandler, EventSpec, list, Callable, Var]
  170. ] = None,
  171. on_mouse_out: Optional[
  172. Union[EventHandler, EventSpec, list, Callable, Var]
  173. ] = None,
  174. on_mouse_over: Optional[
  175. Union[EventHandler, EventSpec, list, Callable, Var]
  176. ] = None,
  177. on_mouse_up: Optional[
  178. Union[EventHandler, EventSpec, list, Callable, Var]
  179. ] = None,
  180. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  181. on_unmount: Optional[
  182. Union[EventHandler, EventSpec, list, Callable, Var]
  183. ] = None,
  184. **props,
  185. ) -> "Noscript":
  186. """Create the component.
  187. Args:
  188. *children: The children of the component.
  189. access_key: No unique attributes, only common ones are inherited Provides a hint for generating a keyboard shortcut for the current element.
  190. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  191. content_editable: Indicates whether the element's content is editable.
  192. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  193. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  194. draggable: Defines whether the element can be dragged.
  195. enter_key_hint: Hints what media types the media element is able to play.
  196. hidden: Defines whether the element is hidden.
  197. input_mode: Defines the type of the element.
  198. item_prop: Defines the name of the element for metadata purposes.
  199. lang: Defines the language used in the element.
  200. role: Defines the role of the element.
  201. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  202. spell_check: Defines whether the element may be checked for spelling errors.
  203. tab_index: Defines the position of the current element in the tabbing order.
  204. title: Defines a tooltip for the element.
  205. style: The style of the component.
  206. key: A unique key for the component.
  207. id: The id for the component.
  208. class_name: The class name for the component.
  209. autofocus: Whether the component should take the focus once the page is loaded
  210. custom_attrs: custom attribute
  211. **props: The props of the component.
  212. Returns:
  213. The component.
  214. """
  215. ...
  216. class Script(BaseHTML):
  217. @overload
  218. @classmethod
  219. def create( # type: ignore
  220. cls,
  221. *children,
  222. async_: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  223. char_set: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  224. cross_origin: Optional[
  225. Union[Var[Union[bool, int, str]], str, int, bool]
  226. ] = None,
  227. defer: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  228. integrity: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  229. language: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  230. referrer_policy: Optional[
  231. Union[Var[Union[bool, int, str]], str, int, bool]
  232. ] = None,
  233. src: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  234. type: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  235. access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  236. auto_capitalize: Optional[
  237. Union[Var[Union[bool, int, str]], str, int, bool]
  238. ] = None,
  239. content_editable: Optional[
  240. Union[Var[Union[bool, int, str]], str, int, bool]
  241. ] = None,
  242. context_menu: Optional[
  243. Union[Var[Union[bool, int, str]], str, int, bool]
  244. ] = None,
  245. dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  246. draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  247. enter_key_hint: Optional[
  248. Union[Var[Union[bool, int, str]], str, int, bool]
  249. ] = None,
  250. hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  251. input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  252. item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  253. lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  254. role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  255. slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  256. spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  257. tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  258. title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
  259. style: Optional[Style] = None,
  260. key: Optional[Any] = None,
  261. id: Optional[Any] = None,
  262. class_name: Optional[Any] = None,
  263. autofocus: Optional[bool] = None,
  264. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  265. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  266. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  267. on_context_menu: Optional[
  268. Union[EventHandler, EventSpec, list, Callable, Var]
  269. ] = None,
  270. on_double_click: Optional[
  271. Union[EventHandler, EventSpec, list, Callable, Var]
  272. ] = None,
  273. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  274. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  275. on_mouse_down: Optional[
  276. Union[EventHandler, EventSpec, list, Callable, Var]
  277. ] = None,
  278. on_mouse_enter: Optional[
  279. Union[EventHandler, EventSpec, list, Callable, Var]
  280. ] = None,
  281. on_mouse_leave: Optional[
  282. Union[EventHandler, EventSpec, list, Callable, Var]
  283. ] = None,
  284. on_mouse_move: Optional[
  285. Union[EventHandler, EventSpec, list, Callable, Var]
  286. ] = None,
  287. on_mouse_out: Optional[
  288. Union[EventHandler, EventSpec, list, Callable, Var]
  289. ] = None,
  290. on_mouse_over: Optional[
  291. Union[EventHandler, EventSpec, list, Callable, Var]
  292. ] = None,
  293. on_mouse_up: Optional[
  294. Union[EventHandler, EventSpec, list, Callable, Var]
  295. ] = None,
  296. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  297. on_unmount: Optional[
  298. Union[EventHandler, EventSpec, list, Callable, Var]
  299. ] = None,
  300. **props,
  301. ) -> "Script":
  302. """Create the component.
  303. Args:
  304. *children: The children of the component.
  305. async_: Indicates that the script should be executed asynchronously
  306. char_set: Character encoding of the external script
  307. cross_origin: Configures the CORS requests for the script
  308. defer: Indicates that the script should be executed after the page has finished parsing
  309. integrity: Security feature allowing browsers to verify what they fetch
  310. language: Specifies the scripting language used in the type attribute
  311. referrer_policy: Specifies which referrer information to send when fetching the script
  312. src: URL of an external script
  313. type: Specifies the MIME type of the script
  314. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  315. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  316. content_editable: Indicates whether the element's content is editable.
  317. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  318. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  319. draggable: Defines whether the element can be dragged.
  320. enter_key_hint: Hints what media types the media element is able to play.
  321. hidden: Defines whether the element is hidden.
  322. input_mode: Defines the type of the element.
  323. item_prop: Defines the name of the element for metadata purposes.
  324. lang: Defines the language used in the element.
  325. role: Defines the role of the element.
  326. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  327. spell_check: Defines whether the element may be checked for spelling errors.
  328. tab_index: Defines the position of the current element in the tabbing order.
  329. title: Defines a tooltip for the element.
  330. style: The style of the component.
  331. key: A unique key for the component.
  332. id: The id for the component.
  333. class_name: The class name for the component.
  334. autofocus: Whether the component should take the focus once the page is loaded
  335. custom_attrs: custom attribute
  336. **props: The props of the component.
  337. Returns:
  338. The component.
  339. """
  340. ...
  341. canvas = Canvas.create
  342. noscript = Noscript.create
  343. script = Script.create