checkbox.pyi 10 KB

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