[REF-1631] Clean up the rx.radix namespace (#2501)
This commit is contained in:
parent
4df279b060
commit
9c086163df
@ -1,3 +1,4 @@
|
|||||||
"""Namespace for components provided by @radix-ui packages."""
|
"""Namespace for components provided by @radix-ui packages."""
|
||||||
|
|
||||||
from . import primitives, themes
|
from .primitives import *
|
||||||
|
from .themes import *
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
"""Namespace for components provided by the @radix-ui/themes library."""
|
"""Namespace for components provided by the @radix-ui/themes library."""
|
||||||
from .base import Theme, ThemePanel
|
from .base import theme as theme
|
||||||
|
from .base import theme_panel as theme_panel
|
||||||
from .components import *
|
from .components import *
|
||||||
from .layout import *
|
from .layout import *
|
||||||
from .typography import *
|
from .typography import *
|
||||||
|
|
||||||
theme = Theme.create
|
|
||||||
theme_panel = ThemePanel.create
|
|
||||||
|
@ -210,3 +210,7 @@ class RadixThemesColorModeProvider(Component):
|
|||||||
library = "/components/reflex/radix_themes_color_mode_provider.js"
|
library = "/components/reflex/radix_themes_color_mode_provider.js"
|
||||||
tag = "RadixThemesColorModeProvider"
|
tag = "RadixThemesColorModeProvider"
|
||||||
is_default = True
|
is_default = True
|
||||||
|
|
||||||
|
|
||||||
|
theme = Theme.create
|
||||||
|
theme_panel = ThemePanel.create
|
||||||
|
@ -789,3 +789,6 @@ class RadixThemesColorModeProvider(Component):
|
|||||||
TypeError: If an invalid child is passed.
|
TypeError: If an invalid child is passed.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
theme = Theme.create
|
||||||
|
theme_panel = ThemePanel.create
|
||||||
|
@ -1,216 +1,59 @@
|
|||||||
"""Radix themes components."""
|
"""Radix themes components."""
|
||||||
|
|
||||||
from .alertdialog import (
|
from .alertdialog import alert_dialog as alert_dialog
|
||||||
AlertDialogAction,
|
from .aspectratio import aspect_ratio as aspect_ratio
|
||||||
AlertDialogCancel,
|
from .avatar import avatar as avatar
|
||||||
AlertDialogContent,
|
from .badge import badge as badge
|
||||||
AlertDialogDescription,
|
from .button import button as button
|
||||||
AlertDialogRoot,
|
from .callout import callout as callout
|
||||||
AlertDialogTitle,
|
from .card import card as card
|
||||||
AlertDialogTrigger,
|
from .checkbox import checkbox as checkbox
|
||||||
)
|
from .contextmenu import context_menu as context_menu
|
||||||
from .aspectratio import AspectRatio
|
from .dialog import dialog as dialog
|
||||||
from .avatar import Avatar
|
from .dropdownmenu import dropdown_menu as dropdown_menu
|
||||||
from .badge import Badge
|
from .hovercard import hover_card as hover_card
|
||||||
from .button import Button
|
from .iconbutton import icon_button as icon_button
|
||||||
from .callout import Callout, CalloutIcon, CalloutRoot, CalloutText
|
from .icons import icon as icon
|
||||||
from .card import Card
|
from .inset import inset as inset
|
||||||
from .checkbox import Checkbox, HighLevelCheckbox
|
from .popover import popover as popover
|
||||||
from .contextmenu import (
|
from .radiogroup import radio_group as radio_group
|
||||||
ContextMenuContent,
|
from .scrollarea import scroll_area as scroll_area
|
||||||
ContextMenuItem,
|
from .select import select as select
|
||||||
ContextMenuRoot,
|
from .separator import separator as separator
|
||||||
ContextMenuSeparator,
|
from .slider import slider as slider
|
||||||
ContextMenuSub,
|
from .switch import switch as switch
|
||||||
ContextMenuSubContent,
|
from .table import table as table
|
||||||
ContextMenuSubTrigger,
|
from .tabs import tabs as tabs
|
||||||
ContextMenuTrigger,
|
from .textarea import text_area as text_area
|
||||||
)
|
from .textfield import text_field as text_field
|
||||||
from .dialog import (
|
from .tooltip import tooltip as tooltip
|
||||||
DialogClose,
|
|
||||||
DialogContent,
|
|
||||||
DialogDescription,
|
|
||||||
DialogRoot,
|
|
||||||
DialogTitle,
|
|
||||||
DialogTrigger,
|
|
||||||
)
|
|
||||||
from .dropdownmenu import (
|
|
||||||
DropdownMenuContent,
|
|
||||||
DropdownMenuItem,
|
|
||||||
DropdownMenuRoot,
|
|
||||||
DropdownMenuSeparator,
|
|
||||||
DropdownMenuSub,
|
|
||||||
DropdownMenuSubContent,
|
|
||||||
DropdownMenuSubTrigger,
|
|
||||||
DropdownMenuTrigger,
|
|
||||||
)
|
|
||||||
from .hovercard import HoverCardContent, HoverCardRoot, HoverCardTrigger
|
|
||||||
from .iconbutton import IconButton
|
|
||||||
from .icons import Icon
|
|
||||||
from .inset import Inset
|
|
||||||
from .popover import PopoverClose, PopoverContent, PopoverRoot, PopoverTrigger
|
|
||||||
from .radiogroup import HighLevelRadioGroup, RadioGroupItem, RadioGroupRoot
|
|
||||||
from .scrollarea import ScrollArea
|
|
||||||
from .select import (
|
|
||||||
HighLevelSelect,
|
|
||||||
SelectContent,
|
|
||||||
SelectGroup,
|
|
||||||
SelectItem,
|
|
||||||
SelectLabel,
|
|
||||||
SelectRoot,
|
|
||||||
SelectSeparator,
|
|
||||||
SelectTrigger,
|
|
||||||
)
|
|
||||||
from .separator import Separator
|
|
||||||
from .slider import Slider
|
|
||||||
from .switch import Switch
|
|
||||||
from .table import (
|
|
||||||
TableBody,
|
|
||||||
TableCell,
|
|
||||||
TableColumnHeaderCell,
|
|
||||||
TableHeader,
|
|
||||||
TableRoot,
|
|
||||||
TableRow,
|
|
||||||
TableRowHeaderCell,
|
|
||||||
)
|
|
||||||
from .tabs import TabsContent, TabsList, TabsRoot, TabsTrigger
|
|
||||||
from .textarea import TextArea
|
|
||||||
from .textfield import Input, TextFieldInput, TextFieldRoot, TextFieldSlot
|
|
||||||
from .tooltip import Tooltip
|
|
||||||
|
|
||||||
# Alert Dialog
|
__all__ = [
|
||||||
alertdialog_root = AlertDialogRoot.create
|
"alert_dialog",
|
||||||
alertdialog_trigger = AlertDialogTrigger.create
|
"aspect_ratio",
|
||||||
alertdialog_content = AlertDialogContent.create
|
"avatar",
|
||||||
alertdialog_title = AlertDialogTitle.create
|
"badge",
|
||||||
alertdialog_description = AlertDialogDescription.create
|
"button",
|
||||||
alertdialog_action = AlertDialogAction.create
|
"callout",
|
||||||
alertdialog_cancel = AlertDialogCancel.create
|
"card",
|
||||||
|
"checkbox",
|
||||||
# Aspect Ratio
|
"context_menu",
|
||||||
aspect_ratio = AspectRatio.create
|
"dialog",
|
||||||
|
"dropdown_menu",
|
||||||
# Avatar
|
"hover_card",
|
||||||
avatar = Avatar.create
|
"icon_button",
|
||||||
|
"icon",
|
||||||
# Badge
|
"inset",
|
||||||
badge = Badge.create
|
"popover",
|
||||||
|
"radio_group",
|
||||||
# Button
|
"scroll_area",
|
||||||
button = Button.create
|
"select",
|
||||||
|
"separator",
|
||||||
# Callout
|
"slider",
|
||||||
callout_root = CalloutRoot.create
|
"switch",
|
||||||
callout_icon = CalloutIcon.create
|
"table",
|
||||||
callout_text = CalloutText.create
|
"tabs",
|
||||||
callout = Callout.create
|
"text_area",
|
||||||
|
"text_field",
|
||||||
# Card
|
"tooltip",
|
||||||
card = Card.create
|
]
|
||||||
|
|
||||||
# Checkbox
|
|
||||||
checkbox = Checkbox.create
|
|
||||||
checkbox_hl = HighLevelCheckbox.create
|
|
||||||
|
|
||||||
# Context Menu
|
|
||||||
contextmenu_root = ContextMenuRoot.create
|
|
||||||
contextmenu_sub = ContextMenuSub.create
|
|
||||||
contextmenu_trigger = ContextMenuTrigger.create
|
|
||||||
contextmenu_content = ContextMenuContent.create
|
|
||||||
contextmenu_sub_content = ContextMenuSubContent.create
|
|
||||||
contextmenu_sub_trigger = ContextMenuSubTrigger.create
|
|
||||||
contextmenu_item = ContextMenuItem.create
|
|
||||||
contextmenu_separator = ContextMenuSeparator.create
|
|
||||||
|
|
||||||
|
|
||||||
# Dialog
|
|
||||||
dialog_root = DialogRoot.create
|
|
||||||
dialog_trigger = DialogTrigger.create
|
|
||||||
dialog_content = DialogContent.create
|
|
||||||
dialog_title = DialogTitle.create
|
|
||||||
dialog_description = DialogDescription.create
|
|
||||||
dialog_close = DialogClose.create
|
|
||||||
|
|
||||||
# Dropdown Menu
|
|
||||||
dropdownmenu_root = DropdownMenuRoot.create
|
|
||||||
dropdownmenu_trigger = DropdownMenuTrigger.create
|
|
||||||
dropdownmenu_content = DropdownMenuContent.create
|
|
||||||
dropdownmenu_sub = DropdownMenuSub.create
|
|
||||||
dropdownmenu_sub_content = DropdownMenuSubContent.create
|
|
||||||
dropdownmenu_sub_trigger = DropdownMenuSubTrigger.create
|
|
||||||
dropdownmenu_item = DropdownMenuItem.create
|
|
||||||
dropdownmenu_separator = DropdownMenuSeparator.create
|
|
||||||
|
|
||||||
# Hover Card
|
|
||||||
hovercard_root = HoverCardRoot.create
|
|
||||||
hovercard_trigger = HoverCardTrigger.create
|
|
||||||
hovercard_content = HoverCardContent.create
|
|
||||||
|
|
||||||
# Icon
|
|
||||||
icon = Icon.create
|
|
||||||
|
|
||||||
# Icon Button
|
|
||||||
icon_button = IconButton.create
|
|
||||||
|
|
||||||
# Inset
|
|
||||||
inset = Inset.create
|
|
||||||
|
|
||||||
# Popover
|
|
||||||
popover_root = PopoverRoot.create
|
|
||||||
popover_trigger = PopoverTrigger.create
|
|
||||||
popover_content = PopoverContent.create
|
|
||||||
popover_close = PopoverClose.create
|
|
||||||
|
|
||||||
# Radio Group
|
|
||||||
radio_group_root = RadioGroupRoot.create
|
|
||||||
radio_group_item = RadioGroupItem.create
|
|
||||||
radio_group = HighLevelRadioGroup.create
|
|
||||||
|
|
||||||
# Scroll Area
|
|
||||||
scroll_area = ScrollArea.create
|
|
||||||
|
|
||||||
# Select
|
|
||||||
select_root = SelectRoot.create
|
|
||||||
select_trigger = SelectTrigger.create
|
|
||||||
select_content = SelectContent.create
|
|
||||||
select_item = SelectItem.create
|
|
||||||
select_separator = SelectSeparator.create
|
|
||||||
select_group = SelectGroup.create
|
|
||||||
select_label = SelectLabel.create
|
|
||||||
select = HighLevelSelect.create
|
|
||||||
|
|
||||||
# Separator
|
|
||||||
separator = Separator.create
|
|
||||||
|
|
||||||
# Slider
|
|
||||||
slider = Slider.create
|
|
||||||
|
|
||||||
# Switch
|
|
||||||
switch = Switch.create
|
|
||||||
|
|
||||||
# Table
|
|
||||||
table_root = TableRoot.create
|
|
||||||
table_header = TableHeader.create
|
|
||||||
table_body = TableBody.create
|
|
||||||
table_row = TableRow.create
|
|
||||||
table_cell = TableCell.create
|
|
||||||
table_column_header_cell = TableColumnHeaderCell.create
|
|
||||||
table_row_header_cell = TableRowHeaderCell.create
|
|
||||||
|
|
||||||
# Tabs
|
|
||||||
tabs_root = TabsRoot.create
|
|
||||||
tabs_list = TabsList.create
|
|
||||||
tabs_trigger = TabsTrigger.create
|
|
||||||
tabs_content = TabsContent.create
|
|
||||||
|
|
||||||
# Text Area
|
|
||||||
textarea = TextArea.create
|
|
||||||
|
|
||||||
# Text Field
|
|
||||||
textfield_root = TextFieldRoot.create
|
|
||||||
textfield_input = TextFieldInput.create
|
|
||||||
textfield_slot = TextFieldSlot.create
|
|
||||||
input = Input.create
|
|
||||||
|
|
||||||
# Tooltip
|
|
||||||
tooltip = Tooltip.create
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
"""Interactive components provided by @radix-ui/themes."""
|
"""Interactive components provided by @radix-ui/themes."""
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
|
|
||||||
from reflex import el
|
from reflex import el
|
||||||
@ -91,3 +92,18 @@ class AlertDialogCancel(RadixThemesComponent):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
tag = "AlertDialog.Cancel"
|
tag = "AlertDialog.Cancel"
|
||||||
|
|
||||||
|
|
||||||
|
class AlertDialog(SimpleNamespace):
|
||||||
|
"""AlertDialog components namespace."""
|
||||||
|
|
||||||
|
root = __call__ = staticmethod(AlertDialogRoot.create)
|
||||||
|
trigger = staticmethod(AlertDialogTrigger.create)
|
||||||
|
content = staticmethod(AlertDialogContent.create)
|
||||||
|
title = staticmethod(AlertDialogTitle.create)
|
||||||
|
description = staticmethod(AlertDialogDescription.create)
|
||||||
|
action = staticmethod(AlertDialogAction.create)
|
||||||
|
cancel = staticmethod(AlertDialogCancel.create)
|
||||||
|
|
||||||
|
|
||||||
|
alert_dialog = AlertDialog()
|
||||||
|
@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|||||||
from reflex.vars import Var, BaseVar, ComputedVar
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
from reflex.event import EventChain, EventHandler, EventSpec
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
from reflex import el
|
from reflex import el
|
||||||
from reflex.vars import Var
|
from reflex.vars import Var
|
||||||
@ -1106,3 +1107,160 @@ class AlertDialogCancel(RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
class AlertDialog(SimpleNamespace):
|
||||||
|
root = staticmethod(AlertDialogRoot.create)
|
||||||
|
trigger = staticmethod(AlertDialogTrigger.create)
|
||||||
|
content = staticmethod(AlertDialogContent.create)
|
||||||
|
title = staticmethod(AlertDialogTitle.create)
|
||||||
|
description = staticmethod(AlertDialogDescription.create)
|
||||||
|
action = staticmethod(AlertDialogAction.create)
|
||||||
|
cancel = staticmethod(AlertDialogCancel.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,
|
||||||
|
open: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
custom_attrs: Optional[Dict[str, 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
|
||||||
|
) -> "AlertDialogRoot":
|
||||||
|
"""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.
|
||||||
|
open: The controlled open state of the dialog.
|
||||||
|
style: The style of the component.
|
||||||
|
key: A unique key for the component.
|
||||||
|
id: The id for the component.
|
||||||
|
class_name: The class name for the component.
|
||||||
|
autofocus: Whether the component should take the focus once the page is loaded
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Component properties.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A new component instance.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
alert_dialog = AlertDialog()
|
||||||
|
@ -13,3 +13,6 @@ class AspectRatio(RadixThemesComponent):
|
|||||||
|
|
||||||
# The ratio of the width to the height of the element
|
# The ratio of the width to the height of the element
|
||||||
ratio: Var[Union[float, int]]
|
ratio: Var[Union[float, int]]
|
||||||
|
|
||||||
|
|
||||||
|
aspect_ratio = AspectRatio.create
|
||||||
|
@ -156,3 +156,5 @@ class AspectRatio(RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
aspect_ratio = AspectRatio.create
|
||||||
|
@ -36,3 +36,6 @@ class Avatar(RadixThemesComponent):
|
|||||||
|
|
||||||
# The rendered fallback text
|
# The rendered fallback text
|
||||||
fallback: Var[str]
|
fallback: Var[str]
|
||||||
|
|
||||||
|
|
||||||
|
avatar = Avatar.create
|
||||||
|
@ -178,3 +178,5 @@ class Avatar(RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
avatar = Avatar.create
|
||||||
|
@ -30,3 +30,6 @@ class Badge(el.Span, RadixThemesComponent):
|
|||||||
|
|
||||||
# Override theme radius for badge: "none" | "small" | "medium" | "large" | "full"
|
# Override theme radius for badge: "none" | "small" | "medium" | "large" | "full"
|
||||||
radius: Var[LiteralRadius]
|
radius: Var[LiteralRadius]
|
||||||
|
|
||||||
|
|
||||||
|
badge = Badge.create
|
||||||
|
@ -233,3 +233,5 @@ class Badge(el.Span, RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
badge = Badge.create
|
||||||
|
@ -36,3 +36,6 @@ class Button(el.Button, RadixThemesComponent):
|
|||||||
|
|
||||||
# Override theme radius for button: "none" | "small" | "medium" | "large" | "full"
|
# Override theme radius for button: "none" | "small" | "medium" | "large" | "full"
|
||||||
radius: Var[LiteralRadius]
|
radius: Var[LiteralRadius]
|
||||||
|
|
||||||
|
|
||||||
|
button = Button.create
|
||||||
|
@ -282,3 +282,5 @@ class Button(el.Button, RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
button = Button.create
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
"""Interactive components provided by @radix-ui/themes."""
|
"""Interactive components provided by @radix-ui/themes."""
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Literal, Union
|
from typing import Literal, Union
|
||||||
|
|
||||||
import reflex as rx
|
import reflex as rx
|
||||||
@ -75,3 +76,15 @@ class Callout(CalloutRoot):
|
|||||||
CalloutText.create(text),
|
CalloutText.create(text),
|
||||||
**props,
|
**props,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class CalloutNamespace(SimpleNamespace):
|
||||||
|
"""Callout components namespace."""
|
||||||
|
|
||||||
|
root = staticmethod(CalloutRoot.create)
|
||||||
|
icon = staticmethod(CalloutIcon.create)
|
||||||
|
text = staticmethod(CalloutText.create)
|
||||||
|
__call__ = staticmethod(Callout.create)
|
||||||
|
|
||||||
|
|
||||||
|
callout = CalloutNamespace()
|
||||||
|
@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|||||||
from reflex.vars import Var, BaseVar, ComputedVar
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
from reflex.event import EventChain, EventHandler, EventSpec
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Literal, Union
|
from typing import Literal, Union
|
||||||
import reflex as rx
|
import reflex as rx
|
||||||
from reflex import el
|
from reflex import el
|
||||||
@ -861,3 +862,225 @@ class Callout(CalloutRoot):
|
|||||||
The callout component.
|
The callout component.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
class CalloutNamespace(SimpleNamespace):
|
||||||
|
root = staticmethod(CalloutRoot.create)
|
||||||
|
icon = staticmethod(CalloutIcon.create)
|
||||||
|
text = staticmethod(CalloutText.create)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def __call__(
|
||||||
|
*children,
|
||||||
|
text: Optional[Union[Var[str], str]] = None,
|
||||||
|
icon: Optional[Union[Var[str], str]] = None,
|
||||||
|
as_child: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
size: Optional[
|
||||||
|
Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
|
||||||
|
] = None,
|
||||||
|
variant: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["soft", "surface", "outline"]],
|
||||||
|
Literal["soft", "surface", "outline"],
|
||||||
|
]
|
||||||
|
] = 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,
|
||||||
|
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,
|
||||||
|
translate: Optional[
|
||||||
|
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||||
|
] = None,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
custom_attrs: Optional[Dict[str, 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
|
||||||
|
) -> "Callout":
|
||||||
|
"""Create a callout component.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
text: The text of the callout.
|
||||||
|
text: The text of the callout.
|
||||||
|
icon: The icon of the callout.
|
||||||
|
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
|
||||||
|
size: Size "1" - "3"
|
||||||
|
variant: Variant of button: "soft" | "surface" | "outline"
|
||||||
|
color_scheme: Override theme color for button
|
||||||
|
high_contrast: Whether to render the button with higher contrast color against background
|
||||||
|
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.
|
||||||
|
translate: Specifies whether the content of an element should be translated or not.
|
||||||
|
style: The style of the component.
|
||||||
|
key: A unique key for the component.
|
||||||
|
id: The id for the component.
|
||||||
|
class_name: The class name for the component.
|
||||||
|
autofocus: Whether the component should take the focus once the page is loaded
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: The properties of the component.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The callout component.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
callout = CalloutNamespace()
|
||||||
|
@ -22,3 +22,6 @@ class Card(el.Div, RadixThemesComponent):
|
|||||||
|
|
||||||
# Variant of Card: "solid" | "soft" | "outline" | "ghost"
|
# Variant of Card: "solid" | "soft" | "outline" | "ghost"
|
||||||
variant: Var[Literal["surface", "classic", "ghost"]]
|
variant: Var[Literal["surface", "classic", "ghost"]]
|
||||||
|
|
||||||
|
|
||||||
|
card = Card.create
|
||||||
|
@ -230,3 +230,5 @@ class Card(el.Div, RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
card = Card.create
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
"""Interactive components provided by @radix-ui/themes."""
|
"""Interactive components provided by @radix-ui/themes."""
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
@ -101,3 +102,13 @@ class HighLevelCheckbox(Checkbox):
|
|||||||
as_="label",
|
as_="label",
|
||||||
size=size,
|
size=size,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class CheckboxNamespace(SimpleNamespace):
|
||||||
|
"""Checkbox components namespace."""
|
||||||
|
|
||||||
|
root = staticmethod(Checkbox.create)
|
||||||
|
__call__ = staticmethod(HighLevelCheckbox.create)
|
||||||
|
|
||||||
|
|
||||||
|
checkbox = CheckboxNamespace()
|
||||||
|
@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|||||||
from reflex.vars import Var, BaseVar, ComputedVar
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
from reflex.event import EventChain, EventHandler, EventSpec
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.components.radix.themes.layout.flex import Flex
|
from reflex.components.radix.themes.layout.flex import Flex
|
||||||
@ -368,3 +369,183 @@ class HighLevelCheckbox(Checkbox):
|
|||||||
The checkbox component with a label.
|
The checkbox component with a label.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
class CheckboxNamespace(SimpleNamespace):
|
||||||
|
root = staticmethod(Checkbox.create)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def __call__(
|
||||||
|
*children,
|
||||||
|
text: Optional[Union[Var[str], str]] = 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,
|
||||||
|
as_child: Optional[Union[Var[bool], bool]] = 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,
|
||||||
|
default_checked: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
checked: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
required: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
name: Optional[Union[Var[str], str]] = None,
|
||||||
|
value: Optional[Union[Var[str], str]] = None,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
|
on_blur: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_checked_change: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_click: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_context_menu: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_double_click: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_focus: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mount: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_down: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_enter: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_leave: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_move: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_out: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_over: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_up: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_scroll: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_unmount: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
**props
|
||||||
|
) -> "HighLevelCheckbox":
|
||||||
|
"""Create a checkbox with a label.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
text: The text of the label.
|
||||||
|
text: The text label for the checkbox.
|
||||||
|
gap: The gap between the checkbox and the label.
|
||||||
|
size: Button size "1" - "3"
|
||||||
|
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
|
||||||
|
variant: Variant of button: "solid" | "soft" | "outline" | "ghost"
|
||||||
|
color_scheme: Override theme color for button
|
||||||
|
high_contrast: Whether to render the button with higher contrast color against background
|
||||||
|
default_checked: Whether the checkbox is checked by default
|
||||||
|
checked: Whether the checkbox is checked
|
||||||
|
disabled: Whether the checkbox is disabled
|
||||||
|
required: Whether the checkbox is required
|
||||||
|
name: The name of the checkbox control when submitting the form.
|
||||||
|
value: The value of the checkbox control when submitting the form.
|
||||||
|
style: The style of the component.
|
||||||
|
key: A unique key for the component.
|
||||||
|
id: The id for the component.
|
||||||
|
class_name: The class name for the component.
|
||||||
|
autofocus: Whether the component should take the focus once the page is loaded
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Additional properties to apply to the checkbox item.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The checkbox component with a label.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
checkbox = CheckboxNamespace()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
"""Interactive components provided by @radix-ui/themes."""
|
"""Interactive components provided by @radix-ui/themes."""
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
|
|
||||||
from reflex.vars import Var
|
from reflex.vars import Var
|
||||||
@ -131,3 +132,19 @@ class ContextMenuSeparator(RadixThemesComponent):
|
|||||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||||
|
|
||||||
tag = "ContextMenu.Separator"
|
tag = "ContextMenu.Separator"
|
||||||
|
|
||||||
|
|
||||||
|
class ContextMenu(SimpleNamespace):
|
||||||
|
"""ContextMenu components namespace."""
|
||||||
|
|
||||||
|
root = __call__ = staticmethod(ContextMenuRoot.create)
|
||||||
|
trigger = staticmethod(ContextMenuTrigger.create)
|
||||||
|
content = staticmethod(ContextMenuContent.create)
|
||||||
|
sub = staticmethod(ContextMenuSub.create)
|
||||||
|
sub_trigger = staticmethod(ContextMenuSubTrigger.create)
|
||||||
|
sub_content = staticmethod(ContextMenuSubContent.create)
|
||||||
|
item = staticmethod(ContextMenuItem.create)
|
||||||
|
separator = staticmethod(ContextMenuSeparator.create)
|
||||||
|
|
||||||
|
|
||||||
|
context_menu = ContextMenu()
|
||||||
|
@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|||||||
from reflex.vars import Var, BaseVar, ComputedVar
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
from reflex.event import EventChain, EventHandler, EventSpec
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
from reflex.vars import Var
|
from reflex.vars import Var
|
||||||
from ..base import LiteralAccentColor, RadixThemesComponent
|
from ..base import LiteralAccentColor, RadixThemesComponent
|
||||||
@ -1217,3 +1218,161 @@ class ContextMenuSeparator(RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
class ContextMenu(SimpleNamespace):
|
||||||
|
root = staticmethod(ContextMenuRoot.create)
|
||||||
|
trigger = staticmethod(ContextMenuTrigger.create)
|
||||||
|
content = staticmethod(ContextMenuContent.create)
|
||||||
|
sub = staticmethod(ContextMenuSub.create)
|
||||||
|
sub_trigger = staticmethod(ContextMenuSubTrigger.create)
|
||||||
|
sub_content = staticmethod(ContextMenuSubContent.create)
|
||||||
|
item = staticmethod(ContextMenuItem.create)
|
||||||
|
separator = staticmethod(ContextMenuSeparator.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,
|
||||||
|
modal: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
custom_attrs: Optional[Dict[str, 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
|
||||||
|
) -> "ContextMenuRoot":
|
||||||
|
"""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.
|
||||||
|
modal: The modality of the context menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers.
|
||||||
|
style: The style of the component.
|
||||||
|
key: A unique key for the component.
|
||||||
|
id: The id for the component.
|
||||||
|
class_name: The class name for the component.
|
||||||
|
autofocus: Whether the component should take the focus once the page is loaded
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Component properties.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A new component instance.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
context_menu = ContextMenu()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
"""Interactive components provided by @radix-ui/themes."""
|
"""Interactive components provided by @radix-ui/themes."""
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
|
|
||||||
from reflex import el
|
from reflex import el
|
||||||
@ -75,3 +76,17 @@ class DialogClose(RadixThemesComponent):
|
|||||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||||
|
|
||||||
tag = "Dialog.Close"
|
tag = "Dialog.Close"
|
||||||
|
|
||||||
|
|
||||||
|
class Dialog(SimpleNamespace):
|
||||||
|
"""Dialog components namespace."""
|
||||||
|
|
||||||
|
root = __call__ = staticmethod(DialogRoot.create)
|
||||||
|
trigger = staticmethod(DialogTrigger.create)
|
||||||
|
title = staticmethod(DialogTitle.create)
|
||||||
|
content = staticmethod(DialogContent.create)
|
||||||
|
description = staticmethod(DialogDescription.create)
|
||||||
|
close = staticmethod(DialogClose.create)
|
||||||
|
|
||||||
|
|
||||||
|
dialog = Dialog()
|
||||||
|
@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|||||||
from reflex.vars import Var, BaseVar, ComputedVar
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
from reflex.event import EventChain, EventHandler, EventSpec
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
from reflex import el
|
from reflex import el
|
||||||
from reflex.vars import Var
|
from reflex.vars import Var
|
||||||
@ -959,3 +960,159 @@ class DialogClose(RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
class Dialog(SimpleNamespace):
|
||||||
|
root = staticmethod(DialogRoot.create)
|
||||||
|
trigger = staticmethod(DialogTrigger.create)
|
||||||
|
title = staticmethod(DialogTitle.create)
|
||||||
|
content = staticmethod(DialogContent.create)
|
||||||
|
description = staticmethod(DialogDescription.create)
|
||||||
|
close = staticmethod(DialogClose.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,
|
||||||
|
open: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
custom_attrs: Optional[Dict[str, 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
|
||||||
|
) -> "DialogRoot":
|
||||||
|
"""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.
|
||||||
|
open: The controlled open state of the dialog.
|
||||||
|
style: The style of the component.
|
||||||
|
key: A unique key for the component.
|
||||||
|
id: The id for the component.
|
||||||
|
class_name: The class name for the component.
|
||||||
|
autofocus: Whether the component should take the focus once the page is loaded
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Component properties.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A new component instance.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
dialog = Dialog()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
"""Interactive components provided by @radix-ui/themes."""
|
"""Interactive components provided by @radix-ui/themes."""
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
|
|
||||||
from reflex.vars import Var
|
from reflex.vars import Var
|
||||||
@ -104,3 +105,19 @@ class DropdownMenuSeparator(RadixThemesComponent):
|
|||||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||||
|
|
||||||
tag = "DropdownMenu.Separator"
|
tag = "DropdownMenu.Separator"
|
||||||
|
|
||||||
|
|
||||||
|
class DropdownMenu(SimpleNamespace):
|
||||||
|
"""DropdownMenu components namespace."""
|
||||||
|
|
||||||
|
root = __call__ = staticmethod(DropdownMenuRoot.create)
|
||||||
|
trigger = staticmethod(DropdownMenuTrigger.create)
|
||||||
|
content = staticmethod(DropdownMenuContent.create)
|
||||||
|
sub_trigger = staticmethod(DropdownMenuSubTrigger.create)
|
||||||
|
sub = staticmethod(DropdownMenuSub.create)
|
||||||
|
sub_content = staticmethod(DropdownMenuSubContent.create)
|
||||||
|
item = staticmethod(DropdownMenuItem.create)
|
||||||
|
separator = staticmethod(DropdownMenuSeparator.create)
|
||||||
|
|
||||||
|
|
||||||
|
dropdown_menu = DropdownMenu()
|
||||||
|
@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|||||||
from reflex.vars import Var, BaseVar, ComputedVar
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
from reflex.event import EventChain, EventHandler, EventSpec
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
from reflex.vars import Var
|
from reflex.vars import Var
|
||||||
from ..base import LiteralAccentColor, RadixThemesComponent
|
from ..base import LiteralAccentColor, RadixThemesComponent
|
||||||
@ -1193,3 +1194,163 @@ class DropdownMenuSeparator(RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
class DropdownMenu(SimpleNamespace):
|
||||||
|
root = staticmethod(DropdownMenuRoot.create)
|
||||||
|
trigger = staticmethod(DropdownMenuTrigger.create)
|
||||||
|
content = staticmethod(DropdownMenuContent.create)
|
||||||
|
sub_trigger = staticmethod(DropdownMenuSubTrigger.create)
|
||||||
|
sub = staticmethod(DropdownMenuSub.create)
|
||||||
|
sub_content = staticmethod(DropdownMenuSubContent.create)
|
||||||
|
item = staticmethod(DropdownMenuItem.create)
|
||||||
|
separator = staticmethod(DropdownMenuSeparator.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,
|
||||||
|
open: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
modal: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
custom_attrs: Optional[Dict[str, 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
|
||||||
|
) -> "DropdownMenuRoot":
|
||||||
|
"""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.
|
||||||
|
open: The controlled open state of the dropdown menu. Must be used in conjunction with onOpenChange.
|
||||||
|
modal: The modality of the dropdown menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers.
|
||||||
|
style: The style of the component.
|
||||||
|
key: A unique key for the component.
|
||||||
|
id: The id for the component.
|
||||||
|
class_name: The class name for the component.
|
||||||
|
autofocus: Whether the component should take the focus once the page is loaded
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Component properties.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A new component instance.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
dropdown_menu = DropdownMenu()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
"""Interactive components provided by @radix-ui/themes."""
|
"""Interactive components provided by @radix-ui/themes."""
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
|
|
||||||
from reflex import el
|
from reflex import el
|
||||||
@ -60,3 +61,14 @@ class HoverCardContent(el.Div, RadixThemesComponent):
|
|||||||
|
|
||||||
# Whether or not the hover card should avoid collisions with its trigger.
|
# Whether or not the hover card should avoid collisions with its trigger.
|
||||||
avoid_collisions: Var[bool]
|
avoid_collisions: Var[bool]
|
||||||
|
|
||||||
|
|
||||||
|
class HoverCard(SimpleNamespace):
|
||||||
|
"""HoverCard components namespace."""
|
||||||
|
|
||||||
|
root = __call__ = staticmethod(HoverCardRoot.create)
|
||||||
|
trigger = staticmethod(HoverCardTrigger.create)
|
||||||
|
content = staticmethod(HoverCardContent.create)
|
||||||
|
|
||||||
|
|
||||||
|
hover_card = HoverCard()
|
||||||
|
@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|||||||
from reflex.vars import Var, BaseVar, ComputedVar
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
from reflex.event import EventChain, EventHandler, EventSpec
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
from reflex import el
|
from reflex import el
|
||||||
from reflex.vars import Var
|
from reflex.vars import Var
|
||||||
@ -533,3 +534,162 @@ class HoverCardContent(el.Div, RadixThemesComponent):
|
|||||||
A new component instance.
|
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,
|
||||||
|
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
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Component properties.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A new component instance.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
hover_card = HoverCard()
|
||||||
|
@ -36,3 +36,6 @@ class IconButton(el.Button, RadixThemesComponent):
|
|||||||
|
|
||||||
# Override theme radius for button: "none" | "small" | "medium" | "large" | "full"
|
# Override theme radius for button: "none" | "small" | "medium" | "large" | "full"
|
||||||
radius: Var[LiteralRadius]
|
radius: Var[LiteralRadius]
|
||||||
|
|
||||||
|
|
||||||
|
icon_button = IconButton.create
|
||||||
|
@ -282,3 +282,5 @@ class IconButton(el.Button, RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
icon_button = IconButton.create
|
||||||
|
@ -50,6 +50,9 @@ class Icon(RadixIconComponent):
|
|||||||
return super().create(*children, **props)
|
return super().create(*children, **props)
|
||||||
|
|
||||||
|
|
||||||
|
icon = Icon.create
|
||||||
|
|
||||||
|
|
||||||
ICON_ABSTRACT: List[str] = [
|
ICON_ABSTRACT: List[str] = [
|
||||||
"hamburger_menu",
|
"hamburger_menu",
|
||||||
"cross_1",
|
"cross_1",
|
||||||
|
@ -172,6 +172,7 @@ class Icon(RadixIconComponent):
|
|||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
icon = Icon.create
|
||||||
ICON_ABSTRACT: List[str]
|
ICON_ABSTRACT: List[str]
|
||||||
ICON_ALIGNS: List[str]
|
ICON_ALIGNS: List[str]
|
||||||
ICON_ARROWS: List[str]
|
ICON_ARROWS: List[str]
|
||||||
|
@ -42,3 +42,6 @@ class Inset(el.Div, RadixThemesComponent):
|
|||||||
|
|
||||||
# Padding on the left
|
# Padding on the left
|
||||||
pl: Var[Union[int, str]]
|
pl: Var[Union[int, str]]
|
||||||
|
|
||||||
|
|
||||||
|
inset = Inset.create
|
||||||
|
@ -245,3 +245,5 @@ class Inset(el.Div, RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
inset = Inset.create
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
"""Interactive components provided by @radix-ui/themes."""
|
"""Interactive components provided by @radix-ui/themes."""
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
|
|
||||||
from reflex import el
|
from reflex import el
|
||||||
@ -82,3 +83,15 @@ class PopoverClose(RadixThemesComponent):
|
|||||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||||
|
|
||||||
tag = "Popover.Close"
|
tag = "Popover.Close"
|
||||||
|
|
||||||
|
|
||||||
|
class Popover(SimpleNamespace):
|
||||||
|
"""Popover components namespace."""
|
||||||
|
|
||||||
|
root = __call__ = staticmethod(PopoverRoot.create)
|
||||||
|
trigger = staticmethod(PopoverTrigger.create)
|
||||||
|
content = staticmethod(PopoverContent.create)
|
||||||
|
close = staticmethod(PopoverClose.create)
|
||||||
|
|
||||||
|
|
||||||
|
popover = Popover()
|
||||||
|
@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|||||||
from reflex.vars import Var, BaseVar, ComputedVar
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
from reflex.event import EventChain, EventHandler, EventSpec
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
from reflex import el
|
from reflex import el
|
||||||
from reflex.vars import Var
|
from reflex.vars import Var
|
||||||
@ -696,3 +697,159 @@ class PopoverClose(RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
class Popover(SimpleNamespace):
|
||||||
|
root = staticmethod(PopoverRoot.create)
|
||||||
|
trigger = staticmethod(PopoverTrigger.create)
|
||||||
|
content = staticmethod(PopoverContent.create)
|
||||||
|
close = staticmethod(PopoverClose.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,
|
||||||
|
open: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
modal: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
custom_attrs: Optional[Dict[str, 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
|
||||||
|
) -> "PopoverRoot":
|
||||||
|
"""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.
|
||||||
|
open: The controlled open state of the popover.
|
||||||
|
modal: The modality of the popover. When set to true, interaction with outside elements will be disabled and only popover content will be visible to screen readers.
|
||||||
|
style: The style of the component.
|
||||||
|
key: A unique key for the component.
|
||||||
|
id: The id for the component.
|
||||||
|
class_name: The class name for the component.
|
||||||
|
autofocus: Whether the component should take the focus once the page is loaded
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Component properties.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A new component instance.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
popover = Popover()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
"""Interactive components provided by @radix-ui/themes."""
|
"""Interactive components provided by @radix-ui/themes."""
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, List, Literal, Optional, Union
|
from typing import Any, Dict, List, Literal, Optional, Union
|
||||||
|
|
||||||
import reflex as rx
|
import reflex as rx
|
||||||
@ -160,3 +161,14 @@ class HighLevelRadioGroup(RadioGroupRoot):
|
|||||||
default_value=default_value,
|
default_value=default_value,
|
||||||
**props,
|
**props,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class RadioGroup(SimpleNamespace):
|
||||||
|
"""RadioGroup components namespace."""
|
||||||
|
|
||||||
|
root = staticmethod(RadioGroupRoot.create)
|
||||||
|
item = staticmethod(RadioGroupItem.create)
|
||||||
|
__call__ = staticmethod(HighLevelRadioGroup.create)
|
||||||
|
|
||||||
|
|
||||||
|
radio_group = RadioGroup()
|
||||||
|
@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|||||||
from reflex.vars import Var, BaseVar, ComputedVar
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
from reflex.event import EventChain, EventHandler, EventSpec
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, List, Literal, Optional, Union
|
from typing import Any, Dict, List, Literal, Optional, Union
|
||||||
import reflex as rx
|
import reflex as rx
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
@ -536,3 +537,196 @@ class HighLevelRadioGroup(RadioGroupRoot):
|
|||||||
The created radio group component.
|
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,
|
||||||
|
orientation: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["horizontal", "vertical"]],
|
||||||
|
Literal["horizontal", "vertical"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
loop: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
custom_attrs: Optional[Dict[str, 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,
|
||||||
|
on_value_change: 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: "1" | "2" | "3"
|
||||||
|
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_value_change.
|
||||||
|
default_value: The initial value of checked radio item. Should be used in conjunction with onValueChange.
|
||||||
|
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
|
||||||
|
orientation: The orientation of the component.
|
||||||
|
loop: When true, keyboard navigation will loop from last item to first, and vice versa.
|
||||||
|
style: The style of the component.
|
||||||
|
key: A unique key for the component.
|
||||||
|
id: The id for the component.
|
||||||
|
class_name: The class name for the component.
|
||||||
|
autofocus: Whether the component should take the focus once the page is loaded
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Additional properties to apply to the accordion item.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The created radio group component.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
radio_group = RadioGroup()
|
||||||
|
@ -28,3 +28,6 @@ class ScrollArea(RadixThemesComponent):
|
|||||||
|
|
||||||
# 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.
|
# 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.
|
||||||
scroll_hide_delay: Var[int]
|
scroll_hide_delay: Var[int]
|
||||||
|
|
||||||
|
|
||||||
|
scroll_area = ScrollArea.create
|
||||||
|
@ -179,3 +179,5 @@ class ScrollArea(RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
scroll_area = ScrollArea.create
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
"""Interactive components provided by @radix-ui/themes."""
|
"""Interactive components provided by @radix-ui/themes."""
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, List, Literal, Union
|
from typing import Any, Dict, List, Literal, Union
|
||||||
|
|
||||||
import reflex as rx
|
import reflex as rx
|
||||||
@ -223,3 +224,19 @@ class HighLevelSelect(SelectRoot):
|
|||||||
),
|
),
|
||||||
**props,
|
**props,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class Select(SimpleNamespace):
|
||||||
|
"""Select components namespace."""
|
||||||
|
|
||||||
|
root = staticmethod(SelectRoot.create)
|
||||||
|
trigger = staticmethod(SelectTrigger.create)
|
||||||
|
content = staticmethod(SelectContent.create)
|
||||||
|
group = staticmethod(SelectGroup.create)
|
||||||
|
item = staticmethod(SelectItem.create)
|
||||||
|
separator = staticmethod(SelectSeparator.create)
|
||||||
|
label = staticmethod(SelectLabel.create)
|
||||||
|
__call__ = staticmethod(HighLevelSelect.create)
|
||||||
|
|
||||||
|
|
||||||
|
select = Select()
|
||||||
|
@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|||||||
from reflex.vars import Var, BaseVar, ComputedVar
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
from reflex.event import EventChain, EventHandler, EventSpec
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, List, Literal, Union
|
from typing import Any, Dict, List, Literal, Union
|
||||||
import reflex as rx
|
import reflex as rx
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
@ -1295,3 +1296,198 @@ class HighLevelSelect(SelectRoot):
|
|||||||
The select component.
|
The select component.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
class Select(SimpleNamespace):
|
||||||
|
root = staticmethod(SelectRoot.create)
|
||||||
|
trigger = staticmethod(SelectTrigger.create)
|
||||||
|
content = staticmethod(SelectContent.create)
|
||||||
|
group = staticmethod(SelectGroup.create)
|
||||||
|
item = staticmethod(SelectItem.create)
|
||||||
|
separator = staticmethod(SelectSeparator.create)
|
||||||
|
label = staticmethod(SelectLabel.create)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def __call__(
|
||||||
|
*children,
|
||||||
|
items: Optional[Union[Var[List[str]], List[str]]] = None,
|
||||||
|
placeholder: Optional[Union[Var[str], str]] = None,
|
||||||
|
label: 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,
|
||||||
|
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
variant: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["classic", "surface", "soft", "ghost"]],
|
||||||
|
Literal["classic", "surface", "soft", "ghost"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
radius: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["none", "small", "medium", "large", "full"]],
|
||||||
|
Literal["none", "small", "medium", "large", "full"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
width: Optional[Union[Var[str], str]] = None,
|
||||||
|
size: Optional[
|
||||||
|
Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
|
||||||
|
] = None,
|
||||||
|
default_value: Optional[Union[Var[str], str]] = None,
|
||||||
|
value: Optional[Union[Var[str], str]] = None,
|
||||||
|
default_open: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
open: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
name: 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,
|
||||||
|
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,
|
||||||
|
on_value_change: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
**props
|
||||||
|
) -> "HighLevelSelect":
|
||||||
|
"""Create a select component.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
items: The items of the select.
|
||||||
|
items: The items of the select.
|
||||||
|
placeholder: The placeholder of the select.
|
||||||
|
label: The label of the select.
|
||||||
|
color_scheme: The color of the select.
|
||||||
|
high_contrast: Whether to render the select with higher contrast color against background.
|
||||||
|
variant: The variant of the select.
|
||||||
|
radius: The radius of the select.
|
||||||
|
width: The width of the select.
|
||||||
|
size: The size of the select: "1" | "2" | "3"
|
||||||
|
default_value: The value of the select when initially rendered. Use when you do not need to control the state of the select.
|
||||||
|
value: The controlled value of the select. Should be used in conjunction with on_value_change.
|
||||||
|
default_open: The open state of the select when it is initially rendered. Use when you do not need to control its open state.
|
||||||
|
open: The controlled open state of the select. Must be used in conjunction with on_open_change.
|
||||||
|
name: The name of the select control when submitting the form.
|
||||||
|
disabled: When True, prevents the user from interacting with select.
|
||||||
|
required: When True, indicates that the user must select a value 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
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Additional properties to apply to the select component.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The select component.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
select = Select()
|
||||||
|
@ -27,3 +27,6 @@ class Separator(RadixThemesComponent):
|
|||||||
|
|
||||||
# When true, signifies that it is purely visual, carries no semantic meaning, and ensures it is not present in the accessibility tree.
|
# When true, signifies that it is purely visual, carries no semantic meaning, and ensures it is not present in the accessibility tree.
|
||||||
decorative: Var[bool]
|
decorative: Var[bool]
|
||||||
|
|
||||||
|
|
||||||
|
separator = Separator.create
|
||||||
|
@ -169,3 +169,5 @@ class Separator(RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
separator = Separator.create
|
||||||
|
@ -68,3 +68,6 @@ class Slider(RadixThemesComponent):
|
|||||||
"on_value_change": lambda e0: [e0],
|
"on_value_change": lambda e0: [e0],
|
||||||
"on_value_commit": lambda e0: [e0],
|
"on_value_commit": lambda e0: [e0],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
slider = Slider.create
|
||||||
|
@ -208,3 +208,5 @@ class Slider(RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
slider = Slider.create
|
||||||
|
@ -65,3 +65,6 @@ class Switch(RadixThemesComponent):
|
|||||||
**super().get_event_triggers(),
|
**super().get_event_triggers(),
|
||||||
EventTriggers.ON_CHECKED_CHANGE: lambda checked: [checked],
|
EventTriggers.ON_CHECKED_CHANGE: lambda checked: [checked],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
switch = Switch.create
|
||||||
|
@ -200,3 +200,5 @@ class Switch(RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
switch = Switch.create
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
"""Interactive components provided by @radix-ui/themes."""
|
"""Interactive components provided by @radix-ui/themes."""
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Literal, Union
|
from typing import Literal, Union
|
||||||
|
|
||||||
from reflex import el
|
from reflex import el
|
||||||
@ -76,3 +77,18 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent):
|
|||||||
|
|
||||||
# width of the column
|
# width of the column
|
||||||
width: Var[Union[str, int]]
|
width: Var[Union[str, int]]
|
||||||
|
|
||||||
|
|
||||||
|
class Table(SimpleNamespace):
|
||||||
|
"""Table components namespace."""
|
||||||
|
|
||||||
|
root = __call__ = staticmethod(TableRoot.create)
|
||||||
|
header = staticmethod(TableHeader.create)
|
||||||
|
body = staticmethod(TableBody.create)
|
||||||
|
row = staticmethod(TableRow.create)
|
||||||
|
cell = staticmethod(TableCell.create)
|
||||||
|
column_header_cell = staticmethod(TableColumnHeaderCell.create)
|
||||||
|
row_header_cell = staticmethod(TableRowHeaderCell.create)
|
||||||
|
|
||||||
|
|
||||||
|
table = Table()
|
||||||
|
@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|||||||
from reflex.vars import Var, BaseVar, ComputedVar
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
from reflex.event import EventChain, EventHandler, EventSpec
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Literal, Union
|
from typing import Literal, Union
|
||||||
from reflex import el
|
from reflex import el
|
||||||
from reflex.vars import Var
|
from reflex.vars import Var
|
||||||
@ -1597,3 +1598,243 @@ class TableRowHeaderCell(el.Th, RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
class Table(SimpleNamespace):
|
||||||
|
root = staticmethod(TableRoot.create)
|
||||||
|
header = staticmethod(TableHeader.create)
|
||||||
|
body = staticmethod(TableBody.create)
|
||||||
|
row = staticmethod(TableRow.create)
|
||||||
|
cell = staticmethod(TableCell.create)
|
||||||
|
column_header_cell = staticmethod(TableColumnHeaderCell.create)
|
||||||
|
row_header_cell = staticmethod(TableRowHeaderCell.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,
|
||||||
|
size: Optional[
|
||||||
|
Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
|
||||||
|
] = None,
|
||||||
|
variant: Optional[
|
||||||
|
Union[Var[Literal["surface", "ghost"]], Literal["surface", "ghost"]]
|
||||||
|
] = None,
|
||||||
|
align: Optional[
|
||||||
|
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||||
|
] = None,
|
||||||
|
background: Optional[
|
||||||
|
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||||
|
] = None,
|
||||||
|
bgcolor: Optional[
|
||||||
|
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||||
|
] = None,
|
||||||
|
border: Optional[
|
||||||
|
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||||
|
] = None,
|
||||||
|
summary: 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,
|
||||||
|
translate: Optional[
|
||||||
|
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
||||||
|
] = None,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
custom_attrs: Optional[Dict[str, 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
|
||||||
|
) -> "TableRoot":
|
||||||
|
"""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 table: "1" | "2" | "3"
|
||||||
|
variant: The variant of the table
|
||||||
|
align: Alignment of the table
|
||||||
|
background: Background image for the table
|
||||||
|
bgcolor: Background color of the table
|
||||||
|
border: Specifies the width of the border around the table
|
||||||
|
summary: Provides a summary of the table's purpose and structure
|
||||||
|
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.
|
||||||
|
translate: Specifies whether the content of an element should be translated or not.
|
||||||
|
style: The style of the component.
|
||||||
|
key: A unique key for the component.
|
||||||
|
id: The id for the component.
|
||||||
|
class_name: The class name for the component.
|
||||||
|
autofocus: Whether the component should take the focus once the page is loaded
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Component properties.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A new component instance.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
table = Table()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
"""Interactive components provided by @radix-ui/themes."""
|
"""Interactive components provided by @radix-ui/themes."""
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
|
|
||||||
from reflex.vars import Var
|
from reflex.vars import Var
|
||||||
@ -62,3 +63,15 @@ class TabsContent(RadixThemesComponent):
|
|||||||
|
|
||||||
# The value of the tab. Must be unique for each tab.
|
# The value of the tab. Must be unique for each tab.
|
||||||
value: Var[str]
|
value: Var[str]
|
||||||
|
|
||||||
|
|
||||||
|
class Tabs(SimpleNamespace):
|
||||||
|
"""Tabs components namespace."""
|
||||||
|
|
||||||
|
root = __call__ = staticmethod(TabsRoot.create)
|
||||||
|
list = staticmethod(TabsList.create)
|
||||||
|
trigger = staticmethod(TabsTrigger.create)
|
||||||
|
content = staticmethod(TabsContent.create)
|
||||||
|
|
||||||
|
|
||||||
|
tabs = Tabs()
|
||||||
|
@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|||||||
from reflex.vars import Var, BaseVar, ComputedVar
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
from reflex.event import EventChain, EventHandler, EventSpec
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
from reflex.vars import Var
|
from reflex.vars import Var
|
||||||
from ..base import RadixThemesComponent
|
from ..base import RadixThemesComponent
|
||||||
@ -611,3 +612,170 @@ class TabsContent(RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
class Tabs(SimpleNamespace):
|
||||||
|
root = staticmethod(TabsRoot.create)
|
||||||
|
list = staticmethod(TabsList.create)
|
||||||
|
trigger = staticmethod(TabsTrigger.create)
|
||||||
|
content = staticmethod(TabsContent.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,
|
||||||
|
variant: Optional[
|
||||||
|
Union[Var[Literal["surface", "ghost"]], Literal["surface", "ghost"]]
|
||||||
|
] = None,
|
||||||
|
default_value: Optional[Union[Var[str], str]] = None,
|
||||||
|
value: Optional[Union[Var[str], str]] = None,
|
||||||
|
orientation: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["horizontal", "vertical"]],
|
||||||
|
Literal["horizontal", "vertical"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
|
on_blur: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_click: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_context_menu: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_double_click: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_focus: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mount: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_down: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_enter: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_leave: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_move: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_out: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_over: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_up: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_scroll: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_unmount: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_value_change: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
**props
|
||||||
|
) -> "TabsRoot":
|
||||||
|
"""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.
|
||||||
|
variant: The variant of the tab
|
||||||
|
default_value: The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs.
|
||||||
|
value: The controlled value of the tab that should be active. Use when you need to control the state of the tabs.
|
||||||
|
orientation: The orientation of the tabs.
|
||||||
|
style: The style of the component.
|
||||||
|
key: A unique key for the component.
|
||||||
|
id: The id for the component.
|
||||||
|
class_name: The class name for the component.
|
||||||
|
autofocus: Whether the component should take the focus once the page is loaded
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: Component properties.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A new component instance.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
tabs = Tabs()
|
||||||
|
@ -65,3 +65,6 @@ class TextArea(RadixThemesComponent, el.Textarea):
|
|||||||
EventTriggers.ON_KEY_DOWN: lambda e0: [e0.key],
|
EventTriggers.ON_KEY_DOWN: lambda e0: [e0.key],
|
||||||
EventTriggers.ON_KEY_UP: lambda e0: [e0.key],
|
EventTriggers.ON_KEY_UP: lambda e0: [e0.key],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
text_area = TextArea.create
|
||||||
|
@ -286,3 +286,5 @@ class TextArea(RadixThemesComponent, el.Textarea):
|
|||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
def get_event_triggers(self) -> Dict[str, Any]: ...
|
def get_event_triggers(self) -> Dict[str, Any]: ...
|
||||||
|
|
||||||
|
text_area = TextArea.create
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
"""Interactive components provided by @radix-ui/themes."""
|
"""Interactive components provided by @radix-ui/themes."""
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
|
|
||||||
import reflex as rx
|
import reflex as rx
|
||||||
@ -191,3 +192,15 @@ class Input(RadixThemesComponent):
|
|||||||
EventTriggers.ON_KEY_DOWN: lambda e0: [e0.key],
|
EventTriggers.ON_KEY_DOWN: lambda e0: [e0.key],
|
||||||
EventTriggers.ON_KEY_UP: lambda e0: [e0.key],
|
EventTriggers.ON_KEY_UP: lambda e0: [e0.key],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class TextField(SimpleNamespace):
|
||||||
|
"""TextField components namespace."""
|
||||||
|
|
||||||
|
root = staticmethod(TextFieldRoot.create)
|
||||||
|
input = staticmethod(TextFieldInput.create)
|
||||||
|
slot = staticmethod(TextFieldSlot.create)
|
||||||
|
__call__ = staticmethod(Input.create)
|
||||||
|
|
||||||
|
|
||||||
|
text_field = TextField()
|
||||||
|
@ -7,6 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|||||||
from reflex.vars import Var, BaseVar, ComputedVar
|
from reflex.vars import Var, BaseVar, ComputedVar
|
||||||
from reflex.event import EventChain, EventHandler, EventSpec
|
from reflex.event import EventChain, EventHandler, EventSpec
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Any, Dict, Literal
|
from typing import Any, Dict, Literal
|
||||||
import reflex as rx
|
import reflex as rx
|
||||||
from reflex.components import el
|
from reflex.components import el
|
||||||
@ -913,3 +914,192 @@ class Input(RadixThemesComponent):
|
|||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
def get_event_triggers(self) -> Dict[str, Any]: ...
|
def get_event_triggers(self) -> Dict[str, Any]: ...
|
||||||
|
|
||||||
|
class TextField(SimpleNamespace):
|
||||||
|
root = staticmethod(TextFieldRoot.create)
|
||||||
|
input = staticmethod(TextFieldInput.create)
|
||||||
|
slot = staticmethod(TextFieldSlot.create)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def __call__(
|
||||||
|
*children,
|
||||||
|
icon: Optional[Union[Var[str], str]] = 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,
|
||||||
|
radius: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["none", "small", "medium", "large", "full"]],
|
||||||
|
Literal["none", "small", "medium", "large", "full"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
auto_complete: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
default_value: Optional[Union[Var[str], str]] = None,
|
||||||
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
max_length: Optional[Union[Var[str], str]] = None,
|
||||||
|
min_length: Optional[Union[Var[str], str]] = None,
|
||||||
|
name: Optional[Union[Var[str], str]] = None,
|
||||||
|
placeholder: Optional[Union[Var[str], str]] = None,
|
||||||
|
required: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
value: Optional[Union[Var[str], str]] = None,
|
||||||
|
style: Optional[Style] = None,
|
||||||
|
key: Optional[Any] = None,
|
||||||
|
id: Optional[Any] = None,
|
||||||
|
class_name: Optional[Any] = None,
|
||||||
|
autofocus: Optional[bool] = None,
|
||||||
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
|
on_blur: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_change: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_click: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_context_menu: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_double_click: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_focus: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_key_down: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_key_up: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mount: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_down: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_enter: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_leave: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_move: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_out: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_over: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_mouse_up: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_scroll: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
on_unmount: Optional[
|
||||||
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
||||||
|
] = None,
|
||||||
|
**props
|
||||||
|
) -> "Input":
|
||||||
|
"""Create an Input component.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
icon: The icon to render before the input.
|
||||||
|
size: Text field size "1" - "3"
|
||||||
|
variant: Variant of text field: "classic" | "surface" | "soft"
|
||||||
|
color_scheme: Override theme color for text field
|
||||||
|
radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
|
||||||
|
auto_complete: Whether the input should have autocomplete enabled
|
||||||
|
default_value: The value of the input when initially rendered.
|
||||||
|
disabled: Disables the input
|
||||||
|
max_length: Specifies the maximum number of characters allowed in the input
|
||||||
|
min_length: Specifies the minimum number of characters required in the input
|
||||||
|
name: Name of the input, used when sending form data
|
||||||
|
placeholder: Placeholder text in the input
|
||||||
|
required: Indicates that the input is required
|
||||||
|
value: Value of the input
|
||||||
|
style: The style of the component.
|
||||||
|
key: A unique key for the component.
|
||||||
|
id: The id for the component.
|
||||||
|
class_name: The class name for the component.
|
||||||
|
autofocus: Whether the component should take the focus once the page is loaded
|
||||||
|
custom_attrs: custom attribute
|
||||||
|
**props: The properties of the component.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The component.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
text_field = TextField()
|
||||||
|
@ -13,3 +13,6 @@ class Tooltip(RadixThemesComponent):
|
|||||||
|
|
||||||
# The content of the tooltip.
|
# The content of the tooltip.
|
||||||
content: Var[str]
|
content: Var[str]
|
||||||
|
|
||||||
|
|
||||||
|
tooltip = Tooltip.create
|
||||||
|
@ -155,3 +155,5 @@ class Tooltip(RadixThemesComponent):
|
|||||||
A new component instance.
|
A new component instance.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
tooltip = Tooltip.create
|
||||||
|
@ -18,3 +18,15 @@ section = Section.create
|
|||||||
spacer = Spacer.create
|
spacer = Spacer.create
|
||||||
hstack = HStack.create
|
hstack = HStack.create
|
||||||
vstack = VStack.create
|
vstack = VStack.create
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"box",
|
||||||
|
"center",
|
||||||
|
"container",
|
||||||
|
"flex",
|
||||||
|
"grid",
|
||||||
|
"section",
|
||||||
|
"spacer",
|
||||||
|
"hstack",
|
||||||
|
"vstack",
|
||||||
|
]
|
||||||
|
@ -19,3 +19,15 @@ link = Link.create
|
|||||||
quote = Quote.create
|
quote = Quote.create
|
||||||
strong = Strong.create
|
strong = Strong.create
|
||||||
text = Text.create
|
text = Text.create
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"blockquote",
|
||||||
|
"code",
|
||||||
|
"em",
|
||||||
|
"heading",
|
||||||
|
"kbd",
|
||||||
|
"link",
|
||||||
|
"quote",
|
||||||
|
"strong",
|
||||||
|
"text",
|
||||||
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user