menu.pyi 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732
  1. """Stub file for reflex/components/overlay/menu.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 Any, List, Optional, Union
  10. from reflex.components.component import Component
  11. from reflex.components.forms.button import Button
  12. from reflex.components.libs.chakra import (
  13. ChakraComponent,
  14. LiteralChakraDirection,
  15. LiteralMenuOption,
  16. LiteralMenuStrategy,
  17. )
  18. from reflex.vars import Var
  19. class Menu(ChakraComponent):
  20. def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
  21. @overload
  22. @classmethod
  23. def create( # type: ignore
  24. cls,
  25. *children,
  26. button: Optional[Component] = None,
  27. items: Optional[List] = None,
  28. arrow_padding: Optional[Union[Var[int], int]] = None,
  29. auto_select: Optional[Union[Var[bool], bool]] = None,
  30. boundary: Optional[Union[Var[str], str]] = None,
  31. close_on_blur: Optional[Union[Var[bool], bool]] = None,
  32. close_on_select: Optional[Union[Var[bool], bool]] = None,
  33. default_is_open: Optional[Union[Var[bool], bool]] = None,
  34. direction: Optional[
  35. Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]
  36. ] = None,
  37. flip: Optional[Union[Var[bool], bool]] = None,
  38. gutter: Optional[Union[Var[int], int]] = None,
  39. is_lazy: Optional[Union[Var[bool], bool]] = None,
  40. lazy_behavior: Optional[Union[Var[str], str]] = None,
  41. is_open: Optional[Union[Var[bool], bool]] = None,
  42. match_width: Optional[Union[Var[bool], bool]] = None,
  43. placement: Optional[Union[Var[str], str]] = None,
  44. prevent_overflow: Optional[Union[Var[bool], bool]] = None,
  45. strategy: Optional[
  46. Union[Var[Literal["fixed", "absolute"]], Literal["fixed", "absolute"]]
  47. ] = None,
  48. style: Optional[Style] = None,
  49. key: Optional[Any] = None,
  50. id: Optional[Any] = None,
  51. class_name: Optional[Any] = None,
  52. autofocus: Optional[bool] = None,
  53. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  54. on_blur: Optional[
  55. Union[EventHandler, EventSpec, list, function, BaseVar]
  56. ] = None,
  57. on_click: Optional[
  58. Union[EventHandler, EventSpec, list, function, BaseVar]
  59. ] = None,
  60. on_close: Optional[
  61. Union[EventHandler, EventSpec, list, function, BaseVar]
  62. ] = None,
  63. on_context_menu: Optional[
  64. Union[EventHandler, EventSpec, list, function, BaseVar]
  65. ] = None,
  66. on_double_click: Optional[
  67. Union[EventHandler, EventSpec, list, function, BaseVar]
  68. ] = None,
  69. on_focus: Optional[
  70. Union[EventHandler, EventSpec, list, function, BaseVar]
  71. ] = None,
  72. on_mount: Optional[
  73. Union[EventHandler, EventSpec, list, function, BaseVar]
  74. ] = None,
  75. on_mouse_down: Optional[
  76. Union[EventHandler, EventSpec, list, function, BaseVar]
  77. ] = None,
  78. on_mouse_enter: Optional[
  79. Union[EventHandler, EventSpec, list, function, BaseVar]
  80. ] = None,
  81. on_mouse_leave: Optional[
  82. Union[EventHandler, EventSpec, list, function, BaseVar]
  83. ] = None,
  84. on_mouse_move: Optional[
  85. Union[EventHandler, EventSpec, list, function, BaseVar]
  86. ] = None,
  87. on_mouse_out: Optional[
  88. Union[EventHandler, EventSpec, list, function, BaseVar]
  89. ] = None,
  90. on_mouse_over: Optional[
  91. Union[EventHandler, EventSpec, list, function, BaseVar]
  92. ] = None,
  93. on_mouse_up: Optional[
  94. Union[EventHandler, EventSpec, list, function, BaseVar]
  95. ] = None,
  96. on_open: Optional[
  97. Union[EventHandler, EventSpec, list, function, BaseVar]
  98. ] = None,
  99. on_scroll: Optional[
  100. Union[EventHandler, EventSpec, list, function, BaseVar]
  101. ] = None,
  102. on_unmount: Optional[
  103. Union[EventHandler, EventSpec, list, function, BaseVar]
  104. ] = None,
  105. **props
  106. ) -> "Menu":
  107. """Create a menu component.
  108. Args:
  109. *children: The children of the component.
  110. button: the button that open the menu.
  111. items (list): The items of the menu.
  112. arrow_padding: The padding required to prevent the arrow from reaching the very edge of the popper.
  113. auto_select: If true, the first enabled menu item will receive focus and be selected when the menu opens.
  114. boundary: The boundary area for the popper. Used within the preventOverflow modifier
  115. close_on_blur: If true, the menu will close when you click outside the menu list
  116. close_on_select: If true, the menu will close when a menu item is clicked
  117. default_is_open: If by default the menu is open.
  118. direction: If rtl, popper placement positions will be flipped i.e. 'top-right' will become 'top-left' and vice-verse ("ltr" | "rtl")
  119. flip: If true, the popper will change its placement and flip when it's about to overflow its boundary area.
  120. gutter: The distance or margin between the reference and popper. It is used internally to create an offset modifier. NB: If you define offset prop, it'll override the gutter.
  121. is_lazy: Performance 🚀: If true, the MenuItem rendering will be deferred until the menu is open.
  122. lazy_behavior: Performance 🚀: The lazy behavior of menu's content when not visible. Only works when `isLazy={true}` - "unmount": The menu's content is always unmounted when not open. - "keepMounted": The menu's content initially unmounted, but stays mounted when menu is open.
  123. is_open: Determines if the menu is open or not.
  124. match_width: If true, the popper will match the width of the reference at all times. It's useful for autocomplete, `date-picker` and select patterns.
  125. placement: The placement of the popper relative to its reference.
  126. prevent_overflow: If true, will prevent the popper from being cut off and ensure it's visible within the boundary area.
  127. strategy: The CSS positioning strategy to use. ("fixed" | "absolute")
  128. style: The style of the component.
  129. key: A unique key for the component.
  130. id: The id for the component.
  131. class_name: The class name for the component.
  132. autofocus: Whether the component should take the focus once the page is loaded
  133. custom_attrs: custom attribute
  134. **props: The properties of the component.
  135. Returns:
  136. The menu component.
  137. """
  138. ...
  139. class MenuButton(ChakraComponent):
  140. @overload
  141. @classmethod
  142. def create( # type: ignore
  143. cls,
  144. *children,
  145. variant: Optional[Union[Var[str], str]] = None,
  146. as_: Optional[Union[Var[str], str]] = None,
  147. style: Optional[Style] = None,
  148. key: Optional[Any] = None,
  149. id: Optional[Any] = None,
  150. class_name: Optional[Any] = None,
  151. autofocus: Optional[bool] = None,
  152. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  153. on_blur: Optional[
  154. Union[EventHandler, EventSpec, list, function, BaseVar]
  155. ] = None,
  156. on_click: Optional[
  157. Union[EventHandler, EventSpec, list, function, BaseVar]
  158. ] = None,
  159. on_context_menu: Optional[
  160. Union[EventHandler, EventSpec, list, function, BaseVar]
  161. ] = None,
  162. on_double_click: Optional[
  163. Union[EventHandler, EventSpec, list, function, BaseVar]
  164. ] = None,
  165. on_focus: Optional[
  166. Union[EventHandler, EventSpec, list, function, BaseVar]
  167. ] = None,
  168. on_mount: Optional[
  169. Union[EventHandler, EventSpec, list, function, BaseVar]
  170. ] = None,
  171. on_mouse_down: Optional[
  172. Union[EventHandler, EventSpec, list, function, BaseVar]
  173. ] = None,
  174. on_mouse_enter: Optional[
  175. Union[EventHandler, EventSpec, list, function, BaseVar]
  176. ] = None,
  177. on_mouse_leave: Optional[
  178. Union[EventHandler, EventSpec, list, function, BaseVar]
  179. ] = None,
  180. on_mouse_move: Optional[
  181. Union[EventHandler, EventSpec, list, function, BaseVar]
  182. ] = None,
  183. on_mouse_out: Optional[
  184. Union[EventHandler, EventSpec, list, function, BaseVar]
  185. ] = None,
  186. on_mouse_over: Optional[
  187. Union[EventHandler, EventSpec, list, function, BaseVar]
  188. ] = None,
  189. on_mouse_up: Optional[
  190. Union[EventHandler, EventSpec, list, function, BaseVar]
  191. ] = None,
  192. on_scroll: Optional[
  193. Union[EventHandler, EventSpec, list, function, BaseVar]
  194. ] = None,
  195. on_unmount: Optional[
  196. Union[EventHandler, EventSpec, list, function, BaseVar]
  197. ] = None,
  198. **props
  199. ) -> "MenuButton":
  200. """Create the component.
  201. Args:
  202. *children: The children of the component.
  203. variant: The variant of the menu button.
  204. as_: The tag to use for the menu button.
  205. style: The style of the component.
  206. key: A unique key for the component.
  207. id: The id for the component.
  208. class_name: The class name for the component.
  209. autofocus: Whether the component should take the focus once the page is loaded
  210. custom_attrs: custom attribute
  211. **props: The props of the component.
  212. Returns:
  213. The component.
  214. Raises:
  215. TypeError: If an invalid child is passed.
  216. """
  217. ...
  218. class MenuList(ChakraComponent):
  219. @overload
  220. @classmethod
  221. def create( # type: ignore
  222. cls,
  223. *children,
  224. items: Optional[list] = None,
  225. style: Optional[Style] = None,
  226. key: Optional[Any] = None,
  227. id: Optional[Any] = None,
  228. class_name: Optional[Any] = None,
  229. autofocus: Optional[bool] = None,
  230. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  231. on_blur: Optional[
  232. Union[EventHandler, EventSpec, list, function, BaseVar]
  233. ] = None,
  234. on_click: Optional[
  235. Union[EventHandler, EventSpec, list, function, BaseVar]
  236. ] = None,
  237. on_context_menu: Optional[
  238. Union[EventHandler, EventSpec, list, function, BaseVar]
  239. ] = None,
  240. on_double_click: Optional[
  241. Union[EventHandler, EventSpec, list, function, BaseVar]
  242. ] = None,
  243. on_focus: Optional[
  244. Union[EventHandler, EventSpec, list, function, BaseVar]
  245. ] = None,
  246. on_mount: Optional[
  247. Union[EventHandler, EventSpec, list, function, BaseVar]
  248. ] = None,
  249. on_mouse_down: Optional[
  250. Union[EventHandler, EventSpec, list, function, BaseVar]
  251. ] = None,
  252. on_mouse_enter: Optional[
  253. Union[EventHandler, EventSpec, list, function, BaseVar]
  254. ] = None,
  255. on_mouse_leave: Optional[
  256. Union[EventHandler, EventSpec, list, function, BaseVar]
  257. ] = None,
  258. on_mouse_move: Optional[
  259. Union[EventHandler, EventSpec, list, function, BaseVar]
  260. ] = None,
  261. on_mouse_out: Optional[
  262. Union[EventHandler, EventSpec, list, function, BaseVar]
  263. ] = None,
  264. on_mouse_over: Optional[
  265. Union[EventHandler, EventSpec, list, function, BaseVar]
  266. ] = None,
  267. on_mouse_up: Optional[
  268. Union[EventHandler, EventSpec, list, function, BaseVar]
  269. ] = None,
  270. on_scroll: Optional[
  271. Union[EventHandler, EventSpec, list, function, BaseVar]
  272. ] = None,
  273. on_unmount: Optional[
  274. Union[EventHandler, EventSpec, list, function, BaseVar]
  275. ] = None,
  276. **props
  277. ) -> "MenuList":
  278. """Create a MenuList component, and automatically wrap in MenuItem if not already one.
  279. Args:
  280. *children: The children of the component.
  281. items: A list of item to add as child of the component.
  282. style: The style of the component.
  283. key: A unique key for the component.
  284. id: The id for the component.
  285. class_name: The class name for the component.
  286. autofocus: Whether the component should take the focus once the page is loaded
  287. custom_attrs: custom attribute
  288. **props: The properties of the component.
  289. Returns:
  290. The MenuList component.
  291. """
  292. ...
  293. class MenuItem(ChakraComponent):
  294. @overload
  295. @classmethod
  296. def create( # type: ignore
  297. cls,
  298. *children,
  299. close_on_select: Optional[Union[Var[bool], bool]] = None,
  300. command: Optional[Union[Var[str], str]] = None,
  301. command_spacing: Optional[Union[Var[int], int]] = None,
  302. is_disabled: Optional[Union[Var[bool], bool]] = None,
  303. is_focusable: Optional[Union[Var[bool], bool]] = None,
  304. style: Optional[Style] = None,
  305. key: Optional[Any] = None,
  306. id: Optional[Any] = None,
  307. class_name: Optional[Any] = None,
  308. autofocus: Optional[bool] = None,
  309. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  310. on_blur: Optional[
  311. Union[EventHandler, EventSpec, list, function, BaseVar]
  312. ] = None,
  313. on_click: Optional[
  314. Union[EventHandler, EventSpec, list, function, BaseVar]
  315. ] = None,
  316. on_context_menu: Optional[
  317. Union[EventHandler, EventSpec, list, function, BaseVar]
  318. ] = None,
  319. on_double_click: Optional[
  320. Union[EventHandler, EventSpec, list, function, BaseVar]
  321. ] = None,
  322. on_focus: Optional[
  323. Union[EventHandler, EventSpec, list, function, BaseVar]
  324. ] = None,
  325. on_mount: Optional[
  326. Union[EventHandler, EventSpec, list, function, BaseVar]
  327. ] = None,
  328. on_mouse_down: Optional[
  329. Union[EventHandler, EventSpec, list, function, BaseVar]
  330. ] = None,
  331. on_mouse_enter: Optional[
  332. Union[EventHandler, EventSpec, list, function, BaseVar]
  333. ] = None,
  334. on_mouse_leave: Optional[
  335. Union[EventHandler, EventSpec, list, function, BaseVar]
  336. ] = None,
  337. on_mouse_move: Optional[
  338. Union[EventHandler, EventSpec, list, function, BaseVar]
  339. ] = None,
  340. on_mouse_out: Optional[
  341. Union[EventHandler, EventSpec, list, function, BaseVar]
  342. ] = None,
  343. on_mouse_over: Optional[
  344. Union[EventHandler, EventSpec, list, function, BaseVar]
  345. ] = None,
  346. on_mouse_up: Optional[
  347. Union[EventHandler, EventSpec, list, function, BaseVar]
  348. ] = None,
  349. on_scroll: Optional[
  350. Union[EventHandler, EventSpec, list, function, BaseVar]
  351. ] = None,
  352. on_unmount: Optional[
  353. Union[EventHandler, EventSpec, list, function, BaseVar]
  354. ] = None,
  355. **props
  356. ) -> "MenuItem":
  357. """Create the component.
  358. Args:
  359. *children: The children of the component.
  360. close_on_select: Overrides the parent menu's closeOnSelect prop.
  361. command: Right-aligned label text content, useful for displaying hotkeys.
  362. command_spacing: The spacing between the command and menu item's label.
  363. is_disabled: If true, the menuitem will be disabled.
  364. is_focusable: If true and the menuitem is disabled, it'll remain keyboard-focusable
  365. style: The style of the component.
  366. key: A unique key for the component.
  367. id: The id for the component.
  368. class_name: The class name for the component.
  369. autofocus: Whether the component should take the focus once the page is loaded
  370. custom_attrs: custom attribute
  371. **props: The props of the component.
  372. Returns:
  373. The component.
  374. Raises:
  375. TypeError: If an invalid child is passed.
  376. """
  377. ...
  378. class MenuItemOption(ChakraComponent):
  379. @overload
  380. @classmethod
  381. def create( # type: ignore
  382. cls,
  383. *children,
  384. close_on_select: Optional[Union[Var[bool], bool]] = None,
  385. command: Optional[Union[Var[str], str]] = None,
  386. command_spacing: Optional[Union[Var[int], int]] = None,
  387. is_checked: Optional[Union[Var[bool], bool]] = None,
  388. is_disabled: Optional[Union[Var[bool], bool]] = None,
  389. is_focusable: Optional[Union[Var[bool], bool]] = None,
  390. type_: Optional[
  391. Union[Var[Literal["checkbox", "radio"]], Literal["checkbox", "radio"]]
  392. ] = None,
  393. value: Optional[Union[Var[str], str]] = None,
  394. style: Optional[Style] = None,
  395. key: Optional[Any] = None,
  396. id: Optional[Any] = None,
  397. class_name: Optional[Any] = None,
  398. autofocus: Optional[bool] = None,
  399. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  400. on_blur: Optional[
  401. Union[EventHandler, EventSpec, list, function, BaseVar]
  402. ] = None,
  403. on_click: Optional[
  404. Union[EventHandler, EventSpec, list, function, BaseVar]
  405. ] = None,
  406. on_context_menu: Optional[
  407. Union[EventHandler, EventSpec, list, function, BaseVar]
  408. ] = None,
  409. on_double_click: Optional[
  410. Union[EventHandler, EventSpec, list, function, BaseVar]
  411. ] = None,
  412. on_focus: Optional[
  413. Union[EventHandler, EventSpec, list, function, BaseVar]
  414. ] = None,
  415. on_mount: Optional[
  416. Union[EventHandler, EventSpec, list, function, BaseVar]
  417. ] = None,
  418. on_mouse_down: Optional[
  419. Union[EventHandler, EventSpec, list, function, BaseVar]
  420. ] = None,
  421. on_mouse_enter: Optional[
  422. Union[EventHandler, EventSpec, list, function, BaseVar]
  423. ] = None,
  424. on_mouse_leave: Optional[
  425. Union[EventHandler, EventSpec, list, function, BaseVar]
  426. ] = None,
  427. on_mouse_move: Optional[
  428. Union[EventHandler, EventSpec, list, function, BaseVar]
  429. ] = None,
  430. on_mouse_out: Optional[
  431. Union[EventHandler, EventSpec, list, function, BaseVar]
  432. ] = None,
  433. on_mouse_over: Optional[
  434. Union[EventHandler, EventSpec, list, function, BaseVar]
  435. ] = None,
  436. on_mouse_up: Optional[
  437. Union[EventHandler, EventSpec, list, function, BaseVar]
  438. ] = None,
  439. on_scroll: Optional[
  440. Union[EventHandler, EventSpec, list, function, BaseVar]
  441. ] = None,
  442. on_unmount: Optional[
  443. Union[EventHandler, EventSpec, list, function, BaseVar]
  444. ] = None,
  445. **props
  446. ) -> "MenuItemOption":
  447. """Create the component.
  448. Args:
  449. *children: The children of the component.
  450. close_on_select: Overrides the parent menu's closeOnSelect prop.
  451. command: Right-aligned label text content, useful for displaying hotkeys.
  452. command_spacing: The spacing between the command and menu item's label.
  453. is_checked: Determines if menu item is checked.
  454. is_disabled: If true, the menuitem will be disabled.
  455. is_focusable: If true and the menuitem is disabled, it'll remain keyboard-focusable
  456. type_: "checkbox" | "radio"
  457. value: Value of the menu item.
  458. style: The style of the component.
  459. key: A unique key for the component.
  460. id: The id for the component.
  461. class_name: The class name for the component.
  462. autofocus: Whether the component should take the focus once the page is loaded
  463. custom_attrs: custom attribute
  464. **props: The props of the component.
  465. Returns:
  466. The component.
  467. Raises:
  468. TypeError: If an invalid child is passed.
  469. """
  470. ...
  471. class MenuGroup(ChakraComponent):
  472. @overload
  473. @classmethod
  474. def create( # type: ignore
  475. cls,
  476. *children,
  477. style: Optional[Style] = None,
  478. key: Optional[Any] = None,
  479. id: Optional[Any] = None,
  480. class_name: Optional[Any] = None,
  481. autofocus: Optional[bool] = None,
  482. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  483. on_blur: Optional[
  484. Union[EventHandler, EventSpec, list, function, BaseVar]
  485. ] = None,
  486. on_click: Optional[
  487. Union[EventHandler, EventSpec, list, function, BaseVar]
  488. ] = None,
  489. on_context_menu: Optional[
  490. Union[EventHandler, EventSpec, list, function, BaseVar]
  491. ] = None,
  492. on_double_click: Optional[
  493. Union[EventHandler, EventSpec, list, function, BaseVar]
  494. ] = None,
  495. on_focus: Optional[
  496. Union[EventHandler, EventSpec, list, function, BaseVar]
  497. ] = None,
  498. on_mount: Optional[
  499. Union[EventHandler, EventSpec, list, function, BaseVar]
  500. ] = None,
  501. on_mouse_down: Optional[
  502. Union[EventHandler, EventSpec, list, function, BaseVar]
  503. ] = None,
  504. on_mouse_enter: Optional[
  505. Union[EventHandler, EventSpec, list, function, BaseVar]
  506. ] = None,
  507. on_mouse_leave: Optional[
  508. Union[EventHandler, EventSpec, list, function, BaseVar]
  509. ] = None,
  510. on_mouse_move: Optional[
  511. Union[EventHandler, EventSpec, list, function, BaseVar]
  512. ] = None,
  513. on_mouse_out: Optional[
  514. Union[EventHandler, EventSpec, list, function, BaseVar]
  515. ] = None,
  516. on_mouse_over: Optional[
  517. Union[EventHandler, EventSpec, list, function, BaseVar]
  518. ] = None,
  519. on_mouse_up: Optional[
  520. Union[EventHandler, EventSpec, list, function, BaseVar]
  521. ] = None,
  522. on_scroll: Optional[
  523. Union[EventHandler, EventSpec, list, function, BaseVar]
  524. ] = None,
  525. on_unmount: Optional[
  526. Union[EventHandler, EventSpec, list, function, BaseVar]
  527. ] = None,
  528. **props
  529. ) -> "MenuGroup":
  530. """Create the component.
  531. Args:
  532. *children: The children of the component.
  533. style: The style of the component.
  534. key: A unique key for the component.
  535. id: The id for the component.
  536. class_name: The class name for the component.
  537. autofocus: Whether the component should take the focus once the page is loaded
  538. custom_attrs: custom attribute
  539. **props: The props of the component.
  540. Returns:
  541. The component.
  542. Raises:
  543. TypeError: If an invalid child is passed.
  544. """
  545. ...
  546. class MenuOptionGroup(ChakraComponent):
  547. @overload
  548. @classmethod
  549. def create( # type: ignore
  550. cls,
  551. *children,
  552. type_: Optional[
  553. Union[Var[Literal["checkbox", "radio"]], Literal["checkbox", "radio"]]
  554. ] = None,
  555. value: Optional[Union[Var[str], str]] = None,
  556. style: Optional[Style] = None,
  557. key: Optional[Any] = None,
  558. id: Optional[Any] = None,
  559. class_name: Optional[Any] = None,
  560. autofocus: Optional[bool] = None,
  561. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  562. on_blur: Optional[
  563. Union[EventHandler, EventSpec, list, function, BaseVar]
  564. ] = None,
  565. on_click: Optional[
  566. Union[EventHandler, EventSpec, list, function, BaseVar]
  567. ] = None,
  568. on_context_menu: Optional[
  569. Union[EventHandler, EventSpec, list, function, BaseVar]
  570. ] = None,
  571. on_double_click: Optional[
  572. Union[EventHandler, EventSpec, list, function, BaseVar]
  573. ] = None,
  574. on_focus: Optional[
  575. Union[EventHandler, EventSpec, list, function, BaseVar]
  576. ] = None,
  577. on_mount: Optional[
  578. Union[EventHandler, EventSpec, list, function, BaseVar]
  579. ] = None,
  580. on_mouse_down: Optional[
  581. Union[EventHandler, EventSpec, list, function, BaseVar]
  582. ] = None,
  583. on_mouse_enter: Optional[
  584. Union[EventHandler, EventSpec, list, function, BaseVar]
  585. ] = None,
  586. on_mouse_leave: Optional[
  587. Union[EventHandler, EventSpec, list, function, BaseVar]
  588. ] = None,
  589. on_mouse_move: Optional[
  590. Union[EventHandler, EventSpec, list, function, BaseVar]
  591. ] = None,
  592. on_mouse_out: Optional[
  593. Union[EventHandler, EventSpec, list, function, BaseVar]
  594. ] = None,
  595. on_mouse_over: Optional[
  596. Union[EventHandler, EventSpec, list, function, BaseVar]
  597. ] = None,
  598. on_mouse_up: Optional[
  599. Union[EventHandler, EventSpec, list, function, BaseVar]
  600. ] = None,
  601. on_scroll: Optional[
  602. Union[EventHandler, EventSpec, list, function, BaseVar]
  603. ] = None,
  604. on_unmount: Optional[
  605. Union[EventHandler, EventSpec, list, function, BaseVar]
  606. ] = None,
  607. **props
  608. ) -> "MenuOptionGroup":
  609. """Create the component.
  610. Args:
  611. *children: The children of the component.
  612. type_: "checkbox" | "radio"
  613. value: Value of the option group.
  614. style: The style of the component.
  615. key: A unique key for the component.
  616. id: The id for the component.
  617. class_name: The class name for the component.
  618. autofocus: Whether the component should take the focus once the page is loaded
  619. custom_attrs: custom attribute
  620. **props: The props of the component.
  621. Returns:
  622. The component.
  623. Raises:
  624. TypeError: If an invalid child is passed.
  625. """
  626. ...
  627. class MenuDivider(ChakraComponent):
  628. @overload
  629. @classmethod
  630. def create( # type: ignore
  631. cls,
  632. *children,
  633. style: Optional[Style] = None,
  634. key: Optional[Any] = None,
  635. id: Optional[Any] = None,
  636. class_name: Optional[Any] = None,
  637. autofocus: Optional[bool] = None,
  638. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  639. on_blur: Optional[
  640. Union[EventHandler, EventSpec, list, function, BaseVar]
  641. ] = None,
  642. on_click: Optional[
  643. Union[EventHandler, EventSpec, list, function, BaseVar]
  644. ] = None,
  645. on_context_menu: Optional[
  646. Union[EventHandler, EventSpec, list, function, BaseVar]
  647. ] = None,
  648. on_double_click: Optional[
  649. Union[EventHandler, EventSpec, list, function, BaseVar]
  650. ] = None,
  651. on_focus: Optional[
  652. Union[EventHandler, EventSpec, list, function, BaseVar]
  653. ] = None,
  654. on_mount: Optional[
  655. Union[EventHandler, EventSpec, list, function, BaseVar]
  656. ] = None,
  657. on_mouse_down: Optional[
  658. Union[EventHandler, EventSpec, list, function, BaseVar]
  659. ] = None,
  660. on_mouse_enter: Optional[
  661. Union[EventHandler, EventSpec, list, function, BaseVar]
  662. ] = None,
  663. on_mouse_leave: Optional[
  664. Union[EventHandler, EventSpec, list, function, BaseVar]
  665. ] = None,
  666. on_mouse_move: Optional[
  667. Union[EventHandler, EventSpec, list, function, BaseVar]
  668. ] = None,
  669. on_mouse_out: Optional[
  670. Union[EventHandler, EventSpec, list, function, BaseVar]
  671. ] = None,
  672. on_mouse_over: Optional[
  673. Union[EventHandler, EventSpec, list, function, BaseVar]
  674. ] = None,
  675. on_mouse_up: Optional[
  676. Union[EventHandler, EventSpec, list, function, BaseVar]
  677. ] = None,
  678. on_scroll: Optional[
  679. Union[EventHandler, EventSpec, list, function, BaseVar]
  680. ] = None,
  681. on_unmount: Optional[
  682. Union[EventHandler, EventSpec, list, function, BaseVar]
  683. ] = None,
  684. **props
  685. ) -> "MenuDivider":
  686. """Create the component.
  687. Args:
  688. *children: The children of the component.
  689. style: The style of the component.
  690. key: A unique key for the component.
  691. id: The id for the component.
  692. class_name: The class name for the component.
  693. autofocus: Whether the component should take the focus once the page is loaded
  694. custom_attrs: custom attribute
  695. **props: The props of the component.
  696. Returns:
  697. The component.
  698. Raises:
  699. TypeError: If an invalid child is passed.
  700. """
  701. ...