link.pyi 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. """Stub file for reflex/components/radix/themes/typography/link.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.component import MemoizationLeaf
  7. from reflex.components.core.breakpoints import Breakpoints
  8. from reflex.components.el.elements.inline import A
  9. from reflex.components.markdown.markdown import MarkdownComponentMap
  10. from reflex.components.next.link import NextLink
  11. from reflex.event import BASE_STATE, EventType
  12. from reflex.style import Style
  13. from reflex.utils.imports import ImportDict
  14. from reflex.vars.base import Var
  15. from ..base import RadixThemesComponent
  16. LiteralLinkUnderline = Literal["auto", "hover", "always", "none"]
  17. next_link = NextLink.create()
  18. class Link(RadixThemesComponent, A, MemoizationLeaf, MarkdownComponentMap):
  19. def add_imports(self) -> ImportDict: ...
  20. @overload
  21. @classmethod
  22. def create( # type: ignore
  23. cls,
  24. *children,
  25. as_child: Optional[Union[Var[bool], bool]] = None,
  26. size: Optional[
  27. Union[
  28. Breakpoints[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  29. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  30. Var[
  31. Union[
  32. Breakpoints[
  33. str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
  34. ],
  35. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  36. ]
  37. ],
  38. ]
  39. ] = None,
  40. weight: Optional[
  41. Union[
  42. Breakpoints[str, Literal["bold", "light", "medium", "regular"]],
  43. Literal["bold", "light", "medium", "regular"],
  44. Var[
  45. Union[
  46. Breakpoints[str, Literal["bold", "light", "medium", "regular"]],
  47. Literal["bold", "light", "medium", "regular"],
  48. ]
  49. ],
  50. ]
  51. ] = None,
  52. trim: Optional[
  53. Union[
  54. Breakpoints[str, Literal["both", "end", "normal", "start"]],
  55. Literal["both", "end", "normal", "start"],
  56. Var[
  57. Union[
  58. Breakpoints[str, Literal["both", "end", "normal", "start"]],
  59. Literal["both", "end", "normal", "start"],
  60. ]
  61. ],
  62. ]
  63. ] = None,
  64. underline: Optional[
  65. Union[
  66. Literal["always", "auto", "hover", "none"],
  67. Var[Literal["always", "auto", "hover", "none"]],
  68. ]
  69. ] = None,
  70. color_scheme: Optional[
  71. Union[
  72. Literal[
  73. "amber",
  74. "blue",
  75. "bronze",
  76. "brown",
  77. "crimson",
  78. "cyan",
  79. "gold",
  80. "grass",
  81. "gray",
  82. "green",
  83. "indigo",
  84. "iris",
  85. "jade",
  86. "lime",
  87. "mint",
  88. "orange",
  89. "pink",
  90. "plum",
  91. "purple",
  92. "red",
  93. "ruby",
  94. "sky",
  95. "teal",
  96. "tomato",
  97. "violet",
  98. "yellow",
  99. ],
  100. Var[
  101. Literal[
  102. "amber",
  103. "blue",
  104. "bronze",
  105. "brown",
  106. "crimson",
  107. "cyan",
  108. "gold",
  109. "grass",
  110. "gray",
  111. "green",
  112. "indigo",
  113. "iris",
  114. "jade",
  115. "lime",
  116. "mint",
  117. "orange",
  118. "pink",
  119. "plum",
  120. "purple",
  121. "red",
  122. "ruby",
  123. "sky",
  124. "teal",
  125. "tomato",
  126. "violet",
  127. "yellow",
  128. ]
  129. ],
  130. ]
  131. ] = None,
  132. high_contrast: Optional[Union[Var[bool], bool]] = None,
  133. is_external: Optional[Union[Var[bool], bool]] = None,
  134. download: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  135. href: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  136. href_lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  137. media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  138. ping: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  139. referrer_policy: Optional[
  140. Union[Var[Union[bool, int, str]], bool, int, str]
  141. ] = None,
  142. rel: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  143. shape: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  144. target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  145. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  146. auto_capitalize: Optional[
  147. Union[Var[Union[bool, int, str]], bool, int, str]
  148. ] = None,
  149. content_editable: Optional[
  150. Union[Var[Union[bool, int, str]], bool, int, str]
  151. ] = None,
  152. context_menu: Optional[
  153. Union[Var[Union[bool, int, str]], bool, int, str]
  154. ] = None,
  155. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  156. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  157. enter_key_hint: Optional[
  158. Union[Var[Union[bool, int, str]], bool, int, str]
  159. ] = None,
  160. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  161. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  162. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  163. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  164. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  165. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  166. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  167. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  168. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  169. style: Optional[Style] = None,
  170. key: Optional[Any] = None,
  171. id: Optional[Any] = None,
  172. class_name: Optional[Any] = None,
  173. autofocus: Optional[bool] = None,
  174. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  175. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  176. on_click: Optional[EventType[[], BASE_STATE]] = None,
  177. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  178. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  179. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  180. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  181. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  182. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  183. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  184. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  185. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  186. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  187. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  188. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  189. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  190. **props,
  191. ) -> "Link":
  192. """Create a Link component.
  193. Args:
  194. *children: The children of the component.
  195. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
  196. size: Text size: "1" - "9"
  197. weight: Thickness of text: "light" | "regular" | "medium" | "bold"
  198. trim: Removes the leading trim space: "normal" | "start" | "end" | "both"
  199. underline: Sets the visibility of the underline affordance: "auto" | "hover" | "always" | "none"
  200. color_scheme: Overrides the accent color inherited from the Theme.
  201. high_contrast: Whether to render the text with higher contrast color
  202. is_external: If True, the link will open in a new tab
  203. download: Specifies that the target (the file specified in the href attribute) will be downloaded when a user clicks on the hyperlink.
  204. href: Specifies the URL of the page the link goes to
  205. href_lang: Specifies the language of the linked document
  206. media: Specifies what media/device the linked document is optimized for
  207. ping: Specifies which referrer is sent when fetching the resource
  208. referrer_policy: Specifies the relationship between the current document and the linked document
  209. rel: Specifies the relationship between the linked document and the current document
  210. shape: Specifies the shape of the area
  211. target: Specifies where to open the linked document
  212. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  213. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  214. content_editable: Indicates whether the element's content is editable.
  215. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  216. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  217. draggable: Defines whether the element can be dragged.
  218. enter_key_hint: Hints what media types the media element is able to play.
  219. hidden: Defines whether the element is hidden.
  220. input_mode: Defines the type of the element.
  221. item_prop: Defines the name of the element for metadata purposes.
  222. lang: Defines the language used in the element.
  223. role: Defines the role of the element.
  224. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  225. spell_check: Defines whether the element may be checked for spelling errors.
  226. tab_index: Defines the position of the current element in the tabbing order.
  227. title: Defines a tooltip for the element.
  228. style: The style of the component.
  229. key: A unique key for the component.
  230. id: The id for the component.
  231. class_name: The class name for the component.
  232. autofocus: Whether the component should take the focus once the page is loaded
  233. custom_attrs: custom attribute
  234. **props: The props of the component.
  235. Raises:
  236. ValueError: in case of missing children
  237. Returns:
  238. Component: The link component
  239. """
  240. ...
  241. link = Link.create