reflex 0.5.9.dev1__py3-none-any.whl → 0.5.10__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 (170) 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/net.py +43 -0
  19. reflex/utils/prerequisites.py +27 -126
  20. reflex/utils/registry.py +48 -0
  21. reflex/utils/types.py +1 -1
  22. reflex/vars.py +4 -2
  23. {reflex-0.5.9.dev1.dist-info → reflex-0.5.10.dist-info}/METADATA +2 -1
  24. {reflex-0.5.9.dev1.dist-info → reflex-0.5.10.dist-info}/RECORD +27 -168
  25. reflex/components/chakra/__init__.py +0 -204
  26. reflex/components/chakra/base.py +0 -210
  27. reflex/components/chakra/base.pyi +0 -319
  28. reflex/components/chakra/datadisplay/__init__.py +0 -10
  29. reflex/components/chakra/datadisplay/badge.py +0 -16
  30. reflex/components/chakra/datadisplay/badge.pyi +0 -96
  31. reflex/components/chakra/datadisplay/code.py +0 -11
  32. reflex/components/chakra/datadisplay/code.pyi +0 -87
  33. reflex/components/chakra/datadisplay/divider.py +0 -20
  34. reflex/components/chakra/datadisplay/divider.pyi +0 -100
  35. reflex/components/chakra/datadisplay/keyboard_key.py +0 -9
  36. reflex/components/chakra/datadisplay/keyboard_key.pyi +0 -87
  37. reflex/components/chakra/datadisplay/list.py +0 -60
  38. reflex/components/chakra/datadisplay/list.pyi +0 -339
  39. reflex/components/chakra/datadisplay/stat.py +0 -80
  40. reflex/components/chakra/datadisplay/stat.pyi +0 -477
  41. reflex/components/chakra/datadisplay/table.py +0 -305
  42. reflex/components/chakra/datadisplay/table.pyi +0 -737
  43. reflex/components/chakra/datadisplay/tag.py +0 -85
  44. reflex/components/chakra/datadisplay/tag.pyi +0 -433
  45. reflex/components/chakra/disclosure/__init__.py +0 -14
  46. reflex/components/chakra/disclosure/accordion.py +0 -110
  47. reflex/components/chakra/disclosure/accordion.pyi +0 -411
  48. reflex/components/chakra/disclosure/tabs.py +0 -117
  49. reflex/components/chakra/disclosure/tabs.pyi +0 -496
  50. reflex/components/chakra/disclosure/transition.py +0 -73
  51. reflex/components/chakra/disclosure/transition.pyi +0 -509
  52. reflex/components/chakra/disclosure/visuallyhidden.py +0 -9
  53. reflex/components/chakra/disclosure/visuallyhidden.pyi +0 -87
  54. reflex/components/chakra/feedback/__init__.py +0 -7
  55. reflex/components/chakra/feedback/alert.py +0 -68
  56. reflex/components/chakra/feedback/alert.pyi +0 -335
  57. reflex/components/chakra/feedback/circularprogress.py +0 -68
  58. reflex/components/chakra/feedback/circularprogress.pyi +0 -185
  59. reflex/components/chakra/feedback/progress.py +0 -33
  60. reflex/components/chakra/feedback/progress.pyi +0 -101
  61. reflex/components/chakra/feedback/skeleton.py +0 -70
  62. reflex/components/chakra/feedback/skeleton.pyi +0 -271
  63. reflex/components/chakra/feedback/spinner.py +0 -25
  64. reflex/components/chakra/feedback/spinner.pyi +0 -102
  65. reflex/components/chakra/forms/__init__.py +0 -49
  66. reflex/components/chakra/forms/button.py +0 -83
  67. reflex/components/chakra/forms/button.pyi +0 -262
  68. reflex/components/chakra/forms/checkbox.py +0 -77
  69. reflex/components/chakra/forms/checkbox.pyi +0 -247
  70. reflex/components/chakra/forms/colormodeswitch.py +0 -104
  71. reflex/components/chakra/forms/colormodeswitch.pyi +0 -473
  72. reflex/components/chakra/forms/date_picker.py +0 -11
  73. reflex/components/chakra/forms/date_picker.pyi +0 -129
  74. reflex/components/chakra/forms/date_time_picker.py +0 -11
  75. reflex/components/chakra/forms/date_time_picker.pyi +0 -129
  76. reflex/components/chakra/forms/editable.py +0 -67
  77. reflex/components/chakra/forms/editable.pyi +0 -343
  78. reflex/components/chakra/forms/email.py +0 -11
  79. reflex/components/chakra/forms/email.pyi +0 -129
  80. reflex/components/chakra/forms/form.py +0 -103
  81. reflex/components/chakra/forms/form.pyi +0 -484
  82. reflex/components/chakra/forms/iconbutton.py +0 -38
  83. reflex/components/chakra/forms/iconbutton.pyi +0 -108
  84. reflex/components/chakra/forms/input.py +0 -130
  85. reflex/components/chakra/forms/input.pyi +0 -566
  86. reflex/components/chakra/forms/multiselect.py +0 -355
  87. reflex/components/chakra/forms/numberinput.py +0 -128
  88. reflex/components/chakra/forms/numberinput.pyi +0 -442
  89. reflex/components/chakra/forms/password.py +0 -11
  90. reflex/components/chakra/forms/password.pyi +0 -129
  91. reflex/components/chakra/forms/pininput.py +0 -201
  92. reflex/components/chakra/forms/pininput.pyi +0 -215
  93. reflex/components/chakra/forms/radio.py +0 -101
  94. reflex/components/chakra/forms/radio.pyi +0 -197
  95. reflex/components/chakra/forms/rangeslider.py +0 -149
  96. reflex/components/chakra/forms/rangeslider.pyi +0 -354
  97. reflex/components/chakra/forms/select.py +0 -103
  98. reflex/components/chakra/forms/select.pyi +0 -204
  99. reflex/components/chakra/forms/slider.py +0 -130
  100. reflex/components/chakra/forms/slider.pyi +0 -449
  101. reflex/components/chakra/forms/switch.py +0 -49
  102. reflex/components/chakra/forms/switch.pyi +0 -159
  103. reflex/components/chakra/forms/textarea.py +0 -79
  104. reflex/components/chakra/forms/textarea.pyi +0 -123
  105. reflex/components/chakra/forms/time_picker.py +0 -11
  106. reflex/components/chakra/forms/time_picker.pyi +0 -129
  107. reflex/components/chakra/layout/__init__.py +0 -14
  108. reflex/components/chakra/layout/aspect_ratio.py +0 -13
  109. reflex/components/chakra/layout/aspect_ratio.pyi +0 -89
  110. reflex/components/chakra/layout/box.py +0 -31
  111. reflex/components/chakra/layout/box.pyi +0 -93
  112. reflex/components/chakra/layout/card.py +0 -100
  113. reflex/components/chakra/layout/card.pyi +0 -379
  114. reflex/components/chakra/layout/center.py +0 -21
  115. reflex/components/chakra/layout/center.pyi +0 -239
  116. reflex/components/chakra/layout/container.py +0 -13
  117. reflex/components/chakra/layout/container.pyi +0 -89
  118. reflex/components/chakra/layout/flex.py +0 -33
  119. reflex/components/chakra/layout/flex.pyi +0 -101
  120. reflex/components/chakra/layout/grid.py +0 -125
  121. reflex/components/chakra/layout/grid.pyi +0 -293
  122. reflex/components/chakra/layout/spacer.py +0 -9
  123. reflex/components/chakra/layout/spacer.pyi +0 -87
  124. reflex/components/chakra/layout/stack.py +0 -48
  125. reflex/components/chakra/layout/stack.pyi +0 -305
  126. reflex/components/chakra/layout/wrap.py +0 -57
  127. reflex/components/chakra/layout/wrap.pyi +0 -179
  128. reflex/components/chakra/media/__init__.py +0 -7
  129. reflex/components/chakra/media/avatar.py +0 -58
  130. reflex/components/chakra/media/avatar.pyi +0 -267
  131. reflex/components/chakra/media/icon.py +0 -111
  132. reflex/components/chakra/media/icon.pyi +0 -171
  133. reflex/components/chakra/media/image.py +0 -74
  134. reflex/components/chakra/media/image.pyi +0 -118
  135. reflex/components/chakra/navigation/__init__.py +0 -18
  136. reflex/components/chakra/navigation/breadcrumb.py +0 -98
  137. reflex/components/chakra/navigation/breadcrumb.pyi +0 -351
  138. reflex/components/chakra/navigation/link.py +0 -62
  139. reflex/components/chakra/navigation/link.pyi +0 -105
  140. reflex/components/chakra/navigation/linkoverlay.py +0 -22
  141. reflex/components/chakra/navigation/linkoverlay.pyi +0 -167
  142. reflex/components/chakra/navigation/stepper.py +0 -113
  143. reflex/components/chakra/navigation/stepper.pyi +0 -762
  144. reflex/components/chakra/overlay/__init__.py +0 -50
  145. reflex/components/chakra/overlay/alertdialog.py +0 -153
  146. reflex/components/chakra/overlay/alertdialog.pyi +0 -612
  147. reflex/components/chakra/overlay/drawer.py +0 -168
  148. reflex/components/chakra/overlay/drawer.pyi +0 -652
  149. reflex/components/chakra/overlay/menu.py +0 -225
  150. reflex/components/chakra/overlay/menu.pyi +0 -708
  151. reflex/components/chakra/overlay/modal.py +0 -166
  152. reflex/components/chakra/overlay/modal.pyi +0 -600
  153. reflex/components/chakra/overlay/popover.py +0 -183
  154. reflex/components/chakra/overlay/popover.pyi +0 -757
  155. reflex/components/chakra/overlay/tooltip.py +0 -70
  156. reflex/components/chakra/overlay/tooltip.pyi +0 -129
  157. reflex/components/chakra/typography/__init__.py +0 -10
  158. reflex/components/chakra/typography/heading.py +0 -16
  159. reflex/components/chakra/typography/heading.pyi +0 -96
  160. reflex/components/chakra/typography/highlight.py +0 -23
  161. reflex/components/chakra/typography/highlight.pyi +0 -91
  162. reflex/components/chakra/typography/span.py +0 -15
  163. reflex/components/chakra/typography/span.pyi +0 -89
  164. reflex/components/chakra/typography/text.py +0 -18
  165. reflex/components/chakra/typography/text.pyi +0 -91
  166. reflex/components/media/__init__.py +0 -1
  167. reflex/components/media/icon.py +0 -3
  168. {reflex-0.5.9.dev1.dist-info → reflex-0.5.10.dist-info}/LICENSE +0 -0
  169. {reflex-0.5.9.dev1.dist-info → reflex-0.5.10.dist-info}/WHEEL +0 -0
  170. {reflex-0.5.9.dev1.dist-info → reflex-0.5.10.dist-info}/entry_points.txt +0 -0
