reflex 0.5.9a1__py3-none-any.whl → 0.5.10__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/__init__.py +21 -2
- reflex/__init__.pyi +0 -1
- reflex/app.py +1 -1
- reflex/components/__init__.py +0 -1
- reflex/components/__init__.pyi +0 -1
- reflex/components/markdown/markdown.py +1 -1
- reflex/components/recharts/cartesian.py +3 -0
- reflex/components/recharts/cartesian.pyi +2 -0
- reflex/components/sonner/toast.py +27 -1
- reflex/components/sonner/toast.pyi +5 -0
- reflex/constants/base.py +2 -0
- reflex/constants/installer.py +2 -0
- reflex/experimental/hooks.py +1 -1
- reflex/reflex.py +0 -15
- reflex/state.py +22 -22
- reflex/testing.py +8 -3
- reflex/utils/net.py +43 -0
- reflex/utils/prerequisites.py +27 -126
- reflex/utils/registry.py +48 -0
- reflex/utils/types.py +1 -1
- reflex/vars.py +4 -2
- {reflex-0.5.9a1.dist-info → reflex-0.5.10.dist-info}/METADATA +2 -1
- {reflex-0.5.9a1.dist-info → reflex-0.5.10.dist-info}/RECORD +26 -167
- reflex/components/chakra/__init__.py +0 -204
- reflex/components/chakra/base.py +0 -210
- reflex/components/chakra/base.pyi +0 -319
- reflex/components/chakra/datadisplay/__init__.py +0 -10
- reflex/components/chakra/datadisplay/badge.py +0 -16
- reflex/components/chakra/datadisplay/badge.pyi +0 -96
- reflex/components/chakra/datadisplay/code.py +0 -11
- reflex/components/chakra/datadisplay/code.pyi +0 -87
- reflex/components/chakra/datadisplay/divider.py +0 -20
- reflex/components/chakra/datadisplay/divider.pyi +0 -100
- reflex/components/chakra/datadisplay/keyboard_key.py +0 -9
- reflex/components/chakra/datadisplay/keyboard_key.pyi +0 -87
- reflex/components/chakra/datadisplay/list.py +0 -60
- reflex/components/chakra/datadisplay/list.pyi +0 -339
- reflex/components/chakra/datadisplay/stat.py +0 -80
- reflex/components/chakra/datadisplay/stat.pyi +0 -477
- reflex/components/chakra/datadisplay/table.py +0 -305
- reflex/components/chakra/datadisplay/table.pyi +0 -737
- reflex/components/chakra/datadisplay/tag.py +0 -85
- reflex/components/chakra/datadisplay/tag.pyi +0 -433
- reflex/components/chakra/disclosure/__init__.py +0 -14
- reflex/components/chakra/disclosure/accordion.py +0 -110
- reflex/components/chakra/disclosure/accordion.pyi +0 -411
- reflex/components/chakra/disclosure/tabs.py +0 -117
- reflex/components/chakra/disclosure/tabs.pyi +0 -496
- reflex/components/chakra/disclosure/transition.py +0 -73
- reflex/components/chakra/disclosure/transition.pyi +0 -509
- reflex/components/chakra/disclosure/visuallyhidden.py +0 -9
- reflex/components/chakra/disclosure/visuallyhidden.pyi +0 -87
- reflex/components/chakra/feedback/__init__.py +0 -7
- reflex/components/chakra/feedback/alert.py +0 -68
- reflex/components/chakra/feedback/alert.pyi +0 -335
- reflex/components/chakra/feedback/circularprogress.py +0 -68
- reflex/components/chakra/feedback/circularprogress.pyi +0 -185
- reflex/components/chakra/feedback/progress.py +0 -33
- reflex/components/chakra/feedback/progress.pyi +0 -101
- reflex/components/chakra/feedback/skeleton.py +0 -70
- reflex/components/chakra/feedback/skeleton.pyi +0 -271
- reflex/components/chakra/feedback/spinner.py +0 -25
- reflex/components/chakra/feedback/spinner.pyi +0 -102
- reflex/components/chakra/forms/__init__.py +0 -49
- reflex/components/chakra/forms/button.py +0 -83
- reflex/components/chakra/forms/button.pyi +0 -262
- reflex/components/chakra/forms/checkbox.py +0 -77
- reflex/components/chakra/forms/checkbox.pyi +0 -247
- reflex/components/chakra/forms/colormodeswitch.py +0 -104
- reflex/components/chakra/forms/colormodeswitch.pyi +0 -473
- reflex/components/chakra/forms/date_picker.py +0 -11
- reflex/components/chakra/forms/date_picker.pyi +0 -129
- reflex/components/chakra/forms/date_time_picker.py +0 -11
- reflex/components/chakra/forms/date_time_picker.pyi +0 -129
- reflex/components/chakra/forms/editable.py +0 -67
- reflex/components/chakra/forms/editable.pyi +0 -343
- reflex/components/chakra/forms/email.py +0 -11
- reflex/components/chakra/forms/email.pyi +0 -129
- reflex/components/chakra/forms/form.py +0 -103
- reflex/components/chakra/forms/form.pyi +0 -484
- reflex/components/chakra/forms/iconbutton.py +0 -38
- reflex/components/chakra/forms/iconbutton.pyi +0 -108
- reflex/components/chakra/forms/input.py +0 -130
- reflex/components/chakra/forms/input.pyi +0 -566
- reflex/components/chakra/forms/multiselect.py +0 -355
- reflex/components/chakra/forms/numberinput.py +0 -128
- reflex/components/chakra/forms/numberinput.pyi +0 -442
- reflex/components/chakra/forms/password.py +0 -11
- reflex/components/chakra/forms/password.pyi +0 -129
- reflex/components/chakra/forms/pininput.py +0 -201
- reflex/components/chakra/forms/pininput.pyi +0 -215
- reflex/components/chakra/forms/radio.py +0 -101
- reflex/components/chakra/forms/radio.pyi +0 -197
- reflex/components/chakra/forms/rangeslider.py +0 -149
- reflex/components/chakra/forms/rangeslider.pyi +0 -354
- reflex/components/chakra/forms/select.py +0 -103
- reflex/components/chakra/forms/select.pyi +0 -204
- reflex/components/chakra/forms/slider.py +0 -130
- reflex/components/chakra/forms/slider.pyi +0 -449
- reflex/components/chakra/forms/switch.py +0 -49
- reflex/components/chakra/forms/switch.pyi +0 -159
- reflex/components/chakra/forms/textarea.py +0 -79
- reflex/components/chakra/forms/textarea.pyi +0 -123
- reflex/components/chakra/forms/time_picker.py +0 -11
- reflex/components/chakra/forms/time_picker.pyi +0 -129
- reflex/components/chakra/layout/__init__.py +0 -14
- reflex/components/chakra/layout/aspect_ratio.py +0 -13
- reflex/components/chakra/layout/aspect_ratio.pyi +0 -89
- reflex/components/chakra/layout/box.py +0 -31
- reflex/components/chakra/layout/box.pyi +0 -93
- reflex/components/chakra/layout/card.py +0 -100
- reflex/components/chakra/layout/card.pyi +0 -379
- reflex/components/chakra/layout/center.py +0 -21
- reflex/components/chakra/layout/center.pyi +0 -239
- reflex/components/chakra/layout/container.py +0 -13
- reflex/components/chakra/layout/container.pyi +0 -89
- reflex/components/chakra/layout/flex.py +0 -33
- reflex/components/chakra/layout/flex.pyi +0 -101
- reflex/components/chakra/layout/grid.py +0 -125
- reflex/components/chakra/layout/grid.pyi +0 -293
- reflex/components/chakra/layout/spacer.py +0 -9
- reflex/components/chakra/layout/spacer.pyi +0 -87
- reflex/components/chakra/layout/stack.py +0 -48
- reflex/components/chakra/layout/stack.pyi +0 -305
- reflex/components/chakra/layout/wrap.py +0 -57
- reflex/components/chakra/layout/wrap.pyi +0 -179
- reflex/components/chakra/media/__init__.py +0 -7
- reflex/components/chakra/media/avatar.py +0 -58
- reflex/components/chakra/media/avatar.pyi +0 -267
- reflex/components/chakra/media/icon.py +0 -111
- reflex/components/chakra/media/icon.pyi +0 -171
- reflex/components/chakra/media/image.py +0 -74
- reflex/components/chakra/media/image.pyi +0 -118
- reflex/components/chakra/navigation/__init__.py +0 -18
- reflex/components/chakra/navigation/breadcrumb.py +0 -98
- reflex/components/chakra/navigation/breadcrumb.pyi +0 -351
- reflex/components/chakra/navigation/link.py +0 -62
- reflex/components/chakra/navigation/link.pyi +0 -105
- reflex/components/chakra/navigation/linkoverlay.py +0 -22
- reflex/components/chakra/navigation/linkoverlay.pyi +0 -167
- reflex/components/chakra/navigation/stepper.py +0 -113
- reflex/components/chakra/navigation/stepper.pyi +0 -762
- reflex/components/chakra/overlay/__init__.py +0 -50
- reflex/components/chakra/overlay/alertdialog.py +0 -153
- reflex/components/chakra/overlay/alertdialog.pyi +0 -612
- reflex/components/chakra/overlay/drawer.py +0 -168
- reflex/components/chakra/overlay/drawer.pyi +0 -652
- reflex/components/chakra/overlay/menu.py +0 -225
- reflex/components/chakra/overlay/menu.pyi +0 -708
- reflex/components/chakra/overlay/modal.py +0 -166
- reflex/components/chakra/overlay/modal.pyi +0 -600
- reflex/components/chakra/overlay/popover.py +0 -183
- reflex/components/chakra/overlay/popover.pyi +0 -757
- reflex/components/chakra/overlay/tooltip.py +0 -70
- reflex/components/chakra/overlay/tooltip.pyi +0 -129
- reflex/components/chakra/typography/__init__.py +0 -10
- reflex/components/chakra/typography/heading.py +0 -16
- reflex/components/chakra/typography/heading.pyi +0 -96
- reflex/components/chakra/typography/highlight.py +0 -23
- reflex/components/chakra/typography/highlight.pyi +0 -91
- reflex/components/chakra/typography/span.py +0 -15
- reflex/components/chakra/typography/span.pyi +0 -89
- reflex/components/chakra/typography/text.py +0 -18
- reflex/components/chakra/typography/text.pyi +0 -91
- reflex/components/media/__init__.py +0 -1
- reflex/components/media/icon.py +0 -3
- {reflex-0.5.9a1.dist-info → reflex-0.5.10.dist-info}/LICENSE +0 -0
- {reflex-0.5.9a1.dist-info → reflex-0.5.10.dist-info}/WHEEL +0 -0
- {reflex-0.5.9a1.dist-info → reflex-0.5.10.dist-info}/entry_points.txt +0 -0
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"""Stub file for reflex/components/chakra/navigation/link.py"""
|
|
2
|
-
|
|
3
|
-
# ------------------- DO NOT EDIT ----------------------
|
|
4
|
-
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
|
-
# ------------------------------------------------------
|
|
6
|
-
from typing import Any, Callable, Dict, Optional, Union, overload
|
|
7
|
-
|
|
8
|
-
from reflex.components.chakra import ChakraComponent
|
|
9
|
-
from reflex.components.next.link import NextLink
|
|
10
|
-
from reflex.event import EventHandler, EventSpec
|
|
11
|
-
from reflex.style import Style
|
|
12
|
-
from reflex.utils.imports import ImportDict
|
|
13
|
-
from reflex.vars import BaseVar, Var
|
|
14
|
-
|
|
15
|
-
next_link = NextLink.create()
|
|
16
|
-
|
|
17
|
-
class Link(ChakraComponent):
|
|
18
|
-
def add_imports(self) -> ImportDict: ...
|
|
19
|
-
@overload
|
|
20
|
-
@classmethod
|
|
21
|
-
def create( # type: ignore
|
|
22
|
-
cls,
|
|
23
|
-
*children,
|
|
24
|
-
rel: Optional[Union[Var[str], str]] = None,
|
|
25
|
-
href: Optional[Union[Var[str], str]] = None,
|
|
26
|
-
text: Optional[Union[Var[str], str]] = None,
|
|
27
|
-
as_: Optional[Union[Var[str], str]] = None,
|
|
28
|
-
is_external: Optional[Union[Var[bool], bool]] = None,
|
|
29
|
-
style: Optional[Style] = None,
|
|
30
|
-
key: Optional[Any] = None,
|
|
31
|
-
id: Optional[Any] = None,
|
|
32
|
-
class_name: Optional[Any] = None,
|
|
33
|
-
autofocus: Optional[bool] = None,
|
|
34
|
-
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
35
|
-
on_blur: Optional[
|
|
36
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
37
|
-
] = None,
|
|
38
|
-
on_click: Optional[
|
|
39
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
40
|
-
] = None,
|
|
41
|
-
on_context_menu: Optional[
|
|
42
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
43
|
-
] = None,
|
|
44
|
-
on_double_click: Optional[
|
|
45
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
46
|
-
] = None,
|
|
47
|
-
on_focus: Optional[
|
|
48
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
49
|
-
] = None,
|
|
50
|
-
on_mount: Optional[
|
|
51
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
52
|
-
] = None,
|
|
53
|
-
on_mouse_down: Optional[
|
|
54
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
55
|
-
] = None,
|
|
56
|
-
on_mouse_enter: Optional[
|
|
57
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
58
|
-
] = None,
|
|
59
|
-
on_mouse_leave: Optional[
|
|
60
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
61
|
-
] = None,
|
|
62
|
-
on_mouse_move: Optional[
|
|
63
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
64
|
-
] = None,
|
|
65
|
-
on_mouse_out: Optional[
|
|
66
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
67
|
-
] = None,
|
|
68
|
-
on_mouse_over: Optional[
|
|
69
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
70
|
-
] = None,
|
|
71
|
-
on_mouse_up: Optional[
|
|
72
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
73
|
-
] = None,
|
|
74
|
-
on_scroll: Optional[
|
|
75
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
76
|
-
] = None,
|
|
77
|
-
on_unmount: Optional[
|
|
78
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
79
|
-
] = None,
|
|
80
|
-
**props,
|
|
81
|
-
) -> "Link":
|
|
82
|
-
"""Create a Link component.
|
|
83
|
-
|
|
84
|
-
Args:
|
|
85
|
-
*children: The children of the component.
|
|
86
|
-
rel: The rel.
|
|
87
|
-
href: The page to link to.
|
|
88
|
-
text: The text to display.
|
|
89
|
-
as_: What the link renders to.
|
|
90
|
-
is_external: If true, the link will open in new tab.
|
|
91
|
-
style: The style of the component.
|
|
92
|
-
key: A unique key for the component.
|
|
93
|
-
id: The id for the component.
|
|
94
|
-
class_name: The class name for the component.
|
|
95
|
-
autofocus: Whether the component should take the focus once the page is loaded
|
|
96
|
-
custom_attrs: custom attribute
|
|
97
|
-
**props: The props of the component.
|
|
98
|
-
|
|
99
|
-
Raises:
|
|
100
|
-
ValueError: in case of missing children
|
|
101
|
-
|
|
102
|
-
Returns:
|
|
103
|
-
Component: The link component
|
|
104
|
-
"""
|
|
105
|
-
...
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"""Link overlay components."""
|
|
2
|
-
|
|
3
|
-
from reflex.components.chakra import ChakraComponent
|
|
4
|
-
from reflex.vars import Var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class LinkOverlay(ChakraComponent):
|
|
8
|
-
"""Wraps child component in a link."""
|
|
9
|
-
|
|
10
|
-
tag = "LinkOverlay"
|
|
11
|
-
|
|
12
|
-
# If true, the link will open in new tab
|
|
13
|
-
is_external: Var[bool]
|
|
14
|
-
|
|
15
|
-
# Href of the link overlay.
|
|
16
|
-
href: Var[str]
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class LinkBox(ChakraComponent):
|
|
20
|
-
"""The LinkBox lifts any nested links to the top using z-index to ensure proper keyboard navigation between links."""
|
|
21
|
-
|
|
22
|
-
tag = "LinkBox"
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
"""Stub file for reflex/components/chakra/navigation/linkoverlay.py"""
|
|
2
|
-
|
|
3
|
-
# ------------------- DO NOT EDIT ----------------------
|
|
4
|
-
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
|
-
# ------------------------------------------------------
|
|
6
|
-
from typing import Any, Callable, Dict, Optional, Union, overload
|
|
7
|
-
|
|
8
|
-
from reflex.components.chakra import ChakraComponent
|
|
9
|
-
from reflex.event import EventHandler, EventSpec
|
|
10
|
-
from reflex.style import Style
|
|
11
|
-
from reflex.vars import BaseVar, Var
|
|
12
|
-
|
|
13
|
-
class LinkOverlay(ChakraComponent):
|
|
14
|
-
@overload
|
|
15
|
-
@classmethod
|
|
16
|
-
def create( # type: ignore
|
|
17
|
-
cls,
|
|
18
|
-
*children,
|
|
19
|
-
is_external: Optional[Union[Var[bool], bool]] = None,
|
|
20
|
-
href: Optional[Union[Var[str], str]] = None,
|
|
21
|
-
style: Optional[Style] = None,
|
|
22
|
-
key: Optional[Any] = None,
|
|
23
|
-
id: Optional[Any] = None,
|
|
24
|
-
class_name: Optional[Any] = None,
|
|
25
|
-
autofocus: Optional[bool] = None,
|
|
26
|
-
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
27
|
-
on_blur: Optional[
|
|
28
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
29
|
-
] = None,
|
|
30
|
-
on_click: Optional[
|
|
31
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
32
|
-
] = None,
|
|
33
|
-
on_context_menu: Optional[
|
|
34
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
35
|
-
] = None,
|
|
36
|
-
on_double_click: Optional[
|
|
37
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
38
|
-
] = None,
|
|
39
|
-
on_focus: Optional[
|
|
40
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
41
|
-
] = None,
|
|
42
|
-
on_mount: Optional[
|
|
43
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
44
|
-
] = None,
|
|
45
|
-
on_mouse_down: Optional[
|
|
46
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
47
|
-
] = None,
|
|
48
|
-
on_mouse_enter: Optional[
|
|
49
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
50
|
-
] = None,
|
|
51
|
-
on_mouse_leave: Optional[
|
|
52
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
53
|
-
] = None,
|
|
54
|
-
on_mouse_move: Optional[
|
|
55
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
56
|
-
] = None,
|
|
57
|
-
on_mouse_out: Optional[
|
|
58
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
59
|
-
] = None,
|
|
60
|
-
on_mouse_over: Optional[
|
|
61
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
62
|
-
] = None,
|
|
63
|
-
on_mouse_up: Optional[
|
|
64
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
65
|
-
] = None,
|
|
66
|
-
on_scroll: Optional[
|
|
67
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
68
|
-
] = None,
|
|
69
|
-
on_unmount: Optional[
|
|
70
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
71
|
-
] = None,
|
|
72
|
-
**props,
|
|
73
|
-
) -> "LinkOverlay":
|
|
74
|
-
"""Create the component.
|
|
75
|
-
|
|
76
|
-
Args:
|
|
77
|
-
*children: The children of the component.
|
|
78
|
-
is_external: If true, the link will open in new tab
|
|
79
|
-
href: Href of the link overlay.
|
|
80
|
-
style: The style of the component.
|
|
81
|
-
key: A unique key for the component.
|
|
82
|
-
id: The id for the component.
|
|
83
|
-
class_name: The class name for the component.
|
|
84
|
-
autofocus: Whether the component should take the focus once the page is loaded
|
|
85
|
-
custom_attrs: custom attribute
|
|
86
|
-
**props: The props of the component.
|
|
87
|
-
|
|
88
|
-
Returns:
|
|
89
|
-
The component.
|
|
90
|
-
"""
|
|
91
|
-
...
|
|
92
|
-
|
|
93
|
-
class LinkBox(ChakraComponent):
|
|
94
|
-
@overload
|
|
95
|
-
@classmethod
|
|
96
|
-
def create( # type: ignore
|
|
97
|
-
cls,
|
|
98
|
-
*children,
|
|
99
|
-
style: Optional[Style] = None,
|
|
100
|
-
key: Optional[Any] = None,
|
|
101
|
-
id: Optional[Any] = None,
|
|
102
|
-
class_name: Optional[Any] = None,
|
|
103
|
-
autofocus: Optional[bool] = None,
|
|
104
|
-
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
105
|
-
on_blur: Optional[
|
|
106
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
107
|
-
] = None,
|
|
108
|
-
on_click: Optional[
|
|
109
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
110
|
-
] = None,
|
|
111
|
-
on_context_menu: Optional[
|
|
112
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
113
|
-
] = None,
|
|
114
|
-
on_double_click: Optional[
|
|
115
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
116
|
-
] = None,
|
|
117
|
-
on_focus: Optional[
|
|
118
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
119
|
-
] = None,
|
|
120
|
-
on_mount: Optional[
|
|
121
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
122
|
-
] = None,
|
|
123
|
-
on_mouse_down: Optional[
|
|
124
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
125
|
-
] = None,
|
|
126
|
-
on_mouse_enter: Optional[
|
|
127
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
128
|
-
] = None,
|
|
129
|
-
on_mouse_leave: Optional[
|
|
130
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
131
|
-
] = None,
|
|
132
|
-
on_mouse_move: Optional[
|
|
133
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
134
|
-
] = None,
|
|
135
|
-
on_mouse_out: Optional[
|
|
136
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
137
|
-
] = None,
|
|
138
|
-
on_mouse_over: Optional[
|
|
139
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
140
|
-
] = None,
|
|
141
|
-
on_mouse_up: Optional[
|
|
142
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
143
|
-
] = None,
|
|
144
|
-
on_scroll: Optional[
|
|
145
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
146
|
-
] = None,
|
|
147
|
-
on_unmount: Optional[
|
|
148
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
149
|
-
] = None,
|
|
150
|
-
**props,
|
|
151
|
-
) -> "LinkBox":
|
|
152
|
-
"""Create the component.
|
|
153
|
-
|
|
154
|
-
Args:
|
|
155
|
-
*children: The children of the component.
|
|
156
|
-
style: The style of the component.
|
|
157
|
-
key: A unique key for the component.
|
|
158
|
-
id: The id for the component.
|
|
159
|
-
class_name: The class name for the component.
|
|
160
|
-
autofocus: Whether the component should take the focus once the page is loaded
|
|
161
|
-
custom_attrs: custom attribute
|
|
162
|
-
**props: The props of the component.
|
|
163
|
-
|
|
164
|
-
Returns:
|
|
165
|
-
The component.
|
|
166
|
-
"""
|
|
167
|
-
...
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"""A component to indicate progress through a multi-step process."""
|
|
2
|
-
|
|
3
|
-
from typing import List, Literal, Optional, Tuple
|
|
4
|
-
|
|
5
|
-
from reflex.components.chakra import ChakraComponent, LiteralColorScheme
|
|
6
|
-
from reflex.components.component import Component
|
|
7
|
-
from reflex.vars import Var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class Stepper(ChakraComponent):
|
|
11
|
-
"""The parent container for a stepper."""
|
|
12
|
-
|
|
13
|
-
tag = "Stepper"
|
|
14
|
-
|
|
15
|
-
orientation: Var[Literal["vertical", "horizontal"]]
|
|
16
|
-
|
|
17
|
-
# The color scheme to use for the stepper; default is blue.
|
|
18
|
-
colorScheme: Var[LiteralColorScheme]
|
|
19
|
-
|
|
20
|
-
# Chakra provides a useSteps hook to control the stepper.
|
|
21
|
-
# Instead, use an integer state value to set progress in the stepper.
|
|
22
|
-
|
|
23
|
-
# The index of the current step.
|
|
24
|
-
index: Var[int]
|
|
25
|
-
|
|
26
|
-
# The size of the steps in the stepper.
|
|
27
|
-
size: Var[str]
|
|
28
|
-
|
|
29
|
-
@classmethod
|
|
30
|
-
def create(
|
|
31
|
-
cls, *children, items: Optional[List[Tuple]] = None, **props
|
|
32
|
-
) -> Component:
|
|
33
|
-
"""Create a Stepper component.
|
|
34
|
-
|
|
35
|
-
If the kw-args `items` is provided and is a list, they will be added as children.
|
|
36
|
-
|
|
37
|
-
Args:
|
|
38
|
-
*children: The children of the component.
|
|
39
|
-
items (list): The child components for each step.
|
|
40
|
-
**props: The properties of the component.
|
|
41
|
-
|
|
42
|
-
Returns:
|
|
43
|
-
The stepper component.
|
|
44
|
-
"""
|
|
45
|
-
if len(children) == 0:
|
|
46
|
-
children = []
|
|
47
|
-
for indicator, layout, separator in items or []:
|
|
48
|
-
children.append(
|
|
49
|
-
Step.create(
|
|
50
|
-
StepIndicator.create(indicator),
|
|
51
|
-
layout,
|
|
52
|
-
StepSeparator.create(separator),
|
|
53
|
-
)
|
|
54
|
-
)
|
|
55
|
-
return super().create(*children, **props)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
class Step(ChakraComponent):
|
|
59
|
-
"""A component for an individual step in the stepper."""
|
|
60
|
-
|
|
61
|
-
tag = "Step"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
class StepDescription(ChakraComponent):
|
|
65
|
-
"""The description text for a step component."""
|
|
66
|
-
|
|
67
|
-
tag = "StepDescription"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
class StepIcon(ChakraComponent):
|
|
71
|
-
"""The icon displayed in a step indicator component."""
|
|
72
|
-
|
|
73
|
-
tag = "StepIcon"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
class StepIndicator(ChakraComponent):
|
|
77
|
-
"""The component displaying the status of a step."""
|
|
78
|
-
|
|
79
|
-
tag = "StepIndicator"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
class StepNumber(ChakraComponent):
|
|
83
|
-
"""The number of a step displayed in a step indicator component."""
|
|
84
|
-
|
|
85
|
-
tag = "StepNumber"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
class StepSeparator(ChakraComponent):
|
|
89
|
-
"""The component separting steps."""
|
|
90
|
-
|
|
91
|
-
tag = "StepSeparator"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
class StepStatus(ChakraComponent):
|
|
95
|
-
"""A component that displays a number or icon based on the status of a step."""
|
|
96
|
-
|
|
97
|
-
# [not working yet]
|
|
98
|
-
# active, complete, and incomplete should also be able to accept StepIcon or StepNumber components
|
|
99
|
-
# currently, these props only support strings
|
|
100
|
-
|
|
101
|
-
active: Var[str]
|
|
102
|
-
|
|
103
|
-
complete: Var[str]
|
|
104
|
-
|
|
105
|
-
incomplete: Var[str]
|
|
106
|
-
|
|
107
|
-
tag = "StepStatus"
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
class StepTitle(ChakraComponent):
|
|
111
|
-
"""The title text for a step component."""
|
|
112
|
-
|
|
113
|
-
tag = "StepTitle"
|