reflex 0.7.13a1__py3-none-any.whl → 0.7.14a1__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 (258) hide show
  1. reflex/.templates/apps/blank/code/blank.py +0 -2
  2. reflex/app.py +79 -72
  3. reflex/app_mixins/lifespan.py +2 -3
  4. reflex/app_mixins/middleware.py +1 -0
  5. reflex/app_mixins/mixin.py +0 -1
  6. reflex/assets.py +6 -3
  7. reflex/base.py +3 -2
  8. reflex/compiler/compiler.py +77 -64
  9. reflex/compiler/utils.py +8 -6
  10. reflex/components/base/app_wrap.pyi +0 -1
  11. reflex/components/base/bare.py +5 -7
  12. reflex/components/base/body.pyi +0 -1
  13. reflex/components/base/document.pyi +0 -5
  14. reflex/components/base/error_boundary.pyi +0 -1
  15. reflex/components/base/fragment.pyi +0 -1
  16. reflex/components/base/head.pyi +0 -2
  17. reflex/components/base/link.pyi +0 -2
  18. reflex/components/base/meta.py +2 -1
  19. reflex/components/base/meta.pyi +0 -4
  20. reflex/components/base/script.py +2 -1
  21. reflex/components/base/script.pyi +0 -1
  22. reflex/components/base/strict_mode.pyi +0 -1
  23. reflex/components/component.py +38 -40
  24. reflex/components/core/auto_scroll.pyi +0 -1
  25. reflex/components/core/banner.pyi +0 -6
  26. reflex/components/core/breakpoints.py +9 -11
  27. reflex/components/core/client_side_routing.pyi +0 -2
  28. reflex/components/core/clipboard.pyi +0 -1
  29. reflex/components/core/colors.py +10 -7
  30. reflex/components/core/cond.py +4 -2
  31. reflex/components/core/debounce.py +5 -3
  32. reflex/components/core/debounce.pyi +0 -1
  33. reflex/components/core/foreach.py +8 -6
  34. reflex/components/core/html.py +3 -3
  35. reflex/components/core/html.pyi +0 -1
  36. reflex/components/core/match.py +19 -17
  37. reflex/components/core/sticky.pyi +0 -4
  38. reflex/components/core/upload.pyi +0 -5
  39. reflex/components/datadisplay/code.py +1 -2
  40. reflex/components/datadisplay/code.pyi +0 -2
  41. reflex/components/datadisplay/dataeditor.py +7 -10
  42. reflex/components/datadisplay/dataeditor.pyi +0 -1
  43. reflex/components/datadisplay/logo.py +3 -4
  44. reflex/components/datadisplay/shiki_code_block.py +8 -11
  45. reflex/components/datadisplay/shiki_code_block.pyi +0 -3
  46. reflex/components/dynamic.py +2 -3
  47. reflex/components/el/__init__.pyi +2 -0
  48. reflex/components/el/element.pyi +0 -1
  49. reflex/components/el/elements/__init__.py +1 -0
  50. reflex/components/el/elements/__init__.pyi +3 -0
  51. reflex/components/el/elements/base.pyi +0 -1
  52. reflex/components/el/elements/forms.py +3 -4
  53. reflex/components/el/elements/forms.pyi +1 -18
  54. reflex/components/el/elements/inline.pyi +0 -28
  55. reflex/components/el/elements/media.py +26 -0
  56. reflex/components/el/elements/media.pyi +259 -25
  57. reflex/components/el/elements/metadata.py +0 -1
  58. reflex/components/el/elements/metadata.pyi +0 -6
  59. reflex/components/el/elements/other.pyi +0 -7
  60. reflex/components/el/elements/scripts.pyi +0 -3
  61. reflex/components/el/elements/sectioning.pyi +0 -15
  62. reflex/components/el/elements/tables.pyi +0 -10
  63. reflex/components/el/elements/typography.pyi +0 -15
  64. reflex/components/gridjs/datatable.py +10 -13
  65. reflex/components/gridjs/datatable.pyi +0 -2
  66. reflex/components/lucide/icon.py +10 -9
  67. reflex/components/lucide/icon.pyi +0 -3
  68. reflex/components/markdown/markdown.py +6 -8
  69. reflex/components/markdown/markdown.pyi +0 -1
  70. reflex/components/moment/moment.pyi +0 -1
  71. reflex/components/next/base.py +0 -2
  72. reflex/components/next/base.pyi +0 -3
  73. reflex/components/next/image.pyi +0 -1
  74. reflex/components/next/link.pyi +0 -1
  75. reflex/components/next/video.pyi +0 -1
  76. reflex/components/plotly/plotly.pyi +0 -9
  77. reflex/components/props.py +4 -3
  78. reflex/components/radix/primitives/accordion.py +1 -1
  79. reflex/components/radix/primitives/accordion.pyi +0 -7
  80. reflex/components/radix/primitives/base.py +1 -3
  81. reflex/components/radix/primitives/base.pyi +0 -2
  82. reflex/components/radix/primitives/drawer.py +1 -1
  83. reflex/components/radix/primitives/drawer.pyi +0 -11
  84. reflex/components/radix/primitives/form.py +5 -9
  85. reflex/components/radix/primitives/form.pyi +0 -12
  86. reflex/components/radix/primitives/progress.py +1 -1
  87. reflex/components/radix/primitives/progress.pyi +0 -5
  88. reflex/components/radix/primitives/slider.py +1 -1
  89. reflex/components/radix/primitives/slider.pyi +0 -5
  90. reflex/components/radix/themes/base.pyi +0 -8
  91. reflex/components/radix/themes/color_mode.pyi +0 -3
  92. reflex/components/radix/themes/components/alert_dialog.py +4 -2
  93. reflex/components/radix/themes/components/alert_dialog.pyi +4 -9
  94. reflex/components/radix/themes/components/aspect_ratio.py +1 -2
  95. reflex/components/radix/themes/components/aspect_ratio.pyi +1 -3
  96. reflex/components/radix/themes/components/avatar.py +5 -2
  97. reflex/components/radix/themes/components/avatar.pyi +1 -3
  98. reflex/components/radix/themes/components/badge.py +5 -2
  99. reflex/components/radix/themes/components/badge.pyi +1 -3
  100. reflex/components/radix/themes/components/button.py +2 -3
  101. reflex/components/radix/themes/components/button.pyi +1 -3
  102. reflex/components/radix/themes/components/callout.py +1 -2
  103. reflex/components/radix/themes/components/callout.pyi +1 -7
  104. reflex/components/radix/themes/components/card.py +1 -2
  105. reflex/components/radix/themes/components/card.pyi +1 -3
  106. reflex/components/radix/themes/components/checkbox.py +7 -4
  107. reflex/components/radix/themes/components/checkbox.pyi +1 -5
  108. reflex/components/radix/themes/components/checkbox_cards.py +1 -2
  109. reflex/components/radix/themes/components/checkbox_cards.pyi +1 -4
  110. reflex/components/radix/themes/components/checkbox_group.py +1 -2
  111. reflex/components/radix/themes/components/checkbox_group.pyi +1 -4
  112. reflex/components/radix/themes/components/context_menu.py +1 -1
  113. reflex/components/radix/themes/components/context_menu.pyi +1 -14
  114. reflex/components/radix/themes/components/data_list.py +1 -2
  115. reflex/components/radix/themes/components/data_list.pyi +1 -6
  116. reflex/components/radix/themes/components/dialog.py +4 -2
  117. reflex/components/radix/themes/components/dialog.pyi +4 -9
  118. reflex/components/radix/themes/components/dropdown_menu.py +5 -2
  119. reflex/components/radix/themes/components/dropdown_menu.pyi +4 -10
  120. reflex/components/radix/themes/components/hover_card.py +4 -2
  121. reflex/components/radix/themes/components/hover_card.pyi +4 -6
  122. reflex/components/radix/themes/components/icon_button.py +7 -8
  123. reflex/components/radix/themes/components/icon_button.pyi +1 -3
  124. reflex/components/radix/themes/components/inset.py +1 -2
  125. reflex/components/radix/themes/components/inset.pyi +1 -3
  126. reflex/components/radix/themes/components/popover.py +4 -2
  127. reflex/components/radix/themes/components/popover.pyi +4 -6
  128. reflex/components/radix/themes/components/progress.py +1 -2
  129. reflex/components/radix/themes/components/progress.pyi +1 -3
  130. reflex/components/radix/themes/components/radio.py +1 -2
  131. reflex/components/radix/themes/components/radio.pyi +1 -3
  132. reflex/components/radix/themes/components/radio_cards.py +1 -2
  133. reflex/components/radix/themes/components/radio_cards.pyi +1 -4
  134. reflex/components/radix/themes/components/radio_group.py +7 -5
  135. reflex/components/radix/themes/components/radio_group.pyi +1 -6
  136. reflex/components/radix/themes/components/scroll_area.py +1 -2
  137. reflex/components/radix/themes/components/scroll_area.pyi +1 -3
  138. reflex/components/radix/themes/components/segmented_control.py +1 -2
  139. reflex/components/radix/themes/components/segmented_control.pyi +1 -4
  140. reflex/components/radix/themes/components/select.py +5 -2
  141. reflex/components/radix/themes/components/select.pyi +1 -11
  142. reflex/components/radix/themes/components/separator.py +1 -2
  143. reflex/components/radix/themes/components/separator.pyi +1 -3
  144. reflex/components/radix/themes/components/skeleton.py +1 -2
  145. reflex/components/radix/themes/components/skeleton.pyi +1 -3
  146. reflex/components/radix/themes/components/slider.py +1 -2
  147. reflex/components/radix/themes/components/slider.pyi +1 -3
  148. reflex/components/radix/themes/components/spinner.py +1 -2
  149. reflex/components/radix/themes/components/spinner.pyi +1 -3
  150. reflex/components/radix/themes/components/switch.py +1 -2
  151. reflex/components/radix/themes/components/switch.pyi +1 -3
  152. reflex/components/radix/themes/components/table.py +1 -2
  153. reflex/components/radix/themes/components/table.pyi +1 -9
  154. reflex/components/radix/themes/components/tabs.py +1 -2
  155. reflex/components/radix/themes/components/tabs.pyi +1 -7
  156. reflex/components/radix/themes/components/text_area.py +5 -2
  157. reflex/components/radix/themes/components/text_area.pyi +1 -3
  158. reflex/components/radix/themes/components/text_field.py +5 -2
  159. reflex/components/radix/themes/components/text_field.pyi +1 -5
  160. reflex/components/radix/themes/components/tooltip.py +1 -2
  161. reflex/components/radix/themes/components/tooltip.pyi +1 -3
  162. reflex/components/radix/themes/layout/base.py +5 -2
  163. reflex/components/radix/themes/layout/base.pyi +5 -3
  164. reflex/components/radix/themes/layout/box.py +1 -2
  165. reflex/components/radix/themes/layout/box.pyi +1 -3
  166. reflex/components/radix/themes/layout/center.pyi +0 -1
  167. reflex/components/radix/themes/layout/container.py +1 -2
  168. reflex/components/radix/themes/layout/container.pyi +1 -3
  169. reflex/components/radix/themes/layout/flex.py +6 -2
  170. reflex/components/radix/themes/layout/flex.pyi +1 -3
  171. reflex/components/radix/themes/layout/grid.py +6 -2
  172. reflex/components/radix/themes/layout/grid.pyi +1 -3
  173. reflex/components/radix/themes/layout/list.py +2 -1
  174. reflex/components/radix/themes/layout/list.pyi +0 -5
  175. reflex/components/radix/themes/layout/section.py +1 -2
  176. reflex/components/radix/themes/layout/section.pyi +1 -3
  177. reflex/components/radix/themes/layout/spacer.pyi +0 -1
  178. reflex/components/radix/themes/layout/stack.py +1 -1
  179. reflex/components/radix/themes/layout/stack.pyi +0 -3
  180. reflex/components/radix/themes/typography/blockquote.py +1 -1
  181. reflex/components/radix/themes/typography/blockquote.pyi +1 -3
  182. reflex/components/radix/themes/typography/code.py +5 -1
  183. reflex/components/radix/themes/typography/code.pyi +1 -3
  184. reflex/components/radix/themes/typography/heading.py +1 -1
  185. reflex/components/radix/themes/typography/heading.pyi +1 -3
  186. reflex/components/radix/themes/typography/link.py +3 -2
  187. reflex/components/radix/themes/typography/link.pyi +1 -3
  188. reflex/components/radix/themes/typography/text.py +1 -1
  189. reflex/components/radix/themes/typography/text.pyi +1 -9
  190. reflex/components/react_player/audio.py +0 -2
  191. reflex/components/react_player/audio.pyi +0 -3
  192. reflex/components/react_player/react_player.pyi +0 -1
  193. reflex/components/react_player/video.py +0 -2
  194. reflex/components/react_player/video.pyi +0 -3
  195. reflex/components/recharts/__init__.py +1 -1
  196. reflex/components/recharts/__init__.pyi +1 -1
  197. reflex/components/recharts/cartesian.py +20 -25
  198. reflex/components/recharts/cartesian.pyi +20 -37
  199. reflex/components/recharts/charts.py +2 -1
  200. reflex/components/recharts/charts.pyi +0 -12
  201. reflex/components/recharts/general.pyi +0 -6
  202. reflex/components/recharts/polar.py +5 -4
  203. reflex/components/recharts/polar.pyi +4 -10
  204. reflex/components/recharts/recharts.py +12 -10
  205. reflex/components/recharts/recharts.pyi +10 -11
  206. reflex/components/sonner/toast.py +2 -2
  207. reflex/components/sonner/toast.pyi +0 -2
  208. reflex/components/suneditor/editor.py +2 -1
  209. reflex/components/suneditor/editor.pyi +0 -1
  210. reflex/components/tags/iter_tag.py +4 -2
  211. reflex/config.py +47 -35
  212. reflex/constants/base.py +3 -3
  213. reflex/constants/compiler.py +8 -6
  214. reflex/constants/installer.py +24 -15
  215. reflex/custom_components/custom_components.py +1 -2
  216. reflex/event.py +58 -60
  217. reflex/experimental/__init__.py +2 -2
  218. reflex/experimental/client_state.py +9 -4
  219. reflex/experimental/layout.pyi +0 -5
  220. reflex/istate/manager.py +15 -19
  221. reflex/istate/proxy.py +19 -12
  222. reflex/model.py +6 -4
  223. reflex/plugins/base.py +8 -0
  224. reflex/plugins/tailwind_v3.py +8 -0
  225. reflex/plugins/tailwind_v4.py +9 -0
  226. reflex/reflex.py +9 -11
  227. reflex/route.py +7 -9
  228. reflex/state.py +66 -70
  229. reflex/style.py +3 -1
  230. reflex/testing.py +46 -29
  231. reflex/utils/build.py +2 -1
  232. reflex/utils/console.py +9 -17
  233. reflex/utils/exec.py +9 -11
  234. reflex/utils/format.py +21 -24
  235. reflex/utils/imports.py +4 -3
  236. reflex/utils/lazy_loader.py +3 -3
  237. reflex/utils/misc.py +2 -1
  238. reflex/utils/net.py +2 -2
  239. reflex/utils/path_ops.py +2 -1
  240. reflex/utils/prerequisites.py +67 -38
  241. reflex/utils/processes.py +4 -6
  242. reflex/utils/pyi_generator.py +46 -41
  243. reflex/utils/redir.py +1 -1
  244. reflex/utils/serializers.py +4 -4
  245. reflex/utils/telemetry.py +42 -4
  246. reflex/utils/types.py +16 -13
  247. reflex/vars/base.py +96 -109
  248. reflex/vars/datetime.py +2 -1
  249. reflex/vars/dep_tracking.py +19 -28
  250. reflex/vars/number.py +6 -7
  251. reflex/vars/object.py +5 -6
  252. reflex/vars/sequence.py +11 -11
  253. {reflex-0.7.13a1.dist-info → reflex-0.7.14a1.dist-info}/METADATA +1 -1
  254. reflex-0.7.14a1.dist-info/RECORD +407 -0
  255. reflex-0.7.13a1.dist-info/RECORD +0 -407
  256. {reflex-0.7.13a1.dist-info → reflex-0.7.14a1.dist-info}/WHEEL +0 -0
  257. {reflex-0.7.13a1.dist-info → reflex-0.7.14a1.dist-info}/entry_points.txt +0 -0
  258. {reflex-0.7.13a1.dist-info → reflex-0.7.14a1.dist-info}/licenses/LICENSE +0 -0
