accordion.pyi 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  1. """Stub file for reflex/components/chakra/disclosure/accordion.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `scripts/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Dict, Literal, Optional, Union, overload
  6. from reflex.vars import Var, BaseVar, ComputedVar
  7. from reflex.event import EventChain, EventHandler, EventSpec
  8. from reflex.style import Style
  9. from typing import List, Optional, Union
  10. from reflex.components.chakra import ChakraComponent
  11. from reflex.components.component import Component
  12. from reflex.vars import Var
  13. class Accordion(ChakraComponent):
  14. @overload
  15. @classmethod
  16. def create( # type: ignore
  17. cls,
  18. *children,
  19. items=None,
  20. icon_pos="right",
  21. allow_multiple: Optional[Union[Var[bool], bool]] = None,
  22. allow_toggle: Optional[Union[Var[bool], bool]] = None,
  23. default_index: Optional[
  24. Union[Var[Optional[List[int]]], Optional[List[int]]]
  25. ] = None,
  26. index: Optional[
  27. Union[Var[Union[int, List[int]]], Union[int, List[int]]]
  28. ] = None,
  29. reduce_motion: Optional[Union[Var[bool], bool]] = None,
  30. style: Optional[Style] = None,
  31. key: Optional[Any] = None,
  32. id: Optional[Any] = None,
  33. class_name: Optional[Any] = None,
  34. autofocus: Optional[bool] = None,
  35. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  36. on_blur: Optional[
  37. Union[EventHandler, EventSpec, list, function, BaseVar]
  38. ] = None,
  39. on_click: Optional[
  40. Union[EventHandler, EventSpec, list, function, BaseVar]
  41. ] = None,
  42. on_context_menu: Optional[
  43. Union[EventHandler, EventSpec, list, function, BaseVar]
  44. ] = None,
  45. on_double_click: Optional[
  46. Union[EventHandler, EventSpec, list, function, BaseVar]
  47. ] = None,
  48. on_focus: Optional[
  49. Union[EventHandler, EventSpec, list, function, BaseVar]
  50. ] = None,
  51. on_mount: Optional[
  52. Union[EventHandler, EventSpec, list, function, BaseVar]
  53. ] = None,
  54. on_mouse_down: Optional[
  55. Union[EventHandler, EventSpec, list, function, BaseVar]
  56. ] = None,
  57. on_mouse_enter: Optional[
  58. Union[EventHandler, EventSpec, list, function, BaseVar]
  59. ] = None,
  60. on_mouse_leave: Optional[
  61. Union[EventHandler, EventSpec, list, function, BaseVar]
  62. ] = None,
  63. on_mouse_move: Optional[
  64. Union[EventHandler, EventSpec, list, function, BaseVar]
  65. ] = None,
  66. on_mouse_out: Optional[
  67. Union[EventHandler, EventSpec, list, function, BaseVar]
  68. ] = None,
  69. on_mouse_over: Optional[
  70. Union[EventHandler, EventSpec, list, function, BaseVar]
  71. ] = None,
  72. on_mouse_up: Optional[
  73. Union[EventHandler, EventSpec, list, function, BaseVar]
  74. ] = None,
  75. on_scroll: Optional[
  76. Union[EventHandler, EventSpec, list, function, BaseVar]
  77. ] = None,
  78. on_unmount: Optional[
  79. Union[EventHandler, EventSpec, list, function, BaseVar]
  80. ] = None,
  81. **props
  82. ) -> "Accordion":
  83. """Create an accordion component.
  84. Args:
  85. *children: The children of the component.
  86. items: The items of the accordion component: list of tuples (label,panel)
  87. icon_pos: The position of the arrow icon of the accordion. "right", "left" or None
  88. allow_multiple: The allow_multiple property of the accordion. (True or False)
  89. allow_toggle: The allow_toggle property of the accordion. (True or False)
  90. default_index: The initial index(es) of the expanded accordion item(s).
  91. index: The index(es) of the expanded accordion item
  92. reduce_motion: If true, height animation and transitions will be disabled.
  93. style: The style of the component.
  94. key: A unique key for the component.
  95. id: The id for the component.
  96. class_name: The class name for the component.
  97. autofocus: Whether the component should take the focus once the page is loaded
  98. custom_attrs: custom attribute
  99. **props: The properties of the component.
  100. Returns:
  101. The accordion component
  102. """
  103. ...
  104. class AccordionItem(ChakraComponent):
  105. @overload
  106. @classmethod
  107. def create( # type: ignore
  108. cls,
  109. *children,
  110. id_: Optional[Union[Var[str], str]] = None,
  111. is_disabled: Optional[Union[Var[bool], bool]] = None,
  112. is_focusable: Optional[Union[Var[bool], bool]] = None,
  113. style: Optional[Style] = None,
  114. key: Optional[Any] = None,
  115. id: Optional[Any] = None,
  116. class_name: Optional[Any] = None,
  117. autofocus: Optional[bool] = None,
  118. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  119. on_blur: Optional[
  120. Union[EventHandler, EventSpec, list, function, BaseVar]
  121. ] = None,
  122. on_click: Optional[
  123. Union[EventHandler, EventSpec, list, function, BaseVar]
  124. ] = None,
  125. on_context_menu: Optional[
  126. Union[EventHandler, EventSpec, list, function, BaseVar]
  127. ] = None,
  128. on_double_click: Optional[
  129. Union[EventHandler, EventSpec, list, function, BaseVar]
  130. ] = None,
  131. on_focus: Optional[
  132. Union[EventHandler, EventSpec, list, function, BaseVar]
  133. ] = None,
  134. on_mount: Optional[
  135. Union[EventHandler, EventSpec, list, function, BaseVar]
  136. ] = None,
  137. on_mouse_down: Optional[
  138. Union[EventHandler, EventSpec, list, function, BaseVar]
  139. ] = None,
  140. on_mouse_enter: Optional[
  141. Union[EventHandler, EventSpec, list, function, BaseVar]
  142. ] = None,
  143. on_mouse_leave: Optional[
  144. Union[EventHandler, EventSpec, list, function, BaseVar]
  145. ] = None,
  146. on_mouse_move: Optional[
  147. Union[EventHandler, EventSpec, list, function, BaseVar]
  148. ] = None,
  149. on_mouse_out: Optional[
  150. Union[EventHandler, EventSpec, list, function, BaseVar]
  151. ] = None,
  152. on_mouse_over: Optional[
  153. Union[EventHandler, EventSpec, list, function, BaseVar]
  154. ] = None,
  155. on_mouse_up: Optional[
  156. Union[EventHandler, EventSpec, list, function, BaseVar]
  157. ] = None,
  158. on_scroll: Optional[
  159. Union[EventHandler, EventSpec, list, function, BaseVar]
  160. ] = None,
  161. on_unmount: Optional[
  162. Union[EventHandler, EventSpec, list, function, BaseVar]
  163. ] = None,
  164. **props
  165. ) -> "AccordionItem":
  166. """Create the component.
  167. Args:
  168. *children: The children of the component.
  169. id_: A unique id for the accordion item.
  170. is_disabled: If true, the accordion item will be disabled.
  171. is_focusable: If true, the accordion item will be focusable.
  172. style: The style of the component.
  173. key: A unique key for the component.
  174. id: The id for the component.
  175. class_name: The class name for the component.
  176. autofocus: Whether the component should take the focus once the page is loaded
  177. custom_attrs: custom attribute
  178. **props: The props of the component.
  179. Returns:
  180. The component.
  181. Raises:
  182. TypeError: If an invalid child is passed.
  183. """
  184. ...
  185. class AccordionButton(ChakraComponent):
  186. @overload
  187. @classmethod
  188. def create( # type: ignore
  189. cls,
  190. *children,
  191. style: Optional[Style] = None,
  192. key: Optional[Any] = None,
  193. id: Optional[Any] = None,
  194. class_name: Optional[Any] = None,
  195. autofocus: Optional[bool] = None,
  196. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  197. on_blur: Optional[
  198. Union[EventHandler, EventSpec, list, function, BaseVar]
  199. ] = None,
  200. on_click: Optional[
  201. Union[EventHandler, EventSpec, list, function, BaseVar]
  202. ] = None,
  203. on_context_menu: Optional[
  204. Union[EventHandler, EventSpec, list, function, BaseVar]
  205. ] = None,
  206. on_double_click: Optional[
  207. Union[EventHandler, EventSpec, list, function, BaseVar]
  208. ] = None,
  209. on_focus: Optional[
  210. Union[EventHandler, EventSpec, list, function, BaseVar]
  211. ] = None,
  212. on_mount: Optional[
  213. Union[EventHandler, EventSpec, list, function, BaseVar]
  214. ] = None,
  215. on_mouse_down: Optional[
  216. Union[EventHandler, EventSpec, list, function, BaseVar]
  217. ] = None,
  218. on_mouse_enter: Optional[
  219. Union[EventHandler, EventSpec, list, function, BaseVar]
  220. ] = None,
  221. on_mouse_leave: Optional[
  222. Union[EventHandler, EventSpec, list, function, BaseVar]
  223. ] = None,
  224. on_mouse_move: Optional[
  225. Union[EventHandler, EventSpec, list, function, BaseVar]
  226. ] = None,
  227. on_mouse_out: Optional[
  228. Union[EventHandler, EventSpec, list, function, BaseVar]
  229. ] = None,
  230. on_mouse_over: Optional[
  231. Union[EventHandler, EventSpec, list, function, BaseVar]
  232. ] = None,
  233. on_mouse_up: Optional[
  234. Union[EventHandler, EventSpec, list, function, BaseVar]
  235. ] = None,
  236. on_scroll: Optional[
  237. Union[EventHandler, EventSpec, list, function, BaseVar]
  238. ] = None,
  239. on_unmount: Optional[
  240. Union[EventHandler, EventSpec, list, function, BaseVar]
  241. ] = None,
  242. **props
  243. ) -> "AccordionButton":
  244. """Create the component.
  245. Args:
  246. *children: The children of the component.
  247. style: The style of the component.
  248. key: A unique key for the component.
  249. id: The id for the component.
  250. class_name: The class name for the component.
  251. autofocus: Whether the component should take the focus once the page is loaded
  252. custom_attrs: custom attribute
  253. **props: The props of the component.
  254. Returns:
  255. The component.
  256. Raises:
  257. TypeError: If an invalid child is passed.
  258. """
  259. ...
  260. class AccordionPanel(ChakraComponent):
  261. @overload
  262. @classmethod
  263. def create( # type: ignore
  264. cls,
  265. *children,
  266. style: Optional[Style] = None,
  267. key: Optional[Any] = None,
  268. id: Optional[Any] = None,
  269. class_name: Optional[Any] = None,
  270. autofocus: Optional[bool] = None,
  271. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  272. on_blur: Optional[
  273. Union[EventHandler, EventSpec, list, function, BaseVar]
  274. ] = None,
  275. on_click: Optional[
  276. Union[EventHandler, EventSpec, list, function, BaseVar]
  277. ] = None,
  278. on_context_menu: Optional[
  279. Union[EventHandler, EventSpec, list, function, BaseVar]
  280. ] = None,
  281. on_double_click: Optional[
  282. Union[EventHandler, EventSpec, list, function, BaseVar]
  283. ] = None,
  284. on_focus: Optional[
  285. Union[EventHandler, EventSpec, list, function, BaseVar]
  286. ] = None,
  287. on_mount: Optional[
  288. Union[EventHandler, EventSpec, list, function, BaseVar]
  289. ] = None,
  290. on_mouse_down: Optional[
  291. Union[EventHandler, EventSpec, list, function, BaseVar]
  292. ] = None,
  293. on_mouse_enter: Optional[
  294. Union[EventHandler, EventSpec, list, function, BaseVar]
  295. ] = None,
  296. on_mouse_leave: Optional[
  297. Union[EventHandler, EventSpec, list, function, BaseVar]
  298. ] = None,
  299. on_mouse_move: Optional[
  300. Union[EventHandler, EventSpec, list, function, BaseVar]
  301. ] = None,
  302. on_mouse_out: Optional[
  303. Union[EventHandler, EventSpec, list, function, BaseVar]
  304. ] = None,
  305. on_mouse_over: Optional[
  306. Union[EventHandler, EventSpec, list, function, BaseVar]
  307. ] = None,
  308. on_mouse_up: Optional[
  309. Union[EventHandler, EventSpec, list, function, BaseVar]
  310. ] = None,
  311. on_scroll: Optional[
  312. Union[EventHandler, EventSpec, list, function, BaseVar]
  313. ] = None,
  314. on_unmount: Optional[
  315. Union[EventHandler, EventSpec, list, function, BaseVar]
  316. ] = None,
  317. **props
  318. ) -> "AccordionPanel":
  319. """Create the component.
  320. Args:
  321. *children: The children of the component.
  322. style: The style of the component.
  323. key: A unique key for the component.
  324. id: The id for the component.
  325. class_name: The class name for the component.
  326. autofocus: Whether the component should take the focus once the page is loaded
  327. custom_attrs: custom attribute
  328. **props: The props of the component.
  329. Returns:
  330. The component.
  331. Raises:
  332. TypeError: If an invalid child is passed.
  333. """
  334. ...
  335. class AccordionIcon(ChakraComponent):
  336. @overload
  337. @classmethod
  338. def create( # type: ignore
  339. cls,
  340. *children,
  341. style: Optional[Style] = None,
  342. key: Optional[Any] = None,
  343. id: Optional[Any] = None,
  344. class_name: Optional[Any] = None,
  345. autofocus: Optional[bool] = None,
  346. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  347. on_blur: Optional[
  348. Union[EventHandler, EventSpec, list, function, BaseVar]
  349. ] = None,
  350. on_click: Optional[
  351. Union[EventHandler, EventSpec, list, function, BaseVar]
  352. ] = None,
  353. on_context_menu: Optional[
  354. Union[EventHandler, EventSpec, list, function, BaseVar]
  355. ] = None,
  356. on_double_click: Optional[
  357. Union[EventHandler, EventSpec, list, function, BaseVar]
  358. ] = None,
  359. on_focus: Optional[
  360. Union[EventHandler, EventSpec, list, function, BaseVar]
  361. ] = None,
  362. on_mount: Optional[
  363. Union[EventHandler, EventSpec, list, function, BaseVar]
  364. ] = None,
  365. on_mouse_down: Optional[
  366. Union[EventHandler, EventSpec, list, function, BaseVar]
  367. ] = None,
  368. on_mouse_enter: Optional[
  369. Union[EventHandler, EventSpec, list, function, BaseVar]
  370. ] = None,
  371. on_mouse_leave: Optional[
  372. Union[EventHandler, EventSpec, list, function, BaseVar]
  373. ] = None,
  374. on_mouse_move: Optional[
  375. Union[EventHandler, EventSpec, list, function, BaseVar]
  376. ] = None,
  377. on_mouse_out: Optional[
  378. Union[EventHandler, EventSpec, list, function, BaseVar]
  379. ] = None,
  380. on_mouse_over: Optional[
  381. Union[EventHandler, EventSpec, list, function, BaseVar]
  382. ] = None,
  383. on_mouse_up: Optional[
  384. Union[EventHandler, EventSpec, list, function, BaseVar]
  385. ] = None,
  386. on_scroll: Optional[
  387. Union[EventHandler, EventSpec, list, function, BaseVar]
  388. ] = None,
  389. on_unmount: Optional[
  390. Union[EventHandler, EventSpec, list, function, BaseVar]
  391. ] = None,
  392. **props
  393. ) -> "AccordionIcon":
  394. """Create the component.
  395. Args:
  396. *children: The children of the component.
  397. style: The style of the component.
  398. key: A unique key for the component.
  399. id: The id for the component.
  400. class_name: The class name for the component.
  401. autofocus: Whether the component should take the focus once the page is loaded
  402. custom_attrs: custom attribute
  403. **props: The props of the component.
  404. Returns:
  405. The component.
  406. Raises:
  407. TypeError: If an invalid child is passed.
  408. """
  409. ...