reflex 0.6.4a3__py3-none-any.whl → 0.6.5a1__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.
- 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 +82 -28
- reflex/components/core/upload.pyi +77 -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 +27 -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 +198 -35
- 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 +127 -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.4a3.dist-info → reflex-0.6.5a1.dist-info}/METADATA +3 -3
- reflex-0.6.5a1.dist-info/RECORD +394 -0
- reflex-0.6.4a3.dist-info/RECORD +0 -391
- {reflex-0.6.4a3.dist-info → reflex-0.6.5a1.dist-info}/LICENSE +0 -0
- {reflex-0.6.4a3.dist-info → reflex-0.6.5a1.dist-info}/WHEEL +0 -0
- {reflex-0.6.4a3.dist-info → reflex-0.6.5a1.dist-info}/entry_points.txt +0 -0
|
@@ -4,14 +4,10 @@ from typing import Dict, List, Literal, Union
|
|
|
4
4
|
|
|
5
5
|
from reflex.components.component import ComponentNamespace
|
|
6
6
|
from reflex.components.core.breakpoints import Responsive
|
|
7
|
-
from reflex.event import EventHandler,
|
|
7
|
+
from reflex.event import EventHandler, no_args_event_spec, passthrough_event_spec
|
|
8
8
|
from reflex.vars.base import Var
|
|
9
9
|
|
|
10
|
-
from ..base import
|
|
11
|
-
LiteralAccentColor,
|
|
12
|
-
RadixThemesComponent,
|
|
13
|
-
RadixThemesTriggerComponent,
|
|
14
|
-
)
|
|
10
|
+
from ..base import LiteralAccentColor, RadixThemesComponent, RadixThemesTriggerComponent
|
|
15
11
|
|
|
16
12
|
LiteralDirType = Literal["ltr", "rtl"]
|
|
17
13
|
|
|
@@ -23,7 +19,6 @@ LiteralSideType = Literal["top", "right", "bottom", "left"]
|
|
|
23
19
|
|
|
24
20
|
LiteralAlignType = Literal["start", "center", "end"]
|
|
25
21
|
|
|
26
|
-
|
|
27
22
|
LiteralStickyType = Literal[
|
|
28
23
|
"partial",
|
|
29
24
|
"always",
|
|
@@ -50,7 +45,7 @@ class DropdownMenuRoot(RadixThemesComponent):
|
|
|
50
45
|
_invalid_children: List[str] = ["DropdownMenuItem"]
|
|
51
46
|
|
|
52
47
|
# Fired when the open state changes.
|
|
53
|
-
on_open_change: EventHandler[
|
|
48
|
+
on_open_change: EventHandler[passthrough_event_spec(bool)]
|
|
54
49
|
|
|
55
50
|
|
|
56
51
|
class DropdownMenuTrigger(RadixThemesTriggerComponent):
|
|
@@ -110,9 +105,6 @@ class DropdownMenuContent(RadixThemesComponent):
|
|
|
110
105
|
# The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0.
|
|
111
106
|
collision_padding: Var[Union[float, int, Dict[str, Union[float, int]]]]
|
|
112
107
|
|
|
113
|
-
# The padding between the arrow and the edges of the content. If your content has border-radius, this will prevent it from overflowing the corners. Defaults to 0.
|
|
114
|
-
arrow_padding: Var[Union[float, int]]
|
|
115
|
-
|
|
116
108
|
# The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial".
|
|
117
109
|
sticky: Var[LiteralStickyType]
|
|
118
110
|
|
|
@@ -120,19 +112,19 @@ class DropdownMenuContent(RadixThemesComponent):
|
|
|
120
112
|
hide_when_detached: Var[bool]
|
|
121
113
|
|
|
122
114
|
# Fired when the dialog is closed.
|
|
123
|
-
on_close_auto_focus: EventHandler[
|
|
115
|
+
on_close_auto_focus: EventHandler[no_args_event_spec]
|
|
124
116
|
|
|
125
117
|
# Fired when the escape key is pressed.
|
|
126
|
-
on_escape_key_down: EventHandler[
|
|
118
|
+
on_escape_key_down: EventHandler[no_args_event_spec]
|
|
127
119
|
|
|
128
120
|
# Fired when the pointer is down outside the dialog.
|
|
129
|
-
on_pointer_down_outside: EventHandler[
|
|
121
|
+
on_pointer_down_outside: EventHandler[no_args_event_spec]
|
|
130
122
|
|
|
131
123
|
# Fired when focus moves outside the dialog.
|
|
132
|
-
on_focus_outside: EventHandler[
|
|
124
|
+
on_focus_outside: EventHandler[no_args_event_spec]
|
|
133
125
|
|
|
134
126
|
# Fired when the pointer interacts outside the dialog.
|
|
135
|
-
on_interact_outside: EventHandler[
|
|
127
|
+
on_interact_outside: EventHandler[no_args_event_spec]
|
|
136
128
|
|
|
137
129
|
|
|
138
130
|
class DropdownMenuSubTrigger(RadixThemesTriggerComponent):
|
|
@@ -164,7 +156,7 @@ class DropdownMenuSub(RadixThemesComponent):
|
|
|
164
156
|
default_open: Var[bool]
|
|
165
157
|
|
|
166
158
|
# Fired when the open state changes.
|
|
167
|
-
on_open_change: EventHandler[
|
|
159
|
+
on_open_change: EventHandler[passthrough_event_spec(bool)]
|
|
168
160
|
|
|
169
161
|
|
|
170
162
|
class DropdownMenuSubContent(RadixThemesComponent):
|
|
@@ -193,9 +185,6 @@ class DropdownMenuSubContent(RadixThemesComponent):
|
|
|
193
185
|
# The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0.
|
|
194
186
|
collision_padding: Var[Union[float, int, Dict[str, Union[float, int]]]]
|
|
195
187
|
|
|
196
|
-
# The padding between the arrow and the edges of the content. If your content has border-radius, this will prevent it from overflowing the corners. Defaults to 0.
|
|
197
|
-
arrow_padding: Var[Union[float, int]]
|
|
198
|
-
|
|
199
188
|
# The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial".
|
|
200
189
|
sticky: Var[LiteralStickyType]
|
|
201
190
|
|
|
@@ -205,16 +194,16 @@ class DropdownMenuSubContent(RadixThemesComponent):
|
|
|
205
194
|
_valid_parents: List[str] = ["DropdownMenuSub"]
|
|
206
195
|
|
|
207
196
|
# Fired when the escape key is pressed.
|
|
208
|
-
on_escape_key_down: EventHandler[
|
|
197
|
+
on_escape_key_down: EventHandler[no_args_event_spec]
|
|
209
198
|
|
|
210
199
|
# Fired when the pointer is down outside the dialog.
|
|
211
|
-
on_pointer_down_outside: EventHandler[
|
|
200
|
+
on_pointer_down_outside: EventHandler[no_args_event_spec]
|
|
212
201
|
|
|
213
202
|
# Fired when focus moves outside the dialog.
|
|
214
|
-
on_focus_outside: EventHandler[
|
|
203
|
+
on_focus_outside: EventHandler[no_args_event_spec]
|
|
215
204
|
|
|
216
205
|
# Fired when the pointer interacts outside the dialog.
|
|
217
|
-
on_interact_outside: EventHandler[
|
|
206
|
+
on_interact_outside: EventHandler[no_args_event_spec]
|
|
218
207
|
|
|
219
208
|
|
|
220
209
|
class DropdownMenuItem(RadixThemesComponent):
|
|
@@ -240,7 +229,7 @@ class DropdownMenuItem(RadixThemesComponent):
|
|
|
240
229
|
_valid_parents: List[str] = ["DropdownMenuContent", "DropdownMenuSubContent"]
|
|
241
230
|
|
|
242
231
|
# Fired when the item is selected.
|
|
243
|
-
on_select: EventHandler[
|
|
232
|
+
on_select: EventHandler[no_args_event_spec]
|
|
244
233
|
|
|
245
234
|
|
|
246
235
|
class DropdownMenuSeparator(RadixThemesComponent):
|
|
@@ -7,7 +7,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|
|
7
7
|
|
|
8
8
|
from reflex.components.component import ComponentNamespace
|
|
9
9
|
from reflex.components.core.breakpoints import Breakpoints
|
|
10
|
-
from reflex.event import EventType
|
|
10
|
+
from reflex.event import BASE_STATE, EventType
|
|
11
11
|
from reflex.style import Style
|
|
12
12
|
from reflex.vars.base import Var
|
|
13
13
|
|
|
@@ -35,23 +35,25 @@ class DropdownMenuRoot(RadixThemesComponent):
|
|
|
35
35
|
id: Optional[Any] = None,
|
|
36
36
|
class_name: Optional[Any] = None,
|
|
37
37
|
autofocus: Optional[bool] = None,
|
|
38
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
39
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
40
|
-
on_click: Optional[EventType[[]]] = None,
|
|
41
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
42
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
43
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
44
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
45
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
46
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
47
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
48
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
49
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
50
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
51
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
52
|
-
on_open_change: Optional[
|
|
53
|
-
|
|
54
|
-
|
|
38
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
39
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
40
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
41
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
42
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
43
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
44
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
45
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
46
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
47
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
48
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
49
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
50
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
51
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
52
|
+
on_open_change: Optional[
|
|
53
|
+
Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]]
|
|
54
|
+
] = None,
|
|
55
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
56
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
55
57
|
**props,
|
|
56
58
|
) -> "DropdownMenuRoot":
|
|
57
59
|
"""Create a new component instance.
|
|
@@ -65,6 +67,7 @@ class DropdownMenuRoot(RadixThemesComponent):
|
|
|
65
67
|
open: The controlled open state of the dropdown menu. Must be used in conjunction with onOpenChange.
|
|
66
68
|
modal: The modality of the dropdown menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers. Defaults to True.
|
|
67
69
|
dir: The reading direction of submenus when applicable. If omitted, inherits globally from DirectionProvider or assumes LTR (left-to-right) reading mode.
|
|
70
|
+
on_open_change: Fired when the open state changes.
|
|
68
71
|
style: The style of the component.
|
|
69
72
|
key: A unique key for the component.
|
|
70
73
|
id: The id for the component.
|
|
@@ -90,22 +93,22 @@ class DropdownMenuTrigger(RadixThemesTriggerComponent):
|
|
|
90
93
|
id: Optional[Any] = None,
|
|
91
94
|
class_name: Optional[Any] = None,
|
|
92
95
|
autofocus: Optional[bool] = None,
|
|
93
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
94
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
95
|
-
on_click: Optional[EventType[[]]] = None,
|
|
96
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
97
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
98
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
99
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
100
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
101
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
102
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
103
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
104
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
105
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
106
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
107
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
108
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
96
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
97
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
98
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
99
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
100
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
101
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
102
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
103
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
104
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
105
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
106
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
107
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
108
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
109
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
110
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
111
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
109
112
|
**props,
|
|
110
113
|
) -> "DropdownMenuTrigger":
|
|
111
114
|
"""Create a new RadixThemesTriggerComponent instance.
|
|
@@ -224,7 +227,6 @@ class DropdownMenuContent(RadixThemesComponent):
|
|
|
224
227
|
int,
|
|
225
228
|
]
|
|
226
229
|
] = None,
|
|
227
|
-
arrow_padding: Optional[Union[Var[Union[float, int]], float, int]] = None,
|
|
228
230
|
sticky: Optional[
|
|
229
231
|
Union[Literal["always", "partial"], Var[Literal["always", "partial"]]]
|
|
230
232
|
] = None,
|
|
@@ -234,27 +236,27 @@ class DropdownMenuContent(RadixThemesComponent):
|
|
|
234
236
|
id: Optional[Any] = None,
|
|
235
237
|
class_name: Optional[Any] = None,
|
|
236
238
|
autofocus: Optional[bool] = None,
|
|
237
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
238
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
239
|
-
on_click: Optional[EventType[[]]] = None,
|
|
240
|
-
on_close_auto_focus: Optional[EventType[[]]] = None,
|
|
241
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
242
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
243
|
-
on_escape_key_down: Optional[EventType[[]]] = None,
|
|
244
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
245
|
-
on_focus_outside: Optional[EventType[[]]] = None,
|
|
246
|
-
on_interact_outside: Optional[EventType[[]]] = None,
|
|
247
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
248
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
249
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
250
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
251
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
252
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
253
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
254
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
255
|
-
on_pointer_down_outside: Optional[EventType[[]]] = None,
|
|
256
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
257
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
239
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
240
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
241
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
242
|
+
on_close_auto_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
243
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
244
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
245
|
+
on_escape_key_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
246
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
247
|
+
on_focus_outside: Optional[EventType[[], BASE_STATE]] = None,
|
|
248
|
+
on_interact_outside: Optional[EventType[[], BASE_STATE]] = None,
|
|
249
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
250
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
251
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
252
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
253
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
254
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
255
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
256
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
257
|
+
on_pointer_down_outside: Optional[EventType[[], BASE_STATE]] = None,
|
|
258
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
259
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
258
260
|
**props,
|
|
259
261
|
) -> "DropdownMenuContent":
|
|
260
262
|
"""Create a new component instance.
|
|
@@ -277,9 +279,13 @@ class DropdownMenuContent(RadixThemesComponent):
|
|
|
277
279
|
align_offset: An offset in pixels from the "start" or "end" alignment options.
|
|
278
280
|
avoid_collisions: When true, overrides the side and align preferences to prevent collisions with boundary edges. Defaults to True.
|
|
279
281
|
collision_padding: The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0.
|
|
280
|
-
arrow_padding: The padding between the arrow and the edges of the content. If your content has border-radius, this will prevent it from overflowing the corners. Defaults to 0.
|
|
281
282
|
sticky: The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial".
|
|
282
283
|
hide_when_detached: Whether to hide the content when the trigger becomes fully occluded. Defaults to False.
|
|
284
|
+
on_close_auto_focus: Fired when the dialog is closed.
|
|
285
|
+
on_escape_key_down: Fired when the escape key is pressed.
|
|
286
|
+
on_pointer_down_outside: Fired when the pointer is down outside the dialog.
|
|
287
|
+
on_focus_outside: Fired when focus moves outside the dialog.
|
|
288
|
+
on_interact_outside: Fired when the pointer interacts outside the dialog.
|
|
283
289
|
style: The style of the component.
|
|
284
290
|
key: A unique key for the component.
|
|
285
291
|
id: The id for the component.
|
|
@@ -307,22 +313,22 @@ class DropdownMenuSubTrigger(RadixThemesTriggerComponent):
|
|
|
307
313
|
id: Optional[Any] = None,
|
|
308
314
|
class_name: Optional[Any] = None,
|
|
309
315
|
autofocus: Optional[bool] = None,
|
|
310
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
311
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
312
|
-
on_click: Optional[EventType[[]]] = None,
|
|
313
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
314
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
315
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
316
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
317
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
318
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
319
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
320
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
321
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
322
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
323
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
324
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
325
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
316
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
317
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
318
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
319
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
320
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
321
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
322
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
323
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
324
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
325
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
326
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
327
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
328
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
329
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
330
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
331
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
326
332
|
**props,
|
|
327
333
|
) -> "DropdownMenuSubTrigger":
|
|
328
334
|
"""Create a new RadixThemesTriggerComponent instance.
|
|
@@ -349,23 +355,25 @@ class DropdownMenuSub(RadixThemesComponent):
|
|
|
349
355
|
id: Optional[Any] = None,
|
|
350
356
|
class_name: Optional[Any] = None,
|
|
351
357
|
autofocus: Optional[bool] = None,
|
|
352
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
353
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
354
|
-
on_click: Optional[EventType[[]]] = None,
|
|
355
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
356
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
357
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
358
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
359
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
360
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
361
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
362
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
363
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
364
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
365
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
366
|
-
on_open_change: Optional[
|
|
367
|
-
|
|
368
|
-
|
|
358
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
359
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
360
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
361
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
362
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
363
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
364
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
365
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
366
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
367
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
368
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
369
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
370
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
371
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
372
|
+
on_open_change: Optional[
|
|
373
|
+
Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]]
|
|
374
|
+
] = None,
|
|
375
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
376
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
369
377
|
**props,
|
|
370
378
|
) -> "DropdownMenuSub":
|
|
371
379
|
"""Create a new component instance.
|
|
@@ -377,6 +385,7 @@ class DropdownMenuSub(RadixThemesComponent):
|
|
|
377
385
|
*children: Child components.
|
|
378
386
|
open: The controlled open state of the submenu. Must be used in conjunction with `on_open_change`.
|
|
379
387
|
default_open: The open state of the submenu when it is initially rendered. Use when you do not need to control its open state.
|
|
388
|
+
on_open_change: Fired when the open state changes.
|
|
380
389
|
style: The style of the component.
|
|
381
390
|
key: A unique key for the component.
|
|
382
391
|
id: The id for the component.
|
|
@@ -410,7 +419,6 @@ class DropdownMenuSubContent(RadixThemesComponent):
|
|
|
410
419
|
int,
|
|
411
420
|
]
|
|
412
421
|
] = None,
|
|
413
|
-
arrow_padding: Optional[Union[Var[Union[float, int]], float, int]] = None,
|
|
414
422
|
sticky: Optional[
|
|
415
423
|
Union[Literal["always", "partial"], Var[Literal["always", "partial"]]]
|
|
416
424
|
] = None,
|
|
@@ -420,26 +428,26 @@ class DropdownMenuSubContent(RadixThemesComponent):
|
|
|
420
428
|
id: Optional[Any] = None,
|
|
421
429
|
class_name: Optional[Any] = None,
|
|
422
430
|
autofocus: Optional[bool] = None,
|
|
423
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
424
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
425
|
-
on_click: Optional[EventType[[]]] = None,
|
|
426
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
427
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
428
|
-
on_escape_key_down: Optional[EventType[[]]] = None,
|
|
429
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
430
|
-
on_focus_outside: Optional[EventType[[]]] = None,
|
|
431
|
-
on_interact_outside: Optional[EventType[[]]] = None,
|
|
432
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
433
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
434
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
435
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
436
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
437
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
438
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
439
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
440
|
-
on_pointer_down_outside: Optional[EventType[[]]] = None,
|
|
441
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
442
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
431
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
432
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
433
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
434
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
435
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
436
|
+
on_escape_key_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
437
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
438
|
+
on_focus_outside: Optional[EventType[[], BASE_STATE]] = None,
|
|
439
|
+
on_interact_outside: Optional[EventType[[], BASE_STATE]] = None,
|
|
440
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
441
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
442
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
443
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
444
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
445
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
446
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
447
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
448
|
+
on_pointer_down_outside: Optional[EventType[[], BASE_STATE]] = None,
|
|
449
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
450
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
443
451
|
**props,
|
|
444
452
|
) -> "DropdownMenuSubContent":
|
|
445
453
|
"""Create a new component instance.
|
|
@@ -456,9 +464,12 @@ class DropdownMenuSubContent(RadixThemesComponent):
|
|
|
456
464
|
align_offset: An offset in pixels from the "start" or "end" alignment options.
|
|
457
465
|
avoid_collisions: When true, overrides the side and align preferences to prevent collisions with boundary edges. Defaults to True.
|
|
458
466
|
collision_padding: The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0.
|
|
459
|
-
arrow_padding: The padding between the arrow and the edges of the content. If your content has border-radius, this will prevent it from overflowing the corners. Defaults to 0.
|
|
460
467
|
sticky: The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial".
|
|
461
468
|
hide_when_detached: Whether to hide the content when the trigger becomes fully occluded. Defaults to False.
|
|
469
|
+
on_escape_key_down: Fired when the escape key is pressed.
|
|
470
|
+
on_pointer_down_outside: Fired when the pointer is down outside the dialog.
|
|
471
|
+
on_focus_outside: Fired when focus moves outside the dialog.
|
|
472
|
+
on_interact_outside: Fired when the pointer interacts outside the dialog.
|
|
462
473
|
style: The style of the component.
|
|
463
474
|
key: A unique key for the component.
|
|
464
475
|
id: The id for the component.
|
|
@@ -549,23 +560,23 @@ class DropdownMenuItem(RadixThemesComponent):
|
|
|
549
560
|
id: Optional[Any] = None,
|
|
550
561
|
class_name: Optional[Any] = None,
|
|
551
562
|
autofocus: Optional[bool] = None,
|
|
552
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
553
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
554
|
-
on_click: Optional[EventType[[]]] = None,
|
|
555
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
556
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
557
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
558
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
559
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
560
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
561
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
562
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
563
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
564
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
565
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
566
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
567
|
-
on_select: Optional[EventType[[]]] = None,
|
|
568
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
563
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
564
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
565
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
566
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
567
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
568
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
569
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
570
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
571
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
572
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
573
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
574
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
575
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
576
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
577
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
578
|
+
on_select: Optional[EventType[[], BASE_STATE]] = None,
|
|
579
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
569
580
|
**props,
|
|
570
581
|
) -> "DropdownMenuItem":
|
|
571
582
|
"""Create a new component instance.
|
|
@@ -580,6 +591,7 @@ class DropdownMenuItem(RadixThemesComponent):
|
|
|
580
591
|
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
|
|
581
592
|
disabled: When true, prevents the user from interacting with the item.
|
|
582
593
|
text_value: Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item. Use this when the content is complex, or you have non-textual content inside.
|
|
594
|
+
on_select: Fired when the item is selected.
|
|
583
595
|
style: The style of the component.
|
|
584
596
|
key: A unique key for the component.
|
|
585
597
|
id: The id for the component.
|
|
@@ -604,22 +616,22 @@ class DropdownMenuSeparator(RadixThemesComponent):
|
|
|
604
616
|
id: Optional[Any] = None,
|
|
605
617
|
class_name: Optional[Any] = None,
|
|
606
618
|
autofocus: Optional[bool] = None,
|
|
607
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
608
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
609
|
-
on_click: Optional[EventType[[]]] = None,
|
|
610
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
611
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
612
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
613
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
614
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
615
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
616
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
617
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
618
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
619
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
620
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
621
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
622
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
619
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
620
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
621
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
622
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
623
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
624
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
625
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
626
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
627
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
628
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
629
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
630
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
631
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
632
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
633
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
634
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
623
635
|
**props,
|
|
624
636
|
) -> "DropdownMenuSeparator":
|
|
625
637
|
"""Create a new component instance.
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
"""Interactive components provided by @radix-ui/themes."""
|
|
2
2
|
|
|
3
|
-
from typing import Literal
|
|
3
|
+
from typing import Dict, Literal, Union
|
|
4
4
|
|
|
5
5
|
from reflex.components.component import ComponentNamespace
|
|
6
6
|
from reflex.components.core.breakpoints import Responsive
|
|
7
7
|
from reflex.components.el import elements
|
|
8
|
-
from reflex.event import EventHandler,
|
|
8
|
+
from reflex.event import EventHandler, passthrough_event_spec
|
|
9
9
|
from reflex.vars.base import Var
|
|
10
10
|
|
|
11
|
-
from ..base import
|
|
12
|
-
RadixThemesComponent,
|
|
13
|
-
RadixThemesTriggerComponent,
|
|
14
|
-
)
|
|
11
|
+
from ..base import RadixThemesComponent, RadixThemesTriggerComponent
|
|
15
12
|
|
|
16
13
|
|
|
17
14
|
class HoverCardRoot(RadixThemesComponent):
|
|
@@ -32,7 +29,7 @@ class HoverCardRoot(RadixThemesComponent):
|
|
|
32
29
|
close_delay: Var[int]
|
|
33
30
|
|
|
34
31
|
# Fired when the open state changes.
|
|
35
|
-
on_open_change: EventHandler[
|
|
32
|
+
on_open_change: EventHandler[passthrough_event_spec(bool)]
|
|
36
33
|
|
|
37
34
|
|
|
38
35
|
class HoverCardTrigger(RadixThemesTriggerComponent):
|
|
@@ -55,9 +52,24 @@ class HoverCardContent(elements.Div, RadixThemesComponent):
|
|
|
55
52
|
# The preferred alignment against the trigger. May change when collisions occur.
|
|
56
53
|
align: Var[Literal["start", "center", "end"]]
|
|
57
54
|
|
|
55
|
+
# An offset in pixels from the "start" or "end" alignment options.
|
|
56
|
+
align_offset: Var[int]
|
|
57
|
+
|
|
58
58
|
# Whether or not the hover card should avoid collisions with its trigger.
|
|
59
59
|
avoid_collisions: Var[bool]
|
|
60
60
|
|
|
61
|
+
# The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { top: 20, left: 20 }.
|
|
62
|
+
collision_padding: Var[Union[float, int, Dict[str, Union[float, int]]]]
|
|
63
|
+
|
|
64
|
+
# The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless
|
|
65
|
+
sticky: Var[Literal["partial", "always"]]
|
|
66
|
+
|
|
67
|
+
# Whether to hide the content when the trigger becomes fully occluded.
|
|
68
|
+
hide_when_detached: Var[bool]
|
|
69
|
+
|
|
70
|
+
# Hovercard size "1" - "3"
|
|
71
|
+
size: Var[Responsive[Literal["1", "2", "3"]]]
|
|
72
|
+
|
|
61
73
|
|
|
62
74
|
class HoverCard(ComponentNamespace):
|
|
63
75
|
"""For sighted users to preview content available behind a link."""
|