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
@@ -2,7 +2,7 @@
2
2
 
3
3
  from typing import Union
4
4
 
5
- from reflex.vars.base import Var
5
+ from reflex.vars import Var as Var
6
6
 
7
7
  from .base import BaseHTML
8
8
 
@@ -6,8 +6,9 @@
6
6
  from typing import Any, Callable, Dict, 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 BaseHTML
13
14
 
@@ -17,70 +18,80 @@ class Canvas(BaseHTML):
17
18
  def create( # type: ignore
18
19
  cls,
19
20
  *children,
20
- access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
21
+ access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
21
22
  auto_capitalize: Optional[
22
- Union[Var[Union[bool, int, str]], bool, int, str]
23
+ Union[Var[Union[bool, int, str]], str, int, bool]
23
24
  ] = None,
24
25
  content_editable: Optional[
25
- Union[Var[Union[bool, int, str]], bool, int, str]
26
+ Union[Var[Union[bool, int, str]], str, int, bool]
26
27
  ] = None,
27
28
  context_menu: Optional[
28
- Union[Var[Union[bool, int, str]], bool, int, str]
29
+ Union[Var[Union[bool, int, str]], str, int, bool]
29
30
  ] = None,
30
- dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
31
- draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
31
+ dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
32
+ draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
32
33
  enter_key_hint: Optional[
33
- Union[Var[Union[bool, int, str]], bool, int, str]
34
- ] = None,
35
- hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
36
- input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
37
- item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
38
- lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
39
- role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
40
- slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
41
- spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
42
- tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
43
- title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
34
+ Union[Var[Union[bool, int, str]], str, int, bool]
35
+ ] = None,
36
+ hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
37
+ input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
38
+ item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
39
+ lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
40
+ role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
41
+ slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
42
+ spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
43
+ tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
44
+ title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
44
45
  style: Optional[Style] = None,
45
46
  key: Optional[Any] = None,
46
47
  id: Optional[Any] = None,
47
48
  class_name: Optional[Any] = None,
48
49
  autofocus: Optional[bool] = None,
49
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
50
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
51
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
50
+ custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
51
+ on_blur: Optional[
52
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
53
+ ] = None,
54
+ on_click: Optional[
55
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
56
+ ] = None,
52
57
  on_context_menu: Optional[
53
- Union[EventHandler, EventSpec, list, Callable, Var]
58
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
54
59
  ] = None,
55
60
  on_double_click: Optional[
56
- Union[EventHandler, EventSpec, list, Callable, Var]
61
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
62
+ ] = None,
63
+ on_focus: Optional[
64
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
65
+ ] = None,
66
+ on_mount: Optional[
67
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
57
68
  ] = None,
58
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
59
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
60
69
  on_mouse_down: Optional[
61
- Union[EventHandler, EventSpec, list, Callable, Var]
70
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
62
71
  ] = None,
63
72
  on_mouse_enter: Optional[
64
- Union[EventHandler, EventSpec, list, Callable, Var]
73
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
65
74
  ] = None,
66
75
  on_mouse_leave: Optional[
67
- Union[EventHandler, EventSpec, list, Callable, Var]
76
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
68
77
  ] = None,
69
78
  on_mouse_move: Optional[
70
- Union[EventHandler, EventSpec, list, Callable, Var]
79
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
71
80
  ] = None,
72
81
  on_mouse_out: Optional[
73
- Union[EventHandler, EventSpec, list, Callable, Var]
82
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
74
83
  ] = None,
75
84
  on_mouse_over: Optional[
76
- Union[EventHandler, EventSpec, list, Callable, Var]
85
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
77
86
  ] = None,
78
87
  on_mouse_up: Optional[
79
- Union[EventHandler, EventSpec, list, Callable, Var]
88
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
89
+ ] = None,
90
+ on_scroll: Optional[
91
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
80
92
  ] = None,
81
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
82
93
  on_unmount: Optional[
83
- Union[EventHandler, EventSpec, list, Callable, Var]
94
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
84
95
  ] = None,
85
96
  **props,
86
97
  ) -> "Canvas":
