reflex 0.6.0__py3-none-any.whl → 0.6.0a1__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 (253) hide show
  1. reflex/.templates/jinja/custom_components/pyproject.toml.jinja2 +2 -2
  2. reflex/.templates/jinja/web/pages/_app.js.jinja2 +1 -1
  3. reflex/.templates/jinja/web/pages/utils.js.jinja2 +2 -2
  4. reflex/.templates/web/components/reflex/chakra_color_mode_provider.js +36 -0
  5. reflex/.templates/web/utils/state.js +1 -3
  6. reflex/__init__.py +2 -8
  7. reflex/__init__.pyi +1 -2
  8. reflex/app.py +2 -4
  9. reflex/app_module_for_backend.py +1 -1
  10. reflex/base.py +1 -1
  11. reflex/compiler/compiler.py +2 -2
  12. reflex/compiler/utils.py +3 -3
  13. reflex/components/base/app_wrap.py +2 -2
  14. reflex/components/base/app_wrap.pyi +27 -17
  15. reflex/components/base/bare.py +5 -4
  16. reflex/components/base/body.pyi +27 -17
  17. reflex/components/base/document.pyi +131 -81
  18. reflex/components/base/error_boundary.py +7 -6
  19. reflex/components/base/error_boundary.pyi +33 -20
  20. reflex/components/base/fragment.pyi +27 -17
  21. reflex/components/base/head.pyi +53 -33
  22. reflex/components/base/link.py +1 -1
  23. reflex/components/base/link.pyi +54 -33
  24. reflex/components/base/meta.pyi +105 -65
  25. reflex/components/base/script.py +2 -1
  26. reflex/components/base/script.pyi +38 -21
  27. reflex/components/component.py +47 -53
  28. reflex/components/core/banner.py +27 -23
  29. reflex/components/core/banner.pyi +171 -134
  30. reflex/components/core/client_side_routing.py +3 -2
  31. reflex/components/core/client_side_routing.pyi +54 -33
  32. reflex/components/core/clipboard.py +1 -2
  33. reflex/components/core/clipboard.pyi +33 -20
  34. reflex/components/core/cond.py +5 -5
  35. reflex/components/core/debounce.py +5 -5
  36. reflex/components/core/debounce.pyi +33 -20
  37. reflex/components/core/foreach.py +4 -3
  38. reflex/components/core/html.py +1 -1
  39. reflex/components/core/html.pyi +46 -35
  40. reflex/components/core/match.py +17 -17
  41. reflex/components/core/upload.py +23 -17
  42. reflex/components/core/upload.pyi +124 -78
  43. reflex/components/datadisplay/code.py +10 -9
  44. reflex/components/datadisplay/code.pyi +409 -299
  45. reflex/components/datadisplay/dataeditor.py +10 -8
  46. reflex/components/datadisplay/dataeditor.pyi +53 -40
  47. reflex/components/el/element.pyi +27 -17
  48. reflex/components/el/elements/base.py +1 -1
  49. reflex/components/el/elements/base.pyi +45 -34
  50. reflex/components/el/elements/forms.py +16 -16
  51. reflex/components/el/elements/forms.pyi +707 -554
  52. reflex/components/el/elements/inline.py +1 -1
  53. reflex/components/el/elements/inline.pyi +1218 -937
  54. reflex/components/el/elements/media.py +1 -1
  55. reflex/components/el/elements/media.pyi +997 -786
  56. reflex/components/el/elements/metadata.py +6 -3
  57. reflex/components/el/elements/metadata.pyi +242 -181
  58. reflex/components/el/elements/other.py +1 -1
  59. reflex/components/el/elements/other.pyi +306 -235
  60. reflex/components/el/elements/scripts.py +1 -1
  61. reflex/components/el/elements/scripts.pyi +140 -109
  62. reflex/components/el/elements/sectioning.py +2 -0
  63. reflex/components/el/elements/sectioning.pyi +647 -496
  64. reflex/components/el/elements/tables.py +1 -1
  65. reflex/components/el/elements/tables.pyi +452 -351
  66. reflex/components/el/elements/typography.py +1 -1
  67. reflex/components/el/elements/typography.pyi +657 -506
  68. reflex/components/gridjs/datatable.py +9 -6
  69. reflex/components/gridjs/datatable.pyi +56 -35
  70. reflex/components/lucide/icon.py +1 -1
  71. reflex/components/lucide/icon.pyi +54 -33
  72. reflex/components/markdown/markdown.py +31 -26
  73. reflex/components/markdown/markdown.pyi +37 -27
  74. reflex/components/moment/moment.py +12 -13
  75. reflex/components/moment/moment.pyi +35 -23
  76. reflex/components/next/base.pyi +27 -17
  77. reflex/components/next/image.py +1 -1
  78. reflex/components/next/image.pyi +37 -22
  79. reflex/components/next/link.py +1 -1
  80. reflex/components/next/link.pyi +28 -17
  81. reflex/components/next/video.py +1 -1
  82. reflex/components/next/video.pyi +28 -17
  83. reflex/components/plotly/plotly.py +13 -12
  84. reflex/components/plotly/plotly.pyi +54 -39
  85. reflex/components/props.py +1 -1
  86. reflex/components/radix/__init__.pyi +0 -1
  87. reflex/components/radix/primitives/__init__.pyi +0 -1
  88. reflex/components/radix/primitives/accordion.py +4 -4
  89. reflex/components/radix/primitives/accordion.pyi +495 -424
  90. reflex/components/radix/primitives/base.py +1 -1
  91. reflex/components/radix/primitives/base.pyi +54 -33
  92. reflex/components/radix/primitives/drawer.py +1 -1
  93. reflex/components/radix/primitives/drawer.pyi +273 -172
  94. reflex/components/radix/primitives/form.py +1 -1
  95. reflex/components/radix/primitives/form.pyi +364 -257
  96. reflex/components/radix/primitives/progress.py +1 -1
  97. reflex/components/radix/primitives/progress.pyi +282 -231
  98. reflex/components/radix/primitives/slider.py +1 -1
  99. reflex/components/radix/primitives/slider.pyi +138 -87
  100. reflex/components/radix/themes/base.py +24 -3
  101. reflex/components/radix/themes/base.pyi +250 -178
  102. reflex/components/radix/themes/color_mode.py +5 -5
  103. reflex/components/radix/themes/color_mode.pyi +220 -187
  104. reflex/components/radix/themes/components/alert_dialog.py +1 -1
  105. reflex/components/radix/themes/components/alert_dialog.pyi +207 -136
  106. reflex/components/radix/themes/components/aspect_ratio.py +1 -1
  107. reflex/components/radix/themes/components/aspect_ratio.pyi +28 -17
  108. reflex/components/radix/themes/components/avatar.py +1 -1
  109. reflex/components/radix/themes/components/avatar.pyi +81 -70
  110. reflex/components/radix/themes/components/badge.py +1 -1
  111. reflex/components/radix/themes/components/badge.pyi +99 -88
  112. reflex/components/radix/themes/components/button.py +1 -1
  113. reflex/components/radix/themes/components/button.pyi +109 -98
  114. reflex/components/radix/themes/components/callout.py +1 -1
  115. reflex/components/radix/themes/components/callout.pyi +373 -322
  116. reflex/components/radix/themes/components/card.py +1 -1
  117. reflex/components/radix/themes/components/card.pyi +49 -38
  118. reflex/components/radix/themes/components/checkbox.py +2 -1
  119. reflex/components/radix/themes/components/checkbox.pyi +245 -208
  120. reflex/components/radix/themes/components/checkbox_cards.py +1 -1
  121. reflex/components/radix/themes/components/checkbox_cards.pyi +115 -94
  122. reflex/components/radix/themes/components/checkbox_group.py +1 -1
  123. reflex/components/radix/themes/components/checkbox_group.pyi +107 -86
  124. reflex/components/radix/themes/components/context_menu.py +1 -1
  125. reflex/components/radix/themes/components/context_menu.pyi +319 -238
  126. reflex/components/radix/themes/components/data_list.py +1 -1
  127. reflex/components/radix/themes/components/data_list.pyi +171 -130
  128. reflex/components/radix/themes/components/dialog.py +1 -1
  129. reflex/components/radix/themes/components/dialog.pyi +210 -139
  130. reflex/components/radix/themes/components/dropdown_menu.py +1 -1
  131. reflex/components/radix/themes/components/dropdown_menu.pyi +332 -249
  132. reflex/components/radix/themes/components/hover_card.py +1 -1
  133. reflex/components/radix/themes/components/hover_card.pyi +131 -90
  134. reflex/components/radix/themes/components/icon_button.py +3 -2
  135. reflex/components/radix/themes/components/icon_button.pyi +109 -98
  136. reflex/components/radix/themes/components/inset.py +1 -1
  137. reflex/components/radix/themes/components/inset.pyi +58 -47
  138. reflex/components/radix/themes/components/popover.py +1 -1
  139. reflex/components/radix/themes/components/popover.pyi +136 -95
  140. reflex/components/radix/themes/components/progress.py +1 -1
  141. reflex/components/radix/themes/components/progress.pyi +82 -71
  142. reflex/components/radix/themes/components/radio.py +1 -1
  143. reflex/components/radix/themes/components/radio.pyi +80 -69
  144. reflex/components/radix/themes/components/radio_cards.py +1 -1
  145. reflex/components/radix/themes/components/radio_cards.pyi +119 -98
  146. reflex/components/radix/themes/components/radio_group.py +11 -8
  147. reflex/components/radix/themes/components/radio_group.pyi +271 -228
  148. reflex/components/radix/themes/components/scroll_area.py +1 -1
  149. reflex/components/radix/themes/components/scroll_area.pyi +32 -21
  150. reflex/components/radix/themes/components/segmented_control.py +1 -1
  151. reflex/components/radix/themes/components/segmented_control.pyi +113 -90
  152. reflex/components/radix/themes/components/select.py +3 -2
  153. reflex/components/radix/themes/components/select.pyi +471 -374
  154. reflex/components/radix/themes/components/separator.py +2 -1
  155. reflex/components/radix/themes/components/separator.pyi +80 -69
  156. reflex/components/radix/themes/components/skeleton.py +1 -1
  157. reflex/components/radix/themes/components/skeleton.pyi +34 -23
  158. reflex/components/radix/themes/components/slider.py +3 -2
  159. reflex/components/radix/themes/components/slider.pyi +88 -75
  160. reflex/components/radix/themes/components/spinner.py +1 -1
  161. reflex/components/radix/themes/components/spinner.pyi +30 -19
  162. reflex/components/radix/themes/components/switch.py +1 -1
  163. reflex/components/radix/themes/components/switch.pyi +84 -71
  164. reflex/components/radix/themes/components/table.py +1 -1
  165. reflex/components/radix/themes/components/table.pyi +332 -261
  166. reflex/components/radix/themes/components/tabs.py +1 -1
  167. reflex/components/radix/themes/components/tabs.pyi +194 -139
  168. reflex/components/radix/themes/components/text_area.py +1 -1
  169. reflex/components/radix/themes/components/text_area.pyi +111 -96
  170. reflex/components/radix/themes/components/text_field.py +1 -1
  171. reflex/components/radix/themes/components/text_field.pyi +286 -247
  172. reflex/components/radix/themes/components/tooltip.py +1 -1
  173. reflex/components/radix/themes/components/tooltip.pyi +37 -26
  174. reflex/components/radix/themes/layout/__init__.pyi +0 -1
  175. reflex/components/radix/themes/layout/base.py +1 -1
  176. reflex/components/radix/themes/layout/base.pyi +67 -56
  177. reflex/components/radix/themes/layout/box.pyi +45 -34
  178. reflex/components/radix/themes/layout/center.pyi +67 -56
  179. reflex/components/radix/themes/layout/container.py +2 -1
  180. reflex/components/radix/themes/layout/container.pyi +47 -36
  181. reflex/components/radix/themes/layout/flex.py +1 -1
  182. reflex/components/radix/themes/layout/flex.pyi +67 -56
  183. reflex/components/radix/themes/layout/grid.py +1 -1
  184. reflex/components/radix/themes/layout/grid.pyi +75 -64
  185. reflex/components/radix/themes/layout/list.py +6 -5
  186. reflex/components/radix/themes/layout/list.pyi +244 -193
  187. reflex/components/radix/themes/layout/section.py +2 -1
  188. reflex/components/radix/themes/layout/section.pyi +47 -36
  189. reflex/components/radix/themes/layout/spacer.pyi +67 -56
  190. reflex/components/radix/themes/layout/stack.py +1 -1
  191. reflex/components/radix/themes/layout/stack.pyi +159 -128
  192. reflex/components/radix/themes/typography/blockquote.py +1 -1
  193. reflex/components/radix/themes/typography/blockquote.pyi +100 -89
  194. reflex/components/radix/themes/typography/code.py +1 -1
  195. reflex/components/radix/themes/typography/code.pyi +101 -90
  196. reflex/components/radix/themes/typography/heading.py +1 -1
  197. reflex/components/radix/themes/typography/heading.pyi +107 -96
  198. reflex/components/radix/themes/typography/link.py +1 -1
  199. reflex/components/radix/themes/typography/link.pyi +113 -102
  200. reflex/components/radix/themes/typography/text.py +1 -1
  201. reflex/components/radix/themes/typography/text.pyi +572 -501
  202. reflex/components/react_player/audio.pyi +60 -33
  203. reflex/components/react_player/react_player.py +1 -1
  204. reflex/components/react_player/react_player.pyi +60 -33
  205. reflex/components/react_player/video.pyi +60 -33
  206. reflex/components/recharts/cartesian.py +3 -2
  207. reflex/components/recharts/cartesian.pyi +861 -678
  208. reflex/components/recharts/charts.py +5 -4
  209. reflex/components/recharts/charts.pyi +357 -252
  210. reflex/components/recharts/general.py +2 -1
  211. reflex/components/recharts/general.pyi +231 -180
  212. reflex/components/recharts/polar.py +5 -4
  213. reflex/components/recharts/polar.pyi +181 -144
  214. reflex/components/recharts/recharts.pyi +53 -33
  215. reflex/components/sonner/toast.py +17 -16
  216. reflex/components/sonner/toast.pyi +47 -36
  217. reflex/components/suneditor/editor.py +3 -2
  218. reflex/components/suneditor/editor.pyi +78 -55
  219. reflex/components/tags/cond_tag.py +4 -6
  220. reflex/components/tags/iter_tag.py +16 -28
  221. reflex/components/tags/match_tag.py +4 -6
  222. reflex/components/tags/tag.py +23 -40
  223. reflex/custom_components/custom_components.py +1 -3
  224. reflex/event.py +65 -113
  225. reflex/experimental/client_state.py +24 -25
  226. reflex/experimental/hooks.py +16 -16
  227. reflex/experimental/layout.py +5 -5
  228. reflex/experimental/layout.pyi +187 -136
  229. reflex/{vars → ivars}/__init__.py +2 -6
  230. reflex/{vars → ivars}/base.py +216 -599
  231. reflex/{vars → ivars}/function.py +19 -15
  232. reflex/{vars → ivars}/number.py +20 -41
  233. reflex/{vars → ivars}/object.py +30 -28
  234. reflex/{vars → ivars}/sequence.py +50 -53
  235. reflex/middleware/hydrate_middleware.py +0 -2
  236. reflex/middleware/middleware.py +3 -3
  237. reflex/state.py +82 -148
  238. reflex/style.py +22 -21
  239. reflex/utils/exceptions.py +0 -20
  240. reflex/utils/format.py +34 -54
  241. reflex/utils/imports.py +73 -16
  242. reflex/utils/prerequisites.py +15 -35
  243. reflex/utils/pyi_generator.py +8 -13
  244. reflex/utils/serializers.py +22 -12
  245. reflex/utils/telemetry.py +2 -3
  246. reflex/utils/types.py +5 -10
  247. reflex/vars.py +501 -0
  248. {reflex-0.6.0.dist-info → reflex-0.6.0a1.dist-info}/METADATA +5 -4
  249. reflex-0.6.0a1.dist-info/RECORD +384 -0
  250. reflex-0.6.0.dist-info/RECORD +0 -382
  251. {reflex-0.6.0.dist-info → reflex-0.6.0a1.dist-info}/LICENSE +0 -0
  252. {reflex-0.6.0.dist-info → reflex-0.6.0a1.dist-info}/WHEEL +0 -0
  253. {reflex-0.6.0.dist-info → reflex-0.6.0a1.dist-info}/entry_points.txt +0 -0
