reflex 0.4.9a2__py3-none-any.whl → 0.5.0a1__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 (131) hide show
  1. reflex/.templates/apps/blank/code/blank.py +19 -16
  2. reflex/.templates/apps/demo/code/pages/datatable.py +4 -4
  3. reflex/.templates/apps/demo/code/pages/forms.py +2 -2
  4. reflex/.templates/web/utils/helpers/debounce.js +17 -0
  5. reflex/.templates/web/utils/helpers/throttle.js +22 -0
  6. reflex/.templates/web/utils/state.js +21 -3
  7. reflex/__init__.py +6 -1
  8. reflex/__init__.pyi +4 -1
  9. reflex/app.py +157 -140
  10. reflex/app_module_for_backend.py +1 -1
  11. reflex/base.py +13 -15
  12. reflex/compiler/compiler.py +10 -1
  13. reflex/compiler/utils.py +3 -30
  14. reflex/components/__init__.py +1 -0
  15. reflex/components/chakra/datadisplay/list.py +1 -3
  16. reflex/components/chakra/datadisplay/list.pyi +3 -3
  17. reflex/components/chakra/disclosure/accordion.py +1 -1
  18. reflex/components/chakra/forms/pininput.pyi +1 -1
  19. reflex/components/chakra/media/icon.py +2 -2
  20. reflex/components/component.py +279 -32
  21. reflex/components/core/__init__.py +2 -2
  22. reflex/components/core/cond.py +1 -10
  23. reflex/components/core/debounce.py +5 -2
  24. reflex/components/core/debounce.pyi +4 -2
  25. reflex/components/core/foreach.py +1 -16
  26. reflex/components/core/html.py +6 -0
  27. reflex/components/core/match.py +2 -17
  28. reflex/components/core/upload.py +42 -1
  29. reflex/components/core/upload.pyi +199 -1
  30. reflex/components/datadisplay/code.py +7 -3
  31. reflex/components/datadisplay/code.pyi +3 -1
  32. reflex/components/el/elements/forms.py +1 -1
  33. reflex/components/el/elements/forms.pyi +1 -1
  34. reflex/components/lucide/icon.py +5 -13
  35. reflex/components/lucide/icon.pyi +0 -1
  36. reflex/components/markdown/markdown.py +5 -23
  37. reflex/components/markdown/markdown.pyi +1 -4
  38. reflex/components/radix/primitives/accordion.py +227 -406
  39. reflex/components/radix/primitives/accordion.pyi +369 -28
  40. reflex/components/radix/primitives/form.py +33 -29
  41. reflex/components/radix/primitives/form.pyi +7 -2
  42. reflex/components/radix/primitives/progress.py +17 -9
  43. reflex/components/radix/primitives/progress.pyi +2 -0
  44. reflex/components/radix/primitives/slider.py +30 -18
  45. reflex/components/radix/primitives/slider.pyi +4 -0
  46. reflex/components/radix/themes/base.py +8 -1
  47. reflex/components/radix/themes/base.pyi +79 -1
  48. reflex/components/radix/themes/color_mode.py +74 -30
  49. reflex/components/radix/themes/color_mode.pyi +26 -185
  50. reflex/components/radix/themes/components/__init__.py +17 -0
  51. reflex/components/radix/themes/components/badge.py +2 -1
  52. reflex/components/radix/themes/components/badge.pyi +3 -1
  53. reflex/components/radix/themes/components/button.py +3 -1
  54. reflex/components/radix/themes/components/button.pyi +4 -1
  55. reflex/components/radix/themes/components/checkbox_cards.py +48 -0
  56. reflex/components/radix/themes/components/checkbox_cards.pyi +264 -0
  57. reflex/components/radix/themes/components/checkbox_group.py +42 -0
  58. reflex/components/radix/themes/components/checkbox_group.pyi +253 -0
  59. reflex/components/radix/themes/components/data_list.py +63 -0
  60. reflex/components/radix/themes/components/data_list.pyi +426 -0
  61. reflex/components/radix/themes/components/icon_button.py +20 -17
  62. reflex/components/radix/themes/components/icon_button.pyi +5 -1
  63. reflex/components/radix/themes/components/progress.py +55 -0
  64. reflex/components/radix/themes/components/progress.pyi +180 -0
  65. reflex/components/radix/themes/components/radio.py +31 -0
  66. reflex/components/radix/themes/components/radio.pyi +169 -0
  67. reflex/components/radix/themes/components/radio_cards.py +48 -0
  68. reflex/components/radix/themes/components/radio_cards.pyi +264 -0
  69. reflex/components/radix/themes/components/radio_group.py +2 -4
  70. reflex/components/radix/themes/components/segmented_control.py +48 -0
  71. reflex/components/radix/themes/components/segmented_control.pyi +262 -0
  72. reflex/components/radix/themes/components/skeleton.py +32 -0
  73. reflex/components/radix/themes/components/skeleton.pyi +106 -0
  74. reflex/components/radix/themes/components/spinner.py +26 -0
  75. reflex/components/radix/themes/components/spinner.pyi +101 -0
  76. reflex/components/radix/themes/components/tabs.py +26 -1
  77. reflex/components/radix/themes/components/tabs.pyi +69 -9
  78. reflex/components/radix/themes/components/text_field.py +101 -71
  79. reflex/components/radix/themes/components/text_field.pyi +81 -499
  80. reflex/components/radix/themes/layout/base.py +2 -2
  81. reflex/components/radix/themes/layout/base.pyi +4 -4
  82. reflex/components/radix/themes/layout/center.py +8 -3
  83. reflex/components/radix/themes/layout/center.pyi +2 -1
  84. reflex/components/radix/themes/layout/container.py +30 -2
  85. reflex/components/radix/themes/layout/container.pyi +9 -30
  86. reflex/components/radix/themes/layout/list.py +10 -5
  87. reflex/components/radix/themes/layout/list.pyi +5 -21
  88. reflex/components/radix/themes/layout/spacer.py +8 -3
  89. reflex/components/radix/themes/layout/spacer.pyi +2 -1
  90. reflex/components/radix/themes/layout/stack.py +7 -1
  91. reflex/components/radix/themes/layout/stack.pyi +3 -3
  92. reflex/components/radix/themes/typography/link.py +10 -2
  93. reflex/components/radix/themes/typography/link.pyi +5 -4
  94. reflex/components/sonner/__init__.py +3 -0
  95. reflex/components/sonner/toast.py +267 -0
  96. reflex/components/sonner/toast.pyi +205 -0
  97. reflex/components/tags/iter_tag.py +9 -6
  98. reflex/config.py +30 -54
  99. reflex/constants/__init__.py +0 -2
  100. reflex/constants/base.py +0 -5
  101. reflex/constants/colors.py +2 -0
  102. reflex/constants/installer.py +5 -1
  103. reflex/constants/route.py +4 -0
  104. reflex/custom_components/custom_components.py +22 -1
  105. reflex/event.py +75 -30
  106. reflex/experimental/__init__.py +5 -0
  107. reflex/experimental/layout.py +24 -6
  108. reflex/model.py +2 -1
  109. reflex/page.py +7 -4
  110. reflex/reflex.py +8 -3
  111. reflex/route.py +39 -0
  112. reflex/state.py +128 -131
  113. reflex/style.py +20 -1
  114. reflex/testing.py +10 -6
  115. reflex/utils/console.py +3 -1
  116. reflex/utils/exec.py +20 -7
  117. reflex/utils/format.py +1 -1
  118. reflex/utils/imports.py +3 -1
  119. reflex/utils/prerequisites.py +141 -20
  120. reflex/utils/processes.py +21 -1
  121. reflex/utils/pyi_generator.py +95 -5
  122. reflex/utils/serializers.py +1 -1
  123. reflex/utils/telemetry.py +26 -4
  124. reflex/utils/types.py +62 -18
  125. reflex/vars.py +11 -5
  126. {reflex-0.4.9a2.dist-info → reflex-0.5.0a1.dist-info}/METADATA +16 -4
  127. {reflex-0.4.9a2.dist-info → reflex-0.5.0a1.dist-info}/RECORD +130 -108
  128. {reflex-0.4.9a2.dist-info → reflex-0.5.0a1.dist-info}/WHEEL +1 -1
  129. reflex/app.pyi +0 -149
  130. {reflex-0.4.9a2.dist-info → reflex-0.5.0a1.dist-info}/LICENSE +0 -0
  131. {reflex-0.4.9a2.dist-info → reflex-0.5.0a1.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,180 @@
1
+ """Stub file for reflex/components/radix/themes/components/progress.py"""
2
+ # ------------------- DO NOT EDIT ----------------------
3
+ # This file was generated by `reflex/utils/pyi_generator.py`!
4
+ # ------------------------------------------------------
5
+
6
+ from typing import Any, Dict, Literal, Optional, Union, overload
7
+ from reflex.vars import Var, BaseVar, ComputedVar
8
+ from reflex.event import EventChain, EventHandler, EventSpec
9
+ from reflex.style import Style
10
+ from typing import Literal
11
+ from reflex.components.component import Component
12
+ from reflex.vars import Var
13
+ from ..base import LiteralAccentColor, RadixThemesComponent
14
+
15
+ class Progress(RadixThemesComponent):
16
+ @overload
17
+ @classmethod
18
+ def create( # type: ignore
19
+ cls,
20
+ *children,
21
+ value: Optional[Union[Var[int], int]] = None,
22
+ max: Optional[Union[Var[int], int]] = None,
23
+ size: Optional[
24
+ Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
25
+ ] = None,
26
+ variant: Optional[
27
+ Union[
28
+ Var[Literal["classic", "surface", "soft"]],
29
+ Literal["classic", "surface", "soft"],
30
+ ]
31
+ ] = None,
32
+ color_scheme: Optional[
33
+ Union[
34
+ Var[
35
+ Literal[
36
+ "tomato",
37
+ "red",
38
+ "ruby",
39
+ "crimson",
40
+ "pink",
41
+ "plum",
42
+ "purple",
43
+ "violet",
44
+ "iris",
45
+ "indigo",
46
+ "blue",
47
+ "cyan",
48
+ "teal",
49
+ "jade",
50
+ "green",
51
+ "grass",
52
+ "brown",
53
+ "orange",
54
+ "sky",
55
+ "mint",
56
+ "lime",
57
+ "yellow",
58
+ "amber",
59
+ "gold",
60
+ "bronze",
61
+ "gray",
62
+ ]
63
+ ],
64
+ Literal[
65
+ "tomato",
66
+ "red",
67
+ "ruby",
68
+ "crimson",
69
+ "pink",
70
+ "plum",
71
+ "purple",
72
+ "violet",
73
+ "iris",
74
+ "indigo",
75
+ "blue",
76
+ "cyan",
77
+ "teal",
78
+ "jade",
79
+ "green",
80
+ "grass",
81
+ "brown",
82
+ "orange",
83
+ "sky",
84
+ "mint",
85
+ "lime",
86
+ "yellow",
87
+ "amber",
88
+ "gold",
89
+ "bronze",
90
+ "gray",
91
+ ],
92
+ ]
93
+ ] = None,
94
+ high_contrast: Optional[Union[Var[bool], bool]] = None,
95
+ radius: Optional[
96
+ Union[
97
+ Var[Literal["none", "small", "medium", "large", "full"]],
98
+ Literal["none", "small", "medium", "large", "full"],
99
+ ]
100
+ ] = None,
101
+ duration: Optional[Union[Var[str], str]] = None,
102
+ style: Optional[Style] = None,
103
+ key: Optional[Any] = None,
104
+ id: Optional[Any] = None,
105
+ class_name: Optional[Any] = None,
106
+ autofocus: Optional[bool] = None,
107
+ custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
108
+ on_blur: Optional[
109
+ Union[EventHandler, EventSpec, list, function, BaseVar]
110
+ ] = None,
111
+ on_click: Optional[
112
+ Union[EventHandler, EventSpec, list, function, BaseVar]
113
+ ] = None,
114
+ on_context_menu: Optional[
115
+ Union[EventHandler, EventSpec, list, function, BaseVar]
116
+ ] = None,
117
+ on_double_click: Optional[
118
+ Union[EventHandler, EventSpec, list, function, BaseVar]
119
+ ] = None,
120
+ on_focus: Optional[
121
+ Union[EventHandler, EventSpec, list, function, BaseVar]
122
+ ] = None,
123
+ on_mount: Optional[
124
+ Union[EventHandler, EventSpec, list, function, BaseVar]
125
+ ] = None,
126
+ on_mouse_down: Optional[
127
+ Union[EventHandler, EventSpec, list, function, BaseVar]
128
+ ] = None,
129
+ on_mouse_enter: Optional[
130
+ Union[EventHandler, EventSpec, list, function, BaseVar]
131
+ ] = None,
132
+ on_mouse_leave: Optional[
133
+ Union[EventHandler, EventSpec, list, function, BaseVar]
134
+ ] = None,
135
+ on_mouse_move: Optional[
136
+ Union[EventHandler, EventSpec, list, function, BaseVar]
137
+ ] = None,
138
+ on_mouse_out: Optional[
139
+ Union[EventHandler, EventSpec, list, function, BaseVar]
140
+ ] = None,
141
+ on_mouse_over: Optional[
142
+ Union[EventHandler, EventSpec, list, function, BaseVar]
143
+ ] = None,
144
+ on_mouse_up: Optional[
145
+ Union[EventHandler, EventSpec, list, function, BaseVar]
146
+ ] = None,
147
+ on_scroll: Optional[
148
+ Union[EventHandler, EventSpec, list, function, BaseVar]
149
+ ] = None,
150
+ on_unmount: Optional[
151
+ Union[EventHandler, EventSpec, list, function, BaseVar]
152
+ ] = None,
153
+ **props
154
+ ) -> "Progress":
155
+ """Create a Progress component.
156
+
157
+ Args:
158
+ *children: The children of the component.
159
+ value: The value of the progress bar: 0 to max (default 100)
160
+ max: The maximum progress value.
161
+ size: The size of the progress bar: "1" | "2" | "3"
162
+ variant: The variant of the progress bar: "classic" | "surface" | "soft"
163
+ color_scheme: The color theme of the progress bar
164
+ high_contrast: Whether to render the progress bar with higher contrast color against background
165
+ radius: Override theme radius for progress bar: "none" | "small" | "medium" | "large" | "full"
166
+ duration: The duration of the progress bar animation. Once the duration times out, the progress bar will start an indeterminate animation.
167
+ style: The style of the component.
168
+ key: A unique key for the component.
169
+ id: The id for the component.
170
+ class_name: The class name for the component.
171
+ autofocus: Whether the component should take the focus once the page is loaded
172
+ custom_attrs: custom attribute
173
+ **props: The properties of the component.
174
+
175
+ Returns:
176
+ The Progress Component.
177
+ """
178
+ ...
179
+
180
+ progress = Progress.create
@@ -0,0 +1,31 @@
1
+ """Radio component from Radix Themes."""
2
+
3
+ from typing import Literal
4
+
5
+ from reflex.vars import Var
6
+
7
+ from ..base import LiteralAccentColor, RadixThemesComponent
8
+
9
+
10
+ class Radio(RadixThemesComponent):
11
+ """A radio component."""
12
+
13
+ tag = "Radio"
14
+
15
+ # The size of the radio: "1" | "2" | "3"
16
+ size: Var[Literal["1", "2", "3"]]
17
+
18
+ # Variant of button: "classic" | "surface" | "soft"
19
+ variant: Var[Literal["classic", "surface", "soft"]]
20
+
21
+ # Override theme color for button
22
+ color_scheme: Var[LiteralAccentColor]
23
+
24
+ # Uses a higher contrast color for the component.
25
+ high_contrast: Var[bool]
26
+
27
+ # Change the default rendered element for the one passed as a child, merging their props and behavior.
28
+ as_child = Var[bool]
29
+
30
+
31
+ radio = Radio.create
@@ -0,0 +1,169 @@
1
+ """Stub file for reflex/components/radix/themes/components/radio.py"""
2
+ # ------------------- DO NOT EDIT ----------------------
3
+ # This file was generated by `reflex/utils/pyi_generator.py`!
4
+ # ------------------------------------------------------
5
+
6
+ from typing import Any, Dict, Literal, Optional, Union, overload
7
+ from reflex.vars import Var, BaseVar, ComputedVar
8
+ from reflex.event import EventChain, EventHandler, EventSpec
9
+ from reflex.style import Style
10
+ from typing import Literal
11
+ from reflex.vars import Var
12
+ from ..base import LiteralAccentColor, RadixThemesComponent
13
+
14
+ class Radio(RadixThemesComponent):
15
+ @overload
16
+ @classmethod
17
+ def create( # type: ignore
18
+ cls,
19
+ *children,
20
+ size: Optional[
21
+ Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
22
+ ] = None,
23
+ variant: Optional[
24
+ Union[
25
+ Var[Literal["classic", "surface", "soft"]],
26
+ Literal["classic", "surface", "soft"],
27
+ ]
28
+ ] = None,
29
+ color_scheme: Optional[
30
+ Union[
31
+ Var[
32
+ Literal[
33
+ "tomato",
34
+ "red",
35
+ "ruby",
36
+ "crimson",
37
+ "pink",
38
+ "plum",
39
+ "purple",
40
+ "violet",
41
+ "iris",
42
+ "indigo",
43
+ "blue",
44
+ "cyan",
45
+ "teal",
46
+ "jade",
47
+ "green",
48
+ "grass",
49
+ "brown",
50
+ "orange",
51
+ "sky",
52
+ "mint",
53
+ "lime",
54
+ "yellow",
55
+ "amber",
56
+ "gold",
57
+ "bronze",
58
+ "gray",
59
+ ]
60
+ ],
61
+ Literal[
62
+ "tomato",
63
+ "red",
64
+ "ruby",
65
+ "crimson",
66
+ "pink",
67
+ "plum",
68
+ "purple",
69
+ "violet",
70
+ "iris",
71
+ "indigo",
72
+ "blue",
73
+ "cyan",
74
+ "teal",
75
+ "jade",
76
+ "green",
77
+ "grass",
78
+ "brown",
79
+ "orange",
80
+ "sky",
81
+ "mint",
82
+ "lime",
83
+ "yellow",
84
+ "amber",
85
+ "gold",
86
+ "bronze",
87
+ "gray",
88
+ ],
89
+ ]
90
+ ] = None,
91
+ high_contrast: Optional[Union[Var[bool], bool]] = None,
92
+ style: Optional[Style] = None,
93
+ key: Optional[Any] = None,
94
+ id: Optional[Any] = None,
95
+ class_name: Optional[Any] = None,
96
+ autofocus: Optional[bool] = None,
97
+ custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
98
+ on_blur: Optional[
99
+ Union[EventHandler, EventSpec, list, function, BaseVar]
100
+ ] = None,
101
+ on_click: Optional[
102
+ Union[EventHandler, EventSpec, list, function, BaseVar]
103
+ ] = None,
104
+ on_context_menu: Optional[
105
+ Union[EventHandler, EventSpec, list, function, BaseVar]
106
+ ] = None,
107
+ on_double_click: Optional[
108
+ Union[EventHandler, EventSpec, list, function, BaseVar]
109
+ ] = None,
110
+ on_focus: Optional[
111
+ Union[EventHandler, EventSpec, list, function, BaseVar]
112
+ ] = None,
113
+ on_mount: Optional[
114
+ Union[EventHandler, EventSpec, list, function, BaseVar]
115
+ ] = None,
116
+ on_mouse_down: Optional[
117
+ Union[EventHandler, EventSpec, list, function, BaseVar]
118
+ ] = None,
119
+ on_mouse_enter: Optional[
120
+ Union[EventHandler, EventSpec, list, function, BaseVar]
121
+ ] = None,
122
+ on_mouse_leave: Optional[
123
+ Union[EventHandler, EventSpec, list, function, BaseVar]
124
+ ] = None,
125
+ on_mouse_move: Optional[
126
+ Union[EventHandler, EventSpec, list, function, BaseVar]
127
+ ] = None,
128
+ on_mouse_out: Optional[
129
+ Union[EventHandler, EventSpec, list, function, BaseVar]
130
+ ] = None,
131
+ on_mouse_over: Optional[
132
+ Union[EventHandler, EventSpec, list, function, BaseVar]
133
+ ] = None,
134
+ on_mouse_up: Optional[
135
+ Union[EventHandler, EventSpec, list, function, BaseVar]
136
+ ] = None,
137
+ on_scroll: Optional[
138
+ Union[EventHandler, EventSpec, list, function, BaseVar]
139
+ ] = None,
140
+ on_unmount: Optional[
141
+ Union[EventHandler, EventSpec, list, function, BaseVar]
142
+ ] = None,
143
+ **props
144
+ ) -> "Radio":
145
+ """Create a new component instance.
146
+
147
+ Will prepend "RadixThemes" to the component tag to avoid conflicts with
148
+ other UI libraries for common names, like Text and Button.
149
+
150
+ Args:
151
+ *children: Child components.
152
+ size: The size of the radio: "1" | "2" | "3"
153
+ variant: Variant of button: "classic" | "surface" | "soft"
154
+ color_scheme: Override theme color for button
155
+ high_contrast: Uses a higher contrast color for the component.
156
+ style: The style of the component.
157
+ key: A unique key for the component.
158
+ id: The id for the component.
159
+ class_name: The class name for the component.
160
+ autofocus: Whether the component should take the focus once the page is loaded
161
+ custom_attrs: custom attribute
162
+ **props: Component properties.
163
+
164
+ Returns:
165
+ A new component instance.
166
+ """
167
+ ...
168
+
169
+ radio = Radio.create
@@ -0,0 +1,48 @@
1
+ """Radio component from Radix Themes."""
2
+
3
+ from types import SimpleNamespace
4
+ from typing import Literal, Union
5
+
6
+ from reflex.vars import Var
7
+
8
+ from ..base import LiteralAccentColor, RadixThemesComponent
9
+
10
+
11
+ class RadioCardsRoot(RadixThemesComponent):
12
+ """Root element for RadioCards component."""
13
+
14
+ tag = "RadioCards.Root"
15
+
16
+ # The size of the checkbox cards: "1" | "2" | "3"
17
+ size: Var[Literal["1", "2", "3"]]
18
+
19
+ # Variant of button: "classic" | "surface" | "soft"
20
+ variant: Var[Literal["classic", "surface"]]
21
+
22
+ # Override theme color for button
23
+ color_scheme: Var[LiteralAccentColor]
24
+
25
+ # Uses a higher contrast color for the component.
26
+ high_contrast: Var[bool]
27
+
28
+ # The number of columns:
29
+ columns: Var[Union[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]]]
30
+
31
+ # The gap between the checkbox cards:
32
+ gap: Var[Union[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]]]
33
+
34
+
35
+ class RadioCardsItem(RadixThemesComponent):
36
+ """Item element for RadioCards component."""
37
+
38
+ tag = "RadioCards.Item"
39
+
40
+
41
+ class RadioCards(SimpleNamespace):
42
+ """RadioCards components namespace."""
43
+
44
+ root = staticmethod(RadioCardsRoot.create)
45
+ item = staticmethod(RadioCardsItem.create)
46
+
47
+
48
+ radio_cards = RadioCards()
@@ -0,0 +1,264 @@
1
+ """Stub file for reflex/components/radix/themes/components/radio_cards.py"""
2
+ # ------------------- DO NOT EDIT ----------------------
3
+ # This file was generated by `reflex/utils/pyi_generator.py`!
4
+ # ------------------------------------------------------
5
+
6
+ from typing import Any, Dict, Literal, Optional, Union, overload
7
+ from reflex.vars import Var, BaseVar, ComputedVar
8
+ from reflex.event import EventChain, EventHandler, EventSpec
9
+ from reflex.style import Style
10
+ from types import SimpleNamespace
11
+ from typing import Literal, Union
12
+ from reflex.vars import Var
13
+ from ..base import LiteralAccentColor, RadixThemesComponent
14
+
15
+ class RadioCardsRoot(RadixThemesComponent):
16
+ @overload
17
+ @classmethod
18
+ def create( # type: ignore
19
+ cls,
20
+ *children,
21
+ size: Optional[
22
+ Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
23
+ ] = None,
24
+ variant: Optional[
25
+ Union[Var[Literal["classic", "surface"]], Literal["classic", "surface"]]
26
+ ] = None,
27
+ color_scheme: Optional[
28
+ Union[
29
+ Var[
30
+ Literal[
31
+ "tomato",
32
+ "red",
33
+ "ruby",
34
+ "crimson",
35
+ "pink",
36
+ "plum",
37
+ "purple",
38
+ "violet",
39
+ "iris",
40
+ "indigo",
41
+ "blue",
42
+ "cyan",
43
+ "teal",
44
+ "jade",
45
+ "green",
46
+ "grass",
47
+ "brown",
48
+ "orange",
49
+ "sky",
50
+ "mint",
51
+ "lime",
52
+ "yellow",
53
+ "amber",
54
+ "gold",
55
+ "bronze",
56
+ "gray",
57
+ ]
58
+ ],
59
+ Literal[
60
+ "tomato",
61
+ "red",
62
+ "ruby",
63
+ "crimson",
64
+ "pink",
65
+ "plum",
66
+ "purple",
67
+ "violet",
68
+ "iris",
69
+ "indigo",
70
+ "blue",
71
+ "cyan",
72
+ "teal",
73
+ "jade",
74
+ "green",
75
+ "grass",
76
+ "brown",
77
+ "orange",
78
+ "sky",
79
+ "mint",
80
+ "lime",
81
+ "yellow",
82
+ "amber",
83
+ "gold",
84
+ "bronze",
85
+ "gray",
86
+ ],
87
+ ]
88
+ ] = None,
89
+ high_contrast: Optional[Union[Var[bool], bool]] = None,
90
+ columns: Optional[
91
+ Union[
92
+ Var[Union[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]]],
93
+ Union[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
94
+ ]
95
+ ] = None,
96
+ gap: Optional[
97
+ Union[
98
+ Var[Union[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]]],
99
+ Union[str, Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
100
+ ]
101
+ ] = None,
102
+ style: Optional[Style] = None,
103
+ key: Optional[Any] = None,
104
+ id: Optional[Any] = None,
105
+ class_name: Optional[Any] = None,
106
+ autofocus: Optional[bool] = None,
107
+ custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
108
+ on_blur: Optional[
109
+ Union[EventHandler, EventSpec, list, function, BaseVar]
110
+ ] = None,
111
+ on_click: Optional[
112
+ Union[EventHandler, EventSpec, list, function, BaseVar]
113
+ ] = None,
114
+ on_context_menu: Optional[
115
+ Union[EventHandler, EventSpec, list, function, BaseVar]
116
+ ] = None,
117
+ on_double_click: Optional[
118
+ Union[EventHandler, EventSpec, list, function, BaseVar]
119
+ ] = None,
120
+ on_focus: Optional[
121
+ Union[EventHandler, EventSpec, list, function, BaseVar]
122
+ ] = None,
123
+ on_mount: Optional[
124
+ Union[EventHandler, EventSpec, list, function, BaseVar]
125
+ ] = None,
126
+ on_mouse_down: Optional[
127
+ Union[EventHandler, EventSpec, list, function, BaseVar]
128
+ ] = None,
129
+ on_mouse_enter: Optional[
130
+ Union[EventHandler, EventSpec, list, function, BaseVar]
131
+ ] = None,
132
+ on_mouse_leave: Optional[
133
+ Union[EventHandler, EventSpec, list, function, BaseVar]
134
+ ] = None,
135
+ on_mouse_move: Optional[
136
+ Union[EventHandler, EventSpec, list, function, BaseVar]
137
+ ] = None,
138
+ on_mouse_out: Optional[
139
+ Union[EventHandler, EventSpec, list, function, BaseVar]
140
+ ] = None,
141
+ on_mouse_over: Optional[
142
+ Union[EventHandler, EventSpec, list, function, BaseVar]
143
+ ] = None,
144
+ on_mouse_up: Optional[
145
+ Union[EventHandler, EventSpec, list, function, BaseVar]
146
+ ] = None,
147
+ on_scroll: Optional[
148
+ Union[EventHandler, EventSpec, list, function, BaseVar]
149
+ ] = None,
150
+ on_unmount: Optional[
151
+ Union[EventHandler, EventSpec, list, function, BaseVar]
152
+ ] = None,
153
+ **props
154
+ ) -> "RadioCardsRoot":
155
+ """Create a new component instance.
156
+
157
+ Will prepend "RadixThemes" to the component tag to avoid conflicts with
158
+ other UI libraries for common names, like Text and Button.
159
+
160
+ Args:
161
+ *children: Child components.
162
+ size: The size of the checkbox cards: "1" | "2" | "3"
163
+ variant: Variant of button: "classic" | "surface" | "soft"
164
+ color_scheme: Override theme color for button
165
+ high_contrast: Uses a higher contrast color for the component.
166
+ columns: The number of columns:
167
+ gap: The gap between the checkbox cards:
168
+ style: The style of the component.
169
+ key: A unique key for the component.
170
+ id: The id for the component.
171
+ class_name: The class name for the component.
172
+ autofocus: Whether the component should take the focus once the page is loaded
173
+ custom_attrs: custom attribute
174
+ **props: Component properties.
175
+
176
+ Returns:
177
+ A new component instance.
178
+ """
179
+ ...
180
+
181
+ class RadioCardsItem(RadixThemesComponent):
182
+ @overload
183
+ @classmethod
184
+ def create( # type: ignore
185
+ cls,
186
+ *children,
187
+ style: Optional[Style] = None,
188
+ key: Optional[Any] = None,
189
+ id: Optional[Any] = None,
190
+ class_name: Optional[Any] = None,
191
+ autofocus: Optional[bool] = None,
192
+ custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
193
+ on_blur: Optional[
194
+ Union[EventHandler, EventSpec, list, function, BaseVar]
195
+ ] = None,
196
+ on_click: Optional[
197
+ Union[EventHandler, EventSpec, list, function, BaseVar]
198
+ ] = None,
199
+ on_context_menu: Optional[
200
+ Union[EventHandler, EventSpec, list, function, BaseVar]
201
+ ] = None,
202
+ on_double_click: Optional[
203
+ Union[EventHandler, EventSpec, list, function, BaseVar]
204
+ ] = None,
205
+ on_focus: Optional[
206
+ Union[EventHandler, EventSpec, list, function, BaseVar]
207
+ ] = None,
208
+ on_mount: Optional[
209
+ Union[EventHandler, EventSpec, list, function, BaseVar]
210
+ ] = None,
211
+ on_mouse_down: Optional[
212
+ Union[EventHandler, EventSpec, list, function, BaseVar]
213
+ ] = None,
214
+ on_mouse_enter: Optional[
215
+ Union[EventHandler, EventSpec, list, function, BaseVar]
216
+ ] = None,
217
+ on_mouse_leave: Optional[
218
+ Union[EventHandler, EventSpec, list, function, BaseVar]
219
+ ] = None,
220
+ on_mouse_move: Optional[
221
+ Union[EventHandler, EventSpec, list, function, BaseVar]
222
+ ] = None,
223
+ on_mouse_out: Optional[
224
+ Union[EventHandler, EventSpec, list, function, BaseVar]
225
+ ] = None,
226
+ on_mouse_over: Optional[
227
+ Union[EventHandler, EventSpec, list, function, BaseVar]
228
+ ] = None,
229
+ on_mouse_up: Optional[
230
+ Union[EventHandler, EventSpec, list, function, BaseVar]
231
+ ] = None,
232
+ on_scroll: Optional[
233
+ Union[EventHandler, EventSpec, list, function, BaseVar]
234
+ ] = None,
235
+ on_unmount: Optional[
236
+ Union[EventHandler, EventSpec, list, function, BaseVar]
237
+ ] = None,
238
+ **props
239
+ ) -> "RadioCardsItem":
240
+ """Create a new component instance.
241
+
242
+ Will prepend "RadixThemes" to the component tag to avoid conflicts with
243
+ other UI libraries for common names, like Text and Button.
244
+
245
+ Args:
246
+ *children: Child components.
247
+ style: The style of the component.
248
+ key: A unique key for the component.
249
+ id: The id for the component.
250
+ class_name: The class name for the component.
251
+ autofocus: Whether the component should take the focus once the page is loaded
252
+ custom_attrs: custom attribute
253
+ **props: Component properties.
254
+
255
+ Returns:
256
+ A new component instance.
257
+ """
258
+ ...
259
+
260
+ class RadioCards(SimpleNamespace):
261
+ root = staticmethod(RadioCardsRoot.create)
262
+ item = staticmethod(RadioCardsItem.create)
263
+
264
+ radio_cards = RadioCards()