@@ -123,70 +134,80 @@ class Noscript(BaseHTML):
123
134
  def create( # type: ignore
124
135
  cls,
125
136
  *children,
126
- access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
137
+ access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
127
138
  auto_capitalize: Optional[
128
- Union[Var[Union[bool, int, str]], bool, int, str]
139
+ Union[Var[Union[bool, int, str]], str, int, bool]
129
140
  ] = None,
130
141
  content_editable: Optional[
131
- Union[Var[Union[bool, int, str]], bool, int, str]
142
+ Union[Var[Union[bool, int, str]], str, int, bool]
132
143
  ] = None,
133
144
  context_menu: Optional[
134
- Union[Var[Union[bool, int, str]], bool, int, str]
145
+ Union[Var[Union[bool, int, str]], str, int, bool]
135
146
  ] = None,
136
- dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
137
- draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
147
+ dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
148
+ draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
138
149
  enter_key_hint: Optional[
139
- Union[Var[Union[bool, int, str]], bool, int, str]
140
- ] = None,
141
- hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
142
- input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
143
- item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
144
- lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
145
- role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
146
- slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
147
- spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
148
- tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
149
- title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
150
+ Union[Var[Union[bool, int, str]], str, int, bool]
151
+ ] = None,
152
+ hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
153
+ input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
154
+ item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
155
+ lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
156
+ role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
157
+ slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
158
+ spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
159
+ tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
160
+ title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
150
161
  style: Optional[Style] = None,
151
162
  key: Optional[Any] = None,
152
163
  id: Optional[Any] = None,
153
164
  class_name: Optional[Any] = None,
154
165
  autofocus: Optional[bool] = None,
155
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
156
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
157
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
166
+ custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
167
+ on_blur: Optional[
168
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
169
+ ] = None,
170
+ on_click: Optional[
171
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
172
+ ] = None,
158
173
  on_context_menu: Optional[
159
- Union[EventHandler, EventSpec, list, Callable, Var]
174
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
160
175
  ] = None,
161
176
  on_double_click: Optional[
162
- Union[EventHandler, EventSpec, list, Callable, Var]
177
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
178
+ ] = None,
179
+ on_focus: Optional[
180
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
181
+ ] = None,
182
+ on_mount: Optional[
183
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
163
184
  ] = None,
164
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
165
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
166
185
  on_mouse_down: Optional[
167
- Union[EventHandler, EventSpec, list, Callable, Var]
186
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
168
187
  ] = None,
169
188
  on_mouse_enter: Optional[
170
- Union[EventHandler, EventSpec, list, Callable, Var]
189
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
171
190
  ] = None,
172
191
  on_mouse_leave: Optional[
173
- Union[EventHandler, EventSpec, list, Callable, Var]
192
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
174
193
  ] = None,
175
194
  on_mouse_move: Optional[
176
- Union[EventHandler, EventSpec, list, Callable, Var]
195
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
177
196
  ] = None,
178
197
  on_mouse_out: Optional[
179
- Union[EventHandler, EventSpec, list, Callable, Var]
198
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
180
199
  ] = None,
181
200
  on_mouse_over: Optional[
182
- Union[EventHandler, EventSpec, list, Callable, Var]
201
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
183
202
  ] = None,
184
203
  on_mouse_up: Optional[
185
- Union[EventHandler, EventSpec, list, Callable, Var]
204
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
205
+ ] = None,
206
+ on_scroll: Optional[
207
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
186
208
  ] = None,
187
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
188
209
  on_unmount: Optional[
189
- Union[EventHandler, EventSpec, list, Callable, Var]
210
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
190
211
  ] = None,
191
212
  **props,
192
213
  ) -> "Noscript":