@@ -256,7 +256,6 @@ class Caption(BaseHTML):
256
256
  Returns:
257
257
  The component.
258
258
  """
259
- ...
260
259
 
261
260
  class Col(BaseHTML):
262
261
  @overload
@@ -504,7 +503,6 @@ class Col(BaseHTML):
504
503
  Returns:
505
504
  The component.
506
505
  """
507
- ...
508
506
 
509
507
  class Colgroup(BaseHTML):
510
508
  @overload
@@ -752,7 +750,6 @@ class Colgroup(BaseHTML):
752
750
  Returns:
753
751
  The component.
754
752
  """
755
- ...
756
753
 
757
754
  class Table(BaseHTML):
758
755
  @overload
@@ -1004,7 +1001,6 @@ class Table(BaseHTML):
1004
1001
  Returns:
1005
1002
  The component.
1006
1003
  """
1007
- ...
1008
1004
 
1009
1005
  class Tbody(BaseHTML):
1010
1006
  @overload
@@ -1250,7 +1246,6 @@ class Tbody(BaseHTML):
1250
1246
  Returns:
1251
1247
  The component.
1252
1248
  """
1253
- ...
1254
1249
 
1255
1250
  class Td(BaseHTML):
1256
1251
  @overload
@@ -1506,7 +1501,6 @@ class Td(BaseHTML):
1506
1501
  Returns:
1507
1502
  The component.
1508
1503
  """
