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