reflex 0.5.5a2__py3-none-any.whl → 0.5.6a1__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 (262) hide show
  1. reflex/.templates/jinja/web/pages/_app.js.jinja2 +0 -1
  2. reflex/.templates/jinja/web/utils/context.js.jinja2 +2 -0
  3. reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +20 -2
  4. reflex/.templates/web/utils/helpers/paste.js +59 -0
  5. reflex/__init__.py +2 -0
  6. reflex/__init__.pyi +86 -87
  7. reflex/app.py +64 -126
  8. reflex/app_mixins/__init__.py +5 -0
  9. reflex/app_mixins/lifespan.py +57 -0
  10. reflex/app_mixins/middleware.py +93 -0
  11. reflex/app_mixins/mixin.py +14 -0
  12. reflex/compiler/compiler.py +6 -1
  13. reflex/components/__init__.pyi +0 -2
  14. reflex/components/base/__init__.pyi +1 -3
  15. reflex/components/base/app_wrap.pyi +21 -22
  16. reflex/components/base/body.pyi +21 -20
  17. reflex/components/base/document.pyi +85 -85
  18. reflex/components/base/fragment.pyi +21 -20
  19. reflex/components/base/head.pyi +37 -36
  20. reflex/components/base/link.pyi +37 -37
  21. reflex/components/base/meta.pyi +69 -70
  22. reflex/components/base/script.py +6 -2
  23. reflex/components/base/script.pyi +31 -27
  24. reflex/components/chakra/base.pyi +54 -56
  25. reflex/components/chakra/datadisplay/badge.pyi +21 -21
  26. reflex/components/chakra/datadisplay/code.pyi +21 -20
  27. reflex/components/chakra/datadisplay/divider.pyi +21 -22
  28. reflex/components/chakra/datadisplay/keyboard_key.pyi +21 -20
  29. reflex/components/chakra/datadisplay/list.pyi +69 -71
  30. reflex/components/chakra/datadisplay/stat.pyi +101 -102
  31. reflex/components/chakra/datadisplay/table.pyi +149 -153
  32. reflex/components/chakra/datadisplay/tag.pyi +85 -89
  33. reflex/components/chakra/disclosure/accordion.pyi +87 -93
  34. reflex/components/chakra/disclosure/tabs.pyi +85 -90
  35. reflex/components/chakra/disclosure/transition.pyi +104 -105
  36. reflex/components/chakra/disclosure/visuallyhidden.pyi +21 -20
  37. reflex/components/chakra/feedback/alert.pyi +69 -70
  38. reflex/components/chakra/feedback/circularprogress.pyi +38 -40
  39. reflex/components/chakra/feedback/progress.pyi +22 -23
  40. reflex/components/chakra/feedback/skeleton.pyi +53 -53
  41. reflex/components/chakra/feedback/spinner.pyi +21 -21
  42. reflex/components/chakra/forms/button.pyi +37 -42
  43. reflex/components/chakra/forms/checkbox.pyi +38 -39
  44. reflex/components/chakra/forms/colormodeswitch.pyi +72 -71
  45. reflex/components/chakra/forms/date_picker.pyi +24 -24
  46. reflex/components/chakra/forms/date_time_picker.pyi +24 -24
  47. reflex/components/chakra/forms/editable.pyi +73 -74
  48. reflex/components/chakra/forms/email.pyi +24 -24
  49. reflex/components/chakra/forms/form.pyi +112 -141
  50. reflex/components/chakra/forms/iconbutton.pyi +21 -22
  51. reflex/components/chakra/forms/input.pyi +104 -111
  52. reflex/components/chakra/forms/numberinput.pyi +87 -91
  53. reflex/components/chakra/forms/password.pyi +24 -24
  54. reflex/components/chakra/forms/pininput.pyi +39 -45
  55. reflex/components/chakra/forms/radio.pyi +38 -43
  56. reflex/components/chakra/forms/rangeslider.pyi +72 -76
  57. reflex/components/chakra/forms/select.pyi +39 -44
  58. reflex/components/chakra/forms/slider.pyi +88 -91
  59. reflex/components/chakra/forms/switch.pyi +22 -23
  60. reflex/components/chakra/forms/textarea.pyi +24 -27
  61. reflex/components/chakra/forms/time_picker.pyi +24 -24
  62. reflex/components/chakra/layout/aspect_ratio.pyi +21 -21
  63. reflex/components/chakra/layout/box.pyi +21 -22
  64. reflex/components/chakra/layout/card.pyi +69 -73
  65. reflex/components/chakra/layout/center.pyi +53 -52
  66. reflex/components/chakra/layout/container.pyi +21 -21
  67. reflex/components/chakra/layout/flex.pyi +23 -26
  68. reflex/components/chakra/layout/grid.pyi +53 -54
  69. reflex/components/chakra/layout/spacer.pyi +21 -20
  70. reflex/components/chakra/layout/stack.pyi +62 -60
  71. reflex/components/chakra/layout/wrap.pyi +37 -38
  72. reflex/components/chakra/media/avatar.pyi +54 -55
  73. reflex/components/chakra/media/icon.pyi +37 -38
  74. reflex/components/chakra/media/image.pyi +24 -26
  75. reflex/components/chakra/navigation/breadcrumb.pyi +69 -71
  76. reflex/components/chakra/navigation/link.pyi +20 -21
  77. reflex/components/chakra/navigation/linkoverlay.pyi +37 -37
  78. reflex/components/chakra/navigation/stepper.pyi +149 -151
  79. reflex/components/chakra/overlay/alertdialog.pyi +121 -124
  80. reflex/components/chakra/overlay/drawer.pyi +121 -126
  81. reflex/components/chakra/overlay/menu.pyi +135 -141
  82. reflex/components/chakra/overlay/modal.pyi +121 -124
  83. reflex/components/chakra/overlay/popover.pyi +151 -156
  84. reflex/components/chakra/overlay/tooltip.pyi +23 -24
  85. reflex/components/chakra/typography/heading.pyi +21 -21
  86. reflex/components/chakra/typography/highlight.pyi +21 -23
  87. reflex/components/chakra/typography/span.pyi +21 -21
  88. reflex/components/chakra/typography/text.pyi +21 -21
  89. reflex/components/component.py +6 -2
  90. reflex/components/core/__init__.py +2 -0
  91. reflex/components/core/__init__.pyi +9 -7
  92. reflex/components/core/banner.pyi +118 -146
  93. reflex/components/core/breakpoints.py +95 -0
  94. reflex/components/core/client_side_routing.pyi +37 -39
  95. reflex/components/core/clipboard.py +95 -0
  96. reflex/components/core/clipboard.pyi +102 -0
  97. reflex/components/core/debounce.pyi +23 -28
  98. reflex/components/core/html.pyi +38 -55
  99. reflex/components/core/upload.pyi +74 -91
  100. reflex/components/datadisplay/__init__.pyi +2 -3
  101. reflex/components/datadisplay/code.py +3 -3
  102. reflex/components/datadisplay/code.pyi +22 -31
  103. reflex/components/datadisplay/dataeditor.pyi +41 -45
  104. reflex/components/el/__init__.pyi +131 -135
  105. reflex/components/el/element.pyi +21 -20
  106. reflex/components/el/elements/__init__.pyi +131 -132
  107. reflex/components/el/elements/base.pyi +38 -55
  108. reflex/components/el/elements/forms.pyi +558 -878
  109. reflex/components/el/elements/inline.pyi +941 -1403
  110. reflex/components/el/elements/media.pyi +645 -994
  111. reflex/components/el/elements/metadata.pyi +186 -268
  112. reflex/components/el/elements/other.pyi +239 -353
  113. reflex/components/el/elements/scripts.pyi +113 -171
  114. reflex/components/el/elements/sectioning.pyi +500 -739
  115. reflex/components/el/elements/tables.pyi +355 -551
  116. reflex/components/el/elements/typography.pyi +510 -760
  117. reflex/components/gridjs/datatable.pyi +38 -42
  118. reflex/components/lucide/icon.pyi +37 -38
  119. reflex/components/markdown/markdown.pyi +23 -36
  120. reflex/components/moment/moment.pyi +23 -25
  121. reflex/components/next/base.pyi +21 -20
  122. reflex/components/next/image.pyi +25 -27
  123. reflex/components/next/link.pyi +21 -21
  124. reflex/components/next/video.pyi +22 -22
  125. reflex/components/plotly/plotly.pyi +42 -45
  126. reflex/components/radix/__init__.pyi +26 -30
  127. reflex/components/radix/primitives/__init__.pyi +0 -2
  128. reflex/components/radix/primitives/accordion.pyi +119 -127
  129. reflex/components/radix/primitives/base.pyi +37 -40
  130. reflex/components/radix/primitives/drawer.pyi +175 -179
  131. reflex/components/radix/primitives/form.pyi +250 -336
  132. reflex/components/radix/primitives/progress.pyi +92 -96
  133. reflex/components/radix/primitives/slider.pyi +87 -89
  134. reflex/components/radix/themes/__init__.pyi +0 -2
  135. reflex/components/radix/themes/base.pyi +118 -121
  136. reflex/components/radix/themes/color_mode.pyi +103 -117
  137. reflex/components/radix/themes/components/__init__.pyi +12 -14
  138. reflex/components/radix/themes/components/alert_dialog.py +2 -1
  139. reflex/components/radix/themes/components/alert_dialog.pyi +150 -157
  140. reflex/components/radix/themes/components/aspect_ratio.pyi +22 -22
  141. reflex/components/radix/themes/components/avatar.py +2 -1
  142. reflex/components/radix/themes/components/avatar.pyi +32 -23
  143. reflex/components/radix/themes/components/badge.py +2 -1
  144. reflex/components/radix/themes/components/badge.pyi +50 -57
  145. reflex/components/radix/themes/components/button.py +2 -1
  146. reflex/components/radix/themes/components/button.pyi +60 -79
  147. reflex/components/radix/themes/components/callout.py +2 -1
  148. reflex/components/radix/themes/components/callout.pyi +201 -258
  149. reflex/components/radix/themes/components/card.py +2 -1
  150. reflex/components/radix/themes/components/card.pyi +48 -56
  151. reflex/components/radix/themes/components/checkbox.py +2 -1
  152. reflex/components/radix/themes/components/checkbox.pyi +68 -62
  153. reflex/components/radix/themes/components/checkbox_cards.py +8 -3
  154. reflex/components/radix/themes/components/checkbox_cards.pyi +87 -44
  155. reflex/components/radix/themes/components/checkbox_group.py +2 -1
  156. reflex/components/radix/themes/components/checkbox_group.pyi +49 -40
  157. reflex/components/radix/themes/components/context_menu.py +2 -1
  158. reflex/components/radix/themes/components/context_menu.pyi +153 -147
  159. reflex/components/radix/themes/components/data_list.py +8 -7
  160. reflex/components/radix/themes/components/data_list.pyi +116 -78
  161. reflex/components/radix/themes/components/dialog.py +2 -1
  162. reflex/components/radix/themes/components/dialog.pyi +154 -161
  163. reflex/components/radix/themes/components/dropdown_menu.py +2 -1
  164. reflex/components/radix/themes/components/dropdown_menu.pyi +169 -163
  165. reflex/components/radix/themes/components/hover_card.py +2 -1
  166. reflex/components/radix/themes/components/hover_card.pyi +97 -107
  167. reflex/components/radix/themes/components/icon_button.py +2 -1
  168. reflex/components/radix/themes/components/icon_button.pyi +59 -82
  169. reflex/components/radix/themes/components/inset.py +10 -9
  170. reflex/components/radix/themes/components/inset.pyi +109 -61
  171. reflex/components/radix/themes/components/popover.py +2 -1
  172. reflex/components/radix/themes/components/popover.pyi +105 -112
  173. reflex/components/radix/themes/components/progress.py +2 -1
  174. reflex/components/radix/themes/components/progress.pyi +32 -24
  175. reflex/components/radix/themes/components/radio.py +2 -1
  176. reflex/components/radix/themes/components/radio.pyi +32 -23
  177. reflex/components/radix/themes/components/radio_cards.py +51 -3
  178. reflex/components/radix/themes/components/radio_cards.pyi +120 -44
  179. reflex/components/radix/themes/components/radio_group.py +5 -2
  180. reflex/components/radix/themes/components/radio_group.pyi +82 -77
  181. reflex/components/radix/themes/components/scroll_area.pyi +21 -21
  182. reflex/components/radix/themes/components/segmented_control.py +2 -1
  183. reflex/components/radix/themes/components/segmented_control.pyi +52 -46
  184. reflex/components/radix/themes/components/select.py +2 -1
  185. reflex/components/radix/themes/components/select.pyi +188 -164
  186. reflex/components/radix/themes/components/separator.py +5 -2
  187. reflex/components/radix/themes/components/separator.pyi +40 -24
  188. reflex/components/radix/themes/components/skeleton.py +7 -6
  189. reflex/components/radix/themes/components/skeleton.pyi +40 -26
  190. reflex/components/radix/themes/components/slider.py +2 -1
  191. reflex/components/radix/themes/components/slider.pyi +40 -31
  192. reflex/components/radix/themes/components/spinner.py +2 -1
  193. reflex/components/radix/themes/components/spinner.pyi +31 -22
  194. reflex/components/radix/themes/components/switch.py +2 -1
  195. reflex/components/radix/themes/components/switch.pyi +33 -25
  196. reflex/components/radix/themes/components/table.py +2 -1
  197. reflex/components/radix/themes/components/table.pyi +265 -404
  198. reflex/components/radix/themes/components/tabs.py +14 -1
  199. reflex/components/radix/themes/components/tabs.pyi +113 -92
  200. reflex/components/radix/themes/components/text_area.py +3 -2
  201. reflex/components/radix/themes/components/text_area.pyi +64 -66
  202. reflex/components/radix/themes/components/text_field.py +2 -1
  203. reflex/components/radix/themes/components/text_field.pyi +116 -140
  204. reflex/components/radix/themes/components/tooltip.pyi +32 -37
  205. reflex/components/radix/themes/layout/__init__.pyi +4 -7
  206. reflex/components/radix/themes/layout/base.py +10 -9
  207. reflex/components/radix/themes/layout/base.pyi +121 -31
  208. reflex/components/radix/themes/layout/box.pyi +39 -53
  209. reflex/components/radix/themes/layout/center.pyi +89 -58
  210. reflex/components/radix/themes/layout/container.py +4 -1
  211. reflex/components/radix/themes/layout/container.pyi +51 -58
  212. reflex/components/radix/themes/layout/flex.py +6 -5
  213. reflex/components/radix/themes/layout/flex.pyi +91 -61
  214. reflex/components/radix/themes/layout/grid.py +9 -8
  215. reflex/components/radix/themes/layout/grid.pyi +116 -64
  216. reflex/components/radix/themes/layout/list.pyi +173 -233
  217. reflex/components/radix/themes/layout/section.py +4 -1
  218. reflex/components/radix/themes/layout/section.pyi +50 -57
  219. reflex/components/radix/themes/layout/spacer.pyi +89 -58
  220. reflex/components/radix/themes/layout/stack.pyi +160 -160
  221. reflex/components/radix/themes/typography/__init__.pyi +0 -2
  222. reflex/components/radix/themes/typography/blockquote.py +3 -2
  223. reflex/components/radix/themes/typography/blockquote.pyi +58 -59
  224. reflex/components/radix/themes/typography/code.py +3 -2
  225. reflex/components/radix/themes/typography/code.pyi +57 -58
  226. reflex/components/radix/themes/typography/heading.py +5 -4
  227. reflex/components/radix/themes/typography/heading.pyi +71 -60
  228. reflex/components/radix/themes/typography/link.py +4 -3
  229. reflex/components/radix/themes/typography/link.pyi +74 -82
  230. reflex/components/radix/themes/typography/text.py +5 -4
  231. reflex/components/radix/themes/typography/text.pyi +330 -364
  232. reflex/components/react_player/audio.pyi +37 -36
  233. reflex/components/react_player/react_player.pyi +37 -38
  234. reflex/components/react_player/video.pyi +37 -36
  235. reflex/components/recharts/__init__.pyi +41 -42
  236. reflex/components/recharts/cartesian.pyi +384 -400
  237. reflex/components/recharts/charts.pyi +224 -231
  238. reflex/components/recharts/general.pyi +89 -96
  239. reflex/components/recharts/polar.pyi +97 -104
  240. reflex/components/recharts/recharts.pyi +37 -37
  241. reflex/components/sonner/toast.pyi +22 -27
  242. reflex/components/suneditor/editor.pyi +53 -58
  243. reflex/config.py +6 -0
  244. reflex/constants/event.py +1 -0
  245. reflex/experimental/layout.pyi +140 -194
  246. reflex/model.py +14 -2
  247. reflex/state.py +38 -45
  248. reflex/style.py +24 -13
  249. reflex/utils/codespaces.py +94 -0
  250. reflex/utils/compat.py +21 -0
  251. reflex/utils/exceptions.py +4 -0
  252. reflex/utils/format.py +25 -4
  253. reflex/utils/prerequisites.py +0 -13
  254. reflex/utils/pyi_generator.py +88 -61
  255. reflex/utils/types.py +83 -5
  256. reflex/vars.py +62 -5
  257. reflex/vars.pyi +23 -11
  258. {reflex-0.5.5a2.dist-info → reflex-0.5.6a1.dist-info}/METADATA +4 -5
  259. {reflex-0.5.5a2.dist-info → reflex-0.5.6a1.dist-info}/RECORD +262 -253
  260. {reflex-0.5.5a2.dist-info → reflex-0.5.6a1.dist-info}/LICENSE +0 -0
  261. {reflex-0.5.5a2.dist-info → reflex-0.5.6a1.dist-info}/WHEEL +0 -0
  262. {reflex-0.5.5a2.dist-info → reflex-0.5.6a1.dist-info}/entry_points.txt +0 -0
