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.

Files changed (138) hide show
  1. reflex/.templates/jinja/web/pages/base_page.js.jinja2 +2 -0
  2. reflex/.templates/web/utils/state.js +1 -1
  3. reflex/__init__.py +29 -6
  4. reflex/__init__.pyi +2 -0
  5. reflex/app.py +3 -0
  6. reflex/components/__init__.py +2 -0
  7. reflex/components/chakra/__init__.py +23 -0
  8. reflex/components/{media → chakra/media}/image.py +1 -28
  9. reflex/components/chakra/media/image.pyi +120 -0
  10. reflex/components/component.py +32 -4
  11. reflex/components/datadisplay/datatable.py +1 -37
  12. reflex/components/datadisplay/datatable.pyi +1 -11
  13. reflex/components/el/elements/forms.py +43 -1
  14. reflex/components/el/elements/forms.pyi +26 -1
  15. reflex/components/graphing/plotly.py +0 -22
  16. reflex/components/graphing/plotly.pyi +0 -12
  17. reflex/components/media/__init__.py +0 -1
  18. reflex/components/media/image.pyi +0 -9
  19. reflex/components/next/__init__.py +8 -0
  20. reflex/components/next/base.py +8 -0
  21. reflex/components/next/base.pyi +91 -0
  22. reflex/components/next/image.py +114 -0
  23. reflex/components/next/image.pyi +122 -0
  24. reflex/components/next/video.py +33 -0
  25. reflex/components/next/video.pyi +92 -0
  26. reflex/components/radix/primitives/__init__.py +3 -0
  27. reflex/components/radix/primitives/accordion.py +279 -0
  28. reflex/components/radix/primitives/accordion.pyi +619 -0
  29. reflex/components/radix/themes/__init__.py +4 -73
  30. reflex/components/radix/themes/base.py +7 -7
  31. reflex/components/radix/themes/base.pyi +21 -21
  32. reflex/components/radix/themes/components/__init__.py +193 -0
  33. reflex/components/radix/themes/components/alertdialog.py +72 -0
  34. reflex/components/radix/themes/components/alertdialog.pyi +733 -0
  35. reflex/components/radix/themes/components/aspectratio.py +20 -0
  36. reflex/components/radix/themes/components/aspectratio.pyi +144 -0
  37. reflex/components/radix/themes/components/avatar.py +38 -0
  38. reflex/components/radix/themes/components/avatar.pyi +233 -0
  39. reflex/components/radix/themes/components/badge.py +38 -0
  40. reflex/components/radix/themes/components/badge.pyi +291 -0
  41. reflex/components/radix/themes/components/button.py +39 -0
  42. reflex/components/radix/themes/components/button.pyi +330 -0
  43. reflex/components/radix/themes/components/callout.py +49 -0
  44. reflex/components/radix/themes/components/callout.pyi +668 -0
  45. reflex/components/radix/themes/components/card.py +25 -0
  46. reflex/components/radix/themes/components/card.pyi +214 -0
  47. reflex/components/radix/themes/components/checkbox.py +67 -0
  48. reflex/components/radix/themes/components/checkbox.pyi +249 -0
  49. reflex/components/radix/themes/components/contextmenu.py +134 -0
  50. reflex/components/radix/themes/{typography.pyi → components/contextmenu.pyi} +182 -602
  51. reflex/components/radix/themes/components/dialog.py +75 -0
  52. reflex/components/radix/themes/components/dialog.pyi +739 -0
  53. reflex/components/radix/themes/components/dropdownmenu.py +101 -0
  54. reflex/components/radix/themes/components/dropdownmenu.pyi +1065 -0
  55. reflex/components/radix/themes/components/hovercard.py +63 -0
  56. reflex/components/radix/themes/components/hovercard.pyi +487 -0
  57. reflex/components/radix/themes/components/iconbutton.py +39 -0
  58. reflex/components/radix/themes/components/iconbutton.pyi +332 -0
  59. reflex/components/radix/themes/components/icons.py +400 -0
  60. reflex/components/radix/themes/components/icons.pyi +185 -0
  61. reflex/components/radix/themes/components/inset.py +44 -0
  62. reflex/components/radix/themes/components/inset.pyi +230 -0
  63. reflex/components/radix/themes/components/popover.py +85 -0
  64. reflex/components/radix/themes/components/popover.pyi +634 -0
  65. reflex/components/radix/themes/components/radiogroup.py +72 -0
  66. reflex/components/radix/themes/components/radiogroup.pyi +369 -0
  67. reflex/components/radix/themes/components/scrollarea.py +31 -0
  68. reflex/components/radix/themes/components/scrollarea.pyi +165 -0
  69. reflex/components/radix/themes/components/select.py +137 -0
  70. reflex/components/radix/themes/{layout.pyi → components/select.pyi} +422 -418
  71. reflex/components/radix/themes/components/separator.py +30 -0
  72. reflex/components/radix/themes/components/separator.pyi +218 -0
  73. reflex/components/radix/themes/components/slider.py +68 -0
  74. reflex/components/radix/themes/components/slider.pyi +254 -0
  75. reflex/components/radix/themes/components/switch.py +68 -0
  76. reflex/components/radix/themes/components/switch.pyi +250 -0
  77. reflex/components/radix/themes/components/table.py +79 -0
  78. reflex/components/radix/themes/components/table.pyi +1485 -0
  79. reflex/components/radix/themes/components/tabs.py +65 -0
  80. reflex/components/radix/themes/components/tabs.pyi +549 -0
  81. reflex/components/radix/themes/components/textarea.py +68 -0
  82. reflex/components/radix/themes/components/textarea.pyi +333 -0
  83. reflex/components/radix/themes/{components.py → components/textfield.py} +3 -87
  84. reflex/components/radix/themes/{components.pyi → components/textfield.pyi} +202 -591
  85. reflex/components/radix/themes/layout/__init__.py +13 -0
  86. reflex/components/radix/themes/layout/base.py +48 -0
  87. reflex/components/radix/themes/layout/base.pyi +195 -0
  88. reflex/components/radix/themes/layout/box.py +12 -0
  89. reflex/components/radix/themes/layout/box.pyi +252 -0
  90. reflex/components/radix/themes/layout/container.py +23 -0
  91. reflex/components/radix/themes/layout/container.pyi +260 -0
  92. reflex/components/radix/themes/layout/flex.py +45 -0
  93. reflex/components/radix/themes/layout/flex.pyi +303 -0
  94. reflex/components/radix/themes/layout/grid.py +53 -0
  95. reflex/components/radix/themes/layout/grid.pyi +203 -0
  96. reflex/components/radix/themes/layout/section.py +20 -0
  97. reflex/components/radix/themes/layout/section.pyi +260 -0
  98. reflex/components/radix/themes/typography/__init__.py +21 -0
  99. reflex/components/radix/themes/typography/base.py +12 -0
  100. reflex/components/radix/themes/typography/blockquote.py +36 -0
  101. reflex/components/radix/themes/typography/blockquote.pyi +282 -0
  102. reflex/components/radix/themes/typography/code.py +40 -0
  103. reflex/components/radix/themes/typography/code.pyi +292 -0
  104. reflex/components/radix/themes/typography/em.py +18 -0
  105. reflex/components/radix/themes/typography/em.pyi +199 -0
  106. reflex/components/radix/themes/typography/heading.py +50 -0
  107. reflex/components/radix/themes/typography/heading.pyi +298 -0
  108. reflex/components/radix/themes/typography/kbd.py +25 -0
  109. reflex/components/radix/themes/typography/kbd.pyi +208 -0
  110. reflex/components/radix/themes/typography/link.py +49 -0
  111. reflex/components/radix/themes/typography/link.pyi +238 -0
  112. reflex/components/radix/themes/typography/quote.py +18 -0
  113. reflex/components/radix/themes/typography/quote.pyi +200 -0
  114. reflex/components/radix/themes/typography/strong.py +18 -0
  115. reflex/components/radix/themes/typography/strong.pyi +199 -0
  116. reflex/components/radix/themes/typography/text.py +50 -0
  117. reflex/components/radix/themes/typography/text.pyi +298 -0
  118. reflex/components/radix/themes/typography.py +1 -1
  119. reflex/constants/__init__.py +1 -0
  120. reflex/constants/base.py +7 -0
  121. reflex/constants/config.py +1 -1
  122. reflex/model.py +2 -1
  123. reflex/reflex.py +8 -1
  124. reflex/state.py +11 -0
  125. reflex/style.py +120 -10
  126. reflex/testing.py +4 -4
  127. reflex/utils/format.py +9 -5
  128. reflex/utils/prerequisites.py +49 -6
  129. reflex/utils/processes.py +8 -1
  130. reflex/utils/serializers.py +83 -0
  131. reflex/utils/types.py +22 -1
  132. reflex/vars.py +24 -1
  133. {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/METADATA +3 -2
  134. {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/RECORD +137 -44
  135. reflex/components/radix/themes/layout.py +0 -155
  136. {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/LICENSE +0 -0
  137. {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/WHEEL +0 -0
  138. {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,63 @@
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 HoverCardRoot(CommonMarginProps, RadixThemesComponent):
14
+ """Trigger an action or event, such as submitting a form or displaying a dialog."""
15
+
16
+ tag = "HoverCard.Root"
17
+
18
+ # The open state of the hover card when it is initially rendered. Use when you do not need to control its open state.
19
+ default_open: Var[bool]
20
+
21
+ # The controlled open state of the hover card. Must be used in conjunction with onOpenChange.
22
+ open: Var[bool]
23
+
24
+ # The duration from when the mouse enters the trigger until the hover card opens.
25
+ open_delay: Var[int]
26
+
27
+ # The duration from when the mouse leaves the trigger until the hover card closes.
28
+ close_delay: Var[int]
29
+
30
+ def get_event_triggers(self) -> Dict[str, Any]:
31
+ """Get the events triggers signatures for the component.
32
+
33
+ Returns:
34
+ The signatures of the event triggers.
35
+ """
36
+ return {
37
+ **super().get_event_triggers(),
38
+ "on_open_change": lambda e0: [e0],
39
+ }
40
+
41
+
42
+ class HoverCardTrigger(CommonMarginProps, RadixThemesComponent):
43
+ """Trigger an action or event, such as submitting a form or displaying a dialog."""
44
+
45
+ tag = "HoverCard.Trigger"
46
+
47
+
48
+ class HoverCardContent(el.Div, CommonMarginProps, RadixThemesComponent):
49
+ """Trigger an action or event, such as submitting a form or displaying a dialog."""
50
+
51
+ tag = "HoverCard.Content"
52
+
53
+ # The preferred side of the trigger to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled.
54
+ side: Var[Literal["top", "right", "bottom", "left"]]
55
+
56
+ # The distance in pixels from the trigger.
57
+ side_offset: Var[int]
58
+
59
+ # The preferred alignment against the trigger. May change when collisions occur.
60
+ align: Var[Literal["start", "center", "end"]]
61
+
62
+ # Whether or not the hover card should avoid collisions with its trigger.
63
+ avoid_collisions: Var[bool]
@@ -0,0 +1,487 @@
1
+ """Stub file for reflex/components/radix/themes/components/hovercard.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 Any, Dict, Literal
11
+ from reflex import el
12
+ from reflex.vars import Var
13
+ from ..base import CommonMarginProps, RadixThemesComponent
14
+
15
+ class HoverCardRoot(CommonMarginProps, RadixThemesComponent):
16
+ def get_event_triggers(self) -> Dict[str, Any]: ...
17
+ @overload
18
+ @classmethod
19
+ def create( # type: ignore
20
+ cls,
21
+ *children,
22
+ default_open: Optional[Union[Var[bool], bool]] = None,
23
+ open: Optional[Union[Var[bool], bool]] = None,
24
+ open_delay: Optional[Union[Var[int], int]] = None,
25
+ close_delay: Optional[Union[Var[int], int]] = None,
26
+ m: Optional[
27
+ Union[
28
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
29
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
30
+ ]
31
+ ] = None,
32
+ mx: Optional[
33
+ Union[
34
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
35
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
36
+ ]
37
+ ] = None,
38
+ my: Optional[
39
+ Union[
40
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
41
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
42
+ ]
43
+ ] = None,
44
+ mt: Optional[
45
+ Union[
46
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
47
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
48
+ ]
49
+ ] = None,
50
+ mr: Optional[
51
+ Union[
52
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
53
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
54
+ ]
55
+ ] = None,
56
+ mb: Optional[
57
+ Union[
58
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
59
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
60
+ ]
61
+ ] = None,
62
+ ml: Optional[
63
+ Union[
64
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
65
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
66
+ ]
67
+ ] = None,
68
+ style: Optional[Style] = None,
69
+ key: Optional[Any] = None,
70
+ id: Optional[Any] = None,
71
+ class_name: Optional[Any] = None,
72
+ autofocus: Optional[bool] = None,
73
+ custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
74
+ on_blur: Optional[
75
+ Union[EventHandler, EventSpec, list, function, BaseVar]
76
+ ] = None,
77
+ on_click: Optional[
78
+ Union[EventHandler, EventSpec, list, function, BaseVar]
79
+ ] = None,
80
+ on_context_menu: Optional[
81
+ Union[EventHandler, EventSpec, list, function, BaseVar]
82
+ ] = None,
83
+ on_double_click: Optional[
84
+ Union[EventHandler, EventSpec, list, function, BaseVar]
85
+ ] = None,
86
+ on_focus: Optional[
87
+ Union[EventHandler, EventSpec, list, function, BaseVar]
88
+ ] = None,
89
+ on_mount: Optional[
90
+ Union[EventHandler, EventSpec, list, function, BaseVar]
91
+ ] = None,
92
+ on_mouse_down: Optional[
93
+ Union[EventHandler, EventSpec, list, function, BaseVar]
94
+ ] = None,
95
+ on_mouse_enter: Optional[
96
+ Union[EventHandler, EventSpec, list, function, BaseVar]
97
+ ] = None,
98
+ on_mouse_leave: Optional[
99
+ Union[EventHandler, EventSpec, list, function, BaseVar]
100
+ ] = None,
101
+ on_mouse_move: Optional[
102
+ Union[EventHandler, EventSpec, list, function, BaseVar]
103
+ ] = None,
104
+ on_mouse_out: Optional[
105
+ Union[EventHandler, EventSpec, list, function, BaseVar]
106
+ ] = None,
107
+ on_mouse_over: Optional[
108
+ Union[EventHandler, EventSpec, list, function, BaseVar]
109
+ ] = None,
110
+ on_mouse_up: Optional[
111
+ Union[EventHandler, EventSpec, list, function, BaseVar]
112
+ ] = None,
113
+ on_open_change: Optional[
114
+ Union[EventHandler, EventSpec, list, function, BaseVar]
115
+ ] = None,
116
+ on_scroll: Optional[
117
+ Union[EventHandler, EventSpec, list, function, BaseVar]
118
+ ] = None,
119
+ on_unmount: Optional[
120
+ Union[EventHandler, EventSpec, list, function, BaseVar]
121
+ ] = None,
122
+ **props
123
+ ) -> "HoverCardRoot":
124
+ """Create a new component instance.
125
+
126
+ Will prepend "RadixThemes" to the component tag to avoid conflicts with
127
+ other UI libraries for common names, like Text and Button.
128
+
129
+ Args:
130
+ *children: Child components.
131
+ default_open: The open state of the hover card when it is initially rendered. Use when you do not need to control its open state.
132
+ open: The controlled open state of the hover card. Must be used in conjunction with onOpenChange.
133
+ open_delay: The duration from when the mouse enters the trigger until the hover card opens.
134
+ close_delay: The duration from when the mouse leaves the trigger until the hover card closes.
135
+ m: Margin: "0" - "9"
136
+ mx: Margin horizontal: "0" - "9"
137
+ my: Margin vertical: "0" - "9"
138
+ mt: Margin top: "0" - "9"
139
+ mr: Margin right: "0" - "9"
140
+ mb: Margin bottom: "0" - "9"
141
+ ml: Margin left: "0" - "9"
142
+ style: The style of the component.
143
+ key: A unique key for the component.
144
+ id: The id for the component.
145
+ class_name: The class name for the component.
146
+ autofocus: Whether the component should take the focus once the page is loaded
147
+ custom_attrs: custom attribute
148
+ **props: Component properties.
149
+
150
+ Returns:
151
+ A new component instance.
152
+ """
153
+ ...
154
+
155
+ class HoverCardTrigger(CommonMarginProps, RadixThemesComponent):
156
+ @overload
157
+ @classmethod
158
+ def create( # type: ignore
159
+ cls,
160
+ *children,
161
+ m: 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
+ mx: Optional[
168
+ Union[
169
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
170
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
171
+ ]
172
+ ] = None,
173
+ my: Optional[
174
+ Union[
175
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
176
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
177
+ ]
178
+ ] = None,
179
+ mt: Optional[
180
+ Union[
181
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
182
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
183
+ ]
184
+ ] = None,
185
+ mr: Optional[
186
+ Union[
187
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
188
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
189
+ ]
190
+ ] = None,
191
+ mb: Optional[
192
+ Union[
193
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
194
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
195
+ ]
196
+ ] = None,
197
+ ml: Optional[
198
+ Union[
199
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
200
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
201
+ ]
202
+ ] = None,
203
+ style: Optional[Style] = None,
204
+ key: Optional[Any] = None,
205
+ id: Optional[Any] = None,
206
+ class_name: Optional[Any] = None,
207
+ autofocus: Optional[bool] = None,
208
+ custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
209
+ on_blur: Optional[
210
+ Union[EventHandler, EventSpec, list, function, BaseVar]
211
+ ] = None,
212
+ on_click: Optional[
213
+ Union[EventHandler, EventSpec, list, function, BaseVar]
214
+ ] = None,
215
+ on_context_menu: Optional[
216
+ Union[EventHandler, EventSpec, list, function, BaseVar]
217
+ ] = None,
218
+ on_double_click: Optional[
219
+ Union[EventHandler, EventSpec, list, function, BaseVar]
220
+ ] = None,
221
+ on_focus: Optional[
222
+ Union[EventHandler, EventSpec, list, function, BaseVar]
223
+ ] = None,
224
+ on_mount: Optional[
225
+ Union[EventHandler, EventSpec, list, function, BaseVar]
226
+ ] = None,
227
+ on_mouse_down: Optional[
228
+ Union[EventHandler, EventSpec, list, function, BaseVar]
229
+ ] = None,
230
+ on_mouse_enter: Optional[
231
+ Union[EventHandler, EventSpec, list, function, BaseVar]
232
+ ] = None,
233
+ on_mouse_leave: Optional[
234
+ Union[EventHandler, EventSpec, list, function, BaseVar]
235
+ ] = None,
236
+ on_mouse_move: Optional[
237
+ Union[EventHandler, EventSpec, list, function, BaseVar]
238
+ ] = None,
239
+ on_mouse_out: Optional[
240
+ Union[EventHandler, EventSpec, list, function, BaseVar]
241
+ ] = None,
242
+ on_mouse_over: Optional[
243
+ Union[EventHandler, EventSpec, list, function, BaseVar]
244
+ ] = None,
245
+ on_mouse_up: Optional[
246
+ Union[EventHandler, EventSpec, list, function, BaseVar]
247
+ ] = None,
248
+ on_scroll: Optional[
249
+ Union[EventHandler, EventSpec, list, function, BaseVar]
250
+ ] = None,
251
+ on_unmount: Optional[
252
+ Union[EventHandler, EventSpec, list, function, BaseVar]
253
+ ] = None,
254
+ **props
255
+ ) -> "HoverCardTrigger":
256
+ """Create a new component instance.
257
+
258
+ Will prepend "RadixThemes" to the component tag to avoid conflicts with
259
+ other UI libraries for common names, like Text and Button.
260
+
261
+ Args:
262
+ *children: Child components.
263
+ m: Margin: "0" - "9"
264
+ mx: Margin horizontal: "0" - "9"
265
+ my: Margin vertical: "0" - "9"
266
+ mt: Margin top: "0" - "9"
267
+ mr: Margin right: "0" - "9"
268
+ mb: Margin bottom: "0" - "9"
269
+ ml: Margin left: "0" - "9"
270
+ style: The style of the component.
271
+ key: A unique key for the component.
272
+ id: The id for the component.
273
+ class_name: The class name for the component.
274
+ autofocus: Whether the component should take the focus once the page is loaded
275
+ custom_attrs: custom attribute
276
+ **props: Component properties.
277
+
278
+ Returns:
279
+ A new component instance.
280
+ """
281
+ ...
282
+
283
+ class HoverCardContent(el.Div, CommonMarginProps, RadixThemesComponent):
284
+ @overload
285
+ @classmethod
286
+ def create( # type: ignore
287
+ cls,
288
+ *children,
289
+ side: Optional[
290
+ Union[
291
+ Var[Literal["top", "right", "bottom", "left"]],
292
+ Literal["top", "right", "bottom", "left"],
293
+ ]
294
+ ] = None,
295
+ side_offset: Optional[Union[Var[int], int]] = None,
296
+ align: Optional[
297
+ Union[
298
+ Var[Literal["start", "center", "end"]],
299
+ Literal["start", "center", "end"],
300
+ ]
301
+ ] = None,
302
+ avoid_collisions: Optional[Union[Var[bool], bool]] = None,
303
+ access_key: Optional[
304
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
305
+ ] = None,
306
+ auto_capitalize: Optional[
307
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
308
+ ] = None,
309
+ content_editable: Optional[
310
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
311
+ ] = None,
312
+ context_menu: Optional[
313
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
314
+ ] = None,
315
+ dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
316
+ draggable: Optional[
317
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
318
+ ] = None,
319
+ enter_key_hint: Optional[
320
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
321
+ ] = None,
322
+ hidden: Optional[
323
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
324
+ ] = None,
325
+ input_mode: Optional[
326
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
327
+ ] = None,
328
+ item_prop: Optional[
329
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
330
+ ] = None,
331
+ lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
332
+ role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
333
+ slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
334
+ spell_check: Optional[
335
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
336
+ ] = None,
337
+ tab_index: Optional[
338
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
339
+ ] = None,
340
+ title: Optional[
341
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
342
+ ] = None,
343
+ translate: Optional[
344
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
345
+ ] = None,
346
+ m: Optional[
347
+ Union[
348
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
349
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
350
+ ]
351
+ ] = None,
352
+ mx: Optional[
353
+ Union[
354
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
355
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
356
+ ]
357
+ ] = None,
358
+ my: Optional[
359
+ Union[
360
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
361
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
362
+ ]
363
+ ] = None,
364
+ mt: Optional[
365
+ Union[
366
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
367
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
368
+ ]
369
+ ] = None,
370
+ mr: Optional[
371
+ Union[
372
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
373
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
374
+ ]
375
+ ] = None,
376
+ mb: Optional[
377
+ Union[
378
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
379
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
380
+ ]
381
+ ] = None,
382
+ ml: Optional[
383
+ Union[
384
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
385
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
386
+ ]
387
+ ] = None,
388
+ style: Optional[Style] = None,
389
+ key: Optional[Any] = None,
390
+ id: Optional[Any] = None,
391
+ class_name: Optional[Any] = None,
392
+ autofocus: Optional[bool] = None,
393
+ custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
394
+ on_blur: Optional[
395
+ Union[EventHandler, EventSpec, list, function, BaseVar]
396
+ ] = None,
397
+ on_click: Optional[
398
+ Union[EventHandler, EventSpec, list, function, BaseVar]
399
+ ] = None,
400
+ on_context_menu: Optional[
401
+ Union[EventHandler, EventSpec, list, function, BaseVar]
402
+ ] = None,
403
+ on_double_click: Optional[
404
+ Union[EventHandler, EventSpec, list, function, BaseVar]
405
+ ] = None,
406
+ on_focus: Optional[
407
+ Union[EventHandler, EventSpec, list, function, BaseVar]
408
+ ] = None,
409
+ on_mount: Optional[
410
+ Union[EventHandler, EventSpec, list, function, BaseVar]
411
+ ] = None,
412
+ on_mouse_down: Optional[
413
+ Union[EventHandler, EventSpec, list, function, BaseVar]
414
+ ] = None,
415
+ on_mouse_enter: Optional[
416
+ Union[EventHandler, EventSpec, list, function, BaseVar]
417
+ ] = None,
418
+ on_mouse_leave: Optional[
419
+ Union[EventHandler, EventSpec, list, function, BaseVar]
420
+ ] = None,
421
+ on_mouse_move: Optional[
422
+ Union[EventHandler, EventSpec, list, function, BaseVar]
423
+ ] = None,
424
+ on_mouse_out: Optional[
425
+ Union[EventHandler, EventSpec, list, function, BaseVar]
426
+ ] = None,
427
+ on_mouse_over: Optional[
428
+ Union[EventHandler, EventSpec, list, function, BaseVar]
429
+ ] = None,
430
+ on_mouse_up: Optional[
431
+ Union[EventHandler, EventSpec, list, function, BaseVar]
432
+ ] = None,
433
+ on_scroll: Optional[
434
+ Union[EventHandler, EventSpec, list, function, BaseVar]
435
+ ] = None,
436
+ on_unmount: Optional[
437
+ Union[EventHandler, EventSpec, list, function, BaseVar]
438
+ ] = None,
439
+ **props
440
+ ) -> "HoverCardContent":
441
+ """Create a new component instance.
442
+
443
+ Will prepend "RadixThemes" to the component tag to avoid conflicts with
444
+ other UI libraries for common names, like Text and Button.
445
+
446
+ Args:
447
+ *children: Child components.
448
+ side: The preferred side of the trigger to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled.
449
+ side_offset: The distance in pixels from the trigger.
450
+ align: The preferred alignment against the trigger. May change when collisions occur.
451
+ avoid_collisions: Whether or not the hover card should avoid collisions with its trigger.
452
+ access_key: Provides a hint for generating a keyboard shortcut for the current element.
453
+ auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
454
+ content_editable: Indicates whether the element's content is editable.
455
+ context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
456
+ dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
457
+ draggable: Defines whether the element can be dragged.
458
+ enter_key_hint: Hints what media types the media element is able to play.
459
+ hidden: Defines whether the element is hidden.
460
+ input_mode: Defines the type of the element.
461
+ item_prop: Defines the name of the element for metadata purposes.
462
+ lang: Defines the language used in the element.
463
+ role: Defines the role of the element.
464
+ slot: Assigns a slot in a shadow DOM shadow tree to an element.
465
+ spell_check: Defines whether the element may be checked for spelling errors.
466
+ tab_index: Defines the position of the current element in the tabbing order.
467
+ title: Defines a tooltip for the element.
468
+ translate: Specifies whether the content of an element should be translated or not.
469
+ m: Margin: "0" - "9"
470
+ mx: Margin horizontal: "0" - "9"
471
+ my: Margin vertical: "0" - "9"
472
+ mt: Margin top: "0" - "9"
473
+ mr: Margin right: "0" - "9"
474
+ mb: Margin bottom: "0" - "9"
475
+ ml: Margin left: "0" - "9"
476
+ style: The style of the component.
477
+ key: A unique key for the component.
478
+ id: The id for the component.
479
+ class_name: The class name for the component.
480
+ autofocus: Whether the component should take the focus once the page is loaded
481
+ custom_attrs: custom attribute
482
+ **props: Component properties.
483
+
484
+ Returns:
485
+ A new component instance.
486
+ """
487
+ ...
@@ -0,0 +1,39 @@
1
+ """Interactive components provided by @radix-ui/themes."""
2
+ from typing import Literal
3
+
4
+ from reflex import el
5
+ from reflex.vars import Var
6
+
7
+ from ..base import (
8
+ CommonMarginProps,
9
+ LiteralAccentColor,
10
+ LiteralRadius,
11
+ LiteralVariant,
12
+ RadixThemesComponent,
13
+ )
14
+
15
+ LiteralButtonSize = Literal["1", "2", "3", "4"]
16
+
17
+
18
+ class IconButton(el.Button, CommonMarginProps, RadixThemesComponent):
19
+ """Trigger an action or event, such as submitting a form or displaying a dialog."""
20
+
21
+ tag = "Button"
22
+
23
+ # Change the default rendered element for the one passed as a child, merging their props and behavior.
24
+ as_child: Var[bool]
25
+
26
+ # Button size "1" - "4"
27
+ size: Var[LiteralButtonSize]
28
+
29
+ # Variant of button: "solid" | "soft" | "outline" | "ghost"
30
+ variant: Var[LiteralVariant]
31
+
32
+ # Override theme color for button
33
+ color: Var[LiteralAccentColor]
34
+
35
+ # Whether to render the button with higher contrast color against background
36
+ high_contrast: Var[bool]
37
+
38
+ # Override theme radius for button: "none" | "small" | "medium" | "large" | "full"
39
+ radius: Var[LiteralRadius]