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
|
@@ -7,8 +7,9 @@ from typing import Any, Dict, Literal, Optional, Union, overload
|
|
|
7
7
|
from reflex.vars import Var, BaseVar, ComputedVar
|
|
8
8
|
from reflex.event import EventChain, EventHandler, EventSpec
|
|
9
9
|
from reflex.style import Style
|
|
10
|
-
from typing import Literal
|
|
10
|
+
from typing import Any, Literal
|
|
11
11
|
from reflex.components import Component
|
|
12
|
+
from reflex.components.tags import Tag
|
|
12
13
|
from reflex.utils import imports
|
|
13
14
|
from reflex.vars import Var
|
|
14
15
|
|
|
@@ -18,7 +19,7 @@ LiteralSize = Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
|
18
19
|
LiteralVariant = Literal["classic", "solid", "soft", "surface", "outline", "ghost"]
|
|
19
20
|
LiteralAppearance = Literal["inherit", "light", "dark"]
|
|
20
21
|
LiteralGrayColor = Literal["gray", "mauve", "slate", "sage", "olive", "sand", "auto"]
|
|
21
|
-
LiteralPanelBackground = Literal["solid", "
|
|
22
|
+
LiteralPanelBackground = Literal["solid", "translucent"]
|
|
22
23
|
LiteralRadius = Literal["none", "small", "medium", "large", "full"]
|
|
23
24
|
LiteralScaling = Literal["90%", "95%", "100%", "105%", "110%"]
|
|
24
25
|
LiteralAccentColor = Literal[
|
|
@@ -103,6 +104,7 @@ class CommonMarginProps(Component):
|
|
|
103
104
|
id: Optional[Any] = None,
|
|
104
105
|
class_name: Optional[Any] = None,
|
|
105
106
|
autofocus: Optional[bool] = None,
|
|
107
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
106
108
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
107
109
|
on_blur: Optional[
|
|
108
110
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
@@ -167,6 +169,7 @@ class CommonMarginProps(Component):
|
|
|
167
169
|
id: The id for the component.
|
|
168
170
|
class_name: The class name for the component.
|
|
169
171
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
172
|
+
_rename_props: props to change the name of
|
|
170
173
|
custom_attrs: custom attribute
|
|
171
174
|
**props: The props of the component.
|
|
172
175
|
|
|
@@ -252,6 +255,7 @@ class RadixThemesComponent(Component):
|
|
|
252
255
|
id: Optional[Any] = None,
|
|
253
256
|
class_name: Optional[Any] = None,
|
|
254
257
|
autofocus: Optional[bool] = None,
|
|
258
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
255
259
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
256
260
|
on_blur: Optional[
|
|
257
261
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
@@ -314,6 +318,7 @@ class RadixThemesComponent(Component):
|
|
|
314
318
|
id: The id for the component.
|
|
315
319
|
class_name: The class name for the component.
|
|
316
320
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
321
|
+
_rename_props: props to change the name of
|
|
317
322
|
custom_attrs: custom attribute
|
|
318
323
|
**props: Component properties.
|
|
319
324
|
|
|
@@ -321,6 +326,8 @@ class RadixThemesComponent(Component):
|
|
|
321
326
|
A new component instance.
|
|
322
327
|
"""
|
|
323
328
|
...
|
|
329
|
+
@classmethod
|
|
330
|
+
def get_fields(cls) -> dict[str, Any]: ...
|
|
324
331
|
|
|
325
332
|
class Theme(RadixThemesComponent):
|
|
326
333
|
@overload
|
|
@@ -467,7 +474,7 @@ class Theme(RadixThemesComponent):
|
|
|
467
474
|
]
|
|
468
475
|
] = None,
|
|
469
476
|
panel_background: Optional[
|
|
470
|
-
Union[Var[Literal["solid", "
|
|
477
|
+
Union[Var[Literal["solid", "translucent"]], Literal["solid", "translucent"]]
|
|
471
478
|
] = None,
|
|
472
479
|
radius: Optional[
|
|
473
480
|
Union[
|
|
@@ -486,6 +493,7 @@ class Theme(RadixThemesComponent):
|
|
|
486
493
|
id: Optional[Any] = None,
|
|
487
494
|
class_name: Optional[Any] = None,
|
|
488
495
|
autofocus: Optional[bool] = None,
|
|
496
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
489
497
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
490
498
|
on_blur: Optional[
|
|
491
499
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
@@ -543,18 +551,19 @@ class Theme(RadixThemesComponent):
|
|
|
543
551
|
*children: Child components.
|
|
544
552
|
color: map to CSS default color property.
|
|
545
553
|
color_scheme: map to radix color property.
|
|
546
|
-
has_background: Whether to apply the themes background color to the theme node.
|
|
547
|
-
appearance: Override light or dark mode theme: "inherit" | "light" | "dark"
|
|
554
|
+
has_background: Whether to apply the themes background color to the theme node. Defaults to True.
|
|
555
|
+
appearance: Override light or dark mode theme: "inherit" | "light" | "dark". Defaults to "inherit".
|
|
548
556
|
accent_color: The color used for default buttons, typography, backgrounds, etc
|
|
549
|
-
gray_color: The shade of gray
|
|
550
|
-
panel_background: Whether panel backgrounds are
|
|
551
|
-
radius: Element border radius: "none" | "small" | "medium" | "large" | "full"
|
|
552
|
-
scaling: Scale of all theme items: "90%" | "95%" | "100%" | "105%" | "110%"
|
|
557
|
+
gray_color: The shade of gray, defaults to "auto".
|
|
558
|
+
panel_background: Whether panel backgrounds are translucent: "solid" | "translucent" (default)
|
|
559
|
+
radius: Element border radius: "none" | "small" | "medium" | "large" | "full". Defaults to "medium".
|
|
560
|
+
scaling: Scale of all theme items: "90%" | "95%" | "100%" | "105%" | "110%". Defaults to "100%"
|
|
553
561
|
style: The style of the component.
|
|
554
562
|
key: A unique key for the component.
|
|
555
563
|
id: The id for the component.
|
|
556
564
|
class_name: The class name for the component.
|
|
557
565
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
566
|
+
_rename_props: props to change the name of
|
|
558
567
|
custom_attrs: custom attribute
|
|
559
568
|
**props: Component properties.
|
|
560
569
|
|
|
@@ -638,6 +647,7 @@ class ThemePanel(RadixThemesComponent):
|
|
|
638
647
|
id: Optional[Any] = None,
|
|
639
648
|
class_name: Optional[Any] = None,
|
|
640
649
|
autofocus: Optional[bool] = None,
|
|
650
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
641
651
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
642
652
|
on_blur: Optional[
|
|
643
653
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
@@ -695,11 +705,13 @@ class ThemePanel(RadixThemesComponent):
|
|
|
695
705
|
*children: Child components.
|
|
696
706
|
color: map to CSS default color property.
|
|
697
707
|
color_scheme: map to radix color property.
|
|
708
|
+
default_open: Whether the panel is open. Defaults to False.
|
|
698
709
|
style: The style of the component.
|
|
699
710
|
key: A unique key for the component.
|
|
700
711
|
id: The id for the component.
|
|
701
712
|
class_name: The class name for the component.
|
|
702
713
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
714
|
+
_rename_props: props to change the name of
|
|
703
715
|
custom_attrs: custom attribute
|
|
704
716
|
**props: Component properties.
|
|
705
717
|
|
|
@@ -719,6 +731,7 @@ class RadixThemesColorModeProvider(Component):
|
|
|
719
731
|
id: Optional[Any] = None,
|
|
720
732
|
class_name: Optional[Any] = None,
|
|
721
733
|
autofocus: Optional[bool] = None,
|
|
734
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
722
735
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
723
736
|
on_blur: Optional[
|
|
724
737
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
@@ -776,6 +789,7 @@ class RadixThemesColorModeProvider(Component):
|
|
|
776
789
|
id: The id for the component.
|
|
777
790
|
class_name: The class name for the component.
|
|
778
791
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
792
|
+
_rename_props: props to change the name of
|
|
779
793
|
custom_attrs: custom attribute
|
|
780
794
|
**props: The props of the component.
|
|
781
795
|
|
|
@@ -13,7 +13,7 @@ from .aspectratio import AspectRatio
|
|
|
13
13
|
from .avatar import Avatar
|
|
14
14
|
from .badge import Badge
|
|
15
15
|
from .button import Button
|
|
16
|
-
from .callout import CalloutIcon, CalloutRoot, CalloutText
|
|
16
|
+
from .callout import Callout, CalloutIcon, CalloutRoot, CalloutText
|
|
17
17
|
from .card import Card
|
|
18
18
|
from .checkbox import Checkbox, HighLevelCheckbox
|
|
19
19
|
from .contextmenu import (
|
|
@@ -75,7 +75,7 @@ from .table import (
|
|
|
75
75
|
)
|
|
76
76
|
from .tabs import TabsContent, TabsList, TabsRoot, TabsTrigger
|
|
77
77
|
from .textarea import TextArea
|
|
78
|
-
from .textfield import TextFieldInput, TextFieldRoot, TextFieldSlot
|
|
78
|
+
from .textfield import Input, TextFieldInput, TextFieldRoot, TextFieldSlot
|
|
79
79
|
from .tooltip import Tooltip
|
|
80
80
|
|
|
81
81
|
# Alert Dialog
|
|
@@ -103,6 +103,7 @@ button = Button.create
|
|
|
103
103
|
callout_root = CalloutRoot.create
|
|
104
104
|
callout_icon = CalloutIcon.create
|
|
105
105
|
callout_text = CalloutText.create
|
|
106
|
+
callout = Callout.create
|
|
106
107
|
|
|
107
108
|
# Card
|
|
108
109
|
card = Card.create
|
|
@@ -209,6 +210,7 @@ textarea = TextArea.create
|
|
|
209
210
|
textfield_root = TextFieldRoot.create
|
|
210
211
|
textfield_input = TextFieldInput.create
|
|
211
212
|
textfield_slot = TextFieldSlot.create
|
|
213
|
+
input = Input.create
|
|
212
214
|
|
|
213
215
|
# Tooltip
|
|
214
216
|
tooltip = Tooltip.create
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
from typing import Any, Dict, Literal
|
|
3
3
|
|
|
4
4
|
from reflex import el
|
|
5
|
+
from reflex.constants import EventTriggers
|
|
5
6
|
from reflex.vars import Var
|
|
6
7
|
|
|
7
|
-
from ..base import
|
|
8
|
+
from ..base import LiteralSize, RadixThemesComponent
|
|
8
9
|
|
|
9
10
|
LiteralSwitchSize = Literal["1", "2", "3", "4"]
|
|
10
11
|
|
|
11
12
|
|
|
12
|
-
class AlertDialogRoot(
|
|
13
|
+
class AlertDialogRoot(RadixThemesComponent):
|
|
13
14
|
"""Contains all the parts of the dialog."""
|
|
14
15
|
|
|
15
16
|
tag = "AlertDialog.Root"
|
|
@@ -25,17 +26,17 @@ class AlertDialogRoot(CommonMarginProps, RadixThemesComponent):
|
|
|
25
26
|
"""
|
|
26
27
|
return {
|
|
27
28
|
**super().get_event_triggers(),
|
|
28
|
-
|
|
29
|
+
EventTriggers.ON_OPEN_CHANGE: lambda e0: [e0],
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
|
|
32
|
-
class AlertDialogTrigger(
|
|
33
|
+
class AlertDialogTrigger(RadixThemesComponent):
|
|
33
34
|
"""Wraps the control that will open the dialog."""
|
|
34
35
|
|
|
35
36
|
tag = "AlertDialog.Trigger"
|
|
36
37
|
|
|
37
38
|
|
|
38
|
-
class AlertDialogContent(el.Div,
|
|
39
|
+
class AlertDialogContent(el.Div, RadixThemesComponent):
|
|
39
40
|
"""Contains the content of the dialog. This component is based on the div element."""
|
|
40
41
|
|
|
41
42
|
tag = "AlertDialog.Content"
|
|
@@ -54,13 +55,13 @@ class AlertDialogContent(el.Div, CommonMarginProps, RadixThemesComponent):
|
|
|
54
55
|
"""
|
|
55
56
|
return {
|
|
56
57
|
**super().get_event_triggers(),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
EventTriggers.ON_OPEN_AUTO_FOCUS: lambda e0: [e0],
|
|
59
|
+
EventTriggers.ON_CLOSE_AUTO_FOCUS: lambda e0: [e0],
|
|
60
|
+
EventTriggers.ON_ESCAPE_KEY_DOWN: lambda e0: [e0],
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
|
|
63
|
-
class AlertDialogTitle(
|
|
64
|
+
class AlertDialogTitle(RadixThemesComponent):
|
|
64
65
|
"""An accessible title that is announced when the dialog is opened.
|
|
65
66
|
This part is based on the Heading component with a pre-defined font size and
|
|
66
67
|
leading trim on top.
|
|
@@ -69,7 +70,7 @@ class AlertDialogTitle(CommonMarginProps, RadixThemesComponent):
|
|
|
69
70
|
tag = "AlertDialog.Title"
|
|
70
71
|
|
|
71
72
|
|
|
72
|
-
class AlertDialogDescription(
|
|
73
|
+
class AlertDialogDescription(RadixThemesComponent):
|
|
73
74
|
"""An optional accessible description that is announced when the dialog is opened.
|
|
74
75
|
This part is based on the Text component with a pre-defined font size.
|
|
75
76
|
"""
|
|
@@ -77,7 +78,7 @@ class AlertDialogDescription(CommonMarginProps, RadixThemesComponent):
|
|
|
77
78
|
tag = "AlertDialog.Description"
|
|
78
79
|
|
|
79
80
|
|
|
80
|
-
class AlertDialogAction(
|
|
81
|
+
class AlertDialogAction(RadixThemesComponent):
|
|
81
82
|
"""Wraps the control that will close the dialog. This should be distinguished
|
|
82
83
|
visually from the Cancel control.
|
|
83
84
|
"""
|
|
@@ -85,7 +86,7 @@ class AlertDialogAction(CommonMarginProps, RadixThemesComponent):
|
|
|
85
86
|
tag = "AlertDialog.Action"
|
|
86
87
|
|
|
87
88
|
|
|
88
|
-
class AlertDialogCancel(
|
|
89
|
+
class AlertDialogCancel(RadixThemesComponent):
|
|
89
90
|
"""Wraps the control that will close the dialog. This should be distinguished
|
|
90
91
|
visually from the Action control.
|
|
91
92
|
"""
|