reflex 0.5.9.dev1__py3-none-any.whl → 0.5.10a1__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/web/utils/client_side_routing.js +6 -1
- 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/prerequisites.py +16 -115
- reflex/utils/registry.py +48 -0
- reflex/utils/types.py +1 -1
- reflex/vars.py +4 -2
- {reflex-0.5.9.dev1.dist-info → reflex-0.5.10a1.dist-info}/METADATA +2 -1
- {reflex-0.5.9.dev1.dist-info → reflex-0.5.10a1.dist-info}/RECORD +26 -168
- 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.9.dev1.dist-info → reflex-0.5.10a1.dist-info}/LICENSE +0 -0
- {reflex-0.5.9.dev1.dist-info → reflex-0.5.10a1.dist-info}/WHEEL +0 -0
- {reflex-0.5.9.dev1.dist-info → reflex-0.5.10a1.dist-info}/entry_points.txt +0 -0
reflex/components/chakra/base.py
DELETED
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
"""Components that are based on Chakra-UI."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from functools import lru_cache
|
|
6
|
-
from typing import List, Literal
|
|
7
|
-
|
|
8
|
-
from reflex.components.component import Component
|
|
9
|
-
from reflex.utils.imports import ImportDict, ImportVar
|
|
10
|
-
from reflex.vars import Var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class ChakraComponent(Component):
|
|
14
|
-
"""A component that wraps a Chakra component."""
|
|
15
|
-
|
|
16
|
-
library: str = "@chakra-ui/react@2.6.1" # type: ignore
|
|
17
|
-
lib_dependencies: List[str] = [
|
|
18
|
-
"@chakra-ui/system@2.5.7",
|
|
19
|
-
"framer-motion@10.16.4",
|
|
20
|
-
]
|
|
21
|
-
|
|
22
|
-
@staticmethod
|
|
23
|
-
@lru_cache(maxsize=None)
|
|
24
|
-
def _get_app_wrap_components() -> dict[tuple[int, str], Component]:
|
|
25
|
-
return {
|
|
26
|
-
(60, "ChakraProvider"): chakra_provider,
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
def _get_style(self) -> dict:
|
|
30
|
-
"""Get the style for the component.
|
|
31
|
-
|
|
32
|
-
Returns:
|
|
33
|
-
The dictionary of the component style as value and the style notation as key.
|
|
34
|
-
"""
|
|
35
|
-
return {"sx": self.style}
|
|
36
|
-
|
|
37
|
-
@classmethod
|
|
38
|
-
@lru_cache(maxsize=None)
|
|
39
|
-
def _get_dependencies_imports(cls) -> ImportDict:
|
|
40
|
-
"""Get the imports from lib_dependencies for installing.
|
|
41
|
-
|
|
42
|
-
Returns:
|
|
43
|
-
The dependencies imports of the component.
|
|
44
|
-
"""
|
|
45
|
-
return {
|
|
46
|
-
dep: [ImportVar(tag=None, render=False)]
|
|
47
|
-
for dep in [
|
|
48
|
-
"@chakra-ui/system@2.5.7",
|
|
49
|
-
"framer-motion@10.16.4",
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
class ChakraProvider(ChakraComponent):
|
|
55
|
-
"""Top level Chakra provider must be included in any app using chakra components."""
|
|
56
|
-
|
|
57
|
-
tag = "ChakraProvider"
|
|
58
|
-
|
|
59
|
-
theme: Var[str]
|
|
60
|
-
|
|
61
|
-
@classmethod
|
|
62
|
-
def create(cls) -> Component:
|
|
63
|
-
"""Create a new ChakraProvider component.
|
|
64
|
-
|
|
65
|
-
Returns:
|
|
66
|
-
A new ChakraProvider component.
|
|
67
|
-
"""
|
|
68
|
-
return super().create(
|
|
69
|
-
theme=Var.create(
|
|
70
|
-
"extendTheme(theme)", _var_is_local=False, _var_is_string=False
|
|
71
|
-
),
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
def add_imports(self) -> ImportDict:
|
|
75
|
-
"""Add imports for the ChakraProvider component.
|
|
76
|
-
|
|
77
|
-
Returns:
|
|
78
|
-
The import dict for the component.
|
|
79
|
-
"""
|
|
80
|
-
return {
|
|
81
|
-
self.library: ImportVar(tag="extendTheme", is_default=False),
|
|
82
|
-
"/utils/theme.js": ImportVar(tag="theme", is_default=True),
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
@staticmethod
|
|
86
|
-
@lru_cache(maxsize=None)
|
|
87
|
-
def _get_app_wrap_components() -> dict[tuple[int, str], Component]:
|
|
88
|
-
return {
|
|
89
|
-
(50, "ChakraColorModeProvider"): chakra_color_mode_provider,
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
chakra_provider = ChakraProvider.create()
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
class ChakraColorModeProvider(Component):
|
|
97
|
-
"""Next-themes integration for chakra colorModeProvider."""
|
|
98
|
-
|
|
99
|
-
library = "/components/reflex/chakra_color_mode_provider.js"
|
|
100
|
-
tag = "ChakraColorModeProvider"
|
|
101
|
-
is_default = True
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
chakra_color_mode_provider = ChakraColorModeProvider.create()
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
LiteralColorScheme = Literal[
|
|
108
|
-
"none",
|
|
109
|
-
"gray",
|
|
110
|
-
"red",
|
|
111
|
-
"orange",
|
|
112
|
-
"yellow",
|
|
113
|
-
"green",
|
|
114
|
-
"teal",
|
|
115
|
-
"blue",
|
|
116
|
-
"cyan",
|
|
117
|
-
"purple",
|
|
118
|
-
"pink",
|
|
119
|
-
"whiteAlpha",
|
|
120
|
-
"blackAlpha",
|
|
121
|
-
"linkedin",
|
|
122
|
-
"facebook",
|
|
123
|
-
"messenger",
|
|
124
|
-
"whatsapp",
|
|
125
|
-
"twitter",
|
|
126
|
-
"telegram",
|
|
127
|
-
]
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
LiteralVariant = Literal["solid", "subtle", "outline"]
|
|
131
|
-
LiteralDividerVariant = Literal["solid", "dashed"]
|
|
132
|
-
LiteralTheme = Literal["light", "dark"]
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
LiteralTagColorScheme = Literal[
|
|
136
|
-
"gray",
|
|
137
|
-
"red",
|
|
138
|
-
"orange",
|
|
139
|
-
"yellow",
|
|
140
|
-
"green",
|
|
141
|
-
"teal",
|
|
142
|
-
"blue",
|
|
143
|
-
"cyan",
|
|
144
|
-
"purple",
|
|
145
|
-
"pink",
|
|
146
|
-
]
|
|
147
|
-
LiteralTagAlign = Literal["center", "end", "start"]
|
|
148
|
-
LiteralTabsVariant = Literal[
|
|
149
|
-
"line",
|
|
150
|
-
"enclosed",
|
|
151
|
-
"enclosed-colored",
|
|
152
|
-
"soft-rounded",
|
|
153
|
-
"solid-rounded",
|
|
154
|
-
"unstyled",
|
|
155
|
-
]
|
|
156
|
-
|
|
157
|
-
LiteralStatus = Literal["success", "info", "warning", "error"]
|
|
158
|
-
LiteralAlertVariant = Literal["subtle", "left-accent", "top-accent", "solid"]
|
|
159
|
-
LiteralButtonVariant = Literal["ghost", "outline", "solid", "link", "unstyled"]
|
|
160
|
-
LiteralSpinnerPlacement = Literal["start", "end"]
|
|
161
|
-
LiteralLanguage = Literal[
|
|
162
|
-
"en",
|
|
163
|
-
"da",
|
|
164
|
-
"de",
|
|
165
|
-
"es",
|
|
166
|
-
"fr",
|
|
167
|
-
"ja",
|
|
168
|
-
"ko",
|
|
169
|
-
"pt_br",
|
|
170
|
-
"ru",
|
|
171
|
-
"zh_cn",
|
|
172
|
-
"ro",
|
|
173
|
-
"pl",
|
|
174
|
-
"ckb",
|
|
175
|
-
"lv",
|
|
176
|
-
"se",
|
|
177
|
-
"ua",
|
|
178
|
-
"he",
|
|
179
|
-
"it",
|
|
180
|
-
]
|
|
181
|
-
LiteralInputVariant = Literal["outline", "filled", "flushed", "unstyled"]
|
|
182
|
-
LiteralInputNumberMode = [
|
|
183
|
-
"text",
|
|
184
|
-
"search",
|
|
185
|
-
"none",
|
|
186
|
-
"tel",
|
|
187
|
-
"url",
|
|
188
|
-
"email",
|
|
189
|
-
"numeric",
|
|
190
|
-
"decimal",
|
|
191
|
-
]
|
|
192
|
-
LiteralChakraDirection = Literal["ltr", "rtl"]
|
|
193
|
-
LiteralCardVariant = Literal["outline", "filled", "elevated", "unstyled"]
|
|
194
|
-
LiteralStackDirection = Literal["row", "column"]
|
|
195
|
-
LiteralImageLoading = Literal["eager", "lazy"]
|
|
196
|
-
LiteralTagSize = Literal["sm", "md", "lg"]
|
|
197
|
-
LiteralSpinnerSize = Literal[Literal[LiteralTagSize], "xs", "xl"]
|
|
198
|
-
LiteralAvatarSize = Literal[Literal[LiteralTagSize], "xl", "xs", "2xl", "full", "2xs"]
|
|
199
|
-
LiteralButtonSize = Literal["sm", "md", "lg", "xs"]
|
|
200
|
-
# Applies to AlertDialog and Modal
|
|
201
|
-
LiteralAlertDialogSize = Literal[
|
|
202
|
-
"sm", "md", "lg", "xs", "2xl", "full", "3xl", "4xl", "5xl", "6xl"
|
|
203
|
-
]
|
|
204
|
-
LiteralDrawerSize = Literal[Literal[LiteralSpinnerSize], "xl", "full"]
|
|
205
|
-
|
|
206
|
-
LiteralMenuStrategy = Literal["fixed", "absolute"]
|
|
207
|
-
LiteralMenuOption = Literal["checkbox", "radio"]
|
|
208
|
-
LiteralPopOverTrigger = Literal["click", "hover"]
|
|
209
|
-
|
|
210
|
-
LiteralHeadingSize = Literal["lg", "md", "sm", "xs", "xl", "2xl", "3xl", "4xl"]
|
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
"""Stub file for reflex/components/chakra/base.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, Literal, Optional, Union, overload
|
|
7
|
-
|
|
8
|
-
from reflex.components.component import Component
|
|
9
|
-
from reflex.event import EventHandler, EventSpec
|
|
10
|
-
from reflex.style import Style
|
|
11
|
-
from reflex.utils.imports import ImportDict
|
|
12
|
-
from reflex.vars import BaseVar, Var
|
|
13
|
-
|
|
14
|
-
class ChakraComponent(Component):
|
|
15
|
-
@overload
|
|
16
|
-
@classmethod
|
|
17
|
-
def create( # type: ignore
|
|
18
|
-
cls,
|
|
19
|
-
*children,
|
|
20
|
-
style: Optional[Style] = None,
|
|
21
|
-
key: Optional[Any] = None,
|
|
22
|
-
id: Optional[Any] = None,
|
|
23
|
-
class_name: Optional[Any] = None,
|
|
24
|
-
autofocus: Optional[bool] = None,
|
|
25
|
-
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
26
|
-
on_blur: Optional[
|
|
27
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
28
|
-
] = None,
|
|
29
|
-
on_click: Optional[
|
|
30
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
31
|
-
] = None,
|
|
32
|
-
on_context_menu: Optional[
|
|
33
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
34
|
-
] = None,
|
|
35
|
-
on_double_click: Optional[
|
|
36
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
37
|
-
] = None,
|
|
38
|
-
on_focus: Optional[
|
|
39
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
40
|
-
] = None,
|
|
41
|
-
on_mount: Optional[
|
|
42
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
43
|
-
] = None,
|
|
44
|
-
on_mouse_down: Optional[
|
|
45
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
46
|
-
] = None,
|
|
47
|
-
on_mouse_enter: Optional[
|
|
48
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
49
|
-
] = None,
|
|
50
|
-
on_mouse_leave: Optional[
|
|
51
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
52
|
-
] = None,
|
|
53
|
-
on_mouse_move: Optional[
|
|
54
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
55
|
-
] = None,
|
|
56
|
-
on_mouse_out: Optional[
|
|
57
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
58
|
-
] = None,
|
|
59
|
-
on_mouse_over: Optional[
|
|
60
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
61
|
-
] = None,
|
|
62
|
-
on_mouse_up: Optional[
|
|
63
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
64
|
-
] = None,
|
|
65
|
-
on_scroll: Optional[
|
|
66
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
67
|
-
] = None,
|
|
68
|
-
on_unmount: Optional[
|
|
69
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
70
|
-
] = None,
|
|
71
|
-
**props,
|
|
72
|
-
) -> "ChakraComponent":
|
|
73
|
-
"""Create the component.
|
|
74
|
-
|
|
75
|
-
Args:
|
|
76
|
-
*children: The children of the component.
|
|
77
|
-
style: The style of the component.
|
|
78
|
-
key: A unique key for the component.
|
|
79
|
-
id: The id for the component.
|
|
80
|
-
class_name: The class name for the component.
|
|
81
|
-
autofocus: Whether the component should take the focus once the page is loaded
|
|
82
|
-
custom_attrs: custom attribute
|
|
83
|
-
**props: The props of the component.
|
|
84
|
-
|
|
85
|
-
Returns:
|
|
86
|
-
The component.
|
|
87
|
-
"""
|
|
88
|
-
...
|
|
89
|
-
|
|
90
|
-
class ChakraProvider(ChakraComponent):
|
|
91
|
-
@overload
|
|
92
|
-
@classmethod
|
|
93
|
-
def create( # type: ignore
|
|
94
|
-
cls,
|
|
95
|
-
*children,
|
|
96
|
-
theme: Optional[Union[Var[str], str]] = None,
|
|
97
|
-
style: Optional[Style] = None,
|
|
98
|
-
key: Optional[Any] = None,
|
|
99
|
-
id: Optional[Any] = None,
|
|
100
|
-
class_name: Optional[Any] = None,
|
|
101
|
-
autofocus: Optional[bool] = None,
|
|
102
|
-
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
103
|
-
on_blur: Optional[
|
|
104
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
105
|
-
] = None,
|
|
106
|
-
on_click: Optional[
|
|
107
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
108
|
-
] = None,
|
|
109
|
-
on_context_menu: Optional[
|
|
110
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
111
|
-
] = None,
|
|
112
|
-
on_double_click: Optional[
|
|
113
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
114
|
-
] = None,
|
|
115
|
-
on_focus: Optional[
|
|
116
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
117
|
-
] = None,
|
|
118
|
-
on_mount: Optional[
|
|
119
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
120
|
-
] = None,
|
|
121
|
-
on_mouse_down: Optional[
|
|
122
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
123
|
-
] = None,
|
|
124
|
-
on_mouse_enter: Optional[
|
|
125
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
126
|
-
] = None,
|
|
127
|
-
on_mouse_leave: Optional[
|
|
128
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
129
|
-
] = None,
|
|
130
|
-
on_mouse_move: Optional[
|
|
131
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
132
|
-
] = None,
|
|
133
|
-
on_mouse_out: Optional[
|
|
134
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
135
|
-
] = None,
|
|
136
|
-
on_mouse_over: Optional[
|
|
137
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
138
|
-
] = None,
|
|
139
|
-
on_mouse_up: Optional[
|
|
140
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
141
|
-
] = None,
|
|
142
|
-
on_scroll: Optional[
|
|
143
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
144
|
-
] = None,
|
|
145
|
-
on_unmount: Optional[
|
|
146
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
147
|
-
] = None,
|
|
148
|
-
**props,
|
|
149
|
-
) -> "ChakraProvider":
|
|
150
|
-
"""Create a new ChakraProvider component.
|
|
151
|
-
|
|
152
|
-
Returns:
|
|
153
|
-
A new ChakraProvider component.
|
|
154
|
-
"""
|
|
155
|
-
...
|
|
156
|
-
|
|
157
|
-
def add_imports(self) -> ImportDict: ...
|
|
158
|
-
|
|
159
|
-
chakra_provider = ChakraProvider.create()
|
|
160
|
-
|
|
161
|
-
class ChakraColorModeProvider(Component):
|
|
162
|
-
@overload
|
|
163
|
-
@classmethod
|
|
164
|
-
def create( # type: ignore
|
|
165
|
-
cls,
|
|
166
|
-
*children,
|
|
167
|
-
style: Optional[Style] = None,
|
|
168
|
-
key: Optional[Any] = None,
|
|
169
|
-
id: Optional[Any] = None,
|
|
170
|
-
class_name: Optional[Any] = None,
|
|
171
|
-
autofocus: Optional[bool] = None,
|
|
172
|
-
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
173
|
-
on_blur: Optional[
|
|
174
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
175
|
-
] = None,
|
|
176
|
-
on_click: Optional[
|
|
177
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
178
|
-
] = None,
|
|
179
|
-
on_context_menu: Optional[
|
|
180
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
181
|
-
] = None,
|
|
182
|
-
on_double_click: Optional[
|
|
183
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
184
|
-
] = None,
|
|
185
|
-
on_focus: Optional[
|
|
186
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
187
|
-
] = None,
|
|
188
|
-
on_mount: Optional[
|
|
189
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
190
|
-
] = None,
|
|
191
|
-
on_mouse_down: Optional[
|
|
192
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
193
|
-
] = None,
|
|
194
|
-
on_mouse_enter: Optional[
|
|
195
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
196
|
-
] = None,
|
|
197
|
-
on_mouse_leave: Optional[
|
|
198
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
199
|
-
] = None,
|
|
200
|
-
on_mouse_move: Optional[
|
|
201
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
202
|
-
] = None,
|
|
203
|
-
on_mouse_out: Optional[
|
|
204
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
205
|
-
] = None,
|
|
206
|
-
on_mouse_over: Optional[
|
|
207
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
208
|
-
] = None,
|
|
209
|
-
on_mouse_up: Optional[
|
|
210
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
211
|
-
] = None,
|
|
212
|
-
on_scroll: Optional[
|
|
213
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
214
|
-
] = None,
|
|
215
|
-
on_unmount: Optional[
|
|
216
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
217
|
-
] = None,
|
|
218
|
-
**props,
|
|
219
|
-
) -> "ChakraColorModeProvider":
|
|
220
|
-
"""Create the component.
|
|
221
|
-
|
|
222
|
-
Args:
|
|
223
|
-
*children: The children of the component.
|
|
224
|
-
style: The style of the component.
|
|
225
|
-
key: A unique key for the component.
|
|
226
|
-
id: The id for the component.
|
|
227
|
-
class_name: The class name for the component.
|
|
228
|
-
autofocus: Whether the component should take the focus once the page is loaded
|
|
229
|
-
custom_attrs: custom attribute
|
|
230
|
-
**props: The props of the component.
|
|
231
|
-
|
|
232
|
-
Returns:
|
|
233
|
-
The component.
|
|
234
|
-
"""
|
|
235
|
-
...
|
|
236
|
-
|
|
237
|
-
chakra_color_mode_provider = ChakraColorModeProvider.create()
|
|
238
|
-
LiteralColorScheme = Literal[
|
|
239
|
-
"none",
|
|
240
|
-
"gray",
|
|
241
|
-
"red",
|
|
242
|
-
"orange",
|
|
243
|
-
"yellow",
|
|
244
|
-
"green",
|
|
245
|
-
"teal",
|
|
246
|
-
"blue",
|
|
247
|
-
"cyan",
|
|
248
|
-
"purple",
|
|
249
|
-
"pink",
|
|
250
|
-
"whiteAlpha",
|
|
251
|
-
"blackAlpha",
|
|
252
|
-
"linkedin",
|
|
253
|
-
"facebook",
|
|
254
|
-
"messenger",
|
|
255
|
-
"whatsapp",
|
|
256
|
-
"twitter",
|
|
257
|
-
"telegram",
|
|
258
|
-
]
|
|
259
|
-
LiteralVariant = Literal["solid", "subtle", "outline"]
|
|
260
|
-
LiteralDividerVariant = Literal["solid", "dashed"]
|
|
261
|
-
LiteralTheme = Literal["light", "dark"]
|
|
262
|
-
LiteralTagColorScheme = Literal[
|
|
263
|
-
"gray", "red", "orange", "yellow", "green", "teal", "blue", "cyan", "purple", "pink"
|
|
264
|
-
]
|
|
265
|
-
LiteralTagAlign = Literal["center", "end", "start"]
|
|
266
|
-
LiteralTabsVariant = Literal[
|
|
267
|
-
"line", "enclosed", "enclosed-colored", "soft-rounded", "solid-rounded", "unstyled"
|
|
268
|
-
]
|
|
269
|
-
LiteralStatus = Literal["success", "info", "warning", "error"]
|
|
270
|
-
LiteralAlertVariant = Literal["subtle", "left-accent", "top-accent", "solid"]
|
|
271
|
-
LiteralButtonVariant = Literal["ghost", "outline", "solid", "link", "unstyled"]
|
|
272
|
-
LiteralSpinnerPlacement = Literal["start", "end"]
|
|
273
|
-
LiteralLanguage = Literal[
|
|
274
|
-
"en",
|
|
275
|
-
"da",
|
|
276
|
-
"de",
|
|
277
|
-
"es",
|
|
278
|
-
"fr",
|
|
279
|
-
"ja",
|
|
280
|
-
"ko",
|
|
281
|
-
"pt_br",
|
|
282
|
-
"ru",
|
|
283
|
-
"zh_cn",
|
|
284
|
-
"ro",
|
|
285
|
-
"pl",
|
|
286
|
-
"ckb",
|
|
287
|
-
"lv",
|
|
288
|
-
"se",
|
|
289
|
-
"ua",
|
|
290
|
-
"he",
|
|
291
|
-
"it",
|
|
292
|
-
]
|
|
293
|
-
LiteralInputVariant = Literal["outline", "filled", "flushed", "unstyled"]
|
|
294
|
-
LiteralInputNumberMode = [
|
|
295
|
-
"text",
|
|
296
|
-
"search",
|
|
297
|
-
"none",
|
|
298
|
-
"tel",
|
|
299
|
-
"url",
|
|
300
|
-
"email",
|
|
301
|
-
"numeric",
|
|
302
|
-
"decimal",
|
|
303
|
-
]
|
|
304
|
-
LiteralChakraDirection = Literal["ltr", "rtl"]
|
|
305
|
-
LiteralCardVariant = Literal["outline", "filled", "elevated", "unstyled"]
|
|
306
|
-
LiteralStackDirection = Literal["row", "column"]
|
|
307
|
-
LiteralImageLoading = Literal["eager", "lazy"]
|
|
308
|
-
LiteralTagSize = Literal["sm", "md", "lg"]
|
|
309
|
-
LiteralSpinnerSize = Literal[Literal[LiteralTagSize], "xs", "xl"]
|
|
310
|
-
LiteralAvatarSize = Literal[Literal[LiteralTagSize], "xl", "xs", "2xl", "full", "2xs"]
|
|
311
|
-
LiteralButtonSize = Literal["sm", "md", "lg", "xs"]
|
|
312
|
-
LiteralAlertDialogSize = Literal[
|
|
313
|
-
"sm", "md", "lg", "xs", "2xl", "full", "3xl", "4xl", "5xl", "6xl"
|
|
314
|
-
]
|
|
315
|
-
LiteralDrawerSize = Literal[Literal[LiteralSpinnerSize], "xl", "full"]
|
|
316
|
-
LiteralMenuStrategy = Literal["fixed", "absolute"]
|
|
317
|
-
LiteralMenuOption = Literal["checkbox", "radio"]
|
|
318
|
-
LiteralPopOverTrigger = Literal["click", "hover"]
|
|
319
|
-
LiteralHeadingSize = Literal["lg", "md", "sm", "xs", "xl", "2xl", "3xl", "4xl"]
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"""Data display components."""
|
|
2
|
-
|
|
3
|
-
from .badge import Badge
|
|
4
|
-
from .code import Code
|
|
5
|
-
from .divider import Divider
|
|
6
|
-
from .keyboard_key import KeyboardKey as Kbd
|
|
7
|
-
from .list import List, ListItem, OrderedList, UnorderedList
|
|
8
|
-
from .stat import Stat, StatArrow, StatGroup, StatHelpText, StatLabel, StatNumber
|
|
9
|
-
from .table import Table, TableCaption, TableContainer, Tbody, Td, Tfoot, Th, Thead, Tr
|
|
10
|
-
from .tag import Tag, TagCloseButton, TagLabel, TagLeftIcon, TagRightIcon
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"""Badge component."""
|
|
2
|
-
|
|
3
|
-
from reflex.components.chakra import ChakraComponent, LiteralVariant
|
|
4
|
-
from reflex.vars import Var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class Badge(ChakraComponent):
|
|
8
|
-
"""A badge component."""
|
|
9
|
-
|
|
10
|
-
tag = "Badge"
|
|
11
|
-
|
|
12
|
-
# Variant of the badge ("solid" | "subtle" | "outline")
|
|
13
|
-
variant: Var[LiteralVariant]
|
|
14
|
-
|
|
15
|
-
# The color of the badge
|
|
16
|
-
color_scheme: Var[str]
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"""Stub file for reflex/components/chakra/datadisplay/badge.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, Literal, 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 Badge(ChakraComponent):
|
|
14
|
-
@overload
|
|
15
|
-
@classmethod
|
|
16
|
-
def create( # type: ignore
|
|
17
|
-
cls,
|
|
18
|
-
*children,
|
|
19
|
-
variant: Optional[
|
|
20
|
-
Union[
|
|
21
|
-
Var[Literal["solid", "subtle", "outline"]],
|
|
22
|
-
Literal["solid", "subtle", "outline"],
|
|
23
|
-
]
|
|
24
|
-
] = None,
|
|
25
|
-
color_scheme: Optional[Union[Var[str], str]] = None,
|
|
26
|
-
style: Optional[Style] = None,
|
|
27
|
-
key: Optional[Any] = None,
|
|
28
|
-
id: Optional[Any] = None,
|
|
29
|
-
class_name: Optional[Any] = None,
|
|
30
|
-
autofocus: Optional[bool] = None,
|
|
31
|
-
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
32
|
-
on_blur: Optional[
|
|
33
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
34
|
-
] = None,
|
|
35
|
-
on_click: Optional[
|
|
36
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
37
|
-
] = None,
|
|
38
|
-
on_context_menu: Optional[
|
|
39
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
40
|
-
] = None,
|
|
41
|
-
on_double_click: Optional[
|
|
42
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
43
|
-
] = None,
|
|
44
|
-
on_focus: Optional[
|
|
45
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
46
|
-
] = None,
|
|
47
|
-
on_mount: Optional[
|
|
48
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
49
|
-
] = None,
|
|
50
|
-
on_mouse_down: Optional[
|
|
51
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
52
|
-
] = None,
|
|
53
|
-
on_mouse_enter: Optional[
|
|
54
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
55
|
-
] = None,
|
|
56
|
-
on_mouse_leave: Optional[
|
|
57
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
58
|
-
] = None,
|
|
59
|
-
on_mouse_move: Optional[
|
|
60
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
61
|
-
] = None,
|
|
62
|
-
on_mouse_out: Optional[
|
|
63
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
64
|
-
] = None,
|
|
65
|
-
on_mouse_over: Optional[
|
|
66
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
67
|
-
] = None,
|
|
68
|
-
on_mouse_up: Optional[
|
|
69
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
70
|
-
] = None,
|
|
71
|
-
on_scroll: Optional[
|
|
72
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
73
|
-
] = None,
|
|
74
|
-
on_unmount: Optional[
|
|
75
|
-
Union[EventHandler, EventSpec, list, Callable, BaseVar]
|
|
76
|
-
] = None,
|
|
77
|
-
**props,
|
|
78
|
-
) -> "Badge":
|
|
79
|
-
"""Create the component.
|
|
80
|
-
|
|
81
|
-
Args:
|
|
82
|
-
*children: The children of the component.
|
|
83
|
-
variant: Variant of the badge ("solid" | "subtle" | "outline")
|
|
84
|
-
color_scheme: The color of the badge
|
|
85
|
-
style: The style of the component.
|
|
86
|
-
key: A unique key for the component.
|
|
87
|
-
id: The id for the component.
|
|
88
|
-
class_name: The class name for the component.
|
|
89
|
-
autofocus: Whether the component should take the focus once the page is loaded
|
|
90
|
-
custom_attrs: custom attribute
|
|
91
|
-
**props: The props of the component.
|
|
92
|
-
|
|
93
|
-
Returns:
|
|
94
|
-
The component.
|
|
95
|
-
"""
|
|
96
|
-
...
|