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
|
@@ -7,7 +7,7 @@ from typing import Any, Dict, List, 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
|
|
|
@@ -42,24 +42,28 @@ class SelectRoot(RadixThemesComponent):
|
|
|
42
42
|
id: Optional[Any] = None,
|
|
43
43
|
class_name: Optional[Any] = None,
|
|
44
44
|
autofocus: Optional[bool] = None,
|
|
45
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
46
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
47
|
-
on_change: Optional[
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
45
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
46
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
47
|
+
on_change: Optional[
|
|
48
|
+
Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
|
|
49
|
+
] = None,
|
|
50
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
51
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
52
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
53
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
54
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
55
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
56
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
57
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
58
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
59
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
60
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
61
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
62
|
+
on_open_change: Optional[
|
|
63
|
+
Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]]
|
|
64
|
+
] = None,
|
|
65
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
66
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
63
67
|
**props,
|
|
64
68
|
) -> "SelectRoot":
|
|
65
69
|
"""Create a new component instance.
|
|
@@ -77,6 +81,8 @@ class SelectRoot(RadixThemesComponent):
|
|
|
77
81
|
name: The name of the select control when submitting the form.
|
|
78
82
|
disabled: When True, prevents the user from interacting with select.
|
|
79
83
|
required: When True, indicates that the user must select a value before the owning form can be submitted.
|
|
84
|
+
on_change: Props to rename Fired when the value of the select changes.
|
|
85
|
+
on_open_change: Fired when the select is opened or closed.
|
|
80
86
|
style: The style of the component.
|
|
81
87
|
key: A unique key for the component.
|
|
82
88
|
id: The id for the component.
|
|
@@ -176,22 +182,22 @@ class SelectTrigger(RadixThemesComponent):
|
|
|
176
182
|
id: Optional[Any] = None,
|
|
177
183
|
class_name: Optional[Any] = None,
|
|
178
184
|
autofocus: Optional[bool] = None,
|
|
179
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
180
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
181
|
-
on_click: Optional[EventType[[]]] = None,
|
|
182
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
183
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
184
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
185
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
186
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
187
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
188
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
189
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
190
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
191
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
192
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
193
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
194
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
185
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
186
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
187
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
188
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
189
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
190
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
191
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
192
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
193
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
194
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
195
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
196
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
197
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
198
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
199
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
200
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
195
201
|
**props,
|
|
196
202
|
) -> "SelectTrigger":
|
|
197
203
|
"""Create a new component instance.
|
|
@@ -315,25 +321,25 @@ class SelectContent(RadixThemesComponent):
|
|
|
315
321
|
id: Optional[Any] = None,
|
|
316
322
|
class_name: Optional[Any] = None,
|
|
317
323
|
autofocus: Optional[bool] = None,
|
|
318
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
319
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
320
|
-
on_click: Optional[EventType[[]]] = None,
|
|
321
|
-
on_close_auto_focus: Optional[EventType[[]]] = None,
|
|
322
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
323
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
324
|
-
on_escape_key_down: Optional[EventType[[]]] = None,
|
|
325
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
326
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
327
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
328
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
329
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
330
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
331
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
332
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
333
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
334
|
-
on_pointer_down_outside: Optional[EventType[[]]] = None,
|
|
335
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
336
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
324
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
325
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
326
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
327
|
+
on_close_auto_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
328
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
329
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
330
|
+
on_escape_key_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
331
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
332
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
333
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
334
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
335
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
336
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
337
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
338
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
339
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
340
|
+
on_pointer_down_outside: Optional[EventType[[], BASE_STATE]] = None,
|
|
341
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
342
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
337
343
|
**props,
|
|
338
344
|
) -> "SelectContent":
|
|
339
345
|
"""Create a new component instance.
|
|
@@ -351,6 +357,9 @@ class SelectContent(RadixThemesComponent):
|
|
|
351
357
|
side_offset: The distance in pixels from the anchor. Only available when position is set to popper.
|
|
352
358
|
align: The preferred alignment against the anchor. May change when collisions occur. Only available when position is set to popper.
|
|
353
359
|
align_offset: The vertical distance in pixels from the anchor. Only available when position is set to popper.
|
|
360
|
+
on_close_auto_focus: Fired when the select content is closed.
|
|
361
|
+
on_escape_key_down: Fired when the escape key is pressed.
|
|
362
|
+
on_pointer_down_outside: Fired when a pointer down event happens outside the select content.
|
|
354
363
|
style: The style of the component.
|
|
355
364
|
key: A unique key for the component.
|
|
356
365
|
id: The id for the component.
|
|
@@ -375,22 +384,22 @@ class SelectGroup(RadixThemesComponent):
|
|
|
375
384
|
id: Optional[Any] = None,
|
|
376
385
|
class_name: Optional[Any] = None,
|
|
377
386
|
autofocus: Optional[bool] = None,
|
|
378
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
379
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
380
|
-
on_click: Optional[EventType[[]]] = None,
|
|
381
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
382
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
383
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
384
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
385
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
386
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
387
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
388
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
389
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
390
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
391
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
392
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
393
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
387
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
388
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
389
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
390
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
391
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
392
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
393
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
394
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
395
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
396
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
397
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
398
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
399
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
400
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
401
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
402
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
394
403
|
**props,
|
|
395
404
|
) -> "SelectGroup":
|
|
396
405
|
"""Create a new component instance.
|
|
@@ -426,22 +435,22 @@ class SelectItem(RadixThemesComponent):
|
|
|
426
435
|
id: Optional[Any] = None,
|
|
427
436
|
class_name: Optional[Any] = None,
|
|
428
437
|
autofocus: Optional[bool] = None,
|
|
429
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
430
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
431
|
-
on_click: Optional[EventType[[]]] = None,
|
|
432
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
433
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
434
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
435
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
436
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
437
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
438
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
439
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
440
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
441
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
442
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
443
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
444
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
438
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
439
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
440
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
441
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
442
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
443
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
444
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
445
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
446
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
447
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
448
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
449
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
450
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
451
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
452
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
453
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
445
454
|
**props,
|
|
446
455
|
) -> "SelectItem":
|
|
447
456
|
"""Create a new component instance.
|
|
@@ -477,22 +486,22 @@ class SelectLabel(RadixThemesComponent):
|
|
|
477
486
|
id: Optional[Any] = None,
|
|
478
487
|
class_name: Optional[Any] = None,
|
|
479
488
|
autofocus: Optional[bool] = None,
|
|
480
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
481
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
482
|
-
on_click: Optional[EventType[[]]] = None,
|
|
483
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
484
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
485
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
486
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
487
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
488
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
489
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
490
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
491
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
492
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
493
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
494
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
495
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
489
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
490
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
491
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
492
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
493
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
494
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
495
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
496
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
497
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
498
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
499
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
500
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
501
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
502
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
503
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
504
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
496
505
|
**props,
|
|
497
506
|
) -> "SelectLabel":
|
|
498
507
|
"""Create a new component instance.
|
|
@@ -526,22 +535,22 @@ class SelectSeparator(RadixThemesComponent):
|
|
|
526
535
|
id: Optional[Any] = None,
|
|
527
536
|
class_name: Optional[Any] = None,
|
|
528
537
|
autofocus: Optional[bool] = None,
|
|
529
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
530
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
531
|
-
on_click: Optional[EventType[[]]] = None,
|
|
532
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
533
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
534
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
535
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
536
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
537
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
538
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
539
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
540
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
541
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
542
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
543
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
544
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
538
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
539
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
540
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
541
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
542
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
543
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
544
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
545
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
546
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
547
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
548
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
549
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
550
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
551
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
552
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
553
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
545
554
|
**props,
|
|
546
555
|
) -> "SelectSeparator":
|
|
547
556
|
"""Create a new component instance.
|
|
@@ -678,24 +687,28 @@ class HighLevelSelect(SelectRoot):
|
|
|
678
687
|
id: Optional[Any] = None,
|
|
679
688
|
class_name: Optional[Any] = None,
|
|
680
689
|
autofocus: Optional[bool] = None,
|
|
681
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
682
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
683
|
-
on_change: Optional[
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
690
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
691
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
692
|
+
on_change: Optional[
|
|
693
|
+
Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
|
|
694
|
+
] = None,
|
|
695
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
696
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
697
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
698
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
699
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
700
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
701
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
702
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
703
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
704
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
705
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
706
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
707
|
+
on_open_change: Optional[
|
|
708
|
+
Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]]
|
|
709
|
+
] = None,
|
|
710
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
711
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
699
712
|
**props,
|
|
700
713
|
) -> "HighLevelSelect":
|
|
701
714
|
"""Create a select component.
|
|
@@ -719,6 +732,8 @@ class HighLevelSelect(SelectRoot):
|
|
|
719
732
|
name: The name of the select control when submitting the form.
|
|
720
733
|
disabled: When True, prevents the user from interacting with select.
|
|
721
734
|
required: When True, indicates that the user must select a value before the owning form can be submitted.
|
|
735
|
+
on_change: Props to rename Fired when the value of the select changes.
|
|
736
|
+
on_open_change: Fired when the select is opened or closed.
|
|
722
737
|
style: The style of the component.
|
|
723
738
|
key: A unique key for the component.
|
|
724
739
|
id: The id for the component.
|
|
@@ -852,24 +867,28 @@ class Select(ComponentNamespace):
|
|
|
852
867
|
id: Optional[Any] = None,
|
|
853
868
|
class_name: Optional[Any] = None,
|
|
854
869
|
autofocus: Optional[bool] = None,
|
|
855
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
856
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
857
|
-
on_change: Optional[
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
870
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
871
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
872
|
+
on_change: Optional[
|
|
873
|
+
Union[EventType[[], BASE_STATE], EventType[[str], BASE_STATE]]
|
|
874
|
+
] = None,
|
|
875
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
876
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
877
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
878
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
879
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
880
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
881
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
882
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
883
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
884
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
885
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
886
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
887
|
+
on_open_change: Optional[
|
|
888
|
+
Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]]
|
|
889
|
+
] = None,
|
|
890
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
891
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
873
892
|
**props,
|
|
874
893
|
) -> "HighLevelSelect":
|
|
875
894
|
"""Create a select component.
|
|
@@ -893,6 +912,8 @@ class Select(ComponentNamespace):
|
|
|
893
912
|
name: The name of the select control when submitting the form.
|
|
894
913
|
disabled: When True, prevents the user from interacting with select.
|
|
895
914
|
required: When True, indicates that the user must select a value before the owning form can be submitted.
|
|
915
|
+
on_change: Props to rename Fired when the value of the select changes.
|
|
916
|
+
on_open_change: Fired when the select is opened or closed.
|
|
896
917
|
style: The style of the component.
|
|
897
918
|
key: A unique key for the component.
|
|
898
919
|
id: The id for the component.
|
|
@@ -5,10 +5,7 @@ from typing import Literal
|
|
|
5
5
|
from reflex.components.core.breakpoints import Responsive
|
|
6
6
|
from reflex.vars.base import LiteralVar, Var
|
|
7
7
|
|
|
8
|
-
from ..base import
|
|
9
|
-
LiteralAccentColor,
|
|
10
|
-
RadixThemesComponent,
|
|
11
|
-
)
|
|
8
|
+
from ..base import LiteralAccentColor, RadixThemesComponent
|
|
12
9
|
|
|
13
10
|
LiteralSeperatorSize = Literal["1", "2", "3", "4"]
|
|
14
11
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
from typing import Any, Dict, Literal, Optional, Union, overload
|
|
7
7
|
|
|
8
8
|
from reflex.components.core.breakpoints import Breakpoints
|
|
9
|
-
from reflex.event import EventType
|
|
9
|
+
from reflex.event import BASE_STATE, EventType
|
|
10
10
|
from reflex.style import Style
|
|
11
11
|
from reflex.vars.base import Var
|
|
12
12
|
|
|
@@ -112,22 +112,22 @@ class Separator(RadixThemesComponent):
|
|
|
112
112
|
id: Optional[Any] = None,
|
|
113
113
|
class_name: Optional[Any] = None,
|
|
114
114
|
autofocus: Optional[bool] = None,
|
|
115
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
116
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
117
|
-
on_click: Optional[EventType[[]]] = None,
|
|
118
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
119
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
120
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
121
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
122
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
123
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
124
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
125
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
126
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
127
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
128
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
129
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
130
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
115
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
116
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
117
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
118
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
119
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
120
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
121
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
122
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
123
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
124
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
125
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
126
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
127
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
128
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
129
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
130
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
131
131
|
**props,
|
|
132
132
|
) -> "Separator":
|
|
133
133
|
"""Create a new component instance.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
from typing import Any, Dict, Optional, Union, overload
|
|
7
7
|
|
|
8
8
|
from reflex.components.core.breakpoints import Breakpoints
|
|
9
|
-
from reflex.event import EventType
|
|
9
|
+
from reflex.event import BASE_STATE, EventType
|
|
10
10
|
from reflex.style import Style
|
|
11
11
|
from reflex.vars.base import Var
|
|
12
12
|
|
|
@@ -42,22 +42,22 @@ class Skeleton(RadixLoadingProp, RadixThemesComponent):
|
|
|
42
42
|
id: Optional[Any] = None,
|
|
43
43
|
class_name: Optional[Any] = None,
|
|
44
44
|
autofocus: Optional[bool] = None,
|
|
45
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
46
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
47
|
-
on_click: Optional[EventType[[]]] = None,
|
|
48
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
49
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
50
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
51
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
52
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
53
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
54
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
55
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
56
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
57
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
58
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
59
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
60
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
45
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
46
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
47
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
48
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
49
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
50
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
51
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
52
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
53
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
54
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
55
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
56
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
57
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
58
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
59
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
60
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
61
61
|
**props,
|
|
62
62
|
) -> "Skeleton":
|
|
63
63
|
"""Create a new component instance.
|
|
@@ -2,31 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import List, Literal, Optional,
|
|
5
|
+
from typing import List, Literal, Optional, Union
|
|
6
6
|
|
|
7
7
|
from reflex.components.component import Component
|
|
8
8
|
from reflex.components.core.breakpoints import Responsive
|
|
9
|
-
from reflex.event import EventHandler
|
|
9
|
+
from reflex.event import EventHandler, passthrough_event_spec
|
|
10
10
|
from reflex.vars.base import Var
|
|
11
11
|
|
|
12
|
-
from ..base import
|
|
13
|
-
LiteralAccentColor,
|
|
14
|
-
RadixThemesComponent,
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
def on_value_event_spec(
|
|
19
|
-
value: Var[List[int | float]],
|
|
20
|
-
) -> Tuple[Var[List[int | float]]]:
|
|
21
|
-
"""Event handler spec for the value event.
|
|
12
|
+
from ..base import LiteralAccentColor, RadixThemesComponent
|
|
22
13
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"""
|
|
29
|
-
return (value,) # type: ignore
|
|
14
|
+
on_value_event_spec = (
|
|
15
|
+
passthrough_event_spec(list[Union[int, float]]),
|
|
16
|
+
passthrough_event_spec(list[int]),
|
|
17
|
+
passthrough_event_spec(list[float]),
|
|
18
|
+
)
|
|
30
19
|
|
|
31
20
|
|
|
32
21
|
class Slider(RadixThemesComponent):
|
|
@@ -61,6 +50,9 @@ class Slider(RadixThemesComponent):
|
|
|
61
50
|
# The name of the slider. Submitted with its owning form as part of a name/value pair.
|
|
62
51
|
name: Var[str]
|
|
63
52
|
|
|
53
|
+
# The width of the slider.
|
|
54
|
+
width: Var[Optional[str]] = Var.create("100%")
|
|
55
|
+
|
|
64
56
|
# The minimum value of the slider.
|
|
65
57
|
min: Var[Union[float, int]]
|
|
66
58
|
|
|
@@ -89,20 +81,19 @@ class Slider(RadixThemesComponent):
|
|
|
89
81
|
def create(
|
|
90
82
|
cls,
|
|
91
83
|
*children,
|
|
92
|
-
width: Optional[str] = "100%",
|
|
93
84
|
**props,
|
|
94
85
|
) -> Component:
|
|
95
86
|
"""Create a Slider component.
|
|
96
87
|
|
|
97
88
|
Args:
|
|
98
89
|
*children: The children of the component.
|
|
99
|
-
width: The width of the slider.
|
|
100
90
|
**props: The properties of the component.
|
|
101
91
|
|
|
102
92
|
Returns:
|
|
103
93
|
The component.
|
|
104
94
|
"""
|
|
105
95
|
default_value = props.pop("default_value", [50])
|
|
96
|
+
width = props.pop("width", "100%")
|
|
106
97
|
|
|
107
98
|
if isinstance(default_value, Var):
|
|
108
99
|
if issubclass(default_value._var_type, (int, float)):
|