tabs.pyi 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. """Stub file for reflex/components/chakra/disclosure/tabs.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, Tuple
  10. from reflex.components.chakra import (
  11. ChakraComponent,
  12. LiteralColorScheme,
  13. LiteralTabsVariant,
  14. LiteralTagAlign,
  15. )
  16. from reflex.components.component import Component
  17. from reflex.vars import Var
  18. class BaseTabs(ChakraComponent):
  19. @overload
  20. @classmethod
  21. def create( # type: ignore
  22. cls,
  23. *children,
  24. style: Optional[Style] = None,
  25. key: Optional[Any] = None,
  26. id: Optional[Any] = None,
  27. class_name: Optional[Any] = None,
  28. autofocus: Optional[bool] = None,
  29. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  30. on_blur: Optional[
  31. Union[EventHandler, EventSpec, list, function, BaseVar]
  32. ] = None,
  33. on_click: Optional[
  34. Union[EventHandler, EventSpec, list, function, BaseVar]
  35. ] = None,
  36. on_context_menu: Optional[
  37. Union[EventHandler, EventSpec, list, function, BaseVar]
  38. ] = None,
  39. on_double_click: Optional[
  40. Union[EventHandler, EventSpec, list, function, BaseVar]
  41. ] = None,
  42. on_focus: Optional[
  43. Union[EventHandler, EventSpec, list, function, BaseVar]
  44. ] = None,
  45. on_mount: Optional[
  46. Union[EventHandler, EventSpec, list, function, BaseVar]
  47. ] = None,
  48. on_mouse_down: Optional[
  49. Union[EventHandler, EventSpec, list, function, BaseVar]
  50. ] = None,
  51. on_mouse_enter: Optional[
  52. Union[EventHandler, EventSpec, list, function, BaseVar]
  53. ] = None,
  54. on_mouse_leave: Optional[
  55. Union[EventHandler, EventSpec, list, function, BaseVar]
  56. ] = None,
  57. on_mouse_move: Optional[
  58. Union[EventHandler, EventSpec, list, function, BaseVar]
  59. ] = None,
  60. on_mouse_out: Optional[
  61. Union[EventHandler, EventSpec, list, function, BaseVar]
  62. ] = None,
  63. on_mouse_over: Optional[
  64. Union[EventHandler, EventSpec, list, function, BaseVar]
  65. ] = None,
  66. on_mouse_up: Optional[
  67. Union[EventHandler, EventSpec, list, function, BaseVar]
  68. ] = None,
  69. on_scroll: Optional[
  70. Union[EventHandler, EventSpec, list, function, BaseVar]
  71. ] = None,
  72. on_unmount: Optional[
  73. Union[EventHandler, EventSpec, list, function, BaseVar]
  74. ] = None,
  75. **props
  76. ) -> "BaseTabs":
  77. """Create the component.
  78. Args:
  79. *children: The children of the component.
  80. style: The style of the component.
  81. key: A unique key for the component.
  82. id: The id for the component.
  83. class_name: The class name for the component.
  84. autofocus: Whether the component should take the focus once the page is loaded
  85. custom_attrs: custom attribute
  86. **props: The props of the component.
  87. Returns:
  88. The component.
  89. Raises:
  90. TypeError: If an invalid child is passed.
  91. """
  92. ...
  93. class Tabs(BaseTabs):
  94. @overload
  95. @classmethod
  96. def create( # type: ignore
  97. cls,
  98. *children,
  99. items: Optional[List[Tuple[str, str]]] = None,
  100. align: Optional[
  101. Union[
  102. Var[Literal["center", "end", "start"]],
  103. Literal["center", "end", "start"],
  104. ]
  105. ] = None,
  106. default_index: Optional[Union[Var[int], int]] = None,
  107. id_: Optional[Union[Var[str], str]] = None,
  108. is_fitted: Optional[Union[Var[bool], bool]] = None,
  109. is_lazy: Optional[Union[Var[bool], bool]] = None,
  110. is_manual: Optional[Union[Var[bool], bool]] = None,
  111. orientation: Optional[Union[Var[str], str]] = None,
  112. variant: Optional[
  113. Union[
  114. Var[
  115. Literal[
  116. "line",
  117. "enclosed",
  118. "enclosed-colored",
  119. "soft-rounded",
  120. "solid-rounded",
  121. "unstyled",
  122. ]
  123. ],
  124. Literal[
  125. "line",
  126. "enclosed",
  127. "enclosed-colored",
  128. "soft-rounded",
  129. "solid-rounded",
  130. "unstyled",
  131. ],
  132. ]
  133. ] = None,
  134. color_scheme: Optional[
  135. Union[
  136. Var[
  137. Literal[
  138. "none",
  139. "gray",
  140. "red",
  141. "orange",
  142. "yellow",
  143. "green",
  144. "teal",
  145. "blue",
  146. "cyan",
  147. "purple",
  148. "pink",
  149. "whiteAlpha",
  150. "blackAlpha",
  151. "linkedin",
  152. "facebook",
  153. "messenger",
  154. "whatsapp",
  155. "twitter",
  156. "telegram",
  157. ]
  158. ],
  159. Literal[
  160. "none",
  161. "gray",
  162. "red",
  163. "orange",
  164. "yellow",
  165. "green",
  166. "teal",
  167. "blue",
  168. "cyan",
  169. "purple",
  170. "pink",
  171. "whiteAlpha",
  172. "blackAlpha",
  173. "linkedin",
  174. "facebook",
  175. "messenger",
  176. "whatsapp",
  177. "twitter",
  178. "telegram",
  179. ],
  180. ]
  181. ] = None,
  182. index: Optional[Union[Var[int], int]] = None,
  183. style: Optional[Style] = None,
  184. key: Optional[Any] = None,
  185. id: Optional[Any] = None,
  186. class_name: Optional[Any] = None,
  187. autofocus: Optional[bool] = None,
  188. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  189. on_blur: Optional[
  190. Union[EventHandler, EventSpec, list, function, BaseVar]
  191. ] = None,
  192. on_click: Optional[
  193. Union[EventHandler, EventSpec, list, function, BaseVar]
  194. ] = None,
  195. on_context_menu: Optional[
  196. Union[EventHandler, EventSpec, list, function, BaseVar]
  197. ] = None,
  198. on_double_click: Optional[
  199. Union[EventHandler, EventSpec, list, function, BaseVar]
  200. ] = None,
  201. on_focus: Optional[
  202. Union[EventHandler, EventSpec, list, function, BaseVar]
  203. ] = None,
  204. on_mount: Optional[
  205. Union[EventHandler, EventSpec, list, function, BaseVar]
  206. ] = None,
  207. on_mouse_down: Optional[
  208. Union[EventHandler, EventSpec, list, function, BaseVar]
  209. ] = None,
  210. on_mouse_enter: Optional[
  211. Union[EventHandler, EventSpec, list, function, BaseVar]
  212. ] = None,
  213. on_mouse_leave: Optional[
  214. Union[EventHandler, EventSpec, list, function, BaseVar]
  215. ] = None,
  216. on_mouse_move: Optional[
  217. Union[EventHandler, EventSpec, list, function, BaseVar]
  218. ] = None,
  219. on_mouse_out: Optional[
  220. Union[EventHandler, EventSpec, list, function, BaseVar]
  221. ] = None,
  222. on_mouse_over: Optional[
  223. Union[EventHandler, EventSpec, list, function, BaseVar]
  224. ] = None,
  225. on_mouse_up: Optional[
  226. Union[EventHandler, EventSpec, list, function, BaseVar]
  227. ] = None,
  228. on_scroll: Optional[
  229. Union[EventHandler, EventSpec, list, function, BaseVar]
  230. ] = None,
  231. on_unmount: Optional[
  232. Union[EventHandler, EventSpec, list, function, BaseVar]
  233. ] = None,
  234. **props
  235. ) -> "Tabs":
  236. """Create a tab component.
  237. Args:
  238. *children: The children of the component.
  239. items: The items for the tabs component, a list of tuple (label, panel)
  240. align: The alignment of the tabs ("center" | "end" | "start").
  241. default_index: The initial index of the selected tab (in uncontrolled mode).
  242. id_: The id of the tab.
  243. is_fitted: If true, tabs will stretch to width of the tablist.
  244. is_lazy: Performance booster. If true, rendering of the tab panel's will be deferred until it is selected.
  245. is_manual: If true, the tabs will be manually activated and display its panel by pressing Space or Enter. If false, the tabs will be automatically activated and their panel is displayed when they receive focus.
  246. orientation: The orientation of the tab list.
  247. variant: "line" | "enclosed" | "enclosed-colored" | "soft-rounded" | "solid-rounded" | "unstyled"
  248. color_scheme: The color scheme of the tabs.
  249. index: Index of the selected tab (in controlled mode).
  250. style: The style of the component.
  251. key: A unique key for the component.
  252. id: The id for the component.
  253. class_name: The class name for the component.
  254. autofocus: Whether the component should take the focus once the page is loaded
  255. custom_attrs: custom attribute
  256. **props: The properties of the component.
  257. Returns:
  258. The tab component
  259. """
  260. ...
  261. class Tab(BaseTabs):
  262. @overload
  263. @classmethod
  264. def create( # type: ignore
  265. cls,
  266. *children,
  267. is_disabled: Optional[Union[Var[bool], bool]] = None,
  268. is_selected: Optional[Union[Var[bool], bool]] = None,
  269. id_: Optional[Union[Var[str], str]] = None,
  270. panel_id: Optional[Union[Var[str], str]] = None,
  271. style: Optional[Style] = None,
  272. key: Optional[Any] = None,
  273. id: Optional[Any] = None,
  274. class_name: Optional[Any] = None,
  275. autofocus: Optional[bool] = None,
  276. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  277. on_blur: Optional[
  278. Union[EventHandler, EventSpec, list, function, BaseVar]
  279. ] = None,
  280. on_click: Optional[
  281. Union[EventHandler, EventSpec, list, function, BaseVar]
  282. ] = None,
  283. on_context_menu: Optional[
  284. Union[EventHandler, EventSpec, list, function, BaseVar]
  285. ] = None,
  286. on_double_click: Optional[
  287. Union[EventHandler, EventSpec, list, function, BaseVar]
  288. ] = None,
  289. on_focus: Optional[
  290. Union[EventHandler, EventSpec, list, function, BaseVar]
  291. ] = None,
  292. on_mount: Optional[
  293. Union[EventHandler, EventSpec, list, function, BaseVar]
  294. ] = None,
  295. on_mouse_down: Optional[
  296. Union[EventHandler, EventSpec, list, function, BaseVar]
  297. ] = None,
  298. on_mouse_enter: Optional[
  299. Union[EventHandler, EventSpec, list, function, BaseVar]
  300. ] = None,
  301. on_mouse_leave: Optional[
  302. Union[EventHandler, EventSpec, list, function, BaseVar]
  303. ] = None,
  304. on_mouse_move: Optional[
  305. Union[EventHandler, EventSpec, list, function, BaseVar]
  306. ] = None,
  307. on_mouse_out: Optional[
  308. Union[EventHandler, EventSpec, list, function, BaseVar]
  309. ] = None,
  310. on_mouse_over: Optional[
  311. Union[EventHandler, EventSpec, list, function, BaseVar]
  312. ] = None,
  313. on_mouse_up: Optional[
  314. Union[EventHandler, EventSpec, list, function, BaseVar]
  315. ] = None,
  316. on_scroll: Optional[
  317. Union[EventHandler, EventSpec, list, function, BaseVar]
  318. ] = None,
  319. on_unmount: Optional[
  320. Union[EventHandler, EventSpec, list, function, BaseVar]
  321. ] = None,
  322. **props
  323. ) -> "Tab":
  324. """Create the component.
  325. Args:
  326. *children: The children of the component.
  327. is_disabled: If true, the Tab won't be toggleable.
  328. is_selected: If true, the Tab will be selected.
  329. id_: The id of the tab.
  330. panel_id: The id of the panel.
  331. style: The style of the component.
  332. key: A unique key for the component.
  333. id: The id for the component.
  334. class_name: The class name for the component.
  335. autofocus: Whether the component should take the focus once the page is loaded
  336. custom_attrs: custom attribute
  337. **props: The props of the component.
  338. Returns:
  339. The component.
  340. Raises:
  341. TypeError: If an invalid child is passed.
  342. """
  343. ...
  344. class TabList(BaseTabs):
  345. @overload
  346. @classmethod
  347. def create( # type: ignore
  348. cls,
  349. *children,
  350. style: Optional[Style] = None,
  351. key: Optional[Any] = None,
  352. id: Optional[Any] = None,
  353. class_name: Optional[Any] = None,
  354. autofocus: Optional[bool] = None,
  355. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  356. on_blur: Optional[
  357. Union[EventHandler, EventSpec, list, function, BaseVar]
  358. ] = None,
  359. on_click: Optional[
  360. Union[EventHandler, EventSpec, list, function, BaseVar]
  361. ] = None,
  362. on_context_menu: Optional[
  363. Union[EventHandler, EventSpec, list, function, BaseVar]
  364. ] = None,
  365. on_double_click: Optional[
  366. Union[EventHandler, EventSpec, list, function, BaseVar]
  367. ] = None,
  368. on_focus: Optional[
  369. Union[EventHandler, EventSpec, list, function, BaseVar]
  370. ] = None,
  371. on_mount: Optional[
  372. Union[EventHandler, EventSpec, list, function, BaseVar]
  373. ] = None,
  374. on_mouse_down: Optional[
  375. Union[EventHandler, EventSpec, list, function, BaseVar]
  376. ] = None,
  377. on_mouse_enter: Optional[
  378. Union[EventHandler, EventSpec, list, function, BaseVar]
  379. ] = None,
  380. on_mouse_leave: Optional[
  381. Union[EventHandler, EventSpec, list, function, BaseVar]
  382. ] = None,
  383. on_mouse_move: Optional[
  384. Union[EventHandler, EventSpec, list, function, BaseVar]
  385. ] = None,
  386. on_mouse_out: Optional[
  387. Union[EventHandler, EventSpec, list, function, BaseVar]
  388. ] = None,
  389. on_mouse_over: Optional[
  390. Union[EventHandler, EventSpec, list, function, BaseVar]
  391. ] = None,
  392. on_mouse_up: Optional[
  393. Union[EventHandler, EventSpec, list, function, BaseVar]
  394. ] = None,
  395. on_scroll: Optional[
  396. Union[EventHandler, EventSpec, list, function, BaseVar]
  397. ] = None,
  398. on_unmount: Optional[
  399. Union[EventHandler, EventSpec, list, function, BaseVar]
  400. ] = None,
  401. **props
  402. ) -> "TabList":
  403. """Create the component.
  404. Args:
  405. *children: The children of the component.
  406. style: The style of the component.
  407. key: A unique key for the component.
  408. id: The id for the component.
  409. class_name: The class name for the component.
  410. autofocus: Whether the component should take the focus once the page is loaded
  411. custom_attrs: custom attribute
  412. **props: The props of the component.
  413. Returns:
  414. The component.
  415. Raises:
  416. TypeError: If an invalid child is passed.
  417. """
  418. ...
  419. class TabPanels(BaseTabs):
  420. @overload
  421. @classmethod
  422. def create( # type: ignore
  423. cls,
  424. *children,
  425. style: Optional[Style] = None,
  426. key: Optional[Any] = None,
  427. id: Optional[Any] = None,
  428. class_name: Optional[Any] = None,
  429. autofocus: Optional[bool] = None,
  430. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  431. on_blur: Optional[
  432. Union[EventHandler, EventSpec, list, function, BaseVar]
  433. ] = None,
  434. on_click: Optional[
  435. Union[EventHandler, EventSpec, list, function, BaseVar]
  436. ] = None,
  437. on_context_menu: Optional[
  438. Union[EventHandler, EventSpec, list, function, BaseVar]
  439. ] = None,
  440. on_double_click: Optional[
  441. Union[EventHandler, EventSpec, list, function, BaseVar]
  442. ] = None,
  443. on_focus: Optional[
  444. Union[EventHandler, EventSpec, list, function, BaseVar]
  445. ] = None,
  446. on_mount: Optional[
  447. Union[EventHandler, EventSpec, list, function, BaseVar]
  448. ] = None,
  449. on_mouse_down: Optional[
  450. Union[EventHandler, EventSpec, list, function, BaseVar]
  451. ] = None,
  452. on_mouse_enter: Optional[
  453. Union[EventHandler, EventSpec, list, function, BaseVar]
  454. ] = None,
  455. on_mouse_leave: Optional[
  456. Union[EventHandler, EventSpec, list, function, BaseVar]
  457. ] = None,
  458. on_mouse_move: Optional[
  459. Union[EventHandler, EventSpec, list, function, BaseVar]
  460. ] = None,
  461. on_mouse_out: Optional[
  462. Union[EventHandler, EventSpec, list, function, BaseVar]
  463. ] = None,
  464. on_mouse_over: Optional[
  465. Union[EventHandler, EventSpec, list, function, BaseVar]
  466. ] = None,
  467. on_mouse_up: Optional[
  468. Union[EventHandler, EventSpec, list, function, BaseVar]
  469. ] = None,
  470. on_scroll: Optional[
  471. Union[EventHandler, EventSpec, list, function, BaseVar]
  472. ] = None,
  473. on_unmount: Optional[
  474. Union[EventHandler, EventSpec, list, function, BaseVar]
  475. ] = None,
  476. **props
  477. ) -> "TabPanels":
  478. """Create the component.
  479. Args:
  480. *children: The children of the component.
  481. style: The style of the component.
  482. key: A unique key for the component.
  483. id: The id for the component.
  484. class_name: The class name for the component.
  485. autofocus: Whether the component should take the focus once the page is loaded
  486. custom_attrs: custom attribute
  487. **props: The props of the component.
  488. Returns:
  489. The component.
  490. Raises:
  491. TypeError: If an invalid child is passed.
  492. """
  493. ...
  494. class TabPanel(BaseTabs):
  495. @overload
  496. @classmethod
  497. def create( # type: ignore
  498. cls,
  499. *children,
  500. style: Optional[Style] = None,
  501. key: Optional[Any] = None,
  502. id: Optional[Any] = None,
  503. class_name: Optional[Any] = None,
  504. autofocus: Optional[bool] = None,
  505. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  506. on_blur: Optional[
  507. Union[EventHandler, EventSpec, list, function, BaseVar]
  508. ] = None,
  509. on_click: Optional[
  510. Union[EventHandler, EventSpec, list, function, BaseVar]
  511. ] = None,
  512. on_context_menu: Optional[
  513. Union[EventHandler, EventSpec, list, function, BaseVar]
  514. ] = None,
  515. on_double_click: Optional[
  516. Union[EventHandler, EventSpec, list, function, BaseVar]
  517. ] = None,
  518. on_focus: Optional[
  519. Union[EventHandler, EventSpec, list, function, BaseVar]
  520. ] = None,
  521. on_mount: Optional[
  522. Union[EventHandler, EventSpec, list, function, BaseVar]
  523. ] = None,
  524. on_mouse_down: Optional[
  525. Union[EventHandler, EventSpec, list, function, BaseVar]
  526. ] = None,
  527. on_mouse_enter: Optional[
  528. Union[EventHandler, EventSpec, list, function, BaseVar]
  529. ] = None,
  530. on_mouse_leave: Optional[
  531. Union[EventHandler, EventSpec, list, function, BaseVar]
  532. ] = None,
  533. on_mouse_move: Optional[
  534. Union[EventHandler, EventSpec, list, function, BaseVar]
  535. ] = None,
  536. on_mouse_out: Optional[
  537. Union[EventHandler, EventSpec, list, function, BaseVar]
  538. ] = None,
  539. on_mouse_over: Optional[
  540. Union[EventHandler, EventSpec, list, function, BaseVar]
  541. ] = None,
  542. on_mouse_up: Optional[
  543. Union[EventHandler, EventSpec, list, function, BaseVar]
  544. ] = None,
  545. on_scroll: Optional[
  546. Union[EventHandler, EventSpec, list, function, BaseVar]
  547. ] = None,
  548. on_unmount: Optional[
  549. Union[EventHandler, EventSpec, list, function, BaseVar]
  550. ] = None,
  551. **props
  552. ) -> "TabPanel":
  553. """Create the component.
  554. Args:
  555. *children: The children of the component.
  556. style: The style of the component.
  557. key: A unique key for the component.
  558. id: The id for the component.
  559. class_name: The class name for the component.
  560. autofocus: Whether the component should take the focus once the page is loaded
  561. custom_attrs: custom attribute
  562. **props: The props of the component.
  563. Returns:
  564. The component.
  565. Raises:
  566. TypeError: If an invalid child is passed.
  567. """
  568. ...