@@ -5,7 +5,7 @@ from typing import Dict, Literal, Union
5
5
  from reflex.components.component import Component
6
6
  from reflex.event import EventHandler
7
7
  from reflex.utils import format
8
- from reflex.vars.base import Var
8
+ from reflex.vars import Var
9
9
 
10
10
  from ..base import (
11
11
  RadixThemesComponent,
@@ -6,8 +6,9 @@
6
6
  from typing import Any, Callable, Dict, Literal, Optional, Union, overload
7
7
 
8
8
  from reflex.event import EventHandler, EventSpec
9
+ from reflex.ivars.base import ImmutableVar
9
10
  from reflex.style import Style
10
- from reflex.vars.base import Var
11
+ from reflex.vars import Var
11
12
 
12
13
  from ..base import RadixThemesComponent
13
14
 
@@ -26,30 +27,30 @@ class Tooltip(RadixThemesComponent):
26
27
  open: Optional[Union[Var[bool], bool]] = None,
27
28
  side: Optional[
28
29
  Union[
29
- Literal["bottom", "left", "right", "top"],
30
- Var[Literal["bottom", "left", "right", "top"]],
30
+ Var[Literal["top", "right", "bottom", "left"]],
31
+ Literal["top", "right", "bottom", "left"],
31
32
  ]
32
33
  ] = None,
33
34
  side_offset: Optional[Union[Var[Union[float, int]], float, int]] = None,
34
35
  align: Optional[
35
36
  Union[
36
- Literal["center", "end", "start"],
37
- Var[Literal["center", "end", "start"]],
37
+ Var[Literal["start", "center", "end"]],
38
+ Literal["start", "center", "end"],
38
39
  ]
39
40
  ] = None,
40
41
  align_offset: Optional[Union[Var[Union[float, int]], float, int]] = None,
41
42
  avoid_collisions: Optional[Union[Var[bool], bool]] = None,
42
43
  collision_padding: Optional[
43
44
  Union[
44
- Dict[str, Union[float, int]],
45
45
  Var[Union[Dict[str, Union[float, int]], float, int]],
46
46
  float,
47
47
  int,
48
+ Dict[str, Union[float, int]],
48
49
  ]
49
50
  ] = None,
50
51
  arrow_padding: Optional[Union[Var[Union[float, int]], float, int]] = None,
51
52
  sticky: Optional[
52
- Union[Literal["always", "partial"], Var[Literal["always", "partial"]]]
53
+ Union[Var[Literal["partial", "always"]], Literal["partial", "always"]]
53
54
  ] = None,
54
55
  hide_when_detached: Optional[Union[Var[bool], bool]] = None,
55
56
  delay_duration: Optional[Union[Var[Union[float, int]], float, int]] = None,
@@ -61,50 +62,60 @@ class Tooltip(RadixThemesComponent):
61
62
  id: Optional[Any] = None,
62
63
  class_name: Optional[Any] = None,
63
64
  autofocus: Optional[bool] = None,
64
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
65
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
66
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
65
+ custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
66
+ on_blur: Optional[
67
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
68
+ ] = None,
69
+ on_click: Optional[
70
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
71
+ ] = None,
67
72
  on_context_menu: Optional[
68
- Union[EventHandler, EventSpec, list, Callable, Var]
73
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
69
74
  ] = None,
70
75
  on_double_click: Optional[
71
- Union[EventHandler, EventSpec, list, Callable, Var]
76
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
72
77
  ] = None,
73
78
  on_escape_key_down: Optional[
74
- Union[EventHandler, EventSpec, list, Callable, Var]
79
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
80
+ ] = None,
81
+ on_focus: Optional[
82
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
83
+ ] = None,
84
+ on_mount: Optional[
85
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
75
86
  ] = None,
76
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
77
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
78
87
  on_mouse_down: Optional[
79
- Union[EventHandler, EventSpec, list, Callable, Var]
88
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
80
89
  ] = None,
81
90
  on_mouse_enter: Optional[
82
- Union[EventHandler, EventSpec, list, Callable, Var]
91
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
83
92
  ] = None,
84
93
  on_mouse_leave: Optional[
85
- Union[EventHandler, EventSpec, list, Callable, Var]
94
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
86
95
  ] = None,
87
96
  on_mouse_move: Optional[
88
- Union[EventHandler, EventSpec, list, Callable, Var]
97
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
89
98
  ] = None,
90
99
  on_mouse_out: Optional[
91
- Union[EventHandler, EventSpec, list, Callable, Var]
100
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
92
101
  ] = None,
93
102
  on_mouse_over: Optional[
94
- Union[EventHandler, EventSpec, list, Callable, Var]
103
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
95
104
  ] = None,
96
105
  on_mouse_up: Optional[
97
- Union[EventHandler, EventSpec, list, Callable, Var]
106
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
98
107
  ] = None,
99
108
  on_open_change: Optional[
100
- Union[EventHandler, EventSpec, list, Callable, Var]
109
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
101
110
  ] = None,
102
111
  on_pointer_down_outside: Optional[
103
- Union[EventHandler, EventSpec, list, Callable, Var]
112
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
113
+ ] = None,
114
+ on_scroll: Optional[
115
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
104
116
  ] = None,
105
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
106
117
  on_unmount: Optional[
107
- Union[EventHandler, EventSpec, list, Callable, Var]
118
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
108
119
  ] = None,
109
120
  **props,
110
121
  ) -> "Tooltip":
