breadcrumb.pyi 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. """Stub file for reflex/components/chakra/navigation/breadcrumb.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/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 reflex.components.chakra import ChakraComponent
  10. from reflex.components.chakra.navigation.link import Link
  11. from reflex.components.component import Component
  12. from reflex.components.core.foreach import Foreach
  13. from reflex.vars import Var
  14. class Breadcrumb(ChakraComponent):
  15. @overload
  16. @classmethod
  17. def create( # type: ignore
  18. cls,
  19. *children,
  20. items=None,
  21. separator: Optional[Union[Var[str], str]] = None,
  22. separator_margin: Optional[Union[Var[str], str]] = None,
  23. style: Optional[Style] = None,
  24. key: Optional[Any] = None,
  25. id: Optional[Any] = None,
  26. class_name: Optional[Any] = None,
  27. autofocus: Optional[bool] = None,
  28. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  29. on_blur: Optional[
  30. Union[EventHandler, EventSpec, list, function, BaseVar]
  31. ] = None,
  32. on_click: Optional[
  33. Union[EventHandler, EventSpec, list, function, BaseVar]
  34. ] = None,
  35. on_context_menu: Optional[
  36. Union[EventHandler, EventSpec, list, function, BaseVar]
  37. ] = None,
  38. on_double_click: Optional[
  39. Union[EventHandler, EventSpec, list, function, BaseVar]
  40. ] = None,
  41. on_focus: Optional[
  42. Union[EventHandler, EventSpec, list, function, BaseVar]
  43. ] = None,
  44. on_mount: Optional[
  45. Union[EventHandler, EventSpec, list, function, BaseVar]
  46. ] = None,
  47. on_mouse_down: Optional[
  48. Union[EventHandler, EventSpec, list, function, BaseVar]
  49. ] = None,
  50. on_mouse_enter: Optional[
  51. Union[EventHandler, EventSpec, list, function, BaseVar]
  52. ] = None,
  53. on_mouse_leave: Optional[
  54. Union[EventHandler, EventSpec, list, function, BaseVar]
  55. ] = None,
  56. on_mouse_move: Optional[
  57. Union[EventHandler, EventSpec, list, function, BaseVar]
  58. ] = None,
  59. on_mouse_out: Optional[
  60. Union[EventHandler, EventSpec, list, function, BaseVar]
  61. ] = None,
  62. on_mouse_over: Optional[
  63. Union[EventHandler, EventSpec, list, function, BaseVar]
  64. ] = None,
  65. on_mouse_up: Optional[
  66. Union[EventHandler, EventSpec, list, function, BaseVar]
  67. ] = None,
  68. on_scroll: Optional[
  69. Union[EventHandler, EventSpec, list, function, BaseVar]
  70. ] = None,
  71. on_unmount: Optional[
  72. Union[EventHandler, EventSpec, list, function, BaseVar]
  73. ] = None,
  74. **props
  75. ) -> "Breadcrumb":
  76. """Create a breadcrumb component.
  77. If the kw-args `items` is provided and is a list, they will be added as children.
  78. Args:
  79. *children: The children of the component.
  80. items (list): The items of the breadcrumb: (label, link)
  81. separator: The visual separator between each breadcrumb item
  82. separator_margin: The left and right margin applied to the separator
  83. style: The style of the component.
  84. key: A unique key for the component.
  85. id: The id for the component.
  86. class_name: The class name for the component.
  87. autofocus: Whether the component should take the focus once the page is loaded
  88. custom_attrs: custom attribute
  89. **props: The properties of the component.
  90. Returns:
  91. The breadcrumb component.
  92. """
  93. ...
  94. class BreadcrumbItem(ChakraComponent):
  95. @overload
  96. @classmethod
  97. def create( # type: ignore
  98. cls,
  99. *children,
  100. label=None,
  101. href=None,
  102. is_current_page: Optional[Union[Var[bool], bool]] = None,
  103. is_last_child: Optional[Union[Var[bool], bool]] = None,
  104. separator: Optional[Union[Var[str], str]] = None,
  105. spacing: Optional[Union[Var[str], str]] = None,
  106. style: Optional[Style] = None,
  107. key: Optional[Any] = None,
  108. id: Optional[Any] = None,
  109. class_name: Optional[Any] = None,
  110. autofocus: Optional[bool] = None,
  111. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  112. on_blur: Optional[
  113. Union[EventHandler, EventSpec, list, function, BaseVar]
  114. ] = None,
  115. on_click: Optional[
  116. Union[EventHandler, EventSpec, list, function, BaseVar]
  117. ] = None,
  118. on_context_menu: Optional[
  119. Union[EventHandler, EventSpec, list, function, BaseVar]
  120. ] = None,
  121. on_double_click: Optional[
  122. Union[EventHandler, EventSpec, list, function, BaseVar]
  123. ] = None,
  124. on_focus: Optional[
  125. Union[EventHandler, EventSpec, list, function, BaseVar]
  126. ] = None,
  127. on_mount: Optional[
  128. Union[EventHandler, EventSpec, list, function, BaseVar]
  129. ] = None,
  130. on_mouse_down: Optional[
  131. Union[EventHandler, EventSpec, list, function, BaseVar]
  132. ] = None,
  133. on_mouse_enter: Optional[
  134. Union[EventHandler, EventSpec, list, function, BaseVar]
  135. ] = None,
  136. on_mouse_leave: Optional[
  137. Union[EventHandler, EventSpec, list, function, BaseVar]
  138. ] = None,
  139. on_mouse_move: Optional[
  140. Union[EventHandler, EventSpec, list, function, BaseVar]
  141. ] = None,
  142. on_mouse_out: Optional[
  143. Union[EventHandler, EventSpec, list, function, BaseVar]
  144. ] = None,
  145. on_mouse_over: Optional[
  146. Union[EventHandler, EventSpec, list, function, BaseVar]
  147. ] = None,
  148. on_mouse_up: Optional[
  149. Union[EventHandler, EventSpec, list, function, BaseVar]
  150. ] = None,
  151. on_scroll: Optional[
  152. Union[EventHandler, EventSpec, list, function, BaseVar]
  153. ] = None,
  154. on_unmount: Optional[
  155. Union[EventHandler, EventSpec, list, function, BaseVar]
  156. ] = None,
  157. **props
  158. ) -> "BreadcrumbItem":
  159. """Create a Breadcrumb Item component.
  160. Args:
  161. *children: The children of the component.
  162. label: The label used in the link. Defaults to None.
  163. href: The URL of the link. Defaults to None.
  164. is_current_page: Is the current page of the breadcrumb.
  165. is_last_child: Is the last child of the breadcrumb.
  166. separator: The visual separator between each breadcrumb item
  167. spacing: The left and right margin applied to the separator
  168. style: The style of the component.
  169. key: A unique key for the component.
  170. id: The id for the component.
  171. class_name: The class name for the component.
  172. autofocus: Whether the component should take the focus once the page is loaded
  173. custom_attrs: custom attribute
  174. **props: The properties of the component.
  175. Returns:
  176. The BreadcrumbItem component
  177. """
  178. ...
  179. class BreadcrumbSeparator(ChakraComponent):
  180. @overload
  181. @classmethod
  182. def create( # type: ignore
  183. cls,
  184. *children,
  185. style: Optional[Style] = None,
  186. key: Optional[Any] = None,
  187. id: Optional[Any] = None,
  188. class_name: Optional[Any] = None,
  189. autofocus: Optional[bool] = None,
  190. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  191. on_blur: Optional[
  192. Union[EventHandler, EventSpec, list, function, BaseVar]
  193. ] = None,
  194. on_click: Optional[
  195. Union[EventHandler, EventSpec, list, function, BaseVar]
  196. ] = None,
  197. on_context_menu: Optional[
  198. Union[EventHandler, EventSpec, list, function, BaseVar]
  199. ] = None,
  200. on_double_click: Optional[
  201. Union[EventHandler, EventSpec, list, function, BaseVar]
  202. ] = None,
  203. on_focus: Optional[
  204. Union[EventHandler, EventSpec, list, function, BaseVar]
  205. ] = None,
  206. on_mount: Optional[
  207. Union[EventHandler, EventSpec, list, function, BaseVar]
  208. ] = None,
  209. on_mouse_down: Optional[
  210. Union[EventHandler, EventSpec, list, function, BaseVar]
  211. ] = None,
  212. on_mouse_enter: Optional[
  213. Union[EventHandler, EventSpec, list, function, BaseVar]
  214. ] = None,
  215. on_mouse_leave: Optional[
  216. Union[EventHandler, EventSpec, list, function, BaseVar]
  217. ] = None,
  218. on_mouse_move: Optional[
  219. Union[EventHandler, EventSpec, list, function, BaseVar]
  220. ] = None,
  221. on_mouse_out: Optional[
  222. Union[EventHandler, EventSpec, list, function, BaseVar]
  223. ] = None,
  224. on_mouse_over: Optional[
  225. Union[EventHandler, EventSpec, list, function, BaseVar]
  226. ] = None,
  227. on_mouse_up: Optional[
  228. Union[EventHandler, EventSpec, list, function, BaseVar]
  229. ] = None,
  230. on_scroll: Optional[
  231. Union[EventHandler, EventSpec, list, function, BaseVar]
  232. ] = None,
  233. on_unmount: Optional[
  234. Union[EventHandler, EventSpec, list, function, BaseVar]
  235. ] = None,
  236. **props
  237. ) -> "BreadcrumbSeparator":
  238. """Create the component.
  239. Args:
  240. *children: The children of the component.
  241. style: The style of the component.
  242. key: A unique key for the component.
  243. id: The id for the component.
  244. class_name: The class name for the component.
  245. autofocus: Whether the component should take the focus once the page is loaded
  246. custom_attrs: custom attribute
  247. **props: The props of the component.
  248. Returns:
  249. The component.
  250. """
  251. ...
  252. class BreadcrumbLink(Link):
  253. @overload
  254. @classmethod
  255. def create( # type: ignore
  256. cls,
  257. *children,
  258. is_current_page: Optional[Union[Var[bool], bool]] = None,
  259. rel: Optional[Union[Var[str], str]] = None,
  260. href: Optional[Union[Var[str], str]] = None,
  261. text: Optional[Union[Var[str], str]] = None,
  262. as_: Optional[Union[Var[str], str]] = None,
  263. is_external: Optional[Union[Var[bool], bool]] = None,
  264. style: Optional[Style] = None,
  265. key: Optional[Any] = None,
  266. id: Optional[Any] = None,
  267. class_name: Optional[Any] = None,
  268. autofocus: Optional[bool] = None,
  269. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  270. on_blur: Optional[
  271. Union[EventHandler, EventSpec, list, function, BaseVar]
  272. ] = None,
  273. on_click: Optional[
  274. Union[EventHandler, EventSpec, list, function, BaseVar]
  275. ] = None,
  276. on_context_menu: Optional[
  277. Union[EventHandler, EventSpec, list, function, BaseVar]
  278. ] = None,
  279. on_double_click: Optional[
  280. Union[EventHandler, EventSpec, list, function, BaseVar]
  281. ] = None,
  282. on_focus: Optional[
  283. Union[EventHandler, EventSpec, list, function, BaseVar]
  284. ] = None,
  285. on_mount: Optional[
  286. Union[EventHandler, EventSpec, list, function, BaseVar]
  287. ] = None,
  288. on_mouse_down: Optional[
  289. Union[EventHandler, EventSpec, list, function, BaseVar]
  290. ] = None,
  291. on_mouse_enter: Optional[
  292. Union[EventHandler, EventSpec, list, function, BaseVar]
  293. ] = None,
  294. on_mouse_leave: Optional[
  295. Union[EventHandler, EventSpec, list, function, BaseVar]
  296. ] = None,
  297. on_mouse_move: Optional[
  298. Union[EventHandler, EventSpec, list, function, BaseVar]
  299. ] = None,
  300. on_mouse_out: Optional[
  301. Union[EventHandler, EventSpec, list, function, BaseVar]
  302. ] = None,
  303. on_mouse_over: Optional[
  304. Union[EventHandler, EventSpec, list, function, BaseVar]
  305. ] = None,
  306. on_mouse_up: Optional[
  307. Union[EventHandler, EventSpec, list, function, BaseVar]
  308. ] = None,
  309. on_scroll: Optional[
  310. Union[EventHandler, EventSpec, list, function, BaseVar]
  311. ] = None,
  312. on_unmount: Optional[
  313. Union[EventHandler, EventSpec, list, function, BaseVar]
  314. ] = None,
  315. **props
  316. ) -> "BreadcrumbLink":
  317. """Create a Link component.
  318. Args:
  319. *children: The children of the component.
  320. is_current_page: Is the current page of the breadcrumb.
  321. rel: The rel.
  322. href: The page to link to.
  323. text: The text to display.
  324. as_: What the link renders to.
  325. is_external: If true, the link will open in new tab.
  326. style: The style of the component.
  327. key: A unique key for the component.
  328. id: The id for the component.
  329. class_name: The class name for the component.
  330. autofocus: Whether the component should take the focus once the page is loaded
  331. custom_attrs: custom attribute
  332. **props: The props of the component.
  333. Raises:
  334. ValueError: in case of missing children
  335. Returns:
  336. Component: The link component
  337. """
  338. ...