checkbox.pyi 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. """Stub file for reflex/components/chakra/forms/checkbox.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.vars import Var, BaseVar, ComputedVar
  7. from reflex.event import EventChain, EventHandler, EventSpec
  8. from reflex.style import Style
  9. from typing import Any, Union
  10. from reflex.components.chakra import ChakraComponent, LiteralColorScheme, LiteralTagSize
  11. from reflex.constants import EventTriggers
  12. from reflex.vars import Var
  13. class Checkbox(ChakraComponent):
  14. def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
  15. @overload
  16. @classmethod
  17. def create( # type: ignore
  18. cls,
  19. *children,
  20. color_scheme: Optional[
  21. Union[
  22. Var[
  23. Literal[
  24. "none",
  25. "gray",
  26. "red",
  27. "orange",
  28. "yellow",
  29. "green",
  30. "teal",
  31. "blue",
  32. "cyan",
  33. "purple",
  34. "pink",
  35. "whiteAlpha",
  36. "blackAlpha",
  37. "linkedin",
  38. "facebook",
  39. "messenger",
  40. "whatsapp",
  41. "twitter",
  42. "telegram",
  43. ]
  44. ],
  45. Literal[
  46. "none",
  47. "gray",
  48. "red",
  49. "orange",
  50. "yellow",
  51. "green",
  52. "teal",
  53. "blue",
  54. "cyan",
  55. "purple",
  56. "pink",
  57. "whiteAlpha",
  58. "blackAlpha",
  59. "linkedin",
  60. "facebook",
  61. "messenger",
  62. "whatsapp",
  63. "twitter",
  64. "telegram",
  65. ],
  66. ]
  67. ] = None,
  68. size: Optional[
  69. Union[Var[Literal["sm", "md", "lg"]], Literal["sm", "md", "lg"]]
  70. ] = None,
  71. is_checked: Optional[Union[Var[bool], bool]] = None,
  72. is_disabled: Optional[Union[Var[bool], bool]] = None,
  73. is_focusable: Optional[Union[Var[bool], bool]] = None,
  74. is_indeterminate: Optional[Union[Var[bool], bool]] = None,
  75. is_invalid: Optional[Union[Var[bool], bool]] = None,
  76. is_read_only: Optional[Union[Var[bool], bool]] = None,
  77. is_required: Optional[Union[Var[bool], bool]] = None,
  78. name: Optional[Union[Var[str], str]] = None,
  79. value: Optional[Union[Var[str], str]] = None,
  80. spacing: Optional[Union[Var[str], str]] = None,
  81. style: Optional[Style] = None,
  82. key: Optional[Any] = None,
  83. id: Optional[Any] = None,
  84. class_name: Optional[Any] = None,
  85. autofocus: Optional[bool] = None,
  86. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  87. on_blur: Optional[
  88. Union[EventHandler, EventSpec, list, function, BaseVar]
  89. ] = None,
  90. on_change: Optional[
  91. Union[EventHandler, EventSpec, list, function, BaseVar]
  92. ] = None,
  93. on_click: Optional[
  94. Union[EventHandler, EventSpec, list, function, BaseVar]
  95. ] = None,
  96. on_context_menu: Optional[
  97. Union[EventHandler, EventSpec, list, function, BaseVar]
  98. ] = None,
  99. on_double_click: Optional[
  100. Union[EventHandler, EventSpec, list, function, BaseVar]
  101. ] = None,
  102. on_focus: Optional[
  103. Union[EventHandler, EventSpec, list, function, BaseVar]
  104. ] = None,
  105. on_mount: Optional[
  106. Union[EventHandler, EventSpec, list, function, BaseVar]
  107. ] = None,
  108. on_mouse_down: Optional[
  109. Union[EventHandler, EventSpec, list, function, BaseVar]
  110. ] = None,
  111. on_mouse_enter: Optional[
  112. Union[EventHandler, EventSpec, list, function, BaseVar]
  113. ] = None,
  114. on_mouse_leave: Optional[
  115. Union[EventHandler, EventSpec, list, function, BaseVar]
  116. ] = None,
  117. on_mouse_move: Optional[
  118. Union[EventHandler, EventSpec, list, function, BaseVar]
  119. ] = None,
  120. on_mouse_out: Optional[
  121. Union[EventHandler, EventSpec, list, function, BaseVar]
  122. ] = None,
  123. on_mouse_over: Optional[
  124. Union[EventHandler, EventSpec, list, function, BaseVar]
  125. ] = None,
  126. on_mouse_up: Optional[
  127. Union[EventHandler, EventSpec, list, function, BaseVar]
  128. ] = None,
  129. on_scroll: Optional[
  130. Union[EventHandler, EventSpec, list, function, BaseVar]
  131. ] = None,
  132. on_unmount: Optional[
  133. Union[EventHandler, EventSpec, list, function, BaseVar]
  134. ] = None,
  135. **props
  136. ) -> "Checkbox":
  137. """Create the component.
  138. Args:
  139. *children: The children of the component.
  140. color_scheme: Color scheme for checkbox. Options: "whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"
  141. size: "sm" | "md" | "lg"
  142. is_checked: If true, the checkbox will be checked.
  143. is_disabled: If true, the checkbox will be disabled
  144. is_focusable: If true and is_disabled is passed, the checkbox will remain tabbable but not interactive
  145. is_indeterminate: If true, the checkbox will be indeterminate. This only affects the icon shown inside checkbox and does not modify the is_checked var.
  146. is_invalid: If true, the checkbox is marked as invalid. Changes style of unchecked state.
  147. is_read_only: If true, the checkbox will be readonly
  148. is_required: If true, the checkbox input is marked as required, and required attribute will be added
  149. name: The name of the input field in a checkbox (Useful for form submission).
  150. value: The value of the input field when checked (use is_checked prop for a bool)
  151. spacing: The spacing between the checkbox and its label text (0.5rem)
  152. style: The style of the component.
  153. key: A unique key for the component.
  154. id: The id for the component.
  155. class_name: The class name for the component.
  156. autofocus: Whether the component should take the focus once the page is loaded
  157. custom_attrs: custom attribute
  158. **props: The props of the component.
  159. Returns:
  160. The component.
  161. """
  162. ...
  163. class CheckboxGroup(ChakraComponent):
  164. @overload
  165. @classmethod
  166. def create( # type: ignore
  167. cls,
  168. *children,
  169. value: Optional[Union[Var[str], str]] = None,
  170. default_value: Optional[Union[Var[str], str]] = None,
  171. is_disabled: Optional[Union[Var[bool], bool]] = None,
  172. is_native: Optional[Union[Var[bool], bool]] = None,
  173. style: Optional[Style] = None,
  174. key: Optional[Any] = None,
  175. id: Optional[Any] = None,
  176. class_name: Optional[Any] = None,
  177. autofocus: Optional[bool] = None,
  178. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  179. on_blur: Optional[
  180. Union[EventHandler, EventSpec, list, function, BaseVar]
  181. ] = None,
  182. on_click: Optional[
  183. Union[EventHandler, EventSpec, list, function, BaseVar]
  184. ] = None,
  185. on_context_menu: Optional[
  186. Union[EventHandler, EventSpec, list, function, BaseVar]
  187. ] = None,
  188. on_double_click: Optional[
  189. Union[EventHandler, EventSpec, list, function, BaseVar]
  190. ] = None,
  191. on_focus: Optional[
  192. Union[EventHandler, EventSpec, list, function, BaseVar]
  193. ] = None,
  194. on_mount: Optional[
  195. Union[EventHandler, EventSpec, list, function, BaseVar]
  196. ] = None,
  197. on_mouse_down: Optional[
  198. Union[EventHandler, EventSpec, list, function, BaseVar]
  199. ] = None,
  200. on_mouse_enter: Optional[
  201. Union[EventHandler, EventSpec, list, function, BaseVar]
  202. ] = None,
  203. on_mouse_leave: Optional[
  204. Union[EventHandler, EventSpec, list, function, BaseVar]
  205. ] = None,
  206. on_mouse_move: Optional[
  207. Union[EventHandler, EventSpec, list, function, BaseVar]
  208. ] = None,
  209. on_mouse_out: Optional[
  210. Union[EventHandler, EventSpec, list, function, BaseVar]
  211. ] = None,
  212. on_mouse_over: Optional[
  213. Union[EventHandler, EventSpec, list, function, BaseVar]
  214. ] = None,
  215. on_mouse_up: Optional[
  216. Union[EventHandler, EventSpec, list, function, BaseVar]
  217. ] = None,
  218. on_scroll: Optional[
  219. Union[EventHandler, EventSpec, list, function, BaseVar]
  220. ] = None,
  221. on_unmount: Optional[
  222. Union[EventHandler, EventSpec, list, function, BaseVar]
  223. ] = None,
  224. **props
  225. ) -> "CheckboxGroup":
  226. """Create the component.
  227. Args:
  228. *children: The children of the component.
  229. value: The value of the checkbox group
  230. default_value: The initial value of the checkbox group
  231. is_disabled: If true, all wrapped checkbox inputs will be disabled
  232. is_native: If true, input elements will receive checked attribute instead of isChecked. This assumes, you're using native radio inputs
  233. style: The style of the component.
  234. key: A unique key for the component.
  235. id: The id for the component.
  236. class_name: The class name for the component.
  237. autofocus: Whether the component should take the focus once the page is loaded
  238. custom_attrs: custom attribute
  239. **props: The props of the component.
  240. Returns:
  241. The component.
  242. """
  243. ...