reflex 0.5.9.dev1__py3-none-any.whl → 0.5.10a1__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 (169) hide show
  1. reflex/.templates/web/utils/client_side_routing.js +6 -1
  2. reflex/__init__.py +21 -2
  3. reflex/__init__.pyi +0 -1
  4. reflex/app.py +1 -1
  5. reflex/components/__init__.py +0 -1
  6. reflex/components/__init__.pyi +0 -1
  7. reflex/components/markdown/markdown.py +1 -1
  8. reflex/components/recharts/cartesian.py +3 -0
  9. reflex/components/recharts/cartesian.pyi +2 -0
  10. reflex/components/sonner/toast.py +27 -1
  11. reflex/components/sonner/toast.pyi +5 -0
  12. reflex/constants/base.py +2 -0
  13. reflex/constants/installer.py +2 -0
  14. reflex/experimental/hooks.py +1 -1
  15. reflex/reflex.py +0 -15
  16. reflex/state.py +22 -22
  17. reflex/testing.py +8 -3
  18. reflex/utils/prerequisites.py +16 -115
  19. reflex/utils/registry.py +48 -0
  20. reflex/utils/types.py +1 -1
  21. reflex/vars.py +4 -2
  22. {reflex-0.5.9.dev1.dist-info → reflex-0.5.10a1.dist-info}/METADATA +2 -1
  23. {reflex-0.5.9.dev1.dist-info → reflex-0.5.10a1.dist-info}/RECORD +26 -168
  24. reflex/components/chakra/__init__.py +0 -204
  25. reflex/components/chakra/base.py +0 -210
  26. reflex/components/chakra/base.pyi +0 -319
  27. reflex/components/chakra/datadisplay/__init__.py +0 -10
  28. reflex/components/chakra/datadisplay/badge.py +0 -16
  29. reflex/components/chakra/datadisplay/badge.pyi +0 -96
  30. reflex/components/chakra/datadisplay/code.py +0 -11
  31. reflex/components/chakra/datadisplay/code.pyi +0 -87
  32. reflex/components/chakra/datadisplay/divider.py +0 -20
  33. reflex/components/chakra/datadisplay/divider.pyi +0 -100
  34. reflex/components/chakra/datadisplay/keyboard_key.py +0 -9
  35. reflex/components/chakra/datadisplay/keyboard_key.pyi +0 -87
  36. reflex/components/chakra/datadisplay/list.py +0 -60
  37. reflex/components/chakra/datadisplay/list.pyi +0 -339
  38. reflex/components/chakra/datadisplay/stat.py +0 -80
  39. reflex/components/chakra/datadisplay/stat.pyi +0 -477
  40. reflex/components/chakra/datadisplay/table.py +0 -305
  41. reflex/components/chakra/datadisplay/table.pyi +0 -737
  42. reflex/components/chakra/datadisplay/tag.py +0 -85
  43. reflex/components/chakra/datadisplay/tag.pyi +0 -433
  44. reflex/components/chakra/disclosure/__init__.py +0 -14
  45. reflex/components/chakra/disclosure/accordion.py +0 -110
  46. reflex/components/chakra/disclosure/accordion.pyi +0 -411
  47. reflex/components/chakra/disclosure/tabs.py +0 -117
  48. reflex/components/chakra/disclosure/tabs.pyi +0 -496
  49. reflex/components/chakra/disclosure/transition.py +0 -73
  50. reflex/components/chakra/disclosure/transition.pyi +0 -509
  51. reflex/components/chakra/disclosure/visuallyhidden.py +0 -9
  52. reflex/components/chakra/disclosure/visuallyhidden.pyi +0 -87
  53. reflex/components/chakra/feedback/__init__.py +0 -7
  54. reflex/components/chakra/feedback/alert.py +0 -68
  55. reflex/components/chakra/feedback/alert.pyi +0 -335
  56. reflex/components/chakra/feedback/circularprogress.py +0 -68
  57. reflex/components/chakra/feedback/circularprogress.pyi +0 -185
  58. reflex/components/chakra/feedback/progress.py +0 -33
  59. reflex/components/chakra/feedback/progress.pyi +0 -101
  60. reflex/components/chakra/feedback/skeleton.py +0 -70
  61. reflex/components/chakra/feedback/skeleton.pyi +0 -271
  62. reflex/components/chakra/feedback/spinner.py +0 -25
  63. reflex/components/chakra/feedback/spinner.pyi +0 -102
  64. reflex/components/chakra/forms/__init__.py +0 -49
  65. reflex/components/chakra/forms/button.py +0 -83
  66. reflex/components/chakra/forms/button.pyi +0 -262
  67. reflex/components/chakra/forms/checkbox.py +0 -77
  68. reflex/components/chakra/forms/checkbox.pyi +0 -247
  69. reflex/components/chakra/forms/colormodeswitch.py +0 -104
  70. reflex/components/chakra/forms/colormodeswitch.pyi +0 -473
  71. reflex/components/chakra/forms/date_picker.py +0 -11
  72. reflex/components/chakra/forms/date_picker.pyi +0 -129
  73. reflex/components/chakra/forms/date_time_picker.py +0 -11
  74. reflex/components/chakra/forms/date_time_picker.pyi +0 -129
  75. reflex/components/chakra/forms/editable.py +0 -67
  76. reflex/components/chakra/forms/editable.pyi +0 -343
  77. reflex/components/chakra/forms/email.py +0 -11
  78. reflex/components/chakra/forms/email.pyi +0 -129
  79. reflex/components/chakra/forms/form.py +0 -103
  80. reflex/components/chakra/forms/form.pyi +0 -484
  81. reflex/components/chakra/forms/iconbutton.py +0 -38
  82. reflex/components/chakra/forms/iconbutton.pyi +0 -108
  83. reflex/components/chakra/forms/input.py +0 -130
  84. reflex/components/chakra/forms/input.pyi +0 -566
  85. reflex/components/chakra/forms/multiselect.py +0 -355
  86. reflex/components/chakra/forms/numberinput.py +0 -128
  87. reflex/components/chakra/forms/numberinput.pyi +0 -442
  88. reflex/components/chakra/forms/password.py +0 -11
  89. reflex/components/chakra/forms/password.pyi +0 -129
  90. reflex/components/chakra/forms/pininput.py +0 -201
  91. reflex/components/chakra/forms/pininput.pyi +0 -215
  92. reflex/components/chakra/forms/radio.py +0 -101
  93. reflex/components/chakra/forms/radio.pyi +0 -197
  94. reflex/components/chakra/forms/rangeslider.py +0 -149
  95. reflex/components/chakra/forms/rangeslider.pyi +0 -354
  96. reflex/components/chakra/forms/select.py +0 -103
  97. reflex/components/chakra/forms/select.pyi +0 -204
  98. reflex/components/chakra/forms/slider.py +0 -130
  99. reflex/components/chakra/forms/slider.pyi +0 -449
  100. reflex/components/chakra/forms/switch.py +0 -49
  101. reflex/components/chakra/forms/switch.pyi +0 -159
  102. reflex/components/chakra/forms/textarea.py +0 -79
  103. reflex/components/chakra/forms/textarea.pyi +0 -123
  104. reflex/components/chakra/forms/time_picker.py +0 -11
  105. reflex/components/chakra/forms/time_picker.pyi +0 -129
  106. reflex/components/chakra/layout/__init__.py +0 -14
  107. reflex/components/chakra/layout/aspect_ratio.py +0 -13
  108. reflex/components/chakra/layout/aspect_ratio.pyi +0 -89
  109. reflex/components/chakra/layout/box.py +0 -31
  110. reflex/components/chakra/layout/box.pyi +0 -93
  111. reflex/components/chakra/layout/card.py +0 -100
  112. reflex/components/chakra/layout/card.pyi +0 -379
  113. reflex/components/chakra/layout/center.py +0 -21
  114. reflex/components/chakra/layout/center.pyi +0 -239
  115. reflex/components/chakra/layout/container.py +0 -13
  116. reflex/components/chakra/layout/container.pyi +0 -89
  117. reflex/components/chakra/layout/flex.py +0 -33
  118. reflex/components/chakra/layout/flex.pyi +0 -101
  119. reflex/components/chakra/layout/grid.py +0 -125
  120. reflex/components/chakra/layout/grid.pyi +0 -293
  121. reflex/components/chakra/layout/spacer.py +0 -9
  122. reflex/components/chakra/layout/spacer.pyi +0 -87
  123. reflex/components/chakra/layout/stack.py +0 -48
  124. reflex/components/chakra/layout/stack.pyi +0 -305
  125. reflex/components/chakra/layout/wrap.py +0 -57
  126. reflex/components/chakra/layout/wrap.pyi +0 -179
  127. reflex/components/chakra/media/__init__.py +0 -7
  128. reflex/components/chakra/media/avatar.py +0 -58
  129. reflex/components/chakra/media/avatar.pyi +0 -267
  130. reflex/components/chakra/media/icon.py +0 -111
  131. reflex/components/chakra/media/icon.pyi +0 -171
  132. reflex/components/chakra/media/image.py +0 -74
  133. reflex/components/chakra/media/image.pyi +0 -118
  134. reflex/components/chakra/navigation/__init__.py +0 -18
  135. reflex/components/chakra/navigation/breadcrumb.py +0 -98
  136. reflex/components/chakra/navigation/breadcrumb.pyi +0 -351
  137. reflex/components/chakra/navigation/link.py +0 -62
  138. reflex/components/chakra/navigation/link.pyi +0 -105
  139. reflex/components/chakra/navigation/linkoverlay.py +0 -22
  140. reflex/components/chakra/navigation/linkoverlay.pyi +0 -167
  141. reflex/components/chakra/navigation/stepper.py +0 -113
  142. reflex/components/chakra/navigation/stepper.pyi +0 -762
  143. reflex/components/chakra/overlay/__init__.py +0 -50
  144. reflex/components/chakra/overlay/alertdialog.py +0 -153
  145. reflex/components/chakra/overlay/alertdialog.pyi +0 -612
  146. reflex/components/chakra/overlay/drawer.py +0 -168
  147. reflex/components/chakra/overlay/drawer.pyi +0 -652
  148. reflex/components/chakra/overlay/menu.py +0 -225
  149. reflex/components/chakra/overlay/menu.pyi +0 -708
  150. reflex/components/chakra/overlay/modal.py +0 -166
  151. reflex/components/chakra/overlay/modal.pyi +0 -600
  152. reflex/components/chakra/overlay/popover.py +0 -183
  153. reflex/components/chakra/overlay/popover.pyi +0 -757
  154. reflex/components/chakra/overlay/tooltip.py +0 -70
  155. reflex/components/chakra/overlay/tooltip.pyi +0 -129
  156. reflex/components/chakra/typography/__init__.py +0 -10
  157. reflex/components/chakra/typography/heading.py +0 -16
  158. reflex/components/chakra/typography/heading.pyi +0 -96
  159. reflex/components/chakra/typography/highlight.py +0 -23
  160. reflex/components/chakra/typography/highlight.pyi +0 -91
  161. reflex/components/chakra/typography/span.py +0 -15
  162. reflex/components/chakra/typography/span.pyi +0 -89
  163. reflex/components/chakra/typography/text.py +0 -18
  164. reflex/components/chakra/typography/text.pyi +0 -91
  165. reflex/components/media/__init__.py +0 -1
  166. reflex/components/media/icon.py +0 -3
  167. {reflex-0.5.9.dev1.dist-info → reflex-0.5.10a1.dist-info}/LICENSE +0 -0
  168. {reflex-0.5.9.dev1.dist-info → reflex-0.5.10a1.dist-info}/WHEEL +0 -0
  169. {reflex-0.5.9.dev1.dist-info → reflex-0.5.10a1.dist-info}/entry_points.txt +0 -0
