dropdownmenu.pyi 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356
  1. """Stub file for reflex/components/radix/themes/components/dropdownmenu.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 types import SimpleNamespace
  10. from typing import Any, Dict, Literal
  11. from reflex.vars import Var
  12. from ..base import LiteralAccentColor, RadixThemesComponent
  13. class DropdownMenuRoot(RadixThemesComponent):
  14. def get_event_triggers(self) -> Dict[str, Any]: ...
  15. @overload
  16. @classmethod
  17. def create( # type: ignore
  18. cls,
  19. *children,
  20. color: Optional[Union[Var[str], str]] = None,
  21. color_scheme: Optional[
  22. Union[
  23. Var[
  24. Literal[
  25. "tomato",
  26. "red",
  27. "ruby",
  28. "crimson",
  29. "pink",
  30. "plum",
  31. "purple",
  32. "violet",
  33. "iris",
  34. "indigo",
  35. "blue",
  36. "cyan",
  37. "teal",
  38. "jade",
  39. "green",
  40. "grass",
  41. "brown",
  42. "orange",
  43. "sky",
  44. "mint",
  45. "lime",
  46. "yellow",
  47. "amber",
  48. "gold",
  49. "bronze",
  50. "gray",
  51. ]
  52. ],
  53. Literal[
  54. "tomato",
  55. "red",
  56. "ruby",
  57. "crimson",
  58. "pink",
  59. "plum",
  60. "purple",
  61. "violet",
  62. "iris",
  63. "indigo",
  64. "blue",
  65. "cyan",
  66. "teal",
  67. "jade",
  68. "green",
  69. "grass",
  70. "brown",
  71. "orange",
  72. "sky",
  73. "mint",
  74. "lime",
  75. "yellow",
  76. "amber",
  77. "gold",
  78. "bronze",
  79. "gray",
  80. ],
  81. ]
  82. ] = None,
  83. open: Optional[Union[Var[bool], bool]] = None,
  84. modal: Optional[Union[Var[bool], bool]] = None,
  85. style: Optional[Style] = None,
  86. key: Optional[Any] = None,
  87. id: Optional[Any] = None,
  88. class_name: Optional[Any] = None,
  89. autofocus: Optional[bool] = None,
  90. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  91. on_blur: Optional[
  92. Union[EventHandler, EventSpec, list, function, BaseVar]
  93. ] = None,
  94. on_click: Optional[
  95. Union[EventHandler, EventSpec, list, function, BaseVar]
  96. ] = None,
  97. on_context_menu: Optional[
  98. Union[EventHandler, EventSpec, list, function, BaseVar]
  99. ] = None,
  100. on_double_click: Optional[
  101. Union[EventHandler, EventSpec, list, function, BaseVar]
  102. ] = None,
  103. on_focus: Optional[
  104. Union[EventHandler, EventSpec, list, function, BaseVar]
  105. ] = None,
  106. on_mount: Optional[
  107. Union[EventHandler, EventSpec, list, function, BaseVar]
  108. ] = None,
  109. on_mouse_down: Optional[
  110. Union[EventHandler, EventSpec, list, function, BaseVar]
  111. ] = None,
  112. on_mouse_enter: Optional[
  113. Union[EventHandler, EventSpec, list, function, BaseVar]
  114. ] = None,
  115. on_mouse_leave: Optional[
  116. Union[EventHandler, EventSpec, list, function, BaseVar]
  117. ] = None,
  118. on_mouse_move: Optional[
  119. Union[EventHandler, EventSpec, list, function, BaseVar]
  120. ] = None,
  121. on_mouse_out: Optional[
  122. Union[EventHandler, EventSpec, list, function, BaseVar]
  123. ] = None,
  124. on_mouse_over: Optional[
  125. Union[EventHandler, EventSpec, list, function, BaseVar]
  126. ] = None,
  127. on_mouse_up: Optional[
  128. Union[EventHandler, EventSpec, list, function, BaseVar]
  129. ] = None,
  130. on_open_change: Optional[
  131. Union[EventHandler, EventSpec, list, function, BaseVar]
  132. ] = None,
  133. on_scroll: Optional[
  134. Union[EventHandler, EventSpec, list, function, BaseVar]
  135. ] = None,
  136. on_unmount: Optional[
  137. Union[EventHandler, EventSpec, list, function, BaseVar]
  138. ] = None,
  139. **props
  140. ) -> "DropdownMenuRoot":
  141. """Create a new component instance.
  142. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  143. other UI libraries for common names, like Text and Button.
  144. Args:
  145. *children: Child components.
  146. color: map to CSS default color property.
  147. color_scheme: map to radix color property.
  148. open: The controlled open state of the dropdown menu. Must be used in conjunction with onOpenChange.
  149. modal: The modality of the dropdown menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers.
  150. style: The style of the component.
  151. key: A unique key for the component.
  152. id: The id for the component.
  153. class_name: The class name for the component.
  154. autofocus: Whether the component should take the focus once the page is loaded
  155. custom_attrs: custom attribute
  156. **props: Component properties.
  157. Returns:
  158. A new component instance.
  159. """
  160. ...
  161. class DropdownMenuTrigger(RadixThemesComponent):
  162. @overload
  163. @classmethod
  164. def create( # type: ignore
  165. cls,
  166. *children,
  167. color: Optional[Union[Var[str], str]] = None,
  168. color_scheme: Optional[
  169. Union[
  170. Var[
  171. Literal[
  172. "tomato",
  173. "red",
  174. "ruby",
  175. "crimson",
  176. "pink",
  177. "plum",
  178. "purple",
  179. "violet",
  180. "iris",
  181. "indigo",
  182. "blue",
  183. "cyan",
  184. "teal",
  185. "jade",
  186. "green",
  187. "grass",
  188. "brown",
  189. "orange",
  190. "sky",
  191. "mint",
  192. "lime",
  193. "yellow",
  194. "amber",
  195. "gold",
  196. "bronze",
  197. "gray",
  198. ]
  199. ],
  200. Literal[
  201. "tomato",
  202. "red",
  203. "ruby",
  204. "crimson",
  205. "pink",
  206. "plum",
  207. "purple",
  208. "violet",
  209. "iris",
  210. "indigo",
  211. "blue",
  212. "cyan",
  213. "teal",
  214. "jade",
  215. "green",
  216. "grass",
  217. "brown",
  218. "orange",
  219. "sky",
  220. "mint",
  221. "lime",
  222. "yellow",
  223. "amber",
  224. "gold",
  225. "bronze",
  226. "gray",
  227. ],
  228. ]
  229. ] = None,
  230. style: Optional[Style] = None,
  231. key: Optional[Any] = None,
  232. id: Optional[Any] = None,
  233. class_name: Optional[Any] = None,
  234. autofocus: Optional[bool] = None,
  235. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  236. on_blur: Optional[
  237. Union[EventHandler, EventSpec, list, function, BaseVar]
  238. ] = None,
  239. on_click: Optional[
  240. Union[EventHandler, EventSpec, list, function, BaseVar]
  241. ] = None,
  242. on_context_menu: Optional[
  243. Union[EventHandler, EventSpec, list, function, BaseVar]
  244. ] = None,
  245. on_double_click: Optional[
  246. Union[EventHandler, EventSpec, list, function, BaseVar]
  247. ] = None,
  248. on_focus: Optional[
  249. Union[EventHandler, EventSpec, list, function, BaseVar]
  250. ] = None,
  251. on_mount: Optional[
  252. Union[EventHandler, EventSpec, list, function, BaseVar]
  253. ] = None,
  254. on_mouse_down: Optional[
  255. Union[EventHandler, EventSpec, list, function, BaseVar]
  256. ] = None,
  257. on_mouse_enter: Optional[
  258. Union[EventHandler, EventSpec, list, function, BaseVar]
  259. ] = None,
  260. on_mouse_leave: Optional[
  261. Union[EventHandler, EventSpec, list, function, BaseVar]
  262. ] = None,
  263. on_mouse_move: Optional[
  264. Union[EventHandler, EventSpec, list, function, BaseVar]
  265. ] = None,
  266. on_mouse_out: Optional[
  267. Union[EventHandler, EventSpec, list, function, BaseVar]
  268. ] = None,
  269. on_mouse_over: Optional[
  270. Union[EventHandler, EventSpec, list, function, BaseVar]
  271. ] = None,
  272. on_mouse_up: Optional[
  273. Union[EventHandler, EventSpec, list, function, BaseVar]
  274. ] = None,
  275. on_scroll: Optional[
  276. Union[EventHandler, EventSpec, list, function, BaseVar]
  277. ] = None,
  278. on_unmount: Optional[
  279. Union[EventHandler, EventSpec, list, function, BaseVar]
  280. ] = None,
  281. **props
  282. ) -> "DropdownMenuTrigger":
  283. """Create a new component instance.
  284. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  285. other UI libraries for common names, like Text and Button.
  286. Args:
  287. *children: Child components.
  288. color: map to CSS default color property.
  289. color_scheme: map to radix color property.
  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: Component properties.
  297. Returns:
  298. A new component instance.
  299. """
  300. ...
  301. class DropdownMenuContent(RadixThemesComponent):
  302. def get_event_triggers(self) -> Dict[str, Any]: ...
  303. @overload
  304. @classmethod
  305. def create( # type: ignore
  306. cls,
  307. *children,
  308. color: Optional[Union[Var[str], str]] = None,
  309. color_scheme: Optional[
  310. Union[
  311. Var[
  312. Literal[
  313. "tomato",
  314. "red",
  315. "ruby",
  316. "crimson",
  317. "pink",
  318. "plum",
  319. "purple",
  320. "violet",
  321. "iris",
  322. "indigo",
  323. "blue",
  324. "cyan",
  325. "teal",
  326. "jade",
  327. "green",
  328. "grass",
  329. "brown",
  330. "orange",
  331. "sky",
  332. "mint",
  333. "lime",
  334. "yellow",
  335. "amber",
  336. "gold",
  337. "bronze",
  338. "gray",
  339. ]
  340. ],
  341. Literal[
  342. "tomato",
  343. "red",
  344. "ruby",
  345. "crimson",
  346. "pink",
  347. "plum",
  348. "purple",
  349. "violet",
  350. "iris",
  351. "indigo",
  352. "blue",
  353. "cyan",
  354. "teal",
  355. "jade",
  356. "green",
  357. "grass",
  358. "brown",
  359. "orange",
  360. "sky",
  361. "mint",
  362. "lime",
  363. "yellow",
  364. "amber",
  365. "gold",
  366. "bronze",
  367. "gray",
  368. ],
  369. ]
  370. ] = None,
  371. style: Optional[Style] = None,
  372. key: Optional[Any] = None,
  373. id: Optional[Any] = None,
  374. class_name: Optional[Any] = None,
  375. autofocus: Optional[bool] = None,
  376. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  377. on_blur: Optional[
  378. Union[EventHandler, EventSpec, list, function, BaseVar]
  379. ] = None,
  380. on_click: Optional[
  381. Union[EventHandler, EventSpec, list, function, BaseVar]
  382. ] = None,
  383. on_close_auto_focus: Optional[
  384. Union[EventHandler, EventSpec, list, function, BaseVar]
  385. ] = None,
  386. on_context_menu: Optional[
  387. Union[EventHandler, EventSpec, list, function, BaseVar]
  388. ] = None,
  389. on_double_click: Optional[
  390. Union[EventHandler, EventSpec, list, function, BaseVar]
  391. ] = None,
  392. on_escape_key_down: Optional[
  393. Union[EventHandler, EventSpec, list, function, BaseVar]
  394. ] = None,
  395. on_focus: Optional[
  396. Union[EventHandler, EventSpec, list, function, BaseVar]
  397. ] = None,
  398. on_interact_outside: Optional[
  399. Union[EventHandler, EventSpec, list, function, BaseVar]
  400. ] = None,
  401. on_mount: Optional[
  402. Union[EventHandler, EventSpec, list, function, BaseVar]
  403. ] = None,
  404. on_mouse_down: Optional[
  405. Union[EventHandler, EventSpec, list, function, BaseVar]
  406. ] = None,
  407. on_mouse_enter: Optional[
  408. Union[EventHandler, EventSpec, list, function, BaseVar]
  409. ] = None,
  410. on_mouse_leave: Optional[
  411. Union[EventHandler, EventSpec, list, function, BaseVar]
  412. ] = None,
  413. on_mouse_move: Optional[
  414. Union[EventHandler, EventSpec, list, function, BaseVar]
  415. ] = None,
  416. on_mouse_out: Optional[
  417. Union[EventHandler, EventSpec, list, function, BaseVar]
  418. ] = None,
  419. on_mouse_over: Optional[
  420. Union[EventHandler, EventSpec, list, function, BaseVar]
  421. ] = None,
  422. on_mouse_up: Optional[
  423. Union[EventHandler, EventSpec, list, function, BaseVar]
  424. ] = None,
  425. on_pointer_down_outside: Optional[
  426. Union[EventHandler, EventSpec, list, function, BaseVar]
  427. ] = None,
  428. on_scroll: Optional[
  429. Union[EventHandler, EventSpec, list, function, BaseVar]
  430. ] = None,
  431. on_unmount: Optional[
  432. Union[EventHandler, EventSpec, list, function, BaseVar]
  433. ] = None,
  434. **props
  435. ) -> "DropdownMenuContent":
  436. """Create a new component instance.
  437. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  438. other UI libraries for common names, like Text and Button.
  439. Args:
  440. *children: Child components.
  441. color: map to CSS default color property.
  442. color_scheme: map to radix color property.
  443. style: The style of the component.
  444. key: A unique key for the component.
  445. id: The id for the component.
  446. class_name: The class name for the component.
  447. autofocus: Whether the component should take the focus once the page is loaded
  448. custom_attrs: custom attribute
  449. **props: Component properties.
  450. Returns:
  451. A new component instance.
  452. """
  453. ...
  454. class DropdownMenuSubTrigger(RadixThemesComponent):
  455. @overload
  456. @classmethod
  457. def create( # type: ignore
  458. cls,
  459. *children,
  460. color: Optional[Union[Var[str], str]] = None,
  461. color_scheme: Optional[
  462. Union[
  463. Var[
  464. Literal[
  465. "tomato",
  466. "red",
  467. "ruby",
  468. "crimson",
  469. "pink",
  470. "plum",
  471. "purple",
  472. "violet",
  473. "iris",
  474. "indigo",
  475. "blue",
  476. "cyan",
  477. "teal",
  478. "jade",
  479. "green",
  480. "grass",
  481. "brown",
  482. "orange",
  483. "sky",
  484. "mint",
  485. "lime",
  486. "yellow",
  487. "amber",
  488. "gold",
  489. "bronze",
  490. "gray",
  491. ]
  492. ],
  493. Literal[
  494. "tomato",
  495. "red",
  496. "ruby",
  497. "crimson",
  498. "pink",
  499. "plum",
  500. "purple",
  501. "violet",
  502. "iris",
  503. "indigo",
  504. "blue",
  505. "cyan",
  506. "teal",
  507. "jade",
  508. "green",
  509. "grass",
  510. "brown",
  511. "orange",
  512. "sky",
  513. "mint",
  514. "lime",
  515. "yellow",
  516. "amber",
  517. "gold",
  518. "bronze",
  519. "gray",
  520. ],
  521. ]
  522. ] = None,
  523. style: Optional[Style] = None,
  524. key: Optional[Any] = None,
  525. id: Optional[Any] = None,
  526. class_name: Optional[Any] = None,
  527. autofocus: Optional[bool] = None,
  528. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  529. on_blur: Optional[
  530. Union[EventHandler, EventSpec, list, function, BaseVar]
  531. ] = None,
  532. on_click: Optional[
  533. Union[EventHandler, EventSpec, list, function, BaseVar]
  534. ] = None,
  535. on_context_menu: Optional[
  536. Union[EventHandler, EventSpec, list, function, BaseVar]
  537. ] = None,
  538. on_double_click: Optional[
  539. Union[EventHandler, EventSpec, list, function, BaseVar]
  540. ] = None,
  541. on_focus: Optional[
  542. Union[EventHandler, EventSpec, list, function, BaseVar]
  543. ] = None,
  544. on_mount: Optional[
  545. Union[EventHandler, EventSpec, list, function, BaseVar]
  546. ] = None,
  547. on_mouse_down: Optional[
  548. Union[EventHandler, EventSpec, list, function, BaseVar]
  549. ] = None,
  550. on_mouse_enter: Optional[
  551. Union[EventHandler, EventSpec, list, function, BaseVar]
  552. ] = None,
  553. on_mouse_leave: Optional[
  554. Union[EventHandler, EventSpec, list, function, BaseVar]
  555. ] = None,
  556. on_mouse_move: Optional[
  557. Union[EventHandler, EventSpec, list, function, BaseVar]
  558. ] = None,
  559. on_mouse_out: Optional[
  560. Union[EventHandler, EventSpec, list, function, BaseVar]
  561. ] = None,
  562. on_mouse_over: Optional[
  563. Union[EventHandler, EventSpec, list, function, BaseVar]
  564. ] = None,
  565. on_mouse_up: Optional[
  566. Union[EventHandler, EventSpec, list, function, BaseVar]
  567. ] = None,
  568. on_scroll: Optional[
  569. Union[EventHandler, EventSpec, list, function, BaseVar]
  570. ] = None,
  571. on_unmount: Optional[
  572. Union[EventHandler, EventSpec, list, function, BaseVar]
  573. ] = None,
  574. **props
  575. ) -> "DropdownMenuSubTrigger":
  576. """Create a new component instance.
  577. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  578. other UI libraries for common names, like Text and Button.
  579. Args:
  580. *children: Child components.
  581. color: map to CSS default color property.
  582. color_scheme: map to radix color property.
  583. style: The style of the component.
  584. key: A unique key for the component.
  585. id: The id for the component.
  586. class_name: The class name for the component.
  587. autofocus: Whether the component should take the focus once the page is loaded
  588. custom_attrs: custom attribute
  589. **props: Component properties.
  590. Returns:
  591. A new component instance.
  592. """
  593. ...
  594. class DropdownMenuSub(RadixThemesComponent):
  595. @overload
  596. @classmethod
  597. def create( # type: ignore
  598. cls,
  599. *children,
  600. color: Optional[Union[Var[str], str]] = None,
  601. color_scheme: Optional[
  602. Union[
  603. Var[
  604. Literal[
  605. "tomato",
  606. "red",
  607. "ruby",
  608. "crimson",
  609. "pink",
  610. "plum",
  611. "purple",
  612. "violet",
  613. "iris",
  614. "indigo",
  615. "blue",
  616. "cyan",
  617. "teal",
  618. "jade",
  619. "green",
  620. "grass",
  621. "brown",
  622. "orange",
  623. "sky",
  624. "mint",
  625. "lime",
  626. "yellow",
  627. "amber",
  628. "gold",
  629. "bronze",
  630. "gray",
  631. ]
  632. ],
  633. Literal[
  634. "tomato",
  635. "red",
  636. "ruby",
  637. "crimson",
  638. "pink",
  639. "plum",
  640. "purple",
  641. "violet",
  642. "iris",
  643. "indigo",
  644. "blue",
  645. "cyan",
  646. "teal",
  647. "jade",
  648. "green",
  649. "grass",
  650. "brown",
  651. "orange",
  652. "sky",
  653. "mint",
  654. "lime",
  655. "yellow",
  656. "amber",
  657. "gold",
  658. "bronze",
  659. "gray",
  660. ],
  661. ]
  662. ] = None,
  663. style: Optional[Style] = None,
  664. key: Optional[Any] = None,
  665. id: Optional[Any] = None,
  666. class_name: Optional[Any] = None,
  667. autofocus: Optional[bool] = None,
  668. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  669. on_blur: Optional[
  670. Union[EventHandler, EventSpec, list, function, BaseVar]
  671. ] = None,
  672. on_click: Optional[
  673. Union[EventHandler, EventSpec, list, function, BaseVar]
  674. ] = None,
  675. on_context_menu: Optional[
  676. Union[EventHandler, EventSpec, list, function, BaseVar]
  677. ] = None,
  678. on_double_click: Optional[
  679. Union[EventHandler, EventSpec, list, function, BaseVar]
  680. ] = None,
  681. on_focus: Optional[
  682. Union[EventHandler, EventSpec, list, function, BaseVar]
  683. ] = None,
  684. on_mount: Optional[
  685. Union[EventHandler, EventSpec, list, function, BaseVar]
  686. ] = None,
  687. on_mouse_down: Optional[
  688. Union[EventHandler, EventSpec, list, function, BaseVar]
  689. ] = None,
  690. on_mouse_enter: Optional[
  691. Union[EventHandler, EventSpec, list, function, BaseVar]
  692. ] = None,
  693. on_mouse_leave: Optional[
  694. Union[EventHandler, EventSpec, list, function, BaseVar]
  695. ] = None,
  696. on_mouse_move: Optional[
  697. Union[EventHandler, EventSpec, list, function, BaseVar]
  698. ] = None,
  699. on_mouse_out: Optional[
  700. Union[EventHandler, EventSpec, list, function, BaseVar]
  701. ] = None,
  702. on_mouse_over: Optional[
  703. Union[EventHandler, EventSpec, list, function, BaseVar]
  704. ] = None,
  705. on_mouse_up: Optional[
  706. Union[EventHandler, EventSpec, list, function, BaseVar]
  707. ] = None,
  708. on_scroll: Optional[
  709. Union[EventHandler, EventSpec, list, function, BaseVar]
  710. ] = None,
  711. on_unmount: Optional[
  712. Union[EventHandler, EventSpec, list, function, BaseVar]
  713. ] = None,
  714. **props
  715. ) -> "DropdownMenuSub":
  716. """Create a new component instance.
  717. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  718. other UI libraries for common names, like Text and Button.
  719. Args:
  720. *children: Child components.
  721. color: map to CSS default color property.
  722. color_scheme: map to radix color property.
  723. style: The style of the component.
  724. key: A unique key for the component.
  725. id: The id for the component.
  726. class_name: The class name for the component.
  727. autofocus: Whether the component should take the focus once the page is loaded
  728. custom_attrs: custom attribute
  729. **props: Component properties.
  730. Returns:
  731. A new component instance.
  732. """
  733. ...
  734. class DropdownMenuSubContent(RadixThemesComponent):
  735. @overload
  736. @classmethod
  737. def create( # type: ignore
  738. cls,
  739. *children,
  740. color: Optional[Union[Var[str], str]] = None,
  741. color_scheme: Optional[
  742. Union[
  743. Var[
  744. Literal[
  745. "tomato",
  746. "red",
  747. "ruby",
  748. "crimson",
  749. "pink",
  750. "plum",
  751. "purple",
  752. "violet",
  753. "iris",
  754. "indigo",
  755. "blue",
  756. "cyan",
  757. "teal",
  758. "jade",
  759. "green",
  760. "grass",
  761. "brown",
  762. "orange",
  763. "sky",
  764. "mint",
  765. "lime",
  766. "yellow",
  767. "amber",
  768. "gold",
  769. "bronze",
  770. "gray",
  771. ]
  772. ],
  773. Literal[
  774. "tomato",
  775. "red",
  776. "ruby",
  777. "crimson",
  778. "pink",
  779. "plum",
  780. "purple",
  781. "violet",
  782. "iris",
  783. "indigo",
  784. "blue",
  785. "cyan",
  786. "teal",
  787. "jade",
  788. "green",
  789. "grass",
  790. "brown",
  791. "orange",
  792. "sky",
  793. "mint",
  794. "lime",
  795. "yellow",
  796. "amber",
  797. "gold",
  798. "bronze",
  799. "gray",
  800. ],
  801. ]
  802. ] = None,
  803. size: Optional[Union[Var[Literal["1", "2"]], Literal["1", "2"]]] = None,
  804. variant: Optional[
  805. Union[Var[Literal["solid", "soft"]], Literal["solid", "soft"]]
  806. ] = None,
  807. high_contrast: Optional[Union[Var[bool], bool]] = None,
  808. style: Optional[Style] = None,
  809. key: Optional[Any] = None,
  810. id: Optional[Any] = None,
  811. class_name: Optional[Any] = None,
  812. autofocus: Optional[bool] = None,
  813. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  814. on_blur: Optional[
  815. Union[EventHandler, EventSpec, list, function, BaseVar]
  816. ] = None,
  817. on_click: Optional[
  818. Union[EventHandler, EventSpec, list, function, BaseVar]
  819. ] = None,
  820. on_context_menu: Optional[
  821. Union[EventHandler, EventSpec, list, function, BaseVar]
  822. ] = None,
  823. on_double_click: Optional[
  824. Union[EventHandler, EventSpec, list, function, BaseVar]
  825. ] = None,
  826. on_focus: Optional[
  827. Union[EventHandler, EventSpec, list, function, BaseVar]
  828. ] = None,
  829. on_mount: Optional[
  830. Union[EventHandler, EventSpec, list, function, BaseVar]
  831. ] = None,
  832. on_mouse_down: Optional[
  833. Union[EventHandler, EventSpec, list, function, BaseVar]
  834. ] = None,
  835. on_mouse_enter: Optional[
  836. Union[EventHandler, EventSpec, list, function, BaseVar]
  837. ] = None,
  838. on_mouse_leave: Optional[
  839. Union[EventHandler, EventSpec, list, function, BaseVar]
  840. ] = None,
  841. on_mouse_move: Optional[
  842. Union[EventHandler, EventSpec, list, function, BaseVar]
  843. ] = None,
  844. on_mouse_out: Optional[
  845. Union[EventHandler, EventSpec, list, function, BaseVar]
  846. ] = None,
  847. on_mouse_over: Optional[
  848. Union[EventHandler, EventSpec, list, function, BaseVar]
  849. ] = None,
  850. on_mouse_up: Optional[
  851. Union[EventHandler, EventSpec, list, function, BaseVar]
  852. ] = None,
  853. on_scroll: Optional[
  854. Union[EventHandler, EventSpec, list, function, BaseVar]
  855. ] = None,
  856. on_unmount: Optional[
  857. Union[EventHandler, EventSpec, list, function, BaseVar]
  858. ] = None,
  859. **props
  860. ) -> "DropdownMenuSubContent":
  861. """Create a new component instance.
  862. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  863. other UI libraries for common names, like Text and Button.
  864. Args:
  865. *children: Child components.
  866. color: map to CSS default color property.
  867. color_scheme: map to radix color property.
  868. size: Button size "1" - "4"
  869. variant: Variant of button: "solid" | "soft" | "outline" | "ghost"
  870. high_contrast: Whether to render the button with higher contrast color against background
  871. style: The style of the component.
  872. key: A unique key for the component.
  873. id: The id for the component.
  874. class_name: The class name for the component.
  875. autofocus: Whether the component should take the focus once the page is loaded
  876. custom_attrs: custom attribute
  877. **props: Component properties.
  878. Returns:
  879. A new component instance.
  880. """
  881. ...
  882. class DropdownMenuItem(RadixThemesComponent):
  883. @overload
  884. @classmethod
  885. def create( # type: ignore
  886. cls,
  887. *children,
  888. color: Optional[Union[Var[str], str]] = None,
  889. color_scheme: Optional[
  890. Union[
  891. Var[
  892. Literal[
  893. "tomato",
  894. "red",
  895. "ruby",
  896. "crimson",
  897. "pink",
  898. "plum",
  899. "purple",
  900. "violet",
  901. "iris",
  902. "indigo",
  903. "blue",
  904. "cyan",
  905. "teal",
  906. "jade",
  907. "green",
  908. "grass",
  909. "brown",
  910. "orange",
  911. "sky",
  912. "mint",
  913. "lime",
  914. "yellow",
  915. "amber",
  916. "gold",
  917. "bronze",
  918. "gray",
  919. ]
  920. ],
  921. Literal[
  922. "tomato",
  923. "red",
  924. "ruby",
  925. "crimson",
  926. "pink",
  927. "plum",
  928. "purple",
  929. "violet",
  930. "iris",
  931. "indigo",
  932. "blue",
  933. "cyan",
  934. "teal",
  935. "jade",
  936. "green",
  937. "grass",
  938. "brown",
  939. "orange",
  940. "sky",
  941. "mint",
  942. "lime",
  943. "yellow",
  944. "amber",
  945. "gold",
  946. "bronze",
  947. "gray",
  948. ],
  949. ]
  950. ] = None,
  951. shortcut: Optional[Union[Var[str], str]] = None,
  952. style: Optional[Style] = None,
  953. key: Optional[Any] = None,
  954. id: Optional[Any] = None,
  955. class_name: Optional[Any] = None,
  956. autofocus: Optional[bool] = None,
  957. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  958. on_blur: Optional[
  959. Union[EventHandler, EventSpec, list, function, BaseVar]
  960. ] = None,
  961. on_click: Optional[
  962. Union[EventHandler, EventSpec, list, function, BaseVar]
  963. ] = None,
  964. on_context_menu: Optional[
  965. Union[EventHandler, EventSpec, list, function, BaseVar]
  966. ] = None,
  967. on_double_click: Optional[
  968. Union[EventHandler, EventSpec, list, function, BaseVar]
  969. ] = None,
  970. on_focus: Optional[
  971. Union[EventHandler, EventSpec, list, function, BaseVar]
  972. ] = None,
  973. on_mount: Optional[
  974. Union[EventHandler, EventSpec, list, function, BaseVar]
  975. ] = None,
  976. on_mouse_down: Optional[
  977. Union[EventHandler, EventSpec, list, function, BaseVar]
  978. ] = None,
  979. on_mouse_enter: Optional[
  980. Union[EventHandler, EventSpec, list, function, BaseVar]
  981. ] = None,
  982. on_mouse_leave: Optional[
  983. Union[EventHandler, EventSpec, list, function, BaseVar]
  984. ] = None,
  985. on_mouse_move: Optional[
  986. Union[EventHandler, EventSpec, list, function, BaseVar]
  987. ] = None,
  988. on_mouse_out: Optional[
  989. Union[EventHandler, EventSpec, list, function, BaseVar]
  990. ] = None,
  991. on_mouse_over: Optional[
  992. Union[EventHandler, EventSpec, list, function, BaseVar]
  993. ] = None,
  994. on_mouse_up: Optional[
  995. Union[EventHandler, EventSpec, list, function, BaseVar]
  996. ] = None,
  997. on_scroll: Optional[
  998. Union[EventHandler, EventSpec, list, function, BaseVar]
  999. ] = None,
  1000. on_unmount: Optional[
  1001. Union[EventHandler, EventSpec, list, function, BaseVar]
  1002. ] = None,
  1003. **props
  1004. ) -> "DropdownMenuItem":
  1005. """Create a new component instance.
  1006. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  1007. other UI libraries for common names, like Text and Button.
  1008. Args:
  1009. *children: Child components.
  1010. color: map to CSS default color property.
  1011. color_scheme: map to radix color property.
  1012. shortcut: Shortcut to render a menu item as a link
  1013. style: The style of the component.
  1014. key: A unique key for the component.
  1015. id: The id for the component.
  1016. class_name: The class name for the component.
  1017. autofocus: Whether the component should take the focus once the page is loaded
  1018. custom_attrs: custom attribute
  1019. **props: Component properties.
  1020. Returns:
  1021. A new component instance.
  1022. """
  1023. ...
  1024. class DropdownMenuSeparator(RadixThemesComponent):
  1025. @overload
  1026. @classmethod
  1027. def create( # type: ignore
  1028. cls,
  1029. *children,
  1030. color: Optional[Union[Var[str], str]] = None,
  1031. color_scheme: Optional[
  1032. Union[
  1033. Var[
  1034. Literal[
  1035. "tomato",
  1036. "red",
  1037. "ruby",
  1038. "crimson",
  1039. "pink",
  1040. "plum",
  1041. "purple",
  1042. "violet",
  1043. "iris",
  1044. "indigo",
  1045. "blue",
  1046. "cyan",
  1047. "teal",
  1048. "jade",
  1049. "green",
  1050. "grass",
  1051. "brown",
  1052. "orange",
  1053. "sky",
  1054. "mint",
  1055. "lime",
  1056. "yellow",
  1057. "amber",
  1058. "gold",
  1059. "bronze",
  1060. "gray",
  1061. ]
  1062. ],
  1063. Literal[
  1064. "tomato",
  1065. "red",
  1066. "ruby",
  1067. "crimson",
  1068. "pink",
  1069. "plum",
  1070. "purple",
  1071. "violet",
  1072. "iris",
  1073. "indigo",
  1074. "blue",
  1075. "cyan",
  1076. "teal",
  1077. "jade",
  1078. "green",
  1079. "grass",
  1080. "brown",
  1081. "orange",
  1082. "sky",
  1083. "mint",
  1084. "lime",
  1085. "yellow",
  1086. "amber",
  1087. "gold",
  1088. "bronze",
  1089. "gray",
  1090. ],
  1091. ]
  1092. ] = None,
  1093. style: Optional[Style] = None,
  1094. key: Optional[Any] = None,
  1095. id: Optional[Any] = None,
  1096. class_name: Optional[Any] = None,
  1097. autofocus: Optional[bool] = None,
  1098. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  1099. on_blur: Optional[
  1100. Union[EventHandler, EventSpec, list, function, BaseVar]
  1101. ] = None,
  1102. on_click: Optional[
  1103. Union[EventHandler, EventSpec, list, function, BaseVar]
  1104. ] = None,
  1105. on_context_menu: Optional[
  1106. Union[EventHandler, EventSpec, list, function, BaseVar]
  1107. ] = None,
  1108. on_double_click: Optional[
  1109. Union[EventHandler, EventSpec, list, function, BaseVar]
  1110. ] = None,
  1111. on_focus: Optional[
  1112. Union[EventHandler, EventSpec, list, function, BaseVar]
  1113. ] = None,
  1114. on_mount: Optional[
  1115. Union[EventHandler, EventSpec, list, function, BaseVar]
  1116. ] = None,
  1117. on_mouse_down: Optional[
  1118. Union[EventHandler, EventSpec, list, function, BaseVar]
  1119. ] = None,
  1120. on_mouse_enter: Optional[
  1121. Union[EventHandler, EventSpec, list, function, BaseVar]
  1122. ] = None,
  1123. on_mouse_leave: Optional[
  1124. Union[EventHandler, EventSpec, list, function, BaseVar]
  1125. ] = None,
  1126. on_mouse_move: Optional[
  1127. Union[EventHandler, EventSpec, list, function, BaseVar]
  1128. ] = None,
  1129. on_mouse_out: Optional[
  1130. Union[EventHandler, EventSpec, list, function, BaseVar]
  1131. ] = None,
  1132. on_mouse_over: Optional[
  1133. Union[EventHandler, EventSpec, list, function, BaseVar]
  1134. ] = None,
  1135. on_mouse_up: Optional[
  1136. Union[EventHandler, EventSpec, list, function, BaseVar]
  1137. ] = None,
  1138. on_scroll: Optional[
  1139. Union[EventHandler, EventSpec, list, function, BaseVar]
  1140. ] = None,
  1141. on_unmount: Optional[
  1142. Union[EventHandler, EventSpec, list, function, BaseVar]
  1143. ] = None,
  1144. **props
  1145. ) -> "DropdownMenuSeparator":
  1146. """Create a new component instance.
  1147. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  1148. other UI libraries for common names, like Text and Button.
  1149. Args:
  1150. *children: Child components.
  1151. color: map to CSS default color property.
  1152. color_scheme: map to radix color property.
  1153. style: The style of the component.
  1154. key: A unique key for the component.
  1155. id: The id for the component.
  1156. class_name: The class name for the component.
  1157. autofocus: Whether the component should take the focus once the page is loaded
  1158. custom_attrs: custom attribute
  1159. **props: Component properties.
  1160. Returns:
  1161. A new component instance.
  1162. """
  1163. ...
  1164. class DropdownMenu(SimpleNamespace):
  1165. root = staticmethod(DropdownMenuRoot.create)
  1166. trigger = staticmethod(DropdownMenuTrigger.create)
  1167. content = staticmethod(DropdownMenuContent.create)
  1168. sub_trigger = staticmethod(DropdownMenuSubTrigger.create)
  1169. sub = staticmethod(DropdownMenuSub.create)
  1170. sub_content = staticmethod(DropdownMenuSubContent.create)
  1171. item = staticmethod(DropdownMenuItem.create)
  1172. separator = staticmethod(DropdownMenuSeparator.create)
  1173. @staticmethod
  1174. def __call__(
  1175. *children,
  1176. color: Optional[Union[Var[str], str]] = None,
  1177. color_scheme: Optional[
  1178. Union[
  1179. Var[
  1180. Literal[
  1181. "tomato",
  1182. "red",
  1183. "ruby",
  1184. "crimson",
  1185. "pink",
  1186. "plum",
  1187. "purple",
  1188. "violet",
  1189. "iris",
  1190. "indigo",
  1191. "blue",
  1192. "cyan",
  1193. "teal",
  1194. "jade",
  1195. "green",
  1196. "grass",
  1197. "brown",
  1198. "orange",
  1199. "sky",
  1200. "mint",
  1201. "lime",
  1202. "yellow",
  1203. "amber",
  1204. "gold",
  1205. "bronze",
  1206. "gray",
  1207. ]
  1208. ],
  1209. Literal[
  1210. "tomato",
  1211. "red",
  1212. "ruby",
  1213. "crimson",
  1214. "pink",
  1215. "plum",
  1216. "purple",
  1217. "violet",
  1218. "iris",
  1219. "indigo",
  1220. "blue",
  1221. "cyan",
  1222. "teal",
  1223. "jade",
  1224. "green",
  1225. "grass",
  1226. "brown",
  1227. "orange",
  1228. "sky",
  1229. "mint",
  1230. "lime",
  1231. "yellow",
  1232. "amber",
  1233. "gold",
  1234. "bronze",
  1235. "gray",
  1236. ],
  1237. ]
  1238. ] = None,
  1239. open: Optional[Union[Var[bool], bool]] = None,
  1240. modal: Optional[Union[Var[bool], bool]] = None,
  1241. style: Optional[Style] = None,
  1242. key: Optional[Any] = None,
  1243. id: Optional[Any] = None,
  1244. class_name: Optional[Any] = None,
  1245. autofocus: Optional[bool] = None,
  1246. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  1247. on_blur: Optional[
  1248. Union[EventHandler, EventSpec, list, function, BaseVar]
  1249. ] = None,
  1250. on_click: Optional[
  1251. Union[EventHandler, EventSpec, list, function, BaseVar]
  1252. ] = None,
  1253. on_context_menu: Optional[
  1254. Union[EventHandler, EventSpec, list, function, BaseVar]
  1255. ] = None,
  1256. on_double_click: Optional[
  1257. Union[EventHandler, EventSpec, list, function, BaseVar]
  1258. ] = None,
  1259. on_focus: Optional[
  1260. Union[EventHandler, EventSpec, list, function, BaseVar]
  1261. ] = None,
  1262. on_mount: Optional[
  1263. Union[EventHandler, EventSpec, list, function, BaseVar]
  1264. ] = None,
  1265. on_mouse_down: Optional[
  1266. Union[EventHandler, EventSpec, list, function, BaseVar]
  1267. ] = None,
  1268. on_mouse_enter: Optional[
  1269. Union[EventHandler, EventSpec, list, function, BaseVar]
  1270. ] = None,
  1271. on_mouse_leave: Optional[
  1272. Union[EventHandler, EventSpec, list, function, BaseVar]
  1273. ] = None,
  1274. on_mouse_move: Optional[
  1275. Union[EventHandler, EventSpec, list, function, BaseVar]
  1276. ] = None,
  1277. on_mouse_out: Optional[
  1278. Union[EventHandler, EventSpec, list, function, BaseVar]
  1279. ] = None,
  1280. on_mouse_over: Optional[
  1281. Union[EventHandler, EventSpec, list, function, BaseVar]
  1282. ] = None,
  1283. on_mouse_up: Optional[
  1284. Union[EventHandler, EventSpec, list, function, BaseVar]
  1285. ] = None,
  1286. on_open_change: Optional[
  1287. Union[EventHandler, EventSpec, list, function, BaseVar]
  1288. ] = None,
  1289. on_scroll: Optional[
  1290. Union[EventHandler, EventSpec, list, function, BaseVar]
  1291. ] = None,
  1292. on_unmount: Optional[
  1293. Union[EventHandler, EventSpec, list, function, BaseVar]
  1294. ] = None,
  1295. **props
  1296. ) -> "DropdownMenuRoot":
  1297. """Create a new component instance.
  1298. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  1299. other UI libraries for common names, like Text and Button.
  1300. Args:
  1301. *children: Child components.
  1302. color: map to CSS default color property.
  1303. color_scheme: map to radix color property.
  1304. open: The controlled open state of the dropdown menu. Must be used in conjunction with onOpenChange.
  1305. modal: The modality of the dropdown menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers.
  1306. style: The style of the component.
  1307. key: A unique key for the component.
  1308. id: The id for the component.
  1309. class_name: The class name for the component.
  1310. autofocus: Whether the component should take the focus once the page is loaded
  1311. custom_attrs: custom attribute
  1312. **props: Component properties.
  1313. Returns:
  1314. A new component instance.
  1315. """
  1316. ...
  1317. dropdown_menu = DropdownMenu()