@@ -9,7 +9,6 @@ from .container import container as container
9
9
  from .flex import flex as flex
10
10
  from .grid import grid as grid
11
11
  from .list import list_item as list_item
12
- from .list import list_ns as list # noqa
13
12
  from .list import ordered_list as ordered_list
14
13
  from .list import unordered_list as unordered_list
15
14
  from .section import section as section
@@ -5,7 +5,7 @@ from __future__ import annotations
5
5
  from typing import Literal
6
6
 
7
7
  from reflex.components.core.breakpoints import Responsive
8
- from reflex.vars.base import Var
8
+ from reflex.vars import Var
9
9
 
10
10
  from ..base import (
11
11
  CommonMarginProps,
@@ -7,8 +7,9 @@ from typing import Any, Callable, Dict, Literal, Optional, Union, overload
7
7
 
8
8
  from reflex.components.core.breakpoints import Breakpoints
9
9
  from reflex.event import EventHandler, EventSpec
10
+ from reflex.ivars.base import ImmutableVar
10
11
  from reflex.style import Style
11
- from reflex.vars.base import Var
12
+ from reflex.vars import Var
12
13
 
13
14
  from ..base import CommonMarginProps, RadixThemesComponent
14
15
 
@@ -22,10 +23,6 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent):
22
23
  *children,
