reflex 0.7.13a2__py3-none-any.whl → 0.7.14a1__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 +64 -69
- reflex/app_mixins/lifespan.py +2 -3
- reflex/app_mixins/middleware.py +1 -0
- reflex/app_mixins/mixin.py +0 -1
- reflex/assets.py +6 -3
- reflex/base.py +3 -2
- reflex/compiler/compiler.py +77 -64
- reflex/compiler/utils.py +8 -6
- reflex/components/base/app_wrap.pyi +0 -1
- reflex/components/base/bare.py +5 -7
- 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 +38 -40
- reflex/components/core/auto_scroll.pyi +0 -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.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 +3 -4
- reflex/components/el/elements/forms.pyi +1 -18
- 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 +1 -3
- 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 +47 -35
- reflex/constants/base.py +3 -3
- reflex/constants/compiler.py +8 -6
- reflex/constants/installer.py +24 -15
- reflex/custom_components/custom_components.py +1 -2
- 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 +15 -19
- reflex/istate/proxy.py +19 -12
- reflex/model.py +6 -4
- reflex/plugins/base.py +8 -0
- reflex/plugins/tailwind_v3.py +8 -0
- reflex/plugins/tailwind_v4.py +8 -0
- reflex/reflex.py +9 -11
- reflex/route.py +7 -9
- reflex/state.py +66 -70
- reflex/style.py +3 -1
- reflex/testing.py +46 -29
- reflex/utils/build.py +2 -1
- reflex/utils/console.py +9 -17
- reflex/utils/exec.py +9 -11
- 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 +2 -1
- reflex/utils/prerequisites.py +67 -38
- reflex/utils/processes.py +4 -6
- reflex/utils/pyi_generator.py +46 -41
- reflex/utils/redir.py +1 -1
- reflex/utils/serializers.py +4 -4
- reflex/utils/telemetry.py +42 -4
- 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.14a1.dist-info}/METADATA +1 -1
- reflex-0.7.14a1.dist-info/RECORD +407 -0
- reflex-0.7.13a2.dist-info/RECORD +0 -407
- {reflex-0.7.13a2.dist-info → reflex-0.7.14a1.dist-info}/WHEEL +0 -0
- {reflex-0.7.13a2.dist-info → reflex-0.7.14a1.dist-info}/entry_points.txt +0 -0
- {reflex-0.7.13a2.dist-info → reflex-0.7.14a1.dist-info}/licenses/LICENSE +0 -0
|
@@ -259,7 +259,6 @@ class Base(BaseHTML):
|
|
|
259
259
|
Returns:
|
|
260
260
|
The component.
|
|
261
261
|
"""
|
|
262
|
-
...
|
|
263
262
|
|
|
264
263
|
class Head(BaseHTML):
|
|
265
264
|
@overload
|
|
@@ -505,7 +504,6 @@ class Head(BaseHTML):
|
|
|
505
504
|
Returns:
|
|
506
505
|
The component.
|
|
507
506
|
"""
|
|
508
|
-
...
|
|
509
507
|
|
|
510
508
|
class Link(BaseHTML):
|
|
511
509
|
@overload
|
|
@@ -795,7 +793,6 @@ class Link(BaseHTML):
|
|
|
795
793
|
Returns:
|
|
796
794
|
The component.
|
|
797
795
|
"""
|
|
798
|
-
...
|
|
799
796
|
|
|
800
797
|
class Meta(BaseHTML):
|
|
801
798
|
@overload
|
|
@@ -1049,7 +1046,6 @@ class Meta(BaseHTML):
|
|
|
1049
1046
|
Returns:
|
|
1050
1047
|
The component.
|
|
1051
1048
|
"""
|
|
1052
|
-
...
|
|
1053
1049
|
|
|
1054
1050
|
class Title(Element):
|
|
1055
1051
|
@overload
|
|
@@ -1101,7 +1097,6 @@ class Title(Element):
|
|
|
1101
1097
|
Returns:
|
|
1102
1098
|
The component.
|
|
1103
1099
|
"""
|
|
1104
|
-
...
|
|
1105
1100
|
|
|
1106
1101
|
class StyleEl(Element):
|
|
1107
1102
|
@overload
|
|
@@ -1155,7 +1150,6 @@ class StyleEl(Element):
|
|
|
1155
1150
|
Returns:
|
|
1156
1151
|
The component.
|
|
1157
1152
|
"""
|
|
1158
|
-
...
|
|
1159
1153
|
|
|
1160
1154
|
base = Base.create
|
|
1161
1155
|
head = Head.create
|
|
@@ -258,7 +258,6 @@ class Details(BaseHTML):
|
|
|
258
258
|
Returns:
|
|
259
259
|
The component.
|
|
260
260
|
"""
|
|
261
|
-
...
|
|
262
261
|
|
|
263
262
|
class Dialog(BaseHTML):
|
|
264
263
|
@overload
|
|
@@ -506,7 +505,6 @@ class Dialog(BaseHTML):
|
|
|
506
505
|
Returns:
|
|
507
506
|
The component.
|
|
508
507
|
"""
|
|
509
|
-
...
|
|
510
508
|
|
|
511
509
|
class Summary(BaseHTML):
|
|
512
510
|
@overload
|
|
@@ -752,7 +750,6 @@ class Summary(BaseHTML):
|
|
|
752
750
|
Returns:
|
|
753
751
|
The component.
|
|
754
752
|
"""
|
|
755
|
-
...
|
|
756
753
|
|
|
757
754
|
class Slot(BaseHTML):
|
|
758
755
|
@overload
|
|
@@ -998,7 +995,6 @@ class Slot(BaseHTML):
|
|
|
998
995
|
Returns:
|
|
999
996
|
The component.
|
|
1000
997
|
"""
|
|
1001
|
-
...
|
|
1002
998
|
|
|
1003
999
|
class Template(BaseHTML):
|
|
1004
1000
|
@overload
|
|
@@ -1244,7 +1240,6 @@ class Template(BaseHTML):
|
|
|
1244
1240
|
Returns:
|
|
1245
1241
|
The component.
|
|
1246
1242
|
"""
|
|
1247
|
-
...
|
|
1248
1243
|
|
|
1249
1244
|
class Math(BaseHTML):
|
|
1250
1245
|
@overload
|
|
@@ -1490,7 +1485,6 @@ class Math(BaseHTML):
|
|
|
1490
1485
|
Returns:
|
|
1491
1486
|
The component.
|
|
1492
1487
|
"""
|
|
1493
|
-
...
|
|
1494
1488
|
|
|
1495
1489
|
class Html(BaseHTML):
|
|
1496
1490
|
@overload
|
|
@@ -1738,7 +1732,6 @@ class Html(BaseHTML):
|
|
|
1738
1732
|
Returns:
|
|
1739
1733
|
The component.
|
|
1740
1734
|
"""
|
|
1741
|
-
...
|
|
1742
1735
|
|
|
1743
1736
|
details = Details.create
|
|
1744
1737
|
dialog = Dialog.create
|
|
@@ -256,7 +256,6 @@ class Canvas(BaseHTML):
|
|
|
256
256
|
Returns:
|
|
257
257
|
The component.
|
|
258
258
|
"""
|
|
259
|
-
...
|
|
260
259
|
|
|
261
260
|
class Noscript(BaseHTML):
|
|
262
261
|
@overload
|
|
@@ -502,7 +501,6 @@ class Noscript(BaseHTML):
|
|
|
502
501
|
Returns:
|
|
503
502
|
The component.
|
|
504
503
|
"""
|
|
505
|
-
...
|
|
506
504
|
|
|
507
505
|
class Script(BaseHTML):
|
|
508
506
|
@overload
|
|
@@ -790,7 +788,6 @@ class Script(BaseHTML):
|
|
|
790
788
|
Returns:
|
|
791
789
|
The component.
|
|
792
790
|
"""
|
|
793
|
-
...
|
|
794
791
|
|
|
795
792
|
canvas = Canvas.create
|
|
796
793
|
noscript = Noscript.create
|
|
@@ -256,7 +256,6 @@ class Body(BaseHTML):
|
|
|
256
256
|
Returns:
|
|
257
257
|
The component.
|
|
258
258
|
"""
|
|
259
|
-
...
|
|
260
259
|
|
|
261
260
|
class Address(BaseHTML):
|
|
262
261
|
@overload
|
|
@@ -502,7 +501,6 @@ class Address(BaseHTML):
|
|
|
502
501
|
Returns:
|
|
503
502
|
The component.
|
|
504
503
|
"""
|
|
505
|
-
...
|
|
506
504
|
|
|
507
505
|
class Article(BaseHTML):
|
|
508
506
|
@overload
|
|
@@ -748,7 +746,6 @@ class Article(BaseHTML):
|
|
|
748
746
|
Returns:
|
|
749
747
|
The component.
|
|
750
748
|
"""
|
|
751
|
-
...
|
|
752
749
|
|
|
753
750
|
class Aside(BaseHTML):
|
|
754
751
|
@overload
|
|
@@ -994,7 +991,6 @@ class Aside(BaseHTML):
|
|
|
994
991
|
Returns:
|
|
995
992
|
The component.
|
|
996
993
|
"""
|
|
997
|
-
...
|
|
998
994
|
|
|
999
995
|
class Footer(BaseHTML):
|
|
1000
996
|
@overload
|
|
@@ -1240,7 +1236,6 @@ class Footer(BaseHTML):
|
|
|
1240
1236
|
Returns:
|
|
1241
1237
|
The component.
|
|
1242
1238
|
"""
|
|
1243
|
-
...
|
|
1244
1239
|
|
|
1245
1240
|
class Header(BaseHTML):
|
|
1246
1241
|
@overload
|
|
@@ -1486,7 +1481,6 @@ class Header(BaseHTML):
|
|
|
1486
1481
|
Returns:
|
|
1487
1482
|
The component.
|
|
1488
1483
|
"""
|
|
1489
|
-
...
|
|
1490
1484
|
|
|
1491
1485
|
class H1(BaseHTML):
|
|
1492
1486
|
@overload
|
|
@@ -1732,7 +1726,6 @@ class H1(BaseHTML):
|
|
|
1732
1726
|
Returns:
|
|
1733
1727
|
The component.
|
|
1734
1728
|
"""
|
|
1735
|
-
...
|
|
1736
1729
|
|
|
1737
1730
|
class H2(BaseHTML):
|
|
1738
1731
|
@overload
|
|
@@ -1978,7 +1971,6 @@ class H2(BaseHTML):
|
|
|
1978
1971
|
Returns:
|
|
1979
1972
|
The component.
|
|
1980
1973
|
"""
|
|
1981
|
-
...
|
|
1982
1974
|
|
|
1983
1975
|
class H3(BaseHTML):
|
|
1984
1976
|
@overload
|
|
@@ -2224,7 +2216,6 @@ class H3(BaseHTML):
|
|
|
2224
2216
|
Returns:
|
|
2225
2217
|
The component.
|
|
2226
2218
|
"""
|
|
2227
|
-
...
|
|
2228
2219
|
|
|
2229
2220
|
class H4(BaseHTML):
|
|
2230
2221
|
@overload
|
|
@@ -2470,7 +2461,6 @@ class H4(BaseHTML):
|
|
|
2470
2461
|
Returns:
|
|
2471
2462
|
The component.
|
|
2472
2463
|
"""
|
|
2473
|
-
...
|
|
2474
2464
|
|
|
2475
2465
|
class H5(BaseHTML):
|
|
2476
2466
|
@overload
|
|
@@ -2716,7 +2706,6 @@ class H5(BaseHTML):
|
|
|
2716
2706
|
Returns:
|
|
2717
2707
|
The component.
|
|
2718
2708
|
"""
|
|
2719
|
-
...
|
|
2720
2709
|
|
|
2721
2710
|
class H6(BaseHTML):
|
|
2722
2711
|
@overload
|
|
@@ -2962,7 +2951,6 @@ class H6(BaseHTML):
|
|
|
2962
2951
|
Returns:
|
|
2963
2952
|
The component.
|
|
2964
2953
|
"""
|
|
2965
|
-
...
|
|
2966
2954
|
|
|
2967
2955
|
class Main(BaseHTML):
|
|
2968
2956
|
@overload
|
|
@@ -3208,7 +3196,6 @@ class Main(BaseHTML):
|
|
|
3208
3196
|
Returns:
|
|
3209
3197
|
The component.
|
|
3210
3198
|
"""
|
|
3211
|
-
...
|
|
3212
3199
|
|
|
3213
3200
|
class Nav(BaseHTML):
|
|
3214
3201
|
@overload
|
|
@@ -3454,7 +3441,6 @@ class Nav(BaseHTML):
|
|
|
3454
3441
|
Returns:
|
|
3455
3442
|
The component.
|
|
3456
3443
|
"""
|
|
3457
|
-
...
|
|
3458
3444
|
|
|
3459
3445
|
class Section(BaseHTML):
|
|
3460
3446
|
@overload
|
|
@@ -3700,7 +3686,6 @@ class Section(BaseHTML):
|
|
|
3700
3686
|
Returns:
|
|
3701
3687
|
The component.
|
|
3702
3688
|
"""
|
|
3703
|
-
...
|
|
3704
3689
|
|
|
3705
3690
|
address = Address.create
|
|
3706
3691
|
article = Article.create
|
|
@@ -256,7 +256,6 @@ class Caption(BaseHTML):
|
|
|
256
256
|
Returns:
|
|
257
257
|
The component.
|
|
258
258
|
"""
|
|
259
|
-
...
|
|
260
259
|
|
|
261
260
|
class Col(BaseHTML):
|
|
262
261
|
@overload
|
|
@@ -504,7 +503,6 @@ class Col(BaseHTML):
|
|
|
504
503
|
Returns:
|
|
505
504
|
The component.
|
|
506
505
|
"""
|
|
507
|
-
...
|
|
508
506
|
|
|
509
507
|
class Colgroup(BaseHTML):
|
|
510
508
|
@overload
|
|
@@ -752,7 +750,6 @@ class Colgroup(BaseHTML):
|
|
|
752
750
|
Returns:
|
|
753
751
|
The component.
|
|
754
752
|
"""
|
|
755
|
-
...
|
|
756
753
|
|
|
757
754
|
class Table(BaseHTML):
|
|
758
755
|
@overload
|
|
@@ -1004,7 +1001,6 @@ class Table(BaseHTML):
|
|
|
1004
1001
|
Returns:
|
|
1005
1002
|
The component.
|
|
1006
1003
|
"""
|
|
1007
|
-
...
|
|
1008
1004
|
|
|
1009
1005
|
class Tbody(BaseHTML):
|
|
1010
1006
|
@overload
|
|
@@ -1250,7 +1246,6 @@ class Tbody(BaseHTML):
|
|
|
1250
1246
|
Returns:
|
|
1251
1247
|
The component.
|
|
1252
1248
|
"""
|
|
1253
|
-
...
|
|
1254
1249
|
|
|
1255
1250
|
class Td(BaseHTML):
|
|
1256
1251
|
@overload
|
|
@@ -1506,7 +1501,6 @@ class Td(BaseHTML):
|
|
|
1506
1501
|
Returns:
|
|
1507
1502
|
The component.
|
|
1508
1503
|
"""
|
|
1509
|
-
...
|
|
1510
1504
|
|
|
1511
1505
|
class Tfoot(BaseHTML):
|
|
1512
1506
|
@overload
|
|
@@ -1752,7 +1746,6 @@ class Tfoot(BaseHTML):
|
|
|
1752
1746
|
Returns:
|
|
1753
1747
|
The component.
|
|
1754
1748
|
"""
|
|
1755
|
-
...
|
|
1756
1749
|
|
|
1757
1750
|
class Th(BaseHTML):
|
|
1758
1751
|
@overload
|
|
@@ -2010,7 +2003,6 @@ class Th(BaseHTML):
|
|
|
2010
2003
|
Returns:
|
|
2011
2004
|
The component.
|
|
2012
2005
|
"""
|
|
2013
|
-
...
|
|
2014
2006
|
|
|
2015
2007
|
class Thead(BaseHTML):
|
|
2016
2008
|
@overload
|
|
@@ -2256,7 +2248,6 @@ class Thead(BaseHTML):
|
|
|
2256
2248
|
Returns:
|
|
2257
2249
|
The component.
|
|
2258
2250
|
"""
|
|
2259
|
-
...
|
|
2260
2251
|
|
|
2261
2252
|
class Tr(BaseHTML):
|
|
2262
2253
|
@overload
|
|
@@ -2502,7 +2493,6 @@ class Tr(BaseHTML):
|
|
|
2502
2493
|
Returns:
|
|
2503
2494
|
The component.
|
|
2504
2495
|
"""
|
|
2505
|
-
...
|
|
2506
2496
|
|
|
2507
2497
|
caption = Caption.create
|
|
2508
2498
|
col = Col.create
|
|
@@ -258,7 +258,6 @@ class Blockquote(BaseHTML):
|
|
|
258
258
|
Returns:
|
|
259
259
|
The component.
|
|
260
260
|
"""
|
|
261
|
-
...
|
|
262
261
|
|
|
263
262
|
class Dd(BaseHTML):
|
|
264
263
|
@overload
|
|
@@ -504,7 +503,6 @@ class Dd(BaseHTML):
|
|
|
504
503
|
Returns:
|
|
505
504
|
The component.
|
|
506
505
|
"""
|
|
507
|
-
...
|
|
508
506
|
|
|
509
507
|
class Div(BaseHTML):
|
|
510
508
|
@overload
|
|
@@ -750,7 +748,6 @@ class Div(BaseHTML):
|
|
|
750
748
|
Returns:
|
|
751
749
|
The component.
|
|
752
750
|
"""
|
|
753
|
-
...
|
|
754
751
|
|
|
755
752
|
class Dl(BaseHTML):
|
|
756
753
|
@overload
|
|
@@ -996,7 +993,6 @@ class Dl(BaseHTML):
|
|
|
996
993
|
Returns:
|
|
997
994
|
The component.
|
|
998
995
|
"""
|
|
999
|
-
...
|
|
1000
996
|
|
|
1001
997
|
class Dt(BaseHTML):
|
|
1002
998
|
@overload
|
|
@@ -1242,7 +1238,6 @@ class Dt(BaseHTML):
|
|
|
1242
1238
|
Returns:
|
|
1243
1239
|
The component.
|
|
1244
1240
|
"""
|
|
1245
|
-
...
|
|
1246
1241
|
|
|
1247
1242
|
class Figcaption(BaseHTML):
|
|
1248
1243
|
@overload
|
|
@@ -1488,7 +1483,6 @@ class Figcaption(BaseHTML):
|
|
|
1488
1483
|
Returns:
|
|
1489
1484
|
The component.
|
|
1490
1485
|
"""
|
|
1491
|
-
...
|
|
1492
1486
|
|
|
1493
1487
|
class Hr(BaseHTML):
|
|
1494
1488
|
@overload
|
|
@@ -1734,7 +1728,6 @@ class Hr(BaseHTML):
|
|
|
1734
1728
|
Returns:
|
|
1735
1729
|
The component.
|
|
1736
1730
|
"""
|
|
1737
|
-
...
|
|
1738
1731
|
|
|
1739
1732
|
class Li(BaseHTML):
|
|
1740
1733
|
@overload
|
|
@@ -1980,7 +1973,6 @@ class Li(BaseHTML):
|
|
|
1980
1973
|
Returns:
|
|
1981
1974
|
The component.
|
|
1982
1975
|
"""
|
|
1983
|
-
...
|
|
1984
1976
|
|
|
1985
1977
|
class Menu(BaseHTML):
|
|
1986
1978
|
@overload
|
|
@@ -2228,7 +2220,6 @@ class Menu(BaseHTML):
|
|
|
2228
2220
|
Returns:
|
|
2229
2221
|
The component.
|
|
2230
2222
|
"""
|
|
2231
|
-
...
|
|
2232
2223
|
|
|
2233
2224
|
class Ol(BaseHTML):
|
|
2234
2225
|
@overload
|
|
@@ -2482,7 +2473,6 @@ class Ol(BaseHTML):
|
|
|
2482
2473
|
Returns:
|
|
2483
2474
|
The component.
|
|
2484
2475
|
"""
|
|
2485
|
-
...
|
|
2486
2476
|
|
|
2487
2477
|
class P(BaseHTML):
|
|
2488
2478
|
@overload
|
|
@@ -2728,7 +2718,6 @@ class P(BaseHTML):
|
|
|
2728
2718
|
Returns:
|
|
2729
2719
|
The component.
|
|
2730
2720
|
"""
|
|
2731
|
-
...
|
|
2732
2721
|
|
|
2733
2722
|
class Pre(BaseHTML):
|
|
2734
2723
|
@overload
|
|
@@ -2974,7 +2963,6 @@ class Pre(BaseHTML):
|
|
|
2974
2963
|
Returns:
|
|
2975
2964
|
The component.
|
|
2976
2965
|
"""
|
|
2977
|
-
...
|
|
2978
2966
|
|
|
2979
2967
|
class Ul(BaseHTML):
|
|
2980
2968
|
@overload
|
|
@@ -3220,7 +3208,6 @@ class Ul(BaseHTML):
|
|
|
3220
3208
|
Returns:
|
|
3221
3209
|
The component.
|
|
3222
3210
|
"""
|
|
3223
|
-
...
|
|
3224
3211
|
|
|
3225
3212
|
class Ins(BaseHTML):
|
|
3226
3213
|
@overload
|
|
@@ -3470,7 +3457,6 @@ class Ins(BaseHTML):
|
|
|
3470
3457
|
Returns:
|
|
3471
3458
|
The component.
|
|
3472
3459
|
"""
|
|
3473
|
-
...
|
|
3474
3460
|
|
|
3475
3461
|
class Del(BaseHTML):
|
|
3476
3462
|
@overload
|
|
@@ -3720,7 +3706,6 @@ class Del(BaseHTML):
|
|
|
3720
3706
|
Returns:
|
|
3721
3707
|
The component.
|
|
3722
3708
|
"""
|
|
3723
|
-
...
|
|
3724
3709
|
|
|
3725
3710
|
blockquote = Blockquote.create
|
|
3726
3711
|
dd = Dd.create
|
|
@@ -67,36 +67,32 @@ class DataTable(Gridjs):
|
|
|
67
67
|
# The annotation should be provided if data is a computed var. We need this to know how to
|
|
68
68
|
# render pandas dataframes.
|
|
69
69
|
if is_computed_var(data) and data._var_type == Any:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
)
|
|
70
|
+
msg = "Annotation of the computed var assigned to the data field should be provided."
|
|
71
|
+
raise ValueError(msg)
|
|
73
72
|
|
|
74
73
|
if (
|
|
75
74
|
columns is not None
|
|
76
75
|
and is_computed_var(columns)
|
|
77
76
|
and columns._var_type == Any
|
|
78
77
|
):
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
)
|
|
78
|
+
msg = "Annotation of the computed var assigned to the column field should be provided."
|
|
79
|
+
raise ValueError(msg)
|
|
82
80
|
|
|
83
81
|
# If data is a pandas dataframe and columns are provided throw an error.
|
|
84
82
|
if (
|
|
85
83
|
types.is_dataframe(type(data))
|
|
86
84
|
or (isinstance(data, Var) and types.is_dataframe(data._var_type))
|
|
87
85
|
) and columns is not None:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
)
|
|
86
|
+
msg = "Cannot pass in both a pandas dataframe and columns to the data_table component."
|
|
87
|
+
raise ValueError(msg)
|
|
91
88
|
|
|
92
89
|
# If data is a list and columns are not provided, throw an error
|
|
93
90
|
if (
|
|
94
91
|
(isinstance(data, Var) and types.typehint_issubclass(data._var_type, list))
|
|
95
92
|
or isinstance(data, list)
|
|
96
93
|
) and columns is None:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
)
|
|
94
|
+
msg = "column field should be specified when the data field is a list type"
|
|
95
|
+
raise ValueError(msg)
|
|
100
96
|
|
|
101
97
|
# Create the component.
|
|
102
98
|
return super().create(
|
|
@@ -126,7 +122,8 @@ class DataTable(Gridjs):
|
|
|
126
122
|
# If given a pandas df break up the data and columns
|
|
127
123
|
data = serialize(self.data)
|
|
128
124
|
if not isinstance(data, dict):
|
|
129
|
-
|
|
125
|
+
msg = "Serialized dataframe should be a dict."
|
|
126
|
+
raise ValueError(msg)
|
|
130
127
|
self.columns = LiteralVar.create(data["columns"])
|
|
131
128
|
self.data = LiteralVar.create(data["data"])
|
|
132
129
|
|
|
@@ -62,7 +62,6 @@ class Gridjs(Component):
|
|
|
62
62
|
Returns:
|
|
63
63
|
The component.
|
|
64
64
|
"""
|
|
65
|
-
...
|
|
66
65
|
|
|
67
66
|
class DataTable(Gridjs):
|
|
68
67
|
@overload
|
|
@@ -129,6 +128,5 @@ class DataTable(Gridjs):
|
|
|
129
128
|
Raises:
|
|
130
129
|
ValueError: If a pandas dataframe is passed in and columns are also provided.
|
|
131
130
|
"""
|
|
132
|
-
...
|
|
133
131
|
|
|
134
132
|
def add_imports(self) -> ImportDict: ...
|
reflex/components/lucide/icon.py
CHANGED
|
@@ -42,27 +42,28 @@ class Icon(LucideIconComponent):
|
|
|
42
42
|
if len(children) == 1:
|
|
43
43
|
child = Var.create(children[0]).guess_type()
|
|
44
44
|
if not isinstance(child, StringVar):
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
)
|
|
45
|
+
msg = f"Icon name must be a string, got {children[0]._var_type if isinstance(children[0], Var) else children[0]}"
|
|
46
|
+
raise AttributeError(msg)
|
|
48
47
|
props["tag"] = children[0]
|
|
49
48
|
else:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
)
|
|
49
|
+
msg = f"Passing multiple children to Icon component is not allowed: remove positional arguments {children[1:]} to fix"
|
|
50
|
+
raise AttributeError(msg)
|
|
53
51
|
if "tag" not in props:
|
|
54
|
-
|
|
52
|
+
msg = "Missing 'tag' keyword-argument for Icon"
|
|
53
|
+
raise AttributeError(msg)
|
|
55
54
|
|
|
56
55
|
tag_var: Var | LiteralVar = Var.create(props.pop("tag"))
|
|
57
56
|
if isinstance(tag_var, LiteralVar):
|
|
58
57
|
if isinstance(tag_var, LiteralStringVar):
|
|
59
58
|
tag = format.to_snake_case(tag_var._var_value.lower())
|
|
60
59
|
else:
|
|
61
|
-
|
|
60
|
+
msg = f"Icon name must be a string, got {type(tag_var)}"
|
|
61
|
+
raise TypeError(msg)
|
|
62
62
|
elif isinstance(tag_var, Var):
|
|
63
63
|
tag_stringified = tag_var.guess_type()
|
|
64
64
|
if not isinstance(tag_stringified, StringVar):
|
|
65
|
-
|
|
65
|
+
msg = f"Icon name must be a string, got {tag_var._var_type}"
|
|
66
|
+
raise TypeError(msg)
|
|
66
67
|
return DynamicIcon.create(name=tag_stringified.replace("_", "-"), **props)
|
|
67
68
|
|
|
68
69
|
if tag not in LUCIDE_ICON_LIST:
|
|
@@ -61,7 +61,6 @@ class LucideIconComponent(Component):
|
|
|
61
61
|
Returns:
|
|
62
62
|
The component.
|
|
63
63
|
"""
|
|
64
|
-
...
|
|
65
64
|
|
|
66
65
|
class Icon(LucideIconComponent):
|
|
67
66
|
@overload
|
|
@@ -121,7 +120,6 @@ class Icon(LucideIconComponent):
|
|
|
121
120
|
Returns:
|
|
122
121
|
The created component.
|
|
123
122
|
"""
|
|
124
|
-
...
|
|
125
123
|
|
|
126
124
|
class DynamicIcon(LucideIconComponent):
|
|
127
125
|
@overload
|
|
@@ -174,7 +172,6 @@ class DynamicIcon(LucideIconComponent):
|
|
|
174
172
|
Returns:
|
|
175
173
|
The component.
|
|
176
174
|
"""
|
|
177
|
-
...
|
|
178
175
|
|
|
179
176
|
LUCIDE_ICON_LIST = [
|
|
180
177
|
"a_arrow_down",
|
|
@@ -170,9 +170,8 @@ class Markdown(Component):
|
|
|
170
170
|
The markdown component.
|
|
171
171
|
"""
|
|
172
172
|
if len(children) != 1 or not isinstance(children[0], (str, Var)):
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
)
|
|
173
|
+
msg = "Markdown component must have exactly one child containing the markdown source."
|
|
174
|
+
raise ValueError(msg)
|
|
176
175
|
|
|
177
176
|
# Update the base component map with the custom component map.
|
|
178
177
|
component_map = {**get_base_component_map(), **props.pop("component_map", {})}
|
|
@@ -319,7 +318,8 @@ let {_LANGUAGE!s} = match ? match[1] : '';
|
|
|
319
318
|
"""
|
|
320
319
|
# Check the tag is valid.
|
|
321
320
|
if tag not in self.component_map:
|
|
322
|
-
|
|
321
|
+
msg = f"No markdown component found for tag: {tag}."
|
|
322
|
+
raise ValueError(msg)
|
|
323
323
|
|
|
324
324
|
special_props = [_PROPS]
|
|
325
325
|
children = [
|
|
@@ -342,10 +342,9 @@ let {_LANGUAGE!s} = match ? match[1] : '';
|
|
|
342
342
|
if children_prop is not None:
|
|
343
343
|
children = []
|
|
344
344
|
# Get the component.
|
|
345
|
-
|
|
345
|
+
return self.component_map[tag](*children, **props).set(
|
|
346
346
|
special_props=special_props
|
|
347
347
|
)
|
|
348
|
-
return component
|
|
349
348
|
|
|
350
349
|
def format_component(self, tag: str, **props) -> str:
|
|
351
350
|
"""Format a component for rendering in the component map.
|
|
@@ -437,7 +436,7 @@ let {_LANGUAGE!s} = match ? match[1] : '';
|
|
|
437
436
|
"""
|
|
438
437
|
|
|
439
438
|
def _render(self) -> Tag:
|
|
440
|
-
|
|
439
|
+
return (
|
|
441
440
|
super()
|
|
442
441
|
._render()
|
|
443
442
|
.add_props(
|
|
@@ -447,4 +446,3 @@ let {_LANGUAGE!s} = match ? match[1] : '';
|
|
|
447
446
|
)
|
|
448
447
|
.remove_props("componentMap", "componentMapHash")
|
|
449
448
|
)
|
|
450
|
-
return tag
|
reflex/components/next/base.py
CHANGED
reflex/components/next/base.pyi
CHANGED
|
@@ -12,8 +12,6 @@ from reflex.event import EventType
|
|
|
12
12
|
from reflex.vars.base import Var
|
|
13
13
|
|
|
14
14
|
class NextComponent(Component):
|
|
15
|
-
...
|
|
16
|
-
|
|
17
15
|
@overload
|
|
18
16
|
@classmethod
|
|
19
17
|
def create( # type: ignore
|
|
@@ -63,4 +61,3 @@ class NextComponent(Component):
|
|
|
63
61
|
Returns:
|
|
64
62
|
The component.
|
|
65
63
|
"""
|
|
66
|
-
...
|
reflex/components/next/image.pyi
CHANGED
reflex/components/next/link.pyi
CHANGED
reflex/components/next/video.pyi
CHANGED