reflex 0.6.8a2__py3-none-any.whl → 0.7.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 (154) 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 +2 -2
  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 +244 -109
  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 +35 -6
  15. reflex/components/base/bare.py +1 -1
  16. reflex/components/base/error_boundary.py +2 -1
  17. reflex/components/base/error_boundary.pyi +2 -1
  18. reflex/components/base/meta.py +2 -2
  19. reflex/components/base/strict_mode.py +10 -0
  20. reflex/components/base/strict_mode.pyi +57 -0
  21. reflex/components/component.py +38 -77
  22. reflex/components/core/banner.py +83 -4
  23. reflex/components/core/banner.pyi +86 -0
  24. reflex/components/core/breakpoints.py +3 -1
  25. reflex/components/core/client_side_routing.py +1 -1
  26. reflex/components/core/client_side_routing.pyi +1 -1
  27. reflex/components/core/cond.py +9 -10
  28. reflex/components/core/debounce.py +1 -1
  29. reflex/components/core/foreach.py +23 -3
  30. reflex/components/core/html.py +1 -1
  31. reflex/components/core/match.py +5 -5
  32. reflex/components/core/sticky.py +160 -0
  33. reflex/components/core/sticky.pyi +449 -0
  34. reflex/components/core/upload.py +2 -2
  35. reflex/components/datadisplay/code.py +5 -14
  36. reflex/components/datadisplay/dataeditor.py +7 -4
  37. reflex/components/datadisplay/logo.py +13 -8
  38. reflex/components/datadisplay/shiki_code_block.py +14 -9
  39. reflex/components/dynamic.py +22 -3
  40. reflex/components/el/constants/reflex.py +1 -1
  41. reflex/components/el/element.py +1 -1
  42. reflex/components/el/elements/forms.py +4 -4
  43. reflex/components/el/elements/forms.pyi +4 -4
  44. reflex/components/lucide/icon.py +46 -8
  45. reflex/components/lucide/icon.pyi +54 -0
  46. reflex/components/markdown/markdown.py +10 -8
  47. reflex/components/moment/moment.py +2 -2
  48. reflex/components/next/image.py +16 -4
  49. reflex/components/next/image.pyi +4 -2
  50. reflex/components/next/link.py +1 -1
  51. reflex/components/plotly/plotly.py +5 -5
  52. reflex/components/props.py +3 -3
  53. reflex/components/radix/__init__.pyi +1 -1
  54. reflex/components/radix/primitives/accordion.py +9 -5
  55. reflex/components/radix/primitives/accordion.pyi +3 -1
  56. reflex/components/radix/primitives/drawer.py +5 -2
  57. reflex/components/radix/primitives/drawer.pyi +4 -4
  58. reflex/components/radix/primitives/form.pyi +6 -6
  59. reflex/components/radix/primitives/progress.py +1 -1
  60. reflex/components/radix/primitives/slider.py +1 -1
  61. reflex/components/radix/themes/color_mode.py +11 -9
  62. reflex/components/radix/themes/components/alert_dialog.py +3 -0
  63. reflex/components/radix/themes/components/card.py +1 -1
  64. reflex/components/radix/themes/components/card.pyi +1 -1
  65. reflex/components/radix/themes/components/context_menu.py +5 -0
  66. reflex/components/radix/themes/components/dialog.py +3 -0
  67. reflex/components/radix/themes/components/dropdown_menu.py +5 -0
  68. reflex/components/radix/themes/components/hover_card.py +3 -0
  69. reflex/components/radix/themes/components/icon_button.py +2 -2
  70. reflex/components/radix/themes/components/icon_button.pyi +1 -0
  71. reflex/components/radix/themes/components/popover.py +3 -0
  72. reflex/components/radix/themes/components/radio_cards.py +2 -0
  73. reflex/components/radix/themes/components/radio_group.py +1 -1
  74. reflex/components/radix/themes/components/select.py +3 -0
  75. reflex/components/radix/themes/components/tabs.py +3 -0
  76. reflex/components/radix/themes/components/text_area.py +12 -0
  77. reflex/components/radix/themes/components/text_area.pyi +2 -0
  78. reflex/components/radix/themes/components/text_field.py +1 -1
  79. reflex/components/radix/themes/components/tooltip.py +3 -1
  80. reflex/components/radix/themes/components/tooltip.pyi +1 -0
  81. reflex/components/radix/themes/layout/__init__.pyi +1 -1
  82. reflex/components/radix/themes/layout/list.py +2 -2
  83. reflex/components/radix/themes/layout/stack.py +2 -2
  84. reflex/components/radix/themes/typography/link.py +1 -1
  85. reflex/components/radix/themes/typography/text.py +2 -2
  86. reflex/components/react_player/react_player.py +1 -1
  87. reflex/components/recharts/__init__.py +2 -0
  88. reflex/components/recharts/__init__.pyi +2 -0
  89. reflex/components/recharts/charts.py +15 -15
  90. reflex/components/recharts/general.py +19 -4
  91. reflex/components/recharts/general.pyi +55 -4
  92. reflex/components/recharts/polar.py +2 -2
  93. reflex/components/recharts/recharts.py +4 -4
  94. reflex/components/sonner/toast.py +15 -13
  95. reflex/components/sonner/toast.pyi +6 -6
  96. reflex/components/suneditor/editor.py +6 -4
  97. reflex/components/suneditor/editor.pyi +2 -2
  98. reflex/components/tags/iter_tag.py +3 -3
  99. reflex/components/tags/tag.py +25 -3
  100. reflex/config.py +48 -15
  101. reflex/constants/__init__.py +1 -0
  102. reflex/constants/base.py +4 -1
  103. reflex/constants/compiler.py +5 -2
  104. reflex/constants/config.py +8 -1
  105. reflex/constants/installer.py +9 -9
  106. reflex/constants/style.py +1 -1
  107. reflex/custom_components/custom_components.py +9 -7
  108. reflex/event.py +130 -161
  109. reflex/experimental/__init__.py +19 -11
  110. reflex/experimental/client_state.py +53 -28
  111. reflex/experimental/hooks.py +5 -5
  112. reflex/experimental/layout.py +8 -5
  113. reflex/experimental/layout.pyi +1 -1
  114. reflex/experimental/misc.py +3 -3
  115. reflex/istate/wrappers.py +1 -1
  116. reflex/middleware/hydrate_middleware.py +2 -2
  117. reflex/model.py +11 -6
  118. reflex/page.py +3 -3
  119. reflex/reflex.py +90 -19
  120. reflex/route.py +1 -1
  121. reflex/state.py +358 -401
  122. reflex/style.py +27 -3
  123. reflex/testing.py +29 -23
  124. reflex/utils/build.py +6 -2
  125. reflex/utils/codespaces.py +1 -4
  126. reflex/utils/compat.py +6 -5
  127. reflex/utils/console.py +52 -16
  128. reflex/utils/exceptions.py +76 -26
  129. reflex/utils/exec.py +69 -74
  130. reflex/utils/export.py +6 -1
  131. reflex/utils/format.py +7 -39
  132. reflex/utils/imports.py +2 -2
  133. reflex/utils/lazy_loader.py +7 -1
  134. reflex/utils/path_ops.py +28 -14
  135. reflex/utils/prerequisites.py +324 -65
  136. reflex/utils/processes.py +45 -32
  137. reflex/utils/pyi_generator.py +30 -25
  138. reflex/utils/registry.py +4 -4
  139. reflex/utils/serializers.py +1 -1
  140. reflex/utils/telemetry.py +5 -4
  141. reflex/utils/types.py +42 -18
  142. reflex/vars/base.py +650 -333
  143. reflex/vars/datetime.py +6 -7
  144. reflex/vars/dep_tracking.py +344 -0
  145. reflex/vars/function.py +11 -5
  146. reflex/vars/number.py +31 -43
  147. reflex/vars/object.py +63 -62
  148. reflex/vars/sequence.py +79 -67
  149. {reflex-0.6.8a2.dist-info → reflex-0.7.0a1.dist-info}/METADATA +7 -8
  150. {reflex-0.6.8a2.dist-info → reflex-0.7.0a1.dist-info}/RECORD +153 -149
  151. {reflex-0.6.8a2.dist-info → reflex-0.7.0a1.dist-info}/WHEEL +1 -1
  152. reflex/experimental/assets.py +0 -37
  153. {reflex-0.6.8a2.dist-info → reflex-0.7.0a1.dist-info}/LICENSE +0 -0
  154. {reflex-0.6.8a2.dist-info → reflex-0.7.0a1.dist-info}/entry_points.txt +0 -0
