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,83 +0,0 @@
1
- """A button component."""
2
-
3
- from typing import List
4
-
5
- from reflex.components.chakra import (
6
- ChakraComponent,
7
- LiteralButtonSize,
8
- LiteralButtonVariant,
9
- LiteralColorScheme,
10
- LiteralSpinnerPlacement,
11
- )
12
- from reflex.vars import Var
13
-
14
-
15
- class Button(ChakraComponent):
16
- """The Button component is used to trigger an event or event, such as submitting a form, opening a dialog, canceling an event, or performing a delete operation."""
17
-
18
- tag = "Button"
19
-
20
- # The space between the button icon and label.
21
- icon_spacing: Var[int]
22
-
23
- # If true, the button will be styled in its active state.
24
- is_active: Var[bool]
25
-
26
- # If true, the button will be styled in its disabled state.
27
- is_disabled: Var[bool]
28
-
29
- # If true, the button will take up the full width of its container.
30
- is_full_width: Var[bool]
31
-
32
- # If true, the button will show a spinner.
33
- is_loading: Var[bool]
34
-
35
- # The label to show in the button when isLoading is true If no text is passed, it only shows the spinner.
36
- loading_text: Var[str]
37
-
38
- # "lg" | "md" | "sm" | "xs"
39
- size: Var[LiteralButtonSize]
40
-
41
- # "ghost" | "outline" | "solid" | "link" | "unstyled"
42
- variant: Var[LiteralButtonVariant]
43
-
44
- # Built in color scheme for ease of use.
45
- # Options:
46
- # "whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan"
47
- # | "purple" | "pink" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"
48
- color_scheme: Var[LiteralColorScheme]
49
-
50
- # Position of the loading spinner.
51
- # Options:
52
- # "start" | "end"
53
- spinner_placement: Var[LiteralSpinnerPlacement]
54
-
55
- # The type of button.
56
- type_: Var[str]
57
-
58
- # Components that are not allowed as children.
59
- _invalid_children: List[str] = ["Button", "MenuButton"]
60
-
61
- # The name of the form field
62
- name: Var[str]
63
-
64
-
65
- class ButtonGroup(ChakraComponent):
66
- """A group of buttons."""
67
-
68
- tag = "ButtonGroup"
69
-
70
- # If true, the borderRadius of button that are direct children will be altered to look flushed together.
71
- is_attached: Var[bool]
72
-
73
- # If true, all wrapped button will be disabled.
74
- is_disabled: Var[bool]
75
-
76
- # The spacing between the buttons.
77
- spacing: Var[int]
78
-
79
- # "lg" | "md" | "sm" | "xs"
80
- size: Var[LiteralButtonSize]
81
-
82
- # "ghost" | "outline" | "solid" | "link" | "unstyled"
83
- variant: Var[LiteralButtonVariant]
@@ -1,262 +0,0 @@
1
- """Stub file for reflex/components/chakra/forms/button.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 (
9
- ChakraComponent,
10
- )
11
- from reflex.event import EventHandler, EventSpec
12
- from reflex.style import Style
13
- from reflex.vars import BaseVar, Var
14
-
15
- class Button(ChakraComponent):
16
- @overload
17
- @classmethod
18
- def create( # type: ignore
19
- cls,
20
- *children,
21
- icon_spacing: Optional[Union[Var[int], int]] = None,
22
- is_active: Optional[Union[Var[bool], bool]] = None,
23
- is_disabled: Optional[Union[Var[bool], bool]] = None,
24
- is_full_width: Optional[Union[Var[bool], bool]] = None,
25
- is_loading: Optional[Union[Var[bool], bool]] = None,
26
- loading_text: Optional[Union[Var[str], str]] = None,
27
- size: Optional[
28
- Union[Var[Literal["sm", "md", "lg", "xs"]], Literal["sm", "md", "lg", "xs"]]
29
- ] = None,
30
- variant: Optional[
31
- Union[
32
- Var[Literal["ghost", "outline", "solid", "link", "unstyled"]],
33
- Literal["ghost", "outline", "solid", "link", "unstyled"],
34
- ]
35
- ] = None,
36
- color_scheme: Optional[
37
- Union[
38
- Var[
39
- Literal[
40
- "none",
41
- "gray",
42
- "red",
43
- "orange",
44
- "yellow",
45
- "green",
46
- "teal",
47
- "blue",
48
- "cyan",
49
- "purple",
50
- "pink",
51
- "whiteAlpha",
52
- "blackAlpha",
53
- "linkedin",
54
- "facebook",
55
- "messenger",
56
- "whatsapp",
57
- "twitter",
58
- "telegram",
59
- ]
60
- ],
61
- Literal[
62
- "none",
63
- "gray",
64
- "red",
65
- "orange",
66
- "yellow",
67
- "green",
68
- "teal",
69
- "blue",
70
- "cyan",
71
- "purple",
72
- "pink",
73
- "whiteAlpha",
74
- "blackAlpha",
75
- "linkedin",
76
- "facebook",
77
- "messenger",
78
- "whatsapp",
79
- "twitter",
80
- "telegram",
81
- ],
82
- ]
83
- ] = None,
84
- spinner_placement: Optional[
85
- Union[Var[Literal["start", "end"]], Literal["start", "end"]]
86
- ] = None,
87
- type_: Optional[Union[Var[str], str]] = None,
88
- name: Optional[Union[Var[str], str]] = None,
89
- style: Optional[Style] = None,
90
- key: Optional[Any] = None,
91
- id: Optional[Any] = None,
92
- class_name: Optional[Any] = None,
93
- autofocus: Optional[bool] = None,
94
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
95
- on_blur: Optional[
96
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
97
- ] = None,
98
- on_click: Optional[
99
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
100
- ] = None,
101
- on_context_menu: Optional[
102
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
103
- ] = None,
104
- on_double_click: Optional[
105
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
106
- ] = None,
107
- on_focus: Optional[
108
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
109
- ] = None,
110
- on_mount: Optional[
111
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
112
- ] = None,
113
- on_mouse_down: Optional[
114
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
115
- ] = None,
116
- on_mouse_enter: Optional[
117
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
118
- ] = None,
119
- on_mouse_leave: Optional[
120
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
121
- ] = None,
122
- on_mouse_move: Optional[
123
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
124
- ] = None,
125
- on_mouse_out: Optional[
126
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
127
- ] = None,
128
- on_mouse_over: Optional[
129
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
130
- ] = None,
131
- on_mouse_up: Optional[
132
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
133
- ] = None,
134
- on_scroll: Optional[
135
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
136
- ] = None,
137
- on_unmount: Optional[
138
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
139
- ] = None,
140
- **props,
141
- ) -> "Button":
142
- """Create the component.
143
-
144
- Args:
145
- *children: The children of the component.
146
- icon_spacing: The space between the button icon and label.
147
- is_active: If true, the button will be styled in its active state.
148
- is_disabled: If true, the button will be styled in its disabled state.
149
- is_full_width: If true, the button will take up the full width of its container.
150
- is_loading: If true, the button will show a spinner.
151
- loading_text: The label to show in the button when isLoading is true If no text is passed, it only shows the spinner.
152
- size: "lg" | "md" | "sm" | "xs"
153
- variant: "ghost" | "outline" | "solid" | "link" | "unstyled"
154
- 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"
155
- spinner_placement: Position of the loading spinner. Options: "start" | "end"
156
- type_: The type of button.
157
- name: The name of the form field
158
- style: The style of the component.
159
- key: A unique key for the component.
160
- id: The id for the component.
161
- class_name: The class name for the component.
162
- autofocus: Whether the component should take the focus once the page is loaded
163
- custom_attrs: custom attribute
164
- **props: The props of the component.
165
-
166
- Returns:
167
- The component.
168
- """
169
- ...
170
-
171
- class ButtonGroup(ChakraComponent):
172
- @overload
173
- @classmethod
174
- def create( # type: ignore
175
- cls,
176
- *children,
177
- is_attached: Optional[Union[Var[bool], bool]] = None,
178
- is_disabled: Optional[Union[Var[bool], bool]] = None,
179
- spacing: Optional[Union[Var[int], int]] = None,
180
- size: Optional[
181
- Union[Var[Literal["sm", "md", "lg", "xs"]], Literal["sm", "md", "lg", "xs"]]
182
- ] = None,
183
- variant: Optional[
184
- Union[
185
- Var[Literal["ghost", "outline", "solid", "link", "unstyled"]],
186
- Literal["ghost", "outline", "solid", "link", "unstyled"],
187
- ]
188
- ] = None,
189
- style: Optional[Style] = None,
190
- key: Optional[Any] = None,
191
- id: Optional[Any] = None,
192
- class_name: Optional[Any] = None,
193
- autofocus: Optional[bool] = None,
194
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
195
- on_blur: Optional[
196
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
197
- ] = None,
198
- on_click: Optional[
199
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
200
- ] = None,
201
- on_context_menu: Optional[
202
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
203
- ] = None,
204
- on_double_click: Optional[
205
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
206
- ] = None,
207
- on_focus: Optional[
208
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
209
- ] = None,
210
- on_mount: Optional[
211
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
212
- ] = None,
213
- on_mouse_down: Optional[
214
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
215
- ] = None,
216
- on_mouse_enter: Optional[
217
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
218
- ] = None,
219
- on_mouse_leave: Optional[
220
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
221
- ] = None,
222
- on_mouse_move: Optional[
223
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
224
- ] = None,
225
- on_mouse_out: Optional[
226
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
227
- ] = None,
228
- on_mouse_over: Optional[
229
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
230
- ] = None,
231
- on_mouse_up: Optional[
232
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
233
- ] = None,
234
- on_scroll: Optional[
235
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
236
- ] = None,
237
- on_unmount: Optional[
238
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
239
- ] = None,
240
- **props,
241
- ) -> "ButtonGroup":
242
- """Create the component.
243
-
244
- Args:
245
- *children: The children of the component.
246
- is_attached: If true, the borderRadius of button that are direct children will be altered to look flushed together.
247
- is_disabled: If true, all wrapped button will be disabled.
248
- spacing: The spacing between the buttons.
249
- size: "lg" | "md" | "sm" | "xs"
250
- variant: "ghost" | "outline" | "solid" | "link" | "unstyled"
251
- style: The style of the component.
252
- key: A unique key for the component.
253
- id: The id for the component.
254
- class_name: The class name for the component.
255
- autofocus: Whether the component should take the focus once the page is loaded
256
- custom_attrs: custom attribute
257
- **props: The props of the component.
258
-
259
- Returns:
260
- The component.
261
- """
262
- ...
@@ -1,77 +0,0 @@
1
- """A checkbox component."""
2
-
3
- from __future__ import annotations
4
-
5
- from reflex.components.chakra import (
6
- ChakraComponent,
7
- LiteralColorScheme,
8
- LiteralTagSize,
9
- )
10
- from reflex.event import EventHandler
11
- from reflex.vars import Var
12
-
13
-
14
- class Checkbox(ChakraComponent):
15
- """The Checkbox component is used in forms when a user needs to select multiple values from several options."""
16
-
17
- tag = "Checkbox"
18
-
19
- # Color scheme for checkbox.
20
- # Options:
21
- # "whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan"
22
- # | "purple" | "pink" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"
23
- color_scheme: Var[LiteralColorScheme]
24
-
25
- # "sm" | "md" | "lg"
26
- size: Var[LiteralTagSize]
27
-
28
- # If true, the checkbox will be checked.
29
- is_checked: Var[bool]
30
-
31
- # If true, the checkbox will be disabled
32
- is_disabled: Var[bool]
33
-
34
- # If true and is_disabled is passed, the checkbox will remain tabbable but not interactive
35
- is_focusable: Var[bool]
36
-
37
- # If true, the checkbox will be indeterminate. This only affects the icon shown inside checkbox and does not modify the is_checked var.
38
- is_indeterminate: Var[bool]
39
-
40
- # If true, the checkbox is marked as invalid. Changes style of unchecked state.
41
- is_invalid: Var[bool]
42
-
43
- # If true, the checkbox will be readonly
44
- is_read_only: Var[bool]
45
-
46
- # If true, the checkbox input is marked as required, and required attribute will be added
47
- is_required: Var[bool]
48
-
49
- # The name of the input field in a checkbox (Useful for form submission).
50
- name: Var[str]
51
-
52
- # The value of the input field when checked (use is_checked prop for a bool)
53
- value: Var[str] = Var.create("true", _var_is_string=True) # type: ignore
54
-
55
- # The spacing between the checkbox and its label text (0.5rem)
56
- spacing: Var[str]
57
-
58
- # Fired when the checkbox is checked or unchecked
59
- on_change: EventHandler[lambda e0: [e0.target.checked]]
60
-
61
-
62
- class CheckboxGroup(ChakraComponent):
63
- """A group of checkboxes."""
64
-
65
- tag = "CheckboxGroup"
66
-
67
- # The value of the checkbox group
68
- value: Var[str]
69
-
70
- # The initial value of the checkbox group
71
- default_value: Var[str]
72
-
73
- # If true, all wrapped checkbox inputs will be disabled
74
- is_disabled: Var[bool]
75
-
76
- # If true, input elements will receive checked attribute instead of isChecked. This assumes, you're using native radio inputs
77
- is_native: Var[bool]
@@ -1,247 +0,0 @@
1
- """Stub file for reflex/components/chakra/forms/checkbox.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 Checkbox(ChakraComponent):
14
- @overload
15
- @classmethod
16
- def create( # type: ignore
17
- cls,
18
- *children,
19
- color_scheme: Optional[
20
- Union[
21
- Var[
22
- Literal[
23
- "none",
24
- "gray",
25
- "red",
26
- "orange",
27
- "yellow",
28
- "green",
29
- "teal",
30
- "blue",
31
- "cyan",
32
- "purple",
33
- "pink",
34
- "whiteAlpha",
35
- "blackAlpha",
36
- "linkedin",
37
- "facebook",
38
- "messenger",
39
- "whatsapp",
40
- "twitter",
41
- "telegram",
42
- ]
43
- ],
44
- Literal[
45
- "none",
46
- "gray",
47
- "red",
48
- "orange",
49
- "yellow",
50
- "green",
51
- "teal",
52
- "blue",
53
- "cyan",
54
- "purple",
55
- "pink",
56
- "whiteAlpha",
57
- "blackAlpha",
58
- "linkedin",
59
- "facebook",
60
- "messenger",
61
- "whatsapp",
62
- "twitter",
63
- "telegram",
64
- ],
65
- ]
66
- ] = None,
67
- size: Optional[
68
- Union[Var[Literal["sm", "md", "lg"]], Literal["sm", "md", "lg"]]
69
- ] = None,
70
- is_checked: Optional[Union[Var[bool], bool]] = None,
71
- is_disabled: Optional[Union[Var[bool], bool]] = None,
72
- is_focusable: Optional[Union[Var[bool], bool]] = None,
73
- is_indeterminate: Optional[Union[Var[bool], bool]] = None,
74
- is_invalid: Optional[Union[Var[bool], bool]] = None,
75
- is_read_only: Optional[Union[Var[bool], bool]] = None,
76
- is_required: Optional[Union[Var[bool], bool]] = None,
77
- name: Optional[Union[Var[str], str]] = None,
78
- value: Optional[Union[Var[str], str]] = None,
79
- spacing: Optional[Union[Var[str], str]] = None,
80
- style: Optional[Style] = None,
81
- key: Optional[Any] = None,
82
- id: Optional[Any] = None,
83
- class_name: Optional[Any] = None,
84
- autofocus: Optional[bool] = None,
85
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
86
- on_blur: Optional[
87
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
88
- ] = None,
89
- on_change: Optional[
90
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
91
- ] = None,
92
- on_click: Optional[
93
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
94
- ] = None,
95
- on_context_menu: Optional[
96
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
97
- ] = None,
98
- on_double_click: Optional[
99
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
100
- ] = None,
101
- on_focus: Optional[
102
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
103
- ] = None,
104
- on_mount: Optional[
105
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
106
- ] = None,
107
- on_mouse_down: Optional[
108
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
109
- ] = None,
110
- on_mouse_enter: Optional[
111
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
112
- ] = None,
113
- on_mouse_leave: Optional[
114
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
115
- ] = None,
116
- on_mouse_move: Optional[
117
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
118
- ] = None,
119
- on_mouse_out: Optional[
120
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
121
- ] = None,
122
- on_mouse_over: Optional[
123
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
124
- ] = None,
125
- on_mouse_up: Optional[
126
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
127
- ] = None,
128
- on_scroll: Optional[
129
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
130
- ] = None,
131
- on_unmount: Optional[
132
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
133
- ] = None,
134
- **props,
135
- ) -> "Checkbox":
136
- """Create the component.
137
-
138
- Args:
139
- *children: The children of the component.
140
- color_scheme: Color scheme for checkbox. Options: "whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"
141
- size: "sm" | "md" | "lg"
142
- is_checked: If true, the checkbox will be checked.
143
- is_disabled: If true, the checkbox will be disabled
144
- is_focusable: If true and is_disabled is passed, the checkbox will remain tabbable but not interactive
145
- is_indeterminate: If true, the checkbox will be indeterminate. This only affects the icon shown inside checkbox and does not modify the is_checked var.
146
- is_invalid: If true, the checkbox is marked as invalid. Changes style of unchecked state.
147
- is_read_only: If true, the checkbox will be readonly
148
- is_required: If true, the checkbox input is marked as required, and required attribute will be added
149
- name: The name of the input field in a checkbox (Useful for form submission).
150
- value: The value of the input field when checked (use is_checked prop for a bool)
151
- spacing: The spacing between the checkbox and its label text (0.5rem)
152
- style: The style of the component.
153
- key: A unique key for the component.
154
- id: The id for the component.
155
- class_name: The class name for the component.
156
- autofocus: Whether the component should take the focus once the page is loaded
157
- custom_attrs: custom attribute
158
- **props: The props of the component.
159
-
160
- Returns:
161
- The component.
162
- """
163
- ...
164
-
165
- class CheckboxGroup(ChakraComponent):
166
- @overload
167
- @classmethod
168
- def create( # type: ignore
169
- cls,
170
- *children,
171
- value: Optional[Union[Var[str], str]] = None,
172
- default_value: Optional[Union[Var[str], str]] = None,
173
- is_disabled: Optional[Union[Var[bool], bool]] = None,
174
- is_native: Optional[Union[Var[bool], bool]] = None,
175
- style: Optional[Style] = None,
176
- key: Optional[Any] = None,
177
- id: Optional[Any] = None,
178
- class_name: Optional[Any] = None,
179
- autofocus: Optional[bool] = None,
180
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
181
- on_blur: Optional[
182
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
183
- ] = None,
184
- on_click: Optional[
185
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
186
- ] = None,
187
- on_context_menu: Optional[
188
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
189
- ] = None,
190
- on_double_click: Optional[
191
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
192
- ] = None,
193
- on_focus: Optional[
194
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
195
- ] = None,
196
- on_mount: Optional[
197
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
198
- ] = None,
199
- on_mouse_down: Optional[
200
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
201
- ] = None,
202
- on_mouse_enter: Optional[
203
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
204
- ] = None,
205
- on_mouse_leave: Optional[
206
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
207
- ] = None,
208
- on_mouse_move: Optional[
209
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
210
- ] = None,
211
- on_mouse_out: Optional[
212
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
213
- ] = None,
214
- on_mouse_over: Optional[
215
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
216
- ] = None,
217
- on_mouse_up: Optional[
218
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
219
- ] = None,
220
- on_scroll: Optional[
221
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
222
- ] = None,
223
- on_unmount: Optional[
224
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
225
- ] = None,
226
- **props,
227
- ) -> "CheckboxGroup":
228
- """Create the component.
229
-
230
- Args:
231
- *children: The children of the component.
232
- value: The value of the checkbox group
233
- default_value: The initial value of the checkbox group
234
- is_disabled: If true, all wrapped checkbox inputs will be disabled
235
- is_native: If true, input elements will receive checked attribute instead of isChecked. This assumes, you're using native radio inputs
236
- style: The style of the component.
237
- key: A unique key for the component.
238
- id: The id for the component.
239
- class_name: The class name for the component.
240
- autofocus: Whether the component should take the focus once the page is loaded
241
- custom_attrs: custom attribute
242
- **props: The props of the component.
243
-
244
- Returns:
245
- The component.
246
- """
247
- ...