reflex 0.6.4a2__py3-none-any.whl → 0.6.5__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/custom_component.js.jinja2 +0 -14
- reflex/.templates/jinja/web/pages/utils.js.jinja2 +4 -8
- reflex/.templates/web/components/shiki/code.js +16 -11
- reflex/.templates/web/utils/state.js +29 -21
- reflex/__init__.py +4 -0
- reflex/__init__.pyi +4 -0
- reflex/app.py +148 -154
- reflex/app_mixins/lifespan.py +5 -1
- reflex/app_mixins/middleware.py +3 -1
- reflex/app_mixins/mixin.py +3 -2
- reflex/base.py +2 -4
- reflex/compiler/compiler.py +111 -37
- reflex/components/base/app_wrap.pyi +17 -17
- reflex/components/base/bare.py +72 -3
- reflex/components/base/body.pyi +17 -17
- reflex/components/base/document.pyi +81 -81
- reflex/components/base/error_boundary.pyi +25 -18
- reflex/components/base/fragment.pyi +17 -17
- reflex/components/base/head.pyi +33 -33
- reflex/components/base/link.pyi +33 -33
- reflex/components/base/meta.pyi +65 -65
- reflex/components/base/script.py +4 -4
- reflex/components/base/script.pyi +23 -20
- reflex/components/component.py +250 -31
- reflex/components/core/banner.py +1 -1
- reflex/components/core/banner.pyi +81 -81
- reflex/components/core/client_side_routing.pyi +33 -33
- reflex/components/core/clipboard.py +2 -2
- reflex/components/core/clipboard.pyi +24 -18
- reflex/components/core/debounce.py +2 -2
- reflex/components/core/debounce.pyi +18 -18
- reflex/components/core/html.pyi +17 -17
- reflex/components/core/upload.py +90 -28
- reflex/components/core/upload.pyi +128 -72
- reflex/components/datadisplay/code.py +55 -40
- reflex/components/datadisplay/code.pyi +46 -44
- reflex/components/datadisplay/dataeditor.py +21 -20
- reflex/components/datadisplay/dataeditor.pyi +103 -35
- reflex/components/datadisplay/shiki_code_block.py +60 -27
- reflex/components/datadisplay/shiki_code_block.pyi +86 -65
- reflex/components/dynamic.py +9 -5
- reflex/components/el/element.pyi +17 -17
- reflex/components/el/elements/base.pyi +17 -17
- reflex/components/el/elements/forms.py +12 -3
- reflex/components/el/elements/forms.pyi +293 -233
- reflex/components/el/elements/inline.pyi +449 -449
- reflex/components/el/elements/media.pyi +401 -401
- reflex/components/el/elements/metadata.pyi +97 -97
- reflex/components/el/elements/other.pyi +113 -113
- reflex/components/el/elements/scripts.pyi +49 -49
- reflex/components/el/elements/sectioning.pyi +241 -241
- reflex/components/el/elements/tables.pyi +161 -161
- reflex/components/el/elements/typography.pyi +241 -241
- reflex/components/gridjs/datatable.pyi +33 -33
- reflex/components/lucide/icon.py +1 -1
- reflex/components/lucide/icon.pyi +33 -33
- reflex/components/markdown/markdown.py +180 -49
- reflex/components/markdown/markdown.pyi +36 -19
- reflex/components/moment/moment.py +17 -21
- reflex/components/moment/moment.pyi +26 -21
- reflex/components/next/base.pyi +17 -17
- reflex/components/next/image.py +3 -3
- reflex/components/next/image.pyi +21 -19
- reflex/components/next/link.pyi +17 -17
- reflex/components/next/video.pyi +17 -17
- reflex/components/plotly/plotly.py +79 -78
- reflex/components/plotly/plotly.pyi +91 -41
- reflex/components/props.py +34 -0
- reflex/components/radix/primitives/accordion.py +15 -8
- reflex/components/radix/primitives/accordion.pyi +121 -118
- reflex/components/radix/primitives/base.pyi +33 -33
- reflex/components/radix/primitives/drawer.py +41 -20
- reflex/components/radix/primitives/drawer.pyi +279 -190
- reflex/components/radix/primitives/form.py +2 -2
- reflex/components/radix/primitives/form.pyi +200 -167
- reflex/components/radix/primitives/progress.pyi +81 -81
- reflex/components/radix/primitives/slider.pyi +89 -83
- reflex/components/radix/themes/base.py +30 -1
- reflex/components/radix/themes/base.pyi +286 -113
- reflex/components/radix/themes/color_mode.py +17 -9
- reflex/components/radix/themes/color_mode.pyi +68 -56
- reflex/components/radix/themes/components/alert_dialog.py +8 -5
- reflex/components/radix/themes/components/alert_dialog.pyi +125 -117
- reflex/components/radix/themes/components/aspect_ratio.pyi +17 -17
- reflex/components/radix/themes/components/avatar.py +1 -5
- reflex/components/radix/themes/components/avatar.pyi +17 -17
- reflex/components/radix/themes/components/badge.py +1 -5
- reflex/components/radix/themes/components/badge.pyi +17 -17
- reflex/components/radix/themes/components/button.pyi +18 -21
- reflex/components/radix/themes/components/callout.py +1 -4
- reflex/components/radix/themes/components/callout.pyi +81 -81
- reflex/components/radix/themes/components/card.py +1 -3
- reflex/components/radix/themes/components/card.pyi +17 -17
- reflex/components/radix/themes/components/checkbox.py +4 -8
- reflex/components/radix/themes/components/checkbox.pyi +61 -52
- reflex/components/radix/themes/components/checkbox_cards.pyi +33 -33
- reflex/components/radix/themes/components/checkbox_group.pyi +33 -33
- reflex/components/radix/themes/components/context_menu.py +121 -28
- reflex/components/radix/themes/components/context_menu.pyi +250 -147
- reflex/components/radix/themes/components/data_list.pyi +65 -65
- reflex/components/radix/themes/components/dialog.py +11 -11
- reflex/components/radix/themes/components/dialog.pyi +135 -120
- reflex/components/radix/themes/components/dropdown_menu.py +14 -25
- reflex/components/radix/themes/components/dropdown_menu.pyi +157 -145
- reflex/components/radix/themes/components/hover_card.py +19 -7
- reflex/components/radix/themes/components/hover_card.pyi +102 -67
- reflex/components/radix/themes/components/icon_button.pyi +18 -21
- reflex/components/radix/themes/components/inset.py +1 -3
- reflex/components/radix/themes/components/inset.pyi +17 -17
- reflex/components/radix/themes/components/popover.py +22 -13
- reflex/components/radix/themes/components/popover.pyi +98 -72
- reflex/components/radix/themes/components/progress.pyi +17 -17
- reflex/components/radix/themes/components/radio.pyi +17 -17
- reflex/components/radix/themes/components/radio_cards.py +2 -2
- reflex/components/radix/themes/components/radio_cards.pyi +37 -34
- reflex/components/radix/themes/components/radio_group.py +3 -7
- reflex/components/radix/themes/components/radio_group.pyi +69 -66
- reflex/components/radix/themes/components/scroll_area.py +1 -3
- reflex/components/radix/themes/components/scroll_area.pyi +17 -17
- reflex/components/radix/themes/components/segmented_control.pyi +37 -34
- reflex/components/radix/themes/components/select.py +7 -11
- reflex/components/radix/themes/components/select.pyi +175 -154
- reflex/components/radix/themes/components/separator.py +1 -4
- reflex/components/radix/themes/components/separator.pyi +17 -17
- reflex/components/radix/themes/components/skeleton.pyi +17 -17
- reflex/components/radix/themes/components/slider.py +12 -21
- reflex/components/radix/themes/components/slider.pyi +47 -25
- reflex/components/radix/themes/components/spinner.py +1 -4
- reflex/components/radix/themes/components/spinner.pyi +17 -17
- reflex/components/radix/themes/components/switch.py +3 -6
- reflex/components/radix/themes/components/switch.pyi +21 -18
- reflex/components/radix/themes/components/table.py +21 -5
- reflex/components/radix/themes/components/table.pyi +392 -116
- reflex/components/radix/themes/components/tabs.py +3 -6
- reflex/components/radix/themes/components/tabs.pyi +89 -83
- reflex/components/radix/themes/components/text_area.py +1 -5
- reflex/components/radix/themes/components/text_area.pyi +43 -20
- reflex/components/radix/themes/components/text_field.py +1 -5
- reflex/components/radix/themes/components/text_field.pyi +101 -55
- reflex/components/radix/themes/components/tooltip.py +5 -7
- reflex/components/radix/themes/components/tooltip.pyi +25 -22
- reflex/components/radix/themes/layout/base.py +2 -27
- reflex/components/radix/themes/layout/base.pyi +82 -82
- reflex/components/radix/themes/layout/box.pyi +17 -17
- reflex/components/radix/themes/layout/center.pyi +17 -17
- reflex/components/radix/themes/layout/container.pyi +17 -17
- reflex/components/radix/themes/layout/flex.py +1 -6
- reflex/components/radix/themes/layout/flex.pyi +17 -17
- reflex/components/radix/themes/layout/grid.py +1 -6
- reflex/components/radix/themes/layout/grid.pyi +17 -17
- reflex/components/radix/themes/layout/list.py +20 -15
- reflex/components/radix/themes/layout/list.pyi +175 -92
- reflex/components/radix/themes/layout/section.pyi +17 -17
- reflex/components/radix/themes/layout/spacer.pyi +17 -17
- reflex/components/radix/themes/layout/stack.py +6 -6
- reflex/components/radix/themes/layout/stack.pyi +91 -62
- reflex/components/radix/themes/typography/blockquote.py +2 -8
- reflex/components/radix/themes/typography/blockquote.pyi +17 -17
- reflex/components/radix/themes/typography/code.py +4 -10
- reflex/components/radix/themes/typography/code.pyi +19 -18
- reflex/components/radix/themes/typography/heading.py +4 -11
- reflex/components/radix/themes/typography/heading.pyi +19 -18
- reflex/components/radix/themes/typography/link.py +4 -10
- reflex/components/radix/themes/typography/link.pyi +19 -18
- reflex/components/radix/themes/typography/text.py +4 -11
- reflex/components/radix/themes/typography/text.pyi +115 -114
- reflex/components/react_player/audio.pyi +58 -33
- reflex/components/react_player/react_player.py +17 -17
- reflex/components/react_player/react_player.pyi +55 -33
- reflex/components/react_player/video.pyi +58 -33
- reflex/components/recharts/cartesian.py +45 -45
- reflex/components/recharts/cartesian.pyi +389 -304
- reflex/components/recharts/charts.py +22 -22
- reflex/components/recharts/charts.pyi +226 -179
- reflex/components/recharts/general.py +26 -27
- reflex/components/recharts/general.pyi +106 -99
- reflex/components/recharts/polar.py +33 -33
- reflex/components/recharts/polar.pyi +70 -64
- reflex/components/recharts/recharts.pyi +33 -33
- reflex/components/sonner/toast.py +9 -36
- reflex/components/sonner/toast.pyi +20 -24
- reflex/components/suneditor/editor.py +8 -8
- reflex/components/suneditor/editor.pyi +50 -25
- reflex/components/tags/iter_tag.py +1 -10
- reflex/components/tags/tag.py +1 -4
- reflex/config.py +252 -41
- reflex/constants/__init__.py +4 -16
- reflex/constants/base.py +7 -14
- reflex/constants/colors.py +0 -1
- reflex/constants/installer.py +12 -7
- reflex/constants/state.py +4 -0
- reflex/custom_components/custom_components.py +6 -6
- reflex/event.py +486 -241
- reflex/experimental/client_state.py +9 -9
- reflex/experimental/layout.py +2 -2
- reflex/experimental/layout.pyi +95 -87
- reflex/experimental/misc.py +1 -1
- reflex/istate/__init__.py +1 -0
- reflex/istate/proxy.py +33 -0
- reflex/istate/wrappers.py +27 -0
- reflex/model.py +7 -7
- reflex/page.py +2 -1
- reflex/reflex.py +142 -8
- reflex/state.py +133 -46
- reflex/testing.py +9 -7
- reflex/utils/console.py +0 -1
- reflex/utils/exceptions.py +31 -3
- reflex/utils/exec.py +33 -14
- reflex/utils/format.py +15 -12
- reflex/utils/net.py +1 -1
- reflex/utils/path_ops.py +2 -2
- reflex/utils/prerequisites.py +82 -46
- reflex/utils/pyi_generator.py +63 -20
- reflex/utils/registry.py +1 -1
- reflex/utils/serializers.py +75 -36
- reflex/utils/telemetry.py +3 -2
- reflex/utils/types.py +125 -10
- reflex/vars/base.py +131 -119
- reflex/vars/function.py +59 -12
- reflex/vars/number.py +3 -1
- reflex/vars/object.py +30 -24
- reflex/vars/sequence.py +7 -7
- {reflex-0.6.4a2.dist-info → reflex-0.6.5.dist-info}/METADATA +3 -3
- reflex-0.6.5.dist-info/RECORD +394 -0
- reflex-0.6.4a2.dist-info/RECORD +0 -391
- {reflex-0.6.4a2.dist-info → reflex-0.6.5.dist-info}/LICENSE +0 -0
- {reflex-0.6.4a2.dist-info → reflex-0.6.5.dist-info}/WHEEL +0 -0
- {reflex-0.6.4a2.dist-info → reflex-0.6.5.dist-info}/entry_points.txt +0 -0
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
# ------------------- DO NOT EDIT ----------------------
|
|
4
4
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
5
|
# ------------------------------------------------------
|
|
6
|
-
from typing import Any, Dict, Optional, Union, overload
|
|
6
|
+
from typing import Any, Dict, List, Optional, Union, overload
|
|
7
|
+
|
|
8
|
+
from typing_extensions import TypedDict, TypeVar
|
|
7
9
|
|
|
8
|
-
from reflex.base import Base
|
|
9
10
|
from reflex.components.component import NoSSRComponent
|
|
10
|
-
from reflex.event import EventType
|
|
11
|
+
from reflex.event import BASE_STATE, EventType
|
|
11
12
|
from reflex.style import Style
|
|
12
13
|
from reflex.utils import console
|
|
13
14
|
from reflex.vars.base import Var
|
|
@@ -20,11 +21,30 @@ except ImportError:
|
|
|
20
21
|
console.warn("Plotly is not installed. Please run `pip install plotly`.")
|
|
21
22
|
Figure = Any
|
|
22
23
|
Template = Any
|
|
24
|
+
T = TypeVar("T")
|
|
25
|
+
ItemOrList = Union[T, List[T]]
|
|
26
|
+
|
|
27
|
+
class BBox(TypedDict):
|
|
28
|
+
x0: Union[float, int, None]
|
|
29
|
+
x1: Union[float, int, None]
|
|
30
|
+
y0: Union[float, int, None]
|
|
31
|
+
y1: Union[float, int, None]
|
|
32
|
+
z0: Union[float, int, None]
|
|
33
|
+
z1: Union[float, int, None]
|
|
23
34
|
|
|
24
|
-
class
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
35
|
+
class Point(TypedDict):
|
|
36
|
+
x: Union[float, int, None]
|
|
37
|
+
y: Union[float, int, None]
|
|
38
|
+
z: Union[float, int, None]
|
|
39
|
+
lat: Union[float, int, None]
|
|
40
|
+
lon: Union[float, int, None]
|
|
41
|
+
curveNumber: Union[int, None]
|
|
42
|
+
pointNumber: Union[int, None]
|
|
43
|
+
pointNumbers: Union[List[int], None]
|
|
44
|
+
pointIndex: Union[int, None]
|
|
45
|
+
markerColor: Union[ItemOrList[ItemOrList[Union[float, int, str, None]]], None]
|
|
46
|
+
markerSize: Union[ItemOrList[ItemOrList[Union[float, int, None]]], None]
|
|
47
|
+
bbox: Union[BBox, None]
|
|
28
48
|
|
|
29
49
|
class Plotly(NoSSRComponent):
|
|
30
50
|
def add_imports(self) -> dict[str, str]: ...
|
|
@@ -44,40 +64,50 @@ class Plotly(NoSSRComponent):
|
|
|
44
64
|
id: Optional[Any] = None,
|
|
45
65
|
class_name: Optional[Any] = None,
|
|
46
66
|
autofocus: Optional[bool] = None,
|
|
47
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
48
|
-
on_after_plot: Optional[EventType] = None,
|
|
49
|
-
on_animated: Optional[EventType] = None,
|
|
50
|
-
on_animating_frame: Optional[EventType] = None,
|
|
51
|
-
on_animation_interrupted: Optional[EventType] = None,
|
|
52
|
-
on_autosize: Optional[EventType] = None,
|
|
53
|
-
on_before_hover: Optional[EventType] = None,
|
|
54
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
55
|
-
on_button_clicked: Optional[EventType] = None,
|
|
56
|
-
on_click: Optional[
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
67
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
68
|
+
on_after_plot: Optional[EventType[[], BASE_STATE]] = None,
|
|
69
|
+
on_animated: Optional[EventType[[], BASE_STATE]] = None,
|
|
70
|
+
on_animating_frame: Optional[EventType[[], BASE_STATE]] = None,
|
|
71
|
+
on_animation_interrupted: Optional[EventType[[], BASE_STATE]] = None,
|
|
72
|
+
on_autosize: Optional[EventType[[], BASE_STATE]] = None,
|
|
73
|
+
on_before_hover: Optional[EventType[[], BASE_STATE]] = None,
|
|
74
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
75
|
+
on_button_clicked: Optional[EventType[[], BASE_STATE]] = None,
|
|
76
|
+
on_click: Optional[
|
|
77
|
+
Union[EventType[[], BASE_STATE], EventType[[List[Point]], BASE_STATE]]
|
|
78
|
+
] = None,
|
|
79
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
80
|
+
on_deselect: Optional[EventType[[], BASE_STATE]] = None,
|
|
81
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
82
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
83
|
+
on_hover: Optional[
|
|
84
|
+
Union[EventType[[], BASE_STATE], EventType[[List[Point]], BASE_STATE]]
|
|
85
|
+
] = None,
|
|
86
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
87
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
88
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
89
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
90
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
91
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
92
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
93
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
94
|
+
on_redraw: Optional[EventType[[], BASE_STATE]] = None,
|
|
95
|
+
on_relayout: Optional[EventType[[], BASE_STATE]] = None,
|
|
96
|
+
on_relayouting: Optional[EventType[[], BASE_STATE]] = None,
|
|
97
|
+
on_restyle: Optional[EventType[[], BASE_STATE]] = None,
|
|
98
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
99
|
+
on_selected: Optional[
|
|
100
|
+
Union[EventType[[], BASE_STATE], EventType[[List[Point]], BASE_STATE]]
|
|
101
|
+
] = None,
|
|
102
|
+
on_selecting: Optional[
|
|
103
|
+
Union[EventType[[], BASE_STATE], EventType[[List[Point]], BASE_STATE]]
|
|
104
|
+
] = None,
|
|
105
|
+
on_transition_interrupted: Optional[EventType[[], BASE_STATE]] = None,
|
|
106
|
+
on_transitioning: Optional[EventType[[], BASE_STATE]] = None,
|
|
107
|
+
on_unhover: Optional[
|
|
108
|
+
Union[EventType[[], BASE_STATE], EventType[[List[Point]], BASE_STATE]]
|
|
109
|
+
] = None,
|
|
110
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
81
111
|
**props,
|
|
82
112
|
) -> "Plotly":
|
|
83
113
|
"""Create the Plotly component.
|
|
@@ -89,6 +119,26 @@ class Plotly(NoSSRComponent):
|
|
|
89
119
|
template: The template for visual appearance of the graph.
|
|
90
120
|
config: The config of the graph.
|
|
91
121
|
use_resize_handler: If true, the graph will resize when the window is resized.
|
|
122
|
+
on_after_plot: Fired after the plot is redrawn.
|
|
123
|
+
on_animated: Fired after the plot was animated.
|
|
124
|
+
on_animating_frame: Fired while animating a single frame (does not currently pass data through).
|
|
125
|
+
on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
|
|
126
|
+
on_autosize: Fired when the plot is responsively sized.
|
|
127
|
+
on_before_hover: Fired whenever mouse moves over a plot.
|
|
128
|
+
on_button_clicked: Fired when a plotly UI button is clicked.
|
|
129
|
+
on_click: Fired when the plot is clicked.
|
|
130
|
+
on_deselect: Fired when a selection is cleared (via double click).
|
|
131
|
+
on_double_click: Fired when the plot is double clicked.
|
|
132
|
+
on_hover: Fired when a plot element is hovered over.
|
|
133
|
+
on_relayout: Fired after the plot is layed out (zoom, pan, etc).
|
|
134
|
+
on_relayouting: Fired while the plot is being layed out.
|
|
135
|
+
on_restyle: Fired after the plot style is changed.
|
|
136
|
+
on_redraw: Fired after the plot is redrawn.
|
|
137
|
+
on_selected: Fired after selecting plot elements.
|
|
138
|
+
on_selecting: Fired while dragging a selection.
|
|
139
|
+
on_transitioning: Fired while an animation is occuring.
|
|
140
|
+
on_transition_interrupted: Fired when a transition is stopped early.
|
|
141
|
+
on_unhover: Fired when a hovered element is no longer hovered.
|
|
92
142
|
style: The style of the component.
|
|
93
143
|
key: A unique key for the component.
|
|
94
144
|
id: The id for the component.
|
reflex/components/props.py
CHANGED
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from pydantic import ValidationError
|
|
6
|
+
|
|
5
7
|
from reflex.base import Base
|
|
6
8
|
from reflex.utils import format
|
|
9
|
+
from reflex.utils.exceptions import InvalidPropValueError
|
|
7
10
|
from reflex.vars.object import LiteralObjectVar
|
|
8
11
|
|
|
9
12
|
|
|
@@ -40,3 +43,34 @@ class PropsBase(Base):
|
|
|
40
43
|
format.to_camel_case(key): value
|
|
41
44
|
for key, value in super().dict(*args, **kwargs).items()
|
|
42
45
|
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class NoExtrasAllowedProps(Base):
|
|
49
|
+
"""A class that holds props to be passed or applied to a component with no extra props allowed."""
|
|
50
|
+
|
|
51
|
+
def __init__(self, component_name=None, **kwargs):
|
|
52
|
+
"""Initialize the props.
|
|
53
|
+
|
|
54
|
+
Args:
|
|
55
|
+
component_name: The custom name of the component.
|
|
56
|
+
kwargs: Kwargs to initialize the props.
|
|
57
|
+
|
|
58
|
+
Raises:
|
|
59
|
+
InvalidPropValueError: If invalid props are passed on instantiation.
|
|
60
|
+
"""
|
|
61
|
+
component_name = component_name or type(self).__name__
|
|
62
|
+
try:
|
|
63
|
+
super().__init__(**kwargs)
|
|
64
|
+
except ValidationError as e:
|
|
65
|
+
invalid_fields = ", ".join([error["loc"][0] for error in e.errors()]) # type: ignore
|
|
66
|
+
supported_props_str = ", ".join(f'"{field}"' for field in self.get_fields())
|
|
67
|
+
raise InvalidPropValueError(
|
|
68
|
+
f"Invalid prop(s) {invalid_fields} for {component_name!r}. Supported props are {supported_props_str}"
|
|
69
|
+
) from None
|
|
70
|
+
|
|
71
|
+
class Config:
|
|
72
|
+
"""Pydantic config."""
|
|
73
|
+
|
|
74
|
+
arbitrary_types_allowed = True
|
|
75
|
+
use_enum_values = True
|
|
76
|
+
extra = "forbid"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Any, List, Literal,
|
|
5
|
+
from typing import Any, List, Literal, Tuple, Union
|
|
6
6
|
|
|
7
7
|
from reflex.components.component import Component, ComponentNamespace
|
|
8
8
|
from reflex.components.core.colors import color
|
|
@@ -193,6 +193,11 @@ class AccordionItem(AccordionComponent):
|
|
|
193
193
|
# When true, prevents the user from interacting with the item.
|
|
194
194
|
disabled: Var[bool]
|
|
195
195
|
|
|
196
|
+
# The header of the accordion item.
|
|
197
|
+
header: Var[Union[Component, str]]
|
|
198
|
+
# The content of the accordion item.
|
|
199
|
+
content: Var[Union[Component, str]] = Var.create(None)
|
|
200
|
+
|
|
196
201
|
_valid_children: List[str] = [
|
|
197
202
|
"AccordionHeader",
|
|
198
203
|
"AccordionTrigger",
|
|
@@ -205,21 +210,20 @@ class AccordionItem(AccordionComponent):
|
|
|
205
210
|
def create(
|
|
206
211
|
cls,
|
|
207
212
|
*children,
|
|
208
|
-
header: Optional[Component | Var] = None,
|
|
209
|
-
content: Optional[Component | Var] = None,
|
|
210
213
|
**props,
|
|
211
214
|
) -> Component:
|
|
212
215
|
"""Create an accordion item.
|
|
213
216
|
|
|
214
217
|
Args:
|
|
215
218
|
*children: The list of children to use if header and content are not provided.
|
|
216
|
-
header: The header of the accordion item.
|
|
217
|
-
content: The content of the accordion item.
|
|
218
219
|
**props: Additional properties to apply to the accordion item.
|
|
219
220
|
|
|
220
221
|
Returns:
|
|
221
222
|
The accordion item.
|
|
222
223
|
"""
|
|
224
|
+
header = props.pop("header", None)
|
|
225
|
+
content = props.pop("content", None)
|
|
226
|
+
|
|
223
227
|
# The item requires a value to toggle (use a random unique name if not provided).
|
|
224
228
|
value = props.pop("value", get_uuid_string_var())
|
|
225
229
|
|
|
@@ -291,6 +295,9 @@ class AccordionItem(AccordionComponent):
|
|
|
291
295
|
},
|
|
292
296
|
}
|
|
293
297
|
|
|
298
|
+
def _exclude_props(self) -> list[str]:
|
|
299
|
+
return ["header", "content"]
|
|
300
|
+
|
|
294
301
|
|
|
295
302
|
class AccordionHeader(AccordionComponent):
|
|
296
303
|
"""An accordion component."""
|
|
@@ -375,7 +382,7 @@ class AccordionTrigger(AccordionComponent):
|
|
|
375
382
|
"background_color": color("accent", 4),
|
|
376
383
|
},
|
|
377
384
|
"& > .AccordionChevron": {
|
|
378
|
-
"transition":
|
|
385
|
+
"transition": "transform var(--animation-duration) var(--animation-easing)",
|
|
379
386
|
},
|
|
380
387
|
_inherited_variant_selector("classic"): {
|
|
381
388
|
"color": "var(--accent-contrast)",
|
|
@@ -478,11 +485,11 @@ to {
|
|
|
478
485
|
The style of the component.
|
|
479
486
|
"""
|
|
480
487
|
slideDown = LiteralVar.create(
|
|
481
|
-
|
|
488
|
+
"${slideDown} var(--animation-duration) var(--animation-easing)",
|
|
482
489
|
)
|
|
483
490
|
|
|
484
491
|
slideUp = LiteralVar.create(
|
|
485
|
-
|
|
492
|
+
"${slideUp} var(--animation-duration) var(--animation-easing)",
|
|
486
493
|
)
|
|
487
494
|
|
|
488
495
|
return {
|
|
@@ -8,7 +8,7 @@ from typing import Any, Dict, List, Literal, Optional, Tuple, Union, overload
|
|
|
8
8
|
from reflex.components.component import Component, ComponentNamespace
|
|
9
9
|
from reflex.components.lucide.icon import Icon
|
|
10
10
|
from reflex.components.radix.primitives.base import RadixPrimitiveComponent
|
|
11
|
-
from reflex.event import EventType
|
|
11
|
+
from reflex.event import BASE_STATE, EventType
|
|
12
12
|
from reflex.style import Style
|
|
13
13
|
from reflex.vars.base import Var
|
|
14
14
|
|
|
@@ -100,22 +100,22 @@ class AccordionComponent(RadixPrimitiveComponent):
|
|
|
100
100
|
id: Optional[Any] = None,
|
|
101
101
|
class_name: Optional[Any] = None,
|
|
102
102
|
autofocus: Optional[bool] = None,
|
|
103
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
104
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
105
|
-
on_click: Optional[EventType[[]]] = None,
|
|
106
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
107
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
108
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
109
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
110
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
111
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
112
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
113
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
114
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
115
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
116
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
117
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
118
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
103
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
104
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
105
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
106
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
107
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
108
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
109
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
110
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
111
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
112
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
113
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
114
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
115
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
116
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
117
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
118
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
119
119
|
**props,
|
|
120
120
|
) -> "AccordionComponent":
|
|
121
121
|
"""Create the component.
|
|
@@ -246,23 +246,25 @@ class AccordionRoot(AccordionComponent):
|
|
|
246
246
|
id: Optional[Any] = None,
|
|
247
247
|
class_name: Optional[Any] = None,
|
|
248
248
|
autofocus: Optional[bool] = None,
|
|
249
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
250
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
251
|
-
on_click: Optional[EventType[[]]] = None,
|
|
252
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
253
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
254
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
255
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
256
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
257
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
258
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
259
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
260
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
261
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
262
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
263
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
264
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
265
|
-
on_value_change: Optional[
|
|
249
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
250
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
251
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
252
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
253
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
254
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
255
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
256
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
257
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
258
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
259
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
260
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
261
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
262
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
263
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
264
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
265
|
+
on_value_change: Optional[
|
|
266
|
+
Union[EventType[[], BASE_STATE], EventType[[str | List[str]], BASE_STATE]]
|
|
267
|
+
] = None,
|
|
266
268
|
**props,
|
|
267
269
|
) -> "AccordionRoot":
|
|
268
270
|
"""Create the component.
|
|
@@ -280,6 +282,7 @@ class AccordionRoot(AccordionComponent):
|
|
|
280
282
|
duration: The time in milliseconds to animate open and close
|
|
281
283
|
easing: The easing function to use for the animation.
|
|
282
284
|
show_dividers: Whether to show divider lines between items.
|
|
285
|
+
on_value_change: Fired when the opened the accordions changes.
|
|
283
286
|
color_scheme: The color scheme of the component.
|
|
284
287
|
variant: The variant of the component.
|
|
285
288
|
as_child: Change the default rendered element for the one passed as a child.
|
|
@@ -302,10 +305,10 @@ class AccordionItem(AccordionComponent):
|
|
|
302
305
|
def create( # type: ignore
|
|
303
306
|
cls,
|
|
304
307
|
*children,
|
|
305
|
-
header: Optional[Union[Component, Var]] = None,
|
|
306
|
-
content: Optional[Union[Component, Var]] = None,
|
|
307
308
|
value: Optional[Union[Var[str], str]] = None,
|
|
308
309
|
disabled: Optional[Union[Var[bool], bool]] = None,
|
|
310
|
+
header: Optional[Union[Component, Var[Union[Component, str]], str]] = None,
|
|
311
|
+
content: Optional[Union[Component, Var[Union[Component, str]], str]] = None,
|
|
309
312
|
color_scheme: Optional[
|
|
310
313
|
Union[
|
|
311
314
|
Literal[
|
|
@@ -380,32 +383,32 @@ class AccordionItem(AccordionComponent):
|
|
|
380
383
|
id: Optional[Any] = None,
|
|
381
384
|
class_name: Optional[Any] = None,
|
|
382
385
|
autofocus: Optional[bool] = None,
|
|
383
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
384
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
385
|
-
on_click: Optional[EventType[[]]] = None,
|
|
386
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
387
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
388
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
389
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
390
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
391
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
392
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
393
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
394
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
395
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
396
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
397
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
398
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
386
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
387
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
388
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
389
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
390
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
391
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
392
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
393
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
394
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
395
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
396
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
397
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
398
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
399
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
400
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
401
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
399
402
|
**props,
|
|
400
403
|
) -> "AccordionItem":
|
|
401
404
|
"""Create an accordion item.
|
|
402
405
|
|
|
403
406
|
Args:
|
|
404
407
|
*children: The list of children to use if header and content are not provided.
|
|
405
|
-
header: The header of the accordion item.
|
|
406
|
-
content: The content of the accordion item.
|
|
407
408
|
value: A unique identifier for the item.
|
|
408
409
|
disabled: When true, prevents the user from interacting with the item.
|
|
410
|
+
header: The header of the accordion item.
|
|
411
|
+
content: The content of the accordion item.
|
|
409
412
|
color_scheme: The color scheme of the component.
|
|
410
413
|
variant: The variant of the component.
|
|
411
414
|
as_child: Change the default rendered element for the one passed as a child.
|
|
@@ -504,22 +507,22 @@ class AccordionHeader(AccordionComponent):
|
|
|
504
507
|
id: Optional[Any] = None,
|
|
505
508
|
class_name: Optional[Any] = None,
|
|
506
509
|
autofocus: Optional[bool] = None,
|
|
507
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
508
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
509
|
-
on_click: Optional[EventType[[]]] = None,
|
|
510
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
511
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
512
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
513
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
514
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
515
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
516
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
517
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
518
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
519
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
520
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
521
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
522
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
510
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
511
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
512
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
513
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
514
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
515
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
516
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
517
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
518
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
519
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
520
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
521
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
522
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
523
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
524
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
525
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
523
526
|
**props,
|
|
524
527
|
) -> "AccordionHeader":
|
|
525
528
|
"""Create the Accordion header component.
|
|
@@ -624,22 +627,22 @@ class AccordionTrigger(AccordionComponent):
|
|
|
624
627
|
id: Optional[Any] = None,
|
|
625
628
|
class_name: Optional[Any] = None,
|
|
626
629
|
autofocus: Optional[bool] = None,
|
|
627
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
628
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
629
|
-
on_click: Optional[EventType[[]]] = None,
|
|
630
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
631
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
632
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
633
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
634
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
635
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
636
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
637
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
638
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
639
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
640
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
641
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
642
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
630
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
631
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
632
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
633
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
634
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
635
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
636
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
637
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
638
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
639
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
640
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
641
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
642
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
643
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
644
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
645
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
643
646
|
**props,
|
|
644
647
|
) -> "AccordionTrigger":
|
|
645
648
|
"""Create the Accordion trigger component.
|
|
@@ -676,22 +679,22 @@ class AccordionIcon(Icon):
|
|
|
676
679
|
id: Optional[Any] = None,
|
|
677
680
|
class_name: Optional[Any] = None,
|
|
678
681
|
autofocus: Optional[bool] = None,
|
|
679
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
680
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
681
|
-
on_click: Optional[EventType[[]]] = None,
|
|
682
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
683
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
684
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
685
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
686
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
687
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
688
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
689
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
690
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
691
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
692
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
693
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
694
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
682
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
683
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
684
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
685
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
686
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
687
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
688
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
689
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
690
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
691
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
692
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
693
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
694
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
695
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
696
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
697
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
695
698
|
**props,
|
|
696
699
|
) -> "AccordionIcon":
|
|
697
700
|
"""Create the Accordion icon component.
|
|
@@ -793,22 +796,22 @@ class AccordionContent(AccordionComponent):
|
|
|
793
796
|
id: Optional[Any] = None,
|
|
794
797
|
class_name: Optional[Any] = None,
|
|
795
798
|
autofocus: Optional[bool] = None,
|
|
796
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
797
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
798
|
-
on_click: Optional[EventType[[]]] = None,
|
|
799
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
800
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
801
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
802
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
803
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
804
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
805
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
806
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
807
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
808
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
809
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
810
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
811
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
799
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
800
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
801
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
802
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
803
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
804
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
805
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
806
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
807
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
808
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
809
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
810
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
811
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
812
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
813
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
814
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
812
815
|
**props,
|
|
813
816
|
) -> "AccordionContent":
|
|
814
817
|
"""Create the Accordion content component.
|