reflex 0.5.10a3__py3-none-any.whl → 0.6.0a1__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/utils.js.jinja2 +4 -4
- reflex/.templates/jinja/web/utils/context.js.jinja2 +1 -1
- reflex/.templates/jinja/web/utils/theme.js.jinja2 +1 -1
- reflex/__init__.py +3 -2
- reflex/__init__.pyi +2 -2
- reflex/app.py +43 -9
- reflex/base.py +3 -2
- reflex/compiler/compiler.py +6 -6
- reflex/compiler/utils.py +5 -3
- reflex/components/base/app_wrap.py +2 -4
- reflex/components/base/app_wrap.pyi +17 -17
- reflex/components/base/bare.py +7 -4
- reflex/components/base/body.pyi +17 -17
- reflex/components/base/document.pyi +81 -81
- reflex/components/base/error_boundary.py +10 -8
- reflex/components/base/error_boundary.pyi +20 -19
- reflex/components/base/fragment.pyi +17 -17
- reflex/components/base/head.pyi +33 -33
- reflex/components/base/link.pyi +34 -33
- reflex/components/base/meta.pyi +65 -65
- reflex/components/base/script.py +2 -1
- reflex/components/base/script.pyi +21 -20
- reflex/components/component.py +116 -145
- reflex/components/core/banner.py +59 -60
- reflex/components/core/banner.pyi +86 -150
- reflex/components/core/client_side_routing.py +2 -1
- reflex/components/core/client_side_routing.pyi +34 -33
- reflex/components/core/clipboard.py +2 -2
- reflex/components/core/clipboard.pyi +19 -18
- reflex/components/core/cond.py +21 -44
- reflex/components/core/debounce.py +6 -8
- reflex/components/core/debounce.pyi +19 -18
- reflex/components/core/foreach.py +5 -14
- reflex/components/core/html.pyi +18 -17
- reflex/components/core/match.py +36 -43
- reflex/components/core/upload.py +32 -25
- reflex/components/core/upload.pyi +84 -73
- reflex/components/datadisplay/code.py +55 -28
- reflex/components/datadisplay/code.pyi +20 -17
- reflex/components/datadisplay/dataeditor.py +17 -11
- reflex/components/datadisplay/dataeditor.pyi +34 -33
- reflex/components/el/__init__.py +0 -1
- reflex/components/el/__init__.pyi +0 -11
- reflex/components/el/element.pyi +17 -17
- reflex/components/el/elements/__init__.py +1 -7
- reflex/components/el/elements/__init__.pyi +1 -15
- reflex/components/el/elements/base.pyi +18 -17
- reflex/components/el/elements/forms.py +24 -31
- reflex/components/el/elements/forms.pyi +237 -236
- reflex/components/el/elements/inline.pyi +450 -449
- reflex/components/el/elements/media.py +0 -21
- reflex/components/el/elements/media.pyi +338 -337
- reflex/components/el/elements/metadata.py +3 -2
- reflex/components/el/elements/metadata.pyi +98 -97
- reflex/components/el/elements/other.pyi +114 -113
- reflex/components/el/elements/scripts.pyi +50 -49
- reflex/components/el/elements/sectioning.pyi +242 -241
- reflex/components/el/elements/tables.pyi +162 -161
- reflex/components/el/elements/typography.pyi +242 -241
- reflex/components/gridjs/datatable.py +13 -14
- reflex/components/gridjs/datatable.pyi +34 -33
- reflex/components/lucide/icon.py +2 -126
- reflex/components/lucide/icon.pyi +34 -142
- reflex/components/markdown/markdown.py +30 -35
- reflex/components/markdown/markdown.pyi +29 -32
- reflex/components/moment/moment.pyi +19 -18
- reflex/components/next/base.pyi +17 -17
- reflex/components/next/image.py +0 -4
- reflex/components/next/image.pyi +20 -19
- reflex/components/next/link.pyi +18 -17
- reflex/components/next/video.pyi +18 -17
- reflex/components/plotly/plotly.py +16 -28
- reflex/components/plotly/plotly.pyi +36 -35
- reflex/components/props.py +21 -10
- reflex/components/radix/__init__.pyi +1 -1
- reflex/components/radix/primitives/__init__.pyi +0 -1
- reflex/components/radix/primitives/accordion.py +7 -8
- reflex/components/radix/primitives/accordion.pyi +117 -116
- reflex/components/radix/primitives/base.pyi +34 -33
- reflex/components/radix/primitives/drawer.pyi +169 -168
- reflex/components/radix/primitives/form.pyi +168 -167
- reflex/components/radix/primitives/progress.pyi +82 -81
- reflex/components/radix/primitives/slider.pyi +84 -83
- reflex/components/radix/themes/base.py +8 -4
- reflex/components/radix/themes/base.pyi +114 -113
- reflex/components/radix/themes/color_mode.py +12 -21
- reflex/components/radix/themes/color_mode.pyi +67 -67
- reflex/components/radix/themes/components/__init__.pyi +1 -0
- reflex/components/radix/themes/components/alert_dialog.pyi +118 -117
- reflex/components/radix/themes/components/aspect_ratio.pyi +18 -17
- reflex/components/radix/themes/components/avatar.pyi +18 -17
- reflex/components/radix/themes/components/badge.pyi +18 -17
- reflex/components/radix/themes/components/button.pyi +18 -17
- reflex/components/radix/themes/components/callout.pyi +82 -81
- reflex/components/radix/themes/components/card.pyi +18 -17
- reflex/components/radix/themes/components/checkbox.py +2 -3
- reflex/components/radix/themes/components/checkbox.pyi +53 -52
- reflex/components/radix/themes/components/checkbox_cards.pyi +34 -33
- reflex/components/radix/themes/components/checkbox_group.pyi +34 -33
- reflex/components/radix/themes/components/context_menu.pyi +140 -139
- reflex/components/radix/themes/components/data_list.py +5 -0
- reflex/components/radix/themes/components/data_list.pyi +71 -65
- reflex/components/radix/themes/components/dialog.pyi +121 -120
- reflex/components/radix/themes/components/dropdown_menu.pyi +142 -141
- reflex/components/radix/themes/components/hover_card.pyi +68 -67
- reflex/components/radix/themes/components/icon_button.py +2 -1
- reflex/components/radix/themes/components/icon_button.pyi +18 -17
- reflex/components/radix/themes/components/inset.pyi +18 -17
- reflex/components/radix/themes/components/popover.pyi +73 -72
- reflex/components/radix/themes/components/progress.pyi +18 -17
- reflex/components/radix/themes/components/radio.pyi +18 -17
- reflex/components/radix/themes/components/radio_cards.pyi +35 -34
- reflex/components/radix/themes/components/radio_group.py +35 -31
- reflex/components/radix/themes/components/radio_group.pyi +73 -66
- reflex/components/radix/themes/components/scroll_area.pyi +18 -17
- reflex/components/radix/themes/components/segmented_control.pyi +35 -34
- reflex/components/radix/themes/components/select.py +2 -1
- reflex/components/radix/themes/components/select.pyi +155 -154
- reflex/components/radix/themes/components/separator.py +2 -3
- reflex/components/radix/themes/components/separator.pyi +18 -17
- reflex/components/radix/themes/components/skeleton.pyi +18 -17
- reflex/components/radix/themes/components/slider.py +2 -1
- reflex/components/radix/themes/components/slider.pyi +20 -19
- reflex/components/radix/themes/components/spinner.pyi +18 -17
- reflex/components/radix/themes/components/switch.pyi +19 -18
- reflex/components/radix/themes/components/table.pyi +114 -113
- reflex/components/radix/themes/components/tabs.pyi +84 -83
- reflex/components/radix/themes/components/text_area.pyi +21 -20
- reflex/components/radix/themes/components/text_field.py +0 -79
- reflex/components/radix/themes/components/text_field.pyi +57 -63
- reflex/components/radix/themes/components/tooltip.pyi +21 -20
- reflex/components/radix/themes/layout/base.pyi +18 -17
- reflex/components/radix/themes/layout/box.pyi +18 -17
- reflex/components/radix/themes/layout/center.pyi +18 -17
- reflex/components/radix/themes/layout/container.py +2 -3
- reflex/components/radix/themes/layout/container.pyi +18 -17
- reflex/components/radix/themes/layout/flex.pyi +18 -17
- reflex/components/radix/themes/layout/grid.pyi +18 -17
- reflex/components/radix/themes/layout/list.py +5 -4
- reflex/components/radix/themes/layout/list.pyi +86 -85
- reflex/components/radix/themes/layout/section.py +2 -3
- reflex/components/radix/themes/layout/section.pyi +18 -17
- reflex/components/radix/themes/layout/spacer.pyi +18 -17
- reflex/components/radix/themes/layout/stack.pyi +50 -49
- reflex/components/radix/themes/typography/blockquote.pyi +18 -17
- reflex/components/radix/themes/typography/code.pyi +18 -17
- reflex/components/radix/themes/typography/heading.pyi +18 -17
- reflex/components/radix/themes/typography/link.pyi +18 -17
- reflex/components/radix/themes/typography/text.pyi +114 -113
- reflex/components/react_player/audio.pyi +34 -33
- reflex/components/react_player/react_player.pyi +34 -33
- reflex/components/react_player/video.pyi +34 -33
- reflex/components/recharts/cartesian.py +23 -19
- reflex/components/recharts/cartesian.pyi +297 -296
- reflex/components/recharts/charts.py +6 -5
- reflex/components/recharts/charts.pyi +179 -178
- reflex/components/recharts/general.py +8 -7
- reflex/components/recharts/general.pyi +82 -81
- reflex/components/recharts/polar.py +14 -13
- reflex/components/recharts/polar.pyi +76 -75
- reflex/components/recharts/recharts.pyi +33 -33
- reflex/components/sonner/toast.py +30 -33
- reflex/components/sonner/toast.pyi +27 -25
- reflex/components/suneditor/editor.py +2 -1
- reflex/components/suneditor/editor.pyi +27 -26
- reflex/components/tags/iter_tag.py +16 -16
- reflex/components/tags/tag.py +8 -10
- reflex/constants/base.py +3 -1
- reflex/constants/event.py +1 -0
- reflex/event.py +89 -79
- reflex/experimental/__init__.py +25 -6
- reflex/experimental/client_state.py +34 -58
- reflex/experimental/hooks.py +13 -18
- reflex/experimental/layout.py +5 -5
- reflex/experimental/layout.pyi +84 -83
- reflex/{experimental/vars → ivars}/__init__.py +0 -1
- reflex/ivars/base.py +2180 -0
- reflex/ivars/function.py +200 -0
- reflex/ivars/number.py +1137 -0
- reflex/ivars/object.py +564 -0
- reflex/ivars/sequence.py +1601 -0
- reflex/model.py +22 -0
- reflex/reflex.py +4 -0
- reflex/state.py +388 -73
- reflex/style.py +52 -34
- reflex/testing.py +8 -3
- reflex/utils/exceptions.py +12 -0
- reflex/utils/exec.py +0 -14
- reflex/utils/format.py +74 -223
- reflex/utils/net.py +43 -0
- reflex/utils/path_ops.py +13 -1
- reflex/utils/prerequisites.py +46 -26
- reflex/utils/pyi_generator.py +5 -4
- reflex/utils/serializers.py +13 -31
- reflex/utils/types.py +44 -9
- reflex/vars.py +127 -2230
- {reflex-0.5.10a3.dist-info → reflex-0.6.0a1.dist-info}/METADATA +4 -6
- reflex-0.6.0a1.dist-info/RECORD +384 -0
- reflex/.templates/apps/demo/.gitignore +0 -4
- reflex/.templates/apps/demo/assets/favicon.ico +0 -0
- reflex/.templates/apps/demo/assets/github.svg +0 -10
- reflex/.templates/apps/demo/assets/icon.svg +0 -37
- reflex/.templates/apps/demo/assets/logo.svg +0 -68
- reflex/.templates/apps/demo/assets/paneleft.svg +0 -13
- reflex/.templates/apps/demo/code/__init__.py +0 -1
- reflex/.templates/apps/demo/code/demo.py +0 -127
- reflex/.templates/apps/demo/code/pages/__init__.py +0 -7
- reflex/.templates/apps/demo/code/pages/chatapp.py +0 -31
- reflex/.templates/apps/demo/code/pages/datatable.py +0 -360
- reflex/.templates/apps/demo/code/pages/forms.py +0 -257
- reflex/.templates/apps/demo/code/pages/graphing.py +0 -253
- reflex/.templates/apps/demo/code/pages/home.py +0 -56
- reflex/.templates/apps/demo/code/sidebar.py +0 -178
- reflex/.templates/apps/demo/code/state.py +0 -22
- reflex/.templates/apps/demo/code/states/form_state.py +0 -40
- reflex/.templates/apps/demo/code/states/pie_state.py +0 -47
- reflex/.templates/apps/demo/code/styles.py +0 -68
- reflex/.templates/apps/demo/code/webui/__init__.py +0 -0
- reflex/.templates/apps/demo/code/webui/components/__init__.py +0 -4
- reflex/.templates/apps/demo/code/webui/components/chat.py +0 -118
- reflex/.templates/apps/demo/code/webui/components/loading_icon.py +0 -19
- reflex/.templates/apps/demo/code/webui/components/modal.py +0 -56
- reflex/.templates/apps/demo/code/webui/components/navbar.py +0 -70
- reflex/.templates/apps/demo/code/webui/components/sidebar.py +0 -66
- reflex/.templates/apps/demo/code/webui/state.py +0 -146
- reflex/.templates/apps/demo/code/webui/styles.py +0 -88
- reflex/experimental/vars/base.py +0 -583
- reflex/experimental/vars/function.py +0 -290
- reflex/experimental/vars/number.py +0 -1458
- reflex/experimental/vars/object.py +0 -804
- reflex/experimental/vars/sequence.py +0 -1764
- reflex/utils/watch.py +0 -96
- reflex/vars.pyi +0 -218
- reflex-0.5.10a3.dist-info/RECORD +0 -413
- {reflex-0.5.10a3.dist-info → reflex-0.6.0a1.dist-info}/LICENSE +0 -0
- {reflex-0.5.10a3.dist-info → reflex-0.6.0a1.dist-info}/WHEEL +0 -0
- {reflex-0.5.10a3.dist-info → reflex-0.6.0a1.dist-info}/entry_points.txt +0 -0
|
@@ -7,6 +7,7 @@ from typing import Any, Dict, List, Union
|
|
|
7
7
|
from reflex.components.component import MemoizationLeaf
|
|
8
8
|
from reflex.constants.colors import Color
|
|
9
9
|
from reflex.event import EventHandler
|
|
10
|
+
from reflex.ivars.base import LiteralVar
|
|
10
11
|
from reflex.vars import Var
|
|
11
12
|
|
|
12
13
|
from .recharts import (
|
|
@@ -139,7 +140,7 @@ class GraphingTooltip(Recharts):
|
|
|
139
140
|
filter_null: Var[bool]
|
|
140
141
|
|
|
141
142
|
# If set false, no cursor will be drawn when tooltip is active.
|
|
142
|
-
cursor: Var[Union[Dict[str, Any], bool]] =
|
|
143
|
+
cursor: Var[Union[Dict[str, Any], bool]] = LiteralVar.create(
|
|
143
144
|
{
|
|
144
145
|
"strokeWidth": 1,
|
|
145
146
|
"fill": Color("gray", 3),
|
|
@@ -150,7 +151,7 @@ class GraphingTooltip(Recharts):
|
|
|
150
151
|
view_box: Var[Dict[str, Any]]
|
|
151
152
|
|
|
152
153
|
# The style of default tooltip content item which is a li element. DEFAULT: {}
|
|
153
|
-
item_style: Var[Dict[str, Any]] =
|
|
154
|
+
item_style: Var[Dict[str, Any]] = LiteralVar.create(
|
|
154
155
|
{
|
|
155
156
|
"color": Color("gray", 12),
|
|
156
157
|
}
|
|
@@ -159,7 +160,7 @@ class GraphingTooltip(Recharts):
|
|
|
159
160
|
# The style of tooltip wrapper which is a dom element. DEFAULT: {}
|
|
160
161
|
wrapper_style: Var[Dict[str, Any]]
|
|
161
162
|
# The style of tooltip content which is a dom element. DEFAULT: {}
|
|
162
|
-
content_style: Var[Dict[str, Any]] =
|
|
163
|
+
content_style: Var[Dict[str, Any]] = LiteralVar.create(
|
|
163
164
|
{
|
|
164
165
|
"background": Color("gray", 1),
|
|
165
166
|
"borderColor": Color("gray", 4),
|
|
@@ -168,10 +169,10 @@ class GraphingTooltip(Recharts):
|
|
|
168
169
|
)
|
|
169
170
|
|
|
170
171
|
# The style of default tooltip label which is a p element. DEFAULT: {}
|
|
171
|
-
label_style: Var[Dict[str, Any]] =
|
|
172
|
+
label_style: Var[Dict[str, Any]] = LiteralVar.create({"color": Color("gray", 11)})
|
|
172
173
|
|
|
173
174
|
# This option allows the tooltip to extend beyond the viewBox of the chart itself. DEFAULT: { x: false, y: false }
|
|
174
|
-
allow_escape_view_box: Var[Dict[str, bool]] =
|
|
175
|
+
allow_escape_view_box: Var[Dict[str, bool]] = LiteralVar.create(
|
|
175
176
|
{"x": False, "y": False}
|
|
176
177
|
)
|
|
177
178
|
|
|
@@ -231,10 +232,10 @@ class LabelList(Recharts):
|
|
|
231
232
|
offset: Var[int]
|
|
232
233
|
|
|
233
234
|
# The fill color of each label
|
|
234
|
-
fill: Var[Union[str, Color]] =
|
|
235
|
+
fill: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 10))
|
|
235
236
|
|
|
236
237
|
# The stroke color of each label
|
|
237
|
-
stroke: Var[Union[str, Color]] =
|
|
238
|
+
stroke: Var[Union[str, Color]] = LiteralVar.create("none")
|
|
238
239
|
|
|
239
240
|
|
|
240
241
|
responsive_container = ResponsiveContainer.create
|
|
@@ -8,8 +8,9 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload
|
|
|
8
8
|
from reflex.components.component import MemoizationLeaf
|
|
9
9
|
from reflex.constants.colors import Color
|
|
10
10
|
from reflex.event import EventHandler, EventSpec
|
|
11
|
+
from reflex.ivars.base import ImmutableVar
|
|
11
12
|
from reflex.style import Style
|
|
12
|
-
from reflex.vars import
|
|
13
|
+
from reflex.vars import Var
|
|
13
14
|
|
|
14
15
|
from .recharts import (
|
|
15
16
|
Recharts,
|
|
@@ -32,51 +33,51 @@ class ResponsiveContainer(Recharts, MemoizationLeaf):
|
|
|
32
33
|
id: Optional[Any] = None,
|
|
33
34
|
class_name: Optional[Any] = None,
|
|
34
35
|
autofocus: Optional[bool] = None,
|
|
35
|
-
custom_attrs: Optional[Dict[str, Union[
|
|
36
|
+
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
|
36
37
|
on_blur: Optional[
|
|
37
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
38
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
38
39
|
] = None,
|
|
39
40
|
on_click: Optional[
|
|
40
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
41
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
41
42
|
] = None,
|
|
42
43
|
on_context_menu: Optional[
|
|
43
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
44
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
44
45
|
] = None,
|
|
45
46
|
on_double_click: Optional[
|
|
46
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
47
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
47
48
|
] = None,
|
|
48
49
|
on_focus: Optional[
|
|
49
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
50
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
50
51
|
] = None,
|
|
51
52
|
on_mount: Optional[
|
|
52
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
53
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
53
54
|
] = None,
|
|
54
55
|
on_mouse_down: Optional[
|
|
55
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
56
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
56
57
|
] = None,
|
|
57
58
|
on_mouse_enter: Optional[
|
|
58
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
59
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
59
60
|
] = None,
|
|
60
61
|
on_mouse_leave: Optional[
|
|
61
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
62
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
62
63
|
] = None,
|
|
63
64
|
on_mouse_move: Optional[
|
|
64
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
65
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
65
66
|
] = None,
|
|
66
67
|
on_mouse_out: Optional[
|
|
67
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
68
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
68
69
|
] = None,
|
|
69
70
|
on_mouse_over: Optional[
|
|
70
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
71
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
71
72
|
] = None,
|
|
72
73
|
on_mouse_up: Optional[
|
|
73
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
74
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
74
75
|
] = None,
|
|
75
76
|
on_scroll: Optional[
|
|
76
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
77
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
77
78
|
] = None,
|
|
78
79
|
on_unmount: Optional[
|
|
79
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
80
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
80
81
|
] = None,
|
|
81
82
|
**props,
|
|
82
83
|
) -> "ResponsiveContainer":
|
|
@@ -168,51 +169,51 @@ class Legend(Recharts):
|
|
|
168
169
|
id: Optional[Any] = None,
|
|
169
170
|
class_name: Optional[Any] = None,
|
|
170
171
|
autofocus: Optional[bool] = None,
|
|
171
|
-
custom_attrs: Optional[Dict[str, Union[
|
|
172
|
+
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
|
172
173
|
on_blur: Optional[
|
|
173
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
174
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
174
175
|
] = None,
|
|
175
176
|
on_click: Optional[
|
|
176
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
177
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
177
178
|
] = None,
|
|
178
179
|
on_context_menu: Optional[
|
|
179
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
180
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
180
181
|
] = None,
|
|
181
182
|
on_double_click: Optional[
|
|
182
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
183
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
183
184
|
] = None,
|
|
184
185
|
on_focus: Optional[
|
|
185
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
186
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
186
187
|
] = None,
|
|
187
188
|
on_mount: Optional[
|
|
188
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
189
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
189
190
|
] = None,
|
|
190
191
|
on_mouse_down: Optional[
|
|
191
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
192
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
192
193
|
] = None,
|
|
193
194
|
on_mouse_enter: Optional[
|
|
194
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
195
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
195
196
|
] = None,
|
|
196
197
|
on_mouse_leave: Optional[
|
|
197
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
198
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
198
199
|
] = None,
|
|
199
200
|
on_mouse_move: Optional[
|
|
200
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
201
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
201
202
|
] = None,
|
|
202
203
|
on_mouse_out: Optional[
|
|
203
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
204
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
204
205
|
] = None,
|
|
205
206
|
on_mouse_over: Optional[
|
|
206
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
207
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
207
208
|
] = None,
|
|
208
209
|
on_mouse_up: Optional[
|
|
209
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
210
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
210
211
|
] = None,
|
|
211
212
|
on_scroll: Optional[
|
|
212
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
213
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
213
214
|
] = None,
|
|
214
215
|
on_unmount: Optional[
|
|
215
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
216
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
216
217
|
] = None,
|
|
217
218
|
**props,
|
|
218
219
|
) -> "Legend":
|
|
@@ -279,51 +280,51 @@ class GraphingTooltip(Recharts):
|
|
|
279
280
|
id: Optional[Any] = None,
|
|
280
281
|
class_name: Optional[Any] = None,
|
|
281
282
|
autofocus: Optional[bool] = None,
|
|
282
|
-
custom_attrs: Optional[Dict[str, Union[
|
|
283
|
+
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
|
283
284
|
on_blur: Optional[
|
|
284
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
285
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
285
286
|
] = None,
|
|
286
287
|
on_click: Optional[
|
|
287
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
288
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
288
289
|
] = None,
|
|
289
290
|
on_context_menu: Optional[
|
|
290
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
291
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
291
292
|
] = None,
|
|
292
293
|
on_double_click: Optional[
|
|
293
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
294
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
294
295
|
] = None,
|
|
295
296
|
on_focus: Optional[
|
|
296
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
297
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
297
298
|
] = None,
|
|
298
299
|
on_mount: Optional[
|
|
299
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
300
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
300
301
|
] = None,
|
|
301
302
|
on_mouse_down: Optional[
|
|
302
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
303
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
303
304
|
] = None,
|
|
304
305
|
on_mouse_enter: Optional[
|
|
305
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
306
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
306
307
|
] = None,
|
|
307
308
|
on_mouse_leave: Optional[
|
|
308
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
309
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
309
310
|
] = None,
|
|
310
311
|
on_mouse_move: Optional[
|
|
311
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
312
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
312
313
|
] = None,
|
|
313
314
|
on_mouse_out: Optional[
|
|
314
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
315
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
315
316
|
] = None,
|
|
316
317
|
on_mouse_over: Optional[
|
|
317
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
318
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
318
319
|
] = None,
|
|
319
320
|
on_mouse_up: Optional[
|
|
320
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
321
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
321
322
|
] = None,
|
|
322
323
|
on_scroll: Optional[
|
|
323
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
324
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
324
325
|
] = None,
|
|
325
326
|
on_unmount: Optional[
|
|
326
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
327
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
327
328
|
] = None,
|
|
328
329
|
**props,
|
|
329
330
|
) -> "GraphingTooltip":
|
|
@@ -420,51 +421,51 @@ class Label(Recharts):
|
|
|
420
421
|
id: Optional[Any] = None,
|
|
421
422
|
class_name: Optional[Any] = None,
|
|
422
423
|
autofocus: Optional[bool] = None,
|
|
423
|
-
custom_attrs: Optional[Dict[str, Union[
|
|
424
|
+
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
|
424
425
|
on_blur: Optional[
|
|
425
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
426
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
426
427
|
] = None,
|
|
427
428
|
on_click: Optional[
|
|
428
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
429
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
429
430
|
] = None,
|
|
430
431
|
on_context_menu: Optional[
|
|
431
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
432
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
432
433
|
] = None,
|
|
433
434
|
on_double_click: Optional[
|
|
434
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
435
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
435
436
|
] = None,
|
|
436
437
|
on_focus: Optional[
|
|
437
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
438
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
438
439
|
] = None,
|
|
439
440
|
on_mount: Optional[
|
|
440
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
441
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
441
442
|
] = None,
|
|
442
443
|
on_mouse_down: Optional[
|
|
443
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
444
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
444
445
|
] = None,
|
|
445
446
|
on_mouse_enter: Optional[
|
|
446
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
447
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
447
448
|
] = None,
|
|
448
449
|
on_mouse_leave: Optional[
|
|
449
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
450
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
450
451
|
] = None,
|
|
451
452
|
on_mouse_move: Optional[
|
|
452
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
453
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
453
454
|
] = None,
|
|
454
455
|
on_mouse_out: Optional[
|
|
455
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
456
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
456
457
|
] = None,
|
|
457
458
|
on_mouse_over: Optional[
|
|
458
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
459
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
459
460
|
] = None,
|
|
460
461
|
on_mouse_up: Optional[
|
|
461
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
462
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
462
463
|
] = None,
|
|
463
464
|
on_scroll: Optional[
|
|
464
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
465
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
465
466
|
] = None,
|
|
466
467
|
on_unmount: Optional[
|
|
467
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
468
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
468
469
|
] = None,
|
|
469
470
|
**props,
|
|
470
471
|
) -> "Label":
|
|
@@ -550,51 +551,51 @@ class LabelList(Recharts):
|
|
|
550
551
|
id: Optional[Any] = None,
|
|
551
552
|
class_name: Optional[Any] = None,
|
|
552
553
|
autofocus: Optional[bool] = None,
|
|
553
|
-
custom_attrs: Optional[Dict[str, Union[
|
|
554
|
+
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
|
554
555
|
on_blur: Optional[
|
|
555
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
556
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
556
557
|
] = None,
|
|
557
558
|
on_click: Optional[
|
|
558
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
559
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
559
560
|
] = None,
|
|
560
561
|
on_context_menu: Optional[
|
|
561
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
562
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
562
563
|
] = None,
|
|
563
564
|
on_double_click: Optional[
|
|
564
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
565
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
565
566
|
] = None,
|
|
566
567
|
on_focus: Optional[
|
|
567
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
568
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
568
569
|
] = None,
|
|
569
570
|
on_mount: Optional[
|
|
570
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
571
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
571
572
|
] = None,
|
|
572
573
|
on_mouse_down: Optional[
|
|
573
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
574
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
574
575
|
] = None,
|
|
575
576
|
on_mouse_enter: Optional[
|
|
576
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
577
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
577
578
|
] = None,
|
|
578
579
|
on_mouse_leave: Optional[
|
|
579
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
580
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
580
581
|
] = None,
|
|
581
582
|
on_mouse_move: Optional[
|
|
582
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
583
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
583
584
|
] = None,
|
|
584
585
|
on_mouse_out: Optional[
|
|
585
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
586
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
586
587
|
] = None,
|
|
587
588
|
on_mouse_over: Optional[
|
|
588
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
589
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
589
590
|
] = None,
|
|
590
591
|
on_mouse_up: Optional[
|
|
591
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
592
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
592
593
|
] = None,
|
|
593
594
|
on_scroll: Optional[
|
|
594
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
595
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
595
596
|
] = None,
|
|
596
597
|
on_unmount: Optional[
|
|
597
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
598
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
598
599
|
] = None,
|
|
599
600
|
**props,
|
|
600
601
|
) -> "LabelList":
|
|
@@ -7,6 +7,7 @@ from typing import Any, Dict, List, Union
|
|
|
7
7
|
from reflex.constants import EventTriggers
|
|
8
8
|
from reflex.constants.colors import Color
|
|
9
9
|
from reflex.event import EventHandler
|
|
10
|
+
from reflex.ivars.base import ImmutableVar, LiteralVar
|
|
10
11
|
from reflex.vars import Var
|
|
11
12
|
|
|
12
13
|
from .recharts import (
|
|
@@ -72,12 +73,12 @@ class Pie(Recharts):
|
|
|
72
73
|
_valid_children: List[str] = ["Cell", "LabelList"]
|
|
73
74
|
|
|
74
75
|
# Stoke color
|
|
75
|
-
stroke: Var[Union[str, Color]] =
|
|
76
|
+
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9))
|
|
76
77
|
|
|
77
78
|
# Fill color
|
|
78
|
-
fill: Var[Union[str, Color]] =
|
|
79
|
+
fill: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 3))
|
|
79
80
|
|
|
80
|
-
def get_event_triggers(self) -> dict[str, Union[
|
|
81
|
+
def get_event_triggers(self) -> dict[str, Union[ImmutableVar, Any]]:
|
|
81
82
|
"""Get the event triggers that pass the component's value to the handler.
|
|
82
83
|
|
|
83
84
|
Returns:
|
|
@@ -110,13 +111,13 @@ class Radar(Recharts):
|
|
|
110
111
|
dot: Var[bool]
|
|
111
112
|
|
|
112
113
|
# Stoke color
|
|
113
|
-
stroke: Var[Union[str, Color]] =
|
|
114
|
+
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9))
|
|
114
115
|
|
|
115
116
|
# Fill color
|
|
116
|
-
fill: Var[str] =
|
|
117
|
+
fill: Var[str] = LiteralVar.create(Color("accent", 3))
|
|
117
118
|
|
|
118
119
|
# opacity
|
|
119
|
-
fill_opacity: Var[float] =
|
|
120
|
+
fill_opacity: Var[float] = LiteralVar.create(0.6)
|
|
120
121
|
|
|
121
122
|
# The type of icon in legend. If set to 'none', no legend item will be rendered.
|
|
122
123
|
legend_type: Var[str]
|
|
@@ -174,7 +175,7 @@ class RadialBar(Recharts):
|
|
|
174
175
|
# Valid children components
|
|
175
176
|
_valid_children: List[str] = ["Cell", "LabelList"]
|
|
176
177
|
|
|
177
|
-
def get_event_triggers(self) -> dict[str, Union[
|
|
178
|
+
def get_event_triggers(self) -> dict[str, Union[ImmutableVar, Any]]:
|
|
178
179
|
"""Get the event triggers that pass the component's value to the handler.
|
|
179
180
|
|
|
180
181
|
Returns:
|
|
@@ -218,7 +219,7 @@ class PolarAngleAxis(Recharts):
|
|
|
218
219
|
axis_line_type: Var[str]
|
|
219
220
|
|
|
220
221
|
# If false set, tick lines will not be drawn. If true set, tick lines will be drawn which have the props calculated internally. If object set, tick lines will be drawn which have the props mergered by the internal calculated props and the option.
|
|
221
|
-
tick_line: Var[Union[bool, Dict[str, Any]]] =
|
|
222
|
+
tick_line: Var[Union[bool, Dict[str, Any]]] = LiteralVar.create(False)
|
|
222
223
|
|
|
223
224
|
# The width or height of tick.
|
|
224
225
|
tick: Var[Union[int, str]]
|
|
@@ -230,7 +231,7 @@ class PolarAngleAxis(Recharts):
|
|
|
230
231
|
orient: Var[str]
|
|
231
232
|
|
|
232
233
|
# The stroke color of axis
|
|
233
|
-
stroke: Var[Union[str, Color]] =
|
|
234
|
+
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 10))
|
|
234
235
|
|
|
235
236
|
# Allow the axis has duplicated categorys or not when the type of axis is "category".
|
|
236
237
|
allow_duplicated_category: Var[bool]
|
|
@@ -292,7 +293,7 @@ class PolarGrid(Recharts):
|
|
|
292
293
|
grid_type: Var[LiteralGridType]
|
|
293
294
|
|
|
294
295
|
# The stroke color of grid
|
|
295
|
-
stroke: Var[Union[str, Color]] =
|
|
296
|
+
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 10))
|
|
296
297
|
|
|
297
298
|
# Valid children components
|
|
298
299
|
_valid_children: List[str] = ["RadarChart", "RadiarBarChart"]
|
|
@@ -342,12 +343,12 @@ class PolarRadiusAxis(Recharts):
|
|
|
342
343
|
_valid_children: List[str] = ["Label"]
|
|
343
344
|
|
|
344
345
|
# The domain of the polar radius axis, specifying the minimum and maximum values.
|
|
345
|
-
domain: Var[List[int]] =
|
|
346
|
+
domain: Var[List[int]] = LiteralVar.create([0, 250])
|
|
346
347
|
|
|
347
348
|
# The stroke color of axis
|
|
348
|
-
stroke: Var[Union[str, Color]] =
|
|
349
|
+
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 10))
|
|
349
350
|
|
|
350
|
-
def get_event_triggers(self) -> dict[str, Union[
|
|
351
|
+
def get_event_triggers(self) -> dict[str, Union[ImmutableVar, Any]]:
|
|
351
352
|
"""Get the event triggers that pass the component's value to the handler.
|
|
352
353
|
|
|
353
354
|
Returns:
|