@@ -1,16 +1,16 @@
1
1
  """Stub file for reflex/components/radix/themes/layout/container.py"""
2
+
2
3
  # ------------------- DO NOT EDIT ----------------------
3
4
  # This file was generated by `reflex/utils/pyi_generator.py`!
4
5
  # ------------------------------------------------------
6
+ from typing import Any, Callable, Dict, Literal, Optional, Union, overload
5
7
 
6
- from typing import Any, Dict, Literal, Optional, Union, overload
7
- from reflex.vars import Var, BaseVar, ComputedVar
8
- from reflex.event import EventChain, EventHandler, EventSpec
9
- from reflex.style import Style
10
- from typing import Literal
8
+ from reflex.components.core.breakpoints import Breakpoints
11
9
  from reflex.components.el import elements
12
- from reflex.style import STACK_CHILDREN_FULL_WIDTH
13
- from reflex.vars import Var
10
+ from reflex.event import EventHandler, EventSpec
11
+ from reflex.style import Style
12
+ from reflex.vars import BaseVar, Var
13
+
14
14
  from ..base import RadixThemesComponent
15
15
 
16
16
  LiteralContainerSize = Literal["1", "2", "3", "4"]
@@ -24,48 +24,41 @@ class Container(elements.Div, RadixThemesComponent):
24
24
  padding: Optional[str] = "16px",
