checkbox.pyi 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. """Stub file for reflex/components/chakra/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.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. _rename_props: Optional[Dict[str, str]] = None,
  87. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  88. on_blur: Optional[
  89. Union[EventHandler, EventSpec, list, function, BaseVar]
  90. ] = None,
  91. on_change: Optional[
  92. Union[EventHandler, EventSpec, list, function, BaseVar]
  93. ] = None,
  94. on_click: Optional[
  95. Union[EventHandler, EventSpec, list, function, BaseVar]
  96. ] = None,
  97. on_context_menu: Optional[
  98. Union[EventHandler, EventSpec, list, function, BaseVar]
  99. ] = None,
  100. on_double_click: Optional[
  101. Union[EventHandler, EventSpec, list, function, BaseVar]
  102. ] = None,
  103. on_focus: Optional[
  104. Union[EventHandler, EventSpec, list, function, BaseVar]
  105. ] = None,
  106. on_mount: Optional[
  107. Union[EventHandler, EventSpec, list, function, BaseVar]
  108. ] = None,
  109. on_mouse_down: Optional[
  110. Union[EventHandler, EventSpec, list, function, BaseVar]
  111. ] = None,
  112. on_mouse_enter: Optional[
  113. Union[EventHandler, EventSpec, list, function, BaseVar]
  114. ] = None,
  115. on_mouse_leave: Optional[
  116. Union[EventHandler, EventSpec, list, function, BaseVar]
  117. ] = None,
  118. on_mouse_move: Optional[
  119. Union[EventHandler, EventSpec, list, function, BaseVar]
  120. ] = None,
  121. on_mouse_out: Optional[
  122. Union[EventHandler, EventSpec, list, function, BaseVar]
  123. ] = None,
  124. on_mouse_over: Optional[
  125. Union[EventHandler, EventSpec, list, function, BaseVar]
  126. ] = None,
  127. on_mouse_up: Optional[
  128. Union[EventHandler, EventSpec, list, function, BaseVar]
  129. ] = None,
  130. on_scroll: Optional[
  131. Union[EventHandler, EventSpec, list, function, BaseVar]
  132. ] = None,
  133. on_unmount: Optional[
  134. Union[EventHandler, EventSpec, list, function, BaseVar]
  135. ] = None,
  136. **props
  137. ) -> "Checkbox":
  138. """Create the component.
  139. Args:
  140. *children: The children of the component.
  141. 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"
  142. size: "sm" | "md" | "lg"
  143. is_checked: If true, the checkbox will be checked.
  144. is_disabled: If true, the checkbox will be disabled
  145. is_focusable: If true and is_disabled is passed, the checkbox will remain tabbable but not interactive
  146. 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.
  147. is_invalid: If true, the checkbox is marked as invalid. Changes style of unchecked state.
  148. is_read_only: If true, the checkbox will be readonly
  149. is_required: If true, the checkbox input is marked as required, and required attribute will be added
  150. name: The name of the input field in a checkbox (Useful for form submission).
  151. value: The value of the input field when checked (use is_checked prop for a bool)
  152. spacing: The spacing between the checkbox and its label text (0.5rem)
  153. style: The style of the component.
  154. key: A unique key for the component.
  155. id: The id for the component.
  156. class_name: The class name for the component.
  157. autofocus: Whether the component should take the focus once the page is loaded
  158. _rename_props: props to change the name of
  159. custom_attrs: custom attribute
  160. **props: The props of the component.
  161. Returns:
  162. The component.
  163. Raises:
  164. TypeError: If an invalid child is passed.
  165. """
  166. ...
  167. class CheckboxGroup(ChakraComponent):
  168. @overload
  169. @classmethod
  170. def create( # type: ignore
  171. cls,
  172. *children,
  173. value: Optional[Union[Var[str], str]] = None,
  174. default_value: Optional[Union[Var[str], str]] = None,
  175. is_disabled: Optional[Union[Var[bool], bool]] = None,
  176. is_native: Optional[Union[Var[bool], bool]] = None,
  177. style: Optional[Style] = None,
  178. key: Optional[Any] = None,
  179. id: Optional[Any] = None,
  180. class_name: Optional[Any] = None,
  181. autofocus: Optional[bool] = None,
  182. _rename_props: Optional[Dict[str, str]] = None,
  183. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  184. on_blur: Optional[
  185. Union[EventHandler, EventSpec, list, function, BaseVar]
  186. ] = None,
  187. on_click: Optional[
  188. Union[EventHandler, EventSpec, list, function, BaseVar]
  189. ] = None,
  190. on_context_menu: Optional[
  191. Union[EventHandler, EventSpec, list, function, BaseVar]
  192. ] = None,
  193. on_double_click: Optional[
  194. Union[EventHandler, EventSpec, list, function, BaseVar]
  195. ] = None,
  196. on_focus: Optional[
  197. Union[EventHandler, EventSpec, list, function, BaseVar]
  198. ] = None,
  199. on_mount: Optional[
  200. Union[EventHandler, EventSpec, list, function, BaseVar]
  201. ] = None,
  202. on_mouse_down: Optional[
  203. Union[EventHandler, EventSpec, list, function, BaseVar]
  204. ] = None,
  205. on_mouse_enter: Optional[
  206. Union[EventHandler, EventSpec, list, function, BaseVar]
  207. ] = None,
  208. on_mouse_leave: Optional[
  209. Union[EventHandler, EventSpec, list, function, BaseVar]
  210. ] = None,
  211. on_mouse_move: Optional[
  212. Union[EventHandler, EventSpec, list, function, BaseVar]
  213. ] = None,
  214. on_mouse_out: Optional[
  215. Union[EventHandler, EventSpec, list, function, BaseVar]
  216. ] = None,
  217. on_mouse_over: Optional[
  218. Union[EventHandler, EventSpec, list, function, BaseVar]
  219. ] = None,
  220. on_mouse_up: Optional[
  221. Union[EventHandler, EventSpec, list, function, BaseVar]
  222. ] = None,
  223. on_scroll: Optional[
  224. Union[EventHandler, EventSpec, list, function, BaseVar]
  225. ] = None,
  226. on_unmount: Optional[
  227. Union[EventHandler, EventSpec, list, function, BaseVar]
  228. ] = None,
  229. **props
  230. ) -> "CheckboxGroup":
  231. """Create the component.
  232. Args:
  233. *children: The children of the component.
  234. value: The value of the checkbox group
  235. default_value: The initial value of the checkbox group
  236. is_disabled: If true, all wrapped checkbox inputs will be disabled
  237. is_native: If true, input elements will receive checked attribute instead of isChecked. This assumes, you're using native radio inputs
  238. style: The style of the component.
  239. key: A unique key for the component.
  240. id: The id for the component.
  241. class_name: The class name for the component.
  242. autofocus: Whether the component should take the focus once the page is loaded
  243. _rename_props: props to change the name of
  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. ...