accordion.pyi 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709
  1. """Stub file for reflex/components/radix/primitives/accordion.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 typing import Any, Dict, List, Literal, Optional, Union
  10. from reflex.components.component import Component, ComponentNamespace
  11. from reflex.components.core.match import Match
  12. from reflex.components.lucide.icon import Icon
  13. from reflex.components.radix.primitives.base import RadixPrimitiveComponent
  14. from reflex.components.radix.themes.base import LiteralAccentColor
  15. from reflex.style import (
  16. Style,
  17. convert_dict_to_style_and_format_emotion,
  18. format_as_emotion,
  19. )
  20. from reflex.utils import imports
  21. from reflex.vars import BaseVar, Var, VarData, get_uuid_string_var
  22. LiteralAccordionType = Literal["single", "multiple"]
  23. LiteralAccordionDir = Literal["ltr", "rtl"]
  24. LiteralAccordionOrientation = Literal["vertical", "horizontal"]
  25. LiteralAccordionRootVariant = Literal["classic", "soft", "surface", "outline", "ghost"]
  26. LiteralAccordionRootColorScheme = Literal["primary", "accent"]
  27. DEFAULT_ANIMATION_DURATION = 250
  28. def get_theme_accordion_root(variant: Var[str], color_scheme: Var[str]) -> BaseVar: ...
  29. def get_theme_accordion_item(): ...
  30. def get_theme_accordion_header() -> dict[str, str]: ...
  31. def get_theme_accordion_trigger(
  32. variant: str | Var, color_scheme: str | Var
  33. ) -> BaseVar: ...
  34. def get_theme_accordion_content(
  35. variant: str | Var, color_scheme: str | Var
  36. ) -> BaseVar: ...
  37. class AccordionComponent(RadixPrimitiveComponent):
  38. @overload
  39. @classmethod
  40. def create( # type: ignore
  41. cls,
  42. *children,
  43. as_child: Optional[Union[Var[bool], bool]] = None,
  44. style: Optional[Style] = None,
  45. key: Optional[Any] = None,
  46. id: Optional[Any] = None,
  47. class_name: Optional[Any] = None,
  48. autofocus: Optional[bool] = None,
  49. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  50. on_blur: Optional[
  51. Union[EventHandler, EventSpec, list, function, BaseVar]
  52. ] = None,
  53. on_click: Optional[
  54. Union[EventHandler, EventSpec, list, function, BaseVar]
  55. ] = None,
  56. on_context_menu: Optional[
  57. Union[EventHandler, EventSpec, list, function, BaseVar]
  58. ] = None,
  59. on_double_click: Optional[
  60. Union[EventHandler, EventSpec, list, function, BaseVar]
  61. ] = None,
  62. on_focus: Optional[
  63. Union[EventHandler, EventSpec, list, function, BaseVar]
  64. ] = None,
  65. on_mount: Optional[
  66. Union[EventHandler, EventSpec, list, function, BaseVar]
  67. ] = None,
  68. on_mouse_down: Optional[
  69. Union[EventHandler, EventSpec, list, function, BaseVar]
  70. ] = None,
  71. on_mouse_enter: Optional[
  72. Union[EventHandler, EventSpec, list, function, BaseVar]
  73. ] = None,
  74. on_mouse_leave: Optional[
  75. Union[EventHandler, EventSpec, list, function, BaseVar]
  76. ] = None,
  77. on_mouse_move: Optional[
  78. Union[EventHandler, EventSpec, list, function, BaseVar]
  79. ] = None,
  80. on_mouse_out: Optional[
  81. Union[EventHandler, EventSpec, list, function, BaseVar]
  82. ] = None,
  83. on_mouse_over: Optional[
  84. Union[EventHandler, EventSpec, list, function, BaseVar]
  85. ] = None,
  86. on_mouse_up: Optional[
  87. Union[EventHandler, EventSpec, list, function, BaseVar]
  88. ] = None,
  89. on_scroll: Optional[
  90. Union[EventHandler, EventSpec, list, function, BaseVar]
  91. ] = None,
  92. on_unmount: Optional[
  93. Union[EventHandler, EventSpec, list, function, BaseVar]
  94. ] = None,
  95. **props
  96. ) -> "AccordionComponent":
  97. """Create the component.
  98. Args:
  99. *children: The children of the component.
  100. as_child: Change the default rendered element for the one passed as a child.
  101. style: The style of the component.
  102. key: A unique key for the component.
  103. id: The id for the component.
  104. class_name: The class name for the component.
  105. autofocus: Whether the component should take the focus once the page is loaded
  106. custom_attrs: custom attribute
  107. **props: The props of the component.
  108. Returns:
  109. The component.
  110. Raises:
  111. TypeError: If an invalid child is passed.
  112. """
  113. ...
  114. class AccordionRoot(AccordionComponent):
  115. @overload
  116. @classmethod
  117. def create( # type: ignore
  118. cls,
  119. *children,
  120. type: Optional[
  121. Union[Var[Literal["single", "multiple"]], Literal["single", "multiple"]]
  122. ] = None,
  123. value: Optional[
  124. Union[Var[Union[str, List[str]]], Union[str, List[str]]]
  125. ] = None,
  126. default_value: Optional[
  127. Union[Var[Union[str, List[str]]], Union[str, List[str]]]
  128. ] = None,
  129. collapsible: Optional[Union[Var[bool], bool]] = None,
  130. disabled: Optional[Union[Var[bool], bool]] = None,
  131. dir: Optional[Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]] = None,
  132. orientation: Optional[
  133. Union[
  134. Var[Literal["vertical", "horizontal"]],
  135. Literal["vertical", "horizontal"],
  136. ]
  137. ] = None,
  138. variant: Optional[
  139. Union[
  140. Var[Literal["classic", "soft", "surface", "outline", "ghost"]],
  141. Literal["classic", "soft", "surface", "outline", "ghost"],
  142. ]
  143. ] = None,
  144. color_scheme: Optional[
  145. Union[
  146. Var[
  147. Literal[
  148. "tomato",
  149. "red",
  150. "ruby",
  151. "crimson",
  152. "pink",
  153. "plum",
  154. "purple",
  155. "violet",
  156. "iris",
  157. "indigo",
  158. "blue",
  159. "cyan",
  160. "teal",
  161. "jade",
  162. "green",
  163. "grass",
  164. "brown",
  165. "orange",
  166. "sky",
  167. "mint",
  168. "lime",
  169. "yellow",
  170. "amber",
  171. "gold",
  172. "bronze",
  173. "gray",
  174. ]
  175. ],
  176. Literal[
  177. "tomato",
  178. "red",
  179. "ruby",
  180. "crimson",
  181. "pink",
  182. "plum",
  183. "purple",
  184. "violet",
  185. "iris",
  186. "indigo",
  187. "blue",
  188. "cyan",
  189. "teal",
  190. "jade",
  191. "green",
  192. "grass",
  193. "brown",
  194. "orange",
  195. "sky",
  196. "mint",
  197. "lime",
  198. "yellow",
  199. "amber",
  200. "gold",
  201. "bronze",
  202. "gray",
  203. ],
  204. ]
  205. ] = None,
  206. _dynamic_themes: Optional[Union[Var[dict], dict]] = None,
  207. _var_data: Optional[VarData] = None,
  208. as_child: Optional[Union[Var[bool], bool]] = None,
  209. style: Optional[Style] = None,
  210. key: Optional[Any] = None,
  211. id: Optional[Any] = None,
  212. class_name: Optional[Any] = None,
  213. autofocus: Optional[bool] = None,
  214. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  215. on_blur: Optional[
  216. Union[EventHandler, EventSpec, list, function, BaseVar]
  217. ] = None,
  218. on_click: Optional[
  219. Union[EventHandler, EventSpec, list, function, BaseVar]
  220. ] = None,
  221. on_context_menu: Optional[
  222. Union[EventHandler, EventSpec, list, function, BaseVar]
  223. ] = None,
  224. on_double_click: Optional[
  225. Union[EventHandler, EventSpec, list, function, BaseVar]
  226. ] = None,
  227. on_focus: Optional[
  228. Union[EventHandler, EventSpec, list, function, BaseVar]
  229. ] = None,
  230. on_mount: Optional[
  231. Union[EventHandler, EventSpec, list, function, BaseVar]
  232. ] = None,
  233. on_mouse_down: Optional[
  234. Union[EventHandler, EventSpec, list, function, BaseVar]
  235. ] = None,
  236. on_mouse_enter: Optional[
  237. Union[EventHandler, EventSpec, list, function, BaseVar]
  238. ] = None,
  239. on_mouse_leave: Optional[
  240. Union[EventHandler, EventSpec, list, function, BaseVar]
  241. ] = None,
  242. on_mouse_move: Optional[
  243. Union[EventHandler, EventSpec, list, function, BaseVar]
  244. ] = None,
  245. on_mouse_out: Optional[
  246. Union[EventHandler, EventSpec, list, function, BaseVar]
  247. ] = None,
  248. on_mouse_over: Optional[
  249. Union[EventHandler, EventSpec, list, function, BaseVar]
  250. ] = None,
  251. on_mouse_up: Optional[
  252. Union[EventHandler, EventSpec, list, function, BaseVar]
  253. ] = None,
  254. on_scroll: Optional[
  255. Union[EventHandler, EventSpec, list, function, BaseVar]
  256. ] = None,
  257. on_unmount: Optional[
  258. Union[EventHandler, EventSpec, list, function, BaseVar]
  259. ] = None,
  260. on_value_change: Optional[
  261. Union[EventHandler, EventSpec, list, function, BaseVar]
  262. ] = None,
  263. **props
  264. ) -> "AccordionRoot":
  265. """Create the Accordion root component.
  266. Args:
  267. *children: The children of the component.
  268. type: The type of accordion (single or multiple).
  269. value: The value of the item to expand.
  270. default_value: The default value of the item to expand.
  271. collapsible: Whether or not the accordion is collapsible.
  272. disabled: Whether or not the accordion is disabled.
  273. dir: The reading direction of the accordion when applicable.
  274. orientation: The orientation of the accordion.
  275. variant: The variant of the accordion.
  276. color_scheme: The color scheme of the accordion.
  277. _dynamic_themes: dynamic themes of the accordion generated at compile time.
  278. _var_data: The var_data associated with 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 properties of the component.
  287. Returns:
  288. The Accordion root Component.
  289. """
  290. ...
  291. def get_event_triggers(self) -> Dict[str, Any]: ...
  292. class AccordionItem(AccordionComponent):
  293. @overload
  294. @classmethod
  295. def create( # type: ignore
  296. cls,
  297. *children,
  298. header: Optional[Component | Var] = None,
  299. content: Optional[Component | Var] = None,
  300. value: Optional[Union[Var[str], str]] = None,
  301. disabled: Optional[Union[Var[bool], bool]] = None,
  302. as_child: Optional[Union[Var[bool], bool]] = None,
  303. style: Optional[Style] = None,
  304. key: Optional[Any] = None,
  305. id: Optional[Any] = None,
  306. class_name: Optional[Any] = None,
  307. autofocus: Optional[bool] = None,
  308. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  309. on_blur: Optional[
  310. Union[EventHandler, EventSpec, list, function, BaseVar]
  311. ] = None,
  312. on_click: Optional[
  313. Union[EventHandler, EventSpec, list, function, BaseVar]
  314. ] = None,
  315. on_context_menu: Optional[
  316. Union[EventHandler, EventSpec, list, function, BaseVar]
  317. ] = None,
  318. on_double_click: Optional[
  319. Union[EventHandler, EventSpec, list, function, BaseVar]
  320. ] = None,
  321. on_focus: Optional[
  322. Union[EventHandler, EventSpec, list, function, BaseVar]
  323. ] = None,
  324. on_mount: Optional[
  325. Union[EventHandler, EventSpec, list, function, BaseVar]
  326. ] = None,
  327. on_mouse_down: Optional[
  328. Union[EventHandler, EventSpec, list, function, BaseVar]
  329. ] = None,
  330. on_mouse_enter: Optional[
  331. Union[EventHandler, EventSpec, list, function, BaseVar]
  332. ] = None,
  333. on_mouse_leave: Optional[
  334. Union[EventHandler, EventSpec, list, function, BaseVar]
  335. ] = None,
  336. on_mouse_move: Optional[
  337. Union[EventHandler, EventSpec, list, function, BaseVar]
  338. ] = None,
  339. on_mouse_out: Optional[
  340. Union[EventHandler, EventSpec, list, function, BaseVar]
  341. ] = None,
  342. on_mouse_over: Optional[
  343. Union[EventHandler, EventSpec, list, function, BaseVar]
  344. ] = None,
  345. on_mouse_up: Optional[
  346. Union[EventHandler, EventSpec, list, function, BaseVar]
  347. ] = None,
  348. on_scroll: Optional[
  349. Union[EventHandler, EventSpec, list, function, BaseVar]
  350. ] = None,
  351. on_unmount: Optional[
  352. Union[EventHandler, EventSpec, list, function, BaseVar]
  353. ] = None,
  354. **props
  355. ) -> "AccordionItem":
  356. """Create an accordion item.
  357. Args:
  358. header: The header of the accordion item.
  359. content: The content of the accordion item.
  360. *children: The list of children to use if header and content are not provided.
  361. value: A unique identifier for the item.
  362. disabled: When true, prevents the user from interacting with the item.
  363. as_child: Change the default rendered element for the one passed as a child.
  364. style: The style of the component.
  365. key: A unique key for the component.
  366. id: The id for the component.
  367. class_name: The class name for the component.
  368. autofocus: Whether the component should take the focus once the page is loaded
  369. custom_attrs: custom attribute
  370. **props: Additional properties to apply to the accordion item.
  371. Returns:
  372. The accordion item.
  373. """
  374. ...
  375. class AccordionHeader(AccordionComponent):
  376. @overload
  377. @classmethod
  378. def create( # type: ignore
  379. cls,
  380. *children,
  381. as_child: Optional[Union[Var[bool], bool]] = None,
  382. style: Optional[Style] = None,
  383. key: Optional[Any] = None,
  384. id: Optional[Any] = None,
  385. class_name: Optional[Any] = None,
  386. autofocus: Optional[bool] = None,
  387. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  388. on_blur: Optional[
  389. Union[EventHandler, EventSpec, list, function, BaseVar]
  390. ] = None,
  391. on_click: Optional[
  392. Union[EventHandler, EventSpec, list, function, BaseVar]
  393. ] = None,
  394. on_context_menu: Optional[
  395. Union[EventHandler, EventSpec, list, function, BaseVar]
  396. ] = None,
  397. on_double_click: Optional[
  398. Union[EventHandler, EventSpec, list, function, BaseVar]
  399. ] = None,
  400. on_focus: Optional[
  401. Union[EventHandler, EventSpec, list, function, BaseVar]
  402. ] = None,
  403. on_mount: Optional[
  404. Union[EventHandler, EventSpec, list, function, BaseVar]
  405. ] = None,
  406. on_mouse_down: Optional[
  407. Union[EventHandler, EventSpec, list, function, BaseVar]
  408. ] = None,
  409. on_mouse_enter: Optional[
  410. Union[EventHandler, EventSpec, list, function, BaseVar]
  411. ] = None,
  412. on_mouse_leave: Optional[
  413. Union[EventHandler, EventSpec, list, function, BaseVar]
  414. ] = None,
  415. on_mouse_move: Optional[
  416. Union[EventHandler, EventSpec, list, function, BaseVar]
  417. ] = None,
  418. on_mouse_out: Optional[
  419. Union[EventHandler, EventSpec, list, function, BaseVar]
  420. ] = None,
  421. on_mouse_over: Optional[
  422. Union[EventHandler, EventSpec, list, function, BaseVar]
  423. ] = None,
  424. on_mouse_up: Optional[
  425. Union[EventHandler, EventSpec, list, function, BaseVar]
  426. ] = None,
  427. on_scroll: Optional[
  428. Union[EventHandler, EventSpec, list, function, BaseVar]
  429. ] = None,
  430. on_unmount: Optional[
  431. Union[EventHandler, EventSpec, list, function, BaseVar]
  432. ] = None,
  433. **props
  434. ) -> "AccordionHeader":
  435. """Create the Accordion header component.
  436. Args:
  437. *children: The children of the component.
  438. as_child: Change the default rendered element for the one passed as a child.
  439. style: The style of the component.
  440. key: A unique key for the component.
  441. id: The id for the component.
  442. class_name: The class name for the component.
  443. autofocus: Whether the component should take the focus once the page is loaded
  444. custom_attrs: custom attribute
  445. **props: The properties of the component.
  446. Returns:
  447. The Accordion header Component.
  448. """
  449. ...
  450. class AccordionTrigger(AccordionComponent):
  451. @overload
  452. @classmethod
  453. def create( # type: ignore
  454. cls,
  455. *children,
  456. as_child: Optional[Union[Var[bool], bool]] = None,
  457. style: Optional[Style] = None,
  458. key: Optional[Any] = None,
  459. id: Optional[Any] = None,
  460. class_name: Optional[Any] = None,
  461. autofocus: Optional[bool] = None,
  462. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  463. on_blur: Optional[
  464. Union[EventHandler, EventSpec, list, function, BaseVar]
  465. ] = None,
  466. on_click: Optional[
  467. Union[EventHandler, EventSpec, list, function, BaseVar]
  468. ] = None,
  469. on_context_menu: Optional[
  470. Union[EventHandler, EventSpec, list, function, BaseVar]
  471. ] = None,
  472. on_double_click: Optional[
  473. Union[EventHandler, EventSpec, list, function, BaseVar]
  474. ] = None,
  475. on_focus: Optional[
  476. Union[EventHandler, EventSpec, list, function, BaseVar]
  477. ] = None,
  478. on_mount: Optional[
  479. Union[EventHandler, EventSpec, list, function, BaseVar]
  480. ] = None,
  481. on_mouse_down: Optional[
  482. Union[EventHandler, EventSpec, list, function, BaseVar]
  483. ] = None,
  484. on_mouse_enter: Optional[
  485. Union[EventHandler, EventSpec, list, function, BaseVar]
  486. ] = None,
  487. on_mouse_leave: Optional[
  488. Union[EventHandler, EventSpec, list, function, BaseVar]
  489. ] = None,
  490. on_mouse_move: Optional[
  491. Union[EventHandler, EventSpec, list, function, BaseVar]
  492. ] = None,
  493. on_mouse_out: Optional[
  494. Union[EventHandler, EventSpec, list, function, BaseVar]
  495. ] = None,
  496. on_mouse_over: Optional[
  497. Union[EventHandler, EventSpec, list, function, BaseVar]
  498. ] = None,
  499. on_mouse_up: Optional[
  500. Union[EventHandler, EventSpec, list, function, BaseVar]
  501. ] = None,
  502. on_scroll: Optional[
  503. Union[EventHandler, EventSpec, list, function, BaseVar]
  504. ] = None,
  505. on_unmount: Optional[
  506. Union[EventHandler, EventSpec, list, function, BaseVar]
  507. ] = None,
  508. **props
  509. ) -> "AccordionTrigger":
  510. """Create the Accordion trigger component.
  511. Args:
  512. *children: The children of the component.
  513. as_child: Change the default rendered element for the one passed as a child.
  514. style: The style of the component.
  515. key: A unique key for the component.
  516. id: The id for the component.
  517. class_name: The class name for the component.
  518. autofocus: Whether the component should take the focus once the page is loaded
  519. custom_attrs: custom attribute
  520. **props: The properties of the component.
  521. Returns:
  522. The Accordion trigger Component.
  523. """
  524. ...
  525. class AccordionIcon(Icon):
  526. @overload
  527. @classmethod
  528. def create( # type: ignore
  529. cls,
  530. *children,
  531. size: Optional[Union[Var[int], int]] = None,
  532. style: Optional[Style] = None,
  533. key: Optional[Any] = None,
  534. id: Optional[Any] = None,
  535. class_name: Optional[Any] = None,
  536. autofocus: Optional[bool] = None,
  537. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  538. on_blur: Optional[
  539. Union[EventHandler, EventSpec, list, function, BaseVar]
  540. ] = None,
  541. on_click: Optional[
  542. Union[EventHandler, EventSpec, list, function, BaseVar]
  543. ] = None,
  544. on_context_menu: Optional[
  545. Union[EventHandler, EventSpec, list, function, BaseVar]
  546. ] = None,
  547. on_double_click: Optional[
  548. Union[EventHandler, EventSpec, list, function, BaseVar]
  549. ] = None,
  550. on_focus: Optional[
  551. Union[EventHandler, EventSpec, list, function, BaseVar]
  552. ] = None,
  553. on_mount: Optional[
  554. Union[EventHandler, EventSpec, list, function, BaseVar]
  555. ] = None,
  556. on_mouse_down: Optional[
  557. Union[EventHandler, EventSpec, list, function, BaseVar]
  558. ] = None,
  559. on_mouse_enter: Optional[
  560. Union[EventHandler, EventSpec, list, function, BaseVar]
  561. ] = None,
  562. on_mouse_leave: Optional[
  563. Union[EventHandler, EventSpec, list, function, BaseVar]
  564. ] = None,
  565. on_mouse_move: Optional[
  566. Union[EventHandler, EventSpec, list, function, BaseVar]
  567. ] = None,
  568. on_mouse_out: Optional[
  569. Union[EventHandler, EventSpec, list, function, BaseVar]
  570. ] = None,
  571. on_mouse_over: Optional[
  572. Union[EventHandler, EventSpec, list, function, BaseVar]
  573. ] = None,
  574. on_mouse_up: Optional[
  575. Union[EventHandler, EventSpec, list, function, BaseVar]
  576. ] = None,
  577. on_scroll: Optional[
  578. Union[EventHandler, EventSpec, list, function, BaseVar]
  579. ] = None,
  580. on_unmount: Optional[
  581. Union[EventHandler, EventSpec, list, function, BaseVar]
  582. ] = None,
  583. **props
  584. ) -> "AccordionIcon":
  585. """Create the Accordion icon component.
  586. Args:
  587. *children: The children of the component.
  588. size: The size of the icon in pixels.
  589. style: The style of the component.
  590. key: A unique key for the component.
  591. id: The id for the component.
  592. class_name: The class name for the component.
  593. autofocus: Whether the component should take the focus once the page is loaded
  594. custom_attrs: custom attribute
  595. **props: The properties of the component.
  596. Returns:
  597. The Accordion icon Component.
  598. """
  599. ...
  600. class AccordionContent(AccordionComponent):
  601. @overload
  602. @classmethod
  603. def create( # type: ignore
  604. cls,
  605. *children,
  606. as_child: Optional[Union[Var[bool], bool]] = None,
  607. style: Optional[Style] = None,
  608. key: Optional[Any] = None,
  609. id: Optional[Any] = None,
  610. class_name: Optional[Any] = None,
  611. autofocus: Optional[bool] = None,
  612. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  613. on_blur: Optional[
  614. Union[EventHandler, EventSpec, list, function, BaseVar]
  615. ] = None,
  616. on_click: Optional[
  617. Union[EventHandler, EventSpec, list, function, BaseVar]
  618. ] = None,
  619. on_context_menu: Optional[
  620. Union[EventHandler, EventSpec, list, function, BaseVar]
  621. ] = None,
  622. on_double_click: Optional[
  623. Union[EventHandler, EventSpec, list, function, BaseVar]
  624. ] = None,
  625. on_focus: Optional[
  626. Union[EventHandler, EventSpec, list, function, BaseVar]
  627. ] = None,
  628. on_mount: Optional[
  629. Union[EventHandler, EventSpec, list, function, BaseVar]
  630. ] = None,
  631. on_mouse_down: Optional[
  632. Union[EventHandler, EventSpec, list, function, BaseVar]
  633. ] = None,
  634. on_mouse_enter: Optional[
  635. Union[EventHandler, EventSpec, list, function, BaseVar]
  636. ] = None,
  637. on_mouse_leave: Optional[
  638. Union[EventHandler, EventSpec, list, function, BaseVar]
  639. ] = None,
  640. on_mouse_move: Optional[
  641. Union[EventHandler, EventSpec, list, function, BaseVar]
  642. ] = None,
  643. on_mouse_out: Optional[
  644. Union[EventHandler, EventSpec, list, function, BaseVar]
  645. ] = None,
  646. on_mouse_over: Optional[
  647. Union[EventHandler, EventSpec, list, function, BaseVar]
  648. ] = None,
  649. on_mouse_up: Optional[
  650. Union[EventHandler, EventSpec, list, function, BaseVar]
  651. ] = None,
  652. on_scroll: Optional[
  653. Union[EventHandler, EventSpec, list, function, BaseVar]
  654. ] = None,
  655. on_unmount: Optional[
  656. Union[EventHandler, EventSpec, list, function, BaseVar]
  657. ] = None,
  658. **props
  659. ) -> "AccordionContent":
  660. """Create the Accordion content component.
  661. Args:
  662. *children: The children of the component.
  663. as_child: Change the default rendered element for the one passed as a child.
  664. style: The style of the component.
  665. key: A unique key for the component.
  666. id: The id for the component.
  667. class_name: The class name for the component.
  668. autofocus: Whether the component should take the focus once the page is loaded
  669. custom_attrs: custom attribute
  670. **props: The properties of the component.
  671. Returns:
  672. The Accordion content Component.
  673. """
  674. ...
  675. class Accordion(ComponentNamespace):
  676. content = staticmethod(AccordionContent.create)
  677. header = staticmethod(AccordionHeader.create)
  678. item = staticmethod(AccordionItem.create)
  679. icon = staticmethod(AccordionIcon.create)
  680. root = staticmethod(AccordionRoot.create)
  681. trigger = staticmethod(AccordionTrigger.create)
  682. accordion = Accordion()