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

591 lines
21 KiB
Python

"""Stub file for base.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.component import Component
from reflex.vars import Var, BaseVar, ComputedVar
from reflex.event import EventHandler, EventChain, EventSpec
from reflex.style import Style
LiteralAlign = Literal["start", "center", "end", "baseline", "stretch"]
LiteralJustify = Literal["start", "center", "end", "between"]
LiteralSize = Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
LiteralVariant = Literal["solid", "soft", "outline", "ghost"]
LiteralAccentColor = 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",
]
LiteralAppearance = Literal["inherit", "light", "dark"]
LiteralGrayColor = Literal["gray", "mauve", "slate", "sage", "olive", "sand", "auto"]
LiteralPanelBackground = Literal["solid", "transparent"]
LiteralRadius = Literal["none", "small", "medium", "large", "full"]
LiteralScaling = Literal["90%", "95%", "100%", "105%", "110%"]
class CommonMarginProps(Component):
@overload
@classmethod
def create( # type: ignore
cls,
*children,
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
) -> "CommonMarginProps":
"""Create the component.
Args:
*children: The children of the component.
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 props of the component.
Returns:
The component.
Raises:
TypeError: If an invalid child is passed.
"""
...
class RadixThemesComponent(Component):
@overload
@classmethod
def create( # type: ignore
cls,
*children,
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
) -> "RadixThemesComponent":
"""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.
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 Theme(RadixThemesComponent):
@overload
@classmethod
def create( # type: ignore
cls,
*children,
has_background: Optional[Union[Var[bool], bool]] = None,
appearance: Optional[
Union[
Var[Literal["inherit", "light", "dark"]],
Literal["inherit", "light", "dark"],
]
] = None,
accent_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,
gray_color: Optional[
Union[
Var[Literal["gray", "mauve", "slate", "sage", "olive", "sand", "auto"]],
Literal["gray", "mauve", "slate", "sage", "olive", "sand", "auto"],
]
] = None,
panel_background: Optional[
Union[Var[Literal["solid", "transparent"]], Literal["solid", "transparent"]]
] = None,
radius: Optional[
Union[
Var[Literal["none", "small", "medium", "large", "full"]],
Literal["none", "small", "medium", "large", "full"],
]
] = None,
scaling: Optional[
Union[
Var[Literal["90%", "95%", "100%", "105%", "110%"]],
Literal["90%", "95%", "100%", "105%", "110%"],
]
] = 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
) -> "Theme":
"""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.
has_background: Whether to apply the themes background color to the theme node.
appearance: Override light or dark mode theme: "inherit" | "light" | "dark"
accent_color: The color used for default buttons, typography, backgrounds, etc
gray_color: The shade of gray
panel_background: Whether panel backgrounds are transparent: "solid" | "transparent" (default)
radius: Element border radius: "none" | "small" | "medium" | "large" | "full"
scaling: Scale of all theme items: "90%" | "95%" | "100%" | "105%" | "110%"
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 ThemePanel(RadixThemesComponent):
@overload
@classmethod
def create( # type: ignore
cls,
*children,
default_open: Optional[Union[Var[bool], 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_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
) -> "ThemePanel":
"""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.
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 RadixThemesColorModeProvider(Component):
@overload
@classmethod
def create( # type: ignore
cls,
*children,
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
) -> "RadixThemesColorModeProvider":
"""Create the component.
Args:
*children: The children of the component.
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.
Raises:
TypeError: If an invalid child is passed.
"""
...