accordion.pyi 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691
  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, Literal
  11. from reflex.components.component import Component
  12. from reflex.components.core import cond, match
  13. from reflex.components.radix.primitives.base import RadixPrimitiveComponent
  14. from reflex.components.radix.themes.components.icons import Icon
  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
  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[Union[Var[str], str]] = None,
  124. default_value: Optional[Union[Var[str], str]] = None,
  125. collapsible: Optional[Union[Var[bool], bool]] = None,
  126. disabled: Optional[Union[Var[bool], bool]] = None,
  127. dir: Optional[Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]] = None,
  128. orientation: Optional[
  129. Union[
  130. Var[Literal["vertical", "horizontal"]],
  131. Literal["vertical", "horizontal"],
  132. ]
  133. ] = None,
  134. variant: Optional[
  135. Union[
  136. Var[Literal["classic", "soft", "surface", "outline", "ghost"]],
  137. Literal["classic", "soft", "surface", "outline", "ghost"],
  138. ]
  139. ] = None,
  140. color_scheme: Optional[
  141. Union[Var[Literal["primary", "accent"]], Literal["primary", "accent"]]
  142. ] = None,
  143. _dynamic_themes: Optional[Union[Var[dict], dict]] = None,
  144. _var_data: Optional[VarData] = None,
  145. as_child: Optional[Union[Var[bool], bool]] = None,
  146. style: Optional[Style] = None,
  147. key: Optional[Any] = None,
  148. id: Optional[Any] = None,
  149. class_name: Optional[Any] = None,
  150. autofocus: Optional[bool] = None,
  151. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  152. on_blur: Optional[
  153. Union[EventHandler, EventSpec, list, function, BaseVar]
  154. ] = None,
  155. on_click: Optional[
  156. Union[EventHandler, EventSpec, list, function, BaseVar]
  157. ] = None,
  158. on_context_menu: Optional[
  159. Union[EventHandler, EventSpec, list, function, BaseVar]
  160. ] = None,
  161. on_double_click: Optional[
  162. Union[EventHandler, EventSpec, list, function, BaseVar]
  163. ] = None,
  164. on_focus: Optional[
  165. Union[EventHandler, EventSpec, list, function, BaseVar]
  166. ] = None,
  167. on_mount: Optional[
  168. Union[EventHandler, EventSpec, list, function, BaseVar]
  169. ] = None,
  170. on_mouse_down: Optional[
  171. Union[EventHandler, EventSpec, list, function, BaseVar]
  172. ] = None,
  173. on_mouse_enter: Optional[
  174. Union[EventHandler, EventSpec, list, function, BaseVar]
  175. ] = None,
  176. on_mouse_leave: Optional[
  177. Union[EventHandler, EventSpec, list, function, BaseVar]
  178. ] = None,
  179. on_mouse_move: Optional[
  180. Union[EventHandler, EventSpec, list, function, BaseVar]
  181. ] = None,
  182. on_mouse_out: Optional[
  183. Union[EventHandler, EventSpec, list, function, BaseVar]
  184. ] = None,
  185. on_mouse_over: Optional[
  186. Union[EventHandler, EventSpec, list, function, BaseVar]
  187. ] = None,
  188. on_mouse_up: Optional[
  189. Union[EventHandler, EventSpec, list, function, BaseVar]
  190. ] = None,
  191. on_scroll: Optional[
  192. Union[EventHandler, EventSpec, list, function, BaseVar]
  193. ] = None,
  194. on_unmount: Optional[
  195. Union[EventHandler, EventSpec, list, function, BaseVar]
  196. ] = None,
  197. on_value_change: Optional[
  198. Union[EventHandler, EventSpec, list, function, BaseVar]
  199. ] = None,
  200. **props
  201. ) -> "AccordionRoot":
  202. """Create the Accordion root component.
  203. Args:
  204. *children: The children of the component.
  205. type_: The type of accordion (single or multiple).
  206. value: The value of the item to expand.
  207. default_value: The default value of the item to expand.
  208. collapsible: Whether or not the accordion is collapsible.
  209. disabled: Whether or not the accordion is disabled.
  210. dir: The reading direction of the accordion when applicable.
  211. orientation: The orientation of the accordion.
  212. variant: The variant of the accordion.
  213. color_scheme: The color scheme of the accordion.
  214. _dynamic_themes: dynamic themes of the accordion generated at compile time.
  215. _var_data: The var_data associated with the component.
  216. as_child: Change the default rendered element for the one passed as a child.
  217. style: The style of the component.
  218. key: A unique key for the component.
  219. id: The id for the component.
  220. class_name: The class name for the component.
  221. autofocus: Whether the component should take the focus once the page is loaded
  222. custom_attrs: custom attribute
  223. **props: The properties of the component.
  224. Returns:
  225. The Accordion root Component.
  226. """
  227. ...
  228. def get_event_triggers(self) -> Dict[str, Any]: ...
  229. class AccordionItem(AccordionComponent):
  230. @overload
  231. @classmethod
  232. def create( # type: ignore
  233. cls,
  234. *children,
  235. value: Optional[Union[Var[str], str]] = None,
  236. disabled: Optional[Union[Var[bool], bool]] = None,
  237. as_child: Optional[Union[Var[bool], bool]] = None,
  238. style: Optional[Style] = None,
  239. key: Optional[Any] = None,
  240. id: Optional[Any] = None,
  241. class_name: Optional[Any] = None,
  242. autofocus: Optional[bool] = None,
  243. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  244. on_blur: Optional[
  245. Union[EventHandler, EventSpec, list, function, BaseVar]
  246. ] = None,
  247. on_click: Optional[
  248. Union[EventHandler, EventSpec, list, function, BaseVar]
  249. ] = None,
  250. on_context_menu: Optional[
  251. Union[EventHandler, EventSpec, list, function, BaseVar]
  252. ] = None,
  253. on_double_click: Optional[
  254. Union[EventHandler, EventSpec, list, function, BaseVar]
  255. ] = None,
  256. on_focus: Optional[
  257. Union[EventHandler, EventSpec, list, function, BaseVar]
  258. ] = None,
  259. on_mount: Optional[
  260. Union[EventHandler, EventSpec, list, function, BaseVar]
  261. ] = None,
  262. on_mouse_down: Optional[
  263. Union[EventHandler, EventSpec, list, function, BaseVar]
  264. ] = None,
  265. on_mouse_enter: Optional[
  266. Union[EventHandler, EventSpec, list, function, BaseVar]
  267. ] = None,
  268. on_mouse_leave: Optional[
  269. Union[EventHandler, EventSpec, list, function, BaseVar]
  270. ] = None,
  271. on_mouse_move: Optional[
  272. Union[EventHandler, EventSpec, list, function, BaseVar]
  273. ] = None,
  274. on_mouse_out: Optional[
  275. Union[EventHandler, EventSpec, list, function, BaseVar]
  276. ] = None,
  277. on_mouse_over: Optional[
  278. Union[EventHandler, EventSpec, list, function, BaseVar]
  279. ] = None,
  280. on_mouse_up: Optional[
  281. Union[EventHandler, EventSpec, list, function, BaseVar]
  282. ] = None,
  283. on_scroll: Optional[
  284. Union[EventHandler, EventSpec, list, function, BaseVar]
  285. ] = None,
  286. on_unmount: Optional[
  287. Union[EventHandler, EventSpec, list, function, BaseVar]
  288. ] = None,
  289. **props
  290. ) -> "AccordionItem":
  291. """Create the component.
  292. Args:
  293. *children: The children of the component.
  294. value: A unique identifier for the item.
  295. disabled: When true, prevents the user from interacting with the item.
  296. as_child: Change the default rendered element for the one passed as a child.
  297. style: The style of the component.
  298. key: A unique key for the component.
  299. id: The id for the component.
  300. class_name: The class name for the component.
  301. autofocus: Whether the component should take the focus once the page is loaded
  302. custom_attrs: custom attribute
  303. **props: The props of the component.
  304. Returns:
  305. The component.
  306. Raises:
  307. TypeError: If an invalid child is passed.
  308. """
  309. ...
  310. class AccordionHeader(AccordionComponent):
  311. @overload
  312. @classmethod
  313. def create( # type: ignore
  314. cls,
  315. *children,
  316. as_child: Optional[Union[Var[bool], bool]] = None,
  317. style: Optional[Style] = None,
  318. key: Optional[Any] = None,
  319. id: Optional[Any] = None,
  320. class_name: Optional[Any] = None,
  321. autofocus: Optional[bool] = None,
  322. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  323. on_blur: Optional[
  324. Union[EventHandler, EventSpec, list, function, BaseVar]
  325. ] = None,
  326. on_click: Optional[
  327. Union[EventHandler, EventSpec, list, function, BaseVar]
  328. ] = None,
  329. on_context_menu: Optional[
  330. Union[EventHandler, EventSpec, list, function, BaseVar]
  331. ] = None,
  332. on_double_click: Optional[
  333. Union[EventHandler, EventSpec, list, function, BaseVar]
  334. ] = None,
  335. on_focus: Optional[
  336. Union[EventHandler, EventSpec, list, function, BaseVar]
  337. ] = None,
  338. on_mount: Optional[
  339. Union[EventHandler, EventSpec, list, function, BaseVar]
  340. ] = None,
  341. on_mouse_down: Optional[
  342. Union[EventHandler, EventSpec, list, function, BaseVar]
  343. ] = None,
  344. on_mouse_enter: Optional[
  345. Union[EventHandler, EventSpec, list, function, BaseVar]
  346. ] = None,
  347. on_mouse_leave: Optional[
  348. Union[EventHandler, EventSpec, list, function, BaseVar]
  349. ] = None,
  350. on_mouse_move: Optional[
  351. Union[EventHandler, EventSpec, list, function, BaseVar]
  352. ] = None,
  353. on_mouse_out: Optional[
  354. Union[EventHandler, EventSpec, list, function, BaseVar]
  355. ] = None,
  356. on_mouse_over: Optional[
  357. Union[EventHandler, EventSpec, list, function, BaseVar]
  358. ] = None,
  359. on_mouse_up: Optional[
  360. Union[EventHandler, EventSpec, list, function, BaseVar]
  361. ] = None,
  362. on_scroll: Optional[
  363. Union[EventHandler, EventSpec, list, function, BaseVar]
  364. ] = None,
  365. on_unmount: Optional[
  366. Union[EventHandler, EventSpec, list, function, BaseVar]
  367. ] = None,
  368. **props
  369. ) -> "AccordionHeader":
  370. """Create the component.
  371. Args:
  372. *children: The children of the component.
  373. as_child: Change the default rendered element for the one passed as a child.
  374. style: The style of the component.
  375. key: A unique key for the component.
  376. id: The id for the component.
  377. class_name: The class name for the component.
  378. autofocus: Whether the component should take the focus once the page is loaded
  379. custom_attrs: custom attribute
  380. **props: The props of the component.
  381. Returns:
  382. The component.
  383. Raises:
  384. TypeError: If an invalid child is passed.
  385. """
  386. ...
  387. class AccordionTrigger(AccordionComponent):
  388. @overload
  389. @classmethod
  390. def create( # type: ignore
  391. cls,
  392. *children,
  393. as_child: Optional[Union[Var[bool], bool]] = None,
  394. style: Optional[Style] = None,
  395. key: Optional[Any] = None,
  396. id: Optional[Any] = None,
  397. class_name: Optional[Any] = None,
  398. autofocus: Optional[bool] = None,
  399. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  400. on_blur: Optional[
  401. Union[EventHandler, EventSpec, list, function, BaseVar]
  402. ] = None,
  403. on_click: Optional[
  404. Union[EventHandler, EventSpec, list, function, BaseVar]
  405. ] = None,
  406. on_context_menu: Optional[
  407. Union[EventHandler, EventSpec, list, function, BaseVar]
  408. ] = None,
  409. on_double_click: Optional[
  410. Union[EventHandler, EventSpec, list, function, BaseVar]
  411. ] = None,
  412. on_focus: Optional[
  413. Union[EventHandler, EventSpec, list, function, BaseVar]
  414. ] = None,
  415. on_mount: Optional[
  416. Union[EventHandler, EventSpec, list, function, BaseVar]
  417. ] = None,
  418. on_mouse_down: Optional[
  419. Union[EventHandler, EventSpec, list, function, BaseVar]
  420. ] = None,
  421. on_mouse_enter: Optional[
  422. Union[EventHandler, EventSpec, list, function, BaseVar]
  423. ] = None,
  424. on_mouse_leave: Optional[
  425. Union[EventHandler, EventSpec, list, function, BaseVar]
  426. ] = None,
  427. on_mouse_move: Optional[
  428. Union[EventHandler, EventSpec, list, function, BaseVar]
  429. ] = None,
  430. on_mouse_out: Optional[
  431. Union[EventHandler, EventSpec, list, function, BaseVar]
  432. ] = None,
  433. on_mouse_over: Optional[
  434. Union[EventHandler, EventSpec, list, function, BaseVar]
  435. ] = None,
  436. on_mouse_up: Optional[
  437. Union[EventHandler, EventSpec, list, function, BaseVar]
  438. ] = None,
  439. on_scroll: Optional[
  440. Union[EventHandler, EventSpec, list, function, BaseVar]
  441. ] = None,
  442. on_unmount: Optional[
  443. Union[EventHandler, EventSpec, list, function, BaseVar]
  444. ] = None,
  445. **props
  446. ) -> "AccordionTrigger":
  447. """Create the component.
  448. Args:
  449. *children: The children of the component.
  450. as_child: Change the default rendered element for the one passed as a child.
  451. style: The style of the component.
  452. key: A unique key for the component.
  453. id: The id for the component.
  454. class_name: The class name for the component.
  455. autofocus: Whether the component should take the focus once the page is loaded
  456. custom_attrs: custom attribute
  457. **props: The props of the component.
  458. Returns:
  459. The component.
  460. Raises:
  461. TypeError: If an invalid child is passed.
  462. """
  463. ...
  464. class AccordionContent(AccordionComponent):
  465. @overload
  466. @classmethod
  467. def create( # type: ignore
  468. cls,
  469. *children,
  470. as_child: Optional[Union[Var[bool], bool]] = None,
  471. style: Optional[Style] = None,
  472. key: Optional[Any] = None,
  473. id: Optional[Any] = None,
  474. class_name: Optional[Any] = None,
  475. autofocus: Optional[bool] = None,
  476. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  477. on_blur: Optional[
  478. Union[EventHandler, EventSpec, list, function, BaseVar]
  479. ] = None,
  480. on_click: Optional[
  481. Union[EventHandler, EventSpec, list, function, BaseVar]
  482. ] = None,
  483. on_context_menu: Optional[
  484. Union[EventHandler, EventSpec, list, function, BaseVar]
  485. ] = None,
  486. on_double_click: Optional[
  487. Union[EventHandler, EventSpec, list, function, BaseVar]
  488. ] = None,
  489. on_focus: Optional[
  490. Union[EventHandler, EventSpec, list, function, BaseVar]
  491. ] = None,
  492. on_mount: Optional[
  493. Union[EventHandler, EventSpec, list, function, BaseVar]
  494. ] = None,
  495. on_mouse_down: Optional[
  496. Union[EventHandler, EventSpec, list, function, BaseVar]
  497. ] = None,
  498. on_mouse_enter: Optional[
  499. Union[EventHandler, EventSpec, list, function, BaseVar]
  500. ] = None,
  501. on_mouse_leave: Optional[
  502. Union[EventHandler, EventSpec, list, function, BaseVar]
  503. ] = None,
  504. on_mouse_move: Optional[
  505. Union[EventHandler, EventSpec, list, function, BaseVar]
  506. ] = None,
  507. on_mouse_out: Optional[
  508. Union[EventHandler, EventSpec, list, function, BaseVar]
  509. ] = None,
  510. on_mouse_over: Optional[
  511. Union[EventHandler, EventSpec, list, function, BaseVar]
  512. ] = None,
  513. on_mouse_up: Optional[
  514. Union[EventHandler, EventSpec, list, function, BaseVar]
  515. ] = None,
  516. on_scroll: Optional[
  517. Union[EventHandler, EventSpec, list, function, BaseVar]
  518. ] = None,
  519. on_unmount: Optional[
  520. Union[EventHandler, EventSpec, list, function, BaseVar]
  521. ] = None,
  522. **props
  523. ) -> "AccordionContent":
  524. """Create the component.
  525. Args:
  526. *children: The children of the component.
  527. as_child: Change the default rendered element for the one passed as a child.
  528. style: The style of the component.
  529. key: A unique key for the component.
  530. id: The id for the component.
  531. class_name: The class name for the component.
  532. autofocus: Whether the component should take the focus once the page is loaded
  533. custom_attrs: custom attribute
  534. **props: The props of the component.
  535. Returns:
  536. The component.
  537. Raises:
  538. TypeError: If an invalid child is passed.
  539. """
  540. ...
  541. def accordion_item(header: Component, content: Component, **props) -> Component: ...
  542. class Accordion(SimpleNamespace):
  543. content = staticmethod(AccordionContent.create)
  544. header = staticmethod(AccordionHeader.create)
  545. item = staticmethod(accordion_item)
  546. root = staticmethod(AccordionRoot.create)
  547. trigger = staticmethod(AccordionTrigger.create)
  548. @staticmethod
  549. def __call__(
  550. *children,
  551. type_: Optional[
  552. Union[Var[Literal["single", "multiple"]], Literal["single", "multiple"]]
  553. ] = None,
  554. value: Optional[Union[Var[str], str]] = None,
  555. default_value: Optional[Union[Var[str], str]] = None,
  556. collapsible: Optional[Union[Var[bool], bool]] = None,
  557. disabled: Optional[Union[Var[bool], bool]] = None,
  558. dir: Optional[Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]] = None,
  559. orientation: Optional[
  560. Union[
  561. Var[Literal["vertical", "horizontal"]],
  562. Literal["vertical", "horizontal"],
  563. ]
  564. ] = None,
  565. variant: Optional[
  566. Union[
  567. Var[Literal["classic", "soft", "surface", "outline", "ghost"]],
  568. Literal["classic", "soft", "surface", "outline", "ghost"],
  569. ]
  570. ] = None,
  571. color_scheme: Optional[
  572. Union[Var[Literal["primary", "accent"]], Literal["primary", "accent"]]
  573. ] = None,
  574. _dynamic_themes: Optional[Union[Var[dict], dict]] = None,
  575. _var_data: Optional[VarData] = None,
  576. as_child: Optional[Union[Var[bool], bool]] = None,
  577. style: Optional[Style] = None,
  578. key: Optional[Any] = None,
  579. id: Optional[Any] = None,
  580. class_name: Optional[Any] = None,
  581. autofocus: Optional[bool] = None,
  582. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  583. on_blur: Optional[
  584. Union[EventHandler, EventSpec, list, function, BaseVar]
  585. ] = None,
  586. on_click: Optional[
  587. Union[EventHandler, EventSpec, list, function, BaseVar]
  588. ] = None,
  589. on_context_menu: Optional[
  590. Union[EventHandler, EventSpec, list, function, BaseVar]
  591. ] = None,
  592. on_double_click: Optional[
  593. Union[EventHandler, EventSpec, list, function, BaseVar]
  594. ] = None,
  595. on_focus: Optional[
  596. Union[EventHandler, EventSpec, list, function, BaseVar]
  597. ] = None,
  598. on_mount: Optional[
  599. Union[EventHandler, EventSpec, list, function, BaseVar]
  600. ] = None,
  601. on_mouse_down: Optional[
  602. Union[EventHandler, EventSpec, list, function, BaseVar]
  603. ] = None,
  604. on_mouse_enter: Optional[
  605. Union[EventHandler, EventSpec, list, function, BaseVar]
  606. ] = None,
  607. on_mouse_leave: Optional[
  608. Union[EventHandler, EventSpec, list, function, BaseVar]
  609. ] = None,
  610. on_mouse_move: Optional[
  611. Union[EventHandler, EventSpec, list, function, BaseVar]
  612. ] = None,
  613. on_mouse_out: Optional[
  614. Union[EventHandler, EventSpec, list, function, BaseVar]
  615. ] = None,
  616. on_mouse_over: Optional[
  617. Union[EventHandler, EventSpec, list, function, BaseVar]
  618. ] = None,
  619. on_mouse_up: Optional[
  620. Union[EventHandler, EventSpec, list, function, BaseVar]
  621. ] = None,
  622. on_scroll: Optional[
  623. Union[EventHandler, EventSpec, list, function, BaseVar]
  624. ] = None,
  625. on_unmount: Optional[
  626. Union[EventHandler, EventSpec, list, function, BaseVar]
  627. ] = None,
  628. on_value_change: Optional[
  629. Union[EventHandler, EventSpec, list, function, BaseVar]
  630. ] = None,
  631. **props
  632. ) -> "AccordionRoot":
  633. """Create the Accordion root component.
  634. Args:
  635. *children: The children of the component.
  636. type_: The type of accordion (single or multiple).
  637. value: The value of the item to expand.
  638. default_value: The default value of the item to expand.
  639. collapsible: Whether or not the accordion is collapsible.
  640. disabled: Whether or not the accordion is disabled.
  641. dir: The reading direction of the accordion when applicable.
  642. orientation: The orientation of the accordion.
  643. variant: The variant of the accordion.
  644. color_scheme: The color scheme of the accordion.
  645. _dynamic_themes: dynamic themes of the accordion generated at compile time.
  646. _var_data: The var_data associated with the component.
  647. as_child: Change the default rendered element for the one passed as a child.
  648. style: The style of the component.
  649. key: A unique key for the component.
  650. id: The id for the component.
  651. class_name: The class name for the component.
  652. autofocus: Whether the component should take the focus once the page is loaded
  653. custom_attrs: custom attribute
  654. **props: The properties of the component.
  655. Returns:
  656. The Accordion root Component.
  657. """
  658. ...
  659. accordion = Accordion()