reflex 0.8.4a2__py3-none-any.whl → 0.8.5__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 (145) hide show
  1. reflex/__init__.py +2 -9
  2. reflex/__init__.pyi +4 -2
  3. reflex/app.py +16 -10
  4. reflex/compiler/compiler.py +10 -3
  5. reflex/compiler/utils.py +6 -12
  6. reflex/components/base/app_wrap.pyi +0 -1
  7. reflex/components/base/body.pyi +0 -2
  8. reflex/components/base/document.pyi +0 -12
  9. reflex/components/base/error_boundary.pyi +0 -2
  10. reflex/components/base/fragment.pyi +0 -2
  11. reflex/components/base/link.pyi +0 -4
  12. reflex/components/base/meta.pyi +0 -6
  13. reflex/components/base/script.py +0 -2
  14. reflex/components/base/script.pyi +0 -2
  15. reflex/components/base/strict_mode.pyi +0 -2
  16. reflex/components/component.py +2 -30
  17. reflex/components/core/auto_scroll.py +14 -13
  18. reflex/components/core/auto_scroll.pyi +0 -2
  19. reflex/components/core/banner.pyi +0 -10
  20. reflex/components/core/client_side_routing.pyi +0 -2
  21. reflex/components/core/clipboard.py +1 -3
  22. reflex/components/core/clipboard.pyi +0 -2
  23. reflex/components/core/cond.py +0 -2
  24. reflex/components/core/debounce.pyi +0 -1
  25. reflex/components/core/helmet.pyi +0 -2
  26. reflex/components/core/html.pyi +0 -2
  27. reflex/components/core/match.py +1 -2
  28. reflex/components/core/sticky.pyi +0 -4
  29. reflex/components/core/upload.pyi +0 -10
  30. reflex/components/core/window_events.pyi +0 -2
  31. reflex/components/datadisplay/code.py +6 -4
  32. reflex/components/datadisplay/code.pyi +0 -4
  33. reflex/components/datadisplay/dataeditor.pyi +0 -2
  34. reflex/components/datadisplay/shiki_code_block.pyi +0 -6
  35. reflex/components/el/element.pyi +0 -2
  36. reflex/components/el/elements/base.pyi +0 -2
  37. reflex/components/el/elements/forms.py +5 -21
  38. reflex/components/el/elements/forms.pyi +0 -38
  39. reflex/components/el/elements/inline.pyi +0 -56
  40. reflex/components/el/elements/media.pyi +0 -52
  41. reflex/components/el/elements/metadata.pyi +0 -12
  42. reflex/components/el/elements/other.pyi +0 -14
  43. reflex/components/el/elements/scripts.pyi +0 -6
  44. reflex/components/el/elements/sectioning.pyi +0 -30
  45. reflex/components/el/elements/tables.pyi +0 -20
  46. reflex/components/el/elements/typography.pyi +0 -32
  47. reflex/components/gridjs/datatable.pyi +0 -4
  48. reflex/components/lucide/icon.py +12 -1
  49. reflex/components/lucide/icon.pyi +12 -7
  50. reflex/components/markdown/markdown.pyi +0 -2
  51. reflex/components/moment/moment.pyi +0 -2
  52. reflex/components/plotly/plotly.py +25 -17
  53. reflex/components/plotly/plotly.pyi +0 -18
  54. reflex/components/radix/primitives/accordion.pyi +0 -14
  55. reflex/components/radix/primitives/base.pyi +0 -4
  56. reflex/components/radix/primitives/drawer.pyi +0 -22
  57. reflex/components/radix/primitives/form.pyi +0 -20
  58. reflex/components/radix/primitives/progress.pyi +0 -10
  59. reflex/components/radix/primitives/slider.pyi +0 -10
  60. reflex/components/radix/themes/base.py +2 -4
  61. reflex/components/radix/themes/base.pyi +0 -15
  62. reflex/components/radix/themes/color_mode.pyi +0 -5
  63. reflex/components/radix/themes/components/alert_dialog.pyi +0 -11
  64. reflex/components/radix/themes/components/aspect_ratio.pyi +0 -2
  65. reflex/components/radix/themes/components/avatar.pyi +0 -2
  66. reflex/components/radix/themes/components/badge.pyi +0 -2
  67. reflex/components/radix/themes/components/button.pyi +0 -2
  68. reflex/components/radix/themes/components/callout.pyi +0 -10
  69. reflex/components/radix/themes/components/card.pyi +0 -2
  70. reflex/components/radix/themes/components/checkbox.pyi +0 -6
  71. reflex/components/radix/themes/components/checkbox_cards.pyi +0 -4
  72. reflex/components/radix/themes/components/checkbox_group.pyi +0 -4
  73. reflex/components/radix/themes/components/context_menu.pyi +0 -26
  74. reflex/components/radix/themes/components/data_list.pyi +0 -8
  75. reflex/components/radix/themes/components/dialog.pyi +0 -12
  76. reflex/components/radix/themes/components/dropdown_menu.pyi +0 -14
  77. reflex/components/radix/themes/components/hover_card.pyi +0 -7
  78. reflex/components/radix/themes/components/icon_button.pyi +0 -2
  79. reflex/components/radix/themes/components/inset.pyi +0 -2
  80. reflex/components/radix/themes/components/popover.pyi +0 -6
  81. reflex/components/radix/themes/components/progress.pyi +0 -2
  82. reflex/components/radix/themes/components/radio.pyi +0 -2
  83. reflex/components/radix/themes/components/radio_cards.pyi +0 -4
  84. reflex/components/radix/themes/components/radio_group.pyi +0 -8
  85. reflex/components/radix/themes/components/scroll_area.pyi +0 -2
  86. reflex/components/radix/themes/components/segmented_control.pyi +0 -4
  87. reflex/components/radix/themes/components/select.pyi +0 -18
  88. reflex/components/radix/themes/components/separator.pyi +0 -2
  89. reflex/components/radix/themes/components/skeleton.pyi +0 -2
  90. reflex/components/radix/themes/components/slider.pyi +0 -2
  91. reflex/components/radix/themes/components/spinner.pyi +0 -2
  92. reflex/components/radix/themes/components/switch.pyi +0 -2
  93. reflex/components/radix/themes/components/table.pyi +0 -14
  94. reflex/components/radix/themes/components/tabs.pyi +0 -10
  95. reflex/components/radix/themes/components/text_area.pyi +0 -2
  96. reflex/components/radix/themes/components/text_field.pyi +0 -6
  97. reflex/components/radix/themes/components/tooltip.pyi +0 -2
  98. reflex/components/radix/themes/layout/base.pyi +0 -2
  99. reflex/components/radix/themes/layout/box.pyi +0 -2
  100. reflex/components/radix/themes/layout/center.pyi +0 -2
  101. reflex/components/radix/themes/layout/container.pyi +0 -1
  102. reflex/components/radix/themes/layout/flex.pyi +0 -2
  103. reflex/components/radix/themes/layout/grid.pyi +0 -2
  104. reflex/components/radix/themes/layout/list.pyi +0 -10
  105. reflex/components/radix/themes/layout/section.pyi +0 -2
  106. reflex/components/radix/themes/layout/spacer.pyi +0 -2
  107. reflex/components/radix/themes/layout/stack.pyi +0 -6
  108. reflex/components/radix/themes/typography/blockquote.pyi +0 -2
  109. reflex/components/radix/themes/typography/code.pyi +0 -2
  110. reflex/components/radix/themes/typography/heading.pyi +0 -2
  111. reflex/components/radix/themes/typography/link.pyi +0 -2
  112. reflex/components/radix/themes/typography/text.pyi +0 -14
  113. reflex/components/react_player/audio.pyi +0 -2
  114. reflex/components/react_player/react_player.pyi +0 -2
  115. reflex/components/react_player/video.pyi +0 -2
  116. reflex/components/react_router/dom.pyi +0 -2
  117. reflex/components/recharts/cartesian.pyi +0 -38
  118. reflex/components/recharts/charts.pyi +0 -24
  119. reflex/components/recharts/general.pyi +0 -12
  120. reflex/components/recharts/polar.pyi +0 -12
  121. reflex/components/recharts/recharts.pyi +0 -4
  122. reflex/components/sonner/toast.pyi +0 -2
  123. reflex/components/tags/cond_tag.py +4 -3
  124. reflex/components/tags/iter_tag.py +1 -1
  125. reflex/components/tags/match_tag.py +3 -2
  126. reflex/components/tags/tag.py +39 -40
  127. reflex/constants/base.py +4 -58
  128. reflex/constants/compiler.py +0 -8
  129. reflex/constants/installer.py +5 -5
  130. reflex/environment.py +0 -10
  131. reflex/event.py +77 -15
  132. reflex/page.py +62 -4
  133. reflex/reflex.py +2 -5
  134. reflex/utils/net.py +7 -2
  135. reflex/utils/prerequisites.py +8 -71
  136. reflex/utils/processes.py +6 -6
  137. {reflex-0.8.4a2.dist-info → reflex-0.8.5.dist-info}/METADATA +2 -2
  138. {reflex-0.8.4a2.dist-info → reflex-0.8.5.dist-info}/RECORD +141 -145
  139. reflex/components/el/constants/__init__.py +0 -5
  140. reflex/components/el/constants/html.py +0 -343
  141. reflex/components/el/constants/react.py +0 -501
  142. reflex/components/el/constants/reflex.py +0 -51
  143. {reflex-0.8.4a2.dist-info → reflex-0.8.5.dist-info}/WHEEL +0 -0
  144. {reflex-0.8.4a2.dist-info → reflex-0.8.5.dist-info}/entry_points.txt +0 -0
  145. {reflex-0.8.4a2.dist-info → reflex-0.8.5.dist-info}/licenses/LICENSE +0 -0