1509
- ...
1510
1504
 
1511
1505
  class Tfoot(BaseHTML):
1512
1506
  @overload
@@ -1752,7 +1746,6 @@ class Tfoot(BaseHTML):
1752
1746
  Returns:
1753
1747
  The component.
1754
1748
  """
1755
- ...
1756
1749
 
1757
1750
  class Th(BaseHTML):
1758
1751
  @overload
@@ -2010,7 +2003,6 @@ class Th(BaseHTML):
2010
2003
  Returns:
2011
2004
  The component.
2012
2005
  """
2013
- ...
2014
2006
 
2015
2007
  class Thead(BaseHTML):
2016
2008
  @overload
@@ -2256,7 +2248,6 @@ class Thead(BaseHTML):
2256
2248
  Returns:
2257
2249
  The component.
2258
2250
  """
2259
- ...
2260
2251
 
2261
2252
  class Tr(BaseHTML):
2262
2253
  @overload
@@ -2502,7 +2493,6 @@ class Tr(BaseHTML):
2502
2493
  Returns:
2503
2494
  The component.
2504
2495
  """
2505
- ...
2506
2496
 
2507
2497
  caption = Caption.create
2508
2498
  col = Col.create
@@ -258,7 +258,6 @@ class Blockquote(BaseHTML):
258
258
  Returns:
