flex.pyi 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. """Stub file for reflex/components/radix/themes/layout/flex.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.components.core.breakpoints import Breakpoints
  7. from reflex.components.el import elements
  8. from reflex.event import BASE_STATE, EventType
  9. from reflex.style import Style
  10. from reflex.vars.base import Var
  11. from ..base import RadixThemesComponent
  12. LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"]
  13. LiteralFlexWrap = Literal["nowrap", "wrap", "wrap-reverse"]
  14. class Flex(elements.Div, RadixThemesComponent):
  15. @overload
  16. @classmethod
  17. def create( # type: ignore
  18. cls,
  19. *children,
  20. as_child: Optional[Union[Var[bool], bool]] = None,
  21. direction: Optional[
  22. Union[
  23. Breakpoints[
  24. str, Literal["column", "column-reverse", "row", "row-reverse"]
  25. ],
  26. Literal["column", "column-reverse", "row", "row-reverse"],
  27. Var[
  28. Union[
  29. Breakpoints[
  30. str,
  31. Literal["column", "column-reverse", "row", "row-reverse"],
  32. ],
  33. Literal["column", "column-reverse", "row", "row-reverse"],
  34. ]
  35. ],
  36. ]
  37. ] = None,
  38. align: Optional[
  39. Union[
  40. Breakpoints[
  41. str, Literal["baseline", "center", "end", "start", "stretch"]
  42. ],
  43. Literal["baseline", "center", "end", "start", "stretch"],
  44. Var[
  45. Union[
  46. Breakpoints[
  47. str,
  48. Literal["baseline", "center", "end", "start", "stretch"],
  49. ],
  50. Literal["baseline", "center", "end", "start", "stretch"],
  51. ]
  52. ],
  53. ]
  54. ] = None,
  55. justify: Optional[
  56. Union[
  57. Breakpoints[str, Literal["between", "center", "end", "start"]],
  58. Literal["between", "center", "end", "start"],
  59. Var[
  60. Union[
  61. Breakpoints[str, Literal["between", "center", "end", "start"]],
  62. Literal["between", "center", "end", "start"],
  63. ]
  64. ],
  65. ]
  66. ] = None,
  67. wrap: Optional[
  68. Union[
  69. Breakpoints[str, Literal["nowrap", "wrap", "wrap-reverse"]],
  70. Literal["nowrap", "wrap", "wrap-reverse"],
  71. Var[
  72. Union[
  73. Breakpoints[str, Literal["nowrap", "wrap", "wrap-reverse"]],
  74. Literal["nowrap", "wrap", "wrap-reverse"],
  75. ]
  76. ],
  77. ]
  78. ] = None,
  79. spacing: Optional[
  80. Union[
  81. Breakpoints[
  82. str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
  83. ],
  84. Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  85. Var[
  86. Union[
  87. Breakpoints[
  88. str,
  89. Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  90. ],
  91. Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  92. ]
  93. ],
  94. ]
  95. ] = None,
  96. access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  97. auto_capitalize: Optional[
  98. Union[Var[Union[bool, int, str]], bool, int, str]
  99. ] = None,
  100. content_editable: Optional[
  101. Union[Var[Union[bool, int, str]], bool, int, str]
  102. ] = None,
  103. context_menu: Optional[
  104. Union[Var[Union[bool, int, str]], bool, int, str]
  105. ] = None,
  106. dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  107. draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  108. enter_key_hint: Optional[
  109. Union[Var[Union[bool, int, str]], bool, int, str]
  110. ] = None,
  111. hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  112. input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  113. item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  114. lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  115. role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  116. slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  117. spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  118. tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  119. title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
  120. style: Optional[Style] = None,
  121. key: Optional[Any] = None,
  122. id: Optional[Any] = None,
  123. class_name: Optional[Any] = None,
  124. autofocus: Optional[bool] = None,
  125. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  126. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  127. on_click: Optional[EventType[[], BASE_STATE]] = None,
  128. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  129. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  130. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  131. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  132. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  133. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  134. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  135. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  136. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  137. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  138. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  139. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  140. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  141. **props,
  142. ) -> "Flex":
  143. """Create a new component instance.
  144. Will prepend "RadixThemes" to the component tag to avoid conflicts with
  145. other UI libraries for common names, like Text and Button.
  146. Args:
  147. *children: Child components.
  148. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
  149. direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse"
  150. align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
  151. justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between"
  152. wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse"
  153. spacing: Gap between children: "0" - "9"
  154. access_key: Provides a hint for generating a keyboard shortcut for the current element.
  155. auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
  156. content_editable: Indicates whether the element's content is editable.
  157. context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
  158. dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
  159. draggable: Defines whether the element can be dragged.
  160. enter_key_hint: Hints what media types the media element is able to play.
  161. hidden: Defines whether the element is hidden.
  162. input_mode: Defines the type of the element.
  163. item_prop: Defines the name of the element for metadata purposes.
  164. lang: Defines the language used in the element.
  165. role: Defines the role of the element.
  166. slot: Assigns a slot in a shadow DOM shadow tree to an element.
  167. spell_check: Defines whether the element may be checked for spelling errors.
  168. tab_index: Defines the position of the current element in the tabbing order.
  169. title: Defines a tooltip for the element.
  170. style: The style of the component.
  171. key: A unique key for the component.
  172. id: The id for the component.
  173. class_name: The class name for the component.
  174. autofocus: Whether the component should take the focus once the page is loaded
  175. custom_attrs: custom attribute
  176. **props: Component properties.
  177. Returns:
  178. A new component instance.
  179. """
  180. ...
  181. flex = Flex.create