reflex 0.3.8a1__py3-none-any.whl → 0.3.9__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/apps/sidebar/code/sidebar.py +6 -1
- reflex/.templates/jinja/web/pages/utils.js.jinja2 +1 -1
- reflex/__init__.py +2 -0
- reflex/__init__.pyi +3 -0
- reflex/app.py +22 -7
- reflex/components/chakra/__init__.py +1 -0
- reflex/components/chakra/forms/__init__.py +1 -0
- reflex/components/chakra/forms/time_picker.py +11 -0
- reflex/components/chakra/forms/time_picker.pyi +129 -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 +430 -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 +14 -4
- reflex/components/radix/themes/components/alertdialog.py +31 -10
- reflex/components/radix/themes/components/alertdialog.pyi +396 -3
- 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 +94 -5
- reflex/components/radix/themes/components/select.pyi +251 -5
- 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 +21 -4
- reflex/style.py +15 -0
- reflex/testing.py +2 -0
- reflex/utils/format.py +13 -9
- reflex/utils/path_ops.py +2 -2
- reflex/utils/prerequisites.py +61 -4
- reflex/utils/types.py +4 -1
- reflex/vars.py +36 -3
- {reflex-0.3.8a1.dist-info → reflex-0.3.9.dist-info}/METADATA +2 -2
- {reflex-0.3.8a1.dist-info → reflex-0.3.9.dist-info}/RECORD +73 -71
- {reflex-0.3.8a1.dist-info → reflex-0.3.9.dist-info}/WHEEL +1 -1
- {reflex-0.3.8a1.dist-info → reflex-0.3.9.dist-info}/LICENSE +0 -0
- {reflex-0.3.8a1.dist-info → reflex-0.3.9.dist-info}/entry_points.txt +0 -0
|
@@ -10,11 +10,11 @@ from reflex.style import Style
|
|
|
10
10
|
from typing import Any, Dict, Literal
|
|
11
11
|
from reflex import el
|
|
12
12
|
from reflex.vars import Var
|
|
13
|
-
from ..base import CommonMarginProps, RadixThemesComponent
|
|
13
|
+
from ..base import CommonMarginProps, LiteralSize, RadixThemesComponent
|
|
14
14
|
|
|
15
15
|
LiteralSwitchSize = Literal["1", "2", "3", "4"]
|
|
16
16
|
|
|
17
|
-
class
|
|
17
|
+
class AlertDialogRoot(CommonMarginProps, RadixThemesComponent):
|
|
18
18
|
def get_event_triggers(self) -> Dict[str, Any]: ...
|
|
19
19
|
@overload
|
|
20
20
|
@classmethod
|
|
@@ -182,7 +182,7 @@ class AlertDialog(CommonMarginProps, RadixThemesComponent):
|
|
|
182
182
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
183
183
|
] = None,
|
|
184
184
|
**props
|
|
185
|
-
) -> "
|
|
185
|
+
) -> "AlertDialogRoot":
|
|
186
186
|
"""Create a new component instance.
|
|
187
187
|
|
|
188
188
|
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
@@ -476,6 +476,12 @@ class AlertDialogContent(el.Div, CommonMarginProps, RadixThemesComponent):
|
|
|
476
476
|
],
|
|
477
477
|
]
|
|
478
478
|
] = None,
|
|
479
|
+
size: Optional[
|
|
480
|
+
Union[
|
|
481
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
482
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
483
|
+
]
|
|
484
|
+
] = None,
|
|
479
485
|
force_mount: Optional[Union[Var[bool], bool]] = None,
|
|
480
486
|
access_key: Optional[
|
|
481
487
|
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
@@ -633,6 +639,7 @@ class AlertDialogContent(el.Div, CommonMarginProps, RadixThemesComponent):
|
|
|
633
639
|
*children: Child components.
|
|
634
640
|
color: map to CSS default color property.
|
|
635
641
|
color_scheme: map to radix color property.
|
|
642
|
+
size: The size of the content.
|
|
636
643
|
force_mount: Whether to force mount the content on open.
|
|
637
644
|
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
638
645
|
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
@@ -1056,3 +1063,389 @@ class AlertDialogDescription(CommonMarginProps, RadixThemesComponent):
|
|
|
1056
1063
|
A new component instance.
|
|
1057
1064
|
"""
|
|
1058
1065
|
...
|
|
1066
|
+
|
|
1067
|
+
class AlertDialogAction(CommonMarginProps, RadixThemesComponent):
|
|
1068
|
+
@overload
|
|
1069
|
+
@classmethod
|
|
1070
|
+
def create( # type: ignore
|
|
1071
|
+
cls,
|
|
1072
|
+
*children,
|
|
1073
|
+
color: Optional[Union[Var[str], str]] = None,
|
|
1074
|
+
color_scheme: Optional[
|
|
1075
|
+
Union[
|
|
1076
|
+
Var[
|
|
1077
|
+
Literal[
|
|
1078
|
+
"tomato",
|
|
1079
|
+
"red",
|
|
1080
|
+
"ruby",
|
|
1081
|
+
"crimson",
|
|
1082
|
+
"pink",
|
|
1083
|
+
"plum",
|
|
1084
|
+
"purple",
|
|
1085
|
+
"violet",
|
|
1086
|
+
"iris",
|
|
1087
|
+
"indigo",
|
|
1088
|
+
"blue",
|
|
1089
|
+
"cyan",
|
|
1090
|
+
"teal",
|
|
1091
|
+
"jade",
|
|
1092
|
+
"green",
|
|
1093
|
+
"grass",
|
|
1094
|
+
"brown",
|
|
1095
|
+
"orange",
|
|
1096
|
+
"sky",
|
|
1097
|
+
"mint",
|
|
1098
|
+
"lime",
|
|
1099
|
+
"yellow",
|
|
1100
|
+
"amber",
|
|
1101
|
+
"gold",
|
|
1102
|
+
"bronze",
|
|
1103
|
+
"gray",
|
|
1104
|
+
]
|
|
1105
|
+
],
|
|
1106
|
+
Literal[
|
|
1107
|
+
"tomato",
|
|
1108
|
+
"red",
|
|
1109
|
+
"ruby",
|
|
1110
|
+
"crimson",
|
|
1111
|
+
"pink",
|
|
1112
|
+
"plum",
|
|
1113
|
+
"purple",
|
|
1114
|
+
"violet",
|
|
1115
|
+
"iris",
|
|
1116
|
+
"indigo",
|
|
1117
|
+
"blue",
|
|
1118
|
+
"cyan",
|
|
1119
|
+
"teal",
|
|
1120
|
+
"jade",
|
|
1121
|
+
"green",
|
|
1122
|
+
"grass",
|
|
1123
|
+
"brown",
|
|
1124
|
+
"orange",
|
|
1125
|
+
"sky",
|
|
1126
|
+
"mint",
|
|
1127
|
+
"lime",
|
|
1128
|
+
"yellow",
|
|
1129
|
+
"amber",
|
|
1130
|
+
"gold",
|
|
1131
|
+
"bronze",
|
|
1132
|
+
"gray",
|
|
1133
|
+
],
|
|
1134
|
+
]
|
|
1135
|
+
] = None,
|
|
1136
|
+
m: Optional[
|
|
1137
|
+
Union[
|
|
1138
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
1139
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
1140
|
+
]
|
|
1141
|
+
] = None,
|
|
1142
|
+
mx: Optional[
|
|
1143
|
+
Union[
|
|
1144
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
1145
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
1146
|
+
]
|
|
1147
|
+
] = None,
|
|
1148
|
+
my: Optional[
|
|
1149
|
+
Union[
|
|
1150
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
1151
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
1152
|
+
]
|
|
1153
|
+
] = None,
|
|
1154
|
+
mt: Optional[
|
|
1155
|
+
Union[
|
|
1156
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
1157
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
1158
|
+
]
|
|
1159
|
+
] = None,
|
|
1160
|
+
mr: Optional[
|
|
1161
|
+
Union[
|
|
1162
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
1163
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
1164
|
+
]
|
|
1165
|
+
] = None,
|
|
1166
|
+
mb: Optional[
|
|
1167
|
+
Union[
|
|
1168
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
1169
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
1170
|
+
]
|
|
1171
|
+
] = None,
|
|
1172
|
+
ml: Optional[
|
|
1173
|
+
Union[
|
|
1174
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
1175
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
1176
|
+
]
|
|
1177
|
+
] = None,
|
|
1178
|
+
style: Optional[Style] = None,
|
|
1179
|
+
key: Optional[Any] = None,
|
|
1180
|
+
id: Optional[Any] = None,
|
|
1181
|
+
class_name: Optional[Any] = None,
|
|
1182
|
+
autofocus: Optional[bool] = None,
|
|
1183
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
1184
|
+
on_blur: Optional[
|
|
1185
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1186
|
+
] = None,
|
|
1187
|
+
on_click: Optional[
|
|
1188
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1189
|
+
] = None,
|
|
1190
|
+
on_context_menu: Optional[
|
|
1191
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1192
|
+
] = None,
|
|
1193
|
+
on_double_click: Optional[
|
|
1194
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1195
|
+
] = None,
|
|
1196
|
+
on_focus: Optional[
|
|
1197
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1198
|
+
] = None,
|
|
1199
|
+
on_mount: Optional[
|
|
1200
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1201
|
+
] = None,
|
|
1202
|
+
on_mouse_down: Optional[
|
|
1203
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1204
|
+
] = None,
|
|
1205
|
+
on_mouse_enter: Optional[
|
|
1206
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1207
|
+
] = None,
|
|
1208
|
+
on_mouse_leave: Optional[
|
|
1209
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1210
|
+
] = None,
|
|
1211
|
+
on_mouse_move: Optional[
|
|
1212
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1213
|
+
] = None,
|
|
1214
|
+
on_mouse_out: Optional[
|
|
1215
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1216
|
+
] = None,
|
|
1217
|
+
on_mouse_over: Optional[
|
|
1218
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1219
|
+
] = None,
|
|
1220
|
+
on_mouse_up: Optional[
|
|
1221
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1222
|
+
] = None,
|
|
1223
|
+
on_scroll: Optional[
|
|
1224
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1225
|
+
] = None,
|
|
1226
|
+
on_unmount: Optional[
|
|
1227
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1228
|
+
] = None,
|
|
1229
|
+
**props
|
|
1230
|
+
) -> "AlertDialogAction":
|
|
1231
|
+
"""Create a new component instance.
|
|
1232
|
+
|
|
1233
|
+
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
1234
|
+
other UI libraries for common names, like Text and Button.
|
|
1235
|
+
|
|
1236
|
+
Args:
|
|
1237
|
+
*children: Child components.
|
|
1238
|
+
color: map to CSS default color property.
|
|
1239
|
+
color_scheme: map to radix color property.
|
|
1240
|
+
m: Margin: "0" - "9"
|
|
1241
|
+
mx: Margin horizontal: "0" - "9"
|
|
1242
|
+
my: Margin vertical: "0" - "9"
|
|
1243
|
+
mt: Margin top: "0" - "9"
|
|
1244
|
+
mr: Margin right: "0" - "9"
|
|
1245
|
+
mb: Margin bottom: "0" - "9"
|
|
1246
|
+
ml: Margin left: "0" - "9"
|
|
1247
|
+
style: The style of the component.
|
|
1248
|
+
key: A unique key for the component.
|
|
1249
|
+
id: The id for the component.
|
|
1250
|
+
class_name: The class name for the component.
|
|
1251
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
1252
|
+
custom_attrs: custom attribute
|
|
1253
|
+
**props: Component properties.
|
|
1254
|
+
|
|
1255
|
+
Returns:
|
|
1256
|
+
A new component instance.
|
|
1257
|
+
"""
|
|
1258
|
+
...
|
|
1259
|
+
|
|
1260
|
+
class AlertDialogCancel(CommonMarginProps, RadixThemesComponent):
|
|
1261
|
+
@overload
|
|
1262
|
+
@classmethod
|
|
1263
|
+
def create( # type: ignore
|
|
1264
|
+
cls,
|
|
1265
|
+
*children,
|
|
1266
|
+
color: Optional[Union[Var[str], str]] = None,
|
|
1267
|
+
color_scheme: Optional[
|
|
1268
|
+
Union[
|
|
1269
|
+
Var[
|
|
1270
|
+
Literal[
|
|
1271
|
+
"tomato",
|
|
1272
|
+
"red",
|
|
1273
|
+
"ruby",
|
|
1274
|
+
"crimson",
|
|
1275
|
+
"pink",
|
|
1276
|
+
"plum",
|
|
1277
|
+
"purple",
|
|
1278
|
+
"violet",
|
|
1279
|
+
"iris",
|
|
1280
|
+
"indigo",
|
|
1281
|
+
"blue",
|
|
1282
|
+
"cyan",
|
|
1283
|
+
"teal",
|
|
1284
|
+
"jade",
|
|
1285
|
+
"green",
|
|
1286
|
+
"grass",
|
|
1287
|
+
"brown",
|
|
1288
|
+
"orange",
|
|
1289
|
+
"sky",
|
|
1290
|
+
"mint",
|
|
1291
|
+
"lime",
|
|
1292
|
+
"yellow",
|
|
1293
|
+
"amber",
|
|
1294
|
+
"gold",
|
|
1295
|
+
"bronze",
|
|
1296
|
+
"gray",
|
|
1297
|
+
]
|
|
1298
|
+
],
|
|
1299
|
+
Literal[
|
|
1300
|
+
"tomato",
|
|
1301
|
+
"red",
|
|
1302
|
+
"ruby",
|
|
1303
|
+
"crimson",
|
|
1304
|
+
"pink",
|
|
1305
|
+
"plum",
|
|
1306
|
+
"purple",
|
|
1307
|
+
"violet",
|
|
1308
|
+
"iris",
|
|
1309
|
+
"indigo",
|
|
1310
|
+
"blue",
|
|
1311
|
+
"cyan",
|
|
1312
|
+
"teal",
|
|
1313
|
+
"jade",
|
|
1314
|
+
"green",
|
|
1315
|
+
"grass",
|
|
1316
|
+
"brown",
|
|
1317
|
+
"orange",
|
|
1318
|
+
"sky",
|
|
1319
|
+
"mint",
|
|
1320
|
+
"lime",
|
|
1321
|
+
"yellow",
|
|
1322
|
+
"amber",
|
|
1323
|
+
"gold",
|
|
1324
|
+
"bronze",
|
|
1325
|
+
"gray",
|
|
1326
|
+
],
|
|
1327
|
+
]
|
|
1328
|
+
] = None,
|
|
1329
|
+
m: Optional[
|
|
1330
|
+
Union[
|
|
1331
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
1332
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
1333
|
+
]
|
|
1334
|
+
] = None,
|
|
1335
|
+
mx: Optional[
|
|
1336
|
+
Union[
|
|
1337
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
1338
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
1339
|
+
]
|
|
1340
|
+
] = None,
|
|
1341
|
+
my: Optional[
|
|
1342
|
+
Union[
|
|
1343
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
1344
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
1345
|
+
]
|
|
1346
|
+
] = None,
|
|
1347
|
+
mt: Optional[
|
|
1348
|
+
Union[
|
|
1349
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
1350
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
1351
|
+
]
|
|
1352
|
+
] = None,
|
|
1353
|
+
mr: Optional[
|
|
1354
|
+
Union[
|
|
1355
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
1356
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
1357
|
+
]
|
|
1358
|
+
] = None,
|
|
1359
|
+
mb: Optional[
|
|
1360
|
+
Union[
|
|
1361
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
1362
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
1363
|
+
]
|
|
1364
|
+
] = None,
|
|
1365
|
+
ml: Optional[
|
|
1366
|
+
Union[
|
|
1367
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
1368
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
1369
|
+
]
|
|
1370
|
+
] = None,
|
|
1371
|
+
style: Optional[Style] = None,
|
|
1372
|
+
key: Optional[Any] = None,
|
|
1373
|
+
id: Optional[Any] = None,
|
|
1374
|
+
class_name: Optional[Any] = None,
|
|
1375
|
+
autofocus: Optional[bool] = None,
|
|
1376
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
1377
|
+
on_blur: Optional[
|
|
1378
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1379
|
+
] = None,
|
|
1380
|
+
on_click: Optional[
|
|
1381
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1382
|
+
] = None,
|
|
1383
|
+
on_context_menu: Optional[
|
|
1384
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1385
|
+
] = None,
|
|
1386
|
+
on_double_click: Optional[
|
|
1387
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1388
|
+
] = None,
|
|
1389
|
+
on_focus: Optional[
|
|
1390
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1391
|
+
] = None,
|
|
1392
|
+
on_mount: Optional[
|
|
1393
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1394
|
+
] = None,
|
|
1395
|
+
on_mouse_down: Optional[
|
|
1396
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1397
|
+
] = None,
|
|
1398
|
+
on_mouse_enter: Optional[
|
|
1399
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1400
|
+
] = None,
|
|
1401
|
+
on_mouse_leave: Optional[
|
|
1402
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1403
|
+
] = None,
|
|
1404
|
+
on_mouse_move: Optional[
|
|
1405
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1406
|
+
] = None,
|
|
1407
|
+
on_mouse_out: Optional[
|
|
1408
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1409
|
+
] = None,
|
|
1410
|
+
on_mouse_over: Optional[
|
|
1411
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1412
|
+
] = None,
|
|
1413
|
+
on_mouse_up: Optional[
|
|
1414
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1415
|
+
] = None,
|
|
1416
|
+
on_scroll: Optional[
|
|
1417
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1418
|
+
] = None,
|
|
1419
|
+
on_unmount: Optional[
|
|
1420
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
1421
|
+
] = None,
|
|
1422
|
+
**props
|
|
1423
|
+
) -> "AlertDialogCancel":
|
|
1424
|
+
"""Create a new component instance.
|
|
1425
|
+
|
|
1426
|
+
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
1427
|
+
other UI libraries for common names, like Text and Button.
|
|
1428
|
+
|
|
1429
|
+
Args:
|
|
1430
|
+
*children: Child components.
|
|
1431
|
+
color: map to CSS default color property.
|
|
1432
|
+
color_scheme: map to radix color property.
|
|
1433
|
+
m: Margin: "0" - "9"
|
|
1434
|
+
mx: Margin horizontal: "0" - "9"
|
|
1435
|
+
my: Margin vertical: "0" - "9"
|
|
1436
|
+
mt: Margin top: "0" - "9"
|
|
1437
|
+
mr: Margin right: "0" - "9"
|
|
1438
|
+
mb: Margin bottom: "0" - "9"
|
|
1439
|
+
ml: Margin left: "0" - "9"
|
|
1440
|
+
style: The style of the component.
|
|
1441
|
+
key: A unique key for the component.
|
|
1442
|
+
id: The id for the component.
|
|
1443
|
+
class_name: The class name for the component.
|
|
1444
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
1445
|
+
custom_attrs: custom attribute
|
|
1446
|
+
**props: Component properties.
|
|
1447
|
+
|
|
1448
|
+
Returns:
|
|
1449
|
+
A new component instance.
|
|
1450
|
+
"""
|
|
1451
|
+
...
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"""Interactive components provided by @radix-ui/themes."""
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Union
|
|
3
3
|
|
|
4
4
|
from reflex.vars import Var
|
|
5
5
|
|
|
@@ -8,11 +8,9 @@ from ..base import (
|
|
|
8
8
|
RadixThemesComponent,
|
|
9
9
|
)
|
|
10
10
|
|
|
11
|
-
LiteralSwitchSize = Literal["1", "2", "3", "4"]
|
|
12
|
-
|
|
13
11
|
|
|
14
12
|
class AspectRatio(CommonMarginProps, RadixThemesComponent):
|
|
15
|
-
"""
|
|
13
|
+
"""Displays content with a desired ratio."""
|
|
16
14
|
|
|
17
15
|
tag = "AspectRatio"
|
|
18
16
|
|
|
@@ -7,12 +7,10 @@ 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
|
|
10
|
+
from typing import Union
|
|
11
11
|
from reflex.vars import Var
|
|
12
12
|
from ..base import CommonMarginProps, RadixThemesComponent
|
|
13
13
|
|
|
14
|
-
LiteralSwitchSize = Literal["1", "2", "3", "4"]
|
|
15
|
-
|
|
16
14
|
class AspectRatio(CommonMarginProps, RadixThemesComponent):
|
|
17
15
|
@overload
|
|
18
16
|
@classmethod
|
|
@@ -11,8 +11,6 @@ from ..base import (
|
|
|
11
11
|
RadixThemesComponent,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
-
LiteralSwitchSize = Literal["1", "2", "3", "4"]
|
|
15
|
-
|
|
16
14
|
|
|
17
15
|
class Avatar(CommonMarginProps, RadixThemesComponent):
|
|
18
16
|
"""A toggle switch alternative to the checkbox."""
|
|
@@ -22,7 +20,7 @@ class Avatar(CommonMarginProps, RadixThemesComponent):
|
|
|
22
20
|
# The variant of the avatar
|
|
23
21
|
variant: Var[Literal["solid", "soft"]]
|
|
24
22
|
|
|
25
|
-
# The size of the avatar
|
|
23
|
+
# The size of the avatar: "1" - "9"
|
|
26
24
|
size: Var[LiteralSize]
|
|
27
25
|
|
|
28
26
|
# Color theme of the avatar
|
|
@@ -33,3 +31,9 @@ class Avatar(CommonMarginProps, RadixThemesComponent):
|
|
|
33
31
|
|
|
34
32
|
# Override theme radius for avatar: "none" | "small" | "medium" | "large" | "full"
|
|
35
33
|
radius: Var[LiteralRadius]
|
|
34
|
+
|
|
35
|
+
# The src of the avatar image
|
|
36
|
+
src: Var[str]
|
|
37
|
+
|
|
38
|
+
# The rendered fallback text
|
|
39
|
+
fallback: Var[str]
|
|
@@ -17,8 +17,6 @@ from ..base import (
|
|
|
17
17
|
RadixThemesComponent,
|
|
18
18
|
)
|
|
19
19
|
|
|
20
|
-
LiteralSwitchSize = Literal["1", "2", "3", "4"]
|
|
21
|
-
|
|
22
20
|
class Avatar(CommonMarginProps, RadixThemesComponent):
|
|
23
21
|
@overload
|
|
24
22
|
@classmethod
|
|
@@ -104,6 +102,8 @@ class Avatar(CommonMarginProps, RadixThemesComponent):
|
|
|
104
102
|
Literal["none", "small", "medium", "large", "full"],
|
|
105
103
|
]
|
|
106
104
|
] = None,
|
|
105
|
+
src: Optional[Union[Var[str], str]] = None,
|
|
106
|
+
fallback: Optional[Union[Var[str], str]] = None,
|
|
107
107
|
m: Optional[
|
|
108
108
|
Union[
|
|
109
109
|
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
@@ -209,9 +209,11 @@ class Avatar(CommonMarginProps, RadixThemesComponent):
|
|
|
209
209
|
color: map to CSS default color property.
|
|
210
210
|
color_scheme: map to radix color property.
|
|
211
211
|
variant: The variant of the avatar
|
|
212
|
-
size: The size of the avatar
|
|
212
|
+
size: The size of the avatar: "1" - "9"
|
|
213
213
|
high_contrast: Whether to render the avatar with higher contrast color against background
|
|
214
214
|
radius: Override theme radius for avatar: "none" | "small" | "medium" | "large" | "full"
|
|
215
|
+
src: The src of the avatar image
|
|
216
|
+
fallback: The rendered fallback text
|
|
215
217
|
m: Margin: "0" - "9"
|
|
216
218
|
mx: Margin horizontal: "0" - "9"
|
|
217
219
|
my: Margin vertical: "0" - "9"
|
|
@@ -11,25 +11,23 @@ from ..base import (
|
|
|
11
11
|
RadixThemesComponent,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
-
LiteralSwitchSize = Literal["1", "2", "3", "4"]
|
|
15
|
-
|
|
16
14
|
|
|
17
15
|
class Badge(el.Span, CommonMarginProps, RadixThemesComponent):
|
|
18
16
|
"""A toggle switch alternative to the checkbox."""
|
|
19
17
|
|
|
20
18
|
tag = "Badge"
|
|
21
19
|
|
|
22
|
-
# The variant of the
|
|
20
|
+
# The variant of the badge
|
|
23
21
|
variant: Var[Literal["solid", "soft", "surface", "outline"]]
|
|
24
22
|
|
|
25
|
-
# The size of the
|
|
23
|
+
# The size of the badge
|
|
26
24
|
size: Var[Literal["1", "2"]]
|
|
27
25
|
|
|
28
|
-
# Color theme of the
|
|
26
|
+
# Color theme of the badge
|
|
29
27
|
color: Var[LiteralAccentColor]
|
|
30
28
|
|
|
31
|
-
# Whether to render the
|
|
29
|
+
# Whether to render the badge with higher contrast color against background
|
|
32
30
|
high_contrast: Var[bool]
|
|
33
31
|
|
|
34
|
-
# Override theme radius for
|
|
32
|
+
# Override theme radius for badge: "none" | "small" | "medium" | "large" | "full"
|
|
35
33
|
radius: Var[LiteralRadius]
|
|
@@ -17,8 +17,6 @@ from ..base import (
|
|
|
17
17
|
RadixThemesComponent,
|
|
18
18
|
)
|
|
19
19
|
|
|
20
|
-
LiteralSwitchSize = Literal["1", "2", "3", "4"]
|
|
21
|
-
|
|
22
20
|
class Badge(el.Span, CommonMarginProps, RadixThemesComponent):
|
|
23
21
|
@overload
|
|
24
22
|
@classmethod
|
|
@@ -249,10 +247,10 @@ class Badge(el.Span, CommonMarginProps, RadixThemesComponent):
|
|
|
249
247
|
*children: Child components.
|
|
250
248
|
color: map to CSS default color property.
|
|
251
249
|
color_scheme: map to radix color property.
|
|
252
|
-
variant: The variant of the
|
|
253
|
-
size: The size of the
|
|
254
|
-
high_contrast: Whether to render the
|
|
255
|
-
radius: Override theme radius for
|
|
250
|
+
variant: The variant of the badge
|
|
251
|
+
size: The size of the badge
|
|
252
|
+
high_contrast: Whether to render the badge with higher contrast color against background
|
|
253
|
+
radius: Override theme radius for badge: "none" | "small" | "medium" | "large" | "full"
|
|
256
254
|
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
257
255
|
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
258
256
|
content_editable: Indicates whether the element's content is editable.
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"""Interactive components provided by @radix-ui/themes."""
|
|
2
|
-
from typing import Literal
|
|
2
|
+
from typing import Literal, Union
|
|
3
3
|
|
|
4
|
+
import reflex as rx
|
|
4
5
|
from reflex import el
|
|
6
|
+
from reflex.components.component import Component
|
|
7
|
+
from reflex.components.radix.themes.components.icons import Icon
|
|
5
8
|
from reflex.vars import Var
|
|
6
9
|
|
|
7
10
|
from ..base import (
|
|
8
11
|
CommonMarginProps,
|
|
9
12
|
LiteralAccentColor,
|
|
10
|
-
LiteralRadius,
|
|
11
13
|
LiteralVariant,
|
|
12
14
|
RadixThemesComponent,
|
|
13
15
|
)
|
|
@@ -33,9 +35,6 @@ class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent):
|
|
|
33
35
|
# Whether to render the button with higher contrast color against background
|
|
34
36
|
high_contrast: Var[bool]
|
|
35
37
|
|
|
36
|
-
# Override theme radius for button: "none" | "small" | "medium" | "large" | "full"
|
|
37
|
-
radius: Var[LiteralRadius]
|
|
38
|
-
|
|
39
38
|
|
|
40
39
|
class CalloutIcon(el.Div, CommonMarginProps, RadixThemesComponent):
|
|
41
40
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
@@ -47,3 +46,35 @@ class CalloutText(el.P, CommonMarginProps, RadixThemesComponent):
|
|
|
47
46
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
48
47
|
|
|
49
48
|
tag = "Callout.Text"
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class Callout(CalloutRoot):
|
|
52
|
+
"""High level wrapper for the Callout component."""
|
|
53
|
+
|
|
54
|
+
# The text of the callout.
|
|
55
|
+
text: Var[str]
|
|
56
|
+
|
|
57
|
+
# The icon of the callout.
|
|
58
|
+
icon: Var[str]
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def create(cls, text: Union[str, Var[str]], **props) -> Component:
|
|
62
|
+
"""Create a callout component.
|
|
63
|
+
|
|
64
|
+
Args:
|
|
65
|
+
text: The text of the callout.
|
|
66
|
+
**props: The properties of the component.
|
|
67
|
+
|
|
68
|
+
Returns:
|
|
69
|
+
The callout component.
|
|
70
|
+
"""
|
|
71
|
+
return CalloutRoot.create(
|
|
72
|
+
CalloutIcon.create(Icon.create(tag=props["icon"]))
|
|
73
|
+
if "icon" in props
|
|
74
|
+
else rx.fragment(),
|
|
75
|
+
CalloutText.create(text),
|
|
76
|
+
**props,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
callout = Callout.create
|