@@ -57,7 +57,6 @@ class ConnectionToaster(Fragment):
57
57
  id: Any | None = None,
58
58
  ref: Var | None = None,
59
59
  class_name: Any | None = None,
60
- autofocus: bool | None = None,
61
60
  custom_attrs: dict[str, Var | Any] | None = None,
62
61
  on_blur: EventType[()] | None = None,
63
62
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -86,7 +85,6 @@ class ConnectionToaster(Fragment):
86
85
  id: The id for the component.
87
86
  ref: The Var to pass as the ref to the component.
88
87
  class_name: The class name for the component.
89
- autofocus: Whether the component should take the focus once the page is loaded
90
88
  custom_attrs: custom attribute
91
89
  **props: The properties of the component.
92
90
 
@@ -108,7 +106,6 @@ class ConnectionBanner(Component):
108
106
  id: Any | None = None,
109
107
  ref: Var | None = None,
110
108
  class_name: Any | None = None,
111
- autofocus: bool | None = None,
112
109
  custom_attrs: dict[str, Var | Any] | None = None,
113
110
  on_blur: EventType[()] | None = None,
114
111
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -151,7 +148,6 @@ class ConnectionModal(Component):
151
148
  id: Any | None = None,
152
149
  ref: Var | None = None,
153
150
  class_name: Any | None = None,
