reflex 0.6.8a1__py3-none-any.whl → 0.7.0__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 (248) hide show
  1. reflex/.templates/jinja/custom_components/pyproject.toml.jinja2 +1 -1
  2. reflex/.templates/jinja/web/pages/_app.js.jinja2 +7 -7
  3. reflex/.templates/jinja/web/pages/utils.js.jinja2 +3 -3
  4. reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +1 -4
  5. reflex/.templates/web/utils/state.js +65 -36
  6. reflex/__init__.py +4 -17
  7. reflex/__init__.pyi +1 -2
  8. reflex/app.py +286 -135
  9. reflex/app_mixins/lifespan.py +9 -9
  10. reflex/app_mixins/middleware.py +6 -6
  11. reflex/app_module_for_backend.py +3 -7
  12. reflex/base.py +7 -7
  13. reflex/compiler/compiler.py +8 -0
  14. reflex/compiler/utils.py +57 -18
  15. reflex/components/base/app_wrap.pyi +16 -16
  16. reflex/components/base/bare.py +1 -1
  17. reflex/components/base/body.pyi +16 -16
  18. reflex/components/base/document.pyi +76 -76
  19. reflex/components/base/error_boundary.py +2 -1
  20. reflex/components/base/error_boundary.pyi +19 -22
  21. reflex/components/base/fragment.pyi +16 -16
  22. reflex/components/base/head.pyi +31 -31
  23. reflex/components/base/link.pyi +31 -31
  24. reflex/components/base/meta.py +2 -2
  25. reflex/components/base/meta.pyi +61 -61
  26. reflex/components/base/script.pyi +19 -19
  27. reflex/components/base/strict_mode.py +10 -0
  28. reflex/components/base/strict_mode.pyi +57 -0
  29. reflex/components/component.py +38 -77
  30. reflex/components/core/banner.py +159 -4
  31. reflex/components/core/banner.pyi +162 -76
  32. reflex/components/core/breakpoints.py +3 -1
  33. reflex/components/core/client_side_routing.py +1 -1
  34. reflex/components/core/client_side_routing.pyi +32 -32
  35. reflex/components/core/clipboard.pyi +17 -20
  36. reflex/components/core/cond.py +9 -10
  37. reflex/components/core/debounce.py +1 -1
  38. reflex/components/core/debounce.pyi +17 -17
  39. reflex/components/core/foreach.py +28 -3
  40. reflex/components/core/html.py +1 -1
  41. reflex/components/core/html.pyi +16 -16
  42. reflex/components/core/match.py +5 -5
  43. reflex/components/core/sticky.py +134 -0
  44. reflex/components/core/sticky.pyi +449 -0
  45. reflex/components/core/upload.py +2 -2
  46. reflex/components/core/upload.pyi +80 -88
  47. reflex/components/datadisplay/code.py +5 -14
  48. reflex/components/datadisplay/code.pyi +31 -31
  49. reflex/components/datadisplay/dataeditor.py +7 -4
  50. reflex/components/datadisplay/dataeditor.pyi +40 -54
  51. reflex/components/datadisplay/logo.py +13 -8
  52. reflex/components/datadisplay/shiki_code_block.py +14 -9
  53. reflex/components/datadisplay/shiki_code_block.pyi +46 -46
  54. reflex/components/dynamic.py +22 -3
  55. reflex/components/el/constants/reflex.py +1 -1
  56. reflex/components/el/element.py +1 -1
  57. reflex/components/el/element.pyi +16 -16
  58. reflex/components/el/elements/base.pyi +16 -16
  59. reflex/components/el/elements/forms.py +4 -4
  60. reflex/components/el/elements/forms.pyi +224 -258
  61. reflex/components/el/elements/inline.pyi +421 -421
  62. reflex/components/el/elements/media.pyi +376 -376
  63. reflex/components/el/elements/metadata.pyi +91 -91
  64. reflex/components/el/elements/other.pyi +106 -106
  65. reflex/components/el/elements/scripts.pyi +46 -46
  66. reflex/components/el/elements/sectioning.pyi +226 -226
  67. reflex/components/el/elements/tables.pyi +151 -151
  68. reflex/components/el/elements/typography.pyi +226 -226
  69. reflex/components/gridjs/datatable.pyi +31 -31
  70. reflex/components/lucide/icon.py +46 -8
  71. reflex/components/lucide/icon.pyi +85 -31
  72. reflex/components/markdown/markdown.py +10 -8
  73. reflex/components/markdown/markdown.pyi +16 -16
  74. reflex/components/moment/moment.py +2 -2
  75. reflex/components/moment/moment.pyi +17 -19
  76. reflex/components/next/base.pyi +16 -16
  77. reflex/components/next/image.py +16 -4
  78. reflex/components/next/image.pyi +22 -20
  79. reflex/components/next/link.py +1 -1
  80. reflex/components/next/link.pyi +16 -16
  81. reflex/components/next/video.pyi +16 -16
  82. reflex/components/plotly/__init__.py +29 -2
  83. reflex/components/plotly/plotly.py +240 -5
  84. reflex/components/plotly/plotly.pyi +799 -44
  85. reflex/components/props.py +3 -3
  86. reflex/components/radix/__init__.pyi +1 -1
  87. reflex/components/radix/primitives/accordion.py +9 -5
  88. reflex/components/radix/primitives/accordion.pyi +110 -108
  89. reflex/components/radix/primitives/base.pyi +31 -31
  90. reflex/components/radix/primitives/drawer.py +5 -2
  91. reflex/components/radix/primitives/drawer.pyi +179 -187
  92. reflex/components/radix/primitives/form.pyi +160 -172
  93. reflex/components/radix/primitives/progress.py +1 -1
  94. reflex/components/radix/primitives/progress.pyi +76 -76
  95. reflex/components/radix/primitives/slider.py +1 -1
  96. reflex/components/radix/primitives/slider.pyi +78 -82
  97. reflex/components/radix/themes/base.pyi +121 -121
  98. reflex/components/radix/themes/color_mode.py +11 -9
  99. reflex/components/radix/themes/color_mode.pyi +47 -49
  100. reflex/components/radix/themes/components/alert_dialog.py +3 -0
  101. reflex/components/radix/themes/components/alert_dialog.pyi +110 -112
  102. reflex/components/radix/themes/components/aspect_ratio.pyi +16 -16
  103. reflex/components/radix/themes/components/avatar.pyi +16 -16
  104. reflex/components/radix/themes/components/badge.pyi +16 -16
  105. reflex/components/radix/themes/components/button.pyi +16 -16
  106. reflex/components/radix/themes/components/callout.pyi +76 -76
  107. reflex/components/radix/themes/components/card.py +1 -1
  108. reflex/components/radix/themes/components/card.pyi +17 -17
  109. reflex/components/radix/themes/components/checkbox.pyi +49 -55
  110. reflex/components/radix/themes/components/checkbox_cards.pyi +31 -31
  111. reflex/components/radix/themes/components/checkbox_group.pyi +31 -31
  112. reflex/components/radix/themes/components/context_menu.py +5 -0
  113. reflex/components/radix/themes/components/context_menu.pyi +149 -155
  114. reflex/components/radix/themes/components/data_list.pyi +61 -61
  115. reflex/components/radix/themes/components/dialog.py +3 -0
  116. reflex/components/radix/themes/components/dialog.pyi +113 -117
  117. reflex/components/radix/themes/components/dropdown_menu.py +5 -0
  118. reflex/components/radix/themes/components/dropdown_menu.pyi +133 -137
  119. reflex/components/radix/themes/components/hover_card.py +3 -0
  120. reflex/components/radix/themes/components/hover_card.pyi +63 -67
  121. reflex/components/radix/themes/components/icon_button.py +2 -2
  122. reflex/components/radix/themes/components/icon_button.pyi +17 -16
  123. reflex/components/radix/themes/components/inset.pyi +16 -16
  124. reflex/components/radix/themes/components/popover.py +3 -0
  125. reflex/components/radix/themes/components/popover.pyi +68 -70
  126. reflex/components/radix/themes/components/progress.pyi +16 -16
  127. reflex/components/radix/themes/components/radio.pyi +16 -16
  128. reflex/components/radix/themes/components/radio_cards.py +2 -0
  129. reflex/components/radix/themes/components/radio_cards.pyi +32 -34
  130. reflex/components/radix/themes/components/radio_group.py +1 -1
  131. reflex/components/radix/themes/components/radio_group.pyi +62 -64
  132. reflex/components/radix/themes/components/scroll_area.pyi +16 -16
  133. reflex/components/radix/themes/components/segmented_control.pyi +32 -35
  134. reflex/components/radix/themes/components/select.py +4 -0
  135. reflex/components/radix/themes/components/select.pyi +145 -157
  136. reflex/components/radix/themes/components/separator.pyi +16 -16
  137. reflex/components/radix/themes/components/skeleton.py +3 -0
  138. reflex/components/radix/themes/components/skeleton.pyi +16 -16
  139. reflex/components/radix/themes/components/slider.pyi +22 -28
  140. reflex/components/radix/themes/components/spinner.pyi +16 -16
  141. reflex/components/radix/themes/components/switch.pyi +17 -19
  142. reflex/components/radix/themes/components/table.pyi +106 -106
  143. reflex/components/radix/themes/components/tabs.py +3 -0
  144. reflex/components/radix/themes/components/tabs.pyi +78 -82
  145. reflex/components/radix/themes/components/text_area.py +12 -0
  146. reflex/components/radix/themes/components/text_area.pyi +21 -33
  147. reflex/components/radix/themes/components/text_field.py +1 -1
  148. reflex/components/radix/themes/components/text_field.pyi +52 -80
  149. reflex/components/radix/themes/components/tooltip.py +6 -1
  150. reflex/components/radix/themes/components/tooltip.pyi +20 -21
  151. reflex/components/radix/themes/layout/__init__.pyi +1 -1
  152. reflex/components/radix/themes/layout/base.pyi +16 -16
  153. reflex/components/radix/themes/layout/box.pyi +16 -16
  154. reflex/components/radix/themes/layout/center.pyi +16 -16
  155. reflex/components/radix/themes/layout/container.pyi +16 -16
  156. reflex/components/radix/themes/layout/flex.pyi +16 -16
  157. reflex/components/radix/themes/layout/grid.pyi +16 -16
  158. reflex/components/radix/themes/layout/list.py +2 -2
  159. reflex/components/radix/themes/layout/list.pyi +76 -76
  160. reflex/components/radix/themes/layout/section.pyi +16 -16
  161. reflex/components/radix/themes/layout/spacer.pyi +16 -16
  162. reflex/components/radix/themes/layout/stack.py +2 -2
  163. reflex/components/radix/themes/layout/stack.pyi +46 -46
  164. reflex/components/radix/themes/typography/blockquote.pyi +16 -16
  165. reflex/components/radix/themes/typography/code.pyi +16 -16
  166. reflex/components/radix/themes/typography/heading.pyi +16 -16
  167. reflex/components/radix/themes/typography/link.py +1 -1
  168. reflex/components/radix/themes/typography/link.pyi +16 -16
  169. reflex/components/radix/themes/typography/text.py +2 -2
  170. reflex/components/radix/themes/typography/text.pyi +106 -106
  171. reflex/components/react_player/audio.pyi +33 -39
  172. reflex/components/react_player/react_player.py +1 -1
  173. reflex/components/react_player/react_player.pyi +32 -38
  174. reflex/components/react_player/video.pyi +33 -39
  175. reflex/components/recharts/__init__.py +2 -0
  176. reflex/components/recharts/__init__.pyi +2 -0
  177. reflex/components/recharts/cartesian.pyi +282 -282
  178. reflex/components/recharts/charts.py +15 -15
  179. reflex/components/recharts/charts.pyi +164 -164
  180. reflex/components/recharts/general.py +19 -4
  181. reflex/components/recharts/general.pyi +132 -81
  182. reflex/components/recharts/polar.py +2 -2
  183. reflex/components/recharts/polar.pyi +55 -55
  184. reflex/components/recharts/recharts.py +4 -4
  185. reflex/components/recharts/recharts.pyi +31 -31
  186. reflex/components/sonner/toast.py +15 -13
  187. reflex/components/sonner/toast.pyi +22 -22
  188. reflex/components/suneditor/editor.py +6 -4
  189. reflex/components/suneditor/editor.pyi +26 -40
  190. reflex/components/tags/iter_tag.py +3 -3
  191. reflex/components/tags/tag.py +25 -3
  192. reflex/config.py +48 -20
  193. reflex/constants/__init__.py +1 -0
  194. reflex/constants/base.py +4 -1
  195. reflex/constants/compiler.py +5 -2
  196. reflex/constants/config.py +8 -1
  197. reflex/constants/installer.py +9 -9
  198. reflex/constants/style.py +1 -1
  199. reflex/custom_components/custom_components.py +18 -10
  200. reflex/event.py +228 -233
  201. reflex/experimental/__init__.py +19 -11
  202. reflex/experimental/client_state.py +53 -28
  203. reflex/experimental/hooks.py +5 -5
  204. reflex/experimental/layout.py +8 -5
  205. reflex/experimental/layout.pyi +79 -83
  206. reflex/experimental/misc.py +3 -3
  207. reflex/istate/wrappers.py +1 -1
  208. reflex/middleware/hydrate_middleware.py +2 -2
  209. reflex/model.py +11 -6
  210. reflex/page.py +5 -5
  211. reflex/reflex.py +104 -26
  212. reflex/route.py +1 -1
  213. reflex/state.py +358 -401
  214. reflex/style.py +27 -3
  215. reflex/testing.py +34 -39
  216. reflex/utils/build.py +6 -2
  217. reflex/utils/codespaces.py +1 -4
  218. reflex/utils/compat.py +6 -5
  219. reflex/utils/console.py +71 -21
  220. reflex/utils/exceptions.py +89 -26
  221. reflex/utils/exec.py +69 -74
  222. reflex/utils/export.py +6 -1
  223. reflex/utils/format.py +8 -40
  224. reflex/utils/imports.py +5 -2
  225. reflex/utils/lazy_loader.py +7 -1
  226. reflex/utils/path_ops.py +74 -14
  227. reflex/utils/prerequisites.py +345 -68
  228. reflex/utils/processes.py +45 -32
  229. reflex/utils/pyi_generator.py +39 -33
  230. reflex/utils/registry.py +4 -4
  231. reflex/utils/serializers.py +1 -1
  232. reflex/utils/telemetry.py +5 -4
  233. reflex/utils/types.py +42 -18
  234. reflex/vars/base.py +695 -330
  235. reflex/vars/datetime.py +6 -7
  236. reflex/vars/dep_tracking.py +344 -0
  237. reflex/vars/function.py +11 -5
  238. reflex/vars/number.py +31 -43
  239. reflex/vars/object.py +74 -64
  240. reflex/vars/sequence.py +79 -67
  241. {reflex-0.6.8a1.dist-info → reflex-0.7.0.dist-info}/METADATA +7 -10
  242. reflex-0.7.0.dist-info/RECORD +401 -0
  243. {reflex-0.6.8a1.dist-info → reflex-0.7.0.dist-info}/WHEEL +1 -1
  244. reflex/experimental/assets.py +0 -37
  245. reflex/proxy.py +0 -119
  246. reflex-0.6.8a1.dist-info/RECORD +0 -398
  247. {reflex-0.6.8a1.dist-info → reflex-0.7.0.dist-info}/LICENSE +0 -0
  248. {reflex-0.6.8a1.dist-info → reflex-0.7.0.dist-info}/entry_points.txt +0 -0