@@ -229,83 +250,93 @@ class Script(BaseHTML):
229
250
  def create( # type: ignore
230
251
  cls,
231
252
  *children,
232
- async_: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
233
- char_set: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
253
+ async_: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
254
+ char_set: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
234
255
  cross_origin: Optional[
235
- Union[Var[Union[bool, int, str]], bool, int, str]
256
+ Union[Var[Union[bool, int, str]], str, int, bool]
236
257
  ] = None,
237
- defer: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
238
- integrity: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
239
- language: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
258
+ defer: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
259
+ integrity: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
260
+ language: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
240
261
  referrer_policy: Optional[
241
- Union[Var[Union[bool, int, str]], bool, int, str]
262
+ Union[Var[Union[bool, int, str]], str, int, bool]
242
263
  ] = None,
243
- src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
244
- type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
245
- access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
264
+ src: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
265
+ type: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
266
+ access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
246
267
  auto_capitalize: Optional[
247
- Union[Var[Union[bool, int, str]], bool, int, str]
268
+ Union[Var[Union[bool, int, str]], str, int, bool]
248
269
  ] = None,
249
270
  content_editable: Optional[
250
- Union[Var[Union[bool, int, str]], bool, int, str]
271
+ Union[Var[Union[bool, int, str]], str, int, bool]
251
272
  ] = None,
252
273
  context_menu: Optional[
253
- Union[Var[Union[bool, int, str]], bool, int, str]
274
+ Union[Var[Union[bool, int, str]], str, int, bool]
254
275
  ] = None,
255
- dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
256
- draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
276
+ dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
277
+ draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
257
278
  enter_key_hint: Optional[
258
- Union[Var[Union[bool, int, str]], bool, int, str]
259
- ] = None,
260
- hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
261
- input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
262
- item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
263
- lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
264
- role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
265
- slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
266
- spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
267
- tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
268
- title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
279
+ Union[Var[Union[bool, int, str]], str, int, bool]
280
+ ] = None,
281
+ hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
282
+ input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
283
+ item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
284
+ lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
285
+ role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
286
+ slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
287
+ spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
288
+ tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
289
+ title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
269
290
  style: Optional[Style] = None,
270
291
  key: Optional[Any] = None,
271
292
  id: Optional[Any] = None,
272
293
  class_name: Optional[Any] = None,
273
294
  autofocus: Optional[bool] = None,
274
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
275
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
276
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
295
+ custom_attrs: Optional[Dict[str, Union[ImmutableVar, str]]] = None,
296
+ on_blur: Optional[
297
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
298
+ ] = None,
299
+ on_click: Optional[
300
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
301
+ ] = None,
277
302
  on_context_menu: Optional[
278
- Union[EventHandler, EventSpec, list, Callable, Var]
303
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
279
304
  ] = None,
280
305
  on_double_click: Optional[
281
- Union[EventHandler, EventSpec, list, Callable, Var]
306
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
307
+ ] = None,
308
+ on_focus: Optional[
309
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
310
+ ] = None,
311
+ on_mount: Optional[
312
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
282
313
  ] = None,
283
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
284
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
285
314
  on_mouse_down: Optional[
286
- Union[EventHandler, EventSpec, list, Callable, Var]
315
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
287
316
  ] = None,
288
317
  on_mouse_enter: Optional[
289
- Union[EventHandler, EventSpec, list, Callable, Var]
318
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
290
319
  ] = None,
291
320
  on_mouse_leave: Optional[
292
- Union[EventHandler, EventSpec, list, Callable, Var]
321
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
293
322
  ] = None,
294
323
  on_mouse_move: Optional[
295
- Union[EventHandler, EventSpec, list, Callable, Var]
324
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
296
325
  ] = None,
297
326
  on_mouse_out: Optional[
298
- Union[EventHandler, EventSpec, list, Callable, Var]
327
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
299
328
  ] = None,
300
329
  on_mouse_over: Optional[
301
- Union[EventHandler, EventSpec, list, Callable, Var]
330
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
302
331
  ] = None,
303
332
  on_mouse_up: Optional[
304
- Union[EventHandler, EventSpec, list, Callable, Var]
333
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
334
+ ] = None,
335
+ on_scroll: Optional[
336
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
305
337
  ] = None,
306
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
307
338
  on_unmount: Optional[
308
- Union[EventHandler, EventSpec, list, Callable, Var]
339
+ Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
309
340
  ] = None,
310
341
  **props,
311
342
  ) -> "Script":
@@ -1,5 +1,7 @@
1
1
  """Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
2
2
 
3
+ from reflex.vars import Var as Var
4
+
3
5
  from .base import BaseHTML
4
6
 
5
7