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
@@ -3,8 +3,7 @@
3
3
  from typing import Literal
4
4
 
5
5
  from reflex.components.core.breakpoints import Responsive
6
- from reflex.ivars.base import LiteralVar
7
- from reflex.vars import Var
6
+ from reflex.vars.base import LiteralVar, Var
8
7
 
9
8
  from ..base import (
10
9
  LiteralAccentColor,
@@ -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 RadixThemesComponent
15
14
 
@@ -23,88 +22,88 @@ class Separator(RadixThemesComponent):
23
22
  *children,
24
23
  size: Optional[
25
24
  Union[
25
+ Breakpoints[str, Literal["1", "2", "3", "4"]],
26
+ Literal["1", "2", "3", "4"],
26
27
  Var[
27
28
  Union[
28
29
  Breakpoints[str, Literal["1", "2", "3", "4"]],
29
30
  Literal["1", "2", "3", "4"],
30
31
  ]
31
32
  ],
32
- Literal["1", "2", "3", "4"],
33
- Breakpoints[str, Literal["1", "2", "3", "4"]],
34
33
  ]
35
34
  ] = None,
36
35
  color_scheme: Optional[
37
36
  Union[
37
+ Literal[
38
+ "amber",
39
+ "blue",
40
+ "bronze",
41
+ "brown",
42
+ "crimson",
43
+ "cyan",
44
+ "gold",
45
+ "grass",
46
+ "gray",
47
+ "green",
48
+ "indigo",
49
+ "iris",
50
+ "jade",
51
+ "lime",
52
+ "mint",
53
+ "orange",
54
+ "pink",
55
+ "plum",
56
+ "purple",
57
+ "red",
58
+ "ruby",
59
+ "sky",
60
+ "teal",
61
+ "tomato",
62
+ "violet",
63
+ "yellow",
64
+ ],
38
65
  Var[
39
66
  Literal[
40
- "tomato",
41
- "red",
42
- "ruby",
43
- "crimson",
44
- "pink",
45
- "plum",
46
- "purple",
47
- "violet",
48
- "iris",
49
- "indigo",
67
+ "amber",
50
68
  "blue",
69
+ "bronze",
70
+ "brown",
71
+ "crimson",
51
72
  "cyan",
52
- "teal",
53
- "jade",
54
- "green",
73
+ "gold",
55
74
  "grass",
56
- "brown",
75
+ "gray",
76
+ "green",
77
+ "indigo",
78
+ "iris",
79
+ "jade",
80
+ "lime",
81
+ "mint",
57
82
  "orange",
83
+ "pink",
84
+ "plum",
85
+ "purple",
86
+ "red",
87
+ "ruby",
58
88
  "sky",
59
- "mint",
60
- "lime",
89
+ "teal",
90
+ "tomato",
91
+ "violet",
61
92
  "yellow",
62
- "amber",
63
- "gold",
64
- "bronze",
65
- "gray",
66
93
  ]
67
94
  ],
68
- Literal[
69
- "tomato",
70
- "red",
71
- "ruby",
72
- "crimson",
73
- "pink",
74
- "plum",
75
- "purple",
76
- "violet",
77
- "iris",
78
- "indigo",
79
- "blue",
80
- "cyan",
81
- "teal",
82
- "jade",
83
- "green",
84
- "grass",
85
- "brown",
86
- "orange",
87
- "sky",
88
- "mint",
89
- "lime",
90
- "yellow",
91
- "amber",
92
- "gold",
93
- "bronze",
94
- "gray",
95
- ],
96
95
  ]
97
96
  ] = None,
98
97
  orientation: Optional[
99
98
  Union[
99
+ Breakpoints[str, Literal["horizontal", "vertical"]],
100
+ Literal["horizontal", "vertical"],
100
101
  Var[
101
102
  Union[
102
103
  Breakpoints[str, Literal["horizontal", "vertical"]],
103
104
  Literal["horizontal", "vertical"],
104
105
  ]
105
106
  ],
106
- Literal["horizontal", "vertical"],
107
- Breakpoints[str, Literal["horizontal", "vertical"]],
108
107
  ]
109
108
  ] = None,
110
109
  decorative: Optional[Union[Var[bool], bool]] = None,
@@ -113,51 +112,41 @@ class Separator(RadixThemesComponent):
113
112
  id: Optional[Any] = None,
114
113
  class_name: Optional[Any] = None,
115
114
  autofocus: Optional[bool] = None,
116
- custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
117
- on_blur: Optional[
118
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
119
- ] = None,
120
- on_click: Optional[
121
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
122
- ] = None,
115
+ custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
116
+ on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
117
+ on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
123
118
  on_context_menu: Optional[
124
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
119
+ Union[EventHandler, EventSpec, list, Callable, Var]
125
120
  ] = None,
126
121
  on_double_click: Optional[
127
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
128
- ] = None,
129
- on_focus: Optional[
130
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
131
- ] = None,
132
- on_mount: Optional[
133
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
122
+ Union[EventHandler, EventSpec, list, Callable, Var]
134
123
  ] = None,
124
+ on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
125
+ on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
135
126
  on_mouse_down: Optional[
136
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
127
+ Union[EventHandler, EventSpec, list, Callable, Var]
137
128
  ] = None,
138
129
  on_mouse_enter: Optional[
139
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
130
+ Union[EventHandler, EventSpec, list, Callable, Var]
140
131
  ] = None,
141
132
  on_mouse_leave: Optional[
142
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
133
+ Union[EventHandler, EventSpec, list, Callable, Var]
143
134
  ] = None,
144
135
  on_mouse_move: Optional[
145
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
136
+ Union[EventHandler, EventSpec, list, Callable, Var]
146
137
  ] = None,
147
138
  on_mouse_out: Optional[
148
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
139
+ Union[EventHandler, EventSpec, list, Callable, Var]
149
140
  ] = None,
150
141
  on_mouse_over: Optional[
151
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
142
+ Union[EventHandler, EventSpec, list, Callable, Var]
152
143
  ] = None,
153
144
  on_mouse_up: Optional[
154
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
155
- ] = None,
156
- on_scroll: Optional[
157
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
145
+ Union[EventHandler, EventSpec, list, Callable, Var]
158
146
  ] = None,
147
+ on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
159
148
  on_unmount: Optional[
160
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
149
+ Union[EventHandler, EventSpec, list, Callable, Var]
161
150
  ] = None,
162
151
  **props,
163
152
  ) -> "Separator":