154
- autofocus: bool | None = None,
155
151
  custom_attrs: dict[str, Var | Any] | None = None,
156
152
  on_blur: EventType[()] | None = None,
157
153
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -195,7 +191,6 @@ class WifiOffPulse(Icon):
195
191
  id: Any | None = None,
196
192
  ref: Var | None = None,
197
193
  class_name: Any | None = None,
198
- autofocus: bool | None = None,
199
194
  custom_attrs: dict[str, Var | Any] | None = None,
200
195
  on_blur: EventType[()] | None = None,
201
196
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -225,7 +220,6 @@ class WifiOffPulse(Icon):
225
220
  id: The id for the component.
226
221
  ref: The Var to pass as the ref to the component.
227
222
  class_name: The class name for the component.
228
- autofocus: Whether the component should take the focus once the page is loaded
229
223
  custom_attrs: custom attribute
230
224
  **props: The properties of the component.
231
225
 
@@ -427,7 +421,6 @@ class ConnectionPulser(Div):
427
421
  id: Any | None = None,
428
422
  ref: Var | None = None,
429
423
  class_name: Any | None = None,
430
- autofocus: bool | None = None,
431
424
  custom_attrs: dict[str, Var | Any] | None = None,
432
425
  on_blur: EventType[()] | None = None,
433
426
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -471,7 +464,6 @@ class ConnectionPulser(Div):
471
464
  id: The id for the component.
472
465
  ref: The Var to pass as the ref to the component.
473
466
  class_name: The class name for the component.
474
- autofocus: Whether the component should take the focus once the page is loaded
475
467
  custom_attrs: custom attribute
