code.pyi 8.9 KB

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