23
24
  p: Optional[
24
25
  Union[
25
- Breakpoints[
26
- str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
27
- ],
28
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
29
26
  Var[
30
27
  Union[
31
28
  Breakpoints[
@@ -35,14 +32,14 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent):
35
32
  Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
36
33
  ]
37
34
  ],
35
+ Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
36
+ Breakpoints[
37
+ str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
38
+ ],
38
39
  ]
39
40
  ] = None,
40
41
  px: Optional[
41
42
  Union[
42
- Breakpoints[
43
- str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
44
- ],
45
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
46
43
  Var[
47
44
  Union[
48
45
  Breakpoints[
@@ -52,14 +49,14 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent):
52
49
  Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
53
50
  ]
54
51
  ],
52
+ Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
53
+ Breakpoints[
54
+ str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
55
+ ],
55
56
  ]
56
57
  ] = None,
57
58
  py: Optional[
58
59
  Union[
59
- Breakpoints[
60
- str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
61
- ],
62
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
63
60
  Var[
64
61
  Union[
65
62
  Breakpoints[
@@ -69,14 +66,14 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent):
69
66
  Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
70
67
  ]
71
68
  ],
69
+ Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
70
+ Breakpoints[
71
+ str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
72
+ ],
72
73
  ]
73
74
  ] = None,
74
75
  pt: Optional[
75
76
  Union[
76
- Breakpoints[
77
- str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
78
- ],
79
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
80
77
  Var[
81
78
  Union[
82
79
  Breakpoints[
@@ -86,14 +83,14 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent):
86
83
  Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
87
84
  ]
88
85
  ],
86
+ Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
87
+ Breakpoints[
88
+ str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
89
+ ],
89
90
  ]
90
91
  ] = None,