@@ -1,104 +0,0 @@
1
- """A switch component for toggling color_mode.
2
-
3
- To style components based on color mode, use style props with `color_mode_cond`:
4
-
5
- ```
6
- rx.text(
7
- "Hover over me",
8
- _hover={
9
- "background": rx.color_mode_cond(
10
- light="var(--chakra-colors-gray-200)",
11
- dark="var(--chakra-colors-gray-700)",
12
- ),
13
- },
14
- )
15
- ```
16
- """
17
-
18
- from __future__ import annotations
19
-
20
- from reflex.components.chakra import ChakraComponent
21
- from reflex.components.chakra.media.icon import Icon
22
- from reflex.components.component import BaseComponent
23
- from reflex.components.core.cond import Cond, color_mode_cond
24
- from reflex.style import LIGHT_COLOR_MODE, color_mode, toggle_color_mode
25
-
26
- from .button import Button
27
- from .switch import Switch
28
-
29
- DEFAULT_LIGHT_ICON: Icon = Icon.create(tag="sun")
30
- DEFAULT_DARK_ICON: Icon = Icon.create(tag="moon")
31
-
32
-
33
- class ColorModeIcon(Cond):
34
- """Displays the current color mode as an icon."""
35
-
36
- @classmethod
37
- def create(
38
- cls,
39
- light_component: BaseComponent | None = None,
40
- dark_component: BaseComponent | None = None,
41
- ):
42
- """Create an icon component based on color_mode.
43
-
44
- Args:
45
- light_component: the component to display when color mode is default
46
- dark_component: the component to display when color mode is dark (non-default)
47
-
48
- Returns:
49
- The conditionally rendered component
50
- """
51
- return color_mode_cond(
52
- light=light_component or DEFAULT_LIGHT_ICON,
53
- dark=dark_component or DEFAULT_DARK_ICON,
54
- )
55
-
56
-
57
- class ColorModeSwitch(Switch):
58
- """Switch for toggling chakra light / dark mode via toggle_color_mode."""
59
-
60
- @classmethod
61
- def create(cls, *children, **props):
62
- """Create a switch component bound to color_mode.
63
-
64
- Args:
65
- *children: The children of the component.
66
- **props: The props to pass to the component.
67
-
68
- Returns:
69
- The switch component.
70
- """
71
- return Switch.create(
72
- *children,
73
- is_checked=color_mode != LIGHT_COLOR_MODE,
74
- on_change=toggle_color_mode,
75
- **props,
76
- )
77
-
78
-
79
- class ColorModeButton(Button):
80
- """Button for toggling chakra light / dark mode via toggle_color_mode."""
81
-
82
- @classmethod
83
- def create(cls, *children, **props):
84
- """Create a button component that calls toggle_color_mode on click.
85
-
86
- Args:
87
- *children: The children of the component.
88
- **props: The props to pass to the component.
89
-
90
- Returns:
91
- The switch component.
92
- """
93
- return Button.create(
94
- *children,
95
- on_click=toggle_color_mode,
96
- **props,
97
- )
98
-
99
-
100
- class ColorModeScript(ChakraComponent):
101
- """Chakra color mode script."""
102
-
103
- tag = "ColorModeScript"
104
- initialColorMode = LIGHT_COLOR_MODE
@@ -1,473 +0,0 @@
1
- """Stub file for reflex/components/chakra/forms/colormodeswitch.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.components.chakra.media.icon import Icon
10
- from reflex.components.component import BaseComponent
11
- from reflex.components.core.cond import Cond
12
- from reflex.event import EventHandler, EventSpec
13
- from reflex.style import Style
14
- from reflex.vars import BaseVar, Var
15
-
16
- from .button import Button
17
- from .switch import Switch
18
-
19
- DEFAULT_LIGHT_ICON: Icon
20
- DEFAULT_DARK_ICON: Icon
21
-
22
- class ColorModeIcon(Cond):
23
- @overload
24
- @classmethod
25
- def create( # type: ignore
26
- cls,
27
- *children,
28
- cond: Optional[Union[Var[Any], Any]] = None,
29
- comp1: Optional[BaseComponent] = None,
30
- comp2: Optional[BaseComponent] = None,
31
- style: Optional[Style] = None,
32
- key: Optional[Any] = None,
33
- id: Optional[Any] = None,
34
- class_name: Optional[Any] = None,
35
- autofocus: Optional[bool] = None,
36
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
37
- on_blur: Optional[
38
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
39
- ] = None,
40
- on_click: Optional[
41
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
42
- ] = None,
43
- on_context_menu: Optional[
44
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
45
- ] = None,
46
- on_double_click: Optional[
47
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
48
- ] = None,
49
- on_focus: Optional[
50
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
51
- ] = None,
52
- on_mount: Optional[
53
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
54
- ] = None,
55
- on_mouse_down: Optional[
56
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
57
- ] = None,
58
- on_mouse_enter: Optional[
59
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
60
- ] = None,
61
- on_mouse_leave: Optional[
62
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
63
- ] = None,
64
- on_mouse_move: Optional[
65
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
66
- ] = None,
67
- on_mouse_out: Optional[
68
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
69
- ] = None,
70
- on_mouse_over: Optional[
71
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
72
- ] = None,
73
- on_mouse_up: Optional[
74
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
75
- ] = None,
76
- on_scroll: Optional[
77
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
78
- ] = None,
79
- on_unmount: Optional[
80
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
81
- ] = None,
82
- **props,
83
- ) -> "ColorModeIcon":
84
- """Create an icon component based on color_mode.
85
-
86
- Args:
87
- light_component: the component to display when color mode is default
88
- dark_component: the component to display when color mode is dark (non-default)
89
-
90
- Returns:
91
- The conditionally rendered component
92
- """
93
- ...
94
-
95
- class ColorModeSwitch(Switch):
96
- @overload
97
- @classmethod
98
- def create( # type: ignore
99
- cls,
100
- *children,
101
- is_checked: Optional[Union[Var[bool], bool]] = None,
102
- is_disabled: Optional[Union[Var[bool], bool]] = None,
103
- is_focusable: Optional[Union[Var[bool], bool]] = None,
104
- is_invalid: Optional[Union[Var[bool], bool]] = None,
105
- is_read_only: Optional[Union[Var[bool], bool]] = None,
106
- is_required: Optional[Union[Var[bool], bool]] = None,
107
- name: Optional[Union[Var[str], str]] = None,
108
- value: Optional[Union[Var[str], str]] = None,
109
- spacing: Optional[Union[Var[str], str]] = None,
110
- placeholder: Optional[Union[Var[str], str]] = None,
111
- color_scheme: Optional[
112
- Union[
113
- Var[
114
- Literal[
115
- "none",
116
- "gray",
117
- "red",
118
- "orange",
119
- "yellow",
120
- "green",
121
- "teal",
122
- "blue",
123
- "cyan",
124
- "purple",
125
- "pink",
126
- "whiteAlpha",
127
- "blackAlpha",
128
- "linkedin",
129
- "facebook",
130
- "messenger",
131
- "whatsapp",
132
- "twitter",
133
- "telegram",
134
- ]
135
- ],
136
- Literal[
137
- "none",
138
- "gray",
139
- "red",
140
- "orange",
141
- "yellow",
142
- "green",
143
- "teal",
144
- "blue",
145
- "cyan",
146
- "purple",
147
- "pink",
148
- "whiteAlpha",
149
- "blackAlpha",
150
- "linkedin",
151
- "facebook",
152
- "messenger",
153
- "whatsapp",
154
- "twitter",
155
- "telegram",
156
- ],
157
- ]
158
- ] = None,
159
- style: Optional[Style] = None,
160
- key: Optional[Any] = None,
161
- id: Optional[Any] = None,
162
- class_name: Optional[Any] = None,
163
- autofocus: Optional[bool] = None,
164
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
165
- on_blur: Optional[
166
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
167
- ] = None,
168
- on_change: Optional[
169
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
170
- ] = None,
171
- on_click: Optional[
172
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
173
- ] = None,
174
- on_context_menu: Optional[
175
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
176
- ] = None,
177
- on_double_click: Optional[
178
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
179
- ] = None,
180
- on_focus: Optional[
181
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
182
- ] = None,
183
- on_mount: Optional[
184
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
185
- ] = None,
186
- on_mouse_down: Optional[
187
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
188
- ] = None,
189
- on_mouse_enter: Optional[
190
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
191
- ] = None,
192
- on_mouse_leave: Optional[
193
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
194
- ] = None,
195
- on_mouse_move: Optional[
196
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
197
- ] = None,
198
- on_mouse_out: Optional[
199
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
200
- ] = None,
201
- on_mouse_over: Optional[
202
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
203
- ] = None,
204
- on_mouse_up: Optional[
205
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
206
- ] = None,
207
- on_scroll: Optional[
208
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
209
- ] = None,
210
- on_unmount: Optional[
211
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
212
- ] = None,
213
- **props,
214
- ) -> "ColorModeSwitch":
215
- """Create a switch component bound to color_mode.
216
-
217
- Args:
218
- *children: The children of the component.
219
- 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)
220
- is_disabled: If true, the switch will be disabled
221
- is_focusable: If true and is_disabled prop is set, the switch will remain tabbable but not interactive.
222
- is_invalid: If true, the switch is marked as invalid. Changes style of unchecked state.
223
- is_read_only: If true, the switch will be readonly
224
- is_required: If true, the switch will be required
225
- name: The name of the input field in a switch (Useful for form submission).
226
- value: The value of the input field when checked (use is_checked prop for a bool)
227
- spacing: The spacing between the switch and its label text (0.5rem)
228
- placeholder: The placeholder text.
229
- color_scheme: The color scheme of the switch (e.g. "blue", "green", "red", etc.)
230
- style: The style of the component.
231
- key: A unique key for the component.
232
- id: The id for the component.
233
- class_name: The class name for the component.
234
- autofocus: Whether the component should take the focus once the page is loaded
235
- custom_attrs: custom attribute
236
- **props: The props to pass to the component.
237
-
238
- Returns:
239
- The switch component.
240
- """
241
- ...
242
-
243
- class ColorModeButton(Button):
244
- @overload
245
- @classmethod
246
- def create( # type: ignore
247
- cls,
248
- *children,
249
- icon_spacing: Optional[Union[Var[int], int]] = None,
250
- is_active: Optional[Union[Var[bool], bool]] = None,
251
- is_disabled: Optional[Union[Var[bool], bool]] = None,
252
- is_full_width: Optional[Union[Var[bool], bool]] = None,
253
- is_loading: Optional[Union[Var[bool], bool]] = None,
254
- loading_text: Optional[Union[Var[str], str]] = None,
255
- size: Optional[
256
- Union[Var[Literal["sm", "md", "lg", "xs"]], Literal["sm", "md", "lg", "xs"]]
257
- ] = None,
258
- variant: Optional[
259
- Union[
260
- Var[Literal["ghost", "outline", "solid", "link", "unstyled"]],
261
- Literal["ghost", "outline", "solid", "link", "unstyled"],
262
- ]
263
- ] = None,
264
- color_scheme: Optional[
265
- Union[
266
- Var[
267
- Literal[
268
- "none",
269
- "gray",
270
- "red",
271
- "orange",
272
- "yellow",
273
- "green",
274
- "teal",
275
- "blue",
276
- "cyan",
277
- "purple",
278
- "pink",
279
- "whiteAlpha",
280
- "blackAlpha",
281
- "linkedin",
282
- "facebook",
283
- "messenger",
284
- "whatsapp",
285
- "twitter",
286
- "telegram",
287
- ]
288
- ],
289
- Literal[
290
- "none",
291
- "gray",
292
- "red",
293
- "orange",
294
- "yellow",
295
- "green",
296
- "teal",
297
- "blue",
298
- "cyan",
299
- "purple",
300
- "pink",
301
- "whiteAlpha",
302
- "blackAlpha",
303
- "linkedin",
304
- "facebook",
305
- "messenger",
306
- "whatsapp",
307
- "twitter",
308
- "telegram",
309
- ],
310
- ]
311
- ] = None,
312
- spinner_placement: Optional[
313
- Union[Var[Literal["start", "end"]], Literal["start", "end"]]
314
- ] = None,
315
- type_: Optional[Union[Var[str], str]] = None,
316
- name: Optional[Union[Var[str], str]] = None,
317
- style: Optional[Style] = None,
318
- key: Optional[Any] = None,
319
- id: Optional[Any] = None,
320
- class_name: Optional[Any] = None,
321
- autofocus: Optional[bool] = None,
322
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
323
- on_blur: Optional[
324
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
325
- ] = None,
326
- on_click: Optional[
327
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
328
- ] = None,
329
- on_context_menu: Optional[
330
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
331
- ] = None,
332
- on_double_click: Optional[
333
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
334
- ] = None,
335
- on_focus: Optional[
336
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
337
- ] = None,
338
- on_mount: Optional[
339
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
340
- ] = None,
341
- on_mouse_down: Optional[
342
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
343
- ] = None,
344
- on_mouse_enter: Optional[
345
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
346
- ] = None,
347
- on_mouse_leave: Optional[
348
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
349
- ] = None,
350
- on_mouse_move: Optional[
351
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
352
- ] = None,
353
- on_mouse_out: Optional[
354
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
355
- ] = None,
356
- on_mouse_over: Optional[
357
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
358
- ] = None,
359
- on_mouse_up: Optional[
360
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
361
- ] = None,
362
- on_scroll: Optional[
363
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
364
- ] = None,
365
- on_unmount: Optional[
366
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
367
- ] = None,
368
- **props,
369
- ) -> "ColorModeButton":
370
- """Create a button component that calls toggle_color_mode on click.
371
-
372
- Args:
373
- *children: The children of the component.
374
- icon_spacing: The space between the button icon and label.
375
- is_active: If true, the button will be styled in its active state.
376
- is_disabled: If true, the button will be styled in its disabled state.
377
- is_full_width: If true, the button will take up the full width of its container.
378
- is_loading: If true, the button will show a spinner.
379
- loading_text: The label to show in the button when isLoading is true If no text is passed, it only shows the spinner.
380
- size: "lg" | "md" | "sm" | "xs"
381
- variant: "ghost" | "outline" | "solid" | "link" | "unstyled"
382
- color_scheme: Built in color scheme for ease of use. Options: "whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"
383
- spinner_placement: Position of the loading spinner. Options: "start" | "end"
384
- type_: The type of button.
385
- name: The name of the form field
386
- style: The style of the component.
387
- key: A unique key for the component.
388
- id: The id for the component.
389
- class_name: The class name for the component.
390
- autofocus: Whether the component should take the focus once the page is loaded
391
- custom_attrs: custom attribute
392
- **props: The props to pass to the component.
393
-
394
- Returns:
395
- The switch component.
396
- """
397
- ...
398
-
399
- class ColorModeScript(ChakraComponent):
400
- @overload
401
- @classmethod
402
- def create( # type: ignore
403
- cls,
404
- *children,
405
- style: Optional[Style] = None,
406
- key: Optional[Any] = None,
407
- id: Optional[Any] = None,
408
- class_name: Optional[Any] = None,
409
- autofocus: Optional[bool] = None,
410
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
411
- on_blur: Optional[
412
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
413
- ] = None,
414
- on_click: Optional[
415
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
416
- ] = None,
417
- on_context_menu: Optional[
418
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
419
- ] = None,
420
- on_double_click: Optional[
421
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
422
- ] = None,
423
- on_focus: Optional[
424
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
425
- ] = None,
426
- on_mount: Optional[
427
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
428
- ] = None,
429
- on_mouse_down: Optional[
430
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
431
- ] = None,
432
- on_mouse_enter: Optional[
433
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
434
- ] = None,
435
- on_mouse_leave: Optional[
436
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
437
- ] = None,
438
- on_mouse_move: Optional[
439
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
440
- ] = None,
441
- on_mouse_out: Optional[
442
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
443
- ] = None,
444
- on_mouse_over: Optional[
445
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
446
- ] = None,
447
- on_mouse_up: Optional[
448
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
449
- ] = None,
450
- on_scroll: Optional[
451
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
452
- ] = None,
453
- on_unmount: Optional[
454
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
455
- ] = None,
456
- **props,
457
- ) -> "ColorModeScript":
458
- """Create the component.
459
-
460
- Args:
461
- *children: The children of the component.
462
- style: The style of the component.
463
- key: A unique key for the component.
464
- id: The id for the component.
465
- class_name: The class name for the component.
466
- autofocus: Whether the component should take the focus once the page is loaded
467
- custom_attrs: custom attribute
468
- **props: The props of the component.
469
-
470
- Returns:
471
- The component.
472
- """
473
- ...
@@ -1,11 +0,0 @@
1
- """A date input component."""
2
-
3
- from reflex.components.chakra.forms.input import Input
4
- from reflex.vars import Var
5
-
6
-
7
- class DatePicker(Input):
8
- """A date input component."""
9
-
10
- # The type of input.
11
- type_: Var[str] = "date" # type: ignore