base.pyi 28 KB

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