script.pyi 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. """Stub file for reflex/components/base/script.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Literal, Optional, overload
  6. from reflex.components import el as elements
  7. from reflex.event import EventType
  8. from reflex.vars.base import Var
  9. class Script(elements.Script):
  10. @overload
  11. @classmethod
  12. def create( # type: ignore
  13. cls,
  14. *children,
  15. async_: Var[bool] | bool | None = None,
  16. char_set: Var[str] | str | None = None,
  17. cross_origin: Literal["", "anonymous", "use-credentials"]
  18. | Var[Literal["", "anonymous", "use-credentials"]]
  19. | None = None,
  20. defer: Var[bool] | bool | None = None,
  21. integrity: Var[str] | str | None = None,
  22. referrer_policy: Literal[
  23. "",
  24. "no-referrer",
  25. "no-referrer-when-downgrade",
  26. "origin",
  27. "origin-when-cross-origin",
  28. "same-origin",
  29. "strict-origin",
  30. "strict-origin-when-cross-origin",
  31. "unsafe-url",
  32. ]
  33. | Var[
  34. Literal[
  35. "",
  36. "no-referrer",
  37. "no-referrer-when-downgrade",
  38. "origin",
  39. "origin-when-cross-origin",
  40. "same-origin",
  41. "strict-origin",
  42. "strict-origin-when-cross-origin",
  43. "unsafe-url",
  44. ]
  45. ]
  46. | None = None,
  47. src: Var[str] | str | None = None,
  48. type: Var[str] | str | None = None,
  49. access_key: Var[str] | str | None = None,
  50. auto_capitalize: Literal[
  51. "characters", "none", "off", "on", "sentences", "words"
  52. ]
  53. | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
  54. | None = None,
  55. content_editable: Literal["inherit", "plaintext-only", False, True]
  56. | Var[Literal["inherit", "plaintext-only", False, True]]
  57. | None = None,
  58. context_menu: Var[str] | str | None = None,
  59. dir: Var[str] | str | None = None,
  60. draggable: Var[bool] | bool | None = None,
  61. enter_key_hint: Literal[
  62. "done", "enter", "go", "next", "previous", "search", "send"
  63. ]
  64. | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
  65. | None = None,
  66. hidden: Var[bool] | bool | None = None,
  67. input_mode: Literal[
  68. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  69. ]
  70. | Var[
  71. Literal[
  72. "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
  73. ]
  74. ]
  75. | None = None,
  76. item_prop: Var[str] | str | None = None,
  77. lang: Var[str] | str | None = None,
  78. role: Literal[
  79. "alert",
  80. "alertdialog",
  81. "application",
  82. "article",
  83. "banner",
  84. "button",
  85. "cell",
  86. "checkbox",
  87. "columnheader",
  88. "combobox",
  89. "complementary",
  90. "contentinfo",
  91. "definition",
  92. "dialog",
  93. "directory",
  94. "document",
  95. "feed",
  96. "figure",
  97. "form",
  98. "grid",
  99. "gridcell",
  100. "group",
  101. "heading",
  102. "img",
  103. "link",
  104. "list",
  105. "listbox",
  106. "listitem",
  107. "log",
  108. "main",
  109. "marquee",
  110. "math",
  111. "menu",
  112. "menubar",
  113. "menuitem",
  114. "menuitemcheckbox",
  115. "menuitemradio",
  116. "navigation",
  117. "none",
  118. "note",
  119. "option",
  120. "presentation",
  121. "progressbar",
  122. "radio",
  123. "radiogroup",
  124. "region",
  125. "row",
  126. "rowgroup",
  127. "rowheader",
  128. "scrollbar",
  129. "search",
  130. "searchbox",
  131. "separator",
  132. "slider",
  133. "spinbutton",
  134. "status",
  135. "switch",
  136. "tab",
  137. "table",
  138. "tablist",
  139. "tabpanel",
  140. "term",
  141. "textbox",
  142. "timer",
  143. "toolbar",
  144. "tooltip",
  145. "tree",
  146. "treegrid",
  147. "treeitem",
  148. ]
  149. | Var[
  150. Literal[
  151. "alert",
  152. "alertdialog",
  153. "application",
  154. "article",
  155. "banner",
  156. "button",
  157. "cell",
  158. "checkbox",
  159. "columnheader",
  160. "combobox",
  161. "complementary",
  162. "contentinfo",
  163. "definition",
  164. "dialog",
  165. "directory",
  166. "document",
  167. "feed",
  168. "figure",
  169. "form",
  170. "grid",
  171. "gridcell",
  172. "group",
  173. "heading",
  174. "img",
  175. "link",
  176. "list",
  177. "listbox",
  178. "listitem",
  179. "log",
  180. "main",
  181. "marquee",
  182. "math",
  183. "menu",
  184. "menubar",
  185. "menuitem",
  186. "menuitemcheckbox",
  187. "menuitemradio",
  188. "navigation",
  189. "none",
  190. "note",
  191. "option",
  192. "presentation",
  193. "progressbar",
  194. "radio",
  195. "radiogroup",
  196. "region",
  197. "row",
  198. "rowgroup",
  199. "rowheader",
  200. "scrollbar",
  201. "search",
  202. "searchbox",
  203. "separator",
  204. "slider",
  205. "spinbutton",
  206. "status",
  207. "switch",
  208. "tab",
  209. "table",
  210. "tablist",
  211. "tabpanel",
  212. "term",
  213. "textbox",
  214. "timer",
  215. "toolbar",
  216. "tooltip",
  217. "tree",
  218. "treegrid",
  219. "treeitem",
  220. ]
  221. ]
  222. | None = None,
  223. slot: Var[str] | str | None = None,
  224. spell_check: Var[bool] | bool | None = None,
  225. tab_index: Var[int] | int | None = None,
  226. title: Var[str] | str | None = None,
  227. style: Style | None = None,
  228. key: Any | None = None,
  229. id: Any | None = None,
  230. class_name: Any | None = None,
  231. autofocus: bool | None = None,
  232. custom_attrs: dict[str, Var | Any] | None = None,
  233. on_blur: Optional[EventType[()]] = None,
  234. on_click: Optional[EventType[()]] = None,
  235. on_context_menu: Optional[EventType[()]] = None,
  236. on_double_click: Optional[EventType[()]] = None,
  237. on_focus: Optional[EventType[()]] = None,
  238. on_mount: Optional[EventType[()]] = None,
  239. on_mouse_down: Optional[EventType[()]] = None,
  240. on_mouse_enter: Optional[EventType[()]] = None,
  241. on_mouse_leave: Optional[EventType[()]] = None,
  242. on_mouse_move: Optional[EventType[()]] = None,
  243. on_mouse_out: Optional[EventType[()]] = None,
  244. on_mouse_over: Optional[EventType[()]] = None,
  245. on_mouse_up: Optional[EventType[()]] = None,
  246. on_scroll: Optional[EventType[()]] = None,
  247. on_unmount: Optional[EventType[()]] = None,
  248. **props,
  249. ) -> "Script":
  250. """Display the script element.
  251. Args:
  252. *children: The children of the element.
  253. async_: Indicates that the script should be executed asynchronously
  254. char_set: Character encoding of the external script
  255. cross_origin: Configures the CORS requests for the script
  256. defer: Indicates that the script should be executed after the page has finished parsing
  257. integrity: Security feature allowing browsers to verify what they fetch
  258. referrer_policy: Specifies which referrer information to send when fetching the script
  259. src: URL of an external script
  260. type: Specifies the MIME type of the script
  261. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  262. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  263. content_editable: Indicates whether the element's content is editable.
  264. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  265. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  266. draggable: Defines whether the element can be dragged.
  267. enter_key_hint: Hints what media types the media element is able to play.
  268. hidden: Defines whether the element is hidden.
  269. input_mode: Defines the type of the element.
  270. item_prop: Defines the name of the element for metadata purposes.
  271. lang: Defines the language used in the element.
  272. role: Defines the role of the element.
  273. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  274. spell_check: Defines whether the element may be checked for spelling errors.
  275. tab_index: Defines the position of the current element in the tabbing order.
  276. title: Defines a tooltip for the element.
  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 properties of the element.
  284. Returns:
  285. The script element.
  286. """
  287. ...
  288. script = Script.create