259
259
  The component.
260
260
  """
261
- ...
262
261
 
263
262
  class Dd(BaseHTML):
264
263
  @overload
@@ -504,7 +503,6 @@ class Dd(BaseHTML):
504
503
  Returns:
505
504
  The component.
506
505
  """
507
- ...
508
506
 
509
507
  class Div(BaseHTML):
510
508
  @overload
@@ -750,7 +748,6 @@ class Div(BaseHTML):
750
748
  Returns:
751
749
  The component.
752
750
  """
753
- ...
754
751
 
755
752
  class Dl(BaseHTML):
756
753
  @overload
@@ -996,7 +993,6 @@ class Dl(BaseHTML):
996
993
  Returns:
997
994
  The component.
998
995
  """
999
- ...
1000
996
 
1001
997
  class Dt(BaseHTML):
1002
998
  @overload
@@ -1242,7 +1238,6 @@ class Dt(BaseHTML):
1242
1238
  Returns:
1243
1239
  The component.
1244
1240
  """
1245
- ...
1246
1241
 
1247
1242
  class Figcaption(BaseHTML):
1248
1243
  @overload
@@ -1488,7 +1483,6 @@ class Figcaption(BaseHTML):
1488
1483
  Returns:
1489
1484
  The component.
1490
1485
  """
