reflex 0.4.9a2__py3-none-any.whl → 0.5.0a1__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/apps/blank/code/blank.py +19 -16
- reflex/.templates/apps/demo/code/pages/datatable.py +4 -4
- reflex/.templates/apps/demo/code/pages/forms.py +2 -2
- reflex/.templates/web/utils/helpers/debounce.js +17 -0
- reflex/.templates/web/utils/helpers/throttle.js +22 -0
- reflex/.templates/web/utils/state.js +21 -3
- reflex/__init__.py +6 -1
- reflex/__init__.pyi +4 -1
- reflex/app.py +157 -140
- reflex/app_module_for_backend.py +1 -1
- reflex/base.py +13 -15
- reflex/compiler/compiler.py +10 -1
- reflex/compiler/utils.py +3 -30
- reflex/components/__init__.py +1 -0
- reflex/components/chakra/datadisplay/list.py +1 -3
- reflex/components/chakra/datadisplay/list.pyi +3 -3
- reflex/components/chakra/disclosure/accordion.py +1 -1
- reflex/components/chakra/forms/pininput.pyi +1 -1
- reflex/components/chakra/media/icon.py +2 -2
- reflex/components/component.py +279 -32
- reflex/components/core/__init__.py +2 -2
- reflex/components/core/cond.py +1 -10
- reflex/components/core/debounce.py +5 -2
- reflex/components/core/debounce.pyi +4 -2
- reflex/components/core/foreach.py +1 -16
- reflex/components/core/html.py +6 -0
- reflex/components/core/match.py +2 -17
- reflex/components/core/upload.py +42 -1
- reflex/components/core/upload.pyi +199 -1
- reflex/components/datadisplay/code.py +7 -3
- reflex/components/datadisplay/code.pyi +3 -1
- reflex/components/el/elements/forms.py +1 -1
- reflex/components/el/elements/forms.pyi +1 -1
- reflex/components/lucide/icon.py +5 -13
- reflex/components/lucide/icon.pyi +0 -1
- reflex/components/markdown/markdown.py +5 -23
- reflex/components/markdown/markdown.pyi +1 -4
- reflex/components/radix/primitives/accordion.py +227 -406
- reflex/components/radix/primitives/accordion.pyi +369 -28
- reflex/components/radix/primitives/form.py +33 -29
- reflex/components/radix/primitives/form.pyi +7 -2
- reflex/components/radix/primitives/progress.py +17 -9
- reflex/components/radix/primitives/progress.pyi +2 -0
- reflex/components/radix/primitives/slider.py +30 -18
- reflex/components/radix/primitives/slider.pyi +4 -0
- reflex/components/radix/themes/base.py +8 -1
- reflex/components/radix/themes/base.pyi +79 -1
- reflex/components/radix/themes/color_mode.py +74 -30
- reflex/components/radix/themes/color_mode.pyi +26 -185
- reflex/components/radix/themes/components/__init__.py +17 -0
- reflex/components/radix/themes/components/badge.py +2 -1
- reflex/components/radix/themes/components/badge.pyi +3 -1
- reflex/components/radix/themes/components/button.py +3 -1
- reflex/components/radix/themes/components/button.pyi +4 -1
- reflex/components/radix/themes/components/checkbox_cards.py +48 -0
- reflex/components/radix/themes/components/checkbox_cards.pyi +264 -0
- reflex/components/radix/themes/components/checkbox_group.py +42 -0
- reflex/components/radix/themes/components/checkbox_group.pyi +253 -0
- reflex/components/radix/themes/components/data_list.py +63 -0
- reflex/components/radix/themes/components/data_list.pyi +426 -0
- reflex/components/radix/themes/components/icon_button.py +20 -17
- reflex/components/radix/themes/components/icon_button.pyi +5 -1
- reflex/components/radix/themes/components/progress.py +55 -0
- reflex/components/radix/themes/components/progress.pyi +180 -0
- reflex/components/radix/themes/components/radio.py +31 -0
- reflex/components/radix/themes/components/radio.pyi +169 -0
- reflex/components/radix/themes/components/radio_cards.py +48 -0
- reflex/components/radix/themes/components/radio_cards.pyi +264 -0
- reflex/components/radix/themes/components/radio_group.py +2 -4
- reflex/components/radix/themes/components/segmented_control.py +48 -0
- reflex/components/radix/themes/components/segmented_control.pyi +262 -0
- reflex/components/radix/themes/components/skeleton.py +32 -0
- reflex/components/radix/themes/components/skeleton.pyi +106 -0
- reflex/components/radix/themes/components/spinner.py +26 -0
- reflex/components/radix/themes/components/spinner.pyi +101 -0
- reflex/components/radix/themes/components/tabs.py +26 -1
- reflex/components/radix/themes/components/tabs.pyi +69 -9
- reflex/components/radix/themes/components/text_field.py +101 -71
- reflex/components/radix/themes/components/text_field.pyi +81 -499
- reflex/components/radix/themes/layout/base.py +2 -2
- reflex/components/radix/themes/layout/base.pyi +4 -4
- reflex/components/radix/themes/layout/center.py +8 -3
- reflex/components/radix/themes/layout/center.pyi +2 -1
- reflex/components/radix/themes/layout/container.py +30 -2
- reflex/components/radix/themes/layout/container.pyi +9 -30
- reflex/components/radix/themes/layout/list.py +10 -5
- reflex/components/radix/themes/layout/list.pyi +5 -21
- reflex/components/radix/themes/layout/spacer.py +8 -3
- reflex/components/radix/themes/layout/spacer.pyi +2 -1
- reflex/components/radix/themes/layout/stack.py +7 -1
- reflex/components/radix/themes/layout/stack.pyi +3 -3
- reflex/components/radix/themes/typography/link.py +10 -2
- reflex/components/radix/themes/typography/link.pyi +5 -4
- reflex/components/sonner/__init__.py +3 -0
- reflex/components/sonner/toast.py +267 -0
- reflex/components/sonner/toast.pyi +205 -0
- reflex/components/tags/iter_tag.py +9 -6
- reflex/config.py +30 -54
- reflex/constants/__init__.py +0 -2
- reflex/constants/base.py +0 -5
- reflex/constants/colors.py +2 -0
- reflex/constants/installer.py +5 -1
- reflex/constants/route.py +4 -0
- reflex/custom_components/custom_components.py +22 -1
- reflex/event.py +75 -30
- reflex/experimental/__init__.py +5 -0
- reflex/experimental/layout.py +24 -6
- reflex/model.py +2 -1
- reflex/page.py +7 -4
- reflex/reflex.py +8 -3
- reflex/route.py +39 -0
- reflex/state.py +128 -131
- reflex/style.py +20 -1
- reflex/testing.py +10 -6
- reflex/utils/console.py +3 -1
- reflex/utils/exec.py +20 -7
- reflex/utils/format.py +1 -1
- reflex/utils/imports.py +3 -1
- reflex/utils/prerequisites.py +141 -20
- reflex/utils/processes.py +21 -1
- reflex/utils/pyi_generator.py +95 -5
- reflex/utils/serializers.py +1 -1
- reflex/utils/telemetry.py +26 -4
- reflex/utils/types.py +62 -18
- reflex/vars.py +11 -5
- {reflex-0.4.9a2.dist-info → reflex-0.5.0a1.dist-info}/METADATA +16 -4
- {reflex-0.4.9a2.dist-info → reflex-0.5.0a1.dist-info}/RECORD +130 -108
- {reflex-0.4.9a2.dist-info → reflex-0.5.0a1.dist-info}/WHEEL +1 -1
- reflex/app.pyi +0 -149
- {reflex-0.4.9a2.dist-info → reflex-0.5.0a1.dist-info}/LICENSE +0 -0
- {reflex-0.4.9a2.dist-info → reflex-0.5.0a1.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
"""Stub file for reflex/components/radix/themes/components/checkbox_cards.py"""
|
|
2
|
+
# ------------------- DO NOT EDIT ----------------------
|
|
3
|
+
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
4
|
+
# ------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
from typing import Any, Dict, Literal, Optional, Union, overload
|
|
7
|
+
from reflex.vars import Var, BaseVar, ComputedVar
|
|
8
|
+
from reflex.event import EventChain, EventHandler, EventSpec
|
|
9
|
+
from reflex.style import Style
|
|
10
|
+
from types import SimpleNamespace
|
|
11
|
+
from typing import Literal, Union
|
|
12
|
+
from reflex.vars import Var
|
|
13
|
+
from ..base import LiteralAccentColor, RadixThemesComponent
|
|
14
|
+
|
|
15
|
+
class CheckboxCardsRoot(RadixThemesComponent):
|
|
16
|
+
@overload
|
|
17
|
+
@classmethod
|
|
18
|
+
def create( # type: ignore
|
|
19
|
+
cls,
|
|
20
|
+
*children,
|
|
21
|
+
size: Optional[
|
|
22
|
+
Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
|
|
23
|
+
] = None,
|
|
24
|
+
variant: Optional[
|
|
25
|
+
Union[Var[Literal["classic", "surface"]], Literal["classic", "surface"]]
|
|
26
|
+
] = None,
|
|
27
|
+
color_scheme: Optional[
|
|
28
|
+
Union[
|
|
29
|
+
Var[
|
|
30
|
+
Literal[
|
|
31
|
+
"tomato",
|
|
32
|
+
"red",
|
|
33
|
+
"ruby",
|
|
34
|
+
"crimson",
|
|
35
|
+
"pink",
|
|
36
|
+
"plum",
|
|
37
|
+
"purple",
|
|
38
|
+
"violet",
|
|
39
|
+
"iris",
|
|
40
|
+
"indigo",
|
|
41
|
+
"blue",
|
|
42
|
+
"cyan",
|
|
43
|
+
"teal",
|
|
44
|
+
"jade",
|
|
45
|
+
"green",
|
|
46
|
+
"grass",
|
|
47
|
+
"brown",
|
|
48
|
+
"orange",
|
|
49
|
+
"sky",
|
|
50
|
+
"mint",
|
|
51
|
+
"lime",
|
|
52
|
+
"yellow",
|
|
53
|
+
"amber",
|
|
54
|
+
"gold",
|
|
55
|
+
"bronze",
|
|
56
|
+
"gray",
|
|
57
|
+
]
|
|
58
|
+
],
|
|
59
|
+
Literal[
|
|
60
|
+
"tomato",
|
|
61
|
+
"red",
|
|
62
|
+
"ruby",
|
|
63
|
+
"crimson",
|
|
64
|
+
"pink",
|
|
65
|
+
"plum",
|
|
66
|
+
"purple",
|
|
67
|
+
"violet",
|
|
68
|
+
"iris",
|
|
69
|
+
"indigo",
|
|
70
|
+
"blue",
|
|
71
|
+
"cyan",
|
|
72
|
+
"teal",
|
|
73
|
+
"jade",
|
|
74
|
+
"green",
|
|
75
|
+
"grass",
|
|
76
|
+
"brown",
|
|
77
|
+
"orange",
|
|
78
|
+
"sky",
|
|
79
|
+
"mint",
|
|
80
|
+
"lime",
|
|
81
|
+
"yellow",
|
|
82
|
+
"amber",
|
|
83
|
+
"gold",
|
|
84
|
+
"bronze",
|
|
85
|
+
"gray",
|
|
86
|
+
],
|
|
87
|
+
]
|
|
88
|
+
] = None,
|
|
89
|
+
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
|
90
|
+
columns: Optional[
|
|
91
|
+
Union[
|
|
92
|
+
Var[Union[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]]],
|
|
93
|
+
Union[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
94
|
+
]
|
|
95
|
+
] = None,
|
|
96
|
+
gap: Optional[
|
|
97
|
+
Union[
|
|
98
|
+
Var[Union[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]]],
|
|
99
|
+
Union[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
100
|
+
]
|
|
101
|
+
] = None,
|
|
102
|
+
style: Optional[Style] = None,
|
|
103
|
+
key: Optional[Any] = None,
|
|
104
|
+
id: Optional[Any] = None,
|
|
105
|
+
class_name: Optional[Any] = None,
|
|
106
|
+
autofocus: Optional[bool] = None,
|
|
107
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
108
|
+
on_blur: Optional[
|
|
109
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
110
|
+
] = None,
|
|
111
|
+
on_click: Optional[
|
|
112
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
113
|
+
] = None,
|
|
114
|
+
on_context_menu: Optional[
|
|
115
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
116
|
+
] = None,
|
|
117
|
+
on_double_click: Optional[
|
|
118
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
119
|
+
] = None,
|
|
120
|
+
on_focus: Optional[
|
|
121
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
122
|
+
] = None,
|
|
123
|
+
on_mount: Optional[
|
|
124
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
125
|
+
] = None,
|
|
126
|
+
on_mouse_down: Optional[
|
|
127
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
128
|
+
] = None,
|
|
129
|
+
on_mouse_enter: Optional[
|
|
130
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
131
|
+
] = None,
|
|
132
|
+
on_mouse_leave: Optional[
|
|
133
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
134
|
+
] = None,
|
|
135
|
+
on_mouse_move: Optional[
|
|
136
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
137
|
+
] = None,
|
|
138
|
+
on_mouse_out: Optional[
|
|
139
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
140
|
+
] = None,
|
|
141
|
+
on_mouse_over: Optional[
|
|
142
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
143
|
+
] = None,
|
|
144
|
+
on_mouse_up: Optional[
|
|
145
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
146
|
+
] = None,
|
|
147
|
+
on_scroll: Optional[
|
|
148
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
149
|
+
] = None,
|
|
150
|
+
on_unmount: Optional[
|
|
151
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
152
|
+
] = None,
|
|
153
|
+
**props
|
|
154
|
+
) -> "CheckboxCardsRoot":
|
|
155
|
+
"""Create a new component instance.
|
|
156
|
+
|
|
157
|
+
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
158
|
+
other UI libraries for common names, like Text and Button.
|
|
159
|
+
|
|
160
|
+
Args:
|
|
161
|
+
*children: Child components.
|
|
162
|
+
size: The size of the checkbox cards: "1" | "2" | "3"
|
|
163
|
+
variant: Variant of button: "classic" | "surface" | "soft"
|
|
164
|
+
color_scheme: Override theme color for button
|
|
165
|
+
high_contrast: Uses a higher contrast color for the component.
|
|
166
|
+
columns: The number of columns:
|
|
167
|
+
gap: The gap between the checkbox cards:
|
|
168
|
+
style: The style of the component.
|
|
169
|
+
key: A unique key for the component.
|
|
170
|
+
id: The id for the component.
|
|
171
|
+
class_name: The class name for the component.
|
|
172
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
173
|
+
custom_attrs: custom attribute
|
|
174
|
+
**props: Component properties.
|
|
175
|
+
|
|
176
|
+
Returns:
|
|
177
|
+
A new component instance.
|
|
178
|
+
"""
|
|
179
|
+
...
|
|
180
|
+
|
|
181
|
+
class CheckboxCardsItem(RadixThemesComponent):
|
|
182
|
+
@overload
|
|
183
|
+
@classmethod
|
|
184
|
+
def create( # type: ignore
|
|
185
|
+
cls,
|
|
186
|
+
*children,
|
|
187
|
+
style: Optional[Style] = None,
|
|
188
|
+
key: Optional[Any] = None,
|
|
189
|
+
id: Optional[Any] = None,
|
|
190
|
+
class_name: Optional[Any] = None,
|
|
191
|
+
autofocus: Optional[bool] = None,
|
|
192
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
193
|
+
on_blur: Optional[
|
|
194
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
195
|
+
] = None,
|
|
196
|
+
on_click: Optional[
|
|
197
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
198
|
+
] = None,
|
|
199
|
+
on_context_menu: Optional[
|
|
200
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
201
|
+
] = None,
|
|
202
|
+
on_double_click: Optional[
|
|
203
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
204
|
+
] = None,
|
|
205
|
+
on_focus: Optional[
|
|
206
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
207
|
+
] = None,
|
|
208
|
+
on_mount: Optional[
|
|
209
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
210
|
+
] = None,
|
|
211
|
+
on_mouse_down: Optional[
|
|
212
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
213
|
+
] = None,
|
|
214
|
+
on_mouse_enter: Optional[
|
|
215
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
216
|
+
] = None,
|
|
217
|
+
on_mouse_leave: Optional[
|
|
218
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
219
|
+
] = None,
|
|
220
|
+
on_mouse_move: Optional[
|
|
221
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
222
|
+
] = None,
|
|
223
|
+
on_mouse_out: Optional[
|
|
224
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
225
|
+
] = None,
|
|
226
|
+
on_mouse_over: Optional[
|
|
227
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
228
|
+
] = None,
|
|
229
|
+
on_mouse_up: Optional[
|
|
230
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
231
|
+
] = None,
|
|
232
|
+
on_scroll: Optional[
|
|
233
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
234
|
+
] = None,
|
|
235
|
+
on_unmount: Optional[
|
|
236
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
237
|
+
] = None,
|
|
238
|
+
**props
|
|
239
|
+
) -> "CheckboxCardsItem":
|
|
240
|
+
"""Create a new component instance.
|
|
241
|
+
|
|
242
|
+
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
243
|
+
other UI libraries for common names, like Text and Button.
|
|
244
|
+
|
|
245
|
+
Args:
|
|
246
|
+
*children: Child components.
|
|
247
|
+
style: The style of the component.
|
|
248
|
+
key: A unique key for the component.
|
|
249
|
+
id: The id for the component.
|
|
250
|
+
class_name: The class name for the component.
|
|
251
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
252
|
+
custom_attrs: custom attribute
|
|
253
|
+
**props: Component properties.
|
|
254
|
+
|
|
255
|
+
Returns:
|
|
256
|
+
A new component instance.
|
|
257
|
+
"""
|
|
258
|
+
...
|
|
259
|
+
|
|
260
|
+
class CheckboxCards(SimpleNamespace):
|
|
261
|
+
root = staticmethod(CheckboxCardsRoot.create)
|
|
262
|
+
item = staticmethod(CheckboxCardsItem.create)
|
|
263
|
+
|
|
264
|
+
checkbox_cards = CheckboxCards()
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""Components for the CheckboxGroup component of Radix Themes."""
|
|
2
|
+
|
|
3
|
+
from types import SimpleNamespace
|
|
4
|
+
from typing import Literal
|
|
5
|
+
|
|
6
|
+
from reflex.vars import Var
|
|
7
|
+
|
|
8
|
+
from ..base import LiteralAccentColor, RadixThemesComponent
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CheckboxGroupRoot(RadixThemesComponent):
|
|
12
|
+
"""Root element for a CheckboxGroup component."""
|
|
13
|
+
|
|
14
|
+
tag = "CheckboxGroup"
|
|
15
|
+
|
|
16
|
+
#
|
|
17
|
+
size: Var[Literal["1", "2", "3"]]
|
|
18
|
+
|
|
19
|
+
# Variant of button: "classic" | "surface" | "soft"
|
|
20
|
+
variant: Var[Literal["classic", "surface", "soft"]]
|
|
21
|
+
|
|
22
|
+
# Override theme color for button
|
|
23
|
+
color_scheme: Var[LiteralAccentColor]
|
|
24
|
+
|
|
25
|
+
# Uses a higher contrast color for the component.
|
|
26
|
+
high_contrast: Var[bool]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class CheckboxGroupItem(RadixThemesComponent):
|
|
30
|
+
"""An item in the CheckboxGroup component."""
|
|
31
|
+
|
|
32
|
+
tag = "CheckboxGroup.Item"
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class CheckboxGroup(SimpleNamespace):
|
|
36
|
+
"""CheckboxGroup components namespace."""
|
|
37
|
+
|
|
38
|
+
root = staticmethod(CheckboxGroupRoot.create)
|
|
39
|
+
item = staticmethod(CheckboxGroupItem.create)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
checkbox_group = CheckboxGroup()
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
"""Stub file for reflex/components/radix/themes/components/checkbox_group.py"""
|
|
2
|
+
# ------------------- DO NOT EDIT ----------------------
|
|
3
|
+
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
4
|
+
# ------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
from typing import Any, Dict, Literal, Optional, Union, overload
|
|
7
|
+
from reflex.vars import Var, BaseVar, ComputedVar
|
|
8
|
+
from reflex.event import EventChain, EventHandler, EventSpec
|
|
9
|
+
from reflex.style import Style
|
|
10
|
+
from types import SimpleNamespace
|
|
11
|
+
from typing import Literal
|
|
12
|
+
from reflex.vars import Var
|
|
13
|
+
from ..base import LiteralAccentColor, RadixThemesComponent
|
|
14
|
+
|
|
15
|
+
class CheckboxGroupRoot(RadixThemesComponent):
|
|
16
|
+
@overload
|
|
17
|
+
@classmethod
|
|
18
|
+
def create( # type: ignore
|
|
19
|
+
cls,
|
|
20
|
+
*children,
|
|
21
|
+
size: Optional[
|
|
22
|
+
Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
|
|
23
|
+
] = None,
|
|
24
|
+
variant: Optional[
|
|
25
|
+
Union[
|
|
26
|
+
Var[Literal["classic", "surface", "soft"]],
|
|
27
|
+
Literal["classic", "surface", "soft"],
|
|
28
|
+
]
|
|
29
|
+
] = None,
|
|
30
|
+
color_scheme: Optional[
|
|
31
|
+
Union[
|
|
32
|
+
Var[
|
|
33
|
+
Literal[
|
|
34
|
+
"tomato",
|
|
35
|
+
"red",
|
|
36
|
+
"ruby",
|
|
37
|
+
"crimson",
|
|
38
|
+
"pink",
|
|
39
|
+
"plum",
|
|
40
|
+
"purple",
|
|
41
|
+
"violet",
|
|
42
|
+
"iris",
|
|
43
|
+
"indigo",
|
|
44
|
+
"blue",
|
|
45
|
+
"cyan",
|
|
46
|
+
"teal",
|
|
47
|
+
"jade",
|
|
48
|
+
"green",
|
|
49
|
+
"grass",
|
|
50
|
+
"brown",
|
|
51
|
+
"orange",
|
|
52
|
+
"sky",
|
|
53
|
+
"mint",
|
|
54
|
+
"lime",
|
|
55
|
+
"yellow",
|
|
56
|
+
"amber",
|
|
57
|
+
"gold",
|
|
58
|
+
"bronze",
|
|
59
|
+
"gray",
|
|
60
|
+
]
|
|
61
|
+
],
|
|
62
|
+
Literal[
|
|
63
|
+
"tomato",
|
|
64
|
+
"red",
|
|
65
|
+
"ruby",
|
|
66
|
+
"crimson",
|
|
67
|
+
"pink",
|
|
68
|
+
"plum",
|
|
69
|
+
"purple",
|
|
70
|
+
"violet",
|
|
71
|
+
"iris",
|
|
72
|
+
"indigo",
|
|
73
|
+
"blue",
|
|
74
|
+
"cyan",
|
|
75
|
+
"teal",
|
|
76
|
+
"jade",
|
|
77
|
+
"green",
|
|
78
|
+
"grass",
|
|
79
|
+
"brown",
|
|
80
|
+
"orange",
|
|
81
|
+
"sky",
|
|
82
|
+
"mint",
|
|
83
|
+
"lime",
|
|
84
|
+
"yellow",
|
|
85
|
+
"amber",
|
|
86
|
+
"gold",
|
|
87
|
+
"bronze",
|
|
88
|
+
"gray",
|
|
89
|
+
],
|
|
90
|
+
]
|
|
91
|
+
] = None,
|
|
92
|
+
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
|
93
|
+
style: Optional[Style] = None,
|
|
94
|
+
key: Optional[Any] = None,
|
|
95
|
+
id: Optional[Any] = None,
|
|
96
|
+
class_name: Optional[Any] = None,
|
|
97
|
+
autofocus: Optional[bool] = None,
|
|
98
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
99
|
+
on_blur: Optional[
|
|
100
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
101
|
+
] = None,
|
|
102
|
+
on_click: Optional[
|
|
103
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
104
|
+
] = None,
|
|
105
|
+
on_context_menu: Optional[
|
|
106
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
107
|
+
] = None,
|
|
108
|
+
on_double_click: Optional[
|
|
109
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
110
|
+
] = None,
|
|
111
|
+
on_focus: Optional[
|
|
112
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
113
|
+
] = None,
|
|
114
|
+
on_mount: Optional[
|
|
115
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
116
|
+
] = None,
|
|
117
|
+
on_mouse_down: Optional[
|
|
118
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
119
|
+
] = None,
|
|
120
|
+
on_mouse_enter: Optional[
|
|
121
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
122
|
+
] = None,
|
|
123
|
+
on_mouse_leave: Optional[
|
|
124
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
125
|
+
] = None,
|
|
126
|
+
on_mouse_move: Optional[
|
|
127
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
128
|
+
] = None,
|
|
129
|
+
on_mouse_out: Optional[
|
|
130
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
131
|
+
] = None,
|
|
132
|
+
on_mouse_over: Optional[
|
|
133
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
134
|
+
] = None,
|
|
135
|
+
on_mouse_up: Optional[
|
|
136
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
137
|
+
] = None,
|
|
138
|
+
on_scroll: Optional[
|
|
139
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
140
|
+
] = None,
|
|
141
|
+
on_unmount: Optional[
|
|
142
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
143
|
+
] = None,
|
|
144
|
+
**props
|
|
145
|
+
) -> "CheckboxGroupRoot":
|
|
146
|
+
"""Create a new component instance.
|
|
147
|
+
|
|
148
|
+
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
149
|
+
other UI libraries for common names, like Text and Button.
|
|
150
|
+
|
|
151
|
+
Args:
|
|
152
|
+
*children: Child components.
|
|
153
|
+
size:
|
|
154
|
+
variant: Variant of button: "classic" | "surface" | "soft"
|
|
155
|
+
color_scheme: Override theme color for button
|
|
156
|
+
high_contrast: Uses a higher contrast color for the component.
|
|
157
|
+
style: The style of the component.
|
|
158
|
+
key: A unique key for the component.
|
|
159
|
+
id: The id for the component.
|
|
160
|
+
class_name: The class name for the component.
|
|
161
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
162
|
+
custom_attrs: custom attribute
|
|
163
|
+
**props: Component properties.
|
|
164
|
+
|
|
165
|
+
Returns:
|
|
166
|
+
A new component instance.
|
|
167
|
+
"""
|
|
168
|
+
...
|
|
169
|
+
|
|
170
|
+
class CheckboxGroupItem(RadixThemesComponent):
|
|
171
|
+
@overload
|
|
172
|
+
@classmethod
|
|
173
|
+
def create( # type: ignore
|
|
174
|
+
cls,
|
|
175
|
+
*children,
|
|
176
|
+
style: Optional[Style] = None,
|
|
177
|
+
key: Optional[Any] = None,
|
|
178
|
+
id: Optional[Any] = None,
|
|
179
|
+
class_name: Optional[Any] = None,
|
|
180
|
+
autofocus: Optional[bool] = None,
|
|
181
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
182
|
+
on_blur: Optional[
|
|
183
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
184
|
+
] = None,
|
|
185
|
+
on_click: Optional[
|
|
186
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
187
|
+
] = None,
|
|
188
|
+
on_context_menu: Optional[
|
|
189
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
190
|
+
] = None,
|
|
191
|
+
on_double_click: Optional[
|
|
192
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
193
|
+
] = None,
|
|
194
|
+
on_focus: Optional[
|
|
195
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
196
|
+
] = None,
|
|
197
|
+
on_mount: Optional[
|
|
198
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
199
|
+
] = None,
|
|
200
|
+
on_mouse_down: Optional[
|
|
201
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
202
|
+
] = None,
|
|
203
|
+
on_mouse_enter: Optional[
|
|
204
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
205
|
+
] = None,
|
|
206
|
+
on_mouse_leave: Optional[
|
|
207
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
208
|
+
] = None,
|
|
209
|
+
on_mouse_move: Optional[
|
|
210
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
211
|
+
] = None,
|
|
212
|
+
on_mouse_out: Optional[
|
|
213
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
214
|
+
] = None,
|
|
215
|
+
on_mouse_over: Optional[
|
|
216
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
217
|
+
] = None,
|
|
218
|
+
on_mouse_up: Optional[
|
|
219
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
220
|
+
] = None,
|
|
221
|
+
on_scroll: Optional[
|
|
222
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
223
|
+
] = None,
|
|
224
|
+
on_unmount: Optional[
|
|
225
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
226
|
+
] = None,
|
|
227
|
+
**props
|
|
228
|
+
) -> "CheckboxGroupItem":
|
|
229
|
+
"""Create a new component instance.
|
|
230
|
+
|
|
231
|
+
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
232
|
+
other UI libraries for common names, like Text and Button.
|
|
233
|
+
|
|
234
|
+
Args:
|
|
235
|
+
*children: Child components.
|
|
236
|
+
style: The style of the component.
|
|
237
|
+
key: A unique key for the component.
|
|
238
|
+
id: The id for the component.
|
|
239
|
+
class_name: The class name for the component.
|
|
240
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
241
|
+
custom_attrs: custom attribute
|
|
242
|
+
**props: Component properties.
|
|
243
|
+
|
|
244
|
+
Returns:
|
|
245
|
+
A new component instance.
|
|
246
|
+
"""
|
|
247
|
+
...
|
|
248
|
+
|
|
249
|
+
class CheckboxGroup(SimpleNamespace):
|
|
250
|
+
root = staticmethod(CheckboxGroupRoot.create)
|
|
251
|
+
item = staticmethod(CheckboxGroupItem.create)
|
|
252
|
+
|
|
253
|
+
checkbox_group = CheckboxGroup()
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""Components for the DataList component of Radix Themes."""
|
|
2
|
+
|
|
3
|
+
from types import SimpleNamespace
|
|
4
|
+
from typing import Literal
|
|
5
|
+
|
|
6
|
+
from reflex.vars import Var
|
|
7
|
+
|
|
8
|
+
from ..base import LiteralAccentColor, RadixThemesComponent
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class DataListRoot(RadixThemesComponent):
|
|
12
|
+
"""Root element for a DataList component."""
|
|
13
|
+
|
|
14
|
+
tag = "DataList.Root"
|
|
15
|
+
|
|
16
|
+
# The orientation of the data list item: "horizontal" | "vertical"
|
|
17
|
+
orientation: Var[Literal["horizontal", "vertical"]]
|
|
18
|
+
|
|
19
|
+
# The size of the data list item: "1" | "2" | "3"
|
|
20
|
+
size: Var[Literal["1", "2", "3"]]
|
|
21
|
+
|
|
22
|
+
# Trims the leading whitespace from the start or end of the text.
|
|
23
|
+
trim: Var[Literal["normal", "start", "end", "both"]]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class DataListItem(RadixThemesComponent):
|
|
27
|
+
"""An item in the DataList component."""
|
|
28
|
+
|
|
29
|
+
tag = "DataList.Item"
|
|
30
|
+
|
|
31
|
+
align: Var[Literal["start", "center", "end", "baseline", "stretch"]]
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class DataListLabel(RadixThemesComponent):
|
|
35
|
+
"""A label in the DataList component."""
|
|
36
|
+
|
|
37
|
+
tag = "DataList.Label"
|
|
38
|
+
|
|
39
|
+
width: Var[str]
|
|
40
|
+
|
|
41
|
+
min_width: Var[str]
|
|
42
|
+
|
|
43
|
+
max_width: Var[str]
|
|
44
|
+
|
|
45
|
+
color_scheme: Var[LiteralAccentColor]
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class DataListValue(RadixThemesComponent):
|
|
49
|
+
"""A value in the DataList component."""
|
|
50
|
+
|
|
51
|
+
tag = "DataList.Value"
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class DataList(SimpleNamespace):
|
|
55
|
+
"""DataList components namespace."""
|
|
56
|
+
|
|
57
|
+
root = staticmethod(DataListRoot.create)
|
|
58
|
+
item = staticmethod(DataListItem.create)
|
|
59
|
+
label = staticmethod(DataListLabel.create)
|
|
60
|
+
value = staticmethod(DataListValue.create)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
data_list = DataList()
|