accordion.pyi 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850
  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, Dict, List, Literal, Optional, Tuple, 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 EventType
  10. from reflex.style import Style
  11. from reflex.vars.base import Var
  12. LiteralAccordionType = Literal["single", "multiple"]
  13. LiteralAccordionDir = Literal["ltr", "rtl"]
  14. LiteralAccordionOrientation = Literal["vertical", "horizontal"]
  15. LiteralAccordionVariant = Literal["classic", "soft", "surface", "outline", "ghost"]
  16. DEFAULT_ANIMATION_DURATION = 250
  17. DEFAULT_ANIMATION_EASING = "cubic-bezier(0.87, 0, 0.13, 1)"
  18. class AccordionComponent(RadixPrimitiveComponent):
  19. def add_style(self): ...
  20. @overload
  21. @classmethod
  22. def create( # type: ignore
  23. cls,
  24. *children,
  25. color_scheme: Optional[
  26. Union[
  27. Literal[
  28. "amber",
  29. "blue",
  30. "bronze",
  31. "brown",
  32. "crimson",
  33. "cyan",
  34. "gold",
  35. "grass",
  36. "gray",
  37. "green",
  38. "indigo",
  39. "iris",
  40. "jade",
  41. "lime",
  42. "mint",
  43. "orange",
  44. "pink",
  45. "plum",
  46. "purple",
  47. "red",
  48. "ruby",
  49. "sky",
  50. "teal",
  51. "tomato",
  52. "violet",
  53. "yellow",
  54. ],
  55. Var[
  56. Literal[
  57. "amber",
  58. "blue",
  59. "bronze",
  60. "brown",
  61. "crimson",
  62. "cyan",
  63. "gold",
  64. "grass",
  65. "gray",
  66. "green",
  67. "indigo",
  68. "iris",
  69. "jade",
  70. "lime",
  71. "mint",
  72. "orange",
  73. "pink",
  74. "plum",
  75. "purple",
  76. "red",
  77. "ruby",
  78. "sky",
  79. "teal",
  80. "tomato",
  81. "violet",
  82. "yellow",
  83. ]
  84. ],
  85. ]
  86. ] = None,
  87. variant: Optional[
  88. Union[
  89. Literal["classic", "ghost", "outline", "soft", "surface"],
  90. Var[Literal["classic", "ghost", "outline", "soft", "surface"]],
  91. ]
  92. ] = None,
  93. as_child: Optional[Union[Var[bool], bool]] = None,
  94. style: Optional[Style] = None,
  95. key: Optional[Any] = None,
  96. id: Optional[Any] = None,
  97. class_name: Optional[Any] = None,
  98. autofocus: Optional[bool] = None,
  99. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  100. on_blur: Optional[EventType[()]] = None,
  101. on_click: Optional[EventType[()]] = None,
  102. on_context_menu: Optional[EventType[()]] = None,
  103. on_double_click: Optional[EventType[()]] = None,
  104. on_focus: Optional[EventType[()]] = None,
  105. on_mount: Optional[EventType[()]] = None,
  106. on_mouse_down: Optional[EventType[()]] = None,
  107. on_mouse_enter: Optional[EventType[()]] = None,
  108. on_mouse_leave: Optional[EventType[()]] = None,
  109. on_mouse_move: Optional[EventType[()]] = None,
  110. on_mouse_out: Optional[EventType[()]] = None,
  111. on_mouse_over: Optional[EventType[()]] = None,
  112. on_mouse_up: Optional[EventType[()]] = None,
  113. on_scroll: Optional[EventType[()]] = None,
  114. on_unmount: Optional[EventType[()]] = None,
  115. **props,
  116. ) -> "AccordionComponent":
  117. """Create the component.
  118. Args:
  119. *children: The children of the component.
  120. color_scheme: The color scheme of the component.
  121. variant: The variant of the component.
  122. as_child: Change the default rendered element for the one passed as a child.
  123. style: The style of the component.
  124. key: A unique key for the component.
  125. id: The id for the component.
  126. class_name: The class name for the component.
  127. autofocus: Whether the component should take the focus once the page is loaded
  128. custom_attrs: custom attribute
  129. **props: The props of the component.
  130. Returns:
  131. The component.
  132. """
  133. ...
  134. def on_value_change(value: Var[str | List[str]]) -> Tuple[Var[str | List[str]]]: ...
  135. class AccordionRoot(AccordionComponent):
  136. def add_style(self): ...
  137. @overload
  138. @classmethod
  139. def create( # type: ignore
  140. cls,
  141. *children,
  142. type: Optional[
  143. Union[Literal["multiple", "single"], Var[Literal["multiple", "single"]]]
  144. ] = None,
  145. value: Optional[Union[List[str], Var[Union[List[str], str]], str]] = None,
  146. default_value: Optional[
  147. Union[List[str], Var[Union[List[str], str]], str]
  148. ] = None,
  149. collapsible: Optional[Union[Var[bool], bool]] = None,
  150. disabled: Optional[Union[Var[bool], bool]] = None,
  151. dir: Optional[Union[Literal["ltr", "rtl"], Var[Literal["ltr", "rtl"]]]] = None,
  152. orientation: Optional[
  153. Union[
  154. Literal["horizontal", "vertical"],
  155. Var[Literal["horizontal", "vertical"]],
  156. ]
  157. ] = None,
  158. radius: Optional[
  159. Union[
  160. Literal["full", "large", "medium", "none", "small"],
  161. Var[Literal["full", "large", "medium", "none", "small"]],
  162. ]
  163. ] = None,
  164. duration: Optional[Union[Var[int], int]] = None,
  165. easing: Optional[Union[Var[str], str]] = None,
  166. show_dividers: Optional[Union[Var[bool], bool]] = None,
  167. color_scheme: Optional[
  168. Union[
  169. Literal[
  170. "amber",
  171. "blue",
  172. "bronze",
  173. "brown",
  174. "crimson",
  175. "cyan",
  176. "gold",
  177. "grass",
  178. "gray",
  179. "green",
  180. "indigo",
  181. "iris",
  182. "jade",
  183. "lime",
  184. "mint",
  185. "orange",
  186. "pink",
  187. "plum",
  188. "purple",
  189. "red",
  190. "ruby",
  191. "sky",
  192. "teal",
  193. "tomato",
  194. "violet",
  195. "yellow",
  196. ],
  197. Var[
  198. Literal[
  199. "amber",
  200. "blue",
  201. "bronze",
  202. "brown",
  203. "crimson",
  204. "cyan",
  205. "gold",
  206. "grass",
  207. "gray",
  208. "green",
  209. "indigo",
  210. "iris",
  211. "jade",
  212. "lime",
  213. "mint",
  214. "orange",
  215. "pink",
  216. "plum",
  217. "purple",
  218. "red",
  219. "ruby",
  220. "sky",
  221. "teal",
  222. "tomato",
  223. "violet",
  224. "yellow",
  225. ]
  226. ],
  227. ]
  228. ] = None,
  229. variant: Optional[
  230. Union[
  231. Literal["classic", "ghost", "outline", "soft", "surface"],
  232. Var[Literal["classic", "ghost", "outline", "soft", "surface"]],
  233. ]
  234. ] = None,
  235. as_child: Optional[Union[Var[bool], bool]] = None,
  236. style: Optional[Style] = None,
  237. key: Optional[Any] = None,
  238. id: Optional[Any] = None,
  239. class_name: Optional[Any] = None,
  240. autofocus: Optional[bool] = None,
  241. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  242. on_blur: Optional[EventType[()]] = None,
  243. on_click: Optional[EventType[()]] = None,
  244. on_context_menu: Optional[EventType[()]] = None,
  245. on_double_click: Optional[EventType[()]] = None,
  246. on_focus: Optional[EventType[()]] = None,
  247. on_mount: Optional[EventType[()]] = None,
  248. on_mouse_down: Optional[EventType[()]] = None,
  249. on_mouse_enter: Optional[EventType[()]] = None,
  250. on_mouse_leave: Optional[EventType[()]] = None,
  251. on_mouse_move: Optional[EventType[()]] = None,
  252. on_mouse_out: Optional[EventType[()]] = None,
  253. on_mouse_over: Optional[EventType[()]] = None,
  254. on_mouse_up: Optional[EventType[()]] = None,
  255. on_scroll: Optional[EventType[()]] = None,
  256. on_unmount: Optional[EventType[()]] = None,
  257. on_value_change: Optional[
  258. Union[EventType[()], EventType[str | List[str]]]
  259. ] = None,
  260. **props,
  261. ) -> "AccordionRoot":
  262. """Create the component.
  263. Args:
  264. *children: The children of the component.
  265. type: The type of accordion (single or multiple).
  266. value: The value of the item to expand.
  267. default_value: The default value of the item to expand.
  268. collapsible: Whether or not the accordion is collapsible.
  269. disabled: Whether or not the accordion is disabled.
  270. dir: The reading direction of the accordion when applicable.
  271. orientation: The orientation of the accordion.
  272. radius: The radius of the accordion corners.
  273. duration: The time in milliseconds to animate open and close
  274. easing: The easing function to use for the animation.
  275. show_dividers: Whether to show divider lines between items.
  276. on_value_change: Fired when the opened the accordions changes.
  277. color_scheme: The color scheme of the component.
  278. variant: The variant of the component.
  279. as_child: Change the default rendered element for the one passed as a child.
  280. style: The style of the component.
  281. key: A unique key for the component.
  282. id: The id for the component.
  283. class_name: The class name for the component.
  284. autofocus: Whether the component should take the focus once the page is loaded
  285. custom_attrs: custom attribute
  286. **props: The props of the component.
  287. Returns:
  288. The component.
  289. """
  290. ...
  291. class AccordionItem(AccordionComponent):
  292. @overload
  293. @classmethod
  294. def create( # type: ignore
  295. cls,
  296. *children,
  297. value: Optional[Union[Var[str], str]] = None,
  298. disabled: Optional[Union[Var[bool], bool]] = None,
  299. header: Optional[Union[Component, Var[Union[Component, str]], str]] = None,
  300. content: Optional[
  301. Union[Component, Var[Optional[Union[Component, str]]], str]
  302. ] = None,
  303. color_scheme: Optional[
  304. Union[
  305. Literal[
  306. "amber",
  307. "blue",
  308. "bronze",
  309. "brown",
  310. "crimson",
  311. "cyan",
  312. "gold",
  313. "grass",
  314. "gray",
  315. "green",
  316. "indigo",
  317. "iris",
  318. "jade",
  319. "lime",
  320. "mint",
  321. "orange",
  322. "pink",
  323. "plum",
  324. "purple",
  325. "red",
  326. "ruby",
  327. "sky",
  328. "teal",
  329. "tomato",
  330. "violet",
  331. "yellow",
  332. ],
  333. Var[
  334. Literal[
  335. "amber",
  336. "blue",
  337. "bronze",
  338. "brown",
  339. "crimson",
  340. "cyan",
  341. "gold",
  342. "grass",
  343. "gray",
  344. "green",
  345. "indigo",
  346. "iris",
  347. "jade",
  348. "lime",
  349. "mint",
  350. "orange",
  351. "pink",
  352. "plum",
  353. "purple",
  354. "red",
  355. "ruby",
  356. "sky",
  357. "teal",
  358. "tomato",
  359. "violet",
  360. "yellow",
  361. ]
  362. ],
  363. ]
  364. ] = None,
  365. variant: Optional[
  366. Union[
  367. Literal["classic", "ghost", "outline", "soft", "surface"],
  368. Var[Literal["classic", "ghost", "outline", "soft", "surface"]],
  369. ]
  370. ] = None,
  371. as_child: Optional[Union[Var[bool], bool]] = None,
  372. style: Optional[Style] = None,
  373. key: Optional[Any] = None,
  374. id: Optional[Any] = None,
  375. class_name: Optional[Any] = None,
  376. autofocus: Optional[bool] = None,
  377. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  378. on_blur: Optional[EventType[()]] = None,
  379. on_click: Optional[EventType[()]] = None,
  380. on_context_menu: Optional[EventType[()]] = None,
  381. on_double_click: Optional[EventType[()]] = None,
  382. on_focus: Optional[EventType[()]] = None,
  383. on_mount: Optional[EventType[()]] = None,
  384. on_mouse_down: Optional[EventType[()]] = None,
  385. on_mouse_enter: Optional[EventType[()]] = None,
  386. on_mouse_leave: Optional[EventType[()]] = None,
  387. on_mouse_move: Optional[EventType[()]] = None,
  388. on_mouse_out: Optional[EventType[()]] = None,
  389. on_mouse_over: Optional[EventType[()]] = None,
  390. on_mouse_up: Optional[EventType[()]] = None,
  391. on_scroll: Optional[EventType[()]] = None,
  392. on_unmount: Optional[EventType[()]] = None,
  393. **props,
  394. ) -> "AccordionItem":
  395. """Create an accordion item.
  396. Args:
  397. *children: The list of children to use if header and content are not provided.
  398. value: A unique identifier for the item.
  399. disabled: When true, prevents the user from interacting with the item.
  400. header: The header of the accordion item.
  401. content: The content of the accordion item.
  402. color_scheme: The color scheme of the component.
  403. variant: The variant of the component.
  404. as_child: Change the default rendered element for the one passed as a child.
  405. style: The style of the component.
  406. key: A unique key for the component.
  407. id: The id for the component.
  408. class_name: The class name for the component.
  409. autofocus: Whether the component should take the focus once the page is loaded
  410. custom_attrs: custom attribute
  411. **props: Additional properties to apply to the accordion item.
  412. Returns:
  413. The accordion item.
  414. """
  415. ...
  416. def add_style(self) -> dict[str, Any] | None: ...
  417. class AccordionHeader(AccordionComponent):
  418. @overload
  419. @classmethod
  420. def create( # type: ignore
  421. cls,
  422. *children,
  423. color_scheme: Optional[
  424. Union[
  425. Literal[
  426. "amber",
  427. "blue",
  428. "bronze",
  429. "brown",
  430. "crimson",
  431. "cyan",
  432. "gold",
  433. "grass",
  434. "gray",
  435. "green",
  436. "indigo",
  437. "iris",
  438. "jade",
  439. "lime",
  440. "mint",
  441. "orange",
  442. "pink",
  443. "plum",
  444. "purple",
  445. "red",
  446. "ruby",
  447. "sky",
  448. "teal",
  449. "tomato",
  450. "violet",
  451. "yellow",
  452. ],
  453. Var[
  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. ],
  483. ]
  484. ] = None,
  485. variant: Optional[
  486. Union[
  487. Literal["classic", "ghost", "outline", "soft", "surface"],
  488. Var[Literal["classic", "ghost", "outline", "soft", "surface"]],
  489. ]
  490. ] = None,
  491. as_child: Optional[Union[Var[bool], bool]] = None,
  492. style: Optional[Style] = None,
  493. key: Optional[Any] = None,
  494. id: Optional[Any] = None,
  495. class_name: Optional[Any] = None,
  496. autofocus: Optional[bool] = None,
  497. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  498. on_blur: Optional[EventType[()]] = None,
  499. on_click: Optional[EventType[()]] = None,
  500. on_context_menu: Optional[EventType[()]] = None,
  501. on_double_click: Optional[EventType[()]] = None,
  502. on_focus: Optional[EventType[()]] = None,
  503. on_mount: Optional[EventType[()]] = None,
  504. on_mouse_down: Optional[EventType[()]] = None,
  505. on_mouse_enter: Optional[EventType[()]] = None,
  506. on_mouse_leave: Optional[EventType[()]] = None,
  507. on_mouse_move: Optional[EventType[()]] = None,
  508. on_mouse_out: Optional[EventType[()]] = None,
  509. on_mouse_over: Optional[EventType[()]] = None,
  510. on_mouse_up: Optional[EventType[()]] = None,
  511. on_scroll: Optional[EventType[()]] = None,
  512. on_unmount: Optional[EventType[()]] = None,
  513. **props,
  514. ) -> "AccordionHeader":
  515. """Create the Accordion header component.
  516. Args:
  517. *children: The children of the component.
  518. color_scheme: The color scheme of the component.
  519. variant: The variant of the component.
  520. as_child: Change the default rendered element for the one passed as a child.
  521. style: The style of the component.
  522. key: A unique key for the component.
  523. id: The id for the component.
  524. class_name: The class name for the component.
  525. autofocus: Whether the component should take the focus once the page is loaded
  526. custom_attrs: custom attribute
  527. **props: The properties of the component.
  528. Returns:
  529. The Accordion header Component.
  530. """
  531. ...
  532. def add_style(self) -> dict[str, Any] | None: ...
  533. class AccordionTrigger(AccordionComponent):
  534. @overload
  535. @classmethod
  536. def create( # type: ignore
  537. cls,
  538. *children,
  539. color_scheme: Optional[
  540. Union[
  541. Literal[
  542. "amber",
  543. "blue",
  544. "bronze",
  545. "brown",
  546. "crimson",
  547. "cyan",
  548. "gold",
  549. "grass",
  550. "gray",
  551. "green",
  552. "indigo",
  553. "iris",
  554. "jade",
  555. "lime",
  556. "mint",
  557. "orange",
  558. "pink",
  559. "plum",
  560. "purple",
  561. "red",
  562. "ruby",
  563. "sky",
  564. "teal",
  565. "tomato",
  566. "violet",
  567. "yellow",
  568. ],
  569. Var[
  570. Literal[
  571. "amber",
  572. "blue",
  573. "bronze",
  574. "brown",
  575. "crimson",
  576. "cyan",
  577. "gold",
  578. "grass",
  579. "gray",
  580. "green",
  581. "indigo",
  582. "iris",
  583. "jade",
  584. "lime",
  585. "mint",
  586. "orange",
  587. "pink",
  588. "plum",
  589. "purple",
  590. "red",
  591. "ruby",
  592. "sky",
  593. "teal",
  594. "tomato",
  595. "violet",
  596. "yellow",
  597. ]
  598. ],
  599. ]
  600. ] = None,
  601. variant: Optional[
  602. Union[
  603. Literal["classic", "ghost", "outline", "soft", "surface"],
  604. Var[Literal["classic", "ghost", "outline", "soft", "surface"]],
  605. ]
  606. ] = None,
  607. as_child: Optional[Union[Var[bool], bool]] = None,
  608. style: Optional[Style] = None,
  609. key: Optional[Any] = None,
  610. id: Optional[Any] = None,
  611. class_name: Optional[Any] = None,
  612. autofocus: Optional[bool] = None,
  613. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  614. on_blur: Optional[EventType[()]] = None,
  615. on_click: Optional[EventType[()]] = None,
  616. on_context_menu: Optional[EventType[()]] = None,
  617. on_double_click: Optional[EventType[()]] = None,
  618. on_focus: Optional[EventType[()]] = None,
  619. on_mount: Optional[EventType[()]] = None,
  620. on_mouse_down: Optional[EventType[()]] = None,
  621. on_mouse_enter: Optional[EventType[()]] = None,
  622. on_mouse_leave: Optional[EventType[()]] = None,
  623. on_mouse_move: Optional[EventType[()]] = None,
  624. on_mouse_out: Optional[EventType[()]] = None,
  625. on_mouse_over: Optional[EventType[()]] = None,
  626. on_mouse_up: Optional[EventType[()]] = None,
  627. on_scroll: Optional[EventType[()]] = None,
  628. on_unmount: Optional[EventType[()]] = None,
  629. **props,
  630. ) -> "AccordionTrigger":
  631. """Create the Accordion trigger component.
  632. Args:
  633. *children: The children of the component.
  634. color_scheme: The color scheme of the component.
  635. variant: The variant of the component.
  636. as_child: Change the default rendered element for the one passed as a child.
  637. style: The style of the component.
  638. key: A unique key for the component.
  639. id: The id for the component.
  640. class_name: The class name for the component.
  641. autofocus: Whether the component should take the focus once the page is loaded
  642. custom_attrs: custom attribute
  643. **props: The properties of the component.
  644. Returns:
  645. The Accordion trigger Component.
  646. """
  647. ...
  648. def add_style(self) -> dict[str, Any] | None: ...
  649. class AccordionIcon(Icon):
  650. @overload
  651. @classmethod
  652. def create( # type: ignore
  653. cls,
  654. *children,
  655. size: Optional[Union[Var[int], int]] = None,
  656. style: Optional[Style] = None,
  657. key: Optional[Any] = None,
  658. id: Optional[Any] = None,
  659. class_name: Optional[Any] = None,
  660. autofocus: Optional[bool] = None,
  661. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  662. on_blur: Optional[EventType[()]] = None,
  663. on_click: Optional[EventType[()]] = None,
  664. on_context_menu: Optional[EventType[()]] = None,
  665. on_double_click: Optional[EventType[()]] = None,
  666. on_focus: Optional[EventType[()]] = None,
  667. on_mount: Optional[EventType[()]] = None,
  668. on_mouse_down: Optional[EventType[()]] = None,
  669. on_mouse_enter: Optional[EventType[()]] = None,
  670. on_mouse_leave: Optional[EventType[()]] = None,
  671. on_mouse_move: Optional[EventType[()]] = None,
  672. on_mouse_out: Optional[EventType[()]] = None,
  673. on_mouse_over: Optional[EventType[()]] = None,
  674. on_mouse_up: Optional[EventType[()]] = None,
  675. on_scroll: Optional[EventType[()]] = None,
  676. on_unmount: Optional[EventType[()]] = None,
  677. **props,
  678. ) -> "AccordionIcon":
  679. """Create the Accordion icon component.
  680. Args:
  681. *children: The children of the component.
  682. size: The size of the icon in pixels.
  683. style: The style of the component.
  684. key: A unique key for the component.
  685. id: The id for the component.
  686. class_name: The class name for the component.
  687. autofocus: Whether the component should take the focus once the page is loaded
  688. custom_attrs: custom attribute
  689. **props: The properties of the component.
  690. Returns:
  691. The Accordion icon Component.
  692. """
  693. ...
  694. class AccordionContent(AccordionComponent):
  695. def add_imports(self) -> dict: ...
  696. @overload
  697. @classmethod
  698. def create( # type: ignore
  699. cls,
  700. *children,
  701. color_scheme: Optional[
  702. Union[
  703. Literal[
  704. "amber",
  705. "blue",
  706. "bronze",
  707. "brown",
  708. "crimson",
  709. "cyan",
  710. "gold",
  711. "grass",
  712. "gray",
  713. "green",
  714. "indigo",
  715. "iris",
  716. "jade",
  717. "lime",
  718. "mint",
  719. "orange",
  720. "pink",
  721. "plum",
  722. "purple",
  723. "red",
  724. "ruby",
  725. "sky",
  726. "teal",
  727. "tomato",
  728. "violet",
  729. "yellow",
  730. ],
  731. Var[
  732. Literal[
  733. "amber",
  734. "blue",
  735. "bronze",
  736. "brown",
  737. "crimson",
  738. "cyan",
  739. "gold",
  740. "grass",
  741. "gray",
  742. "green",
  743. "indigo",
  744. "iris",
  745. "jade",
  746. "lime",
  747. "mint",
  748. "orange",
  749. "pink",
  750. "plum",
  751. "purple",
  752. "red",
  753. "ruby",
  754. "sky",
  755. "teal",
  756. "tomato",
  757. "violet",
  758. "yellow",
  759. ]
  760. ],
  761. ]
  762. ] = None,
  763. variant: Optional[
  764. Union[
  765. Literal["classic", "ghost", "outline", "soft", "surface"],
  766. Var[Literal["classic", "ghost", "outline", "soft", "surface"]],
  767. ]
  768. ] = None,
  769. as_child: Optional[Union[Var[bool], bool]] = None,
  770. style: Optional[Style] = None,
  771. key: Optional[Any] = None,
  772. id: Optional[Any] = None,
  773. class_name: Optional[Any] = None,
  774. autofocus: Optional[bool] = None,
  775. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  776. on_blur: Optional[EventType[()]] = None,
  777. on_click: Optional[EventType[()]] = None,
  778. on_context_menu: Optional[EventType[()]] = None,
  779. on_double_click: Optional[EventType[()]] = None,
  780. on_focus: Optional[EventType[()]] = None,
  781. on_mount: Optional[EventType[()]] = None,
  782. on_mouse_down: Optional[EventType[()]] = None,
  783. on_mouse_enter: Optional[EventType[()]] = None,
  784. on_mouse_leave: Optional[EventType[()]] = None,
  785. on_mouse_move: Optional[EventType[()]] = None,
  786. on_mouse_out: Optional[EventType[()]] = None,
  787. on_mouse_over: Optional[EventType[()]] = None,
  788. on_mouse_up: Optional[EventType[()]] = None,
  789. on_scroll: Optional[EventType[()]] = None,
  790. on_unmount: Optional[EventType[()]] = None,
  791. **props,
  792. ) -> "AccordionContent":
  793. """Create the Accordion content component.
  794. Args:
  795. *children: The children of the component.
  796. color_scheme: The color scheme of the component.
  797. variant: The variant of the component.
  798. as_child: Change the default rendered element for the one passed as a child.
  799. style: The style of the component.
  800. key: A unique key for the component.
  801. id: The id for the component.
  802. class_name: The class name for the component.
  803. autofocus: Whether the component should take the focus once the page is loaded
  804. custom_attrs: custom attribute
  805. **props: The properties of the component.
  806. Returns:
  807. The Accordion content Component.
  808. """
  809. ...
  810. def add_custom_code(self) -> list[str]: ...
  811. def add_style(self) -> dict[str, Any] | None: ...
  812. class Accordion(ComponentNamespace):
  813. content = staticmethod(AccordionContent.create)
  814. header = staticmethod(AccordionHeader.create)
  815. item = staticmethod(AccordionItem.create)
  816. icon = staticmethod(AccordionIcon.create)
  817. root = staticmethod(AccordionRoot.create)
  818. trigger = staticmethod(AccordionTrigger.create)
  819. accordion = Accordion()