checkbox.pyi 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. """Stub file for reflex/components/radix/themes/components/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.components.component import ComponentNamespace
  7. from reflex.components.core.breakpoints import Breakpoints
  8. from reflex.event import EventType
  9. from reflex.style import Style
  10. from reflex.vars.base import Var
  11. from ..base import RadixThemesComponent
  12. LiteralCheckboxSize = Literal["1", "2", "3"]
  13. LiteralCheckboxVariant = Literal["classic", "surface", "soft"]
  14. class Checkbox(RadixThemesComponent):
  15. @overload
  16. @classmethod
  17. def create( # type: ignore
  18. cls,
  19. *children,
  20. as_child: Optional[Union[Var[bool], bool]] = None,
  21. size: Optional[
  22. Union[
  23. Breakpoints[str, Literal["1", "2", "3"]],
  24. Literal["1", "2", "3"],
  25. Var[
  26. Union[
  27. Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"]
  28. ]
  29. ],
  30. ]
  31. ] = None,
  32. variant: Optional[
  33. Union[
  34. Literal["classic", "soft", "surface"],
  35. Var[Literal["classic", "soft", "surface"]],
  36. ]
  37. ] = None,
  38. color_scheme: Optional[
  39. Union[
  40. Literal[
  41. "amber",
  42. "blue",
  43. "bronze",
  44. "brown",
  45. "crimson",
  46. "cyan",
  47. "gold",
  48. "grass",
  49. "gray",
  50. "green",
  51. "indigo",
  52. "iris",
  53. "jade",
  54. "lime",
  55. "mint",
  56. "orange",
  57. "pink",
  58. "plum",
  59. "purple",
  60. "red",
  61. "ruby",
  62. "sky",
  63. "teal",
  64. "tomato",
  65. "violet",
  66. "yellow",
  67. ],
  68. Var[
  69. Literal[
  70. "amber",
  71. "blue",
  72. "bronze",
  73. "brown",
  74. "crimson",
  75. "cyan",
  76. "gold",
  77. "grass",
  78. "gray",
  79. "green",
  80. "indigo",
  81. "iris",
  82. "jade",
  83. "lime",
  84. "mint",
  85. "orange",
  86. "pink",
  87. "plum",
  88. "purple",
  89. "red",
  90. "ruby",
  91. "sky",
  92. "teal",
  93. "tomato",
  94. "violet",
  95. "yellow",
  96. ]
  97. ],
  98. ]
  99. ] = None,
  100. high_contrast: Optional[Union[Var[bool], bool]] = None,
  101. default_checked: Optional[Union[Var[bool], bool]] = None,
  102. checked: Optional[Union[Var[bool], bool]] = None,
  103. disabled: Optional[Union[Var[bool], bool]] = None,
  104. required: Optional[Union[Var[bool], bool]] = None,
  105. name: Optional[Union[Var[str], str]] = None,
  106. value: Optional[Union[Var[str], str]] = None,
  107. style: Optional[Style] = None,
  108. key: Optional[Any] = None,
  109. id: Optional[Any] = None,
  110. class_name: Optional[Any] = None,
  111. autofocus: Optional[bool] = None,
  112. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  113. on_blur: Optional[EventType[[]]] = None,
  114. on_change: Optional[EventType[bool]] = None,
  115. on_click: Optional[EventType[[]]] = None,
  116. on_context_menu: Optional[EventType[[]]] = None,
  117. on_double_click: Optional[EventType[[]]] = None,
  118. on_focus: Optional[EventType[[]]] = None,
  119. on_mount: Optional[EventType[[]]] = None,
  120. on_mouse_down: Optional[EventType[[]]] = None,
  121. on_mouse_enter: Optional[EventType[[]]] = None,
  122. on_mouse_leave: Optional[EventType[[]]] = None,
  123. on_mouse_move: Optional[EventType[[]]] = None,
  124. on_mouse_out: Optional[EventType[[]]] = None,
  125. on_mouse_over: Optional[EventType[[]]] = None,
  126. on_mouse_up: Optional[EventType[[]]] = None,
  127. on_scroll: Optional[EventType[[]]] = None,
  128. on_unmount: Optional[EventType[[]]] = None,
  129. **props,
  130. ) -> "Checkbox":
  131. """Create a new component instance.
  132. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  133. other UI libraries for common names, like Text and Button.
  134. Args:
  135. *children: Child components.
  136. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
  137. size: Checkbox size "1" - "3"
  138. variant: Variant of checkbox: "classic" | "surface" | "soft"
  139. color_scheme: Override theme color for checkbox
  140. high_contrast: Whether to render the checkbox with higher contrast color against background
  141. default_checked: Whether the checkbox is checked by default
  142. checked: Whether the checkbox is checked
  143. disabled: Whether the checkbox is disabled
  144. required: Whether the checkbox is required
  145. name: The name of the checkbox control when submitting the form.
  146. value: The value of the checkbox control when submitting the form.
  147. style: The style of the component.
  148. key: A unique key for the component.
  149. id: The id for the component.
  150. class_name: The class name for the component.
  151. autofocus: Whether the component should take the focus once the page is loaded
  152. custom_attrs: custom attribute
  153. **props: Component properties.
  154. Returns:
  155. A new component instance.
  156. """
  157. ...
  158. class HighLevelCheckbox(RadixThemesComponent):
  159. @overload
  160. @classmethod
  161. def create( # type: ignore
  162. cls,
  163. *children,
  164. text: Optional[Union[Var[str], str]] = None,
  165. spacing: Optional[
  166. Union[
  167. Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  168. Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  169. ]
  170. ] = None,
  171. size: Optional[
  172. Union[Literal["1", "2", "3"], Var[Literal["1", "2", "3"]]]
  173. ] = None,
  174. as_child: Optional[Union[Var[bool], bool]] = None,
  175. variant: Optional[
  176. Union[
  177. Literal["classic", "soft", "surface"],
  178. Var[Literal["classic", "soft", "surface"]],
  179. ]
  180. ] = None,
  181. color_scheme: Optional[
  182. Union[
  183. Literal[
  184. "amber",
  185. "blue",
  186. "bronze",
  187. "brown",
  188. "crimson",
  189. "cyan",
  190. "gold",
  191. "grass",
  192. "gray",
  193. "green",
  194. "indigo",
  195. "iris",
  196. "jade",
  197. "lime",
  198. "mint",
  199. "orange",
  200. "pink",
  201. "plum",
  202. "purple",
  203. "red",
  204. "ruby",
  205. "sky",
  206. "teal",
  207. "tomato",
  208. "violet",
  209. "yellow",
  210. ],
  211. Var[
  212. Literal[
  213. "amber",
  214. "blue",
  215. "bronze",
  216. "brown",
  217. "crimson",
  218. "cyan",
  219. "gold",
  220. "grass",
  221. "gray",
  222. "green",
  223. "indigo",
  224. "iris",
  225. "jade",
  226. "lime",
  227. "mint",
  228. "orange",
  229. "pink",
  230. "plum",
  231. "purple",
  232. "red",
  233. "ruby",
  234. "sky",
  235. "teal",
  236. "tomato",
  237. "violet",
  238. "yellow",
  239. ]
  240. ],
  241. ]
  242. ] = None,
  243. high_contrast: Optional[Union[Var[bool], bool]] = None,
  244. default_checked: Optional[Union[Var[bool], bool]] = None,
  245. checked: Optional[Union[Var[bool], bool]] = None,
  246. disabled: Optional[Union[Var[bool], bool]] = None,
  247. required: Optional[Union[Var[bool], bool]] = None,
  248. name: Optional[Union[Var[str], str]] = None,
  249. value: Optional[Union[Var[str], str]] = None,
  250. style: Optional[Style] = None,
  251. key: Optional[Any] = None,
  252. id: Optional[Any] = None,
  253. class_name: Optional[Any] = None,
  254. autofocus: Optional[bool] = None,
  255. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  256. on_blur: Optional[EventType[[]]] = None,
  257. on_change: Optional[EventType[bool]] = None,
  258. on_click: Optional[EventType[[]]] = None,
  259. on_context_menu: Optional[EventType[[]]] = None,
  260. on_double_click: Optional[EventType[[]]] = None,
  261. on_focus: Optional[EventType[[]]] = None,
  262. on_mount: Optional[EventType[[]]] = None,
  263. on_mouse_down: Optional[EventType[[]]] = None,
  264. on_mouse_enter: Optional[EventType[[]]] = None,
  265. on_mouse_leave: Optional[EventType[[]]] = None,
  266. on_mouse_move: Optional[EventType[[]]] = None,
  267. on_mouse_out: Optional[EventType[[]]] = None,
  268. on_mouse_over: Optional[EventType[[]]] = None,
  269. on_mouse_up: Optional[EventType[[]]] = None,
  270. on_scroll: Optional[EventType[[]]] = None,
  271. on_unmount: Optional[EventType[[]]] = None,
  272. **props,
  273. ) -> "HighLevelCheckbox":
  274. """Create a checkbox with a label.
  275. Args:
  276. text: The text of the label.
  277. text: The text label for the checkbox.
  278. spacing: The gap between the checkbox and the label.
  279. size: The size of the checkbox "1" - "3".
  280. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
  281. variant: Variant of checkbox: "classic" | "surface" | "soft"
  282. color_scheme: Override theme color for checkbox
  283. high_contrast: Whether to render the checkbox with higher contrast color against background
  284. default_checked: Whether the checkbox is checked by default
  285. checked: Whether the checkbox is checked
  286. disabled: Whether the checkbox is disabled
  287. required: Whether the checkbox is required
  288. name: The name of the checkbox control when submitting the form.
  289. value: The value of the checkbox control when submitting the form.
  290. style: The style of the component.
  291. key: A unique key for the component.
  292. id: The id for the component.
  293. class_name: The class name for the component.
  294. autofocus: Whether the component should take the focus once the page is loaded
  295. custom_attrs: custom attribute
  296. **props: Additional properties to apply to the checkbox item.
  297. Returns:
  298. The checkbox component with a label.
  299. """
  300. ...
  301. class CheckboxNamespace(ComponentNamespace):
  302. @staticmethod
  303. def __call__(
  304. *children,
  305. text: Optional[Union[Var[str], str]] = None,
  306. spacing: Optional[
  307. Union[
  308. Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  309. Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  310. ]
  311. ] = None,
  312. size: Optional[
  313. Union[Literal["1", "2", "3"], Var[Literal["1", "2", "3"]]]
  314. ] = None,
  315. as_child: Optional[Union[Var[bool], bool]] = None,
  316. variant: Optional[
  317. Union[
  318. Literal["classic", "soft", "surface"],
  319. Var[Literal["classic", "soft", "surface"]],
  320. ]
  321. ] = None,
  322. color_scheme: Optional[
  323. Union[
  324. Literal[
  325. "amber",
  326. "blue",
  327. "bronze",
  328. "brown",
  329. "crimson",
  330. "cyan",
  331. "gold",
  332. "grass",
  333. "gray",
  334. "green",
  335. "indigo",
  336. "iris",
  337. "jade",
  338. "lime",
  339. "mint",
  340. "orange",
  341. "pink",
  342. "plum",
  343. "purple",
  344. "red",
  345. "ruby",
  346. "sky",
  347. "teal",
  348. "tomato",
  349. "violet",
  350. "yellow",
  351. ],
  352. Var[
  353. Literal[
  354. "amber",
  355. "blue",
  356. "bronze",
  357. "brown",
  358. "crimson",
  359. "cyan",
  360. "gold",
  361. "grass",
  362. "gray",
  363. "green",
  364. "indigo",
  365. "iris",
  366. "jade",
  367. "lime",
  368. "mint",
  369. "orange",
  370. "pink",
  371. "plum",
  372. "purple",
  373. "red",
  374. "ruby",
  375. "sky",
  376. "teal",
  377. "tomato",
  378. "violet",
  379. "yellow",
  380. ]
  381. ],
  382. ]
  383. ] = None,
  384. high_contrast: Optional[Union[Var[bool], bool]] = None,
  385. default_checked: Optional[Union[Var[bool], bool]] = None,
  386. checked: Optional[Union[Var[bool], bool]] = None,
  387. disabled: Optional[Union[Var[bool], bool]] = None,
  388. required: Optional[Union[Var[bool], bool]] = None,
  389. name: Optional[Union[Var[str], str]] = None,
  390. value: Optional[Union[Var[str], str]] = None,
  391. style: Optional[Style] = None,
  392. key: Optional[Any] = None,
  393. id: Optional[Any] = None,
  394. class_name: Optional[Any] = None,
  395. autofocus: Optional[bool] = None,
  396. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  397. on_blur: Optional[EventType[[]]] = None,
  398. on_change: Optional[EventType[bool]] = None,
  399. on_click: Optional[EventType[[]]] = None,
  400. on_context_menu: Optional[EventType[[]]] = None,
  401. on_double_click: Optional[EventType[[]]] = None,
  402. on_focus: Optional[EventType[[]]] = None,
  403. on_mount: Optional[EventType[[]]] = None,
  404. on_mouse_down: Optional[EventType[[]]] = None,
  405. on_mouse_enter: Optional[EventType[[]]] = None,
  406. on_mouse_leave: Optional[EventType[[]]] = None,
  407. on_mouse_move: Optional[EventType[[]]] = None,
  408. on_mouse_out: Optional[EventType[[]]] = None,
  409. on_mouse_over: Optional[EventType[[]]] = None,
  410. on_mouse_up: Optional[EventType[[]]] = None,
  411. on_scroll: Optional[EventType[[]]] = None,
  412. on_unmount: Optional[EventType[[]]] = None,
  413. **props,
  414. ) -> "HighLevelCheckbox":
  415. """Create a checkbox with a label.
  416. Args:
  417. text: The text of the label.
  418. text: The text label for the checkbox.
  419. spacing: The gap between the checkbox and the label.
  420. size: The size of the checkbox "1" - "3".
  421. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
  422. variant: Variant of checkbox: "classic" | "surface" | "soft"
  423. color_scheme: Override theme color for checkbox
  424. high_contrast: Whether to render the checkbox with higher contrast color against background
  425. default_checked: Whether the checkbox is checked by default
  426. checked: Whether the checkbox is checked
  427. disabled: Whether the checkbox is disabled
  428. required: Whether the checkbox is required
  429. name: The name of the checkbox control when submitting the form.
  430. value: The value of the checkbox control when submitting the form.
  431. style: The style of the component.
  432. key: A unique key for the component.
  433. id: The id for the component.
  434. class_name: The class name for the component.
  435. autofocus: Whether the component should take the focus once the page is loaded
  436. custom_attrs: custom attribute
  437. **props: Additional properties to apply to the checkbox item.
  438. Returns:
  439. The checkbox component with a label.
  440. """
  441. ...
  442. checkbox = CheckboxNamespace()