476
468
  **props: The properties of the component.
477
469
 
@@ -671,7 +663,6 @@ class BackendDisabled(Div):
671
663
  id: Any | None = None,
672
664
  ref: Var | None = None,
673
665
  class_name: Any | None = None,
674
- autofocus: bool | None = None,
675
666
  custom_attrs: dict[str, Var | Any] | None = None,
676
667
  on_blur: EventType[()] | None = None,
677
668
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -715,7 +706,6 @@ class BackendDisabled(Div):
715
706
  id: The id for the component.
716
707
  ref: The Var to pass as the ref to the component.
717
708
  class_name: The class name for the component.
718
- autofocus: Whether the component should take the focus once the page is loaded
719
709
  custom_attrs: custom attribute
720
710
  **props: The properties of the component.
721
711
 
@@ -29,7 +29,6 @@ class ClientSideRouting(Component):
29
29
  id: Any | None = None,
30
30
  ref: Var | None = None,
31
31
  class_name: Any | None = None,
32
- autofocus: bool | None = None,
33
32
  custom_attrs: dict[str, Var | Any] | None = None,
34
33
  on_blur: EventType[()] | None = None,
35
34
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -58,7 +57,6 @@ class ClientSideRouting(Component):
58
57
  id: The id for the component.
59
58
  ref: The Var to pass as the ref to the component.
60
59
  class_name: The class name for the component.
61
- autofocus: Whether the component should take the focus once the page is loaded
62
60
  custom_attrs: custom attribute
63
61
  **props: The props of the component.
64
62
 
@@ -56,10 +56,8 @@ class Clipboard(Fragment):
56
56
 
57
57
  def _render(self) -> Tag:
58
58
  tag = super()._render()
59
- tag.remove_props("targets")
60
59
  # Ensure a different Fragment component is created whenever targets differ
61
- tag.add_props(key=self.targets)
62
- return tag
60
+ return tag.remove_props("targets").add_props(key=self.targets)
63
61
 
64
62
  def add_imports(self) -> dict[str, ImportVar]:
65
63
  """Add the imports for the Clipboard component.
@@ -30,7 +30,6 @@ class Clipboard(Fragment):
30
30
  id: Any | None = None,
31
31
  ref: Var | None = None,
32
32
  class_name: Any | None = None,
33
- autofocus: bool | None = None,
34
33
  custom_attrs: dict[str, Var | Any] | None = None,
35
34
  on_blur: EventType[()] | None = None,
36
35
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -63,7 +62,6 @@ class Clipboard(Fragment):
63
62
  id: The id for the component.
64
63
  ref: The Var to pass as the ref to the component.
65
64
  class_name: The class name for the component.
66
- autofocus: Whether the component should take the focus once the page is loaded
67
65
  custom_attrs: custom attribute
68
66
  **props: The properties of the component.
69
67
 
@@ -80,8 +80,6 @@ class Cond(Component):
80
80
  sx=self.style,
81
81
  id=self.id,
82
82
  class_name=self.class_name,
83
- ).set(
84
- props=tag.format_props(),
85
83
  ),
86
84
  cond_state=str(self.cond),
87
85
  )
@@ -34,7 +34,6 @@ class DebounceInput(Component):
34
34
  id: Any | None = None,
35
35
  ref: Var | None = None,
36
36
  class_name: Any | None = None,
37
- autofocus: bool | None = None,
38
37
  custom_attrs: dict[str, Var | Any] | None = None,
39
38
  on_blur: EventType[()] | None = None,
40
39
  on_change: EventType[()] | None = None,
@@ -25,7 +25,6 @@ class Helmet(Component):
25
25
  id: Any | None = None,
26
26
  ref: Var | None = None,
27
27
  class_name: Any | None = None,
28
- autofocus: bool | None = None,
29
28
  custom_attrs: dict[str, Var | Any] | None = None,
30
29
  on_blur: EventType[()] | None = None,
31
30
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -54,7 +53,6 @@ class Helmet(Component):
54
53
  id: The id for the component.
55
54
  ref: The Var to pass as the ref to the component.
56
55
  class_name: The class name for the component.
57
- autofocus: Whether the component should take the focus once the page is loaded
58
56
  custom_attrs: custom attribute
59
57
  **props: The props of the component.
60
58
 
@@ -204,7 +204,6 @@ class Html(Div):
204
204
  id: Any | None = None,
205
205
  ref: Var | None = None,
206
206
  class_name: Any | None = None,
207
- autofocus: bool | None = None,
208
207
  custom_attrs: dict[str, Var | Any] | None = None,
209
208
  on_blur: EventType[()] | None = None,
210
209
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -250,7 +249,6 @@ class Html(Div):
250
249
  id: The id for the component.
251
250
  ref: The Var to pass as the ref to the component.
252
251
  class_name: The class name for the component.
253
- autofocus: Whether the component should take the focus once the page is loaded
254
252
  custom_attrs: custom attribute
255
253
  **props: The props to pass to the component.
256
254
 
@@ -256,8 +256,7 @@ class Match(MemoizationLeaf):
256
256
  The dictionary for template of component.
257
257
  """