1491
- ...
1492
1486
 
1493
1487
  class Hr(BaseHTML):
1494
1488
  @overload
@@ -1734,7 +1728,6 @@ class Hr(BaseHTML):
1734
1728
  Returns:
1735
1729
  The component.
1736
1730
  """
1737
- ...
1738
1731
 
1739
1732
  class Li(BaseHTML):
1740
1733
  @overload
@@ -1980,7 +1973,6 @@ class Li(BaseHTML):
1980
1973
  Returns:
1981
1974
  The component.
1982
1975
  """
1983
- ...
1984
1976
 
1985
1977
  class Menu(BaseHTML):
1986
1978
  @overload
@@ -2228,7 +2220,6 @@ class Menu(BaseHTML):
2228
2220
  Returns:
2229
2221
  The component.
2230
2222
  """
2231
- ...
2232
2223
 
2233
2224
  class Ol(BaseHTML):
2234
2225
  @overload
@@ -2482,7 +2473,6 @@ class Ol(BaseHTML):
2482
2473
  Returns:
2483
2474
  The component.
2484
2475
  """
2485
- ...
2486
2476
 
2487
2477
  class P(BaseHTML):
2488
2478
  @overload
@@ -2728,7 +2718,6 @@ class P(BaseHTML):
2728
2718
  Returns:
2729
2719
  The component.
2730
2720
  """
2731
- ...
2732
2721
 
2733
2722
  class Pre(BaseHTML):
2734
2723
  @overload
@@ -2974,7 +2963,6 @@ class Pre(BaseHTML):
2974
2963
  Returns:
2975
2964
  The component.
2976
2965
  """
2977
- ...
2978
2966
 
2979
2967
  class Ul(BaseHTML):
2980
2968
  @overload
@@ -3220,7 +3208,6 @@ class Ul(BaseHTML):
3220
3208
  Returns:
3221
3209
  The component.
3222
3210
  """
3223
- ...
3224
3211
 
3225
3212
  class Ins(BaseHTML):
3226
3213
  @overload
@@ -3470,7 +3457,6 @@ class Ins(BaseHTML):
3470
3457
  Returns:
3471
3458
  The component.
3472
3459
  """
3473
- ...
3474
3460
 
3475
3461
  class Del(BaseHTML):
3476
3462
  @overload
@@ -3720,7 +3706,6 @@ class Del(BaseHTML):
3720
3706
  Returns:
3721
3707
  The component.
3722
3708
  """
3723
- ...
3724
3709
 
3725
3710
  blockquote = Blockquote.create
3726
3711
  dd = Dd.create
@@ -67,36 +67,32 @@ class DataTable(Gridjs):
67
67
  # The annotation should be provided if data is a computed var. We need this to know how to
68
68
  # render pandas dataframes.
69
69
  if is_computed_var(data) and data._var_type == Any:
70
- raise ValueError(
71
- "Annotation of the computed var assigned to the data field should be provided."
72
- )
70
+ msg = "Annotation of the computed var assigned to the data field should be provided."
71
+ raise ValueError(msg)
73
72
 
74
73
  if (
75
74
  columns is not None
76
75
  and is_computed_var(columns)
77
76
  and columns._var_type == Any
78
77
  ):
79
- raise ValueError(
80
- "Annotation of the computed var assigned to the column field should be provided."
81
- )
78
+ msg = "Annotation of the computed var assigned to the column field should be provided."
79
+ raise ValueError(msg)
82
80
 
83
81
  # If data is a pandas dataframe and columns are provided throw an error.
84
82
  if (
85
83
  types.is_dataframe(type(data))
86
84
  or (isinstance(data, Var) and types.is_dataframe(data._var_type))
87
85
  ) and columns is not None:
88
- raise ValueError(
89
- "Cannot pass in both a pandas dataframe and columns to the data_table component."
90
- )
86
+ msg = "Cannot pass in both a pandas dataframe and columns to the data_table component."
87
+ raise ValueError(msg)
91
88
 
92
89
  # If data is a list and columns are not provided, throw an error
93
90
  if (
94
91
  (isinstance(data, Var) and types.typehint_issubclass(data._var_type, list))
95
92
  or isinstance(data, list)
96
93
  ) and columns is None:
97
- raise ValueError(
98
- "column field should be specified when the data field is a list type"
99
- )
94
+ msg = "column field should be specified when the data field is a list type"
95
+ raise ValueError(msg)
100
96
 
101
97
  # Create the component.
102
98
  return super().create(
@@ -126,7 +122,8 @@ class DataTable(Gridjs):
126
122
  # If given a pandas df break up the data and columns
127
123
  data = serialize(self.data)
128
124
  if not isinstance(data, dict):
129
- raise ValueError("Serialized dataframe should be a dict.")
125
+ msg = "Serialized dataframe should be a dict."
126
+ raise ValueError(msg)
130
127
  self.columns = LiteralVar.create(data["columns"])
131
128
  self.data = LiteralVar.create(data["data"])
132
129
 
@@ -62,7 +62,6 @@ class Gridjs(Component):
62
62
  Returns:
63
63
  The component.
64
64
  """
