Rename components in top level namespace (#2589)
This commit is contained in:
parent
f2a931339a
commit
f05d5ba7ba
@ -43,8 +43,8 @@ def FormSubmit():
|
|||||||
rx.switch(id="bool_input4"),
|
rx.switch(id="bool_input4"),
|
||||||
rx.slider(id="slider_input", default_value=[50], width="100%"),
|
rx.slider(id="slider_input", default_value=[50], width="100%"),
|
||||||
rx.chakra.range_slider(id="range_input"),
|
rx.chakra.range_slider(id="range_input"),
|
||||||
rx.radio_group(["option1", "option2"], id="radio_input"),
|
rx.radio(["option1", "option2"], id="radio_input"),
|
||||||
rx.radio_group(FormState.var_options, id="radio_input_var"),
|
rx.radio(FormState.var_options, id="radio_input_var"),
|
||||||
rx.chakra.select(["option1", "option2"], id="select_input"),
|
rx.chakra.select(["option1", "option2"], id="select_input"),
|
||||||
rx.chakra.select(FormState.var_options, id="select_input_var"),
|
rx.chakra.select(FormState.var_options, id="select_input_var"),
|
||||||
rx.text_area(id="text_area_input"),
|
rx.text_area(id="text_area_input"),
|
||||||
@ -96,7 +96,7 @@ def FormSubmitName():
|
|||||||
rx.switch(name="bool_input4"),
|
rx.switch(name="bool_input4"),
|
||||||
rx.slider(name="slider_input", default_value=[50], width="100%"),
|
rx.slider(name="slider_input", default_value=[50], width="100%"),
|
||||||
rx.chakra.range_slider(name="range_input"),
|
rx.chakra.range_slider(name="range_input"),
|
||||||
rx.radio_group(FormState.options, name="radio_input"),
|
rx.radio(FormState.options, name="radio_input"),
|
||||||
rx.select(
|
rx.select(
|
||||||
FormState.options,
|
FormState.options,
|
||||||
name="select_input",
|
name="select_input",
|
||||||
|
@ -58,33 +58,27 @@ _ALL_COMPONENTS = [
|
|||||||
"container",
|
"container",
|
||||||
"context_menu",
|
"context_menu",
|
||||||
"dialog",
|
"dialog",
|
||||||
|
"divider",
|
||||||
"drawer",
|
"drawer",
|
||||||
"dropdown_menu",
|
|
||||||
# "bold" (em)
|
|
||||||
"flex",
|
"flex",
|
||||||
"form",
|
"form",
|
||||||
"grid",
|
"grid",
|
||||||
"heading",
|
"heading",
|
||||||
"hover_card",
|
"hover_card",
|
||||||
"hstack",
|
"hstack",
|
||||||
# "icon" (lucide)
|
|
||||||
"icon_button",
|
"icon_button",
|
||||||
"inset",
|
"inset",
|
||||||
"input",
|
"input",
|
||||||
"kbd",
|
|
||||||
"link",
|
"link",
|
||||||
|
"menu",
|
||||||
"popover",
|
"popover",
|
||||||
"progress",
|
"progress",
|
||||||
"quote",
|
"radio",
|
||||||
"radio_group",
|
|
||||||
"scroll_area",
|
"scroll_area",
|
||||||
"section",
|
"section",
|
||||||
"select",
|
"select",
|
||||||
"separator",
|
|
||||||
# "separator" (divider?),
|
|
||||||
"slider",
|
"slider",
|
||||||
"spacer",
|
"spacer",
|
||||||
# "strong" (bold?)
|
|
||||||
"stack",
|
"stack",
|
||||||
"switch",
|
"switch",
|
||||||
"table",
|
"table",
|
||||||
|
@ -45,8 +45,8 @@ from reflex.components import code as code
|
|||||||
from reflex.components import container as container
|
from reflex.components import container as container
|
||||||
from reflex.components import context_menu as context_menu
|
from reflex.components import context_menu as context_menu
|
||||||
from reflex.components import dialog as dialog
|
from reflex.components import dialog as dialog
|
||||||
|
from reflex.components import divider as divider
|
||||||
from reflex.components import drawer as drawer
|
from reflex.components import drawer as drawer
|
||||||
from reflex.components import dropdown_menu as dropdown_menu
|
|
||||||
from reflex.components import flex as flex
|
from reflex.components import flex as flex
|
||||||
from reflex.components import form as form
|
from reflex.components import form as form
|
||||||
from reflex.components import grid as grid
|
from reflex.components import grid as grid
|
||||||
@ -56,16 +56,14 @@ from reflex.components import hstack as hstack
|
|||||||
from reflex.components import icon_button as icon_button
|
from reflex.components import icon_button as icon_button
|
||||||
from reflex.components import inset as inset
|
from reflex.components import inset as inset
|
||||||
from reflex.components import input as input
|
from reflex.components import input as input
|
||||||
from reflex.components import kbd as kbd
|
|
||||||
from reflex.components import link as link
|
from reflex.components import link as link
|
||||||
|
from reflex.components import menu as menu
|
||||||
from reflex.components import popover as popover
|
from reflex.components import popover as popover
|
||||||
from reflex.components import progress as progress
|
from reflex.components import progress as progress
|
||||||
from reflex.components import quote as quote
|
from reflex.components import radio as radio
|
||||||
from reflex.components import radio_group as radio_group
|
|
||||||
from reflex.components import scroll_area as scroll_area
|
from reflex.components import scroll_area as scroll_area
|
||||||
from reflex.components import section as section
|
from reflex.components import section as section
|
||||||
from reflex.components import select as select
|
from reflex.components import select as select
|
||||||
from reflex.components import separator as separator
|
|
||||||
from reflex.components import slider as slider
|
from reflex.components import slider as slider
|
||||||
from reflex.components import spacer as spacer
|
from reflex.components import spacer as spacer
|
||||||
from reflex.components import stack as stack
|
from reflex.components import stack as stack
|
||||||
|
@ -9,7 +9,7 @@ from typing import Any, Dict, Iterator, Literal
|
|||||||
from jinja2 import Environment
|
from jinja2 import Environment
|
||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.components.radix.themes.components.textfield import TextFieldInput
|
from reflex.components.radix.themes.components.text_field import TextFieldInput
|
||||||
from reflex.components.tags.tag import Tag
|
from reflex.components.tags.tag import Tag
|
||||||
from reflex.constants.base import Dirs
|
from reflex.constants.base import Dirs
|
||||||
from reflex.constants.event import EventTriggers
|
from reflex.constants.event import EventTriggers
|
||||||
|
@ -12,7 +12,7 @@ from types import SimpleNamespace
|
|||||||
from typing import Any, Dict, Iterator, Literal
|
from typing import Any, Dict, Iterator, Literal
|
||||||
from jinja2 import Environment
|
from jinja2 import Environment
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.components.radix.themes.components.textfield import TextFieldInput
|
from reflex.components.radix.themes.components.text_field import TextFieldInput
|
||||||
from reflex.components.tags.tag import Tag
|
from reflex.components.tags.tag import Tag
|
||||||
from reflex.constants.base import Dirs
|
from reflex.constants.base import Dirs
|
||||||
from reflex.constants.event import EventTriggers
|
from reflex.constants.event import EventTriggers
|
||||||
|
@ -1,30 +1,33 @@
|
|||||||
"""Radix themes components."""
|
"""Radix themes components."""
|
||||||
|
|
||||||
from .alertdialog import alert_dialog as alert_dialog
|
from .alert_dialog import alert_dialog as alert_dialog
|
||||||
from .aspectratio import aspect_ratio as aspect_ratio
|
from .aspect_ratio import aspect_ratio as aspect_ratio
|
||||||
from .avatar import avatar as avatar
|
from .avatar import avatar as avatar
|
||||||
from .badge import badge as badge
|
from .badge import badge as badge
|
||||||
from .button import button as button
|
from .button import button as button
|
||||||
from .callout import callout as callout
|
from .callout import callout as callout
|
||||||
from .card import card as card
|
from .card import card as card
|
||||||
from .checkbox import checkbox as checkbox
|
from .checkbox import checkbox as checkbox
|
||||||
from .contextmenu import context_menu as context_menu
|
from .context_menu import context_menu as context_menu
|
||||||
from .dialog import dialog as dialog
|
from .dialog import dialog as dialog
|
||||||
from .dropdownmenu import dropdown_menu as dropdown_menu
|
from .dropdown_menu import dropdown_menu as dropdown_menu
|
||||||
from .hovercard import hover_card as hover_card
|
from .dropdown_menu import menu as menu
|
||||||
from .iconbutton import icon_button as icon_button
|
from .hover_card import hover_card as hover_card
|
||||||
|
from .icon_button import icon_button as icon_button
|
||||||
from .inset import inset as inset
|
from .inset import inset as inset
|
||||||
from .popover import popover as popover
|
from .popover import popover as popover
|
||||||
from .radiogroup import radio_group as radio_group
|
from .radio_group import radio as radio
|
||||||
from .scrollarea import scroll_area as scroll_area
|
from .radio_group import radio_group as radio_group
|
||||||
|
from .scroll_area import scroll_area as scroll_area
|
||||||
from .select import select as select
|
from .select import select as select
|
||||||
|
from .separator import divider as divider
|
||||||
from .separator import separator as separator
|
from .separator import separator as separator
|
||||||
from .slider import slider as slider
|
from .slider import slider as slider
|
||||||
from .switch import switch as switch
|
from .switch import switch as switch
|
||||||
from .table import table as table
|
from .table import table as table
|
||||||
from .tabs import tabs as tabs
|
from .tabs import tabs as tabs
|
||||||
from .textarea import text_area as text_area
|
from .text_area import text_area as text_area
|
||||||
from .textfield import text_field as text_field
|
from .text_field import text_field as text_field
|
||||||
from .tooltip import tooltip as tooltip
|
from .tooltip import tooltip as tooltip
|
||||||
|
|
||||||
input = text_field
|
input = text_field
|
||||||
@ -40,12 +43,15 @@ __all__ = [
|
|||||||
"checkbox",
|
"checkbox",
|
||||||
"context_menu",
|
"context_menu",
|
||||||
"dialog",
|
"dialog",
|
||||||
|
"divider",
|
||||||
"dropdown_menu",
|
"dropdown_menu",
|
||||||
"hover_card",
|
"hover_card",
|
||||||
"icon_button",
|
"icon_button",
|
||||||
"input",
|
"input",
|
||||||
"inset",
|
"inset",
|
||||||
|
"menu",
|
||||||
"popover",
|
"popover",
|
||||||
|
"radio",
|
||||||
"radio_group",
|
"radio_group",
|
||||||
"scroll_area",
|
"scroll_area",
|
||||||
"select",
|
"select",
|
||||||
|
1128
reflex/components/radix/themes/components/alert_dialog.pyi
Normal file
1128
reflex/components/radix/themes/components/alert_dialog.pyi
Normal file
File diff suppressed because it is too large
Load Diff
162
reflex/components/radix/themes/components/aspect_ratio.pyi
Normal file
162
reflex/components/radix/themes/components/aspect_ratio.pyi
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
"""Stub file for reflex/components/radix/themes/components/aspect_ratio.py"""
|
||||||
|
# ------------------- DO NOT EDIT ----------------------
|
||||||
|
# This file was generated by `scripts/pyi_generator.py`!
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||||
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
|
from reflex.style import Style
|
||||||
|
from typing import Union
|
||||||
|
from reflex.vars import Var
|
||||||
|
from ..base import RadixThemesComponent
|
||||||
|
|
||||||
|
class AspectRatio(RadixThemesComponent):
|
||||||
|
@overload
|
||||||
|
@classmethod
|
||||||
|
def create( # type: ignore
|
||||||
|
cls,
|
||||||
|
*children,
|
||||||
|
color: Optional[Union[Var[str], str]] = None,
|
||||||
|
color_scheme: 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,
|
||||||
|
ratio: Optional[Union[Var[Union[float, int]], Union[float, int]]] = None,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
_rename_props: Optional[Dict[str, str]] = 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
|
||||||
|
) -> "AspectRatio":
|
||||||
|
"""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: map to CSS default color property.
|
||||||
|
color_scheme: map to radix color property.
|
||||||
|
ratio: The ratio of the width to the height of the element
|
||||||
|
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
|
||||||
|
_rename_props: props to change the name of
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Component properties.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A new component instance.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
aspect_ratio = AspectRatio.create
|
1249
reflex/components/radix/themes/components/context_menu.pyi
Normal file
1249
reflex/components/radix/themes/components/context_menu.pyi
Normal file
File diff suppressed because it is too large
Load Diff
@ -285,4 +285,4 @@ class DropdownMenu(SimpleNamespace):
|
|||||||
separator = staticmethod(DropdownMenuSeparator.create)
|
separator = staticmethod(DropdownMenuSeparator.create)
|
||||||
|
|
||||||
|
|
||||||
dropdown_menu = DropdownMenu()
|
menu = dropdown_menu = DropdownMenu()
|
1350
reflex/components/radix/themes/components/dropdown_menu.pyi
Normal file
1350
reflex/components/radix/themes/components/dropdown_menu.pyi
Normal file
File diff suppressed because it is too large
Load Diff
700
reflex/components/radix/themes/components/hover_card.pyi
Normal file
700
reflex/components/radix/themes/components/hover_card.pyi
Normal file
@ -0,0 +1,700 @@
|
|||||||
|
"""Stub file for reflex/components/radix/themes/components/hover_card.py"""
|
||||||
|
# ------------------- DO NOT EDIT ----------------------
|
||||||
|
# This file was generated by `scripts/pyi_generator.py`!
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||||
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
|
from reflex.style import Style
|
||||||
|
from types import SimpleNamespace
|
||||||
|
from typing import Any, Dict, Literal
|
||||||
|
from reflex import el
|
||||||
|
from reflex.constants import EventTriggers
|
||||||
|
from reflex.vars import Var
|
||||||
|
from ..base import RadixThemesComponent
|
||||||
|
|
||||||
|
class HoverCardRoot(RadixThemesComponent):
|
||||||
|
def get_event_triggers(self) -> Dict[str, Any]: ...
|
||||||
|
@overload
|
||||||
|
@classmethod
|
||||||
|
def create( # type: ignore
|
||||||
|
cls,
|
||||||
|
*children,
|
||||||
|
color: Optional[Union[Var[str], str]] = None,
|
||||||
|
color_scheme: 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,
|
||||||
|
default_open: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
open: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
open_delay: Optional[Union[Var[int], int]] = None,
|
||||||
|
close_delay: Optional[Union[Var[int], int]] = None,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
_rename_props: Optional[Dict[str, str]] = 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_open_change: 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
|
||||||
|
) -> "HoverCardRoot":
|
||||||
|
"""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: map to CSS default color property.
|
||||||
|
color_scheme: map to radix color property.
|
||||||
|
default_open: The open state of the hover card when it is initially rendered. Use when you do not need to control its open state.
|
||||||
|
open: The controlled open state of the hover card. Must be used in conjunction with onOpenChange.
|
||||||
|
open_delay: The duration from when the mouse enters the trigger until the hover card opens.
|
||||||
|
close_delay: The duration from when the mouse leaves the trigger until the hover card closes.
|
||||||
|
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
|
||||||
|
_rename_props: props to change the name of
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Component properties.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A new component instance.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
class HoverCardTrigger(RadixThemesComponent):
|
||||||
|
@overload
|
||||||
|
@classmethod
|
||||||
|
def create( # type: ignore
|
||||||
|
cls,
|
||||||
|
*children,
|
||||||
|
color: Optional[Union[Var[str], str]] = None,
|
||||||
|
color_scheme: 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,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
_rename_props: Optional[Dict[str, str]] = 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
|
||||||
|
) -> "HoverCardTrigger":
|
||||||
|
"""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: map to CSS default color property.
|
||||||
|
color_scheme: map to radix color property.
|
||||||
|
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
|
||||||
|
_rename_props: props to change the name of
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Component properties.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A new component instance.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
class HoverCardContent(el.Div, RadixThemesComponent):
|
||||||
|
@overload
|
||||||
|
@classmethod
|
||||||
|
def create( # type: ignore
|
||||||
|
cls,
|
||||||
|
*children,
|
||||||
|
color: Optional[Union[Var[str], str]] = None,
|
||||||
|
color_scheme: 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,
|
||||||
|
side: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["top", "right", "bottom", "left"]],
|
||||||
|
Literal["top", "right", "bottom", "left"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
side_offset: Optional[Union[Var[int], int]] = None,
|
||||||
|
align: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["start", "center", "end"]],
|
||||||
|
Literal["start", "center", "end"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
avoid_collisions: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
access_key: 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,
|
||||||
|
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,
|
||||||
|
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,
|
||||||
|
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,
|
||||||
|
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,
|
||||||
|
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,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
_rename_props: Optional[Dict[str, str]] = 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
|
||||||
|
) -> "HoverCardContent":
|
||||||
|
"""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: map to CSS default color property.
|
||||||
|
color_scheme: map to radix color property.
|
||||||
|
side: The preferred side of the trigger to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled.
|
||||||
|
side_offset: The distance in pixels from the trigger.
|
||||||
|
align: The preferred alignment against the trigger. May change when collisions occur.
|
||||||
|
avoid_collisions: Whether or not the hover card should avoid collisions with its trigger.
|
||||||
|
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||||
|
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||||
|
content_editable: Indicates whether the element's content is editable.
|
||||||
|
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||||
|
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||||
|
draggable: Defines whether the element can be dragged.
|
||||||
|
enter_key_hint: Hints what media types the media element is able to play.
|
||||||
|
hidden: Defines whether the element is hidden.
|
||||||
|
input_mode: Defines the type of the element.
|
||||||
|
item_prop: Defines the name of the element for metadata purposes.
|
||||||
|
lang: Defines the language used in the element.
|
||||||
|
role: Defines the role of the element.
|
||||||
|
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||||
|
spell_check: Defines whether the element may be checked for spelling errors.
|
||||||
|
tab_index: Defines the position of the current element in the tabbing order.
|
||||||
|
title: Defines a tooltip for the element.
|
||||||
|
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
|
||||||
|
_rename_props: props to change the name of
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Component properties.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A new component instance.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
class HoverCard(SimpleNamespace):
|
||||||
|
root = staticmethod(HoverCardRoot.create)
|
||||||
|
trigger = staticmethod(HoverCardTrigger.create)
|
||||||
|
content = staticmethod(HoverCardContent.create)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def __call__(
|
||||||
|
*children,
|
||||||
|
color: Optional[Union[Var[str], str]] = None,
|
||||||
|
color_scheme: 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,
|
||||||
|
default_open: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
open: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
open_delay: Optional[Union[Var[int], int]] = None,
|
||||||
|
close_delay: Optional[Union[Var[int], int]] = None,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
_rename_props: Optional[Dict[str, str]] = 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_open_change: 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
|
||||||
|
) -> "HoverCardRoot":
|
||||||
|
"""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: map to CSS default color property.
|
||||||
|
color_scheme: map to radix color property.
|
||||||
|
default_open: The open state of the hover card when it is initially rendered. Use when you do not need to control its open state.
|
||||||
|
open: The controlled open state of the hover card. Must be used in conjunction with onOpenChange.
|
||||||
|
open_delay: The duration from when the mouse enters the trigger until the hover card opens.
|
||||||
|
close_delay: The duration from when the mouse leaves the trigger until the hover card closes.
|
||||||
|
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
|
||||||
|
_rename_props: props to change the name of
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Component properties.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A new component instance.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
hover_card = HoverCard()
|
284
reflex/components/radix/themes/components/icon_button.pyi
Normal file
284
reflex/components/radix/themes/components/icon_button.pyi
Normal file
@ -0,0 +1,284 @@
|
|||||||
|
"""Stub file for reflex/components/radix/themes/components/icon_button.py"""
|
||||||
|
# ------------------- DO NOT EDIT ----------------------
|
||||||
|
# This file was generated by `scripts/pyi_generator.py`!
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||||
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
|
from reflex.style import Style
|
||||||
|
from typing import Literal
|
||||||
|
from reflex import el
|
||||||
|
from reflex.components.component import Component
|
||||||
|
from reflex.components.core.match import Match
|
||||||
|
from reflex.components.lucide import Icon
|
||||||
|
from reflex.style import Style
|
||||||
|
from reflex.vars import Var
|
||||||
|
from ..base import (
|
||||||
|
LiteralAccentColor,
|
||||||
|
LiteralRadius,
|
||||||
|
LiteralVariant,
|
||||||
|
RadixThemesComponent,
|
||||||
|
)
|
||||||
|
|
||||||
|
LiteralButtonSize = Literal["1", "2", "3", "4"]
|
||||||
|
|
||||||
|
class IconButton(el.Button, 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["classic", "solid", "soft", "surface", "outline", "ghost"]],
|
||||||
|
Literal["classic", "solid", "soft", "surface", "outline", "ghost"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
color_scheme: 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,
|
||||||
|
auto_focus: Optional[
|
||||||
|
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||||
|
] = None,
|
||||||
|
disabled: Optional[Union[Var[bool], 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,
|
||||||
|
name: 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,
|
||||||
|
value: 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,
|
||||||
|
auto_capitalize: 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,
|
||||||
|
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,
|
||||||
|
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,
|
||||||
|
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,
|
||||||
|
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,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
_rename_props: Optional[Dict[str, str]] = 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
|
||||||
|
) -> "IconButton":
|
||||||
|
"""Create a IconButton component.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
*children: The children of the component.
|
||||||
|
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: "classic" | "solid" | "soft" | "surface" | "outline" | "ghost"
|
||||||
|
color_scheme: 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"
|
||||||
|
auto_focus: Automatically focuses the button when the page loads
|
||||||
|
disabled: Disables the button
|
||||||
|
form: Associates the button with a form (by id)
|
||||||
|
form_action: URL to send the form data to (for type="submit" buttons)
|
||||||
|
form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
|
||||||
|
form_method: HTTP method to use for sending form data (for type="submit" buttons)
|
||||||
|
form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
|
||||||
|
form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
|
||||||
|
name: Name of the button, used when sending form data
|
||||||
|
type: Type of the button (submit, reset, or button)
|
||||||
|
value: Value of the button, used when sending form data
|
||||||
|
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||||
|
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||||
|
content_editable: Indicates whether the element's content is editable.
|
||||||
|
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||||
|
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||||
|
draggable: Defines whether the element can be dragged.
|
||||||
|
enter_key_hint: Hints what media types the media element is able to play.
|
||||||
|
hidden: Defines whether the element is hidden.
|
||||||
|
input_mode: Defines the type of the element.
|
||||||
|
item_prop: Defines the name of the element for metadata purposes.
|
||||||
|
lang: Defines the language used in the element.
|
||||||
|
role: Defines the role of the element.
|
||||||
|
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||||
|
spell_check: Defines whether the element may be checked for spelling errors.
|
||||||
|
tab_index: Defines the position of the current element in the tabbing order.
|
||||||
|
title: Defines a tooltip for the element.
|
||||||
|
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
|
||||||
|
_rename_props: props to change the name of
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: The properties of the component.
|
||||||
|
|
||||||
|
Raises:
|
||||||
|
ValueError: If no children are passed.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The IconButton component.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
icon_button = IconButton.create
|
@ -196,4 +196,4 @@ class RadioGroup(SimpleNamespace):
|
|||||||
__call__ = staticmethod(HighLevelRadioGroup.create)
|
__call__ = staticmethod(HighLevelRadioGroup.create)
|
||||||
|
|
||||||
|
|
||||||
radio_group = RadioGroup()
|
radio = radio_group = RadioGroup()
|
708
reflex/components/radix/themes/components/radio_group.pyi
Normal file
708
reflex/components/radix/themes/components/radio_group.pyi
Normal file
@ -0,0 +1,708 @@
|
|||||||
|
"""Stub file for reflex/components/radix/themes/components/radio_group.py"""
|
||||||
|
# ------------------- DO NOT EDIT ----------------------
|
||||||
|
# This file was generated by `scripts/pyi_generator.py`!
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||||
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
|
from reflex.style import Style
|
||||||
|
from types import SimpleNamespace
|
||||||
|
from typing import Any, Dict, List, Literal, Optional, Union
|
||||||
|
import reflex as rx
|
||||||
|
from reflex.components.component import Component
|
||||||
|
from reflex.components.radix.themes.layout.flex import Flex
|
||||||
|
from reflex.components.radix.themes.typography.text import Text
|
||||||
|
from reflex.constants import EventTriggers
|
||||||
|
from reflex.vars import Var
|
||||||
|
from ..base import LiteralAccentColor, LiteralSize, RadixThemesComponent
|
||||||
|
|
||||||
|
LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"]
|
||||||
|
|
||||||
|
class RadioGroupRoot(RadixThemesComponent):
|
||||||
|
def get_event_triggers(self) -> Dict[str, Any]: ...
|
||||||
|
@overload
|
||||||
|
@classmethod
|
||||||
|
def create( # type: ignore
|
||||||
|
cls,
|
||||||
|
*children,
|
||||||
|
color: Optional[Union[Var[str], str]] = None,
|
||||||
|
color_scheme: 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,
|
||||||
|
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,
|
||||||
|
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
value: Optional[Union[Var[str], str]] = None,
|
||||||
|
default_value: Optional[Union[Var[str], str]] = None,
|
||||||
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
name: Optional[Union[Var[str], str]] = None,
|
||||||
|
required: 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,
|
||||||
|
_rename_props: Optional[Dict[str, str]] = 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_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
|
||||||
|
) -> "RadioGroupRoot":
|
||||||
|
"""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: map to CSS default color property.
|
||||||
|
color_scheme: map to radix color property.
|
||||||
|
size: The size of the radio group: "1" | "2" | "3"
|
||||||
|
variant: The variant of the radio group
|
||||||
|
high_contrast: Whether to render the radio group with higher contrast color against background
|
||||||
|
value: The controlled value of the radio item to check. Should be used in conjunction with on_change.
|
||||||
|
default_value: The initial value of checked radio item. Should be used in conjunction with on_change.
|
||||||
|
disabled: Whether the radio group is disabled
|
||||||
|
name: The name of the group. Submitted with its owning form as part of a name/value pair.
|
||||||
|
required: Whether the radio group is required
|
||||||
|
style: Props to rename 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
|
||||||
|
_rename_props: props to change the name of
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Component properties.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A new component instance.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
class RadioGroupItem(RadixThemesComponent):
|
||||||
|
@overload
|
||||||
|
@classmethod
|
||||||
|
def create( # type: ignore
|
||||||
|
cls,
|
||||||
|
*children,
|
||||||
|
color: Optional[Union[Var[str], str]] = None,
|
||||||
|
color_scheme: 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,
|
||||||
|
value: Optional[Union[Var[str], str]] = None,
|
||||||
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
required: 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,
|
||||||
|
_rename_props: Optional[Dict[str, str]] = 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
|
||||||
|
) -> "RadioGroupItem":
|
||||||
|
"""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: map to CSS default color property.
|
||||||
|
color_scheme: map to radix color property.
|
||||||
|
value: The value of the radio item to check. Should be used in conjunction with on_change.
|
||||||
|
disabled: When true, prevents the user from interacting with the radio item.
|
||||||
|
required: When true, indicates that the user must check the radio item before the owning form can be submitted.
|
||||||
|
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
|
||||||
|
_rename_props: props to change the name of
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Component properties.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A new component instance.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
class HighLevelRadioGroup(RadixThemesComponent):
|
||||||
|
@overload
|
||||||
|
@classmethod
|
||||||
|
def create( # type: ignore
|
||||||
|
cls,
|
||||||
|
*children,
|
||||||
|
items: Optional[Union[Var[List[str]], List[str]]] = None,
|
||||||
|
direction: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["row", "column", "row-reverse", "column-reverse"]],
|
||||||
|
Literal["row", "column", "row-reverse", "column-reverse"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
gap: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
||||||
|
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
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_scheme: 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,
|
||||||
|
value: Optional[Union[Var[str], str]] = None,
|
||||||
|
default_value: Optional[Union[Var[str], str]] = None,
|
||||||
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
name: Optional[Union[Var[str], str]] = None,
|
||||||
|
required: 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,
|
||||||
|
_rename_props: Optional[Dict[str, str]] = 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
|
||||||
|
) -> "HighLevelRadioGroup":
|
||||||
|
"""Create a radio group component.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
items: The items of the radio group.
|
||||||
|
items: The items of the radio group.
|
||||||
|
direction: The direction of the radio group.
|
||||||
|
gap: The gap between the items of the radio group.
|
||||||
|
size: The size of the radio group.
|
||||||
|
variant: The variant of the radio group
|
||||||
|
color_scheme: The color of the radio group
|
||||||
|
high_contrast: Whether to render the radio group with higher contrast color against background
|
||||||
|
value: The controlled value of the radio item to check. Should be used in conjunction with on_change.
|
||||||
|
default_value: The initial value of checked radio item. Should be used in conjunction with on_change.
|
||||||
|
disabled: Whether the radio group is disabled
|
||||||
|
name: The name of the group. Submitted with its owning form as part of a name/value pair.
|
||||||
|
required: Whether the radio group is required
|
||||||
|
style: Props to rename 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
|
||||||
|
_rename_props: props to change the name of
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Additional properties to apply to the accordion item.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The created radio group component.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
class RadioGroup(SimpleNamespace):
|
||||||
|
root = staticmethod(RadioGroupRoot.create)
|
||||||
|
item = staticmethod(RadioGroupItem.create)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def __call__(
|
||||||
|
*children,
|
||||||
|
items: Optional[Union[Var[List[str]], List[str]]] = None,
|
||||||
|
direction: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["row", "column", "row-reverse", "column-reverse"]],
|
||||||
|
Literal["row", "column", "row-reverse", "column-reverse"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
gap: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
||||||
|
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
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_scheme: 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,
|
||||||
|
value: Optional[Union[Var[str], str]] = None,
|
||||||
|
default_value: Optional[Union[Var[str], str]] = None,
|
||||||
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
name: Optional[Union[Var[str], str]] = None,
|
||||||
|
required: 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,
|
||||||
|
_rename_props: Optional[Dict[str, str]] = 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
|
||||||
|
) -> "HighLevelRadioGroup":
|
||||||
|
"""Create a radio group component.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
items: The items of the radio group.
|
||||||
|
items: The items of the radio group.
|
||||||
|
direction: The direction of the radio group.
|
||||||
|
gap: The gap between the items of the radio group.
|
||||||
|
size: The size of the radio group.
|
||||||
|
variant: The variant of the radio group
|
||||||
|
color_scheme: The color of the radio group
|
||||||
|
high_contrast: Whether to render the radio group with higher contrast color against background
|
||||||
|
value: The controlled value of the radio item to check. Should be used in conjunction with on_change.
|
||||||
|
default_value: The initial value of checked radio item. Should be used in conjunction with on_change.
|
||||||
|
disabled: Whether the radio group is disabled
|
||||||
|
name: The name of the group. Submitted with its owning form as part of a name/value pair.
|
||||||
|
required: Whether the radio group is required
|
||||||
|
style: Props to rename 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
|
||||||
|
_rename_props: props to change the name of
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Additional properties to apply to the accordion item.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The created radio group component.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
radio = radio_group = RadioGroup()
|
176
reflex/components/radix/themes/components/scroll_area.pyi
Normal file
176
reflex/components/radix/themes/components/scroll_area.pyi
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
"""Stub file for reflex/components/radix/themes/components/scroll_area.py"""
|
||||||
|
# ------------------- DO NOT EDIT ----------------------
|
||||||
|
# This file was generated by `scripts/pyi_generator.py`!
|
||||||
|
# ------------------------------------------------------
|
||||||
|
|
||||||
|
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||||
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
|
from reflex.style import Style
|
||||||
|
from typing import Literal
|
||||||
|
from reflex.vars import Var
|
||||||
|
from ..base import RadixThemesComponent
|
||||||
|
|
||||||
|
class ScrollArea(RadixThemesComponent):
|
||||||
|
@overload
|
||||||
|
@classmethod
|
||||||
|
def create( # type: ignore
|
||||||
|
cls,
|
||||||
|
*children,
|
||||||
|
color: Optional[Union[Var[str], str]] = None,
|
||||||
|
color_scheme: 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,
|
||||||
|
scrollbars: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["vertical", "horizontal", "both"]],
|
||||||
|
Literal["vertical", "horizontal", "both"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
type_: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["auto", "always", "scroll", "hover"]],
|
||||||
|
Literal["auto", "always", "scroll", "hover"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
scroll_hide_delay: Optional[Union[Var[int], int]] = None,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
_rename_props: Optional[Dict[str, str]] = 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
|
||||||
|
) -> "ScrollArea":
|
||||||
|
"""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: map to CSS default color property.
|
||||||
|
color_scheme: map to radix color property.
|
||||||
|
scrollbars: The alignment of the scroll area
|
||||||
|
type_: Describes the nature of scrollbar visibility, similar to how the scrollbar preferences in MacOS control visibility of native scrollbars. "auto" | "always" | "scroll" | "hover"
|
||||||
|
scroll_hide_delay: If type is set to either "scroll" or "hover", this prop determines the length of time, in milliseconds, before the scrollbars are hidden after the user stops interacting with scrollbars.
|
||||||
|
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
|
||||||
|
_rename_props: props to change the name of
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Component properties.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A new component instance.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
scroll_area = ScrollArea.create
|
@ -29,4 +29,5 @@ class Separator(RadixThemesComponent):
|
|||||||
decorative: Var[bool]
|
decorative: Var[bool]
|
||||||
|
|
||||||
|
|
||||||
separator = Separator.create
|
# Alias to divider.
|
||||||
|
divider = separator = Separator.create
|
||||||
|
@ -172,4 +172,4 @@ class Separator(RadixThemesComponent):
|
|||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
separator = Separator.create
|
divider = separator = Separator.create
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"""Stub file for reflex/components/radix/themes/components/textarea.py"""
|
"""Stub file for reflex/components/radix/themes/components/text_area.py"""
|
||||||
# ------------------- DO NOT EDIT ----------------------
|
# ------------------- DO NOT EDIT ----------------------
|
||||||
# This file was generated by `scripts/pyi_generator.py`!
|
# This file was generated by `scripts/pyi_generator.py`!
|
||||||
# ------------------------------------------------------
|
# ------------------------------------------------------
|
1092
reflex/components/radix/themes/components/text_field.pyi
Normal file
1092
reflex/components/radix/themes/components/text_field.pyi
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,140 +0,0 @@
|
|||||||
"""Components for rendering text.
|
|
||||||
|
|
||||||
https://www.radix-ui.com/themes/docs/theme/typography
|
|
||||||
"""
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from typing import Literal
|
|
||||||
|
|
||||||
from reflex.vars import Var
|
|
||||||
|
|
||||||
from .base import (
|
|
||||||
LiteralAccentColor,
|
|
||||||
LiteralVariant,
|
|
||||||
RadixThemesComponent,
|
|
||||||
)
|
|
||||||
|
|
||||||
LiteralTextWeight = Literal["light", "regular", "medium", "bold"]
|
|
||||||
LiteralTextAlign = Literal["left", "center", "right"]
|
|
||||||
LiteralTextSize = Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
||||||
LiteralTextTrim = Literal["normal", "start", "end", "both"]
|
|
||||||
|
|
||||||
|
|
||||||
class Text(RadixThemesComponent):
|
|
||||||
"""A foundational text primitive based on the <span> element."""
|
|
||||||
|
|
||||||
tag = "Text"
|
|
||||||
|
|
||||||
# Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
||||||
as_child: Var[bool]
|
|
||||||
|
|
||||||
# Change the default rendered element into a semantically appropriate alternative (cannot be used with asChild)
|
|
||||||
as_: Var[str]
|
|
||||||
|
|
||||||
# Text size: "1" - "9"
|
|
||||||
size: Var[LiteralTextSize]
|
|
||||||
|
|
||||||
# Thickness of text: "light" | "regular" | "medium" | "bold"
|
|
||||||
weight: Var[LiteralTextWeight]
|
|
||||||
|
|
||||||
# Alignment of text in element: "left" | "center" | "right"
|
|
||||||
align: Var[LiteralTextAlign]
|
|
||||||
|
|
||||||
# Removes the leading trim space: "normal" | "start" | "end" | "both"
|
|
||||||
trim: Var[LiteralTextTrim]
|
|
||||||
|
|
||||||
# Overrides the accent color inherited from the Theme.
|
|
||||||
color_scheme: Var[LiteralAccentColor]
|
|
||||||
|
|
||||||
# Whether to render the text with higher contrast color
|
|
||||||
high_contrast: Var[bool]
|
|
||||||
|
|
||||||
|
|
||||||
class Heading(Text):
|
|
||||||
"""A semantic heading element."""
|
|
||||||
|
|
||||||
tag = "Heading"
|
|
||||||
|
|
||||||
|
|
||||||
class Blockquote(RadixThemesComponent):
|
|
||||||
"""A block level extended quotation."""
|
|
||||||
|
|
||||||
tag = "Blockquote"
|
|
||||||
|
|
||||||
# Text size: "1" - "9"
|
|
||||||
size: Var[LiteralTextSize]
|
|
||||||
|
|
||||||
# Thickness of text: "light" | "regular" | "medium" | "bold"
|
|
||||||
weight: Var[LiteralTextWeight]
|
|
||||||
|
|
||||||
# Overrides the accent color inherited from the Theme.
|
|
||||||
color_scheme: Var[LiteralAccentColor]
|
|
||||||
|
|
||||||
# Whether to render the text with higher contrast color
|
|
||||||
high_contrast: Var[bool]
|
|
||||||
|
|
||||||
|
|
||||||
class Code(Blockquote):
|
|
||||||
"""Marks text to signify a short fragment of computer code."""
|
|
||||||
|
|
||||||
tag = "Code"
|
|
||||||
|
|
||||||
# The visual variant to apply: "solid" | "soft" | "outline" | "ghost"
|
|
||||||
variant: Var[LiteralVariant]
|
|
||||||
|
|
||||||
|
|
||||||
class Em(RadixThemesComponent):
|
|
||||||
"""Marks text to stress emphasis."""
|
|
||||||
|
|
||||||
tag = "Em"
|
|
||||||
|
|
||||||
|
|
||||||
class Kbd(RadixThemesComponent):
|
|
||||||
"""Represents keyboard input or a hotkey."""
|
|
||||||
|
|
||||||
tag = "Kbd"
|
|
||||||
|
|
||||||
# Text size: "1" - "9"
|
|
||||||
size: Var[LiteralTextSize]
|
|
||||||
|
|
||||||
|
|
||||||
LiteralLinkUnderline = Literal["auto", "hover", "always"]
|
|
||||||
|
|
||||||
|
|
||||||
class Link(RadixThemesComponent):
|
|
||||||
"""A semantic element for navigation between pages."""
|
|
||||||
|
|
||||||
tag = "Link"
|
|
||||||
|
|
||||||
# Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
||||||
as_child: Var[bool]
|
|
||||||
|
|
||||||
# Text size: "1" - "9"
|
|
||||||
size: Var[LiteralTextSize]
|
|
||||||
|
|
||||||
# Thickness of text: "light" | "regular" | "medium" | "bold"
|
|
||||||
weight: Var[LiteralTextWeight]
|
|
||||||
|
|
||||||
# Removes the leading trim space: "normal" | "start" | "end" | "both"
|
|
||||||
trim: Var[LiteralTextTrim]
|
|
||||||
|
|
||||||
# Sets the visibility of the underline affordance: "auto" | "hover" | "always"
|
|
||||||
underline: Var[LiteralLinkUnderline]
|
|
||||||
|
|
||||||
# Overrides the accent color inherited from the Theme.
|
|
||||||
color_scheme: Var[LiteralAccentColor]
|
|
||||||
|
|
||||||
# Whether to render the text with higher contrast color
|
|
||||||
high_contrast: Var[bool]
|
|
||||||
|
|
||||||
|
|
||||||
class Quote(RadixThemesComponent):
|
|
||||||
"""A short inline quotation."""
|
|
||||||
|
|
||||||
tag = "Quote"
|
|
||||||
|
|
||||||
|
|
||||||
class Strong(RadixThemesComponent):
|
|
||||||
"""Marks text to signify strong importance."""
|
|
||||||
|
|
||||||
tag = "Strong"
|
|
@ -2,32 +2,19 @@
|
|||||||
|
|
||||||
from .blockquote import Blockquote
|
from .blockquote import Blockquote
|
||||||
from .code import Code
|
from .code import Code
|
||||||
from .em import Em
|
|
||||||
from .heading import Heading
|
from .heading import Heading
|
||||||
from .kbd import Kbd
|
|
||||||
from .link import Link
|
from .link import Link
|
||||||
from .quote import Quote
|
from .text import text
|
||||||
from .strong import Strong
|
|
||||||
from .text import Text
|
|
||||||
|
|
||||||
blockquote = Blockquote.create
|
blockquote = Blockquote.create
|
||||||
code = Code.create
|
code = Code.create
|
||||||
em = Em.create
|
|
||||||
heading = Heading.create
|
heading = Heading.create
|
||||||
kbd = Kbd.create
|
|
||||||
link = Link.create
|
link = Link.create
|
||||||
quote = Quote.create
|
|
||||||
strong = Strong.create
|
|
||||||
text = Text.create
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"blockquote",
|
"blockquote",
|
||||||
"code",
|
"code",
|
||||||
"em",
|
|
||||||
"heading",
|
"heading",
|
||||||
"kbd",
|
|
||||||
"link",
|
"link",
|
||||||
"quote",
|
|
||||||
"strong",
|
|
||||||
"text",
|
"text",
|
||||||
]
|
]
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
"""Components for rendering heading.
|
|
||||||
|
|
||||||
https://www.radix-ui.com/themes/docs/theme/typography
|
|
||||||
"""
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from reflex import el
|
|
||||||
|
|
||||||
from ..base import (
|
|
||||||
RadixThemesComponent,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class Em(el.Em, RadixThemesComponent):
|
|
||||||
"""Marks text to stress emphasis."""
|
|
||||||
|
|
||||||
tag = "Em"
|
|
@ -1,24 +0,0 @@
|
|||||||
"""Components for rendering heading.
|
|
||||||
|
|
||||||
https://www.radix-ui.com/themes/docs/theme/typography
|
|
||||||
"""
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from reflex import el
|
|
||||||
from reflex.vars import Var
|
|
||||||
|
|
||||||
from ..base import (
|
|
||||||
RadixThemesComponent,
|
|
||||||
)
|
|
||||||
from .base import (
|
|
||||||
LiteralTextSize,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class Kbd(el.Kbd, RadixThemesComponent):
|
|
||||||
"""Represents keyboard input or a hotkey."""
|
|
||||||
|
|
||||||
tag = "Kbd"
|
|
||||||
|
|
||||||
# Text size: "1" - "9"
|
|
||||||
size: Var[LiteralTextSize]
|
|
@ -1,17 +0,0 @@
|
|||||||
"""Components for rendering heading.
|
|
||||||
|
|
||||||
https://www.radix-ui.com/themes/docs/theme/typography
|
|
||||||
"""
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from reflex import el
|
|
||||||
|
|
||||||
from ..base import (
|
|
||||||
RadixThemesComponent,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class Quote(el.Q, RadixThemesComponent):
|
|
||||||
"""A short inline quotation."""
|
|
||||||
|
|
||||||
tag = "Quote"
|
|
@ -1,17 +0,0 @@
|
|||||||
"""Components for rendering heading.
|
|
||||||
|
|
||||||
https://www.radix-ui.com/themes/docs/theme/typography
|
|
||||||
"""
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from reflex import el
|
|
||||||
|
|
||||||
from ..base import (
|
|
||||||
RadixThemesComponent,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class Strong(el.Strong, RadixThemesComponent):
|
|
||||||
"""Marks text to signify strong importance."""
|
|
||||||
|
|
||||||
tag = "Strong"
|
|
@ -4,6 +4,7 @@ https://www.radix-ui.com/themes/docs/theme/typography
|
|||||||
"""
|
"""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Literal
|
from typing import Literal
|
||||||
|
|
||||||
from reflex import el
|
from reflex import el
|
||||||
@ -51,3 +52,43 @@ class Text(el.Span, RadixThemesComponent):
|
|||||||
|
|
||||||
# Whether to render the text with higher contrast color
|
# Whether to render the text with higher contrast color
|
||||||
high_contrast: Var[bool]
|
high_contrast: Var[bool]
|
||||||
|
|
||||||
|
|
||||||
|
class Em(el.Em, RadixThemesComponent):
|
||||||
|
"""Marks text to stress emphasis."""
|
||||||
|
|
||||||
|
tag = "Em"
|
||||||
|
|
||||||
|
|
||||||
|
class Kbd(el.Kbd, RadixThemesComponent):
|
||||||
|
"""Represents keyboard input or a hotkey."""
|
||||||
|
|
||||||
|
tag = "Kbd"
|
||||||
|
|
||||||
|
# Text size: "1" - "9"
|
||||||
|
size: Var[LiteralTextSize]
|
||||||
|
|
||||||
|
|
||||||
|
class Quote(el.Q, RadixThemesComponent):
|
||||||
|
"""A short inline quotation."""
|
||||||
|
|
||||||
|
tag = "Quote"
|
||||||
|
|
||||||
|
|
||||||
|
class Strong(el.Strong, RadixThemesComponent):
|
||||||
|
"""Marks text to signify strong importance."""
|
||||||
|
|
||||||
|
tag = "Strong"
|
||||||
|
|
||||||
|
|
||||||
|
class TextNamespace(SimpleNamespace):
|
||||||
|
"""Checkbox components namespace."""
|
||||||
|
|
||||||
|
__call__ = staticmethod(Text.create)
|
||||||
|
em = staticmethod(Em.create)
|
||||||
|
kbd = staticmethod(Kbd.create)
|
||||||
|
quote = staticmethod(Quote.create)
|
||||||
|
strong = staticmethod(Strong.create)
|
||||||
|
|
||||||
|
|
||||||
|
text = TextNamespace()
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user