accordion.pyi 26 KB

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