reflex 0.5.9a1__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 (169) hide show
  1. reflex/__init__.py +21 -2
  2. reflex/__init__.pyi +0 -1
  3. reflex/app.py +1 -1
  4. reflex/components/__init__.py +0 -1
  5. reflex/components/__init__.pyi +0 -1
  6. reflex/components/markdown/markdown.py +1 -1
  7. reflex/components/recharts/cartesian.py +3 -0
  8. reflex/components/recharts/cartesian.pyi +2 -0
  9. reflex/components/sonner/toast.py +27 -1
  10. reflex/components/sonner/toast.pyi +5 -0
  11. reflex/constants/base.py +2 -0
  12. reflex/constants/installer.py +2 -0
  13. reflex/experimental/hooks.py +1 -1
  14. reflex/reflex.py +0 -15
  15. reflex/state.py +22 -22
  16. reflex/testing.py +8 -3
  17. reflex/utils/net.py +43 -0
  18. reflex/utils/prerequisites.py +27 -126
  19. reflex/utils/registry.py +48 -0
  20. reflex/utils/types.py +1 -1
  21. reflex/vars.py +4 -2
  22. {reflex-0.5.9a1.dist-info → reflex-0.5.10.dist-info}/METADATA +2 -1
  23. {reflex-0.5.9a1.dist-info → reflex-0.5.10.dist-info}/RECORD +26 -167
  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.9a1.dist-info → reflex-0.5.10.dist-info}/LICENSE +0 -0
  168. {reflex-0.5.9a1.dist-info → reflex-0.5.10.dist-info}/WHEEL +0 -0
  169. {reflex-0.5.9a1.dist-info → reflex-0.5.10.dist-info}/entry_points.txt +0 -0
