reflex 0.7.0a1__py3-none-any.whl → 0.7.0a2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of reflex might be problematic. Click here for more details.
- reflex/.templates/jinja/web/pages/utils.js.jinja2 +1 -1
- reflex/app.py +6 -8
- reflex/components/base/app_wrap.pyi +16 -16
- reflex/components/base/body.pyi +16 -16
- reflex/components/base/document.pyi +76 -76
- reflex/components/base/error_boundary.pyi +17 -21
- reflex/components/base/fragment.pyi +16 -16
- reflex/components/base/head.pyi +31 -31
- reflex/components/base/link.pyi +31 -31
- reflex/components/base/meta.pyi +61 -61
- reflex/components/base/script.pyi +19 -19
- reflex/components/base/strict_mode.pyi +16 -16
- reflex/components/core/banner.py +95 -19
- reflex/components/core/banner.pyi +91 -91
- reflex/components/core/client_side_routing.pyi +31 -31
- reflex/components/core/clipboard.pyi +17 -20
- reflex/components/core/debounce.pyi +17 -17
- reflex/components/core/foreach.py +5 -0
- reflex/components/core/html.pyi +16 -16
- reflex/components/core/sticky.pyi +61 -61
- reflex/components/core/upload.pyi +80 -88
- reflex/components/datadisplay/code.pyi +31 -31
- reflex/components/datadisplay/dataeditor.pyi +40 -54
- reflex/components/datadisplay/shiki_code_block.pyi +46 -46
- reflex/components/el/element.pyi +16 -16
- reflex/components/el/elements/base.pyi +16 -16
- reflex/components/el/elements/forms.pyi +222 -256
- reflex/components/el/elements/inline.pyi +421 -421
- reflex/components/el/elements/media.pyi +376 -376
- reflex/components/el/elements/metadata.pyi +91 -91
- reflex/components/el/elements/other.pyi +106 -106
- reflex/components/el/elements/scripts.pyi +46 -46
- reflex/components/el/elements/sectioning.pyi +226 -226
- reflex/components/el/elements/tables.pyi +151 -151
- reflex/components/el/elements/typography.pyi +226 -226
- reflex/components/gridjs/datatable.pyi +31 -31
- reflex/components/lucide/icon.pyi +46 -46
- reflex/components/markdown/markdown.pyi +16 -16
- reflex/components/moment/moment.pyi +17 -19
- reflex/components/next/base.pyi +16 -16
- reflex/components/next/image.pyi +18 -18
- reflex/components/next/link.pyi +16 -16
- reflex/components/next/video.pyi +16 -16
- reflex/components/plotly/plotly.pyi +34 -44
- reflex/components/radix/primitives/accordion.pyi +107 -107
- reflex/components/radix/primitives/base.pyi +31 -31
- reflex/components/radix/primitives/drawer.pyi +175 -183
- reflex/components/radix/primitives/form.pyi +160 -172
- reflex/components/radix/primitives/progress.pyi +76 -76
- reflex/components/radix/primitives/slider.pyi +78 -82
- reflex/components/radix/themes/base.pyi +121 -121
- reflex/components/radix/themes/color_mode.pyi +47 -49
- reflex/components/radix/themes/components/alert_dialog.pyi +110 -112
- reflex/components/radix/themes/components/aspect_ratio.pyi +16 -16
- reflex/components/radix/themes/components/avatar.pyi +16 -16
- reflex/components/radix/themes/components/badge.pyi +16 -16
- reflex/components/radix/themes/components/button.pyi +16 -16
- reflex/components/radix/themes/components/callout.pyi +76 -76
- reflex/components/radix/themes/components/card.pyi +16 -16
- reflex/components/radix/themes/components/checkbox.pyi +49 -55
- reflex/components/radix/themes/components/checkbox_cards.pyi +31 -31
- reflex/components/radix/themes/components/checkbox_group.pyi +31 -31
- reflex/components/radix/themes/components/context_menu.pyi +149 -155
- reflex/components/radix/themes/components/data_list.pyi +61 -61
- reflex/components/radix/themes/components/dialog.pyi +113 -117
- reflex/components/radix/themes/components/dropdown_menu.pyi +133 -137
- reflex/components/radix/themes/components/hover_card.pyi +63 -67
- reflex/components/radix/themes/components/icon_button.pyi +16 -16
- reflex/components/radix/themes/components/inset.pyi +16 -16
- reflex/components/radix/themes/components/popover.pyi +68 -70
- reflex/components/radix/themes/components/progress.pyi +16 -16
- reflex/components/radix/themes/components/radio.pyi +16 -16
- reflex/components/radix/themes/components/radio_cards.pyi +32 -34
- reflex/components/radix/themes/components/radio_group.pyi +62 -64
- reflex/components/radix/themes/components/scroll_area.pyi +16 -16
- reflex/components/radix/themes/components/segmented_control.pyi +32 -35
- reflex/components/radix/themes/components/select.py +1 -0
- reflex/components/radix/themes/components/select.pyi +145 -157
- reflex/components/radix/themes/components/separator.pyi +16 -16
- reflex/components/radix/themes/components/skeleton.py +3 -0
- reflex/components/radix/themes/components/skeleton.pyi +16 -16
- reflex/components/radix/themes/components/slider.pyi +22 -28
- reflex/components/radix/themes/components/spinner.pyi +16 -16
- reflex/components/radix/themes/components/switch.pyi +17 -19
- reflex/components/radix/themes/components/table.pyi +106 -106
- reflex/components/radix/themes/components/tabs.pyi +78 -82
- reflex/components/radix/themes/components/text_area.pyi +19 -33
- reflex/components/radix/themes/components/text_field.pyi +52 -80
- reflex/components/radix/themes/components/tooltip.py +3 -0
- reflex/components/radix/themes/components/tooltip.pyi +19 -21
- reflex/components/radix/themes/layout/base.pyi +16 -16
- reflex/components/radix/themes/layout/box.pyi +16 -16
- reflex/components/radix/themes/layout/center.pyi +16 -16
- reflex/components/radix/themes/layout/container.pyi +16 -16
- reflex/components/radix/themes/layout/flex.pyi +16 -16
- reflex/components/radix/themes/layout/grid.pyi +16 -16
- reflex/components/radix/themes/layout/list.pyi +76 -76
- reflex/components/radix/themes/layout/section.pyi +16 -16
- reflex/components/radix/themes/layout/spacer.pyi +16 -16
- reflex/components/radix/themes/layout/stack.pyi +46 -46
- reflex/components/radix/themes/typography/blockquote.pyi +16 -16
- reflex/components/radix/themes/typography/code.pyi +16 -16
- reflex/components/radix/themes/typography/heading.pyi +16 -16
- reflex/components/radix/themes/typography/link.pyi +16 -16
- reflex/components/radix/themes/typography/text.pyi +106 -106
- reflex/components/react_player/audio.pyi +33 -39
- reflex/components/react_player/react_player.pyi +32 -38
- reflex/components/react_player/video.pyi +33 -39
- reflex/components/recharts/cartesian.pyi +282 -282
- reflex/components/recharts/charts.pyi +164 -164
- reflex/components/recharts/general.pyi +92 -92
- reflex/components/recharts/polar.pyi +55 -55
- reflex/components/recharts/recharts.pyi +31 -31
- reflex/components/sonner/toast.pyi +16 -16
- reflex/components/suneditor/editor.pyi +24 -38
- reflex/event.py +89 -51
- reflex/experimental/layout.pyi +78 -82
- reflex/page.py +2 -2
- reflex/utils/exceptions.py +13 -0
- reflex/utils/format.py +1 -1
- reflex/utils/prerequisites.py +3 -3
- reflex/utils/pyi_generator.py +9 -8
- reflex/vars/base.py +6 -0
- {reflex-0.7.0a1.dist-info → reflex-0.7.0a2.dist-info}/METADATA +1 -1
- {reflex-0.7.0a1.dist-info → reflex-0.7.0a2.dist-info}/RECORD +128 -128
- {reflex-0.7.0a1.dist-info → reflex-0.7.0a2.dist-info}/LICENSE +0 -0
- {reflex-0.7.0a1.dist-info → reflex-0.7.0a2.dist-info}/WHEEL +0 -0
- {reflex-0.7.0a1.dist-info → reflex-0.7.0a2.dist-info}/entry_points.txt +0 -0
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
{# Args: #}
|
|
61
61
|
{# component: component dictionary #}
|
|
62
62
|
{% macro render_iterable_tag(component) %}
|
|
63
|
-
<>{ {
|
|
63
|
+
<>{ {{ component.iterable_state }}.map(({{ component.arg_name }}, {{ component.arg_index }}) => (
|
|
64
64
|
{% for child in component.children %}
|
|
65
65
|
{{ render(child) }}
|
|
66
66
|
{% endfor %}
|
reflex/app.py
CHANGED
|
@@ -25,7 +25,6 @@ from typing import (
|
|
|
25
25
|
Callable,
|
|
26
26
|
Coroutine,
|
|
27
27
|
Dict,
|
|
28
|
-
Generic,
|
|
29
28
|
List,
|
|
30
29
|
MutableMapping,
|
|
31
30
|
Optional,
|
|
@@ -76,7 +75,6 @@ from reflex.components.radix import themes
|
|
|
76
75
|
from reflex.config import environment, get_config
|
|
77
76
|
from reflex.event import (
|
|
78
77
|
_EVENT_FIELDS,
|
|
79
|
-
BASE_STATE,
|
|
80
78
|
Event,
|
|
81
79
|
EventHandler,
|
|
82
80
|
EventSpec,
|
|
@@ -196,7 +194,7 @@ class OverlayFragment(Fragment):
|
|
|
196
194
|
@dataclasses.dataclass(
|
|
197
195
|
frozen=True,
|
|
198
196
|
)
|
|
199
|
-
class UnevaluatedPage
|
|
197
|
+
class UnevaluatedPage:
|
|
200
198
|
"""An uncompiled page."""
|
|
201
199
|
|
|
202
200
|
component: Union[Component, ComponentCallable]
|
|
@@ -204,7 +202,7 @@ class UnevaluatedPage(Generic[BASE_STATE]):
|
|
|
204
202
|
title: Union[Var, str, None]
|
|
205
203
|
description: Union[Var, str, None]
|
|
206
204
|
image: str
|
|
207
|
-
on_load: Union[EventType[
|
|
205
|
+
on_load: Union[EventType[()], None]
|
|
208
206
|
meta: List[Dict[str, str]]
|
|
209
207
|
|
|
210
208
|
|
|
@@ -279,7 +277,7 @@ class App(MiddlewareMixin, LifespanMixin):
|
|
|
279
277
|
_state_manager: Optional[StateManager] = None
|
|
280
278
|
|
|
281
279
|
# Mapping from a route to event handlers to trigger when the page loads.
|
|
282
|
-
_load_events: Dict[str, List[IndividualEventType[
|
|
280
|
+
_load_events: Dict[str, List[IndividualEventType[()]]] = dataclasses.field(
|
|
283
281
|
default_factory=dict
|
|
284
282
|
)
|
|
285
283
|
|
|
@@ -544,7 +542,7 @@ class App(MiddlewareMixin, LifespanMixin):
|
|
|
544
542
|
title: str | Var | None = None,
|
|
545
543
|
description: str | Var | None = None,
|
|
546
544
|
image: str = constants.DefaultPage.IMAGE,
|
|
547
|
-
on_load: EventType[
|
|
545
|
+
on_load: EventType[()] | None = None,
|
|
548
546
|
meta: list[dict[str, str]] = constants.DefaultPage.META_LIST,
|
|
549
547
|
):
|
|
550
548
|
"""Add a page to the app.
|
|
@@ -648,7 +646,7 @@ class App(MiddlewareMixin, LifespanMixin):
|
|
|
648
646
|
if save_page:
|
|
649
647
|
self._pages[route] = component
|
|
650
648
|
|
|
651
|
-
def get_load_events(self, route: str) -> list[IndividualEventType[
|
|
649
|
+
def get_load_events(self, route: str) -> list[IndividualEventType[()]]:
|
|
652
650
|
"""Get the load events for a route.
|
|
653
651
|
|
|
654
652
|
Args:
|
|
@@ -710,7 +708,7 @@ class App(MiddlewareMixin, LifespanMixin):
|
|
|
710
708
|
title: str = constants.Page404.TITLE,
|
|
711
709
|
image: str = constants.Page404.IMAGE,
|
|
712
710
|
description: str = constants.Page404.DESCRIPTION,
|
|
713
|
-
on_load: EventType[
|
|
711
|
+
on_load: EventType[()] | None = None,
|
|
714
712
|
meta: list[dict[str, str]] = constants.DefaultPage.META_LIST,
|
|
715
713
|
):
|
|
716
714
|
"""Define a custom 404 page for any url having no match.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
from typing import Any, Dict, Optional, Union, overload
|
|
7
7
|
|
|
8
8
|
from reflex.components.base.fragment import Fragment
|
|
9
|
-
from reflex.event import
|
|
9
|
+
from reflex.event import EventType
|
|
10
10
|
from reflex.style import Style
|
|
11
11
|
from reflex.vars.base import Var
|
|
12
12
|
|
|
@@ -22,21 +22,21 @@ class AppWrap(Fragment):
|
|
|
22
22
|
class_name: Optional[Any] = None,
|
|
23
23
|
autofocus: Optional[bool] = None,
|
|
24
24
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
25
|
-
on_blur: Optional[EventType[
|
|
26
|
-
on_click: Optional[EventType[
|
|
27
|
-
on_context_menu: Optional[EventType[
|
|
28
|
-
on_double_click: Optional[EventType[
|
|
29
|
-
on_focus: Optional[EventType[
|
|
30
|
-
on_mount: Optional[EventType[
|
|
31
|
-
on_mouse_down: Optional[EventType[
|
|
32
|
-
on_mouse_enter: Optional[EventType[
|
|
33
|
-
on_mouse_leave: Optional[EventType[
|
|
34
|
-
on_mouse_move: Optional[EventType[
|
|
35
|
-
on_mouse_out: Optional[EventType[
|
|
36
|
-
on_mouse_over: Optional[EventType[
|
|
37
|
-
on_mouse_up: Optional[EventType[
|
|
38
|
-
on_scroll: Optional[EventType[
|
|
39
|
-
on_unmount: Optional[EventType[
|
|
25
|
+
on_blur: Optional[EventType[()]] = None,
|
|
26
|
+
on_click: Optional[EventType[()]] = None,
|
|
27
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
28
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
29
|
+
on_focus: Optional[EventType[()]] = None,
|
|
30
|
+
on_mount: Optional[EventType[()]] = None,
|
|
31
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
32
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
33
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
34
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
35
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
36
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
37
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
38
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
39
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
40
40
|
**props,
|
|
41
41
|
) -> "AppWrap":
|
|
42
42
|
"""Create a new AppWrap component.
|
reflex/components/base/body.pyi
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
from typing import Any, Dict, Optional, Union, overload
|
|
7
7
|
|
|
8
8
|
from reflex.components.component import Component
|
|
9
|
-
from reflex.event import
|
|
9
|
+
from reflex.event import EventType
|
|
10
10
|
from reflex.style import Style
|
|
11
11
|
from reflex.vars.base import Var
|
|
12
12
|
|
|
@@ -22,21 +22,21 @@ class Body(Component):
|
|
|
22
22
|
class_name: Optional[Any] = None,
|
|
23
23
|
autofocus: Optional[bool] = None,
|
|
24
24
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
25
|
-
on_blur: Optional[EventType[
|
|
26
|
-
on_click: Optional[EventType[
|
|
27
|
-
on_context_menu: Optional[EventType[
|
|
28
|
-
on_double_click: Optional[EventType[
|
|
29
|
-
on_focus: Optional[EventType[
|
|
30
|
-
on_mount: Optional[EventType[
|
|
31
|
-
on_mouse_down: Optional[EventType[
|
|
32
|
-
on_mouse_enter: Optional[EventType[
|
|
33
|
-
on_mouse_leave: Optional[EventType[
|
|
34
|
-
on_mouse_move: Optional[EventType[
|
|
35
|
-
on_mouse_out: Optional[EventType[
|
|
36
|
-
on_mouse_over: Optional[EventType[
|
|
37
|
-
on_mouse_up: Optional[EventType[
|
|
38
|
-
on_scroll: Optional[EventType[
|
|
39
|
-
on_unmount: Optional[EventType[
|
|
25
|
+
on_blur: Optional[EventType[()]] = None,
|
|
26
|
+
on_click: Optional[EventType[()]] = None,
|
|
27
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
28
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
29
|
+
on_focus: Optional[EventType[()]] = None,
|
|
30
|
+
on_mount: Optional[EventType[()]] = None,
|
|
31
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
32
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
33
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
34
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
35
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
36
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
37
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
38
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
39
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
40
40
|
**props,
|
|
41
41
|
) -> "Body":
|
|
42
42
|
"""Create the component.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
from typing import Any, Dict, Optional, Union, overload
|
|
7
7
|
|
|
8
8
|
from reflex.components.component import Component
|
|
9
|
-
from reflex.event import
|
|
9
|
+
from reflex.event import EventType
|
|
10
10
|
from reflex.style import Style
|
|
11
11
|
from reflex.vars.base import Var
|
|
12
12
|
|
|
@@ -22,21 +22,21 @@ class NextDocumentLib(Component):
|
|
|
22
22
|
class_name: Optional[Any] = None,
|
|
23
23
|
autofocus: Optional[bool] = None,
|
|
24
24
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
25
|
-
on_blur: Optional[EventType[
|
|
26
|
-
on_click: Optional[EventType[
|
|
27
|
-
on_context_menu: Optional[EventType[
|
|
28
|
-
on_double_click: Optional[EventType[
|
|
29
|
-
on_focus: Optional[EventType[
|
|
30
|
-
on_mount: Optional[EventType[
|
|
31
|
-
on_mouse_down: Optional[EventType[
|
|
32
|
-
on_mouse_enter: Optional[EventType[
|
|
33
|
-
on_mouse_leave: Optional[EventType[
|
|
34
|
-
on_mouse_move: Optional[EventType[
|
|
35
|
-
on_mouse_out: Optional[EventType[
|
|
36
|
-
on_mouse_over: Optional[EventType[
|
|
37
|
-
on_mouse_up: Optional[EventType[
|
|
38
|
-
on_scroll: Optional[EventType[
|
|
39
|
-
on_unmount: Optional[EventType[
|
|
25
|
+
on_blur: Optional[EventType[()]] = None,
|
|
26
|
+
on_click: Optional[EventType[()]] = None,
|
|
27
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
28
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
29
|
+
on_focus: Optional[EventType[()]] = None,
|
|
30
|
+
on_mount: Optional[EventType[()]] = None,
|
|
31
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
32
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
33
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
34
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
35
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
36
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
37
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
38
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
39
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
40
40
|
**props,
|
|
41
41
|
) -> "NextDocumentLib":
|
|
42
42
|
"""Create the component.
|
|
@@ -69,21 +69,21 @@ class Html(NextDocumentLib):
|
|
|
69
69
|
class_name: Optional[Any] = None,
|
|
70
70
|
autofocus: Optional[bool] = None,
|
|
71
71
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
72
|
-
on_blur: Optional[EventType[
|
|
73
|
-
on_click: Optional[EventType[
|
|
74
|
-
on_context_menu: Optional[EventType[
|
|
75
|
-
on_double_click: Optional[EventType[
|
|
76
|
-
on_focus: Optional[EventType[
|
|
77
|
-
on_mount: Optional[EventType[
|
|
78
|
-
on_mouse_down: Optional[EventType[
|
|
79
|
-
on_mouse_enter: Optional[EventType[
|
|
80
|
-
on_mouse_leave: Optional[EventType[
|
|
81
|
-
on_mouse_move: Optional[EventType[
|
|
82
|
-
on_mouse_out: Optional[EventType[
|
|
83
|
-
on_mouse_over: Optional[EventType[
|
|
84
|
-
on_mouse_up: Optional[EventType[
|
|
85
|
-
on_scroll: Optional[EventType[
|
|
86
|
-
on_unmount: Optional[EventType[
|
|
72
|
+
on_blur: Optional[EventType[()]] = None,
|
|
73
|
+
on_click: Optional[EventType[()]] = None,
|
|
74
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
75
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
76
|
+
on_focus: Optional[EventType[()]] = None,
|
|
77
|
+
on_mount: Optional[EventType[()]] = None,
|
|
78
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
79
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
80
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
81
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
82
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
83
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
84
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
85
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
86
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
87
87
|
**props,
|
|
88
88
|
) -> "Html":
|
|
89
89
|
"""Create the component.
|
|
@@ -115,21 +115,21 @@ class DocumentHead(NextDocumentLib):
|
|
|
115
115
|
class_name: Optional[Any] = None,
|
|
116
116
|
autofocus: Optional[bool] = None,
|
|
117
117
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
118
|
-
on_blur: Optional[EventType[
|
|
119
|
-
on_click: Optional[EventType[
|
|
120
|
-
on_context_menu: Optional[EventType[
|
|
121
|
-
on_double_click: Optional[EventType[
|
|
122
|
-
on_focus: Optional[EventType[
|
|
123
|
-
on_mount: Optional[EventType[
|
|
124
|
-
on_mouse_down: Optional[EventType[
|
|
125
|
-
on_mouse_enter: Optional[EventType[
|
|
126
|
-
on_mouse_leave: Optional[EventType[
|
|
127
|
-
on_mouse_move: Optional[EventType[
|
|
128
|
-
on_mouse_out: Optional[EventType[
|
|
129
|
-
on_mouse_over: Optional[EventType[
|
|
130
|
-
on_mouse_up: Optional[EventType[
|
|
131
|
-
on_scroll: Optional[EventType[
|
|
132
|
-
on_unmount: Optional[EventType[
|
|
118
|
+
on_blur: Optional[EventType[()]] = None,
|
|
119
|
+
on_click: Optional[EventType[()]] = None,
|
|
120
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
121
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
122
|
+
on_focus: Optional[EventType[()]] = None,
|
|
123
|
+
on_mount: Optional[EventType[()]] = None,
|
|
124
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
125
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
126
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
127
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
128
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
129
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
130
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
131
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
132
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
133
133
|
**props,
|
|
134
134
|
) -> "DocumentHead":
|
|
135
135
|
"""Create the component.
|
|
@@ -161,21 +161,21 @@ class Main(NextDocumentLib):
|
|
|
161
161
|
class_name: Optional[Any] = None,
|
|
162
162
|
autofocus: Optional[bool] = None,
|
|
163
163
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
164
|
-
on_blur: Optional[EventType[
|
|
165
|
-
on_click: Optional[EventType[
|
|
166
|
-
on_context_menu: Optional[EventType[
|
|
167
|
-
on_double_click: Optional[EventType[
|
|
168
|
-
on_focus: Optional[EventType[
|
|
169
|
-
on_mount: Optional[EventType[
|
|
170
|
-
on_mouse_down: Optional[EventType[
|
|
171
|
-
on_mouse_enter: Optional[EventType[
|
|
172
|
-
on_mouse_leave: Optional[EventType[
|
|
173
|
-
on_mouse_move: Optional[EventType[
|
|
174
|
-
on_mouse_out: Optional[EventType[
|
|
175
|
-
on_mouse_over: Optional[EventType[
|
|
176
|
-
on_mouse_up: Optional[EventType[
|
|
177
|
-
on_scroll: Optional[EventType[
|
|
178
|
-
on_unmount: Optional[EventType[
|
|
164
|
+
on_blur: Optional[EventType[()]] = None,
|
|
165
|
+
on_click: Optional[EventType[()]] = None,
|
|
166
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
167
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
168
|
+
on_focus: Optional[EventType[()]] = None,
|
|
169
|
+
on_mount: Optional[EventType[()]] = None,
|
|
170
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
171
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
172
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
173
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
174
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
175
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
176
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
177
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
178
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
179
179
|
**props,
|
|
180
180
|
) -> "Main":
|
|
181
181
|
"""Create the component.
|
|
@@ -207,21 +207,21 @@ class NextScript(NextDocumentLib):
|
|
|
207
207
|
class_name: Optional[Any] = None,
|
|
208
208
|
autofocus: Optional[bool] = None,
|
|
209
209
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
210
|
-
on_blur: Optional[EventType[
|
|
211
|
-
on_click: Optional[EventType[
|
|
212
|
-
on_context_menu: Optional[EventType[
|
|
213
|
-
on_double_click: Optional[EventType[
|
|
214
|
-
on_focus: Optional[EventType[
|
|
215
|
-
on_mount: Optional[EventType[
|
|
216
|
-
on_mouse_down: Optional[EventType[
|
|
217
|
-
on_mouse_enter: Optional[EventType[
|
|
218
|
-
on_mouse_leave: Optional[EventType[
|
|
219
|
-
on_mouse_move: Optional[EventType[
|
|
220
|
-
on_mouse_out: Optional[EventType[
|
|
221
|
-
on_mouse_over: Optional[EventType[
|
|
222
|
-
on_mouse_up: Optional[EventType[
|
|
223
|
-
on_scroll: Optional[EventType[
|
|
224
|
-
on_unmount: Optional[EventType[
|
|
210
|
+
on_blur: Optional[EventType[()]] = None,
|
|
211
|
+
on_click: Optional[EventType[()]] = None,
|
|
212
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
213
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
214
|
+
on_focus: Optional[EventType[()]] = None,
|
|
215
|
+
on_mount: Optional[EventType[()]] = None,
|
|
216
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
217
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
218
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
219
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
220
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
221
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
222
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
223
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
224
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
225
225
|
**props,
|
|
226
226
|
) -> "NextScript":
|
|
227
227
|
"""Create the component.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
from typing import Any, Dict, Optional, Tuple, Union, overload
|
|
7
7
|
|
|
8
8
|
from reflex.components.component import Component
|
|
9
|
-
from reflex.event import
|
|
9
|
+
from reflex.event import EventType
|
|
10
10
|
from reflex.style import Style
|
|
11
11
|
from reflex.vars.base import Var
|
|
12
12
|
from reflex.vars.object import ObjectVar
|
|
@@ -28,28 +28,24 @@ class ErrorBoundary(Component):
|
|
|
28
28
|
class_name: Optional[Any] = None,
|
|
29
29
|
autofocus: Optional[bool] = None,
|
|
30
30
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
31
|
-
on_blur: Optional[EventType[
|
|
32
|
-
on_click: Optional[EventType[
|
|
33
|
-
on_context_menu: Optional[EventType[
|
|
34
|
-
on_double_click: Optional[EventType[
|
|
31
|
+
on_blur: Optional[EventType[()]] = None,
|
|
32
|
+
on_click: Optional[EventType[()]] = None,
|
|
33
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
34
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
35
35
|
on_error: Optional[
|
|
36
|
-
Union[
|
|
37
|
-
EventType[[], BASE_STATE],
|
|
38
|
-
EventType[[str], BASE_STATE],
|
|
39
|
-
EventType[[str, str], BASE_STATE],
|
|
40
|
-
]
|
|
36
|
+
Union[EventType[()], EventType[str], EventType[str, str]]
|
|
41
37
|
] = None,
|
|
42
|
-
on_focus: Optional[EventType[
|
|
43
|
-
on_mount: Optional[EventType[
|
|
44
|
-
on_mouse_down: Optional[EventType[
|
|
45
|
-
on_mouse_enter: Optional[EventType[
|
|
46
|
-
on_mouse_leave: Optional[EventType[
|
|
47
|
-
on_mouse_move: Optional[EventType[
|
|
48
|
-
on_mouse_out: Optional[EventType[
|
|
49
|
-
on_mouse_over: Optional[EventType[
|
|
50
|
-
on_mouse_up: Optional[EventType[
|
|
51
|
-
on_scroll: Optional[EventType[
|
|
52
|
-
on_unmount: Optional[EventType[
|
|
38
|
+
on_focus: Optional[EventType[()]] = None,
|
|
39
|
+
on_mount: Optional[EventType[()]] = None,
|
|
40
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
41
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
42
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
43
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
44
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
45
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
46
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
47
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
48
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
53
49
|
**props,
|
|
54
50
|
) -> "ErrorBoundary":
|
|
55
51
|
"""Create an ErrorBoundary component.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
from typing import Any, Dict, Optional, Union, overload
|
|
7
7
|
|
|
8
8
|
from reflex.components.component import Component
|
|
9
|
-
from reflex.event import
|
|
9
|
+
from reflex.event import EventType
|
|
10
10
|
from reflex.style import Style
|
|
11
11
|
from reflex.vars.base import Var
|
|
12
12
|
|
|
@@ -22,21 +22,21 @@ class Fragment(Component):
|
|
|
22
22
|
class_name: Optional[Any] = None,
|
|
23
23
|
autofocus: Optional[bool] = None,
|
|
24
24
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
25
|
-
on_blur: Optional[EventType[
|
|
26
|
-
on_click: Optional[EventType[
|
|
27
|
-
on_context_menu: Optional[EventType[
|
|
28
|
-
on_double_click: Optional[EventType[
|
|
29
|
-
on_focus: Optional[EventType[
|
|
30
|
-
on_mount: Optional[EventType[
|
|
31
|
-
on_mouse_down: Optional[EventType[
|
|
32
|
-
on_mouse_enter: Optional[EventType[
|
|
33
|
-
on_mouse_leave: Optional[EventType[
|
|
34
|
-
on_mouse_move: Optional[EventType[
|
|
35
|
-
on_mouse_out: Optional[EventType[
|
|
36
|
-
on_mouse_over: Optional[EventType[
|
|
37
|
-
on_mouse_up: Optional[EventType[
|
|
38
|
-
on_scroll: Optional[EventType[
|
|
39
|
-
on_unmount: Optional[EventType[
|
|
25
|
+
on_blur: Optional[EventType[()]] = None,
|
|
26
|
+
on_click: Optional[EventType[()]] = None,
|
|
27
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
28
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
29
|
+
on_focus: Optional[EventType[()]] = None,
|
|
30
|
+
on_mount: Optional[EventType[()]] = None,
|
|
31
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
32
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
33
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
34
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
35
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
36
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
37
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
38
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
39
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
40
40
|
**props,
|
|
41
41
|
) -> "Fragment":
|
|
42
42
|
"""Create the component.
|
reflex/components/base/head.pyi
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
from typing import Any, Dict, Optional, Union, overload
|
|
7
7
|
|
|
8
8
|
from reflex.components.component import Component, MemoizationLeaf
|
|
9
|
-
from reflex.event import
|
|
9
|
+
from reflex.event import EventType
|
|
10
10
|
from reflex.style import Style
|
|
11
11
|
from reflex.vars.base import Var
|
|
12
12
|
|
|
@@ -22,21 +22,21 @@ class NextHeadLib(Component):
|
|
|
22
22
|
class_name: Optional[Any] = None,
|
|
23
23
|
autofocus: Optional[bool] = None,
|
|
24
24
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
25
|
-
on_blur: Optional[EventType[
|
|
26
|
-
on_click: Optional[EventType[
|
|
27
|
-
on_context_menu: Optional[EventType[
|
|
28
|
-
on_double_click: Optional[EventType[
|
|
29
|
-
on_focus: Optional[EventType[
|
|
30
|
-
on_mount: Optional[EventType[
|
|
31
|
-
on_mouse_down: Optional[EventType[
|
|
32
|
-
on_mouse_enter: Optional[EventType[
|
|
33
|
-
on_mouse_leave: Optional[EventType[
|
|
34
|
-
on_mouse_move: Optional[EventType[
|
|
35
|
-
on_mouse_out: Optional[EventType[
|
|
36
|
-
on_mouse_over: Optional[EventType[
|
|
37
|
-
on_mouse_up: Optional[EventType[
|
|
38
|
-
on_scroll: Optional[EventType[
|
|
39
|
-
on_unmount: Optional[EventType[
|
|
25
|
+
on_blur: Optional[EventType[()]] = None,
|
|
26
|
+
on_click: Optional[EventType[()]] = None,
|
|
27
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
28
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
29
|
+
on_focus: Optional[EventType[()]] = None,
|
|
30
|
+
on_mount: Optional[EventType[()]] = None,
|
|
31
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
32
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
33
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
34
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
35
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
36
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
37
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
38
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
39
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
40
40
|
**props,
|
|
41
41
|
) -> "NextHeadLib":
|
|
42
42
|
"""Create the component.
|
|
@@ -68,21 +68,21 @@ class Head(NextHeadLib, MemoizationLeaf):
|
|
|
68
68
|
class_name: Optional[Any] = None,
|
|
69
69
|
autofocus: Optional[bool] = None,
|
|
70
70
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
71
|
-
on_blur: Optional[EventType[
|
|
72
|
-
on_click: Optional[EventType[
|
|
73
|
-
on_context_menu: Optional[EventType[
|
|
74
|
-
on_double_click: Optional[EventType[
|
|
75
|
-
on_focus: Optional[EventType[
|
|
76
|
-
on_mount: Optional[EventType[
|
|
77
|
-
on_mouse_down: Optional[EventType[
|
|
78
|
-
on_mouse_enter: Optional[EventType[
|
|
79
|
-
on_mouse_leave: Optional[EventType[
|
|
80
|
-
on_mouse_move: Optional[EventType[
|
|
81
|
-
on_mouse_out: Optional[EventType[
|
|
82
|
-
on_mouse_over: Optional[EventType[
|
|
83
|
-
on_mouse_up: Optional[EventType[
|
|
84
|
-
on_scroll: Optional[EventType[
|
|
85
|
-
on_unmount: Optional[EventType[
|
|
71
|
+
on_blur: Optional[EventType[()]] = None,
|
|
72
|
+
on_click: Optional[EventType[()]] = None,
|
|
73
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
74
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
75
|
+
on_focus: Optional[EventType[()]] = None,
|
|
76
|
+
on_mount: Optional[EventType[()]] = None,
|
|
77
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
78
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
79
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
80
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
81
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
82
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
83
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
84
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
85
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
86
86
|
**props,
|
|
87
87
|
) -> "Head":
|
|
88
88
|
"""Create a new memoization leaf component.
|
reflex/components/base/link.pyi
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
from typing import Any, Dict, Optional, Union, overload
|
|
7
7
|
|
|
8
8
|
from reflex.components.component import Component
|
|
9
|
-
from reflex.event import
|
|
9
|
+
from reflex.event import EventType
|
|
10
10
|
from reflex.style import Style
|
|
11
11
|
from reflex.vars.base import Var
|
|
12
12
|
|
|
@@ -24,21 +24,21 @@ class RawLink(Component):
|
|
|
24
24
|
class_name: Optional[Any] = None,
|
|
25
25
|
autofocus: Optional[bool] = None,
|
|
26
26
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
27
|
-
on_blur: Optional[EventType[
|
|
28
|
-
on_click: Optional[EventType[
|
|
29
|
-
on_context_menu: Optional[EventType[
|
|
30
|
-
on_double_click: Optional[EventType[
|
|
31
|
-
on_focus: Optional[EventType[
|
|
32
|
-
on_mount: Optional[EventType[
|
|
33
|
-
on_mouse_down: Optional[EventType[
|
|
34
|
-
on_mouse_enter: Optional[EventType[
|
|
35
|
-
on_mouse_leave: Optional[EventType[
|
|
36
|
-
on_mouse_move: Optional[EventType[
|
|
37
|
-
on_mouse_out: Optional[EventType[
|
|
38
|
-
on_mouse_over: Optional[EventType[
|
|
39
|
-
on_mouse_up: Optional[EventType[
|
|
40
|
-
on_scroll: Optional[EventType[
|
|
41
|
-
on_unmount: Optional[EventType[
|
|
27
|
+
on_blur: Optional[EventType[()]] = None,
|
|
28
|
+
on_click: Optional[EventType[()]] = None,
|
|
29
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
30
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
31
|
+
on_focus: Optional[EventType[()]] = None,
|
|
32
|
+
on_mount: Optional[EventType[()]] = None,
|
|
33
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
34
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
35
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
36
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
37
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
38
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
39
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
40
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
41
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
42
42
|
**props,
|
|
43
43
|
) -> "RawLink":
|
|
44
44
|
"""Create the component.
|
|
@@ -79,21 +79,21 @@ class ScriptTag(Component):
|
|
|
79
79
|
class_name: Optional[Any] = None,
|
|
80
80
|
autofocus: Optional[bool] = None,
|
|
81
81
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
82
|
-
on_blur: Optional[EventType[
|
|
83
|
-
on_click: Optional[EventType[
|
|
84
|
-
on_context_menu: Optional[EventType[
|
|
85
|
-
on_double_click: Optional[EventType[
|
|
86
|
-
on_focus: Optional[EventType[
|
|
87
|
-
on_mount: Optional[EventType[
|
|
88
|
-
on_mouse_down: Optional[EventType[
|
|
89
|
-
on_mouse_enter: Optional[EventType[
|
|
90
|
-
on_mouse_leave: Optional[EventType[
|
|
91
|
-
on_mouse_move: Optional[EventType[
|
|
92
|
-
on_mouse_out: Optional[EventType[
|
|
93
|
-
on_mouse_over: Optional[EventType[
|
|
94
|
-
on_mouse_up: Optional[EventType[
|
|
95
|
-
on_scroll: Optional[EventType[
|
|
96
|
-
on_unmount: Optional[EventType[
|
|
82
|
+
on_blur: Optional[EventType[()]] = None,
|
|
83
|
+
on_click: Optional[EventType[()]] = None,
|
|
84
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
85
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
86
|
+
on_focus: Optional[EventType[()]] = None,
|
|
87
|
+
on_mount: Optional[EventType[()]] = None,
|
|
88
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
89
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
90
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
91
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
92
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
93
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
94
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
95
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
96
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
97
97
|
**props,
|
|
98
98
|
) -> "ScriptTag":
|
|
99
99
|
"""Create the component.
|