@@ -1,7 +1,7 @@
1
1
  """Skeleton theme from Radix components."""
2
2
 
3
3
  from reflex.components.core.breakpoints import Responsive
4
- from reflex.vars import Var
4
+ from reflex.vars.base import Var
5
5
 
6
6
  from ..base import RadixLoadingProp, RadixThemesComponent
7
7
 
@@ -7,9 +7,8 @@ from typing import Any, Callable, Dict, 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 RadixLoadingProp, RadixThemesComponent
15
14
 
@@ -20,22 +19,22 @@ class Skeleton(RadixLoadingProp, RadixThemesComponent):
20
19
  cls,
21
20
  *children,
22
21
  width: Optional[
23
- Union[Var[Union[Breakpoints[str, str], str]], str, Breakpoints[str, str]]
22
+ Union[Breakpoints[str, str], Var[Union[Breakpoints[str, str], str]], str]
24
23
  ] = None,
25
24
  min_width: Optional[
26
- Union[Var[Union[Breakpoints[str, str], str]], str, Breakpoints[str, str]]
25
+ Union[Breakpoints[str, str], Var[Union[Breakpoints[str, str], str]], str]
27
26
  ] = None,
28
27
  max_width: Optional[
29
- Union[Var[Union[Breakpoints[str, str], str]], str, Breakpoints[str, str]]
28
+ Union[Breakpoints[str, str], Var[Union[Breakpoints[str, str], str]], str]
30
29
  ] = None,
