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,87 +0,0 @@
1
- """Stub file for reflex/components/chakra/datadisplay/code.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 Code(ChakraComponent):
14
- @overload
15
- @classmethod
16
- def create( # type: ignore
17
- cls,
18
- *children,
19
- style: Optional[Style] = None,
20
- key: Optional[Any] = None,
21
- id: Optional[Any] = None,
22
- class_name: Optional[Any] = None,
23
- autofocus: Optional[bool] = None,
24
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
25
- on_blur: Optional[
26
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
27
- ] = None,
28
- on_click: Optional[
29
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
30
- ] = None,
31
- on_context_menu: Optional[
32
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
33
- ] = None,
34
- on_double_click: Optional[
35
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
36
- ] = None,
37
- on_focus: Optional[
38
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
39
- ] = None,
40
- on_mount: Optional[
41
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
42
- ] = None,
43
- on_mouse_down: Optional[
44
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
45
- ] = None,
46
- on_mouse_enter: Optional[
47
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
48
- ] = None,
49
- on_mouse_leave: Optional[
50
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
51
- ] = None,
52
- on_mouse_move: Optional[
53
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
54
- ] = None,
55
- on_mouse_out: Optional[
56
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
57
- ] = None,
58
- on_mouse_over: Optional[
59
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
60
- ] = None,
61
- on_mouse_up: Optional[
62
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
63
- ] = None,
64
- on_scroll: Optional[
65
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
66
- ] = None,
67
- on_unmount: Optional[
68
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
69
- ] = None,
70
- **props,
71
- ) -> "Code":
72
- """Create the component.
73
-
74
- Args:
75
- *children: The children of the component.
76
- style: The style of the component.
77
- key: A unique key for the component.
78
- id: The id for the component.
79
- class_name: The class name for the component.
80
- autofocus: Whether the component should take the focus once the page is loaded
81
- custom_attrs: custom attribute
82
- **props: The props of the component.
83
-
84
- Returns:
85
- The component.
86
- """
87
- ...
@@ -1,20 +0,0 @@
1
- """A line to divide parts of the layout."""
2
-
3
- from typing import Literal
4
-
5
- from reflex.components.chakra import ChakraComponent, LiteralDividerVariant
6
- from reflex.vars import Var
7
-
8
- LiteralLayout = Literal["horizontal", "vertical"]
9
-
10
-
11
- class Divider(ChakraComponent):
12
- """Dividers are used to visually separate content in a list or group."""
13
-
14
- tag = "Divider"
15
-
16
- # Pass the orientation prop and set it to either horizontal or vertical. If the vertical orientation is used, make sure that the parent element is assigned a height.
17
- orientation: Var[LiteralLayout]
18
-
19
- # Variant of the divider ("solid" | "dashed")
20
- variant: Var[LiteralDividerVariant]
@@ -1,100 +0,0 @@
1
- """Stub file for reflex/components/chakra/datadisplay/divider.py"""
2
-
3
- # ------------------- DO NOT EDIT ----------------------
4
- # This file was generated by `reflex/utils/pyi_generator.py`!
5
- # ------------------------------------------------------
6
- from typing import Any, Callable, Dict, Literal, Optional, Union, overload
7
-
8
- from reflex.components.chakra import ChakraComponent
9
- from reflex.event import EventHandler, EventSpec
10
- from reflex.style import Style
11
- from reflex.vars import BaseVar, Var
12
-
13
- LiteralLayout = Literal["horizontal", "vertical"]
14
-
15
- class Divider(ChakraComponent):
16
- @overload
17
- @classmethod
18
- def create( # type: ignore
19
- cls,
20
- *children,
21
- orientation: Optional[
22
- Union[
23
- Var[Literal["horizontal", "vertical"]],
24
- Literal["horizontal", "vertical"],
25
- ]
26
- ] = None,
27
- variant: Optional[
28
- Union[Var[Literal["solid", "dashed"]], Literal["solid", "dashed"]]
29
- ] = None,
30
- style: Optional[Style] = None,
31
- key: Optional[Any] = None,
32
- id: Optional[Any] = None,
33
- class_name: Optional[Any] = None,
34
- autofocus: Optional[bool] = None,
35
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
36
- on_blur: Optional[
37
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
38
- ] = None,
39
- on_click: Optional[
40
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
41
- ] = None,
42
- on_context_menu: Optional[
43
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
44
- ] = None,
45
- on_double_click: Optional[
46
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
47
- ] = None,
48
- on_focus: Optional[
49
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
50
- ] = None,
51
- on_mount: Optional[
52
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
53
- ] = None,
54
- on_mouse_down: Optional[
55
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
56
- ] = None,
57
- on_mouse_enter: Optional[
58
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
59
- ] = None,
60
- on_mouse_leave: Optional[
61
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
62
- ] = None,
63
- on_mouse_move: Optional[
64
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
65
- ] = None,
66
- on_mouse_out: Optional[
67
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
68
- ] = None,
69
- on_mouse_over: Optional[
70
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
71
- ] = None,
72
- on_mouse_up: Optional[
73
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
74
- ] = None,
75
- on_scroll: Optional[
76
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
77
- ] = None,
78
- on_unmount: Optional[
79
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
80
- ] = None,
81
- **props,
82
- ) -> "Divider":
83
- """Create the component.
84
-
85
- Args:
86
- *children: The children of the component.
87
- orientation: Pass the orientation prop and set it to either horizontal or vertical. If the vertical orientation is used, make sure that the parent element is assigned a height.
88
- variant: Variant of the divider ("solid" | "dashed")
89
- style: The style of the component.
90
- key: A unique key for the component.
91
- id: The id for the component.
92
- class_name: The class name for the component.
93
- autofocus: Whether the component should take the focus once the page is loaded
94
- custom_attrs: custom attribute
95
- **props: The props of the component.
96
-
97
- Returns:
98
- The component.
99
- """
100
- ...
@@ -1,9 +0,0 @@
1
- """A Keyboard Key Component."""
2
-
3
- from reflex.components.chakra import ChakraComponent
4
-
5
-
6
- class KeyboardKey(ChakraComponent):
7
- """Display a keyboard key text."""
8
-
9
- tag = "Kbd"
@@ -1,87 +0,0 @@
1
- """Stub file for reflex/components/chakra/datadisplay/keyboard_key.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 KeyboardKey(ChakraComponent):
14
- @overload
15
- @classmethod
16
- def create( # type: ignore
17
- cls,
18
- *children,
19
- style: Optional[Style] = None,
20
- key: Optional[Any] = None,
21
- id: Optional[Any] = None,
22
- class_name: Optional[Any] = None,
23
- autofocus: Optional[bool] = None,
24
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
25
- on_blur: Optional[
26
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
27
- ] = None,
28
- on_click: Optional[
29
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
30
- ] = None,
31
- on_context_menu: Optional[
32
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
33
- ] = None,
34
- on_double_click: Optional[
35
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
36
- ] = None,
37
- on_focus: Optional[
38
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
39
- ] = None,
40
- on_mount: Optional[
41
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
42
- ] = None,
43
- on_mouse_down: Optional[
44
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
45
- ] = None,
46
- on_mouse_enter: Optional[
47
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
48
- ] = None,
49
- on_mouse_leave: Optional[
50
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
51
- ] = None,
52
- on_mouse_move: Optional[
53
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
54
- ] = None,
55
- on_mouse_out: Optional[
56
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
57
- ] = None,
58
- on_mouse_over: Optional[
59
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
60
- ] = None,
61
- on_mouse_up: Optional[
62
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
63
- ] = None,
64
- on_scroll: Optional[
65
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
66
- ] = None,
67
- on_unmount: Optional[
68
- Union[EventHandler, EventSpec, list, Callable, BaseVar]
69
- ] = None,
70
- **props,
71
- ) -> "KeyboardKey":
72
- """Create the component.
73
-
74
- Args:
75
- *children: The children of the component.
76
- style: The style of the component.
77
- key: A unique key for the component.
78
- id: The id for the component.
79
- class_name: The class name for the component.
80
- autofocus: Whether the component should take the focus once the page is loaded
81
- custom_attrs: custom attribute
82
- **props: The props of the component.
83
-
84
- Returns:
85
- The component.
86
- """
87
- ...
@@ -1,60 +0,0 @@
1
- """List components."""
2
-
3
- from __future__ import annotations
4
-
5
- from reflex.components.chakra import ChakraComponent
6
- from reflex.components.component import Component
7
- from reflex.components.core.foreach import Foreach
8
- from reflex.vars import Var
9
-
10
-
11
- class List(ChakraComponent):
12
- """Display a list of items."""
13
-
14
- tag = "List"
15
-
16
- # The space between each list item
17
- spacing: Var[str]
18
-
19
- # Shorthand prop for listStylePosition
20
- style_position: Var[str]
21
-
22
- # Shorthand prop for listStyleType
23
- style_type: Var[str]
24
-
25
- @classmethod
26
- def create(cls, *children, items: Var[list] | None = None, **props) -> Component:
27
- """Create a list component.
28
-
29
- Args:
30
- *children: The children of the component.
31
- items: A list of items to add to the list.
32
- **props: The properties of the component.
33
-
34
- Returns:
35
- The list component.
36
- """
37
- if len(children) == 0:
38
- if isinstance(items, Var):
39
- children = [Foreach.create(items, ListItem.create)]
40
- else:
41
- children = [ListItem.create(item) for item in items or []]
42
- return super().create(*children, **props)
43
-
44
-
45
- class ListItem(ChakraComponent):
46
- """A single list item."""
47
-
48
- tag = "ListItem"
49
-
50
-
51
- class OrderedList(List):
52
- """An ordered list component with numbers."""
53
-
54
- tag = "OrderedList"
55
-
56
-
57
- class UnorderedList(List):
58
- """An unordered list component with bullets."""
59
-
60
- tag = "UnorderedList"