debounce.pyi 4.1 KB

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