accordion.pyi 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848
  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 BASE_STATE, 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[[], BASE_STATE]] = None,
  101. on_click: Optional[EventType[[], BASE_STATE]] = None,
  102. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  103. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  104. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  105. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  106. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  107. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  108. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  109. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  110. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  111. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  112. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  113. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  114. on_unmount: Optional[EventType[[], BASE_STATE]] = 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[[], BASE_STATE]] = None,
  243. on_click: Optional[EventType[[], BASE_STATE]] = None,
  244. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  245. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  246. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  247. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  248. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  249. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  250. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  251. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  252. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  253. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  254. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  255. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  256. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  257. on_value_change: Optional[
  258. Union[EventType[[], BASE_STATE], EventType[[str | List[str]], BASE_STATE]]
  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[Union[Component, Var[Union[Component, str]], str]] = None,
  301. color_scheme: Optional[
  302. Union[
  303. Literal[
  304. "amber",
  305. "blue",
  306. "bronze",
  307. "brown",
  308. "crimson",
  309. "cyan",
  310. "gold",
  311. "grass",
  312. "gray",
  313. "green",
  314. "indigo",
  315. "iris",
  316. "jade",
  317. "lime",
  318. "mint",
  319. "orange",
  320. "pink",
  321. "plum",
  322. "purple",
  323. "red",
  324. "ruby",
  325. "sky",
  326. "teal",
  327. "tomato",
  328. "violet",
  329. "yellow",
  330. ],
  331. Var[
  332. Literal[
  333. "amber",
  334. "blue",
  335. "bronze",
  336. "brown",
  337. "crimson",
  338. "cyan",
  339. "gold",
  340. "grass",
  341. "gray",
  342. "green",
  343. "indigo",
  344. "iris",
  345. "jade",
  346. "lime",
  347. "mint",
  348. "orange",
  349. "pink",
  350. "plum",
  351. "purple",
  352. "red",
  353. "ruby",
  354. "sky",
  355. "teal",
  356. "tomato",
  357. "violet",
  358. "yellow",
  359. ]
  360. ],
  361. ]
  362. ] = None,
  363. variant: Optional[
  364. Union[
  365. Literal["classic", "ghost", "outline", "soft", "surface"],
  366. Var[Literal["classic", "ghost", "outline", "soft", "surface"]],
  367. ]
  368. ] = None,
  369. as_child: Optional[Union[Var[bool], bool]] = None,
  370. style: Optional[Style] = None,
  371. key: Optional[Any] = None,
  372. id: Optional[Any] = None,
  373. class_name: Optional[Any] = None,
  374. autofocus: Optional[bool] = None,
  375. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  376. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  377. on_click: Optional[EventType[[], BASE_STATE]] = None,
  378. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  379. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  380. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  381. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  382. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  383. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  384. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  385. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  386. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  387. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  388. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  389. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  390. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  391. **props,
  392. ) -> "AccordionItem":
  393. """Create an accordion item.
  394. Args:
  395. *children: The list of children to use if header and content are not provided.
  396. value: A unique identifier for the item.
  397. disabled: When true, prevents the user from interacting with the item.
  398. header: The header of the accordion item.
  399. content: The content of the accordion item.
  400. color_scheme: The color scheme of the component.
  401. variant: The variant of the component.
  402. as_child: Change the default rendered element for the one passed as a child.
  403. style: The style of the component.
  404. key: A unique key for the component.
  405. id: The id for the component.
  406. class_name: The class name for the component.
  407. autofocus: Whether the component should take the focus once the page is loaded
  408. custom_attrs: custom attribute
  409. **props: Additional properties to apply to the accordion item.
  410. Returns:
  411. The accordion item.
  412. """
  413. ...
  414. def add_style(self) -> dict[str, Any] | None: ...
  415. class AccordionHeader(AccordionComponent):
  416. @overload
  417. @classmethod
  418. def create( # type: ignore
  419. cls,
  420. *children,
  421. color_scheme: Optional[
  422. Union[
  423. Literal[
  424. "amber",
  425. "blue",
  426. "bronze",
  427. "brown",
  428. "crimson",
  429. "cyan",
  430. "gold",
  431. "grass",
  432. "gray",
  433. "green",
  434. "indigo",
  435. "iris",
  436. "jade",
  437. "lime",
  438. "mint",
  439. "orange",
  440. "pink",
  441. "plum",
  442. "purple",
  443. "red",
  444. "ruby",
  445. "sky",
  446. "teal",
  447. "tomato",
  448. "violet",
  449. "yellow",
  450. ],
  451. Var[
  452. Literal[
  453. "amber",
  454. "blue",
  455. "bronze",
  456. "brown",
  457. "crimson",
  458. "cyan",
  459. "gold",
  460. "grass",
  461. "gray",
  462. "green",
  463. "indigo",
  464. "iris",
  465. "jade",
  466. "lime",
  467. "mint",
  468. "orange",
  469. "pink",
  470. "plum",
  471. "purple",
  472. "red",
  473. "ruby",
  474. "sky",
  475. "teal",
  476. "tomato",
  477. "violet",
  478. "yellow",
  479. ]
  480. ],
  481. ]
  482. ] = None,
  483. variant: Optional[
  484. Union[
  485. Literal["classic", "ghost", "outline", "soft", "surface"],
  486. Var[Literal["classic", "ghost", "outline", "soft", "surface"]],
  487. ]
  488. ] = None,
  489. as_child: Optional[Union[Var[bool], bool]] = None,
  490. style: Optional[Style] = None,
  491. key: Optional[Any] = None,
  492. id: Optional[Any] = None,
  493. class_name: Optional[Any] = None,
  494. autofocus: Optional[bool] = None,
  495. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  496. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  497. on_click: Optional[EventType[[], BASE_STATE]] = None,
  498. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  499. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  500. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  501. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  502. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  503. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  504. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  505. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  506. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  507. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  508. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  509. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  510. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  511. **props,
  512. ) -> "AccordionHeader":
  513. """Create the Accordion header component.
  514. Args:
  515. *children: The children of the component.
  516. color_scheme: The color scheme of the component.
  517. variant: The variant of the component.
  518. as_child: Change the default rendered element for the one passed as a child.
  519. style: The style of the component.
  520. key: A unique key for the component.
  521. id: The id for the component.
  522. class_name: The class name for the component.
  523. autofocus: Whether the component should take the focus once the page is loaded
  524. custom_attrs: custom attribute
  525. **props: The properties of the component.
  526. Returns:
  527. The Accordion header Component.
  528. """
  529. ...
  530. def add_style(self) -> dict[str, Any] | None: ...
  531. class AccordionTrigger(AccordionComponent):
  532. @overload
  533. @classmethod
  534. def create( # type: ignore
  535. cls,
  536. *children,
  537. color_scheme: Optional[
  538. Union[
  539. Literal[
  540. "amber",
  541. "blue",
  542. "bronze",
  543. "brown",
  544. "crimson",
  545. "cyan",
  546. "gold",
  547. "grass",
  548. "gray",
  549. "green",
  550. "indigo",
  551. "iris",
  552. "jade",
  553. "lime",
  554. "mint",
  555. "orange",
  556. "pink",
  557. "plum",
  558. "purple",
  559. "red",
  560. "ruby",
  561. "sky",
  562. "teal",
  563. "tomato",
  564. "violet",
  565. "yellow",
  566. ],
  567. Var[
  568. Literal[
  569. "amber",
  570. "blue",
  571. "bronze",
  572. "brown",
  573. "crimson",
  574. "cyan",
  575. "gold",
  576. "grass",
  577. "gray",
  578. "green",
  579. "indigo",
  580. "iris",
  581. "jade",
  582. "lime",
  583. "mint",
  584. "orange",
  585. "pink",
  586. "plum",
  587. "purple",
  588. "red",
  589. "ruby",
  590. "sky",
  591. "teal",
  592. "tomato",
  593. "violet",
  594. "yellow",
  595. ]
  596. ],
  597. ]
  598. ] = None,
  599. variant: Optional[
  600. Union[
  601. Literal["classic", "ghost", "outline", "soft", "surface"],
  602. Var[Literal["classic", "ghost", "outline", "soft", "surface"]],
  603. ]
  604. ] = None,
  605. as_child: Optional[Union[Var[bool], bool]] = None,
  606. style: Optional[Style] = None,
  607. key: Optional[Any] = None,
  608. id: Optional[Any] = None,
  609. class_name: Optional[Any] = None,
  610. autofocus: Optional[bool] = None,
  611. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  612. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  613. on_click: Optional[EventType[[], BASE_STATE]] = None,
  614. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  615. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  616. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  617. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  618. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  619. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  620. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  621. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  622. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  623. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  624. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  625. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  626. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  627. **props,
  628. ) -> "AccordionTrigger":
  629. """Create the Accordion trigger component.
  630. Args:
  631. *children: The children of the component.
  632. color_scheme: The color scheme of the component.
  633. variant: The variant of the component.
  634. as_child: Change the default rendered element for the one passed as a child.
  635. style: The style of the component.
  636. key: A unique key for the component.
  637. id: The id for the component.
  638. class_name: The class name for the component.
  639. autofocus: Whether the component should take the focus once the page is loaded
  640. custom_attrs: custom attribute
  641. **props: The properties of the component.
  642. Returns:
  643. The Accordion trigger Component.
  644. """
  645. ...
  646. def add_style(self) -> dict[str, Any] | None: ...
  647. class AccordionIcon(Icon):
  648. @overload
  649. @classmethod
  650. def create( # type: ignore
  651. cls,
  652. *children,
  653. size: Optional[Union[Var[int], int]] = None,
  654. style: Optional[Style] = None,
  655. key: Optional[Any] = None,
  656. id: Optional[Any] = None,
  657. class_name: Optional[Any] = None,
  658. autofocus: Optional[bool] = None,
  659. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  660. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  661. on_click: Optional[EventType[[], BASE_STATE]] = None,
  662. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  663. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  664. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  665. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  666. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  667. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  668. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  669. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  670. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  671. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  672. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  673. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  674. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  675. **props,
  676. ) -> "AccordionIcon":
  677. """Create the Accordion icon component.
  678. Args:
  679. *children: The children of the component.
  680. size: The size of the icon in pixels.
  681. style: The style of the component.
  682. key: A unique key for the component.
  683. id: The id for the component.
  684. class_name: The class name for the component.
  685. autofocus: Whether the component should take the focus once the page is loaded
  686. custom_attrs: custom attribute
  687. **props: The properties of the component.
  688. Returns:
  689. The Accordion icon Component.
  690. """
  691. ...
  692. class AccordionContent(AccordionComponent):
  693. def add_imports(self) -> dict: ...
  694. @overload
  695. @classmethod
  696. def create( # type: ignore
  697. cls,
  698. *children,
  699. color_scheme: Optional[
  700. Union[
  701. Literal[
  702. "amber",
  703. "blue",
  704. "bronze",
  705. "brown",
  706. "crimson",
  707. "cyan",
  708. "gold",
  709. "grass",
  710. "gray",
  711. "green",
  712. "indigo",
  713. "iris",
  714. "jade",
  715. "lime",
  716. "mint",
  717. "orange",
  718. "pink",
  719. "plum",
  720. "purple",
  721. "red",
  722. "ruby",
  723. "sky",
  724. "teal",
  725. "tomato",
  726. "violet",
  727. "yellow",
  728. ],
  729. Var[
  730. Literal[
  731. "amber",
  732. "blue",
  733. "bronze",
  734. "brown",
  735. "crimson",
  736. "cyan",
  737. "gold",
  738. "grass",
  739. "gray",
  740. "green",
  741. "indigo",
  742. "iris",
  743. "jade",
  744. "lime",
  745. "mint",
  746. "orange",
  747. "pink",
  748. "plum",
  749. "purple",
  750. "red",
  751. "ruby",
  752. "sky",
  753. "teal",
  754. "tomato",
  755. "violet",
  756. "yellow",
  757. ]
  758. ],
  759. ]
  760. ] = None,
  761. variant: Optional[
  762. Union[
  763. Literal["classic", "ghost", "outline", "soft", "surface"],
  764. Var[Literal["classic", "ghost", "outline", "soft", "surface"]],
  765. ]
  766. ] = None,
  767. as_child: Optional[Union[Var[bool], bool]] = None,
  768. style: Optional[Style] = None,
  769. key: Optional[Any] = None,
  770. id: Optional[Any] = None,
  771. class_name: Optional[Any] = None,
  772. autofocus: Optional[bool] = None,
  773. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  774. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  775. on_click: Optional[EventType[[], BASE_STATE]] = None,
  776. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  777. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  778. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  779. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  780. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  781. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  782. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  783. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  784. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  785. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  786. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  787. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  788. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  789. **props,
  790. ) -> "AccordionContent":
  791. """Create the Accordion content component.
  792. Args:
  793. *children: The children of the component.
  794. color_scheme: The color scheme of the component.
  795. variant: The variant of the component.
  796. as_child: Change the default rendered element for the one passed as a child.
  797. style: The style of the component.
  798. key: A unique key for the component.
  799. id: The id for the component.
  800. class_name: The class name for the component.
  801. autofocus: Whether the component should take the focus once the page is loaded
  802. custom_attrs: custom attribute
  803. **props: The properties of the component.
  804. Returns:
  805. The Accordion content Component.
  806. """
  807. ...
  808. def add_custom_code(self) -> list[str]: ...
  809. def add_style(self) -> dict[str, Any] | None: ...
  810. class Accordion(ComponentNamespace):
  811. content = staticmethod(AccordionContent.create)
  812. header = staticmethod(AccordionHeader.create)
  813. item = staticmethod(AccordionItem.create)
  814. icon = staticmethod(AccordionIcon.create)
  815. root = staticmethod(AccordionRoot.create)
  816. trigger = staticmethod(AccordionTrigger.create)
  817. accordion = Accordion()