@@ -1,449 +0,0 @@
1
- """Stub file for reflex/components/chakra/forms/slider.py"""
2
-
3
- # ------------------- DO NOT EDIT ----------------------
4
- # This file was generated by `reflex/utils/pyi_generator.py`!
5
- # ------------------------------------------------------
6
- from typing import Any, Callable, Dict, Literal, Optional, Union, overload
7
-
8
- from reflex.components.chakra import ChakraComponent
9
- from reflex.event import EventHandler, EventSpec
10
- from reflex.style import Style
11
- from reflex.vars import BaseVar, Var
12
-
13
- LiteralLayout = Literal["horizontal", "vertical"]
14
-
15
- class Slider(ChakraComponent):
16
- @overload
17
- @classmethod
18
- def create( # type: ignore
19
- cls,
20
- *children,
21
- value: Optional[Union[Var[int], int]] = None,
22
- color_scheme: Optional[Union[Var[str], str]] = None,
23
- default_value: Optional[Union[Var[int], int]] = None,
24
- direction: Optional[
25
- Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]
26
- ] = None,
27
- focus_thumb_on_change: Optional[Union[Var[bool], bool]] = None,
28
- is_disabled: Optional[Union[Var[bool], bool]] = None,
29
- is_read_only: Optional[Union[Var[bool], bool]] = None,
30
- is_reversed: Optional[Union[Var[bool], bool]] = None,
31
- min_: Optional[Union[Var[int], int]] = None,
32
- max_: Optional[Union[Var[int], int]] = None,
33
- step: Optional[Union[Var[int], int]] = None,
34
- min_steps_between_thumbs: Optional[Union[Var[int], int]] = None,
35
- orientation: Optional[
36
- Union[
37
- Var[Literal["horizontal", "vertical"]],
38
- Literal["horizontal", "vertical"],
39
- ]
40
- ] = None,
41
- min_h: Optional[Union[Var[str], str]] = None,
42
- min_w: Optional[Union[Var[str], str]] = None,
43
- max_h: Optional[Union[Var[str], str]] = None,
44
- max_w: Optional[Union[Var[str], str]] = None,
45
- name: Optional[Union[Var[str], str]] = None,
46
- style: Optional[Style] = None,
47
- key: Optional[Any] = None,
48
- id: Optional[Any] = None,
49
- class_name: Optional[Any] = None,
50
- autofocus: Optional[bool] = None,
51
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
52
- on_blur: Optional[
53
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
54
- ] = None,
55
- on_change: Optional[
56
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
57
- ] = None,
58
- on_change_end: Optional[
59
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
60
- ] = None,
61
- on_change_start: Optional[
62
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
63
- ] = None,
64
- on_click: Optional[
65
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
66
- ] = None,
67
- on_context_menu: Optional[
68
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
69
- ] = None,
70
- on_double_click: Optional[
71
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
72
- ] = None,
73
- on_focus: Optional[
74
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
75
- ] = None,
76
- on_mount: Optional[
77
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
78
- ] = None,
79
- on_mouse_down: Optional[
80
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
81
- ] = None,
82
- on_mouse_enter: Optional[
83
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
84
- ] = None,
85
- on_mouse_leave: Optional[
86
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
87
- ] = None,
88
- on_mouse_move: Optional[
89
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
90
- ] = None,
91
- on_mouse_out: Optional[
92
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
93
- ] = None,
94
- on_mouse_over: Optional[
95
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
96
- ] = None,
97
- on_mouse_up: Optional[
98
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
99
- ] = None,
100
- on_scroll: Optional[
101
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
102
- ] = None,
103
- on_unmount: Optional[
104
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
105
- ] = None,
106
- **props,
107
- ) -> "Slider":
108
- """Create a slider component.
109
-
110
- If no children are provided, a default slider will be created.
111
-
112
- Args:
113
- *children: The children of the component.
114
- value: State var to bind the input.
115
- color_scheme: The color scheme.
116
- default_value: The placeholder text.
117
- direction: The writing mode ("ltr" | "rtl")
118
- focus_thumb_on_change: If false, the slider handle will not capture focus when value changes.
119
- is_disabled: If true, the slider will be disabled
120
- is_read_only: If true, the slider will be in `read-only` state.
121
- is_reversed: If true, the value will be incremented or decremented in reverse.
122
- min_: The minimum value of the slider.
123
- max_: The maximum value of the slider.
124
- step: The step in which increments/decrements have to be made
125
- min_steps_between_thumbs: The minimum distance between slider thumbs. Useful for preventing the thumbs from being too close together.
126
- orientation: Oreintation of the slider vertical | horizontal.
127
- min_h: Minimum height of the slider.
128
- min_w: Minimum width of the slider.
129
- max_h: Maximum height of the slider.
130
- max_w: Maximum width of the slider.
131
- name: The name of the form field
132
- style: The style of the component.
133
- key: A unique key for the component.
134
- id: The id for the component.
135
- class_name: The class name for the component.
136
- autofocus: Whether the component should take the focus once the page is loaded
137
- custom_attrs: custom attribute
138
- **props: The properties of the component.
139
-
140
- Returns:
141
- The slider component.
142
- """
143
- ...
144
-
145
- class SliderTrack(ChakraComponent):
146
- @overload
147
- @classmethod
148
- def create( # type: ignore
149
- cls,
150
- *children,
151
- style: Optional[Style] = None,
152
- key: Optional[Any] = None,
153
- id: Optional[Any] = None,
154
- class_name: Optional[Any] = None,
155
- autofocus: Optional[bool] = None,
156
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
157
- on_blur: Optional[
158
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
159
- ] = None,
160
- on_click: Optional[
161
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
162
- ] = None,
163
- on_context_menu: Optional[
164
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
165
- ] = None,
166
- on_double_click: Optional[
167
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
168
- ] = None,
169
- on_focus: Optional[
170
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
171
- ] = None,
172
- on_mount: Optional[
173
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
174
- ] = None,
175
- on_mouse_down: Optional[
176
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
177
- ] = None,
178
- on_mouse_enter: Optional[
179
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
180
- ] = None,
181
- on_mouse_leave: Optional[
182
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
183
- ] = None,
184
- on_mouse_move: Optional[
185
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
186
- ] = None,
187
- on_mouse_out: Optional[
188
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
189
- ] = None,
190
- on_mouse_over: Optional[
191
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
192
- ] = None,
193
- on_mouse_up: Optional[
194
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
195
- ] = None,
196
- on_scroll: Optional[
197
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
198
- ] = None,
199
- on_unmount: Optional[
200
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
201
- ] = None,
202
- **props,
203
- ) -> "SliderTrack":
204
- """Create the component.
205
-
206
- Args:
207
- *children: The children of the component.
208
- style: The style of the component.
209
- key: A unique key for the component.
210
- id: The id for the component.
211
- class_name: The class name for the component.
212
- autofocus: Whether the component should take the focus once the page is loaded
213
- custom_attrs: custom attribute
214
- **props: The props of the component.
215
-
216
- Returns:
217
- The component.
218
- """
219
- ...
220
-
221
- class SliderFilledTrack(ChakraComponent):
222
- @overload
223
- @classmethod
224
- def create( # type: ignore
225
- cls,
226
- *children,
227
- style: Optional[Style] = None,
228
- key: Optional[Any] = None,
229
- id: Optional[Any] = None,
230
- class_name: Optional[Any] = None,
231
- autofocus: Optional[bool] = None,
232
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
233
- on_blur: Optional[
234
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
235
- ] = None,
236
- on_click: Optional[
237
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
238
- ] = None,
239
- on_context_menu: Optional[
240
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
241
- ] = None,
242
- on_double_click: Optional[
243
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
244
- ] = None,
245
- on_focus: Optional[
246
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
247
- ] = None,
248
- on_mount: Optional[
249
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
250
- ] = None,
251
- on_mouse_down: Optional[
252
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
253
- ] = None,
254
- on_mouse_enter: Optional[
255
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
256
- ] = None,
257
- on_mouse_leave: Optional[
258
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
259
- ] = None,
260
- on_mouse_move: Optional[
261
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
262
- ] = None,
263
- on_mouse_out: Optional[
264
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
265
- ] = None,
266
- on_mouse_over: Optional[
267
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
268
- ] = None,
269
- on_mouse_up: Optional[
270
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
271
- ] = None,
272
- on_scroll: Optional[
273
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
274
- ] = None,
275
- on_unmount: Optional[
276
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
277
- ] = None,
278
- **props,
279
- ) -> "SliderFilledTrack":
280
- """Create the component.
281
-
282
- Args:
283
- *children: The children of the component.
284
- style: The style of the component.
285
- key: A unique key for the component.
286
- id: The id for the component.
287
- class_name: The class name for the component.
288
- autofocus: Whether the component should take the focus once the page is loaded
289
- custom_attrs: custom attribute
290
- **props: The props of the component.
291
-
292
- Returns:
293
- The component.
294
- """
295
- ...
296
-
297
- class SliderThumb(ChakraComponent):
298
- @overload
299
- @classmethod
300
- def create( # type: ignore
301
- cls,
302
- *children,
303
- box_size: Optional[Union[Var[str], str]] = None,
304
- style: Optional[Style] = None,
305
- key: Optional[Any] = None,
306
- id: Optional[Any] = None,
307
- class_name: Optional[Any] = None,
308
- autofocus: Optional[bool] = None,
309
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
310
- on_blur: Optional[
311
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
312
- ] = None,
313
- on_click: Optional[
314
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
315
- ] = None,
316
- on_context_menu: Optional[
317
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
318
- ] = None,
319
- on_double_click: Optional[
320
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
321
- ] = None,
322
- on_focus: Optional[
323
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
324
- ] = None,
325
- on_mount: Optional[
326
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
327
- ] = None,
328
- on_mouse_down: Optional[
329
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
330
- ] = None,
331
- on_mouse_enter: Optional[
332
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
333
- ] = None,
334
- on_mouse_leave: Optional[
335
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
336
- ] = None,
337
- on_mouse_move: Optional[
338
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
339
- ] = None,
340
- on_mouse_out: Optional[
341
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
342
- ] = None,
343
- on_mouse_over: Optional[
344
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
345
- ] = None,
346
- on_mouse_up: Optional[
347
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
348
- ] = None,
349
- on_scroll: Optional[
350
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
351
- ] = None,
352
- on_unmount: Optional[
353
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
354
- ] = None,
355
- **props,
356
- ) -> "SliderThumb":
357
- """Create the component.
358
-
359
- Args:
360
- *children: The children of the component.
361
- box_size: The size of the thumb.
362
- style: The style of the component.
363
- key: A unique key for the component.
364
- id: The id for the component.
365
- class_name: The class name for the component.
366
- autofocus: Whether the component should take the focus once the page is loaded
367
- custom_attrs: custom attribute
368
- **props: The props of the component.
369
-
370
- Returns:
371
- The component.
372
- """
373
- ...
374
-
375
- class SliderMark(ChakraComponent):
376
- @overload
377
- @classmethod
378
- def create( # type: ignore
379
- cls,
380
- *children,
381
- style: Optional[Style] = None,
382
- key: Optional[Any] = None,
383
- id: Optional[Any] = None,
384
- class_name: Optional[Any] = None,
385
- autofocus: Optional[bool] = None,
386
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
387
- on_blur: Optional[
388
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
389
- ] = None,
390
- on_click: Optional[
391
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
392
- ] = None,
393
- on_context_menu: Optional[
394
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
395
- ] = None,
396
- on_double_click: Optional[
397
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
398
- ] = None,
399
- on_focus: Optional[
400
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
401
- ] = None,
402
- on_mount: Optional[
403
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
404
- ] = None,
405
- on_mouse_down: Optional[
406
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
407
- ] = None,
408
- on_mouse_enter: Optional[
409
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
410
- ] = None,
411
- on_mouse_leave: Optional[
412
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
413
- ] = None,
414
- on_mouse_move: Optional[
415
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
416
- ] = None,
417
- on_mouse_out: Optional[
418
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
419
- ] = None,
420
- on_mouse_over: Optional[
421
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
422
- ] = None,
423
- on_mouse_up: Optional[
424
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
425
- ] = None,
426
- on_scroll: Optional[
427
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
428
- ] = None,
429
- on_unmount: Optional[
430
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
431
- ] = None,
432
- **props,
433
- ) -> "SliderMark":
434
- """Create the component.
435
-
436
- Args:
437
- *children: The children of the component.
438
- style: The style of the component.
439
- key: A unique key for the component.
440
- id: The id for the component.
441
- class_name: The class name for the component.
442
- autofocus: Whether the component should take the focus once the page is loaded
443
- custom_attrs: custom attribute
444
- **props: The props of the component.
445
-
446
- Returns:
447
- The component.
448
- """
449
- ...
@@ -1,49 +0,0 @@
1
- """A switch component."""
2
-
3
- from __future__ import annotations
4
-
5
- from reflex.components.chakra import ChakraComponent, LiteralColorScheme
6
- from reflex.event import EventHandler
7
- from reflex.vars import Var
8
-
9
-
10
- class Switch(ChakraComponent):
11
- """Toggleable switch component."""
12
-
13
- tag = "Switch"
14
-
15
- # If true, the switch will be checked. You'll need to set an on_change event handler to update its value (since it is now controlled)
16
- is_checked: Var[bool]
17
-
18
- # If true, the switch will be disabled
19
- is_disabled: Var[bool]
20
-
21
- # If true and is_disabled prop is set, the switch will remain tabbable but not interactive.
22
- is_focusable: Var[bool]
23
-
24
- # If true, the switch is marked as invalid. Changes style of unchecked state.
25
- is_invalid: Var[bool]
26
-
27
- # If true, the switch will be readonly
28
- is_read_only: Var[bool]
29
-
30
- # If true, the switch will be required
31
- is_required: Var[bool]
32
-
33
- # The name of the input field in a switch (Useful for form submission).
34
- name: Var[str]
35
-
36
- # The value of the input field when checked (use is_checked prop for a bool)
37
- value: Var[str] = Var.create(True) # type: ignore
38
-
39
- # The spacing between the switch and its label text (0.5rem)
40
- spacing: Var[str]
41
-
42
- # The placeholder text.
43
- placeholder: Var[str]
44
-
45
- # The color scheme of the switch (e.g. "blue", "green", "red", etc.)
46
- color_scheme: Var[LiteralColorScheme]
47
-
48
- # Fired when the switch value changes
49
- on_change: EventHandler[lambda e0: [e0.target.checked]]
@@ -1,159 +0,0 @@
1
- """Stub file for reflex/components/chakra/forms/switch.py"""
2
-
3
- # ------------------- DO NOT EDIT ----------------------
4
- # This file was generated by `reflex/utils/pyi_generator.py`!
5
- # ------------------------------------------------------
6
- from typing import Any, Callable, Dict, Literal, Optional, Union, overload
7
-
8
- from reflex.components.chakra import ChakraComponent
9
- from reflex.event import EventHandler, EventSpec
10
- from reflex.style import Style
11
- from reflex.vars import BaseVar, Var
12
-
13
- class Switch(ChakraComponent):
14
- @overload
15
- @classmethod
16
- def create( # type: ignore
17
- cls,
18
- *children,
19
- is_checked: Optional[Union[Var[bool], bool]] = None,
20
- is_disabled: Optional[Union[Var[bool], bool]] = None,
21
- is_focusable: Optional[Union[Var[bool], bool]] = None,
22
- is_invalid: Optional[Union[Var[bool], bool]] = None,
23
- is_read_only: Optional[Union[Var[bool], bool]] = None,
24
- is_required: Optional[Union[Var[bool], bool]] = None,
25
- name: Optional[Union[Var[str], str]] = None,
26
- value: Optional[Union[Var[str], str]] = None,
27
- spacing: Optional[Union[Var[str], str]] = None,
28
- placeholder: Optional[Union[Var[str], str]] = None,
29
- color_scheme: Optional[
30
- Union[
31
- Var[
32
- Literal[
33
- "none",
34
- "gray",
35
- "red",
36
- "orange",
37
- "yellow",
38
- "green",
39
- "teal",
40
- "blue",
41
- "cyan",
42
- "purple",
43
- "pink",
44
- "whiteAlpha",
45
- "blackAlpha",
46
- "linkedin",
47
- "facebook",
48
- "messenger",
49
- "whatsapp",
50
- "twitter",
51
- "telegram",
52
- ]
53
- ],
54
- Literal[
55
- "none",
56
- "gray",
57
- "red",
58
- "orange",
59
- "yellow",
60
- "green",
61
- "teal",
62
- "blue",
63
- "cyan",
64
- "purple",
65
- "pink",
66
- "whiteAlpha",
67
- "blackAlpha",
68
- "linkedin",
69
- "facebook",
70
- "messenger",
71
- "whatsapp",
72
- "twitter",
73
- "telegram",
74
- ],
75
- ]
76
- ] = None,
77
- style: Optional[Style] = None,
78
- key: Optional[Any] = None,
79
- id: Optional[Any] = None,
80
- class_name: Optional[Any] = None,
81
- autofocus: Optional[bool] = None,
82
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
83
- on_blur: Optional[
84
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
85
- ] = None,
86
- on_change: Optional[
87
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
88
- ] = None,
89
- on_click: Optional[
90
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
91
- ] = None,
92
- on_context_menu: Optional[
93
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
94
- ] = None,
95
- on_double_click: Optional[
96
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
97
- ] = None,
98
- on_focus: Optional[
99
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
100
- ] = None,
101
- on_mount: Optional[
102
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
103
- ] = None,
104
- on_mouse_down: Optional[
105
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
106
- ] = None,
107
- on_mouse_enter: Optional[
108
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
109
- ] = None,
110
- on_mouse_leave: Optional[
111
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
112
- ] = None,
113
- on_mouse_move: Optional[
114
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
115
- ] = None,
116
- on_mouse_out: Optional[
117
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
118
- ] = None,
119
- on_mouse_over: Optional[
120
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
121
- ] = None,
122
- on_mouse_up: Optional[
123
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
124
- ] = None,
125
- on_scroll: Optional[
126
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
127
- ] = None,
128
- on_unmount: Optional[
129
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
130
- ] = None,
131
- **props,
132
- ) -> "Switch":
133
- """Create the component.
134
-
135
- Args:
136
- *children: The children of the component.
137
- is_checked: If true, the switch will be checked. You'll need to set an on_change event handler to update its value (since it is now controlled)
138
- is_disabled: If true, the switch will be disabled
139
- is_focusable: If true and is_disabled prop is set, the switch will remain tabbable but not interactive.
140
- is_invalid: If true, the switch is marked as invalid. Changes style of unchecked state.
141
- is_read_only: If true, the switch will be readonly
142
- is_required: If true, the switch will be required
143
- name: The name of the input field in a switch (Useful for form submission).
144
- value: The value of the input field when checked (use is_checked prop for a bool)
145
- spacing: The spacing between the switch and its label text (0.5rem)
146
- placeholder: The placeholder text.
147
- color_scheme: The color scheme of the switch (e.g. "blue", "green", "red", etc.)
148
- style: The style of the component.
149
- key: A unique key for the component.
150
- id: The id for the component.
151
- class_name: The class name for the component.
152
- autofocus: Whether the component should take the focus once the page is loaded
153
- custom_attrs: custom attribute
154
- **props: The props of the component.
155
-
156
- Returns:
157
- The component.
158
- """
159
- ...