reflex 0.3.5a4__py3-none-any.whl → 0.3.7__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/pages/base_page.js.jinja2 +2 -0
- reflex/.templates/web/utils/state.js +1 -1
- reflex/__init__.py +29 -6
- reflex/__init__.pyi +2 -0
- reflex/app.py +3 -0
- reflex/components/__init__.py +2 -0
- reflex/components/chakra/__init__.py +23 -0
- reflex/components/{media → chakra/media}/image.py +1 -28
- reflex/components/chakra/media/image.pyi +120 -0
- reflex/components/component.py +32 -4
- reflex/components/datadisplay/datatable.py +1 -37
- reflex/components/datadisplay/datatable.pyi +1 -11
- reflex/components/el/elements/forms.py +43 -1
- reflex/components/el/elements/forms.pyi +26 -1
- reflex/components/graphing/plotly.py +0 -22
- reflex/components/graphing/plotly.pyi +0 -12
- reflex/components/media/__init__.py +0 -1
- reflex/components/media/image.pyi +0 -9
- reflex/components/next/__init__.py +8 -0
- reflex/components/next/base.py +8 -0
- reflex/components/next/base.pyi +91 -0
- reflex/components/next/image.py +114 -0
- reflex/components/next/image.pyi +122 -0
- reflex/components/next/video.py +33 -0
- reflex/components/next/video.pyi +92 -0
- reflex/components/radix/primitives/__init__.py +3 -0
- reflex/components/radix/primitives/accordion.py +279 -0
- reflex/components/radix/primitives/accordion.pyi +619 -0
- reflex/components/radix/themes/__init__.py +4 -73
- reflex/components/radix/themes/base.py +7 -7
- reflex/components/radix/themes/base.pyi +21 -21
- reflex/components/radix/themes/components/__init__.py +193 -0
- reflex/components/radix/themes/components/alertdialog.py +72 -0
- reflex/components/radix/themes/components/alertdialog.pyi +733 -0
- reflex/components/radix/themes/components/aspectratio.py +20 -0
- reflex/components/radix/themes/components/aspectratio.pyi +144 -0
- reflex/components/radix/themes/components/avatar.py +38 -0
- reflex/components/radix/themes/components/avatar.pyi +233 -0
- reflex/components/radix/themes/components/badge.py +38 -0
- reflex/components/radix/themes/components/badge.pyi +291 -0
- reflex/components/radix/themes/components/button.py +39 -0
- reflex/components/radix/themes/components/button.pyi +330 -0
- reflex/components/radix/themes/components/callout.py +49 -0
- reflex/components/radix/themes/components/callout.pyi +668 -0
- reflex/components/radix/themes/components/card.py +25 -0
- reflex/components/radix/themes/components/card.pyi +214 -0
- reflex/components/radix/themes/components/checkbox.py +67 -0
- reflex/components/radix/themes/components/checkbox.pyi +249 -0
- reflex/components/radix/themes/components/contextmenu.py +134 -0
- reflex/components/radix/themes/{typography.pyi → components/contextmenu.pyi} +182 -602
- reflex/components/radix/themes/components/dialog.py +75 -0
- reflex/components/radix/themes/components/dialog.pyi +739 -0
- reflex/components/radix/themes/components/dropdownmenu.py +101 -0
- reflex/components/radix/themes/components/dropdownmenu.pyi +1065 -0
- reflex/components/radix/themes/components/hovercard.py +63 -0
- reflex/components/radix/themes/components/hovercard.pyi +487 -0
- reflex/components/radix/themes/components/iconbutton.py +39 -0
- reflex/components/radix/themes/components/iconbutton.pyi +332 -0
- reflex/components/radix/themes/components/icons.py +400 -0
- reflex/components/radix/themes/components/icons.pyi +185 -0
- reflex/components/radix/themes/components/inset.py +44 -0
- reflex/components/radix/themes/components/inset.pyi +230 -0
- reflex/components/radix/themes/components/popover.py +85 -0
- reflex/components/radix/themes/components/popover.pyi +634 -0
- reflex/components/radix/themes/components/radiogroup.py +72 -0
- reflex/components/radix/themes/components/radiogroup.pyi +369 -0
- reflex/components/radix/themes/components/scrollarea.py +31 -0
- reflex/components/radix/themes/components/scrollarea.pyi +165 -0
- reflex/components/radix/themes/components/select.py +137 -0
- reflex/components/radix/themes/{layout.pyi → components/select.pyi} +422 -418
- reflex/components/radix/themes/components/separator.py +30 -0
- reflex/components/radix/themes/components/separator.pyi +218 -0
- reflex/components/radix/themes/components/slider.py +68 -0
- reflex/components/radix/themes/components/slider.pyi +254 -0
- reflex/components/radix/themes/components/switch.py +68 -0
- reflex/components/radix/themes/components/switch.pyi +250 -0
- reflex/components/radix/themes/components/table.py +79 -0
- reflex/components/radix/themes/components/table.pyi +1485 -0
- reflex/components/radix/themes/components/tabs.py +65 -0
- reflex/components/radix/themes/components/tabs.pyi +549 -0
- reflex/components/radix/themes/components/textarea.py +68 -0
- reflex/components/radix/themes/components/textarea.pyi +333 -0
- reflex/components/radix/themes/{components.py → components/textfield.py} +3 -87
- reflex/components/radix/themes/{components.pyi → components/textfield.pyi} +202 -591
- reflex/components/radix/themes/layout/__init__.py +13 -0
- reflex/components/radix/themes/layout/base.py +48 -0
- reflex/components/radix/themes/layout/base.pyi +195 -0
- reflex/components/radix/themes/layout/box.py +12 -0
- reflex/components/radix/themes/layout/box.pyi +252 -0
- reflex/components/radix/themes/layout/container.py +23 -0
- reflex/components/radix/themes/layout/container.pyi +260 -0
- reflex/components/radix/themes/layout/flex.py +45 -0
- reflex/components/radix/themes/layout/flex.pyi +303 -0
- reflex/components/radix/themes/layout/grid.py +53 -0
- reflex/components/radix/themes/layout/grid.pyi +203 -0
- reflex/components/radix/themes/layout/section.py +20 -0
- reflex/components/radix/themes/layout/section.pyi +260 -0
- reflex/components/radix/themes/typography/__init__.py +21 -0
- reflex/components/radix/themes/typography/base.py +12 -0
- reflex/components/radix/themes/typography/blockquote.py +36 -0
- reflex/components/radix/themes/typography/blockquote.pyi +282 -0
- reflex/components/radix/themes/typography/code.py +40 -0
- reflex/components/radix/themes/typography/code.pyi +292 -0
- reflex/components/radix/themes/typography/em.py +18 -0
- reflex/components/radix/themes/typography/em.pyi +199 -0
- reflex/components/radix/themes/typography/heading.py +50 -0
- reflex/components/radix/themes/typography/heading.pyi +298 -0
- reflex/components/radix/themes/typography/kbd.py +25 -0
- reflex/components/radix/themes/typography/kbd.pyi +208 -0
- reflex/components/radix/themes/typography/link.py +49 -0
- reflex/components/radix/themes/typography/link.pyi +238 -0
- reflex/components/radix/themes/typography/quote.py +18 -0
- reflex/components/radix/themes/typography/quote.pyi +200 -0
- reflex/components/radix/themes/typography/strong.py +18 -0
- reflex/components/radix/themes/typography/strong.pyi +199 -0
- reflex/components/radix/themes/typography/text.py +50 -0
- reflex/components/radix/themes/typography/text.pyi +298 -0
- reflex/components/radix/themes/typography.py +1 -1
- reflex/constants/__init__.py +1 -0
- reflex/constants/base.py +7 -0
- reflex/constants/config.py +1 -1
- reflex/model.py +2 -1
- reflex/reflex.py +8 -1
- reflex/state.py +11 -0
- reflex/style.py +120 -10
- reflex/testing.py +4 -4
- reflex/utils/format.py +9 -5
- reflex/utils/prerequisites.py +49 -6
- reflex/utils/processes.py +8 -1
- reflex/utils/serializers.py +83 -0
- reflex/utils/types.py +22 -1
- reflex/vars.py +24 -1
- {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/METADATA +3 -2
- {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/RECORD +137 -44
- reflex/components/radix/themes/layout.py +0 -155
- {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/LICENSE +0 -0
- {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/WHEEL +0 -0
- {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
"""Stub file for reflex/components/radix/themes/layout/container.py"""
|
|
2
|
+
# ------------------- DO NOT EDIT ----------------------
|
|
3
|
+
# This file was generated by `scripts/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 typing import Literal
|
|
11
|
+
from reflex import el
|
|
12
|
+
from reflex.vars import Var
|
|
13
|
+
from .base import LayoutComponent
|
|
14
|
+
|
|
15
|
+
LiteralContainerSize = Literal["1", "2", "3", "4"]
|
|
16
|
+
|
|
17
|
+
class Container(el.Div, LayoutComponent):
|
|
18
|
+
@overload
|
|
19
|
+
@classmethod
|
|
20
|
+
def create( # type: ignore
|
|
21
|
+
cls,
|
|
22
|
+
*children,
|
|
23
|
+
size: Optional[
|
|
24
|
+
Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]]
|
|
25
|
+
] = None,
|
|
26
|
+
access_key: Optional[
|
|
27
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
28
|
+
] = None,
|
|
29
|
+
auto_capitalize: Optional[
|
|
30
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
31
|
+
] = None,
|
|
32
|
+
content_editable: Optional[
|
|
33
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
34
|
+
] = None,
|
|
35
|
+
context_menu: Optional[
|
|
36
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
37
|
+
] = None,
|
|
38
|
+
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
39
|
+
draggable: Optional[
|
|
40
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
41
|
+
] = None,
|
|
42
|
+
enter_key_hint: Optional[
|
|
43
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
44
|
+
] = None,
|
|
45
|
+
hidden: Optional[
|
|
46
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
47
|
+
] = None,
|
|
48
|
+
input_mode: Optional[
|
|
49
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
50
|
+
] = None,
|
|
51
|
+
item_prop: Optional[
|
|
52
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
53
|
+
] = None,
|
|
54
|
+
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
55
|
+
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
56
|
+
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
57
|
+
spell_check: Optional[
|
|
58
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
59
|
+
] = None,
|
|
60
|
+
tab_index: Optional[
|
|
61
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
62
|
+
] = None,
|
|
63
|
+
title: Optional[
|
|
64
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
65
|
+
] = None,
|
|
66
|
+
translate: Optional[
|
|
67
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
68
|
+
] = None,
|
|
69
|
+
p: Optional[
|
|
70
|
+
Union[
|
|
71
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
72
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
73
|
+
]
|
|
74
|
+
] = None,
|
|
75
|
+
px: Optional[
|
|
76
|
+
Union[
|
|
77
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
78
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
79
|
+
]
|
|
80
|
+
] = None,
|
|
81
|
+
py: Optional[
|
|
82
|
+
Union[
|
|
83
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
84
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
85
|
+
]
|
|
86
|
+
] = None,
|
|
87
|
+
pt: Optional[
|
|
88
|
+
Union[
|
|
89
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
90
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
91
|
+
]
|
|
92
|
+
] = None,
|
|
93
|
+
pr: Optional[
|
|
94
|
+
Union[
|
|
95
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
96
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
97
|
+
]
|
|
98
|
+
] = None,
|
|
99
|
+
pb: Optional[
|
|
100
|
+
Union[
|
|
101
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
102
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
103
|
+
]
|
|
104
|
+
] = None,
|
|
105
|
+
pl: Optional[
|
|
106
|
+
Union[
|
|
107
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
108
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
109
|
+
]
|
|
110
|
+
] = None,
|
|
111
|
+
shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None,
|
|
112
|
+
grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None,
|
|
113
|
+
m: Optional[
|
|
114
|
+
Union[
|
|
115
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
116
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
117
|
+
]
|
|
118
|
+
] = None,
|
|
119
|
+
mx: Optional[
|
|
120
|
+
Union[
|
|
121
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
122
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
123
|
+
]
|
|
124
|
+
] = None,
|
|
125
|
+
my: Optional[
|
|
126
|
+
Union[
|
|
127
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
128
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
129
|
+
]
|
|
130
|
+
] = None,
|
|
131
|
+
mt: Optional[
|
|
132
|
+
Union[
|
|
133
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
134
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
135
|
+
]
|
|
136
|
+
] = None,
|
|
137
|
+
mr: Optional[
|
|
138
|
+
Union[
|
|
139
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
140
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
141
|
+
]
|
|
142
|
+
] = None,
|
|
143
|
+
mb: Optional[
|
|
144
|
+
Union[
|
|
145
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
146
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
147
|
+
]
|
|
148
|
+
] = None,
|
|
149
|
+
ml: Optional[
|
|
150
|
+
Union[
|
|
151
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
152
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
153
|
+
]
|
|
154
|
+
] = None,
|
|
155
|
+
style: Optional[Style] = None,
|
|
156
|
+
key: Optional[Any] = None,
|
|
157
|
+
id: Optional[Any] = None,
|
|
158
|
+
class_name: Optional[Any] = None,
|
|
159
|
+
autofocus: Optional[bool] = None,
|
|
160
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
161
|
+
on_blur: Optional[
|
|
162
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
163
|
+
] = None,
|
|
164
|
+
on_click: Optional[
|
|
165
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
166
|
+
] = None,
|
|
167
|
+
on_context_menu: Optional[
|
|
168
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
169
|
+
] = None,
|
|
170
|
+
on_double_click: Optional[
|
|
171
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
172
|
+
] = None,
|
|
173
|
+
on_focus: Optional[
|
|
174
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
175
|
+
] = None,
|
|
176
|
+
on_mount: Optional[
|
|
177
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
178
|
+
] = None,
|
|
179
|
+
on_mouse_down: Optional[
|
|
180
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
181
|
+
] = None,
|
|
182
|
+
on_mouse_enter: Optional[
|
|
183
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
184
|
+
] = None,
|
|
185
|
+
on_mouse_leave: Optional[
|
|
186
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
187
|
+
] = None,
|
|
188
|
+
on_mouse_move: Optional[
|
|
189
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
190
|
+
] = None,
|
|
191
|
+
on_mouse_out: Optional[
|
|
192
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
193
|
+
] = None,
|
|
194
|
+
on_mouse_over: Optional[
|
|
195
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
196
|
+
] = None,
|
|
197
|
+
on_mouse_up: Optional[
|
|
198
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
199
|
+
] = None,
|
|
200
|
+
on_scroll: Optional[
|
|
201
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
202
|
+
] = None,
|
|
203
|
+
on_unmount: Optional[
|
|
204
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
205
|
+
] = None,
|
|
206
|
+
**props
|
|
207
|
+
) -> "Container":
|
|
208
|
+
"""Create a new component instance.
|
|
209
|
+
|
|
210
|
+
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
211
|
+
other UI libraries for common names, like Text and Button.
|
|
212
|
+
|
|
213
|
+
Args:
|
|
214
|
+
*children: Child components.
|
|
215
|
+
size: The size of the container: "1" - "4" (default "4")
|
|
216
|
+
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
217
|
+
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
218
|
+
content_editable: Indicates whether the element's content is editable.
|
|
219
|
+
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
|
220
|
+
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
|
221
|
+
draggable: Defines whether the element can be dragged.
|
|
222
|
+
enter_key_hint: Hints what media types the media element is able to play.
|
|
223
|
+
hidden: Defines whether the element is hidden.
|
|
224
|
+
input_mode: Defines the type of the element.
|
|
225
|
+
item_prop: Defines the name of the element for metadata purposes.
|
|
226
|
+
lang: Defines the language used in the element.
|
|
227
|
+
role: Defines the role of the element.
|
|
228
|
+
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
|
229
|
+
spell_check: Defines whether the element may be checked for spelling errors.
|
|
230
|
+
tab_index: Defines the position of the current element in the tabbing order.
|
|
231
|
+
title: Defines a tooltip for the element.
|
|
232
|
+
translate: Specifies whether the content of an element should be translated or not.
|
|
233
|
+
p: Padding: "0" - "9"
|
|
234
|
+
px: Padding horizontal: "0" - "9"
|
|
235
|
+
py: Padding vertical: "0" - "9"
|
|
236
|
+
pt: Padding top: "0" - "9"
|
|
237
|
+
pr: Padding right: "0" - "9"
|
|
238
|
+
pb: Padding bottom: "0" - "9"
|
|
239
|
+
pl: Padding left: "0" - "9"
|
|
240
|
+
shrink: Whether the element will take up the smallest possible space: "0" | "1"
|
|
241
|
+
grow: Whether the element will take up the largest possible space: "0" | "1"
|
|
242
|
+
m: Margin: "0" - "9"
|
|
243
|
+
mx: Margin horizontal: "0" - "9"
|
|
244
|
+
my: Margin vertical: "0" - "9"
|
|
245
|
+
mt: Margin top: "0" - "9"
|
|
246
|
+
mr: Margin right: "0" - "9"
|
|
247
|
+
mb: Margin bottom: "0" - "9"
|
|
248
|
+
ml: Margin left: "0" - "9"
|
|
249
|
+
style: The style of the component.
|
|
250
|
+
key: A unique key for the component.
|
|
251
|
+
id: The id for the component.
|
|
252
|
+
class_name: The class name for the component.
|
|
253
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
254
|
+
custom_attrs: custom attribute
|
|
255
|
+
**props: Component properties.
|
|
256
|
+
|
|
257
|
+
Returns:
|
|
258
|
+
A new component instance.
|
|
259
|
+
"""
|
|
260
|
+
...
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""Declarative layout and common spacing props."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from typing import Literal
|
|
5
|
+
|
|
6
|
+
from reflex import el
|
|
7
|
+
from reflex.vars import Var
|
|
8
|
+
|
|
9
|
+
from ..base import (
|
|
10
|
+
LiteralAlign,
|
|
11
|
+
LiteralJustify,
|
|
12
|
+
LiteralSize,
|
|
13
|
+
)
|
|
14
|
+
from .base import LayoutComponent
|
|
15
|
+
|
|
16
|
+
LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"]
|
|
17
|
+
LiteralFlexDisplay = Literal["none", "inline-flex", "flex"]
|
|
18
|
+
LiteralFlexWrap = Literal["nowrap", "wrap", "wrap-reverse"]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Flex(el.Div, LayoutComponent):
|
|
22
|
+
"""Component for creating flex layouts."""
|
|
23
|
+
|
|
24
|
+
tag = "Flex"
|
|
25
|
+
|
|
26
|
+
# Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
27
|
+
as_child: Var[bool]
|
|
28
|
+
|
|
29
|
+
# How to display the element: "none" | "inline-flex" | "flex"
|
|
30
|
+
display: Var[LiteralFlexDisplay]
|
|
31
|
+
|
|
32
|
+
# How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse"
|
|
33
|
+
direction: Var[LiteralFlexDirection]
|
|
34
|
+
|
|
35
|
+
# Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
|
|
36
|
+
align: Var[LiteralAlign]
|
|
37
|
+
|
|
38
|
+
# Alignment of children along the cross axis: "start" | "center" | "end" | "between"
|
|
39
|
+
justify: Var[LiteralJustify]
|
|
40
|
+
|
|
41
|
+
# Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse"
|
|
42
|
+
wrap: Var[LiteralFlexWrap]
|
|
43
|
+
|
|
44
|
+
# Gap between children: "0" - "9"
|
|
45
|
+
gap: Var[LiteralSize]
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
"""Stub file for reflex/components/radix/themes/layout/flex.py"""
|
|
2
|
+
# ------------------- DO NOT EDIT ----------------------
|
|
3
|
+
# This file was generated by `scripts/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 typing import Literal
|
|
11
|
+
from reflex import el
|
|
12
|
+
from reflex.vars import Var
|
|
13
|
+
from ..base import LiteralAlign, LiteralJustify, LiteralSize
|
|
14
|
+
from .base import LayoutComponent
|
|
15
|
+
|
|
16
|
+
LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"]
|
|
17
|
+
LiteralFlexDisplay = Literal["none", "inline-flex", "flex"]
|
|
18
|
+
LiteralFlexWrap = Literal["nowrap", "wrap", "wrap-reverse"]
|
|
19
|
+
|
|
20
|
+
class Flex(el.Div, LayoutComponent):
|
|
21
|
+
@overload
|
|
22
|
+
@classmethod
|
|
23
|
+
def create( # type: ignore
|
|
24
|
+
cls,
|
|
25
|
+
*children,
|
|
26
|
+
as_child: Optional[Union[Var[bool], bool]] = None,
|
|
27
|
+
display: Optional[
|
|
28
|
+
Union[
|
|
29
|
+
Var[Literal["none", "inline-flex", "flex"]],
|
|
30
|
+
Literal["none", "inline-flex", "flex"],
|
|
31
|
+
]
|
|
32
|
+
] = None,
|
|
33
|
+
direction: Optional[
|
|
34
|
+
Union[
|
|
35
|
+
Var[Literal["row", "column", "row-reverse", "column-reverse"]],
|
|
36
|
+
Literal["row", "column", "row-reverse", "column-reverse"],
|
|
37
|
+
]
|
|
38
|
+
] = None,
|
|
39
|
+
align: Optional[
|
|
40
|
+
Union[
|
|
41
|
+
Var[Literal["start", "center", "end", "baseline", "stretch"]],
|
|
42
|
+
Literal["start", "center", "end", "baseline", "stretch"],
|
|
43
|
+
]
|
|
44
|
+
] = None,
|
|
45
|
+
justify: Optional[
|
|
46
|
+
Union[
|
|
47
|
+
Var[Literal["start", "center", "end", "between"]],
|
|
48
|
+
Literal["start", "center", "end", "between"],
|
|
49
|
+
]
|
|
50
|
+
] = None,
|
|
51
|
+
wrap: Optional[
|
|
52
|
+
Union[
|
|
53
|
+
Var[Literal["nowrap", "wrap", "wrap-reverse"]],
|
|
54
|
+
Literal["nowrap", "wrap", "wrap-reverse"],
|
|
55
|
+
]
|
|
56
|
+
] = None,
|
|
57
|
+
gap: Optional[
|
|
58
|
+
Union[
|
|
59
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
60
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
61
|
+
]
|
|
62
|
+
] = None,
|
|
63
|
+
access_key: Optional[
|
|
64
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
65
|
+
] = None,
|
|
66
|
+
auto_capitalize: Optional[
|
|
67
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
68
|
+
] = None,
|
|
69
|
+
content_editable: Optional[
|
|
70
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
71
|
+
] = None,
|
|
72
|
+
context_menu: Optional[
|
|
73
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
74
|
+
] = None,
|
|
75
|
+
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
76
|
+
draggable: Optional[
|
|
77
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
78
|
+
] = None,
|
|
79
|
+
enter_key_hint: Optional[
|
|
80
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
81
|
+
] = None,
|
|
82
|
+
hidden: Optional[
|
|
83
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
84
|
+
] = None,
|
|
85
|
+
input_mode: Optional[
|
|
86
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
87
|
+
] = None,
|
|
88
|
+
item_prop: Optional[
|
|
89
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
90
|
+
] = None,
|
|
91
|
+
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
92
|
+
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
93
|
+
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
94
|
+
spell_check: Optional[
|
|
95
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
96
|
+
] = None,
|
|
97
|
+
tab_index: Optional[
|
|
98
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
99
|
+
] = None,
|
|
100
|
+
title: Optional[
|
|
101
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
102
|
+
] = None,
|
|
103
|
+
translate: Optional[
|
|
104
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
105
|
+
] = None,
|
|
106
|
+
p: Optional[
|
|
107
|
+
Union[
|
|
108
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
109
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
110
|
+
]
|
|
111
|
+
] = None,
|
|
112
|
+
px: Optional[
|
|
113
|
+
Union[
|
|
114
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
115
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
116
|
+
]
|
|
117
|
+
] = None,
|
|
118
|
+
py: Optional[
|
|
119
|
+
Union[
|
|
120
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
121
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
122
|
+
]
|
|
123
|
+
] = None,
|
|
124
|
+
pt: Optional[
|
|
125
|
+
Union[
|
|
126
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
127
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
128
|
+
]
|
|
129
|
+
] = None,
|
|
130
|
+
pr: Optional[
|
|
131
|
+
Union[
|
|
132
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
133
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
134
|
+
]
|
|
135
|
+
] = None,
|
|
136
|
+
pb: Optional[
|
|
137
|
+
Union[
|
|
138
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
139
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
140
|
+
]
|
|
141
|
+
] = None,
|
|
142
|
+
pl: Optional[
|
|
143
|
+
Union[
|
|
144
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
145
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
146
|
+
]
|
|
147
|
+
] = None,
|
|
148
|
+
shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None,
|
|
149
|
+
grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None,
|
|
150
|
+
m: Optional[
|
|
151
|
+
Union[
|
|
152
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
153
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
154
|
+
]
|
|
155
|
+
] = None,
|
|
156
|
+
mx: Optional[
|
|
157
|
+
Union[
|
|
158
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
159
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
160
|
+
]
|
|
161
|
+
] = None,
|
|
162
|
+
my: Optional[
|
|
163
|
+
Union[
|
|
164
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
165
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
166
|
+
]
|
|
167
|
+
] = None,
|
|
168
|
+
mt: Optional[
|
|
169
|
+
Union[
|
|
170
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
171
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
172
|
+
]
|
|
173
|
+
] = None,
|
|
174
|
+
mr: Optional[
|
|
175
|
+
Union[
|
|
176
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
177
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
178
|
+
]
|
|
179
|
+
] = None,
|
|
180
|
+
mb: Optional[
|
|
181
|
+
Union[
|
|
182
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
183
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
184
|
+
]
|
|
185
|
+
] = None,
|
|
186
|
+
ml: Optional[
|
|
187
|
+
Union[
|
|
188
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
189
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
190
|
+
]
|
|
191
|
+
] = None,
|
|
192
|
+
style: Optional[Style] = None,
|
|
193
|
+
key: Optional[Any] = None,
|
|
194
|
+
id: Optional[Any] = None,
|
|
195
|
+
class_name: Optional[Any] = None,
|
|
196
|
+
autofocus: Optional[bool] = None,
|
|
197
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
198
|
+
on_blur: Optional[
|
|
199
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
200
|
+
] = None,
|
|
201
|
+
on_click: Optional[
|
|
202
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
203
|
+
] = None,
|
|
204
|
+
on_context_menu: Optional[
|
|
205
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
206
|
+
] = None,
|
|
207
|
+
on_double_click: Optional[
|
|
208
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
209
|
+
] = None,
|
|
210
|
+
on_focus: Optional[
|
|
211
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
212
|
+
] = None,
|
|
213
|
+
on_mount: Optional[
|
|
214
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
215
|
+
] = None,
|
|
216
|
+
on_mouse_down: Optional[
|
|
217
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
218
|
+
] = None,
|
|
219
|
+
on_mouse_enter: Optional[
|
|
220
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
221
|
+
] = None,
|
|
222
|
+
on_mouse_leave: Optional[
|
|
223
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
224
|
+
] = None,
|
|
225
|
+
on_mouse_move: Optional[
|
|
226
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
227
|
+
] = None,
|
|
228
|
+
on_mouse_out: Optional[
|
|
229
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
230
|
+
] = None,
|
|
231
|
+
on_mouse_over: Optional[
|
|
232
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
233
|
+
] = None,
|
|
234
|
+
on_mouse_up: Optional[
|
|
235
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
236
|
+
] = None,
|
|
237
|
+
on_scroll: Optional[
|
|
238
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
239
|
+
] = None,
|
|
240
|
+
on_unmount: Optional[
|
|
241
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
242
|
+
] = None,
|
|
243
|
+
**props
|
|
244
|
+
) -> "Flex":
|
|
245
|
+
"""Create a new component instance.
|
|
246
|
+
|
|
247
|
+
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
248
|
+
other UI libraries for common names, like Text and Button.
|
|
249
|
+
|
|
250
|
+
Args:
|
|
251
|
+
*children: Child components.
|
|
252
|
+
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
253
|
+
display: How to display the element: "none" | "inline-flex" | "flex"
|
|
254
|
+
direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse"
|
|
255
|
+
align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
|
|
256
|
+
justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between"
|
|
257
|
+
wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse"
|
|
258
|
+
gap: Gap between children: "0" - "9"
|
|
259
|
+
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
260
|
+
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
261
|
+
content_editable: Indicates whether the element's content is editable.
|
|
262
|
+
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
|
263
|
+
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
|
264
|
+
draggable: Defines whether the element can be dragged.
|
|
265
|
+
enter_key_hint: Hints what media types the media element is able to play.
|
|
266
|
+
hidden: Defines whether the element is hidden.
|
|
267
|
+
input_mode: Defines the type of the element.
|
|
268
|
+
item_prop: Defines the name of the element for metadata purposes.
|
|
269
|
+
lang: Defines the language used in the element.
|
|
270
|
+
role: Defines the role of the element.
|
|
271
|
+
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
|
272
|
+
spell_check: Defines whether the element may be checked for spelling errors.
|
|
273
|
+
tab_index: Defines the position of the current element in the tabbing order.
|
|
274
|
+
title: Defines a tooltip for the element.
|
|
275
|
+
translate: Specifies whether the content of an element should be translated or not.
|
|
276
|
+
p: Padding: "0" - "9"
|
|
277
|
+
px: Padding horizontal: "0" - "9"
|
|
278
|
+
py: Padding vertical: "0" - "9"
|
|
279
|
+
pt: Padding top: "0" - "9"
|
|
280
|
+
pr: Padding right: "0" - "9"
|
|
281
|
+
pb: Padding bottom: "0" - "9"
|
|
282
|
+
pl: Padding left: "0" - "9"
|
|
283
|
+
shrink: Whether the element will take up the smallest possible space: "0" | "1"
|
|
284
|
+
grow: Whether the element will take up the largest possible space: "0" | "1"
|
|
285
|
+
m: Margin: "0" - "9"
|
|
286
|
+
mx: Margin horizontal: "0" - "9"
|
|
287
|
+
my: Margin vertical: "0" - "9"
|
|
288
|
+
mt: Margin top: "0" - "9"
|
|
289
|
+
mr: Margin right: "0" - "9"
|
|
290
|
+
mb: Margin bottom: "0" - "9"
|
|
291
|
+
ml: Margin left: "0" - "9"
|
|
292
|
+
style: The style of the component.
|
|
293
|
+
key: A unique key for the component.
|
|
294
|
+
id: The id for the component.
|
|
295
|
+
class_name: The class name for the component.
|
|
296
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
297
|
+
custom_attrs: custom attribute
|
|
298
|
+
**props: Component properties.
|
|
299
|
+
|
|
300
|
+
Returns:
|
|
301
|
+
A new component instance.
|
|
302
|
+
"""
|
|
303
|
+
...
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""Declarative layout and common spacing props."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from typing import Literal
|
|
5
|
+
|
|
6
|
+
from reflex import el
|
|
7
|
+
from reflex.vars import Var
|
|
8
|
+
|
|
9
|
+
from ..base import (
|
|
10
|
+
LiteralAlign,
|
|
11
|
+
LiteralJustify,
|
|
12
|
+
LiteralSize,
|
|
13
|
+
RadixThemesComponent,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
LiteralGridDisplay = Literal["none", "inline-grid", "grid"]
|
|
17
|
+
LiteralGridFlow = Literal["row", "column", "dense", "row-dense", "column-dense"]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class Grid(el.Div, RadixThemesComponent):
|
|
21
|
+
"""Component for creating grid layouts."""
|
|
22
|
+
|
|
23
|
+
tag = "Grid"
|
|
24
|
+
|
|
25
|
+
# Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
26
|
+
as_child: Var[bool]
|
|
27
|
+
|
|
28
|
+
# How to display the element: "none" | "inline-grid" | "grid"
|
|
29
|
+
display: Var[LiteralGridDisplay]
|
|
30
|
+
|
|
31
|
+
# Number of columns
|
|
32
|
+
columns: Var[str]
|
|
33
|
+
|
|
34
|
+
# Number of rows
|
|
35
|
+
rows: Var[str]
|
|
36
|
+
|
|
37
|
+
# How the grid items are layed out: "row" | "column" | "dense" | "row-dense" | "column-dense"
|
|
38
|
+
flow: Var[LiteralGridFlow]
|
|
39
|
+
|
|
40
|
+
# Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
|
|
41
|
+
align: Var[LiteralAlign]
|
|
42
|
+
|
|
43
|
+
# Alignment of children along the cross axis: "start" | "center" | "end" | "between"
|
|
44
|
+
justify: Var[LiteralJustify]
|
|
45
|
+
|
|
46
|
+
# Gap between children: "0" - "9"
|
|
47
|
+
gap: Var[LiteralSize]
|
|
48
|
+
|
|
49
|
+
# Gap between children horizontal: "0" - "9"
|
|
50
|
+
gap_x: Var[LiteralSize]
|
|
51
|
+
|
|
52
|
+
# Gap between children vertical: "0" - "9"
|
|
53
|
+
gap_x: Var[LiteralSize]
|