code.pyi 8.8 KB

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