accordion.pyi 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056
  1. """Stub file for reflex/components/radix/primitives/accordion.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
  6. from reflex.components.component import Component, ComponentNamespace
  7. from reflex.components.lucide.icon import Icon
  8. from reflex.components.radix.primitives.base import RadixPrimitiveComponent
  9. from reflex.event import EventHandler, EventSpec
  10. from reflex.ivars.base import ImmutableVar
  11. from reflex.style import Style
  12. from reflex.vars import Var
  13. LiteralAccordionType = Literal["single", "multiple"]
  14. LiteralAccordionDir = Literal["ltr", "rtl"]
  15. LiteralAccordionOrientation = Literal["vertical", "horizontal"]
  16. LiteralAccordionVariant = Literal["classic", "soft", "surface", "outline", "ghost"]
  17. DEFAULT_ANIMATION_DURATION = 250
  18. DEFAULT_ANIMATION_EASING = "cubic-bezier(0.87, 0, 0.13, 1)"
  19. class AccordionComponent(RadixPrimitiveComponent):
  20. def add_style(self): ...
  21. @overload
  22. @classmethod
  23. def create( # type: ignore
  24. cls,
  25. *children,
  26. color_scheme: Optional[
  27. Union[
  28. Var[
  29. Literal[
  30. "tomato",
  31. "red",
  32. "ruby",
  33. "crimson",
  34. "pink",
  35. "plum",
  36. "purple",
  37. "violet",
  38. "iris",
  39. "indigo",
  40. "blue",
  41. "cyan",
  42. "teal",
  43. "jade",
  44. "green",
  45. "grass",
  46. "brown",
  47. "orange",
  48. "sky",
  49. "mint",
  50. "lime",
  51. "yellow",
  52. "amber",
  53. "gold",
  54. "bronze",
  55. "gray",
  56. ]
  57. ],
  58. Literal[
  59. "tomato",
  60. "red",
  61. "ruby",
  62. "crimson",
  63. "pink",
  64. "plum",
  65. "purple",
  66. "violet",
  67. "iris",
  68. "indigo",
  69. "blue",
  70. "cyan",
  71. "teal",
  72. "jade",
  73. "green",
  74. "grass",
  75. "brown",
  76. "orange",
  77. "sky",
  78. "mint",
  79. "lime",
  80. "yellow",
  81. "amber",
  82. "gold",
  83. "bronze",
  84. "gray",
  85. ],
  86. ]
  87. ] = None,
  88. variant: Optional[
  89. Union[
  90. Var[Literal["classic", "soft", "surface", "outline", "ghost"]],
  91. Literal["classic", "soft", "surface", "outline", "ghost"],
  92. ]
  93. ] = None,
  94. as_child: Optional[Union[Var[bool], bool]] = None,
  95. style: Optional[Style] = None,
  96. key: Optional[Any] = None,
  97. id: Optional[Any] = None,
  98. class_name: Optional[Any] = None,
  99. autofocus: Optional[bool] = None,
  100. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  101. on_blur: Optional[
  102. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  103. ] = None,
  104. on_click: Optional[
  105. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  106. ] = None,
  107. on_context_menu: Optional[
  108. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  109. ] = None,
  110. on_double_click: Optional[
  111. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  112. ] = None,
  113. on_focus: Optional[
  114. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  115. ] = None,
  116. on_mount: Optional[
  117. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  118. ] = None,
  119. on_mouse_down: Optional[
  120. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  121. ] = None,
  122. on_mouse_enter: Optional[
  123. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  124. ] = None,
  125. on_mouse_leave: Optional[
  126. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  127. ] = None,
  128. on_mouse_move: Optional[
  129. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  130. ] = None,
  131. on_mouse_out: Optional[
  132. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  133. ] = None,
  134. on_mouse_over: Optional[
  135. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  136. ] = None,
  137. on_mouse_up: Optional[
  138. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  139. ] = None,
  140. on_scroll: Optional[
  141. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  142. ] = None,
  143. on_unmount: Optional[
  144. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  145. ] = None,
  146. **props,
  147. ) -> "AccordionComponent":
  148. """Create the component.
  149. Args:
  150. *children: The children of the component.
  151. color_scheme: The color scheme of the component.
  152. variant: The variant of the component.
  153. as_child: Change the default rendered element for the one passed as a child.
  154. style: The style of the component.
  155. key: A unique key for the component.
  156. id: The id for the component.
  157. class_name: The class name for the component.
  158. autofocus: Whether the component should take the focus once the page is loaded
  159. custom_attrs: custom attribute
  160. **props: The props of the component.
  161. Returns:
  162. The component.
  163. """
  164. ...
  165. class AccordionRoot(AccordionComponent):
  166. def add_style(self): ...
  167. @overload
  168. @classmethod
  169. def create( # type: ignore
  170. cls,
  171. *children,
  172. type: Optional[
  173. Union[Var[Literal["single", "multiple"]], Literal["single", "multiple"]]
  174. ] = None,
  175. value: Optional[Union[Var[Union[List[str], str]], str, List[str]]] = None,
  176. default_value: Optional[
  177. Union[Var[Union[List[str], str]], str, List[str]]
  178. ] = None,
  179. collapsible: Optional[Union[Var[bool], bool]] = None,
  180. disabled: Optional[Union[Var[bool], bool]] = None,
  181. dir: Optional[Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]] = None,
  182. orientation: Optional[
  183. Union[
  184. Var[Literal["vertical", "horizontal"]],
  185. Literal["vertical", "horizontal"],
  186. ]
  187. ] = None,
  188. radius: Optional[
  189. Union[
  190. Var[Literal["none", "small", "medium", "large", "full"]],
  191. Literal["none", "small", "medium", "large", "full"],
  192. ]
  193. ] = None,
  194. duration: Optional[Union[Var[int], int]] = None,
  195. easing: Optional[Union[Var[str], str]] = None,
  196. show_dividers: Optional[Union[Var[bool], bool]] = None,
  197. color_scheme: Optional[
  198. Union[
  199. Var[
  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. Literal[
  230. "tomato",
  231. "red",
  232. "ruby",
  233. "crimson",
  234. "pink",
  235. "plum",
  236. "purple",
  237. "violet",
  238. "iris",
  239. "indigo",
  240. "blue",
  241. "cyan",
  242. "teal",
  243. "jade",
  244. "green",
  245. "grass",
  246. "brown",
  247. "orange",
  248. "sky",
  249. "mint",
  250. "lime",
  251. "yellow",
  252. "amber",
  253. "gold",
  254. "bronze",
  255. "gray",
  256. ],
  257. ]
  258. ] = None,
  259. variant: Optional[
  260. Union[
  261. Var[Literal["classic", "soft", "surface", "outline", "ghost"]],
  262. Literal["classic", "soft", "surface", "outline", "ghost"],
  263. ]
  264. ] = None,
  265. as_child: Optional[Union[Var[bool], bool]] = 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[ImmutableVar, str]]] = None,
  272. on_blur: Optional[
  273. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  274. ] = None,
  275. on_click: Optional[
  276. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  277. ] = None,
  278. on_context_menu: Optional[
  279. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  280. ] = None,
  281. on_double_click: Optional[
  282. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  283. ] = None,
  284. on_focus: Optional[
  285. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  286. ] = None,
  287. on_mount: Optional[
  288. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  289. ] = None,
  290. on_mouse_down: Optional[
  291. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  292. ] = None,
  293. on_mouse_enter: Optional[
  294. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  295. ] = None,
  296. on_mouse_leave: Optional[
  297. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  298. ] = None,
  299. on_mouse_move: Optional[
  300. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  301. ] = None,
  302. on_mouse_out: Optional[
  303. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  304. ] = None,
  305. on_mouse_over: Optional[
  306. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  307. ] = None,
  308. on_mouse_up: Optional[
  309. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  310. ] = None,
  311. on_scroll: Optional[
  312. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  313. ] = None,
  314. on_unmount: Optional[
  315. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  316. ] = None,
  317. on_value_change: Optional[
  318. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  319. ] = None,
  320. **props,
  321. ) -> "AccordionRoot":
  322. """Create the component.
  323. Args:
  324. *children: The children of the component.
  325. type: The type of accordion (single or multiple).
  326. value: The value of the item to expand.
  327. default_value: The default value of the item to expand.
  328. collapsible: Whether or not the accordion is collapsible.
  329. disabled: Whether or not the accordion is disabled.
  330. dir: The reading direction of the accordion when applicable.
  331. orientation: The orientation of the accordion.
  332. radius: The radius of the accordion corners.
  333. duration: The time in milliseconds to animate open and close
  334. easing: The easing function to use for the animation.
  335. show_dividers: Whether to show divider lines between items.
  336. color_scheme: The color scheme of the component.
  337. variant: The variant of the component.
  338. as_child: Change the default rendered element for the one passed as a child.
  339. style: The style of the component.
  340. key: A unique key for the component.
  341. id: The id for the component.
  342. class_name: The class name for the component.
  343. autofocus: Whether the component should take the focus once the page is loaded
  344. custom_attrs: custom attribute
  345. **props: The props of the component.
  346. Returns:
  347. The component.
  348. """
  349. ...
  350. class AccordionItem(AccordionComponent):
  351. @overload
  352. @classmethod
  353. def create( # type: ignore
  354. cls,
  355. *children,
  356. header: Optional[Union[Component, ImmutableVar]] = None,
  357. content: Optional[Union[Component, ImmutableVar]] = None,
  358. value: Optional[Union[Var[str], str]] = None,
  359. disabled: Optional[Union[Var[bool], bool]] = None,
  360. color_scheme: Optional[
  361. Union[
  362. Var[
  363. Literal[
  364. "tomato",
  365. "red",
  366. "ruby",
  367. "crimson",
  368. "pink",
  369. "plum",
  370. "purple",
  371. "violet",
  372. "iris",
  373. "indigo",
  374. "blue",
  375. "cyan",
  376. "teal",
  377. "jade",
  378. "green",
  379. "grass",
  380. "brown",
  381. "orange",
  382. "sky",
  383. "mint",
  384. "lime",
  385. "yellow",
  386. "amber",
  387. "gold",
  388. "bronze",
  389. "gray",
  390. ]
  391. ],
  392. Literal[
  393. "tomato",
  394. "red",
  395. "ruby",
  396. "crimson",
  397. "pink",
  398. "plum",
  399. "purple",
  400. "violet",
  401. "iris",
  402. "indigo",
  403. "blue",
  404. "cyan",
  405. "teal",
  406. "jade",
  407. "green",
  408. "grass",
  409. "brown",
  410. "orange",
  411. "sky",
  412. "mint",
  413. "lime",
  414. "yellow",
  415. "amber",
  416. "gold",
  417. "bronze",
  418. "gray",
  419. ],
  420. ]
  421. ] = None,
  422. variant: Optional[
  423. Union[
  424. Var[Literal["classic", "soft", "surface", "outline", "ghost"]],
  425. Literal["classic", "soft", "surface", "outline", "ghost"],
  426. ]
  427. ] = None,
  428. as_child: Optional[Union[Var[bool], bool]] = None,
  429. style: Optional[Style] = None,
  430. key: Optional[Any] = None,
  431. id: Optional[Any] = None,
  432. class_name: Optional[Any] = None,
  433. autofocus: Optional[bool] = None,
  434. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  435. on_blur: Optional[
  436. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  437. ] = None,
  438. on_click: Optional[
  439. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  440. ] = None,
  441. on_context_menu: Optional[
  442. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  443. ] = None,
  444. on_double_click: Optional[
  445. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  446. ] = None,
  447. on_focus: Optional[
  448. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  449. ] = None,
  450. on_mount: Optional[
  451. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  452. ] = None,
  453. on_mouse_down: Optional[
  454. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  455. ] = None,
  456. on_mouse_enter: Optional[
  457. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  458. ] = None,
  459. on_mouse_leave: Optional[
  460. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  461. ] = None,
  462. on_mouse_move: Optional[
  463. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  464. ] = None,
  465. on_mouse_out: Optional[
  466. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  467. ] = None,
  468. on_mouse_over: Optional[
  469. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  470. ] = None,
  471. on_mouse_up: Optional[
  472. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  473. ] = None,
  474. on_scroll: Optional[
  475. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  476. ] = None,
  477. on_unmount: Optional[
  478. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  479. ] = None,
  480. **props,
  481. ) -> "AccordionItem":
  482. """Create an accordion item.
  483. Args:
  484. *children: The list of children to use if header and content are not provided.
  485. header: The header of the accordion item.
  486. content: The content of the accordion item.
  487. value: A unique identifier for the item.
  488. disabled: When true, prevents the user from interacting with the item.
  489. color_scheme: The color scheme of the component.
  490. variant: The variant of the component.
  491. as_child: Change the default rendered element for the one passed as a child.
  492. style: The style of the component.
  493. key: A unique key for the component.
  494. id: The id for the component.
  495. class_name: The class name for the component.
  496. autofocus: Whether the component should take the focus once the page is loaded
  497. custom_attrs: custom attribute
  498. **props: Additional properties to apply to the accordion item.
  499. Returns:
  500. The accordion item.
  501. """
  502. ...
  503. def add_style(self) -> dict[str, Any] | None: ...
  504. class AccordionHeader(AccordionComponent):
  505. @overload
  506. @classmethod
  507. def create( # type: ignore
  508. cls,
  509. *children,
  510. color_scheme: Optional[
  511. Union[
  512. Var[
  513. Literal[
  514. "tomato",
  515. "red",
  516. "ruby",
  517. "crimson",
  518. "pink",
  519. "plum",
  520. "purple",
  521. "violet",
  522. "iris",
  523. "indigo",
  524. "blue",
  525. "cyan",
  526. "teal",
  527. "jade",
  528. "green",
  529. "grass",
  530. "brown",
  531. "orange",
  532. "sky",
  533. "mint",
  534. "lime",
  535. "yellow",
  536. "amber",
  537. "gold",
  538. "bronze",
  539. "gray",
  540. ]
  541. ],
  542. Literal[
  543. "tomato",
  544. "red",
  545. "ruby",
  546. "crimson",
  547. "pink",
  548. "plum",
  549. "purple",
  550. "violet",
  551. "iris",
  552. "indigo",
  553. "blue",
  554. "cyan",
  555. "teal",
  556. "jade",
  557. "green",
  558. "grass",
  559. "brown",
  560. "orange",
  561. "sky",
  562. "mint",
  563. "lime",
  564. "yellow",
  565. "amber",
  566. "gold",
  567. "bronze",
  568. "gray",
  569. ],
  570. ]
  571. ] = None,
  572. variant: Optional[
  573. Union[
  574. Var[Literal["classic", "soft", "surface", "outline", "ghost"]],
  575. Literal["classic", "soft", "surface", "outline", "ghost"],
  576. ]
  577. ] = None,
  578. as_child: Optional[Union[Var[bool], bool]] = None,
  579. style: Optional[Style] = None,
  580. key: Optional[Any] = None,
  581. id: Optional[Any] = None,
  582. class_name: Optional[Any] = None,
  583. autofocus: Optional[bool] = None,
  584. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  585. on_blur: Optional[
  586. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  587. ] = None,
  588. on_click: Optional[
  589. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  590. ] = None,
  591. on_context_menu: Optional[
  592. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  593. ] = None,
  594. on_double_click: Optional[
  595. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  596. ] = None,
  597. on_focus: Optional[
  598. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  599. ] = None,
  600. on_mount: Optional[
  601. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  602. ] = None,
  603. on_mouse_down: Optional[
  604. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  605. ] = None,
  606. on_mouse_enter: Optional[
  607. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  608. ] = None,
  609. on_mouse_leave: Optional[
  610. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  611. ] = None,
  612. on_mouse_move: Optional[
  613. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  614. ] = None,
  615. on_mouse_out: Optional[
  616. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  617. ] = None,
  618. on_mouse_over: Optional[
  619. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  620. ] = None,
  621. on_mouse_up: Optional[
  622. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  623. ] = None,
  624. on_scroll: Optional[
  625. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  626. ] = None,
  627. on_unmount: Optional[
  628. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  629. ] = None,
  630. **props,
  631. ) -> "AccordionHeader":
  632. """Create the Accordion header component.
  633. Args:
  634. *children: The children of the component.
  635. color_scheme: The color scheme of the component.
  636. variant: The variant of the component.
  637. as_child: Change the default rendered element for the one passed as a child.
  638. style: The style of the component.
  639. key: A unique key for the component.
  640. id: The id for the component.
  641. class_name: The class name for the component.
  642. autofocus: Whether the component should take the focus once the page is loaded
  643. custom_attrs: custom attribute
  644. **props: The properties of the component.
  645. Returns:
  646. The Accordion header Component.
  647. """
  648. ...
  649. def add_style(self) -> dict[str, Any] | None: ...
  650. class AccordionTrigger(AccordionComponent):
  651. @overload
  652. @classmethod
  653. def create( # type: ignore
  654. cls,
  655. *children,
  656. color_scheme: Optional[
  657. Union[
  658. Var[
  659. Literal[
  660. "tomato",
  661. "red",
  662. "ruby",
  663. "crimson",
  664. "pink",
  665. "plum",
  666. "purple",
  667. "violet",
  668. "iris",
  669. "indigo",
  670. "blue",
  671. "cyan",
  672. "teal",
  673. "jade",
  674. "green",
  675. "grass",
  676. "brown",
  677. "orange",
  678. "sky",
  679. "mint",
  680. "lime",
  681. "yellow",
  682. "amber",
  683. "gold",
  684. "bronze",
  685. "gray",
  686. ]
  687. ],
  688. Literal[
  689. "tomato",
  690. "red",
  691. "ruby",
  692. "crimson",
  693. "pink",
  694. "plum",
  695. "purple",
  696. "violet",
  697. "iris",
  698. "indigo",
  699. "blue",
  700. "cyan",
  701. "teal",
  702. "jade",
  703. "green",
  704. "grass",
  705. "brown",
  706. "orange",
  707. "sky",
  708. "mint",
  709. "lime",
  710. "yellow",
  711. "amber",
  712. "gold",
  713. "bronze",
  714. "gray",
  715. ],
  716. ]
  717. ] = None,
  718. variant: Optional[
  719. Union[
  720. Var[Literal["classic", "soft", "surface", "outline", "ghost"]],
  721. Literal["classic", "soft", "surface", "outline", "ghost"],
  722. ]
  723. ] = None,
  724. as_child: Optional[Union[Var[bool], bool]] = None,
  725. style: Optional[Style] = None,
  726. key: Optional[Any] = None,
  727. id: Optional[Any] = None,
  728. class_name: Optional[Any] = None,
  729. autofocus: Optional[bool] = None,
  730. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  731. on_blur: Optional[
  732. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  733. ] = None,
  734. on_click: Optional[
  735. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  736. ] = None,
  737. on_context_menu: Optional[
  738. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  739. ] = None,
  740. on_double_click: Optional[
  741. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  742. ] = None,
  743. on_focus: Optional[
  744. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  745. ] = None,
  746. on_mount: Optional[
  747. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  748. ] = None,
  749. on_mouse_down: Optional[
  750. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  751. ] = None,
  752. on_mouse_enter: Optional[
  753. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  754. ] = None,
  755. on_mouse_leave: Optional[
  756. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  757. ] = None,
  758. on_mouse_move: Optional[
  759. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  760. ] = None,
  761. on_mouse_out: Optional[
  762. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  763. ] = None,
  764. on_mouse_over: Optional[
  765. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  766. ] = None,
  767. on_mouse_up: Optional[
  768. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  769. ] = None,
  770. on_scroll: Optional[
  771. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  772. ] = None,
  773. on_unmount: Optional[
  774. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  775. ] = None,
  776. **props,
  777. ) -> "AccordionTrigger":
  778. """Create the Accordion trigger component.
  779. Args:
  780. *children: The children of the component.
  781. color_scheme: The color scheme of the component.
  782. variant: The variant of the component.
  783. as_child: Change the default rendered element for the one passed as a child.
  784. style: The style of the component.
  785. key: A unique key for the component.
  786. id: The id for the component.
  787. class_name: The class name for the component.
  788. autofocus: Whether the component should take the focus once the page is loaded
  789. custom_attrs: custom attribute
  790. **props: The properties of the component.
  791. Returns:
  792. The Accordion trigger Component.
  793. """
  794. ...
  795. def add_style(self) -> dict[str, Any] | None: ...
  796. class AccordionIcon(Icon):
  797. @overload
  798. @classmethod
  799. def create( # type: ignore
  800. cls,
  801. *children,
  802. size: Optional[Union[Var[int], int]] = None,
  803. style: Optional[Style] = None,
  804. key: Optional[Any] = None,
  805. id: Optional[Any] = None,
  806. class_name: Optional[Any] = None,
  807. autofocus: Optional[bool] = None,
  808. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  809. on_blur: Optional[
  810. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  811. ] = None,
  812. on_click: Optional[
  813. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  814. ] = None,
  815. on_context_menu: Optional[
  816. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  817. ] = None,
  818. on_double_click: Optional[
  819. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  820. ] = None,
  821. on_focus: Optional[
  822. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  823. ] = None,
  824. on_mount: Optional[
  825. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  826. ] = None,
  827. on_mouse_down: Optional[
  828. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  829. ] = None,
  830. on_mouse_enter: Optional[
  831. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  832. ] = None,
  833. on_mouse_leave: Optional[
  834. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  835. ] = None,
  836. on_mouse_move: Optional[
  837. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  838. ] = None,
  839. on_mouse_out: Optional[
  840. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  841. ] = None,
  842. on_mouse_over: Optional[
  843. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  844. ] = None,
  845. on_mouse_up: Optional[
  846. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  847. ] = None,
  848. on_scroll: Optional[
  849. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  850. ] = None,
  851. on_unmount: Optional[
  852. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  853. ] = None,
  854. **props,
  855. ) -> "AccordionIcon":
  856. """Create the Accordion icon component.
  857. Args:
  858. *children: The children of the component.
  859. size: The size of the icon in pixels.
  860. style: The style of the component.
  861. key: A unique key for the component.
  862. id: The id for the component.
  863. class_name: The class name for the component.
  864. autofocus: Whether the component should take the focus once the page is loaded
  865. custom_attrs: custom attribute
  866. **props: The properties of the component.
  867. Returns:
  868. The Accordion icon Component.
  869. """
  870. ...
  871. class AccordionContent(AccordionComponent):
  872. def add_imports(self) -> dict: ...
  873. @overload
  874. @classmethod
  875. def create( # type: ignore
  876. cls,
  877. *children,
  878. color_scheme: Optional[
  879. Union[
  880. Var[
  881. Literal[
  882. "tomato",
  883. "red",
  884. "ruby",
  885. "crimson",
  886. "pink",
  887. "plum",
  888. "purple",
  889. "violet",
  890. "iris",
  891. "indigo",
  892. "blue",
  893. "cyan",
  894. "teal",
  895. "jade",
  896. "green",
  897. "grass",
  898. "brown",
  899. "orange",
  900. "sky",
  901. "mint",
  902. "lime",
  903. "yellow",
  904. "amber",
  905. "gold",
  906. "bronze",
  907. "gray",
  908. ]
  909. ],
  910. Literal[
  911. "tomato",
  912. "red",
  913. "ruby",
  914. "crimson",
  915. "pink",
  916. "plum",
  917. "purple",
  918. "violet",
  919. "iris",
  920. "indigo",
  921. "blue",
  922. "cyan",
  923. "teal",
  924. "jade",
  925. "green",
  926. "grass",
  927. "brown",
  928. "orange",
  929. "sky",
  930. "mint",
  931. "lime",
  932. "yellow",
  933. "amber",
  934. "gold",
  935. "bronze",
  936. "gray",
  937. ],
  938. ]
  939. ] = None,
  940. variant: Optional[
  941. Union[
  942. Var[Literal["classic", "soft", "surface", "outline", "ghost"]],
  943. Literal["classic", "soft", "surface", "outline", "ghost"],
  944. ]
  945. ] = None,
  946. as_child: Optional[Union[Var[bool], bool]] = None,
  947. style: Optional[Style] = None,
  948. key: Optional[Any] = None,
  949. id: Optional[Any] = None,
  950. class_name: Optional[Any] = None,
  951. autofocus: Optional[bool] = None,
  952. custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
  953. on_blur: Optional[
  954. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  955. ] = None,
  956. on_click: Optional[
  957. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  958. ] = None,
  959. on_context_menu: Optional[
  960. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  961. ] = None,
  962. on_double_click: Optional[
  963. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  964. ] = None,
  965. on_focus: Optional[
  966. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  967. ] = None,
  968. on_mount: Optional[
  969. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  970. ] = None,
  971. on_mouse_down: Optional[
  972. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  973. ] = None,
  974. on_mouse_enter: Optional[
  975. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  976. ] = None,
  977. on_mouse_leave: Optional[
  978. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  979. ] = None,
  980. on_mouse_move: Optional[
  981. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  982. ] = None,
  983. on_mouse_out: Optional[
  984. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  985. ] = None,
  986. on_mouse_over: Optional[
  987. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  988. ] = None,
  989. on_mouse_up: Optional[
  990. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  991. ] = None,
  992. on_scroll: Optional[
  993. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  994. ] = None,
  995. on_unmount: Optional[
  996. Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
  997. ] = None,
  998. **props,
  999. ) -> "AccordionContent":
  1000. """Create the Accordion content component.
  1001. Args:
  1002. *children: The children of the component.
  1003. color_scheme: The color scheme of the component.
  1004. variant: The variant of the component.
  1005. as_child: Change the default rendered element for the one passed as a child.
  1006. style: The style of the component.
  1007. key: A unique key for the component.
  1008. id: The id for the component.
  1009. class_name: The class name for the component.
  1010. autofocus: Whether the component should take the focus once the page is loaded
  1011. custom_attrs: custom attribute
  1012. **props: The properties of the component.
  1013. Returns:
  1014. The Accordion content Component.
  1015. """
  1016. ...
  1017. def add_custom_code(self) -> list[str]: ...
  1018. def add_style(self) -> dict[str, Any] | None: ...
  1019. class Accordion(ComponentNamespace):
  1020. content = staticmethod(AccordionContent.create)
  1021. header = staticmethod(AccordionHeader.create)
  1022. item = staticmethod(AccordionItem.create)
  1023. icon = staticmethod(AccordionIcon.create)
  1024. root = staticmethod(AccordionRoot.create)
  1025. trigger = staticmethod(AccordionTrigger.create)
  1026. accordion = Accordion()