@@ -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,160 @@
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, cond
6
+ from reflex.components.core.responsive import tablet_and_desktop
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.experimental.client_state import ClientStateVar
11
+ from reflex.style import Style
12
+ from reflex.vars.base import Var, VarData
13
+
14
+
15
+ class StickyLogo(Svg):
16
+ """A simple Reflex logo SVG with only the letter R."""
17
+
18
+ @classmethod
19
+ def create(cls):
20
+ """Create the simple Reflex logo SVG.
21
+
22
+ Returns:
23
+ The simple Reflex logo SVG.
24
+ """
25
+ return super().create(
26
+ Rect.create(width="16", height="16", rx="2", fill="#6E56CF"),
27
+ Path.create(d="M10 9V13H12V9H10Z", fill="white"),
28
+ Path.create(d="M4 3V13H6V9H10V7H6V5H10V7H12V3H4Z", fill="white"),
29
+ width="16",
30
+ height="16",
31
+ viewBox="0 0 16 16",
32
+ xmlns="http://www.w3.org/2000/svg",
33
+ )
34
+
35
+ def add_style(self):
36
+ """Add the style to the component.
37
+
38
+ Returns:
39
+ The style of the component.
40
+ """
41
+ return Style(
42
+ {
43
+ "fill": "white",
44
+ }
45
+ )
46
+
47
+
48
+ class StickyLabel(Text):
49
+ """A label that displays the Reflex sticky."""
50
+
51
+ @classmethod
52
+ def create(cls):
53
+ """Create the sticky label.
54
+
55
+ Returns:
56
+ The sticky label.
57
+ """
58
+ return super().create("Built with Reflex")
59
+
60
+ def add_style(self):
61
+ """Add the style to the component.
62
+
63
+ Returns:
64
+ The style of the component.
65
+ """
66
+ return Style(
67
+ {
68
+ "color": color("slate", 1),
69
+ "font_weight": "600",
70
+ "font_family": "'Instrument Sans', sans-serif",
71
+ "font_size": "0.875rem",
72
+ "line_height": "1rem",
73
+ "letter_spacing": "-0.00656rem",
74
+ }
75
+ )
76
+
77
+
78
+ class StickyBadge(A):
79
+ """A badge that displays the Reflex sticky logo."""
80
+
81
+ @classmethod
82
+ def create(cls):
83
+ """Create the sticky badge.
84
+
85
+ Returns:
86
+ The sticky badge.
87
+ """
88
+ return super().create(
89
+ StickyLogo.create(),
90
+ tablet_and_desktop(StickyLabel.create()),
91
+ href="https://reflex.dev",
92
+ target="_blank",
93
+ width="auto",
94
+ padding="0.375rem",
95
+ align="center",
96
+ text_align="center",
97
+ )
98
+
99
+ def add_style(self):
100
+ """Add the style to the component.
101
+
102
+ Returns:
103
+ The style of the component.
104
+ """
105
+ is_localhost_cs = ClientStateVar.create(
106
+ "is_localhost",
107
+ default=True,
108
+ global_ref=False,
109
+ )
110
+ localhost_hostnames = Var.create(
111
+ ["localhost", "127.0.0.1", "[::1]"]
112
+ ).guess_type()
113
+ is_localhost_expr = localhost_hostnames.contains(
114
+ Var("window.location.hostname", _var_type=str).guess_type(),
115
+ )
116
+ check_is_localhost = Var(
117
+ f"useEffect(({is_localhost_cs}) => {is_localhost_cs.set}({is_localhost_expr}), [])",
118
+ _var_data=VarData(
119
+ imports={"react": "useEffect"},
120
+ ),
121
+ )
122
+ is_localhost = is_localhost_cs.value._replace(
123
+ merge_var_data=VarData.merge(
124
+ check_is_localhost._get_all_var_data(),
125
+ VarData(hooks={str(check_is_localhost): None}),
126
+ ),
127
+ )
128
+ return Style(
129
+ {
130
+ "position": "fixed",
131
+ "bottom": "1rem",
132
+ "right": "1rem",
133
+ # Do not show the badge on localhost.
134
+ "display": cond(is_localhost, "none", "flex"),
135
+ "flex-direction": "row",
136
+ "gap": "0.375rem",
137
+ "align-items": "center",
138
+ "width": "auto",
139
+ "border-radius": "0.5rem",
140
+ "color": color_mode_cond("#E5E7EB", "#27282B"),
141
+ "border": color_mode_cond("1px solid #27282B", "1px solid #E5E7EB"),
142
+ "background-color": color_mode_cond("#151618", "#FCFCFD"),
143
+ "padding": "0.375rem",
144
+ "transition": "background-color 0.2s ease-in-out",
145
+ "box-shadow": "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
146
+ "z-index": "9998",
147
+ "cursor": "pointer",
148
+ },
149
+ )
150
+
151
+
152
+ class StickyNamespace(ComponentNamespace):
153
+ """Sticky components namespace."""
154
+
155
+ __call__ = staticmethod(StickyBadge.create)
156
+ label = staticmethod(StickyLabel.create)
157
+ logo = staticmethod(StickyLogo.create)
158
+
159
+
160
+ 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 BASE_STATE, 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[[], BASE_STATE]] = None,
57
+ on_click: Optional[EventType[[], BASE_STATE]] = None,
58
+ on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
59
+ on_double_click: Optional[EventType[[], BASE_STATE]] = None,
60
+ on_focus: Optional[EventType[[], BASE_STATE]] = None,
61
+ on_mount: Optional[EventType[[], BASE_STATE]] = None,
62
+ on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
63
+ on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
64
+ on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
65
+ on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
66
+ on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
67
+ on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
68
+ on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
69
+ on_scroll: Optional[EventType[[], BASE_STATE]] = None,
70
+ on_unmount: Optional[EventType[[], BASE_STATE]] = 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[[], BASE_STATE]] = None,
279
+ on_click: Optional[EventType[[], BASE_STATE]] = None,
280
+ on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
281
+ on_double_click: Optional[EventType[[], BASE_STATE]] = None,
282
+ on_focus: Optional[EventType[[], BASE_STATE]] = None,
283
+ on_mount: Optional[EventType[[], BASE_STATE]] = None,
284
+ on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
285
+ on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
286
+ on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
287
+ on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
288
+ on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
289
+ on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
290
+ on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
291
+ on_scroll: Optional[EventType[[], BASE_STATE]] = None,
292
+ on_unmount: Optional[EventType[[], BASE_STATE]] = 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[[], BASE_STATE]] = None,
352
+ on_click: Optional[EventType[[], BASE_STATE]] = None,
353
+ on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
354
+ on_double_click: Optional[EventType[[], BASE_STATE]] = None,
355
+ on_focus: Optional[EventType[[], BASE_STATE]] = None,
356
+ on_mount: Optional[EventType[[], BASE_STATE]] = None,
357
+ on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
358
+ on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
359
+ on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
360
+ on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
361
+ on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
362
+ on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
363
+ on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
364
+ on_scroll: Optional[EventType[[], BASE_STATE]] = None,
365
+ on_unmount: Optional[EventType[[], BASE_STATE]] = 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[[], BASE_STATE]] = None,
426
+ on_click: Optional[EventType[[], BASE_STATE]] = None,
427
+ on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
428
+ on_double_click: Optional[EventType[[], BASE_STATE]] = None,
429
+ on_focus: Optional[EventType[[], BASE_STATE]] = None,
430
+ on_mount: Optional[EventType[[], BASE_STATE]] = None,
431
+ on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
432
+ on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
433
+ on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
434
+ on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
435
+ on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
436
+ on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
437
+ on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
438
+ on_scroll: Optional[EventType[[], BASE_STATE]] = None,
439
+ on_unmount: Optional[EventType[[], BASE_STATE]] = None,
440
+ **props,
441
+ ) -> "StickyBadge":
442
+ """Create the sticky badge.
443
+
444
+ Returns:
445
+ The sticky badge.
446
+ """
447
+ ...
448
+
449
+ sticky = StickyNamespace()
@@ -192,7 +192,7 @@ class GhostUpload(Fragment):
192
192
  class Upload(MemoizationLeaf):
193
193
  """A file upload component."""
194
194
 
195
- library = "react-dropzone@14.2.10"
195
+ library = "react-dropzone@14.3.5"
196
196
 
197
197
  tag = ""
198
198
 
@@ -269,7 +269,7 @@ class Upload(MemoizationLeaf):
269
269
  on_drop = upload_props["on_drop"]
270
270
  if isinstance(on_drop, Callable):
271
271
  # Call the lambda to get the event chain.
272
- on_drop = call_event_fn(on_drop, _on_drop_spec) # type: ignore
272
+ on_drop = call_event_fn(on_drop, _on_drop_spec)
273
273
  if isinstance(on_drop, EventSpec):
274
274
  # Update the provided args for direct use with on_drop.
275
275
  on_drop = on_drop.with_args(