code.pyi 9.5 KB

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