31
30
  height: Optional[
32
- Union[Var[Union[Breakpoints[str, str], str]], str, Breakpoints[str, str]]
31
+ Union[Breakpoints[str, str], Var[Union[Breakpoints[str, str], str]], str]
33
32
  ] = None,
34
33
  min_height: Optional[
35
- Union[Var[Union[Breakpoints[str, str], str]], str, Breakpoints[str, str]]
34
+ Union[Breakpoints[str, str], Var[Union[Breakpoints[str, str], str]], str]
36
35
  ] = None,
37
36
  max_height: Optional[
38
- Union[Var[Union[Breakpoints[str, str], str]], str, Breakpoints[str, str]]
37
+ Union[Breakpoints[str, str], Var[Union[Breakpoints[str, str], str]], str]
39
38
  ] = None,
40
39
  loading: Optional[Union[Var[bool], bool]] = None,
41
40
  style: Optional[Style] = None,
@@ -43,51 +42,41 @@ class Skeleton(RadixLoadingProp, RadixThemesComponent):
43
42
  id: Optional[Any] = None,
44
43
  class_name: Optional[Any] = None,
45
44
  autofocus: Optional[bool] = None,
46
- custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
47
- on_blur: Optional[
48
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
49
- ] = None,
50
- on_click: Optional[
51
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
52
- ] = None,
45
+ custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
46
+ on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
47
+ on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
53
48
  on_context_menu: Optional[
54
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
49
+ Union[EventHandler, EventSpec, list, Callable, Var]
55
50
  ] = None,
56
51
  on_double_click: Optional[
57
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
58
- ] = None,
59
- on_focus: Optional[
60
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
61
- ] = None,
62
- on_mount: Optional[
63
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
52
+ Union[EventHandler, EventSpec, list, Callable, Var]
64
53
  ] = None,
54
+ on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
55
+ on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
65
56
  on_mouse_down: Optional[
66
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
57
+ Union[EventHandler, EventSpec, list, Callable, Var]
67
58
  ] = None,
68
59
  on_mouse_enter: Optional[
69
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
60
+ Union[EventHandler, EventSpec, list, Callable, Var]
70
61
  ] = None,
71
62
  on_mouse_leave: Optional[
72
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
63
+ Union[EventHandler, EventSpec, list, Callable, Var]
73
64
  ] = None,
74
65
  on_mouse_move: Optional[
75
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
66
+ Union[EventHandler, EventSpec, list, Callable, Var]
76
67
  ] = None,
77
68
  on_mouse_out: Optional[
78
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
69
+ Union[EventHandler, EventSpec, list, Callable, Var]
79
70
  ] = None,
80
71
  on_mouse_over: Optional[
81
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
72
+ Union[EventHandler, EventSpec, list, Callable, Var]
82
73
  ] = None,
83
74
  on_mouse_up: Optional[
84
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
85
- ] = None,
86
- on_scroll: Optional[
87
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
75
+ Union[EventHandler, EventSpec, list, Callable, Var]
88
76
  ] = None,
77
+ on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
89
78
  on_unmount: Optional[
90
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
79
+ Union[EventHandler, EventSpec, list, Callable, Var]
91
80
  ] = None,
92
81
  **props,
93
82
  ) -> "Skeleton":
@@ -5,8 +5,7 @@ from typing import List, Literal, Optional, Union
5
5
  from reflex.components.component import Component
6
6
  from reflex.components.core.breakpoints import Responsive
7
7
  from reflex.event import EventHandler
8
- from reflex.ivars.base import ImmutableVar
9
- from reflex.vars import Var
8
+ from reflex.vars.base import Var
10
9
 
