reflex 0.5.2a1__py3-none-any.whl → 0.5.3__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/web/postcss.config.js +1 -0
- reflex/.templates/web/styles/tailwind.css +4 -1
- reflex/__init__.py +298 -204
- reflex/__init__.pyi +196 -157
- reflex/app.py +13 -2
- reflex/compiler/compiler.py +1 -1
- reflex/components/__init__.py +31 -17
- reflex/components/__init__.pyi +26 -0
- reflex/components/base/__init__.py +25 -9
- reflex/components/base/__init__.pyi +26 -0
- reflex/components/base/fragment.py +3 -0
- reflex/components/base/fragment.pyi +2 -0
- reflex/components/base/head.py +3 -0
- reflex/components/base/head.pyi +2 -0
- reflex/components/base/script.py +3 -0
- reflex/components/base/script.pyi +2 -0
- reflex/components/core/__init__.py +51 -37
- reflex/components/core/__init__.pyi +39 -0
- reflex/components/core/banner.py +7 -1
- reflex/components/core/banner.pyi +6 -1
- reflex/components/core/debounce.py +3 -0
- reflex/components/core/debounce.pyi +2 -0
- reflex/components/core/foreach.py +3 -0
- reflex/components/core/html.py +4 -1
- reflex/components/core/html.pyi +2 -0
- reflex/components/core/match.py +3 -0
- reflex/components/core/responsive.py +1 -1
- reflex/components/core/upload.py +5 -2
- reflex/components/core/upload.pyi +4 -2
- reflex/components/datadisplay/__init__.py +17 -8
- reflex/components/datadisplay/__init__.pyi +14 -0
- reflex/components/datadisplay/code.py +3 -0
- reflex/components/datadisplay/code.pyi +2 -0
- reflex/components/datadisplay/dataeditor.py +4 -0
- reflex/components/datadisplay/dataeditor.pyi +3 -0
- reflex/components/el/__init__.py +15 -1
- reflex/components/el/__init__.pyi +228 -0
- reflex/components/el/elements/__init__.py +129 -220
- reflex/components/el/elements/__init__.pyi +342 -0
- reflex/components/el/elements/forms.py +15 -0
- reflex/components/el/elements/forms.pyi +14 -0
- reflex/components/el/elements/inline.py +30 -0
- reflex/components/el/elements/inline.pyi +29 -0
- reflex/components/el/elements/media.py +16 -0
- reflex/components/el/elements/media.pyi +15 -0
- reflex/components/el/elements/metadata.py +7 -0
- reflex/components/el/elements/metadata.pyi +6 -0
- reflex/components/el/elements/other.py +9 -0
- reflex/components/el/elements/other.pyi +8 -0
- reflex/components/el/elements/scripts.py +5 -0
- reflex/components/el/elements/scripts.pyi +4 -0
- reflex/components/el/elements/sectioning.py +17 -0
- reflex/components/el/elements/sectioning.pyi +16 -0
- reflex/components/el/elements/tables.py +12 -0
- reflex/components/el/elements/tables.pyi +11 -0
- reflex/components/el/elements/typography.py +16 -0
- reflex/components/el/elements/typography.pyi +15 -0
- reflex/components/moment/__init__.py +1 -1
- reflex/components/plotly/plotly.py +185 -7
- reflex/components/plotly/plotly.pyi +62 -4
- reflex/components/radix/__init__.py +14 -2
- reflex/components/radix/__init__.pyi +73 -0
- reflex/components/radix/primitives/__init__.py +13 -5
- reflex/components/radix/primitives/__init__.pyi +11 -0
- reflex/components/radix/themes/__init__.py +20 -6
- reflex/components/radix/themes/__init__.pyi +13 -0
- reflex/components/radix/themes/base.py +26 -20
- reflex/components/radix/themes/base.pyi +4 -1
- reflex/components/radix/themes/color_mode.py +3 -1
- reflex/components/radix/themes/color_mode.pyi +3 -1
- reflex/components/radix/themes/components/__init__.py +11 -79
- reflex/components/radix/themes/components/__init__.pyi +44 -0
- reflex/components/radix/themes/components/alert_dialog.py +2 -2
- reflex/components/radix/themes/components/alert_dialog.pyi +2 -2
- reflex/components/radix/themes/components/badge.py +2 -2
- reflex/components/radix/themes/components/badge.pyi +2 -2
- reflex/components/radix/themes/components/button.py +2 -2
- reflex/components/radix/themes/components/button.pyi +2 -2
- reflex/components/radix/themes/components/callout.py +4 -4
- reflex/components/radix/themes/components/callout.pyi +4 -4
- reflex/components/radix/themes/components/card.py +2 -2
- reflex/components/radix/themes/components/card.pyi +2 -2
- reflex/components/radix/themes/components/dialog.py +2 -2
- reflex/components/radix/themes/components/dialog.pyi +2 -2
- reflex/components/radix/themes/components/hover_card.py +2 -2
- reflex/components/radix/themes/components/hover_card.pyi +2 -2
- reflex/components/radix/themes/components/icon_button.py +2 -2
- reflex/components/radix/themes/components/icon_button.pyi +2 -2
- reflex/components/radix/themes/components/inset.py +2 -2
- reflex/components/radix/themes/components/inset.pyi +2 -2
- reflex/components/radix/themes/components/popover.py +2 -2
- reflex/components/radix/themes/components/popover.pyi +2 -2
- reflex/components/radix/themes/components/table.py +8 -8
- reflex/components/radix/themes/components/table.pyi +8 -8
- reflex/components/radix/themes/components/text_area.py +11 -2
- reflex/components/radix/themes/components/text_area.pyi +18 -3
- reflex/components/radix/themes/components/text_field.py +3 -3
- reflex/components/radix/themes/components/text_field.pyi +3 -3
- reflex/components/radix/themes/layout/__init__.py +12 -38
- reflex/components/radix/themes/layout/__init__.pyi +21 -0
- reflex/components/radix/themes/layout/box.py +5 -2
- reflex/components/radix/themes/layout/box.pyi +4 -2
- reflex/components/radix/themes/layout/center.py +3 -0
- reflex/components/radix/themes/layout/center.pyi +2 -0
- reflex/components/radix/themes/layout/container.py +5 -2
- reflex/components/radix/themes/layout/container.pyi +4 -2
- reflex/components/radix/themes/layout/flex.py +5 -2
- reflex/components/radix/themes/layout/flex.pyi +4 -2
- reflex/components/radix/themes/layout/grid.py +5 -2
- reflex/components/radix/themes/layout/grid.pyi +4 -2
- reflex/components/radix/themes/layout/list.py +14 -0
- reflex/components/radix/themes/layout/list.pyi +3 -0
- reflex/components/radix/themes/layout/section.py +7 -4
- reflex/components/radix/themes/layout/section.pyi +5 -3
- reflex/components/radix/themes/layout/spacer.py +3 -0
- reflex/components/radix/themes/layout/spacer.pyi +2 -0
- reflex/components/radix/themes/layout/stack.py +5 -0
- reflex/components/radix/themes/layout/stack.pyi +4 -0
- reflex/components/radix/themes/typography/__init__.py +11 -16
- reflex/components/radix/themes/typography/__init__.pyi +12 -0
- reflex/components/radix/themes/typography/blockquote.py +5 -2
- reflex/components/radix/themes/typography/blockquote.pyi +4 -2
- reflex/components/radix/themes/typography/code.py +5 -2
- reflex/components/radix/themes/typography/code.pyi +4 -2
- reflex/components/radix/themes/typography/heading.py +5 -2
- reflex/components/radix/themes/typography/heading.pyi +4 -2
- reflex/components/radix/themes/typography/link.py +3 -0
- reflex/components/radix/themes/typography/link.pyi +2 -0
- reflex/components/radix/themes/typography/text.py +6 -6
- reflex/components/radix/themes/typography/text.pyi +6 -6
- reflex/components/recharts/__init__.py +114 -104
- reflex/components/recharts/__init__.pyi +106 -0
- reflex/components/recharts/cartesian.py +17 -0
- reflex/components/recharts/cartesian.pyi +16 -0
- reflex/components/recharts/charts.py +12 -0
- reflex/components/recharts/charts.pyi +11 -0
- reflex/components/recharts/general.py +7 -0
- reflex/components/recharts/general.pyi +6 -0
- reflex/components/recharts/polar.py +11 -0
- reflex/components/recharts/polar.pyi +9 -0
- reflex/config.py +3 -0
- reflex/constants/__init__.py +0 -2
- reflex/constants/base.py +5 -1
- reflex/constants/installer.py +2 -1
- reflex/experimental/__init__.py +2 -0
- reflex/experimental/assets.py +56 -0
- reflex/experimental/client_state.py +4 -2
- reflex/experimental/hooks.py +8 -6
- reflex/experimental/layout.py +3 -1
- reflex/state.py +54 -4
- reflex/utils/exec.py +8 -0
- reflex/utils/format.py +8 -4
- reflex/utils/lazy_loader.py +33 -0
- reflex/utils/prerequisites.py +1 -14
- reflex/utils/pyi_generator.py +71 -20
- reflex/utils/serializers.py +9 -4
- reflex/utils/types.py +3 -1
- reflex/vars.py +92 -6
- reflex/vars.pyi +16 -0
- {reflex-0.5.2a1.dist-info → reflex-0.5.3.dist-info}/METADATA +2 -1
- {reflex-0.5.2a1.dist-info → reflex-0.5.3.dist-info}/RECORD +164 -151
- reflex/config.pyi +0 -112
- reflex/constants/base.pyi +0 -94
- {reflex-0.5.2a1.dist-info → reflex-0.5.3.dist-info}/LICENSE +0 -0
- {reflex-0.5.2a1.dist-info → reflex-0.5.3.dist-info}/WHEEL +0 -0
- {reflex-0.5.2a1.dist-info → reflex-0.5.3.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"""Stub file for reflex/components/radix/__init__.py"""
|
|
2
|
+
# ------------------- DO NOT EDIT ----------------------
|
|
3
|
+
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
4
|
+
# ------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
from . import primitives as primitives
|
|
7
|
+
from . import themes as themes
|
|
8
|
+
|
|
9
|
+
from .themes.color_mode import color_mode as color_mode
|
|
10
|
+
from .themes.base import theme as theme
|
|
11
|
+
from .themes.base import theme_panel as theme_panel
|
|
12
|
+
from .themes.components.alert_dialog import alert_dialog as alert_dialog
|
|
13
|
+
from .themes.components.aspect_ratio import aspect_ratio as aspect_ratio
|
|
14
|
+
from .themes.components.avatar import avatar as avatar
|
|
15
|
+
from .themes.components.badge import badge as badge
|
|
16
|
+
from .themes.components.button import button as button
|
|
17
|
+
from .themes.components.callout import callout as callout
|
|
18
|
+
from .themes.components.card import card as card
|
|
19
|
+
from .themes.components.checkbox import checkbox as checkbox
|
|
20
|
+
from .themes.components.context_menu import context_menu as context_menu
|
|
21
|
+
from .themes.components.data_list import data_list as data_list
|
|
22
|
+
from .themes.components.dialog import dialog as dialog
|
|
23
|
+
from .themes.components.hover_card import hover_card as hover_card
|
|
24
|
+
from .themes.components.icon_button import icon_button as icon_button
|
|
25
|
+
from .themes.components.text_field import input as input
|
|
26
|
+
from .themes.components.inset import inset as inset
|
|
27
|
+
from .themes.components.popover import popover as popover
|
|
28
|
+
from .themes.components.scroll_area import scroll_area as scroll_area
|
|
29
|
+
from .themes.components.select import select as select
|
|
30
|
+
from .themes.components.skeleton import skeleton as skeleton
|
|
31
|
+
from .themes.components.slider import slider as slider
|
|
32
|
+
from .themes.components.spinner import spinner as spinner
|
|
33
|
+
from .themes.components.switch import switch as switch
|
|
34
|
+
from .themes.components.table import table as table
|
|
35
|
+
from .themes.components.tabs import tabs as tabs
|
|
36
|
+
from .themes.components.text_area import text_area as text_area
|
|
37
|
+
from .themes.components.tooltip import tooltip as tooltip
|
|
38
|
+
from .themes.components.segmented_control import segmented_control as segmented_control
|
|
39
|
+
from .themes.components.radio_cards import radio_cards as radio_cards
|
|
40
|
+
from .themes.components.checkbox_cards import checkbox_cards as checkbox_cards
|
|
41
|
+
from .themes.components.checkbox_group import checkbox_group as checkbox_group
|
|
42
|
+
from .themes.components.text_field import text_field as text_field
|
|
43
|
+
from .themes.components.radio_group import radio as radio
|
|
44
|
+
from .themes.components.radio_group import radio_group as radio_group
|
|
45
|
+
from .themes.components.dropdown_menu import menu as menu
|
|
46
|
+
from .themes.components.dropdown_menu import dropdown_menu as dropdown_menu
|
|
47
|
+
from .themes.components.separator import divider as divider
|
|
48
|
+
from .themes.components.separator import separator as separator
|
|
49
|
+
from .themes.typography.blockquote import blockquote as blockquote
|
|
50
|
+
from .themes.typography.code import code as code
|
|
51
|
+
from .themes.typography.heading import heading as heading
|
|
52
|
+
from .themes.typography.link import link as link
|
|
53
|
+
from .themes.typography.text import text as text
|
|
54
|
+
from .themes.layout.box import box as box
|
|
55
|
+
from .themes.layout.center import center as center
|
|
56
|
+
from .themes.layout.container import container as container
|
|
57
|
+
from .themes.layout.flex import flex as flex
|
|
58
|
+
from .themes.layout.grid import grid as grid
|
|
59
|
+
from .themes.layout.section import section as section
|
|
60
|
+
from .themes.layout.spacer import spacer as spacer
|
|
61
|
+
from .themes.layout.stack import stack as stack
|
|
62
|
+
from .themes.layout.stack import hstack as hstack
|
|
63
|
+
from .themes.layout.stack import vstack as vstack
|
|
64
|
+
from .themes.layout.list import list_ns as list
|
|
65
|
+
from .themes.layout.list import list_item as list_item
|
|
66
|
+
from .themes.layout.list import ordered_list as ordered_list
|
|
67
|
+
from .themes.layout.list import unordered_list as unordered_list
|
|
68
|
+
from .primitives.accordion import accordion as accordion
|
|
69
|
+
from .primitives.drawer import drawer as drawer
|
|
70
|
+
from .primitives.form import form as form
|
|
71
|
+
from .primitives.progress import progress as progress
|
|
72
|
+
from reflex import RADIX_MAPPING
|
|
73
|
+
from reflex.utils import lazy_loader
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
"""Radix primitive components (https://www.radix-ui.com/primitives)."""
|
|
2
|
+
from __future__ import annotations
|
|
2
3
|
|
|
3
|
-
from
|
|
4
|
-
from .
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
from reflex import RADIX_PRIMITIVES_MAPPING
|
|
5
|
+
from reflex.utils import lazy_loader
|
|
6
|
+
|
|
7
|
+
_SUBMOD_ATTRS: dict[str, list[str]] = {
|
|
8
|
+
"".join(k.split("components.radix.primitives.")[-1]): v
|
|
9
|
+
for k, v in RADIX_PRIMITIVES_MAPPING.items()
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
__getattr__, __dir__, __all__ = lazy_loader.attach(
|
|
13
|
+
__name__,
|
|
14
|
+
submod_attrs=_SUBMOD_ATTRS,
|
|
15
|
+
)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""Stub file for reflex/components/radix/primitives/__init__.py"""
|
|
2
|
+
# ------------------- DO NOT EDIT ----------------------
|
|
3
|
+
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
4
|
+
# ------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
from .accordion import accordion as accordion
|
|
7
|
+
from .drawer import drawer as drawer
|
|
8
|
+
from .form import form as form
|
|
9
|
+
from .progress import progress as progress
|
|
10
|
+
from reflex import RADIX_PRIMITIVES_MAPPING
|
|
11
|
+
from reflex.utils import lazy_loader
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
"""Namespace for components provided by the @radix-ui/themes library."""
|
|
2
|
-
from
|
|
3
|
-
|
|
4
|
-
from .
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from reflex.utils import lazy_loader
|
|
5
|
+
|
|
6
|
+
_SUBMODULES: set[str] = {"components", "layout", "typography"}
|
|
7
|
+
_SUBMOD_ATTRS: dict[str, list[str]] = {
|
|
8
|
+
"base": [
|
|
9
|
+
"theme",
|
|
10
|
+
"theme_panel",
|
|
11
|
+
],
|
|
12
|
+
"color_mode": [
|
|
13
|
+
"color_mode",
|
|
14
|
+
],
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
__getattr__, __dir__, __all__ = lazy_loader.attach(
|
|
18
|
+
__name__,
|
|
19
|
+
submodules=_SUBMODULES,
|
|
20
|
+
submod_attrs=_SUBMOD_ATTRS,
|
|
21
|
+
)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""Stub file for reflex/components/radix/themes/__init__.py"""
|
|
2
|
+
# ------------------- DO NOT EDIT ----------------------
|
|
3
|
+
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
4
|
+
# ------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
from . import components as components
|
|
7
|
+
from . import layout as layout
|
|
8
|
+
from . import typography as typography
|
|
9
|
+
|
|
10
|
+
from .base import theme as theme
|
|
11
|
+
from .base import theme_panel as theme_panel
|
|
12
|
+
from .color_mode import color_mode as color_mode
|
|
13
|
+
from reflex.utils import lazy_loader
|
|
@@ -6,7 +6,8 @@ from typing import Any, Dict, Literal
|
|
|
6
6
|
|
|
7
7
|
from reflex.components import Component
|
|
8
8
|
from reflex.components.tags import Tag
|
|
9
|
-
from reflex.
|
|
9
|
+
from reflex.config import get_config
|
|
10
|
+
from reflex.utils.imports import ImportVar
|
|
10
11
|
from reflex.vars import Var
|
|
11
12
|
|
|
12
13
|
LiteralAlign = Literal["start", "center", "end", "baseline", "stretch"]
|
|
@@ -208,18 +209,23 @@ class Theme(RadixThemesComponent):
|
|
|
208
209
|
children = [ThemePanel.create(), *children]
|
|
209
210
|
return super().create(*children, **props)
|
|
210
211
|
|
|
211
|
-
def
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
212
|
+
def add_imports(self) -> dict[str, list[ImportVar] | ImportVar]:
|
|
213
|
+
"""Add imports for the Theme component.
|
|
214
|
+
|
|
215
|
+
Returns:
|
|
216
|
+
The import dict.
|
|
217
|
+
"""
|
|
218
|
+
_imports: dict[str, list[ImportVar] | ImportVar] = {
|
|
219
|
+
"/utils/theme.js": [ImportVar(tag="theme", is_default=True)],
|
|
220
|
+
}
|
|
221
|
+
if get_config().tailwind is None:
|
|
222
|
+
# When tailwind is disabled, import the radix-ui styles directly because they will
|
|
223
|
+
# not be included in the tailwind.css file.
|
|
224
|
+
_imports[""] = ImportVar(
|
|
225
|
+
tag="@radix-ui/themes/styles.css",
|
|
226
|
+
install=False,
|
|
227
|
+
)
|
|
228
|
+
return _imports
|
|
223
229
|
|
|
224
230
|
def _render(self, props: dict[str, Any] | None = None) -> Tag:
|
|
225
231
|
tag = super()._render(props)
|
|
@@ -243,13 +249,13 @@ class ThemePanel(RadixThemesComponent):
|
|
|
243
249
|
# Whether the panel is open. Defaults to False.
|
|
244
250
|
default_open: Var[bool]
|
|
245
251
|
|
|
246
|
-
def
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
252
|
+
def add_imports(self) -> dict[str, str]:
|
|
253
|
+
"""Add imports for the ThemePanel component.
|
|
254
|
+
|
|
255
|
+
Returns:
|
|
256
|
+
The import dict.
|
|
257
|
+
"""
|
|
258
|
+
return {"react": "useEffect"}
|
|
253
259
|
|
|
254
260
|
def _get_hooks(self) -> str | None:
|
|
255
261
|
# The panel freezes the tab if the user color preference differs from the
|
|
@@ -10,7 +10,8 @@ from reflex.style import Style
|
|
|
10
10
|
from typing import Any, Dict, Literal
|
|
11
11
|
from reflex.components import Component
|
|
12
12
|
from reflex.components.tags import Tag
|
|
13
|
-
from reflex.
|
|
13
|
+
from reflex.config import get_config
|
|
14
|
+
from reflex.utils.imports import ImportVar
|
|
14
15
|
from reflex.vars import Var
|
|
15
16
|
|
|
16
17
|
LiteralAlign = Literal["start", "center", "end", "baseline", "stretch"]
|
|
@@ -579,8 +580,10 @@ class Theme(RadixThemesComponent):
|
|
|
579
580
|
A new component instance.
|
|
580
581
|
"""
|
|
581
582
|
...
|
|
583
|
+
def add_imports(self) -> dict[str, list[ImportVar] | ImportVar]: ...
|
|
582
584
|
|
|
583
585
|
class ThemePanel(RadixThemesComponent):
|
|
586
|
+
def add_imports(self) -> dict[str, str]: ...
|
|
584
587
|
@overload
|
|
585
588
|
@classmethod
|
|
586
589
|
def create( # type: ignore
|
|
@@ -174,4 +174,6 @@ class ColorModeNamespace(BaseVar):
|
|
|
174
174
|
switch = staticmethod(ColorModeSwitch.create)
|
|
175
175
|
|
|
176
176
|
|
|
177
|
-
color_mode_var_and_namespace = ColorModeNamespace(
|
|
177
|
+
color_mode = color_mode_var_and_namespace = ColorModeNamespace(
|
|
178
|
+
**dataclasses.asdict(color_mode)
|
|
179
|
+
)
|
|
@@ -543,4 +543,6 @@ class ColorModeNamespace(BaseVar):
|
|
|
543
543
|
button = staticmethod(ColorModeIconButton.create)
|
|
544
544
|
switch = staticmethod(ColorModeSwitch.create)
|
|
545
545
|
|
|
546
|
-
color_mode_var_and_namespace = ColorModeNamespace(
|
|
546
|
+
color_mode = color_mode_var_and_namespace = ColorModeNamespace(
|
|
547
|
+
**dataclasses.asdict(color_mode)
|
|
548
|
+
)
|
|
@@ -1,83 +1,15 @@
|
|
|
1
1
|
"""Radix themes components."""
|
|
2
|
+
from __future__ import annotations
|
|
2
3
|
|
|
3
|
-
from
|
|
4
|
-
from .
|
|
5
|
-
from .avatar import avatar as avatar
|
|
6
|
-
from .badge import badge as badge
|
|
7
|
-
from .button import button as button
|
|
8
|
-
from .callout import callout as callout
|
|
9
|
-
from .card import card as card
|
|
10
|
-
from .checkbox import checkbox as checkbox
|
|
11
|
-
from .checkbox_cards import checkbox_cards as checkbox_cards
|
|
12
|
-
from .checkbox_group import checkbox_group as checkbox_group
|
|
13
|
-
from .context_menu import context_menu as context_menu
|
|
14
|
-
from .data_list import data_list as data_list
|
|
15
|
-
from .dialog import dialog as dialog
|
|
16
|
-
from .dropdown_menu import dropdown_menu as dropdown_menu
|
|
17
|
-
from .dropdown_menu import menu as menu
|
|
18
|
-
from .hover_card import hover_card as hover_card
|
|
19
|
-
from .icon_button import icon_button as icon_button
|
|
20
|
-
from .inset import inset as inset
|
|
21
|
-
from .popover import popover as popover
|
|
22
|
-
from .progress import progress as progress
|
|
23
|
-
from .radio_cards import radio_cards as radio_cards
|
|
24
|
-
from .radio_group import radio as radio
|
|
25
|
-
from .radio_group import radio_group as radio_group
|
|
26
|
-
from .scroll_area import scroll_area as scroll_area
|
|
27
|
-
from .segmented_control import segmented_control as segmented_control
|
|
28
|
-
from .select import select as select
|
|
29
|
-
from .separator import divider as divider
|
|
30
|
-
from .separator import separator as separator
|
|
31
|
-
from .skeleton import skeleton as skeleton
|
|
32
|
-
from .slider import slider as slider
|
|
33
|
-
from .spinner import spinner as spinner
|
|
34
|
-
from .switch import switch as switch
|
|
35
|
-
from .table import table as table
|
|
36
|
-
from .tabs import tabs as tabs
|
|
37
|
-
from .text_area import text_area as text_area
|
|
38
|
-
from .text_field import text_field as text_field
|
|
39
|
-
from .tooltip import tooltip as tooltip
|
|
4
|
+
from reflex import RADIX_THEMES_COMPONENTS_MAPPING
|
|
5
|
+
from reflex.utils import lazy_loader
|
|
40
6
|
|
|
41
|
-
|
|
7
|
+
_SUBMOD_ATTRS: dict[str, list[str]] = {
|
|
8
|
+
"".join(k.split("components.radix.themes.components.")[-1]): v
|
|
9
|
+
for k, v in RADIX_THEMES_COMPONENTS_MAPPING.items()
|
|
10
|
+
}
|
|
42
11
|
|
|
43
|
-
__all__ =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"badge",
|
|
48
|
-
"button",
|
|
49
|
-
"callout",
|
|
50
|
-
"card",
|
|
51
|
-
"checkbox",
|
|
52
|
-
"checkbox_cards",
|
|
53
|
-
"checkbox_group",
|
|
54
|
-
"context_menu",
|
|
55
|
-
"data_list",
|
|
56
|
-
"dialog",
|
|
57
|
-
"divider",
|
|
58
|
-
"dropdown_menu",
|
|
59
|
-
"hover_card",
|
|
60
|
-
"icon_button",
|
|
61
|
-
"input",
|
|
62
|
-
"inset",
|
|
63
|
-
"menu",
|
|
64
|
-
"popover",
|
|
65
|
-
# progress is in experimental namespace until https://github.com/radix-ui/themes/pull/492
|
|
66
|
-
# "progress",
|
|
67
|
-
"radio",
|
|
68
|
-
"radio_cards",
|
|
69
|
-
"radio_group",
|
|
70
|
-
"scroll_area",
|
|
71
|
-
"segmented_control",
|
|
72
|
-
"select",
|
|
73
|
-
"separator",
|
|
74
|
-
"skeleton",
|
|
75
|
-
"slider",
|
|
76
|
-
"spinner",
|
|
77
|
-
"switch",
|
|
78
|
-
"table",
|
|
79
|
-
"tabs",
|
|
80
|
-
"text_area",
|
|
81
|
-
"text_field",
|
|
82
|
-
"tooltip",
|
|
83
|
-
]
|
|
12
|
+
__getattr__, __dir__, __all__ = lazy_loader.attach(
|
|
13
|
+
__name__,
|
|
14
|
+
submod_attrs=_SUBMOD_ATTRS,
|
|
15
|
+
)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""Stub file for reflex/components/radix/themes/components/__init__.py"""
|
|
2
|
+
# ------------------- DO NOT EDIT ----------------------
|
|
3
|
+
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
4
|
+
# ------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
from .alert_dialog import alert_dialog as alert_dialog
|
|
7
|
+
from .aspect_ratio import aspect_ratio as aspect_ratio
|
|
8
|
+
from .avatar import avatar as avatar
|
|
9
|
+
from .badge import badge as badge
|
|
10
|
+
from .button import button as button
|
|
11
|
+
from .callout import callout as callout
|
|
12
|
+
from .card import card as card
|
|
13
|
+
from .checkbox import checkbox as checkbox
|
|
14
|
+
from .context_menu import context_menu as context_menu
|
|
15
|
+
from .data_list import data_list as data_list
|
|
16
|
+
from .dialog import dialog as dialog
|
|
17
|
+
from .hover_card import hover_card as hover_card
|
|
18
|
+
from .icon_button import icon_button as icon_button
|
|
19
|
+
from .text_field import input as input
|
|
20
|
+
from .inset import inset as inset
|
|
21
|
+
from .popover import popover as popover
|
|
22
|
+
from .scroll_area import scroll_area as scroll_area
|
|
23
|
+
from .select import select as select
|
|
24
|
+
from .skeleton import skeleton as skeleton
|
|
25
|
+
from .slider import slider as slider
|
|
26
|
+
from .spinner import spinner as spinner
|
|
27
|
+
from .switch import switch as switch
|
|
28
|
+
from .table import table as table
|
|
29
|
+
from .tabs import tabs as tabs
|
|
30
|
+
from .text_area import text_area as text_area
|
|
31
|
+
from .tooltip import tooltip as tooltip
|
|
32
|
+
from .segmented_control import segmented_control as segmented_control
|
|
33
|
+
from .radio_cards import radio_cards as radio_cards
|
|
34
|
+
from .checkbox_cards import checkbox_cards as checkbox_cards
|
|
35
|
+
from .checkbox_group import checkbox_group as checkbox_group
|
|
36
|
+
from .text_field import text_field as text_field
|
|
37
|
+
from .radio_group import radio as radio
|
|
38
|
+
from .radio_group import radio_group as radio_group
|
|
39
|
+
from .dropdown_menu import menu as menu
|
|
40
|
+
from .dropdown_menu import dropdown_menu as dropdown_menu
|
|
41
|
+
from .separator import divider as divider
|
|
42
|
+
from .separator import separator as separator
|
|
43
|
+
from reflex import RADIX_THEMES_COMPONENTS_MAPPING
|
|
44
|
+
from reflex.utils import lazy_loader
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"""Interactive components provided by @radix-ui/themes."""
|
|
2
2
|
from typing import Any, Dict, Literal
|
|
3
3
|
|
|
4
|
-
from reflex import el
|
|
5
4
|
from reflex.components.component import ComponentNamespace
|
|
5
|
+
from reflex.components.el import elements
|
|
6
6
|
from reflex.constants import EventTriggers
|
|
7
7
|
from reflex.vars import Var
|
|
8
8
|
|
|
@@ -37,7 +37,7 @@ class AlertDialogTrigger(RadixThemesTriggerComponent):
|
|
|
37
37
|
tag = "AlertDialog.Trigger"
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
class AlertDialogContent(
|
|
40
|
+
class AlertDialogContent(elements.Div, RadixThemesComponent):
|
|
41
41
|
"""Contains the content of the dialog. This component is based on the div element."""
|
|
42
42
|
|
|
43
43
|
tag = "AlertDialog.Content"
|
|
@@ -8,8 +8,8 @@ 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, Dict, Literal
|
|
11
|
-
from reflex import el
|
|
12
11
|
from reflex.components.component import ComponentNamespace
|
|
12
|
+
from reflex.components.el import elements
|
|
13
13
|
from reflex.constants import EventTriggers
|
|
14
14
|
from reflex.vars import Var
|
|
15
15
|
from ..base import RadixThemesComponent, RadixThemesTriggerComponent
|
|
@@ -171,7 +171,7 @@ class AlertDialogTrigger(RadixThemesTriggerComponent):
|
|
|
171
171
|
"""
|
|
172
172
|
...
|
|
173
173
|
|
|
174
|
-
class AlertDialogContent(
|
|
174
|
+
class AlertDialogContent(elements.Div, RadixThemesComponent):
|
|
175
175
|
def get_event_triggers(self) -> Dict[str, Any]: ...
|
|
176
176
|
@overload
|
|
177
177
|
@classmethod
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from typing import Literal
|
|
4
4
|
|
|
5
|
-
from reflex import
|
|
5
|
+
from reflex.components.el import elements
|
|
6
6
|
from reflex.vars import Var
|
|
7
7
|
|
|
8
8
|
from ..base import (
|
|
@@ -12,7 +12,7 @@ from ..base import (
|
|
|
12
12
|
)
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class Badge(
|
|
15
|
+
class Badge(elements.Span, RadixThemesComponent):
|
|
16
16
|
"""A stylized badge element."""
|
|
17
17
|
|
|
18
18
|
tag = "Badge"
|
|
@@ -8,11 +8,11 @@ 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 Literal
|
|
11
|
-
from reflex import
|
|
11
|
+
from reflex.components.el import elements
|
|
12
12
|
from reflex.vars import Var
|
|
13
13
|
from ..base import LiteralAccentColor, LiteralRadius, RadixThemesComponent
|
|
14
14
|
|
|
15
|
-
class Badge(
|
|
15
|
+
class Badge(elements.Span, RadixThemesComponent):
|
|
16
16
|
@overload
|
|
17
17
|
@classmethod
|
|
18
18
|
def create( # type: ignore
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from typing import Literal
|
|
4
4
|
|
|
5
|
-
from reflex import
|
|
5
|
+
from reflex.components.el import elements
|
|
6
6
|
from reflex.vars import Var
|
|
7
7
|
|
|
8
8
|
from ..base import (
|
|
@@ -16,7 +16,7 @@ from ..base import (
|
|
|
16
16
|
LiteralButtonSize = Literal["1", "2", "3", "4"]
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
class Button(
|
|
19
|
+
class Button(elements.Button, RadixLoadingProp, RadixThemesComponent):
|
|
20
20
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
21
21
|
|
|
22
22
|
tag = "Button"
|
|
@@ -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 Literal
|
|
11
|
-
from reflex import
|
|
11
|
+
from reflex.components.el import elements
|
|
12
12
|
from reflex.vars import Var
|
|
13
13
|
from ..base import (
|
|
14
14
|
LiteralAccentColor,
|
|
@@ -20,7 +20,7 @@ from ..base import (
|
|
|
20
20
|
|
|
21
21
|
LiteralButtonSize = Literal["1", "2", "3", "4"]
|
|
22
22
|
|
|
23
|
-
class Button(
|
|
23
|
+
class Button(elements.Button, RadixLoadingProp, RadixThemesComponent):
|
|
24
24
|
@overload
|
|
25
25
|
@classmethod
|
|
26
26
|
def create( # type: ignore
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
from typing import Literal, Union
|
|
4
4
|
|
|
5
5
|
import reflex as rx
|
|
6
|
-
from reflex import el
|
|
7
6
|
from reflex.components.component import Component, ComponentNamespace
|
|
7
|
+
from reflex.components.el import elements
|
|
8
8
|
from reflex.components.lucide.icon import Icon
|
|
9
9
|
from reflex.vars import Var
|
|
10
10
|
|
|
@@ -16,7 +16,7 @@ from ..base import (
|
|
|
16
16
|
CalloutVariant = Literal["soft", "surface", "outline"]
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
class CalloutRoot(
|
|
19
|
+
class CalloutRoot(elements.Div, RadixThemesComponent):
|
|
20
20
|
"""Groups Icon and Text parts of a Callout."""
|
|
21
21
|
|
|
22
22
|
tag = "Callout.Root"
|
|
@@ -37,13 +37,13 @@ class CalloutRoot(el.Div, RadixThemesComponent):
|
|
|
37
37
|
high_contrast: Var[bool]
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
class CalloutIcon(
|
|
40
|
+
class CalloutIcon(elements.Div, RadixThemesComponent):
|
|
41
41
|
"""Provides width and height for the icon associated with the callout."""
|
|
42
42
|
|
|
43
43
|
tag = "Callout.Icon"
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
class CalloutText(
|
|
46
|
+
class CalloutText(elements.P, RadixThemesComponent):
|
|
47
47
|
"""Renders the callout text. This component is based on the p element."""
|
|
48
48
|
|
|
49
49
|
tag = "Callout.Text"
|
|
@@ -9,15 +9,15 @@ from reflex.event import EventChain, EventHandler, EventSpec
|
|
|
9
9
|
from reflex.style import Style
|
|
10
10
|
from typing import Literal, Union
|
|
11
11
|
import reflex as rx
|
|
12
|
-
from reflex import el
|
|
13
12
|
from reflex.components.component import Component, ComponentNamespace
|
|
13
|
+
from reflex.components.el import elements
|
|
14
14
|
from reflex.components.lucide.icon import Icon
|
|
15
15
|
from reflex.vars import Var
|
|
16
16
|
from ..base import LiteralAccentColor, RadixThemesComponent
|
|
17
17
|
|
|
18
18
|
CalloutVariant = Literal["soft", "surface", "outline"]
|
|
19
19
|
|
|
20
|
-
class CalloutRoot(
|
|
20
|
+
class CalloutRoot(elements.Div, RadixThemesComponent):
|
|
21
21
|
@overload
|
|
22
22
|
@classmethod
|
|
23
23
|
def create( # type: ignore
|
|
@@ -230,7 +230,7 @@ class CalloutRoot(el.Div, RadixThemesComponent):
|
|
|
230
230
|
"""
|
|
231
231
|
...
|
|
232
232
|
|
|
233
|
-
class CalloutIcon(
|
|
233
|
+
class CalloutIcon(elements.Div, RadixThemesComponent):
|
|
234
234
|
@overload
|
|
235
235
|
@classmethod
|
|
236
236
|
def create( # type: ignore
|
|
@@ -365,7 +365,7 @@ class CalloutIcon(el.Div, RadixThemesComponent):
|
|
|
365
365
|
"""
|
|
366
366
|
...
|
|
367
367
|
|
|
368
|
-
class CalloutText(
|
|
368
|
+
class CalloutText(elements.P, RadixThemesComponent):
|
|
369
369
|
@overload
|
|
370
370
|
@classmethod
|
|
371
371
|
def create( # type: ignore
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Interactive components provided by @radix-ui/themes."""
|
|
2
2
|
from typing import Literal
|
|
3
3
|
|
|
4
|
-
from reflex import
|
|
4
|
+
from reflex.components.el import elements
|
|
5
5
|
from reflex.vars import Var
|
|
6
6
|
|
|
7
7
|
from ..base import (
|
|
@@ -9,7 +9,7 @@ from ..base import (
|
|
|
9
9
|
)
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
class Card(
|
|
12
|
+
class Card(elements.Div, RadixThemesComponent):
|
|
13
13
|
"""Container that groups related content and actions."""
|
|
14
14
|
|
|
15
15
|
tag = "Card"
|
|
@@ -8,11 +8,11 @@ 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 Literal
|
|
11
|
-
from reflex import
|
|
11
|
+
from reflex.components.el import elements
|
|
12
12
|
from reflex.vars import Var
|
|
13
13
|
from ..base import RadixThemesComponent
|
|
14
14
|
|
|
15
|
-
class Card(
|
|
15
|
+
class Card(elements.Div, RadixThemesComponent):
|
|
16
16
|
@overload
|
|
17
17
|
@classmethod
|
|
18
18
|
def create( # type: ignore
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
from typing import Any, Dict, Literal
|
|
4
4
|
|
|
5
|
-
from reflex import el
|
|
6
5
|
from reflex.components.component import ComponentNamespace
|
|
6
|
+
from reflex.components.el import elements
|
|
7
7
|
from reflex.constants import EventTriggers
|
|
8
8
|
from reflex.vars import Var
|
|
9
9
|
|
|
@@ -45,7 +45,7 @@ class DialogTitle(RadixThemesComponent):
|
|
|
45
45
|
tag = "Dialog.Title"
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
class DialogContent(
|
|
48
|
+
class DialogContent(elements.Div, RadixThemesComponent):
|
|
49
49
|
"""Content component to display inside a Dialog modal."""
|
|
50
50
|
|
|
51
51
|
tag = "Dialog.Content"
|
|
@@ -8,8 +8,8 @@ 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, Dict, Literal
|
|
11
|
-
from reflex import el
|
|
12
11
|
from reflex.components.component import ComponentNamespace
|
|
12
|
+
from reflex.components.el import elements
|
|
13
13
|
from reflex.constants import EventTriggers
|
|
14
14
|
from reflex.vars import Var
|
|
15
15
|
from ..base import RadixThemesComponent, RadixThemesTriggerComponent
|
|
@@ -248,7 +248,7 @@ class DialogTitle(RadixThemesComponent):
|
|
|
248
248
|
"""
|
|
249
249
|
...
|
|
250
250
|
|
|
251
|
-
class DialogContent(
|
|
251
|
+
class DialogContent(elements.Div, RadixThemesComponent):
|
|
252
252
|
def get_event_triggers(self) -> Dict[str, Any]: ...
|
|
253
253
|
@overload
|
|
254
254
|
@classmethod
|