91
92
  pr: Optional[
92
93
  Union[
93
- Breakpoints[
94
- str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
95
- ],
96
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
97
94
  Var[
98
95
  Union[
99
96
  Breakpoints[
@@ -103,14 +100,14 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent):
103
100
  Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
104
101
  ]
105
102
  ],
103
+ Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
104
+ Breakpoints[
105
+ str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
106
+ ],
106
107
  ]
107
108
  ] = None,
108
109
  pb: Optional[
109
110
  Union[
110
- Breakpoints[
111
- str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
112
- ],
113
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
114
111
  Var[
115
112
  Union[
116
113
  Breakpoints[
@@ -120,14 +117,14 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent):
120
117
  Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
121
118
  ]
122
119
  ],
120
+ Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
121
+ Breakpoints[
122
+ str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
123
+ ],
123
124
  ]
124
125
  ] = None,
125
126
  pl: Optional[
126
127
  Union[
127
- Breakpoints[
128
- str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
129
- ],
130
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
131
128
  Var[
132
129
  Union[
133
130
  Breakpoints[
@@ -137,62 +134,66 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent):
137
134
  Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
138
135
  ]
139
136
  ],
137
+ Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
138
+ Breakpoints[
139
+ str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
140
+ ],
140
141
  ]
141
142
  ] = None,
