reflex 0.6.5a1__py3-none-any.whl → 0.6.5a2__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.

@@ -5,6 +5,7 @@ from __future__ import annotations
5
5
  from pathlib import Path
6
6
  from typing import Any, Callable, ClassVar, Dict, List, Optional, Tuple
7
7
 
8
+ from reflex.components.base.fragment import Fragment
8
9
  from reflex.components.component import (
9
10
  Component,
10
11
  ComponentNamespace,
@@ -181,6 +182,13 @@ class UploadFilesProvider(Component):
181
182
  tag = "UploadFilesProvider"
182
183
 
183
184
 
185
+ class GhostUpload(Fragment):
186
+ """A ghost upload component."""
187
+
188
+ # Fired when files are dropped.
189
+ on_drop: EventHandler[_on_drop_spec]
190
+
191
+
184
192
  class Upload(MemoizationLeaf):
185
193
  """A file upload component."""
186
194
 
@@ -276,8 +284,8 @@ class Upload(MemoizationLeaf):
276
284
  root_props_unique_name = get_unique_variable_name()
277
285
 
278
286
  event_var, callback_str = StatefulComponent._get_memoized_event_triggers(
279
- Box.create(on_click=upload_props["on_drop"]) # type: ignore
280
- )["on_click"]
287
+ GhostUpload.create(on_drop=upload_props["on_drop"])
288
+ )["on_drop"]
281
289
 
282
290
  upload_props["on_drop"] = event_var
283
291
 
@@ -6,6 +6,7 @@
6
6
  from pathlib import Path
7
7
  from typing import Any, ClassVar, Dict, List, Optional, Union, overload
8
8
 
9
+ from reflex.components.base.fragment import Fragment
9
10
  from reflex.components.component import Component, ComponentNamespace, MemoizationLeaf
10
11
  from reflex.constants import Dirs
11
12
  from reflex.event import BASE_STATE, CallableEventSpec, EventSpec, EventType
