accordion.pyi 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985
  1. """Stub file for reflex/components/radix/primitives/accordion.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
  6. from reflex.components.component import Component, ComponentNamespace
  7. from reflex.components.lucide.icon import Icon
  8. from reflex.components.radix.primitives.base import RadixPrimitiveComponent
  9. from reflex.event import EventHandler, EventSpec
  10. from reflex.style import Style
  11. from reflex.vars import Var
  12. LiteralAccordionType = Literal["single", "multiple"]
  13. LiteralAccordionDir = Literal["ltr", "rtl"]
  14. LiteralAccordionOrientation = Literal["vertical", "horizontal"]
  15. LiteralAccordionVariant = Literal["classic", "soft", "surface", "outline", "ghost"]
  16. DEFAULT_ANIMATION_DURATION = 250
  17. DEFAULT_ANIMATION_EASING = "cubic-bezier(0.87, 0, 0.13, 1)"
  18. class AccordionComponent(RadixPrimitiveComponent):
  19. def add_style(self): ...
  20. @overload
  21. @classmethod
  22. def create( # type: ignore
  23. cls,
  24. *children,
  25. color_scheme: Optional[
  26. Union[
  27. Var[
  28. Literal[
  29. "tomato",
  30. "red",
  31. "ruby",
  32. "crimson",
  33. "pink",
  34. "plum",
  35. "purple",
  36. "violet",
  37. "iris",
  38. "indigo",
  39. "blue",
  40. "cyan",
  41. "teal",
  42. "jade",
  43. "green",
  44. "grass",
  45. "brown",
  46. "orange",
  47. "sky",
  48. "mint",
  49. "lime",
  50. "yellow",
  51. "amber",
  52. "gold",
  53. "bronze",
  54. "gray",
  55. ]
  56. ],
  57. Literal[
  58. "tomato",
  59. "red",
  60. "ruby",
  61. "crimson",
  62. "pink",
  63. "plum",
  64. "purple",
  65. "violet",
  66. "iris",
  67. "indigo",
  68. "blue",
  69. "cyan",
  70. "teal",
  71. "jade",
  72. "green",
  73. "grass",
  74. "brown",
  75. "orange",
  76. "sky",
  77. "mint",
  78. "lime",
  79. "yellow",
  80. "amber",
  81. "gold",
  82. "bronze",
  83. "gray",
  84. ],
  85. ]
  86. ] = None,
  87. variant: Optional[
  88. Union[
  89. Var[Literal["classic", "soft", "surface", "outline", "ghost"]],
  90. Literal["classic", "soft", "surface", "outline", "ghost"],
  91. ]
  92. ] = None,
  93. as_child: Optional[Union[Var[bool], bool]] = None,
  94. style: Optional[Style] = None,
  95. key: Optional[Any] = None,
  96. id: Optional[Any] = None,
  97. class_name: Optional[Any] = None,
  98. autofocus: Optional[bool] = None,
  99. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  100. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  101. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  102. on_context_menu: Optional[
  103. Union[EventHandler, EventSpec, list, Callable, Var]
  104. ] = None,
  105. on_double_click: Optional[
  106. Union[EventHandler, EventSpec, list, Callable, Var]
  107. ] = None,
  108. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  109. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  110. on_mouse_down: Optional[
  111. Union[EventHandler, EventSpec, list, Callable, Var]
  112. ] = None,
  113. on_mouse_enter: Optional[
  114. Union[EventHandler, EventSpec, list, Callable, Var]
  115. ] = None,
  116. on_mouse_leave: Optional[
  117. Union[EventHandler, EventSpec, list, Callable, Var]
  118. ] = None,
  119. on_mouse_move: Optional[
  120. Union[EventHandler, EventSpec, list, Callable, Var]
  121. ] = None,
  122. on_mouse_out: Optional[
  123. Union[EventHandler, EventSpec, list, Callable, Var]
  124. ] = None,
  125. on_mouse_over: Optional[
  126. Union[EventHandler, EventSpec, list, Callable, Var]
  127. ] = None,
  128. on_mouse_up: Optional[
  129. Union[EventHandler, EventSpec, list, Callable, Var]
  130. ] = None,
  131. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  132. on_unmount: Optional[
  133. Union[EventHandler, EventSpec, list, Callable, Var]
  134. ] = None,
  135. **props,
  136. ) -> "AccordionComponent":
  137. """Create the component.
  138. Args:
  139. *children: The children of the component.
  140. color_scheme: The color scheme of the component.
  141. variant: The variant of the component.
  142. as_child: Change the default rendered element for the one passed as a child.
  143. style: The style of the component.
  144. key: A unique key for the component.
  145. id: The id for the component.
  146. class_name: The class name for the component.
  147. autofocus: Whether the component should take the focus once the page is loaded
  148. custom_attrs: custom attribute
  149. **props: The props of the component.
  150. Returns:
  151. The component.
  152. """
  153. ...
  154. class AccordionRoot(AccordionComponent):
  155. def add_style(self): ...
  156. @overload
  157. @classmethod
  158. def create( # type: ignore
  159. cls,
  160. *children,
  161. type: Optional[
  162. Union[Var[Literal["single", "multiple"]], Literal["single", "multiple"]]
  163. ] = None,
  164. value: Optional[Union[Var[Union[List[str], str]], str, List[str]]] = None,
  165. default_value: Optional[
  166. Union[Var[Union[List[str], str]], str, List[str]]
  167. ] = None,
  168. collapsible: Optional[Union[Var[bool], bool]] = None,
  169. disabled: Optional[Union[Var[bool], bool]] = None,
  170. dir: Optional[Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]] = None,
  171. orientation: Optional[
  172. Union[
  173. Var[Literal["vertical", "horizontal"]],
  174. Literal["vertical", "horizontal"],
  175. ]
  176. ] = None,
  177. radius: Optional[
  178. Union[
  179. Var[Literal["none", "small", "medium", "large", "full"]],
  180. Literal["none", "small", "medium", "large", "full"],
  181. ]
  182. ] = None,
  183. duration: Optional[Union[Var[int], int]] = None,
  184. easing: Optional[Union[Var[str], str]] = None,
  185. show_dividers: Optional[Union[Var[bool], bool]] = None,
  186. color_scheme: Optional[
  187. Union[
  188. Var[
  189. Literal[
  190. "tomato",
  191. "red",
  192. "ruby",
  193. "crimson",
  194. "pink",
  195. "plum",
  196. "purple",
  197. "violet",
  198. "iris",
  199. "indigo",
  200. "blue",
  201. "cyan",
  202. "teal",
  203. "jade",
  204. "green",
  205. "grass",
  206. "brown",
  207. "orange",
  208. "sky",
  209. "mint",
  210. "lime",
  211. "yellow",
  212. "amber",
  213. "gold",
  214. "bronze",
  215. "gray",
  216. ]
  217. ],
  218. Literal[
  219. "tomato",
  220. "red",
  221. "ruby",
  222. "crimson",
  223. "pink",
  224. "plum",
  225. "purple",
  226. "violet",
  227. "iris",
  228. "indigo",
  229. "blue",
  230. "cyan",
  231. "teal",
  232. "jade",
  233. "green",
  234. "grass",
  235. "brown",
  236. "orange",
  237. "sky",
  238. "mint",
  239. "lime",
  240. "yellow",
  241. "amber",
  242. "gold",
  243. "bronze",
  244. "gray",
  245. ],
  246. ]
  247. ] = None,
  248. variant: Optional[
  249. Union[
  250. Var[Literal["classic", "soft", "surface", "outline", "ghost"]],
  251. Literal["classic", "soft", "surface", "outline", "ghost"],
  252. ]
  253. ] = None,
  254. as_child: Optional[Union[Var[bool], bool]] = None,
  255. style: Optional[Style] = None,
  256. key: Optional[Any] = None,
  257. id: Optional[Any] = None,
  258. class_name: Optional[Any] = None,
  259. autofocus: Optional[bool] = None,
  260. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  261. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  262. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  263. on_context_menu: Optional[
  264. Union[EventHandler, EventSpec, list, Callable, Var]
  265. ] = None,
  266. on_double_click: Optional[
  267. Union[EventHandler, EventSpec, list, Callable, Var]
  268. ] = None,
  269. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  270. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  271. on_mouse_down: Optional[
  272. Union[EventHandler, EventSpec, list, Callable, Var]
  273. ] = None,
  274. on_mouse_enter: Optional[
  275. Union[EventHandler, EventSpec, list, Callable, Var]
  276. ] = None,
  277. on_mouse_leave: Optional[
  278. Union[EventHandler, EventSpec, list, Callable, Var]
  279. ] = None,
  280. on_mouse_move: Optional[
  281. Union[EventHandler, EventSpec, list, Callable, Var]
  282. ] = None,
  283. on_mouse_out: Optional[
  284. Union[EventHandler, EventSpec, list, Callable, Var]
  285. ] = None,
  286. on_mouse_over: Optional[
  287. Union[EventHandler, EventSpec, list, Callable, Var]
  288. ] = None,
  289. on_mouse_up: Optional[
  290. Union[EventHandler, EventSpec, list, Callable, Var]
  291. ] = None,
  292. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  293. on_unmount: Optional[
  294. Union[EventHandler, EventSpec, list, Callable, Var]
  295. ] = None,
  296. on_value_change: Optional[
  297. Union[EventHandler, EventSpec, list, Callable, Var]
  298. ] = None,
  299. **props,
  300. ) -> "AccordionRoot":
  301. """Create the component.
  302. Args:
  303. *children: The children of the component.
  304. type: The type of accordion (single or multiple).
  305. value: The value of the item to expand.
  306. default_value: The default value of the item to expand.
  307. collapsible: Whether or not the accordion is collapsible.
  308. disabled: Whether or not the accordion is disabled.
  309. dir: The reading direction of the accordion when applicable.
  310. orientation: The orientation of the accordion.
  311. radius: The radius of the accordion corners.
  312. duration: The time in milliseconds to animate open and close
  313. easing: The easing function to use for the animation.
  314. show_dividers: Whether to show divider lines between items.
  315. color_scheme: The color scheme of the component.
  316. variant: The variant of the component.
  317. as_child: Change the default rendered element for the one passed as a child.
  318. style: The style of the component.
  319. key: A unique key for the component.
  320. id: The id for the component.
  321. class_name: The class name for the component.
  322. autofocus: Whether the component should take the focus once the page is loaded
  323. custom_attrs: custom attribute
  324. **props: The props of the component.
  325. Returns:
  326. The component.
  327. """
  328. ...
  329. class AccordionItem(AccordionComponent):
  330. @overload
  331. @classmethod
  332. def create( # type: ignore
  333. cls,
  334. *children,
  335. header: Optional[Union[Component, Var]] = None,
  336. content: Optional[Union[Component, Var]] = None,
  337. value: Optional[Union[Var[str], str]] = None,
  338. disabled: Optional[Union[Var[bool], bool]] = None,
  339. color_scheme: Optional[
  340. Union[
  341. Var[
  342. Literal[
  343. "tomato",
  344. "red",
  345. "ruby",
  346. "crimson",
  347. "pink",
  348. "plum",
  349. "purple",
  350. "violet",
  351. "iris",
  352. "indigo",
  353. "blue",
  354. "cyan",
  355. "teal",
  356. "jade",
  357. "green",
  358. "grass",
  359. "brown",
  360. "orange",
  361. "sky",
  362. "mint",
  363. "lime",
  364. "yellow",
  365. "amber",
  366. "gold",
  367. "bronze",
  368. "gray",
  369. ]
  370. ],
  371. Literal[
  372. "tomato",
  373. "red",
  374. "ruby",
  375. "crimson",
  376. "pink",
  377. "plum",
  378. "purple",
  379. "violet",
  380. "iris",
  381. "indigo",
  382. "blue",
  383. "cyan",
  384. "teal",
  385. "jade",
  386. "green",
  387. "grass",
  388. "brown",
  389. "orange",
  390. "sky",
  391. "mint",
  392. "lime",
  393. "yellow",
  394. "amber",
  395. "gold",
  396. "bronze",
  397. "gray",
  398. ],
  399. ]
  400. ] = None,
  401. variant: Optional[
  402. Union[
  403. Var[Literal["classic", "soft", "surface", "outline", "ghost"]],
  404. Literal["classic", "soft", "surface", "outline", "ghost"],
  405. ]
  406. ] = None,
  407. as_child: Optional[Union[Var[bool], bool]] = None,
  408. style: Optional[Style] = None,
  409. key: Optional[Any] = None,
  410. id: Optional[Any] = None,
  411. class_name: Optional[Any] = None,
  412. autofocus: Optional[bool] = None,
  413. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  414. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  415. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  416. on_context_menu: Optional[
  417. Union[EventHandler, EventSpec, list, Callable, Var]
  418. ] = None,
  419. on_double_click: Optional[
  420. Union[EventHandler, EventSpec, list, Callable, Var]
  421. ] = None,
  422. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  423. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  424. on_mouse_down: Optional[
  425. Union[EventHandler, EventSpec, list, Callable, Var]
  426. ] = None,
  427. on_mouse_enter: Optional[
  428. Union[EventHandler, EventSpec, list, Callable, Var]
  429. ] = None,
  430. on_mouse_leave: Optional[
  431. Union[EventHandler, EventSpec, list, Callable, Var]
  432. ] = None,
  433. on_mouse_move: Optional[
  434. Union[EventHandler, EventSpec, list, Callable, Var]
  435. ] = None,
  436. on_mouse_out: Optional[
  437. Union[EventHandler, EventSpec, list, Callable, Var]
  438. ] = None,
  439. on_mouse_over: Optional[
  440. Union[EventHandler, EventSpec, list, Callable, Var]
  441. ] = None,
  442. on_mouse_up: Optional[
  443. Union[EventHandler, EventSpec, list, Callable, Var]
  444. ] = None,
  445. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  446. on_unmount: Optional[
  447. Union[EventHandler, EventSpec, list, Callable, Var]
  448. ] = None,
  449. **props,
  450. ) -> "AccordionItem":
  451. """Create an accordion item.
  452. Args:
  453. *children: The list of children to use if header and content are not provided.
  454. header: The header of the accordion item.
  455. content: The content of the accordion item.
  456. value: A unique identifier for the item.
  457. disabled: When true, prevents the user from interacting with the item.
  458. color_scheme: The color scheme of the component.
  459. variant: The variant of the component.
  460. as_child: Change the default rendered element for the one passed as a child.
  461. style: The style of the component.
  462. key: A unique key for the component.
  463. id: The id for the component.
  464. class_name: The class name for the component.
  465. autofocus: Whether the component should take the focus once the page is loaded
  466. custom_attrs: custom attribute
  467. **props: Additional properties to apply to the accordion item.
  468. Returns:
  469. The accordion item.
  470. """
  471. ...
  472. def add_style(self) -> dict[str, Any] | None: ...
  473. class AccordionHeader(AccordionComponent):
  474. @overload
  475. @classmethod
  476. def create( # type: ignore
  477. cls,
  478. *children,
  479. color_scheme: Optional[
  480. Union[
  481. Var[
  482. Literal[
  483. "tomato",
  484. "red",
  485. "ruby",
  486. "crimson",
  487. "pink",
  488. "plum",
  489. "purple",
  490. "violet",
  491. "iris",
  492. "indigo",
  493. "blue",
  494. "cyan",
  495. "teal",
  496. "jade",
  497. "green",
  498. "grass",
  499. "brown",
  500. "orange",
  501. "sky",
  502. "mint",
  503. "lime",
  504. "yellow",
  505. "amber",
  506. "gold",
  507. "bronze",
  508. "gray",
  509. ]
  510. ],
  511. Literal[
  512. "tomato",
  513. "red",
  514. "ruby",
  515. "crimson",
  516. "pink",
  517. "plum",
  518. "purple",
  519. "violet",
  520. "iris",
  521. "indigo",
  522. "blue",
  523. "cyan",
  524. "teal",
  525. "jade",
  526. "green",
  527. "grass",
  528. "brown",
  529. "orange",
  530. "sky",
  531. "mint",
  532. "lime",
  533. "yellow",
  534. "amber",
  535. "gold",
  536. "bronze",
  537. "gray",
  538. ],
  539. ]
  540. ] = None,
  541. variant: Optional[
  542. Union[
  543. Var[Literal["classic", "soft", "surface", "outline", "ghost"]],
  544. Literal["classic", "soft", "surface", "outline", "ghost"],
  545. ]
  546. ] = None,
  547. as_child: Optional[Union[Var[bool], bool]] = None,
  548. style: Optional[Style] = None,
  549. key: Optional[Any] = None,
  550. id: Optional[Any] = None,
  551. class_name: Optional[Any] = None,
  552. autofocus: Optional[bool] = None,
  553. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  554. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  555. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  556. on_context_menu: Optional[
  557. Union[EventHandler, EventSpec, list, Callable, Var]
  558. ] = None,
  559. on_double_click: Optional[
  560. Union[EventHandler, EventSpec, list, Callable, Var]
  561. ] = None,
  562. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  563. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  564. on_mouse_down: Optional[
  565. Union[EventHandler, EventSpec, list, Callable, Var]
  566. ] = None,
  567. on_mouse_enter: Optional[
  568. Union[EventHandler, EventSpec, list, Callable, Var]
  569. ] = None,
  570. on_mouse_leave: Optional[
  571. Union[EventHandler, EventSpec, list, Callable, Var]
  572. ] = None,
  573. on_mouse_move: Optional[
  574. Union[EventHandler, EventSpec, list, Callable, Var]
  575. ] = None,
  576. on_mouse_out: Optional[
  577. Union[EventHandler, EventSpec, list, Callable, Var]
  578. ] = None,
  579. on_mouse_over: Optional[
  580. Union[EventHandler, EventSpec, list, Callable, Var]
  581. ] = None,
  582. on_mouse_up: Optional[
  583. Union[EventHandler, EventSpec, list, Callable, Var]
  584. ] = None,
  585. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  586. on_unmount: Optional[
  587. Union[EventHandler, EventSpec, list, Callable, Var]
  588. ] = None,
  589. **props,
  590. ) -> "AccordionHeader":
  591. """Create the Accordion header component.
  592. Args:
  593. *children: The children of the component.
  594. color_scheme: The color scheme of the component.
  595. variant: The variant of the component.
  596. as_child: Change the default rendered element for the one passed as a child.
  597. style: The style of the component.
  598. key: A unique key for the component.
  599. id: The id for the component.
  600. class_name: The class name for the component.
  601. autofocus: Whether the component should take the focus once the page is loaded
  602. custom_attrs: custom attribute
  603. **props: The properties of the component.
  604. Returns:
  605. The Accordion header Component.
  606. """
  607. ...
  608. def add_style(self) -> dict[str, Any] | None: ...
  609. class AccordionTrigger(AccordionComponent):
  610. @overload
  611. @classmethod
  612. def create( # type: ignore
  613. cls,
  614. *children,
  615. color_scheme: Optional[
  616. Union[
  617. Var[
  618. Literal[
  619. "tomato",
  620. "red",
  621. "ruby",
  622. "crimson",
  623. "pink",
  624. "plum",
  625. "purple",
  626. "violet",
  627. "iris",
  628. "indigo",
  629. "blue",
  630. "cyan",
  631. "teal",
  632. "jade",
  633. "green",
  634. "grass",
  635. "brown",
  636. "orange",
  637. "sky",
  638. "mint",
  639. "lime",
  640. "yellow",
  641. "amber",
  642. "gold",
  643. "bronze",
  644. "gray",
  645. ]
  646. ],
  647. Literal[
  648. "tomato",
  649. "red",
  650. "ruby",
  651. "crimson",
  652. "pink",
  653. "plum",
  654. "purple",
  655. "violet",
  656. "iris",
  657. "indigo",
  658. "blue",
  659. "cyan",
  660. "teal",
  661. "jade",
  662. "green",
  663. "grass",
  664. "brown",
  665. "orange",
  666. "sky",
  667. "mint",
  668. "lime",
  669. "yellow",
  670. "amber",
  671. "gold",
  672. "bronze",
  673. "gray",
  674. ],
  675. ]
  676. ] = None,
  677. variant: Optional[
  678. Union[
  679. Var[Literal["classic", "soft", "surface", "outline", "ghost"]],
  680. Literal["classic", "soft", "surface", "outline", "ghost"],
  681. ]
  682. ] = None,
  683. as_child: Optional[Union[Var[bool], bool]] = None,
  684. style: Optional[Style] = None,
  685. key: Optional[Any] = None,
  686. id: Optional[Any] = None,
  687. class_name: Optional[Any] = None,
  688. autofocus: Optional[bool] = None,
  689. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  690. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  691. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  692. on_context_menu: Optional[
  693. Union[EventHandler, EventSpec, list, Callable, Var]
  694. ] = None,
  695. on_double_click: Optional[
  696. Union[EventHandler, EventSpec, list, Callable, Var]
  697. ] = None,
  698. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  699. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  700. on_mouse_down: Optional[
  701. Union[EventHandler, EventSpec, list, Callable, Var]
  702. ] = None,
  703. on_mouse_enter: Optional[
  704. Union[EventHandler, EventSpec, list, Callable, Var]
  705. ] = None,
  706. on_mouse_leave: Optional[
  707. Union[EventHandler, EventSpec, list, Callable, Var]
  708. ] = None,
  709. on_mouse_move: Optional[
  710. Union[EventHandler, EventSpec, list, Callable, Var]
  711. ] = None,
  712. on_mouse_out: Optional[
  713. Union[EventHandler, EventSpec, list, Callable, Var]
  714. ] = None,
  715. on_mouse_over: Optional[
  716. Union[EventHandler, EventSpec, list, Callable, Var]
  717. ] = None,
  718. on_mouse_up: Optional[
  719. Union[EventHandler, EventSpec, list, Callable, Var]
  720. ] = None,
  721. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  722. on_unmount: Optional[
  723. Union[EventHandler, EventSpec, list, Callable, Var]
  724. ] = None,
  725. **props,
  726. ) -> "AccordionTrigger":
  727. """Create the Accordion trigger component.
  728. Args:
  729. *children: The children of the component.
  730. color_scheme: The color scheme of the component.
  731. variant: The variant of the component.
  732. as_child: Change the default rendered element for the one passed as a child.
  733. style: The style of the component.
  734. key: A unique key for the component.
  735. id: The id for the component.
  736. class_name: The class name for the component.
  737. autofocus: Whether the component should take the focus once the page is loaded
  738. custom_attrs: custom attribute
  739. **props: The properties of the component.
  740. Returns:
  741. The Accordion trigger Component.
  742. """
  743. ...
  744. def add_style(self) -> dict[str, Any] | None: ...
  745. class AccordionIcon(Icon):
  746. @overload
  747. @classmethod
  748. def create( # type: ignore
  749. cls,
  750. *children,
  751. size: Optional[Union[Var[int], int]] = None,
  752. style: Optional[Style] = None,
  753. key: Optional[Any] = None,
  754. id: Optional[Any] = None,
  755. class_name: Optional[Any] = None,
  756. autofocus: Optional[bool] = None,
  757. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  758. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  759. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  760. on_context_menu: Optional[
  761. Union[EventHandler, EventSpec, list, Callable, Var]
  762. ] = None,
  763. on_double_click: Optional[
  764. Union[EventHandler, EventSpec, list, Callable, Var]
  765. ] = None,
  766. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  767. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  768. on_mouse_down: Optional[
  769. Union[EventHandler, EventSpec, list, Callable, Var]
  770. ] = None,
  771. on_mouse_enter: Optional[
  772. Union[EventHandler, EventSpec, list, Callable, Var]
  773. ] = None,
  774. on_mouse_leave: Optional[
  775. Union[EventHandler, EventSpec, list, Callable, Var]
  776. ] = None,
  777. on_mouse_move: Optional[
  778. Union[EventHandler, EventSpec, list, Callable, Var]
  779. ] = None,
  780. on_mouse_out: Optional[
  781. Union[EventHandler, EventSpec, list, Callable, Var]
  782. ] = None,
  783. on_mouse_over: Optional[
  784. Union[EventHandler, EventSpec, list, Callable, Var]
  785. ] = None,
  786. on_mouse_up: Optional[
  787. Union[EventHandler, EventSpec, list, Callable, Var]
  788. ] = None,
  789. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  790. on_unmount: Optional[
  791. Union[EventHandler, EventSpec, list, Callable, Var]
  792. ] = None,
  793. **props,
  794. ) -> "AccordionIcon":
  795. """Create the Accordion icon component.
  796. Args:
  797. *children: The children of the component.
  798. size: The size of the icon in pixels.
  799. style: The style of the component.
  800. key: A unique key for the component.
  801. id: The id for the component.
  802. class_name: The class name for the component.
  803. autofocus: Whether the component should take the focus once the page is loaded
  804. custom_attrs: custom attribute
  805. **props: The properties of the component.
  806. Returns:
  807. The Accordion icon Component.
  808. """
  809. ...
  810. class AccordionContent(AccordionComponent):
  811. def add_imports(self) -> dict: ...
  812. @overload
  813. @classmethod
  814. def create( # type: ignore
  815. cls,
  816. *children,
  817. color_scheme: Optional[
  818. Union[
  819. Var[
  820. Literal[
  821. "tomato",
  822. "red",
  823. "ruby",
  824. "crimson",
  825. "pink",
  826. "plum",
  827. "purple",
  828. "violet",
  829. "iris",
  830. "indigo",
  831. "blue",
  832. "cyan",
  833. "teal",
  834. "jade",
  835. "green",
  836. "grass",
  837. "brown",
  838. "orange",
  839. "sky",
  840. "mint",
  841. "lime",
  842. "yellow",
  843. "amber",
  844. "gold",
  845. "bronze",
  846. "gray",
  847. ]
  848. ],
  849. Literal[
  850. "tomato",
  851. "red",
  852. "ruby",
  853. "crimson",
  854. "pink",
  855. "plum",
  856. "purple",
  857. "violet",
  858. "iris",
  859. "indigo",
  860. "blue",
  861. "cyan",
  862. "teal",
  863. "jade",
  864. "green",
  865. "grass",
  866. "brown",
  867. "orange",
  868. "sky",
  869. "mint",
  870. "lime",
  871. "yellow",
  872. "amber",
  873. "gold",
  874. "bronze",
  875. "gray",
  876. ],
  877. ]
  878. ] = None,
  879. variant: Optional[
  880. Union[
  881. Var[Literal["classic", "soft", "surface", "outline", "ghost"]],
  882. Literal["classic", "soft", "surface", "outline", "ghost"],
  883. ]
  884. ] = None,
  885. as_child: Optional[Union[Var[bool], bool]] = None,
  886. style: Optional[Style] = None,
  887. key: Optional[Any] = None,
  888. id: Optional[Any] = None,
  889. class_name: Optional[Any] = None,
  890. autofocus: Optional[bool] = None,
  891. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  892. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  893. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  894. on_context_menu: Optional[
  895. Union[EventHandler, EventSpec, list, Callable, Var]
  896. ] = None,
  897. on_double_click: Optional[
  898. Union[EventHandler, EventSpec, list, Callable, Var]
  899. ] = None,
  900. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  901. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  902. on_mouse_down: Optional[
  903. Union[EventHandler, EventSpec, list, Callable, Var]
  904. ] = None,
  905. on_mouse_enter: Optional[
  906. Union[EventHandler, EventSpec, list, Callable, Var]
  907. ] = None,
  908. on_mouse_leave: Optional[
  909. Union[EventHandler, EventSpec, list, Callable, Var]
  910. ] = None,
  911. on_mouse_move: Optional[
  912. Union[EventHandler, EventSpec, list, Callable, Var]
  913. ] = None,
  914. on_mouse_out: Optional[
  915. Union[EventHandler, EventSpec, list, Callable, Var]
  916. ] = None,
  917. on_mouse_over: Optional[
  918. Union[EventHandler, EventSpec, list, Callable, Var]
  919. ] = None,
  920. on_mouse_up: Optional[
  921. Union[EventHandler, EventSpec, list, Callable, Var]
  922. ] = None,
  923. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  924. on_unmount: Optional[
  925. Union[EventHandler, EventSpec, list, Callable, Var]
  926. ] = None,
  927. **props,
  928. ) -> "AccordionContent":
  929. """Create the Accordion content component.
  930. Args:
  931. *children: The children of the component.
  932. color_scheme: The color scheme of the component.
  933. variant: The variant of the component.
  934. as_child: Change the default rendered element for the one passed as a child.
  935. style: The style of the component.
  936. key: A unique key for the component.
  937. id: The id for the component.
  938. class_name: The class name for the component.
  939. autofocus: Whether the component should take the focus once the page is loaded
  940. custom_attrs: custom attribute
  941. **props: The properties of the component.
  942. Returns:
  943. The Accordion content Component.
  944. """
  945. ...
  946. def add_custom_code(self) -> list[str]: ...
  947. def add_style(self) -> dict[str, Any] | None: ...
  948. class Accordion(ComponentNamespace):
  949. content = staticmethod(AccordionContent.create)
  950. header = staticmethod(AccordionHeader.create)
  951. item = staticmethod(AccordionItem.create)
  952. icon = staticmethod(AccordionIcon.create)
  953. root = staticmethod(AccordionRoot.create)
  954. trigger = staticmethod(AccordionTrigger.create)
  955. accordion = Accordion()