reflex 0.3.5a4__py3-none-any.whl → 0.3.7__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/.templates/jinja/web/pages/base_page.js.jinja2 +2 -0
- reflex/.templates/web/utils/state.js +1 -1
- reflex/__init__.py +29 -6
- reflex/__init__.pyi +2 -0
- reflex/app.py +3 -0
- reflex/components/__init__.py +2 -0
- reflex/components/chakra/__init__.py +23 -0
- reflex/components/{media → chakra/media}/image.py +1 -28
- reflex/components/chakra/media/image.pyi +120 -0
- reflex/components/component.py +32 -4
- reflex/components/datadisplay/datatable.py +1 -37
- reflex/components/datadisplay/datatable.pyi +1 -11
- reflex/components/el/elements/forms.py +43 -1
- reflex/components/el/elements/forms.pyi +26 -1
- reflex/components/graphing/plotly.py +0 -22
- reflex/components/graphing/plotly.pyi +0 -12
- reflex/components/media/__init__.py +0 -1
- reflex/components/media/image.pyi +0 -9
- reflex/components/next/__init__.py +8 -0
- reflex/components/next/base.py +8 -0
- reflex/components/next/base.pyi +91 -0
- reflex/components/next/image.py +114 -0
- reflex/components/next/image.pyi +122 -0
- reflex/components/next/video.py +33 -0
- reflex/components/next/video.pyi +92 -0
- reflex/components/radix/primitives/__init__.py +3 -0
- reflex/components/radix/primitives/accordion.py +279 -0
- reflex/components/radix/primitives/accordion.pyi +619 -0
- reflex/components/radix/themes/__init__.py +4 -73
- reflex/components/radix/themes/base.py +7 -7
- reflex/components/radix/themes/base.pyi +21 -21
- reflex/components/radix/themes/components/__init__.py +193 -0
- reflex/components/radix/themes/components/alertdialog.py +72 -0
- reflex/components/radix/themes/components/alertdialog.pyi +733 -0
- reflex/components/radix/themes/components/aspectratio.py +20 -0
- reflex/components/radix/themes/components/aspectratio.pyi +144 -0
- reflex/components/radix/themes/components/avatar.py +38 -0
- reflex/components/radix/themes/components/avatar.pyi +233 -0
- reflex/components/radix/themes/components/badge.py +38 -0
- reflex/components/radix/themes/components/badge.pyi +291 -0
- reflex/components/radix/themes/components/button.py +39 -0
- reflex/components/radix/themes/components/button.pyi +330 -0
- reflex/components/radix/themes/components/callout.py +49 -0
- reflex/components/radix/themes/components/callout.pyi +668 -0
- reflex/components/radix/themes/components/card.py +25 -0
- reflex/components/radix/themes/components/card.pyi +214 -0
- reflex/components/radix/themes/components/checkbox.py +67 -0
- reflex/components/radix/themes/components/checkbox.pyi +249 -0
- reflex/components/radix/themes/components/contextmenu.py +134 -0
- reflex/components/radix/themes/{typography.pyi → components/contextmenu.pyi} +182 -602
- reflex/components/radix/themes/components/dialog.py +75 -0
- reflex/components/radix/themes/components/dialog.pyi +739 -0
- reflex/components/radix/themes/components/dropdownmenu.py +101 -0
- reflex/components/radix/themes/components/dropdownmenu.pyi +1065 -0
- reflex/components/radix/themes/components/hovercard.py +63 -0
- reflex/components/radix/themes/components/hovercard.pyi +487 -0
- reflex/components/radix/themes/components/iconbutton.py +39 -0
- reflex/components/radix/themes/components/iconbutton.pyi +332 -0
- reflex/components/radix/themes/components/icons.py +400 -0
- reflex/components/radix/themes/components/icons.pyi +185 -0
- reflex/components/radix/themes/components/inset.py +44 -0
- reflex/components/radix/themes/components/inset.pyi +230 -0
- reflex/components/radix/themes/components/popover.py +85 -0
- reflex/components/radix/themes/components/popover.pyi +634 -0
- reflex/components/radix/themes/components/radiogroup.py +72 -0
- reflex/components/radix/themes/components/radiogroup.pyi +369 -0
- reflex/components/radix/themes/components/scrollarea.py +31 -0
- reflex/components/radix/themes/components/scrollarea.pyi +165 -0
- reflex/components/radix/themes/components/select.py +137 -0
- reflex/components/radix/themes/{layout.pyi → components/select.pyi} +422 -418
- reflex/components/radix/themes/components/separator.py +30 -0
- reflex/components/radix/themes/components/separator.pyi +218 -0
- reflex/components/radix/themes/components/slider.py +68 -0
- reflex/components/radix/themes/components/slider.pyi +254 -0
- reflex/components/radix/themes/components/switch.py +68 -0
- reflex/components/radix/themes/components/switch.pyi +250 -0
- reflex/components/radix/themes/components/table.py +79 -0
- reflex/components/radix/themes/components/table.pyi +1485 -0
- reflex/components/radix/themes/components/tabs.py +65 -0
- reflex/components/radix/themes/components/tabs.pyi +549 -0
- reflex/components/radix/themes/components/textarea.py +68 -0
- reflex/components/radix/themes/components/textarea.pyi +333 -0
- reflex/components/radix/themes/{components.py → components/textfield.py} +3 -87
- reflex/components/radix/themes/{components.pyi → components/textfield.pyi} +202 -591
- reflex/components/radix/themes/layout/__init__.py +13 -0
- reflex/components/radix/themes/layout/base.py +48 -0
- reflex/components/radix/themes/layout/base.pyi +195 -0
- reflex/components/radix/themes/layout/box.py +12 -0
- reflex/components/radix/themes/layout/box.pyi +252 -0
- reflex/components/radix/themes/layout/container.py +23 -0
- reflex/components/radix/themes/layout/container.pyi +260 -0
- reflex/components/radix/themes/layout/flex.py +45 -0
- reflex/components/radix/themes/layout/flex.pyi +303 -0
- reflex/components/radix/themes/layout/grid.py +53 -0
- reflex/components/radix/themes/layout/grid.pyi +203 -0
- reflex/components/radix/themes/layout/section.py +20 -0
- reflex/components/radix/themes/layout/section.pyi +260 -0
- reflex/components/radix/themes/typography/__init__.py +21 -0
- reflex/components/radix/themes/typography/base.py +12 -0
- reflex/components/radix/themes/typography/blockquote.py +36 -0
- reflex/components/radix/themes/typography/blockquote.pyi +282 -0
- reflex/components/radix/themes/typography/code.py +40 -0
- reflex/components/radix/themes/typography/code.pyi +292 -0
- reflex/components/radix/themes/typography/em.py +18 -0
- reflex/components/radix/themes/typography/em.pyi +199 -0
- reflex/components/radix/themes/typography/heading.py +50 -0
- reflex/components/radix/themes/typography/heading.pyi +298 -0
- reflex/components/radix/themes/typography/kbd.py +25 -0
- reflex/components/radix/themes/typography/kbd.pyi +208 -0
- reflex/components/radix/themes/typography/link.py +49 -0
- reflex/components/radix/themes/typography/link.pyi +238 -0
- reflex/components/radix/themes/typography/quote.py +18 -0
- reflex/components/radix/themes/typography/quote.pyi +200 -0
- reflex/components/radix/themes/typography/strong.py +18 -0
- reflex/components/radix/themes/typography/strong.pyi +199 -0
- reflex/components/radix/themes/typography/text.py +50 -0
- reflex/components/radix/themes/typography/text.pyi +298 -0
- reflex/components/radix/themes/typography.py +1 -1
- reflex/constants/__init__.py +1 -0
- reflex/constants/base.py +7 -0
- reflex/constants/config.py +1 -1
- reflex/model.py +2 -1
- reflex/reflex.py +8 -1
- reflex/state.py +11 -0
- reflex/style.py +120 -10
- reflex/testing.py +4 -4
- reflex/utils/format.py +9 -5
- reflex/utils/prerequisites.py +49 -6
- reflex/utils/processes.py +8 -1
- reflex/utils/serializers.py +83 -0
- reflex/utils/types.py +22 -1
- reflex/vars.py +24 -1
- {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/METADATA +3 -2
- {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/RECORD +137 -44
- reflex/components/radix/themes/layout.py +0 -155
- {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/LICENSE +0 -0
- {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/WHEEL +0 -0
- {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"""Stub file for reflex/components/radix/themes/components/inset.py"""
|
|
2
|
+
# ------------------- DO NOT EDIT ----------------------
|
|
3
|
+
# This file was generated by `scripts/pyi_generator.py`!
|
|
4
|
+
# ------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
from typing import Any, Dict, Literal, Optional, Union, overload
|
|
7
|
+
from reflex.vars import Var, BaseVar, ComputedVar
|
|
8
|
+
from reflex.event import EventChain, EventHandler, EventSpec
|
|
9
|
+
from reflex.style import Style
|
|
10
|
+
from typing import Literal, Union
|
|
11
|
+
from reflex import el
|
|
12
|
+
from reflex.vars import Var
|
|
13
|
+
from ..base import CommonMarginProps, RadixThemesComponent
|
|
14
|
+
|
|
15
|
+
LiteralButtonSize = Literal["1", "2", "3", "4"]
|
|
16
|
+
|
|
17
|
+
class Inset(el.Div, CommonMarginProps, RadixThemesComponent):
|
|
18
|
+
@overload
|
|
19
|
+
@classmethod
|
|
20
|
+
def create( # type: ignore
|
|
21
|
+
cls,
|
|
22
|
+
*children,
|
|
23
|
+
side: Optional[
|
|
24
|
+
Union[
|
|
25
|
+
Var[Literal["x", "y", "top", "bottom", "right", "left"]],
|
|
26
|
+
Literal["x", "y", "top", "bottom", "right", "left"],
|
|
27
|
+
]
|
|
28
|
+
] = None,
|
|
29
|
+
clip: Optional[
|
|
30
|
+
Union[
|
|
31
|
+
Var[Literal["border-box", "padding-box"]],
|
|
32
|
+
Literal["border-box", "padding-box"],
|
|
33
|
+
]
|
|
34
|
+
] = None,
|
|
35
|
+
p: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
|
|
36
|
+
px: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
|
|
37
|
+
py: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
|
|
38
|
+
pt: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
|
|
39
|
+
pr: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
|
|
40
|
+
pb: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
|
|
41
|
+
pl: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
|
|
42
|
+
access_key: Optional[
|
|
43
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
44
|
+
] = None,
|
|
45
|
+
auto_capitalize: Optional[
|
|
46
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
47
|
+
] = None,
|
|
48
|
+
content_editable: Optional[
|
|
49
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
50
|
+
] = None,
|
|
51
|
+
context_menu: Optional[
|
|
52
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
53
|
+
] = None,
|
|
54
|
+
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
55
|
+
draggable: Optional[
|
|
56
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
57
|
+
] = None,
|
|
58
|
+
enter_key_hint: Optional[
|
|
59
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
60
|
+
] = None,
|
|
61
|
+
hidden: Optional[
|
|
62
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
63
|
+
] = None,
|
|
64
|
+
input_mode: Optional[
|
|
65
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
66
|
+
] = None,
|
|
67
|
+
item_prop: Optional[
|
|
68
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
69
|
+
] = None,
|
|
70
|
+
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
71
|
+
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
72
|
+
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
73
|
+
spell_check: Optional[
|
|
74
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
75
|
+
] = None,
|
|
76
|
+
tab_index: Optional[
|
|
77
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
78
|
+
] = None,
|
|
79
|
+
title: Optional[
|
|
80
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
81
|
+
] = None,
|
|
82
|
+
translate: Optional[
|
|
83
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
84
|
+
] = None,
|
|
85
|
+
m: Optional[
|
|
86
|
+
Union[
|
|
87
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
88
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
89
|
+
]
|
|
90
|
+
] = None,
|
|
91
|
+
mx: Optional[
|
|
92
|
+
Union[
|
|
93
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
94
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
95
|
+
]
|
|
96
|
+
] = None,
|
|
97
|
+
my: Optional[
|
|
98
|
+
Union[
|
|
99
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
100
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
101
|
+
]
|
|
102
|
+
] = None,
|
|
103
|
+
mt: Optional[
|
|
104
|
+
Union[
|
|
105
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
106
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
107
|
+
]
|
|
108
|
+
] = None,
|
|
109
|
+
mr: Optional[
|
|
110
|
+
Union[
|
|
111
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
112
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
113
|
+
]
|
|
114
|
+
] = None,
|
|
115
|
+
mb: Optional[
|
|
116
|
+
Union[
|
|
117
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
118
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
119
|
+
]
|
|
120
|
+
] = None,
|
|
121
|
+
ml: Optional[
|
|
122
|
+
Union[
|
|
123
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
124
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
125
|
+
]
|
|
126
|
+
] = None,
|
|
127
|
+
style: Optional[Style] = None,
|
|
128
|
+
key: Optional[Any] = None,
|
|
129
|
+
id: Optional[Any] = None,
|
|
130
|
+
class_name: Optional[Any] = None,
|
|
131
|
+
autofocus: Optional[bool] = None,
|
|
132
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
133
|
+
on_blur: Optional[
|
|
134
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
135
|
+
] = None,
|
|
136
|
+
on_click: Optional[
|
|
137
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
138
|
+
] = None,
|
|
139
|
+
on_context_menu: Optional[
|
|
140
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
141
|
+
] = None,
|
|
142
|
+
on_double_click: Optional[
|
|
143
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
144
|
+
] = None,
|
|
145
|
+
on_focus: Optional[
|
|
146
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
147
|
+
] = None,
|
|
148
|
+
on_mount: Optional[
|
|
149
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
150
|
+
] = None,
|
|
151
|
+
on_mouse_down: Optional[
|
|
152
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
153
|
+
] = None,
|
|
154
|
+
on_mouse_enter: Optional[
|
|
155
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
156
|
+
] = None,
|
|
157
|
+
on_mouse_leave: Optional[
|
|
158
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
159
|
+
] = None,
|
|
160
|
+
on_mouse_move: Optional[
|
|
161
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
162
|
+
] = None,
|
|
163
|
+
on_mouse_out: Optional[
|
|
164
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
165
|
+
] = None,
|
|
166
|
+
on_mouse_over: Optional[
|
|
167
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
168
|
+
] = None,
|
|
169
|
+
on_mouse_up: Optional[
|
|
170
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
171
|
+
] = None,
|
|
172
|
+
on_scroll: Optional[
|
|
173
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
174
|
+
] = None,
|
|
175
|
+
on_unmount: Optional[
|
|
176
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
177
|
+
] = None,
|
|
178
|
+
**props
|
|
179
|
+
) -> "Inset":
|
|
180
|
+
"""Create a new component instance.
|
|
181
|
+
|
|
182
|
+
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
183
|
+
other UI libraries for common names, like Text and Button.
|
|
184
|
+
|
|
185
|
+
Args:
|
|
186
|
+
*children: Child components.
|
|
187
|
+
side: The side
|
|
188
|
+
p: Padding
|
|
189
|
+
px: Padding on the x axis
|
|
190
|
+
py: Padding on the y axis
|
|
191
|
+
pt: Padding on the top
|
|
192
|
+
pr: Padding on the right
|
|
193
|
+
pb: Padding on the bottom
|
|
194
|
+
pl: Padding on the left
|
|
195
|
+
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
196
|
+
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
197
|
+
content_editable: Indicates whether the element's content is editable.
|
|
198
|
+
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
|
199
|
+
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
|
200
|
+
draggable: Defines whether the element can be dragged.
|
|
201
|
+
enter_key_hint: Hints what media types the media element is able to play.
|
|
202
|
+
hidden: Defines whether the element is hidden.
|
|
203
|
+
input_mode: Defines the type of the element.
|
|
204
|
+
item_prop: Defines the name of the element for metadata purposes.
|
|
205
|
+
lang: Defines the language used in the element.
|
|
206
|
+
role: Defines the role of the element.
|
|
207
|
+
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
|
208
|
+
spell_check: Defines whether the element may be checked for spelling errors.
|
|
209
|
+
tab_index: Defines the position of the current element in the tabbing order.
|
|
210
|
+
title: Defines a tooltip for the element.
|
|
211
|
+
translate: Specifies whether the content of an element should be translated or not.
|
|
212
|
+
m: Margin: "0" - "9"
|
|
213
|
+
mx: Margin horizontal: "0" - "9"
|
|
214
|
+
my: Margin vertical: "0" - "9"
|
|
215
|
+
mt: Margin top: "0" - "9"
|
|
216
|
+
mr: Margin right: "0" - "9"
|
|
217
|
+
mb: Margin bottom: "0" - "9"
|
|
218
|
+
ml: Margin left: "0" - "9"
|
|
219
|
+
style: The style of the component.
|
|
220
|
+
key: A unique key for the component.
|
|
221
|
+
id: The id for the component.
|
|
222
|
+
class_name: The class name for the component.
|
|
223
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
224
|
+
custom_attrs: custom attribute
|
|
225
|
+
**props: Component properties.
|
|
226
|
+
|
|
227
|
+
Returns:
|
|
228
|
+
A new component instance.
|
|
229
|
+
"""
|
|
230
|
+
...
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"""Interactive components provided by @radix-ui/themes."""
|
|
2
|
+
from typing import Any, Dict, Literal
|
|
3
|
+
|
|
4
|
+
from reflex import el
|
|
5
|
+
from reflex.vars import Var
|
|
6
|
+
|
|
7
|
+
from ..base import (
|
|
8
|
+
CommonMarginProps,
|
|
9
|
+
RadixThemesComponent,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class PopoverRoot(CommonMarginProps, RadixThemesComponent):
|
|
14
|
+
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
15
|
+
|
|
16
|
+
tag = "Popover.Root"
|
|
17
|
+
|
|
18
|
+
# The controlled open state of the popover.
|
|
19
|
+
open: Var[bool]
|
|
20
|
+
|
|
21
|
+
# The modality of the popover. When set to true, interaction with outside elements will be disabled and only popover content will be visible to screen readers.
|
|
22
|
+
modal: Var[bool]
|
|
23
|
+
|
|
24
|
+
def get_event_triggers(self) -> Dict[str, Any]:
|
|
25
|
+
"""Get the events triggers signatures for the component.
|
|
26
|
+
|
|
27
|
+
Returns:
|
|
28
|
+
The signatures of the event triggers.
|
|
29
|
+
"""
|
|
30
|
+
return {
|
|
31
|
+
**super().get_event_triggers(),
|
|
32
|
+
"on_open_change": lambda e0: [e0],
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class PopoverTrigger(CommonMarginProps, RadixThemesComponent):
|
|
37
|
+
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
38
|
+
|
|
39
|
+
tag = "Popover.Trigger"
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class PopoverContent(el.Div, CommonMarginProps, RadixThemesComponent):
|
|
43
|
+
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
44
|
+
|
|
45
|
+
tag = "Popover.Content"
|
|
46
|
+
|
|
47
|
+
# Size of the button: "1" | "2" | "3" | "4"
|
|
48
|
+
size: Var[Literal[1, 2, 3, 4]]
|
|
49
|
+
|
|
50
|
+
# The preferred side of the anchor to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled.
|
|
51
|
+
side: Var[Literal["top", "right", "bottom", "left"]]
|
|
52
|
+
|
|
53
|
+
# The distance in pixels from the anchor.
|
|
54
|
+
side_offset: Var[int]
|
|
55
|
+
|
|
56
|
+
# The preferred alignment against the anchor. May change when collisions occur.
|
|
57
|
+
align: Var[Literal["start", "center", "end"]]
|
|
58
|
+
|
|
59
|
+
# The vertical distance in pixels from the anchor.
|
|
60
|
+
align_offset: Var[int]
|
|
61
|
+
|
|
62
|
+
# When true, overrides the side andalign preferences to prevent collisions with boundary edges.
|
|
63
|
+
avoid_collisions: Var[bool]
|
|
64
|
+
|
|
65
|
+
def get_event_triggers(self) -> Dict[str, Any]:
|
|
66
|
+
"""Get the events triggers signatures for the component.
|
|
67
|
+
|
|
68
|
+
Returns:
|
|
69
|
+
The signatures of the event triggers.
|
|
70
|
+
"""
|
|
71
|
+
return {
|
|
72
|
+
**super().get_event_triggers(),
|
|
73
|
+
"on_open_auto_focus": lambda e0: [e0],
|
|
74
|
+
"on_close_auto_focus": lambda e0: [e0],
|
|
75
|
+
"on_escape_key_down": lambda e0: [e0],
|
|
76
|
+
"on_pointer_down_outside": lambda e0: [e0],
|
|
77
|
+
"on_focus_outside": lambda e0: [e0],
|
|
78
|
+
"on_interact_outside": lambda e0: [e0],
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
class PopoverClose(CommonMarginProps, RadixThemesComponent):
|
|
83
|
+
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
|
84
|
+
|
|
85
|
+
tag = "Popover.Close"
|