258
258
  tag = self._render()
259
- tag.name = "match"
260
- return dict(tag)
259
+ return dict(tag.set(name="match"))
261
260
 
262
261
  def add_imports(self) -> ImportDict:
263
262
  """Add imports for the Match component.
@@ -209,7 +209,6 @@ class StickyLogo(Svg):
209
209
  id: Any | None = None,
210
210
  ref: Var | None = None,
211
211
  class_name: Any | None = None,
212
- autofocus: bool | None = None,
213
212
  custom_attrs: dict[str, Var | Any] | None = None,
214
213
  on_blur: EventType[()] | None = None,
215
214
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -561,7 +560,6 @@ class StickyLabel(Text):
561
560
  id: Any | None = None,
562
561
  ref: Var | None = None,
563
562
  class_name: Any | None = None,
564
- autofocus: bool | None = None,
565
563
  custom_attrs: dict[str, Var | Any] | None = None,
566
564
  on_blur: EventType[()] | None = None,
567
565
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -816,7 +814,6 @@ class StickyBadge(A):
816
814
  id: Any | None = None,
817
815
  ref: Var | None = None,
818
816
  class_name: Any | None = None,
819
- autofocus: bool | None = None,
820
817
  custom_attrs: dict[str, Var | Any] | None = None,
821
818
  on_blur: EventType[()] | None = None,
822
819
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -1073,7 +1070,6 @@ class StickyNamespace(ComponentNamespace):
1073
1070
  id: Any | None = None,
1074
1071
  ref: Var | None = None,
1075
1072
  class_name: Any | None = None,
1076
- autofocus: bool | None = None,
1077
1073
  custom_attrs: dict[str, Var | Any] | None = None,
1078
1074
  on_blur: EventType[()] | None = None,
1079
1075
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -53,7 +53,6 @@ class UploadFilesProvider(Component):
53
53
  id: Any | None = None,
54
54
  ref: Var | None = None,
55
55
  class_name: Any | None = None,
56
- autofocus: bool | None = None,
57
56
  custom_attrs: dict[str, Var | Any] | None = None,
58
57
  on_blur: EventType[()] | None = None,
59
58
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -82,7 +81,6 @@ class UploadFilesProvider(Component):
82
81
  id: The id for the component.
83
82
  ref: The Var to pass as the ref to the component.
84
83
  class_name: The class name for the component.
85
- autofocus: Whether the component should take the focus once the page is loaded
86
84
  custom_attrs: custom attribute
87
85
  **props: The props of the component.
88
86
 
@@ -104,7 +102,6 @@ class GhostUpload(Fragment):
104
102
  id: Any | None = None,
105
103
  ref: Var | None = None,
106
104
  class_name: Any | None = None,
107
- autofocus: bool | None = None,
108
105
  custom_attrs: dict[str, Var | Any] | None = None,
109
106
  on_blur: EventType[()] | None = None,
110
107
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -135,7 +132,6 @@ class GhostUpload(Fragment):
135
132
  id: The id for the component.
136
133
  ref: The Var to pass as the ref to the component.
137
134
  class_name: The class name for the component.
138
- autofocus: Whether the component should take the focus once the page is loaded
139
135
  custom_attrs: custom attribute
140
136
  **props: The props of the component.
141
137
 
@@ -169,7 +165,6 @@ class Upload(MemoizationLeaf):
169
165
  id: Any | None = None,
170
166
  ref: Var | None = None,
171
167
  class_name: Any | None = None,
172
- autofocus: bool | None = None,
173
168
  custom_attrs: dict[str, Var | Any] | None = None,
174
169
  on_blur: EventType[()] | None = None,
175
170
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -210,7 +205,6 @@ class Upload(MemoizationLeaf):
210
205
  id: The id for the component.
211
206
  ref: The Var to pass as the ref to the component.
212
207
  class_name: The class name for the component.
213
- autofocus: Whether the component should take the focus once the page is loaded
214
208
  custom_attrs: custom attribute
215
209
  **props: The properties of the component.
216
210
 
@@ -242,7 +236,6 @@ class StyledUpload(Upload):
242
236
  id: Any | None = None,
243
237
  ref: Var | None = None,
244
238
  class_name: Any | None = None,
245
- autofocus: bool | None = None,
246
239
  custom_attrs: dict[str, Var | Any] | None = None,
247
240
  on_blur: EventType[()] | None = None,
248
241
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -283,7 +276,6 @@ class StyledUpload(Upload):
283
276
  id: The id for the component.
284
277
  ref: The Var to pass as the ref to the component.
285
278
  class_name: The class name for the component.
286
- autofocus: Whether the component should take the focus once the page is loaded
287
279
  custom_attrs: custom attribute
288
280
  **props: The properties of the component.
289
281
 
@@ -316,7 +308,6 @@ class UploadNamespace(ComponentNamespace):
316
308
  id: Any | None = None,
317
309
  ref: Var | None = None,
318
310
  class_name: Any | None = None,
319
- autofocus: bool | None = None,
320
311
  custom_attrs: dict[str, Var | Any] | None = None,
321
312
  on_blur: EventType[()] | None = None,
322
313
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -357,7 +348,6 @@ class UploadNamespace(ComponentNamespace):
357
348
  id: The id for the component.
358
349
  ref: The Var to pass as the ref to the component.
359
350
  class_name: The class name for the component.
360
- autofocus: Whether the component should take the focus once the page is loaded
361
351
  custom_attrs: custom attribute
362
352
  **props: The properties of the component.
363
353
 
@@ -26,7 +26,6 @@ class WindowEventListener(Fragment):
26
26
  id: Any | None = None,
27
27
  ref: Var | None = None,
28
28
  class_name: Any | None = None,
29
- autofocus: bool | None = None,
30
29
  custom_attrs: dict[str, Var | Any] | None = None,
31
30
  on_before_unload: EventType[()] | None = None,
32
31
  on_blur: EventType[()] | None = None,
@@ -73,7 +72,6 @@ class WindowEventListener(Fragment):
73
72
  id: The id for the component.
74
73
  ref: The Var to pass as the ref to the component.
75
74
  class_name: The class name for the component.
76
- autofocus: Whether the component should take the focus once the page is loaded
77
75
  custom_attrs: custom attribute
78
76
  **props: The props of the component.
79
77
 
@@ -500,12 +500,14 @@ class CodeBlock(Component, MarkdownComponentMap):
500
500
 
501
501
  theme = self.theme
502
502
 
503
- out.add_props(style=theme).remove_props("theme", "code").add_props(
504
- children=self.code,
503
+ return (
504
+ out.add_props(style=theme)
505
+ .remove_props("theme", "code")
506
+ .add_props(
507
+ children=self.code,
508
+ )
505
509
  )
506
510
 
507
- return out
508
-
509
511
 
510
512
  class CodeblockNamespace(ComponentNamespace):
511
513
  """Namespace for the CodeBlock component."""
@@ -938,7 +938,6 @@ class CodeBlock(Component, MarkdownComponentMap):
938
938
  id: Any | None = None,
939
939
  ref: Var | None = None,
940
940
  class_name: Any | None = None,
941
- autofocus: bool | None = None,
942
941
  custom_attrs: dict[str, Var | Any] | None = None,
943
942
  on_blur: EventType[()] | None = None,
944
943
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -977,7 +976,6 @@ class CodeBlock(Component, MarkdownComponentMap):
977
976
  id: The id for the component.
978
977
  ref: The Var to pass as the ref to the component.
979
978
  class_name: The class name for the component.
980
- autofocus: Whether the component should take the focus once the page is loaded
981
979
  custom_attrs: custom attribute
982
980
  **props: The props to pass to the component.
983
981
 
@@ -1576,7 +1574,6 @@ class CodeblockNamespace(ComponentNamespace):
1576
1574
  id: Any | None = None,
1577
1575
  ref: Var | None = None,
1578
1576
  class_name: Any | None = None,
1579
- autofocus: bool | None = None,
1580
1577
  custom_attrs: dict[str, Var | Any] | None = None,
1581
1578
  on_blur: EventType[()] | None = None,
1582
1579
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -1615,7 +1612,6 @@ class CodeblockNamespace(ComponentNamespace):
1615
1612
  id: The id for the component.
1616
1613
  ref: The Var to pass as the ref to the component.
1617
1614
  class_name: The class name for the component.
1618
- autofocus: Whether the component should take the focus once the page is loaded
1619
1615
  custom_attrs: custom attribute
1620
1616
  **props: The props to pass to the component.
1621
1617
 
@@ -174,7 +174,6 @@ class DataEditor(NoSSRComponent):
174
174
  id: Any | None = None,
175
175
  ref: Var | None = None,
176
176
  class_name: Any | None = None,
177
- autofocus: bool | None = None,
178
177
  custom_attrs: dict[str, Var | Any] | None = None,
179
178
  on_blur: EventType[()] | None = None,
180
179
  on_cell_activated: EventType[()] | EventType[tuple[int, int]] | None = None,
@@ -287,7 +286,6 @@ class DataEditor(NoSSRComponent):
287
286
  id: The id for the component.
288
287
  ref: The Var to pass as the ref to the component.
289
288
  class_name: The class name for the component.
290
- autofocus: Whether the component should take the focus once the page is loaded
291
289
  custom_attrs: custom attribute
292
290
  **props: The props of the data editor.
293
291
 
@@ -920,7 +920,6 @@ class ShikiCodeBlock(Component, MarkdownComponentMap):
920
920
  id: Any | None = None,
921
921
  ref: Var | None = None,
922
922
  class_name: Any | None = None,
923
- autofocus: bool | None = None,
924
923
  custom_attrs: dict[str, Var | Any] | None = None,
925
924
  on_blur: EventType[()] | None = None,
926
925
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -955,7 +954,6 @@ class ShikiCodeBlock(Component, MarkdownComponentMap):
955
954
  id: The id for the component.
956
955
  ref: The Var to pass as the ref to the component.
957
956
  class_name: The class name for the component.
958
- autofocus: Whether the component should take the focus once the page is loaded
959
957
  custom_attrs: custom attribute
960
958
  **props: The props to pass to the component.
961
959
 
@@ -1538,7 +1536,6 @@ class ShikiHighLevelCodeBlock(ShikiCodeBlock):
1538
1536
  id: Any | None = None,
1539
1537
  ref: Var | None = None,
1540
1538
  class_name: Any | None = None,
1541
- autofocus: bool | None = None,
1542
1539
  custom_attrs: dict[str, Var | Any] | None = None,
1543
1540
  on_blur: EventType[()] | None = None,
1544
1541
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -1577,7 +1574,6 @@ class ShikiHighLevelCodeBlock(ShikiCodeBlock):
1577
1574
  id: The id for the component.
1578
1575
  ref: The Var to pass as the ref to the component.
1579
1576
  class_name: The class name for the component.
1580
- autofocus: Whether the component should take the focus once the page is loaded
1581
1577
  custom_attrs: custom attribute
1582
1578
  **props: The props to pass to the component.
1583
1579
 
@@ -2160,7 +2156,6 @@ class CodeblockNamespace(ComponentNamespace):
2160
2156
  id: Any | None = None,
2161
2157
  ref: Var | None = None,
2162
2158
  class_name: Any | None = None,
2163
- autofocus: bool | None = None,
2164
2159
  custom_attrs: dict[str, Var | Any] | None = None,
2165
2160
  on_blur: EventType[()] | None = None,
2166
2161
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -2199,7 +2194,6 @@ class CodeblockNamespace(ComponentNamespace):
2199
2194
  id: The id for the component.
2200
2195
  ref: The Var to pass as the ref to the component.
2201
2196
  class_name: The class name for the component.
2202
- autofocus: Whether the component should take the focus once the page is loaded
2203
2197
  custom_attrs: custom attribute
2204
2198
  **props: The props to pass to the component.
2205
2199
 
@@ -25,7 +25,6 @@ class Element(Component):
25
25
  id: Any | None = None,
26
26
  ref: Var | None = None,
27
27
  class_name: Any | None = None,
28
- autofocus: bool | None = None,
29
28
  custom_attrs: dict[str, Var | Any] | None = None,
30
29
  on_blur: EventType[()] | None = None,
31
30
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -54,7 +53,6 @@ class Element(Component):
54
53
  id: The id for the component.
55
54
  ref: The Var to pass as the ref to the component.
56
55
  class_name: The class name for the component.
57
- autofocus: Whether the component should take the focus once the page is loaded
58
56
  custom_attrs: custom attribute
59
57
  **props: The props of the component.
60
58
 
@@ -281,7 +281,6 @@ class BaseHTML(Element):
281
281
  id: Any | None = None,
282
282
  ref: Var | None = None,
283
283
  class_name: Any | None = None,
284
- autofocus: bool | None = None,
285
284
  custom_attrs: dict[str, Var | Any] | None = None,
286
285
  on_blur: EventType[()] | None = None,
287
286
  on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -326,7 +325,6 @@ class BaseHTML(Element):
326
325
  id: The id for the component.
327
326
  ref: The Var to pass as the ref to the component.
328
327
  class_name: The class name for the component.
329
- autofocus: Whether the component should take the focus once the page is loaded
330
328
  custom_attrs: custom attribute
331
329
  **props: The props of the component.
332
330
 
@@ -12,6 +12,7 @@ from reflex.components.el.element import Element
12
12
  from reflex.components.tags.tag import Tag
13
13
  from reflex.constants import Dirs, EventTriggers
14
14
  from reflex.event import (
15
+ FORM_DATA,
15
16
  EventChain,
16
17
  EventHandler,
17
18
  checked_input_event,
@@ -19,6 +20,8 @@ from reflex.event import (
19
20
  input_event,
20
21
  int_input_event,
21
22
  key_event,
23
+ on_submit_event,
24
+ on_submit_string_event,
22
25
  prevent_default,
23
26
  )
24
27
  from reflex.utils.imports import ImportDict
@@ -28,7 +31,6 @@ from reflex.vars.number import ternary_operation
28
31
 
29
32
  from .base import BaseHTML
30
33
 
31
- FORM_DATA = Var(_js_expr="form_data")
32
34
  HANDLE_SUBMIT_JS_JINJA2 = Environment().from_string(
33
35
  """
