tabs.pyi 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. """Stub file for reflex/components/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.component import Component
  11. from reflex.components.libs.chakra import (
  12. ChakraComponent,
  13. LiteralColorScheme,
  14. LiteralTabsVariant,
  15. LiteralTagAlign,
  16. )
  17. from reflex.vars import Var
  18. class Tabs(ChakraComponent):
  19. @overload
  20. @classmethod
  21. def create( # type: ignore
  22. cls,
  23. *children,
  24. items: Optional[List[Tuple[str, str]]] = None,
  25. align: Optional[
  26. Union[
  27. Var[Literal["center", "end", "start"]],
  28. Literal["center", "end", "start"],
  29. ]
  30. ] = None,
  31. default_index: Optional[Union[Var[int], int]] = None,
  32. id_: Optional[Union[Var[str], str]] = None,
  33. is_fitted: Optional[Union[Var[bool], bool]] = None,
  34. is_lazy: Optional[Union[Var[bool], bool]] = None,
  35. is_manual: Optional[Union[Var[bool], bool]] = None,
  36. orientation: Optional[Union[Var[str], str]] = None,
  37. variant: Optional[
  38. Union[
  39. Var[
  40. Literal[
  41. "line",
  42. "enclosed",
  43. "enclosed-colored",
  44. "soft-rounded",
  45. "solid-rounded",
  46. "unstyled",
  47. ]
  48. ],
  49. Literal[
  50. "line",
  51. "enclosed",
  52. "enclosed-colored",
  53. "soft-rounded",
  54. "solid-rounded",
  55. "unstyled",
  56. ],
  57. ]
  58. ] = None,
  59. color_scheme: Optional[
  60. Union[
  61. Var[
  62. Literal[
  63. "none",
  64. "gray",
  65. "red",
  66. "orange",
  67. "yellow",
  68. "green",
  69. "teal",
  70. "blue",
  71. "cyan",
  72. "purple",
  73. "pink",
  74. "whiteAlpha",
  75. "blackAlpha",
  76. "linkedin",
  77. "facebook",
  78. "messenger",
  79. "whatsapp",
  80. "twitter",
  81. "telegram",
  82. ]
  83. ],
  84. Literal[
  85. "none",
  86. "gray",
  87. "red",
  88. "orange",
  89. "yellow",
  90. "green",
  91. "teal",
  92. "blue",
  93. "cyan",
  94. "purple",
  95. "pink",
  96. "whiteAlpha",
  97. "blackAlpha",
  98. "linkedin",
  99. "facebook",
  100. "messenger",
  101. "whatsapp",
  102. "twitter",
  103. "telegram",
  104. ],
  105. ]
  106. ] = None,
  107. index: Optional[Union[Var[int], int]] = None,
  108. style: Optional[Style] = None,
  109. key: Optional[Any] = None,
  110. id: Optional[Any] = None,
  111. class_name: Optional[Any] = None,
  112. autofocus: Optional[bool] = None,
  113. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  114. on_blur: Optional[
  115. Union[EventHandler, EventSpec, list, function, BaseVar]
  116. ] = None,
  117. on_click: Optional[
  118. Union[EventHandler, EventSpec, list, function, BaseVar]
  119. ] = None,
  120. on_context_menu: Optional[
  121. Union[EventHandler, EventSpec, list, function, BaseVar]
  122. ] = None,
  123. on_double_click: Optional[
  124. Union[EventHandler, EventSpec, list, function, BaseVar]
  125. ] = None,
  126. on_focus: Optional[
  127. Union[EventHandler, EventSpec, list, function, BaseVar]
  128. ] = None,
  129. on_mount: Optional[
  130. Union[EventHandler, EventSpec, list, function, BaseVar]
  131. ] = None,
  132. on_mouse_down: Optional[
  133. Union[EventHandler, EventSpec, list, function, BaseVar]
  134. ] = None,
  135. on_mouse_enter: Optional[
  136. Union[EventHandler, EventSpec, list, function, BaseVar]
  137. ] = None,
  138. on_mouse_leave: Optional[
  139. Union[EventHandler, EventSpec, list, function, BaseVar]
  140. ] = None,
  141. on_mouse_move: Optional[
  142. Union[EventHandler, EventSpec, list, function, BaseVar]
  143. ] = None,
  144. on_mouse_out: Optional[
  145. Union[EventHandler, EventSpec, list, function, BaseVar]
  146. ] = None,
  147. on_mouse_over: Optional[
  148. Union[EventHandler, EventSpec, list, function, BaseVar]
  149. ] = None,
  150. on_mouse_up: Optional[
  151. Union[EventHandler, EventSpec, list, function, BaseVar]
  152. ] = None,
  153. on_scroll: Optional[
  154. Union[EventHandler, EventSpec, list, function, BaseVar]
  155. ] = None,
  156. on_unmount: Optional[
  157. Union[EventHandler, EventSpec, list, function, BaseVar]
  158. ] = None,
  159. **props
  160. ) -> "Tabs":
  161. """Create a tab component.
  162. Args:
  163. *children: The children of the component.
  164. items: The items for the tabs component, a list of tuple (label, panel)
  165. align: The alignment of the tabs ("center" | "end" | "start").
  166. default_index: The initial index of the selected tab (in uncontrolled mode).
  167. id_: The id of the tab.
  168. is_fitted: If true, tabs will stretch to width of the tablist.
  169. is_lazy: Performance booster. If true, rendering of the tab panel's will be deferred until it is selected.
  170. 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.
  171. orientation: The orientation of the tab list.
  172. variant: "line" | "enclosed" | "enclosed-colored" | "soft-rounded" | "solid-rounded" | "unstyled"
  173. color_scheme: The color scheme of the tabs.
  174. index: Index of the selected tab (in controlled mode).
  175. style: The style of the component.
  176. key: A unique key for the component.
  177. id: The id for the component.
  178. class_name: The class name for the component.
  179. autofocus: Whether the component should take the focus once the page is loaded
  180. custom_attrs: custom attribute
  181. **props: The properties of the component.
  182. Returns:
  183. The tab component
  184. """
  185. ...
  186. class Tab(ChakraComponent):
  187. @overload
  188. @classmethod
  189. def create( # type: ignore
  190. cls,
  191. *children,
  192. is_disabled: Optional[Union[Var[bool], bool]] = None,
  193. is_selected: Optional[Union[Var[bool], bool]] = None,
  194. id_: Optional[Union[Var[str], str]] = None,
  195. panel_id: Optional[Union[Var[str], str]] = None,
  196. style: Optional[Style] = None,
  197. key: Optional[Any] = None,
  198. id: Optional[Any] = None,
  199. class_name: Optional[Any] = None,
  200. autofocus: Optional[bool] = None,
  201. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  202. on_blur: Optional[
  203. Union[EventHandler, EventSpec, list, function, BaseVar]
  204. ] = None,
  205. on_click: Optional[
  206. Union[EventHandler, EventSpec, list, function, BaseVar]
  207. ] = None,
  208. on_context_menu: Optional[
  209. Union[EventHandler, EventSpec, list, function, BaseVar]
  210. ] = None,
  211. on_double_click: Optional[
  212. Union[EventHandler, EventSpec, list, function, BaseVar]
  213. ] = None,
  214. on_focus: Optional[
  215. Union[EventHandler, EventSpec, list, function, BaseVar]
  216. ] = None,
  217. on_mount: Optional[
  218. Union[EventHandler, EventSpec, list, function, BaseVar]
  219. ] = None,
  220. on_mouse_down: Optional[
  221. Union[EventHandler, EventSpec, list, function, BaseVar]
  222. ] = None,
  223. on_mouse_enter: Optional[
  224. Union[EventHandler, EventSpec, list, function, BaseVar]
  225. ] = None,
  226. on_mouse_leave: Optional[
  227. Union[EventHandler, EventSpec, list, function, BaseVar]
  228. ] = None,
  229. on_mouse_move: Optional[
  230. Union[EventHandler, EventSpec, list, function, BaseVar]
  231. ] = None,
  232. on_mouse_out: Optional[
  233. Union[EventHandler, EventSpec, list, function, BaseVar]
  234. ] = None,
  235. on_mouse_over: Optional[
  236. Union[EventHandler, EventSpec, list, function, BaseVar]
  237. ] = None,
  238. on_mouse_up: Optional[
  239. Union[EventHandler, EventSpec, list, function, BaseVar]
  240. ] = None,
  241. on_scroll: Optional[
  242. Union[EventHandler, EventSpec, list, function, BaseVar]
  243. ] = None,
  244. on_unmount: Optional[
  245. Union[EventHandler, EventSpec, list, function, BaseVar]
  246. ] = None,
  247. **props
  248. ) -> "Tab":
  249. """Create the component.
  250. Args:
  251. *children: The children of the component.
  252. is_disabled: If true, the Tab won't be toggleable.
  253. is_selected: If true, the Tab will be selected.
  254. id_: The id of the tab.
  255. panel_id: The id of the panel.
  256. style: The style of the component.
  257. key: A unique key for the component.
  258. id: The id for the component.
  259. class_name: The class name for the component.
  260. autofocus: Whether the component should take the focus once the page is loaded
  261. custom_attrs: custom attribute
  262. **props: The props of the component.
  263. Returns:
  264. The component.
  265. Raises:
  266. TypeError: If an invalid child is passed.
  267. """
  268. ...
  269. class TabList(ChakraComponent):
  270. @overload
  271. @classmethod
  272. def create( # type: ignore
  273. cls,
  274. *children,
  275. style: Optional[Style] = None,
  276. key: Optional[Any] = None,
  277. id: Optional[Any] = None,
  278. class_name: Optional[Any] = None,
  279. autofocus: Optional[bool] = None,
  280. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  281. on_blur: Optional[
  282. Union[EventHandler, EventSpec, list, function, BaseVar]
  283. ] = None,
  284. on_click: Optional[
  285. Union[EventHandler, EventSpec, list, function, BaseVar]
  286. ] = None,
  287. on_context_menu: Optional[
  288. Union[EventHandler, EventSpec, list, function, BaseVar]
  289. ] = None,
  290. on_double_click: Optional[
  291. Union[EventHandler, EventSpec, list, function, BaseVar]
  292. ] = None,
  293. on_focus: Optional[
  294. Union[EventHandler, EventSpec, list, function, BaseVar]
  295. ] = None,
  296. on_mount: Optional[
  297. Union[EventHandler, EventSpec, list, function, BaseVar]
  298. ] = None,
  299. on_mouse_down: Optional[
  300. Union[EventHandler, EventSpec, list, function, BaseVar]
  301. ] = None,
  302. on_mouse_enter: Optional[
  303. Union[EventHandler, EventSpec, list, function, BaseVar]
  304. ] = None,
  305. on_mouse_leave: Optional[
  306. Union[EventHandler, EventSpec, list, function, BaseVar]
  307. ] = None,
  308. on_mouse_move: Optional[
  309. Union[EventHandler, EventSpec, list, function, BaseVar]
  310. ] = None,
  311. on_mouse_out: Optional[
  312. Union[EventHandler, EventSpec, list, function, BaseVar]
  313. ] = None,
  314. on_mouse_over: Optional[
  315. Union[EventHandler, EventSpec, list, function, BaseVar]
  316. ] = None,
  317. on_mouse_up: Optional[
  318. Union[EventHandler, EventSpec, list, function, BaseVar]
  319. ] = None,
  320. on_scroll: Optional[
  321. Union[EventHandler, EventSpec, list, function, BaseVar]
  322. ] = None,
  323. on_unmount: Optional[
  324. Union[EventHandler, EventSpec, list, function, BaseVar]
  325. ] = None,
  326. **props
  327. ) -> "TabList":
  328. """Create the component.
  329. Args:
  330. *children: The children of the component.
  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 TabPanels(ChakraComponent):
  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. ) -> "TabPanels":
  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 TabPanel(ChakraComponent):
  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. ) -> "TabPanel":
  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. ...