checkbox.pyi 10 KB

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