25
25
  stack_children_full_width: Optional[bool] = False,
26
26
  size: Optional[
27
- Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]]
28
- ] = None,
29
- access_key: Optional[
30
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
31
- ] = None,
27
+ Union[
28
+ Var[
29
+ Union[
30
+ Breakpoints[str, Literal["1", "2", "3", "4"]],
31
+ Literal["1", "2", "3", "4"],
32
+ ]
33
+ ],
34
+ Literal["1", "2", "3", "4"],
35
+ Breakpoints[str, Literal["1", "2", "3", "4"]],
36
+ ]
37
+ ] = None,
38
+ access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
32
39
  auto_capitalize: Optional[
33
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
40
+ Union[Var[Union[bool, int, str]], str, int, bool]
34
41
  ] = None,
35
42
  content_editable: Optional[
36
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
43
+ Union[Var[Union[bool, int, str]], str, int, bool]
37
44
  ] = None,
38
45
  context_menu: Optional[
39
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
40
- ] = None,
41
- dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
42
- draggable: Optional[
43
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
46
+ Union[Var[Union[bool, int, str]], str, int, bool]
44
47
  ] = None,
48
+ dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
49
+ draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
45
50
  enter_key_hint: Optional[
46
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
47
- ] = None,
48
- hidden: Optional[
49
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
50
- ] = None,
51
- input_mode: Optional[
52
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
53
- ] = None,
54
- item_prop: Optional[
55
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
56
- ] = None,
57
- lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
58
- role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
59
- slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
60
- spell_check: Optional[
61
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
62
- ] = None,
63
- tab_index: Optional[
64
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
65
- ] = None,
66
- title: Optional[
67
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
68
- ] = None,
51
+ Union[Var[Union[bool, int, str]], str, int, bool]
52
+ ] = None,
53
+ hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
54
+ input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
55
+ item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
56
+ lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
57
+ role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
58
+ slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
59
+ spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
60
+ tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
61
+ title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
69
62
  style: Optional[Style] = None,