65
- ...
66
65
 
67
66
  class DataTable(Gridjs):
68
67
  @overload
@@ -129,6 +128,5 @@ class DataTable(Gridjs):
129
128
  Raises:
130
129
  ValueError: If a pandas dataframe is passed in and columns are also provided.
131
130
  """
132
- ...
133
131
 
134
132
  def add_imports(self) -> ImportDict: ...
@@ -42,27 +42,28 @@ class Icon(LucideIconComponent):
42
42
  if len(children) == 1:
43
43
  child = Var.create(children[0]).guess_type()
44
44
  if not isinstance(child, StringVar):
45
- raise AttributeError(
46
- f"Icon name must be a string, got {children[0]._var_type if isinstance(children[0], Var) else children[0]}"
47
- )
45
+ msg = f"Icon name must be a string, got {children[0]._var_type if isinstance(children[0], Var) else children[0]}"
46
+ raise AttributeError(msg)
48
47
  props["tag"] = children[0]
49
48
  else:
50
- raise AttributeError(
51
- f"Passing multiple children to Icon component is not allowed: remove positional arguments {children[1:]} to fix"
52
- )
49
+ msg = f"Passing multiple children to Icon component is not allowed: remove positional arguments {children[1:]} to fix"
50
+ raise AttributeError(msg)
53
51
  if "tag" not in props:
54
- raise AttributeError("Missing 'tag' keyword-argument for Icon")
52
+ msg = "Missing 'tag' keyword-argument for Icon"
53
+ raise AttributeError(msg)
55
54
 
56
55
  tag_var: Var | LiteralVar = Var.create(props.pop("tag"))
57
56
  if isinstance(tag_var, LiteralVar):
58
57
  if isinstance(tag_var, LiteralStringVar):
59
58
  tag = format.to_snake_case(tag_var._var_value.lower())
60
59
  else:
61
- raise TypeError(f"Icon name must be a string, got {type(tag_var)}")
60
+ msg = f"Icon name must be a string, got {type(tag_var)}"
61
+ raise TypeError(msg)
62
62
  elif isinstance(tag_var, Var):
63
63
  tag_stringified = tag_var.guess_type()
64
64
  if not isinstance(tag_stringified, StringVar):
65
- raise TypeError(f"Icon name must be a string, got {tag_var._var_type}")
65
+ msg = f"Icon name must be a string, got {tag_var._var_type}"
66
+ raise TypeError(msg)
66
67
  return DynamicIcon.create(name=tag_stringified.replace("_", "-"), **props)
67
68
 
68
69
  if tag not in LUCIDE_ICON_LIST:
@@ -61,7 +61,6 @@ class LucideIconComponent(Component):
61
61
  Returns:
62
62
  The component.
63
63
  """
64
- ...
65
64
 
66
65
  class Icon(LucideIconComponent):
67
66
  @overload
@@ -121,7 +120,6 @@ class Icon(LucideIconComponent):
121
120
  Returns:
122
121
  The created component.
123
122
  """
124
- ...
125
123
 
126
124
  class DynamicIcon(LucideIconComponent):
127
125
  @overload
@@ -174,7 +172,6 @@ class DynamicIcon(LucideIconComponent):
174
172
  Returns:
175
173
  The component.
176
174
  """
177
- ...
178
175
 
