reflex/reflex/components/radix/themes/components.pyi
2023-10-24 14:29:54 -07:00

1154 lines
42 KiB
Python

"""Stub file for components.py"""
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `scripts/pyi_generator.py`!
# ------------------------------------------------------
from typing import Any, Dict, List, Literal, Optional, Union, overload
from reflex.components.radix.themes.base import CommonMarginProps
from reflex.components.component import Component
from reflex.el.elements import Input
from reflex.components.radix.themes.base import RadixThemesComponent
from reflex.vars import Var, BaseVar, ComputedVar
from reflex.event import EventHandler, EventChain, EventSpec
from reflex.style import Style
LiteralButtonSize = Literal["1", "2", "3", "4"]
LiteralSwitchSize = Literal["1", "2", "3", "4"]
LiteralTextFieldSize = Literal["1", "2", "3"]
LiteralTextFieldVariant = Literal["classic", "surface", "soft"]
class Button(CommonMarginProps, RadixThemesComponent):
@overload
@classmethod
def create( # type: ignore
cls,
*children,
as_child: Optional[Union[Var[bool], bool]] = None,
size: Optional[
Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]]
] = None,
variant: Optional[
Union[
Var[Literal["solid", "soft", "outline", "ghost"]],
Literal["solid", "soft", "outline", "ghost"],
]
] = None,
color: Optional[
Union[
Var[
Literal[
"tomato",
"red",
"ruby",
"crimson",
"pink",
"plum",
"purple",
"violet",
"iris",
"indigo",
"blue",
"cyan",
"teal",
"jade",
"green",
"grass",
"brown",
"orange",
"sky",
"mint",
"lime",
"yellow",
"amber",
"gold",
"bronze",
"gray",
]
],
Literal[
"tomato",
"red",
"ruby",
"crimson",
"pink",
"plum",
"purple",
"violet",
"iris",
"indigo",
"blue",
"cyan",
"teal",
"jade",
"green",
"grass",
"brown",
"orange",
"sky",
"mint",
"lime",
"yellow",
"amber",
"gold",
"bronze",
"gray",
],
]
] = None,
high_contrast: Optional[Union[Var[bool], bool]] = None,
radius: Optional[
Union[
Var[Literal["none", "small", "medium", "large", "full"]],
Literal["none", "small", "medium", "large", "full"],
]
] = None,
m: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
mx: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
my: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
mt: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
mr: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
mb: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
ml: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = 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, 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
) -> "Button":
"""Create a new component instance.
Will prepend "RadixThemes" to the component tag to avoid conflicts with
other UI libraries for common names, like Text and Button.
Args:
*children: Child components.
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
size: Button size "1" - "4"
variant: Variant of button: "solid" | "soft" | "outline" | "ghost"
color: Override theme color for button
high_contrast: Whether to render the button with higher contrast color against background
radius: Override theme radius for button: "none" | "small" | "medium" | "large" | "full"
m: Margin: "0" - "9"
mx: Margin horizontal: "0" - "9"
my: Margin vertical: "0" - "9"
mt: Margin top: "0" - "9"
mr: Margin right: "0" - "9"
mb: Margin bottom: "0" - "9"
ml: Margin left: "0" - "9"
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: Component properties.
Returns:
A new component instance.
"""
...
class Switch(CommonMarginProps, RadixThemesComponent):
@overload
@classmethod
def create( # type: ignore
cls,
*children,
as_child: Optional[Union[Var[bool], bool]] = None,
default_checked: Optional[Union[Var[bool], bool]] = None,
checked: Optional[Union[Var[bool], bool]] = None,
disabled: Optional[Union[Var[bool], bool]] = None,
required: Optional[Union[Var[bool], bool]] = None,
name: Optional[Union[Var[str], str]] = None,
value: Optional[Union[Var[str], str]] = None,
size: Optional[
Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]]
] = None,
variant: Optional[
Union[
Var[Literal["solid", "soft", "outline", "ghost"]],
Literal["solid", "soft", "outline", "ghost"],
]
] = None,
color: Optional[
Union[
Var[
Literal[
"tomato",
"red",
"ruby",
"crimson",
"pink",
"plum",
"purple",
"violet",
"iris",
"indigo",
"blue",
"cyan",
"teal",
"jade",
"green",
"grass",
"brown",
"orange",
"sky",
"mint",
"lime",
"yellow",
"amber",
"gold",
"bronze",
"gray",
]
],
Literal[
"tomato",
"red",
"ruby",
"crimson",
"pink",
"plum",
"purple",
"violet",
"iris",
"indigo",
"blue",
"cyan",
"teal",
"jade",
"green",
"grass",
"brown",
"orange",
"sky",
"mint",
"lime",
"yellow",
"amber",
"gold",
"bronze",
"gray",
],
]
] = None,
high_contrast: Optional[Union[Var[bool], bool]] = None,
radius: Optional[
Union[
Var[Literal["none", "small", "medium", "large", "full"]],
Literal["none", "small", "medium", "large", "full"],
]
] = None,
m: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
mx: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
my: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
mt: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
mr: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
mb: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
ml: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = 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, str]] = None,
on_blur: Optional[
Union[EventHandler, EventSpec, List, function, BaseVar]
] = None,
on_checked_change: 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
) -> "Switch":
"""Create a new component instance.
Will prepend "RadixThemes" to the component tag to avoid conflicts with
other UI libraries for common names, like Text and Button.
Args:
*children: Child components.
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
default_checked: Whether the switch is checked by default
checked: Whether the switch is checked
disabled: If true, prevent the user from interacting with the switch
required: If true, the user must interact with the switch to submit the form
name: The name of the switch (when submitting a form)
value: The value associated with the "on" position
size: Switch size "1" - "4"
variant: Variant of switch: "solid" | "soft" | "outline" | "ghost"
color: Override theme color for switch
high_contrast: Whether to render the switch with higher contrast color against background
radius: Override theme radius for switch: "none" | "small" | "medium" | "large" | "full"
m: Margin: "0" - "9"
mx: Margin horizontal: "0" - "9"
my: Margin vertical: "0" - "9"
mt: Margin top: "0" - "9"
mr: Margin right: "0" - "9"
mb: Margin bottom: "0" - "9"
ml: Margin left: "0" - "9"
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: Component properties.
Returns:
A new component instance.
"""
...
class TextFieldRoot(CommonMarginProps, RadixThemesComponent):
@overload
@classmethod
def create( # type: ignore
cls,
*children,
size: Optional[
Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
] = None,
variant: Optional[
Union[
Var[Literal["classic", "surface", "soft"]],
Literal["classic", "surface", "soft"],
]
] = None,
color: Optional[
Union[
Var[
Literal[
"tomato",
"red",
"ruby",
"crimson",
"pink",
"plum",
"purple",
"violet",
"iris",
"indigo",
"blue",
"cyan",
"teal",
"jade",
"green",
"grass",
"brown",
"orange",
"sky",
"mint",
"lime",
"yellow",
"amber",
"gold",
"bronze",
"gray",
]
],
Literal[
"tomato",
"red",
"ruby",
"crimson",
"pink",
"plum",
"purple",
"violet",
"iris",
"indigo",
"blue",
"cyan",
"teal",
"jade",
"green",
"grass",
"brown",
"orange",
"sky",
"mint",
"lime",
"yellow",
"amber",
"gold",
"bronze",
"gray",
],
]
] = None,
radius: Optional[
Union[
Var[Literal["none", "small", "medium", "large", "full"]],
Literal["none", "small", "medium", "large", "full"],
]
] = None,
m: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
mx: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
my: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
mt: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
mr: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
mb: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
ml: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = 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, 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
) -> "TextFieldRoot":
"""Create a new component instance.
Will prepend "RadixThemes" to the component tag to avoid conflicts with
other UI libraries for common names, like Text and Button.
Args:
*children: Child components.
size: Text field size "1" - "3"
variant: Variant of text field: "classic" | "surface" | "soft"
color: Override theme color for text field
radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
m: Margin: "0" - "9"
mx: Margin horizontal: "0" - "9"
my: Margin vertical: "0" - "9"
mt: Margin top: "0" - "9"
mr: Margin right: "0" - "9"
mb: Margin bottom: "0" - "9"
ml: Margin left: "0" - "9"
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: Component properties.
Returns:
A new component instance.
"""
...
class TextField(TextFieldRoot, Input):
@overload
@classmethod
def create( # type: ignore
cls,
*children,
size: Optional[
Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
] = None,
variant: Optional[
Union[
Var[Literal["classic", "surface", "soft"]],
Literal["classic", "surface", "soft"],
]
] = None,
color: Optional[
Union[
Var[
Literal[
"tomato",
"red",
"ruby",
"crimson",
"pink",
"plum",
"purple",
"violet",
"iris",
"indigo",
"blue",
"cyan",
"teal",
"jade",
"green",
"grass",
"brown",
"orange",
"sky",
"mint",
"lime",
"yellow",
"amber",
"gold",
"bronze",
"gray",
]
],
Literal[
"tomato",
"red",
"ruby",
"crimson",
"pink",
"plum",
"purple",
"violet",
"iris",
"indigo",
"blue",
"cyan",
"teal",
"jade",
"green",
"grass",
"brown",
"orange",
"sky",
"mint",
"lime",
"yellow",
"amber",
"gold",
"bronze",
"gray",
],
]
] = None,
radius: Optional[
Union[
Var[Literal["none", "small", "medium", "large", "full"]],
Literal["none", "small", "medium", "large", "full"],
]
] = None,
m: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
mx: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
my: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
mt: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
mr: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
mb: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
ml: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = None,
accept: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
access_key: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
alt: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
auto_capitalize: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
auto_complete: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
auto_focus: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
capture: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
checked: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
content_editable: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
context_menu: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
dirname: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
disabled: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
draggable: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
enter_key_hint: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
form: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
form_action: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
form_enc_type: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
form_method: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
form_no_validate: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
form_target: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
height: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
hidden: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
input_mode: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
item_prop: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
list: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
max: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
max_length: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
min_length: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
min: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
multiple: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
name: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
pattern: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
placeholder: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
read_only: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
required: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
spell_check: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
src: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
step: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
tab_index: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
title: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
translate: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
type: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
use_map: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
value: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = None,
width: Optional[
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
] = 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, 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_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_key_down: Optional[
Union[EventHandler, EventSpec, List, function, BaseVar]
] = None,
on_key_up: 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
) -> "TextField":
"""Create an Input component.
Args:
*children: The children of the component.
size: Text field size "1" - "3"
variant: Variant of text field: "classic" | "surface" | "soft"
color: Override theme color for text field
radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
m: Margin: "0" - "9"
mx: Margin horizontal: "0" - "9"
my: Margin vertical: "0" - "9"
mt: Margin top: "0" - "9"
mr: Margin right: "0" - "9"
mb: Margin bottom: "0" - "9"
ml: Margin left: "0" - "9"
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 properties of the component.
Returns:
The component.
"""
...
class TextFieldSlot(RadixThemesComponent):
@overload
@classmethod
def create( # type: ignore
cls,
*children,
color: Optional[
Union[
Var[
Literal[
"tomato",
"red",
"ruby",
"crimson",
"pink",
"plum",
"purple",
"violet",
"iris",
"indigo",
"blue",
"cyan",
"teal",
"jade",
"green",
"grass",
"brown",
"orange",
"sky",
"mint",
"lime",
"yellow",
"amber",
"gold",
"bronze",
"gray",
]
],
Literal[
"tomato",
"red",
"ruby",
"crimson",
"pink",
"plum",
"purple",
"violet",
"iris",
"indigo",
"blue",
"cyan",
"teal",
"jade",
"green",
"grass",
"brown",
"orange",
"sky",
"mint",
"lime",
"yellow",
"amber",
"gold",
"bronze",
"gray",
],
]
] = None,
gap: Optional[
Union[
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
]
] = 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, 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
) -> "TextFieldSlot":
"""Create a new component instance.
Will prepend "RadixThemes" to the component tag to avoid conflicts with
other UI libraries for common names, like Text and Button.
Args:
*children: Child components.
color: Override theme color for text field slot
gap: Override the gap spacing between slot and input: "1" - "9"
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: Component properties.
Returns:
A new component instance.
"""
...