142
143
  flex_shrink: Optional[
143
144
  Union[
144
- Breakpoints[str, Literal["0", "1"]],
145
- Literal["0", "1"],
146
145
  Var[Union[Breakpoints[str, Literal["0", "1"]], Literal["0", "1"]]],
146
+ Literal["0", "1"],
147
+ Breakpoints[str, Literal["0", "1"]],
147
148
  ]
148
149
  ] = None,
149
150
  flex_grow: Optional[
150
151
  Union[
151
- Breakpoints[str, Literal["0", "1"]],
152
- Literal["0", "1"],
153
152
  Var[Union[Breakpoints[str, Literal["0", "1"]], Literal["0", "1"]]],
153
+ Literal["0", "1"],
154
+ Breakpoints[str, Literal["0", "1"]],
154
155
  ]
155
156
  ] = None,
156
157
  m: Optional[
157
158
  Union[
158
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
159
159
  Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
160
+ Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
160
161
  ]
161
162
  ] = None,
162
163
  mx: Optional[
163
164
  Union[
164
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
165
165
  Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
166
+ Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
166
167
  ]
167
168
  ] = None,
168
169
  my: Optional[
169
170
  Union[
170
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
171
171
  Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
172
+ Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
172
173
  ]
173
174
  ] = None,
174
175
  mt: Optional[
175
176
  Union[
176
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
177
177
  Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
178
+ Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
178
179
  ]
179
180
  ] = None,
