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,339 +0,0 @@
1
- """Stub file for reflex/components/chakra/datadisplay/list.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, 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 List(ChakraComponent):
14
- @overload
15
- @classmethod
16
- def create( # type: ignore
17
- cls,
18
- *children,
19
- items: Optional[Union[Var[list], list]] = None,
20
- spacing: Optional[Union[Var[str], str]] = None,
21
- style_position: Optional[Union[Var[str], str]] = None,
22
- style_type: Optional[Union[Var[str], str]] = None,
23
- style: Optional[Style] = None,
24
- key: Optional[Any] = None,
25
- id: Optional[Any] = None,
26
- class_name: Optional[Any] = None,
27
- autofocus: Optional[bool] = None,
28
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
29
- on_blur: Optional[
30
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
31
- ] = None,
32
- on_click: Optional[
33
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
34
- ] = None,
35
- on_context_menu: Optional[
36
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
37
- ] = None,
38
- on_double_click: Optional[
39
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
40
- ] = None,
41
- on_focus: Optional[
42
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
43
- ] = None,
44
- on_mount: Optional[
45
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
46
- ] = None,
47
- on_mouse_down: Optional[
48
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
49
- ] = None,
50
- on_mouse_enter: Optional[
51
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
52
- ] = None,
53
- on_mouse_leave: Optional[
54
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
55
- ] = None,
56
- on_mouse_move: Optional[
57
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
58
- ] = None,
59
- on_mouse_out: Optional[
60
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
61
- ] = None,
62
- on_mouse_over: Optional[
63
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
64
- ] = None,
65
- on_mouse_up: Optional[
66
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
67
- ] = None,
68
- on_scroll: Optional[
69
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
70
- ] = None,
71
- on_unmount: Optional[
72
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
73
- ] = None,
74
- **props,
75
- ) -> "List":
76
- """Create a list component.
77
-
78
- Args:
79
- *children: The children of the component.
80
- items: A list of items to add to the list.
81
- spacing: The space between each list item
82
- style_position: Shorthand prop for listStylePosition
83
- style_type: Shorthand prop for listStyleType
84
- style: The style of the component.
85
- key: A unique key for the component.
86
- id: The id for the component.
87
- class_name: The class name for the component.
88
- autofocus: Whether the component should take the focus once the page is loaded
89
- custom_attrs: custom attribute
90
- **props: The properties of the component.
91
-
92
- Returns:
93
- The list component.
94
- """
95
- ...
96
-
97
- class ListItem(ChakraComponent):
98
- @overload
99
- @classmethod
100
- def create( # type: ignore
101
- cls,
102
- *children,
103
- style: Optional[Style] = None,
104
- key: Optional[Any] = None,
105
- id: Optional[Any] = None,
106
- class_name: Optional[Any] = None,
107
- autofocus: Optional[bool] = None,
108
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
109
- on_blur: Optional[
110
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
111
- ] = None,
112
- on_click: Optional[
113
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
114
- ] = None,
115
- on_context_menu: Optional[
116
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
117
- ] = None,
118
- on_double_click: Optional[
119
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
120
- ] = None,
121
- on_focus: Optional[
122
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
123
- ] = None,
124
- on_mount: Optional[
125
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
126
- ] = None,
127
- on_mouse_down: Optional[
128
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
129
- ] = None,
130
- on_mouse_enter: Optional[
131
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
132
- ] = None,
133
- on_mouse_leave: Optional[
134
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
135
- ] = None,
136
- on_mouse_move: Optional[
137
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
138
- ] = None,
139
- on_mouse_out: Optional[
140
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
141
- ] = None,
142
- on_mouse_over: Optional[
143
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
144
- ] = None,
145
- on_mouse_up: Optional[
146
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
147
- ] = None,
148
- on_scroll: Optional[
149
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
150
- ] = None,
151
- on_unmount: Optional[
152
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
153
- ] = None,
154
- **props,
155
- ) -> "ListItem":
156
- """Create the component.
157
-
158
- Args:
159
- *children: The children of the component.
160
- style: The style of the component.
161
- key: A unique key for the component.
162
- id: The id for the component.
163
- class_name: The class name for the component.
164
- autofocus: Whether the component should take the focus once the page is loaded
165
- custom_attrs: custom attribute
166
- **props: The props of the component.
167
-
168
- Returns:
169
- The component.
170
- """
171
- ...
172
-
173
- class OrderedList(List):
174
- @overload
175
- @classmethod
176
- def create( # type: ignore
177
- cls,
178
- *children,
179
- items: Optional[Union[Var[list], list]] = None,
180
- spacing: Optional[Union[Var[str], str]] = None,
181
- style_position: Optional[Union[Var[str], str]] = None,
182
- style_type: Optional[Union[Var[str], str]] = None,
183
- style: Optional[Style] = None,
184
- key: Optional[Any] = None,
185
- id: Optional[Any] = None,
186
- class_name: Optional[Any] = None,
187
- autofocus: Optional[bool] = None,
188
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
189
- on_blur: Optional[
190
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
191
- ] = None,
192
- on_click: Optional[
193
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
194
- ] = None,
195
- on_context_menu: Optional[
196
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
197
- ] = None,
198
- on_double_click: Optional[
199
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
200
- ] = None,
201
- on_focus: Optional[
202
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
203
- ] = None,
204
- on_mount: Optional[
205
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
206
- ] = None,
207
- on_mouse_down: Optional[
208
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
209
- ] = None,
210
- on_mouse_enter: Optional[
211
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
212
- ] = None,
213
- on_mouse_leave: Optional[
214
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
215
- ] = None,
216
- on_mouse_move: Optional[
217
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
218
- ] = None,
219
- on_mouse_out: Optional[
220
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
221
- ] = None,
222
- on_mouse_over: Optional[
223
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
224
- ] = None,
225
- on_mouse_up: Optional[
226
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
227
- ] = None,
228
- on_scroll: Optional[
229
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
230
- ] = None,
231
- on_unmount: Optional[
232
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
233
- ] = None,
234
- **props,
235
- ) -> "OrderedList":
236
- """Create a list component.
237
-
238
- Args:
239
- *children: The children of the component.
240
- items: A list of items to add to the list.
241
- spacing: The space between each list item
242
- style_position: Shorthand prop for listStylePosition
243
- style_type: Shorthand prop for listStyleType
244
- style: The style of the component.
245
- key: A unique key for the component.
246
- id: The id for the component.
247
- class_name: The class name for the component.
248
- autofocus: Whether the component should take the focus once the page is loaded
249
- custom_attrs: custom attribute
250
- **props: The properties of the component.
251
-
252
- Returns:
253
- The list component.
254
- """
255
- ...
256
-
257
- class UnorderedList(List):
258
- @overload
259
- @classmethod
260
- def create( # type: ignore
261
- cls,
262
- *children,
263
- items: Optional[Union[Var[list], list]] = None,
264
- spacing: Optional[Union[Var[str], str]] = None,
265
- style_position: Optional[Union[Var[str], str]] = None,
266
- style_type: Optional[Union[Var[str], str]] = None,
267
- style: Optional[Style] = None,
268
- key: Optional[Any] = None,
269
- id: Optional[Any] = None,
270
- class_name: Optional[Any] = None,
271
- autofocus: Optional[bool] = None,
272
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
273
- on_blur: Optional[
274
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
275
- ] = None,
276
- on_click: Optional[
277
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
278
- ] = None,
279
- on_context_menu: Optional[
280
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
281
- ] = None,
282
- on_double_click: Optional[
283
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
284
- ] = None,
285
- on_focus: Optional[
286
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
287
- ] = None,
288
- on_mount: Optional[
289
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
290
- ] = None,
291
- on_mouse_down: Optional[
292
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
293
- ] = None,
294
- on_mouse_enter: Optional[
295
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
296
- ] = None,
297
- on_mouse_leave: Optional[
298
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
299
- ] = None,
300
- on_mouse_move: Optional[
301
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
302
- ] = None,
303
- on_mouse_out: Optional[
304
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
305
- ] = None,
306
- on_mouse_over: Optional[
307
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
308
- ] = None,
309
- on_mouse_up: Optional[
310
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
311
- ] = None,
312
- on_scroll: Optional[
313
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
314
- ] = None,
315
- on_unmount: Optional[
316
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
317
- ] = None,
318
- **props,
319
- ) -> "UnorderedList":
320
- """Create a list component.
321
-
322
- Args:
323
- *children: The children of the component.
324
- items: A list of items to add to the list.
325
- spacing: The space between each list item
326
- style_position: Shorthand prop for listStylePosition
327
- style_type: Shorthand prop for listStyleType
328
- style: The style of the component.
329
- key: A unique key for the component.
330
- id: The id for the component.
331
- class_name: The class name for the component.
332
- autofocus: Whether the component should take the focus once the page is loaded
333
- custom_attrs: custom attribute
334
- **props: The properties of the component.
335
-
336
- Returns:
337
- The list component.
338
- """
339
- ...
@@ -1,80 +0,0 @@
1
- """Statistics components."""
2
-
3
- from reflex.components.chakra import ChakraComponent
4
- from reflex.components.component import Component
5
- from reflex.vars import Var
6
-
7
-
8
- class Stat(ChakraComponent):
9
- """The Stat component is used to display some statistics. It can take in a label, a number and a help text."""
10
-
11
- tag = "Stat"
12
-
13
- @classmethod
14
- def create(
15
- cls, *children, label=None, number=0, help_text=None, arrow_type=None, **props
16
- ) -> Component:
17
- """Create a stat component.
18
-
19
- Args:
20
- *children: The children of the component.
21
- label: A label for the stat component.
22
- number: The value of the stat component.
23
- help_text: A text added to the stat component.
24
- arrow_type: The type of the arrow ("increase", "decrease", None)
25
- **props: The properties of the component.
26
-
27
- Returns:
28
- The stat component.
29
- """
30
- if len(children) == 0:
31
- children = []
32
- if label:
33
- children.append(StatLabel.create(label))
34
-
35
- children.append(StatNumber.create(number))
36
-
37
- if help_text:
38
- if arrow_type:
39
- children.append(
40
- StatHelpText.create(
41
- help_text, StatArrow.create(type_=arrow_type)
42
- )
43
- )
44
- else:
45
- children.append(StatHelpText.create(help_text))
46
-
47
- return super().create(*children, **props)
48
-
49
-
50
- class StatLabel(ChakraComponent):
51
- """A stat label component."""
52
-
53
- tag = "StatLabel"
54
-
55
-
56
- class StatNumber(ChakraComponent):
57
- """The stat to display."""
58
-
59
- tag = "StatNumber"
60
-
61
-
62
- class StatHelpText(ChakraComponent):
63
- """A helper text to display under the stat."""
64
-
65
- tag = "StatHelpText"
66
-
67
-
68
- class StatArrow(ChakraComponent):
69
- """A stat arrow component indicating the direction of change."""
70
-
71
- tag = "StatArrow"
72
-
73
- # The type of arrow, either increase or decrease.
74
- type_: Var[str]
75
-
76
-
77
- class StatGroup(ChakraComponent):
78
- """A stat group component to evenly space out the stats."""
79
-
80
- tag = "StatGroup"