70
63
  key: Optional[Any] = None,
71
64
  id: Optional[Any] = None,
@@ -73,51 +66,51 @@ class Container(elements.Div, RadixThemesComponent):
73
66
  autofocus: Optional[bool] = None,
74
67
  custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
75
68
  on_blur: Optional[
76
- Union[EventHandler, EventSpec, list, function, BaseVar]
69
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
77
70
  ] = None,
78
71
  on_click: Optional[
79
- Union[EventHandler, EventSpec, list, function, BaseVar]
72
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
80
73
  ] = None,
81
74
  on_context_menu: Optional[
82
- Union[EventHandler, EventSpec, list, function, BaseVar]
75
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
83
76
  ] = None,
84
77
  on_double_click: Optional[
85
- Union[EventHandler, EventSpec, list, function, BaseVar]
78
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
86
79
  ] = None,
87
80
  on_focus: Optional[
88
- Union[EventHandler, EventSpec, list, function, BaseVar]
81
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
89
82
  ] = None,
90
83
  on_mount: Optional[
91
- Union[EventHandler, EventSpec, list, function, BaseVar]
84
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
92
85
  ] = None,
93
86
  on_mouse_down: Optional[
94
- Union[EventHandler, EventSpec, list, function, BaseVar]
87
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
95
88
  ] = None,
