base.pyi 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  1. """Stub file for reflex/components/radix/themes/base.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 Literal
  10. from reflex.components import Component
  11. from reflex.utils import imports
  12. from reflex.vars import Var
  13. LiteralAlign = Literal["start", "center", "end", "baseline", "stretch"]
  14. LiteralJustify = Literal["start", "center", "end", "between"]
  15. LiteralSize = Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
  16. LiteralVariant = Literal["classic", "solid", "soft", "surface", "outline", "ghost"]
  17. LiteralAppearance = Literal["inherit", "light", "dark"]
  18. LiteralGrayColor = Literal["gray", "mauve", "slate", "sage", "olive", "sand", "auto"]
  19. LiteralPanelBackground = Literal["solid", "transparent"]
  20. LiteralRadius = Literal["none", "small", "medium", "large", "full"]
  21. LiteralScaling = Literal["90%", "95%", "100%", "105%", "110%"]
  22. class CommonMarginProps(Component):
  23. @overload
  24. @classmethod
  25. def create( # type: ignore
  26. cls,
  27. *children,
  28. m: Optional[
  29. Union[
  30. Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  31. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  32. ]
  33. ] = None,
  34. mx: Optional[
  35. Union[
  36. Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  37. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  38. ]
  39. ] = None,
  40. my: Optional[
  41. Union[
  42. Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  43. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  44. ]
  45. ] = None,
  46. mt: Optional[
  47. Union[
  48. Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  49. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  50. ]
  51. ] = None,
  52. mr: Optional[
  53. Union[
  54. Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  55. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  56. ]
  57. ] = None,
  58. mb: Optional[
  59. Union[
  60. Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  61. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  62. ]
  63. ] = None,
  64. ml: Optional[
  65. Union[
  66. Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
  67. Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
  68. ]
  69. ] = None,
  70. style: Optional[Style] = None,
  71. key: Optional[Any] = None,
  72. id: Optional[Any] = None,
  73. class_name: Optional[Any] = None,
  74. autofocus: Optional[bool] = None,
  75. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  76. on_blur: Optional[
  77. Union[EventHandler, EventSpec, list, function, BaseVar]
  78. ] = None,
  79. on_click: Optional[
  80. Union[EventHandler, EventSpec, list, function, BaseVar]
  81. ] = None,
  82. on_context_menu: Optional[
  83. Union[EventHandler, EventSpec, list, function, BaseVar]
  84. ] = None,
  85. on_double_click: Optional[
  86. Union[EventHandler, EventSpec, list, function, BaseVar]
  87. ] = None,
  88. on_focus: Optional[
  89. Union[EventHandler, EventSpec, list, function, BaseVar]
  90. ] = None,
  91. on_mount: Optional[
  92. Union[EventHandler, EventSpec, list, function, BaseVar]
  93. ] = None,
  94. on_mouse_down: Optional[
  95. Union[EventHandler, EventSpec, list, function, BaseVar]
  96. ] = None,
  97. on_mouse_enter: Optional[
  98. Union[EventHandler, EventSpec, list, function, BaseVar]
  99. ] = None,
  100. on_mouse_leave: Optional[
  101. Union[EventHandler, EventSpec, list, function, BaseVar]
  102. ] = None,
  103. on_mouse_move: Optional[
  104. Union[EventHandler, EventSpec, list, function, BaseVar]
  105. ] = None,
  106. on_mouse_out: Optional[
  107. Union[EventHandler, EventSpec, list, function, BaseVar]
  108. ] = None,
  109. on_mouse_over: Optional[
  110. Union[EventHandler, EventSpec, list, function, BaseVar]
  111. ] = None,
  112. on_mouse_up: Optional[
  113. Union[EventHandler, EventSpec, list, function, BaseVar]
  114. ] = None,
  115. on_scroll: Optional[
  116. Union[EventHandler, EventSpec, list, function, BaseVar]
  117. ] = None,
  118. on_unmount: Optional[
  119. Union[EventHandler, EventSpec, list, function, BaseVar]
  120. ] = None,
  121. **props
  122. ) -> "CommonMarginProps":
  123. """Create the component.
  124. Args:
  125. *children: The children of the component.
  126. m: Margin: "0" - "9"
  127. mx: Margin horizontal: "0" - "9"
  128. my: Margin vertical: "0" - "9"
  129. mt: Margin top: "0" - "9"
  130. mr: Margin right: "0" - "9"
  131. mb: Margin bottom: "0" - "9"
  132. ml: Margin left: "0" - "9"
  133. style: The style of the component.
  134. key: A unique key for the component.
  135. id: The id for the component.
  136. class_name: The class name for the component.
  137. autofocus: Whether the component should take the focus once the page is loaded
  138. custom_attrs: custom attribute
  139. **props: The props of the component.
  140. Returns:
  141. The component.
  142. Raises:
  143. TypeError: If an invalid child is passed.
  144. """
  145. ...
  146. class RadixThemesComponent(Component):
  147. @overload
  148. @classmethod
  149. def create( # type: ignore
  150. cls,
  151. *children,
  152. style: Optional[Style] = None,
  153. key: Optional[Any] = None,
  154. id: Optional[Any] = None,
  155. class_name: Optional[Any] = None,
  156. autofocus: Optional[bool] = None,
  157. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  158. on_blur: Optional[
  159. Union[EventHandler, EventSpec, list, function, BaseVar]
  160. ] = None,
  161. on_click: Optional[
  162. Union[EventHandler, EventSpec, list, function, BaseVar]
  163. ] = None,
  164. on_context_menu: Optional[
  165. Union[EventHandler, EventSpec, list, function, BaseVar]
  166. ] = None,
  167. on_double_click: Optional[
  168. Union[EventHandler, EventSpec, list, function, BaseVar]
  169. ] = None,
  170. on_focus: Optional[
  171. Union[EventHandler, EventSpec, list, function, BaseVar]
  172. ] = None,
  173. on_mount: Optional[
  174. Union[EventHandler, EventSpec, list, function, BaseVar]
  175. ] = None,
  176. on_mouse_down: Optional[
  177. Union[EventHandler, EventSpec, list, function, BaseVar]
  178. ] = None,
  179. on_mouse_enter: Optional[
  180. Union[EventHandler, EventSpec, list, function, BaseVar]
  181. ] = None,
  182. on_mouse_leave: Optional[
  183. Union[EventHandler, EventSpec, list, function, BaseVar]
  184. ] = None,
  185. on_mouse_move: Optional[
  186. Union[EventHandler, EventSpec, list, function, BaseVar]
  187. ] = None,
  188. on_mouse_out: Optional[
  189. Union[EventHandler, EventSpec, list, function, BaseVar]
  190. ] = None,
  191. on_mouse_over: Optional[
  192. Union[EventHandler, EventSpec, list, function, BaseVar]
  193. ] = None,
  194. on_mouse_up: Optional[
  195. Union[EventHandler, EventSpec, list, function, BaseVar]
  196. ] = None,
  197. on_scroll: Optional[
  198. Union[EventHandler, EventSpec, list, function, BaseVar]
  199. ] = None,
  200. on_unmount: Optional[
  201. Union[EventHandler, EventSpec, list, function, BaseVar]
  202. ] = None,
  203. **props
  204. ) -> "RadixThemesComponent":
  205. """Create a new component instance.
  206. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  207. other UI libraries for common names, like Text and Button.
  208. Args:
  209. *children: Child components.
  210. style: The style of the component.
  211. key: A unique key for the component.
  212. id: The id for the component.
  213. class_name: The class name for the component.
  214. autofocus: Whether the component should take the focus once the page is loaded
  215. custom_attrs: custom attribute
  216. **props: Component properties.
  217. Returns:
  218. A new component instance.
  219. """
  220. ...
  221. LiteralAccentColor = Literal[
  222. "tomato",
  223. "red",
  224. "ruby",
  225. "crimson",
  226. "pink",
  227. "plum",
  228. "purple",
  229. "violet",
  230. "iris",
  231. "indigo",
  232. "blue",
  233. "cyan",
  234. "teal",
  235. "jade",
  236. "green",
  237. "grass",
  238. "brown",
  239. "orange",
  240. "sky",
  241. "mint",
  242. "lime",
  243. "yellow",
  244. "amber",
  245. "gold",
  246. "bronze",
  247. "gray",
  248. ]
  249. class Theme(RadixThemesComponent):
  250. @overload
  251. @classmethod
  252. def create( # type: ignore
  253. cls,
  254. *children,
  255. has_background: Optional[Union[Var[bool], bool]] = None,
  256. appearance: Optional[
  257. Union[
  258. Var[Literal["inherit", "light", "dark"]],
  259. Literal["inherit", "light", "dark"],
  260. ]
  261. ] = None,
  262. accent_color: Optional[
  263. Union[
  264. Var[
  265. Literal[
  266. "tomato",
  267. "red",
  268. "ruby",
  269. "crimson",
  270. "pink",
  271. "plum",
  272. "purple",
  273. "violet",
  274. "iris",
  275. "indigo",
  276. "blue",
  277. "cyan",
  278. "teal",
  279. "jade",
  280. "green",
  281. "grass",
  282. "brown",
  283. "orange",
  284. "sky",
  285. "mint",
  286. "lime",
  287. "yellow",
  288. "amber",
  289. "gold",
  290. "bronze",
  291. "gray",
  292. ]
  293. ],
  294. Literal[
  295. "tomato",
  296. "red",
  297. "ruby",
  298. "crimson",
  299. "pink",
  300. "plum",
  301. "purple",
  302. "violet",
  303. "iris",
  304. "indigo",
  305. "blue",
  306. "cyan",
  307. "teal",
  308. "jade",
  309. "green",
  310. "grass",
  311. "brown",
  312. "orange",
  313. "sky",
  314. "mint",
  315. "lime",
  316. "yellow",
  317. "amber",
  318. "gold",
  319. "bronze",
  320. "gray",
  321. ],
  322. ]
  323. ] = None,
  324. gray_color: Optional[
  325. Union[
  326. Var[Literal["gray", "mauve", "slate", "sage", "olive", "sand", "auto"]],
  327. Literal["gray", "mauve", "slate", "sage", "olive", "sand", "auto"],
  328. ]
  329. ] = None,
  330. panel_background: Optional[
  331. Union[Var[Literal["solid", "transparent"]], Literal["solid", "transparent"]]
  332. ] = None,
  333. radius: Optional[
  334. Union[
  335. Var[Literal["none", "small", "medium", "large", "full"]],
  336. Literal["none", "small", "medium", "large", "full"],
  337. ]
  338. ] = None,
  339. scaling: Optional[
  340. Union[
  341. Var[Literal["90%", "95%", "100%", "105%", "110%"]],
  342. Literal["90%", "95%", "100%", "105%", "110%"],
  343. ]
  344. ] = None,
  345. style: Optional[Style] = None,
  346. key: Optional[Any] = None,
  347. id: Optional[Any] = None,
  348. class_name: Optional[Any] = None,
  349. autofocus: Optional[bool] = None,
  350. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  351. on_blur: Optional[
  352. Union[EventHandler, EventSpec, list, function, BaseVar]
  353. ] = None,
  354. on_click: Optional[
  355. Union[EventHandler, EventSpec, list, function, BaseVar]
  356. ] = None,
  357. on_context_menu: Optional[
  358. Union[EventHandler, EventSpec, list, function, BaseVar]
  359. ] = None,
  360. on_double_click: Optional[
  361. Union[EventHandler, EventSpec, list, function, BaseVar]
  362. ] = None,
  363. on_focus: Optional[
  364. Union[EventHandler, EventSpec, list, function, BaseVar]
  365. ] = None,
  366. on_mount: Optional[
  367. Union[EventHandler, EventSpec, list, function, BaseVar]
  368. ] = None,
  369. on_mouse_down: Optional[
  370. Union[EventHandler, EventSpec, list, function, BaseVar]
  371. ] = None,
  372. on_mouse_enter: Optional[
  373. Union[EventHandler, EventSpec, list, function, BaseVar]
  374. ] = None,
  375. on_mouse_leave: Optional[
  376. Union[EventHandler, EventSpec, list, function, BaseVar]
  377. ] = None,
  378. on_mouse_move: Optional[
  379. Union[EventHandler, EventSpec, list, function, BaseVar]
  380. ] = None,
  381. on_mouse_out: Optional[
  382. Union[EventHandler, EventSpec, list, function, BaseVar]
  383. ] = None,
  384. on_mouse_over: Optional[
  385. Union[EventHandler, EventSpec, list, function, BaseVar]
  386. ] = None,
  387. on_mouse_up: Optional[
  388. Union[EventHandler, EventSpec, list, function, BaseVar]
  389. ] = None,
  390. on_scroll: Optional[
  391. Union[EventHandler, EventSpec, list, function, BaseVar]
  392. ] = None,
  393. on_unmount: Optional[
  394. Union[EventHandler, EventSpec, list, function, BaseVar]
  395. ] = None,
  396. **props
  397. ) -> "Theme":
  398. """Create a new component instance.
  399. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  400. other UI libraries for common names, like Text and Button.
  401. Args:
  402. *children: Child components.
  403. has_background: Whether to apply the themes background color to the theme node.
  404. appearance: Override light or dark mode theme: "inherit" | "light" | "dark"
  405. accent_color: The color used for default buttons, typography, backgrounds, etc
  406. gray_color: The shade of gray
  407. panel_background: Whether panel backgrounds are transparent: "solid" | "transparent" (default)
  408. radius: Element border radius: "none" | "small" | "medium" | "large" | "full"
  409. scaling: Scale of all theme items: "90%" | "95%" | "100%" | "105%" | "110%"
  410. style: The style of the component.
  411. key: A unique key for the component.
  412. id: The id for the component.
  413. class_name: The class name for the component.
  414. autofocus: Whether the component should take the focus once the page is loaded
  415. custom_attrs: custom attribute
  416. **props: Component properties.
  417. Returns:
  418. A new component instance.
  419. """
  420. ...
  421. class ThemePanel(RadixThemesComponent):
  422. @overload
  423. @classmethod
  424. def create( # type: ignore
  425. cls,
  426. *children,
  427. default_open: Optional[Union[Var[bool], bool]] = None,
  428. style: Optional[Style] = None,
  429. key: Optional[Any] = None,
  430. id: Optional[Any] = None,
  431. class_name: Optional[Any] = None,
  432. autofocus: Optional[bool] = None,
  433. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  434. on_blur: Optional[
  435. Union[EventHandler, EventSpec, list, function, BaseVar]
  436. ] = None,
  437. on_click: Optional[
  438. Union[EventHandler, EventSpec, list, function, BaseVar]
  439. ] = None,
  440. on_context_menu: Optional[
  441. Union[EventHandler, EventSpec, list, function, BaseVar]
  442. ] = None,
  443. on_double_click: Optional[
  444. Union[EventHandler, EventSpec, list, function, BaseVar]
  445. ] = None,
  446. on_focus: Optional[
  447. Union[EventHandler, EventSpec, list, function, BaseVar]
  448. ] = None,
  449. on_mount: Optional[
  450. Union[EventHandler, EventSpec, list, function, BaseVar]
  451. ] = None,
  452. on_mouse_down: Optional[
  453. Union[EventHandler, EventSpec, list, function, BaseVar]
  454. ] = None,
  455. on_mouse_enter: Optional[
  456. Union[EventHandler, EventSpec, list, function, BaseVar]
  457. ] = None,
  458. on_mouse_leave: Optional[
  459. Union[EventHandler, EventSpec, list, function, BaseVar]
  460. ] = None,
  461. on_mouse_move: Optional[
  462. Union[EventHandler, EventSpec, list, function, BaseVar]
  463. ] = None,
  464. on_mouse_out: Optional[
  465. Union[EventHandler, EventSpec, list, function, BaseVar]
  466. ] = None,
  467. on_mouse_over: Optional[
  468. Union[EventHandler, EventSpec, list, function, BaseVar]
  469. ] = None,
  470. on_mouse_up: Optional[
  471. Union[EventHandler, EventSpec, list, function, BaseVar]
  472. ] = None,
  473. on_scroll: Optional[
  474. Union[EventHandler, EventSpec, list, function, BaseVar]
  475. ] = None,
  476. on_unmount: Optional[
  477. Union[EventHandler, EventSpec, list, function, BaseVar]
  478. ] = None,
  479. **props
  480. ) -> "ThemePanel":
  481. """Create a new component instance.
  482. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  483. other UI libraries for common names, like Text and Button.
  484. Args:
  485. *children: Child components.
  486. style: The style of the component.
  487. key: A unique key for the component.
  488. id: The id for the component.
  489. class_name: The class name for the component.
  490. autofocus: Whether the component should take the focus once the page is loaded
  491. custom_attrs: custom attribute
  492. **props: Component properties.
  493. Returns:
  494. A new component instance.
  495. """
  496. ...
  497. class RadixThemesColorModeProvider(Component):
  498. @overload
  499. @classmethod
  500. def create( # type: ignore
  501. cls,
  502. *children,
  503. style: Optional[Style] = None,
  504. key: Optional[Any] = None,
  505. id: Optional[Any] = None,
  506. class_name: Optional[Any] = None,
  507. autofocus: Optional[bool] = None,
  508. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  509. on_blur: Optional[
  510. Union[EventHandler, EventSpec, list, function, BaseVar]
  511. ] = None,
  512. on_click: Optional[
  513. Union[EventHandler, EventSpec, list, function, BaseVar]
  514. ] = None,
  515. on_context_menu: Optional[
  516. Union[EventHandler, EventSpec, list, function, BaseVar]
  517. ] = None,
  518. on_double_click: Optional[
  519. Union[EventHandler, EventSpec, list, function, BaseVar]
  520. ] = None,
  521. on_focus: Optional[
  522. Union[EventHandler, EventSpec, list, function, BaseVar]
  523. ] = None,
  524. on_mount: Optional[
  525. Union[EventHandler, EventSpec, list, function, BaseVar]
  526. ] = None,
  527. on_mouse_down: Optional[
  528. Union[EventHandler, EventSpec, list, function, BaseVar]
  529. ] = None,
  530. on_mouse_enter: Optional[
  531. Union[EventHandler, EventSpec, list, function, BaseVar]
  532. ] = None,
  533. on_mouse_leave: Optional[
  534. Union[EventHandler, EventSpec, list, function, BaseVar]
  535. ] = None,
  536. on_mouse_move: Optional[
  537. Union[EventHandler, EventSpec, list, function, BaseVar]
  538. ] = None,
  539. on_mouse_out: Optional[
  540. Union[EventHandler, EventSpec, list, function, BaseVar]
  541. ] = None,
  542. on_mouse_over: Optional[
  543. Union[EventHandler, EventSpec, list, function, BaseVar]
  544. ] = None,
  545. on_mouse_up: Optional[
  546. Union[EventHandler, EventSpec, list, function, BaseVar]
  547. ] = None,
  548. on_scroll: Optional[
  549. Union[EventHandler, EventSpec, list, function, BaseVar]
  550. ] = None,
  551. on_unmount: Optional[
  552. Union[EventHandler, EventSpec, list, function, BaseVar]
  553. ] = None,
  554. **props
  555. ) -> "RadixThemesColorModeProvider":
  556. """Create the component.
  557. Args:
  558. *children: The children of the component.
  559. style: The style of the component.
  560. key: A unique key for the component.
  561. id: The id for the component.
  562. class_name: The class name for the component.
  563. autofocus: Whether the component should take the focus once the page is loaded
  564. custom_attrs: custom attribute
  565. **props: The props of the component.
  566. Returns:
  567. The component.
  568. Raises:
  569. TypeError: If an invalid child is passed.
  570. """
  571. ...