34
36
  const handleSubmit_{{ handle_submit_unique_name }} = useCallback((ev) => {
@@ -110,24 +112,6 @@ class Fieldset(Element):
110
112
  name: Var[str]
111
113
 
112
114
 
113
- def on_submit_event_spec() -> tuple[Var[dict[str, Any]]]:
114
- """Event handler spec for the on_submit event.
115
-
116
- Returns:
117
- The event handler spec.
118
- """
119
- return (FORM_DATA,)
120
-
121
-
122
- def on_submit_string_event_spec() -> tuple[Var[dict[str, str]]]:
123
- """Event handler spec for the on_submit event.
124
-
125
- Returns:
126
- The event handler spec.
127
- """
128
- return (FORM_DATA,)
129
-
130
-
131
115
  class Form(BaseHTML):
132
116
  """Display the form element."""
133
117
 
@@ -167,7 +151,7 @@ class Form(BaseHTML):
167
151
  handle_submit_unique_name: Var[str]
168
152
 
169
153
  # Fired when the form is submitted
170
- on_submit: EventHandler[on_submit_event_spec, on_submit_string_event_spec]
154
+ on_submit: EventHandler[on_submit_event, on_submit_string_event]
171
155
 
172
156
  @classmethod
173
157
  def create(cls, *children, **props):
@@ -228,7 +212,7 @@ class Form(BaseHTML):
228
212
  def _render(self) -> Tag:
229
213
  render_tag = super()._render()
230
214
  if EventTriggers.ON_SUBMIT in self.event_triggers:
231
- render_tag.add_props(
215
+ render_tag = render_tag.add_props(
232
216
  **{
233
217
  EventTriggers.ON_SUBMIT: Var(
234
218
  _js_expr=f"handleSubmit_{self.handle_submit_unique_name}",