debounce.pyi 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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, Optional, Type, Union, overload
  6. from reflex.components.component import Component
  7. from reflex.event import EventType
  8. from reflex.style import Style
  9. from reflex.vars.base import Var
  10. DEFAULT_DEBOUNCE_TIMEOUT = 300
  11. class DebounceInput(Component):
  12. @overload
  13. @classmethod
  14. def create( # type: ignore
  15. cls,
  16. *children,
  17. min_length: Optional[Union[Var[int], int]] = None,
  18. debounce_timeout: Optional[Union[Var[int], int]] = None,
  19. force_notify_by_enter: Optional[Union[Var[bool], bool]] = None,
  20. force_notify_on_blur: Optional[Union[Var[bool], bool]] = None,
  21. value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
  22. input_ref: Optional[Union[Var[str], str]] = None,
  23. element: Optional[Union[Type[Component], Var[Type[Component]]]] = None,
  24. style: Optional[Style] = None,
  25. key: Optional[Any] = None,
  26. id: Optional[Any] = None,
  27. class_name: Optional[Any] = None,
  28. autofocus: Optional[bool] = None,
  29. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  30. on_blur: Optional[EventType[()]] = None,
  31. on_change: Optional[EventType[()]] = None,
  32. on_click: Optional[EventType[()]] = None,
  33. on_context_menu: Optional[EventType[()]] = None,
  34. on_double_click: Optional[EventType[()]] = None,
  35. on_focus: Optional[EventType[()]] = None,
  36. on_mount: Optional[EventType[()]] = None,
  37. on_mouse_down: Optional[EventType[()]] = None,
  38. on_mouse_enter: Optional[EventType[()]] = None,
  39. on_mouse_leave: Optional[EventType[()]] = None,
  40. on_mouse_move: Optional[EventType[()]] = None,
  41. on_mouse_out: Optional[EventType[()]] = None,
  42. on_mouse_over: Optional[EventType[()]] = None,
  43. on_mouse_up: Optional[EventType[()]] = None,
  44. on_scroll: Optional[EventType[()]] = None,
  45. on_unmount: Optional[EventType[()]] = None,
  46. **props,
  47. ) -> "DebounceInput":
  48. """Create a DebounceInput component.
  49. Carry first child props directly on this tag.
  50. Since react-debounce-input wants to create and manage the underlying
  51. input component itself, we carry all props, events, and styles from
  52. the child, and then neuter the child's render method so it produces no output.
  53. Args:
  54. children: The child component to wrap.
  55. props: The component props.
  56. Returns:
  57. The DebounceInput component.
  58. Raises:
  59. RuntimeError: unless exactly one child element is provided.
  60. ValueError: if the child element does not have an on_change handler.
  61. """
  62. ...
  63. debounce_input = DebounceInput.create