reflex 0.7.1a4__py3-none-any.whl → 0.7.2__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 (227) hide show
  1. reflex/.templates/jinja/web/utils/context.js.jinja2 +8 -8
  2. reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +3 -3
  3. reflex/.templates/web/utils/state.js +18 -18
  4. reflex/admin.py +1 -2
  5. reflex/app.py +46 -49
  6. reflex/app_mixins/lifespan.py +2 -2
  7. reflex/app_mixins/middleware.py +1 -2
  8. reflex/assets.py +1 -2
  9. reflex/base.py +2 -2
  10. reflex/compiler/compiler.py +51 -16
  11. reflex/compiler/utils.py +4 -13
  12. reflex/components/base/app_wrap.pyi +7 -7
  13. reflex/components/base/bare.py +3 -3
  14. reflex/components/base/body.pyi +7 -7
  15. reflex/components/base/document.py +1 -3
  16. reflex/components/base/document.pyi +32 -32
  17. reflex/components/base/error_boundary.py +2 -4
  18. reflex/components/base/error_boundary.pyi +11 -13
  19. reflex/components/base/fragment.pyi +7 -7
  20. reflex/components/base/head.pyi +13 -13
  21. reflex/components/base/link.pyi +22 -22
  22. reflex/components/base/meta.py +5 -7
  23. reflex/components/base/meta.pyi +40 -40
  24. reflex/components/base/script.pyi +11 -14
  25. reflex/components/base/strict_mode.pyi +7 -7
  26. reflex/components/component.py +188 -113
  27. reflex/components/core/auto_scroll.py +8 -1
  28. reflex/components/core/auto_scroll.pyi +183 -210
  29. reflex/components/core/banner.py +2 -4
  30. reflex/components/core/banner.pyi +390 -444
  31. reflex/components/core/breakpoints.py +5 -5
  32. reflex/components/core/client_side_routing.pyi +14 -14
  33. reflex/components/core/clipboard.py +4 -4
  34. reflex/components/core/clipboard.pyi +12 -14
  35. reflex/components/core/cond.py +17 -25
  36. reflex/components/core/debounce.py +3 -3
  37. reflex/components/core/debounce.pyi +14 -14
  38. reflex/components/core/foreach.py +7 -2
  39. reflex/components/core/html.py +1 -3
  40. reflex/components/core/html.pyi +184 -213
  41. reflex/components/core/match.py +15 -19
  42. reflex/components/core/sticky.pyi +930 -1078
  43. reflex/components/core/upload.py +4 -4
  44. reflex/components/core/upload.pyi +62 -62
  45. reflex/components/datadisplay/code.py +6 -6
  46. reflex/components/datadisplay/code.pyi +1159 -1165
  47. reflex/components/datadisplay/dataeditor.py +49 -49
  48. reflex/components/datadisplay/dataeditor.pyi +95 -123
  49. reflex/components/datadisplay/logo.py +1 -3
  50. reflex/components/datadisplay/shiki_code_block.py +8 -10
  51. reflex/components/datadisplay/shiki_code_block.pyi +1678 -1720
  52. reflex/components/el/element.pyi +7 -7
  53. reflex/components/el/elements/base.pyi +183 -210
  54. reflex/components/el/elements/forms.py +24 -24
  55. reflex/components/el/elements/forms.pyi +2572 -2934
  56. reflex/components/el/elements/inline.py +4 -4
  57. reflex/components/el/elements/inline.pyi +5191 -5953
  58. reflex/components/el/elements/media.py +47 -47
  59. reflex/components/el/elements/media.pyi +4802 -5500
  60. reflex/components/el/elements/metadata.py +1 -3
  61. reflex/components/el/elements/metadata.pyi +782 -896
  62. reflex/components/el/elements/other.pyi +1278 -1467
  63. reflex/components/el/elements/scripts.pyi +580 -667
  64. reflex/components/el/elements/sectioning.pyi +2761 -3166
  65. reflex/components/el/elements/tables.pyi +1840 -2119
  66. reflex/components/el/elements/typography.pyi +2772 -3179
  67. reflex/components/gridjs/datatable.py +7 -7
  68. reflex/components/gridjs/datatable.pyi +19 -19
  69. reflex/components/lucide/icon.pyi +21 -21
  70. reflex/components/markdown/markdown.py +2 -2
  71. reflex/components/markdown/markdown.pyi +9 -9
  72. reflex/components/moment/moment.py +11 -12
  73. reflex/components/moment/moment.pyi +44 -47
  74. reflex/components/next/base.pyi +7 -7
  75. reflex/components/next/image.py +3 -3
  76. reflex/components/next/image.pyi +19 -21
  77. reflex/components/next/link.pyi +9 -9
  78. reflex/components/next/video.py +1 -3
  79. reflex/components/next/video.pyi +9 -9
  80. reflex/components/plotly/plotly.py +22 -45
  81. reflex/components/plotly/plotly.pyi +164 -164
  82. reflex/components/radix/primitives/accordion.py +14 -14
  83. reflex/components/radix/primitives/accordion.pyi +439 -487
  84. reflex/components/radix/primitives/base.py +1 -3
  85. reflex/components/radix/primitives/base.pyi +15 -15
  86. reflex/components/radix/primitives/drawer.py +3 -3
  87. reflex/components/radix/primitives/drawer.pyi +110 -116
  88. reflex/components/radix/primitives/form.py +1 -1
  89. reflex/components/radix/primitives/form.pyi +668 -752
  90. reflex/components/radix/primitives/progress.py +6 -6
  91. reflex/components/radix/primitives/progress.pyi +225 -243
  92. reflex/components/radix/primitives/slider.py +6 -6
  93. reflex/components/radix/primitives/slider.pyi +52 -55
  94. reflex/components/radix/themes/base.py +3 -6
  95. reflex/components/radix/themes/base.pyi +197 -303
  96. reflex/components/radix/themes/color_mode.py +5 -5
  97. reflex/components/radix/themes/color_mode.pyi +366 -436
  98. reflex/components/radix/themes/components/alert_dialog.pyi +229 -262
  99. reflex/components/radix/themes/components/aspect_ratio.py +1 -3
  100. reflex/components/radix/themes/components/aspect_ratio.pyi +8 -8
  101. reflex/components/radix/themes/components/avatar.pyi +79 -94
  102. reflex/components/radix/themes/components/badge.pyi +252 -295
  103. reflex/components/radix/themes/components/button.pyi +269 -314
  104. reflex/components/radix/themes/components/callout.py +2 -2
  105. reflex/components/radix/themes/components/callout.pyi +1116 -1290
  106. reflex/components/radix/themes/components/card.pyi +194 -229
  107. reflex/components/radix/themes/components/checkbox.pyi +243 -278
  108. reflex/components/radix/themes/components/checkbox_cards.py +3 -7
  109. reflex/components/radix/themes/components/checkbox_cards.pyi +101 -135
  110. reflex/components/radix/themes/components/checkbox_group.py +2 -2
  111. reflex/components/radix/themes/components/checkbox_group.pyi +83 -96
  112. reflex/components/radix/themes/components/context_menu.py +18 -15
  113. reflex/components/radix/themes/components/context_menu.pyi +408 -458
  114. reflex/components/radix/themes/components/data_list.pyi +122 -147
  115. reflex/components/radix/themes/components/dialog.pyi +231 -264
  116. reflex/components/radix/themes/components/dropdown_menu.py +16 -13
  117. reflex/components/radix/themes/components/dropdown_menu.pyi +223 -246
  118. reflex/components/radix/themes/components/hover_card.py +2 -2
  119. reflex/components/radix/themes/components/hover_card.pyi +237 -282
  120. reflex/components/radix/themes/components/icon_button.pyi +269 -314
  121. reflex/components/radix/themes/components/inset.py +8 -8
  122. reflex/components/radix/themes/components/inset.pyi +232 -292
  123. reflex/components/radix/themes/components/popover.py +2 -2
  124. reflex/components/radix/themes/components/popover.pyi +229 -271
  125. reflex/components/radix/themes/components/progress.pyi +80 -96
  126. reflex/components/radix/themes/components/radio.pyi +73 -86
  127. reflex/components/radix/themes/components/radio_cards.py +4 -8
  128. reflex/components/radix/themes/components/radio_cards.pyi +117 -154
  129. reflex/components/radix/themes/components/radio_group.py +3 -3
  130. reflex/components/radix/themes/components/radio_group.pyi +250 -291
  131. reflex/components/radix/themes/components/scroll_area.pyi +14 -20
  132. reflex/components/radix/themes/components/segmented_control.py +6 -6
  133. reflex/components/radix/themes/components/segmented_control.pyi +89 -108
  134. reflex/components/radix/themes/components/select.py +7 -7
  135. reflex/components/radix/themes/components/select.pyi +376 -444
  136. reflex/components/radix/themes/components/separator.pyi +79 -93
  137. reflex/components/radix/themes/components/skeleton.pyi +32 -26
  138. reflex/components/radix/themes/components/slider.py +8 -8
  139. reflex/components/radix/themes/components/slider.pyi +99 -122
  140. reflex/components/radix/themes/components/spinner.pyi +12 -19
  141. reflex/components/radix/themes/components/switch.pyi +84 -99
  142. reflex/components/radix/themes/components/table.py +9 -9
  143. reflex/components/radix/themes/components/table.pyi +1440 -1794
  144. reflex/components/radix/themes/components/tabs.py +4 -4
  145. reflex/components/radix/themes/components/tabs.pyi +120 -132
  146. reflex/components/radix/themes/components/text_area.pyi +281 -331
  147. reflex/components/radix/themes/components/text_field.py +2 -2
  148. reflex/components/radix/themes/components/text_field.pyi +639 -734
  149. reflex/components/radix/themes/components/tooltip.py +6 -6
  150. reflex/components/radix/themes/components/tooltip.pyi +34 -43
  151. reflex/components/radix/themes/layout/base.pyi +85 -182
  152. reflex/components/radix/themes/layout/box.pyi +183 -210
  153. reflex/components/radix/themes/layout/center.pyi +225 -286
  154. reflex/components/radix/themes/layout/container.pyi +191 -224
  155. reflex/components/radix/themes/layout/flex.py +2 -2
  156. reflex/components/radix/themes/layout/flex.pyi +225 -286
  157. reflex/components/radix/themes/layout/grid.py +2 -2
  158. reflex/components/radix/themes/layout/grid.pyi +245 -315
  159. reflex/components/radix/themes/layout/list.py +2 -2
  160. reflex/components/radix/themes/layout/list.pyi +712 -815
  161. reflex/components/radix/themes/layout/section.pyi +187 -221
  162. reflex/components/radix/themes/layout/spacer.pyi +225 -286
  163. reflex/components/radix/themes/layout/stack.pyi +625 -768
  164. reflex/components/radix/themes/typography/blockquote.pyi +257 -299
  165. reflex/components/radix/themes/typography/code.pyi +259 -304
  166. reflex/components/radix/themes/typography/heading.pyi +272 -324
  167. reflex/components/radix/themes/typography/link.pyi +302 -358
  168. reflex/components/radix/themes/typography/text.pyi +1669 -1945
  169. reflex/components/react_player/audio.pyi +20 -22
  170. reflex/components/react_player/react_player.pyi +19 -19
  171. reflex/components/react_player/video.pyi +20 -22
  172. reflex/components/recharts/cartesian.py +100 -97
  173. reflex/components/recharts/cartesian.pyi +891 -1007
  174. reflex/components/recharts/charts.py +42 -42
  175. reflex/components/recharts/charts.pyi +212 -249
  176. reflex/components/recharts/general.py +22 -21
  177. reflex/components/recharts/general.pyi +198 -223
  178. reflex/components/recharts/polar.py +42 -45
  179. reflex/components/recharts/polar.pyi +254 -288
  180. reflex/components/recharts/recharts.pyi +13 -13
  181. reflex/components/sonner/toast.py +20 -20
  182. reflex/components/sonner/toast.pyi +58 -61
  183. reflex/components/suneditor/editor.py +9 -9
  184. reflex/components/suneditor/editor.pyi +78 -83
  185. reflex/components/tags/cond_tag.py +2 -2
  186. reflex/components/tags/iter_tag.py +10 -14
  187. reflex/components/tags/match_tag.py +2 -2
  188. reflex/components/tags/tag.py +10 -10
  189. reflex/config.py +36 -35
  190. reflex/constants/__init__.py +56 -53
  191. reflex/custom_components/custom_components.py +6 -7
  192. reflex/event.py +38 -42
  193. reflex/experimental/client_state.py +2 -4
  194. reflex/experimental/layout.py +2 -2
  195. reflex/experimental/layout.pyi +579 -663
  196. reflex/istate/data.py +4 -5
  197. reflex/middleware/hydrate_middleware.py +2 -2
  198. reflex/middleware/middleware.py +2 -2
  199. reflex/model.py +3 -5
  200. reflex/page.py +2 -2
  201. reflex/reflex.py +9 -10
  202. reflex/state.py +77 -49
  203. reflex/style.py +11 -5
  204. reflex/testing.py +21 -24
  205. reflex/utils/console.py +1 -1
  206. reflex/utils/decorator.py +26 -1
  207. reflex/utils/exec.py +6 -11
  208. reflex/utils/export.py +2 -3
  209. reflex/utils/format.py +4 -4
  210. reflex/utils/imports.py +12 -12
  211. reflex/utils/prerequisites.py +35 -84
  212. reflex/utils/processes.py +5 -5
  213. reflex/utils/pyi_generator.py +33 -22
  214. reflex/utils/serializers.py +60 -15
  215. reflex/utils/types.py +237 -56
  216. reflex/vars/base.py +122 -72
  217. reflex/vars/datetime.py +2 -2
  218. reflex/vars/function.py +52 -55
  219. reflex/vars/number.py +59 -5
  220. reflex/vars/object.py +57 -26
  221. reflex/vars/sequence.py +983 -958
  222. {reflex-0.7.1a4.dist-info → reflex-0.7.2.dist-info}/METADATA +3 -6
  223. reflex-0.7.2.dist-info/RECORD +405 -0
  224. {reflex-0.7.1a4.dist-info → reflex-0.7.2.dist-info}/WHEEL +1 -1
  225. reflex-0.7.1a4.dist-info/RECORD +0 -405
  226. {reflex-0.7.1a4.dist-info → reflex-0.7.2.dist-info}/LICENSE +0 -0
  227. {reflex-0.7.1a4.dist-info → reflex-0.7.2.dist-info}/entry_points.txt +0 -0
