flex.pyi 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. """Stub file for reflex/components/layout/flex.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, Union
  10. from reflex.components.libs.chakra import ChakraComponent
  11. from reflex.vars import Var
  12. class Flex(ChakraComponent):
  13. @overload
  14. @classmethod
  15. def create( # type: ignore
  16. cls,
  17. *children,
  18. align: Optional[Union[Var[str], str]] = None,
  19. basis: Optional[Union[Var[str], str]] = None,
  20. direction: Optional[
  21. Union[Var[Union[str, List[str]]], Union[str, List[str]]]
  22. ] = None,
  23. grow: Optional[Union[Var[str], str]] = None,
  24. justify: Optional[Union[Var[str], str]] = None,
  25. wrap: Optional[Union[Var[Union[str, List[str]]], Union[str, List[str]]]] = None,
  26. shrink: Optional[Union[Var[str], str]] = None,
  27. style: Optional[Style] = None,
  28. key: Optional[Any] = None,
  29. id: Optional[Any] = None,
  30. class_name: Optional[Any] = None,
  31. autofocus: Optional[bool] = None,
  32. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  33. on_blur: Optional[
  34. Union[EventHandler, EventSpec, list, function, BaseVar]
  35. ] = None,
  36. on_click: Optional[
  37. Union[EventHandler, EventSpec, list, function, BaseVar]
  38. ] = None,
  39. on_context_menu: Optional[
  40. Union[EventHandler, EventSpec, list, function, BaseVar]
  41. ] = None,
  42. on_double_click: Optional[
  43. Union[EventHandler, EventSpec, list, function, BaseVar]
  44. ] = None,
  45. on_focus: Optional[
  46. Union[EventHandler, EventSpec, list, function, BaseVar]
  47. ] = None,
  48. on_mount: Optional[
  49. Union[EventHandler, EventSpec, list, function, BaseVar]
  50. ] = None,
  51. on_mouse_down: Optional[
  52. Union[EventHandler, EventSpec, list, function, BaseVar]
  53. ] = None,
  54. on_mouse_enter: Optional[
  55. Union[EventHandler, EventSpec, list, function, BaseVar]
  56. ] = None,
  57. on_mouse_leave: Optional[
  58. Union[EventHandler, EventSpec, list, function, BaseVar]
  59. ] = None,
  60. on_mouse_move: Optional[
  61. Union[EventHandler, EventSpec, list, function, BaseVar]
  62. ] = None,
  63. on_mouse_out: Optional[
  64. Union[EventHandler, EventSpec, list, function, BaseVar]
  65. ] = None,
  66. on_mouse_over: Optional[
  67. Union[EventHandler, EventSpec, list, function, BaseVar]
  68. ] = None,
  69. on_mouse_up: Optional[
  70. Union[EventHandler, EventSpec, list, function, BaseVar]
  71. ] = None,
  72. on_scroll: Optional[
  73. Union[EventHandler, EventSpec, list, function, BaseVar]
  74. ] = None,
  75. on_unmount: Optional[
  76. Union[EventHandler, EventSpec, list, function, BaseVar]
  77. ] = None,
  78. **props
  79. ) -> "Flex":
  80. """Create the component.
  81. Args:
  82. *children: The children of the component.
  83. align: How to align items in the flex.
  84. basis: Shorthand for flexBasis style prop
  85. direction: Shorthand for flexDirection style prop
  86. grow: Shorthand for flexGrow style prop
  87. justify: The way to justify the items.
  88. wrap: Shorthand for flexWrap style prop
  89. shrink: Shorthand for flexShrink style prop
  90. style: The style of the component.
  91. key: A unique key for the component.
  92. id: The id for the component.
  93. class_name: The class name for the component.
  94. autofocus: Whether the component should take the focus once the page is loaded
  95. custom_attrs: custom attribute
  96. **props: The props of the component.
  97. Returns:
  98. The component.
  99. Raises:
  100. TypeError: If an invalid child is passed.
  101. """
  102. ...