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,168 +0,0 @@
|
|
|
1
|
-
"""Container to stack elements with spacing."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from reflex.components.chakra import (
|
|
6
|
-
ChakraComponent,
|
|
7
|
-
LiteralColorScheme,
|
|
8
|
-
LiteralDrawerSize,
|
|
9
|
-
)
|
|
10
|
-
from reflex.components.chakra.media.icon import Icon
|
|
11
|
-
from reflex.components.component import Component
|
|
12
|
-
from reflex.event import EventHandler
|
|
13
|
-
from reflex.vars import Var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class Drawer(ChakraComponent):
|
|
17
|
-
"""A drawer component."""
|
|
18
|
-
|
|
19
|
-
tag = "Drawer"
|
|
20
|
-
|
|
21
|
-
# If true, the modal will be open.
|
|
22
|
-
is_open: Var[bool]
|
|
23
|
-
|
|
24
|
-
# Handle zoom/pinch gestures on iOS devices when scroll locking is enabled. Defaults to false.
|
|
25
|
-
allow_pinch_zoom: Var[bool]
|
|
26
|
-
|
|
27
|
-
# If true, the modal will autofocus the first enabled and interactive element within the ModalContent
|
|
28
|
-
auto_focus: Var[bool]
|
|
29
|
-
|
|
30
|
-
# If true, scrolling will be disabled on the body when the modal opens.
|
|
31
|
-
block_scroll_on_mount: Var[bool]
|
|
32
|
-
|
|
33
|
-
# If true, the modal will close when the Esc key is pressed
|
|
34
|
-
close_on_esc: Var[bool]
|
|
35
|
-
|
|
36
|
-
# If true, the modal will close when the overlay is clicked
|
|
37
|
-
close_on_overlay_click: Var[bool]
|
|
38
|
-
|
|
39
|
-
# If true, the modal will be centered on screen.
|
|
40
|
-
is_centered: Var[bool]
|
|
41
|
-
|
|
42
|
-
# If true and drawer's placement is top or bottom, the drawer will occupy the viewport height (100vh)
|
|
43
|
-
is_full_height: Var[bool]
|
|
44
|
-
|
|
45
|
-
# Enables aggressive focus capturing within iframes. - If true: keep focus in the lock, no matter where lock is active - If false: allows focus to move outside of iframe
|
|
46
|
-
lock_focus_across_frames: Var[bool]
|
|
47
|
-
|
|
48
|
-
# The placement of the drawer
|
|
49
|
-
placement: Var[str]
|
|
50
|
-
|
|
51
|
-
# If true, a `padding-right` will be applied to the body element that's equal to the width of the scrollbar. This can help prevent some unpleasant flickering effect and content adjustment when the modal opens
|
|
52
|
-
preserve_scroll_bar_gap: Var[bool]
|
|
53
|
-
|
|
54
|
-
# If true, the modal will return focus to the element that triggered it when it closes.
|
|
55
|
-
return_focus_on_close: Var[bool]
|
|
56
|
-
|
|
57
|
-
# "xs" | "sm" | "md" | "lg" | "xl" | "full"
|
|
58
|
-
size: Var[LiteralDrawerSize]
|
|
59
|
-
|
|
60
|
-
# A11y: If true, the siblings of the modal will have `aria-hidden` set to true so that screen readers can only see the modal. This is commonly known as making the other elements **inert**
|
|
61
|
-
use_inert: Var[bool]
|
|
62
|
-
|
|
63
|
-
# Variant of drawer
|
|
64
|
-
variant: Var[str]
|
|
65
|
-
|
|
66
|
-
# Color scheme of the Drawer
|
|
67
|
-
# Options:
|
|
68
|
-
# "whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan"
|
|
69
|
-
# | "purple" | "pink" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"
|
|
70
|
-
color_scheme: Var[LiteralColorScheme]
|
|
71
|
-
|
|
72
|
-
# Fired when the modal is closing.
|
|
73
|
-
on_close: EventHandler[lambda: []]
|
|
74
|
-
|
|
75
|
-
# Fired when the modal is closed and the exit animation is complete.
|
|
76
|
-
on_close_complete: EventHandler[lambda: []]
|
|
77
|
-
|
|
78
|
-
# Fired when the Esc key is pressed.
|
|
79
|
-
on_esc: EventHandler[lambda: []]
|
|
80
|
-
|
|
81
|
-
# Fired when the overlay is clicked.
|
|
82
|
-
on_overlay_click: EventHandler[lambda: []]
|
|
83
|
-
|
|
84
|
-
@classmethod
|
|
85
|
-
def create(
|
|
86
|
-
cls, *children, header=None, body=None, footer=None, close_button=None, **props
|
|
87
|
-
) -> Component:
|
|
88
|
-
"""Create a drawer component.
|
|
89
|
-
|
|
90
|
-
Args:
|
|
91
|
-
*children: The children of the drawer component.
|
|
92
|
-
header: The header of the drawer.
|
|
93
|
-
body: The body of the drawer.
|
|
94
|
-
footer: The footer of the drawer.
|
|
95
|
-
close_button: The close button of the drawer.
|
|
96
|
-
**props: The properties of the drawer component.
|
|
97
|
-
|
|
98
|
-
Raises:
|
|
99
|
-
AttributeError: error that occurs if conflicting props are passed
|
|
100
|
-
|
|
101
|
-
Returns:
|
|
102
|
-
The drawer component.
|
|
103
|
-
"""
|
|
104
|
-
if len(children) == 0:
|
|
105
|
-
contents = []
|
|
106
|
-
|
|
107
|
-
if header:
|
|
108
|
-
contents.append(DrawerHeader.create(header))
|
|
109
|
-
|
|
110
|
-
if body:
|
|
111
|
-
contents.append(DrawerBody.create(body))
|
|
112
|
-
|
|
113
|
-
if footer:
|
|
114
|
-
contents.append(DrawerFooter.create(footer))
|
|
115
|
-
|
|
116
|
-
if props.get("on_close"):
|
|
117
|
-
# use default close button if undefined
|
|
118
|
-
if not close_button:
|
|
119
|
-
close_button = Icon.create(tag="close")
|
|
120
|
-
contents.append(DrawerCloseButton.create(close_button))
|
|
121
|
-
elif close_button:
|
|
122
|
-
raise AttributeError(
|
|
123
|
-
"Close button can not be used if on_close event handler is not defined"
|
|
124
|
-
)
|
|
125
|
-
|
|
126
|
-
children = [
|
|
127
|
-
DrawerOverlay.create(
|
|
128
|
-
DrawerContent.create(*contents),
|
|
129
|
-
)
|
|
130
|
-
]
|
|
131
|
-
|
|
132
|
-
return super().create(*children, **props)
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
class DrawerBody(ChakraComponent):
|
|
136
|
-
"""Drawer body."""
|
|
137
|
-
|
|
138
|
-
tag = "DrawerBody"
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
class DrawerHeader(ChakraComponent):
|
|
142
|
-
"""Drawer header."""
|
|
143
|
-
|
|
144
|
-
tag = "DrawerHeader"
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
class DrawerFooter(ChakraComponent):
|
|
148
|
-
"""Drawer footer."""
|
|
149
|
-
|
|
150
|
-
tag = "DrawerFooter"
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
class DrawerOverlay(ChakraComponent):
|
|
154
|
-
"""Drawer overlay."""
|
|
155
|
-
|
|
156
|
-
tag = "DrawerOverlay"
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
class DrawerContent(ChakraComponent):
|
|
160
|
-
"""Drawer content."""
|
|
161
|
-
|
|
162
|
-
tag = "DrawerContent"
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
class DrawerCloseButton(ChakraComponent):
|
|
166
|
-
"""Drawer close button."""
|
|
167
|
-
|
|
168
|
-
tag = "DrawerCloseButton"
|