reflex 0.3.5a4__py3-none-any.whl → 0.3.7__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/jinja/web/pages/base_page.js.jinja2 +2 -0
- reflex/.templates/web/utils/state.js +1 -1
- reflex/__init__.py +29 -6
- reflex/__init__.pyi +2 -0
- reflex/app.py +3 -0
- reflex/components/__init__.py +2 -0
- reflex/components/chakra/__init__.py +23 -0
- reflex/components/{media → chakra/media}/image.py +1 -28
- reflex/components/chakra/media/image.pyi +120 -0
- reflex/components/component.py +32 -4
- reflex/components/datadisplay/datatable.py +1 -37
- reflex/components/datadisplay/datatable.pyi +1 -11
- reflex/components/el/elements/forms.py +43 -1
- reflex/components/el/elements/forms.pyi +26 -1
- reflex/components/graphing/plotly.py +0 -22
- reflex/components/graphing/plotly.pyi +0 -12
- reflex/components/media/__init__.py +0 -1
- reflex/components/media/image.pyi +0 -9
- reflex/components/next/__init__.py +8 -0
- reflex/components/next/base.py +8 -0
- reflex/components/next/base.pyi +91 -0
- reflex/components/next/image.py +114 -0
- reflex/components/next/image.pyi +122 -0
- reflex/components/next/video.py +33 -0
- reflex/components/next/video.pyi +92 -0
- reflex/components/radix/primitives/__init__.py +3 -0
- reflex/components/radix/primitives/accordion.py +279 -0
- reflex/components/radix/primitives/accordion.pyi +619 -0
- reflex/components/radix/themes/__init__.py +4 -73
- reflex/components/radix/themes/base.py +7 -7
- reflex/components/radix/themes/base.pyi +21 -21
- reflex/components/radix/themes/components/__init__.py +193 -0
- reflex/components/radix/themes/components/alertdialog.py +72 -0
- reflex/components/radix/themes/components/alertdialog.pyi +733 -0
- reflex/components/radix/themes/components/aspectratio.py +20 -0
- reflex/components/radix/themes/components/aspectratio.pyi +144 -0
- reflex/components/radix/themes/components/avatar.py +38 -0
- reflex/components/radix/themes/components/avatar.pyi +233 -0
- reflex/components/radix/themes/components/badge.py +38 -0
- reflex/components/radix/themes/components/badge.pyi +291 -0
- reflex/components/radix/themes/components/button.py +39 -0
- reflex/components/radix/themes/components/button.pyi +330 -0
- reflex/components/radix/themes/components/callout.py +49 -0
- reflex/components/radix/themes/components/callout.pyi +668 -0
- reflex/components/radix/themes/components/card.py +25 -0
- reflex/components/radix/themes/components/card.pyi +214 -0
- reflex/components/radix/themes/components/checkbox.py +67 -0
- reflex/components/radix/themes/components/checkbox.pyi +249 -0
- reflex/components/radix/themes/components/contextmenu.py +134 -0
- reflex/components/radix/themes/{typography.pyi → components/contextmenu.pyi} +182 -602
- reflex/components/radix/themes/components/dialog.py +75 -0
- reflex/components/radix/themes/components/dialog.pyi +739 -0
- reflex/components/radix/themes/components/dropdownmenu.py +101 -0
- reflex/components/radix/themes/components/dropdownmenu.pyi +1065 -0
- reflex/components/radix/themes/components/hovercard.py +63 -0
- reflex/components/radix/themes/components/hovercard.pyi +487 -0
- reflex/components/radix/themes/components/iconbutton.py +39 -0
- reflex/components/radix/themes/components/iconbutton.pyi +332 -0
- reflex/components/radix/themes/components/icons.py +400 -0
- reflex/components/radix/themes/components/icons.pyi +185 -0
- reflex/components/radix/themes/components/inset.py +44 -0
- reflex/components/radix/themes/components/inset.pyi +230 -0
- reflex/components/radix/themes/components/popover.py +85 -0
- reflex/components/radix/themes/components/popover.pyi +634 -0
- reflex/components/radix/themes/components/radiogroup.py +72 -0
- reflex/components/radix/themes/components/radiogroup.pyi +369 -0
- reflex/components/radix/themes/components/scrollarea.py +31 -0
- reflex/components/radix/themes/components/scrollarea.pyi +165 -0
- reflex/components/radix/themes/components/select.py +137 -0
- reflex/components/radix/themes/{layout.pyi → components/select.pyi} +422 -418
- reflex/components/radix/themes/components/separator.py +30 -0
- reflex/components/radix/themes/components/separator.pyi +218 -0
- reflex/components/radix/themes/components/slider.py +68 -0
- reflex/components/radix/themes/components/slider.pyi +254 -0
- reflex/components/radix/themes/components/switch.py +68 -0
- reflex/components/radix/themes/components/switch.pyi +250 -0
- reflex/components/radix/themes/components/table.py +79 -0
- reflex/components/radix/themes/components/table.pyi +1485 -0
- reflex/components/radix/themes/components/tabs.py +65 -0
- reflex/components/radix/themes/components/tabs.pyi +549 -0
- reflex/components/radix/themes/components/textarea.py +68 -0
- reflex/components/radix/themes/components/textarea.pyi +333 -0
- reflex/components/radix/themes/{components.py → components/textfield.py} +3 -87
- reflex/components/radix/themes/{components.pyi → components/textfield.pyi} +202 -591
- reflex/components/radix/themes/layout/__init__.py +13 -0
- reflex/components/radix/themes/layout/base.py +48 -0
- reflex/components/radix/themes/layout/base.pyi +195 -0
- reflex/components/radix/themes/layout/box.py +12 -0
- reflex/components/radix/themes/layout/box.pyi +252 -0
- reflex/components/radix/themes/layout/container.py +23 -0
- reflex/components/radix/themes/layout/container.pyi +260 -0
- reflex/components/radix/themes/layout/flex.py +45 -0
- reflex/components/radix/themes/layout/flex.pyi +303 -0
- reflex/components/radix/themes/layout/grid.py +53 -0
- reflex/components/radix/themes/layout/grid.pyi +203 -0
- reflex/components/radix/themes/layout/section.py +20 -0
- reflex/components/radix/themes/layout/section.pyi +260 -0
- reflex/components/radix/themes/typography/__init__.py +21 -0
- reflex/components/radix/themes/typography/base.py +12 -0
- reflex/components/radix/themes/typography/blockquote.py +36 -0
- reflex/components/radix/themes/typography/blockquote.pyi +282 -0
- reflex/components/radix/themes/typography/code.py +40 -0
- reflex/components/radix/themes/typography/code.pyi +292 -0
- reflex/components/radix/themes/typography/em.py +18 -0
- reflex/components/radix/themes/typography/em.pyi +199 -0
- reflex/components/radix/themes/typography/heading.py +50 -0
- reflex/components/radix/themes/typography/heading.pyi +298 -0
- reflex/components/radix/themes/typography/kbd.py +25 -0
- reflex/components/radix/themes/typography/kbd.pyi +208 -0
- reflex/components/radix/themes/typography/link.py +49 -0
- reflex/components/radix/themes/typography/link.pyi +238 -0
- reflex/components/radix/themes/typography/quote.py +18 -0
- reflex/components/radix/themes/typography/quote.pyi +200 -0
- reflex/components/radix/themes/typography/strong.py +18 -0
- reflex/components/radix/themes/typography/strong.pyi +199 -0
- reflex/components/radix/themes/typography/text.py +50 -0
- reflex/components/radix/themes/typography/text.pyi +298 -0
- reflex/components/radix/themes/typography.py +1 -1
- reflex/constants/__init__.py +1 -0
- reflex/constants/base.py +7 -0
- reflex/constants/config.py +1 -1
- reflex/model.py +2 -1
- reflex/reflex.py +8 -1
- reflex/state.py +11 -0
- reflex/style.py +120 -10
- reflex/testing.py +4 -4
- reflex/utils/format.py +9 -5
- reflex/utils/prerequisites.py +49 -6
- reflex/utils/processes.py +8 -1
- reflex/utils/serializers.py +83 -0
- reflex/utils/types.py +22 -1
- reflex/vars.py +24 -1
- {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/METADATA +3 -2
- {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/RECORD +137 -44
- reflex/components/radix/themes/layout.py +0 -155
- {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/LICENSE +0 -0
- {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/WHEEL +0 -0
- {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/entry_points.txt +0 -0
|
@@ -10,8 +10,13 @@ from reflex.vars import Var
|
|
|
10
10
|
|
|
11
11
|
LiteralAlign = Literal["start", "center", "end", "baseline", "stretch"]
|
|
12
12
|
LiteralJustify = Literal["start", "center", "end", "between"]
|
|
13
|
-
LiteralSize = Literal["
|
|
14
|
-
LiteralVariant = Literal["solid", "soft", "outline", "ghost"]
|
|
13
|
+
LiteralSize = Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
14
|
+
LiteralVariant = Literal["classic", "solid", "soft", "surface", "outline", "ghost"]
|
|
15
|
+
LiteralAppearance = Literal["inherit", "light", "dark"]
|
|
16
|
+
LiteralGrayColor = Literal["gray", "mauve", "slate", "sage", "olive", "sand", "auto"]
|
|
17
|
+
LiteralPanelBackground = Literal["solid", "transparent"]
|
|
18
|
+
LiteralRadius = Literal["none", "small", "medium", "large", "full"]
|
|
19
|
+
LiteralScaling = Literal["90%", "95%", "100%", "105%", "110%"]
|
|
15
20
|
|
|
16
21
|
|
|
17
22
|
class CommonMarginProps(Component):
|
|
@@ -101,11 +106,6 @@ LiteralAccentColor = Literal[
|
|
|
101
106
|
"bronze",
|
|
102
107
|
"gray",
|
|
103
108
|
]
|
|
104
|
-
LiteralAppearance = Literal["inherit", "light", "dark"]
|
|
105
|
-
LiteralGrayColor = Literal["gray", "mauve", "slate", "sage", "olive", "sand", "auto"]
|
|
106
|
-
LiteralPanelBackground = Literal["solid", "transparent"]
|
|
107
|
-
LiteralRadius = Literal["none", "small", "medium", "large", "full"]
|
|
108
|
-
LiteralScaling = Literal["90%", "95%", "100%", "105%", "110%"]
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
class Theme(RadixThemesComponent):
|
|
@@ -14,8 +14,13 @@ from reflex.vars import Var
|
|
|
14
14
|
|
|
15
15
|
LiteralAlign = Literal["start", "center", "end", "baseline", "stretch"]
|
|
16
16
|
LiteralJustify = Literal["start", "center", "end", "between"]
|
|
17
|
-
LiteralSize = Literal["
|
|
18
|
-
LiteralVariant = Literal["solid", "soft", "outline", "ghost"]
|
|
17
|
+
LiteralSize = Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
18
|
+
LiteralVariant = Literal["classic", "solid", "soft", "surface", "outline", "ghost"]
|
|
19
|
+
LiteralAppearance = Literal["inherit", "light", "dark"]
|
|
20
|
+
LiteralGrayColor = Literal["gray", "mauve", "slate", "sage", "olive", "sand", "auto"]
|
|
21
|
+
LiteralPanelBackground = Literal["solid", "transparent"]
|
|
22
|
+
LiteralRadius = Literal["none", "small", "medium", "large", "full"]
|
|
23
|
+
LiteralScaling = Literal["90%", "95%", "100%", "105%", "110%"]
|
|
19
24
|
|
|
20
25
|
class CommonMarginProps(Component):
|
|
21
26
|
@overload
|
|
@@ -25,44 +30,44 @@ class CommonMarginProps(Component):
|
|
|
25
30
|
*children,
|
|
26
31
|
m: Optional[
|
|
27
32
|
Union[
|
|
28
|
-
Var[Literal["
|
|
29
|
-
Literal["
|
|
33
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
34
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
30
35
|
]
|
|
31
36
|
] = None,
|
|
32
37
|
mx: Optional[
|
|
33
38
|
Union[
|
|
34
|
-
Var[Literal["
|
|
35
|
-
Literal["
|
|
39
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
40
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
36
41
|
]
|
|
37
42
|
] = None,
|
|
38
43
|
my: Optional[
|
|
39
44
|
Union[
|
|
40
|
-
Var[Literal["
|
|
41
|
-
Literal["
|
|
45
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
46
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
42
47
|
]
|
|
43
48
|
] = None,
|
|
44
49
|
mt: Optional[
|
|
45
50
|
Union[
|
|
46
|
-
Var[Literal["
|
|
47
|
-
Literal["
|
|
51
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
52
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
48
53
|
]
|
|
49
54
|
] = None,
|
|
50
55
|
mr: Optional[
|
|
51
56
|
Union[
|
|
52
|
-
Var[Literal["
|
|
53
|
-
Literal["
|
|
57
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
58
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
54
59
|
]
|
|
55
60
|
] = None,
|
|
56
61
|
mb: Optional[
|
|
57
62
|
Union[
|
|
58
|
-
Var[Literal["
|
|
59
|
-
Literal["
|
|
63
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
64
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
60
65
|
]
|
|
61
66
|
] = None,
|
|
62
67
|
ml: Optional[
|
|
63
68
|
Union[
|
|
64
|
-
Var[Literal["
|
|
65
|
-
Literal["
|
|
69
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
70
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
66
71
|
]
|
|
67
72
|
] = None,
|
|
68
73
|
style: Optional[Style] = None,
|
|
@@ -252,11 +257,6 @@ LiteralAccentColor = Literal[
|
|
|
252
257
|
"bronze",
|
|
253
258
|
"gray",
|
|
254
259
|
]
|
|
255
|
-
LiteralAppearance = Literal["inherit", "light", "dark"]
|
|
256
|
-
LiteralGrayColor = Literal["gray", "mauve", "slate", "sage", "olive", "sand", "auto"]
|
|
257
|
-
LiteralPanelBackground = Literal["solid", "transparent"]
|
|
258
|
-
LiteralRadius = Literal["none", "small", "medium", "large", "full"]
|
|
259
|
-
LiteralScaling = Literal["90%", "95%", "100%", "105%", "110%"]
|
|
260
260
|
|
|
261
261
|
class Theme(RadixThemesComponent):
|
|
262
262
|
@overload
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"""Radix themes components."""
|
|
2
|
+
|
|
3
|
+
from .alertdialog import (
|
|
4
|
+
AlertDialog,
|
|
5
|
+
AlertDialogContent,
|
|
6
|
+
AlertDialogDescription,
|
|
7
|
+
AlertDialogTitle,
|
|
8
|
+
AlertDialogTrigger,
|
|
9
|
+
)
|
|
10
|
+
from .aspectratio import AspectRatio
|
|
11
|
+
from .avatar import Avatar
|
|
12
|
+
from .badge import Badge
|
|
13
|
+
from .button import Button
|
|
14
|
+
from .callout import CalloutIcon, CalloutRoot, CalloutText
|
|
15
|
+
from .card import Card
|
|
16
|
+
from .checkbox import Checkbox
|
|
17
|
+
from .contextmenu import (
|
|
18
|
+
ContextMenuContent,
|
|
19
|
+
ContextMenuItem,
|
|
20
|
+
ContextMenuRoot,
|
|
21
|
+
ContextMenuSeparator,
|
|
22
|
+
ContextMenuSub,
|
|
23
|
+
ContextMenuSubContent,
|
|
24
|
+
ContextMenuSubTrigger,
|
|
25
|
+
ContextMenuTrigger,
|
|
26
|
+
)
|
|
27
|
+
from .dialog import (
|
|
28
|
+
DialogContent,
|
|
29
|
+
DialogDescription,
|
|
30
|
+
DialogRoot,
|
|
31
|
+
DialogTitle,
|
|
32
|
+
DialogTrigger,
|
|
33
|
+
)
|
|
34
|
+
from .dropdownmenu import (
|
|
35
|
+
DropdownMenuContent,
|
|
36
|
+
DropdownMenuItem,
|
|
37
|
+
DropdownMenuRoot,
|
|
38
|
+
DropdownMenuSeparator,
|
|
39
|
+
DropdownMenuSubContent,
|
|
40
|
+
DropdownMenuSubTrigger,
|
|
41
|
+
DropdownMenuTrigger,
|
|
42
|
+
)
|
|
43
|
+
from .hovercard import HoverCardContent, HoverCardRoot, HoverCardTrigger
|
|
44
|
+
from .iconbutton import IconButton
|
|
45
|
+
from .icons import Icon
|
|
46
|
+
from .inset import Inset
|
|
47
|
+
from .popover import PopoverClose, PopoverContent, PopoverRoot, PopoverTrigger
|
|
48
|
+
from .radiogroup import RadioGroupItem, RadioGroupRoot
|
|
49
|
+
from .scrollarea import ScrollArea
|
|
50
|
+
from .select import (
|
|
51
|
+
SelectContent,
|
|
52
|
+
SelectGroup,
|
|
53
|
+
SelectItem,
|
|
54
|
+
SelectLabel,
|
|
55
|
+
SelectRoot,
|
|
56
|
+
SelectSeparator,
|
|
57
|
+
SelectTrigger,
|
|
58
|
+
)
|
|
59
|
+
from .separator import Separator
|
|
60
|
+
from .switch import Switch
|
|
61
|
+
from .table import (
|
|
62
|
+
TableBody,
|
|
63
|
+
TableCell,
|
|
64
|
+
TableColumnHeaderCell,
|
|
65
|
+
TableHeader,
|
|
66
|
+
TableRoot,
|
|
67
|
+
TableRow,
|
|
68
|
+
TableRowHeaderCell,
|
|
69
|
+
)
|
|
70
|
+
from .tabs import TabsList, TabsRoot, TabsTrigger
|
|
71
|
+
from .textarea import TextArea
|
|
72
|
+
from .textfield import TextFieldInput, TextFieldRoot, TextFieldSlot
|
|
73
|
+
|
|
74
|
+
# Alert Dialog
|
|
75
|
+
alertdialog = AlertDialog.create
|
|
76
|
+
alertdialog_trigger = AlertDialogTrigger.create
|
|
77
|
+
alertdialog_content = AlertDialogContent.create
|
|
78
|
+
alertdialog_title = AlertDialogTitle.create
|
|
79
|
+
alertdialog_description = AlertDialogDescription.create
|
|
80
|
+
|
|
81
|
+
# Aspect Ratio
|
|
82
|
+
aspect_ratio = AspectRatio.create
|
|
83
|
+
|
|
84
|
+
# Avatar
|
|
85
|
+
avatar = Avatar.create
|
|
86
|
+
|
|
87
|
+
# Badge
|
|
88
|
+
badge = Badge.create
|
|
89
|
+
|
|
90
|
+
# Button
|
|
91
|
+
button = Button.create
|
|
92
|
+
|
|
93
|
+
# Callout
|
|
94
|
+
callout_root = CalloutRoot.create
|
|
95
|
+
callout_icon = CalloutIcon.create
|
|
96
|
+
callout_text = CalloutText.create
|
|
97
|
+
|
|
98
|
+
# Card
|
|
99
|
+
card = Card.create
|
|
100
|
+
|
|
101
|
+
# Checkbox
|
|
102
|
+
checkbox = Checkbox.create
|
|
103
|
+
|
|
104
|
+
# Context Menu
|
|
105
|
+
contextmenu_root = ContextMenuRoot.create
|
|
106
|
+
contextmenu_sub = ContextMenuSub.create
|
|
107
|
+
contextmenu_trigger = ContextMenuTrigger.create
|
|
108
|
+
contextmenu_content = ContextMenuContent.create
|
|
109
|
+
contextmenu_sub_content = ContextMenuSubContent.create
|
|
110
|
+
contextmenu_sub_trigger = ContextMenuSubTrigger.create
|
|
111
|
+
contextmenu_item = ContextMenuItem.create
|
|
112
|
+
contextmenu_separator = ContextMenuSeparator.create
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# Dialog
|
|
116
|
+
dialog_root = DialogRoot.create
|
|
117
|
+
dialog_trigger = DialogTrigger.create
|
|
118
|
+
dialog_content = DialogContent.create
|
|
119
|
+
dialog_title = DialogTitle.create
|
|
120
|
+
dialog_description = DialogDescription.create
|
|
121
|
+
|
|
122
|
+
# Dropdown Menu
|
|
123
|
+
dropdownmenu_root = DropdownMenuRoot.create
|
|
124
|
+
dropdownmenu_trigger = DropdownMenuTrigger.create
|
|
125
|
+
dropdownmenu_content = DropdownMenuContent.create
|
|
126
|
+
dropdownmenu_sub_content = DropdownMenuSubContent.create
|
|
127
|
+
dropdownmenu_sub_trigger = DropdownMenuSubTrigger.create
|
|
128
|
+
dropdownmenu_item = DropdownMenuItem.create
|
|
129
|
+
dropdownmenu_separator = DropdownMenuSeparator.create
|
|
130
|
+
|
|
131
|
+
# Hover Card
|
|
132
|
+
hovercard_root = HoverCardRoot.create
|
|
133
|
+
hovercard_trigger = HoverCardTrigger.create
|
|
134
|
+
hovercard_content = HoverCardContent.create
|
|
135
|
+
|
|
136
|
+
# Icon
|
|
137
|
+
icon = Icon.create
|
|
138
|
+
|
|
139
|
+
# Icon Button
|
|
140
|
+
icon_button = IconButton.create
|
|
141
|
+
|
|
142
|
+
# Inset
|
|
143
|
+
inset = Inset.create
|
|
144
|
+
|
|
145
|
+
# Popover
|
|
146
|
+
popover_root = PopoverRoot.create
|
|
147
|
+
popover_trigger = PopoverTrigger.create
|
|
148
|
+
popover_content = PopoverContent.create
|
|
149
|
+
popover_close = PopoverClose.create
|
|
150
|
+
|
|
151
|
+
# Radio Group
|
|
152
|
+
radio_group_root = RadioGroupRoot.create
|
|
153
|
+
radio_group_item = RadioGroupItem.create
|
|
154
|
+
|
|
155
|
+
# Scroll Area
|
|
156
|
+
scroll_area = ScrollArea.create
|
|
157
|
+
|
|
158
|
+
# Select
|
|
159
|
+
select_root = SelectRoot.create
|
|
160
|
+
select_trigger = SelectTrigger.create
|
|
161
|
+
select_content = SelectContent.create
|
|
162
|
+
select_item = SelectItem.create
|
|
163
|
+
select_separator = SelectSeparator.create
|
|
164
|
+
select_group = SelectGroup.create
|
|
165
|
+
select_label = SelectLabel.create
|
|
166
|
+
|
|
167
|
+
# Separator
|
|
168
|
+
separator = Separator.create
|
|
169
|
+
|
|
170
|
+
# Switch
|
|
171
|
+
switch = Switch.create
|
|
172
|
+
|
|
173
|
+
# Table
|
|
174
|
+
table_root = TableRoot.create
|
|
175
|
+
table_header = TableHeader.create
|
|
176
|
+
table_body = TableBody.create
|
|
177
|
+
table_row = TableRow.create
|
|
178
|
+
table_cell = TableCell.create
|
|
179
|
+
table_column_header_cell = TableColumnHeaderCell.create
|
|
180
|
+
table_row_header_cell = TableRowHeaderCell.create
|
|
181
|
+
|
|
182
|
+
# Tabs
|
|
183
|
+
tabs_root = TabsRoot.create
|
|
184
|
+
tabs_list = TabsList.create
|
|
185
|
+
tabs_trigger = TabsTrigger.create
|
|
186
|
+
|
|
187
|
+
# Text Area
|
|
188
|
+
textarea = TextArea.create
|
|
189
|
+
|
|
190
|
+
# Text Field
|
|
191
|
+
textfield_root = TextFieldRoot.create
|
|
192
|
+
textfield_input = TextFieldInput.create
|
|
193
|
+
textfield_slot = TextFieldSlot.create
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"""Interactive components provided by @radix-ui/themes."""
|
|
2
|
+
from typing import Any, Dict, Literal
|
|
3
|
+
|
|
4
|
+
from reflex import el
|
|
5
|
+
from reflex.vars import Var
|
|
6
|
+
|
|
7
|
+
from ..base import (
|
|
8
|
+
CommonMarginProps,
|
|
9
|
+
RadixThemesComponent,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
LiteralSwitchSize = Literal["1", "2", "3", "4"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class AlertDialog(CommonMarginProps, RadixThemesComponent):
|
|
16
|
+
"""A toggle switch alternative to the checkbox."""
|
|
17
|
+
|
|
18
|
+
tag = "AlertDialog.Root"
|
|
19
|
+
|
|
20
|
+
# The controlled open state of the dialog.
|
|
21
|
+
open: Var[bool]
|
|
22
|
+
|
|
23
|
+
def get_event_triggers(self) -> Dict[str, Any]:
|
|
24
|
+
"""Get the events triggers signatures for the component.
|
|
25
|
+
|
|
26
|
+
Returns:
|
|
27
|
+
The signatures of the event triggers.
|
|
28
|
+
"""
|
|
29
|
+
return {
|
|
30
|
+
**super().get_event_triggers(),
|
|
31
|
+
"on_open_change": lambda e0: [e0],
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class AlertDialogTrigger(CommonMarginProps, RadixThemesComponent):
|
|
36
|
+
"""A toggle switch alternative to the checkbox."""
|
|
37
|
+
|
|
38
|
+
tag = "AlertDialog.Trigger"
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class AlertDialogContent(el.Div, CommonMarginProps, RadixThemesComponent):
|
|
42
|
+
"""A toggle switch alternative to the checkbox."""
|
|
43
|
+
|
|
44
|
+
tag = "AlertDialog.Content"
|
|
45
|
+
|
|
46
|
+
# Whether to force mount the content on open.
|
|
47
|
+
force_mount: Var[bool]
|
|
48
|
+
|
|
49
|
+
def get_event_triggers(self) -> Dict[str, Any]:
|
|
50
|
+
"""Get the events triggers signatures for the component.
|
|
51
|
+
|
|
52
|
+
Returns:
|
|
53
|
+
The signatures of the event triggers.
|
|
54
|
+
"""
|
|
55
|
+
return {
|
|
56
|
+
**super().get_event_triggers(),
|
|
57
|
+
"on_open_auto_focus": lambda e0: [e0],
|
|
58
|
+
"on_close_auto_focus": lambda e0: [e0],
|
|
59
|
+
"on_escape_key_down": lambda e0: [e0],
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class AlertDialogTitle(CommonMarginProps, RadixThemesComponent):
|
|
64
|
+
"""A toggle switch alternative to the checkbox."""
|
|
65
|
+
|
|
66
|
+
tag = "AlertDialog.Title"
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class AlertDialogDescription(CommonMarginProps, RadixThemesComponent):
|
|
70
|
+
"""A toggle switch alternative to the checkbox."""
|
|
71
|
+
|
|
72
|
+
tag = "AlertDialog.Description"
|