reflex 0.7.0a5__py3-none-any.whl → 0.7.1__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/jinja/web/package.json.jinja2 +7 -1
- reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +3 -1
- reflex/__init__.py +1 -0
- reflex/__init__.pyi +1 -0
- reflex/app.py +268 -85
- reflex/base.py +4 -10
- reflex/compiler/compiler.py +46 -12
- reflex/compiler/templates.py +1 -2
- reflex/compiler/utils.py +23 -14
- reflex/components/base/bare.py +109 -16
- reflex/components/component.py +179 -124
- reflex/components/core/__init__.py +1 -0
- reflex/components/core/__init__.pyi +1 -0
- reflex/components/core/auto_scroll.py +114 -0
- reflex/components/core/auto_scroll.pyi +284 -0
- reflex/components/core/banner.py +40 -9
- reflex/components/core/banner.pyi +400 -87
- reflex/components/core/breakpoints.py +1 -1
- reflex/components/core/cond.py +0 -8
- reflex/components/core/foreach.py +12 -2
- reflex/components/core/html.pyi +200 -19
- reflex/components/core/match.py +4 -4
- reflex/components/core/sticky.pyi +874 -90
- reflex/components/core/upload.py +3 -5
- reflex/components/core/upload.pyi +2 -4
- reflex/components/datadisplay/code.py +36 -10
- reflex/components/datadisplay/code.pyi +1 -1
- reflex/components/datadisplay/dataeditor.py +1 -3
- reflex/components/datadisplay/dataeditor.pyi +1 -3
- reflex/components/el/elements/base.py +95 -17
- reflex/components/el/elements/base.pyi +278 -19
- reflex/components/el/elements/forms.py +124 -102
- reflex/components/el/elements/forms.pyi +2787 -365
- reflex/components/el/elements/inline.py +24 -15
- reflex/components/el/elements/inline.pyi +5655 -546
- reflex/components/el/elements/media.py +79 -95
- reflex/components/el/elements/media.pyi +5167 -565
- reflex/components/el/elements/metadata.py +19 -17
- reflex/components/el/elements/metadata.pyi +841 -89
- reflex/components/el/elements/other.py +3 -5
- reflex/components/el/elements/other.pyi +1404 -137
- reflex/components/el/elements/scripts.py +10 -13
- reflex/components/el/elements/scripts.pyi +634 -65
- reflex/components/el/elements/sectioning.pyi +3001 -286
- reflex/components/el/elements/tables.py +14 -35
- reflex/components/el/elements/tables.pyi +2029 -218
- reflex/components/el/elements/typography.py +10 -13
- reflex/components/el/elements/typography.pyi +3014 -297
- reflex/components/lucide/icon.py +22 -6
- reflex/components/markdown/markdown.py +30 -10
- reflex/components/markdown/markdown.pyi +3 -2
- reflex/components/plotly/plotly.py +1 -3
- reflex/components/plotly/plotly.pyi +1 -3
- reflex/components/radix/primitives/form.pyi +624 -93
- reflex/components/radix/themes/color_mode.py +1 -1
- reflex/components/radix/themes/color_mode.pyi +213 -31
- reflex/components/radix/themes/components/alert_dialog.pyi +199 -18
- reflex/components/radix/themes/components/badge.pyi +199 -18
- reflex/components/radix/themes/components/button.pyi +213 -31
- reflex/components/radix/themes/components/callout.pyi +1000 -95
- reflex/components/radix/themes/components/card.pyi +199 -18
- reflex/components/radix/themes/components/context_menu.py +79 -1
- reflex/components/radix/themes/components/context_menu.pyi +320 -1
- reflex/components/radix/themes/components/dialog.pyi +199 -18
- reflex/components/radix/themes/components/hover_card.pyi +199 -18
- reflex/components/radix/themes/components/icon_button.pyi +213 -31
- reflex/components/radix/themes/components/inset.pyi +199 -18
- reflex/components/radix/themes/components/popover.pyi +199 -18
- reflex/components/radix/themes/components/table.pyi +1437 -154
- reflex/components/radix/themes/components/text_area.py +2 -2
- reflex/components/radix/themes/components/text_area.pyi +201 -20
- reflex/components/radix/themes/components/text_field.py +1 -1
- reflex/components/radix/themes/components/text_field.pyi +444 -88
- reflex/components/radix/themes/layout/box.pyi +200 -19
- reflex/components/radix/themes/layout/center.pyi +199 -18
- reflex/components/radix/themes/layout/container.pyi +199 -18
- reflex/components/radix/themes/layout/flex.pyi +199 -18
- reflex/components/radix/themes/layout/grid.pyi +199 -18
- reflex/components/radix/themes/layout/list.pyi +604 -57
- reflex/components/radix/themes/layout/section.pyi +199 -18
- reflex/components/radix/themes/layout/spacer.pyi +199 -18
- reflex/components/radix/themes/layout/stack.pyi +597 -54
- reflex/components/radix/themes/typography/blockquote.pyi +200 -19
- reflex/components/radix/themes/typography/code.pyi +199 -18
- reflex/components/radix/themes/typography/heading.pyi +199 -18
- reflex/components/radix/themes/typography/link.pyi +238 -28
- reflex/components/radix/themes/typography/text.pyi +1394 -127
- reflex/components/react_player/react_player.py +1 -1
- reflex/components/react_player/react_player.pyi +1 -3
- reflex/components/sonner/toast.py +41 -12
- reflex/components/sonner/toast.pyi +20 -6
- reflex/components/tags/iter_tag.py +4 -0
- reflex/components/tags/tag.py +3 -3
- reflex/config.py +187 -28
- reflex/constants/__init__.py +2 -0
- reflex/constants/base.py +6 -0
- reflex/constants/compiler.py +9 -0
- reflex/constants/event.py +1 -0
- reflex/constants/installer.py +8 -5
- reflex/constants/utils.py +1 -3
- reflex/event.py +7 -16
- reflex/experimental/layout.pyi +597 -54
- reflex/py.typed +0 -0
- reflex/reflex.py +30 -41
- reflex/state.py +49 -44
- reflex/style.py +15 -22
- reflex/testing.py +2 -0
- reflex/utils/build.py +12 -0
- reflex/utils/console.py +4 -0
- reflex/utils/decorator.py +25 -0
- reflex/utils/exec.py +92 -34
- reflex/utils/format.py +35 -6
- reflex/utils/path_ops.py +16 -1
- reflex/utils/prerequisites.py +25 -33
- reflex/utils/processes.py +12 -13
- reflex/utils/serializers.py +20 -43
- reflex/utils/telemetry.py +4 -15
- reflex/utils/types.py +36 -66
- reflex/vars/base.py +53 -76
- reflex/vars/function.py +17 -5
- reflex/vars/number.py +1 -1
- reflex/vars/sequence.py +80 -4
- {reflex-0.7.0a5.dist-info → reflex-0.7.1.dist-info}/METADATA +4 -5
- {reflex-0.7.0a5.dist-info → reflex-0.7.1.dist-info}/RECORD +127 -123
- {reflex-0.7.0a5.dist-info → reflex-0.7.1.dist-info}/LICENSE +0 -0
- {reflex-0.7.0a5.dist-info → reflex-0.7.1.dist-info}/WHEEL +0 -0
- {reflex-0.7.0a5.dist-info → reflex-0.7.1.dist-info}/entry_points.txt +0 -0
|
@@ -38,30 +38,211 @@ class Card(elements.Div, RadixThemesComponent):
|
|
|
38
38
|
Var[Literal["classic", "ghost", "surface"]],
|
|
39
39
|
]
|
|
40
40
|
] = None,
|
|
41
|
-
access_key: Optional[Union[Var[
|
|
41
|
+
access_key: Optional[Union[Var[str], str]] = None,
|
|
42
42
|
auto_capitalize: Optional[
|
|
43
|
-
Union[
|
|
43
|
+
Union[
|
|
44
|
+
Literal["characters", "none", "off", "on", "sentences", "words"],
|
|
45
|
+
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
|
46
|
+
]
|
|
44
47
|
] = None,
|
|
45
48
|
content_editable: Optional[
|
|
46
|
-
Union[
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
Union[
|
|
50
|
+
Literal["inherit", "plaintext-only", False, True],
|
|
51
|
+
Var[Literal["inherit", "plaintext-only", False, True]],
|
|
52
|
+
]
|
|
50
53
|
] = None,
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
context_menu: Optional[Union[Var[str], str]] = None,
|
|
55
|
+
dir: Optional[Union[Var[str], str]] = None,
|
|
56
|
+
draggable: Optional[Union[Var[bool], bool]] = None,
|
|
53
57
|
enter_key_hint: Optional[
|
|
54
|
-
Union[
|
|
58
|
+
Union[
|
|
59
|
+
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
|
60
|
+
Var[
|
|
61
|
+
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
|
62
|
+
],
|
|
63
|
+
]
|
|
64
|
+
] = None,
|
|
65
|
+
hidden: Optional[Union[Var[bool], bool]] = None,
|
|
66
|
+
input_mode: Optional[
|
|
67
|
+
Union[
|
|
68
|
+
Literal[
|
|
69
|
+
"decimal",
|
|
70
|
+
"email",
|
|
71
|
+
"none",
|
|
72
|
+
"numeric",
|
|
73
|
+
"search",
|
|
74
|
+
"tel",
|
|
75
|
+
"text",
|
|
76
|
+
"url",
|
|
77
|
+
],
|
|
78
|
+
Var[
|
|
79
|
+
Literal[
|
|
80
|
+
"decimal",
|
|
81
|
+
"email",
|
|
82
|
+
"none",
|
|
83
|
+
"numeric",
|
|
84
|
+
"search",
|
|
85
|
+
"tel",
|
|
86
|
+
"text",
|
|
87
|
+
"url",
|
|
88
|
+
]
|
|
89
|
+
],
|
|
90
|
+
]
|
|
91
|
+
] = None,
|
|
92
|
+
item_prop: Optional[Union[Var[str], str]] = None,
|
|
93
|
+
lang: Optional[Union[Var[str], str]] = None,
|
|
94
|
+
role: Optional[
|
|
95
|
+
Union[
|
|
96
|
+
Literal[
|
|
97
|
+
"alert",
|
|
98
|
+
"alertdialog",
|
|
99
|
+
"application",
|
|
100
|
+
"article",
|
|
101
|
+
"banner",
|
|
102
|
+
"button",
|
|
103
|
+
"cell",
|
|
104
|
+
"checkbox",
|
|
105
|
+
"columnheader",
|
|
106
|
+
"combobox",
|
|
107
|
+
"complementary",
|
|
108
|
+
"contentinfo",
|
|
109
|
+
"definition",
|
|
110
|
+
"dialog",
|
|
111
|
+
"directory",
|
|
112
|
+
"document",
|
|
113
|
+
"feed",
|
|
114
|
+
"figure",
|
|
115
|
+
"form",
|
|
116
|
+
"grid",
|
|
117
|
+
"gridcell",
|
|
118
|
+
"group",
|
|
119
|
+
"heading",
|
|
120
|
+
"img",
|
|
121
|
+
"link",
|
|
122
|
+
"list",
|
|
123
|
+
"listbox",
|
|
124
|
+
"listitem",
|
|
125
|
+
"log",
|
|
126
|
+
"main",
|
|
127
|
+
"marquee",
|
|
128
|
+
"math",
|
|
129
|
+
"menu",
|
|
130
|
+
"menubar",
|
|
131
|
+
"menuitem",
|
|
132
|
+
"menuitemcheckbox",
|
|
133
|
+
"menuitemradio",
|
|
134
|
+
"navigation",
|
|
135
|
+
"none",
|
|
136
|
+
"note",
|
|
137
|
+
"option",
|
|
138
|
+
"presentation",
|
|
139
|
+
"progressbar",
|
|
140
|
+
"radio",
|
|
141
|
+
"radiogroup",
|
|
142
|
+
"region",
|
|
143
|
+
"row",
|
|
144
|
+
"rowgroup",
|
|
145
|
+
"rowheader",
|
|
146
|
+
"scrollbar",
|
|
147
|
+
"search",
|
|
148
|
+
"searchbox",
|
|
149
|
+
"separator",
|
|
150
|
+
"slider",
|
|
151
|
+
"spinbutton",
|
|
152
|
+
"status",
|
|
153
|
+
"switch",
|
|
154
|
+
"tab",
|
|
155
|
+
"table",
|
|
156
|
+
"tablist",
|
|
157
|
+
"tabpanel",
|
|
158
|
+
"term",
|
|
159
|
+
"textbox",
|
|
160
|
+
"timer",
|
|
161
|
+
"toolbar",
|
|
162
|
+
"tooltip",
|
|
163
|
+
"tree",
|
|
164
|
+
"treegrid",
|
|
165
|
+
"treeitem",
|
|
166
|
+
],
|
|
167
|
+
Var[
|
|
168
|
+
Literal[
|
|
169
|
+
"alert",
|
|
170
|
+
"alertdialog",
|
|
171
|
+
"application",
|
|
172
|
+
"article",
|
|
173
|
+
"banner",
|
|
174
|
+
"button",
|
|
175
|
+
"cell",
|
|
176
|
+
"checkbox",
|
|
177
|
+
"columnheader",
|
|
178
|
+
"combobox",
|
|
179
|
+
"complementary",
|
|
180
|
+
"contentinfo",
|
|
181
|
+
"definition",
|
|
182
|
+
"dialog",
|
|
183
|
+
"directory",
|
|
184
|
+
"document",
|
|
185
|
+
"feed",
|
|
186
|
+
"figure",
|
|
187
|
+
"form",
|
|
188
|
+
"grid",
|
|
189
|
+
"gridcell",
|
|
190
|
+
"group",
|
|
191
|
+
"heading",
|
|
192
|
+
"img",
|
|
193
|
+
"link",
|
|
194
|
+
"list",
|
|
195
|
+
"listbox",
|
|
196
|
+
"listitem",
|
|
197
|
+
"log",
|
|
198
|
+
"main",
|
|
199
|
+
"marquee",
|
|
200
|
+
"math",
|
|
201
|
+
"menu",
|
|
202
|
+
"menubar",
|
|
203
|
+
"menuitem",
|
|
204
|
+
"menuitemcheckbox",
|
|
205
|
+
"menuitemradio",
|
|
206
|
+
"navigation",
|
|
207
|
+
"none",
|
|
208
|
+
"note",
|
|
209
|
+
"option",
|
|
210
|
+
"presentation",
|
|
211
|
+
"progressbar",
|
|
212
|
+
"radio",
|
|
213
|
+
"radiogroup",
|
|
214
|
+
"region",
|
|
215
|
+
"row",
|
|
216
|
+
"rowgroup",
|
|
217
|
+
"rowheader",
|
|
218
|
+
"scrollbar",
|
|
219
|
+
"search",
|
|
220
|
+
"searchbox",
|
|
221
|
+
"separator",
|
|
222
|
+
"slider",
|
|
223
|
+
"spinbutton",
|
|
224
|
+
"status",
|
|
225
|
+
"switch",
|
|
226
|
+
"tab",
|
|
227
|
+
"table",
|
|
228
|
+
"tablist",
|
|
229
|
+
"tabpanel",
|
|
230
|
+
"term",
|
|
231
|
+
"textbox",
|
|
232
|
+
"timer",
|
|
233
|
+
"toolbar",
|
|
234
|
+
"tooltip",
|
|
235
|
+
"tree",
|
|
236
|
+
"treegrid",
|
|
237
|
+
"treeitem",
|
|
238
|
+
]
|
|
239
|
+
],
|
|
240
|
+
]
|
|
55
241
|
] = None,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
61
|
-
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
62
|
-
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
63
|
-
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
64
|
-
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
242
|
+
slot: Optional[Union[Var[str], str]] = None,
|
|
243
|
+
spell_check: Optional[Union[Var[bool], bool]] = None,
|
|
244
|
+
tab_index: Optional[Union[Var[int], int]] = None,
|
|
245
|
+
title: Optional[Union[Var[str], str]] = None,
|
|
65
246
|
style: Optional[Style] = None,
|
|
66
247
|
key: Optional[Any] = None,
|
|
67
248
|
id: Optional[Any] = None,
|
|
@@ -10,6 +10,7 @@ from reflex.vars.base import Var
|
|
|
10
10
|
|
|
11
11
|
from ..base import LiteralAccentColor, RadixThemesComponent
|
|
12
12
|
from .checkbox import Checkbox
|
|
13
|
+
from .radio_group import HighLevelRadioGroup
|
|
13
14
|
|
|
14
15
|
LiteralDirType = Literal["ltr", "rtl"]
|
|
15
16
|
|
|
@@ -226,7 +227,11 @@ class ContextMenuItem(RadixThemesComponent):
|
|
|
226
227
|
# Optional text used for typeahead purposes. By default the typeahead behavior will use the content of the item. Use this when the content is complex, or you have non-textual content inside.
|
|
227
228
|
text_value: Var[str]
|
|
228
229
|
|
|
229
|
-
_valid_parents: List[str] = [
|
|
230
|
+
_valid_parents: List[str] = [
|
|
231
|
+
"ContextMenuContent",
|
|
232
|
+
"ContextMenuSubContent",
|
|
233
|
+
"ContextMenuGroup",
|
|
234
|
+
]
|
|
230
235
|
|
|
231
236
|
# Fired when the item is selected.
|
|
232
237
|
on_select: EventHandler[no_args_event_spec]
|
|
@@ -247,6 +252,75 @@ class ContextMenuCheckbox(Checkbox):
|
|
|
247
252
|
shortcut: Var[str]
|
|
248
253
|
|
|
249
254
|
|
|
255
|
+
class ContextMenuLabel(RadixThemesComponent):
|
|
256
|
+
"""The component that contains the label."""
|
|
257
|
+
|
|
258
|
+
tag = "ContextMenu.Label"
|
|
259
|
+
|
|
260
|
+
# Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
|
|
261
|
+
as_child: Var[bool]
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
class ContextMenuGroup(RadixThemesComponent):
|
|
265
|
+
"""The component that contains the group."""
|
|
266
|
+
|
|
267
|
+
tag = "ContextMenu.Group"
|
|
268
|
+
|
|
269
|
+
# Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
|
|
270
|
+
as_child: Var[bool]
|
|
271
|
+
|
|
272
|
+
_valid_parents: List[str] = ["ContextMenuContent", "ContextMenuSubContent"]
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
class ContextMenuRadioGroup(RadixThemesComponent):
|
|
276
|
+
"""The component that contains context menu radio items."""
|
|
277
|
+
|
|
278
|
+
tag = "ContextMenu.RadioGroup"
|
|
279
|
+
|
|
280
|
+
# Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
|
|
281
|
+
as_child: Var[bool]
|
|
282
|
+
|
|
283
|
+
# The value of the selected item in the group.
|
|
284
|
+
value: Var[str]
|
|
285
|
+
|
|
286
|
+
# Props to rename
|
|
287
|
+
_rename_props = {"onChange": "onValueChange"}
|
|
288
|
+
|
|
289
|
+
# Fired when the value of the radio group changes.
|
|
290
|
+
on_change: EventHandler[passthrough_event_spec(str)]
|
|
291
|
+
|
|
292
|
+
_valid_parents: List[str] = [
|
|
293
|
+
"ContextMenuRadioItem",
|
|
294
|
+
"ContextMenuSubContent",
|
|
295
|
+
"ContextMenuContent",
|
|
296
|
+
"ContextMenuSub",
|
|
297
|
+
]
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
class ContextMenuRadioItem(HighLevelRadioGroup):
|
|
301
|
+
"""The component that contains context menu radio items."""
|
|
302
|
+
|
|
303
|
+
tag = "ContextMenu.RadioItem"
|
|
304
|
+
|
|
305
|
+
# Override theme color for Dropdown Menu Content
|
|
306
|
+
color_scheme: Var[LiteralAccentColor]
|
|
307
|
+
|
|
308
|
+
# Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
|
|
309
|
+
as_child: Var[bool]
|
|
310
|
+
|
|
311
|
+
# The unique value of the item.
|
|
312
|
+
value: Var[str]
|
|
313
|
+
|
|
314
|
+
# When true, prevents the user from interacting with the item.
|
|
315
|
+
disabled: Var[bool]
|
|
316
|
+
|
|
317
|
+
# Event handler called when the user selects an item (via mouse or keyboard). Calling event.preventDefault in this handler will prevent the context menu from closing when selecting that item.
|
|
318
|
+
on_select: EventHandler[no_args_event_spec]
|
|
319
|
+
|
|
320
|
+
# Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item. Use this when the content is complex, or you have non-textual content inside.
|
|
321
|
+
text_value: Var[str]
|
|
322
|
+
|
|
323
|
+
|
|
250
324
|
class ContextMenu(ComponentNamespace):
|
|
251
325
|
"""Menu representing a set of actions, displayed at the origin of a pointer right-click or long-press."""
|
|
252
326
|
|
|
@@ -259,6 +333,10 @@ class ContextMenu(ComponentNamespace):
|
|
|
259
333
|
item = staticmethod(ContextMenuItem.create)
|
|
260
334
|
separator = staticmethod(ContextMenuSeparator.create)
|
|
261
335
|
checkbox = staticmethod(ContextMenuCheckbox.create)
|
|
336
|
+
label = staticmethod(ContextMenuLabel.create)
|
|
337
|
+
group = staticmethod(ContextMenuGroup.create)
|
|
338
|
+
radio_group = staticmethod(ContextMenuRadioGroup.create)
|
|
339
|
+
radio = staticmethod(ContextMenuRadioItem.create)
|
|
262
340
|
|
|
263
341
|
|
|
264
342
|
context_menu = ContextMenu()
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# ------------------- DO NOT EDIT ----------------------
|
|
4
4
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
5
|
# ------------------------------------------------------
|
|
6
|
-
from typing import Any, Dict, Literal, Optional, Union, overload
|
|
6
|
+
from typing import Any, Dict, List, Literal, Optional, Union, overload
|
|
7
7
|
|
|
8
8
|
from reflex.components.component import ComponentNamespace
|
|
9
9
|
from reflex.components.core.breakpoints import Breakpoints
|
|
@@ -13,6 +13,7 @@ from reflex.vars.base import Var
|
|
|
13
13
|
|
|
14
14
|
from ..base import RadixThemesComponent
|
|
15
15
|
from .checkbox import Checkbox
|
|
16
|
+
from .radio_group import HighLevelRadioGroup
|
|
16
17
|
|
|
17
18
|
LiteralDirType = Literal["ltr", "rtl"]
|
|
18
19
|
LiteralSizeType = Literal["1", "2"]
|
|
@@ -820,6 +821,320 @@ class ContextMenuCheckbox(Checkbox):
|
|
|
820
821
|
"""
|
|
821
822
|
...
|
|
822
823
|
|
|
824
|
+
class ContextMenuLabel(RadixThemesComponent):
|
|
825
|
+
@overload
|
|
826
|
+
@classmethod
|
|
827
|
+
def create( # type: ignore
|
|
828
|
+
cls,
|
|
829
|
+
*children,
|
|
830
|
+
as_child: Optional[Union[Var[bool], bool]] = None,
|
|
831
|
+
style: Optional[Style] = None,
|
|
832
|
+
key: Optional[Any] = None,
|
|
833
|
+
id: Optional[Any] = None,
|
|
834
|
+
class_name: Optional[Any] = None,
|
|
835
|
+
autofocus: Optional[bool] = None,
|
|
836
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
837
|
+
on_blur: Optional[EventType[()]] = None,
|
|
838
|
+
on_click: Optional[EventType[()]] = None,
|
|
839
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
840
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
841
|
+
on_focus: Optional[EventType[()]] = None,
|
|
842
|
+
on_mount: Optional[EventType[()]] = None,
|
|
843
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
844
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
845
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
846
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
847
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
848
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
849
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
850
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
851
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
852
|
+
**props,
|
|
853
|
+
) -> "ContextMenuLabel":
|
|
854
|
+
"""Create a new component instance.
|
|
855
|
+
|
|
856
|
+
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
857
|
+
other UI libraries for common names, like Text and Button.
|
|
858
|
+
|
|
859
|
+
Args:
|
|
860
|
+
*children: Child components.
|
|
861
|
+
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
|
|
862
|
+
style: The style of the component.
|
|
863
|
+
key: A unique key for the component.
|
|
864
|
+
id: The id for the component.
|
|
865
|
+
class_name: The class name for the component.
|
|
866
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
867
|
+
custom_attrs: custom attribute
|
|
868
|
+
**props: Component properties.
|
|
869
|
+
|
|
870
|
+
Returns:
|
|
871
|
+
A new component instance.
|
|
872
|
+
"""
|
|
873
|
+
...
|
|
874
|
+
|
|
875
|
+
class ContextMenuGroup(RadixThemesComponent):
|
|
876
|
+
@overload
|
|
877
|
+
@classmethod
|
|
878
|
+
def create( # type: ignore
|
|
879
|
+
cls,
|
|
880
|
+
*children,
|
|
881
|
+
as_child: Optional[Union[Var[bool], bool]] = None,
|
|
882
|
+
style: Optional[Style] = None,
|
|
883
|
+
key: Optional[Any] = None,
|
|
884
|
+
id: Optional[Any] = None,
|
|
885
|
+
class_name: Optional[Any] = None,
|
|
886
|
+
autofocus: Optional[bool] = None,
|
|
887
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
888
|
+
on_blur: Optional[EventType[()]] = None,
|
|
889
|
+
on_click: Optional[EventType[()]] = None,
|
|
890
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
891
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
892
|
+
on_focus: Optional[EventType[()]] = None,
|
|
893
|
+
on_mount: Optional[EventType[()]] = None,
|
|
894
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
895
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
896
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
897
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
898
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
899
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
900
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
901
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
902
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
903
|
+
**props,
|
|
904
|
+
) -> "ContextMenuGroup":
|
|
905
|
+
"""Create a new component instance.
|
|
906
|
+
|
|
907
|
+
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
908
|
+
other UI libraries for common names, like Text and Button.
|
|
909
|
+
|
|
910
|
+
Args:
|
|
911
|
+
*children: Child components.
|
|
912
|
+
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
|
|
913
|
+
style: The style of the component.
|
|
914
|
+
key: A unique key for the component.
|
|
915
|
+
id: The id for the component.
|
|
916
|
+
class_name: The class name for the component.
|
|
917
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
918
|
+
custom_attrs: custom attribute
|
|
919
|
+
**props: Component properties.
|
|
920
|
+
|
|
921
|
+
Returns:
|
|
922
|
+
A new component instance.
|
|
923
|
+
"""
|
|
924
|
+
...
|
|
925
|
+
|
|
926
|
+
class ContextMenuRadioGroup(RadixThemesComponent):
|
|
927
|
+
@overload
|
|
928
|
+
@classmethod
|
|
929
|
+
def create( # type: ignore
|
|
930
|
+
cls,
|
|
931
|
+
*children,
|
|
932
|
+
as_child: Optional[Union[Var[bool], bool]] = None,
|
|
933
|
+
value: Optional[Union[Var[str], str]] = None,
|
|
934
|
+
style: Optional[Style] = None,
|
|
935
|
+
key: Optional[Any] = None,
|
|
936
|
+
id: Optional[Any] = None,
|
|
937
|
+
class_name: Optional[Any] = None,
|
|
938
|
+
autofocus: Optional[bool] = None,
|
|
939
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
940
|
+
on_blur: Optional[EventType[()]] = None,
|
|
941
|
+
on_change: Optional[Union[EventType[()], EventType[str]]] = None,
|
|
942
|
+
on_click: Optional[EventType[()]] = None,
|
|
943
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
944
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
945
|
+
on_focus: Optional[EventType[()]] = None,
|
|
946
|
+
on_mount: Optional[EventType[()]] = None,
|
|
947
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
948
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
949
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
950
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
951
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
952
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
953
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
954
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
955
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
956
|
+
**props,
|
|
957
|
+
) -> "ContextMenuRadioGroup":
|
|
958
|
+
"""Create a new component instance.
|
|
959
|
+
|
|
960
|
+
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
961
|
+
other UI libraries for common names, like Text and Button.
|
|
962
|
+
|
|
963
|
+
Args:
|
|
964
|
+
*children: Child components.
|
|
965
|
+
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
|
|
966
|
+
value: The value of the selected item in the group.
|
|
967
|
+
on_change: Fired when the value of the radio group changes.
|
|
968
|
+
style: The style of the component.
|
|
969
|
+
key: A unique key for the component.
|
|
970
|
+
id: The id for the component.
|
|
971
|
+
class_name: The class name for the component.
|
|
972
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
973
|
+
custom_attrs: custom attribute
|
|
974
|
+
**props: Component properties.
|
|
975
|
+
|
|
976
|
+
Returns:
|
|
977
|
+
A new component instance.
|
|
978
|
+
"""
|
|
979
|
+
...
|
|
980
|
+
|
|
981
|
+
class ContextMenuRadioItem(HighLevelRadioGroup):
|
|
982
|
+
@overload
|
|
983
|
+
@classmethod
|
|
984
|
+
def create( # type: ignore
|
|
985
|
+
cls,
|
|
986
|
+
*children,
|
|
987
|
+
color_scheme: Optional[
|
|
988
|
+
Union[
|
|
989
|
+
Literal[
|
|
990
|
+
"amber",
|
|
991
|
+
"blue",
|
|
992
|
+
"bronze",
|
|
993
|
+
"brown",
|
|
994
|
+
"crimson",
|
|
995
|
+
"cyan",
|
|
996
|
+
"gold",
|
|
997
|
+
"grass",
|
|
998
|
+
"gray",
|
|
999
|
+
"green",
|
|
1000
|
+
"indigo",
|
|
1001
|
+
"iris",
|
|
1002
|
+
"jade",
|
|
1003
|
+
"lime",
|
|
1004
|
+
"mint",
|
|
1005
|
+
"orange",
|
|
1006
|
+
"pink",
|
|
1007
|
+
"plum",
|
|
1008
|
+
"purple",
|
|
1009
|
+
"red",
|
|
1010
|
+
"ruby",
|
|
1011
|
+
"sky",
|
|
1012
|
+
"teal",
|
|
1013
|
+
"tomato",
|
|
1014
|
+
"violet",
|
|
1015
|
+
"yellow",
|
|
1016
|
+
],
|
|
1017
|
+
Var[
|
|
1018
|
+
Literal[
|
|
1019
|
+
"amber",
|
|
1020
|
+
"blue",
|
|
1021
|
+
"bronze",
|
|
1022
|
+
"brown",
|
|
1023
|
+
"crimson",
|
|
1024
|
+
"cyan",
|
|
1025
|
+
"gold",
|
|
1026
|
+
"grass",
|
|
1027
|
+
"gray",
|
|
1028
|
+
"green",
|
|
1029
|
+
"indigo",
|
|
1030
|
+
"iris",
|
|
1031
|
+
"jade",
|
|
1032
|
+
"lime",
|
|
1033
|
+
"mint",
|
|
1034
|
+
"orange",
|
|
1035
|
+
"pink",
|
|
1036
|
+
"plum",
|
|
1037
|
+
"purple",
|
|
1038
|
+
"red",
|
|
1039
|
+
"ruby",
|
|
1040
|
+
"sky",
|
|
1041
|
+
"teal",
|
|
1042
|
+
"tomato",
|
|
1043
|
+
"violet",
|
|
1044
|
+
"yellow",
|
|
1045
|
+
]
|
|
1046
|
+
],
|
|
1047
|
+
]
|
|
1048
|
+
] = None,
|
|
1049
|
+
as_child: Optional[Union[Var[bool], bool]] = None,
|
|
1050
|
+
value: Optional[Union[Var[str], str]] = None,
|
|
1051
|
+
disabled: Optional[Union[Var[bool], bool]] = None,
|
|
1052
|
+
text_value: Optional[Union[Var[str], str]] = None,
|
|
1053
|
+
items: Optional[Union[List[str], Var[List[str]]]] = None,
|
|
1054
|
+
direction: Optional[
|
|
1055
|
+
Union[
|
|
1056
|
+
Literal["column", "column-reverse", "row", "row-reverse"],
|
|
1057
|
+
Var[Literal["column", "column-reverse", "row", "row-reverse"]],
|
|
1058
|
+
]
|
|
1059
|
+
] = None,
|
|
1060
|
+
spacing: Optional[
|
|
1061
|
+
Union[
|
|
1062
|
+
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
1063
|
+
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
1064
|
+
]
|
|
1065
|
+
] = None,
|
|
1066
|
+
size: Optional[
|
|
1067
|
+
Union[Literal["1", "2", "3"], Var[Literal["1", "2", "3"]]]
|
|
1068
|
+
] = None,
|
|
1069
|
+
variant: Optional[
|
|
1070
|
+
Union[
|
|
1071
|
+
Literal["classic", "soft", "surface"],
|
|
1072
|
+
Var[Literal["classic", "soft", "surface"]],
|
|
1073
|
+
]
|
|
1074
|
+
] = None,
|
|
1075
|
+
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
|
1076
|
+
default_value: Optional[Union[Var[str], str]] = None,
|
|
1077
|
+
name: Optional[Union[Var[str], str]] = None,
|
|
1078
|
+
required: Optional[Union[Var[bool], bool]] = None,
|
|
1079
|
+
style: Optional[Style] = None,
|
|
1080
|
+
key: Optional[Any] = None,
|
|
1081
|
+
id: Optional[Any] = None,
|
|
1082
|
+
class_name: Optional[Any] = None,
|
|
1083
|
+
autofocus: Optional[bool] = None,
|
|
1084
|
+
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
1085
|
+
on_blur: Optional[EventType[()]] = None,
|
|
1086
|
+
on_click: Optional[EventType[()]] = None,
|
|
1087
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
1088
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
1089
|
+
on_focus: Optional[EventType[()]] = None,
|
|
1090
|
+
on_mount: Optional[EventType[()]] = None,
|
|
1091
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
1092
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
1093
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
1094
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
1095
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
1096
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
1097
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
1098
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
1099
|
+
on_select: Optional[EventType[()]] = None,
|
|
1100
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
1101
|
+
**props,
|
|
1102
|
+
) -> "ContextMenuRadioItem":
|
|
1103
|
+
"""Create a radio group component.
|
|
1104
|
+
|
|
1105
|
+
Args:
|
|
1106
|
+
items: The items of the radio group.
|
|
1107
|
+
color_scheme: The color of the radio group
|
|
1108
|
+
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
|
|
1109
|
+
value: The controlled value of the radio item to check. Should be used in conjunction with on_change.
|
|
1110
|
+
disabled: Whether the radio group is disabled
|
|
1111
|
+
on_select: Event handler called when the user selects an item (via mouse or keyboard). Calling event.preventDefault in this handler will prevent the context menu from closing when selecting that item.
|
|
1112
|
+
text_value: Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item. Use this when the content is complex, or you have non-textual content inside.
|
|
1113
|
+
items: The items of the radio group.
|
|
1114
|
+
direction: The direction of the radio group.
|
|
1115
|
+
spacing: The gap between the items of the radio group.
|
|
1116
|
+
size: The size of the radio group.
|
|
1117
|
+
variant: The variant of the radio group
|
|
1118
|
+
high_contrast: Whether to render the radio group with higher contrast color against background
|
|
1119
|
+
default_value: The initial value of checked radio item. Should be used in conjunction with on_change.
|
|
1120
|
+
name: The name of the group. Submitted with its owning form as part of a name/value pair.
|
|
1121
|
+
required: Whether the radio group is required
|
|
1122
|
+
style: The style of the component.
|
|
1123
|
+
key: A unique key for the component.
|
|
1124
|
+
id: The id for the component.
|
|
1125
|
+
class_name: The class name for the component.
|
|
1126
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
1127
|
+
custom_attrs: custom attribute
|
|
1128
|
+
**props: Additional properties to apply to the accordion item.
|
|
1129
|
+
|
|
1130
|
+
Returns:
|
|
1131
|
+
The created radio group component.
|
|
1132
|
+
|
|
1133
|
+
Raises:
|
|
1134
|
+
TypeError: If the type of items is invalid.
|
|
1135
|
+
"""
|
|
1136
|
+
...
|
|
1137
|
+
|
|
823
1138
|
class ContextMenu(ComponentNamespace):
|
|
824
1139
|
root = staticmethod(ContextMenuRoot.create)
|
|
825
1140
|
trigger = staticmethod(ContextMenuTrigger.create)
|
|
@@ -830,5 +1145,9 @@ class ContextMenu(ComponentNamespace):
|
|
|
830
1145
|
item = staticmethod(ContextMenuItem.create)
|
|
831
1146
|
separator = staticmethod(ContextMenuSeparator.create)
|
|
832
1147
|
checkbox = staticmethod(ContextMenuCheckbox.create)
|
|
1148
|
+
label = staticmethod(ContextMenuLabel.create)
|
|
1149
|
+
group = staticmethod(ContextMenuGroup.create)
|
|
1150
|
+
radio_group = staticmethod(ContextMenuRadioGroup.create)
|
|
1151
|
+
radio = staticmethod(ContextMenuRadioItem.create)
|
|
833
1152
|
|
|
834
1153
|
context_menu = ContextMenu()
|