reflex/reflex/components/core/debounce.pyi
Khaleel Al-Adhami b2d2719f90
add type hinting to events (#4145)
* add type hinting to events

* fix pyi

* make it a list

* add on change

* dang it darglintz

* add future annotations

* add try except becuse i hate this

* add check for class

* aaaa

* sometimes you need to make hard decisions

* ono

* i hate unions

* add rx event

* move stuff around

* maybe

* special case osmething

* i don't need no test

* remove stray print

Co-authored-by: Masen Furer <m_github@0x26.net>

* remove another stray print

Co-authored-by: Masen Furer <m_github@0x26.net>

* add rx event

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-10-14 08:44:31 -07:00

74 lines
2.9 KiB
Python

"""Stub file for reflex/components/core/debounce.py"""
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
from typing import Any, Dict, Optional, Type, Union, overload
from reflex.components.component import Component
from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
DEFAULT_DEBOUNCE_TIMEOUT = 300
class DebounceInput(Component):
@overload
@classmethod
def create( # type: ignore
cls,
*children,
min_length: Optional[Union[Var[int], int]] = None,
debounce_timeout: Optional[Union[Var[int], int]] = None,
force_notify_by_enter: Optional[Union[Var[bool], bool]] = None,
force_notify_on_blur: Optional[Union[Var[bool], bool]] = None,
value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
input_ref: Optional[Union[Var[str], str]] = None,
element: Optional[Union[Type[Component], Var[Type[Component]]]] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
on_blur: Optional[EventType[[]]] = None,
on_change: Optional[EventType[[]]] = None,
on_click: Optional[EventType[[]]] = None,
on_context_menu: Optional[EventType[[]]] = None,
on_double_click: Optional[EventType[[]]] = None,
on_focus: Optional[EventType[[]]] = None,
on_mount: Optional[EventType[[]]] = None,
on_mouse_down: Optional[EventType[[]]] = None,
on_mouse_enter: Optional[EventType[[]]] = None,
on_mouse_leave: Optional[EventType[[]]] = None,
on_mouse_move: Optional[EventType[[]]] = None,
on_mouse_out: Optional[EventType[[]]] = None,
on_mouse_over: Optional[EventType[[]]] = None,
on_mouse_up: Optional[EventType[[]]] = None,
on_scroll: Optional[EventType[[]]] = None,
on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DebounceInput":
"""Create a DebounceInput component.
Carry first child props directly on this tag.
Since react-debounce-input wants to create and manage the underlying
input component itself, we carry all props, events, and styles from
the child, and then neuter the child's render method so it produces no output.
Args:
children: The child component to wrap.
props: The component props.
Returns:
The DebounceInput component.
Raises:
RuntimeError: unless exactly one child element is provided.
ValueError: if the child element does not have an on_change handler.
"""
...
debounce_input = DebounceInput.create