code.pyi 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. """Stub file for reflex/components/radix/themes/typography/code.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 reflex import el
  10. from reflex.vars import Var
  11. from ..base import (
  12. CommonMarginProps,
  13. LiteralAccentColor,
  14. LiteralVariant,
  15. RadixThemesComponent,
  16. )
  17. from .base import LiteralTextSize, LiteralTextWeight
  18. class Code(el.Code, CommonMarginProps, RadixThemesComponent):
  19. @overload
  20. @classmethod
  21. def create( # type: ignore
  22. cls,
  23. *children,
  24. color: Optional[Union[Var[str], str]] = None,
  25. color_scheme: Optional[
  26. Union[
  27. Var[
  28. Literal[
  29. "tomato",
  30. "red",
  31. "ruby",
  32. "crimson",
  33. "pink",
  34. "plum",
  35. "purple",
  36. "violet",
  37. "iris",
  38. "indigo",
  39. "blue",
  40. "cyan",
  41. "teal",
  42. "jade",
  43. "green",
  44. "grass",
  45. "brown",
  46. "orange",
  47. "sky",
  48. "mint",
  49. "lime",
  50. "yellow",
  51. "amber",
  52. "gold",
  53. "bronze",
  54. "gray",
  55. ]
  56. ],
  57. Literal[
  58. "tomato",
  59. "red",
  60. "ruby",
  61. "crimson",
  62. "pink",
  63. "plum",
  64. "purple",
  65. "violet",
  66. "iris",
  67. "indigo",
  68. "blue",
  69. "cyan",
  70. "teal",
  71. "jade",
  72. "green",
  73. "grass",
  74. "brown",
  75. "orange",
  76. "sky",
  77. "mint",
  78. "lime",
  79. "yellow",
  80. "amber",
  81. "gold",
  82. "bronze",
  83. "gray",
  84. ],
  85. ]
  86. ] = None,
  87. variant: Optional[
  88. Union[
  89. Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]],
  90. Literal["classic", "solid", "soft", "surface", "outline", "ghost"],
  91. ]
  92. ] = None,
  93. size: Optional[
  94. Union[
  95. Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  96. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  97. ]
  98. ] = None,
  99. weight: Optional[
  100. Union[
  101. Var[Literal["light", "regular", "medium", "bold"]],
  102. Literal["light", "regular", "medium", "bold"],
  103. ]
  104. ] = None,
  105. high_contrast: Optional[Union[Var[bool], bool]] = None,
  106. access_key: Optional[
  107. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  108. ] = None,
  109. auto_capitalize: Optional[
  110. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  111. ] = None,
  112. content_editable: Optional[
  113. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  114. ] = None,
  115. context_menu: Optional[
  116. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  117. ] = None,
  118. dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  119. draggable: Optional[
  120. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  121. ] = None,
  122. enter_key_hint: Optional[
  123. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  124. ] = None,
  125. hidden: Optional[
  126. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  127. ] = None,
  128. input_mode: Optional[
  129. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  130. ] = None,
  131. item_prop: Optional[
  132. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  133. ] = None,
  134. lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  135. role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  136. slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
  137. spell_check: Optional[
  138. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  139. ] = None,
  140. tab_index: Optional[
  141. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  142. ] = None,
  143. title: Optional[
  144. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  145. ] = None,
  146. translate: Optional[
  147. Union[Var[Union[str, int, bool]], Union[str, int, bool]]
  148. ] = None,
  149. m: Optional[
  150. Union[
  151. Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  152. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  153. ]
  154. ] = None,
  155. mx: Optional[
  156. Union[
  157. Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  158. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  159. ]
  160. ] = None,
  161. my: Optional[
  162. Union[
  163. Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  164. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  165. ]
  166. ] = None,
  167. mt: Optional[
  168. Union[
  169. Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  170. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  171. ]
  172. ] = None,
  173. mr: Optional[
  174. Union[
  175. Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  176. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  177. ]
  178. ] = None,
  179. mb: Optional[
  180. Union[
  181. Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  182. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  183. ]
  184. ] = None,
  185. ml: Optional[
  186. Union[
  187. Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  188. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  189. ]
  190. ] = None,
  191. style: Optional[Style] = None,
  192. key: Optional[Any] = None,
  193. id: Optional[Any] = None,
  194. class_name: Optional[Any] = None,
  195. autofocus: Optional[bool] = None,
  196. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  197. on_blur: Optional[
  198. Union[EventHandler, EventSpec, list, function, BaseVar]
  199. ] = None,
  200. on_click: Optional[
  201. Union[EventHandler, EventSpec, list, function, BaseVar]
  202. ] = None,
  203. on_context_menu: Optional[
  204. Union[EventHandler, EventSpec, list, function, BaseVar]
  205. ] = None,
  206. on_double_click: Optional[
  207. Union[EventHandler, EventSpec, list, function, BaseVar]
  208. ] = None,
  209. on_focus: Optional[
  210. Union[EventHandler, EventSpec, list, function, BaseVar]
  211. ] = None,
  212. on_mount: Optional[
  213. Union[EventHandler, EventSpec, list, function, BaseVar]
  214. ] = None,
  215. on_mouse_down: Optional[
  216. Union[EventHandler, EventSpec, list, function, BaseVar]
  217. ] = None,
  218. on_mouse_enter: Optional[
  219. Union[EventHandler, EventSpec, list, function, BaseVar]
  220. ] = None,
  221. on_mouse_leave: Optional[
  222. Union[EventHandler, EventSpec, list, function, BaseVar]
  223. ] = None,
  224. on_mouse_move: Optional[
  225. Union[EventHandler, EventSpec, list, function, BaseVar]
  226. ] = None,
  227. on_mouse_out: Optional[
  228. Union[EventHandler, EventSpec, list, function, BaseVar]
  229. ] = None,
  230. on_mouse_over: Optional[
  231. Union[EventHandler, EventSpec, list, function, BaseVar]
  232. ] = None,
  233. on_mouse_up: Optional[
  234. Union[EventHandler, EventSpec, list, function, BaseVar]
  235. ] = None,
  236. on_scroll: Optional[
  237. Union[EventHandler, EventSpec, list, function, BaseVar]
  238. ] = None,
  239. on_unmount: Optional[
  240. Union[EventHandler, EventSpec, list, function, BaseVar]
  241. ] = None,
  242. **props
  243. ) -> "Code":
  244. """Create a new component instance.
  245. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  246. other UI libraries for common names, like Text and Button.
  247. Args:
  248. *children: Child components.
  249. color: map to CSS default color property.
  250. color_scheme: map to radix color property.
  251. variant: The visual variant to apply: "solid" | "soft" | "outline" | "ghost"
  252. size: Text size: "1" - "9"
  253. weight: Thickness of text: "light" | "regular" | "medium" | "bold"
  254. high_contrast: Whether to render the text with higher contrast color
  255. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  256. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  257. content_editable: Indicates whether the element's content is editable.
  258. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  259. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  260. draggable: Defines whether the element can be dragged.
  261. enter_key_hint: Hints what media types the media element is able to play.
  262. hidden: Defines whether the element is hidden.
  263. input_mode: Defines the type of the element.
  264. item_prop: Defines the name of the element for metadata purposes.
  265. lang: Defines the language used in the element.
  266. role: Defines the role of the element.
  267. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  268. spell_check: Defines whether the element may be checked for spelling errors.
  269. tab_index: Defines the position of the current element in the tabbing order.
  270. title: Defines a tooltip for the element.
  271. translate: Specifies whether the content of an element should be translated or not.
  272. m: Margin: "0" - "9"
  273. mx: Margin horizontal: "0" - "9"
  274. my: Margin vertical: "0" - "9"
  275. mt: Margin top: "0" - "9"
  276. mr: Margin right: "0" - "9"
  277. mb: Margin bottom: "0" - "9"
  278. ml: Margin left: "0" - "9"
  279. style: The style of the component.
  280. key: A unique key for the component.
  281. id: The id for the component.
  282. class_name: The class name for the component.
  283. autofocus: Whether the component should take the focus once the page is loaded
  284. custom_attrs: custom attribute
  285. **props: Component properties.
  286. Returns:
  287. A new component instance.
  288. """
  289. ...