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
|
@@ -11,18 +11,13 @@ from typing import Any, Dict, Literal
|
|
|
11
11
|
from reflex.components.component import Component
|
|
12
12
|
from reflex.components.radix.themes.layout.flex import Flex
|
|
13
13
|
from reflex.components.radix.themes.typography.text import Text
|
|
14
|
+
from reflex.constants import EventTriggers
|
|
14
15
|
from reflex.vars import Var
|
|
15
|
-
from ..base import
|
|
16
|
-
CommonMarginProps,
|
|
17
|
-
LiteralAccentColor,
|
|
18
|
-
LiteralSize,
|
|
19
|
-
LiteralVariant,
|
|
20
|
-
RadixThemesComponent,
|
|
21
|
-
)
|
|
16
|
+
from ..base import LiteralAccentColor, LiteralSize, LiteralVariant, RadixThemesComponent
|
|
22
17
|
|
|
23
18
|
LiteralCheckboxSize = Literal["1", "2", "3"]
|
|
24
19
|
|
|
25
|
-
class Checkbox(
|
|
20
|
+
class Checkbox(RadixThemesComponent):
|
|
26
21
|
def get_event_triggers(self) -> Dict[str, Any]: ...
|
|
27
22
|
@overload
|
|
28
23
|
@classmethod
|
|
@@ -109,58 +104,17 @@ class Checkbox(CommonMarginProps, RadixThemesComponent):
|
|
|
109
104
|
required: Optional[Union[Var[bool], bool]] = None,
|
|
110
105
|
name: Optional[Union[Var[str], str]] = None,
|
|
111
106
|
value: Optional[Union[Var[str], str]] = None,
|
|
112
|
-
m: 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
|
-
mx: 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
|
-
my: 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
|
-
mt: 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
|
-
mr: 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
|
-
mb: 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
|
-
ml: Optional[
|
|
149
|
-
Union[
|
|
150
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
151
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
152
|
-
]
|
|
153
|
-
] = None,
|
|
154
107
|
style: Optional[Style] = None,
|
|
155
108
|
key: Optional[Any] = None,
|
|
156
109
|
id: Optional[Any] = None,
|
|
157
110
|
class_name: Optional[Any] = None,
|
|
158
111
|
autofocus: Optional[bool] = None,
|
|
112
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
159
113
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
160
114
|
on_blur: Optional[
|
|
161
115
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
162
116
|
] = None,
|
|
163
|
-
|
|
117
|
+
on_change: Optional[
|
|
164
118
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
165
119
|
] = None,
|
|
166
120
|
on_click: Optional[
|
|
@@ -226,18 +180,12 @@ class Checkbox(CommonMarginProps, RadixThemesComponent):
|
|
|
226
180
|
required: Whether the checkbox is required
|
|
227
181
|
name: The name of the checkbox control when submitting the form.
|
|
228
182
|
value: The value of the checkbox control when submitting the form.
|
|
229
|
-
|
|
230
|
-
mx: Margin horizontal: "0" - "9"
|
|
231
|
-
my: Margin vertical: "0" - "9"
|
|
232
|
-
mt: Margin top: "0" - "9"
|
|
233
|
-
mr: Margin right: "0" - "9"
|
|
234
|
-
mb: Margin bottom: "0" - "9"
|
|
235
|
-
ml: Margin left: "0" - "9"
|
|
236
|
-
style: The style of the component.
|
|
183
|
+
style: Props to rename The style of the component.
|
|
237
184
|
key: A unique key for the component.
|
|
238
185
|
id: The id for the component.
|
|
239
186
|
class_name: The class name for the component.
|
|
240
187
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
188
|
+
_rename_props: props to change the name of
|
|
241
189
|
custom_attrs: custom attribute
|
|
242
190
|
**props: Component properties.
|
|
243
191
|
|
|
@@ -269,7 +217,7 @@ class HighLevelCheckbox(Checkbox):
|
|
|
269
217
|
Literal["classic", "solid", "soft", "surface", "outline", "ghost"],
|
|
270
218
|
]
|
|
271
219
|
] = None,
|
|
272
|
-
|
|
220
|
+
color_scheme: Optional[
|
|
273
221
|
Union[
|
|
274
222
|
Var[
|
|
275
223
|
Literal[
|
|
@@ -338,58 +286,17 @@ class HighLevelCheckbox(Checkbox):
|
|
|
338
286
|
required: Optional[Union[Var[bool], bool]] = None,
|
|
339
287
|
name: Optional[Union[Var[str], str]] = None,
|
|
340
288
|
value: Optional[Union[Var[str], str]] = None,
|
|
341
|
-
m: Optional[
|
|
342
|
-
Union[
|
|
343
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
344
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
345
|
-
]
|
|
346
|
-
] = None,
|
|
347
|
-
mx: Optional[
|
|
348
|
-
Union[
|
|
349
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
350
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
351
|
-
]
|
|
352
|
-
] = None,
|
|
353
|
-
my: Optional[
|
|
354
|
-
Union[
|
|
355
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
356
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
357
|
-
]
|
|
358
|
-
] = None,
|
|
359
|
-
mt: Optional[
|
|
360
|
-
Union[
|
|
361
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
362
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
363
|
-
]
|
|
364
|
-
] = None,
|
|
365
|
-
mr: Optional[
|
|
366
|
-
Union[
|
|
367
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
368
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
369
|
-
]
|
|
370
|
-
] = None,
|
|
371
|
-
mb: Optional[
|
|
372
|
-
Union[
|
|
373
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
374
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
375
|
-
]
|
|
376
|
-
] = None,
|
|
377
|
-
ml: Optional[
|
|
378
|
-
Union[
|
|
379
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
380
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
381
|
-
]
|
|
382
|
-
] = None,
|
|
383
289
|
style: Optional[Style] = None,
|
|
384
290
|
key: Optional[Any] = None,
|
|
385
291
|
id: Optional[Any] = None,
|
|
386
292
|
class_name: Optional[Any] = None,
|
|
387
293
|
autofocus: Optional[bool] = None,
|
|
294
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
388
295
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
389
296
|
on_blur: Optional[
|
|
390
297
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
391
298
|
] = None,
|
|
392
|
-
|
|
299
|
+
on_change: Optional[
|
|
393
300
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
394
301
|
] = None,
|
|
395
302
|
on_click: Optional[
|
|
@@ -445,7 +352,7 @@ class HighLevelCheckbox(Checkbox):
|
|
|
445
352
|
size: Button size "1" - "3"
|
|
446
353
|
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
447
354
|
variant: Variant of button: "solid" | "soft" | "outline" | "ghost"
|
|
448
|
-
|
|
355
|
+
color_scheme: Override theme color for button
|
|
449
356
|
high_contrast: Whether to render the button with higher contrast color against background
|
|
450
357
|
default_checked: Whether the checkbox is checked by default
|
|
451
358
|
checked: Whether the checkbox is checked
|
|
@@ -453,18 +360,12 @@ class HighLevelCheckbox(Checkbox):
|
|
|
453
360
|
required: Whether the checkbox is required
|
|
454
361
|
name: The name of the checkbox control when submitting the form.
|
|
455
362
|
value: The value of the checkbox control when submitting the form.
|
|
456
|
-
|
|
457
|
-
mx: Margin horizontal: "0" - "9"
|
|
458
|
-
my: Margin vertical: "0" - "9"
|
|
459
|
-
mt: Margin top: "0" - "9"
|
|
460
|
-
mr: Margin right: "0" - "9"
|
|
461
|
-
mb: Margin bottom: "0" - "9"
|
|
462
|
-
ml: Margin left: "0" - "9"
|
|
463
|
-
style: The style of the component.
|
|
363
|
+
style: Props to rename The style of the component.
|
|
464
364
|
key: A unique key for the component.
|
|
465
365
|
id: The id for the component.
|
|
466
366
|
class_name: The class name for the component.
|
|
467
367
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
368
|
+
_rename_props: props to change the name of
|
|
468
369
|
custom_attrs: custom attribute
|
|
469
370
|
**props: Additional properties to apply to the checkbox item.
|
|
470
371
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"""Interactive components provided by @radix-ui/themes."""
|
|
2
2
|
from typing import Any, Dict, Literal
|
|
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
|
RadixThemesComponent,
|
|
10
10
|
)
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
class ContextMenuRoot(
|
|
13
|
+
class ContextMenuRoot(RadixThemesComponent):
|
|
14
14
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
15
15
|
|
|
16
16
|
tag = "ContextMenu.Root"
|
|
@@ -26,11 +26,11 @@ class ContextMenuRoot(CommonMarginProps, RadixThemesComponent):
|
|
|
26
26
|
"""
|
|
27
27
|
return {
|
|
28
28
|
**super().get_event_triggers(),
|
|
29
|
-
|
|
29
|
+
EventTriggers.ON_OPEN_CHANGE: lambda e0: [e0],
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
class ContextMenuTrigger(
|
|
33
|
+
class ContextMenuTrigger(RadixThemesComponent):
|
|
34
34
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
35
35
|
|
|
36
36
|
tag = "ContextMenu.Trigger"
|
|
@@ -39,7 +39,7 @@ class ContextMenuTrigger(CommonMarginProps, RadixThemesComponent):
|
|
|
39
39
|
disabled: Var[bool]
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
class ContextMenuContent(
|
|
42
|
+
class ContextMenuContent(RadixThemesComponent):
|
|
43
43
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
44
44
|
|
|
45
45
|
tag = "ContextMenu.Content"
|
|
@@ -51,7 +51,7 @@ class ContextMenuContent(CommonMarginProps, RadixThemesComponent):
|
|
|
51
51
|
variant: Var[Literal["solid", "soft"]]
|
|
52
52
|
|
|
53
53
|
# Override theme color for button
|
|
54
|
-
|
|
54
|
+
color_scheme: Var[LiteralAccentColor]
|
|
55
55
|
|
|
56
56
|
# Whether to render the button with higher contrast color against background
|
|
57
57
|
high_contrast: Var[bool]
|
|
@@ -70,21 +70,21 @@ class ContextMenuContent(CommonMarginProps, RadixThemesComponent):
|
|
|
70
70
|
"""
|
|
71
71
|
return {
|
|
72
72
|
**super().get_event_triggers(),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
EventTriggers.ON_CLOSE_AUTO_FOCUS: lambda e0: [e0],
|
|
74
|
+
EventTriggers.ON_ESCAPE_KEY_DOWN: lambda e0: [e0],
|
|
75
|
+
EventTriggers.ON_POINTER_DOWN_OUTSIDE: lambda e0: [e0],
|
|
76
|
+
EventTriggers.ON_FOCUS_OUTSIDE: lambda e0: [e0],
|
|
77
|
+
EventTriggers.ON_INTERACT_OUTSIDE: lambda e0: [e0],
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
|
|
81
|
-
class ContextMenuSub(
|
|
81
|
+
class ContextMenuSub(RadixThemesComponent):
|
|
82
82
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
83
83
|
|
|
84
84
|
tag = "ContextMenu.Sub"
|
|
85
85
|
|
|
86
86
|
|
|
87
|
-
class ContextMenuSubTrigger(
|
|
87
|
+
class ContextMenuSubTrigger(RadixThemesComponent):
|
|
88
88
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
89
89
|
|
|
90
90
|
tag = "ContextMenu.SubTrigger"
|
|
@@ -93,7 +93,7 @@ class ContextMenuSubTrigger(CommonMarginProps, RadixThemesComponent):
|
|
|
93
93
|
disabled: Var[bool]
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
class ContextMenuSubContent(
|
|
96
|
+
class ContextMenuSubContent(RadixThemesComponent):
|
|
97
97
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
98
98
|
|
|
99
99
|
tag = "ContextMenu.SubContent"
|
|
@@ -109,26 +109,26 @@ class ContextMenuSubContent(CommonMarginProps, RadixThemesComponent):
|
|
|
109
109
|
"""
|
|
110
110
|
return {
|
|
111
111
|
**super().get_event_triggers(),
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
EventTriggers.ON_ESCAPE_KEY_DOWN: lambda e0: [e0],
|
|
113
|
+
EventTriggers.ON_POINTER_DOWN_OUTSIDE: lambda e0: [e0],
|
|
114
|
+
EventTriggers.ON_FOCUS_OUTSIDE: lambda e0: [e0],
|
|
115
|
+
EventTriggers.ON_INTERACT_OUTSIDE: lambda e0: [e0],
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
|
|
119
|
-
class ContextMenuItem(
|
|
119
|
+
class ContextMenuItem(RadixThemesComponent):
|
|
120
120
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
121
121
|
|
|
122
122
|
tag = "ContextMenu.Item"
|
|
123
123
|
|
|
124
124
|
# Override theme color for button
|
|
125
|
-
|
|
125
|
+
color_scheme: Var[LiteralAccentColor]
|
|
126
126
|
|
|
127
127
|
# Shortcut to render a menu item as a link
|
|
128
128
|
shortcut: Var[str]
|
|
129
129
|
|
|
130
130
|
|
|
131
|
-
class ContextMenuSeparator(
|
|
131
|
+
class ContextMenuSeparator(RadixThemesComponent):
|
|
132
132
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
133
133
|
|
|
134
134
|
tag = "ContextMenu.Separator"
|