reflex 0.3.9a3__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 +116 -86
- reflex/compiler/compiler.py +110 -0
- 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.9a3.dist-info → reflex-0.3.10.dist-info}/METADATA +1 -2
- {reflex-0.3.9a3.dist-info → reflex-0.3.10.dist-info}/RECORD +247 -233
- {reflex-0.3.9a3.dist-info → reflex-0.3.10.dist-info}/WHEEL +1 -1
- {reflex-0.3.9a3.dist-info → reflex-0.3.10.dist-info}/LICENSE +0 -0
- {reflex-0.3.9a3.dist-info → reflex-0.3.10.dist-info}/entry_points.txt +0 -0
|
@@ -4,7 +4,6 @@ from typing import Literal
|
|
|
4
4
|
from reflex.vars import Var
|
|
5
5
|
|
|
6
6
|
from ..base import (
|
|
7
|
-
CommonMarginProps,
|
|
8
7
|
LiteralAccentColor,
|
|
9
8
|
RadixThemesComponent,
|
|
10
9
|
)
|
|
@@ -12,16 +11,16 @@ from ..base import (
|
|
|
12
11
|
LiteralSeperatorSize = Literal["1", "2", "3", "4"]
|
|
13
12
|
|
|
14
13
|
|
|
15
|
-
class Separator(
|
|
14
|
+
class Separator(RadixThemesComponent):
|
|
16
15
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
17
16
|
|
|
18
17
|
tag = "Separator"
|
|
19
18
|
|
|
20
|
-
# The size of the select: "1" | "2" | "3"
|
|
21
|
-
size: Var[LiteralSeperatorSize]
|
|
19
|
+
# The size of the select: "1" | "2" | "3" | "4"
|
|
20
|
+
size: Var[LiteralSeperatorSize] = Var.create_safe("4")
|
|
22
21
|
|
|
23
22
|
# The color of the select
|
|
24
|
-
|
|
23
|
+
color_scheme: Var[LiteralAccentColor]
|
|
25
24
|
|
|
26
25
|
# The orientation of the separator.
|
|
27
26
|
orientation: Var[Literal["horizontal", "vertical"]]
|
|
@@ -9,11 +9,11 @@ from reflex.event import EventChain, EventHandler, EventSpec
|
|
|
9
9
|
from reflex.style import Style
|
|
10
10
|
from typing import Literal
|
|
11
11
|
from reflex.vars import Var
|
|
12
|
-
from ..base import
|
|
12
|
+
from ..base import LiteralAccentColor, RadixThemesComponent
|
|
13
13
|
|
|
14
14
|
LiteralSeperatorSize = Literal["1", "2", "3", "4"]
|
|
15
15
|
|
|
16
|
-
class Separator(
|
|
16
|
+
class Separator(RadixThemesComponent):
|
|
17
17
|
@overload
|
|
18
18
|
@classmethod
|
|
19
19
|
def create( # type: ignore
|
|
@@ -92,53 +92,12 @@ class Separator(CommonMarginProps, RadixThemesComponent):
|
|
|
92
92
|
]
|
|
93
93
|
] = None,
|
|
94
94
|
decorative: Optional[Union[Var[bool], bool]] = None,
|
|
95
|
-
m: Optional[
|
|
96
|
-
Union[
|
|
97
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
98
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
99
|
-
]
|
|
100
|
-
] = None,
|
|
101
|
-
mx: Optional[
|
|
102
|
-
Union[
|
|
103
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
104
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
105
|
-
]
|
|
106
|
-
] = None,
|
|
107
|
-
my: Optional[
|
|
108
|
-
Union[
|
|
109
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
110
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
111
|
-
]
|
|
112
|
-
] = None,
|
|
113
|
-
mt: 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
|
-
mr: 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
|
-
mb: 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
|
-
ml: 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
95
|
style: Optional[Style] = None,
|
|
138
96
|
key: Optional[Any] = None,
|
|
139
97
|
id: Optional[Any] = None,
|
|
140
98
|
class_name: Optional[Any] = None,
|
|
141
99
|
autofocus: Optional[bool] = None,
|
|
100
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
142
101
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
143
102
|
on_blur: Optional[
|
|
144
103
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
@@ -196,21 +155,15 @@ class Separator(CommonMarginProps, RadixThemesComponent):
|
|
|
196
155
|
*children: Child components.
|
|
197
156
|
color: map to CSS default color property.
|
|
198
157
|
color_scheme: map to radix color property.
|
|
199
|
-
size: The size of the select: "1" | "2" | "3"
|
|
158
|
+
size: The size of the select: "1" | "2" | "3" | "4"
|
|
200
159
|
orientation: The orientation of the separator.
|
|
201
160
|
decorative: When true, signifies that it is purely visual, carries no semantic meaning, and ensures it is not present in the accessibility tree.
|
|
202
|
-
m: Margin: "0" - "9"
|
|
203
|
-
mx: Margin horizontal: "0" - "9"
|
|
204
|
-
my: Margin vertical: "0" - "9"
|
|
205
|
-
mt: Margin top: "0" - "9"
|
|
206
|
-
mr: Margin right: "0" - "9"
|
|
207
|
-
mb: Margin bottom: "0" - "9"
|
|
208
|
-
ml: Margin left: "0" - "9"
|
|
209
161
|
style: The style of the component.
|
|
210
162
|
key: A unique key for the component.
|
|
211
163
|
id: The id for the component.
|
|
212
164
|
class_name: The class name for the component.
|
|
213
165
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
166
|
+
_rename_props: props to change the name of
|
|
214
167
|
custom_attrs: custom attribute
|
|
215
168
|
**props: Component properties.
|
|
216
169
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"""Interactive components provided by @radix-ui/themes."""
|
|
2
2
|
from typing import Any, Dict, List, Literal, Union
|
|
3
3
|
|
|
4
|
+
from reflex.constants import EventTriggers
|
|
4
5
|
from reflex.vars import Var
|
|
5
6
|
|
|
6
7
|
from ..base import (
|
|
7
|
-
CommonMarginProps,
|
|
8
8
|
LiteralAccentColor,
|
|
9
9
|
LiteralRadius,
|
|
10
10
|
RadixThemesComponent,
|
|
11
11
|
)
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
class Slider(
|
|
14
|
+
class Slider(RadixThemesComponent):
|
|
15
15
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
16
16
|
|
|
17
17
|
tag = "Slider"
|
|
@@ -26,7 +26,7 @@ class Slider(CommonMarginProps, RadixThemesComponent):
|
|
|
26
26
|
variant: Var[Literal["classic", "surface", "soft"]]
|
|
27
27
|
|
|
28
28
|
# Override theme color for button
|
|
29
|
-
|
|
29
|
+
color_scheme: Var[LiteralAccentColor]
|
|
30
30
|
|
|
31
31
|
# Whether to render the button with higher contrast color against background
|
|
32
32
|
high_contrast: Var[bool]
|
|
@@ -58,6 +58,9 @@ class Slider(CommonMarginProps, RadixThemesComponent):
|
|
|
58
58
|
# The orientation of the slider.
|
|
59
59
|
orientation: Var[Literal["horizontal", "vertical"]]
|
|
60
60
|
|
|
61
|
+
# Props to rename
|
|
62
|
+
_rename_props = {"onChange": "onValueChange"}
|
|
63
|
+
|
|
61
64
|
def get_event_triggers(self) -> Dict[str, Any]:
|
|
62
65
|
"""Get the events triggers signatures for the component.
|
|
63
66
|
|
|
@@ -66,6 +69,6 @@ class Slider(CommonMarginProps, RadixThemesComponent):
|
|
|
66
69
|
"""
|
|
67
70
|
return {
|
|
68
71
|
**super().get_event_triggers(),
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
EventTriggers.ON_CHANGE: lambda e0: [e0],
|
|
73
|
+
EventTriggers.ON_VALUE_COMMIT: lambda e0: [e0],
|
|
71
74
|
}
|
|
@@ -8,15 +8,11 @@ from reflex.vars import Var, BaseVar, ComputedVar
|
|
|
8
8
|
from reflex.event import EventChain, EventHandler, EventSpec
|
|
9
9
|
from reflex.style import Style
|
|
10
10
|
from typing import Any, Dict, List, Literal, Union
|
|
11
|
+
from reflex.constants import EventTriggers
|
|
11
12
|
from reflex.vars import Var
|
|
12
|
-
from ..base import
|
|
13
|
-
CommonMarginProps,
|
|
14
|
-
LiteralAccentColor,
|
|
15
|
-
LiteralRadius,
|
|
16
|
-
RadixThemesComponent,
|
|
17
|
-
)
|
|
13
|
+
from ..base import LiteralAccentColor, LiteralRadius, RadixThemesComponent
|
|
18
14
|
|
|
19
|
-
class Slider(
|
|
15
|
+
class Slider(RadixThemesComponent):
|
|
20
16
|
def get_event_triggers(self) -> Dict[str, Any]: ...
|
|
21
17
|
@overload
|
|
22
18
|
@classmethod
|
|
@@ -120,57 +116,19 @@ class Slider(CommonMarginProps, RadixThemesComponent):
|
|
|
120
116
|
Literal["horizontal", "vertical"],
|
|
121
117
|
]
|
|
122
118
|
] = None,
|
|
123
|
-
m: Optional[
|
|
124
|
-
Union[
|
|
125
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
126
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
127
|
-
]
|
|
128
|
-
] = None,
|
|
129
|
-
mx: Optional[
|
|
130
|
-
Union[
|
|
131
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
132
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
133
|
-
]
|
|
134
|
-
] = None,
|
|
135
|
-
my: Optional[
|
|
136
|
-
Union[
|
|
137
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
138
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
139
|
-
]
|
|
140
|
-
] = None,
|
|
141
|
-
mt: Optional[
|
|
142
|
-
Union[
|
|
143
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
144
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
145
|
-
]
|
|
146
|
-
] = None,
|
|
147
|
-
mr: Optional[
|
|
148
|
-
Union[
|
|
149
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
150
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
151
|
-
]
|
|
152
|
-
] = None,
|
|
153
|
-
mb: Optional[
|
|
154
|
-
Union[
|
|
155
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
156
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
157
|
-
]
|
|
158
|
-
] = None,
|
|
159
|
-
ml: Optional[
|
|
160
|
-
Union[
|
|
161
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
162
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
163
|
-
]
|
|
164
|
-
] = None,
|
|
165
119
|
style: Optional[Style] = None,
|
|
166
120
|
key: Optional[Any] = None,
|
|
167
121
|
id: Optional[Any] = None,
|
|
168
122
|
class_name: Optional[Any] = None,
|
|
169
123
|
autofocus: Optional[bool] = None,
|
|
124
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
170
125
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
171
126
|
on_blur: Optional[
|
|
172
127
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
173
128
|
] = None,
|
|
129
|
+
on_change: Optional[
|
|
130
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
131
|
+
] = None,
|
|
174
132
|
on_click: Optional[
|
|
175
133
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
176
134
|
] = None,
|
|
@@ -213,9 +171,6 @@ class Slider(CommonMarginProps, RadixThemesComponent):
|
|
|
213
171
|
on_unmount: Optional[
|
|
214
172
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
215
173
|
] = None,
|
|
216
|
-
on_value_change: Optional[
|
|
217
|
-
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
218
|
-
] = None,
|
|
219
174
|
on_value_commit: Optional[
|
|
220
175
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
221
176
|
] = None,
|
|
@@ -243,18 +198,12 @@ class Slider(CommonMarginProps, RadixThemesComponent):
|
|
|
243
198
|
step: The step value of the slider.
|
|
244
199
|
disabled: Whether the slider is disabled
|
|
245
200
|
orientation: The orientation of the slider.
|
|
246
|
-
|
|
247
|
-
mx: Margin horizontal: "0" - "9"
|
|
248
|
-
my: Margin vertical: "0" - "9"
|
|
249
|
-
mt: Margin top: "0" - "9"
|
|
250
|
-
mr: Margin right: "0" - "9"
|
|
251
|
-
mb: Margin bottom: "0" - "9"
|
|
252
|
-
ml: Margin left: "0" - "9"
|
|
253
|
-
style: The style of the component.
|
|
201
|
+
style: Props to rename The style of the component.
|
|
254
202
|
key: A unique key for the component.
|
|
255
203
|
id: The id for the component.
|
|
256
204
|
class_name: The class name for the component.
|
|
257
205
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
206
|
+
_rename_props: props to change the name of
|
|
258
207
|
custom_attrs: custom attribute
|
|
259
208
|
**props: Component properties.
|
|
260
209
|
|
|
@@ -5,7 +5,6 @@ from reflex.constants import EventTriggers
|
|
|
5
5
|
from reflex.vars import Var
|
|
6
6
|
|
|
7
7
|
from ..base import (
|
|
8
|
-
CommonMarginProps,
|
|
9
8
|
LiteralAccentColor,
|
|
10
9
|
LiteralRadius,
|
|
11
10
|
LiteralVariant,
|
|
@@ -15,7 +14,7 @@ from ..base import (
|
|
|
15
14
|
LiteralSwitchSize = Literal["1", "2", "3", "4"]
|
|
16
15
|
|
|
17
16
|
|
|
18
|
-
class Switch(
|
|
17
|
+
class Switch(RadixThemesComponent):
|
|
19
18
|
"""A toggle switch alternative to the checkbox."""
|
|
20
19
|
|
|
21
20
|
tag = "Switch"
|
|
@@ -48,7 +47,7 @@ class Switch(CommonMarginProps, RadixThemesComponent):
|
|
|
48
47
|
variant: Var[LiteralVariant]
|
|
49
48
|
|
|
50
49
|
# Override theme color for switch
|
|
51
|
-
|
|
50
|
+
color_scheme: Var[LiteralAccentColor]
|
|
52
51
|
|
|
53
52
|
# Whether to render the switch with higher contrast color against background
|
|
54
53
|
high_contrast: Var[bool]
|
|
@@ -56,6 +55,9 @@ class Switch(CommonMarginProps, RadixThemesComponent):
|
|
|
56
55
|
# Override theme radius for switch: "none" | "small" | "medium" | "large" | "full"
|
|
57
56
|
radius: Var[LiteralRadius]
|
|
58
57
|
|
|
58
|
+
# Props to rename
|
|
59
|
+
_rename_props = {"onChange": "onCheckedChange"}
|
|
60
|
+
|
|
59
61
|
def get_event_triggers(self) -> Dict[str, Any]:
|
|
60
62
|
"""Get the event triggers that pass the component's value to the handler.
|
|
61
63
|
|
|
@@ -64,5 +66,5 @@ class Switch(CommonMarginProps, RadixThemesComponent):
|
|
|
64
66
|
"""
|
|
65
67
|
return {
|
|
66
68
|
**super().get_event_triggers(),
|
|
67
|
-
EventTriggers.
|
|
69
|
+
EventTriggers.ON_CHANGE: lambda checked: [checked],
|
|
68
70
|
}
|
|
@@ -11,7 +11,6 @@ from typing import Any, Dict, Literal
|
|
|
11
11
|
from reflex.constants import EventTriggers
|
|
12
12
|
from reflex.vars import Var
|
|
13
13
|
from ..base import (
|
|
14
|
-
CommonMarginProps,
|
|
15
14
|
LiteralAccentColor,
|
|
16
15
|
LiteralRadius,
|
|
17
16
|
LiteralVariant,
|
|
@@ -20,7 +19,7 @@ from ..base import (
|
|
|
20
19
|
|
|
21
20
|
LiteralSwitchSize = Literal["1", "2", "3", "4"]
|
|
22
21
|
|
|
23
|
-
class Switch(
|
|
22
|
+
class Switch(RadixThemesComponent):
|
|
24
23
|
def get_event_triggers(self) -> Dict[str, Any]: ...
|
|
25
24
|
@overload
|
|
26
25
|
@classmethod
|
|
@@ -113,58 +112,17 @@ class Switch(CommonMarginProps, RadixThemesComponent):
|
|
|
113
112
|
Literal["none", "small", "medium", "large", "full"],
|
|
114
113
|
]
|
|
115
114
|
] = None,
|
|
116
|
-
m: Optional[
|
|
117
|
-
Union[
|
|
118
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
119
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
120
|
-
]
|
|
121
|
-
] = None,
|
|
122
|
-
mx: Optional[
|
|
123
|
-
Union[
|
|
124
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
125
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
126
|
-
]
|
|
127
|
-
] = None,
|
|
128
|
-
my: Optional[
|
|
129
|
-
Union[
|
|
130
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
131
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
132
|
-
]
|
|
133
|
-
] = None,
|
|
134
|
-
mt: Optional[
|
|
135
|
-
Union[
|
|
136
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
137
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
138
|
-
]
|
|
139
|
-
] = None,
|
|
140
|
-
mr: Optional[
|
|
141
|
-
Union[
|
|
142
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
143
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
144
|
-
]
|
|
145
|
-
] = None,
|
|
146
|
-
mb: Optional[
|
|
147
|
-
Union[
|
|
148
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
149
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
150
|
-
]
|
|
151
|
-
] = None,
|
|
152
|
-
ml: Optional[
|
|
153
|
-
Union[
|
|
154
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
155
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
156
|
-
]
|
|
157
|
-
] = None,
|
|
158
115
|
style: Optional[Style] = None,
|
|
159
116
|
key: Optional[Any] = None,
|
|
160
117
|
id: Optional[Any] = None,
|
|
161
118
|
class_name: Optional[Any] = None,
|
|
162
119
|
autofocus: Optional[bool] = None,
|
|
120
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
163
121
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
164
122
|
on_blur: Optional[
|
|
165
123
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
166
124
|
] = None,
|
|
167
|
-
|
|
125
|
+
on_change: Optional[
|
|
168
126
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
169
127
|
] = None,
|
|
170
128
|
on_click: Optional[
|
|
@@ -231,18 +189,12 @@ class Switch(CommonMarginProps, RadixThemesComponent):
|
|
|
231
189
|
variant: Variant of switch: "solid" | "soft" | "outline" | "ghost"
|
|
232
190
|
high_contrast: Whether to render the switch with higher contrast color against background
|
|
233
191
|
radius: Override theme radius for switch: "none" | "small" | "medium" | "large" | "full"
|
|
234
|
-
|
|
235
|
-
mx: Margin horizontal: "0" - "9"
|
|
236
|
-
my: Margin vertical: "0" - "9"
|
|
237
|
-
mt: Margin top: "0" - "9"
|
|
238
|
-
mr: Margin right: "0" - "9"
|
|
239
|
-
mb: Margin bottom: "0" - "9"
|
|
240
|
-
ml: Margin left: "0" - "9"
|
|
241
|
-
style: The style of the component.
|
|
192
|
+
style: Props to rename The style of the component.
|
|
242
193
|
key: A unique key for the component.
|
|
243
194
|
id: The id for the component.
|
|
244
195
|
class_name: The class name for the component.
|
|
245
196
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
197
|
+
_rename_props: props to change the name of
|
|
246
198
|
custom_attrs: custom attribute
|
|
247
199
|
**props: Component properties.
|
|
248
200
|
|
|
@@ -5,13 +5,12 @@ from reflex import el
|
|
|
5
5
|
from reflex.vars import Var
|
|
6
6
|
|
|
7
7
|
from ..base import (
|
|
8
|
-
CommonMarginProps,
|
|
9
8
|
RadixThemesComponent,
|
|
10
9
|
)
|
|
11
10
|
|
|
12
11
|
|
|
13
|
-
class TableRoot(el.Table,
|
|
14
|
-
"""
|
|
12
|
+
class TableRoot(el.Table, RadixThemesComponent):
|
|
13
|
+
"""A semantic table for presenting tabular data."""
|
|
15
14
|
|
|
16
15
|
tag = "Table.Root"
|
|
17
16
|
|
|
@@ -22,14 +21,14 @@ class TableRoot(el.Table, CommonMarginProps, RadixThemesComponent):
|
|
|
22
21
|
variant: Var[Literal["surface", "ghost"]]
|
|
23
22
|
|
|
24
23
|
|
|
25
|
-
class TableHeader(el.Thead,
|
|
26
|
-
"""
|
|
24
|
+
class TableHeader(el.Thead, RadixThemesComponent):
|
|
25
|
+
"""The header of the table defines column names and other non-data elements."""
|
|
27
26
|
|
|
28
27
|
tag = "Table.Header"
|
|
29
28
|
|
|
30
29
|
|
|
31
|
-
class TableRow(el.Tr,
|
|
32
|
-
"""
|
|
30
|
+
class TableRow(el.Tr, RadixThemesComponent):
|
|
31
|
+
"""A row containing table cells."""
|
|
33
32
|
|
|
34
33
|
tag = "Table.Row"
|
|
35
34
|
|
|
@@ -37,8 +36,8 @@ class TableRow(el.Tr, CommonMarginProps, RadixThemesComponent):
|
|
|
37
36
|
align: Var[Literal["start", "center", "end", "baseline"]]
|
|
38
37
|
|
|
39
38
|
|
|
40
|
-
class TableColumnHeaderCell(el.Th,
|
|
41
|
-
"""
|
|
39
|
+
class TableColumnHeaderCell(el.Th, RadixThemesComponent):
|
|
40
|
+
"""A table cell that is semantically treated as a column header."""
|
|
42
41
|
|
|
43
42
|
tag = "Table.ColumnHeaderCell"
|
|
44
43
|
|
|
@@ -49,14 +48,14 @@ class TableColumnHeaderCell(el.Th, CommonMarginProps, RadixThemesComponent):
|
|
|
49
48
|
width: Var[Union[str, int]]
|
|
50
49
|
|
|
51
50
|
|
|
52
|
-
class TableBody(el.Tbody,
|
|
53
|
-
"""
|
|
51
|
+
class TableBody(el.Tbody, RadixThemesComponent):
|
|
52
|
+
"""The body of the table contains the data rows."""
|
|
54
53
|
|
|
55
54
|
tag = "Table.Body"
|
|
56
55
|
|
|
57
56
|
|
|
58
|
-
class TableCell(el.Td,
|
|
59
|
-
"""
|
|
57
|
+
class TableCell(el.Td, RadixThemesComponent):
|
|
58
|
+
"""A cell containing data."""
|
|
60
59
|
|
|
61
60
|
tag = "Table.Cell"
|
|
62
61
|
|
|
@@ -67,8 +66,8 @@ class TableCell(el.Td, CommonMarginProps, RadixThemesComponent):
|
|
|
67
66
|
width: Var[Union[str, int]]
|
|
68
67
|
|
|
69
68
|
|
|
70
|
-
class TableRowHeaderCell(el.Th,
|
|
71
|
-
"""
|
|
69
|
+
class TableRowHeaderCell(el.Th, RadixThemesComponent):
|
|
70
|
+
"""A table cell that is semantically treated as a row header."""
|
|
72
71
|
|
|
73
72
|
tag = "Table.RowHeaderCell"
|
|
74
73
|
|