accordion.pyi 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  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
  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
  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[Union[Var[str], str]] = None,
  125. default_value: Optional[Union[Var[str], str]] = None,
  126. collapsible: Optional[Union[Var[bool], bool]] = None,
  127. disabled: Optional[Union[Var[bool], bool]] = None,
  128. dir: Optional[Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]] = None,
  129. orientation: Optional[
  130. Union[
  131. Var[Literal["vertical", "horizontal"]],
  132. Literal["vertical", "horizontal"],
  133. ]
  134. ] = None,
  135. variant: Optional[
  136. Union[
  137. Var[Literal["classic", "soft", "surface", "outline", "ghost"]],
  138. Literal["classic", "soft", "surface", "outline", "ghost"],
  139. ]
  140. ] = None,
  141. color_scheme: Optional[
  142. Union[
  143. Var[
  144. Literal[
  145. "tomato",
  146. "red",
  147. "ruby",
  148. "crimson",
  149. "pink",
  150. "plum",
  151. "purple",
  152. "violet",
  153. "iris",
  154. "indigo",
  155. "blue",
  156. "cyan",
  157. "teal",
  158. "jade",
  159. "green",
  160. "grass",
  161. "brown",
  162. "orange",
  163. "sky",
  164. "mint",
  165. "lime",
  166. "yellow",
  167. "amber",
  168. "gold",
  169. "bronze",
  170. "gray",
  171. ]
  172. ],
  173. Literal[
  174. "tomato",
  175. "red",
  176. "ruby",
  177. "crimson",
  178. "pink",
  179. "plum",
  180. "purple",
  181. "violet",
  182. "iris",
  183. "indigo",
  184. "blue",
  185. "cyan",
  186. "teal",
  187. "jade",
  188. "green",
  189. "grass",
  190. "brown",
  191. "orange",
  192. "sky",
  193. "mint",
  194. "lime",
  195. "yellow",
  196. "amber",
  197. "gold",
  198. "bronze",
  199. "gray",
  200. ],
  201. ]
  202. ] = None,
  203. _dynamic_themes: Optional[Union[Var[dict], dict]] = None,
  204. _var_data: Optional[VarData] = None,
  205. as_child: Optional[Union[Var[bool], bool]] = None,
  206. style: Optional[Style] = None,
  207. key: Optional[Any] = None,
  208. id: Optional[Any] = None,
  209. class_name: Optional[Any] = None,
  210. autofocus: Optional[bool] = None,
  211. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  212. on_blur: Optional[
  213. Union[EventHandler, EventSpec, list, function, BaseVar]
  214. ] = None,
  215. on_click: Optional[
  216. Union[EventHandler, EventSpec, list, function, BaseVar]
  217. ] = None,
  218. on_context_menu: Optional[
  219. Union[EventHandler, EventSpec, list, function, BaseVar]
  220. ] = None,
  221. on_double_click: Optional[
  222. Union[EventHandler, EventSpec, list, function, BaseVar]
  223. ] = None,
  224. on_focus: Optional[
  225. Union[EventHandler, EventSpec, list, function, BaseVar]
  226. ] = None,
  227. on_mount: Optional[
  228. Union[EventHandler, EventSpec, list, function, BaseVar]
  229. ] = None,
  230. on_mouse_down: Optional[
  231. Union[EventHandler, EventSpec, list, function, BaseVar]
  232. ] = None,
  233. on_mouse_enter: Optional[
  234. Union[EventHandler, EventSpec, list, function, BaseVar]
  235. ] = None,
  236. on_mouse_leave: Optional[
  237. Union[EventHandler, EventSpec, list, function, BaseVar]
  238. ] = None,
  239. on_mouse_move: Optional[
  240. Union[EventHandler, EventSpec, list, function, BaseVar]
  241. ] = None,
  242. on_mouse_out: Optional[
  243. Union[EventHandler, EventSpec, list, function, BaseVar]
  244. ] = None,
  245. on_mouse_over: Optional[
  246. Union[EventHandler, EventSpec, list, function, BaseVar]
  247. ] = None,
  248. on_mouse_up: Optional[
  249. Union[EventHandler, EventSpec, list, function, BaseVar]
  250. ] = None,
  251. on_scroll: Optional[
  252. Union[EventHandler, EventSpec, list, function, BaseVar]
  253. ] = None,
  254. on_unmount: Optional[
  255. Union[EventHandler, EventSpec, list, function, BaseVar]
  256. ] = None,
  257. on_value_change: Optional[
  258. Union[EventHandler, EventSpec, list, function, BaseVar]
  259. ] = None,
  260. **props
  261. ) -> "AccordionRoot":
  262. """Create the Accordion root 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. variant: The variant of the accordion.
  273. color_scheme: The color scheme of the accordion.
  274. _dynamic_themes: dynamic themes of the accordion generated at compile time.
  275. _var_data: The var_data associated with the component.
  276. as_child: Change the default rendered element for the one passed as a child.
  277. style: The style of the component.
  278. key: A unique key for the component.
  279. id: The id for the component.
  280. class_name: The class name for the component.
  281. autofocus: Whether the component should take the focus once the page is loaded
  282. custom_attrs: custom attribute
  283. **props: The properties of the component.
  284. Returns:
  285. The Accordion root Component.
  286. """
  287. ...
  288. def get_event_triggers(self) -> Dict[str, Any]: ...
  289. class AccordionItem(AccordionComponent):
  290. @overload
  291. @classmethod
  292. def create( # type: ignore
  293. cls,
  294. *children,
  295. header: Optional[Component | Var] = None,
  296. content: Optional[Component | Var] = None,
  297. value: Optional[Union[Var[str], str]] = None,
  298. disabled: Optional[Union[Var[bool], bool]] = None,
  299. as_child: Optional[Union[Var[bool], bool]] = None,
  300. style: Optional[Style] = None,
  301. key: Optional[Any] = None,
  302. id: Optional[Any] = None,
  303. class_name: Optional[Any] = None,
  304. autofocus: Optional[bool] = None,
  305. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  306. on_blur: Optional[
  307. Union[EventHandler, EventSpec, list, function, BaseVar]
  308. ] = None,
  309. on_click: Optional[
  310. Union[EventHandler, EventSpec, list, function, BaseVar]
  311. ] = None,
  312. on_context_menu: Optional[
  313. Union[EventHandler, EventSpec, list, function, BaseVar]
  314. ] = None,
  315. on_double_click: Optional[
  316. Union[EventHandler, EventSpec, list, function, BaseVar]
  317. ] = None,
  318. on_focus: Optional[
  319. Union[EventHandler, EventSpec, list, function, BaseVar]
  320. ] = None,
  321. on_mount: Optional[
  322. Union[EventHandler, EventSpec, list, function, BaseVar]
  323. ] = None,
  324. on_mouse_down: Optional[
  325. Union[EventHandler, EventSpec, list, function, BaseVar]
  326. ] = None,
  327. on_mouse_enter: Optional[
  328. Union[EventHandler, EventSpec, list, function, BaseVar]
  329. ] = None,
  330. on_mouse_leave: Optional[
  331. Union[EventHandler, EventSpec, list, function, BaseVar]
  332. ] = None,
  333. on_mouse_move: Optional[
  334. Union[EventHandler, EventSpec, list, function, BaseVar]
  335. ] = None,
  336. on_mouse_out: Optional[
  337. Union[EventHandler, EventSpec, list, function, BaseVar]
  338. ] = None,
  339. on_mouse_over: Optional[
  340. Union[EventHandler, EventSpec, list, function, BaseVar]
  341. ] = None,
  342. on_mouse_up: Optional[
  343. Union[EventHandler, EventSpec, list, function, BaseVar]
  344. ] = None,
  345. on_scroll: Optional[
  346. Union[EventHandler, EventSpec, list, function, BaseVar]
  347. ] = None,
  348. on_unmount: Optional[
  349. Union[EventHandler, EventSpec, list, function, BaseVar]
  350. ] = None,
  351. **props
  352. ) -> "AccordionItem":
  353. """Create an accordion item.
  354. Args:
  355. header: The header of the accordion item.
  356. content: The content of the accordion item.
  357. *children: The list of children to use if header and content are not provided.
  358. value: A unique identifier for the item.
  359. disabled: When true, prevents the user from interacting with the item.
  360. as_child: Change the default rendered element for the one passed as a child.
  361. style: The style of the component.
  362. key: A unique key for the component.
  363. id: The id for the component.
  364. class_name: The class name for the component.
  365. autofocus: Whether the component should take the focus once the page is loaded
  366. custom_attrs: custom attribute
  367. **props: Additional properties to apply to the accordion item.
  368. Returns:
  369. The accordion item.
  370. """
  371. ...
  372. class AccordionHeader(AccordionComponent):
  373. @overload
  374. @classmethod
  375. def create( # type: ignore
  376. cls,
  377. *children,
  378. as_child: Optional[Union[Var[bool], bool]] = None,
  379. style: Optional[Style] = None,
  380. key: Optional[Any] = None,
  381. id: Optional[Any] = None,
  382. class_name: Optional[Any] = None,
  383. autofocus: Optional[bool] = None,
  384. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  385. on_blur: Optional[
  386. Union[EventHandler, EventSpec, list, function, BaseVar]
  387. ] = None,
  388. on_click: Optional[
  389. Union[EventHandler, EventSpec, list, function, BaseVar]
  390. ] = None,
  391. on_context_menu: Optional[
  392. Union[EventHandler, EventSpec, list, function, BaseVar]
  393. ] = None,
  394. on_double_click: Optional[
  395. Union[EventHandler, EventSpec, list, function, BaseVar]
  396. ] = None,
  397. on_focus: Optional[
  398. Union[EventHandler, EventSpec, list, function, BaseVar]
  399. ] = None,
  400. on_mount: Optional[
  401. Union[EventHandler, EventSpec, list, function, BaseVar]
  402. ] = None,
  403. on_mouse_down: Optional[
  404. Union[EventHandler, EventSpec, list, function, BaseVar]
  405. ] = None,
  406. on_mouse_enter: Optional[
  407. Union[EventHandler, EventSpec, list, function, BaseVar]
  408. ] = None,
  409. on_mouse_leave: Optional[
  410. Union[EventHandler, EventSpec, list, function, BaseVar]
  411. ] = None,
  412. on_mouse_move: Optional[
  413. Union[EventHandler, EventSpec, list, function, BaseVar]
  414. ] = None,
  415. on_mouse_out: Optional[
  416. Union[EventHandler, EventSpec, list, function, BaseVar]
  417. ] = None,
  418. on_mouse_over: Optional[
  419. Union[EventHandler, EventSpec, list, function, BaseVar]
  420. ] = None,
  421. on_mouse_up: Optional[
  422. Union[EventHandler, EventSpec, list, function, BaseVar]
  423. ] = None,
  424. on_scroll: Optional[
  425. Union[EventHandler, EventSpec, list, function, BaseVar]
  426. ] = None,
  427. on_unmount: Optional[
  428. Union[EventHandler, EventSpec, list, function, BaseVar]
  429. ] = None,
  430. **props
  431. ) -> "AccordionHeader":
  432. """Create the component.
  433. Args:
  434. *children: The children of the component.
  435. as_child: Change the default rendered element for the one passed as a child.
  436. style: The style of the component.
  437. key: A unique key for the component.
  438. id: The id for the component.
  439. class_name: The class name for the component.
  440. autofocus: Whether the component should take the focus once the page is loaded
  441. custom_attrs: custom attribute
  442. **props: The props of the component.
  443. Returns:
  444. The component.
  445. Raises:
  446. TypeError: If an invalid child is passed.
  447. """
  448. ...
  449. class AccordionTrigger(AccordionComponent):
  450. @overload
  451. @classmethod
  452. def create( # type: ignore
  453. cls,
  454. *children,
  455. as_child: Optional[Union[Var[bool], bool]] = None,
  456. style: Optional[Style] = None,
  457. key: Optional[Any] = None,
  458. id: Optional[Any] = None,
  459. class_name: Optional[Any] = None,
  460. autofocus: Optional[bool] = None,
  461. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  462. on_blur: Optional[
  463. Union[EventHandler, EventSpec, list, function, BaseVar]
  464. ] = None,
  465. on_click: Optional[
  466. Union[EventHandler, EventSpec, list, function, BaseVar]
  467. ] = None,
  468. on_context_menu: Optional[
  469. Union[EventHandler, EventSpec, list, function, BaseVar]
  470. ] = None,
  471. on_double_click: Optional[
  472. Union[EventHandler, EventSpec, list, function, BaseVar]
  473. ] = None,
  474. on_focus: Optional[
  475. Union[EventHandler, EventSpec, list, function, BaseVar]
  476. ] = None,
  477. on_mount: Optional[
  478. Union[EventHandler, EventSpec, list, function, BaseVar]
  479. ] = None,
  480. on_mouse_down: Optional[
  481. Union[EventHandler, EventSpec, list, function, BaseVar]
  482. ] = None,
  483. on_mouse_enter: Optional[
  484. Union[EventHandler, EventSpec, list, function, BaseVar]
  485. ] = None,
  486. on_mouse_leave: Optional[
  487. Union[EventHandler, EventSpec, list, function, BaseVar]
  488. ] = None,
  489. on_mouse_move: Optional[
  490. Union[EventHandler, EventSpec, list, function, BaseVar]
  491. ] = None,
  492. on_mouse_out: Optional[
  493. Union[EventHandler, EventSpec, list, function, BaseVar]
  494. ] = None,
  495. on_mouse_over: Optional[
  496. Union[EventHandler, EventSpec, list, function, BaseVar]
  497. ] = None,
  498. on_mouse_up: Optional[
  499. Union[EventHandler, EventSpec, list, function, BaseVar]
  500. ] = None,
  501. on_scroll: Optional[
  502. Union[EventHandler, EventSpec, list, function, BaseVar]
  503. ] = None,
  504. on_unmount: Optional[
  505. Union[EventHandler, EventSpec, list, function, BaseVar]
  506. ] = None,
  507. **props
  508. ) -> "AccordionTrigger":
  509. """Create the component.
  510. Args:
  511. *children: The children of the component.
  512. as_child: Change the default rendered element for the one passed as a child.
  513. style: The style of the component.
  514. key: A unique key for the component.
  515. id: The id for the component.
  516. class_name: The class name for the component.
  517. autofocus: Whether the component should take the focus once the page is loaded
  518. custom_attrs: custom attribute
  519. **props: The props of the component.
  520. Returns:
  521. The component.
  522. Raises:
  523. TypeError: If an invalid child is passed.
  524. """
  525. ...
  526. class AccordionContent(AccordionComponent):
  527. @overload
  528. @classmethod
  529. def create( # type: ignore
  530. cls,
  531. *children,
  532. as_child: Optional[Union[Var[bool], bool]] = 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. ) -> "AccordionContent":
  586. """Create the component.
  587. Args:
  588. *children: The children of the component.
  589. as_child: Change the default rendered element for the one passed as a child.
  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 props of the component.
  597. Returns:
  598. The component.
  599. Raises:
  600. TypeError: If an invalid child is passed.
  601. """
  602. ...
  603. class Accordion(SimpleNamespace):
  604. content = staticmethod(AccordionContent.create)
  605. header = staticmethod(AccordionHeader.create)
  606. item = staticmethod(AccordionItem.create)
  607. root = staticmethod(AccordionRoot.create)
  608. trigger = staticmethod(AccordionTrigger.create)
  609. accordion = Accordion()