180
181
  mr: Optional[
181
182
  Union[
182
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
183
183
  Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
184
+ Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
184
185
  ]
185
186
  ] = None,
186
187
  mb: Optional[
187
188
  Union[
188
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
189
189
  Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
190
+ Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
190
191
  ]
191
192
  ] = None,
192
193
  ml: Optional[
193
194
  Union[
194
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
195
195
  Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
196
+ Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
196
197
  ]
197
198
  ] = None,
198
199
  style: Optional[Style] = None,
@@ -200,41 +201,51 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent):
200
201
  id: Optional[Any] = None,
201
202
  class_name: Optional[Any] = None,
202
203
  autofocus: Optional[bool] = None,
203
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
204
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
205
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
204
+ custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
205
+ on_blur: Optional[
206
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
207
+ ] = None,
208
+ on_click: Optional[
209
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
210
+ ] = None,
206
211
  on_context_menu: Optional[
207
- Union[EventHandler, EventSpec, list, Callable, Var]
212
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
208
213
  ] = None,
209
214
  on_double_click: Optional[
210
- Union[EventHandler, EventSpec, list, Callable, Var]
215
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
216
+ ] = None,
217
+ on_focus: Optional[
218
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
219
+ ] = None,
220
+ on_mount: Optional[
221
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
211
222
  ] = None,
212
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
213
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
214
223
  on_mouse_down: Optional[
215
- Union[EventHandler, EventSpec, list, Callable, Var]
224
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
216
225
  ] = None,
217
226
  on_mouse_enter: Optional[
218
- Union[EventHandler, EventSpec, list, Callable, Var]
227
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
219
228
  ] = None,
220
229
  on_mouse_leave: Optional[
221
- Union[EventHandler, EventSpec, list, Callable, Var]
230
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
222
231
  ] = None,
223
232
  on_mouse_move: Optional[
224
- Union[EventHandler, EventSpec, list, Callable, Var]
233
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
225
234
  ] = None,
226
235
  on_mouse_out: Optional[
227
- Union[EventHandler, EventSpec, list, Callable, Var]
236
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
228
237
  ] = None,
229
238
  on_mouse_over: Optional[
230
- Union[EventHandler, EventSpec, list, Callable, Var]
239
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
231
240
  ] = None,
232
241
  on_mouse_up: Optional[
233
- Union[EventHandler, EventSpec, list, Callable, Var]
242
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
243
+ ] = None,
244
+ on_scroll: Optional[
245
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
234
246
  ] = None,
