reflex 0.3.7__py3-none-any.whl → 0.3.8__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 -1
- reflex/.templates/apps/demo/code/demo.py +0 -1
- reflex/.templates/apps/sidebar/code/sidebar.py +6 -2
- reflex/.templates/jinja/web/pages/_app.js.jinja2 +4 -1
- reflex/.templates/jinja/web/pages/base_page.js.jinja2 +4 -1
- reflex/.templates/jinja/web/pages/utils.js.jinja2 +24 -0
- reflex/.templates/jinja/web/tailwind.config.js.jinja2 +4 -1
- reflex/.templates/web/utils/helpers/dataeditor.js +56 -54
- reflex/__init__.py +4 -2
- reflex/__init__.pyi +6 -2
- reflex/app.py +43 -9
- reflex/app.pyi +2 -1
- reflex/app_module_for_backend.py +13 -0
- reflex/compiler/compiler.py +19 -0
- reflex/components/__init__.py +9 -232
- reflex/components/base/__init__.py +5 -1
- reflex/components/base/app_wrap.py +1 -1
- reflex/components/base/app_wrap.pyi +1 -1
- reflex/components/base/document.py +0 -8
- reflex/components/base/document.pyi +0 -80
- reflex/components/{layout → base}/fragment.pyi +1 -1
- reflex/components/chakra/__init__.py +202 -19
- reflex/components/{libs/chakra.pyi → chakra/base.pyi} +1 -1
- reflex/components/chakra/datadisplay/__init__.py +12 -0
- reflex/components/{datadisplay → chakra/datadisplay}/badge.py +1 -1
- reflex/components/{datadisplay → chakra/datadisplay}/badge.pyi +2 -2
- reflex/components/{datadisplay → chakra/datadisplay}/code.py +5 -5
- reflex/components/{datadisplay → chakra/datadisplay}/code.pyi +5 -5
- reflex/components/{datadisplay → chakra/datadisplay}/divider.py +4 -2
- reflex/components/{datadisplay → chakra/datadisplay}/divider.pyi +5 -3
- reflex/components/{datadisplay → chakra/datadisplay}/keyboard_key.py +1 -1
- reflex/components/{datadisplay → chakra/datadisplay}/keyboard_key.pyi +2 -2
- reflex/components/{datadisplay → chakra/datadisplay}/list.py +3 -3
- reflex/components/{datadisplay → chakra/datadisplay}/list.pyi +4 -4
- reflex/components/{datadisplay → chakra/datadisplay}/stat.py +1 -1
- reflex/components/{datadisplay → chakra/datadisplay}/stat.pyi +2 -2
- reflex/components/{datadisplay → chakra/datadisplay}/table.py +2 -2
- reflex/components/{datadisplay → chakra/datadisplay}/table.pyi +3 -3
- reflex/components/{datadisplay → chakra/datadisplay}/tag.py +2 -2
- reflex/components/{datadisplay → chakra/datadisplay}/tag.pyi +3 -3
- reflex/components/{disclosure → chakra/disclosure}/accordion.py +1 -1
- reflex/components/{disclosure → chakra/disclosure}/accordion.pyi +2 -2
- reflex/components/{disclosure → chakra/disclosure}/tabs.py +2 -2
- reflex/components/{disclosure → chakra/disclosure}/tabs.pyi +3 -3
- reflex/components/{disclosure → chakra/disclosure}/transition.py +1 -1
- reflex/components/{disclosure → chakra/disclosure}/transition.pyi +2 -2
- reflex/components/{disclosure → chakra/disclosure}/visuallyhidden.py +1 -1
- reflex/components/{disclosure → chakra/disclosure}/visuallyhidden.pyi +2 -2
- reflex/components/{feedback → chakra/feedback}/alert.py +2 -2
- reflex/components/{feedback → chakra/feedback}/alert.pyi +2 -6
- reflex/components/{feedback → chakra/feedback}/circularprogress.py +1 -1
- reflex/components/{feedback → chakra/feedback}/circularprogress.pyi +2 -2
- reflex/components/{feedback → chakra/feedback}/progress.py +1 -1
- reflex/components/{feedback → chakra/feedback}/progress.pyi +2 -2
- reflex/components/{feedback → chakra/feedback}/skeleton.py +1 -1
- reflex/components/{feedback → chakra/feedback}/skeleton.pyi +2 -2
- reflex/components/{feedback → chakra/feedback}/spinner.py +1 -1
- reflex/components/{feedback → chakra/feedback}/spinner.pyi +2 -2
- reflex/components/{forms → chakra/forms}/__init__.py +2 -11
- reflex/components/{forms → chakra/forms}/button.py +3 -1
- reflex/components/{forms → chakra/forms}/button.pyi +2 -2
- reflex/components/{forms → chakra/forms}/checkbox.py +1 -1
- reflex/components/{forms → chakra/forms}/checkbox.pyi +2 -6
- reflex/components/{forms → chakra/forms}/colormodeswitch.py +10 -2
- reflex/components/{forms → chakra/forms}/colormodeswitch.pyi +83 -3
- reflex/components/{forms → chakra/forms}/date_picker.py +1 -1
- reflex/components/{forms → chakra/forms}/date_picker.pyi +2 -2
- reflex/components/{forms → chakra/forms}/date_time_picker.py +1 -1
- reflex/components/{forms → chakra/forms}/date_time_picker.pyi +2 -2
- reflex/components/{forms → chakra/forms}/editable.py +1 -1
- reflex/components/{forms → chakra/forms}/editable.pyi +2 -2
- reflex/components/{forms → chakra/forms}/email.py +1 -1
- reflex/components/{forms → chakra/forms}/email.pyi +2 -2
- reflex/components/{forms → chakra/forms}/form.py +1 -1
- reflex/components/{forms → chakra/forms}/form.pyi +2 -2
- reflex/components/{forms → chakra/forms}/iconbutton.py +1 -1
- reflex/components/{forms → chakra/forms}/iconbutton.pyi +2 -2
- reflex/components/{forms → chakra/forms}/input.py +5 -4
- reflex/components/{forms → chakra/forms}/input.pyi +59 -5
- reflex/components/{forms → chakra/forms}/numberinput.py +6 -2
- reflex/components/{forms → chakra/forms}/numberinput.pyi +10 -2
- reflex/components/{forms → chakra/forms}/password.py +1 -1
- reflex/components/{forms → chakra/forms}/password.pyi +2 -2
- reflex/components/{forms → chakra/forms}/pininput.py +1 -1
- reflex/components/{forms → chakra/forms}/pininput.pyi +2 -2
- reflex/components/{forms → chakra/forms}/radio.py +3 -3
- reflex/components/{forms → chakra/forms}/radio.pyi +4 -4
- reflex/components/{forms → chakra/forms}/rangeslider.py +1 -1
- reflex/components/{forms → chakra/forms}/rangeslider.pyi +2 -2
- reflex/components/{forms → chakra/forms}/select.py +3 -3
- reflex/components/{forms → chakra/forms}/select.pyi +4 -4
- reflex/components/{forms → chakra/forms}/slider.py +4 -3
- reflex/components/{forms → chakra/forms}/slider.pyi +5 -4
- reflex/components/{forms → chakra/forms}/switch.py +1 -1
- reflex/components/{forms → chakra/forms}/switch.pyi +2 -2
- reflex/components/{forms → chakra/forms}/textarea.py +2 -2
- reflex/components/{forms → chakra/forms}/textarea.pyi +3 -3
- reflex/components/chakra/forms/time_picker.py +11 -0
- reflex/components/chakra/forms/time_picker.pyi +129 -0
- reflex/components/{layout → chakra/layout}/__init__.py +1 -20
- reflex/components/{layout → chakra/layout}/aspect_ratio.py +1 -1
- reflex/components/{layout → chakra/layout}/aspect_ratio.pyi +2 -2
- reflex/components/{layout → chakra/layout}/box.py +1 -1
- reflex/components/{layout → chakra/layout}/box.pyi +2 -2
- reflex/components/{layout → chakra/layout}/card.py +2 -2
- reflex/components/{layout → chakra/layout}/card.pyi +3 -3
- reflex/components/{layout → chakra/layout}/center.py +1 -1
- reflex/components/{layout → chakra/layout}/center.pyi +2 -2
- reflex/components/{layout → chakra/layout}/container.py +1 -1
- reflex/components/{layout → chakra/layout}/container.pyi +2 -2
- reflex/components/{layout → chakra/layout}/flex.py +1 -1
- reflex/components/{layout → chakra/layout}/flex.pyi +2 -2
- reflex/components/{layout → chakra/layout}/grid.py +1 -1
- reflex/components/{layout → chakra/layout}/grid.pyi +2 -2
- reflex/components/{layout → chakra/layout}/html.py +1 -1
- reflex/components/{layout → chakra/layout}/html.pyi +2 -2
- reflex/components/{layout → chakra/layout}/spacer.py +1 -1
- reflex/components/{layout → chakra/layout}/spacer.pyi +2 -2
- reflex/components/{layout → chakra/layout}/stack.py +1 -1
- reflex/components/{layout → chakra/layout}/stack.pyi +2 -2
- reflex/components/{layout → chakra/layout}/wrap.py +1 -1
- reflex/components/{layout → chakra/layout}/wrap.pyi +2 -2
- reflex/components/chakra/media/__init__.py +7 -0
- reflex/components/{media → chakra/media}/avatar.py +1 -1
- reflex/components/{media → chakra/media}/avatar.pyi +2 -2
- reflex/components/chakra/media/icon.py +110 -0
- reflex/components/{media → chakra/media}/icon.pyi +2 -2
- reflex/components/chakra/media/image.py +1 -1
- reflex/components/chakra/media/image.pyi +1 -1
- reflex/components/{navigation → chakra/navigation}/__init__.py +0 -1
- reflex/components/{navigation → chakra/navigation}/breadcrumb.py +3 -3
- reflex/components/{navigation → chakra/navigation}/breadcrumb.pyi +4 -4
- reflex/components/{navigation → chakra/navigation}/link.py +2 -2
- reflex/components/{navigation → chakra/navigation}/link.pyi +3 -3
- reflex/components/{navigation → chakra/navigation}/linkoverlay.py +1 -1
- reflex/components/{navigation → chakra/navigation}/linkoverlay.pyi +2 -2
- reflex/components/{navigation → chakra/navigation}/stepper.py +1 -1
- reflex/components/{navigation → chakra/navigation}/stepper.pyi +2 -2
- reflex/components/{overlay → chakra/overlay}/__init__.py +0 -1
- reflex/components/{overlay → chakra/overlay}/alertdialog.py +2 -2
- reflex/components/{overlay → chakra/overlay}/alertdialog.pyi +3 -3
- reflex/components/{overlay → chakra/overlay}/drawer.py +3 -3
- reflex/components/{overlay → chakra/overlay}/drawer.pyi +4 -4
- reflex/components/{overlay → chakra/overlay}/menu.py +4 -6
- reflex/components/{overlay → chakra/overlay}/menu.pyi +4 -4
- reflex/components/{overlay → chakra/overlay}/modal.py +2 -2
- reflex/components/{overlay → chakra/overlay}/modal.pyi +3 -3
- reflex/components/{overlay → chakra/overlay}/popover.py +2 -2
- reflex/components/{overlay → chakra/overlay}/popover.pyi +3 -3
- reflex/components/{overlay → chakra/overlay}/tooltip.py +1 -1
- reflex/components/{overlay → chakra/overlay}/tooltip.pyi +2 -2
- reflex/components/{typography → chakra/typography}/__init__.py +0 -1
- reflex/components/{typography → chakra/typography}/heading.py +1 -1
- reflex/components/{typography → chakra/typography}/heading.pyi +2 -2
- reflex/components/{typography → chakra/typography}/highlight.py +1 -1
- reflex/components/{typography → chakra/typography}/highlight.pyi +2 -2
- reflex/components/{typography → chakra/typography}/span.py +1 -1
- reflex/components/{typography → chakra/typography}/span.pyi +2 -2
- reflex/components/{typography → chakra/typography}/text.py +1 -1
- reflex/components/{typography → chakra/typography}/text.pyi +2 -2
- reflex/components/component.py +7 -8
- reflex/components/core/__init__.py +22 -0
- reflex/components/{overlay → core}/banner.py +4 -3
- reflex/components/{overlay → core}/banner.pyi +5 -4
- reflex/components/{navigation → core}/client_side_routing.py +1 -1
- reflex/components/{navigation → core}/client_side_routing.pyi +2 -2
- reflex/components/{layout → core}/cond.py +1 -1
- reflex/components/{forms → core}/debounce.py +1 -1
- reflex/components/{forms → core}/debounce.pyi +2 -2
- reflex/components/{layout → core}/foreach.py +18 -2
- reflex/components/core/match.py +257 -0
- reflex/components/{layout → core}/responsive.py +1 -1
- reflex/components/{forms → core}/upload.py +2 -2
- reflex/components/{forms → core}/upload.pyi +3 -3
- reflex/components/datadisplay/__init__.py +4 -13
- reflex/components/el/elements/inline.py +4 -0
- reflex/components/el/elements/inline.pyi +3 -0
- reflex/components/gridjs/__init__.py +5 -0
- reflex/components/{datadisplay → gridjs}/datatable.pyi +1 -1
- reflex/components/literals.py +27 -0
- reflex/components/markdown/__init__.py +5 -0
- reflex/components/{typography → markdown}/markdown.py +16 -6
- reflex/components/{typography → markdown}/markdown.pyi +10 -5
- reflex/components/media/__init__.py +1 -8
- reflex/components/media/icon.py +2 -110
- reflex/components/moment/__init__.py +5 -0
- reflex/components/{datadisplay → moment}/moment.pyi +1 -1
- reflex/components/next/__init__.py +2 -0
- reflex/components/{navigation/nextlink.pyi → next/link.pyi} +1 -1
- reflex/components/plotly/__init__.py +5 -0
- reflex/components/{graphing → plotly}/plotly.pyi +1 -1
- reflex/components/radix/primitives/__init__.py +12 -1
- reflex/components/radix/primitives/accordion.py +33 -68
- reflex/components/radix/primitives/accordion.pyi +6 -89
- reflex/components/radix/primitives/base.py +27 -0
- reflex/components/radix/primitives/base.pyi +95 -0
- reflex/components/radix/primitives/form.py +267 -0
- reflex/components/radix/primitives/form.pyi +740 -0
- reflex/components/radix/primitives/progress.py +84 -0
- reflex/components/radix/primitives/progress.pyi +268 -0
- reflex/components/radix/primitives/slider.py +179 -0
- reflex/components/radix/primitives/slider.pyi +452 -0
- reflex/components/radix/themes/base.py +43 -31
- reflex/components/radix/themes/base.pyi +223 -29
- reflex/components/radix/themes/components/__init__.py +18 -3
- reflex/components/radix/themes/components/alertdialog.py +27 -6
- reflex/components/radix/themes/components/alertdialog.pyi +713 -2
- reflex/components/radix/themes/components/aspectratio.py +1 -1
- reflex/components/radix/themes/components/aspectratio.pyi +67 -2
- reflex/components/radix/themes/components/avatar.py +0 -3
- reflex/components/radix/themes/components/avatar.pyi +13 -13
- reflex/components/radix/themes/components/badge.py +1 -4
- reflex/components/radix/themes/components/badge.pyi +11 -11
- reflex/components/radix/themes/components/button.py +1 -1
- reflex/components/radix/themes/components/button.pyi +15 -11
- reflex/components/radix/themes/components/callout.pyi +144 -12
- reflex/components/radix/themes/components/card.py +1 -1
- reflex/components/radix/themes/components/card.pyi +68 -1
- reflex/components/radix/themes/components/checkbox.pyi +14 -12
- reflex/components/radix/themes/components/contextmenu.pyi +402 -8
- reflex/components/radix/themes/components/dialog.py +6 -0
- reflex/components/radix/themes/components/dialog.pyi +518 -0
- reflex/components/radix/themes/components/dropdownmenu.pyi +337 -8
- reflex/components/radix/themes/components/hovercard.pyi +195 -0
- reflex/components/radix/themes/components/iconbutton.pyi +14 -12
- reflex/components/radix/themes/components/icons.py +2 -2
- reflex/components/radix/themes/components/inset.pyi +65 -0
- reflex/components/radix/themes/components/popover.pyi +260 -0
- reflex/components/radix/themes/components/radiogroup.py +1 -1
- reflex/components/radix/themes/components/radiogroup.pyi +78 -9
- reflex/components/radix/themes/components/scrollarea.pyi +65 -0
- reflex/components/radix/themes/components/select.pyi +342 -13
- reflex/components/radix/themes/components/separator.pyi +7 -5
- reflex/components/radix/themes/components/slider.py +4 -4
- reflex/components/radix/themes/components/slider.pyi +17 -13
- reflex/components/radix/themes/components/switch.pyi +20 -18
- reflex/components/radix/themes/components/table.py +1 -1
- reflex/components/radix/themes/components/table.pyi +458 -1
- reflex/components/radix/themes/components/tabs.py +4 -4
- reflex/components/radix/themes/components/tabs.pyi +263 -3
- reflex/components/radix/themes/components/textarea.py +1 -1
- reflex/components/radix/themes/components/textarea.pyi +1 -1
- reflex/components/radix/themes/components/textfield.py +1 -1
- reflex/components/radix/themes/components/textfield.pyi +18 -14
- reflex/components/radix/themes/components/tooltip.py +15 -0
- reflex/components/radix/themes/components/tooltip.pyi +205 -0
- reflex/components/radix/themes/layout/base.pyi +65 -0
- reflex/components/radix/themes/layout/box.pyi +65 -0
- reflex/components/radix/themes/layout/container.pyi +65 -0
- reflex/components/radix/themes/layout/flex.pyi +65 -0
- reflex/components/radix/themes/layout/grid.pyi +65 -0
- reflex/components/radix/themes/layout/section.pyi +65 -0
- reflex/components/radix/themes/typography/blockquote.pyi +16 -14
- reflex/components/radix/themes/typography/code.pyi +22 -20
- reflex/components/radix/themes/typography/em.pyi +65 -0
- reflex/components/radix/themes/typography/heading.pyi +30 -28
- reflex/components/radix/themes/typography/kbd.pyi +65 -0
- reflex/components/radix/themes/typography/link.py +2 -1
- reflex/components/radix/themes/typography/link.pyi +121 -28
- reflex/components/radix/themes/typography/quote.pyi +66 -0
- reflex/components/radix/themes/typography/strong.pyi +65 -0
- reflex/components/radix/themes/typography/text.pyi +30 -28
- reflex/components/react_player/__init__.py +7 -0
- reflex/components/react_player/audio.py +8 -0
- reflex/components/{media → react_player}/audio.pyi +3 -3
- reflex/components/{libs → react_player}/react_player.py +1 -1
- reflex/components/{libs → react_player}/react_player.pyi +3 -3
- reflex/components/react_player/video.py +8 -0
- reflex/components/{media → react_player}/video.pyi +3 -3
- reflex/components/{graphing/recharts → recharts}/cartesian.pyi +1 -1
- reflex/components/{graphing/recharts → recharts}/charts.py +1 -1
- reflex/components/{graphing/recharts → recharts}/charts.pyi +2 -2
- reflex/components/{graphing/recharts → recharts}/general.pyi +1 -1
- reflex/components/{graphing/recharts → recharts}/polar.pyi +1 -1
- reflex/components/{graphing/recharts → recharts}/recharts.pyi +1 -1
- reflex/components/suneditor/__init__.py +5 -0
- reflex/components/{forms → suneditor}/editor.pyi +1 -1
- reflex/components/tags/__init__.py +1 -0
- reflex/components/tags/iter_tag.py +3 -3
- reflex/components/tags/match_tag.py +19 -0
- reflex/constants/base.py +2 -0
- reflex/constants/installer.py +1 -0
- reflex/constants/style.py +1 -1
- reflex/event.py +1 -1
- reflex/reflex.py +14 -12
- reflex/state.py +14 -0
- reflex/style.py +1 -1
- reflex/testing.py +59 -9
- reflex/utils/build.py +7 -1
- reflex/utils/exceptions.py +6 -0
- reflex/utils/exec.py +2 -2
- reflex/utils/export.py +1 -1
- reflex/utils/format.py +41 -4
- reflex/utils/prerequisites.py +37 -6
- reflex/utils/types.py +2 -2
- reflex/vars.py +25 -1
- {reflex-0.3.7.dist-info → reflex-0.3.8.dist-info}/METADATA +7 -2
- reflex-0.3.8.dist-info/RECORD +492 -0
- reflex/components/graphing/__init__.py +0 -5
- reflex/components/libs/__init__.py +0 -31
- reflex/components/media/audio.py +0 -8
- reflex/components/media/image.pyi +0 -123
- reflex/components/media/video.py +0 -8
- reflex-0.3.7.dist-info/RECORD +0 -470
- /reflex/components/{layout → base}/fragment.py +0 -0
- /reflex/components/{libs/chakra.py → chakra/base.py} +0 -0
- /reflex/components/{disclosure → chakra/disclosure}/__init__.py +0 -0
- /reflex/components/{feedback → chakra/feedback}/__init__.py +0 -0
- /reflex/components/{forms → chakra/forms}/multiselect.py +0 -0
- /reflex/components/{datadisplay → gridjs}/datatable.py +0 -0
- /reflex/components/{datadisplay → moment}/moment.py +0 -0
- /reflex/components/{navigation/nextlink.py → next/link.py} +0 -0
- /reflex/components/{graphing → plotly}/plotly.py +0 -0
- /reflex/components/{graphing/recharts → recharts}/__init__.py +0 -0
- /reflex/components/{graphing/recharts → recharts}/cartesian.py +0 -0
- /reflex/components/{graphing/recharts → recharts}/general.py +0 -0
- /reflex/components/{graphing/recharts → recharts}/polar.py +0 -0
- /reflex/components/{graphing/recharts → recharts}/recharts.py +0 -0
- /reflex/components/{forms → suneditor}/editor.py +0 -0
- {reflex-0.3.7.dist-info → reflex-0.3.8.dist-info}/LICENSE +0 -0
- {reflex-0.3.7.dist-info → reflex-0.3.8.dist-info}/WHEEL +0 -0
- {reflex-0.3.7.dist-info → reflex-0.3.8.dist-info}/entry_points.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Stub file for reflex/components/
|
|
1
|
+
"""Stub file for reflex/components/core/debounce.py"""
|
|
2
2
|
# ------------------- DO NOT EDIT ----------------------
|
|
3
3
|
# This file was generated by `scripts/pyi_generator.py`!
|
|
4
4
|
# ------------------------------------------------------
|
|
@@ -8,7 +8,7 @@ from reflex.vars import Var, BaseVar, ComputedVar
|
|
|
8
8
|
from reflex.event import EventChain, EventHandler, EventSpec
|
|
9
9
|
from reflex.style import Style
|
|
10
10
|
from typing import Any, Type
|
|
11
|
-
from reflex.components import Component
|
|
11
|
+
from reflex.components.component import Component
|
|
12
12
|
from reflex.constants import EventTriggers
|
|
13
13
|
from reflex.vars import Var, VarData
|
|
14
14
|
|
|
@@ -3,10 +3,10 @@ from __future__ import annotations
|
|
|
3
3
|
|
|
4
4
|
import inspect
|
|
5
5
|
from hashlib import md5
|
|
6
|
-
from typing import Any, Callable, Iterable
|
|
6
|
+
from typing import Any, Callable, Iterable, Optional
|
|
7
7
|
|
|
8
|
+
from reflex.components.base.fragment import Fragment
|
|
8
9
|
from reflex.components.component import Component
|
|
9
|
-
from reflex.components.layout.fragment import Fragment
|
|
10
10
|
from reflex.components.tags import IterTag
|
|
11
11
|
from reflex.constants import MemoizationMode
|
|
12
12
|
from reflex.vars import Var
|
|
@@ -23,6 +23,17 @@ class Foreach(Component):
|
|
|
23
23
|
# A function from the render args to the component.
|
|
24
24
|
render_fn: Callable = Fragment.create
|
|
25
25
|
|
|
26
|
+
# The theme if set.
|
|
27
|
+
theme: Optional[Component] = None
|
|
28
|
+
|
|
29
|
+
def _apply_theme(self, theme: Component):
|
|
30
|
+
"""Apply the theme to this component.
|
|
31
|
+
|
|
32
|
+
Args:
|
|
33
|
+
theme: The theme to apply.
|
|
34
|
+
"""
|
|
35
|
+
self.theme = theme
|
|
36
|
+
|
|
26
37
|
@classmethod
|
|
27
38
|
def create(cls, iterable: Var[Iterable], render_fn: Callable, **props) -> Foreach:
|
|
28
39
|
"""Create a foreach component.
|
|
@@ -85,6 +96,11 @@ class Foreach(Component):
|
|
|
85
96
|
"""
|
|
86
97
|
tag = self._render()
|
|
87
98
|
component = tag.render_component()
|
|
99
|
+
|
|
100
|
+
# Apply the theme to the children.
|
|
101
|
+
if self.theme is not None:
|
|
102
|
+
component.apply_theme(self.theme)
|
|
103
|
+
|
|
88
104
|
return dict(
|
|
89
105
|
tag.add_props(
|
|
90
106
|
**self.event_triggers,
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
"""rx.match."""
|
|
2
|
+
import textwrap
|
|
3
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
4
|
+
|
|
5
|
+
from reflex.components.base import Fragment
|
|
6
|
+
from reflex.components.component import BaseComponent, Component, MemoizationLeaf
|
|
7
|
+
from reflex.components.tags import MatchTag, Tag
|
|
8
|
+
from reflex.utils import format, imports, types
|
|
9
|
+
from reflex.utils.exceptions import MatchTypeError
|
|
10
|
+
from reflex.vars import BaseVar, Var, VarData
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Match(MemoizationLeaf):
|
|
14
|
+
"""Match cases based on a condition."""
|
|
15
|
+
|
|
16
|
+
# The condition to determine which case to match.
|
|
17
|
+
cond: Var[Any]
|
|
18
|
+
|
|
19
|
+
# The list of match cases to be matched.
|
|
20
|
+
match_cases: List[Any] = []
|
|
21
|
+
|
|
22
|
+
# The catchall case to match.
|
|
23
|
+
default: Any
|
|
24
|
+
|
|
25
|
+
@classmethod
|
|
26
|
+
def create(cls, cond: Any, *cases) -> Union[Component, BaseVar]:
|
|
27
|
+
"""Create a Match Component.
|
|
28
|
+
|
|
29
|
+
Args:
|
|
30
|
+
cond: The condition to determine which case to match.
|
|
31
|
+
cases: This list of cases to match.
|
|
32
|
+
|
|
33
|
+
Returns:
|
|
34
|
+
The match component.
|
|
35
|
+
|
|
36
|
+
Raises:
|
|
37
|
+
ValueError: When a default case is not provided for cases with Var return types.
|
|
38
|
+
"""
|
|
39
|
+
match_cond_var = cls._create_condition_var(cond)
|
|
40
|
+
cases, default = cls._process_cases(list(cases))
|
|
41
|
+
match_cases = cls._process_match_cases(cases)
|
|
42
|
+
|
|
43
|
+
cls._validate_return_types(match_cases)
|
|
44
|
+
|
|
45
|
+
if default is None and types._issubclass(type(match_cases[0][-1]), BaseVar):
|
|
46
|
+
raise ValueError(
|
|
47
|
+
"For cases with return types as Vars, a default case must be provided"
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
return cls._create_match_cond_var_or_component(
|
|
51
|
+
match_cond_var, match_cases, default
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def _create_condition_var(cls, cond: Any) -> BaseVar:
|
|
56
|
+
"""Convert the condition to a Var.
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
cond: The condition.
|
|
60
|
+
|
|
61
|
+
Returns:
|
|
62
|
+
The condition as a base var
|
|
63
|
+
|
|
64
|
+
Raises:
|
|
65
|
+
ValueError: If the condition is not provided.
|
|
66
|
+
"""
|
|
67
|
+
match_cond_var = Var.create(cond)
|
|
68
|
+
if match_cond_var is None:
|
|
69
|
+
raise ValueError("The condition must be set")
|
|
70
|
+
return match_cond_var # type: ignore
|
|
71
|
+
|
|
72
|
+
@classmethod
|
|
73
|
+
def _process_cases(
|
|
74
|
+
cls, cases: List
|
|
75
|
+
) -> Tuple[List, Optional[Union[BaseVar, BaseComponent]]]:
|
|
76
|
+
"""Process the list of match cases and the catchall default case.
|
|
77
|
+
|
|
78
|
+
Args:
|
|
79
|
+
cases: The list of match cases.
|
|
80
|
+
|
|
81
|
+
Returns:
|
|
82
|
+
The default case and the list of match case tuples.
|
|
83
|
+
|
|
84
|
+
Raises:
|
|
85
|
+
ValueError: If there are multiple default cases.
|
|
86
|
+
"""
|
|
87
|
+
default = None
|
|
88
|
+
|
|
89
|
+
if len([case for case in cases if not isinstance(case, tuple)]) > 1:
|
|
90
|
+
raise ValueError("rx.match can only have one default case.")
|
|
91
|
+
|
|
92
|
+
# Get the default case which should be the last non-tuple arg
|
|
93
|
+
if not isinstance(cases[-1], tuple):
|
|
94
|
+
default = cases.pop()
|
|
95
|
+
default = (
|
|
96
|
+
Var.create(default, _var_is_string=type(default) is str)
|
|
97
|
+
if not isinstance(default, BaseComponent)
|
|
98
|
+
else default
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
return cases, default # type: ignore
|
|
102
|
+
|
|
103
|
+
@classmethod
|
|
104
|
+
def _process_match_cases(cls, cases: List) -> List[List[BaseVar]]:
|
|
105
|
+
"""Process the individual match cases.
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
cases: The match cases.
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
The processed match cases.
|
|
112
|
+
|
|
113
|
+
Raises:
|
|
114
|
+
ValueError: If the default case is not the last case or the tuple elements are less than 2.
|
|
115
|
+
"""
|
|
116
|
+
match_cases = []
|
|
117
|
+
for case in cases:
|
|
118
|
+
if not isinstance(case, tuple):
|
|
119
|
+
raise ValueError(
|
|
120
|
+
"rx.match should have tuples of cases and a default case as the last argument."
|
|
121
|
+
)
|
|
122
|
+
# There should be at least two elements in a case tuple(a condition and return value)
|
|
123
|
+
if len(case) < 2:
|
|
124
|
+
raise ValueError(
|
|
125
|
+
"A case tuple should have at least a match case element and a return value."
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
case_list = []
|
|
129
|
+
for element in case:
|
|
130
|
+
# convert all non component element to vars.
|
|
131
|
+
el = (
|
|
132
|
+
Var.create(element, _var_is_string=type(element) is str)
|
|
133
|
+
if not isinstance(element, BaseComponent)
|
|
134
|
+
else element
|
|
135
|
+
)
|
|
136
|
+
if not isinstance(el, (BaseVar, BaseComponent)):
|
|
137
|
+
raise ValueError("Case element must be a var or component")
|
|
138
|
+
case_list.append(el)
|
|
139
|
+
|
|
140
|
+
match_cases.append(case_list)
|
|
141
|
+
|
|
142
|
+
return match_cases
|
|
143
|
+
|
|
144
|
+
@classmethod
|
|
145
|
+
def _validate_return_types(cls, match_cases: List[List[BaseVar]]) -> None:
|
|
146
|
+
"""Validate that match cases have the same return types.
|
|
147
|
+
|
|
148
|
+
Args:
|
|
149
|
+
match_cases: The match cases.
|
|
150
|
+
|
|
151
|
+
Raises:
|
|
152
|
+
MatchTypeError: If the return types of cases are different.
|
|
153
|
+
"""
|
|
154
|
+
first_case_return = match_cases[0][-1]
|
|
155
|
+
return_type = type(first_case_return)
|
|
156
|
+
|
|
157
|
+
if types._isinstance(first_case_return, BaseComponent):
|
|
158
|
+
return_type = BaseComponent
|
|
159
|
+
elif types._isinstance(first_case_return, BaseVar):
|
|
160
|
+
return_type = BaseVar
|
|
161
|
+
|
|
162
|
+
for index, case in enumerate(match_cases):
|
|
163
|
+
if not types._issubclass(type(case[-1]), return_type):
|
|
164
|
+
raise MatchTypeError(
|
|
165
|
+
f"Match cases should have the same return types. Case {index} with return "
|
|
166
|
+
f"value `{case[-1]._var_name if isinstance(case[-1], BaseVar) else textwrap.shorten(str(case[-1]), width=250)}`"
|
|
167
|
+
f" of type {type(case[-1])!r} is not {return_type}"
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
@classmethod
|
|
171
|
+
def _create_match_cond_var_or_component(
|
|
172
|
+
cls,
|
|
173
|
+
match_cond_var: Var,
|
|
174
|
+
match_cases: List[List[BaseVar]],
|
|
175
|
+
default: Optional[Union[BaseVar, BaseComponent]],
|
|
176
|
+
) -> Union[Component, BaseVar]:
|
|
177
|
+
"""Create and return the match condition var or component.
|
|
178
|
+
|
|
179
|
+
Args:
|
|
180
|
+
match_cond_var: The match condition.
|
|
181
|
+
match_cases: The list of match cases.
|
|
182
|
+
default: The default case.
|
|
183
|
+
|
|
184
|
+
Returns:
|
|
185
|
+
The match component wrapped in a fragment or the match var.
|
|
186
|
+
|
|
187
|
+
Raises:
|
|
188
|
+
ValueError: If the return types are not vars when creating a match var for Var types.
|
|
189
|
+
"""
|
|
190
|
+
if default is None and types._issubclass(
|
|
191
|
+
type(match_cases[0][-1]), BaseComponent
|
|
192
|
+
):
|
|
193
|
+
default = Fragment.create()
|
|
194
|
+
|
|
195
|
+
if types._issubclass(type(match_cases[0][-1]), BaseComponent):
|
|
196
|
+
return Fragment.create(
|
|
197
|
+
cls(
|
|
198
|
+
cond=match_cond_var,
|
|
199
|
+
match_cases=match_cases,
|
|
200
|
+
default=default,
|
|
201
|
+
)
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
# Validate the match cases (as well as the default case) to have Var return types.
|
|
205
|
+
if any(
|
|
206
|
+
case for case in match_cases if not types._isinstance(case[-1], BaseVar)
|
|
207
|
+
) or not types._isinstance(default, BaseVar):
|
|
208
|
+
raise ValueError("Return types of match cases should be Vars.")
|
|
209
|
+
|
|
210
|
+
# match cases and default should all be Vars at this point.
|
|
211
|
+
# Retrieve var data of every var in the match cases and default.
|
|
212
|
+
var_data = [
|
|
213
|
+
*[el._var_data for case in match_cases for el in case],
|
|
214
|
+
default._var_data, # type: ignore
|
|
215
|
+
]
|
|
216
|
+
|
|
217
|
+
return match_cond_var._replace(
|
|
218
|
+
_var_name=format.format_match(
|
|
219
|
+
cond=match_cond_var._var_full_name,
|
|
220
|
+
match_cases=match_cases, # type: ignore
|
|
221
|
+
default=default, # type: ignore
|
|
222
|
+
),
|
|
223
|
+
_var_type=default._var_type, # type: ignore
|
|
224
|
+
_var_is_local=False,
|
|
225
|
+
_var_full_name_needs_state_prefix=False,
|
|
226
|
+
merge_var_data=VarData.merge(*var_data),
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
def _render(self) -> Tag:
|
|
230
|
+
return MatchTag(
|
|
231
|
+
cond=self.cond, match_cases=self.match_cases, default=self.default
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
def render(self) -> Dict:
|
|
235
|
+
"""Render the component.
|
|
236
|
+
|
|
237
|
+
Returns:
|
|
238
|
+
The dictionary for template of component.
|
|
239
|
+
"""
|
|
240
|
+
tag = self._render()
|
|
241
|
+
tag.name = "match"
|
|
242
|
+
return dict(tag)
|
|
243
|
+
|
|
244
|
+
def _get_imports(self):
|
|
245
|
+
merged_imports = super()._get_imports()
|
|
246
|
+
# Obtain the imports of all components the in match case.
|
|
247
|
+
for case in self.match_cases:
|
|
248
|
+
if isinstance(case[-1], BaseComponent):
|
|
249
|
+
merged_imports = imports.merge_imports(
|
|
250
|
+
merged_imports, case[-1].get_imports()
|
|
251
|
+
)
|
|
252
|
+
# Get the import of the default case component.
|
|
253
|
+
if isinstance(self.default, BaseComponent):
|
|
254
|
+
merged_imports = imports.merge_imports(
|
|
255
|
+
merged_imports, self.default.get_imports()
|
|
256
|
+
)
|
|
257
|
+
return merged_imports
|
|
@@ -4,9 +4,9 @@ from __future__ import annotations
|
|
|
4
4
|
from typing import Any, Dict, List, Optional, Union
|
|
5
5
|
|
|
6
6
|
from reflex import constants
|
|
7
|
+
from reflex.components.chakra.forms.input import Input
|
|
8
|
+
from reflex.components.chakra.layout.box import Box
|
|
7
9
|
from reflex.components.component import Component
|
|
8
|
-
from reflex.components.forms.input import Input
|
|
9
|
-
from reflex.components.layout.box import Box
|
|
10
10
|
from reflex.constants import Dirs
|
|
11
11
|
from reflex.event import CallableEventSpec, EventChain, EventSpec, call_script
|
|
12
12
|
from reflex.utils import imports
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Stub file for reflex/components/
|
|
1
|
+
"""Stub file for reflex/components/core/upload.py"""
|
|
2
2
|
# ------------------- DO NOT EDIT ----------------------
|
|
3
3
|
# This file was generated by `scripts/pyi_generator.py`!
|
|
4
4
|
# ------------------------------------------------------
|
|
@@ -9,9 +9,9 @@ from reflex.event import EventChain, EventHandler, EventSpec
|
|
|
9
9
|
from reflex.style import Style
|
|
10
10
|
from typing import Any, Dict, List, Optional, Union
|
|
11
11
|
from reflex import constants
|
|
12
|
+
from reflex.components.chakra.forms.input import Input
|
|
13
|
+
from reflex.components.chakra.layout.box import Box
|
|
12
14
|
from reflex.components.component import Component
|
|
13
|
-
from reflex.components.forms.input import Input
|
|
14
|
-
from reflex.components.layout.box import Box
|
|
15
15
|
from reflex.constants import Dirs
|
|
16
16
|
from reflex.event import CallableEventSpec, EventChain, EventSpec, call_script
|
|
17
17
|
from reflex.utils import imports
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
"""Data
|
|
1
|
+
"""Data grid components."""
|
|
2
2
|
|
|
3
|
-
from .badge import Badge
|
|
4
|
-
from .code import Code, CodeBlock
|
|
5
|
-
from .code import LiteralCodeBlockTheme as LiteralCodeBlockTheme
|
|
6
|
-
from .code import LiteralCodeLanguage as LiteralCodeLanguage
|
|
7
3
|
from .dataeditor import DataEditor, DataEditorTheme
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
from .list import List, ListItem, OrderedList, UnorderedList
|
|
12
|
-
from .moment import Moment, MomentDelta
|
|
13
|
-
from .stat import Stat, StatArrow, StatGroup, StatHelpText, StatLabel, StatNumber
|
|
14
|
-
from .table import Table, TableCaption, TableContainer, Tbody, Td, Tfoot, Th, Thead, Tr
|
|
15
|
-
from .tag import Tag, TagCloseButton, TagLabel, TagLeftIcon, TagRightIcon
|
|
4
|
+
|
|
5
|
+
data_editor = DataEditor.create
|
|
6
|
+
data_editor_theme = DataEditorTheme
|
|
@@ -86,6 +86,7 @@ class Data(BaseHTML):
|
|
|
86
86
|
|
|
87
87
|
tag = "data"
|
|
88
88
|
|
|
89
|
+
# Specifies the machine-readable translation of the data element.
|
|
89
90
|
value: Var[Union[str, int, bool]]
|
|
90
91
|
|
|
91
92
|
|
|
@@ -124,6 +125,7 @@ class Q(BaseHTML):
|
|
|
124
125
|
|
|
125
126
|
tag = "q"
|
|
126
127
|
|
|
128
|
+
# Specifies the source URL of the quote.
|
|
127
129
|
cite: Var[Union[str, int, bool]]
|
|
128
130
|
|
|
129
131
|
|
|
@@ -191,6 +193,8 @@ class Time(BaseHTML):
|
|
|
191
193
|
"""Display the time element."""
|
|
192
194
|
|
|
193
195
|
tag = "time"
|
|
196
|
+
|
|
197
|
+
# Specifies the date and/or time of the element.
|
|
194
198
|
date_time: Var[Union[str, int, bool]]
|
|
195
199
|
|
|
196
200
|
|
|
@@ -1262,6 +1262,7 @@ class Data(BaseHTML):
|
|
|
1262
1262
|
|
|
1263
1263
|
Args:
|
|
1264
1264
|
*children: The children of the component.
|
|
1265
|
+
value: Specifies the machine-readable translation of the data element.
|
|
1265
1266
|
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
1266
1267
|
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
1267
1268
|
content_editable: Indicates whether the element's content is editable.
|
|
@@ -2097,6 +2098,7 @@ class Q(BaseHTML):
|
|
|
2097
2098
|
|
|
2098
2099
|
Args:
|
|
2099
2100
|
*children: The children of the component.
|
|
2101
|
+
cite: Specifies the source URL of the quote.
|
|
2100
2102
|
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
2101
2103
|
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
2102
2104
|
content_editable: Indicates whether the element's content is editable.
|
|
@@ -3629,6 +3631,7 @@ class Time(BaseHTML):
|
|
|
3629
3631
|
|
|
3630
3632
|
Args:
|
|
3631
3633
|
*children: The children of the component.
|
|
3634
|
+
date_time: Specifies the date and/or time of the element.
|
|
3632
3635
|
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
3633
3636
|
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
3634
3637
|
content_editable: Indicates whether the element's content is editable.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Stub file for reflex/components/
|
|
1
|
+
"""Stub file for reflex/components/gridjs/datatable.py"""
|
|
2
2
|
# ------------------- DO NOT EDIT ----------------------
|
|
3
3
|
# This file was generated by `scripts/pyi_generator.py`!
|
|
4
4
|
# ------------------------------------------------------
|
reflex/components/literals.py
CHANGED
|
@@ -2,4 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
from typing import Literal
|
|
4
4
|
|
|
5
|
+
# Base Literals
|
|
6
|
+
LiteralInputType = Literal[
|
|
7
|
+
"button",
|
|
8
|
+
"checkbox",
|
|
9
|
+
"color",
|
|
10
|
+
"date",
|
|
11
|
+
"datetime-local",
|
|
12
|
+
"email",
|
|
13
|
+
"file",
|
|
14
|
+
"hidden",
|
|
15
|
+
"image",
|
|
16
|
+
"month",
|
|
17
|
+
"number",
|
|
18
|
+
"password",
|
|
19
|
+
"radio",
|
|
20
|
+
"range",
|
|
21
|
+
"reset",
|
|
22
|
+
"search",
|
|
23
|
+
"submit",
|
|
24
|
+
"tel",
|
|
25
|
+
"text",
|
|
26
|
+
"time",
|
|
27
|
+
"url",
|
|
28
|
+
"week",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
|
|
5
32
|
LiteralRowMarker = Literal["none", "number", "checkbox", "both", "clickable-number"]
|
|
@@ -8,12 +8,16 @@ from hashlib import md5
|
|
|
8
8
|
from typing import Any, Callable, Dict, Union
|
|
9
9
|
|
|
10
10
|
from reflex.compiler import utils
|
|
11
|
+
from reflex.components.chakra.datadisplay.list import (
|
|
12
|
+
ListItem,
|
|
13
|
+
OrderedList,
|
|
14
|
+
UnorderedList,
|
|
15
|
+
)
|
|
16
|
+
from reflex.components.chakra.navigation import Link
|
|
17
|
+
from reflex.components.chakra.typography.heading import Heading
|
|
18
|
+
from reflex.components.chakra.typography.text import Text
|
|
11
19
|
from reflex.components.component import Component, CustomComponent
|
|
12
|
-
from reflex.components.datadisplay.list import ListItem, OrderedList, UnorderedList
|
|
13
|
-
from reflex.components.navigation import Link
|
|
14
20
|
from reflex.components.tags.tag import Tag
|
|
15
|
-
from reflex.components.typography.heading import Heading
|
|
16
|
-
from reflex.components.typography.text import Text
|
|
17
21
|
from reflex.style import Style
|
|
18
22
|
from reflex.utils import console, imports, types
|
|
19
23
|
from reflex.utils.imports import ImportVar
|
|
@@ -34,6 +38,8 @@ _REHYPE_KATEX = Var.create_safe("rehypeKatex", _var_is_local=False)
|
|
|
34
38
|
_REHYPE_RAW = Var.create_safe("rehypeRaw", _var_is_local=False)
|
|
35
39
|
_REHYPE_PLUGINS = Var.create_safe([_REHYPE_KATEX, _REHYPE_RAW])
|
|
36
40
|
|
|
41
|
+
# These tags do NOT get props passed to them
|
|
42
|
+
NO_PROPS_TAGS = ("ul", "ol", "li")
|
|
37
43
|
|
|
38
44
|
# Component Mapping
|
|
39
45
|
@lru_cache
|
|
@@ -43,7 +49,7 @@ def get_base_component_map() -> dict[str, Callable]:
|
|
|
43
49
|
Returns:
|
|
44
50
|
The base component map.
|
|
45
51
|
"""
|
|
46
|
-
from reflex.components.datadisplay.code import Code, CodeBlock
|
|
52
|
+
from reflex.components.chakra.datadisplay.code import Code, CodeBlock
|
|
47
53
|
|
|
48
54
|
return {
|
|
49
55
|
"h1": lambda value: Heading.create(
|
|
@@ -157,7 +163,7 @@ class Markdown(Component):
|
|
|
157
163
|
|
|
158
164
|
def _get_imports(self) -> imports.ImportDict:
|
|
159
165
|
# Import here to avoid circular imports.
|
|
160
|
-
from reflex.components.datadisplay.code import Code, CodeBlock
|
|
166
|
+
from reflex.components.chakra.datadisplay.code import Code, CodeBlock
|
|
161
167
|
|
|
162
168
|
imports = super()._get_imports()
|
|
163
169
|
|
|
@@ -211,6 +217,10 @@ class Markdown(Component):
|
|
|
211
217
|
special_props = {_PROPS}
|
|
212
218
|
children = [_CHILDREN]
|
|
213
219
|
|
|
220
|
+
# For certain tags, the props from the markdown renderer are not actually valid for the component.
|
|
221
|
+
if tag in NO_PROPS_TAGS:
|
|
222
|
+
special_props = set()
|
|
223
|
+
|
|
214
224
|
# If the children are set as a prop, don't pass them as children.
|
|
215
225
|
children_prop = props.pop("children", None)
|
|
216
226
|
if children_prop is not None:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Stub file for reflex/components/
|
|
1
|
+
"""Stub file for reflex/components/markdown/markdown.py"""
|
|
2
2
|
# ------------------- DO NOT EDIT ----------------------
|
|
3
3
|
# This file was generated by `scripts/pyi_generator.py`!
|
|
4
4
|
# ------------------------------------------------------
|
|
@@ -12,12 +12,16 @@ from functools import lru_cache
|
|
|
12
12
|
from hashlib import md5
|
|
13
13
|
from typing import Any, Callable, Dict, Union
|
|
14
14
|
from reflex.compiler import utils
|
|
15
|
+
from reflex.components.chakra.datadisplay.list import (
|
|
16
|
+
ListItem,
|
|
17
|
+
OrderedList,
|
|
18
|
+
UnorderedList,
|
|
19
|
+
)
|
|
20
|
+
from reflex.components.chakra.navigation import Link
|
|
21
|
+
from reflex.components.chakra.typography.heading import Heading
|
|
22
|
+
from reflex.components.chakra.typography.text import Text
|
|
15
23
|
from reflex.components.component import Component, CustomComponent
|
|
16
|
-
from reflex.components.datadisplay.list import ListItem, OrderedList, UnorderedList
|
|
17
|
-
from reflex.components.navigation import Link
|
|
18
24
|
from reflex.components.tags.tag import Tag
|
|
19
|
-
from reflex.components.typography.heading import Heading
|
|
20
|
-
from reflex.components.typography.text import Text
|
|
21
25
|
from reflex.style import Style
|
|
22
26
|
from reflex.utils import console, imports, types
|
|
23
27
|
from reflex.utils.imports import ImportVar
|
|
@@ -32,6 +36,7 @@ _REMARK_PLUGINS = Var.create_safe([_REMARK_MATH, _REMARK_GFM])
|
|
|
32
36
|
_REHYPE_KATEX = Var.create_safe("rehypeKatex", _var_is_local=False)
|
|
33
37
|
_REHYPE_RAW = Var.create_safe("rehypeRaw", _var_is_local=False)
|
|
34
38
|
_REHYPE_PLUGINS = Var.create_safe([_REHYPE_KATEX, _REHYPE_RAW])
|
|
39
|
+
NO_PROPS_TAGS = ("ul", "ol", "li")
|
|
35
40
|
|
|
36
41
|
@lru_cache
|
|
37
42
|
def get_base_component_map() -> dict[str, Callable]: ...
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
"""
|
|
2
|
-
|
|
3
|
-
from .audio import Audio
|
|
4
|
-
from .avatar import Avatar, AvatarBadge, AvatarGroup
|
|
5
|
-
from .icon import Icon
|
|
6
|
-
from .video import Video
|
|
7
|
-
|
|
8
|
-
__all__ = [f for f in dir() if f[0].isupper()] # type: ignore
|
|
1
|
+
"""Temporary shim for Chakra icon class."""
|