@@ -1,411 +0,0 @@
1
- """Stub file for reflex/components/chakra/disclosure/accordion.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, List, 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 Accordion(ChakraComponent):
14
- @overload
15
- @classmethod
16
- def create( # type: ignore
17
- cls,
18
- *children,
19
- items=None,
20
- icon_pos="right",
21
- allow_multiple: Optional[Union[Var[bool], bool]] = None,
22
- allow_toggle: Optional[Union[Var[bool], bool]] = None,
23
- default_index: Optional[Union[Var[Optional[List[int]]], List[int]]] = None,
24
- index: Optional[Union[Var[Union[List[int], int]], int, List[int]]] = None,
25
- reduce_motion: Optional[Union[Var[bool], bool]] = None,
26
- style: Optional[Style] = None,
27
- key: Optional[Any] = None,
28
- id: Optional[Any] = None,
29
- class_name: Optional[Any] = None,
30
- autofocus: Optional[bool] = None,
31
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
32
- on_blur: Optional[
33
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
34
- ] = None,
35
- on_click: Optional[
36
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
37
- ] = None,
38
- on_context_menu: Optional[
39
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
40
- ] = None,
41
- on_double_click: Optional[
42
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
43
- ] = None,
44
- on_focus: Optional[
45
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
46
- ] = None,
47
- on_mount: Optional[
48
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
49
- ] = None,
50
- on_mouse_down: Optional[
51
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
52
- ] = None,
53
- on_mouse_enter: Optional[
54
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
55
- ] = None,
56
- on_mouse_leave: Optional[
57
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
58
- ] = None,
59
- on_mouse_move: Optional[
60
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
61
- ] = None,
62
- on_mouse_out: Optional[
63
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
64
- ] = None,
65
- on_mouse_over: Optional[
66
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
67
- ] = None,
68
- on_mouse_up: Optional[
69
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
70
- ] = None,
71
- on_scroll: Optional[
72
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
73
- ] = None,
74
- on_unmount: Optional[
75
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
76
- ] = None,
77
- **props,
78
- ) -> "Accordion":
79
- """Create an accordion component.
80
-
81
- Args:
82
- *children: The children of the component.
83
- items: The items of the accordion component: list of tuples (label,panel)
84
- icon_pos: The position of the arrow icon of the accordion. "right", "left" or None
85
- allow_multiple: The allow_multiple property of the accordion. (True or False)
86
- allow_toggle: The allow_toggle property of the accordion. (True or False)
87
- default_index: The initial index(es) of the expanded accordion item(s).
88
- index: The index(es) of the expanded accordion item
89
- reduce_motion: If true, height animation and transitions will be disabled.
90
- style: The style of the component.
91
- key: A unique key for the component.
92
- id: The id for the component.
93
- class_name: The class name for the component.
94
- autofocus: Whether the component should take the focus once the page is loaded
95
- custom_attrs: custom attribute
96
- **props: The properties of the component.
97
-
98
- Returns:
99
- The accordion component
100
- """
101
- ...
102
-
103
- class AccordionItem(ChakraComponent):
104
- @overload
105
- @classmethod
106
- def create( # type: ignore
107
- cls,
108
- *children,
109
- id_: Optional[Union[Var[str], str]] = None,
110
- is_disabled: Optional[Union[Var[bool], bool]] = None,
111
- is_focusable: Optional[Union[Var[bool], bool]] = None,
112
- style: Optional[Style] = None,
113
- key: Optional[Any] = None,
114
- id: Optional[Any] = None,
115
- class_name: Optional[Any] = None,
116
- autofocus: Optional[bool] = None,
117
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
118
- on_blur: Optional[
119
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
120
- ] = None,
121
- on_click: Optional[
122
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
123
- ] = None,
124
- on_context_menu: Optional[
125
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
126
- ] = None,
127
- on_double_click: Optional[
128
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
129
- ] = None,
130
- on_focus: Optional[
131
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
132
- ] = None,
133
- on_mount: Optional[
134
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
135
- ] = None,
136
- on_mouse_down: Optional[
137
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
138
- ] = None,
139
- on_mouse_enter: Optional[
140
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
141
- ] = None,
142
- on_mouse_leave: Optional[
143
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
144
- ] = None,
145
- on_mouse_move: Optional[
146
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
147
- ] = None,
148
- on_mouse_out: Optional[
149
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
150
- ] = None,
151
- on_mouse_over: Optional[
152
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
153
- ] = None,
154
- on_mouse_up: Optional[
155
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
156
- ] = None,
157
- on_scroll: Optional[
158
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
159
- ] = None,
160
- on_unmount: Optional[
161
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
162
- ] = None,
163
- **props,
164
- ) -> "AccordionItem":
165
- """Create the component.
166
-
167
- Args:
168
- *children: The children of the component.
169
- id_: A unique id for the accordion item.
170
- is_disabled: If true, the accordion item will be disabled.
171
- is_focusable: If true, the accordion item will be focusable.
172
- style: The style of the component.
173
- key: A unique key for the component.
174
- id: The id for the component.
175
- class_name: The class name for the component.
176
- autofocus: Whether the component should take the focus once the page is loaded
177
- custom_attrs: custom attribute
178
- **props: The props of the component.
179
-
180
- Returns:
181
- The component.
182
- """
183
- ...
184
-
185
- class AccordionButton(ChakraComponent):
186
- @overload
187
- @classmethod
188
- def create( # type: ignore
189
- cls,
190
- *children,
191
- style: Optional[Style] = None,
192
- key: Optional[Any] = None,
193
- id: Optional[Any] = None,
194
- class_name: Optional[Any] = None,
195
- autofocus: Optional[bool] = None,
196
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
197
- on_blur: Optional[
198
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
199
- ] = None,
200
- on_click: Optional[
201
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
202
- ] = None,
203
- on_context_menu: Optional[
204
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
205
- ] = None,
206
- on_double_click: Optional[
207
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
208
- ] = None,
209
- on_focus: Optional[
210
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
211
- ] = None,
212
- on_mount: Optional[
213
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
214
- ] = None,
215
- on_mouse_down: Optional[
216
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
217
- ] = None,
218
- on_mouse_enter: Optional[
219
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
220
- ] = None,
221
- on_mouse_leave: Optional[
222
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
223
- ] = None,
224
- on_mouse_move: Optional[
225
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
226
- ] = None,
227
- on_mouse_out: Optional[
228
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
229
- ] = None,
230
- on_mouse_over: Optional[
231
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
232
- ] = None,
233
- on_mouse_up: Optional[
234
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
235
- ] = None,
236
- on_scroll: Optional[
237
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
238
- ] = None,
239
- on_unmount: Optional[
240
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
241
- ] = None,
242
- **props,
243
- ) -> "AccordionButton":
244
- """Create the component.
245
-
246
- Args:
247
- *children: The children of the component.
248
- style: The style of the component.
249
- key: A unique key for the component.
250
- id: The id for the component.
251
- class_name: The class name for the component.
252
- autofocus: Whether the component should take the focus once the page is loaded
253
- custom_attrs: custom attribute
254
- **props: The props of the component.
255
-
256
- Returns:
257
- The component.
258
- """
259
- ...
260
-
261
- class AccordionPanel(ChakraComponent):
262
- @overload
263
- @classmethod
264
- def create( # type: ignore
265
- cls,
266
- *children,
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
- ) -> "AccordionPanel":
320
- """Create the component.
321
-
322
- Args:
323
- *children: The children of the component.
324
- style: The style of the component.
325
- key: A unique key for the component.
326
- id: The id for the component.
327
- class_name: The class name for the component.
328
- autofocus: Whether the component should take the focus once the page is loaded
329
- custom_attrs: custom attribute
330
- **props: The props of the component.
331
-
332
- Returns:
333
- The component.
334
- """
335
- ...
336
-
337
- class AccordionIcon(ChakraComponent):
338
- @overload
339
- @classmethod
340
- def create( # type: ignore
341
- cls,
342
- *children,
343
- style: Optional[Style] = None,
344
- key: Optional[Any] = None,
345
- id: Optional[Any] = None,
346
- class_name: Optional[Any] = None,
347
- autofocus: Optional[bool] = None,
348
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
349
- on_blur: Optional[
350
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
351
- ] = None,
352
- on_click: Optional[
353
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
354
- ] = None,
355
- on_context_menu: Optional[
356
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
357
- ] = None,
358
- on_double_click: Optional[
359
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
360
- ] = None,
361
- on_focus: Optional[
362
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
363
- ] = None,
364
- on_mount: Optional[
365
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
366
- ] = None,
367
- on_mouse_down: Optional[
368
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
369
- ] = None,
370
- on_mouse_enter: Optional[
371
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
372
- ] = None,
373
- on_mouse_leave: Optional[
374
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
375
- ] = None,
376
- on_mouse_move: Optional[
377
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
378
- ] = None,
379
- on_mouse_out: Optional[
380
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
381
- ] = None,
382
- on_mouse_over: Optional[
383
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
384
- ] = None,
385
- on_mouse_up: Optional[
386
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
387
- ] = None,
388
- on_scroll: Optional[
389
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
390
- ] = None,
391
- on_unmount: Optional[
392
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
393
- ] = None,
394
- **props,
395
- ) -> "AccordionIcon":
396
- """Create the component.
397
-
398
- Args:
399
- *children: The children of the component.
400
- style: The style of the component.
401
- key: A unique key for the component.
402
- id: The id for the component.
403
- class_name: The class name for the component.
404
- autofocus: Whether the component should take the focus once the page is loaded
405
- custom_attrs: custom attribute
406
- **props: The props of the component.
407
-
408
- Returns:
409
- The component.
410
- """
411
- ...
@@ -1,117 +0,0 @@
1
- """Tab components."""
2
-
3
- from typing import List, Optional, Tuple
4
-
5
- from reflex.components.chakra import (
6
- ChakraComponent,
7
- LiteralColorScheme,
8
- LiteralTabsVariant,
9
- LiteralTagAlign,
10
- )
11
- from reflex.components.component import Component
12
- from reflex.vars import Var
13
-
14
-
15
- class Tabs(ChakraComponent):
16
- """An accessible tabs component that provides keyboard interactions and ARIA attributes described in the WAI-ARIA Tabs Design Pattern. Tabs, provides context and state for all components."""
17
-
18
- tag = "Tabs"
19
-
20
- # The alignment of the tabs ("center" | "end" | "start").
21
- align: Var[LiteralTagAlign]
22
-
23
- # The initial index of the selected tab (in uncontrolled mode).
24
- default_index: Var[int]
25
-
26
- # The id of the tab.
27
- id_: Var[str]
28
-
29
- # If true, tabs will stretch to width of the tablist.
30
- is_fitted: Var[bool]
31
-
32
- # Performance booster. If true, rendering of the tab panel's will be deferred until it is selected.
33
- is_lazy: Var[bool]
34
-
35
- # If true, the tabs will be manually activated and display its panel by pressing Space or Enter. If false, the tabs will be automatically activated and their panel is displayed when they receive focus.
36
- is_manual: Var[bool]
37
-
38
- # The orientation of the tab list.
39
- orientation: Var[str]
40
-
41
- # "line" | "enclosed" | "enclosed-colored" | "soft-rounded" | "solid-rounded" | "unstyled"
42
- variant: Var[LiteralTabsVariant]
43
-
44
- # The color scheme of the tabs.
45
- color_scheme: Var[LiteralColorScheme]
46
-
47
- # Index of the selected tab (in controlled mode).
48
- index: Var[int]
49
-
50
- @classmethod
51
- def create(
52
- cls, *children, items: Optional[List[Tuple[str, str]]] = None, **props
53
- ) -> Component:
54
- """Create a tab component.
55
-
56
- Args:
57
- *children: The children of the component.
58
- items: The items for the tabs component, a list of tuple (label, panel)
59
- **props: The properties of the component.
60
-
61
- Returns:
62
- The tab component
63
- """
64
- if len(children) == 0:
65
- tabs = []
66
- panels = []
67
- if not items:
68
- items = []
69
- for label, panel in items:
70
- tabs.append(Tab.create(label))
71
- panels.append(TabPanel.create(panel))
72
- children = [TabList.create(*tabs), TabPanels.create(*panels)] # type: ignore
73
- return super().create(*children, **props)
74
-
75
-
76
- class Tab(ChakraComponent):
77
- """An element that serves as a label for one of the tab panels and can be activated to display that panel.."""
78
-
79
- tag = "Tab"
80
-
81
- # If true, the Tab won't be toggleable.
82
- is_disabled: Var[bool]
83
-
84
- # If true, the Tab will be selected.
85
- is_selected: Var[bool]
86
-
87
- # The id of the tab.
88
- id_: Var[str]
89
-
90
- # The id of the panel.
91
- panel_id: Var[str]
92
-
93
- _valid_parents: List[str] = ["TabList"]
94
-
95
-
96
- class TabList(ChakraComponent):
97
- """Wrapper for the Tab components."""
98
-
99
- tag = "TabList"
100
-
101
- _valid_parents: List[str] = ["Tabs"]
102
-
103
-
104
- class TabPanels(ChakraComponent):
105
- """Wrapper for the Tab components."""
106
-
107
- tag = "TabPanels"
108
-
109
- _valid_parents: List[str] = ["Tabs"]
110
-
111
-
112
- class TabPanel(ChakraComponent):
113
- """An element that contains the content associated with a tab."""
114
-
115
- tag = "TabPanel"
116
-
117
- _valid_parents: List[str] = ["TabPanels"]