96
89
  on_mouse_enter: Optional[
97
- Union[EventHandler, EventSpec, list, function, BaseVar]
90
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
98
91
  ] = None,
99
92
  on_mouse_leave: Optional[
100
- Union[EventHandler, EventSpec, list, function, BaseVar]
93
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
101
94
  ] = None,
102
95
  on_mouse_move: Optional[
103
- Union[EventHandler, EventSpec, list, function, BaseVar]
96
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
104
97
  ] = None,
105
98
  on_mouse_out: Optional[
106
- Union[EventHandler, EventSpec, list, function, BaseVar]
99
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
107
100
  ] = None,
108
101
  on_mouse_over: Optional[
109
- Union[EventHandler, EventSpec, list, function, BaseVar]
102
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
110
103
  ] = None,
111
104
  on_mouse_up: Optional[
112
- Union[EventHandler, EventSpec, list, function, BaseVar]
105
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
113
106
  ] = None,
114
107
  on_scroll: Optional[
115
- Union[EventHandler, EventSpec, list, function, BaseVar]
108
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
116
109
  ] = None,
117
110
  on_unmount: Optional[
118
- Union[EventHandler, EventSpec, list, function, BaseVar]
111
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
119
112
  ] = None,
120
- **props
113
+ **props,
121
114
  ) -> "Container":
