reflex/reflex/components/chakra/forms/pininput.pyi
Khaleel Al-Adhami d253fc4dcd
add responsive props to radix components (#3583)
* implement basic behavior to handle both radix and css

* add all components in theme, AND change pyi to include path of reflex types

* order type annotations in pyi_generator (#3585)

* order type annotations in pyi_generator

* run pyi_generator

* classvars should not be backend vars (#3578)

* classvars should not be backend vars

* cleanup RESERVED_BACKEND_VAR_NAMES

* order type annotations in pyi_generator (#3585)

* order type annotations in pyi_generator

* run pyi_generator

* do not validate non-cached var deps (#3576)

* do not validate non-cached var deps

* further improve Exceptions for misconfigured var deps

* order type annotations in pyi_generator (#3585)

* order type annotations in pyi_generator

* run pyi_generator

* fix git merge remains

* define function globally

* use more modern annotations

* only trigger when direct value and not state

* simplify unions

* accidentally removed avatar oop

---------

Co-authored-by: benedikt-bartscher <31854409+benedikt-bartscher@users.noreply.github.com>
2024-06-28 17:01:23 -07:00

223 lines
9.3 KiB
Python

"""Stub file for reflex/components/chakra/forms/pininput.py"""
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
from typing import Any, Dict, Literal, Optional, Union, overload
import reflex
from reflex.vars import Var, BaseVar, ComputedVar
from reflex.event import EventChain, EventHandler, EventSpec
from reflex.style import Style
from typing import Optional
from reflex.components.chakra import ChakraComponent, LiteralInputVariant
from reflex.components.component import Component
from reflex.components.tags.tag import Tag
from reflex.event import EventHandler
from reflex.utils import format
from reflex.utils.imports import ImportDict, merge_imports
from reflex.vars import Var
class PinInput(ChakraComponent):
def get_ref(self) -> str | None: ...
@overload
@classmethod
def create( # type: ignore
cls,
*children,
value: Optional[Union[reflex.vars.Var[str], str]] = None,
auto_focus: Optional[Union[reflex.vars.Var[bool], bool]] = None,
default_value: Optional[Union[reflex.vars.Var[str], str]] = None,
error_border_color: Optional[Union[reflex.vars.Var[str], str]] = None,
focus_border_color: Optional[Union[reflex.vars.Var[str], str]] = None,
id_: Optional[Union[reflex.vars.Var[str], str]] = None,
length: Optional[Union[reflex.vars.Var[int], int]] = None,
is_disabled: Optional[Union[reflex.vars.Var[bool], bool]] = None,
is_invalid: Optional[Union[reflex.vars.Var[bool], bool]] = None,
manage_focus: Optional[Union[reflex.vars.Var[bool], bool]] = None,
mask: Optional[Union[reflex.vars.Var[bool], bool]] = None,
placeholder: Optional[Union[reflex.vars.Var[str], str]] = None,
type_: Optional[Union[reflex.vars.Var[str], str]] = None,
variant: Optional[
Union[
reflex.vars.Var[Literal["outline", "filled", "flushed", "unstyled"]],
Literal["outline", "filled", "flushed", "unstyled"],
]
] = None,
name: Optional[Union[reflex.vars.Var[str], str]] = 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[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_change: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_click: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_complete: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_context_menu: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_double_click: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_focus: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_mount: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_mouse_down: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_mouse_enter: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_mouse_leave: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_mouse_move: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_mouse_out: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_mouse_over: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_mouse_up: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_scroll: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_unmount: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
**props
) -> "PinInput":
"""Create a pin input component.
If no children are passed in, the component will create a default pin input
based on the length prop.
Args:
*children: The children of the component.
value: State var to bind the input.
auto_focus: If true, the pin input receives focus on mount
default_value: The default value of the pin input
error_border_color: The border color when the input is invalid.
focus_border_color: The border color when the input is focused.
id_: The top-level id string that will be applied to the input fields. The index of the input will be appended to this top-level id.
length: The length of the number input.
is_disabled: If true, the pin input component is put in the disabled state
is_invalid: If true, the pin input component is put in the invalid state
manage_focus: If true, focus will move automatically to the next input once filled
mask: If true, the input's value will be masked just like `type=password`
placeholder: The placeholder for the pin input
type_: The type of values the pin-input should allow ("number" | "alphanumeric").
variant: "outline" | "flushed" | "filled" | "unstyled"
name: The name of the form field
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
class_name: The class name for the component.
autofocus: Whether the component should take the focus once the page is loaded
custom_attrs: custom attribute
**props: The props of the component.
Returns:
The pin input component.
"""
...
class PinInputField(ChakraComponent):
@classmethod
def for_length(cls, length: Var | int, **props) -> Var: ...
def get_ref(self): ...
@overload
@classmethod
def create( # type: ignore
cls,
*children,
index: Optional[Union[reflex.vars.Var[int], int]] = None,
name: Optional[Union[reflex.vars.Var[str], str]] = 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[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_click: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_context_menu: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_double_click: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_focus: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_mount: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_mouse_down: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_mouse_enter: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_mouse_leave: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_mouse_move: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_mouse_out: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_mouse_over: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_mouse_up: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_scroll: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
on_unmount: Optional[
Union[EventHandler, EventSpec, list, function, BaseVar]
] = None,
**props
) -> "PinInputField":
"""Create the component.
Args:
*children: The children of the component.
index: the position of the PinInputField inside the PinInput. Default to None because it is assigned by PinInput when created.
name: The name of the form field
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
class_name: The class name for the component.
autofocus: Whether the component should take the focus once the page is loaded
custom_attrs: custom attribute
**props: The props of the component.
Returns:
The component.
"""
...