debounce.pyi 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. """Stub file for reflex/components/core/debounce.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 typing import Any, Type, Union
  10. from reflex.components.component import Component
  11. from reflex.constants import EventTriggers
  12. from reflex.event import EventHandler
  13. from reflex.vars import Var, VarData
  14. DEFAULT_DEBOUNCE_TIMEOUT = 300
  15. class DebounceInput(Component):
  16. @overload
  17. @classmethod
  18. def create( # type: ignore
  19. cls,
  20. *children,
  21. min_length: Optional[Union[Var[int], int]] = None,
  22. debounce_timeout: Optional[Union[Var[int], int]] = None,
  23. force_notify_by_enter: Optional[Union[Var[bool], bool]] = None,
  24. force_notify_on_blur: Optional[Union[Var[bool], bool]] = None,
  25. value: Optional[
  26. Union[Var[Union[str, int, float]], Union[str, int, float]]
  27. ] = None,
  28. input_ref: Optional[Union[Var[str], str]] = None,
  29. element: Optional[Union[Var[Type[Component]], Type[Component]]] = None,
  30. style: Optional[Style] = None,
  31. key: Optional[Any] = None,
  32. id: Optional[Any] = None,
  33. class_name: Optional[Any] = None,
  34. autofocus: Optional[bool] = None,
  35. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  36. on_blur: Optional[
  37. Union[EventHandler, EventSpec, list, function, BaseVar]
  38. ] = None,
  39. on_change: Optional[
  40. Union[EventHandler, EventSpec, list, function, BaseVar]
  41. ] = None,
  42. on_click: Optional[
  43. Union[EventHandler, EventSpec, list, function, BaseVar]
  44. ] = None,
  45. on_context_menu: Optional[
  46. Union[EventHandler, EventSpec, list, function, BaseVar]
  47. ] = None,
  48. on_double_click: Optional[
  49. Union[EventHandler, EventSpec, list, function, BaseVar]
  50. ] = None,
  51. on_focus: Optional[
  52. Union[EventHandler, EventSpec, list, function, BaseVar]
  53. ] = None,
  54. on_mount: Optional[
  55. Union[EventHandler, EventSpec, list, function, BaseVar]
  56. ] = None,
  57. on_mouse_down: Optional[
  58. Union[EventHandler, EventSpec, list, function, BaseVar]
  59. ] = None,
  60. on_mouse_enter: Optional[
  61. Union[EventHandler, EventSpec, list, function, BaseVar]
  62. ] = None,
  63. on_mouse_leave: Optional[
  64. Union[EventHandler, EventSpec, list, function, BaseVar]
  65. ] = None,
  66. on_mouse_move: Optional[
  67. Union[EventHandler, EventSpec, list, function, BaseVar]
  68. ] = None,
  69. on_mouse_out: Optional[
  70. Union[EventHandler, EventSpec, list, function, BaseVar]
  71. ] = None,
  72. on_mouse_over: Optional[
  73. Union[EventHandler, EventSpec, list, function, BaseVar]
  74. ] = None,
  75. on_mouse_up: Optional[
  76. Union[EventHandler, EventSpec, list, function, BaseVar]
  77. ] = None,
  78. on_scroll: Optional[
  79. Union[EventHandler, EventSpec, list, function, BaseVar]
  80. ] = None,
  81. on_unmount: Optional[
  82. Union[EventHandler, EventSpec, list, function, BaseVar]
  83. ] = None,
  84. **props
  85. ) -> "DebounceInput":
  86. """Create a DebounceInput component.
  87. Carry first child props directly on this tag.
  88. Since react-debounce-input wants to create and manage the underlying
  89. input component itself, we carry all props, events, and styles from
  90. the child, and then neuter the child's render method so it produces no output.
  91. Args:
  92. children: The child component to wrap.
  93. props: The component props.
  94. Returns:
  95. The DebounceInput component.
  96. Raises:
  97. RuntimeError: unless exactly one child element is provided.
  98. ValueError: if the child element does not have an on_change handler.
  99. """
  100. ...
  101. debounce_input = DebounceInput.create