reflex 0.6.4a2__py3-none-any.whl → 0.6.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of reflex might be problematic. Click here for more details.
- reflex/.templates/jinja/web/pages/custom_component.js.jinja2 +0 -14
- reflex/.templates/jinja/web/pages/utils.js.jinja2 +4 -8
- reflex/.templates/web/components/shiki/code.js +16 -11
- reflex/.templates/web/utils/state.js +29 -21
- reflex/__init__.py +4 -0
- reflex/__init__.pyi +4 -0
- reflex/app.py +148 -154
- reflex/app_mixins/lifespan.py +5 -1
- reflex/app_mixins/middleware.py +3 -1
- reflex/app_mixins/mixin.py +3 -2
- reflex/base.py +2 -4
- reflex/compiler/compiler.py +111 -37
- reflex/components/base/app_wrap.pyi +17 -17
- reflex/components/base/bare.py +72 -3
- reflex/components/base/body.pyi +17 -17
- reflex/components/base/document.pyi +81 -81
- reflex/components/base/error_boundary.pyi +25 -18
- reflex/components/base/fragment.pyi +17 -17
- reflex/components/base/head.pyi +33 -33
- reflex/components/base/link.pyi +33 -33
- reflex/components/base/meta.pyi +65 -65
- reflex/components/base/script.py +4 -4
- reflex/components/base/script.pyi +23 -20
- reflex/components/component.py +250 -31
- reflex/components/core/banner.py +1 -1
- reflex/components/core/banner.pyi +81 -81
- reflex/components/core/client_side_routing.pyi +33 -33
- reflex/components/core/clipboard.py +2 -2
- reflex/components/core/clipboard.pyi +24 -18
- reflex/components/core/debounce.py +2 -2
- reflex/components/core/debounce.pyi +18 -18
- reflex/components/core/html.pyi +17 -17
- reflex/components/core/upload.py +90 -28
- reflex/components/core/upload.pyi +128 -72
- reflex/components/datadisplay/code.py +55 -40
- reflex/components/datadisplay/code.pyi +46 -44
- reflex/components/datadisplay/dataeditor.py +21 -20
- reflex/components/datadisplay/dataeditor.pyi +103 -35
- reflex/components/datadisplay/shiki_code_block.py +60 -27
- reflex/components/datadisplay/shiki_code_block.pyi +86 -65
- reflex/components/dynamic.py +9 -5
- reflex/components/el/element.pyi +17 -17
- reflex/components/el/elements/base.pyi +17 -17
- reflex/components/el/elements/forms.py +12 -3
- reflex/components/el/elements/forms.pyi +293 -233
- reflex/components/el/elements/inline.pyi +449 -449
- reflex/components/el/elements/media.pyi +401 -401
- reflex/components/el/elements/metadata.pyi +97 -97
- reflex/components/el/elements/other.pyi +113 -113
- reflex/components/el/elements/scripts.pyi +49 -49
- reflex/components/el/elements/sectioning.pyi +241 -241
- reflex/components/el/elements/tables.pyi +161 -161
- reflex/components/el/elements/typography.pyi +241 -241
- reflex/components/gridjs/datatable.pyi +33 -33
- reflex/components/lucide/icon.py +1 -1
- reflex/components/lucide/icon.pyi +33 -33
- reflex/components/markdown/markdown.py +180 -49
- reflex/components/markdown/markdown.pyi +36 -19
- reflex/components/moment/moment.py +17 -21
- reflex/components/moment/moment.pyi +26 -21
- reflex/components/next/base.pyi +17 -17
- reflex/components/next/image.py +3 -3
- reflex/components/next/image.pyi +21 -19
- reflex/components/next/link.pyi +17 -17
- reflex/components/next/video.pyi +17 -17
- reflex/components/plotly/plotly.py +79 -78
- reflex/components/plotly/plotly.pyi +91 -41
- reflex/components/props.py +34 -0
- reflex/components/radix/primitives/accordion.py +15 -8
- reflex/components/radix/primitives/accordion.pyi +121 -118
- reflex/components/radix/primitives/base.pyi +33 -33
- reflex/components/radix/primitives/drawer.py +41 -20
- reflex/components/radix/primitives/drawer.pyi +279 -190
- reflex/components/radix/primitives/form.py +2 -2
- reflex/components/radix/primitives/form.pyi +200 -167
- reflex/components/radix/primitives/progress.pyi +81 -81
- reflex/components/radix/primitives/slider.pyi +89 -83
- reflex/components/radix/themes/base.py +30 -1
- reflex/components/radix/themes/base.pyi +286 -113
- reflex/components/radix/themes/color_mode.py +17 -9
- reflex/components/radix/themes/color_mode.pyi +68 -56
- reflex/components/radix/themes/components/alert_dialog.py +8 -5
- reflex/components/radix/themes/components/alert_dialog.pyi +125 -117
- reflex/components/radix/themes/components/aspect_ratio.pyi +17 -17
- reflex/components/radix/themes/components/avatar.py +1 -5
- reflex/components/radix/themes/components/avatar.pyi +17 -17
- reflex/components/radix/themes/components/badge.py +1 -5
- reflex/components/radix/themes/components/badge.pyi +17 -17
- reflex/components/radix/themes/components/button.pyi +18 -21
- reflex/components/radix/themes/components/callout.py +1 -4
- reflex/components/radix/themes/components/callout.pyi +81 -81
- reflex/components/radix/themes/components/card.py +1 -3
- reflex/components/radix/themes/components/card.pyi +17 -17
- reflex/components/radix/themes/components/checkbox.py +4 -8
- reflex/components/radix/themes/components/checkbox.pyi +61 -52
- reflex/components/radix/themes/components/checkbox_cards.pyi +33 -33
- reflex/components/radix/themes/components/checkbox_group.pyi +33 -33
- reflex/components/radix/themes/components/context_menu.py +121 -28
- reflex/components/radix/themes/components/context_menu.pyi +250 -147
- reflex/components/radix/themes/components/data_list.pyi +65 -65
- reflex/components/radix/themes/components/dialog.py +11 -11
- reflex/components/radix/themes/components/dialog.pyi +135 -120
- reflex/components/radix/themes/components/dropdown_menu.py +14 -25
- reflex/components/radix/themes/components/dropdown_menu.pyi +157 -145
- reflex/components/radix/themes/components/hover_card.py +19 -7
- reflex/components/radix/themes/components/hover_card.pyi +102 -67
- reflex/components/radix/themes/components/icon_button.pyi +18 -21
- reflex/components/radix/themes/components/inset.py +1 -3
- reflex/components/radix/themes/components/inset.pyi +17 -17
- reflex/components/radix/themes/components/popover.py +22 -13
- reflex/components/radix/themes/components/popover.pyi +98 -72
- reflex/components/radix/themes/components/progress.pyi +17 -17
- reflex/components/radix/themes/components/radio.pyi +17 -17
- reflex/components/radix/themes/components/radio_cards.py +2 -2
- reflex/components/radix/themes/components/radio_cards.pyi +37 -34
- reflex/components/radix/themes/components/radio_group.py +3 -7
- reflex/components/radix/themes/components/radio_group.pyi +69 -66
- reflex/components/radix/themes/components/scroll_area.py +1 -3
- reflex/components/radix/themes/components/scroll_area.pyi +17 -17
- reflex/components/radix/themes/components/segmented_control.pyi +37 -34
- reflex/components/radix/themes/components/select.py +7 -11
- reflex/components/radix/themes/components/select.pyi +175 -154
- reflex/components/radix/themes/components/separator.py +1 -4
- reflex/components/radix/themes/components/separator.pyi +17 -17
- reflex/components/radix/themes/components/skeleton.pyi +17 -17
- reflex/components/radix/themes/components/slider.py +12 -21
- reflex/components/radix/themes/components/slider.pyi +47 -25
- reflex/components/radix/themes/components/spinner.py +1 -4
- reflex/components/radix/themes/components/spinner.pyi +17 -17
- reflex/components/radix/themes/components/switch.py +3 -6
- reflex/components/radix/themes/components/switch.pyi +21 -18
- reflex/components/radix/themes/components/table.py +21 -5
- reflex/components/radix/themes/components/table.pyi +392 -116
- reflex/components/radix/themes/components/tabs.py +3 -6
- reflex/components/radix/themes/components/tabs.pyi +89 -83
- reflex/components/radix/themes/components/text_area.py +1 -5
- reflex/components/radix/themes/components/text_area.pyi +43 -20
- reflex/components/radix/themes/components/text_field.py +1 -5
- reflex/components/radix/themes/components/text_field.pyi +101 -55
- reflex/components/radix/themes/components/tooltip.py +5 -7
- reflex/components/radix/themes/components/tooltip.pyi +25 -22
- reflex/components/radix/themes/layout/base.py +2 -27
- reflex/components/radix/themes/layout/base.pyi +82 -82
- reflex/components/radix/themes/layout/box.pyi +17 -17
- reflex/components/radix/themes/layout/center.pyi +17 -17
- reflex/components/radix/themes/layout/container.pyi +17 -17
- reflex/components/radix/themes/layout/flex.py +1 -6
- reflex/components/radix/themes/layout/flex.pyi +17 -17
- reflex/components/radix/themes/layout/grid.py +1 -6
- reflex/components/radix/themes/layout/grid.pyi +17 -17
- reflex/components/radix/themes/layout/list.py +20 -15
- reflex/components/radix/themes/layout/list.pyi +175 -92
- reflex/components/radix/themes/layout/section.pyi +17 -17
- reflex/components/radix/themes/layout/spacer.pyi +17 -17
- reflex/components/radix/themes/layout/stack.py +6 -6
- reflex/components/radix/themes/layout/stack.pyi +91 -62
- reflex/components/radix/themes/typography/blockquote.py +2 -8
- reflex/components/radix/themes/typography/blockquote.pyi +17 -17
- reflex/components/radix/themes/typography/code.py +4 -10
- reflex/components/radix/themes/typography/code.pyi +19 -18
- reflex/components/radix/themes/typography/heading.py +4 -11
- reflex/components/radix/themes/typography/heading.pyi +19 -18
- reflex/components/radix/themes/typography/link.py +4 -10
- reflex/components/radix/themes/typography/link.pyi +19 -18
- reflex/components/radix/themes/typography/text.py +4 -11
- reflex/components/radix/themes/typography/text.pyi +115 -114
- reflex/components/react_player/audio.pyi +58 -33
- reflex/components/react_player/react_player.py +17 -17
- reflex/components/react_player/react_player.pyi +55 -33
- reflex/components/react_player/video.pyi +58 -33
- reflex/components/recharts/cartesian.py +45 -45
- reflex/components/recharts/cartesian.pyi +389 -304
- reflex/components/recharts/charts.py +22 -22
- reflex/components/recharts/charts.pyi +226 -179
- reflex/components/recharts/general.py +26 -27
- reflex/components/recharts/general.pyi +106 -99
- reflex/components/recharts/polar.py +33 -33
- reflex/components/recharts/polar.pyi +70 -64
- reflex/components/recharts/recharts.pyi +33 -33
- reflex/components/sonner/toast.py +9 -36
- reflex/components/sonner/toast.pyi +20 -24
- reflex/components/suneditor/editor.py +8 -8
- reflex/components/suneditor/editor.pyi +50 -25
- reflex/components/tags/iter_tag.py +1 -10
- reflex/components/tags/tag.py +1 -4
- reflex/config.py +252 -41
- reflex/constants/__init__.py +4 -16
- reflex/constants/base.py +7 -14
- reflex/constants/colors.py +0 -1
- reflex/constants/installer.py +12 -7
- reflex/constants/state.py +4 -0
- reflex/custom_components/custom_components.py +6 -6
- reflex/event.py +486 -241
- reflex/experimental/client_state.py +9 -9
- reflex/experimental/layout.py +2 -2
- reflex/experimental/layout.pyi +95 -87
- reflex/experimental/misc.py +1 -1
- reflex/istate/__init__.py +1 -0
- reflex/istate/proxy.py +33 -0
- reflex/istate/wrappers.py +27 -0
- reflex/model.py +7 -7
- reflex/page.py +2 -1
- reflex/reflex.py +142 -8
- reflex/state.py +133 -46
- reflex/testing.py +9 -7
- reflex/utils/console.py +0 -1
- reflex/utils/exceptions.py +31 -3
- reflex/utils/exec.py +33 -14
- reflex/utils/format.py +15 -12
- reflex/utils/net.py +1 -1
- reflex/utils/path_ops.py +2 -2
- reflex/utils/prerequisites.py +82 -46
- reflex/utils/pyi_generator.py +63 -20
- reflex/utils/registry.py +1 -1
- reflex/utils/serializers.py +75 -36
- reflex/utils/telemetry.py +3 -2
- reflex/utils/types.py +125 -10
- reflex/vars/base.py +131 -119
- reflex/vars/function.py +59 -12
- reflex/vars/number.py +3 -1
- reflex/vars/object.py +30 -24
- reflex/vars/sequence.py +7 -7
- {reflex-0.6.4a2.dist-info → reflex-0.6.5.dist-info}/METADATA +3 -3
- reflex-0.6.5.dist-info/RECORD +394 -0
- reflex-0.6.4a2.dist-info/RECORD +0 -391
- {reflex-0.6.4a2.dist-info → reflex-0.6.5.dist-info}/LICENSE +0 -0
- {reflex-0.6.4a2.dist-info → reflex-0.6.5.dist-info}/WHEEL +0 -0
- {reflex-0.6.4a2.dist-info → reflex-0.6.5.dist-info}/entry_points.txt +0 -0
|
@@ -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.radix.primitives.base import RadixPrimitiveComponent
|
|
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
|
|
|
@@ -23,22 +23,22 @@ class DrawerComponent(RadixPrimitiveComponent):
|
|
|
23
23
|
id: Optional[Any] = None,
|
|
24
24
|
class_name: Optional[Any] = None,
|
|
25
25
|
autofocus: Optional[bool] = None,
|
|
26
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
27
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
28
|
-
on_click: Optional[EventType[[]]] = None,
|
|
29
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
30
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
31
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
32
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
33
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
34
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
35
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
36
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
37
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
38
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
39
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
40
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
41
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
26
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
27
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
28
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
29
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
30
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
31
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
32
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
33
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
34
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
35
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
36
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
37
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
38
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
39
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
40
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
41
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
42
42
|
**props,
|
|
43
43
|
) -> "DrawerComponent":
|
|
44
44
|
"""Create the component.
|
|
@@ -67,12 +67,8 @@ class DrawerRoot(DrawerComponent):
|
|
|
67
67
|
def create( # type: ignore
|
|
68
68
|
cls,
|
|
69
69
|
*children,
|
|
70
|
+
default_open: Optional[Union[Var[bool], bool]] = None,
|
|
70
71
|
open: Optional[Union[Var[bool], bool]] = None,
|
|
71
|
-
should_scale_background: Optional[Union[Var[bool], bool]] = None,
|
|
72
|
-
close_threshold: Optional[Union[Var[float], float]] = None,
|
|
73
|
-
snap_points: Optional[List[Union[float, str]]] = None,
|
|
74
|
-
fade_from_index: Optional[Union[Var[int], int]] = None,
|
|
75
|
-
scroll_lock_timeout: Optional[Union[Var[int], int]] = None,
|
|
76
72
|
modal: Optional[Union[Var[bool], bool]] = None,
|
|
77
73
|
direction: Optional[
|
|
78
74
|
Union[
|
|
@@ -80,45 +76,62 @@ class DrawerRoot(DrawerComponent):
|
|
|
80
76
|
Var[Literal["bottom", "left", "right", "top"]],
|
|
81
77
|
]
|
|
82
78
|
] = None,
|
|
79
|
+
dismissible: Optional[Union[Var[bool], bool]] = None,
|
|
80
|
+
handle_only: Optional[Union[Var[bool], bool]] = None,
|
|
81
|
+
snap_points: Optional[List[Union[float, str]]] = None,
|
|
82
|
+
fade_from_index: Optional[Union[Var[int], int]] = None,
|
|
83
|
+
scroll_lock_timeout: Optional[Union[Var[int], int]] = None,
|
|
83
84
|
preventScrollRestoration: Optional[Union[Var[bool], bool]] = None,
|
|
85
|
+
should_scale_background: Optional[Union[Var[bool], bool]] = None,
|
|
86
|
+
close_threshold: Optional[Union[Var[float], float]] = None,
|
|
84
87
|
as_child: Optional[Union[Var[bool], bool]] = None,
|
|
85
88
|
style: Optional[Style] = None,
|
|
86
89
|
key: Optional[Any] = None,
|
|
87
90
|
id: Optional[Any] = None,
|
|
88
91
|
class_name: Optional[Any] = None,
|
|
89
92
|
autofocus: Optional[bool] = None,
|
|
90
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
93
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
94
|
+
on_animation_end: Optional[
|
|
95
|
+
Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]]
|
|
96
|
+
] = 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_open_change: Optional[
|
|
111
|
+
Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]]
|
|
112
|
+
] = None,
|
|
113
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
114
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
107
115
|
**props,
|
|
108
116
|
) -> "DrawerRoot":
|
|
109
117
|
"""Create the component.
|
|
110
118
|
|
|
111
119
|
Args:
|
|
112
120
|
*children: The children of the component.
|
|
121
|
+
default_open: The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
|
|
113
122
|
open: Whether the drawer is open or not.
|
|
114
|
-
|
|
115
|
-
|
|
123
|
+
on_open_change: Fires when the drawer is opened or closed.
|
|
124
|
+
modal: When `False`, it allows interaction with elements outside of the drawer without closing it. Defaults to `True`.
|
|
125
|
+
direction: Direction of the drawer. This adjusts the animations and the drag direction. Defaults to `"bottom"`
|
|
126
|
+
on_animation_end: Gets triggered after the open or close animation ends, it receives an open argument with the open state of the drawer by the time the function was triggered.
|
|
127
|
+
dismissible: When `False`, dragging, clicking outside, pressing esc, etc. will not close the drawer. Use this in combination with the open prop, otherwise you won't be able to open/close the drawer.
|
|
128
|
+
handle_only: When `True`, dragging will only be possible by the handle.
|
|
116
129
|
snap_points: Array of numbers from 0 to 100 that corresponds to % of the screen a given snap point should take up. Should go from least visible. Also Accept px values, which doesn't take screen height into account.
|
|
117
130
|
fade_from_index: Index of a snapPoint from which the overlay fade should be applied. Defaults to the last snap point.
|
|
118
131
|
scroll_lock_timeout: Duration for which the drawer is not draggable after scrolling content inside of the drawer. Defaults to 500ms
|
|
119
|
-
modal: When `False`, it allows to interact with elements outside of the drawer without closing it. Defaults to `True`.
|
|
120
|
-
direction: Direction of the drawer. Defaults to `"bottom"`
|
|
121
132
|
preventScrollRestoration: When `True`, it prevents scroll restoration. Defaults to `True`.
|
|
133
|
+
should_scale_background: Enable background scaling, it requires container element with `vaul-drawer-wrapper` attribute to scale its background.
|
|
134
|
+
close_threshold: Number between 0 and 1 that determines when the drawer should be closed.
|
|
122
135
|
as_child: Change the default rendered element for the one passed as a child.
|
|
123
136
|
style: The style of the component.
|
|
124
137
|
key: A unique key for the component.
|
|
@@ -145,29 +158,36 @@ class DrawerTrigger(DrawerComponent):
|
|
|
145
158
|
id: Optional[Any] = None,
|
|
146
159
|
class_name: Optional[Any] = None,
|
|
147
160
|
autofocus: Optional[bool] = None,
|
|
148
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
149
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
150
|
-
on_click: Optional[EventType[[]]] = None,
|
|
151
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
152
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
153
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
154
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
155
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
156
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
157
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
158
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
159
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
160
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
161
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
162
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
163
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
161
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
162
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
163
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
164
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
165
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
166
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
167
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
168
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
169
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
170
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
171
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
172
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
173
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
174
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
175
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
176
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
164
177
|
**props,
|
|
165
178
|
) -> "DrawerTrigger":
|
|
166
179
|
"""Create a new DrawerTrigger instance.
|
|
167
180
|
|
|
168
181
|
Args:
|
|
169
|
-
children: The children of the element.
|
|
170
|
-
|
|
182
|
+
*children: The children of the element.
|
|
183
|
+
as_child: Change the default rendered element for the one passed as a child.
|
|
184
|
+
style: The style of the component.
|
|
185
|
+
key: A unique key for the component.
|
|
186
|
+
id: The id for the component.
|
|
187
|
+
class_name: The class name for the component.
|
|
188
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
189
|
+
custom_attrs: custom attribute
|
|
190
|
+
**props: The properties of the element.
|
|
171
191
|
|
|
172
192
|
Returns:
|
|
173
193
|
The new DrawerTrigger instance.
|
|
@@ -186,22 +206,22 @@ class DrawerPortal(DrawerComponent):
|
|
|
186
206
|
id: Optional[Any] = None,
|
|
187
207
|
class_name: Optional[Any] = None,
|
|
188
208
|
autofocus: Optional[bool] = None,
|
|
189
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
190
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
191
|
-
on_click: Optional[EventType[[]]] = None,
|
|
192
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
193
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
194
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
195
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
196
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
197
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
198
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
199
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
200
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
201
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
202
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
203
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
204
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
209
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
210
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
211
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
212
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
213
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
214
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
215
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
216
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
217
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
218
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
219
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
220
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
221
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
222
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
223
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
224
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
205
225
|
**props,
|
|
206
226
|
) -> "DrawerPortal":
|
|
207
227
|
"""Create the component.
|
|
@@ -234,27 +254,27 @@ class DrawerContent(DrawerComponent):
|
|
|
234
254
|
id: Optional[Any] = None,
|
|
235
255
|
class_name: Optional[Any] = None,
|
|
236
256
|
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_interact_outside: Optional[EventType[[]]] = None,
|
|
246
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
247
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
248
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
249
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
250
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
251
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
252
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
253
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
254
|
-
on_open_auto_focus: Optional[EventType[[]]] = None,
|
|
255
|
-
on_pointer_down_outside: Optional[EventType[[]]] = None,
|
|
256
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
257
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
257
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
258
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
259
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
260
|
+
on_close_auto_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
261
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
262
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
263
|
+
on_escape_key_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
264
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
265
|
+
on_interact_outside: Optional[EventType[[], BASE_STATE]] = None,
|
|
266
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
267
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
268
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
269
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
270
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
271
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
272
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
273
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
274
|
+
on_open_auto_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
275
|
+
on_pointer_down_outside: Optional[EventType[[], BASE_STATE]] = None,
|
|
276
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
277
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
258
278
|
**props,
|
|
259
279
|
) -> "DrawerContent":
|
|
260
280
|
"""Create a Drawer Content.
|
|
@@ -291,22 +311,22 @@ class DrawerOverlay(DrawerComponent):
|
|
|
291
311
|
id: Optional[Any] = None,
|
|
292
312
|
class_name: Optional[Any] = None,
|
|
293
313
|
autofocus: Optional[bool] = None,
|
|
294
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
295
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
296
|
-
on_click: Optional[EventType[[]]] = None,
|
|
297
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
298
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
299
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
300
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
301
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
302
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
303
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
304
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
305
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
306
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
307
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
308
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
309
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
314
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
315
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
316
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
317
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
318
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
319
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
320
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
321
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
322
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
323
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
324
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
325
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
326
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
327
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
328
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
329
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
310
330
|
**props,
|
|
311
331
|
) -> "DrawerOverlay":
|
|
312
332
|
"""Create the component.
|
|
@@ -339,29 +359,36 @@ class DrawerClose(DrawerTrigger):
|
|
|
339
359
|
id: Optional[Any] = None,
|
|
340
360
|
class_name: Optional[Any] = None,
|
|
341
361
|
autofocus: Optional[bool] = None,
|
|
342
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
343
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
344
|
-
on_click: Optional[EventType[[]]] = None,
|
|
345
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
346
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
347
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
348
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
349
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
350
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
351
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
352
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
353
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
354
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
355
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
356
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
357
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
362
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
363
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
364
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
365
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
366
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
367
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
368
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
369
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
370
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
371
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
372
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
373
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
374
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
375
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
376
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
377
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
358
378
|
**props,
|
|
359
379
|
) -> "DrawerClose":
|
|
360
380
|
"""Create a new DrawerTrigger instance.
|
|
361
381
|
|
|
362
382
|
Args:
|
|
363
|
-
children: The children of the element.
|
|
364
|
-
|
|
383
|
+
*children: The children of the element.
|
|
384
|
+
as_child: Change the default rendered element for the one passed as a child.
|
|
385
|
+
style: The style of the component.
|
|
386
|
+
key: A unique key for the component.
|
|
387
|
+
id: The id for the component.
|
|
388
|
+
class_name: The class name for the component.
|
|
389
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
390
|
+
custom_attrs: custom attribute
|
|
391
|
+
**props: The properties of the element.
|
|
365
392
|
|
|
366
393
|
Returns:
|
|
367
394
|
The new DrawerTrigger instance.
|
|
@@ -380,22 +407,22 @@ class DrawerTitle(DrawerComponent):
|
|
|
380
407
|
id: Optional[Any] = None,
|
|
381
408
|
class_name: Optional[Any] = None,
|
|
382
409
|
autofocus: Optional[bool] = None,
|
|
383
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
384
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
385
|
-
on_click: Optional[EventType[[]]] = None,
|
|
386
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
387
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
388
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
389
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
390
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
391
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
392
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
393
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
394
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
395
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
396
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
397
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
398
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
410
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
411
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
412
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
413
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
414
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
415
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
416
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
417
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
418
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
419
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
420
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
421
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
422
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
423
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
424
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
425
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
399
426
|
**props,
|
|
400
427
|
) -> "DrawerTitle":
|
|
401
428
|
"""Create the component.
|
|
@@ -428,22 +455,22 @@ class DrawerDescription(DrawerComponent):
|
|
|
428
455
|
id: Optional[Any] = None,
|
|
429
456
|
class_name: Optional[Any] = None,
|
|
430
457
|
autofocus: Optional[bool] = None,
|
|
431
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
432
|
-
on_blur: Optional[EventType[[]]] = None,
|
|
433
|
-
on_click: Optional[EventType[[]]] = None,
|
|
434
|
-
on_context_menu: Optional[EventType[[]]] = None,
|
|
435
|
-
on_double_click: Optional[EventType[[]]] = None,
|
|
436
|
-
on_focus: Optional[EventType[[]]] = None,
|
|
437
|
-
on_mount: Optional[EventType[[]]] = None,
|
|
438
|
-
on_mouse_down: Optional[EventType[[]]] = None,
|
|
439
|
-
on_mouse_enter: Optional[EventType[[]]] = None,
|
|
440
|
-
on_mouse_leave: Optional[EventType[[]]] = None,
|
|
441
|
-
on_mouse_move: Optional[EventType[[]]] = None,
|
|
442
|
-
on_mouse_out: Optional[EventType[[]]] = None,
|
|
443
|
-
on_mouse_over: Optional[EventType[[]]] = None,
|
|
444
|
-
on_mouse_up: Optional[EventType[[]]] = None,
|
|
445
|
-
on_scroll: Optional[EventType[[]]] = None,
|
|
446
|
-
on_unmount: Optional[EventType[[]]] = None,
|
|
458
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
459
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
460
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
461
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
462
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
463
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
464
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
465
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
466
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
467
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
468
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
469
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
470
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
471
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
472
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
473
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
447
474
|
**props,
|
|
448
475
|
) -> "DrawerDescription":
|
|
449
476
|
"""Create the component.
|
|
@@ -464,6 +491,54 @@ class DrawerDescription(DrawerComponent):
|
|
|
464
491
|
"""
|
|
465
492
|
...
|
|
466
493
|
|
|
494
|
+
class DrawerHandle(DrawerComponent):
|
|
495
|
+
@overload
|
|
496
|
+
@classmethod
|
|
497
|
+
def create( # type: ignore
|
|
498
|
+
cls,
|
|
499
|
+
*children,
|
|
500
|
+
as_child: Optional[Union[Var[bool], bool]] = None,
|
|
501
|
+
style: Optional[Style] = None,
|
|
502
|
+
key: Optional[Any] = None,
|
|
503
|
+
id: Optional[Any] = None,
|
|
504
|
+
class_name: Optional[Any] = None,
|
|
505
|
+
autofocus: Optional[bool] = None,
|
|
506
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
507
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
508
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
509
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
510
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
511
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
512
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
513
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
514
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
515
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
516
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
517
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
518
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
519
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
520
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
521
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
522
|
+
**props,
|
|
523
|
+
) -> "DrawerHandle":
|
|
524
|
+
"""Create the component.
|
|
525
|
+
|
|
526
|
+
Args:
|
|
527
|
+
*children: The children of the component.
|
|
528
|
+
as_child: Change the default rendered element for the one passed as a child.
|
|
529
|
+
style: The style of the component.
|
|
530
|
+
key: A unique key for the component.
|
|
531
|
+
id: The id for the component.
|
|
532
|
+
class_name: The class name for the component.
|
|
533
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
534
|
+
custom_attrs: custom attribute
|
|
535
|
+
**props: The props of the component.
|
|
536
|
+
|
|
537
|
+
Returns:
|
|
538
|
+
The component.
|
|
539
|
+
"""
|
|
540
|
+
...
|
|
541
|
+
|
|
467
542
|
class Drawer(ComponentNamespace):
|
|
468
543
|
root = staticmethod(DrawerRoot.create)
|
|
469
544
|
trigger = staticmethod(DrawerTrigger.create)
|
|
@@ -473,16 +548,13 @@ class Drawer(ComponentNamespace):
|
|
|
473
548
|
close = staticmethod(DrawerClose.create)
|
|
474
549
|
title = staticmethod(DrawerTitle.create)
|
|
475
550
|
description = staticmethod(DrawerDescription.create)
|
|
551
|
+
handle = staticmethod(DrawerHandle.create)
|
|
476
552
|
|
|
477
553
|
@staticmethod
|
|
478
554
|
def __call__(
|
|
479
555
|
*children,
|
|
556
|
+
default_open: Optional[Union[Var[bool], bool]] = None,
|
|
480
557
|
open: Optional[Union[Var[bool], bool]] = None,
|
|
481
|
-
should_scale_background: Optional[Union[Var[bool], bool]] = None,
|
|
482
|
-
close_threshold: Optional[Union[Var[float], float]] = None,
|
|
483
|
-
snap_points: Optional[List[Union[float, str]]] = None,
|
|
484
|
-
fade_from_index: Optional[Union[Var[int], int]] = None,
|
|
485
|
-
scroll_lock_timeout: Optional[Union[Var[int], int]] = None,
|
|
486
558
|
modal: Optional[Union[Var[bool], bool]] = None,
|
|
487
559
|
direction: Optional[
|
|
488
560
|
Union[
|
|
@@ -490,45 +562,62 @@ class Drawer(ComponentNamespace):
|
|
|
490
562
|
Var[Literal["bottom", "left", "right", "top"]],
|
|
491
563
|
]
|
|
492
564
|
] = None,
|
|
565
|
+
dismissible: Optional[Union[Var[bool], bool]] = None,
|
|
566
|
+
handle_only: Optional[Union[Var[bool], bool]] = None,
|
|
567
|
+
snap_points: Optional[List[Union[float, str]]] = None,
|
|
568
|
+
fade_from_index: Optional[Union[Var[int], int]] = None,
|
|
569
|
+
scroll_lock_timeout: Optional[Union[Var[int], int]] = None,
|
|
493
570
|
preventScrollRestoration: Optional[Union[Var[bool], bool]] = None,
|
|
571
|
+
should_scale_background: Optional[Union[Var[bool], bool]] = None,
|
|
572
|
+
close_threshold: Optional[Union[Var[float], float]] = None,
|
|
494
573
|
as_child: Optional[Union[Var[bool], bool]] = None,
|
|
495
574
|
style: Optional[Style] = None,
|
|
496
575
|
key: Optional[Any] = None,
|
|
497
576
|
id: Optional[Any] = None,
|
|
498
577
|
class_name: Optional[Any] = None,
|
|
499
578
|
autofocus: Optional[bool] = None,
|
|
500
|
-
custom_attrs: Optional[Dict[str, Union[Var,
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
579
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
580
|
+
on_animation_end: Optional[
|
|
581
|
+
Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]]
|
|
582
|
+
] = None,
|
|
583
|
+
on_blur: Optional[EventType[[], BASE_STATE]] = None,
|
|
584
|
+
on_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
585
|
+
on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
|
|
586
|
+
on_double_click: Optional[EventType[[], BASE_STATE]] = None,
|
|
587
|
+
on_focus: Optional[EventType[[], BASE_STATE]] = None,
|
|
588
|
+
on_mount: Optional[EventType[[], BASE_STATE]] = None,
|
|
589
|
+
on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
|
|
590
|
+
on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
|
|
591
|
+
on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
|
|
592
|
+
on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
|
|
593
|
+
on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
|
|
594
|
+
on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
|
|
595
|
+
on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
|
|
596
|
+
on_open_change: Optional[
|
|
597
|
+
Union[EventType[[], BASE_STATE], EventType[[bool], BASE_STATE]]
|
|
598
|
+
] = None,
|
|
599
|
+
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
|
|
600
|
+
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
|
|
517
601
|
**props,
|
|
518
602
|
) -> "DrawerRoot":
|
|
519
603
|
"""Create the component.
|
|
520
604
|
|
|
521
605
|
Args:
|
|
522
606
|
*children: The children of the component.
|
|
607
|
+
default_open: The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
|
|
523
608
|
open: Whether the drawer is open or not.
|
|
524
|
-
|
|
525
|
-
|
|
609
|
+
on_open_change: Fires when the drawer is opened or closed.
|
|
610
|
+
modal: When `False`, it allows interaction with elements outside of the drawer without closing it. Defaults to `True`.
|
|
611
|
+
direction: Direction of the drawer. This adjusts the animations and the drag direction. Defaults to `"bottom"`
|
|
612
|
+
on_animation_end: Gets triggered after the open or close animation ends, it receives an open argument with the open state of the drawer by the time the function was triggered.
|
|
613
|
+
dismissible: When `False`, dragging, clicking outside, pressing esc, etc. will not close the drawer. Use this in combination with the open prop, otherwise you won't be able to open/close the drawer.
|
|
614
|
+
handle_only: When `True`, dragging will only be possible by the handle.
|
|
526
615
|
snap_points: Array of numbers from 0 to 100 that corresponds to % of the screen a given snap point should take up. Should go from least visible. Also Accept px values, which doesn't take screen height into account.
|
|
527
616
|
fade_from_index: Index of a snapPoint from which the overlay fade should be applied. Defaults to the last snap point.
|
|
528
617
|
scroll_lock_timeout: Duration for which the drawer is not draggable after scrolling content inside of the drawer. Defaults to 500ms
|
|
529
|
-
modal: When `False`, it allows to interact with elements outside of the drawer without closing it. Defaults to `True`.
|
|
530
|
-
direction: Direction of the drawer. Defaults to `"bottom"`
|
|
531
618
|
preventScrollRestoration: When `True`, it prevents scroll restoration. Defaults to `True`.
|
|
619
|
+
should_scale_background: Enable background scaling, it requires container element with `vaul-drawer-wrapper` attribute to scale its background.
|
|
620
|
+
close_threshold: Number between 0 and 1 that determines when the drawer should be closed.
|
|
532
621
|
as_child: Change the default rendered element for the one passed as a child.
|
|
533
622
|
style: The style of the component.
|
|
534
623
|
key: A unique key for the component.
|
|
@@ -8,7 +8,7 @@ from reflex.components.component import ComponentNamespace
|
|
|
8
8
|
from reflex.components.core.debounce import DebounceInput
|
|
9
9
|
from reflex.components.el.elements.forms import Form as HTMLForm
|
|
10
10
|
from reflex.components.radix.themes.components.text_field import TextFieldRoot
|
|
11
|
-
from reflex.event import EventHandler,
|
|
11
|
+
from reflex.event import EventHandler, no_args_event_spec
|
|
12
12
|
from reflex.vars.base import Var
|
|
13
13
|
|
|
14
14
|
from .base import RadixPrimitiveComponentWithClassName
|
|
@@ -28,7 +28,7 @@ class FormRoot(FormComponent, HTMLForm):
|
|
|
28
28
|
alias = "RadixFormRoot"
|
|
29
29
|
|
|
30
30
|
# Fired when the errors are cleared.
|
|
31
|
-
on_clear_server_errors: EventHandler[
|
|
31
|
+
on_clear_server_errors: EventHandler[no_args_event_spec]
|
|
32
32
|
|
|
33
33
|
def add_style(self) -> dict[str, Any] | None:
|
|
34
34
|
"""Add style to the component.
|