reflex 0.3.8a2__py3-none-any.whl → 0.3.9a2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of reflex might be problematic. Click here for more details.
- reflex/.templates/apps/blank/code/blank.py +1 -1
- reflex/.templates/apps/demo/code/demo.py +1 -1
- reflex/.templates/jinja/web/pages/utils.js.jinja2 +1 -1
- reflex/__init__.py +1 -0
- reflex/__init__.pyi +1 -0
- reflex/app.py +107 -86
- reflex/compiler/compiler.py +110 -0
- reflex/components/component.py +3 -1
- reflex/components/core/match.py +8 -4
- reflex/components/datadisplay/dataeditor.py +5 -1
- reflex/components/markdown/markdown.py +1 -0
- reflex/components/radix/__init__.py +2 -0
- reflex/components/radix/primitives/__init__.py +14 -1
- reflex/components/radix/primitives/accordion.py +426 -69
- reflex/components/radix/primitives/accordion.pyi +41 -11
- reflex/components/radix/primitives/base.py +4 -0
- reflex/components/radix/primitives/base.pyi +81 -0
- reflex/components/radix/primitives/form.py +4 -2
- reflex/components/radix/primitives/form.pyi +2 -2
- reflex/components/radix/primitives/progress.py +4 -2
- reflex/components/radix/primitives/progress.pyi +2 -2
- reflex/components/radix/primitives/slider.py +7 -5
- reflex/components/radix/primitives/slider.pyi +5 -5
- reflex/components/radix/themes/components/__init__.py +8 -2
- reflex/components/radix/themes/components/alertdialog.py +4 -4
- reflex/components/radix/themes/components/alertdialog.pyi +8 -1
- reflex/components/radix/themes/components/aspectratio.py +2 -4
- reflex/components/radix/themes/components/aspectratio.pyi +1 -3
- reflex/components/radix/themes/components/avatar.py +7 -3
- reflex/components/radix/themes/components/avatar.pyi +5 -3
- reflex/components/radix/themes/components/badge.py +5 -7
- reflex/components/radix/themes/components/badge.pyi +4 -6
- reflex/components/radix/themes/components/callout.py +36 -5
- reflex/components/radix/themes/components/callout.pyi +273 -9
- reflex/components/radix/themes/components/card.py +3 -3
- reflex/components/radix/themes/components/card.pyi +2 -2
- reflex/components/radix/themes/components/checkbox.py +41 -4
- reflex/components/radix/themes/components/checkbox.pyi +231 -8
- reflex/components/radix/themes/components/dialog.py +1 -1
- reflex/components/radix/themes/components/dialog.pyi +1 -1
- reflex/components/radix/themes/components/dropdownmenu.py +6 -0
- reflex/components/radix/themes/components/dropdownmenu.pyi +193 -0
- reflex/components/radix/themes/components/iconbutton.py +1 -1
- reflex/components/radix/themes/components/iconbutton.pyi +1 -1
- reflex/components/radix/themes/components/icons.py +1 -0
- reflex/components/radix/themes/components/inset.py +1 -0
- reflex/components/radix/themes/components/inset.pyi +1 -0
- reflex/components/radix/themes/components/radiogroup.py +68 -1
- reflex/components/radix/themes/components/radiogroup.pyi +254 -2
- reflex/components/radix/themes/components/select.py +93 -4
- reflex/components/radix/themes/components/select.pyi +246 -4
- reflex/components/radix/themes/components/slider.py +9 -6
- reflex/components/radix/themes/components/slider.pyi +12 -6
- reflex/components/radix/themes/components/tooltip.py +1 -0
- reflex/components/radix/themes/components/tooltip.pyi +1 -0
- reflex/components/radix/themes/layout/box.py +1 -1
- reflex/state.py +9 -4
- reflex/style.py +15 -0
- reflex/utils/path_ops.py +2 -2
- reflex/utils/prerequisites.py +57 -5
- reflex/utils/types.py +4 -1
- reflex/vars.py +36 -3
- {reflex-0.3.8a2.dist-info → reflex-0.3.9a2.dist-info}/METADATA +2 -2
- {reflex-0.3.8a2.dist-info → reflex-0.3.9a2.dist-info}/RECORD +67 -67
- {reflex-0.3.8a2.dist-info → reflex-0.3.9a2.dist-info}/WHEEL +1 -1
- {reflex-0.3.8a2.dist-info → reflex-0.3.9a2.dist-info}/LICENSE +0 -0
- {reflex-0.3.8a2.dist-info → reflex-0.3.9a2.dist-info}/entry_points.txt +0 -0
|
@@ -832,7 +832,7 @@ class DialogContent(el.Div, CommonMarginProps, RadixThemesComponent):
|
|
|
832
832
|
*children: Child components.
|
|
833
833
|
color: map to CSS default color property.
|
|
834
834
|
color_scheme: map to radix color property.
|
|
835
|
-
size:
|
|
835
|
+
size: DialogContent size "1" - "4"
|
|
836
836
|
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
837
837
|
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
838
838
|
content_editable: Indicates whether the element's content is editable.
|
|
@@ -65,6 +65,12 @@ class DropdownMenuSubTrigger(CommonMarginProps, RadixThemesComponent):
|
|
|
65
65
|
tag = "DropdownMenu.SubTrigger"
|
|
66
66
|
|
|
67
67
|
|
|
68
|
+
class DropdownMenuSub(CommonMarginProps, RadixThemesComponent):
|
|
69
|
+
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
70
|
+
|
|
71
|
+
tag = "DropdownMenu.Sub"
|
|
72
|
+
|
|
73
|
+
|
|
68
74
|
class DropdownMenuSubContent(CommonMarginProps, RadixThemesComponent):
|
|
69
75
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
70
76
|
|
|
@@ -804,6 +804,199 @@ class DropdownMenuSubTrigger(CommonMarginProps, RadixThemesComponent):
|
|
|
804
804
|
"""
|
|
805
805
|
...
|
|
806
806
|
|
|
807
|
+
class DropdownMenuSub(CommonMarginProps, RadixThemesComponent):
|
|
808
|
+
@overload
|
|
809
|
+
@classmethod
|
|
810
|
+
def create( # type: ignore
|
|
811
|
+
cls,
|
|
812
|
+
*children,
|
|
813
|
+
color: Optional[Union[Var[str], str]] = None,
|
|
814
|
+
color_scheme: Optional[
|
|
815
|
+
Union[
|
|
816
|
+
Var[
|
|
817
|
+
Literal[
|
|
818
|
+
"tomato",
|
|
819
|
+
"red",
|
|
820
|
+
"ruby",
|
|
821
|
+
"crimson",
|
|
822
|
+
"pink",
|
|
823
|
+
"plum",
|
|
824
|
+
"purple",
|
|
825
|
+
"violet",
|
|
826
|
+
"iris",
|
|
827
|
+
"indigo",
|
|
828
|
+
"blue",
|
|
829
|
+
"cyan",
|
|
830
|
+
"teal",
|
|
831
|
+
"jade",
|
|
832
|
+
"green",
|
|
833
|
+
"grass",
|
|
834
|
+
"brown",
|
|
835
|
+
"orange",
|
|
836
|
+
"sky",
|
|
837
|
+
"mint",
|
|
838
|
+
"lime",
|
|
839
|
+
"yellow",
|
|
840
|
+
"amber",
|
|
841
|
+
"gold",
|
|
842
|
+
"bronze",
|
|
843
|
+
"gray",
|
|
844
|
+
]
|
|
845
|
+
],
|
|
846
|
+
Literal[
|
|
847
|
+
"tomato",
|
|
848
|
+
"red",
|
|
849
|
+
"ruby",
|
|
850
|
+
"crimson",
|
|
851
|
+
"pink",
|
|
852
|
+
"plum",
|
|
853
|
+
"purple",
|
|
854
|
+
"violet",
|
|
855
|
+
"iris",
|
|
856
|
+
"indigo",
|
|
857
|
+
"blue",
|
|
858
|
+
"cyan",
|
|
859
|
+
"teal",
|
|
860
|
+
"jade",
|
|
861
|
+
"green",
|
|
862
|
+
"grass",
|
|
863
|
+
"brown",
|
|
864
|
+
"orange",
|
|
865
|
+
"sky",
|
|
866
|
+
"mint",
|
|
867
|
+
"lime",
|
|
868
|
+
"yellow",
|
|
869
|
+
"amber",
|
|
870
|
+
"gold",
|
|
871
|
+
"bronze",
|
|
872
|
+
"gray",
|
|
873
|
+
],
|
|
874
|
+
]
|
|
875
|
+
] = None,
|
|
876
|
+
m: Optional[
|
|
877
|
+
Union[
|
|
878
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
879
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
880
|
+
]
|
|
881
|
+
] = None,
|
|
882
|
+
mx: Optional[
|
|
883
|
+
Union[
|
|
884
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
885
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
886
|
+
]
|
|
887
|
+
] = None,
|
|
888
|
+
my: Optional[
|
|
889
|
+
Union[
|
|
890
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
891
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
892
|
+
]
|
|
893
|
+
] = None,
|
|
894
|
+
mt: Optional[
|
|
895
|
+
Union[
|
|
896
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
897
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
898
|
+
]
|
|
899
|
+
] = None,
|
|
900
|
+
mr: Optional[
|
|
901
|
+
Union[
|
|
902
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
903
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
904
|
+
]
|
|
905
|
+
] = None,
|
|
906
|
+
mb: Optional[
|
|
907
|
+
Union[
|
|
908
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
909
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
910
|
+
]
|
|
911
|
+
] = None,
|
|
912
|
+
ml: Optional[
|
|
913
|
+
Union[
|
|
914
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
915
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
916
|
+
]
|
|
917
|
+
] = None,
|
|
918
|
+
style: Optional[Style] = None,
|
|
919
|
+
key: Optional[Any] = None,
|
|
920
|
+
id: Optional[Any] = None,
|
|
921
|
+
class_name: Optional[Any] = None,
|
|
922
|
+
autofocus: Optional[bool] = None,
|
|
923
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
924
|
+
on_blur: Optional[
|
|
925
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
926
|
+
] = None,
|
|
927
|
+
on_click: Optional[
|
|
928
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
929
|
+
] = None,
|
|
930
|
+
on_context_menu: Optional[
|
|
931
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
932
|
+
] = None,
|
|
933
|
+
on_double_click: Optional[
|
|
934
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
935
|
+
] = None,
|
|
936
|
+
on_focus: Optional[
|
|
937
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
938
|
+
] = None,
|
|
939
|
+
on_mount: Optional[
|
|
940
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
941
|
+
] = None,
|
|
942
|
+
on_mouse_down: Optional[
|
|
943
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
944
|
+
] = None,
|
|
945
|
+
on_mouse_enter: Optional[
|
|
946
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
947
|
+
] = None,
|
|
948
|
+
on_mouse_leave: Optional[
|
|
949
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
950
|
+
] = None,
|
|
951
|
+
on_mouse_move: Optional[
|
|
952
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
953
|
+
] = None,
|
|
954
|
+
on_mouse_out: Optional[
|
|
955
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
956
|
+
] = None,
|
|
957
|
+
on_mouse_over: Optional[
|
|
958
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
959
|
+
] = None,
|
|
960
|
+
on_mouse_up: Optional[
|
|
961
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
962
|
+
] = None,
|
|
963
|
+
on_scroll: Optional[
|
|
964
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
965
|
+
] = None,
|
|
966
|
+
on_unmount: Optional[
|
|
967
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
968
|
+
] = None,
|
|
969
|
+
**props
|
|
970
|
+
) -> "DropdownMenuSub":
|
|
971
|
+
"""Create a new component instance.
|
|
972
|
+
|
|
973
|
+
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
974
|
+
other UI libraries for common names, like Text and Button.
|
|
975
|
+
|
|
976
|
+
Args:
|
|
977
|
+
*children: Child components.
|
|
978
|
+
color: map to CSS default color property.
|
|
979
|
+
color_scheme: map to radix color property.
|
|
980
|
+
m: Margin: "0" - "9"
|
|
981
|
+
mx: Margin horizontal: "0" - "9"
|
|
982
|
+
my: Margin vertical: "0" - "9"
|
|
983
|
+
mt: Margin top: "0" - "9"
|
|
984
|
+
mr: Margin right: "0" - "9"
|
|
985
|
+
mb: Margin bottom: "0" - "9"
|
|
986
|
+
ml: Margin left: "0" - "9"
|
|
987
|
+
style: The style of the component.
|
|
988
|
+
key: A unique key for the component.
|
|
989
|
+
id: The id for the component.
|
|
990
|
+
class_name: The class name for the component.
|
|
991
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
992
|
+
custom_attrs: custom attribute
|
|
993
|
+
**props: Component properties.
|
|
994
|
+
|
|
995
|
+
Returns:
|
|
996
|
+
A new component instance.
|
|
997
|
+
"""
|
|
998
|
+
...
|
|
999
|
+
|
|
807
1000
|
class DropdownMenuSubContent(CommonMarginProps, RadixThemesComponent):
|
|
808
1001
|
@overload
|
|
809
1002
|
@classmethod
|
|
@@ -26,7 +26,7 @@ class IconButton(el.Button, CommonMarginProps, RadixThemesComponent):
|
|
|
26
26
|
# Button size "1" - "4"
|
|
27
27
|
size: Var[LiteralButtonSize]
|
|
28
28
|
|
|
29
|
-
# Variant of button: "solid" | "soft" | "outline" | "ghost"
|
|
29
|
+
# Variant of button: "classic" | "solid" | "soft" | "surface" | "outline" | "ghost"
|
|
30
30
|
variant: Var[LiteralVariant]
|
|
31
31
|
|
|
32
32
|
# Override theme color for button
|
|
@@ -282,7 +282,7 @@ class IconButton(el.Button, CommonMarginProps, RadixThemesComponent):
|
|
|
282
282
|
color_scheme: map to radix color property.
|
|
283
283
|
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
284
284
|
size: Button size "1" - "4"
|
|
285
|
-
variant: Variant of button: "solid" | "soft" | "outline" | "ghost"
|
|
285
|
+
variant: Variant of button: "classic" | "solid" | "soft" | "surface" | "outline" | "ghost"
|
|
286
286
|
high_contrast: Whether to render the button with higher contrast color against background
|
|
287
287
|
radius: Override theme radius for button: "none" | "small" | "medium" | "large" | "full"
|
|
288
288
|
auto_focus: Automatically focuses the button when the page loads
|
|
@@ -46,6 +46,7 @@ class Icon(RadixIconComponent):
|
|
|
46
46
|
f"Invalid icon tag: {props['tag']}. Please use one of the following: {sorted(ICON_LIST)}"
|
|
47
47
|
)
|
|
48
48
|
props["tag"] = format.to_title_case(props["tag"]) + "Icon"
|
|
49
|
+
props["alias"] = f"RadixThemes{props['tag']}"
|
|
49
50
|
return super().create(*children, **props)
|
|
50
51
|
|
|
51
52
|
|
|
@@ -20,6 +20,7 @@ class Inset(el.Div, CommonMarginProps, RadixThemesComponent):
|
|
|
20
20
|
# The side
|
|
21
21
|
side: Var[Literal["x", "y", "top", "bottom", "right", "left"]]
|
|
22
22
|
|
|
23
|
+
# How to clip the element's content: "border-box" | "padding-box"
|
|
23
24
|
clip: Var[Literal["border-box", "padding-box"]]
|
|
24
25
|
|
|
25
26
|
# Padding
|
|
@@ -250,6 +250,7 @@ class Inset(el.Div, CommonMarginProps, RadixThemesComponent):
|
|
|
250
250
|
color: map to CSS default color property.
|
|
251
251
|
color_scheme: map to radix color property.
|
|
252
252
|
side: The side
|
|
253
|
+
clip: How to clip the element's content: "border-box" | "padding-box"
|
|
253
254
|
p: Padding
|
|
254
255
|
px: Padding on the x axis
|
|
255
256
|
py: Padding on the y axis
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
"""Interactive components provided by @radix-ui/themes."""
|
|
2
|
-
from typing import Any, Dict, Literal
|
|
2
|
+
from typing import Any, Dict, List, Literal
|
|
3
3
|
|
|
4
|
+
import reflex as rx
|
|
5
|
+
from reflex.components.component import Component
|
|
6
|
+
from reflex.components.radix.themes.layout.flex import Flex
|
|
7
|
+
from reflex.components.radix.themes.typography.text import Text
|
|
4
8
|
from reflex.vars import Var
|
|
5
9
|
|
|
6
10
|
from ..base import (
|
|
7
11
|
CommonMarginProps,
|
|
8
12
|
LiteralAccentColor,
|
|
13
|
+
LiteralSize,
|
|
9
14
|
RadixThemesComponent,
|
|
10
15
|
)
|
|
11
16
|
|
|
17
|
+
LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"]
|
|
18
|
+
|
|
12
19
|
|
|
13
20
|
class RadioGroupRoot(CommonMarginProps, RadixThemesComponent):
|
|
14
21
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
@@ -36,6 +43,9 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent):
|
|
|
36
43
|
# Whether the radio group is disabled
|
|
37
44
|
disabled: Var[bool]
|
|
38
45
|
|
|
46
|
+
# The name of the group. Submitted with its owning form as part of a name/value pair.
|
|
47
|
+
name: Var[str]
|
|
48
|
+
|
|
39
49
|
# Whether the radio group is required
|
|
40
50
|
required: Var[bool]
|
|
41
51
|
|
|
@@ -70,3 +80,60 @@ class RadioGroupItem(CommonMarginProps, RadixThemesComponent):
|
|
|
70
80
|
|
|
71
81
|
# When true, indicates that the user must check the radio item before the owning form can be submitted.
|
|
72
82
|
required: Var[bool]
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class HighLevelRadioGroup(RadioGroupRoot):
|
|
86
|
+
"""High level wrapper for the RadioGroup component."""
|
|
87
|
+
|
|
88
|
+
# The items of the radio group.
|
|
89
|
+
items: Var[List[str]]
|
|
90
|
+
|
|
91
|
+
# The direction of the radio group.
|
|
92
|
+
direction: Var[LiteralFlexDirection] = Var.create_safe("column")
|
|
93
|
+
|
|
94
|
+
# The gap between the items of the radio group.
|
|
95
|
+
gap: Var[LiteralSize] = Var.create_safe("2")
|
|
96
|
+
|
|
97
|
+
# The size of the radio group.
|
|
98
|
+
size: Var[Literal["1", "2", "3"]] = Var.create_safe("2")
|
|
99
|
+
|
|
100
|
+
@classmethod
|
|
101
|
+
def create(cls, items: Var[List[str]], **props) -> Component:
|
|
102
|
+
"""Create a radio group component.
|
|
103
|
+
|
|
104
|
+
Args:
|
|
105
|
+
items: The items of the radio group.
|
|
106
|
+
**props: Additional properties to apply to the accordion item.
|
|
107
|
+
|
|
108
|
+
Returns:
|
|
109
|
+
The created radio group component.
|
|
110
|
+
"""
|
|
111
|
+
direction = props.pop("direction", "column")
|
|
112
|
+
gap = props.pop("gap", "2")
|
|
113
|
+
size = props.pop("size", "2")
|
|
114
|
+
|
|
115
|
+
def radio_group_item(value: str) -> Component:
|
|
116
|
+
return Text.create(
|
|
117
|
+
Flex.create(
|
|
118
|
+
RadioGroupItem.create(value=value),
|
|
119
|
+
value,
|
|
120
|
+
gap="2",
|
|
121
|
+
),
|
|
122
|
+
size=size,
|
|
123
|
+
as_="label",
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
if isinstance(items, Var):
|
|
127
|
+
child = [rx.foreach(items, radio_group_item)]
|
|
128
|
+
else:
|
|
129
|
+
child = [radio_group_item(value) for value in items] # type: ignore
|
|
130
|
+
|
|
131
|
+
return RadioGroupRoot.create(
|
|
132
|
+
Flex.create(
|
|
133
|
+
*child,
|
|
134
|
+
direction=direction,
|
|
135
|
+
gap=gap,
|
|
136
|
+
),
|
|
137
|
+
size=size,
|
|
138
|
+
**props,
|
|
139
|
+
)
|
|
@@ -7,9 +7,20 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|
|
7
7
|
from reflex.vars import Var, BaseVar, ComputedVar
|
|
8
8
|
from reflex.event import EventChain, EventHandler, EventSpec
|
|
9
9
|
from reflex.style import Style
|
|
10
|
-
from typing import Any, Dict, Literal
|
|
10
|
+
from typing import Any, Dict, List, Literal
|
|
11
|
+
import reflex as rx
|
|
12
|
+
from reflex.components.component import Component
|
|
13
|
+
from reflex.components.radix.themes.layout.flex import Flex
|
|
14
|
+
from reflex.components.radix.themes.typography.text import Text
|
|
11
15
|
from reflex.vars import Var
|
|
12
|
-
from ..base import
|
|
16
|
+
from ..base import (
|
|
17
|
+
CommonMarginProps,
|
|
18
|
+
LiteralAccentColor,
|
|
19
|
+
LiteralSize,
|
|
20
|
+
RadixThemesComponent,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"]
|
|
13
24
|
|
|
14
25
|
class RadioGroupRoot(CommonMarginProps, RadixThemesComponent):
|
|
15
26
|
def get_event_triggers(self) -> Dict[str, Any]: ...
|
|
@@ -94,6 +105,7 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent):
|
|
|
94
105
|
value: Optional[Union[Var[str], str]] = None,
|
|
95
106
|
default_value: Optional[Union[Var[str], str]] = None,
|
|
96
107
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
|
108
|
+
name: Optional[Union[Var[str], str]] = None,
|
|
97
109
|
required: Optional[Union[Var[bool], bool]] = None,
|
|
98
110
|
orientation: Optional[
|
|
99
111
|
Union[
|
|
@@ -215,6 +227,7 @@ class RadioGroupRoot(CommonMarginProps, RadixThemesComponent):
|
|
|
215
227
|
value: The controlled value of the radio item to check. Should be used in conjunction with onValueChange.
|
|
216
228
|
default_value: The initial value of checked radio item. Should be used in conjunction with onValueChange.
|
|
217
229
|
disabled: Whether the radio group is disabled
|
|
230
|
+
name: The name of the group. Submitted with its owning form as part of a name/value pair.
|
|
218
231
|
required: Whether the radio group is required
|
|
219
232
|
orientation: The orientation of the component.
|
|
220
233
|
loop: When true, keyboard navigation will loop from last item to first, and vice versa.
|
|
@@ -436,3 +449,242 @@ class RadioGroupItem(CommonMarginProps, RadixThemesComponent):
|
|
|
436
449
|
A new component instance.
|
|
437
450
|
"""
|
|
438
451
|
...
|
|
452
|
+
|
|
453
|
+
class HighLevelRadioGroup(RadioGroupRoot):
|
|
454
|
+
@overload
|
|
455
|
+
@classmethod
|
|
456
|
+
def create( # type: ignore
|
|
457
|
+
cls,
|
|
458
|
+
*children,
|
|
459
|
+
items: Optional[Union[Var[List[str]], List[str]]] = None,
|
|
460
|
+
direction: Optional[
|
|
461
|
+
Union[
|
|
462
|
+
Var[Literal["row", "column", "row-reverse", "column-reverse"]],
|
|
463
|
+
Literal["row", "column", "row-reverse", "column-reverse"],
|
|
464
|
+
]
|
|
465
|
+
] = None,
|
|
466
|
+
gap: Optional[
|
|
467
|
+
Union[
|
|
468
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
469
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
470
|
+
]
|
|
471
|
+
] = None,
|
|
472
|
+
size: Optional[
|
|
473
|
+
Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
|
|
474
|
+
] = None,
|
|
475
|
+
variant: Optional[
|
|
476
|
+
Union[
|
|
477
|
+
Var[Literal["classic", "surface", "soft"]],
|
|
478
|
+
Literal["classic", "surface", "soft"],
|
|
479
|
+
]
|
|
480
|
+
] = None,
|
|
481
|
+
color: Optional[
|
|
482
|
+
Union[
|
|
483
|
+
Var[
|
|
484
|
+
Literal[
|
|
485
|
+
"tomato",
|
|
486
|
+
"red",
|
|
487
|
+
"ruby",
|
|
488
|
+
"crimson",
|
|
489
|
+
"pink",
|
|
490
|
+
"plum",
|
|
491
|
+
"purple",
|
|
492
|
+
"violet",
|
|
493
|
+
"iris",
|
|
494
|
+
"indigo",
|
|
495
|
+
"blue",
|
|
496
|
+
"cyan",
|
|
497
|
+
"teal",
|
|
498
|
+
"jade",
|
|
499
|
+
"green",
|
|
500
|
+
"grass",
|
|
501
|
+
"brown",
|
|
502
|
+
"orange",
|
|
503
|
+
"sky",
|
|
504
|
+
"mint",
|
|
505
|
+
"lime",
|
|
506
|
+
"yellow",
|
|
507
|
+
"amber",
|
|
508
|
+
"gold",
|
|
509
|
+
"bronze",
|
|
510
|
+
"gray",
|
|
511
|
+
]
|
|
512
|
+
],
|
|
513
|
+
Literal[
|
|
514
|
+
"tomato",
|
|
515
|
+
"red",
|
|
516
|
+
"ruby",
|
|
517
|
+
"crimson",
|
|
518
|
+
"pink",
|
|
519
|
+
"plum",
|
|
520
|
+
"purple",
|
|
521
|
+
"violet",
|
|
522
|
+
"iris",
|
|
523
|
+
"indigo",
|
|
524
|
+
"blue",
|
|
525
|
+
"cyan",
|
|
526
|
+
"teal",
|
|
527
|
+
"jade",
|
|
528
|
+
"green",
|
|
529
|
+
"grass",
|
|
530
|
+
"brown",
|
|
531
|
+
"orange",
|
|
532
|
+
"sky",
|
|
533
|
+
"mint",
|
|
534
|
+
"lime",
|
|
535
|
+
"yellow",
|
|
536
|
+
"amber",
|
|
537
|
+
"gold",
|
|
538
|
+
"bronze",
|
|
539
|
+
"gray",
|
|
540
|
+
],
|
|
541
|
+
]
|
|
542
|
+
] = None,
|
|
543
|
+
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
|
544
|
+
value: Optional[Union[Var[str], str]] = None,
|
|
545
|
+
default_value: Optional[Union[Var[str], str]] = None,
|
|
546
|
+
disabled: Optional[Union[Var[bool], bool]] = None,
|
|
547
|
+
name: Optional[Union[Var[str], str]] = None,
|
|
548
|
+
required: Optional[Union[Var[bool], bool]] = None,
|
|
549
|
+
orientation: Optional[
|
|
550
|
+
Union[
|
|
551
|
+
Var[Literal["horizontal", "vertical"]],
|
|
552
|
+
Literal["horizontal", "vertical"],
|
|
553
|
+
]
|
|
554
|
+
] = None,
|
|
555
|
+
loop: Optional[Union[Var[bool], bool]] = None,
|
|
556
|
+
m: Optional[
|
|
557
|
+
Union[
|
|
558
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
559
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
560
|
+
]
|
|
561
|
+
] = None,
|
|
562
|
+
mx: Optional[
|
|
563
|
+
Union[
|
|
564
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
565
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
566
|
+
]
|
|
567
|
+
] = None,
|
|
568
|
+
my: Optional[
|
|
569
|
+
Union[
|
|
570
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
571
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
572
|
+
]
|
|
573
|
+
] = None,
|
|
574
|
+
mt: Optional[
|
|
575
|
+
Union[
|
|
576
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
577
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
578
|
+
]
|
|
579
|
+
] = None,
|
|
580
|
+
mr: Optional[
|
|
581
|
+
Union[
|
|
582
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
583
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
584
|
+
]
|
|
585
|
+
] = None,
|
|
586
|
+
mb: Optional[
|
|
587
|
+
Union[
|
|
588
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
589
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
590
|
+
]
|
|
591
|
+
] = None,
|
|
592
|
+
ml: Optional[
|
|
593
|
+
Union[
|
|
594
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
595
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
596
|
+
]
|
|
597
|
+
] = None,
|
|
598
|
+
style: Optional[Style] = None,
|
|
599
|
+
key: Optional[Any] = None,
|
|
600
|
+
id: Optional[Any] = None,
|
|
601
|
+
class_name: Optional[Any] = None,
|
|
602
|
+
autofocus: Optional[bool] = None,
|
|
603
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
604
|
+
on_blur: Optional[
|
|
605
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
606
|
+
] = None,
|
|
607
|
+
on_click: Optional[
|
|
608
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
609
|
+
] = None,
|
|
610
|
+
on_context_menu: Optional[
|
|
611
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
612
|
+
] = None,
|
|
613
|
+
on_double_click: Optional[
|
|
614
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
615
|
+
] = None,
|
|
616
|
+
on_focus: Optional[
|
|
617
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
618
|
+
] = None,
|
|
619
|
+
on_mount: Optional[
|
|
620
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
621
|
+
] = None,
|
|
622
|
+
on_mouse_down: Optional[
|
|
623
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
624
|
+
] = None,
|
|
625
|
+
on_mouse_enter: Optional[
|
|
626
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
627
|
+
] = None,
|
|
628
|
+
on_mouse_leave: Optional[
|
|
629
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
630
|
+
] = None,
|
|
631
|
+
on_mouse_move: Optional[
|
|
632
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
633
|
+
] = None,
|
|
634
|
+
on_mouse_out: Optional[
|
|
635
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
636
|
+
] = None,
|
|
637
|
+
on_mouse_over: Optional[
|
|
638
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
639
|
+
] = None,
|
|
640
|
+
on_mouse_up: Optional[
|
|
641
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
642
|
+
] = None,
|
|
643
|
+
on_scroll: Optional[
|
|
644
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
645
|
+
] = None,
|
|
646
|
+
on_unmount: Optional[
|
|
647
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
648
|
+
] = None,
|
|
649
|
+
on_value_change: Optional[
|
|
650
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
651
|
+
] = None,
|
|
652
|
+
**props
|
|
653
|
+
) -> "HighLevelRadioGroup":
|
|
654
|
+
"""Create a radio group component.
|
|
655
|
+
|
|
656
|
+
Args:
|
|
657
|
+
items: The items of the radio group.
|
|
658
|
+
items: The items of the radio group.
|
|
659
|
+
direction: The direction of the radio group.
|
|
660
|
+
gap: The gap between the items of the radio group.
|
|
661
|
+
size: The size of the radio group: "1" | "2" | "3"
|
|
662
|
+
variant: The variant of the radio group
|
|
663
|
+
color: The color of the radio group
|
|
664
|
+
high_contrast: Whether to render the radio group with higher contrast color against background
|
|
665
|
+
value: The controlled value of the radio item to check. Should be used in conjunction with onValueChange.
|
|
666
|
+
default_value: The initial value of checked radio item. Should be used in conjunction with onValueChange.
|
|
667
|
+
disabled: Whether the radio group is disabled
|
|
668
|
+
name: The name of the group. Submitted with its owning form as part of a name/value pair.
|
|
669
|
+
required: Whether the radio group is required
|
|
670
|
+
orientation: The orientation of the component.
|
|
671
|
+
loop: When true, keyboard navigation will loop from last item to first, and vice versa.
|
|
672
|
+
m: Margin: "0" - "9"
|
|
673
|
+
mx: Margin horizontal: "0" - "9"
|
|
674
|
+
my: Margin vertical: "0" - "9"
|
|
675
|
+
mt: Margin top: "0" - "9"
|
|
676
|
+
mr: Margin right: "0" - "9"
|
|
677
|
+
mb: Margin bottom: "0" - "9"
|
|
678
|
+
ml: Margin left: "0" - "9"
|
|
679
|
+
style: The style of the component.
|
|
680
|
+
key: A unique key for the component.
|
|
681
|
+
id: The id for the component.
|
|
682
|
+
class_name: The class name for the component.
|
|
683
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
684
|
+
custom_attrs: custom attribute
|
|
685
|
+
**props: Additional properties to apply to the accordion item.
|
|
686
|
+
|
|
687
|
+
Returns:
|
|
688
|
+
The created radio group component.
|
|
689
|
+
"""
|
|
690
|
+
...
|