reflex 0.3.9a2__py3-none-any.whl → 0.3.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of reflex might be problematic. Click here for more details.
- reflex/__init__.py +3 -1
- reflex/__init__.pyi +3 -1
- reflex/app.py +13 -5
- reflex/compiler/utils.py +13 -12
- reflex/components/base/app_wrap.pyi +1 -0
- reflex/components/base/body.pyi +2 -0
- reflex/components/base/document.pyi +10 -0
- reflex/components/base/fragment.pyi +2 -0
- reflex/components/base/head.pyi +4 -0
- reflex/components/base/link.pyi +4 -0
- reflex/components/base/meta.pyi +8 -0
- reflex/components/base/script.pyi +2 -0
- reflex/components/chakra/base.pyi +7 -0
- reflex/components/chakra/datadisplay/badge.pyi +2 -0
- reflex/components/chakra/datadisplay/code.pyi +4 -0
- reflex/components/chakra/datadisplay/divider.pyi +2 -0
- reflex/components/chakra/datadisplay/keyboard_key.pyi +2 -0
- reflex/components/chakra/datadisplay/list.pyi +8 -0
- reflex/components/chakra/datadisplay/stat.pyi +12 -0
- reflex/components/chakra/datadisplay/table.pyi +18 -0
- reflex/components/chakra/datadisplay/tag.pyi +9 -0
- reflex/components/chakra/disclosure/accordion.pyi +10 -0
- reflex/components/chakra/disclosure/tabs.py +8 -0
- reflex/components/chakra/disclosure/tabs.pyi +10 -0
- reflex/components/chakra/disclosure/transition.pyi +12 -0
- reflex/components/chakra/disclosure/visuallyhidden.pyi +2 -0
- reflex/components/chakra/feedback/alert.pyi +8 -0
- reflex/components/chakra/feedback/circularprogress.pyi +4 -0
- reflex/components/chakra/feedback/progress.pyi +2 -0
- reflex/components/chakra/feedback/skeleton.pyi +6 -0
- reflex/components/chakra/feedback/spinner.pyi +2 -0
- reflex/components/chakra/forms/button.pyi +4 -0
- reflex/components/chakra/forms/checkbox.pyi +4 -0
- reflex/components/chakra/forms/colormodeswitch.pyi +7 -0
- reflex/components/chakra/forms/date_picker.pyi +2 -0
- reflex/components/chakra/forms/date_time_picker.pyi +2 -0
- reflex/components/chakra/forms/editable.pyi +8 -0
- reflex/components/chakra/forms/email.pyi +2 -0
- reflex/components/chakra/forms/form.pyi +10 -0
- reflex/components/chakra/forms/iconbutton.py +1 -0
- reflex/components/chakra/forms/iconbutton.pyi +2 -0
- reflex/components/chakra/forms/input.pyi +12 -0
- reflex/components/chakra/forms/numberinput.pyi +10 -0
- reflex/components/chakra/forms/password.pyi +2 -0
- reflex/components/chakra/forms/pininput.pyi +4 -0
- reflex/components/chakra/forms/radio.pyi +4 -0
- reflex/components/chakra/forms/rangeslider.pyi +8 -0
- reflex/components/chakra/forms/select.pyi +4 -0
- reflex/components/chakra/forms/slider.pyi +10 -0
- reflex/components/chakra/forms/switch.pyi +2 -0
- reflex/components/chakra/forms/textarea.pyi +2 -0
- reflex/components/chakra/forms/time_picker.pyi +2 -0
- reflex/components/chakra/layout/aspect_ratio.pyi +2 -0
- reflex/components/chakra/layout/box.pyi +2 -0
- reflex/components/chakra/layout/card.pyi +7 -0
- reflex/components/chakra/layout/center.pyi +6 -0
- reflex/components/chakra/layout/container.pyi +2 -0
- reflex/components/chakra/layout/flex.pyi +2 -0
- reflex/components/chakra/layout/grid.pyi +6 -0
- reflex/components/chakra/layout/html.pyi +2 -0
- reflex/components/chakra/layout/spacer.pyi +2 -0
- reflex/components/chakra/layout/stack.pyi +6 -0
- reflex/components/chakra/layout/wrap.pyi +4 -0
- reflex/components/chakra/media/avatar.pyi +6 -0
- reflex/components/chakra/media/icon.pyi +4 -0
- reflex/components/chakra/media/image.pyi +2 -0
- reflex/components/chakra/navigation/breadcrumb.pyi +8 -0
- reflex/components/chakra/navigation/link.pyi +2 -0
- reflex/components/chakra/navigation/linkoverlay.pyi +4 -0
- reflex/components/chakra/navigation/stepper.pyi +18 -0
- reflex/components/chakra/overlay/alertdialog.pyi +14 -0
- reflex/components/chakra/overlay/drawer.pyi +14 -0
- reflex/components/chakra/overlay/menu.pyi +16 -0
- reflex/components/chakra/overlay/modal.pyi +14 -0
- reflex/components/chakra/overlay/popover.pyi +18 -0
- reflex/components/chakra/overlay/tooltip.pyi +2 -0
- reflex/components/chakra/typography/heading.pyi +2 -0
- reflex/components/chakra/typography/highlight.pyi +2 -0
- reflex/components/chakra/typography/span.pyi +2 -0
- reflex/components/chakra/typography/text.pyi +2 -0
- reflex/components/component.py +41 -3
- reflex/components/core/__init__.py +2 -0
- reflex/components/core/banner.pyi +3 -0
- reflex/components/core/client_side_routing.pyi +4 -0
- reflex/components/core/colors.py +21 -0
- reflex/components/core/cond.py +11 -2
- reflex/components/core/debounce.pyi +1 -0
- reflex/components/core/layout/__init__.py +1 -0
- reflex/components/core/match.py +44 -18
- reflex/components/core/upload.py +8 -2
- reflex/components/core/upload.pyi +7 -1
- reflex/components/datadisplay/dataeditor.pyi +2 -0
- reflex/components/el/element.pyi +2 -0
- reflex/components/el/elements/base.pyi +2 -0
- reflex/components/el/elements/forms.py +3 -0
- reflex/components/el/elements/forms.pyi +32 -0
- reflex/components/el/elements/inline.pyi +56 -0
- reflex/components/el/elements/media.pyi +28 -0
- reflex/components/el/elements/metadata.pyi +10 -0
- reflex/components/el/elements/other.pyi +14 -0
- reflex/components/el/elements/scripts.pyi +6 -0
- reflex/components/el/elements/sectioning.pyi +30 -0
- reflex/components/el/elements/tables.pyi +20 -0
- reflex/components/el/elements/typography.pyi +30 -0
- reflex/components/gridjs/datatable.pyi +4 -0
- reflex/components/lucide/__init__.py +5 -0
- reflex/components/lucide/icon.py +1484 -0
- reflex/components/lucide/icon.pyi +1594 -0
- reflex/components/markdown/markdown.pyi +2 -0
- reflex/components/moment/moment.pyi +2 -0
- reflex/components/next/base.pyi +2 -0
- reflex/components/next/image.pyi +2 -0
- reflex/components/next/link.pyi +2 -0
- reflex/components/next/video.pyi +2 -0
- reflex/components/plotly/plotly.pyi +4 -0
- reflex/components/radix/primitives/__init__.py +10 -0
- reflex/components/radix/primitives/accordion.py +51 -32
- reflex/components/radix/primitives/accordion.pyi +16 -3
- reflex/components/radix/primitives/base.pyi +4 -0
- reflex/components/radix/primitives/drawer.py +240 -0
- reflex/components/radix/primitives/drawer.pyi +814 -0
- reflex/components/radix/primitives/form.py +40 -7
- reflex/components/radix/primitives/form.pyi +32 -10
- reflex/components/radix/primitives/progress.py +2 -2
- reflex/components/radix/primitives/progress.pyi +6 -0
- reflex/components/radix/primitives/slider.pyi +10 -0
- reflex/components/radix/themes/base.py +46 -12
- reflex/components/radix/themes/base.pyi +23 -9
- reflex/components/radix/themes/components/__init__.py +4 -2
- reflex/components/radix/themes/components/alertdialog.py +13 -12
- reflex/components/radix/themes/components/alertdialog.pyi +23 -351
- reflex/components/radix/themes/components/aspectratio.py +2 -5
- reflex/components/radix/themes/components/aspectratio.pyi +4 -51
- reflex/components/radix/themes/components/avatar.py +3 -4
- reflex/components/radix/themes/components/avatar.pyi +4 -57
- reflex/components/radix/themes/components/badge.py +3 -4
- reflex/components/radix/themes/components/badge.pyi +4 -56
- reflex/components/radix/themes/components/button.py +2 -3
- reflex/components/radix/themes/components/button.pyi +3 -51
- reflex/components/radix/themes/components/callout.py +9 -12
- reflex/components/radix/themes/components/callout.pyi +24 -217
- reflex/components/radix/themes/components/card.py +1 -2
- reflex/components/radix/themes/components/card.pyi +4 -51
- reflex/components/radix/themes/components/checkbox.py +11 -5
- reflex/components/radix/themes/components/checkbox.pyi +13 -112
- reflex/components/radix/themes/components/contextmenu.py +21 -21
- reflex/components/radix/themes/components/contextmenu.pyi +26 -401
- reflex/components/radix/themes/components/dialog.py +13 -16
- reflex/components/radix/themes/components/dialog.pyi +20 -303
- reflex/components/radix/themes/components/dropdownmenu.py +196 -32
- reflex/components/radix/themes/components/dropdownmenu.pyi +147 -389
- reflex/components/radix/themes/components/hovercard.py +5 -5
- reflex/components/radix/themes/components/hovercard.pyi +11 -151
- reflex/components/radix/themes/components/iconbutton.py +56 -4
- reflex/components/radix/themes/components/iconbutton.pyi +25 -71
- reflex/components/radix/themes/components/icons.pyi +4 -0
- reflex/components/radix/themes/components/inset.py +1 -2
- reflex/components/radix/themes/components/inset.pyi +4 -51
- reflex/components/radix/themes/components/popover.py +12 -12
- reflex/components/radix/themes/components/popover.pyi +14 -201
- reflex/components/radix/themes/components/radiogroup.py +47 -20
- reflex/components/radix/themes/components/radiogroup.pyi +26 -171
- reflex/components/radix/themes/components/scrollarea.py +2 -3
- reflex/components/radix/themes/components/scrollarea.pyi +4 -51
- reflex/components/radix/themes/components/select.py +28 -25
- reflex/components/radix/themes/components/select.pyi +43 -419
- reflex/components/radix/themes/components/separator.py +4 -5
- reflex/components/radix/themes/components/separator.pyi +5 -52
- reflex/components/radix/themes/components/slider.py +8 -5
- reflex/components/radix/themes/components/slider.pyi +9 -60
- reflex/components/radix/themes/components/switch.py +6 -4
- reflex/components/radix/themes/components/switch.pyi +5 -53
- reflex/components/radix/themes/components/table.py +14 -15
- reflex/components/radix/themes/components/table.pyi +22 -351
- reflex/components/radix/themes/components/tabs.py +9 -6
- reflex/components/radix/themes/components/tabs.pyi +18 -205
- reflex/components/radix/themes/components/textarea.py +2 -3
- reflex/components/radix/themes/components/textarea.pyi +10 -53
- reflex/components/radix/themes/components/textfield.py +105 -4
- reflex/components/radix/themes/components/textfield.pyi +200 -108
- reflex/components/radix/themes/components/tooltip.py +102 -2
- reflex/components/radix/themes/components/tooltip.pyi +66 -110
- reflex/components/radix/themes/layout/__init__.py +7 -0
- reflex/components/radix/themes/layout/base.pyi +2 -0
- reflex/components/radix/themes/layout/box.py +2 -2
- reflex/components/radix/themes/layout/box.pyi +4 -104
- reflex/components/radix/themes/layout/center.py +19 -0
- reflex/components/radix/themes/layout/center.pyi +261 -0
- reflex/components/radix/themes/layout/container.py +2 -2
- reflex/components/radix/themes/layout/container.pyi +4 -104
- reflex/components/radix/themes/layout/flex.py +2 -2
- reflex/components/radix/themes/layout/flex.pyi +4 -105
- reflex/components/radix/themes/layout/grid.pyi +2 -0
- reflex/components/radix/themes/layout/section.py +2 -2
- reflex/components/radix/themes/layout/section.pyi +4 -104
- reflex/components/radix/themes/layout/spacer.py +19 -0
- reflex/components/radix/themes/layout/spacer.pyi +261 -0
- reflex/components/radix/themes/layout/stack.py +60 -0
- reflex/components/radix/themes/layout/stack.pyi +537 -0
- reflex/components/radix/themes/typography/blockquote.py +2 -3
- reflex/components/radix/themes/typography/blockquote.pyi +4 -51
- reflex/components/radix/themes/typography/code.py +2 -3
- reflex/components/radix/themes/typography/code.pyi +4 -56
- reflex/components/radix/themes/typography/em.py +1 -2
- reflex/components/radix/themes/typography/em.pyi +4 -51
- reflex/components/radix/themes/typography/heading.py +2 -3
- reflex/components/radix/themes/typography/heading.pyi +4 -51
- reflex/components/radix/themes/typography/kbd.py +1 -2
- reflex/components/radix/themes/typography/kbd.pyi +4 -51
- reflex/components/radix/themes/typography/link.py +34 -3
- reflex/components/radix/themes/typography/link.pyi +41 -86
- reflex/components/radix/themes/typography/quote.py +1 -2
- reflex/components/radix/themes/typography/quote.pyi +4 -51
- reflex/components/radix/themes/typography/strong.py +1 -2
- reflex/components/radix/themes/typography/strong.pyi +4 -51
- reflex/components/radix/themes/typography/text.py +2 -3
- reflex/components/radix/themes/typography/text.pyi +4 -51
- reflex/components/radix/themes/typography.py +10 -11
- reflex/components/react_player/audio.pyi +2 -0
- reflex/components/react_player/react_player.pyi +2 -0
- reflex/components/react_player/video.pyi +2 -0
- reflex/components/recharts/cartesian.pyi +38 -0
- reflex/components/recharts/charts.pyi +22 -0
- reflex/components/recharts/general.pyi +10 -0
- reflex/components/recharts/polar.pyi +12 -0
- reflex/components/recharts/recharts.pyi +4 -0
- reflex/components/suneditor/editor.pyi +2 -0
- reflex/components/tags/tag.py +1 -1
- reflex/constants/base.py +5 -1
- reflex/constants/colors.py +80 -0
- reflex/constants/event.py +10 -1
- reflex/page.py +1 -1
- reflex/reflex.py +4 -0
- reflex/style.py +8 -3
- reflex/testing.py +21 -10
- reflex/utils/format.py +13 -9
- reflex/utils/prerequisites.py +41 -3
- reflex/utils/serializers.py +14 -0
- reflex/utils/telemetry.py +8 -2
- reflex/utils/types.py +36 -2
- reflex/vars.py +53 -18
- {reflex-0.3.9a2.dist-info → reflex-0.3.10.dist-info}/METADATA +1 -2
- {reflex-0.3.9a2.dist-info → reflex-0.3.10.dist-info}/RECORD +246 -232
- {reflex-0.3.9a2.dist-info → reflex-0.3.10.dist-info}/WHEEL +1 -1
- {reflex-0.3.9a2.dist-info → reflex-0.3.10.dist-info}/LICENSE +0 -0
- {reflex-0.3.9a2.dist-info → reflex-0.3.10.dist-info}/entry_points.txt +0 -0
|
@@ -10,11 +10,11 @@ from reflex.style import Style
|
|
|
10
10
|
from typing import Literal
|
|
11
11
|
from reflex import el
|
|
12
12
|
from reflex.vars import Var
|
|
13
|
-
from
|
|
13
|
+
from ..base import RadixThemesComponent
|
|
14
14
|
|
|
15
15
|
LiteralSectionSize = Literal["1", "2", "3"]
|
|
16
16
|
|
|
17
|
-
class Section(el.Section,
|
|
17
|
+
class Section(el.Section, RadixThemesComponent):
|
|
18
18
|
@overload
|
|
19
19
|
@classmethod
|
|
20
20
|
def create( # type: ignore
|
|
@@ -129,97 +129,12 @@ class Section(el.Section, LayoutComponent):
|
|
|
129
129
|
translate: Optional[
|
|
130
130
|
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
131
131
|
] = None,
|
|
132
|
-
p: Optional[
|
|
133
|
-
Union[
|
|
134
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
135
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
136
|
-
]
|
|
137
|
-
] = None,
|
|
138
|
-
px: Optional[
|
|
139
|
-
Union[
|
|
140
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
141
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
142
|
-
]
|
|
143
|
-
] = None,
|
|
144
|
-
py: Optional[
|
|
145
|
-
Union[
|
|
146
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
147
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
148
|
-
]
|
|
149
|
-
] = None,
|
|
150
|
-
pt: 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
|
-
pr: 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
|
-
pb: 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
|
-
pl: 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
|
-
shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None,
|
|
175
|
-
grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None,
|
|
176
|
-
m: Optional[
|
|
177
|
-
Union[
|
|
178
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
179
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
180
|
-
]
|
|
181
|
-
] = None,
|
|
182
|
-
mx: Optional[
|
|
183
|
-
Union[
|
|
184
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
185
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
186
|
-
]
|
|
187
|
-
] = None,
|
|
188
|
-
my: Optional[
|
|
189
|
-
Union[
|
|
190
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
191
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
192
|
-
]
|
|
193
|
-
] = None,
|
|
194
|
-
mt: Optional[
|
|
195
|
-
Union[
|
|
196
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
197
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
198
|
-
]
|
|
199
|
-
] = None,
|
|
200
|
-
mr: Optional[
|
|
201
|
-
Union[
|
|
202
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
203
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
204
|
-
]
|
|
205
|
-
] = None,
|
|
206
|
-
mb: Optional[
|
|
207
|
-
Union[
|
|
208
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
209
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
210
|
-
]
|
|
211
|
-
] = None,
|
|
212
|
-
ml: Optional[
|
|
213
|
-
Union[
|
|
214
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
215
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
216
|
-
]
|
|
217
|
-
] = None,
|
|
218
132
|
style: Optional[Style] = None,
|
|
219
133
|
key: Optional[Any] = None,
|
|
220
134
|
id: Optional[Any] = None,
|
|
221
135
|
class_name: Optional[Any] = None,
|
|
222
136
|
autofocus: Optional[bool] = None,
|
|
137
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
223
138
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
224
139
|
on_blur: Optional[
|
|
225
140
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
@@ -295,27 +210,12 @@ class Section(el.Section, LayoutComponent):
|
|
|
295
210
|
tab_index: Defines the position of the current element in the tabbing order.
|
|
296
211
|
title: Defines a tooltip for the element.
|
|
297
212
|
translate: Specifies whether the content of an element should be translated or not.
|
|
298
|
-
p: Padding: "0" - "9"
|
|
299
|
-
px: Padding horizontal: "0" - "9"
|
|
300
|
-
py: Padding vertical: "0" - "9"
|
|
301
|
-
pt: Padding top: "0" - "9"
|
|
302
|
-
pr: Padding right: "0" - "9"
|
|
303
|
-
pb: Padding bottom: "0" - "9"
|
|
304
|
-
pl: Padding left: "0" - "9"
|
|
305
|
-
shrink: Whether the element will take up the smallest possible space: "0" | "1"
|
|
306
|
-
grow: Whether the element will take up the largest possible space: "0" | "1"
|
|
307
|
-
m: Margin: "0" - "9"
|
|
308
|
-
mx: Margin horizontal: "0" - "9"
|
|
309
|
-
my: Margin vertical: "0" - "9"
|
|
310
|
-
mt: Margin top: "0" - "9"
|
|
311
|
-
mr: Margin right: "0" - "9"
|
|
312
|
-
mb: Margin bottom: "0" - "9"
|
|
313
|
-
ml: Margin left: "0" - "9"
|
|
314
213
|
style: The style of the component.
|
|
315
214
|
key: A unique key for the component.
|
|
316
215
|
id: The id for the component.
|
|
317
216
|
class_name: The class name for the component.
|
|
318
217
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
218
|
+
_rename_props: props to change the name of
|
|
319
219
|
custom_attrs: custom attribute
|
|
320
220
|
**props: Component properties.
|
|
321
221
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""A spacer component."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from reflex.components.component import Component
|
|
5
|
+
|
|
6
|
+
from .flex import Flex
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Spacer(Flex):
|
|
10
|
+
"""A spacer component."""
|
|
11
|
+
|
|
12
|
+
def _apply_theme(self, theme: Component):
|
|
13
|
+
self.style.update(
|
|
14
|
+
{
|
|
15
|
+
"flex": 1,
|
|
16
|
+
"justify_self": "stretch",
|
|
17
|
+
"align_self": "stretch",
|
|
18
|
+
}
|
|
19
|
+
)
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"""Stub file for reflex/components/radix/themes/layout/spacer.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 reflex.components.component import Component
|
|
11
|
+
from .flex import Flex
|
|
12
|
+
|
|
13
|
+
class Spacer(Flex):
|
|
14
|
+
@overload
|
|
15
|
+
@classmethod
|
|
16
|
+
def create( # type: ignore
|
|
17
|
+
cls,
|
|
18
|
+
*children,
|
|
19
|
+
color: Optional[Union[Var[str], str]] = None,
|
|
20
|
+
color_scheme: Optional[
|
|
21
|
+
Union[
|
|
22
|
+
Var[
|
|
23
|
+
Literal[
|
|
24
|
+
"tomato",
|
|
25
|
+
"red",
|
|
26
|
+
"ruby",
|
|
27
|
+
"crimson",
|
|
28
|
+
"pink",
|
|
29
|
+
"plum",
|
|
30
|
+
"purple",
|
|
31
|
+
"violet",
|
|
32
|
+
"iris",
|
|
33
|
+
"indigo",
|
|
34
|
+
"blue",
|
|
35
|
+
"cyan",
|
|
36
|
+
"teal",
|
|
37
|
+
"jade",
|
|
38
|
+
"green",
|
|
39
|
+
"grass",
|
|
40
|
+
"brown",
|
|
41
|
+
"orange",
|
|
42
|
+
"sky",
|
|
43
|
+
"mint",
|
|
44
|
+
"lime",
|
|
45
|
+
"yellow",
|
|
46
|
+
"amber",
|
|
47
|
+
"gold",
|
|
48
|
+
"bronze",
|
|
49
|
+
"gray",
|
|
50
|
+
]
|
|
51
|
+
],
|
|
52
|
+
Literal[
|
|
53
|
+
"tomato",
|
|
54
|
+
"red",
|
|
55
|
+
"ruby",
|
|
56
|
+
"crimson",
|
|
57
|
+
"pink",
|
|
58
|
+
"plum",
|
|
59
|
+
"purple",
|
|
60
|
+
"violet",
|
|
61
|
+
"iris",
|
|
62
|
+
"indigo",
|
|
63
|
+
"blue",
|
|
64
|
+
"cyan",
|
|
65
|
+
"teal",
|
|
66
|
+
"jade",
|
|
67
|
+
"green",
|
|
68
|
+
"grass",
|
|
69
|
+
"brown",
|
|
70
|
+
"orange",
|
|
71
|
+
"sky",
|
|
72
|
+
"mint",
|
|
73
|
+
"lime",
|
|
74
|
+
"yellow",
|
|
75
|
+
"amber",
|
|
76
|
+
"gold",
|
|
77
|
+
"bronze",
|
|
78
|
+
"gray",
|
|
79
|
+
],
|
|
80
|
+
]
|
|
81
|
+
] = None,
|
|
82
|
+
as_child: Optional[Union[Var[bool], bool]] = None,
|
|
83
|
+
display: Optional[
|
|
84
|
+
Union[
|
|
85
|
+
Var[Literal["none", "inline-flex", "flex"]],
|
|
86
|
+
Literal["none", "inline-flex", "flex"],
|
|
87
|
+
]
|
|
88
|
+
] = None,
|
|
89
|
+
direction: Optional[
|
|
90
|
+
Union[
|
|
91
|
+
Var[Literal["row", "column", "row-reverse", "column-reverse"]],
|
|
92
|
+
Literal["row", "column", "row-reverse", "column-reverse"],
|
|
93
|
+
]
|
|
94
|
+
] = None,
|
|
95
|
+
align: Optional[
|
|
96
|
+
Union[
|
|
97
|
+
Var[Literal["start", "center", "end", "baseline", "stretch"]],
|
|
98
|
+
Literal["start", "center", "end", "baseline", "stretch"],
|
|
99
|
+
]
|
|
100
|
+
] = None,
|
|
101
|
+
justify: Optional[
|
|
102
|
+
Union[
|
|
103
|
+
Var[Literal["start", "center", "end", "between"]],
|
|
104
|
+
Literal["start", "center", "end", "between"],
|
|
105
|
+
]
|
|
106
|
+
] = None,
|
|
107
|
+
wrap: Optional[
|
|
108
|
+
Union[
|
|
109
|
+
Var[Literal["nowrap", "wrap", "wrap-reverse"]],
|
|
110
|
+
Literal["nowrap", "wrap", "wrap-reverse"],
|
|
111
|
+
]
|
|
112
|
+
] = None,
|
|
113
|
+
gap: 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
|
+
access_key: Optional[
|
|
120
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
121
|
+
] = None,
|
|
122
|
+
auto_capitalize: Optional[
|
|
123
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
124
|
+
] = None,
|
|
125
|
+
content_editable: Optional[
|
|
126
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
127
|
+
] = None,
|
|
128
|
+
context_menu: Optional[
|
|
129
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
130
|
+
] = None,
|
|
131
|
+
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
132
|
+
draggable: Optional[
|
|
133
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
134
|
+
] = None,
|
|
135
|
+
enter_key_hint: Optional[
|
|
136
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
137
|
+
] = None,
|
|
138
|
+
hidden: Optional[
|
|
139
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
140
|
+
] = None,
|
|
141
|
+
input_mode: Optional[
|
|
142
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
143
|
+
] = None,
|
|
144
|
+
item_prop: Optional[
|
|
145
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
146
|
+
] = None,
|
|
147
|
+
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
148
|
+
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
149
|
+
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
150
|
+
spell_check: Optional[
|
|
151
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
152
|
+
] = None,
|
|
153
|
+
tab_index: Optional[
|
|
154
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
155
|
+
] = None,
|
|
156
|
+
title: Optional[
|
|
157
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
158
|
+
] = None,
|
|
159
|
+
translate: Optional[
|
|
160
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
161
|
+
] = None,
|
|
162
|
+
style: Optional[Style] = None,
|
|
163
|
+
key: Optional[Any] = None,
|
|
164
|
+
id: Optional[Any] = None,
|
|
165
|
+
class_name: Optional[Any] = None,
|
|
166
|
+
autofocus: Optional[bool] = None,
|
|
167
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
168
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
169
|
+
on_blur: Optional[
|
|
170
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
171
|
+
] = None,
|
|
172
|
+
on_click: Optional[
|
|
173
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
174
|
+
] = None,
|
|
175
|
+
on_context_menu: Optional[
|
|
176
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
177
|
+
] = None,
|
|
178
|
+
on_double_click: Optional[
|
|
179
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
180
|
+
] = None,
|
|
181
|
+
on_focus: Optional[
|
|
182
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
183
|
+
] = None,
|
|
184
|
+
on_mount: Optional[
|
|
185
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
186
|
+
] = None,
|
|
187
|
+
on_mouse_down: Optional[
|
|
188
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
189
|
+
] = None,
|
|
190
|
+
on_mouse_enter: Optional[
|
|
191
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
192
|
+
] = None,
|
|
193
|
+
on_mouse_leave: Optional[
|
|
194
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
195
|
+
] = None,
|
|
196
|
+
on_mouse_move: Optional[
|
|
197
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
198
|
+
] = None,
|
|
199
|
+
on_mouse_out: Optional[
|
|
200
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
201
|
+
] = None,
|
|
202
|
+
on_mouse_over: Optional[
|
|
203
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
204
|
+
] = None,
|
|
205
|
+
on_mouse_up: Optional[
|
|
206
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
207
|
+
] = None,
|
|
208
|
+
on_scroll: Optional[
|
|
209
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
210
|
+
] = None,
|
|
211
|
+
on_unmount: Optional[
|
|
212
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
213
|
+
] = None,
|
|
214
|
+
**props
|
|
215
|
+
) -> "Spacer":
|
|
216
|
+
"""Create a new component instance.
|
|
217
|
+
|
|
218
|
+
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
219
|
+
other UI libraries for common names, like Text and Button.
|
|
220
|
+
|
|
221
|
+
Args:
|
|
222
|
+
*children: Child components.
|
|
223
|
+
color: map to CSS default color property.
|
|
224
|
+
color_scheme: map to radix color property.
|
|
225
|
+
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
226
|
+
display: How to display the element: "none" | "inline-flex" | "flex"
|
|
227
|
+
direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse"
|
|
228
|
+
align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
|
|
229
|
+
justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between"
|
|
230
|
+
wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse"
|
|
231
|
+
gap: Gap between children: "0" - "9"
|
|
232
|
+
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
233
|
+
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
234
|
+
content_editable: Indicates whether the element's content is editable.
|
|
235
|
+
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
|
236
|
+
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
|
237
|
+
draggable: Defines whether the element can be dragged.
|
|
238
|
+
enter_key_hint: Hints what media types the media element is able to play.
|
|
239
|
+
hidden: Defines whether the element is hidden.
|
|
240
|
+
input_mode: Defines the type of the element.
|
|
241
|
+
item_prop: Defines the name of the element for metadata purposes.
|
|
242
|
+
lang: Defines the language used in the element.
|
|
243
|
+
role: Defines the role of the element.
|
|
244
|
+
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
|
245
|
+
spell_check: Defines whether the element may be checked for spelling errors.
|
|
246
|
+
tab_index: Defines the position of the current element in the tabbing order.
|
|
247
|
+
title: Defines a tooltip for the element.
|
|
248
|
+
translate: Specifies whether the content of an element should be translated or not.
|
|
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
|
+
_rename_props: props to change the name of
|
|
255
|
+
custom_attrs: custom attribute
|
|
256
|
+
**props: Component properties.
|
|
257
|
+
|
|
258
|
+
Returns:
|
|
259
|
+
A new component instance.
|
|
260
|
+
"""
|
|
261
|
+
...
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""Stack components."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from typing import Literal, Optional
|
|
5
|
+
|
|
6
|
+
from reflex.components.component import Component
|
|
7
|
+
|
|
8
|
+
from .flex import Flex
|
|
9
|
+
|
|
10
|
+
LiteralJustify = Literal["start", "center", "end"]
|
|
11
|
+
LiteralAlign = Literal["start", "center", "end", "stretch"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Stack(Flex):
|
|
15
|
+
"""A stack component."""
|
|
16
|
+
|
|
17
|
+
@classmethod
|
|
18
|
+
def create(
|
|
19
|
+
cls,
|
|
20
|
+
*children,
|
|
21
|
+
justify: Optional[LiteralJustify] = "start",
|
|
22
|
+
align: Optional[LiteralAlign] = "center",
|
|
23
|
+
spacing: Optional[str] = "0.5rem",
|
|
24
|
+
**props,
|
|
25
|
+
) -> Component:
|
|
26
|
+
"""Create a new instance of the component.
|
|
27
|
+
|
|
28
|
+
Args:
|
|
29
|
+
*children: The children of the stack.
|
|
30
|
+
justify: The justify of the stack elements.
|
|
31
|
+
align: The alignment of the stack elements.
|
|
32
|
+
spacing: The spacing between each stack item.
|
|
33
|
+
**props: The properties of the stack.
|
|
34
|
+
|
|
35
|
+
Returns:
|
|
36
|
+
The stack component.
|
|
37
|
+
"""
|
|
38
|
+
style = props.setdefault("style", {})
|
|
39
|
+
style.update(
|
|
40
|
+
{
|
|
41
|
+
"alignItems": align,
|
|
42
|
+
"justifyContent": justify,
|
|
43
|
+
"gap": spacing,
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
return super().create(*children, **props)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class VStack(Stack):
|
|
50
|
+
"""A vertical stack component."""
|
|
51
|
+
|
|
52
|
+
def _apply_theme(self, theme: Component):
|
|
53
|
+
self.style.update({"flex_direction": "column"})
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class HStack(Stack):
|
|
57
|
+
"""A horizontal stack component."""
|
|
58
|
+
|
|
59
|
+
def _apply_theme(self, theme: Component):
|
|
60
|
+
self.style.update({"flex_direction": "row"})
|