122
115
  """Create the container component.
123
116
 
@@ -4,6 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  from typing import Dict, Literal
6
6
 
7
+ from reflex.components.core.breakpoints import Responsive
7
8
  from reflex.components.el import elements
8
9
  from reflex.vars import Var
9
10
 
@@ -27,19 +28,19 @@ class Flex(elements.Div, RadixThemesComponent):
27
28
  as_child: Var[bool]
28
29
 
29
30
  # How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse"
30
- direction: Var[LiteralFlexDirection]
31
+ direction: Var[Responsive[LiteralFlexDirection]]
31
32
 
32
33
  # Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
33
- align: Var[LiteralAlign]
34
+ align: Var[Responsive[LiteralAlign]]
34
35
 
35
36
  # Alignment of children along the cross axis: "start" | "center" | "end" | "between"
36
- justify: Var[LiteralJustify]
37
+ justify: Var[Responsive[LiteralJustify]]
37
38
 
38
39
  # Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse"
39
- wrap: Var[LiteralFlexWrap]
40
+ wrap: Var[Responsive[LiteralFlexWrap]]
40
41
 
41
42
  # Gap between children: "0" - "9"
42
- spacing: Var[LiteralSpacing]
43
+ spacing: Var[Responsive[LiteralSpacing]]
43
44
 
44
45
  # Reflex maps the "spacing" prop to "gap" prop.
45
46
  _rename_props: Dict[str, str] = {"spacing": "gap"}
@@ -1,16 +1,17 @@
1
1
  """Stub file for reflex/components/radix/themes/layout/flex.py"""
2
+
2
3
  # ------------------- DO NOT EDIT ----------------------
3
4
  # This file was generated by `reflex/utils/pyi_generator.py`!
4
5
  # ------------------------------------------------------
6
+ from typing import Any, Callable, Dict, Literal, Optional, Union, overload
5
7
 
6
- from typing import Any, Dict, Literal, Optional, Union, overload
7
- from reflex.vars import Var, BaseVar, ComputedVar
8
- from reflex.event import EventChain, EventHandler, EventSpec
9
- from reflex.style import Style
10
- from typing import Dict, Literal
8
+ from reflex.components.core.breakpoints import Breakpoints
11
9
  from reflex.components.el import elements
12
- from reflex.vars import Var
13
- from ..base import LiteralAlign, LiteralJustify, LiteralSpacing, RadixThemesComponent
10
+ from reflex.event import EventHandler, EventSpec
11
+ from reflex.style import Style
12
+ from reflex.vars import BaseVar, Var
13
+
14
+ from ..base import RadixThemesComponent
14
15
 
15
16
  LiteralFlexDirection = Literal["row", "column", "row-reverse", "column-reverse"]
16
17
  LiteralFlexWrap = Literal["nowrap", "wrap", "wrap-reverse"]
@@ -24,74 +25,103 @@ class Flex(elements.Div, RadixThemesComponent):
24
25
  as_child: Optional[Union[Var[bool], bool]] = None,
25
26
  direction: Optional[
26
27
  Union[
27
- Var[Literal["row", "column", "row-reverse", "column-reverse"]],
28
+ Var[
29
+ Union[
30
+ Breakpoints[
31
+ str,
32
+ Literal["row", "column", "row-reverse", "column-reverse"],
33
+ ],
34
+ Literal["row", "column", "row-reverse", "column-reverse"],
35
+ ]
36
+ ],
28
37
  Literal["row", "column", "row-reverse", "column-reverse"],
38
+ Breakpoints[
39
+ str, Literal["row", "column", "row-reverse", "column-reverse"]
40
+ ],
29
41
  ]
30
42
  ] = None,
31
43
  align: Optional[
32
44
  Union[
33
- Var[Literal["start", "center", "end", "baseline", "stretch"]],
45
+ Var[
46
+ Union[
47
+ Breakpoints[
48
+ str,
49
+ Literal["start", "center", "end", "baseline", "stretch"],
50
+ ],
51
+ Literal["start", "center", "end", "baseline", "stretch"],
52
+ ]
53
+ ],
34
54
  Literal["start", "center", "end", "baseline", "stretch"],
55
+ Breakpoints[
56
+ str, Literal["start", "center", "end", "baseline", "stretch"]
57
+ ],
35
58
  ]
36
59
  ] = None,
37
60
  justify: Optional[
38
61
  Union[
39
- Var[Literal["start", "center", "end", "between"]],
62
+ Var[
63
+ Union[
64
+ Breakpoints[str, Literal["start", "center", "end", "between"]],
65
+ Literal["start", "center", "end", "between"],
66
+ ]
67
+ ],
40
68
  Literal["start", "center", "end", "between"],
69
+ Breakpoints[str, Literal["start", "center", "end", "between"]],
41
70
  ]
42
71
  ] = None,
43
72
  wrap: Optional[
44
73
  Union[
45
- Var[Literal["nowrap", "wrap", "wrap-reverse"]],
74
+ Var[
75
+ Union[
76
+ Breakpoints[str, Literal["nowrap", "wrap", "wrap-reverse"]],
77
+ Literal["nowrap", "wrap", "wrap-reverse"],
78
+ ]
79
+ ],
46
80
  Literal["nowrap", "wrap", "wrap-reverse"],
81
+ Breakpoints[str, Literal["nowrap", "wrap", "wrap-reverse"]],
47
82
  ]
48
83
  ] = None,
49
84
  spacing: Optional[
50
85
  Union[
51
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
86
+ Var[
87
+ Union[
88
+ Breakpoints[
89
+ str,
90
+ Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
91
+ ],
92
+ Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
93
+ ]
94
+ ],
52
95
  Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
96
+ Breakpoints[
97
+ str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
98
+ ],
53
99
  ]
54
100
  ] = None,
55
- access_key: Optional[
56
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
57
- ] = None,
101
+ access_key: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
58
102
  auto_capitalize: Optional[
59
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
103
+ Union[Var[Union[bool, int, str]], str, int, bool]
60
104
  ] = None,
61
105
  content_editable: Optional[
62
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
106
+ Union[Var[Union[bool, int, str]], str, int, bool]
63
107
  ] = None,
64
108
  context_menu: Optional[
65
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
66
- ] = None,
67
- dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
68
- draggable: Optional[
69
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
109
+ Union[Var[Union[bool, int, str]], str, int, bool]
70
110
  ] = None,
111
+ dir: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
112
+ draggable: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
71
113
  enter_key_hint: Optional[
72
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
73
- ] = None,
74
- hidden: Optional[
75
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
76
- ] = None,
77
- input_mode: Optional[
78
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
79
- ] = None,
80
- item_prop: Optional[
81
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
82
- ] = None,
83
- lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
84
- role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
85
- slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
86
- spell_check: Optional[
87
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
88
- ] = None,
89
- tab_index: Optional[
90
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
91
- ] = None,
92
- title: Optional[
93
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
94
- ] = None,
114
+ Union[Var[Union[bool, int, str]], str, int, bool]
115
+ ] = None,
116
+ hidden: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
117
+ input_mode: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
118
+ item_prop: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
119
+ lang: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
120
+ role: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
121
+ slot: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
122
+ spell_check: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
123
+ tab_index: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
124
+ title: Optional[Union[Var[Union[bool, int, str]], str, int, bool]] = None,
95
125
  style: Optional[Style] = None,
96
126
  key: Optional[Any] = None,
97
127
  id: Optional[Any] = None,
@@ -99,51 +129,51 @@ class Flex(elements.Div, RadixThemesComponent):
99
129
  autofocus: Optional[bool] = None,
100
130
  custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
101
131
  on_blur: Optional[
102
- Union[EventHandler, EventSpec, list, function, BaseVar]
132
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
103
133
  ] = None,
104
134
  on_click: Optional[
105
- Union[EventHandler, EventSpec, list, function, BaseVar]
135
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
106
136
  ] = None,
107
137
  on_context_menu: Optional[
108
- Union[EventHandler, EventSpec, list, function, BaseVar]
138
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
109
139
  ] = None,
110
140
  on_double_click: Optional[
111
- Union[EventHandler, EventSpec, list, function, BaseVar]
141
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
112
142
  ] = None,
113
143
  on_focus: Optional[
114
- Union[EventHandler, EventSpec, list, function, BaseVar]
144
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
115
145
  ] = None,
116
146
  on_mount: Optional[
117
- Union[EventHandler, EventSpec, list, function, BaseVar]
147
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
118
148
  ] = None,
119
149
  on_mouse_down: Optional[
120
- Union[EventHandler, EventSpec, list, function, BaseVar]
150
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
121
151
  ] = None,
122
152
  on_mouse_enter: Optional[
123
- Union[EventHandler, EventSpec, list, function, BaseVar]
153
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
124
154
  ] = None,
125
155
  on_mouse_leave: Optional[
126
- Union[EventHandler, EventSpec, list, function, BaseVar]
156
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
127
157
  ] = None,
128
158
  on_mouse_move: Optional[
129
- Union[EventHandler, EventSpec, list, function, BaseVar]
159
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
130
160
  ] = None,
131
161
  on_mouse_out: Optional[
132
- Union[EventHandler, EventSpec, list, function, BaseVar]
162
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
133
163
  ] = None,
134
164
  on_mouse_over: Optional[
135
- Union[EventHandler, EventSpec, list, function, BaseVar]
165
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
136
166
  ] = None,
137
167
  on_mouse_up: Optional[
138
- Union[EventHandler, EventSpec, list, function, BaseVar]
168
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
139
169
  ] = None,
140
170
  on_scroll: Optional[
141
- Union[EventHandler, EventSpec, list, function, BaseVar]
171
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
142
172
  ] = None,
143
173
  on_unmount: Optional[
144
- Union[EventHandler, EventSpec, list, function, BaseVar]
174
+ Union[EventHandler, EventSpec, list, Callable, BaseVar]
145
175
  ] = None,
146
- **props
176
+ **props,
147
177
  ) -> "Flex":
148
178
  """Create a new component instance.
