spinner.pyi 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. """Stub file for reflex/components/chakra/feedback/spinner.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 reflex.components.chakra import ChakraComponent, LiteralSpinnerSize
  10. from reflex.vars import Var
  11. class Spinner(ChakraComponent):
  12. @overload
  13. @classmethod
  14. def create( # type: ignore
  15. cls,
  16. *children,
  17. empty_color: Optional[Union[Var[str], str]] = None,
  18. label: Optional[Union[Var[str], str]] = None,
  19. speed: Optional[Union[Var[str], str]] = None,
  20. thickness: Optional[Union[Var[int], int]] = None,
  21. size: Optional[
  22. Union[
  23. Var[Literal["sm", "md", "lg", "xs", "xl"]],
  24. Literal["sm", "md", "lg", "xs", "xl"],
  25. ]
  26. ] = 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. ) -> "Spinner":
  80. """Create the component.
  81. Args:
  82. *children: The children of the component.
  83. empty_color: The color of the empty area in the spinner
  84. label: For accessibility, it is important to add a fallback loading text. This text will be visible to screen readers.
  85. speed: The speed of the spinner must be as a string and in seconds '1s'. Default is '0.45s'.
  86. thickness: The thickness of the spinner.
  87. size: "xs" | "sm" | "md" | "lg" | "xl"
  88. style: The style of the component.
  89. key: A unique key for the component.
  90. id: The id for the component.
  91. class_name: The class name for the component.
  92. autofocus: Whether the component should take the focus once the page is loaded
  93. custom_attrs: custom attribute
  94. **props: The props of the component.
  95. Returns:
  96. The component.
  97. Raises:
  98. TypeError: If an invalid child is passed.
  99. """
  100. ...