reflex 0.7.1a4__py3-none-any.whl → 0.7.2a1__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/utils/context.js.jinja2 +8 -8
- reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +3 -3
- reflex/admin.py +1 -2
- reflex/app.py +46 -49
- reflex/app_mixins/lifespan.py +2 -2
- reflex/app_mixins/middleware.py +1 -2
- reflex/assets.py +1 -2
- reflex/base.py +2 -2
- reflex/compiler/compiler.py +51 -16
- reflex/compiler/utils.py +4 -13
- reflex/components/base/app_wrap.pyi +7 -7
- reflex/components/base/bare.py +3 -3
- reflex/components/base/body.pyi +7 -7
- reflex/components/base/document.py +1 -3
- reflex/components/base/document.pyi +32 -32
- reflex/components/base/error_boundary.py +2 -4
- reflex/components/base/error_boundary.pyi +11 -13
- reflex/components/base/fragment.pyi +7 -7
- reflex/components/base/head.pyi +13 -13
- reflex/components/base/link.pyi +22 -22
- reflex/components/base/meta.py +5 -7
- reflex/components/base/meta.pyi +40 -40
- reflex/components/base/script.pyi +11 -14
- reflex/components/base/strict_mode.pyi +7 -7
- reflex/components/component.py +188 -113
- reflex/components/core/auto_scroll.py +8 -1
- reflex/components/core/auto_scroll.pyi +183 -210
- reflex/components/core/banner.py +2 -4
- reflex/components/core/banner.pyi +390 -444
- reflex/components/core/breakpoints.py +5 -5
- reflex/components/core/client_side_routing.pyi +14 -14
- reflex/components/core/clipboard.py +4 -4
- reflex/components/core/clipboard.pyi +12 -14
- reflex/components/core/cond.py +17 -25
- reflex/components/core/debounce.py +3 -3
- reflex/components/core/debounce.pyi +14 -14
- reflex/components/core/foreach.py +7 -2
- reflex/components/core/html.py +1 -3
- reflex/components/core/html.pyi +184 -213
- reflex/components/core/match.py +15 -19
- reflex/components/core/sticky.pyi +930 -1078
- reflex/components/core/upload.py +4 -4
- reflex/components/core/upload.pyi +62 -62
- reflex/components/datadisplay/code.py +6 -6
- reflex/components/datadisplay/code.pyi +1159 -1165
- reflex/components/datadisplay/dataeditor.py +49 -49
- reflex/components/datadisplay/dataeditor.pyi +95 -123
- reflex/components/datadisplay/logo.py +1 -3
- reflex/components/datadisplay/shiki_code_block.py +8 -10
- reflex/components/datadisplay/shiki_code_block.pyi +1678 -1720
- reflex/components/el/element.pyi +7 -7
- reflex/components/el/elements/base.pyi +183 -210
- reflex/components/el/elements/forms.py +23 -23
- reflex/components/el/elements/forms.pyi +2571 -2933
- reflex/components/el/elements/inline.py +4 -4
- reflex/components/el/elements/inline.pyi +5191 -5953
- reflex/components/el/elements/media.py +47 -47
- reflex/components/el/elements/media.pyi +4802 -5500
- reflex/components/el/elements/metadata.py +1 -3
- reflex/components/el/elements/metadata.pyi +782 -896
- reflex/components/el/elements/other.pyi +1278 -1467
- reflex/components/el/elements/scripts.pyi +580 -667
- reflex/components/el/elements/sectioning.pyi +2761 -3166
- reflex/components/el/elements/tables.pyi +1840 -2119
- reflex/components/el/elements/typography.pyi +2772 -3179
- reflex/components/gridjs/datatable.py +7 -7
- reflex/components/gridjs/datatable.pyi +19 -19
- reflex/components/lucide/icon.pyi +21 -21
- reflex/components/markdown/markdown.py +2 -2
- reflex/components/markdown/markdown.pyi +9 -9
- reflex/components/moment/moment.py +11 -12
- reflex/components/moment/moment.pyi +44 -47
- reflex/components/next/base.pyi +7 -7
- reflex/components/next/image.py +3 -3
- reflex/components/next/image.pyi +19 -21
- reflex/components/next/link.pyi +9 -9
- reflex/components/next/video.py +1 -3
- reflex/components/next/video.pyi +9 -9
- reflex/components/plotly/plotly.py +22 -45
- reflex/components/plotly/plotly.pyi +164 -164
- reflex/components/radix/primitives/accordion.py +14 -14
- reflex/components/radix/primitives/accordion.pyi +439 -487
- reflex/components/radix/primitives/base.py +1 -3
- reflex/components/radix/primitives/base.pyi +15 -15
- reflex/components/radix/primitives/drawer.py +3 -3
- reflex/components/radix/primitives/drawer.pyi +110 -116
- reflex/components/radix/primitives/form.py +1 -1
- reflex/components/radix/primitives/form.pyi +668 -752
- reflex/components/radix/primitives/progress.py +6 -6
- reflex/components/radix/primitives/progress.pyi +225 -243
- reflex/components/radix/primitives/slider.py +6 -6
- reflex/components/radix/primitives/slider.pyi +52 -55
- reflex/components/radix/themes/base.py +3 -6
- reflex/components/radix/themes/base.pyi +197 -303
- reflex/components/radix/themes/color_mode.py +5 -5
- reflex/components/radix/themes/color_mode.pyi +366 -436
- reflex/components/radix/themes/components/alert_dialog.pyi +229 -262
- reflex/components/radix/themes/components/aspect_ratio.py +1 -3
- reflex/components/radix/themes/components/aspect_ratio.pyi +8 -8
- reflex/components/radix/themes/components/avatar.pyi +79 -94
- reflex/components/radix/themes/components/badge.pyi +252 -295
- reflex/components/radix/themes/components/button.pyi +269 -314
- reflex/components/radix/themes/components/callout.py +2 -2
- reflex/components/radix/themes/components/callout.pyi +1116 -1290
- reflex/components/radix/themes/components/card.pyi +194 -229
- reflex/components/radix/themes/components/checkbox.pyi +243 -278
- reflex/components/radix/themes/components/checkbox_cards.py +3 -7
- reflex/components/radix/themes/components/checkbox_cards.pyi +101 -135
- reflex/components/radix/themes/components/checkbox_group.py +2 -2
- reflex/components/radix/themes/components/checkbox_group.pyi +83 -96
- reflex/components/radix/themes/components/context_menu.py +18 -15
- reflex/components/radix/themes/components/context_menu.pyi +408 -458
- reflex/components/radix/themes/components/data_list.pyi +122 -147
- reflex/components/radix/themes/components/dialog.pyi +231 -264
- reflex/components/radix/themes/components/dropdown_menu.py +16 -13
- reflex/components/radix/themes/components/dropdown_menu.pyi +223 -246
- reflex/components/radix/themes/components/hover_card.py +2 -2
- reflex/components/radix/themes/components/hover_card.pyi +237 -282
- reflex/components/radix/themes/components/icon_button.pyi +269 -314
- reflex/components/radix/themes/components/inset.py +8 -8
- reflex/components/radix/themes/components/inset.pyi +232 -292
- reflex/components/radix/themes/components/popover.py +2 -2
- reflex/components/radix/themes/components/popover.pyi +229 -271
- reflex/components/radix/themes/components/progress.pyi +80 -96
- reflex/components/radix/themes/components/radio.pyi +73 -86
- reflex/components/radix/themes/components/radio_cards.py +4 -8
- reflex/components/radix/themes/components/radio_cards.pyi +117 -154
- reflex/components/radix/themes/components/radio_group.py +3 -3
- reflex/components/radix/themes/components/radio_group.pyi +250 -291
- reflex/components/radix/themes/components/scroll_area.pyi +14 -20
- reflex/components/radix/themes/components/segmented_control.py +6 -6
- reflex/components/radix/themes/components/segmented_control.pyi +89 -108
- reflex/components/radix/themes/components/select.py +7 -7
- reflex/components/radix/themes/components/select.pyi +376 -444
- reflex/components/radix/themes/components/separator.pyi +79 -93
- reflex/components/radix/themes/components/skeleton.pyi +32 -26
- reflex/components/radix/themes/components/slider.py +8 -8
- reflex/components/radix/themes/components/slider.pyi +99 -122
- reflex/components/radix/themes/components/spinner.pyi +12 -19
- reflex/components/radix/themes/components/switch.pyi +84 -99
- reflex/components/radix/themes/components/table.py +9 -9
- reflex/components/radix/themes/components/table.pyi +1440 -1794
- reflex/components/radix/themes/components/tabs.py +4 -4
- reflex/components/radix/themes/components/tabs.pyi +120 -132
- reflex/components/radix/themes/components/text_area.pyi +281 -331
- reflex/components/radix/themes/components/text_field.py +2 -2
- reflex/components/radix/themes/components/text_field.pyi +639 -734
- reflex/components/radix/themes/components/tooltip.py +6 -6
- reflex/components/radix/themes/components/tooltip.pyi +34 -43
- reflex/components/radix/themes/layout/base.pyi +85 -182
- reflex/components/radix/themes/layout/box.pyi +183 -210
- reflex/components/radix/themes/layout/center.pyi +225 -286
- reflex/components/radix/themes/layout/container.pyi +191 -224
- reflex/components/radix/themes/layout/flex.py +2 -2
- reflex/components/radix/themes/layout/flex.pyi +225 -286
- reflex/components/radix/themes/layout/grid.py +2 -2
- reflex/components/radix/themes/layout/grid.pyi +245 -315
- reflex/components/radix/themes/layout/list.py +2 -2
- reflex/components/radix/themes/layout/list.pyi +712 -815
- reflex/components/radix/themes/layout/section.pyi +187 -221
- reflex/components/radix/themes/layout/spacer.pyi +225 -286
- reflex/components/radix/themes/layout/stack.pyi +625 -768
- reflex/components/radix/themes/typography/blockquote.pyi +257 -299
- reflex/components/radix/themes/typography/code.pyi +259 -304
- reflex/components/radix/themes/typography/heading.pyi +272 -324
- reflex/components/radix/themes/typography/link.pyi +302 -358
- reflex/components/radix/themes/typography/text.pyi +1669 -1945
- reflex/components/react_player/audio.pyi +20 -22
- reflex/components/react_player/react_player.pyi +19 -19
- reflex/components/react_player/video.pyi +20 -22
- reflex/components/recharts/cartesian.py +100 -97
- reflex/components/recharts/cartesian.pyi +891 -1007
- reflex/components/recharts/charts.py +42 -42
- reflex/components/recharts/charts.pyi +212 -249
- reflex/components/recharts/general.py +22 -21
- reflex/components/recharts/general.pyi +198 -223
- reflex/components/recharts/polar.py +42 -45
- reflex/components/recharts/polar.pyi +254 -288
- reflex/components/recharts/recharts.pyi +13 -13
- reflex/components/sonner/toast.py +20 -20
- reflex/components/sonner/toast.pyi +58 -61
- reflex/components/suneditor/editor.py +9 -9
- reflex/components/suneditor/editor.pyi +78 -83
- reflex/components/tags/cond_tag.py +2 -2
- reflex/components/tags/iter_tag.py +10 -14
- reflex/components/tags/match_tag.py +2 -2
- reflex/components/tags/tag.py +10 -10
- reflex/config.py +36 -35
- reflex/constants/__init__.py +56 -53
- reflex/custom_components/custom_components.py +6 -7
- reflex/event.py +38 -42
- reflex/experimental/client_state.py +2 -4
- reflex/experimental/layout.py +2 -2
- reflex/experimental/layout.pyi +579 -663
- reflex/istate/data.py +4 -5
- reflex/middleware/hydrate_middleware.py +2 -2
- reflex/middleware/middleware.py +2 -2
- reflex/model.py +3 -5
- reflex/page.py +2 -2
- reflex/reflex.py +9 -10
- reflex/state.py +77 -49
- reflex/style.py +9 -3
- reflex/testing.py +21 -24
- reflex/utils/console.py +1 -1
- reflex/utils/decorator.py +26 -1
- reflex/utils/exec.py +6 -11
- reflex/utils/export.py +2 -3
- reflex/utils/format.py +4 -4
- reflex/utils/imports.py +12 -12
- reflex/utils/prerequisites.py +35 -84
- reflex/utils/processes.py +5 -5
- reflex/utils/pyi_generator.py +33 -22
- reflex/utils/serializers.py +60 -15
- reflex/utils/types.py +237 -56
- reflex/vars/base.py +122 -72
- reflex/vars/datetime.py +2 -2
- reflex/vars/function.py +52 -55
- reflex/vars/number.py +59 -5
- reflex/vars/object.py +57 -26
- reflex/vars/sequence.py +983 -958
- {reflex-0.7.1a4.dist-info → reflex-0.7.2a1.dist-info}/METADATA +3 -6
- reflex-0.7.2a1.dist-info/RECORD +405 -0
- {reflex-0.7.1a4.dist-info → reflex-0.7.2a1.dist-info}/WHEEL +1 -1
- reflex-0.7.1a4.dist-info/RECORD +0 -405
- {reflex-0.7.1a4.dist-info → reflex-0.7.2a1.dist-info}/LICENSE +0 -0
- {reflex-0.7.1a4.dist-info → reflex-0.7.2a1.dist-info}/entry_points.txt +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# ------------------- DO NOT EDIT ----------------------
|
|
4
4
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
5
|
# ------------------------------------------------------
|
|
6
|
-
from typing import Any,
|
|
6
|
+
from typing import Any, Literal, Optional, overload
|
|
7
7
|
|
|
8
8
|
from reflex.components import Component
|
|
9
9
|
from reflex.components.core.breakpoints import Breakpoints
|
|
@@ -56,54 +56,33 @@ class CommonMarginProps(Component):
|
|
|
56
56
|
def create( # type: ignore
|
|
57
57
|
cls,
|
|
58
58
|
*children,
|
|
59
|
-
m:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
87
|
-
]
|
|
88
|
-
] = None,
|
|
89
|
-
mb: Optional[
|
|
90
|
-
Union[
|
|
91
|
-
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
92
|
-
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
93
|
-
]
|
|
94
|
-
] = None,
|
|
95
|
-
ml: Optional[
|
|
96
|
-
Union[
|
|
97
|
-
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
98
|
-
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
99
|
-
]
|
|
100
|
-
] = None,
|
|
101
|
-
style: Optional[Style] = None,
|
|
102
|
-
key: Optional[Any] = None,
|
|
103
|
-
id: Optional[Any] = None,
|
|
104
|
-
class_name: Optional[Any] = None,
|
|
105
|
-
autofocus: Optional[bool] = None,
|
|
106
|
-
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
59
|
+
m: Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
60
|
+
| Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
61
|
+
| None = None,
|
|
62
|
+
mx: Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
63
|
+
| Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
64
|
+
| None = None,
|
|
65
|
+
my: Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
66
|
+
| Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
67
|
+
| None = None,
|
|
68
|
+
mt: Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
69
|
+
| Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
70
|
+
| None = None,
|
|
71
|
+
mr: Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
72
|
+
| Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
73
|
+
| None = None,
|
|
74
|
+
mb: Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
75
|
+
| Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
76
|
+
| None = None,
|
|
77
|
+
ml: Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
78
|
+
| Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
79
|
+
| None = None,
|
|
80
|
+
style: Style | None = None,
|
|
81
|
+
key: Any | None = None,
|
|
82
|
+
id: Any | None = None,
|
|
83
|
+
class_name: Any | None = None,
|
|
84
|
+
autofocus: bool | None = None,
|
|
85
|
+
custom_attrs: dict[str, Var | Any] | None = None,
|
|
107
86
|
on_blur: Optional[EventType[()]] = None,
|
|
108
87
|
on_click: Optional[EventType[()]] = None,
|
|
109
88
|
on_context_menu: Optional[EventType[()]] = None,
|
|
@@ -151,131 +130,61 @@ class CommonPaddingProps(Component):
|
|
|
151
130
|
def create( # type: ignore
|
|
152
131
|
cls,
|
|
153
132
|
*children,
|
|
154
|
-
p:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
]
|
|
187
|
-
]
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
],
|
|
210
|
-
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
211
|
-
Var[
|
|
212
|
-
Union[
|
|
213
|
-
Breakpoints[
|
|
214
|
-
str,
|
|
215
|
-
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
216
|
-
],
|
|
217
|
-
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
218
|
-
]
|
|
219
|
-
],
|
|
220
|
-
]
|
|
221
|
-
] = None,
|
|
222
|
-
pr: Optional[
|
|
223
|
-
Union[
|
|
224
|
-
Breakpoints[
|
|
225
|
-
str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
226
|
-
],
|
|
227
|
-
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
228
|
-
Var[
|
|
229
|
-
Union[
|
|
230
|
-
Breakpoints[
|
|
231
|
-
str,
|
|
232
|
-
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
233
|
-
],
|
|
234
|
-
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
235
|
-
]
|
|
236
|
-
],
|
|
237
|
-
]
|
|
238
|
-
] = None,
|
|
239
|
-
pb: Optional[
|
|
240
|
-
Union[
|
|
241
|
-
Breakpoints[
|
|
242
|
-
str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
243
|
-
],
|
|
244
|
-
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
245
|
-
Var[
|
|
246
|
-
Union[
|
|
247
|
-
Breakpoints[
|
|
248
|
-
str,
|
|
249
|
-
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
250
|
-
],
|
|
251
|
-
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
252
|
-
]
|
|
253
|
-
],
|
|
254
|
-
]
|
|
255
|
-
] = None,
|
|
256
|
-
pl: Optional[
|
|
257
|
-
Union[
|
|
258
|
-
Breakpoints[
|
|
259
|
-
str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
260
|
-
],
|
|
261
|
-
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
262
|
-
Var[
|
|
263
|
-
Union[
|
|
264
|
-
Breakpoints[
|
|
265
|
-
str,
|
|
266
|
-
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
267
|
-
],
|
|
268
|
-
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
269
|
-
]
|
|
270
|
-
],
|
|
271
|
-
]
|
|
272
|
-
] = None,
|
|
273
|
-
style: Optional[Style] = None,
|
|
274
|
-
key: Optional[Any] = None,
|
|
275
|
-
id: Optional[Any] = None,
|
|
276
|
-
class_name: Optional[Any] = None,
|
|
277
|
-
autofocus: Optional[bool] = None,
|
|
278
|
-
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
133
|
+
p: Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
134
|
+
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
135
|
+
| Var[
|
|
136
|
+
Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
137
|
+
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
138
|
+
]
|
|
139
|
+
| None = None,
|
|
140
|
+
px: Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
141
|
+
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
142
|
+
| Var[
|
|
143
|
+
Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
144
|
+
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
145
|
+
]
|
|
146
|
+
| None = None,
|
|
147
|
+
py: Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
148
|
+
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
149
|
+
| Var[
|
|
150
|
+
Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
151
|
+
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
152
|
+
]
|
|
153
|
+
| None = None,
|
|
154
|
+
pt: Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
155
|
+
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
156
|
+
| Var[
|
|
157
|
+
Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
158
|
+
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
159
|
+
]
|
|
160
|
+
| None = None,
|
|
161
|
+
pr: Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
162
|
+
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
163
|
+
| Var[
|
|
164
|
+
Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
165
|
+
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
166
|
+
]
|
|
167
|
+
| None = None,
|
|
168
|
+
pb: Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
169
|
+
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
170
|
+
| Var[
|
|
171
|
+
Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
172
|
+
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
173
|
+
]
|
|
174
|
+
| None = None,
|
|
175
|
+
pl: Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
176
|
+
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
177
|
+
| Var[
|
|
178
|
+
Breakpoints[str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]]
|
|
179
|
+
| Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
180
|
+
]
|
|
181
|
+
| None = None,
|
|
182
|
+
style: Style | None = None,
|
|
183
|
+
key: Any | None = None,
|
|
184
|
+
id: Any | None = None,
|
|
185
|
+
class_name: Any | None = None,
|
|
186
|
+
autofocus: bool | None = None,
|
|
187
|
+
custom_attrs: dict[str, Var | Any] | None = None,
|
|
279
188
|
on_blur: Optional[EventType[()]] = None,
|
|
280
189
|
on_click: Optional[EventType[()]] = None,
|
|
281
190
|
on_context_menu: Optional[EventType[()]] = None,
|
|
@@ -323,13 +232,13 @@ class RadixLoadingProp(Component):
|
|
|
323
232
|
def create( # type: ignore
|
|
324
233
|
cls,
|
|
325
234
|
*children,
|
|
326
|
-
loading:
|
|
327
|
-
style:
|
|
328
|
-
key:
|
|
329
|
-
id:
|
|
330
|
-
class_name:
|
|
331
|
-
autofocus:
|
|
332
|
-
custom_attrs:
|
|
235
|
+
loading: Var[bool] | bool | None = None,
|
|
236
|
+
style: Style | None = None,
|
|
237
|
+
key: Any | None = None,
|
|
238
|
+
id: Any | None = None,
|
|
239
|
+
class_name: Any | None = None,
|
|
240
|
+
autofocus: bool | None = None,
|
|
241
|
+
custom_attrs: dict[str, Var | Any] | None = None,
|
|
333
242
|
on_blur: Optional[EventType[()]] = None,
|
|
334
243
|
on_click: Optional[EventType[()]] = None,
|
|
335
244
|
on_context_menu: Optional[EventType[()]] = None,
|
|
@@ -371,12 +280,12 @@ class RadixThemesComponent(Component):
|
|
|
371
280
|
def create( # type: ignore
|
|
372
281
|
cls,
|
|
373
282
|
*children,
|
|
374
|
-
style:
|
|
375
|
-
key:
|
|
376
|
-
id:
|
|
377
|
-
class_name:
|
|
378
|
-
autofocus:
|
|
379
|
-
custom_attrs:
|
|
283
|
+
style: Style | None = None,
|
|
284
|
+
key: Any | None = None,
|
|
285
|
+
id: Any | None = None,
|
|
286
|
+
class_name: Any | None = None,
|
|
287
|
+
autofocus: bool | None = None,
|
|
288
|
+
custom_attrs: dict[str, Var | Any] | None = None,
|
|
380
289
|
on_blur: Optional[EventType[()]] = None,
|
|
381
290
|
on_click: Optional[EventType[()]] = None,
|
|
382
291
|
on_context_menu: Optional[EventType[()]] = None,
|
|
@@ -420,12 +329,12 @@ class RadixThemesTriggerComponent(RadixThemesComponent):
|
|
|
420
329
|
def create( # type: ignore
|
|
421
330
|
cls,
|
|
422
331
|
*children,
|
|
423
|
-
style:
|
|
424
|
-
key:
|
|
425
|
-
id:
|
|
426
|
-
class_name:
|
|
427
|
-
autofocus:
|
|
428
|
-
custom_attrs:
|
|
332
|
+
style: Style | None = None,
|
|
333
|
+
key: Any | None = None,
|
|
334
|
+
id: Any | None = None,
|
|
335
|
+
class_name: Any | None = None,
|
|
336
|
+
autofocus: bool | None = None,
|
|
337
|
+
custom_attrs: dict[str, Var | Any] | None = None,
|
|
429
338
|
on_blur: Optional[EventType[()]] = None,
|
|
430
339
|
on_click: Optional[EventType[()]] = None,
|
|
431
340
|
on_context_menu: Optional[EventType[()]] = None,
|
|
@@ -460,104 +369,89 @@ class Theme(RadixThemesComponent):
|
|
|
460
369
|
def create( # type: ignore
|
|
461
370
|
cls,
|
|
462
371
|
*children,
|
|
463
|
-
color_mode:
|
|
464
|
-
theme_panel:
|
|
465
|
-
has_background:
|
|
466
|
-
appearance:
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
"sky",
|
|
526
|
-
"teal",
|
|
527
|
-
"tomato",
|
|
528
|
-
"violet",
|
|
529
|
-
"yellow",
|
|
530
|
-
]
|
|
531
|
-
],
|
|
532
|
-
]
|
|
533
|
-
] = None,
|
|
534
|
-
gray_color: Optional[
|
|
535
|
-
Union[
|
|
536
|
-
Literal["auto", "gray", "mauve", "olive", "sage", "sand", "slate"],
|
|
537
|
-
Var[Literal["auto", "gray", "mauve", "olive", "sage", "sand", "slate"]],
|
|
538
|
-
]
|
|
539
|
-
] = None,
|
|
540
|
-
panel_background: Optional[
|
|
541
|
-
Union[Literal["solid", "translucent"], Var[Literal["solid", "translucent"]]]
|
|
542
|
-
] = None,
|
|
543
|
-
radius: Optional[
|
|
544
|
-
Union[
|
|
545
|
-
Literal["full", "large", "medium", "none", "small"],
|
|
546
|
-
Var[Literal["full", "large", "medium", "none", "small"]],
|
|
547
|
-
]
|
|
548
|
-
] = None,
|
|
549
|
-
scaling: Optional[
|
|
550
|
-
Union[
|
|
551
|
-
Literal["100%", "105%", "110%", "90%", "95%"],
|
|
552
|
-
Var[Literal["100%", "105%", "110%", "90%", "95%"]],
|
|
372
|
+
color_mode: Literal["dark", "inherit", "light"] | None = None,
|
|
373
|
+
theme_panel: bool | None = False,
|
|
374
|
+
has_background: Var[bool] | bool | None = None,
|
|
375
|
+
appearance: Literal["dark", "inherit", "light"]
|
|
376
|
+
| Var[Literal["dark", "inherit", "light"]]
|
|
377
|
+
| None = None,
|
|
378
|
+
accent_color: Literal[
|
|
379
|
+
"amber",
|
|
380
|
+
"blue",
|
|
381
|
+
"bronze",
|
|
382
|
+
"brown",
|
|
383
|
+
"crimson",
|
|
384
|
+
"cyan",
|
|
385
|
+
"gold",
|
|
386
|
+
"grass",
|
|
387
|
+
"gray",
|
|
388
|
+
"green",
|
|
389
|
+
"indigo",
|
|
390
|
+
"iris",
|
|
391
|
+
"jade",
|
|
392
|
+
"lime",
|
|
393
|
+
"mint",
|
|
394
|
+
"orange",
|
|
395
|
+
"pink",
|
|
396
|
+
"plum",
|
|
397
|
+
"purple",
|
|
398
|
+
"red",
|
|
399
|
+
"ruby",
|
|
400
|
+
"sky",
|
|
401
|
+
"teal",
|
|
402
|
+
"tomato",
|
|
403
|
+
"violet",
|
|
404
|
+
"yellow",
|
|
405
|
+
]
|
|
406
|
+
| Var[
|
|
407
|
+
Literal[
|
|
408
|
+
"amber",
|
|
409
|
+
"blue",
|
|
410
|
+
"bronze",
|
|
411
|
+
"brown",
|
|
412
|
+
"crimson",
|
|
413
|
+
"cyan",
|
|
414
|
+
"gold",
|
|
415
|
+
"grass",
|
|
416
|
+
"gray",
|
|
417
|
+
"green",
|
|
418
|
+
"indigo",
|
|
419
|
+
"iris",
|
|
420
|
+
"jade",
|
|
421
|
+
"lime",
|
|
422
|
+
"mint",
|
|
423
|
+
"orange",
|
|
424
|
+
"pink",
|
|
425
|
+
"plum",
|
|
426
|
+
"purple",
|
|
427
|
+
"red",
|
|
428
|
+
"ruby",
|
|
429
|
+
"sky",
|
|
430
|
+
"teal",
|
|
431
|
+
"tomato",
|
|
432
|
+
"violet",
|
|
433
|
+
"yellow",
|
|
553
434
|
]
|
|
554
|
-
]
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
435
|
+
]
|
|
436
|
+
| None = None,
|
|
437
|
+
gray_color: Literal["auto", "gray", "mauve", "olive", "sage", "sand", "slate"]
|
|
438
|
+
| Var[Literal["auto", "gray", "mauve", "olive", "sage", "sand", "slate"]]
|
|
439
|
+
| None = None,
|
|
440
|
+
panel_background: Literal["solid", "translucent"]
|
|
441
|
+
| Var[Literal["solid", "translucent"]]
|
|
442
|
+
| None = None,
|
|
443
|
+
radius: Literal["full", "large", "medium", "none", "small"]
|
|
444
|
+
| Var[Literal["full", "large", "medium", "none", "small"]]
|
|
445
|
+
| None = None,
|
|
446
|
+
scaling: Literal["100%", "105%", "110%", "90%", "95%"]
|
|
447
|
+
| Var[Literal["100%", "105%", "110%", "90%", "95%"]]
|
|
448
|
+
| None = None,
|
|
449
|
+
style: Style | None = None,
|
|
450
|
+
key: Any | None = None,
|
|
451
|
+
id: Any | None = None,
|
|
452
|
+
class_name: Any | None = None,
|
|
453
|
+
autofocus: bool | None = None,
|
|
454
|
+
custom_attrs: dict[str, Var | Any] | None = None,
|
|
561
455
|
on_blur: Optional[EventType[()]] = None,
|
|
562
456
|
on_click: Optional[EventType[()]] = None,
|
|
563
457
|
on_context_menu: Optional[EventType[()]] = None,
|
|
@@ -610,13 +504,13 @@ class ThemePanel(RadixThemesComponent):
|
|
|
610
504
|
def create( # type: ignore
|
|
611
505
|
cls,
|
|
612
506
|
*children,
|
|
613
|
-
default_open:
|
|
614
|
-
style:
|
|
615
|
-
key:
|
|
616
|
-
id:
|
|
617
|
-
class_name:
|
|
618
|
-
autofocus:
|
|
619
|
-
custom_attrs:
|
|
507
|
+
default_open: Var[bool] | bool | None = None,
|
|
508
|
+
style: Style | None = None,
|
|
509
|
+
key: Any | None = None,
|
|
510
|
+
id: Any | None = None,
|
|
511
|
+
class_name: Any | None = None,
|
|
512
|
+
autofocus: bool | None = None,
|
|
513
|
+
custom_attrs: dict[str, Var | Any] | None = None,
|
|
620
514
|
on_blur: Optional[EventType[()]] = None,
|
|
621
515
|
on_click: Optional[EventType[()]] = None,
|
|
622
516
|
on_context_menu: Optional[EventType[()]] = None,
|
|
@@ -661,12 +555,12 @@ class RadixThemesColorModeProvider(Component):
|
|
|
661
555
|
def create( # type: ignore
|
|
662
556
|
cls,
|
|
663
557
|
*children,
|
|
664
|
-
style:
|
|
665
|
-
key:
|
|
666
|
-
id:
|
|
667
|
-
class_name:
|
|
668
|
-
autofocus:
|
|
669
|
-
custom_attrs:
|
|
558
|
+
style: Style | None = None,
|
|
559
|
+
key: Any | None = None,
|
|
560
|
+
id: Any | None = None,
|
|
561
|
+
class_name: Any | None = None,
|
|
562
|
+
autofocus: bool | None = None,
|
|
563
|
+
custom_attrs: dict[str, Var | Any] | None = None,
|
|
670
564
|
on_blur: Optional[EventType[()]] = None,
|
|
671
565
|
on_click: Optional[EventType[()]] = None,
|
|
672
566
|
on_context_menu: Optional[EventType[()]] = None,
|
|
@@ -17,7 +17,7 @@ rx.text(
|
|
|
17
17
|
|
|
18
18
|
from __future__ import annotations
|
|
19
19
|
|
|
20
|
-
from typing import Any,
|
|
20
|
+
from typing import Any, Literal, get_args
|
|
21
21
|
|
|
22
22
|
from reflex.components.component import BaseComponent
|
|
23
23
|
from reflex.components.core.cond import Cond, color_mode_cond, cond
|
|
@@ -66,9 +66,9 @@ class ColorModeIcon(Cond):
|
|
|
66
66
|
|
|
67
67
|
LiteralPosition = Literal["top-left", "top-right", "bottom-left", "bottom-right"]
|
|
68
68
|
|
|
69
|
-
position_values:
|
|
69
|
+
position_values: list[str] = list(get_args(LiteralPosition))
|
|
70
70
|
|
|
71
|
-
position_map:
|
|
71
|
+
position_map: dict[str, list[str]] = {
|
|
72
72
|
"position": position_values,
|
|
73
73
|
"left": ["top-left", "bottom-left"],
|
|
74
74
|
"right": ["top-right", "bottom-right"],
|
|
@@ -78,7 +78,7 @@ position_map: Dict[str, List[str]] = {
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
# needed to inverse contains for find
|
|
81
|
-
def _find(const:
|
|
81
|
+
def _find(const: list[str], var: Any):
|
|
82
82
|
return LiteralArrayVar.create(const).contains(var)
|
|
83
83
|
|
|
84
84
|
|
|
@@ -99,7 +99,7 @@ class ColorModeIconButton(IconButton):
|
|
|
99
99
|
"""Icon Button for toggling light / dark mode via toggle_color_mode."""
|
|
100
100
|
|
|
101
101
|
# The position of the icon button. Follow document flow if None.
|
|
102
|
-
position:
|
|
102
|
+
position: LiteralPosition | Var[LiteralPosition] | None = None
|
|
103
103
|
|
|
104
104
|
# Allow picking the "system" value for the color mode.
|
|
105
105
|
allow_system: bool = False
|