179
176
  LUCIDE_ICON_LIST = [
180
177
  "a_arrow_down",
@@ -170,9 +170,8 @@ class Markdown(Component):
170
170
  The markdown component.
171
171
  """
172
172
  if len(children) != 1 or not isinstance(children[0], (str, Var)):
173
- raise ValueError(
174
- "Markdown component must have exactly one child containing the markdown source."
175
- )
173
+ msg = "Markdown component must have exactly one child containing the markdown source."
174
+ raise ValueError(msg)
176
175
 
177
176
  # Update the base component map with the custom component map.
178
177
  component_map = {**get_base_component_map(), **props.pop("component_map", {})}
@@ -319,7 +318,8 @@ let {_LANGUAGE!s} = match ? match[1] : '';
319
318
  """
320
319
  # Check the tag is valid.
321
320
  if tag not in self.component_map:
322
- raise ValueError(f"No markdown component found for tag: {tag}.")
321
+ msg = f"No markdown component found for tag: {tag}."
322
+ raise ValueError(msg)
323
323
 
324
324
  special_props = [_PROPS]
325
325
  children = [
@@ -342,10 +342,9 @@ let {_LANGUAGE!s} = match ? match[1] : '';
342
342
  if children_prop is not None:
343
343
  children = []
344
344
  # Get the component.
345
- component = self.component_map[tag](*children, **props).set(
345
+ return self.component_map[tag](*children, **props).set(
346
346
  special_props=special_props
347
347
  )
348
- return component
349
348
 
350
349
  def format_component(self, tag: str, **props) -> str:
351
350
  """Format a component for rendering in the component map.
@@ -437,7 +436,7 @@ let {_LANGUAGE!s} = match ? match[1] : '';
437
436
  """
438
437
 
439
438
  def _render(self) -> Tag:
440
- tag = (
439
+ return (
441
440
  super()
442
441
  ._render()
443
442
  .add_props(
@@ -447,4 +446,3 @@ let {_LANGUAGE!s} = match ? match[1] : '';
447
446
  )
448
447
  .remove_props("componentMap", "componentMapHash")
449
448
  )
450
- return tag
@@ -104,7 +104,6 @@ class Markdown(Component):
104
104
  Returns:
105
105
  The markdown component.
106
106
  """
107
- ...
108
107
 
109
108
  def add_imports(self) -> ImportDict | list[ImportDict]: ...
110
109
  def format_component_map(self) -> dict[str, Var]: ...
@@ -127,4 +127,3 @@ class Moment(NoSSRComponent):
127
127
  Returns:
128
128
  The component.
129
129
  """
130
- ...
@@ -5,5 +5,3 @@ from reflex.components.component import Component
5
5
 
6
6
  class NextComponent(Component):
7
7
  """A Component used as based for any NextJS component."""
8
-
9
- ...
@@ -12,8 +12,6 @@ from reflex.event import EventType
12
12
  from reflex.vars.base import Var
13
13
 
14
14
  class NextComponent(Component):
15
- ...
16
-
17
15
  @overload
18
16
  @classmethod
19
17
  def create( # type: ignore
@@ -63,4 +61,3 @@ class NextComponent(Component):
63
61
  Returns:
64
62
  The component.
65
63
  """
66
- ...
@@ -92,4 +92,3 @@ class Image(NextComponent):
92
92
  Returns:
93
93
  _type_: _description_
94
94
  """
95
- ...
@@ -65,4 +65,3 @@ class NextLink(Component):
65
65
  Returns:
66
66
  The component.
67
67
  """
68
- ...
@@ -66,4 +66,3 @@ class Video(NextComponent):
66
66
  Returns:
67
67
  The Video component.
68
68
  """
69
- ...
@@ -145,7 +145,6 @@ class Plotly(NoSSRComponent):
145
145
  Returns:
146
146
  The Plotly component.
147
147
  """
148
- ...
149
148
 
150
149
  CREATE_PLOTLY_COMPONENT: ImportDict
151
150
 
@@ -250,7 +249,6 @@ class PlotlyBasic(Plotly):
250
249
  Returns:
251
250
  The Plotly component.
252
251
  """
253
- ...
254
252
 
255
253
  class PlotlyCartesian(Plotly):
256
254
  def add_imports(self) -> ImportDict | list[ImportDict]: ...
@@ -351,7 +349,6 @@ class PlotlyCartesian(Plotly):
351
349
  Returns:
352
350
  The Plotly component.
353
351
  """
354
- ...
355
352
 
356
353
  class PlotlyGeo(Plotly):
357
354
  def add_imports(self) -> ImportDict | list[ImportDict]: ...
@@ -452,7 +449,6 @@ class PlotlyGeo(Plotly):
452
449
  Returns:
453
450
  The Plotly component.
454
451
  """
455
- ...
456
452
 
457
453
  class PlotlyGl3d(Plotly):
458
454
  def add_imports(self) -> ImportDict | list[ImportDict]: ...
@@ -553,7 +549,6 @@ class PlotlyGl3d(Plotly):
553
549
  Returns:
554
550
  The Plotly component.
555
551
  """
556
- ...
557
552
 
558
553
  class PlotlyGl2d(Plotly):
559
554
  def add_imports(self) -> ImportDict | list[ImportDict]: ...
@@ -654,7 +649,6 @@ class PlotlyGl2d(Plotly):
654
649
  Returns:
655
650
  The Plotly component.
656
651
  """
657
- ...
658
652
 
659
653
  class PlotlyMapbox(Plotly):
660
654
  def add_imports(self) -> ImportDict | list[ImportDict]: ...
@@ -755,7 +749,6 @@ class PlotlyMapbox(Plotly):
755
749
  Returns:
756
750
  The Plotly component.
757
751
  """
758
- ...
759
752
 
760
753
  class PlotlyFinance(Plotly):
761
754
  def add_imports(self) -> ImportDict | list[ImportDict]: ...
@@ -856,7 +849,6 @@ class PlotlyFinance(Plotly):
856
849
  Returns:
857
850
  The Plotly component.
858
851
  """
859
- ...
860
852
 
861
853
  class PlotlyStrict(Plotly):
862
854
  def add_imports(self) -> ImportDict | list[ImportDict]: ...
@@ -957,4 +949,3 @@ class PlotlyStrict(Plotly):
957
949
  Returns:
958
950
  The Plotly component.
959
951
  """
960
- ...
@@ -31,6 +31,7 @@ class PropsBase(Base):
31
31
  """Convert the object to a dictionary.
32
32
 
33
33
  Keys will be converted to camelCase.
34
+ By default, None values are excluded (exclude_none=True).
34
35
 
35
36
  Args:
36
37
  *args: Arguments to pass to the parent class.
@@ -39,6 +40,7 @@ class PropsBase(Base):
39
40
  Returns:
40
41
  The object as a dictionary.
41
42
  """
43
+ kwargs.setdefault("exclude_none", True)
42
44
  return {
43
45
  format.to_camel_case(key): value
44
46
  for key, value in super().dict(*args, **kwargs).items()
@@ -64,9 +66,8 @@ class NoExtrasAllowedProps(Base):
64
66
  except ValidationError as e:
65
67
  invalid_fields = ", ".join([error["loc"][0] for error in e.errors()]) # pyright: ignore [reportCallIssue, reportArgumentType]
66
68
  supported_props_str = ", ".join(f'"{field}"' for field in self.get_fields())
67
- raise InvalidPropValueError(
68
- f"Invalid prop(s) {invalid_fields} for {component_name!r}. Supported props are {supported_props_str}"
69
- ) from None
69
+ msg = f"Invalid prop(s) {invalid_fields} for {component_name!r}. Supported props are {supported_props_str}"
70
+ raise InvalidPropValueError(msg) from None
70
71
 
71
72
  class Config: # pyright: ignore [reportIncompatibleVariableOverride]
72
73
  """Pydantic config."""
@@ -54,7 +54,7 @@ def _inherited_variant_selector(
54
54
  class AccordionComponent(RadixPrimitiveComponent):
55
55
  """Base class for all @radix-ui/accordion components."""
56
56
 
57
- library = "@radix-ui/react-accordion@1.2.10"
57
+ library = "@radix-ui/react-accordion@1.2.11"
58
58
 
59
59
  # The color scheme of the component.
60
60
  color_scheme: Var[LiteralAccentColor]
@@ -137,7 +137,6 @@ class AccordionComponent(RadixPrimitiveComponent):
137
137
  Returns:
138
138
  The component.
139
139
  """
140
- ...
141
140
 
142
141
  def on_value_change(value: Var[str | list[str]]) -> tuple[Var[str | list[str]]]: ...
143
142
 
@@ -288,7 +287,6 @@ class AccordionRoot(AccordionComponent):
288
287
  Returns:
289
288
  The component.
290
289
  """
291
- ...
292
290
 
293
291
  class AccordionItem(AccordionComponent):
294
292
  @overload
@@ -414,7 +412,6 @@ class AccordionItem(AccordionComponent):
414
412
  Returns:
415
413
  The accordion item.
416
414
  """
417
- ...
418
415
 
419
416
  def add_style(self) -> dict[str, Any] | None: ...
420
417
 
@@ -534,7 +531,6 @@ class AccordionHeader(AccordionComponent):
534
531
  Returns:
535
532
  The Accordion header Component.
536
533
  """
537
- ...
538
534
 
539
535
  def add_style(self) -> dict[str, Any] | None: ...
540
536
 
@@ -654,7 +650,6 @@ class AccordionTrigger(AccordionComponent):
654
650
  Returns:
655
651
  The Accordion trigger Component.
656
652
  """
657
- ...
658
653
 
659
654
  def add_style(self) -> dict[str, Any] | None: ...
660
655
 
@@ -710,7 +705,6 @@ class AccordionIcon(Icon):
710
705
  Returns:
711
706
  The Accordion icon Component.
712
707
  """
713
- ...
714
708
 
715
709
  class AccordionContent(AccordionComponent):
716
710
  def add_imports(self) -> dict: ...
@@ -829,7 +823,6 @@ class AccordionContent(AccordionComponent):
829
823
  Returns:
830
824
  The Accordion content Component.
831
825
  """
832
- ...
833
826
 
834
827
  def add_custom_code(self) -> list[str]: ...
835
828
  def add_style(self) -> dict[str, Any] | None: ...
@@ -21,8 +21,6 @@ class RadixPrimitiveComponentWithClassName(RadixPrimitiveComponent):
21
21
  super()
22
22
  ._render()
23
23
  .add_props(
24
- **{
25
- "class_name": f"{format.to_title_case(self.tag or '')} {self.class_name or ''}",
26
- }
24
+ class_name=f"{format.to_title_case(self.tag or '')} {self.class_name or ''}"
27
25
  )
28
26
  )
@@ -63,7 +63,6 @@ class RadixPrimitiveComponent(Component):
63
63
  Returns:
64
64
  The component.
65
65
  """
66
- ...
67
66
 
68
67
  class RadixPrimitiveComponentWithClassName(RadixPrimitiveComponent):
69
68
  @overload
@@ -117,4 +116,3 @@ class RadixPrimitiveComponentWithClassName(RadixPrimitiveComponent):
117
116
  Returns:
118
117
  The component.
119
118
  """
120
- ...
@@ -21,7 +21,7 @@ class DrawerComponent(RadixPrimitiveComponent):
21
21
 
22
22
  library = "vaul@1.1.2"
23
23
 
24
- lib_dependencies: list[str] = ["@radix-ui/react-dialog@1.1.13"]
24
+ lib_dependencies: list[str] = ["@radix-ui/react-dialog@1.1.14"]
25
25
 
26
26
 
27
27
  LiteralDirectionType = Literal["top", "bottom", "left", "right"]