@@ -14,7 +14,7 @@ class Html(Div):
14
14
  """
15
15
 
16
16
  # The HTML to render.
17
- dangerouslySetInnerHTML: Var[Dict[str, str]]
17
+ dangerouslySetInnerHTML: Var[Dict[str, str]] # noqa: N815
18
18
 
19
19
  @classmethod
20
20
  def create(cls, *children, **props):
@@ -6,7 +6,7 @@
6
6
  from typing import Any, Dict, Optional, Union, overload
7
7
 
8
8
  from reflex.components.el.elements.typography import Div
9
- from reflex.event import BASE_STATE, EventType
9
+ from reflex.event import EventType
10
10
  from reflex.style import Style
11
11
  from reflex.vars.base import Var
12
12
 
@@ -49,21 +49,21 @@ class Html(Div):
49
49
  class_name: Optional[Any] = None,
50
50
  autofocus: Optional[bool] = None,
51
51
  custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
52
- on_blur: Optional[EventType[[], BASE_STATE]] = None,
53
- on_click: Optional[EventType[[], BASE_STATE]] = None,
54
- on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
55
- on_double_click: Optional[EventType[[], BASE_STATE]] = None,
56
- on_focus: Optional[EventType[[], BASE_STATE]] = None,
57
- on_mount: Optional[EventType[[], BASE_STATE]] = None,
58
- on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
59
- on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
60
- on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
61
- on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
62
- on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
63
- on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
64
- on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
65
- on_scroll: Optional[EventType[[], BASE_STATE]] = None,
66
- on_unmount: Optional[EventType[[], BASE_STATE]] = None,
52
+ on_blur: Optional[EventType[()]] = None,
53
+ on_click: Optional[EventType[()]] = None,
54
+ on_context_menu: Optional[EventType[()]] = None,
55
+ on_double_click: Optional[EventType[()]] = None,
56
+ on_focus: Optional[EventType[()]] = None,
57
+ on_mount: Optional[EventType[()]] = None,
58
+ on_mouse_down: Optional[EventType[()]] = None,
59
+ on_mouse_enter: Optional[EventType[()]] = None,
60
+ on_mouse_leave: Optional[EventType[()]] = None,
61
+ on_mouse_move: Optional[EventType[()]] = None,
62
+ on_mouse_out: Optional[EventType[()]] = None,
63
+ on_mouse_over: Optional[EventType[()]] = None,
64
+ on_mouse_up: Optional[EventType[()]] = None,
65
+ on_scroll: Optional[EventType[()]] = None,
66
+ on_unmount: Optional[EventType[()]] = None,
67
67
  **props,
68
68
  ) -> "Html":
69
69
  """Create a html component.