@@ -84,6 +85,56 @@ class UploadFilesProvider(Component):
84
85
  """
85
86
  ...
86
87
 
88
+ class GhostUpload(Fragment):
89
+ @overload
90
+ @classmethod
91
+ def create( # type: ignore
92
+ cls,
93
+ *children,
94
+ style: Optional[Style] = None,
95
+ key: Optional[Any] = None,
96
+ id: Optional[Any] = None,
97
+ class_name: Optional[Any] = None,
98
+ autofocus: Optional[bool] = None,
99
+ custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
100
+ on_blur: Optional[EventType[[], BASE_STATE]] = None,
101
+ on_click: Optional[EventType[[], BASE_STATE]] = None,
102
+ on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
103
+ on_double_click: Optional[EventType[[], BASE_STATE]] = None,
104
+ on_drop: Optional[
105
+ Union[EventType[[], BASE_STATE], EventType[[Any], BASE_STATE]]
106
+ ] = None,
107
+ on_focus: Optional[EventType[[], BASE_STATE]] = None,
108
+ on_mount: Optional[EventType[[], BASE_STATE]] = None,
109
+ on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
110
+ on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
111
+ on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
112
+ on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
113
+ on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
114
+ on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
115
+ on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
116
+ on_scroll: Optional[EventType[[], BASE_STATE]] = None,
117
+ on_unmount: Optional[EventType[[], BASE_STATE]] = None,
118
+ **props,
119
+ ) -> "GhostUpload":
120
+ """Create the component.
121
+
122
+ Args:
123
+ *children: The children of the component.
124
+ on_drop: Fired when files are dropped.
125
+ style: The style of the component.
126
+ key: A unique key for the component.
127
+ id: The id for the component.
128
+ class_name: The class name for the component.
129
+ autofocus: Whether the component should take the focus once the page is loaded
130
+ custom_attrs: custom attribute
131
+ **props: The props of the component.
132
+
133
+ Returns:
134
+ The component.
135
+ """
136
+ ...
137
+
87
138
  class Upload(MemoizationLeaf):
88
139
  is_used: ClassVar[bool] = False
89
140
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: reflex
3
- Version: 0.6.5a1
3
+ Version: 0.6.5a2
4
4
  Summary: Web apps in pure Python.
5
5
  Home-page: https://reflex.dev
6
6
  License: Apache-2.0
@@ -93,8 +93,8 @@ reflex/components/core/html.pyi,sha256=VPpzNa7VORqu1IDQae4NbHXsCFzo2mELV8kIdCveN
93
93
  reflex/components/core/layout/__init__.py,sha256=znldZaj_NGt8qCZDG70GMwjMTskcvCf_2N_EjCAHwdc,30
94
94
  reflex/components/core/match.py,sha256=xhzO8LHl99Gd6yoPJ-UFZsPqilHwZJ7SWJmhly5_exE,9102
95
95
  reflex/components/core/responsive.py,sha256=ACZdtJ4a4F8B3dm1k8h6J2_UJx0Z5LDB7XHQ2ty4wAc,1911
96
- reflex/components/core/upload.py,sha256=NQg4bAD7eEMEjBQdA8cowYavExSfF7gY4vCuaN3shS8,11673
97
- reflex/components/core/upload.pyi,sha256=a1gu_G01irhgaPsBMY4Z8putbH7_zqDUOz3yw3nKaWc,13936
96
+ reflex/components/core/upload.py,sha256=0tjo86GXSLdJlwyEc0LcstIlHg99k9OG_o4dQjsEhcU,11861
97
+ reflex/components/core/upload.pyi,sha256=nzfugMkqXgOhlvTMhCCQl6t36oJ-NOUuS0Xz6G6xNqo,16115
98
98
  reflex/components/datadisplay/__init__.py,sha256=L8pWWKNHWdUD2fbZRoEKjd_8c_hpDdGYO463hwkoIi4,438
99
99
  reflex/components/datadisplay/__init__.pyi,sha256=rYMwO_X4NvUex6IL2MMTnhdFRp8Lz5zweMwXaW_l7nc,588
100
100
  reflex/components/datadisplay/code.py,sha256=apunYV9nuExEzSq2yhF6D26_6lwplqrUQXOBSZ1ic1I,14117
@@ -387,8 +387,8 @@ reflex/vars/function.py,sha256=1E-yBhP3sOTVmVotSA6S8PY2c63yl0DJvr0oZh7j2bg,6854
387
387
  reflex/vars/number.py,sha256=BeHQr4Cj2gdXekEWcxSzLTIuRAC3sf6YvsdHlADETpQ,27499
388
388
  reflex/vars/object.py,sha256=dTfkkUGDmoxu7iPcKSnNJ-lTI48yoXbagUyA-lKwDDo,14335
389
389
  reflex/vars/sequence.py,sha256=mlmOkSV8FIxwdJHzQdu3NzHAoNB4KcGc93dcmdviIoo,49916
390
- reflex-0.6.5a1.dist-info/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
391
- reflex-0.6.5a1.dist-info/METADATA,sha256=gccguwJAix5W7cgsUi8HVPL0oSoFcX7FOM5fal6ptwE,12057
392
- reflex-0.6.5a1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
393
- reflex-0.6.5a1.dist-info/entry_points.txt,sha256=H1Z5Yat_xJfy0dRT1Frk2PkO_p41Xy7fCKlj4FcdL9o,44
394
- reflex-0.6.5a1.dist-info/RECORD,,
390
+ reflex-0.6.5a2.dist-info/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
391
+ reflex-0.6.5a2.dist-info/METADATA,sha256=AjUUppCnktkGtTa-GXRNNpA0fQjJNkFxSWkmIEeK7MY,12057
392
+ reflex-0.6.5a2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
393
+ reflex-0.6.5a2.dist-info/entry_points.txt,sha256=H1Z5Yat_xJfy0dRT1Frk2PkO_p41Xy7fCKlj4FcdL9o,44
394
+ reflex-0.6.5a2.dist-info/RECORD,,