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,126 +7,67 @@ 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 Any, Dict, Literal, Union
|
|
11
|
+
from reflex.components.component import Component
|
|
12
|
+
from reflex.constants import EventTriggers
|
|
13
|
+
from reflex.utils import format
|
|
10
14
|
from reflex.vars import Var
|
|
11
|
-
from ..base import
|
|
15
|
+
from ..base import RadixThemesComponent
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
LiteralSideType = Literal["top", "right", "bottom", "left"]
|
|
18
|
+
LiteralAlignType = Literal["start", "center", "end"]
|
|
19
|
+
LiteralStickyType = Literal["partial", "always"]
|
|
20
|
+
|
|
21
|
+
class Tooltip(RadixThemesComponent):
|
|
22
|
+
def get_event_triggers(self) -> Dict[str, Any]: ...
|
|
14
23
|
@overload
|
|
15
24
|
@classmethod
|
|
16
25
|
def create( # type: ignore
|
|
17
26
|
cls,
|
|
18
27
|
*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
28
|
content: Optional[Union[Var[str], str]] = None,
|
|
83
|
-
|
|
29
|
+
default_open: Optional[Union[Var[bool], bool]] = None,
|
|
30
|
+
open: Optional[Union[Var[bool], bool]] = None,
|
|
31
|
+
side: Optional[
|
|
84
32
|
Union[
|
|
85
|
-
Var[Literal["
|
|
86
|
-
Literal["
|
|
33
|
+
Var[Literal["top", "right", "bottom", "left"]],
|
|
34
|
+
Literal["top", "right", "bottom", "left"],
|
|
87
35
|
]
|
|
88
36
|
] = None,
|
|
89
|
-
|
|
37
|
+
side_offset: Optional[Union[Var[Union[float, int]], Union[float, int]]] = None,
|
|
38
|
+
align: Optional[
|
|
90
39
|
Union[
|
|
91
|
-
Var[Literal["
|
|
92
|
-
Literal["
|
|
40
|
+
Var[Literal["start", "center", "end"]],
|
|
41
|
+
Literal["start", "center", "end"],
|
|
93
42
|
]
|
|
94
43
|
] = None,
|
|
95
|
-
|
|
44
|
+
align_offset: Optional[Union[Var[Union[float, int]], Union[float, int]]] = None,
|
|
45
|
+
avoid_collisions: Optional[Union[Var[bool], bool]] = None,
|
|
46
|
+
collision_padding: Optional[
|
|
96
47
|
Union[
|
|
97
|
-
Var[
|
|
98
|
-
|
|
48
|
+
Var[Union[float, int, Dict[str, Union[float, int]]]],
|
|
49
|
+
Union[float, int, Dict[str, Union[float, int]]],
|
|
99
50
|
]
|
|
100
51
|
] = None,
|
|
101
|
-
|
|
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
|
-
]
|
|
52
|
+
arrow_padding: Optional[
|
|
53
|
+
Union[Var[Union[float, int]], Union[float, int]]
|
|
106
54
|
] = None,
|
|
107
|
-
|
|
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
|
-
]
|
|
55
|
+
sticky: Optional[
|
|
56
|
+
Union[Var[Literal["partial", "always"]], Literal["partial", "always"]]
|
|
112
57
|
] = None,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
117
|
-
]
|
|
118
|
-
] = None,
|
|
119
|
-
ml: 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
|
-
]
|
|
58
|
+
hide_when_detached: Optional[Union[Var[bool], bool]] = None,
|
|
59
|
+
delay_duration: Optional[
|
|
60
|
+
Union[Var[Union[float, int]], Union[float, int]]
|
|
124
61
|
] = None,
|
|
62
|
+
disable_hoverable_content: Optional[Union[Var[bool], bool]] = None,
|
|
63
|
+
force_mount: Optional[Union[Var[bool], bool]] = None,
|
|
64
|
+
aria_label: Optional[Union[Var[str], str]] = None,
|
|
125
65
|
style: Optional[Style] = None,
|
|
126
66
|
key: Optional[Any] = None,
|
|
127
67
|
id: Optional[Any] = None,
|
|
128
68
|
class_name: Optional[Any] = None,
|
|
129
69
|
autofocus: Optional[bool] = None,
|
|
70
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
130
71
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
131
72
|
on_blur: Optional[
|
|
132
73
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
@@ -140,6 +81,9 @@ class Tooltip(CommonMarginProps, RadixThemesComponent):
|
|
|
140
81
|
on_double_click: Optional[
|
|
141
82
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
142
83
|
] = None,
|
|
84
|
+
on_escape_key_down: Optional[
|
|
85
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
86
|
+
] = None,
|
|
143
87
|
on_focus: Optional[
|
|
144
88
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
145
89
|
] = None,
|
|
@@ -167,6 +111,12 @@ class Tooltip(CommonMarginProps, RadixThemesComponent):
|
|
|
167
111
|
on_mouse_up: Optional[
|
|
168
112
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
169
113
|
] = None,
|
|
114
|
+
on_open_change: Optional[
|
|
115
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
116
|
+
] = None,
|
|
117
|
+
on_pointer_down_outside: Optional[
|
|
118
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
119
|
+
] = None,
|
|
170
120
|
on_scroll: Optional[
|
|
171
121
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
172
122
|
] = None,
|
|
@@ -175,32 +125,38 @@ class Tooltip(CommonMarginProps, RadixThemesComponent):
|
|
|
175
125
|
] = None,
|
|
176
126
|
**props
|
|
177
127
|
) -> "Tooltip":
|
|
178
|
-
"""
|
|
128
|
+
"""Initialize the Tooltip component.
|
|
179
129
|
|
|
180
|
-
|
|
181
|
-
other UI libraries for common names, like Text and Button.
|
|
130
|
+
Run some additional handling on the props.
|
|
182
131
|
|
|
183
132
|
Args:
|
|
184
|
-
*children:
|
|
185
|
-
color: map to CSS default color property.
|
|
186
|
-
color_scheme: map to radix color property.
|
|
133
|
+
*children: The positional arguments
|
|
187
134
|
content: The content of the tooltip.
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
135
|
+
default_open: The open state of the tooltip when it is initially rendered. Use when you do not need to control its open state.
|
|
136
|
+
open: The controlled open state of the tooltip. Must be used in conjunction with `on_open_change`.
|
|
137
|
+
side: The preferred side of the trigger to render against when open. Will be reversed when collisions occur and `avoid_collisions` is enabled.The position of the tooltip. Defaults to "top".
|
|
138
|
+
side_offset: The distance in pixels from the trigger. Defaults to 0.
|
|
139
|
+
align: The preferred alignment against the trigger. May change when collisions occur. Defaults to "center".
|
|
140
|
+
align_offset: An offset in pixels from the "start" or "end" alignment options.
|
|
141
|
+
avoid_collisions: When true, overrides the side and align preferences to prevent collisions with boundary edges. Defaults to True.
|
|
142
|
+
collision_padding: The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { "top": 20, "left": 20 }. Defaults to 0.
|
|
143
|
+
arrow_padding: The padding between the arrow and the edges of the content. If your content has border-radius, this will prevent it from overflowing the corners. Defaults to 0.
|
|
144
|
+
sticky: The sticky behavior on the align axis. "partial" will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to "partial".
|
|
145
|
+
hide_when_detached: Whether to hide the content when the trigger becomes fully occluded. Defaults to False.
|
|
146
|
+
delay_duration: Override the duration in milliseconds to customize the open delay for a specific tooltip. Default is 700.
|
|
147
|
+
disable_hoverable_content: Prevents Tooltip content from remaining open when hovering.
|
|
148
|
+
force_mount: Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries.
|
|
149
|
+
aria_label: By default, screenreaders will announce the content inside the component. If this is not descriptive enough, or you have content that cannot be announced, use aria-label as a more descriptive label.
|
|
195
150
|
style: The style of the component.
|
|
196
151
|
key: A unique key for the component.
|
|
197
152
|
id: The id for the component.
|
|
198
153
|
class_name: The class name for the component.
|
|
199
154
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
155
|
+
_rename_props: props to change the name of
|
|
200
156
|
custom_attrs: custom attribute
|
|
201
|
-
**props:
|
|
157
|
+
**props: The keyword arguments
|
|
202
158
|
|
|
203
159
|
Returns:
|
|
204
|
-
|
|
160
|
+
The created component.
|
|
205
161
|
"""
|
|
206
162
|
...
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
"""Layout components."""
|
|
2
2
|
|
|
3
3
|
from .box import Box
|
|
4
|
+
from .center import Center
|
|
4
5
|
from .container import Container
|
|
5
6
|
from .flex import Flex
|
|
6
7
|
from .grid import Grid
|
|
7
8
|
from .section import Section
|
|
9
|
+
from .spacer import Spacer
|
|
10
|
+
from .stack import HStack, VStack
|
|
8
11
|
|
|
9
12
|
box = Box.create
|
|
13
|
+
center = Center.create
|
|
10
14
|
container = Container.create
|
|
11
15
|
flex = Flex.create
|
|
12
16
|
grid = Grid.create
|
|
13
17
|
section = Section.create
|
|
18
|
+
spacer = Spacer.create
|
|
19
|
+
hstack = HStack.create
|
|
20
|
+
vstack = VStack.create
|
|
@@ -173,6 +173,7 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent):
|
|
|
173
173
|
id: Optional[Any] = None,
|
|
174
174
|
class_name: Optional[Any] = None,
|
|
175
175
|
autofocus: Optional[bool] = None,
|
|
176
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
176
177
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
177
178
|
on_blur: Optional[
|
|
178
179
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
@@ -251,6 +252,7 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent):
|
|
|
251
252
|
id: The id for the component.
|
|
252
253
|
class_name: The class name for the component.
|
|
253
254
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
255
|
+
_rename_props: props to change the name of
|
|
254
256
|
custom_attrs: custom attribute
|
|
255
257
|
**props: Component properties.
|
|
256
258
|
|
|
@@ -3,10 +3,10 @@ from __future__ import annotations
|
|
|
3
3
|
|
|
4
4
|
from reflex import el
|
|
5
5
|
|
|
6
|
-
from
|
|
6
|
+
from ..base import RadixThemesComponent
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class Box(el.Div,
|
|
9
|
+
class Box(el.Div, RadixThemesComponent):
|
|
10
10
|
"""A fundamental layout building block, based on `div` element."""
|
|
11
11
|
|
|
12
12
|
tag = "Box"
|
|
@@ -8,9 +8,9 @@ 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 reflex import el
|
|
11
|
-
from
|
|
11
|
+
from ..base import RadixThemesComponent
|
|
12
12
|
|
|
13
|
-
class Box(el.Div,
|
|
13
|
+
class Box(el.Div, RadixThemesComponent):
|
|
14
14
|
@overload
|
|
15
15
|
@classmethod
|
|
16
16
|
def create( # type: ignore
|
|
@@ -122,97 +122,12 @@ class Box(el.Div, LayoutComponent):
|
|
|
122
122
|
translate: Optional[
|
|
123
123
|
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
124
124
|
] = None,
|
|
125
|
-
p: 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
|
-
px: 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
|
-
py: Optional[
|
|
138
|
-
Union[
|
|
139
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
140
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
141
|
-
]
|
|
142
|
-
] = None,
|
|
143
|
-
pt: Optional[
|
|
144
|
-
Union[
|
|
145
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
146
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
147
|
-
]
|
|
148
|
-
] = None,
|
|
149
|
-
pr: Optional[
|
|
150
|
-
Union[
|
|
151
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
152
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
153
|
-
]
|
|
154
|
-
] = None,
|
|
155
|
-
pb: Optional[
|
|
156
|
-
Union[
|
|
157
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
158
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
159
|
-
]
|
|
160
|
-
] = None,
|
|
161
|
-
pl: Optional[
|
|
162
|
-
Union[
|
|
163
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
164
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
165
|
-
]
|
|
166
|
-
] = None,
|
|
167
|
-
shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None,
|
|
168
|
-
grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None,
|
|
169
|
-
m: Optional[
|
|
170
|
-
Union[
|
|
171
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
172
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
173
|
-
]
|
|
174
|
-
] = None,
|
|
175
|
-
mx: Optional[
|
|
176
|
-
Union[
|
|
177
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
178
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
179
|
-
]
|
|
180
|
-
] = None,
|
|
181
|
-
my: Optional[
|
|
182
|
-
Union[
|
|
183
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
184
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
185
|
-
]
|
|
186
|
-
] = None,
|
|
187
|
-
mt: Optional[
|
|
188
|
-
Union[
|
|
189
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
190
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
191
|
-
]
|
|
192
|
-
] = None,
|
|
193
|
-
mr: Optional[
|
|
194
|
-
Union[
|
|
195
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
196
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
197
|
-
]
|
|
198
|
-
] = None,
|
|
199
|
-
mb: Optional[
|
|
200
|
-
Union[
|
|
201
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
202
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
203
|
-
]
|
|
204
|
-
] = None,
|
|
205
|
-
ml: Optional[
|
|
206
|
-
Union[
|
|
207
|
-
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
208
|
-
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
209
|
-
]
|
|
210
|
-
] = None,
|
|
211
125
|
style: Optional[Style] = None,
|
|
212
126
|
key: Optional[Any] = None,
|
|
213
127
|
id: Optional[Any] = None,
|
|
214
128
|
class_name: Optional[Any] = None,
|
|
215
129
|
autofocus: Optional[bool] = None,
|
|
130
|
+
_rename_props: Optional[Dict[str, str]] = None,
|
|
216
131
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
217
132
|
on_blur: Optional[
|
|
218
133
|
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
@@ -287,27 +202,12 @@ class Box(el.Div, LayoutComponent):
|
|
|
287
202
|
tab_index: Defines the position of the current element in the tabbing order.
|
|
288
203
|
title: Defines a tooltip for the element.
|
|
289
204
|
translate: Specifies whether the content of an element should be translated or not.
|
|
290
|
-
p: Padding: "0" - "9"
|
|
291
|
-
px: Padding horizontal: "0" - "9"
|
|
292
|
-
py: Padding vertical: "0" - "9"
|
|
293
|
-
pt: Padding top: "0" - "9"
|
|
294
|
-
pr: Padding right: "0" - "9"
|
|
295
|
-
pb: Padding bottom: "0" - "9"
|
|
296
|
-
pl: Padding left: "0" - "9"
|
|
297
|
-
shrink: Whether the element will take up the smallest possible space: "0" | "1"
|
|
298
|
-
grow: Whether the element will take up the largest possible space: "0" | "1"
|
|
299
|
-
m: Margin: "0" - "9"
|
|
300
|
-
mx: Margin horizontal: "0" - "9"
|
|
301
|
-
my: Margin vertical: "0" - "9"
|
|
302
|
-
mt: Margin top: "0" - "9"
|
|
303
|
-
mr: Margin right: "0" - "9"
|
|
304
|
-
mb: Margin bottom: "0" - "9"
|
|
305
|
-
ml: Margin left: "0" - "9"
|
|
306
205
|
style: The style of the component.
|
|
307
206
|
key: A unique key for the component.
|
|
308
207
|
id: The id for the component.
|
|
309
208
|
class_name: The class name for the component.
|
|
310
209
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
210
|
+
_rename_props: props to change the name of
|
|
311
211
|
custom_attrs: custom attribute
|
|
312
212
|
**props: Component properties.
|
|
313
213
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""A center component."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from reflex.components.component import Component
|
|
5
|
+
|
|
6
|
+
from .flex import Flex
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Center(Flex):
|
|
10
|
+
"""A center component."""
|
|
11
|
+
|
|
12
|
+
def _apply_theme(self, theme: Component):
|
|
13
|
+
self.style.update(
|
|
14
|
+
{
|
|
15
|
+
"display": "flex",
|
|
16
|
+
"align_items": "center",
|
|
17
|
+
"justify_content": "center",
|
|
18
|
+
}
|
|
19
|
+
)
|