11
10
  from ..base import (
12
11
  LiteralAccentColor,
@@ -89,7 +88,7 @@ class Slider(RadixThemesComponent):
89
88
  """
90
89
  default_value = props.pop("default_value", [50])
91
90
 
92
- if isinstance(default_value, ImmutableVar):
91
+ if isinstance(default_value, Var):
93
92
  if issubclass(default_value._var_type, (int, float)):
94
93
  default_value = [default_value]
95
94
 
@@ -7,9 +7,8 @@ from typing import Any, Callable, Dict, List, 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 RadixThemesComponent
15
14
 
@@ -23,99 +22,99 @@ class Slider(RadixThemesComponent):
23
22
  as_child: Optional[Union[Var[bool], bool]] = None,
24
23
  size: Optional[
25
24
  Union[
25
+ Breakpoints[str, Literal["1", "2", "3"]],
26
+ Literal["1", "2", "3"],
26
27
  Var[
27
28
  Union[
28
29
  Breakpoints[str, Literal["1", "2", "3"]], Literal["1", "2", "3"]
29
30
  ]
30
31
  ],
31
- Literal["1", "2", "3"],
32
- Breakpoints[str, Literal["1", "2", "3"]],
33
32
  ]
34
33
  ] = None,
35
34
  variant: Optional[
36
35
  Union[
37
- Var[Literal["classic", "surface", "soft"]],
38
- Literal["classic", "surface", "soft"],
36
+ Literal["classic", "soft", "surface"],
37
+ Var[Literal["classic", "soft", "surface"]],
39
38
  ]
40
39
  ] = None,
41
40
  color_scheme: Optional[
42
41
  Union[
42
+ Literal[
43
+ "amber",
44
+ "blue",
45
+ "bronze",
46
+ "brown",
47
+ "crimson",
48
+ "cyan",
49
+ "gold",
50
+ "grass",
51
+ "gray",
52
+ "green",
53
+ "indigo",
54
+ "iris",
55
+ "jade",
56
+ "lime",
57
+ "mint",
58
+ "orange",
59
+ "pink",
60
+ "plum",
61
+ "purple",
62
+ "red",
63
+ "ruby",
64
+ "sky",
65
+ "teal",
66
+ "tomato",
67
+ "violet",
68
+ "yellow",
69
+ ],
43
70
  Var[
44
71
  Literal[
45
- "tomato",
46
- "red",
47
- "ruby",
48
- "crimson",
49
- "pink",
50
- "plum",
51
- "purple",
52
- "violet",
53
- "iris",
54
- "indigo",
72
+ "amber",
55
73
  "blue",
74
+ "bronze",
75
+ "brown",
76
+ "crimson",
56
77
  "cyan",
57
- "teal",
58
- "jade",
59
- "green",
78
+ "gold",
60
79
  "grass",
61
- "brown",
80
+ "gray",
81
+ "green",
82
+ "indigo",
83
+ "iris",
84
+ "jade",
85
+ "lime",
86
+ "mint",
62
87
  "orange",
88
+ "pink",
89
+ "plum",
90
+ "purple",
91
+ "red",
92
+ "ruby",
63
93
  "sky",
64
- "mint",
65
- "lime",
94
+ "teal",
95
+ "tomato",
96
+ "violet",
66
97
  "yellow",
67
- "amber",
68
- "gold",
69
- "bronze",
70
- "gray",
71
98
  ]
72
99
  ],
73
- Literal[
74
- "tomato",
75
- "red",
76
- "ruby",
77
- "crimson",
78
- "pink",
79
- "plum",
80
- "purple",
81
- "violet",
82
- "iris",
83
- "indigo",
84
- "blue",
85
- "cyan",
86
- "teal",
87
- "jade",
88
- "green",
89
- "grass",
90
- "brown",
91
- "orange",
92
- "sky",
93
- "mint",
94
- "lime",
95
- "yellow",
96
- "amber",
97
- "gold",
98
- "bronze",
99
- "gray",
100
- ],
101
100
  ]
102
101
  ] = None,
103
102
  high_contrast: Optional[Union[Var[bool], bool]] = None,
104
103
  radius: Optional[
105
104
  Union[
106
- Var[Literal["none", "small", "full"]], Literal["none", "small", "full"]
105
+ Literal["full", "none", "small"], Var[Literal["full", "none", "small"]]
107
106
  ]
108
107
  ] = None,
109
108
  default_value: Optional[
110
109
  Union[
111
- Var[Union[List[Union[float, int]], float, int]],
112
110
  List[Union[float, int]],
111
+ Var[Union[List[Union[float, int]], float, int]],
113
112
  float,
114
113
  int,
115
114
  ]
116
115
  ] = None,
117
116
  value: Optional[
118
- Union[Var[List[Union[float, int]]], List[Union[float, int]]]
117
+ Union[List[Union[float, int]], Var[List[Union[float, int]]]]
119
118
  ] = None,
120
119
  name: Optional[Union[Var[str], str]] = None,
121
120
  min: Optional[Union[Var[Union[float, int]], float, int]] = None,
@@ -124,8 +123,8 @@ class Slider(RadixThemesComponent):
124
123
  disabled: Optional[Union[Var[bool], bool]] = None,
125
124
  orientation: Optional[
126
125
  Union[
127
- Var[Literal["horizontal", "vertical"]],
128
126
  Literal["horizontal", "vertical"],
127
+ Var[Literal["horizontal", "vertical"]],
129
128
  ]
130
129
  ] = None,
131
130
  style: Optional[Style] = None,
@@ -133,57 +132,45 @@ class Slider(RadixThemesComponent):
133
132
  id: Optional[Any] = None,
134
133
  class_name: Optional[Any] = None,
135
134
  autofocus: Optional[bool] = None,
136
- custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
137
- on_blur: Optional[
138
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
139
- ] = None,
140
- on_change: Optional[
141
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
142
- ] = None,
143
- on_click: Optional[
144
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
145
- ] = None,
135
+ custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
136
+ on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
137
+ on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
138
+ on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
146
139
  on_context_menu: Optional[
147
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
140
+ Union[EventHandler, EventSpec, list, Callable, Var]
148
141
  ] = None,
149
142
  on_double_click: Optional[
150
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
151
- ] = None,
152
- on_focus: Optional[
153
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
154
- ] = None,
155
- on_mount: Optional[
156
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
143
+ Union[EventHandler, EventSpec, list, Callable, Var]
157
144
  ] = None,
145
+ on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
146
+ on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
158
147
  on_mouse_down: Optional[
159
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
148
+ Union[EventHandler, EventSpec, list, Callable, Var]
160
149
  ] = None,
161
150
  on_mouse_enter: Optional[
162
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
151
+ Union[EventHandler, EventSpec, list, Callable, Var]
163
152
  ] = None,
164
153
  on_mouse_leave: Optional[
165
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
154
+ Union[EventHandler, EventSpec, list, Callable, Var]
166
155
  ] = None,
167
156
  on_mouse_move: Optional[
168
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
157
+ Union[EventHandler, EventSpec, list, Callable, Var]
169
158
  ] = None,
170
159
  on_mouse_out: Optional[
171
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
160
+ Union[EventHandler, EventSpec, list, Callable, Var]
172
161
  ] = None,
173
162
  on_mouse_over: Optional[
174
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
163
+ Union[EventHandler, EventSpec, list, Callable, Var]
175
164
  ] = None,
176
165
  on_mouse_up: Optional[
177
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
178
- ] = None,
179
- on_scroll: Optional[
180
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
166
+ Union[EventHandler, EventSpec, list, Callable, Var]
181
167
  ] = None,
168
+ on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
182
169
  on_unmount: Optional[
183
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
170
+ Union[EventHandler, EventSpec, list, Callable, Var]
184
171
  ] = None,
185
172
  on_value_commit: Optional[
186
- Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
173
+ Union[EventHandler, EventSpec, list, Callable, Var]
187
174
  ] = None,
188
175
  **props,
189
176
  ) -> "Slider":
@@ -3,7 +3,7 @@
3
3
  from typing import Literal
4
4
 
5
5
  from reflex.components.core.breakpoints import Responsive
6
- from reflex.vars import Var
6
+ from reflex.vars.base import Var
7
7
 
8
8
  from ..base import (
9
9
  RadixLoadingProp,