@@ -109,7 +109,7 @@ class Match(MemoizationLeaf):
109
109
  return cases, default
110
110
 
111
111
  @classmethod
112
- def _create_case_var_with_var_data(cls, case_element):
112
+ def _create_case_var_with_var_data(cls, case_element: Any) -> Var:
113
113
  """Convert a case element into a Var.If the case
114
114
  is a Style type, we extract the var data and merge it with the
115
115
  newly created Var.
@@ -222,7 +222,7 @@ class Match(MemoizationLeaf):
222
222
  cond=match_cond_var,
223
223
  match_cases=match_cases,
224
224
  default=default,
225
- children=[case[-1] for case in match_cases] + [default], # type: ignore
225
+ children=[case[-1] for case in match_cases] + [default], # pyright: ignore [reportArgumentType]
226
226
  )
227
227
  )
228
228
 
@@ -236,13 +236,13 @@ class Match(MemoizationLeaf):
236
236
  _js_expr=format.format_match(
237
237
  cond=str(match_cond_var),
238
238
  match_cases=match_cases,
239
- default=default, # type: ignore
239
+ default=default, # pyright: ignore [reportArgumentType]
240
240
  ),
241
- _var_type=default._var_type, # type: ignore
241
+ _var_type=default._var_type, # pyright: ignore [reportAttributeAccessIssue,reportOptionalMemberAccess]
242
242
  _var_data=VarData.merge(
243
243
  match_cond_var._get_all_var_data(),
244
244
  *[el._get_all_var_data() for case in match_cases for el in case],
245
- default._get_all_var_data(), # type: ignore
245
+ default._get_all_var_data(), # pyright: ignore [reportAttributeAccessIssue, reportOptionalMemberAccess]
246
246
  ),
247
247
  )
248
248
 
@@ -0,0 +1,134 @@
1
+ """Components for displaying the Reflex sticky logo."""
2
+
3
+ from reflex.components.component import ComponentNamespace
4
+ from reflex.components.core.colors import color
5
+ from reflex.components.core.cond import color_mode_cond
6
+ from reflex.components.core.responsive import desktop_only
7
+ from reflex.components.el.elements.inline import A
8
+ from reflex.components.el.elements.media import Path, Rect, Svg
9
+ from reflex.components.radix.themes.typography.text import Text
10
+ from reflex.style import Style
11
+
12
+
13
+ class StickyLogo(Svg):
14
+ """A simple Reflex logo SVG with only the letter R."""
15
+
16
+ @classmethod
17
+ def create(cls):
18
+ """Create the simple Reflex logo SVG.
19
+
20
+ Returns:
21
+ The simple Reflex logo SVG.
22
+ """
23
+ return super().create(
24
+ Rect.create(width="16", height="16", rx="2", fill="#6E56CF"),
25
+ Path.create(d="M10 9V13H12V9H10Z", fill="white"),
26
+ Path.create(d="M4 3V13H6V9H10V7H6V5H10V7H12V3H4Z", fill="white"),
27
+ width="16",
28
+ height="16",
29
+ viewBox="0 0 16 16",
30
+ xmlns="http://www.w3.org/2000/svg",
31
+ )
32
+
33
+ def add_style(self):
34
+ """Add the style to the component.
35
+
36
+ Returns:
37
+ The style of the component.
38
+ """
39
+ return Style(
40
+ {
41
+ "fill": "white",
42
+ }
43
+ )
44
+
45
+
46
+ class StickyLabel(Text):
47
+ """A label that displays the Reflex sticky."""
48
+
49
+ @classmethod
50
+ def create(cls):
51
+ """Create the sticky label.
52
+
53
+ Returns:
54
+ The sticky label.
55
+ """
56
+ return super().create("Built with Reflex")
57
+
58
+ def add_style(self):
59
+ """Add the style to the component.
60
+
61
+ Returns:
62
+ The style of the component.
63
+ """
64
+ return Style(
65
+ {
66
+ "color": color("slate", 1),
67
+ "font_weight": "600",
68
+ "font_family": "'Instrument Sans', sans-serif",
69
+ "font_size": "0.875rem",
70
+ "line_height": "1rem",
71
+ "letter_spacing": "-0.00656rem",
72
+ }
73
+ )
74
+
75
+
76
+ class StickyBadge(A):
77
+ """A badge that displays the Reflex sticky logo."""
78
+
79
+ @classmethod
80
+ def create(cls):
81
+ """Create the sticky badge.
82
+
83
+ Returns:
84
+ The sticky badge.
85
+ """
86
+ return super().create(
87
+ StickyLogo.create(),
88
+ desktop_only(StickyLabel.create()),
89
+ href="https://reflex.dev",
90
+ target="_blank",
91
+ width="auto",
92
+ padding="0.375rem",
93
+ align="center",
94
+ text_align="center",
95
+ )
96
+
97
+ def add_style(self):
98
+ """Add the style to the component.
99
+
100
+ Returns:
101
+ The style of the component.
102
+ """
103
+ return Style(
104
+ {
105
+ "position": "fixed",
106
+ "bottom": "1rem",
107
+ "right": "1rem",
108
+ "display": "flex",
109
+ "flex-direction": "row",
110
+ "gap": "0.375rem",
111
+ "align-items": "center",
112
+ "width": "auto",
113
+ "border-radius": "0.5rem",
114
+ "color": color_mode_cond("#E5E7EB", "#27282B"),
115
+ "border": color_mode_cond("1px solid #27282B", "1px solid #E5E7EB"),
116
+ "background-color": color_mode_cond("#151618", "#FCFCFD"),
117
+ "padding": "0.375rem",
118
+ "transition": "background-color 0.2s ease-in-out",
119
+ "box-shadow": "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
120
+ "z-index": "9998",
121
+ "cursor": "pointer",
122
+ },
123
+ )
124
+
125
+
126
+ class StickyNamespace(ComponentNamespace):
127
+ """Sticky components namespace."""
128
+
129
+ __call__ = staticmethod(StickyBadge.create)
130
+ label = staticmethod(StickyLabel.create)
131
+ logo = staticmethod(StickyLogo.create)
132
+
133
+
134
+ sticky = StickyNamespace()
@@ -0,0 +1,449 @@
1
+ """Stub file for reflex/components/core/sticky.py"""
2
+
3
+ # ------------------- DO NOT EDIT ----------------------
4
+ # This file was generated by `reflex/utils/pyi_generator.py`!
5
+ # ------------------------------------------------------
6
+ from typing import Any, Dict, Literal, Optional, Union, overload
7
+
8
+ from reflex.components.component import ComponentNamespace
9
+ from reflex.components.core.breakpoints import Breakpoints
10
+ from reflex.components.el.elements.inline import A
11
+ from reflex.components.el.elements.media import Svg
12
+ from reflex.components.radix.themes.typography.text import Text
13
+ from reflex.event import EventType
14
+ from reflex.style import Style
15
+ from reflex.vars.base import Var
16
+
17
+ class StickyLogo(Svg):
18
+ @overload
19
+ @classmethod
20
+ def create( # type: ignore
21
+ cls,
22
+ *children,
23
+ width: Optional[Union[Var[Union[int, str]], int, str]] = None,
24
+ height: Optional[Union[Var[Union[int, str]], int, str]] = None,
25
+ xmlns: Optional[Union[Var[str], str]] = None,
26
+ access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
27
+ auto_capitalize: Optional[
28
+ Union[Var[Union[bool, int, str]], bool, int, str]
29
+ ] = None,
30
+ content_editable: Optional[
31
+ Union[Var[Union[bool, int, str]], bool, int, str]
32
+ ] = None,
33
+ context_menu: Optional[
34
+ Union[Var[Union[bool, int, str]], bool, int, str]
35
+ ] = None,
36
+ dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
37
+ draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
38
+ enter_key_hint: Optional[
39
+ Union[Var[Union[bool, int, str]], bool, int, str]
40
+ ] = None,
41
+ hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
42
+ input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
43
+ item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
44
+ lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
45
+ role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
46
+ slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
47
+ spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
48
+ tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
49
+ title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
50
+ style: Optional[Style] = None,
51
+ key: Optional[Any] = None,
52
+ id: Optional[Any] = None,
53
+ class_name: Optional[Any] = None,
54
+ autofocus: Optional[bool] = None,
55
+ custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
56
+ on_blur: Optional[EventType[()]] = None,
57
+ on_click: Optional[EventType[()]] = None,
58
+ on_context_menu: Optional[EventType[()]] = None,
59
+ on_double_click: Optional[EventType[()]] = None,
60
+ on_focus: Optional[EventType[()]] = None,
61
+ on_mount: Optional[EventType[()]] = None,
62
+ on_mouse_down: Optional[EventType[()]] = None,
63
+ on_mouse_enter: Optional[EventType[()]] = None,
64
+ on_mouse_leave: Optional[EventType[()]] = None,
65
+ on_mouse_move: Optional[EventType[()]] = None,
66
+ on_mouse_out: Optional[EventType[()]] = None,
67
+ on_mouse_over: Optional[EventType[()]] = None,
68
+ on_mouse_up: Optional[EventType[()]] = None,
69
+ on_scroll: Optional[EventType[()]] = None,
70
+ on_unmount: Optional[EventType[()]] = None,
71
+ **props,
72
+ ) -> "StickyLogo":
73
+ """Create the simple Reflex logo SVG.
74
+
75
+ Returns:
76
+ The simple Reflex logo SVG.
77
+ """
78
+ ...
79
+
80
+ def add_style(self): ...
81
+
82
+ class StickyLabel(Text):
83
+ @overload
84
+ @classmethod
85
+ def create( # type: ignore
86
+ cls,
87
+ *children,
88
+ as_child: Optional[Union[Var[bool], bool]] = None,
89
+ as_: Optional[
90
+ Union[
91
+ Literal[
92
+ "abbr",
93
+ "b",
94
+ "cite",
95
+ "del",
96
+ "div",
97
+ "em",
98
+ "i",
99
+ "ins",
100
+ "kbd",
101
+ "label",
102
+ "mark",
103
+ "p",
104
+ "s",
105
+ "samp",
106
+ "span",
107
+ "sub",
108
+ "sup",
109
+ "u",
110
+ ],
111
+ Var[
112
+ Literal[
113
+ "abbr",
114
+ "b",
115
+ "cite",
116
+ "del",
117
+ "div",
118
+ "em",
119
+ "i",
120
+ "ins",
121
+ "kbd",
122
+ "label",
123
+ "mark",
124
+ "p",
125
+ "s",
126
+ "samp",
127
+ "span",
128
+ "sub",
129
+ "sup",
130
+ "u",
131
+ ]
132
+ ],
133
+ ]
134
+ ] = None,
135
+ size: Optional[
136
+ Union[
137
+ Breakpoints[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
138
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
139
+ Var[
140
+ Union[
141
+ Breakpoints[
142
+ str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
143
+ ],
144
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
145
+ ]
146
+ ],
147
+ ]
148
+ ] = None,
149
+ weight: Optional[
150
+ Union[
151
+ Breakpoints[str, Literal["bold", "light", "medium", "regular"]],
152
+ Literal["bold", "light", "medium", "regular"],
153
+ Var[
154
+ Union[
155
+ Breakpoints[str, Literal["bold", "light", "medium", "regular"]],
156
+ Literal["bold", "light", "medium", "regular"],
157
+ ]
158
+ ],
159
+ ]
160
+ ] = None,
161
+ align: Optional[
162
+ Union[
163
+ Breakpoints[str, Literal["center", "left", "right"]],
164
+ Literal["center", "left", "right"],
165
+ Var[
166
+ Union[
167
+ Breakpoints[str, Literal["center", "left", "right"]],
168
+ Literal["center", "left", "right"],
169
+ ]
170
+ ],
171
+ ]
172
+ ] = None,
173
+ trim: Optional[
174
+ Union[
175
+ Breakpoints[str, Literal["both", "end", "normal", "start"]],
176
+ Literal["both", "end", "normal", "start"],
177
+ Var[
178
+ Union[
179
+ Breakpoints[str, Literal["both", "end", "normal", "start"]],
180
+ Literal["both", "end", "normal", "start"],
181
+ ]
182
+ ],
183
+ ]
184
+ ] = None,
185
+ color_scheme: Optional[
186
+ Union[
187
+ Literal[
188
+ "amber",
189
+ "blue",
190
+ "bronze",
191
+ "brown",
192
+ "crimson",
193
+ "cyan",
194
+ "gold",
195
+ "grass",
196
+ "gray",
197
+ "green",
198
+ "indigo",
199
+ "iris",
200
+ "jade",
201
+ "lime",
202
+ "mint",
203
+ "orange",
204
+ "pink",
205
+ "plum",
206
+ "purple",
207
+ "red",
208
+ "ruby",
209
+ "sky",
210
+ "teal",
211
+ "tomato",
212
+ "violet",
213
+ "yellow",
214
+ ],
215
+ Var[
216
+ Literal[
217
+ "amber",
218
+ "blue",
219
+ "bronze",
220
+ "brown",
221
+ "crimson",
222
+ "cyan",
223
+ "gold",
224
+ "grass",
225
+ "gray",
226
+ "green",
227
+ "indigo",
228
+ "iris",
229
+ "jade",
230
+ "lime",
231
+ "mint",
232
+ "orange",
233
+ "pink",
234
+ "plum",
235
+ "purple",
236
+ "red",
237
+ "ruby",
238
+ "sky",
239
+ "teal",
240
+ "tomato",
241
+ "violet",
242
+ "yellow",
243
+ ]
244
+ ],
245
+ ]
246
+ ] = None,
247
+ high_contrast: Optional[Union[Var[bool], bool]] = None,
248
+ access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
249
+ auto_capitalize: Optional[
250
+ Union[Var[Union[bool, int, str]], bool, int, str]
251
+ ] = None,
252
+ content_editable: Optional[
253
+ Union[Var[Union[bool, int, str]], bool, int, str]
254
+ ] = None,
255
+ context_menu: Optional[
256
+ Union[Var[Union[bool, int, str]], bool, int, str]
257
+ ] = None,
258
+ dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
259
+ draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
260
+ enter_key_hint: Optional[
261
+ Union[Var[Union[bool, int, str]], bool, int, str]
262
+ ] = None,
263
+ hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
264
+ input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
265
+ item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
266
+ lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
267
+ role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
268
+ slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
269
+ spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
270
+ tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
271
+ title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
272
+ style: Optional[Style] = None,
273
+ key: Optional[Any] = None,
274
+ id: Optional[Any] = None,
275
+ class_name: Optional[Any] = None,
276
+ autofocus: Optional[bool] = None,
277
+ custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
278
+ on_blur: Optional[EventType[()]] = None,
279
+ on_click: Optional[EventType[()]] = None,
280
+ on_context_menu: Optional[EventType[()]] = None,
281
+ on_double_click: Optional[EventType[()]] = None,
282
+ on_focus: Optional[EventType[()]] = None,
283
+ on_mount: Optional[EventType[()]] = None,
284
+ on_mouse_down: Optional[EventType[()]] = None,
285
+ on_mouse_enter: Optional[EventType[()]] = None,
286
+ on_mouse_leave: Optional[EventType[()]] = None,
287
+ on_mouse_move: Optional[EventType[()]] = None,
288
+ on_mouse_out: Optional[EventType[()]] = None,
289
+ on_mouse_over: Optional[EventType[()]] = None,
290
+ on_mouse_up: Optional[EventType[()]] = None,
291
+ on_scroll: Optional[EventType[()]] = None,
292
+ on_unmount: Optional[EventType[()]] = None,
293
+ **props,
294
+ ) -> "StickyLabel":
295
+ """Create the sticky label.
296
+
297
+ Returns:
298
+ The sticky label.
299
+ """
300
+ ...
301
+
302
+ def add_style(self): ...
303
+
304
+ class StickyBadge(A):
305
+ @overload
306
+ @classmethod
307
+ def create( # type: ignore
308
+ cls,
309
+ *children,
310
+ download: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
311
+ href: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
312
+ href_lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
313
+ media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
314
+ ping: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
315
+ referrer_policy: Optional[
316
+ Union[Var[Union[bool, int, str]], bool, int, str]
317
+ ] = None,
318
+ rel: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
319
+ shape: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
320
+ target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
321
+ access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
322
+ auto_capitalize: Optional[
323
+ Union[Var[Union[bool, int, str]], bool, int, str]
324
+ ] = None,
325
+ content_editable: Optional[
326
+ Union[Var[Union[bool, int, str]], bool, int, str]
327
+ ] = None,
328
+ context_menu: Optional[
329
+ Union[Var[Union[bool, int, str]], bool, int, str]
330
+ ] = None,
331
+ dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
332
+ draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
333
+ enter_key_hint: Optional[
334
+ Union[Var[Union[bool, int, str]], bool, int, str]
335
+ ] = None,
336
+ hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
337
+ input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
338
+ item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
339
+ lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
340
+ role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
341
+ slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
342
+ spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
343
+ tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
344
+ title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
345
+ style: Optional[Style] = None,
346
+ key: Optional[Any] = None,
347
+ id: Optional[Any] = None,
348
+ class_name: Optional[Any] = None,
349
+ autofocus: Optional[bool] = None,
350
+ custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
351
+ on_blur: Optional[EventType[()]] = None,
352
+ on_click: Optional[EventType[()]] = None,
353
+ on_context_menu: Optional[EventType[()]] = None,
354
+ on_double_click: Optional[EventType[()]] = None,
355
+ on_focus: Optional[EventType[()]] = None,
356
+ on_mount: Optional[EventType[()]] = None,
357
+ on_mouse_down: Optional[EventType[()]] = None,
358
+ on_mouse_enter: Optional[EventType[()]] = None,
359
+ on_mouse_leave: Optional[EventType[()]] = None,
360
+ on_mouse_move: Optional[EventType[()]] = None,
361
+ on_mouse_out: Optional[EventType[()]] = None,
362
+ on_mouse_over: Optional[EventType[()]] = None,
363
+ on_mouse_up: Optional[EventType[()]] = None,
364
+ on_scroll: Optional[EventType[()]] = None,
365
+ on_unmount: Optional[EventType[()]] = None,
366
+ **props,
367
+ ) -> "StickyBadge":
368
+ """Create the sticky badge.
369
+
370
+ Returns:
371
+ The sticky badge.
372
+ """
373
+ ...
374
+
375
+ def add_style(self): ...
376
+
377
+ class StickyNamespace(ComponentNamespace):
378
+ label = staticmethod(StickyLabel.create)
379
+ logo = staticmethod(StickyLogo.create)
380
+
381
+ @staticmethod
382
+ def __call__(
383
+ *children,
384
+ download: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
385
+ href: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
386
+ href_lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
387
+ media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
388
+ ping: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
389
+ referrer_policy: Optional[
390
+ Union[Var[Union[bool, int, str]], bool, int, str]
391
+ ] = None,
392
+ rel: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
393
+ shape: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
394
+ target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
395
+ access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
396
+ auto_capitalize: Optional[
397
+ Union[Var[Union[bool, int, str]], bool, int, str]
398
+ ] = None,
399
+ content_editable: Optional[
400
+ Union[Var[Union[bool, int, str]], bool, int, str]
401
+ ] = None,
402
+ context_menu: Optional[
403
+ Union[Var[Union[bool, int, str]], bool, int, str]
404
+ ] = None,
405
+ dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
406
+ draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
407
+ enter_key_hint: Optional[
408
+ Union[Var[Union[bool, int, str]], bool, int, str]
409
+ ] = None,
410
+ hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
411
+ input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
412
+ item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
413
+ lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
414
+ role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
415
+ slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
416
+ spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
417
+ tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
418
+ title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
419
+ style: Optional[Style] = None,
420
+ key: Optional[Any] = None,
421
+ id: Optional[Any] = None,
422
+ class_name: Optional[Any] = None,
423
+ autofocus: Optional[bool] = None,
424
+ custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
425
+ on_blur: Optional[EventType[()]] = None,
426
+ on_click: Optional[EventType[()]] = None,
427
+ on_context_menu: Optional[EventType[()]] = None,
428
+ on_double_click: Optional[EventType[()]] = None,
429
+ on_focus: Optional[EventType[()]] = None,
430
+ on_mount: Optional[EventType[()]] = None,
431
+ on_mouse_down: Optional[EventType[()]] = None,
432
+ on_mouse_enter: Optional[EventType[()]] = None,
433
+ on_mouse_leave: Optional[EventType[()]] = None,
434
+ on_mouse_move: Optional[EventType[()]] = None,
435
+ on_mouse_out: Optional[EventType[()]] = None,
436
+ on_mouse_over: Optional[EventType[()]] = None,
437
+ on_mouse_up: Optional[EventType[()]] = None,
438
+ on_scroll: Optional[EventType[()]] = None,
439
+ on_unmount: Optional[EventType[()]] = None,
440
+ **props,
441
+ ) -> "StickyBadge":
442
+ """Create the sticky badge.
443
+
444
+ Returns:
445
+ The sticky badge.
446
+ """
447
+ ...
448
+
449
+ sticky = StickyNamespace()