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,8 +7,9 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|
|
7
7
|
|
|
8
8
|
from reflex.components.component import NoSSRComponent
|
|
9
9
|
from reflex.event import EventHandler, EventSpec
|
|
10
|
+
from reflex.ivars.base import ImmutableVar
|
|
10
11
|
from reflex.style import Style
|
|
11
|
-
from reflex.vars import
|
|
12
|
+
from reflex.vars import Var
|
|
12
13
|
|
|
13
14
|
class ReactPlayer(NoSSRComponent):
|
|
14
15
|
@overload
|
|
@@ -30,99 +31,99 @@ class ReactPlayer(NoSSRComponent):
|
|
|
30
31
|
id: Optional[Any] = None,
|
|
31
32
|
class_name: Optional[Any] = None,
|
|
32
33
|
autofocus: Optional[bool] = None,
|
|
33
|
-
custom_attrs: Optional[Dict[str, Union[
|
|
34
|
+
custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
|
|
34
35
|
on_blur: Optional[
|
|
35
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
36
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
36
37
|
] = None,
|
|
37
38
|
on_buffer: Optional[
|
|
38
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
39
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
39
40
|
] = None,
|
|
40
41
|
on_buffer_end: Optional[
|
|
41
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
42
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
42
43
|
] = None,
|
|
43
44
|
on_click: Optional[
|
|
44
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
45
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
45
46
|
] = None,
|
|
46
47
|
on_click_preview: Optional[
|
|
47
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
48
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
48
49
|
] = None,
|
|
49
50
|
on_context_menu: Optional[
|
|
50
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
51
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
51
52
|
] = None,
|
|
52
53
|
on_disable_pip: Optional[
|
|
53
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
54
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
54
55
|
] = None,
|
|
55
56
|
on_double_click: Optional[
|
|
56
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
57
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
57
58
|
] = None,
|
|
58
59
|
on_duration: Optional[
|
|
59
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
60
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
60
61
|
] = None,
|
|
61
62
|
on_enable_pip: Optional[
|
|
62
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
63
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
63
64
|
] = None,
|
|
64
65
|
on_ended: Optional[
|
|
65
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
66
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
66
67
|
] = None,
|
|
67
68
|
on_error: Optional[
|
|
68
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
69
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
69
70
|
] = None,
|
|
70
71
|
on_focus: Optional[
|
|
71
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
72
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
72
73
|
] = None,
|
|
73
74
|
on_mount: Optional[
|
|
74
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
75
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
75
76
|
] = None,
|
|
76
77
|
on_mouse_down: Optional[
|
|
77
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
78
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
78
79
|
] = None,
|
|
79
80
|
on_mouse_enter: Optional[
|
|
80
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
81
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
81
82
|
] = None,
|
|
82
83
|
on_mouse_leave: Optional[
|
|
83
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
84
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
84
85
|
] = None,
|
|
85
86
|
on_mouse_move: Optional[
|
|
86
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
87
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
87
88
|
] = None,
|
|
88
89
|
on_mouse_out: Optional[
|
|
89
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
90
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
90
91
|
] = None,
|
|
91
92
|
on_mouse_over: Optional[
|
|
92
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
93
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
93
94
|
] = None,
|
|
94
95
|
on_mouse_up: Optional[
|
|
95
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
96
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
96
97
|
] = None,
|
|
97
98
|
on_pause: Optional[
|
|
98
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
99
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
99
100
|
] = None,
|
|
100
101
|
on_play: Optional[
|
|
101
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
102
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
102
103
|
] = None,
|
|
103
104
|
on_playback_quality_change: Optional[
|
|
104
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
105
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
105
106
|
] = None,
|
|
106
107
|
on_playback_rate_change: Optional[
|
|
107
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
108
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
108
109
|
] = None,
|
|
109
110
|
on_progress: Optional[
|
|
110
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
111
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
111
112
|
] = None,
|
|
112
113
|
on_ready: Optional[
|
|
113
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
114
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
114
115
|
] = None,
|
|
115
116
|
on_scroll: Optional[
|
|
116
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
117
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
117
118
|
] = None,
|
|
118
119
|
on_seek: Optional[
|
|
119
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
120
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
120
121
|
] = None,
|
|
121
122
|
on_start: Optional[
|
|
122
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
123
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
123
124
|
] = None,
|
|
124
125
|
on_unmount: Optional[
|
|
125
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
126
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
126
127
|
] = None,
|
|
127
128
|
**props,
|
|
128
129
|
) -> "ReactPlayer":
|
|
@@ -7,8 +7,9 @@ from typing import Any, Callable, Dict, Optional, Union, overload
|
|
|
7
7
|
|
|
8
8
|
from reflex.components.react_player.react_player import ReactPlayer
|
|
9
9
|
from reflex.event import EventHandler, EventSpec
|
|
10
|
+
from reflex.ivars.base import ImmutableVar
|
|
10
11
|
from reflex.style import Style
|
|
11
|
-
from reflex.vars import
|
|
12
|
+
from reflex.vars import Var
|
|
12
13
|
|
|
13
14
|
class Video(ReactPlayer):
|
|
14
15
|
pass
|
|
@@ -32,99 +33,99 @@ class Video(ReactPlayer):
|
|
|
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_buffer: Optional[
|
|
40
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
41
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
41
42
|
] = None,
|
|
42
43
|
on_buffer_end: Optional[
|
|
43
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
44
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
44
45
|
] = None,
|
|
45
46
|
on_click: Optional[
|
|
46
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
47
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
47
48
|
] = None,
|
|
48
49
|
on_click_preview: Optional[
|
|
49
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
50
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
50
51
|
] = None,
|
|
51
52
|
on_context_menu: Optional[
|
|
52
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
53
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
53
54
|
] = None,
|
|
54
55
|
on_disable_pip: Optional[
|
|
55
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
56
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
56
57
|
] = None,
|
|
57
58
|
on_double_click: Optional[
|
|
58
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
59
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
59
60
|
] = None,
|
|
60
61
|
on_duration: Optional[
|
|
61
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
62
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
62
63
|
] = None,
|
|
63
64
|
on_enable_pip: Optional[
|
|
64
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
65
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
65
66
|
] = None,
|
|
66
67
|
on_ended: Optional[
|
|
67
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
68
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
68
69
|
] = None,
|
|
69
70
|
on_error: Optional[
|
|
70
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
71
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
71
72
|
] = None,
|
|
72
73
|
on_focus: Optional[
|
|
73
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
74
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
74
75
|
] = None,
|
|
75
76
|
on_mount: Optional[
|
|
76
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
77
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
77
78
|
] = None,
|
|
78
79
|
on_mouse_down: Optional[
|
|
79
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
80
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
80
81
|
] = None,
|
|
81
82
|
on_mouse_enter: Optional[
|
|
82
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
83
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
83
84
|
] = None,
|
|
84
85
|
on_mouse_leave: Optional[
|
|
85
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
86
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
86
87
|
] = None,
|
|
87
88
|
on_mouse_move: Optional[
|
|
88
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
89
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
89
90
|
] = None,
|
|
90
91
|
on_mouse_out: Optional[
|
|
91
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
92
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
92
93
|
] = None,
|
|
93
94
|
on_mouse_over: Optional[
|
|
94
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
95
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
95
96
|
] = None,
|
|
96
97
|
on_mouse_up: Optional[
|
|
97
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
98
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
98
99
|
] = None,
|
|
99
100
|
on_pause: Optional[
|
|
100
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
101
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
101
102
|
] = None,
|
|
102
103
|
on_play: Optional[
|
|
103
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
104
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
104
105
|
] = None,
|
|
105
106
|
on_playback_quality_change: Optional[
|
|
106
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
107
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
107
108
|
] = None,
|
|
108
109
|
on_playback_rate_change: Optional[
|
|
109
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
110
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
110
111
|
] = None,
|
|
111
112
|
on_progress: Optional[
|
|
112
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
113
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
113
114
|
] = None,
|
|
114
115
|
on_ready: Optional[
|
|
115
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
116
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
116
117
|
] = None,
|
|
117
118
|
on_scroll: Optional[
|
|
118
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
119
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
119
120
|
] = None,
|
|
120
121
|
on_seek: Optional[
|
|
121
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
122
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
122
123
|
] = None,
|
|
123
124
|
on_start: Optional[
|
|
124
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
125
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
125
126
|
] = None,
|
|
126
127
|
on_unmount: Optional[
|
|
127
|
-
Union[EventHandler, EventSpec, list, Callable,
|
|
128
|
+
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
|
|
128
129
|
] = None,
|
|
129
130
|
**props,
|
|
130
131
|
) -> "Video":
|
|
@@ -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 (
|
|
@@ -86,7 +87,7 @@ class Axis(Recharts):
|
|
|
86
87
|
tick_count: Var[int]
|
|
87
88
|
|
|
88
89
|
# If set false, no axis tick lines will be drawn.
|
|
89
|
-
tick_line: Var[bool] =
|
|
90
|
+
tick_line: Var[bool] = LiteralVar.create(False)
|
|
90
91
|
|
|
91
92
|
# The length of tick line.
|
|
92
93
|
tick_size: Var[int]
|
|
@@ -95,7 +96,7 @@ class Axis(Recharts):
|
|
|
95
96
|
min_tick_gap: Var[int]
|
|
96
97
|
|
|
97
98
|
# The stroke color of axis
|
|
98
|
-
stroke: Var[Union[str, Color]] =
|
|
99
|
+
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 9))
|
|
99
100
|
|
|
100
101
|
# The text anchor of axis
|
|
101
102
|
text_anchor: Var[str] # 'start', 'middle', 'end'
|
|
@@ -136,7 +137,10 @@ class XAxis(Axis):
|
|
|
136
137
|
x_axis_id: Var[Union[str, int]]
|
|
137
138
|
|
|
138
139
|
# Ensures that all datapoints within a chart contribute to its domain calculation, even when they are hidden
|
|
139
|
-
include_hidden: Var[bool] =
|
|
140
|
+
include_hidden: Var[bool] = LiteralVar.create(False)
|
|
141
|
+
|
|
142
|
+
# The range of the axis. Work best in conjuction with allow_data_overflow.
|
|
143
|
+
domain: Var[List]
|
|
140
144
|
|
|
141
145
|
# The range of the axis. Work best in conjuction with allow_data_overflow.
|
|
142
146
|
domain: Var[List]
|
|
@@ -190,10 +194,10 @@ class Brush(Recharts):
|
|
|
190
194
|
alias = "RechartsBrush"
|
|
191
195
|
|
|
192
196
|
# Stroke color
|
|
193
|
-
stroke: Var[Union[str, Color]] =
|
|
197
|
+
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 9))
|
|
194
198
|
|
|
195
199
|
# The fill color of brush.
|
|
196
|
-
fill: Var[Union[str, Color]] =
|
|
200
|
+
fill: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 2))
|
|
197
201
|
|
|
198
202
|
# The key of data displayed in the axis.
|
|
199
203
|
data_key: Var[Union[str, int]]
|
|
@@ -231,7 +235,7 @@ class Brush(Recharts):
|
|
|
231
235
|
# The stroke color of brush
|
|
232
236
|
stroke: Var[Union[str, Color]]
|
|
233
237
|
|
|
234
|
-
def get_event_triggers(self) -> dict[str, Union[
|
|
238
|
+
def get_event_triggers(self) -> dict[str, Union[ImmutableVar, Any]]:
|
|
235
239
|
"""Get the event triggers that pass the component's value to the handler.
|
|
236
240
|
|
|
237
241
|
Returns:
|
|
@@ -293,22 +297,22 @@ class Area(Cartesian):
|
|
|
293
297
|
alias = "RechartsArea"
|
|
294
298
|
|
|
295
299
|
# The color of the line stroke.
|
|
296
|
-
stroke: Var[Union[str, Color]] =
|
|
300
|
+
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9))
|
|
297
301
|
|
|
298
302
|
# The width of the line stroke.
|
|
299
|
-
stroke_width: Var[int] =
|
|
303
|
+
stroke_width: Var[int] = LiteralVar.create(1)
|
|
300
304
|
|
|
301
305
|
# The color of the area fill.
|
|
302
|
-
fill: Var[Union[str, Color]] =
|
|
306
|
+
fill: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 5))
|
|
303
307
|
|
|
304
308
|
# The interpolation type of area. And customized interpolation function can be set to type. 'basis' | 'basisClosed' | 'basisOpen' | 'bumpX' | 'bumpY' | 'bump' | 'linear' | 'linearClosed' | 'natural' | 'monotoneX' | 'monotoneY' | 'monotone' | 'step' | 'stepBefore' | 'stepAfter' |
|
|
305
|
-
type_: Var[LiteralAreaType] =
|
|
309
|
+
type_: Var[LiteralAreaType] = LiteralVar.create("monotone")
|
|
306
310
|
|
|
307
311
|
# If false set, dots will not be drawn. If true set, dots will be drawn which have the props calculated internally.
|
|
308
312
|
dot: Var[Union[bool, Dict[str, Any]]]
|
|
309
313
|
|
|
310
314
|
# The dot is shown when user enter an area chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally.
|
|
311
|
-
active_dot: Var[Union[bool, Dict[str, Any]]] =
|
|
315
|
+
active_dot: Var[Union[bool, Dict[str, Any]]] = LiteralVar.create(
|
|
312
316
|
{
|
|
313
317
|
"stroke": Color("accent", 2),
|
|
314
318
|
"fill": Color("accent", 10),
|
|
@@ -345,7 +349,7 @@ class Bar(Cartesian):
|
|
|
345
349
|
stroke_width: Var[int]
|
|
346
350
|
|
|
347
351
|
# The width of the line stroke.
|
|
348
|
-
fill: Var[Union[str, Color]] =
|
|
352
|
+
fill: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9))
|
|
349
353
|
# If false set, background of bars will not be drawn. If true set, background of bars will be drawn which have the props calculated internally.
|
|
350
354
|
background: Var[bool]
|
|
351
355
|
|
|
@@ -406,13 +410,13 @@ class Line(Cartesian):
|
|
|
406
410
|
type_: Var[LiteralAreaType]
|
|
407
411
|
|
|
408
412
|
# The color of the line stroke.
|
|
409
|
-
stroke: Var[Union[str, Color]] =
|
|
413
|
+
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9))
|
|
410
414
|
|
|
411
415
|
# The width of the line stroke.
|
|
412
416
|
stroke_width: Var[int]
|
|
413
417
|
|
|
414
418
|
# The dot is shown when mouse enter a line chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally.
|
|
415
|
-
dot: Var[Union[bool, Dict[str, Any]]] =
|
|
419
|
+
dot: Var[Union[bool, Dict[str, Any]]] = LiteralVar.create(
|
|
416
420
|
{
|
|
417
421
|
"stroke": Color("accent", 10),
|
|
418
422
|
"fill": Color("accent", 4),
|
|
@@ -420,7 +424,7 @@ class Line(Cartesian):
|
|
|
420
424
|
)
|
|
421
425
|
|
|
422
426
|
# The dot is shown when user enter an area chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally.
|
|
423
|
-
active_dot: Var[Union[bool, Dict[str, Any]]] =
|
|
427
|
+
active_dot: Var[Union[bool, Dict[str, Any]]] = LiteralVar.create(
|
|
424
428
|
{
|
|
425
429
|
"stroke": Color("accent", 2),
|
|
426
430
|
"fill": Color("accent", 10),
|
|
@@ -478,7 +482,7 @@ class Scatter(Recharts):
|
|
|
478
482
|
line_type: Var[LiteralLineType]
|
|
479
483
|
|
|
480
484
|
# The fill
|
|
481
|
-
fill: Var[Union[str, Color]] =
|
|
485
|
+
fill: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9))
|
|
482
486
|
|
|
483
487
|
# the name
|
|
484
488
|
name: Var[Union[str, int]]
|
|
@@ -555,7 +559,7 @@ class Funnel(Recharts):
|
|
|
555
559
|
animation_easing: Var[LiteralAnimationEasing]
|
|
556
560
|
|
|
557
561
|
# stroke color
|
|
558
|
-
stroke: Var[Union[str, Color]] =
|
|
562
|
+
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 3))
|
|
559
563
|
|
|
560
564
|
# Valid children components
|
|
561
565
|
_valid_children: List[str] = ["LabelList", "Cell"]
|
|
@@ -608,7 +612,7 @@ class ErrorBar(Recharts):
|
|
|
608
612
|
width: Var[int]
|
|
609
613
|
|
|
610
614
|
# The stroke color of error bar.
|
|
611
|
-
stroke: Var[Union[str, Color]] =
|
|
615
|
+
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 8))
|
|
612
616
|
|
|
613
617
|
# The stroke width of error bar.
|
|
614
618
|
stroke_width: Var[int]
|
|
@@ -798,7 +802,7 @@ class CartesianGrid(Grid):
|
|
|
798
802
|
stroke_dasharray: Var[str]
|
|
799
803
|
|
|
800
804
|
# the stroke color of grid
|
|
801
|
-
stroke: Var[Union[str, Color]] =
|
|
805
|
+
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 7))
|
|
802
806
|
|
|
803
807
|
|
|
804
808
|
class CartesianAxis(Grid):
|