checkbox.pyi 20 KB

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