radio.pyi 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. """Stub file for reflex/components/chakra/forms/radio.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 typing import Any, Dict, List, Union
  10. from reflex.components.chakra import ChakraComponent
  11. from reflex.components.chakra.typography.text import Text
  12. from reflex.components.component import Component
  13. from reflex.components.core.foreach import Foreach
  14. from reflex.constants import EventTriggers
  15. from reflex.utils.types import _issubclass
  16. from reflex.vars import Var
  17. class RadioGroup(ChakraComponent):
  18. def get_event_triggers(self) -> Dict[str, Union[Var, Any]]: ...
  19. @overload
  20. @classmethod
  21. def create( # type: ignore
  22. cls,
  23. *children,
  24. value: Optional[Union[Var[Any], Any]] = None,
  25. default_value: Optional[Union[Var[Any], Any]] = None,
  26. name: Optional[Union[Var[str], str]] = None,
  27. style: Optional[Style] = None,
  28. key: Optional[Any] = None,
  29. id: Optional[Any] = None,
  30. class_name: Optional[Any] = None,
  31. autofocus: Optional[bool] = None,
  32. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  33. on_blur: Optional[
  34. Union[EventHandler, EventSpec, list, function, BaseVar]
  35. ] = None,
  36. on_change: Optional[
  37. Union[EventHandler, EventSpec, list, function, BaseVar]
  38. ] = None,
  39. on_click: Optional[
  40. Union[EventHandler, EventSpec, list, function, BaseVar]
  41. ] = None,
  42. on_context_menu: Optional[
  43. Union[EventHandler, EventSpec, list, function, BaseVar]
  44. ] = None,
  45. on_double_click: Optional[
  46. Union[EventHandler, EventSpec, list, function, BaseVar]
  47. ] = None,
  48. on_focus: Optional[
  49. Union[EventHandler, EventSpec, list, function, BaseVar]
  50. ] = None,
  51. on_mount: Optional[
  52. Union[EventHandler, EventSpec, list, function, BaseVar]
  53. ] = None,
  54. on_mouse_down: Optional[
  55. Union[EventHandler, EventSpec, list, function, BaseVar]
  56. ] = None,
  57. on_mouse_enter: Optional[
  58. Union[EventHandler, EventSpec, list, function, BaseVar]
  59. ] = None,
  60. on_mouse_leave: Optional[
  61. Union[EventHandler, EventSpec, list, function, BaseVar]
  62. ] = None,
  63. on_mouse_move: Optional[
  64. Union[EventHandler, EventSpec, list, function, BaseVar]
  65. ] = None,
  66. on_mouse_out: Optional[
  67. Union[EventHandler, EventSpec, list, function, BaseVar]
  68. ] = None,
  69. on_mouse_over: Optional[
  70. Union[EventHandler, EventSpec, list, function, BaseVar]
  71. ] = None,
  72. on_mouse_up: Optional[
  73. Union[EventHandler, EventSpec, list, function, BaseVar]
  74. ] = None,
  75. on_scroll: Optional[
  76. Union[EventHandler, EventSpec, list, function, BaseVar]
  77. ] = None,
  78. on_unmount: Optional[
  79. Union[EventHandler, EventSpec, list, function, BaseVar]
  80. ] = None,
  81. **props
  82. ) -> "RadioGroup":
  83. """Create a radio group component.
  84. Args:
  85. *children: The children of the component.
  86. value: State var to bind the the input.
  87. default_value: The default value.
  88. name: The name of the form field
  89. style: The style of the component.
  90. key: A unique key for the component.
  91. id: The id for the component.
  92. class_name: The class name for the component.
  93. autofocus: Whether the component should take the focus once the page is loaded
  94. custom_attrs: custom attribute
  95. **props: The props of the component.
  96. Returns:
  97. The component.
  98. """
  99. ...
  100. class Radio(Text):
  101. @overload
  102. @classmethod
  103. def create( # type: ignore
  104. cls,
  105. *children,
  106. value: Optional[Union[Var[Any], Any]] = None,
  107. default_value: Optional[Union[Var[Any], Any]] = None,
  108. color_scheme: Optional[Union[Var[str], str]] = None,
  109. default_checked: Optional[Union[Var[bool], bool]] = None,
  110. is_checked: Optional[Union[Var[bool], bool]] = None,
  111. is_disabled: Optional[Union[Var[bool], bool]] = None,
  112. is_invalid: Optional[Union[Var[bool], bool]] = None,
  113. is_read_only: Optional[Union[Var[bool], bool]] = None,
  114. is_required: Optional[Union[Var[bool], bool]] = None,
  115. as_: Optional[Union[Var[str], str]] = None,
  116. no_of_lines: Optional[Union[Var[int], int]] = None,
  117. style: Optional[Style] = None,
  118. key: Optional[Any] = None,
  119. id: Optional[Any] = None,
  120. class_name: Optional[Any] = None,
  121. autofocus: Optional[bool] = None,
  122. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  123. on_blur: Optional[
  124. Union[EventHandler, EventSpec, list, function, BaseVar]
  125. ] = None,
  126. on_click: Optional[
  127. Union[EventHandler, EventSpec, list, function, BaseVar]
  128. ] = None,
  129. on_context_menu: Optional[
  130. Union[EventHandler, EventSpec, list, function, BaseVar]
  131. ] = None,
  132. on_double_click: Optional[
  133. Union[EventHandler, EventSpec, list, function, BaseVar]
  134. ] = None,
  135. on_focus: Optional[
  136. Union[EventHandler, EventSpec, list, function, BaseVar]
  137. ] = None,
  138. on_mount: Optional[
  139. Union[EventHandler, EventSpec, list, function, BaseVar]
  140. ] = None,
  141. on_mouse_down: Optional[
  142. Union[EventHandler, EventSpec, list, function, BaseVar]
  143. ] = None,
  144. on_mouse_enter: Optional[
  145. Union[EventHandler, EventSpec, list, function, BaseVar]
  146. ] = None,
  147. on_mouse_leave: Optional[
  148. Union[EventHandler, EventSpec, list, function, BaseVar]
  149. ] = None,
  150. on_mouse_move: Optional[
  151. Union[EventHandler, EventSpec, list, function, BaseVar]
  152. ] = None,
  153. on_mouse_out: Optional[
  154. Union[EventHandler, EventSpec, list, function, BaseVar]
  155. ] = None,
  156. on_mouse_over: Optional[
  157. Union[EventHandler, EventSpec, list, function, BaseVar]
  158. ] = None,
  159. on_mouse_up: Optional[
  160. Union[EventHandler, EventSpec, list, function, BaseVar]
  161. ] = None,
  162. on_scroll: Optional[
  163. Union[EventHandler, EventSpec, list, function, BaseVar]
  164. ] = None,
  165. on_unmount: Optional[
  166. Union[EventHandler, EventSpec, list, function, BaseVar]
  167. ] = None,
  168. **props
  169. ) -> "Radio":
  170. """Create a radio component.
  171. By default, the value is bound to the first child.
  172. Args:
  173. *children: The children of the component.
  174. value: Value of radio.
  175. default_value: The default value.
  176. color_scheme: The color scheme.
  177. default_checked: If true, the radio will be initially checked.
  178. is_checked: If true, the radio will be checked. You'll need to pass onChange to update its value (since it is now controlled)
  179. is_disabled: If true, the radio will be disabled.
  180. is_invalid: If true, the radio button will be invalid. This also sets `aria-invalid` to true.
  181. is_read_only: If true, the radio will be read-only
  182. is_required: If true, the radio button will be required. This also sets `aria-required` to true.
  183. as_: Override the tag. The default tag is `<p>`.
  184. no_of_lines: Truncate text after a specific number of lines. It will render an ellipsis when the text exceeds the width of the viewport or max_width prop.
  185. style: The style of the component.
  186. key: A unique key for the component.
  187. id: The id for the component.
  188. class_name: The class name for the component.
  189. autofocus: Whether the component should take the focus once the page is loaded
  190. custom_attrs: custom attribute
  191. **props: The props of the component.
  192. Returns:
  193. The radio component.
  194. """
  195. ...