235
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
236
247
  on_unmount: Optional[
237
- Union[EventHandler, EventSpec, list, Callable, Var]
248
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
238
249
  ] = None,
239
250
  **props,
240
251
  ) -> "LayoutComponent":
@@ -7,8 +7,9 @@ from typing import Any, Callable, Dict, Optional, Union, overload
7
7
 
8
8
  from reflex.components.el import elements
9
9
  from reflex.event import EventHandler, EventSpec
10
+ from reflex.ivars.base import ImmutableVar
10
11
  from reflex.style import Style
11
- from reflex.vars.base import Var
12
+ from reflex.vars import Var
12
13
 
13
14
  from ..base import RadixThemesComponent
14
15
 
@@ -18,70 +19,80 @@ class Box(elements.Div, RadixThemesComponent):
18
19
  def create( # type: ignore
19
20
  cls,
20
21
  *children,
21
- access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
22
+ access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
22
23
  auto_capitalize: Optional[
23
- Union[Var[Union[bool, int, str]], bool, int, str]
24
+ Union[Var[Union[bool, int, str]], str, int, bool]
24
25
  ] = None,
25
26
  content_editable: Optional[
26
- Union[Var[Union[bool, int, str]], bool, int, str]
27
+ Union[Var[Union[bool, int, str]], str, int, bool]
27
28
  ] = None,
28
29
  context_menu: Optional[
29
- Union[Var[Union[bool, int, str]], bool, int, str]
30
+ Union[Var[Union[bool, int, str]], str, int, bool]
30
31
  ] = None,
31
- dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
32
- draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
32
+ dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
33
+ draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
33
34
  enter_key_hint: Optional[
34
- Union[Var[Union[bool, int, str]], bool, int, str]
35
- ] = None,
36
- hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
37
- input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
38
- item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
39
- lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
40
- role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
41
- slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
42
- spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
43
- tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
44
- title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
35
+ Union[Var[Union[bool, int, str]], str, int, bool]
36
+ ] = None,
37
+ hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
38
+ input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
39
+ item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
40
+ lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
41
+ role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
42
+ slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
43
+ spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
44
+ tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
45
+ title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
45
46
  style: Optional[Style] = None,
46
47
  key: Optional[Any] = None,
47
48
  id: Optional[Any] = None,
48
49
  class_name: Optional[Any] = None,
49
50
  autofocus: Optional[bool] = None,
50
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
51
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
52
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
51
+ custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
52
+ on_blur: Optional[
53
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
54
+ ] = None,
55
+ on_click: Optional[
56
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
57
+ ] = None,
53
58
  on_context_menu: Optional[
54
- Union[EventHandler, EventSpec, list, Callable, Var]
59
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
55
60
  ] = None,
56
61
  on_double_click: Optional[
57
- Union[EventHandler, EventSpec, list, Callable, Var]
62
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
63
+ ] = None,
64
+ on_focus: Optional[
65
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
66
+ ] = None,
67
+ on_mount: Optional[
68
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
58
69
  ] = None,
59
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
60
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
61
70
  on_mouse_down: Optional[
62
- Union[EventHandler, EventSpec, list, Callable, Var]
71
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
63
72
  ] = None,
64
73
  on_mouse_enter: Optional[
65
- Union[EventHandler, EventSpec, list, Callable, Var]
74
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
66
75
  ] = None,
67
76
  on_mouse_leave: Optional[
68
- Union[EventHandler, EventSpec, list, Callable, Var]
77
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
69
78
  ] = None,
70
79
  on_mouse_move: Optional[
71
- Union[EventHandler, EventSpec, list, Callable, Var]
80
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
72
81
  ] = None,
73
82
  on_mouse_out: Optional[
74
- Union[EventHandler, EventSpec, list, Callable, Var]
83
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
75
84
  ] = None,
76
85
  on_mouse_over: Optional[
77
- Union[EventHandler, EventSpec, list, Callable, Var]
86
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
78
87
  ] = None,
79
88
  on_mouse_up: Optional[
80
- Union[EventHandler, EventSpec, list, Callable, Var]
89
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
90
+ ] = None,
91
+ on_scroll: Optional[
92
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
81
93
  ] = None,
82
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
83
94
  on_unmount: Optional[
84
- Union[EventHandler, EventSpec, list, Callable, Var]
95
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
85
96
  ] = None,
86
97
  **props,
87
98
  ) -> "Box":