149
179
 
@@ -4,6 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  from typing import Dict, Literal
6
6
 
7
+ from reflex.components.core.breakpoints import Responsive
7
8
  from reflex.components.el import elements
8
9
  from reflex.vars import Var
9
10
 
@@ -26,28 +27,28 @@ class Grid(elements.Div, RadixThemesComponent):
26
27
  as_child: Var[bool]
27
28
 
28
29
  # Number of columns
29
- columns: Var[str]
30
+ columns: Var[Responsive[str]]
30
31
 
31
32
  # Number of rows
32
- rows: Var[str]
33
+ rows: Var[Responsive[str]]
33
34
 
34
35
  # How the grid items are layed out: "row" | "column" | "dense" | "row-dense" | "column-dense"
35
- flow: Var[LiteralGridFlow]
36
+ flow: Var[Responsive[LiteralGridFlow]]
36
37
 
37
38
  # Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
38
- align: Var[LiteralAlign]
39
+ align: Var[Responsive[LiteralAlign]]
39
40
 
40
41
  # Alignment of children along the cross axis: "start" | "center" | "end" | "between"
41
- justify: Var[LiteralJustify]
42
+ justify: Var[Responsive[LiteralJustify]]
42
43
 
43
44
  # Gap between children: "0" - "9"
44
- spacing: Var[LiteralSpacing]
45
+ spacing: Var[Responsive[LiteralSpacing]]
45
46
 
46
47
  # Gap between children horizontal: "0" - "9"
47
- spacing_x: Var[LiteralSpacing]
48
+ spacing_x: Var[Responsive[LiteralSpacing]]
48
49
 
49
50
  # Gap between children vertical: "0" - "9"
50
- spacing_y: Var[LiteralSpacing]
51
+ spacing_y: Var[Responsive[LiteralSpacing]]
51
52
 
52
53
  # Reflex maps the "spacing" prop to "gap" prop.
53
54
  _rename_props: Dict[str, str] = {