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,87 +0,0 @@
|
|
|
1
|
-
"""Stub file for reflex/components/chakra/datadisplay/keyboard_key.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 KeyboardKey(ChakraComponent):
|
|
14
|
-
@overload
|
|
15
|
-
@classmethod
|
|
16
|
-
def create( # type: ignore
|
|
17
|
-
cls,
|
|
18
|
-
*children,
|
|
19
|
-
style: Optional[Style] = None,
|
|
20
|
-
key: Optional[Any] = None,
|
|
21
|
-
id: Optional[Any] = None,
|
|
22
|
-
class_name: Optional[Any] = None,
|
|
23
|
-
autofocus: Optional[bool] = None,
|
|
24
|
-
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
25
|
-
on_blur: Optional[
|
|
26
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
27
|
-
] = None,
|
|
28
|
-
on_click: Optional[
|
|
29
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
30
|
-
] = None,
|
|
31
|
-
on_context_menu: Optional[
|
|
32
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
33
|
-
] = None,
|
|
34
|
-
on_double_click: Optional[
|
|
35
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
36
|
-
] = None,
|
|
37
|
-
on_focus: Optional[
|
|
38
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
39
|
-
] = None,
|
|
40
|
-
on_mount: Optional[
|
|
41
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
42
|
-
] = None,
|
|
43
|
-
on_mouse_down: Optional[
|
|
44
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
45
|
-
] = None,
|
|
46
|
-
on_mouse_enter: Optional[
|
|
47
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
48
|
-
] = None,
|
|
49
|
-
on_mouse_leave: Optional[
|
|
50
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
51
|
-
] = None,
|
|
52
|
-
on_mouse_move: Optional[
|
|
53
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
54
|
-
] = None,
|
|
55
|
-
on_mouse_out: Optional[
|
|
56
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
57
|
-
] = None,
|
|
58
|
-
on_mouse_over: Optional[
|
|
59
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
60
|
-
] = None,
|
|
61
|
-
on_mouse_up: Optional[
|
|
62
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
63
|
-
] = None,
|
|
64
|
-
on_scroll: Optional[
|
|
65
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
66
|
-
] = None,
|
|
67
|
-
on_unmount: Optional[
|
|
68
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
69
|
-
] = None,
|
|
70
|
-
**props,
|
|
71
|
-
) -> "KeyboardKey":
|
|
72
|
-
"""Create the component.
|
|
73
|
-
|
|
74
|
-
Args:
|
|
75
|
-
*children: The children of the component.
|
|
76
|
-
style: The style of the component.
|
|
77
|
-
key: A unique key for the component.
|
|
78
|
-
id: The id for the component.
|
|
79
|
-
class_name: The class name for the component.
|
|
80
|
-
autofocus: Whether the component should take the focus once the page is loaded
|
|
81
|
-
custom_attrs: custom attribute
|
|
82
|
-
**props: The props of the component.
|
|
83
|
-
|
|
84
|
-
Returns:
|
|
85
|
-
The component.
|
|
86
|
-
"""
|
|
87
|
-
...
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"""List components."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from reflex.components.chakra import ChakraComponent
|
|
6
|
-
from reflex.components.component import Component
|
|
7
|
-
from reflex.components.core.foreach import Foreach
|
|
8
|
-
from reflex.vars import Var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class List(ChakraComponent):
|
|
12
|
-
"""Display a list of items."""
|
|
13
|
-
|
|
14
|
-
tag = "List"
|
|
15
|
-
|
|
16
|
-
# The space between each list item
|
|
17
|
-
spacing: Var[str]
|
|
18
|
-
|
|
19
|
-
# Shorthand prop for listStylePosition
|
|
20
|
-
style_position: Var[str]
|
|
21
|
-
|
|
22
|
-
# Shorthand prop for listStyleType
|
|
23
|
-
style_type: Var[str]
|
|
24
|
-
|
|
25
|
-
@classmethod
|
|
26
|
-
def create(cls, *children, items: Var[list] | None = None, **props) -> Component:
|
|
27
|
-
"""Create a list component.
|
|
28
|
-
|
|
29
|
-
Args:
|
|
30
|
-
*children: The children of the component.
|
|
31
|
-
items: A list of items to add to the list.
|
|
32
|
-
**props: The properties of the component.
|
|
33
|
-
|
|
34
|
-
Returns:
|
|
35
|
-
The list component.
|
|
36
|
-
"""
|
|
37
|
-
if len(children) == 0:
|
|
38
|
-
if isinstance(items, Var):
|
|
39
|
-
children = [Foreach.create(items, ListItem.create)]
|
|
40
|
-
else:
|
|
41
|
-
children = [ListItem.create(item) for item in items or []]
|
|
42
|
-
return super().create(*children, **props)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
class ListItem(ChakraComponent):
|
|
46
|
-
"""A single list item."""
|
|
47
|
-
|
|
48
|
-
tag = "ListItem"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
class OrderedList(List):
|
|
52
|
-
"""An ordered list component with numbers."""
|
|
53
|
-
|
|
54
|
-
tag = "OrderedList"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
class UnorderedList(List):
|
|
58
|
-
"""An unordered list component with bullets."""
|
|
59
|
-
|
|
60
|
-
tag = "UnorderedList"
|
|
@@ -1,339 +0,0 @@
|
|
|
1
|
-
"""Stub file for reflex/components/chakra/datadisplay/list.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 List(ChakraComponent):
|
|
14
|
-
@overload
|
|
15
|
-
@classmethod
|
|
16
|
-
def create( # type: ignore
|
|
17
|
-
cls,
|
|
18
|
-
*children,
|
|
19
|
-
items: Optional[Union[Var[list], list]] = None,
|
|
20
|
-
spacing: Optional[Union[Var[str], str]] = None,
|
|
21
|
-
style_position: Optional[Union[Var[str], str]] = None,
|
|
22
|
-
style_type: Optional[Union[Var[str], str]] = None,
|
|
23
|
-
style: Optional[Style] = None,
|
|
24
|
-
key: Optional[Any] = None,
|
|
25
|
-
id: Optional[Any] = None,
|
|
26
|
-
class_name: Optional[Any] = None,
|
|
27
|
-
autofocus: Optional[bool] = None,
|
|
28
|
-
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
29
|
-
on_blur: Optional[
|
|
30
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
31
|
-
] = None,
|
|
32
|
-
on_click: Optional[
|
|
33
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
34
|
-
] = None,
|
|
35
|
-
on_context_menu: Optional[
|
|
36
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
37
|
-
] = None,
|
|
38
|
-
on_double_click: Optional[
|
|
39
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
40
|
-
] = None,
|
|
41
|
-
on_focus: Optional[
|
|
42
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
43
|
-
] = None,
|
|
44
|
-
on_mount: Optional[
|
|
45
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
46
|
-
] = None,
|
|
47
|
-
on_mouse_down: Optional[
|
|
48
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
49
|
-
] = None,
|
|
50
|
-
on_mouse_enter: Optional[
|
|
51
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
52
|
-
] = None,
|
|
53
|
-
on_mouse_leave: Optional[
|
|
54
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
55
|
-
] = None,
|
|
56
|
-
on_mouse_move: Optional[
|
|
57
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
58
|
-
] = None,
|
|
59
|
-
on_mouse_out: Optional[
|
|
60
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
61
|
-
] = None,
|
|
62
|
-
on_mouse_over: Optional[
|
|
63
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
64
|
-
] = None,
|
|
65
|
-
on_mouse_up: Optional[
|
|
66
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
67
|
-
] = None,
|
|
68
|
-
on_scroll: Optional[
|
|
69
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
70
|
-
] = None,
|
|
71
|
-
on_unmount: Optional[
|
|
72
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
73
|
-
] = None,
|
|
74
|
-
**props,
|
|
75
|
-
) -> "List":
|
|
76
|
-
"""Create a list component.
|
|
77
|
-
|
|
78
|
-
Args:
|
|
79
|
-
*children: The children of the component.
|
|
80
|
-
items: A list of items to add to the list.
|
|
81
|
-
spacing: The space between each list item
|
|
82
|
-
style_position: Shorthand prop for listStylePosition
|
|
83
|
-
style_type: Shorthand prop for listStyleType
|
|
84
|
-
style: The style of the component.
|
|
85
|
-
key: A unique key for the component.
|
|
86
|
-
id: The id for the component.
|
|
87
|
-
class_name: The class name for the component.
|
|
88
|
-
autofocus: Whether the component should take the focus once the page is loaded
|
|
89
|
-
custom_attrs: custom attribute
|
|
90
|
-
**props: The properties of the component.
|
|
91
|
-
|
|
92
|
-
Returns:
|
|
93
|
-
The list component.
|
|
94
|
-
"""
|
|
95
|
-
...
|
|
96
|
-
|
|
97
|
-
class ListItem(ChakraComponent):
|
|
98
|
-
@overload
|
|
99
|
-
@classmethod
|
|
100
|
-
def create( # type: ignore
|
|
101
|
-
cls,
|
|
102
|
-
*children,
|
|
103
|
-
style: Optional[Style] = None,
|
|
104
|
-
key: Optional[Any] = None,
|
|
105
|
-
id: Optional[Any] = None,
|
|
106
|
-
class_name: Optional[Any] = None,
|
|
107
|
-
autofocus: Optional[bool] = None,
|
|
108
|
-
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
109
|
-
on_blur: Optional[
|
|
110
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
111
|
-
] = None,
|
|
112
|
-
on_click: Optional[
|
|
113
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
114
|
-
] = None,
|
|
115
|
-
on_context_menu: Optional[
|
|
116
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
117
|
-
] = None,
|
|
118
|
-
on_double_click: Optional[
|
|
119
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
120
|
-
] = None,
|
|
121
|
-
on_focus: Optional[
|
|
122
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
123
|
-
] = None,
|
|
124
|
-
on_mount: Optional[
|
|
125
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
126
|
-
] = None,
|
|
127
|
-
on_mouse_down: Optional[
|
|
128
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
129
|
-
] = None,
|
|
130
|
-
on_mouse_enter: Optional[
|
|
131
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
132
|
-
] = None,
|
|
133
|
-
on_mouse_leave: Optional[
|
|
134
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
135
|
-
] = None,
|
|
136
|
-
on_mouse_move: Optional[
|
|
137
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
138
|
-
] = None,
|
|
139
|
-
on_mouse_out: Optional[
|
|
140
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
141
|
-
] = None,
|
|
142
|
-
on_mouse_over: Optional[
|
|
143
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
144
|
-
] = None,
|
|
145
|
-
on_mouse_up: Optional[
|
|
146
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
147
|
-
] = None,
|
|
148
|
-
on_scroll: Optional[
|
|
149
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
150
|
-
] = None,
|
|
151
|
-
on_unmount: Optional[
|
|
152
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
153
|
-
] = None,
|
|
154
|
-
**props,
|
|
155
|
-
) -> "ListItem":
|
|
156
|
-
"""Create the component.
|
|
157
|
-
|
|
158
|
-
Args:
|
|
159
|
-
*children: The children of the component.
|
|
160
|
-
style: The style of the component.
|
|
161
|
-
key: A unique key for the component.
|
|
162
|
-
id: The id for the component.
|
|
163
|
-
class_name: The class name for the component.
|
|
164
|
-
autofocus: Whether the component should take the focus once the page is loaded
|
|
165
|
-
custom_attrs: custom attribute
|
|
166
|
-
**props: The props of the component.
|
|
167
|
-
|
|
168
|
-
Returns:
|
|
169
|
-
The component.
|
|
170
|
-
"""
|
|
171
|
-
...
|
|
172
|
-
|
|
173
|
-
class OrderedList(List):
|
|
174
|
-
@overload
|
|
175
|
-
@classmethod
|
|
176
|
-
def create( # type: ignore
|
|
177
|
-
cls,
|
|
178
|
-
*children,
|
|
179
|
-
items: Optional[Union[Var[list], list]] = None,
|
|
180
|
-
spacing: Optional[Union[Var[str], str]] = None,
|
|
181
|
-
style_position: Optional[Union[Var[str], str]] = None,
|
|
182
|
-
style_type: Optional[Union[Var[str], str]] = None,
|
|
183
|
-
style: Optional[Style] = None,
|
|
184
|
-
key: Optional[Any] = None,
|
|
185
|
-
id: Optional[Any] = None,
|
|
186
|
-
class_name: Optional[Any] = None,
|
|
187
|
-
autofocus: Optional[bool] = None,
|
|
188
|
-
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
189
|
-
on_blur: Optional[
|
|
190
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
191
|
-
] = None,
|
|
192
|
-
on_click: Optional[
|
|
193
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
194
|
-
] = None,
|
|
195
|
-
on_context_menu: Optional[
|
|
196
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
197
|
-
] = None,
|
|
198
|
-
on_double_click: Optional[
|
|
199
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
200
|
-
] = None,
|
|
201
|
-
on_focus: Optional[
|
|
202
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
203
|
-
] = None,
|
|
204
|
-
on_mount: Optional[
|
|
205
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
206
|
-
] = None,
|
|
207
|
-
on_mouse_down: Optional[
|
|
208
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
209
|
-
] = None,
|
|
210
|
-
on_mouse_enter: Optional[
|
|
211
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
212
|
-
] = None,
|
|
213
|
-
on_mouse_leave: Optional[
|
|
214
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
215
|
-
] = None,
|
|
216
|
-
on_mouse_move: Optional[
|
|
217
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
218
|
-
] = None,
|
|
219
|
-
on_mouse_out: Optional[
|
|
220
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
221
|
-
] = None,
|
|
222
|
-
on_mouse_over: Optional[
|
|
223
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
224
|
-
] = None,
|
|
225
|
-
on_mouse_up: Optional[
|
|
226
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
227
|
-
] = None,
|
|
228
|
-
on_scroll: Optional[
|
|
229
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
230
|
-
] = None,
|
|
231
|
-
on_unmount: Optional[
|
|
232
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
233
|
-
] = None,
|
|
234
|
-
**props,
|
|
235
|
-
) -> "OrderedList":
|
|
236
|
-
"""Create a list component.
|
|
237
|
-
|
|
238
|
-
Args:
|
|
239
|
-
*children: The children of the component.
|
|
240
|
-
items: A list of items to add to the list.
|
|
241
|
-
spacing: The space between each list item
|
|
242
|
-
style_position: Shorthand prop for listStylePosition
|
|
243
|
-
style_type: Shorthand prop for listStyleType
|
|
244
|
-
style: The style of the component.
|
|
245
|
-
key: A unique key for the component.
|
|
246
|
-
id: The id for the component.
|
|
247
|
-
class_name: The class name for the component.
|
|
248
|
-
autofocus: Whether the component should take the focus once the page is loaded
|
|
249
|
-
custom_attrs: custom attribute
|
|
250
|
-
**props: The properties of the component.
|
|
251
|
-
|
|
252
|
-
Returns:
|
|
253
|
-
The list component.
|
|
254
|
-
"""
|
|
255
|
-
...
|
|
256
|
-
|
|
257
|
-
class UnorderedList(List):
|
|
258
|
-
@overload
|
|
259
|
-
@classmethod
|
|
260
|
-
def create( # type: ignore
|
|
261
|
-
cls,
|
|
262
|
-
*children,
|
|
263
|
-
items: Optional[Union[Var[list], list]] = None,
|
|
264
|
-
spacing: Optional[Union[Var[str], str]] = None,
|
|
265
|
-
style_position: Optional[Union[Var[str], str]] = None,
|
|
266
|
-
style_type: Optional[Union[Var[str], str]] = None,
|
|
267
|
-
style: Optional[Style] = None,
|
|
268
|
-
key: Optional[Any] = None,
|
|
269
|
-
id: Optional[Any] = None,
|
|
270
|
-
class_name: Optional[Any] = None,
|
|
271
|
-
autofocus: Optional[bool] = None,
|
|
272
|
-
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
273
|
-
on_blur: Optional[
|
|
274
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
275
|
-
] = None,
|
|
276
|
-
on_click: Optional[
|
|
277
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
278
|
-
] = None,
|
|
279
|
-
on_context_menu: Optional[
|
|
280
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
281
|
-
] = None,
|
|
282
|
-
on_double_click: Optional[
|
|
283
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
284
|
-
] = None,
|
|
285
|
-
on_focus: Optional[
|
|
286
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
287
|
-
] = None,
|
|
288
|
-
on_mount: Optional[
|
|
289
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
290
|
-
] = None,
|
|
291
|
-
on_mouse_down: Optional[
|
|
292
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
293
|
-
] = None,
|
|
294
|
-
on_mouse_enter: Optional[
|
|
295
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
296
|
-
] = None,
|
|
297
|
-
on_mouse_leave: Optional[
|
|
298
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
299
|
-
] = None,
|
|
300
|
-
on_mouse_move: Optional[
|
|
301
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
302
|
-
] = None,
|
|
303
|
-
on_mouse_out: Optional[
|
|
304
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
305
|
-
] = None,
|
|
306
|
-
on_mouse_over: Optional[
|
|
307
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
308
|
-
] = None,
|
|
309
|
-
on_mouse_up: Optional[
|
|
310
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
311
|
-
] = None,
|
|
312
|
-
on_scroll: Optional[
|
|
313
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
314
|
-
] = None,
|
|
315
|
-
on_unmount: Optional[
|
|
316
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
317
|
-
] = None,
|
|
318
|
-
**props,
|
|
319
|
-
) -> "UnorderedList":
|
|
320
|
-
"""Create a list component.
|
|
321
|
-
|
|
322
|
-
Args:
|
|
323
|
-
*children: The children of the component.
|
|
324
|
-
items: A list of items to add to the list.
|
|
325
|
-
spacing: The space between each list item
|
|
326
|
-
style_position: Shorthand prop for listStylePosition
|
|
327
|
-
style_type: Shorthand prop for listStyleType
|
|
328
|
-
style: The style of the component.
|
|
329
|
-
key: A unique key for the component.
|
|
330
|
-
id: The id for the component.
|
|
331
|
-
class_name: The class name for the component.
|
|
332
|
-
autofocus: Whether the component should take the focus once the page is loaded
|
|
333
|
-
custom_attrs: custom attribute
|
|
334
|
-
**props: The properties of the component.
|
|
335
|
-
|
|
336
|
-
Returns:
|
|
337
|
-
The list component.
|
|
338
|
-
"""
|
|
339
|
-
...
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"""Statistics components."""
|
|
2
|
-
|
|
3
|
-
from reflex.components.chakra import ChakraComponent
|
|
4
|
-
from reflex.components.component import Component
|
|
5
|
-
from reflex.vars import Var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class Stat(ChakraComponent):
|
|
9
|
-
"""The Stat component is used to display some statistics. It can take in a label, a number and a help text."""
|
|
10
|
-
|
|
11
|
-
tag = "Stat"
|
|
12
|
-
|
|
13
|
-
@classmethod
|
|
14
|
-
def create(
|
|
15
|
-
cls, *children, label=None, number=0, help_text=None, arrow_type=None, **props
|
|
16
|
-
) -> Component:
|
|
17
|
-
"""Create a stat component.
|
|
18
|
-
|
|
19
|
-
Args:
|
|
20
|
-
*children: The children of the component.
|
|
21
|
-
label: A label for the stat component.
|
|
22
|
-
number: The value of the stat component.
|
|
23
|
-
help_text: A text added to the stat component.
|
|
24
|
-
arrow_type: The type of the arrow ("increase", "decrease", None)
|
|
25
|
-
**props: The properties of the component.
|
|
26
|
-
|
|
27
|
-
Returns:
|
|
28
|
-
The stat component.
|
|
29
|
-
"""
|
|
30
|
-
if len(children) == 0:
|
|
31
|
-
children = []
|
|
32
|
-
if label:
|
|
33
|
-
children.append(StatLabel.create(label))
|
|
34
|
-
|
|
35
|
-
children.append(StatNumber.create(number))
|
|
36
|
-
|
|
37
|
-
if help_text:
|
|
38
|
-
if arrow_type:
|
|
39
|
-
children.append(
|
|
40
|
-
StatHelpText.create(
|
|
41
|
-
help_text, StatArrow.create(type_=arrow_type)
|
|
42
|
-
)
|
|
43
|
-
)
|
|
44
|
-
else:
|
|
45
|
-
children.append(StatHelpText.create(help_text))
|
|
46
|
-
|
|
47
|
-
return super().create(*children, **props)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
class StatLabel(ChakraComponent):
|
|
51
|
-
"""A stat label component."""
|
|
52
|
-
|
|
53
|
-
tag = "StatLabel"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
class StatNumber(ChakraComponent):
|
|
57
|
-
"""The stat to display."""
|
|
58
|
-
|
|
59
|
-
tag = "StatNumber"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
class StatHelpText(ChakraComponent):
|
|
63
|
-
"""A helper text to display under the stat."""
|
|
64
|
-
|
|
65
|
-
tag = "StatHelpText"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
class StatArrow(ChakraComponent):
|
|
69
|
-
"""A stat arrow component indicating the direction of change."""
|
|
70
|
-
|
|
71
|
-
tag = "StatArrow"
|
|
72
|
-
|
|
73
|
-
# The type of arrow, either increase or decrease.
|
|
74
|
-
type_: Var[str]
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
class StatGroup(ChakraComponent):
|
|
78
|
-
"""A stat group component to evenly space out the stats."""
|
|
79
|
-
|
|
80
|
-
tag = "StatGroup"
|