reflex 0.6.8a2__py3-none-any.whl → 0.7.0__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/custom_components/pyproject.toml.jinja2 +1 -1
- reflex/.templates/jinja/web/pages/_app.js.jinja2 +7 -7
- reflex/.templates/jinja/web/pages/utils.js.jinja2 +3 -3
- reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +1 -4
- reflex/.templates/web/utils/state.js +65 -36
- reflex/__init__.py +4 -17
- reflex/__init__.pyi +1 -2
- reflex/app.py +286 -129
- reflex/app_mixins/lifespan.py +9 -9
- reflex/app_mixins/middleware.py +6 -6
- reflex/app_module_for_backend.py +3 -7
- reflex/base.py +7 -7
- reflex/compiler/compiler.py +8 -0
- reflex/compiler/utils.py +57 -18
- reflex/components/base/app_wrap.pyi +16 -16
- reflex/components/base/bare.py +1 -1
- reflex/components/base/body.pyi +16 -16
- reflex/components/base/document.pyi +76 -76
- reflex/components/base/error_boundary.py +2 -1
- reflex/components/base/error_boundary.pyi +19 -22
- 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.py +2 -2
- reflex/components/base/meta.pyi +61 -61
- reflex/components/base/script.pyi +19 -19
- reflex/components/base/strict_mode.py +10 -0
- reflex/components/base/strict_mode.pyi +57 -0
- reflex/components/component.py +38 -77
- reflex/components/core/banner.py +159 -4
- reflex/components/core/banner.pyi +162 -76
- reflex/components/core/breakpoints.py +3 -1
- reflex/components/core/client_side_routing.py +1 -1
- reflex/components/core/client_side_routing.pyi +32 -32
- reflex/components/core/clipboard.pyi +17 -20
- reflex/components/core/cond.py +9 -10
- reflex/components/core/debounce.py +1 -1
- reflex/components/core/debounce.pyi +17 -17
- reflex/components/core/foreach.py +28 -3
- reflex/components/core/html.py +1 -1
- reflex/components/core/html.pyi +16 -16
- reflex/components/core/match.py +5 -5
- reflex/components/core/sticky.py +134 -0
- reflex/components/core/sticky.pyi +449 -0
- reflex/components/core/upload.py +2 -2
- reflex/components/core/upload.pyi +80 -88
- reflex/components/datadisplay/code.py +5 -14
- reflex/components/datadisplay/code.pyi +31 -31
- reflex/components/datadisplay/dataeditor.py +7 -4
- reflex/components/datadisplay/dataeditor.pyi +40 -54
- reflex/components/datadisplay/logo.py +13 -8
- reflex/components/datadisplay/shiki_code_block.py +14 -9
- reflex/components/datadisplay/shiki_code_block.pyi +46 -46
- reflex/components/dynamic.py +22 -3
- reflex/components/el/constants/reflex.py +1 -1
- reflex/components/el/element.py +1 -1
- reflex/components/el/element.pyi +16 -16
- reflex/components/el/elements/base.pyi +16 -16
- reflex/components/el/elements/forms.py +4 -4
- reflex/components/el/elements/forms.pyi +224 -258
- 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.py +46 -8
- reflex/components/lucide/icon.pyi +85 -31
- reflex/components/markdown/markdown.py +10 -8
- reflex/components/markdown/markdown.pyi +16 -16
- reflex/components/moment/moment.py +2 -2
- reflex/components/moment/moment.pyi +17 -19
- reflex/components/next/base.pyi +16 -16
- reflex/components/next/image.py +16 -4
- reflex/components/next/image.pyi +22 -20
- reflex/components/next/link.py +1 -1
- reflex/components/next/link.pyi +16 -16
- reflex/components/next/video.pyi +16 -16
- reflex/components/plotly/__init__.py +29 -2
- reflex/components/plotly/plotly.py +240 -5
- reflex/components/plotly/plotly.pyi +799 -44
- reflex/components/props.py +3 -3
- reflex/components/radix/__init__.pyi +1 -1
- reflex/components/radix/primitives/accordion.py +9 -5
- reflex/components/radix/primitives/accordion.pyi +110 -108
- reflex/components/radix/primitives/base.pyi +31 -31
- reflex/components/radix/primitives/drawer.py +5 -2
- reflex/components/radix/primitives/drawer.pyi +179 -187
- reflex/components/radix/primitives/form.pyi +160 -172
- reflex/components/radix/primitives/progress.py +1 -1
- reflex/components/radix/primitives/progress.pyi +76 -76
- reflex/components/radix/primitives/slider.py +1 -1
- reflex/components/radix/primitives/slider.pyi +78 -82
- reflex/components/radix/themes/base.pyi +121 -121
- reflex/components/radix/themes/color_mode.py +11 -9
- reflex/components/radix/themes/color_mode.pyi +47 -49
- reflex/components/radix/themes/components/alert_dialog.py +3 -0
- 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.py +1 -1
- reflex/components/radix/themes/components/card.pyi +17 -17
- 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.py +5 -0
- 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.py +3 -0
- reflex/components/radix/themes/components/dialog.pyi +113 -117
- reflex/components/radix/themes/components/dropdown_menu.py +5 -0
- reflex/components/radix/themes/components/dropdown_menu.pyi +133 -137
- reflex/components/radix/themes/components/hover_card.py +3 -0
- reflex/components/radix/themes/components/hover_card.pyi +63 -67
- reflex/components/radix/themes/components/icon_button.py +2 -2
- reflex/components/radix/themes/components/icon_button.pyi +17 -16
- reflex/components/radix/themes/components/inset.pyi +16 -16
- reflex/components/radix/themes/components/popover.py +3 -0
- 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.py +2 -0
- reflex/components/radix/themes/components/radio_cards.pyi +32 -34
- reflex/components/radix/themes/components/radio_group.py +1 -1
- 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 +4 -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.py +3 -0
- reflex/components/radix/themes/components/tabs.pyi +78 -82
- reflex/components/radix/themes/components/text_area.py +12 -0
- reflex/components/radix/themes/components/text_area.pyi +21 -33
- reflex/components/radix/themes/components/text_field.py +1 -1
- reflex/components/radix/themes/components/text_field.pyi +52 -80
- reflex/components/radix/themes/components/tooltip.py +6 -1
- reflex/components/radix/themes/components/tooltip.pyi +20 -21
- reflex/components/radix/themes/layout/__init__.pyi +1 -1
- 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.py +2 -2
- 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.py +2 -2
- 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.py +1 -1
- reflex/components/radix/themes/typography/link.pyi +16 -16
- reflex/components/radix/themes/typography/text.py +2 -2
- reflex/components/radix/themes/typography/text.pyi +106 -106
- reflex/components/react_player/audio.pyi +33 -39
- reflex/components/react_player/react_player.py +1 -1
- reflex/components/react_player/react_player.pyi +32 -38
- reflex/components/react_player/video.pyi +33 -39
- reflex/components/recharts/__init__.py +2 -0
- reflex/components/recharts/__init__.pyi +2 -0
- reflex/components/recharts/cartesian.pyi +282 -282
- reflex/components/recharts/charts.py +15 -15
- reflex/components/recharts/charts.pyi +164 -164
- reflex/components/recharts/general.py +19 -4
- reflex/components/recharts/general.pyi +132 -81
- reflex/components/recharts/polar.py +2 -2
- reflex/components/recharts/polar.pyi +55 -55
- reflex/components/recharts/recharts.py +4 -4
- reflex/components/recharts/recharts.pyi +31 -31
- reflex/components/sonner/toast.py +15 -13
- reflex/components/sonner/toast.pyi +22 -22
- reflex/components/suneditor/editor.py +6 -4
- reflex/components/suneditor/editor.pyi +26 -40
- reflex/components/tags/iter_tag.py +3 -3
- reflex/components/tags/tag.py +25 -3
- reflex/config.py +48 -15
- reflex/constants/__init__.py +1 -0
- reflex/constants/base.py +4 -1
- reflex/constants/compiler.py +5 -2
- reflex/constants/config.py +8 -1
- reflex/constants/installer.py +9 -9
- reflex/constants/style.py +1 -1
- reflex/custom_components/custom_components.py +18 -10
- reflex/event.py +221 -231
- reflex/experimental/__init__.py +19 -11
- reflex/experimental/client_state.py +53 -28
- reflex/experimental/hooks.py +5 -5
- reflex/experimental/layout.py +8 -5
- reflex/experimental/layout.pyi +79 -83
- reflex/experimental/misc.py +3 -3
- reflex/istate/wrappers.py +1 -1
- reflex/middleware/hydrate_middleware.py +2 -2
- reflex/model.py +11 -6
- reflex/page.py +5 -5
- reflex/reflex.py +104 -26
- reflex/route.py +1 -1
- reflex/state.py +358 -401
- reflex/style.py +27 -3
- reflex/testing.py +29 -23
- reflex/utils/build.py +6 -2
- reflex/utils/codespaces.py +1 -4
- reflex/utils/compat.py +6 -5
- reflex/utils/console.py +71 -16
- reflex/utils/exceptions.py +89 -26
- reflex/utils/exec.py +69 -74
- reflex/utils/export.py +6 -1
- reflex/utils/format.py +8 -40
- reflex/utils/imports.py +5 -2
- reflex/utils/lazy_loader.py +7 -1
- reflex/utils/path_ops.py +74 -14
- reflex/utils/prerequisites.py +345 -68
- reflex/utils/processes.py +45 -32
- reflex/utils/pyi_generator.py +39 -33
- reflex/utils/registry.py +4 -4
- reflex/utils/serializers.py +1 -1
- reflex/utils/telemetry.py +5 -4
- reflex/utils/types.py +42 -18
- reflex/vars/base.py +695 -330
- reflex/vars/datetime.py +6 -7
- reflex/vars/dep_tracking.py +344 -0
- reflex/vars/function.py +11 -5
- reflex/vars/number.py +31 -43
- reflex/vars/object.py +74 -64
- reflex/vars/sequence.py +79 -67
- {reflex-0.6.8a2.dist-info → reflex-0.7.0.dist-info}/METADATA +7 -8
- reflex-0.7.0.dist-info/RECORD +401 -0
- {reflex-0.6.8a2.dist-info → reflex-0.7.0.dist-info}/WHEEL +1 -1
- reflex/experimental/assets.py +0 -37
- reflex-0.6.8a2.dist-info/RECORD +0 -397
- {reflex-0.6.8a2.dist-info → reflex-0.7.0.dist-info}/LICENSE +0 -0
- {reflex-0.6.8a2.dist-info → reflex-0.7.0.dist-info}/entry_points.txt +0 -0
|
@@ -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
|
|
10
|
+
from reflex.event import EventType
|
|
11
11
|
from reflex.style import Style
|
|
12
12
|
from reflex.vars.base import Var
|
|
13
13
|
|
|
@@ -36,24 +36,22 @@ class DropdownMenuRoot(RadixThemesComponent):
|
|
|
36
36
|
class_name: Optional[Any] = None,
|
|
37
37
|
autofocus: Optional[bool] = None,
|
|
38
38
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
39
|
-
on_blur: Optional[EventType[
|
|
40
|
-
on_click: Optional[EventType[
|
|
41
|
-
on_context_menu: Optional[EventType[
|
|
42
|
-
on_double_click: Optional[EventType[
|
|
43
|
-
on_focus: Optional[EventType[
|
|
44
|
-
on_mount: Optional[EventType[
|
|
45
|
-
on_mouse_down: Optional[EventType[
|
|
46
|
-
on_mouse_enter: Optional[EventType[
|
|
47
|
-
on_mouse_leave: Optional[EventType[
|
|
48
|
-
on_mouse_move: Optional[EventType[
|
|
49
|
-
on_mouse_out: Optional[EventType[
|
|
50
|
-
on_mouse_over: Optional[EventType[
|
|
51
|
-
on_mouse_up: Optional[EventType[
|
|
52
|
-
on_open_change: Optional[
|
|
53
|
-
|
|
54
|
-
] = None,
|
|
55
|
-
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
56
|
-
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
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[Union[EventType[()], EventType[bool]]] = None,
|
|
53
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
54
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
57
55
|
**props,
|
|
58
56
|
) -> "DropdownMenuRoot":
|
|
59
57
|
"""Create a new component instance.
|
|
@@ -94,21 +92,21 @@ class DropdownMenuTrigger(RadixThemesTriggerComponent):
|
|
|
94
92
|
class_name: Optional[Any] = None,
|
|
95
93
|
autofocus: Optional[bool] = None,
|
|
96
94
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
97
|
-
on_blur: Optional[EventType[
|
|
98
|
-
on_click: Optional[EventType[
|
|
99
|
-
on_context_menu: Optional[EventType[
|
|
100
|
-
on_double_click: Optional[EventType[
|
|
101
|
-
on_focus: Optional[EventType[
|
|
102
|
-
on_mount: Optional[EventType[
|
|
103
|
-
on_mouse_down: Optional[EventType[
|
|
104
|
-
on_mouse_enter: Optional[EventType[
|
|
105
|
-
on_mouse_leave: Optional[EventType[
|
|
106
|
-
on_mouse_move: Optional[EventType[
|
|
107
|
-
on_mouse_out: Optional[EventType[
|
|
108
|
-
on_mouse_over: Optional[EventType[
|
|
109
|
-
on_mouse_up: Optional[EventType[
|
|
110
|
-
on_scroll: Optional[EventType[
|
|
111
|
-
on_unmount: Optional[EventType[
|
|
95
|
+
on_blur: Optional[EventType[()]] = None,
|
|
96
|
+
on_click: Optional[EventType[()]] = None,
|
|
97
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
98
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
99
|
+
on_focus: Optional[EventType[()]] = None,
|
|
100
|
+
on_mount: Optional[EventType[()]] = None,
|
|
101
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
102
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
103
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
104
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
105
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
106
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
107
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
108
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
109
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
112
110
|
**props,
|
|
113
111
|
) -> "DropdownMenuTrigger":
|
|
114
112
|
"""Create a new RadixThemesTriggerComponent instance.
|
|
@@ -237,26 +235,26 @@ class DropdownMenuContent(RadixThemesComponent):
|
|
|
237
235
|
class_name: Optional[Any] = None,
|
|
238
236
|
autofocus: Optional[bool] = None,
|
|
239
237
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
240
|
-
on_blur: Optional[EventType[
|
|
241
|
-
on_click: Optional[EventType[
|
|
242
|
-
on_close_auto_focus: Optional[EventType[
|
|
243
|
-
on_context_menu: Optional[EventType[
|
|
244
|
-
on_double_click: Optional[EventType[
|
|
245
|
-
on_escape_key_down: Optional[EventType[
|
|
246
|
-
on_focus: Optional[EventType[
|
|
247
|
-
on_focus_outside: Optional[EventType[
|
|
248
|
-
on_interact_outside: Optional[EventType[
|
|
249
|
-
on_mount: Optional[EventType[
|
|
250
|
-
on_mouse_down: Optional[EventType[
|
|
251
|
-
on_mouse_enter: Optional[EventType[
|
|
252
|
-
on_mouse_leave: Optional[EventType[
|
|
253
|
-
on_mouse_move: Optional[EventType[
|
|
254
|
-
on_mouse_out: Optional[EventType[
|
|
255
|
-
on_mouse_over: Optional[EventType[
|
|
256
|
-
on_mouse_up: Optional[EventType[
|
|
257
|
-
on_pointer_down_outside: Optional[EventType[
|
|
258
|
-
on_scroll: Optional[EventType[
|
|
259
|
-
on_unmount: Optional[EventType[
|
|
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,
|
|
260
258
|
**props,
|
|
261
259
|
) -> "DropdownMenuContent":
|
|
262
260
|
"""Create a new component instance.
|
|
@@ -314,21 +312,21 @@ class DropdownMenuSubTrigger(RadixThemesTriggerComponent):
|
|
|
314
312
|
class_name: Optional[Any] = None,
|
|
315
313
|
autofocus: Optional[bool] = None,
|
|
316
314
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
317
|
-
on_blur: Optional[EventType[
|
|
318
|
-
on_click: Optional[EventType[
|
|
319
|
-
on_context_menu: Optional[EventType[
|
|
320
|
-
on_double_click: Optional[EventType[
|
|
321
|
-
on_focus: Optional[EventType[
|
|
322
|
-
on_mount: Optional[EventType[
|
|
323
|
-
on_mouse_down: Optional[EventType[
|
|
324
|
-
on_mouse_enter: Optional[EventType[
|
|
325
|
-
on_mouse_leave: Optional[EventType[
|
|
326
|
-
on_mouse_move: Optional[EventType[
|
|
327
|
-
on_mouse_out: Optional[EventType[
|
|
328
|
-
on_mouse_over: Optional[EventType[
|
|
329
|
-
on_mouse_up: Optional[EventType[
|
|
330
|
-
on_scroll: Optional[EventType[
|
|
331
|
-
on_unmount: Optional[EventType[
|
|
315
|
+
on_blur: Optional[EventType[()]] = None,
|
|
316
|
+
on_click: Optional[EventType[()]] = None,
|
|
317
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
318
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
319
|
+
on_focus: Optional[EventType[()]] = None,
|
|
320
|
+
on_mount: Optional[EventType[()]] = None,
|
|
321
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
322
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
323
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
324
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
325
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
326
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
327
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
328
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
329
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
332
330
|
**props,
|
|
333
331
|
) -> "DropdownMenuSubTrigger":
|
|
334
332
|
"""Create a new RadixThemesTriggerComponent instance.
|
|
@@ -356,24 +354,22 @@ class DropdownMenuSub(RadixThemesComponent):
|
|
|
356
354
|
class_name: Optional[Any] = None,
|
|
357
355
|
autofocus: Optional[bool] = None,
|
|
358
356
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
359
|
-
on_blur: Optional[EventType[
|
|
360
|
-
on_click: Optional[EventType[
|
|
361
|
-
on_context_menu: Optional[EventType[
|
|
362
|
-
on_double_click: Optional[EventType[
|
|
363
|
-
on_focus: Optional[EventType[
|
|
364
|
-
on_mount: Optional[EventType[
|
|
365
|
-
on_mouse_down: Optional[EventType[
|
|
366
|
-
on_mouse_enter: Optional[EventType[
|
|
367
|
-
on_mouse_leave: Optional[EventType[
|
|
368
|
-
on_mouse_move: Optional[EventType[
|
|
369
|
-
on_mouse_out: Optional[EventType[
|
|
370
|
-
on_mouse_over: Optional[EventType[
|
|
371
|
-
on_mouse_up: Optional[EventType[
|
|
372
|
-
on_open_change: Optional[
|
|
373
|
-
|
|
374
|
-
] = None,
|
|
375
|
-
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
376
|
-
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
357
|
+
on_blur: Optional[EventType[()]] = None,
|
|
358
|
+
on_click: Optional[EventType[()]] = None,
|
|
359
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
360
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
361
|
+
on_focus: Optional[EventType[()]] = None,
|
|
362
|
+
on_mount: Optional[EventType[()]] = None,
|
|
363
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
364
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
365
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
366
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
367
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
368
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
369
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
370
|
+
on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None,
|
|
371
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
372
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
377
373
|
**props,
|
|
378
374
|
) -> "DropdownMenuSub":
|
|
379
375
|
"""Create a new component instance.
|
|
@@ -429,25 +425,25 @@ class DropdownMenuSubContent(RadixThemesComponent):
|
|
|
429
425
|
class_name: Optional[Any] = None,
|
|
430
426
|
autofocus: Optional[bool] = None,
|
|
431
427
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
432
|
-
on_blur: Optional[EventType[
|
|
433
|
-
on_click: Optional[EventType[
|
|
434
|
-
on_context_menu: Optional[EventType[
|
|
435
|
-
on_double_click: Optional[EventType[
|
|
436
|
-
on_escape_key_down: Optional[EventType[
|
|
437
|
-
on_focus: Optional[EventType[
|
|
438
|
-
on_focus_outside: Optional[EventType[
|
|
439
|
-
on_interact_outside: Optional[EventType[
|
|
440
|
-
on_mount: Optional[EventType[
|
|
441
|
-
on_mouse_down: Optional[EventType[
|
|
442
|
-
on_mouse_enter: Optional[EventType[
|
|
443
|
-
on_mouse_leave: Optional[EventType[
|
|
444
|
-
on_mouse_move: Optional[EventType[
|
|
445
|
-
on_mouse_out: Optional[EventType[
|
|
446
|
-
on_mouse_over: Optional[EventType[
|
|
447
|
-
on_mouse_up: Optional[EventType[
|
|
448
|
-
on_pointer_down_outside: Optional[EventType[
|
|
449
|
-
on_scroll: Optional[EventType[
|
|
450
|
-
on_unmount: Optional[EventType[
|
|
428
|
+
on_blur: Optional[EventType[()]] = None,
|
|
429
|
+
on_click: Optional[EventType[()]] = None,
|
|
430
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
431
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
432
|
+
on_escape_key_down: Optional[EventType[()]] = None,
|
|
433
|
+
on_focus: Optional[EventType[()]] = None,
|
|
434
|
+
on_focus_outside: Optional[EventType[()]] = None,
|
|
435
|
+
on_interact_outside: Optional[EventType[()]] = None,
|
|
436
|
+
on_mount: Optional[EventType[()]] = None,
|
|
437
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
438
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
439
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
440
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
441
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
442
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
443
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
444
|
+
on_pointer_down_outside: Optional[EventType[()]] = None,
|
|
445
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
446
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
451
447
|
**props,
|
|
452
448
|
) -> "DropdownMenuSubContent":
|
|
453
449
|
"""Create a new component instance.
|
|
@@ -561,22 +557,22 @@ class DropdownMenuItem(RadixThemesComponent):
|
|
|
561
557
|
class_name: Optional[Any] = None,
|
|
562
558
|
autofocus: Optional[bool] = None,
|
|
563
559
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
564
|
-
on_blur: Optional[EventType[
|
|
565
|
-
on_click: Optional[EventType[
|
|
566
|
-
on_context_menu: Optional[EventType[
|
|
567
|
-
on_double_click: Optional[EventType[
|
|
568
|
-
on_focus: Optional[EventType[
|
|
569
|
-
on_mount: Optional[EventType[
|
|
570
|
-
on_mouse_down: Optional[EventType[
|
|
571
|
-
on_mouse_enter: Optional[EventType[
|
|
572
|
-
on_mouse_leave: Optional[EventType[
|
|
573
|
-
on_mouse_move: Optional[EventType[
|
|
574
|
-
on_mouse_out: Optional[EventType[
|
|
575
|
-
on_mouse_over: Optional[EventType[
|
|
576
|
-
on_mouse_up: Optional[EventType[
|
|
577
|
-
on_scroll: Optional[EventType[
|
|
578
|
-
on_select: Optional[EventType[
|
|
579
|
-
on_unmount: Optional[EventType[
|
|
560
|
+
on_blur: Optional[EventType[()]] = None,
|
|
561
|
+
on_click: Optional[EventType[()]] = None,
|
|
562
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
563
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
564
|
+
on_focus: Optional[EventType[()]] = None,
|
|
565
|
+
on_mount: Optional[EventType[()]] = None,
|
|
566
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
567
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
568
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
569
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
570
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
571
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
572
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
573
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
574
|
+
on_select: Optional[EventType[()]] = None,
|
|
575
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
580
576
|
**props,
|
|
581
577
|
) -> "DropdownMenuItem":
|
|
582
578
|
"""Create a new component instance.
|
|
@@ -617,21 +613,21 @@ class DropdownMenuSeparator(RadixThemesComponent):
|
|
|
617
613
|
class_name: Optional[Any] = None,
|
|
618
614
|
autofocus: Optional[bool] = None,
|
|
619
615
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
620
|
-
on_blur: Optional[EventType[
|
|
621
|
-
on_click: Optional[EventType[
|
|
622
|
-
on_context_menu: Optional[EventType[
|
|
623
|
-
on_double_click: Optional[EventType[
|
|
624
|
-
on_focus: Optional[EventType[
|
|
625
|
-
on_mount: Optional[EventType[
|
|
626
|
-
on_mouse_down: Optional[EventType[
|
|
627
|
-
on_mouse_enter: Optional[EventType[
|
|
628
|
-
on_mouse_leave: Optional[EventType[
|
|
629
|
-
on_mouse_move: Optional[EventType[
|
|
630
|
-
on_mouse_out: Optional[EventType[
|
|
631
|
-
on_mouse_over: Optional[EventType[
|
|
632
|
-
on_mouse_up: Optional[EventType[
|
|
633
|
-
on_scroll: Optional[EventType[
|
|
634
|
-
on_unmount: Optional[EventType[
|
|
616
|
+
on_blur: Optional[EventType[()]] = None,
|
|
617
|
+
on_click: Optional[EventType[()]] = None,
|
|
618
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
619
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
620
|
+
on_focus: Optional[EventType[()]] = None,
|
|
621
|
+
on_mount: Optional[EventType[()]] = None,
|
|
622
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
623
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
624
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
625
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
626
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
627
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
628
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
629
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
630
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
635
631
|
**props,
|
|
636
632
|
) -> "DropdownMenuSeparator":
|
|
637
633
|
"""Create a new component instance.
|
|
@@ -5,6 +5,7 @@ from typing import Dict, Literal, Union
|
|
|
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.constants.compiler import MemoizationMode
|
|
8
9
|
from reflex.event import EventHandler, passthrough_event_spec
|
|
9
10
|
from reflex.vars.base import Var
|
|
10
11
|
|
|
@@ -37,6 +38,8 @@ class HoverCardTrigger(RadixThemesTriggerComponent):
|
|
|
37
38
|
|
|
38
39
|
tag = "HoverCard.Trigger"
|
|
39
40
|
|
|
41
|
+
_memoization_mode = MemoizationMode(recursive=False)
|
|
42
|
+
|
|
40
43
|
|
|
41
44
|
class HoverCardContent(elements.Div, RadixThemesComponent):
|
|
42
45
|
"""Contains the content of the open hover card."""
|
|
@@ -8,7 +8,7 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|
|
8
8
|
from reflex.components.component import ComponentNamespace
|
|
9
9
|
from reflex.components.core.breakpoints import Breakpoints
|
|
10
10
|
from reflex.components.el import elements
|
|
11
|
-
from reflex.event import
|
|
11
|
+
from reflex.event import EventType
|
|
12
12
|
from reflex.style import Style
|
|
13
13
|
from reflex.vars.base import Var
|
|
14
14
|
|
|
@@ -30,24 +30,22 @@ class HoverCardRoot(RadixThemesComponent):
|
|
|
30
30
|
class_name: Optional[Any] = None,
|
|
31
31
|
autofocus: Optional[bool] = None,
|
|
32
32
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
33
|
-
on_blur: Optional[EventType[
|
|
34
|
-
on_click: Optional[EventType[
|
|
35
|
-
on_context_menu: Optional[EventType[
|
|
36
|
-
on_double_click: Optional[EventType[
|
|
37
|
-
on_focus: Optional[EventType[
|
|
38
|
-
on_mount: Optional[EventType[
|
|
39
|
-
on_mouse_down: Optional[EventType[
|
|
40
|
-
on_mouse_enter: Optional[EventType[
|
|
41
|
-
on_mouse_leave: Optional[EventType[
|
|
42
|
-
on_mouse_move: Optional[EventType[
|
|
43
|
-
on_mouse_out: Optional[EventType[
|
|
44
|
-
on_mouse_over: Optional[EventType[
|
|
45
|
-
on_mouse_up: Optional[EventType[
|
|
46
|
-
on_open_change: Optional[
|
|
47
|
-
|
|
48
|
-
] = None,
|
|
49
|
-
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
50
|
-
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
33
|
+
on_blur: Optional[EventType[()]] = None,
|
|
34
|
+
on_click: Optional[EventType[()]] = None,
|
|
35
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
36
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
37
|
+
on_focus: Optional[EventType[()]] = None,
|
|
38
|
+
on_mount: Optional[EventType[()]] = None,
|
|
39
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
40
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
41
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
42
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
43
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
44
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
45
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
46
|
+
on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None,
|
|
47
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
48
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
51
49
|
**props,
|
|
52
50
|
) -> "HoverCardRoot":
|
|
53
51
|
"""Create a new component instance.
|
|
@@ -87,21 +85,21 @@ class HoverCardTrigger(RadixThemesTriggerComponent):
|
|
|
87
85
|
class_name: Optional[Any] = None,
|
|
88
86
|
autofocus: Optional[bool] = None,
|
|
89
87
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
90
|
-
on_blur: Optional[EventType[
|
|
91
|
-
on_click: Optional[EventType[
|
|
92
|
-
on_context_menu: Optional[EventType[
|
|
93
|
-
on_double_click: Optional[EventType[
|
|
94
|
-
on_focus: Optional[EventType[
|
|
95
|
-
on_mount: Optional[EventType[
|
|
96
|
-
on_mouse_down: Optional[EventType[
|
|
97
|
-
on_mouse_enter: Optional[EventType[
|
|
98
|
-
on_mouse_leave: Optional[EventType[
|
|
99
|
-
on_mouse_move: Optional[EventType[
|
|
100
|
-
on_mouse_out: Optional[EventType[
|
|
101
|
-
on_mouse_over: Optional[EventType[
|
|
102
|
-
on_mouse_up: Optional[EventType[
|
|
103
|
-
on_scroll: Optional[EventType[
|
|
104
|
-
on_unmount: Optional[EventType[
|
|
88
|
+
on_blur: Optional[EventType[()]] = None,
|
|
89
|
+
on_click: Optional[EventType[()]] = None,
|
|
90
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
91
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
92
|
+
on_focus: Optional[EventType[()]] = None,
|
|
93
|
+
on_mount: Optional[EventType[()]] = None,
|
|
94
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
95
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
96
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
97
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
98
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
99
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
100
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
101
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
102
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
105
103
|
**props,
|
|
106
104
|
) -> "HoverCardTrigger":
|
|
107
105
|
"""Create a new RadixThemesTriggerComponent instance.
|
|
@@ -195,21 +193,21 @@ class HoverCardContent(elements.Div, RadixThemesComponent):
|
|
|
195
193
|
class_name: Optional[Any] = None,
|
|
196
194
|
autofocus: Optional[bool] = None,
|
|
197
195
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
198
|
-
on_blur: Optional[EventType[
|
|
199
|
-
on_click: Optional[EventType[
|
|
200
|
-
on_context_menu: Optional[EventType[
|
|
201
|
-
on_double_click: Optional[EventType[
|
|
202
|
-
on_focus: Optional[EventType[
|
|
203
|
-
on_mount: Optional[EventType[
|
|
204
|
-
on_mouse_down: Optional[EventType[
|
|
205
|
-
on_mouse_enter: Optional[EventType[
|
|
206
|
-
on_mouse_leave: Optional[EventType[
|
|
207
|
-
on_mouse_move: Optional[EventType[
|
|
208
|
-
on_mouse_out: Optional[EventType[
|
|
209
|
-
on_mouse_over: Optional[EventType[
|
|
210
|
-
on_mouse_up: Optional[EventType[
|
|
211
|
-
on_scroll: Optional[EventType[
|
|
212
|
-
on_unmount: Optional[EventType[
|
|
196
|
+
on_blur: Optional[EventType[()]] = None,
|
|
197
|
+
on_click: Optional[EventType[()]] = None,
|
|
198
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
199
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
200
|
+
on_focus: Optional[EventType[()]] = None,
|
|
201
|
+
on_mount: Optional[EventType[()]] = None,
|
|
202
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
203
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
204
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
205
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
206
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
207
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
208
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
209
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
210
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
213
211
|
**props,
|
|
214
212
|
) -> "HoverCardContent":
|
|
215
213
|
"""Create a new component instance.
|
|
@@ -275,24 +273,22 @@ class HoverCard(ComponentNamespace):
|
|
|
275
273
|
class_name: Optional[Any] = None,
|
|
276
274
|
autofocus: Optional[bool] = None,
|
|
277
275
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
278
|
-
on_blur: Optional[EventType[
|
|
279
|
-
on_click: Optional[EventType[
|
|
280
|
-
on_context_menu: Optional[EventType[
|
|
281
|
-
on_double_click: Optional[EventType[
|
|
282
|
-
on_focus: Optional[EventType[
|
|
283
|
-
on_mount: Optional[EventType[
|
|
284
|
-
on_mouse_down: Optional[EventType[
|
|
285
|
-
on_mouse_enter: Optional[EventType[
|
|
286
|
-
on_mouse_leave: Optional[EventType[
|
|
287
|
-
on_mouse_move: Optional[EventType[
|
|
288
|
-
on_mouse_out: Optional[EventType[
|
|
289
|
-
on_mouse_over: Optional[EventType[
|
|
290
|
-
on_mouse_up: Optional[EventType[
|
|
291
|
-
on_open_change: Optional[
|
|
292
|
-
|
|
293
|
-
] = None,
|
|
294
|
-
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
295
|
-
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
276
|
+
on_blur: Optional[EventType[()]] = None,
|
|
277
|
+
on_click: Optional[EventType[()]] = None,
|
|
278
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
279
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
280
|
+
on_focus: Optional[EventType[()]] = None,
|
|
281
|
+
on_mount: Optional[EventType[()]] = None,
|
|
282
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
283
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
284
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
285
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
286
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
287
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
288
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
289
|
+
on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None,
|
|
290
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
291
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
296
292
|
**props,
|
|
297
293
|
) -> "HoverCardRoot":
|
|
298
294
|
"""Create a new component instance.
|
|
@@ -22,6 +22,8 @@ from ..base import (
|
|
|
22
22
|
|
|
23
23
|
LiteralButtonSize = Literal["1", "2", "3", "4"]
|
|
24
24
|
|
|
25
|
+
RADIX_TO_LUCIDE_SIZE = {"1": 12, "2": 24, "3": 36, "4": 48}
|
|
26
|
+
|
|
25
27
|
|
|
26
28
|
class IconButton(elements.Button, RadixLoadingProp, RadixThemesComponent):
|
|
27
29
|
"""A button designed specifically for usage with a single icon."""
|
|
@@ -72,8 +74,6 @@ class IconButton(elements.Button, RadixLoadingProp, RadixThemesComponent):
|
|
|
72
74
|
"IconButton requires a child icon. Pass a string as the first child or a rx.icon."
|
|
73
75
|
)
|
|
74
76
|
if "size" in props:
|
|
75
|
-
RADIX_TO_LUCIDE_SIZE = {"1": 12, "2": 24, "3": 36, "4": 48}
|
|
76
|
-
|
|
77
77
|
if isinstance(props["size"], str):
|
|
78
78
|
children[0].size = RADIX_TO_LUCIDE_SIZE[props["size"]]
|
|
79
79
|
else:
|
|
@@ -7,13 +7,14 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|
|
7
7
|
|
|
8
8
|
from reflex.components.core.breakpoints import Breakpoints
|
|
9
9
|
from reflex.components.el import elements
|
|
10
|
-
from reflex.event import
|
|
10
|
+
from reflex.event import EventType
|
|
11
11
|
from reflex.style import Style
|
|
12
12
|
from reflex.vars.base import Var
|
|
13
13
|
|
|
14
14
|
from ..base import RadixLoadingProp, RadixThemesComponent
|
|
15
15
|
|
|
16
16
|
LiteralButtonSize = Literal["1", "2", "3", "4"]
|
|
17
|
+
RADIX_TO_LUCIDE_SIZE = {"1": 12, "2": 24, "3": 36, "4": 48}
|
|
17
18
|
|
|
18
19
|
class IconButton(elements.Button, RadixLoadingProp, RadixThemesComponent):
|
|
19
20
|
@overload
|
|
@@ -155,21 +156,21 @@ class IconButton(elements.Button, RadixLoadingProp, RadixThemesComponent):
|
|
|
155
156
|
class_name: Optional[Any] = None,
|
|
156
157
|
autofocus: Optional[bool] = None,
|
|
157
158
|
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
158
|
-
on_blur: Optional[EventType[
|
|
159
|
-
on_click: Optional[EventType[
|
|
160
|
-
on_context_menu: Optional[EventType[
|
|
161
|
-
on_double_click: Optional[EventType[
|
|
162
|
-
on_focus: Optional[EventType[
|
|
163
|
-
on_mount: Optional[EventType[
|
|
164
|
-
on_mouse_down: Optional[EventType[
|
|
165
|
-
on_mouse_enter: Optional[EventType[
|
|
166
|
-
on_mouse_leave: Optional[EventType[
|
|
167
|
-
on_mouse_move: Optional[EventType[
|
|
168
|
-
on_mouse_out: Optional[EventType[
|
|
169
|
-
on_mouse_over: Optional[EventType[
|
|
170
|
-
on_mouse_up: Optional[EventType[
|
|
171
|
-
on_scroll: Optional[EventType[
|
|
172
|
-
on_unmount: Optional[EventType[
|
|
159
|
+
on_blur: Optional[EventType[()]] = None,
|
|
160
|
+
on_click: Optional[EventType[()]] = None,
|
|
161
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
162
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
163
|
+
on_focus: Optional[EventType[()]] = None,
|
|
164
|
+
on_mount: Optional[EventType[()]] = None,
|
|
165
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
166
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
167
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
168
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
169
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
170
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
171
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
172
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
173
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
173
174
|
**props,
|
|
174
175
|
) -> "IconButton":
|
|
175
176
|
"""Create a IconButton component.
|