avatar.pyi 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. """Stub file for reflex/components/radix/themes/components/avatar.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.event import BASE_STATE, EventType
  8. from reflex.style import Style
  9. from reflex.vars.base import Var
  10. from ..base import RadixThemesComponent
  11. LiteralSize = Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
  12. class Avatar(RadixThemesComponent):
  13. @overload
  14. @classmethod
  15. def create( # type: ignore
  16. cls,
  17. *children,
  18. variant: Optional[
  19. Union[Literal["soft", "solid"], Var[Literal["soft", "solid"]]]
  20. ] = None,
  21. size: Optional[
  22. Union[
  23. Breakpoints[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  24. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  25. Var[
  26. Union[
  27. Breakpoints[
  28. str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
  29. ],
  30. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  31. ]
  32. ],
  33. ]
  34. ] = None,
  35. color_scheme: Optional[
  36. Union[
  37. Literal[
  38. "amber",
  39. "blue",
  40. "bronze",
  41. "brown",
  42. "crimson",
  43. "cyan",
  44. "gold",
  45. "grass",
  46. "gray",
  47. "green",
  48. "indigo",
  49. "iris",
  50. "jade",
  51. "lime",
  52. "mint",
  53. "orange",
  54. "pink",
  55. "plum",
  56. "purple",
  57. "red",
  58. "ruby",
  59. "sky",
  60. "teal",
  61. "tomato",
  62. "violet",
  63. "yellow",
  64. ],
  65. Var[
  66. Literal[
  67. "amber",
  68. "blue",
  69. "bronze",
  70. "brown",
  71. "crimson",
  72. "cyan",
  73. "gold",
  74. "grass",
  75. "gray",
  76. "green",
  77. "indigo",
  78. "iris",
  79. "jade",
  80. "lime",
  81. "mint",
  82. "orange",
  83. "pink",
  84. "plum",
  85. "purple",
  86. "red",
  87. "ruby",
  88. "sky",
  89. "teal",
  90. "tomato",
  91. "violet",
  92. "yellow",
  93. ]
  94. ],
  95. ]
  96. ] = None,
  97. high_contrast: Optional[Union[Var[bool], bool]] = None,
  98. radius: Optional[
  99. Union[
  100. Literal["full", "large", "medium", "none", "small"],
  101. Var[Literal["full", "large", "medium", "none", "small"]],
  102. ]
  103. ] = None,
  104. src: Optional[Union[Var[str], str]] = None,
  105. fallback: Optional[Union[Var[str], str]] = None,
  106. style: Optional[Style] = None,
  107. key: Optional[Any] = None,
  108. id: Optional[Any] = None,
  109. class_name: Optional[Any] = None,
  110. autofocus: Optional[bool] = None,
  111. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  112. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  113. on_click: Optional[EventType[[], BASE_STATE]] = None,
  114. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  115. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  116. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  117. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  118. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  119. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  120. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  121. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  122. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  123. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  124. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  125. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  126. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  127. **props,
  128. ) -> "Avatar":
  129. """Create a new component instance.
  130. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  131. other UI libraries for common names, like Text and Button.
  132. Args:
  133. *children: Child components.
  134. variant: The variant of the avatar
  135. size: The size of the avatar: "1" - "9"
  136. color_scheme: Color theme of the avatar
  137. high_contrast: Whether to render the avatar with higher contrast color against background
  138. radius: Override theme radius for avatar: "none" | "small" | "medium" | "large" | "full"
  139. src: The src of the avatar image
  140. fallback: The rendered fallback text
  141. style: The style of the component.
  142. key: A unique key for the component.
  143. id: The id for the component.
  144. class_name: The class name for the component.
  145. autofocus: Whether the component should take the focus once the page is loaded
  146. custom_attrs: custom attribute
  147. **props: Component properties.
  148. Returns:
  149. A new component instance.
  150. """
  151. ...
  152. avatar = Avatar.create