@@ -3,7 +3,7 @@
3
3
  # ------------------- DO NOT EDIT ----------------------
4
4
  # This file was generated by `reflex/utils/pyi_generator.py`!
5
5
  # ------------------------------------------------------
6
- from typing import Any, Dict, Literal, Optional, Union, overload
6
+ from typing import Any, Literal, Optional, overload
7
7
 
8
8
  from reflex.components.component import ComponentNamespace
9
9
  from reflex.components.core.breakpoints import Breakpoints
@@ -20,14 +20,14 @@ class DialogRoot(RadixThemesComponent):
20
20
  def create( # type: ignore
21
21
  cls,
22
22
  *children,
23
- open: Optional[Union[Var[bool], bool]] = None,
24
- default_open: Optional[Union[Var[bool], bool]] = None,
25
- style: Optional[Style] = None,
26
- key: Optional[Any] = None,
27
- id: Optional[Any] = None,
28
- class_name: Optional[Any] = None,
29
- autofocus: Optional[bool] = None,
30
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
23
+ open: Var[bool] | bool | None = None,
24
+ default_open: Var[bool] | bool | None = None,
25
+ style: Style | None = None,
26
+ key: Any | None = None,
27
+ id: Any | None = None,
28
+ class_name: Any | None = None,
29
+ autofocus: bool | None = None,
30
+ custom_attrs: dict[str, Var | Any] | None = None,
31
31
  on_blur: Optional[EventType[()]] = None,
32
32
  on_click: Optional[EventType[()]] = None,
33
33
  on_context_menu: Optional[EventType[()]] = None,
@@ -41,7 +41,7 @@ class DialogRoot(RadixThemesComponent):
41
41
  on_mouse_out: Optional[EventType[()]] = None,
42
42
  on_mouse_over: Optional[EventType[()]] = None,
43
43
  on_mouse_up: Optional[EventType[()]] = None,
44
- on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None,
44
+ on_open_change: Optional[EventType[()] | EventType[bool]] = None,
45
45
  on_scroll: Optional[EventType[()]] = None,
46
46
  on_unmount: Optional[EventType[()]] = None,
47
47
  **props,
@@ -75,12 +75,12 @@ class DialogTrigger(RadixThemesTriggerComponent):
75
75
  def create( # type: ignore
76
76
  cls,
77
77
  *children,
78
- style: Optional[Style] = None,
79
- key: Optional[Any] = None,
80
- id: Optional[Any] = None,
81
- class_name: Optional[Any] = None,
82
- autofocus: Optional[bool] = None,
83
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
78
+ style: Style | None = None,
79
+ key: Any | None = None,
80
+ id: Any | None = None,
81
+ class_name: Any | None = None,
82
+ autofocus: bool | None = None,
83
+ custom_attrs: dict[str, Var | Any] | None = None,
84
84
  on_blur: Optional[EventType[()]] = None,
85
85
  on_click: Optional[EventType[()]] = None,
86
86
  on_context_menu: Optional[EventType[()]] = None,
@@ -115,12 +115,12 @@ class DialogTitle(RadixThemesComponent):
115
115
  def create( # type: ignore
116
116
  cls,
117
117
  *children,
118
- style: Optional[Style] = None,
119
- key: Optional[Any] = None,
120
- id: Optional[Any] = None,
121
- class_name: Optional[Any] = None,
122
- autofocus: Optional[bool] = None,
123
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
118
+ style: Style | None = None,
119
+ key: Any | None = None,
120
+ id: Any | None = None,
121
+ class_name: Any | None = None,
122
+ autofocus: bool | None = None,
123
+ custom_attrs: dict[str, Var | Any] | None = None,
124
124
  on_blur: Optional[EventType[()]] = None,
125
125
  on_click: Optional[EventType[()]] = None,
126
126
  on_context_menu: Optional[EventType[()]] = None,
@@ -164,229 +164,196 @@ class DialogContent(elements.Div, RadixThemesComponent):
164
164
  def create( # type: ignore
165
165
  cls,
166
166
  *children,
167
- size: Optional[
168
- Union[
169
- Breakpoints[str, Literal["1", "2", "3", "4"]],
170
- Literal["1", "2", "3", "4"],
171
- Var[
172
- Union[
173
- Breakpoints[str, Literal["1", "2", "3", "4"]],
174
- Literal["1", "2", "3", "4"],
175
- ]
176
- ],
167
+ size: Breakpoints[str, Literal["1", "2", "3", "4"]]
168
+ | Literal["1", "2", "3", "4"]
169
+ | Var[
170
+ Breakpoints[str, Literal["1", "2", "3", "4"]] | Literal["1", "2", "3", "4"]
171
+ ]
172
+ | None = None,
173
+ access_key: Var[str] | str | None = None,
174
+ auto_capitalize: Literal[
175
+ "characters", "none", "off", "on", "sentences", "words"
176
+ ]
177
+ | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
178
+ | None = None,
179
+ content_editable: Literal["inherit", "plaintext-only", False, True]
180
+ | Var[Literal["inherit", "plaintext-only", False, True]]
181
+ | None = None,
182
+ context_menu: Var[str] | str | None = None,
183
+ dir: Var[str] | str | None = None,
184
+ draggable: Var[bool] | bool | None = None,
185
+ enter_key_hint: Literal[
186
+ "done", "enter", "go", "next", "previous", "search", "send"
187
+ ]
188
+ | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
189
+ | None = None,
190
+ hidden: Var[bool] | bool | None = None,
191
+ input_mode: Literal[
192
+ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
193
+ ]
194
+ | Var[
195
+ Literal[
196
+ "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
177
197
  ]
178
- ] = None,
179
- access_key: Optional[Union[Var[str], str]] = None,
180
- auto_capitalize: Optional[
181
- Union[
182
- Literal["characters", "none", "off", "on", "sentences", "words"],
183
- Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
198
+ ]
199
+ | None = None,
200
+ item_prop: Var[str] | str | None = None,
201
+ lang: Var[str] | str | None = None,
202
+ role: Literal[
203
+ "alert",
204
+ "alertdialog",
205
+ "application",
206
+ "article",
207
+ "banner",
208
+ "button",
209
+ "cell",
210
+ "checkbox",
211
+ "columnheader",
212
+ "combobox",
213
+ "complementary",
214
+ "contentinfo",
215
+ "definition",
216
+ "dialog",
217
+ "directory",
218
+ "document",
219
+ "feed",
220
+ "figure",
221
+ "form",
222
+ "grid",
223
+ "gridcell",
224
+ "group",
225
+ "heading",
226
+ "img",
227
+ "link",
228
+ "list",
229
+ "listbox",
230
+ "listitem",
231
+ "log",
232
+ "main",
233
+ "marquee",
234
+ "math",
235
+ "menu",
236
+ "menubar",
237
+ "menuitem",
238
+ "menuitemcheckbox",
239
+ "menuitemradio",
240
+ "navigation",
241
+ "none",
242
+ "note",
243
+ "option",
244
+ "presentation",
245
+ "progressbar",
246
+ "radio",
247
+ "radiogroup",
248
+ "region",
249
+ "row",
250
+ "rowgroup",
251
+ "rowheader",
252
+ "scrollbar",
253
+ "search",
254
+ "searchbox",
255
+ "separator",
256
+ "slider",
257
+ "spinbutton",
258
+ "status",
259
+ "switch",
260
+ "tab",
261
+ "table",
262
+ "tablist",
263
+ "tabpanel",
264
+ "term",
265
+ "textbox",
266
+ "timer",
267
+ "toolbar",
268
+ "tooltip",
269
+ "tree",
270
+ "treegrid",
271
+ "treeitem",
272
+ ]
273
+ | Var[
274
+ Literal[
275
+ "alert",
276
+ "alertdialog",
277
+ "application",
278
+ "article",
279
+ "banner",
280
+ "button",
281
+ "cell",
282
+ "checkbox",
283
+ "columnheader",
284
+ "combobox",
285
+ "complementary",
286
+ "contentinfo",
287
+ "definition",
288
+ "dialog",
289
+ "directory",
290
+ "document",
291
+ "feed",
292
+ "figure",
293
+ "form",
294
+ "grid",
295
+ "gridcell",
296
+ "group",
297
+ "heading",
298
+ "img",
299
+ "link",
300
+ "list",
301
+ "listbox",
302
+ "listitem",
303
+ "log",
304
+ "main",
305
+ "marquee",
306
+ "math",
307
+ "menu",
308
+ "menubar",
309
+ "menuitem",
310
+ "menuitemcheckbox",
311
+ "menuitemradio",
312
+ "navigation",
313
+ "none",
314
+ "note",
315
+ "option",
316
+ "presentation",
317
+ "progressbar",
318
+ "radio",
319
+ "radiogroup",
320
+ "region",
321
+ "row",
322
+ "rowgroup",
323
+ "rowheader",
324
+ "scrollbar",
325
+ "search",
326
+ "searchbox",
327
+ "separator",
328
+ "slider",
329
+ "spinbutton",
330
+ "status",
331
+ "switch",
332
+ "tab",
333
+ "table",
334
+ "tablist",
335
+ "tabpanel",
336
+ "term",
337
+ "textbox",
338
+ "timer",
339
+ "toolbar",
340
+ "tooltip",
341
+ "tree",
342
+ "treegrid",
343
+ "treeitem",
184
344
  ]
185
- ] = None,
186
- content_editable: Optional[
187
- Union[
188
- Literal["inherit", "plaintext-only", False, True],
189
- Var[Literal["inherit", "plaintext-only", False, True]],
190
- ]
191
- ] = None,
192
- context_menu: Optional[Union[Var[str], str]] = None,
193
- dir: Optional[Union[Var[str], str]] = None,
194
- draggable: Optional[Union[Var[bool], bool]] = None,
195
- enter_key_hint: Optional[
196
- Union[
197
- Literal["done", "enter", "go", "next", "previous", "search", "send"],
198
- Var[
199
- Literal["done", "enter", "go", "next", "previous", "search", "send"]
200
- ],
201
- ]
202
- ] = None,
203
- hidden: Optional[Union[Var[bool], bool]] = None,
204
- input_mode: Optional[
205
- Union[
206
- Literal[
207
- "decimal",
208
- "email",
209
- "none",
210
- "numeric",
211
- "search",
212
- "tel",
213
- "text",
214
- "url",
215
- ],
216
- Var[
217
- Literal[
218
- "decimal",
219
- "email",
220
- "none",
221
- "numeric",
222
- "search",
223
- "tel",
224
- "text",
225
- "url",
226
- ]
227
- ],
228
- ]
229
- ] = None,
230
- item_prop: Optional[Union[Var[str], str]] = None,
231
- lang: Optional[Union[Var[str], str]] = None,
232
- role: Optional[
233
- Union[
234
- Literal[
235
- "alert",
236
- "alertdialog",
237
- "application",
238
- "article",
239
- "banner",
240
- "button",
241
- "cell",
242
- "checkbox",
243
- "columnheader",
244
- "combobox",
245
- "complementary",
246
- "contentinfo",
247
- "definition",
248
- "dialog",
249
- "directory",
250
- "document",
251
- "feed",
252
- "figure",
253
- "form",
254
- "grid",
255
- "gridcell",
256
- "group",
257
- "heading",
258
- "img",
259
- "link",
260
- "list",
261
- "listbox",
262
- "listitem",
263
- "log",
264
- "main",
265
- "marquee",
266
- "math",
267
- "menu",
268
- "menubar",
269
- "menuitem",
270
- "menuitemcheckbox",
271
- "menuitemradio",
272
- "navigation",
273
- "none",
274
- "note",
275
- "option",
276
- "presentation",
277
- "progressbar",
278
- "radio",
279
- "radiogroup",
280
- "region",
281
- "row",
282
- "rowgroup",
283
- "rowheader",
284
- "scrollbar",
285
- "search",
286
- "searchbox",
287
- "separator",
288
- "slider",
289
- "spinbutton",
290
- "status",
291
- "switch",
292
- "tab",
293
- "table",
294
- "tablist",
295
- "tabpanel",
296
- "term",
297
- "textbox",
298
- "timer",
299
- "toolbar",
300
- "tooltip",
301
- "tree",
302
- "treegrid",
303
- "treeitem",
304
- ],
305
- Var[
306
- Literal[
307
- "alert",
308
- "alertdialog",
309
- "application",
310
- "article",
311
- "banner",
312
- "button",
313
- "cell",
314
- "checkbox",
315
- "columnheader",
316
- "combobox",
317
- "complementary",
318
- "contentinfo",
319
- "definition",
320
- "dialog",
321
- "directory",
322
- "document",
323
- "feed",
324
- "figure",
325
- "form",
326
- "grid",
327
- "gridcell",
328
- "group",
329
- "heading",
330
- "img",
331
- "link",
332
- "list",
333
- "listbox",
334
- "listitem",
335
- "log",
336
- "main",
337
- "marquee",
338
- "math",
339
- "menu",
340
- "menubar",
341
- "menuitem",
342
- "menuitemcheckbox",
343
- "menuitemradio",
344
- "navigation",
345
- "none",
346
- "note",
347
- "option",
348
- "presentation",
349
- "progressbar",
350
- "radio",
351
- "radiogroup",
352
- "region",
353
- "row",
354
- "rowgroup",
355
- "rowheader",
356
- "scrollbar",
357
- "search",
358
- "searchbox",
359
- "separator",
360
- "slider",
361
- "spinbutton",
362
- "status",
363
- "switch",
364
- "tab",
365
- "table",
366
- "tablist",
367
- "tabpanel",
368
- "term",
369
- "textbox",
370
- "timer",
371
- "toolbar",
372
- "tooltip",
373
- "tree",
374
- "treegrid",
375
- "treeitem",
376
- ]
377
- ],
378
- ]
379
- ] = None,
380
- slot: Optional[Union[Var[str], str]] = None,
381
- spell_check: Optional[Union[Var[bool], bool]] = None,
382
- tab_index: Optional[Union[Var[int], int]] = None,
383
- title: Optional[Union[Var[str], str]] = None,
384
- style: Optional[Style] = None,
385
- key: Optional[Any] = None,
386
- id: Optional[Any] = None,
387
- class_name: Optional[Any] = None,
388
- autofocus: Optional[bool] = None,
389
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
345
+ ]
346
+ | None = None,
347
+ slot: Var[str] | str | None = None,
348
+ spell_check: Var[bool] | bool | None = None,
349
+ tab_index: Var[int] | int | None = None,
350
+ title: Var[str] | str | None = None,
351
+ style: Style | None = None,
352
+ key: Any | None = None,
353
+ id: Any | None = None,
354
+ class_name: Any | None = None,
355
+ autofocus: bool | None = None,
356
+ custom_attrs: dict[str, Var | Any] | None = None,
390
357
  on_blur: Optional[EventType[()]] = None,
391
358
  on_click: Optional[EventType[()]] = None,
392
359
  on_close_auto_focus: Optional[EventType[()]] = None,
@@ -457,12 +424,12 @@ class DialogDescription(RadixThemesComponent):
457
424
  def create( # type: ignore
458
425
  cls,
459
426
  *children,
460
- style: Optional[Style] = None,
461
- key: Optional[Any] = None,
462
- id: Optional[Any] = None,
463
- class_name: Optional[Any] = None,
464
- autofocus: Optional[bool] = None,
465
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
427
+ style: Style | None = None,
428
+ key: Any | None = None,
429
+ id: Any | None = None,
430
+ class_name: Any | None = None,
431
+ autofocus: bool | None = None,
432
+ custom_attrs: dict[str, Var | Any] | None = None,
466
433
  on_blur: Optional[EventType[()]] = None,
467
434
  on_click: Optional[EventType[()]] = None,
468
435
  on_context_menu: Optional[EventType[()]] = None,
@@ -506,12 +473,12 @@ class DialogClose(RadixThemesTriggerComponent):
506
473
  def create( # type: ignore
507
474
  cls,
508
475
  *children,
509
- style: Optional[Style] = None,
510
- key: Optional[Any] = None,
511
- id: Optional[Any] = None,
512
- class_name: Optional[Any] = None,
513
- autofocus: Optional[bool] = None,
514
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
476
+ style: Style | None = None,
477
+ key: Any | None = None,
478
+ id: Any | None = None,
479
+ class_name: Any | None = None,
480
+ autofocus: bool | None = None,
481
+ custom_attrs: dict[str, Var | Any] | None = None,
515
482
  on_blur: Optional[EventType[()]] = None,
516
483
  on_click: Optional[EventType[()]] = None,
517
484
  on_context_menu: Optional[EventType[()]] = None,
@@ -551,14 +518,14 @@ class Dialog(ComponentNamespace):
551
518
  @staticmethod
552
519
  def __call__(
553
520
  *children,
554
- open: Optional[Union[Var[bool], bool]] = None,
555
- default_open: Optional[Union[Var[bool], bool]] = None,
556
- style: Optional[Style] = None,
557
- key: Optional[Any] = None,
558
- id: Optional[Any] = None,
559
- class_name: Optional[Any] = None,
560
- autofocus: Optional[bool] = None,
561
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
521
+ open: Var[bool] | bool | None = None,
522
+ default_open: Var[bool] | bool | None = None,
523
+ style: Style | None = None,
524
+ key: Any | None = None,
525
+ id: Any | None = None,
526
+ class_name: Any | None = None,
527
+ autofocus: bool | None = None,
528
+ custom_attrs: dict[str, Var | Any] | None = None,
562
529
  on_blur: Optional[EventType[()]] = None,
563
530
  on_click: Optional[EventType[()]] = None,
564
531
  on_context_menu: Optional[EventType[()]] = None,
@@ -572,7 +539,7 @@ class Dialog(ComponentNamespace):
572
539
  on_mouse_out: Optional[EventType[()]] = None,
573
540
  on_mouse_over: Optional[EventType[()]] = None,
574
541
  on_mouse_up: Optional[EventType[()]] = None,
575
- on_open_change: Optional[Union[EventType[()], EventType[bool]]] = None,
542
+ on_open_change: Optional[EventType[()] | EventType[bool]] = None,
576
543
  on_scroll: Optional[EventType[()]] = None,
577
544
  on_unmount: Optional[EventType[()]] = None,
578
545
  **props,
@@ -1,6 +1,6 @@
1
1
  """Interactive components provided by @radix-ui/themes."""
2
2
 
3
- from typing import Dict, List, Literal, Union
3
+ from typing import ClassVar, Literal
4
4
 
5
5
  from reflex.components.component import ComponentNamespace
6
6
  from reflex.components.core.breakpoints import Responsive
@@ -43,7 +43,7 @@ class DropdownMenuRoot(RadixThemesComponent):
43
43
  # The reading direction of submenus when applicable. If omitted, inherits globally from DirectionProvider or assumes LTR (left-to-right) reading mode.
44
44
  dir: Var[LiteralDirType]
45
45
 
46
- _invalid_children: List[str] = ["DropdownMenuItem"]
46
+ _invalid_children: ClassVar[list[str]] = ["DropdownMenuItem"]
47
47
 
48
48
  # Fired when the open state changes.
49
49
  on_open_change: EventHandler[passthrough_event_spec(bool)]
@@ -57,9 +57,9 @@ class DropdownMenuTrigger(RadixThemesTriggerComponent):
57
57
  # Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
58
58
  as_child: Var[bool]
59
59
 
60
- _valid_parents: List[str] = ["DropdownMenuRoot"]
60
+ _valid_parents: ClassVar[list[str]] = ["DropdownMenuRoot"]
61
61
 
62
- _invalid_children: List[str] = ["DropdownMenuContent"]
62
+ _invalid_children: ClassVar[list[str]] = ["DropdownMenuContent"]
63
63
 
64
64
  _memoization_mode = MemoizationMode(recursive=False)
65
65
 
@@ -94,19 +94,19 @@ class DropdownMenuContent(RadixThemesComponent):
94
94
  side: Var[LiteralSideType]
95
95
 
96
96
  # The distance in pixels from the trigger. Defaults to 0.
97
- side_offset: Var[Union[float, int]]
97
+ side_offset: Var[float | int]
98
98
 
99
99
  # The preferred alignment against the trigger. May change when collisions occur. Defaults to "center".
100
100
  align: Var[LiteralAlignType]
101
101
 
102
102
  # An offset in pixels from the "start" or "end" alignment options.
103
- align_offset: Var[Union[float, int]]
103
+ align_offset: Var[float | int]
104
104
 
105
105
  # When true, overrides the side and align preferences to prevent collisions with boundary edges. Defaults to True.
106
106
  avoid_collisions: Var[bool]
107
107
 
108
108
  # 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.
109
- collision_padding: Var[Union[float, int, Dict[str, Union[float, int]]]]
109
+ collision_padding: Var[float | int | dict[str, float | int]]
110
110
 
111
111
  # 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".
112
112
  sticky: Var[LiteralStickyType]
@@ -144,7 +144,7 @@ class DropdownMenuSubTrigger(RadixThemesTriggerComponent):
144
144
  # Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item. Use this when the content is complex, or you have non-textual content inside.
145
145
  text_value: Var[str]
146
146
 
147
- _valid_parents: List[str] = ["DropdownMenuContent", "DropdownMenuSub"]
147
+ _valid_parents: ClassVar[list[str]] = ["DropdownMenuContent", "DropdownMenuSub"]
148
148
 
149
149
  _memoization_mode = MemoizationMode(recursive=False)
150
150
 
@@ -179,16 +179,16 @@ class DropdownMenuSubContent(RadixThemesComponent):
179
179
  force_mount: Var[bool]
180
180
 
181
181
  # The distance in pixels from the trigger. Defaults to 0.
182
- side_offset: Var[Union[float, int]]
182
+ side_offset: Var[float | int]
183
183
 
184
184
  # An offset in pixels from the "start" or "end" alignment options.
185
- align_offset: Var[Union[float, int]]
185
+ align_offset: Var[float | int]
186
186
 
187
187
  # When true, overrides the side and align preferences to prevent collisions with boundary edges. Defaults to True.
188
188
  avoid_collisions: Var[bool]
189
189
 
190
190
  # 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.
191
- collision_padding: Var[Union[float, int, Dict[str, Union[float, int]]]]
191
+ collision_padding: Var[float | int | dict[str, float | int]]
192
192
 
193
193
  # 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".
194
194
  sticky: Var[LiteralStickyType]
@@ -196,7 +196,7 @@ class DropdownMenuSubContent(RadixThemesComponent):
196
196
  # Whether to hide the content when the trigger becomes fully occluded. Defaults to False.
197
197
  hide_when_detached: Var[bool]
198
198
 
199
- _valid_parents: List[str] = ["DropdownMenuSub"]
199
+ _valid_parents: ClassVar[list[str]] = ["DropdownMenuSub"]
200
200
 
201
201
  # Fired when the escape key is pressed.
202
202
  on_escape_key_down: EventHandler[no_args_event_spec]
@@ -231,7 +231,10 @@ class DropdownMenuItem(RadixThemesComponent):
231
231
  # Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item. Use this when the content is complex, or you have non-textual content inside.
232
232
  text_value: Var[str]
233
233
 
234
- _valid_parents: List[str] = ["DropdownMenuContent", "DropdownMenuSubContent"]
234
+ _valid_parents: ClassVar[list[str]] = [
235
+ "DropdownMenuContent",
236
+ "DropdownMenuSubContent",
237
+ ]
235
238
 
236
239
  # Fired when the item is selected.
237
240
  on_select: EventHandler[no_args_event_spec]