reflex 0.7.13a2__py3-none-any.whl → 0.7.14__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of reflex might be problematic. Click here for more details.
- reflex/.templates/apps/blank/code/blank.py +0 -2
- reflex/app.py +85 -89
- reflex/app_mixins/lifespan.py +2 -3
- reflex/app_mixins/middleware.py +1 -0
- reflex/app_mixins/mixin.py +0 -1
- reflex/assets.py +7 -4
- reflex/base.py +3 -2
- reflex/compiler/compiler.py +79 -65
- reflex/compiler/utils.py +8 -6
- reflex/components/base/app_wrap.pyi +0 -1
- reflex/components/base/bare.py +22 -12
- reflex/components/base/body.pyi +0 -1
- reflex/components/base/document.pyi +0 -5
- reflex/components/base/error_boundary.pyi +0 -1
- reflex/components/base/fragment.pyi +0 -1
- reflex/components/base/head.pyi +0 -2
- reflex/components/base/link.pyi +0 -2
- reflex/components/base/meta.py +2 -1
- reflex/components/base/meta.pyi +0 -4
- reflex/components/base/script.py +2 -1
- reflex/components/base/script.pyi +0 -1
- reflex/components/base/strict_mode.pyi +0 -1
- reflex/components/component.py +85 -45
- reflex/components/core/auto_scroll.pyi +0 -1
- reflex/components/core/banner.py +1 -1
- reflex/components/core/banner.pyi +0 -6
- reflex/components/core/breakpoints.py +9 -11
- reflex/components/core/client_side_routing.pyi +0 -2
- reflex/components/core/clipboard.pyi +0 -1
- reflex/components/core/colors.py +10 -7
- reflex/components/core/cond.py +4 -2
- reflex/components/core/debounce.py +5 -3
- reflex/components/core/debounce.pyi +0 -1
- reflex/components/core/foreach.py +8 -6
- reflex/components/core/html.py +3 -3
- reflex/components/core/html.pyi +0 -1
- reflex/components/core/match.py +19 -17
- reflex/components/core/sticky.pyi +0 -4
- reflex/components/core/upload.py +1 -1
- reflex/components/core/upload.pyi +0 -5
- reflex/components/datadisplay/code.py +1 -2
- reflex/components/datadisplay/code.pyi +0 -2
- reflex/components/datadisplay/dataeditor.py +7 -10
- reflex/components/datadisplay/dataeditor.pyi +0 -1
- reflex/components/datadisplay/logo.py +3 -4
- reflex/components/datadisplay/shiki_code_block.py +8 -11
- reflex/components/datadisplay/shiki_code_block.pyi +0 -3
- reflex/components/dynamic.py +2 -3
- reflex/components/el/__init__.pyi +2 -0
- reflex/components/el/element.pyi +0 -1
- reflex/components/el/elements/__init__.py +1 -0
- reflex/components/el/elements/__init__.pyi +3 -0
- reflex/components/el/elements/base.pyi +0 -1
- reflex/components/el/elements/forms.py +14 -15
- reflex/components/el/elements/forms.pyi +15 -32
- reflex/components/el/elements/inline.pyi +0 -28
- reflex/components/el/elements/media.py +26 -0
- reflex/components/el/elements/media.pyi +259 -25
- reflex/components/el/elements/metadata.py +0 -1
- reflex/components/el/elements/metadata.pyi +0 -6
- reflex/components/el/elements/other.pyi +0 -7
- reflex/components/el/elements/scripts.pyi +0 -3
- reflex/components/el/elements/sectioning.pyi +0 -15
- reflex/components/el/elements/tables.pyi +0 -10
- reflex/components/el/elements/typography.pyi +0 -15
- reflex/components/gridjs/datatable.py +10 -13
- reflex/components/gridjs/datatable.pyi +0 -2
- reflex/components/lucide/icon.py +10 -9
- reflex/components/lucide/icon.pyi +0 -3
- reflex/components/markdown/markdown.py +6 -8
- reflex/components/markdown/markdown.pyi +0 -1
- reflex/components/moment/moment.pyi +0 -1
- reflex/components/next/base.py +0 -2
- reflex/components/next/base.pyi +0 -3
- reflex/components/next/image.pyi +0 -1
- reflex/components/next/link.pyi +0 -1
- reflex/components/next/video.pyi +0 -1
- reflex/components/plotly/plotly.pyi +0 -9
- reflex/components/props.py +4 -3
- reflex/components/radix/primitives/accordion.pyi +0 -7
- reflex/components/radix/primitives/base.py +1 -3
- reflex/components/radix/primitives/base.pyi +0 -2
- reflex/components/radix/primitives/drawer.pyi +0 -11
- reflex/components/radix/primitives/form.py +4 -8
- reflex/components/radix/primitives/form.pyi +0 -12
- reflex/components/radix/primitives/progress.py +1 -1
- reflex/components/radix/primitives/progress.pyi +0 -5
- reflex/components/radix/primitives/slider.py +1 -1
- reflex/components/radix/primitives/slider.pyi +0 -5
- reflex/components/radix/themes/base.pyi +0 -8
- reflex/components/radix/themes/color_mode.pyi +0 -3
- reflex/components/radix/themes/components/alert_dialog.py +4 -2
- reflex/components/radix/themes/components/alert_dialog.pyi +4 -9
- reflex/components/radix/themes/components/aspect_ratio.py +1 -2
- reflex/components/radix/themes/components/aspect_ratio.pyi +1 -3
- reflex/components/radix/themes/components/avatar.py +5 -2
- reflex/components/radix/themes/components/avatar.pyi +1 -3
- reflex/components/radix/themes/components/badge.py +5 -2
- reflex/components/radix/themes/components/badge.pyi +1 -3
- reflex/components/radix/themes/components/button.py +2 -3
- reflex/components/radix/themes/components/button.pyi +1 -3
- reflex/components/radix/themes/components/callout.py +1 -2
- reflex/components/radix/themes/components/callout.pyi +1 -7
- reflex/components/radix/themes/components/card.py +1 -2
- reflex/components/radix/themes/components/card.pyi +1 -3
- reflex/components/radix/themes/components/checkbox.py +7 -4
- reflex/components/radix/themes/components/checkbox.pyi +1 -5
- reflex/components/radix/themes/components/checkbox_cards.py +1 -2
- reflex/components/radix/themes/components/checkbox_cards.pyi +1 -4
- reflex/components/radix/themes/components/checkbox_group.py +1 -2
- reflex/components/radix/themes/components/checkbox_group.pyi +1 -4
- reflex/components/radix/themes/components/context_menu.py +1 -1
- reflex/components/radix/themes/components/context_menu.pyi +1 -14
- reflex/components/radix/themes/components/data_list.py +1 -2
- reflex/components/radix/themes/components/data_list.pyi +1 -6
- reflex/components/radix/themes/components/dialog.py +4 -2
- reflex/components/radix/themes/components/dialog.pyi +4 -9
- reflex/components/radix/themes/components/dropdown_menu.py +5 -2
- reflex/components/radix/themes/components/dropdown_menu.pyi +4 -10
- reflex/components/radix/themes/components/hover_card.py +4 -2
- reflex/components/radix/themes/components/hover_card.pyi +4 -6
- reflex/components/radix/themes/components/icon_button.py +7 -8
- reflex/components/radix/themes/components/icon_button.pyi +1 -3
- reflex/components/radix/themes/components/inset.py +1 -2
- reflex/components/radix/themes/components/inset.pyi +1 -3
- reflex/components/radix/themes/components/popover.py +4 -2
- reflex/components/radix/themes/components/popover.pyi +4 -6
- reflex/components/radix/themes/components/progress.py +1 -2
- reflex/components/radix/themes/components/progress.pyi +1 -3
- reflex/components/radix/themes/components/radio.py +1 -2
- reflex/components/radix/themes/components/radio.pyi +1 -3
- reflex/components/radix/themes/components/radio_cards.py +1 -2
- reflex/components/radix/themes/components/radio_cards.pyi +1 -4
- reflex/components/radix/themes/components/radio_group.py +7 -5
- reflex/components/radix/themes/components/radio_group.pyi +1 -6
- reflex/components/radix/themes/components/scroll_area.py +1 -2
- reflex/components/radix/themes/components/scroll_area.pyi +1 -3
- reflex/components/radix/themes/components/segmented_control.py +1 -2
- reflex/components/radix/themes/components/segmented_control.pyi +1 -4
- reflex/components/radix/themes/components/select.py +5 -2
- reflex/components/radix/themes/components/select.pyi +1 -11
- reflex/components/radix/themes/components/separator.py +1 -2
- reflex/components/radix/themes/components/separator.pyi +1 -3
- reflex/components/radix/themes/components/skeleton.py +1 -2
- reflex/components/radix/themes/components/skeleton.pyi +1 -3
- reflex/components/radix/themes/components/slider.py +1 -2
- reflex/components/radix/themes/components/slider.pyi +1 -3
- reflex/components/radix/themes/components/spinner.py +1 -2
- reflex/components/radix/themes/components/spinner.pyi +1 -3
- reflex/components/radix/themes/components/switch.py +1 -2
- reflex/components/radix/themes/components/switch.pyi +1 -3
- reflex/components/radix/themes/components/table.py +1 -2
- reflex/components/radix/themes/components/table.pyi +1 -9
- reflex/components/radix/themes/components/tabs.py +1 -2
- reflex/components/radix/themes/components/tabs.pyi +1 -7
- reflex/components/radix/themes/components/text_area.py +5 -2
- reflex/components/radix/themes/components/text_area.pyi +2 -4
- reflex/components/radix/themes/components/text_field.py +5 -2
- reflex/components/radix/themes/components/text_field.pyi +1 -5
- reflex/components/radix/themes/components/tooltip.py +1 -2
- reflex/components/radix/themes/components/tooltip.pyi +1 -3
- reflex/components/radix/themes/layout/base.py +5 -2
- reflex/components/radix/themes/layout/base.pyi +5 -3
- reflex/components/radix/themes/layout/box.py +1 -2
- reflex/components/radix/themes/layout/box.pyi +1 -3
- reflex/components/radix/themes/layout/center.pyi +0 -1
- reflex/components/radix/themes/layout/container.py +1 -2
- reflex/components/radix/themes/layout/container.pyi +1 -3
- reflex/components/radix/themes/layout/flex.py +6 -2
- reflex/components/radix/themes/layout/flex.pyi +1 -3
- reflex/components/radix/themes/layout/grid.py +6 -2
- reflex/components/radix/themes/layout/grid.pyi +1 -3
- reflex/components/radix/themes/layout/list.py +2 -1
- reflex/components/radix/themes/layout/list.pyi +0 -5
- reflex/components/radix/themes/layout/section.py +1 -2
- reflex/components/radix/themes/layout/section.pyi +1 -3
- reflex/components/radix/themes/layout/spacer.pyi +0 -1
- reflex/components/radix/themes/layout/stack.py +1 -1
- reflex/components/radix/themes/layout/stack.pyi +0 -3
- reflex/components/radix/themes/typography/blockquote.py +1 -1
- reflex/components/radix/themes/typography/blockquote.pyi +1 -3
- reflex/components/radix/themes/typography/code.py +5 -1
- reflex/components/radix/themes/typography/code.pyi +1 -3
- reflex/components/radix/themes/typography/heading.py +1 -1
- reflex/components/radix/themes/typography/heading.pyi +1 -3
- reflex/components/radix/themes/typography/link.py +3 -2
- reflex/components/radix/themes/typography/link.pyi +1 -3
- reflex/components/radix/themes/typography/text.py +1 -1
- reflex/components/radix/themes/typography/text.pyi +1 -9
- reflex/components/react_player/audio.py +0 -2
- reflex/components/react_player/audio.pyi +0 -3
- reflex/components/react_player/react_player.pyi +0 -1
- reflex/components/react_player/video.py +0 -2
- reflex/components/react_player/video.pyi +0 -3
- reflex/components/recharts/__init__.py +1 -1
- reflex/components/recharts/__init__.pyi +1 -1
- reflex/components/recharts/cartesian.py +20 -25
- reflex/components/recharts/cartesian.pyi +20 -37
- reflex/components/recharts/charts.py +2 -1
- reflex/components/recharts/charts.pyi +0 -12
- reflex/components/recharts/general.pyi +0 -6
- reflex/components/recharts/polar.py +5 -4
- reflex/components/recharts/polar.pyi +4 -10
- reflex/components/recharts/recharts.py +12 -10
- reflex/components/recharts/recharts.pyi +10 -11
- reflex/components/sonner/toast.py +2 -2
- reflex/components/sonner/toast.pyi +0 -2
- reflex/components/suneditor/editor.py +2 -1
- reflex/components/suneditor/editor.pyi +0 -1
- reflex/components/tags/iter_tag.py +4 -2
- reflex/config.py +41 -615
- reflex/constants/base.py +6 -6
- reflex/constants/compiler.py +8 -6
- reflex/constants/installer.py +25 -16
- reflex/custom_components/custom_components.py +1 -2
- reflex/environment.py +606 -0
- reflex/event.py +58 -60
- reflex/experimental/__init__.py +2 -2
- reflex/experimental/client_state.py +9 -4
- reflex/experimental/layout.pyi +0 -5
- reflex/istate/manager.py +17 -20
- reflex/istate/proxy.py +19 -12
- reflex/model.py +8 -5
- reflex/plugins/base.py +8 -0
- reflex/plugins/tailwind_v3.py +8 -0
- reflex/plugins/tailwind_v4.py +8 -0
- reflex/reflex.py +11 -12
- reflex/route.py +7 -9
- reflex/state.py +67 -71
- reflex/style.py +3 -1
- reflex/testing.py +49 -30
- reflex/utils/build.py +2 -1
- reflex/utils/console.py +70 -17
- reflex/utils/exec.py +113 -39
- reflex/utils/export.py +2 -1
- reflex/utils/format.py +21 -24
- reflex/utils/imports.py +4 -3
- reflex/utils/lazy_loader.py +3 -3
- reflex/utils/misc.py +2 -1
- reflex/utils/net.py +2 -2
- reflex/utils/path_ops.py +4 -2
- reflex/utils/prerequisites.py +69 -39
- reflex/utils/processes.py +5 -7
- reflex/utils/pyi_generator.py +46 -41
- reflex/utils/redir.py +1 -1
- reflex/utils/registry.py +1 -1
- reflex/utils/serializers.py +4 -4
- reflex/utils/telemetry.py +36 -3
- reflex/utils/types.py +16 -13
- reflex/vars/base.py +96 -109
- reflex/vars/datetime.py +2 -1
- reflex/vars/dep_tracking.py +19 -28
- reflex/vars/number.py +6 -7
- reflex/vars/object.py +5 -6
- reflex/vars/sequence.py +11 -11
- {reflex-0.7.13a2.dist-info → reflex-0.7.14.dist-info}/METADATA +1 -1
- reflex-0.7.14.dist-info/RECORD +408 -0
- reflex-0.7.13a2.dist-info/RECORD +0 -407
- {reflex-0.7.13a2.dist-info → reflex-0.7.14.dist-info}/WHEEL +0 -0
- {reflex-0.7.13a2.dist-info → reflex-0.7.14.dist-info}/entry_points.txt +0 -0
- {reflex-0.7.13a2.dist-info → reflex-0.7.14.dist-info}/licenses/LICENSE +0 -0
|
@@ -71,7 +71,6 @@ class ChartBase(RechartsCharts):
|
|
|
71
71
|
Returns:
|
|
72
72
|
The chart component wrapped in a responsive container.
|
|
73
73
|
"""
|
|
74
|
-
...
|
|
75
74
|
|
|
76
75
|
class CategoricalChartBase(ChartBase):
|
|
77
76
|
@overload
|
|
@@ -149,7 +148,6 @@ class CategoricalChartBase(ChartBase):
|
|
|
149
148
|
Returns:
|
|
150
149
|
The chart component wrapped in a responsive container.
|
|
151
150
|
"""
|
|
152
|
-
...
|
|
153
151
|
|
|
154
152
|
class AreaChart(CategoricalChartBase):
|
|
155
153
|
@overload
|
|
@@ -232,7 +230,6 @@ class AreaChart(CategoricalChartBase):
|
|
|
232
230
|
Returns:
|
|
233
231
|
The chart component wrapped in a responsive container.
|
|
234
232
|
"""
|
|
235
|
-
...
|
|
236
233
|
|
|
237
234
|
class BarChart(CategoricalChartBase):
|
|
238
235
|
@overload
|
|
@@ -320,7 +317,6 @@ class BarChart(CategoricalChartBase):
|
|
|
320
317
|
Returns:
|
|
321
318
|
The chart component wrapped in a responsive container.
|
|
322
319
|
"""
|
|
323
|
-
...
|
|
324
320
|
|
|
325
321
|
class LineChart(CategoricalChartBase):
|
|
326
322
|
@overload
|
|
@@ -398,7 +394,6 @@ class LineChart(CategoricalChartBase):
|
|
|
398
394
|
Returns:
|
|
399
395
|
The chart component wrapped in a responsive container.
|
|
400
396
|
"""
|
|
401
|
-
...
|
|
402
397
|
|
|
403
398
|
class ComposedChart(CategoricalChartBase):
|
|
404
399
|
@overload
|
|
@@ -489,7 +484,6 @@ class ComposedChart(CategoricalChartBase):
|
|
|
489
484
|
Returns:
|
|
490
485
|
The chart component wrapped in a responsive container.
|
|
491
486
|
"""
|
|
492
|
-
...
|
|
493
487
|
|
|
494
488
|
class PieChart(ChartBase):
|
|
495
489
|
@overload
|
|
@@ -555,7 +549,6 @@ class PieChart(ChartBase):
|
|
|
555
549
|
Returns:
|
|
556
550
|
The chart component wrapped in a responsive container.
|
|
557
551
|
"""
|
|
558
|
-
...
|
|
559
552
|
|
|
560
553
|
class RadarChart(ChartBase):
|
|
561
554
|
def get_event_triggers(self) -> dict[str, Var | Any]: ...
|
|
@@ -619,7 +612,6 @@ class RadarChart(ChartBase):
|
|
|
619
612
|
Returns:
|
|
620
613
|
The chart component wrapped in a responsive container.
|
|
621
614
|
"""
|
|
622
|
-
...
|
|
623
615
|
|
|
624
616
|
class RadialBarChart(ChartBase):
|
|
625
617
|
@overload
|
|
@@ -701,7 +693,6 @@ class RadialBarChart(ChartBase):
|
|
|
701
693
|
Returns:
|
|
702
694
|
The chart component wrapped in a responsive container.
|
|
703
695
|
"""
|
|
704
|
-
...
|
|
705
696
|
|
|
706
697
|
class ScatterChart(ChartBase):
|
|
707
698
|
def get_event_triggers(self) -> dict[str, Var | Any]: ...
|
|
@@ -757,7 +748,6 @@ class ScatterChart(ChartBase):
|
|
|
757
748
|
Returns:
|
|
758
749
|
The chart component wrapped in a responsive container.
|
|
759
750
|
"""
|
|
760
|
-
...
|
|
761
751
|
|
|
762
752
|
class FunnelChart(ChartBase):
|
|
763
753
|
@overload
|
|
@@ -823,7 +813,6 @@ class FunnelChart(ChartBase):
|
|
|
823
813
|
Returns:
|
|
824
814
|
The chart component wrapped in a responsive container.
|
|
825
815
|
"""
|
|
826
|
-
...
|
|
827
816
|
|
|
828
817
|
class Treemap(RechartsCharts):
|
|
829
818
|
@overload
|
|
@@ -903,7 +892,6 @@ class Treemap(RechartsCharts):
|
|
|
903
892
|
Returns:
|
|
904
893
|
The Treemap component wrapped in a responsive container.
|
|
905
894
|
"""
|
|
906
|
-
...
|
|
907
895
|
|
|
908
896
|
area_chart = AreaChart.create
|
|
909
897
|
bar_chart = BarChart.create
|
|
@@ -78,7 +78,6 @@ class ResponsiveContainer(Recharts, MemoizationLeaf):
|
|
|
78
78
|
Returns:
|
|
79
79
|
The memoization leaf
|
|
80
80
|
"""
|
|
81
|
-
...
|
|
82
81
|
|
|
83
82
|
class Legend(Recharts):
|
|
84
83
|
@overload
|
|
@@ -192,7 +191,6 @@ class Legend(Recharts):
|
|
|
192
191
|
Returns:
|
|
193
192
|
The component.
|
|
194
193
|
"""
|
|
195
|
-
...
|
|
196
194
|
|
|
197
195
|
class GraphingTooltip(Recharts):
|
|
198
196
|
@overload
|
|
@@ -280,7 +278,6 @@ class GraphingTooltip(Recharts):
|
|
|
280
278
|
Returns:
|
|
281
279
|
The component.
|
|
282
280
|
"""
|
|
283
|
-
...
|
|
284
281
|
|
|
285
282
|
class Label(Recharts):
|
|
286
283
|
@overload
|
|
@@ -382,7 +379,6 @@ class Label(Recharts):
|
|
|
382
379
|
Returns:
|
|
383
380
|
The component.
|
|
384
381
|
"""
|
|
385
|
-
...
|
|
386
382
|
|
|
387
383
|
class LabelList(Recharts):
|
|
388
384
|
@overload
|
|
@@ -486,7 +482,6 @@ class LabelList(Recharts):
|
|
|
486
482
|
Returns:
|
|
487
483
|
The component.
|
|
488
484
|
"""
|
|
489
|
-
...
|
|
490
485
|
|
|
491
486
|
class Cell(Recharts):
|
|
492
487
|
@overload
|
|
@@ -542,7 +537,6 @@ class Cell(Recharts):
|
|
|
542
537
|
Returns:
|
|
543
538
|
The component.
|
|
544
539
|
"""
|
|
545
|
-
...
|
|
546
540
|
|
|
547
541
|
responsive_container = ResponsiveContainer.create
|
|
548
542
|
legend = Legend.create
|
|
@@ -11,6 +11,7 @@ from reflex.event import EventHandler, no_args_event_spec
|
|
|
11
11
|
from reflex.vars.base import LiteralVar, Var
|
|
12
12
|
|
|
13
13
|
from .recharts import (
|
|
14
|
+
ACTIVE_DOT_TYPE,
|
|
14
15
|
LiteralAnimationEasing,
|
|
15
16
|
LiteralGridType,
|
|
16
17
|
LiteralLegendType,
|
|
@@ -65,10 +66,10 @@ class Pie(Recharts):
|
|
|
65
66
|
legend_type: Var[LiteralLegendType]
|
|
66
67
|
|
|
67
68
|
# If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False
|
|
68
|
-
label: Var[bool] = Var.create(False)
|
|
69
|
+
label: Var[bool | dict[str, Any]] = Var.create(False)
|
|
69
70
|
|
|
70
71
|
# If false set, label lines will not be drawn. If true set, label lines will be drawn which have the props calculated internally. Default: False
|
|
71
|
-
label_line: Var[bool]
|
|
72
|
+
label_line: Var[bool | dict[str, Any]]
|
|
72
73
|
|
|
73
74
|
# Valid children components
|
|
74
75
|
_valid_children: ClassVar[list[str]] = ["Cell", "LabelList", "Bare"]
|
|
@@ -126,7 +127,7 @@ class Radar(Recharts):
|
|
|
126
127
|
points: Var[Sequence[dict[str, Any]]]
|
|
127
128
|
|
|
128
129
|
# If false set, dots will not be drawn. Default: True
|
|
129
|
-
dot: Var[
|
|
130
|
+
dot: Var[ACTIVE_DOT_TYPE]
|
|
130
131
|
|
|
131
132
|
# Stoke color. Default: rx.color("accent", 9)
|
|
132
133
|
stroke: Var[str | Color] = LiteralVar.create(Color("accent", 9))
|
|
@@ -141,7 +142,7 @@ class Radar(Recharts):
|
|
|
141
142
|
legend_type: Var[LiteralLegendType]
|
|
142
143
|
|
|
143
144
|
# If false set, labels will not be drawn. Default: True
|
|
144
|
-
label: Var[bool]
|
|
145
|
+
label: Var[bool | dict[str, Any]]
|
|
145
146
|
|
|
146
147
|
# If set false, animation of polygon will be disabled. Default: True in CSR, and False in SSR
|
|
147
148
|
is_animation_active: Var[bool]
|
|
@@ -60,8 +60,8 @@ class Pie(Recharts):
|
|
|
60
60
|
]
|
|
61
61
|
]
|
|
62
62
|
| None = None,
|
|
63
|
-
label: Var[bool] | bool | None = None,
|
|
64
|
-
label_line: Var[bool] | bool | None = None,
|
|
63
|
+
label: Var[bool | dict[str, Any]] | bool | dict[str, Any] | None = None,
|
|
64
|
+
label_line: Var[bool | dict[str, Any]] | bool | dict[str, Any] | None = None,
|
|
65
65
|
stroke: Color | Var[Color | str] | str | None = None,
|
|
66
66
|
fill: Color | Var[Color | str] | str | None = None,
|
|
67
67
|
is_animation_active: Var[bool] | bool | None = None,
|
|
@@ -131,7 +131,6 @@ class Pie(Recharts):
|
|
|
131
131
|
Returns:
|
|
132
132
|
The component.
|
|
133
133
|
"""
|
|
134
|
-
...
|
|
135
134
|
|
|
136
135
|
class Radar(Recharts):
|
|
137
136
|
def get_event_triggers(self) -> dict[str, Var | Any]: ...
|
|
@@ -142,7 +141,7 @@ class Radar(Recharts):
|
|
|
142
141
|
*children,
|
|
143
142
|
data_key: Var[int | str] | int | str | None = None,
|
|
144
143
|
points: Sequence[dict[str, Any]] | Var[Sequence[dict[str, Any]]] | None = None,
|
|
145
|
-
dot: Var[bool] | bool | None = None,
|
|
144
|
+
dot: Var[bool | dict[str, Any]] | bool | dict[str, Any] | None = None,
|
|
146
145
|
stroke: Color | Var[Color | str] | str | None = None,
|
|
147
146
|
fill: Color | Var[Color | str] | str | None = None,
|
|
148
147
|
fill_opacity: Var[float] | float | None = None,
|
|
@@ -175,7 +174,7 @@ class Radar(Recharts):
|
|
|
175
174
|
]
|
|
176
175
|
]
|
|
177
176
|
| None = None,
|
|
178
|
-
label: Var[bool] | bool | None = None,
|
|
177
|
+
label: Var[bool | dict[str, Any]] | bool | dict[str, Any] | None = None,
|
|
179
178
|
is_animation_active: Var[bool] | bool | None = None,
|
|
180
179
|
animation_begin: Var[int] | int | None = None,
|
|
181
180
|
animation_duration: Var[int] | int | None = None,
|
|
@@ -227,7 +226,6 @@ class Radar(Recharts):
|
|
|
227
226
|
Returns:
|
|
228
227
|
The component.
|
|
229
228
|
"""
|
|
230
|
-
...
|
|
231
229
|
|
|
232
230
|
class RadialBar(Recharts):
|
|
233
231
|
def get_event_triggers(self) -> dict[str, Var | Any]: ...
|
|
@@ -325,7 +323,6 @@ class RadialBar(Recharts):
|
|
|
325
323
|
Returns:
|
|
326
324
|
The component.
|
|
327
325
|
"""
|
|
328
|
-
...
|
|
329
326
|
|
|
330
327
|
class PolarAngleAxis(Recharts):
|
|
331
328
|
@overload
|
|
@@ -411,7 +408,6 @@ class PolarAngleAxis(Recharts):
|
|
|
411
408
|
Returns:
|
|
412
409
|
The component.
|
|
413
410
|
"""
|
|
414
|
-
...
|
|
415
411
|
|
|
416
412
|
class PolarGrid(Recharts):
|
|
417
413
|
@overload
|
|
@@ -481,7 +477,6 @@ class PolarGrid(Recharts):
|
|
|
481
477
|
Returns:
|
|
482
478
|
The component.
|
|
483
479
|
"""
|
|
484
|
-
...
|
|
485
480
|
|
|
486
481
|
class PolarRadiusAxis(Recharts):
|
|
487
482
|
def get_event_triggers(self) -> dict[str, Var | Any]: ...
|
|
@@ -591,7 +586,6 @@ class PolarRadiusAxis(Recharts):
|
|
|
591
586
|
Returns:
|
|
592
587
|
The component.
|
|
593
588
|
"""
|
|
594
|
-
...
|
|
595
589
|
|
|
596
590
|
pie = Pie.create
|
|
597
591
|
radar = Radar.create
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""A component that wraps a recharts lib."""
|
|
2
2
|
|
|
3
|
-
from typing import Literal
|
|
3
|
+
from typing import Any, Literal
|
|
4
4
|
|
|
5
5
|
from reflex.components.component import Component, MemoizationLeaf, NoSSRComponent
|
|
6
6
|
|
|
@@ -73,25 +73,25 @@ LiteralPosition = Literal[
|
|
|
73
73
|
"center",
|
|
74
74
|
]
|
|
75
75
|
LiteralIconType = Literal[
|
|
76
|
-
"line",
|
|
77
|
-
"plainline",
|
|
78
|
-
"square",
|
|
79
|
-
"rect",
|
|
80
76
|
"circle",
|
|
81
77
|
"cross",
|
|
82
78
|
"diamond",
|
|
79
|
+
"line",
|
|
80
|
+
"plainline",
|
|
81
|
+
"rect",
|
|
82
|
+
"square",
|
|
83
83
|
"star",
|
|
84
84
|
"triangle",
|
|
85
85
|
"wye",
|
|
86
86
|
]
|
|
87
87
|
LiteralLegendType = Literal[
|
|
88
|
-
"line",
|
|
89
|
-
"plainline",
|
|
90
|
-
"square",
|
|
91
|
-
"rect",
|
|
92
88
|
"circle",
|
|
93
89
|
"cross",
|
|
94
90
|
"diamond",
|
|
91
|
+
"line",
|
|
92
|
+
"plainline",
|
|
93
|
+
"rect",
|
|
94
|
+
"square",
|
|
95
95
|
"star",
|
|
96
96
|
"triangle",
|
|
97
97
|
"wye",
|
|
@@ -103,7 +103,7 @@ LiteralStackOffset = Literal["expand", "none", "wiggle", "silhouette"]
|
|
|
103
103
|
LiteralBarChartStackOffset = Literal["expand", "none", "wiggle", "silhouette", "sign"]
|
|
104
104
|
LiteralComposedChartBaseValue = Literal["dataMin", "dataMax", "auto"]
|
|
105
105
|
LiteralAxisType = Literal["number", "category"]
|
|
106
|
-
|
|
106
|
+
LiteralCurveType = Literal[
|
|
107
107
|
"basis",
|
|
108
108
|
"basisClosed",
|
|
109
109
|
"basisOpen",
|
|
@@ -126,3 +126,5 @@ LiteralIntervalAxis = Literal[
|
|
|
126
126
|
"preserveStart", "preserveEnd", "preserveStartEnd", "equidistantPreserveStart"
|
|
127
127
|
]
|
|
128
128
|
LiteralSyncMethod = Literal["index", "value"]
|
|
129
|
+
|
|
130
|
+
ACTIVE_DOT_TYPE = bool | dict[str, Any]
|
|
@@ -61,7 +61,6 @@ class Recharts(Component):
|
|
|
61
61
|
Returns:
|
|
62
62
|
The component.
|
|
63
63
|
"""
|
|
64
|
-
...
|
|
65
64
|
|
|
66
65
|
class RechartsCharts(NoSSRComponent, MemoizationLeaf):
|
|
67
66
|
@overload
|
|
@@ -113,7 +112,6 @@ class RechartsCharts(NoSSRComponent, MemoizationLeaf):
|
|
|
113
112
|
Returns:
|
|
114
113
|
The memoization leaf
|
|
115
114
|
"""
|
|
116
|
-
...
|
|
117
115
|
|
|
118
116
|
LiteralAnimationEasing = Literal["ease", "ease-in", "ease-out", "ease-in-out", "linear"]
|
|
119
117
|
LiteralIfOverflow = Literal["discard", "hidden", "visible", "extendDomain"]
|
|
@@ -168,25 +166,25 @@ LiteralPosition = Literal[
|
|
|
168
166
|
"center",
|
|
169
167
|
]
|
|
170
168
|
LiteralIconType = Literal[
|
|
171
|
-
"line",
|
|
172
|
-
"plainline",
|
|
173
|
-
"square",
|
|
174
|
-
"rect",
|
|
175
169
|
"circle",
|
|
176
170
|
"cross",
|
|
177
171
|
"diamond",
|
|
172
|
+
"line",
|
|
173
|
+
"plainline",
|
|
174
|
+
"rect",
|
|
175
|
+
"square",
|
|
178
176
|
"star",
|
|
179
177
|
"triangle",
|
|
180
178
|
"wye",
|
|
181
179
|
]
|
|
182
180
|
LiteralLegendType = Literal[
|
|
183
|
-
"line",
|
|
184
|
-
"plainline",
|
|
185
|
-
"square",
|
|
186
|
-
"rect",
|
|
187
181
|
"circle",
|
|
188
182
|
"cross",
|
|
189
183
|
"diamond",
|
|
184
|
+
"line",
|
|
185
|
+
"plainline",
|
|
186
|
+
"rect",
|
|
187
|
+
"square",
|
|
190
188
|
"star",
|
|
191
189
|
"triangle",
|
|
192
190
|
"wye",
|
|
@@ -198,7 +196,7 @@ LiteralStackOffset = Literal["expand", "none", "wiggle", "silhouette"]
|
|
|
198
196
|
LiteralBarChartStackOffset = Literal["expand", "none", "wiggle", "silhouette", "sign"]
|
|
199
197
|
LiteralComposedChartBaseValue = Literal["dataMin", "dataMax", "auto"]
|
|
200
198
|
LiteralAxisType = Literal["number", "category"]
|
|
201
|
-
|
|
199
|
+
LiteralCurveType = Literal[
|
|
202
200
|
"basis",
|
|
203
201
|
"basisClosed",
|
|
204
202
|
"basisOpen",
|
|
@@ -221,3 +219,4 @@ LiteralIntervalAxis = Literal[
|
|
|
221
219
|
"preserveStart", "preserveEnd", "preserveStartEnd", "equidistantPreserveStart"
|
|
222
220
|
]
|
|
223
221
|
LiteralSyncMethod = Literal["index", "value"]
|
|
222
|
+
ACTIVE_DOT_TYPE = bool | dict[str, Any]
|
|
@@ -147,7 +147,6 @@ class ToastProps(PropsBase, NoExtrasAllowedProps):
|
|
|
147
147
|
Returns:
|
|
148
148
|
The object as a dictionary with ToastAction fields intact.
|
|
149
149
|
"""
|
|
150
|
-
kwargs.setdefault("exclude_none", True)
|
|
151
150
|
d = super().dict(*args, **kwargs)
|
|
152
151
|
# Keep these fields as ToastAction so they can be serialized specially
|
|
153
152
|
if "action" in d:
|
|
@@ -266,7 +265,8 @@ class Toaster(Component):
|
|
|
266
265
|
props.setdefault("title", message)
|
|
267
266
|
message = ""
|
|
268
267
|
elif message == "" and "title" not in props and "description" not in props:
|
|
269
|
-
|
|
268
|
+
msg = "Toast message or title or description must be provided."
|
|
269
|
+
raise ValueError(msg)
|
|
270
270
|
|
|
271
271
|
if props:
|
|
272
272
|
args = LiteralVar.create(ToastProps(component_name="rx.toast", **props)) # pyright: ignore [reportCallIssue]
|
|
@@ -177,7 +177,6 @@ class Toaster(Component):
|
|
|
177
177
|
Returns:
|
|
178
178
|
The toaster component.
|
|
179
179
|
"""
|
|
180
|
-
...
|
|
181
180
|
|
|
182
181
|
class ToastNamespace(ComponentNamespace):
|
|
183
182
|
provider = staticmethod(Toaster.create)
|
|
@@ -210,6 +209,5 @@ class ToastNamespace(ComponentNamespace):
|
|
|
210
209
|
Returns:
|
|
211
210
|
The toast event.
|
|
212
211
|
"""
|
|
213
|
-
...
|
|
214
212
|
|
|
215
213
|
toast = ToastNamespace()
|
|
@@ -259,7 +259,8 @@ class Editor(NoSSRComponent):
|
|
|
259
259
|
"""
|
|
260
260
|
if set_options is not None:
|
|
261
261
|
if isinstance(set_options, Var):
|
|
262
|
-
|
|
262
|
+
msg = "EditorOptions cannot be a state Var"
|
|
263
|
+
raise ValueError(msg)
|
|
263
264
|
props["set_options"] = {
|
|
264
265
|
to_camel_case(k): v
|
|
265
266
|
for k, v in set_options.dict().items()
|
|
@@ -121,7 +121,8 @@ class IterTag(Tag):
|
|
|
121
121
|
else:
|
|
122
122
|
# If the render function takes the index as an argument.
|
|
123
123
|
if len(args) != 2:
|
|
124
|
-
|
|
124
|
+
msg = "The render function must take 2 arguments."
|
|
125
|
+
raise ValueError(msg)
|
|
125
126
|
component = self.render_fn(arg, index)
|
|
126
127
|
|
|
127
128
|
# Nested foreach components or cond must be wrapped in fragments.
|
|
@@ -131,7 +132,8 @@ class IterTag(Tag):
|
|
|
131
132
|
component = _into_component_once(component)
|
|
132
133
|
|
|
133
134
|
if component is None:
|
|
134
|
-
|
|
135
|
+
msg = "The render function must return a component."
|
|
136
|
+
raise ValueError(msg)
|
|
135
137
|
|
|
136
138
|
# Set the component key.
|
|
137
139
|
if component.key is None:
|