reflex 0.3.5a4__py3-none-any.whl → 0.3.7__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 (138) hide show
  1. reflex/.templates/jinja/web/pages/base_page.js.jinja2 +2 -0
  2. reflex/.templates/web/utils/state.js +1 -1
  3. reflex/__init__.py +29 -6
  4. reflex/__init__.pyi +2 -0
  5. reflex/app.py +3 -0
  6. reflex/components/__init__.py +2 -0
  7. reflex/components/chakra/__init__.py +23 -0
  8. reflex/components/{media → chakra/media}/image.py +1 -28
  9. reflex/components/chakra/media/image.pyi +120 -0
  10. reflex/components/component.py +32 -4
  11. reflex/components/datadisplay/datatable.py +1 -37
  12. reflex/components/datadisplay/datatable.pyi +1 -11
  13. reflex/components/el/elements/forms.py +43 -1
  14. reflex/components/el/elements/forms.pyi +26 -1
  15. reflex/components/graphing/plotly.py +0 -22
  16. reflex/components/graphing/plotly.pyi +0 -12
  17. reflex/components/media/__init__.py +0 -1
  18. reflex/components/media/image.pyi +0 -9
  19. reflex/components/next/__init__.py +8 -0
  20. reflex/components/next/base.py +8 -0
  21. reflex/components/next/base.pyi +91 -0
  22. reflex/components/next/image.py +114 -0
  23. reflex/components/next/image.pyi +122 -0
  24. reflex/components/next/video.py +33 -0
  25. reflex/components/next/video.pyi +92 -0
  26. reflex/components/radix/primitives/__init__.py +3 -0
  27. reflex/components/radix/primitives/accordion.py +279 -0
  28. reflex/components/radix/primitives/accordion.pyi +619 -0
  29. reflex/components/radix/themes/__init__.py +4 -73
  30. reflex/components/radix/themes/base.py +7 -7
  31. reflex/components/radix/themes/base.pyi +21 -21
  32. reflex/components/radix/themes/components/__init__.py +193 -0
  33. reflex/components/radix/themes/components/alertdialog.py +72 -0
  34. reflex/components/radix/themes/components/alertdialog.pyi +733 -0
  35. reflex/components/radix/themes/components/aspectratio.py +20 -0
  36. reflex/components/radix/themes/components/aspectratio.pyi +144 -0
  37. reflex/components/radix/themes/components/avatar.py +38 -0
  38. reflex/components/radix/themes/components/avatar.pyi +233 -0
  39. reflex/components/radix/themes/components/badge.py +38 -0
  40. reflex/components/radix/themes/components/badge.pyi +291 -0
  41. reflex/components/radix/themes/components/button.py +39 -0
  42. reflex/components/radix/themes/components/button.pyi +330 -0
  43. reflex/components/radix/themes/components/callout.py +49 -0
  44. reflex/components/radix/themes/components/callout.pyi +668 -0
  45. reflex/components/radix/themes/components/card.py +25 -0
  46. reflex/components/radix/themes/components/card.pyi +214 -0
  47. reflex/components/radix/themes/components/checkbox.py +67 -0
  48. reflex/components/radix/themes/components/checkbox.pyi +249 -0
  49. reflex/components/radix/themes/components/contextmenu.py +134 -0
  50. reflex/components/radix/themes/{typography.pyi → components/contextmenu.pyi} +182 -602
  51. reflex/components/radix/themes/components/dialog.py +75 -0
  52. reflex/components/radix/themes/components/dialog.pyi +739 -0
  53. reflex/components/radix/themes/components/dropdownmenu.py +101 -0
  54. reflex/components/radix/themes/components/dropdownmenu.pyi +1065 -0
  55. reflex/components/radix/themes/components/hovercard.py +63 -0
  56. reflex/components/radix/themes/components/hovercard.pyi +487 -0
  57. reflex/components/radix/themes/components/iconbutton.py +39 -0
  58. reflex/components/radix/themes/components/iconbutton.pyi +332 -0
  59. reflex/components/radix/themes/components/icons.py +400 -0
  60. reflex/components/radix/themes/components/icons.pyi +185 -0
  61. reflex/components/radix/themes/components/inset.py +44 -0
  62. reflex/components/radix/themes/components/inset.pyi +230 -0
  63. reflex/components/radix/themes/components/popover.py +85 -0
  64. reflex/components/radix/themes/components/popover.pyi +634 -0
  65. reflex/components/radix/themes/components/radiogroup.py +72 -0
  66. reflex/components/radix/themes/components/radiogroup.pyi +369 -0
  67. reflex/components/radix/themes/components/scrollarea.py +31 -0
  68. reflex/components/radix/themes/components/scrollarea.pyi +165 -0
  69. reflex/components/radix/themes/components/select.py +137 -0
  70. reflex/components/radix/themes/{layout.pyi → components/select.pyi} +422 -418
  71. reflex/components/radix/themes/components/separator.py +30 -0
  72. reflex/components/radix/themes/components/separator.pyi +218 -0
  73. reflex/components/radix/themes/components/slider.py +68 -0
  74. reflex/components/radix/themes/components/slider.pyi +254 -0
  75. reflex/components/radix/themes/components/switch.py +68 -0
  76. reflex/components/radix/themes/components/switch.pyi +250 -0
  77. reflex/components/radix/themes/components/table.py +79 -0
  78. reflex/components/radix/themes/components/table.pyi +1485 -0
  79. reflex/components/radix/themes/components/tabs.py +65 -0
  80. reflex/components/radix/themes/components/tabs.pyi +549 -0
  81. reflex/components/radix/themes/components/textarea.py +68 -0
  82. reflex/components/radix/themes/components/textarea.pyi +333 -0
  83. reflex/components/radix/themes/{components.py → components/textfield.py} +3 -87
  84. reflex/components/radix/themes/{components.pyi → components/textfield.pyi} +202 -591
  85. reflex/components/radix/themes/layout/__init__.py +13 -0
  86. reflex/components/radix/themes/layout/base.py +48 -0
  87. reflex/components/radix/themes/layout/base.pyi +195 -0
  88. reflex/components/radix/themes/layout/box.py +12 -0
  89. reflex/components/radix/themes/layout/box.pyi +252 -0
  90. reflex/components/radix/themes/layout/container.py +23 -0
  91. reflex/components/radix/themes/layout/container.pyi +260 -0
  92. reflex/components/radix/themes/layout/flex.py +45 -0
  93. reflex/components/radix/themes/layout/flex.pyi +303 -0
  94. reflex/components/radix/themes/layout/grid.py +53 -0
  95. reflex/components/radix/themes/layout/grid.pyi +203 -0
  96. reflex/components/radix/themes/layout/section.py +20 -0
  97. reflex/components/radix/themes/layout/section.pyi +260 -0
  98. reflex/components/radix/themes/typography/__init__.py +21 -0
  99. reflex/components/radix/themes/typography/base.py +12 -0
  100. reflex/components/radix/themes/typography/blockquote.py +36 -0
  101. reflex/components/radix/themes/typography/blockquote.pyi +282 -0
  102. reflex/components/radix/themes/typography/code.py +40 -0
  103. reflex/components/radix/themes/typography/code.pyi +292 -0
  104. reflex/components/radix/themes/typography/em.py +18 -0
  105. reflex/components/radix/themes/typography/em.pyi +199 -0
  106. reflex/components/radix/themes/typography/heading.py +50 -0
  107. reflex/components/radix/themes/typography/heading.pyi +298 -0
  108. reflex/components/radix/themes/typography/kbd.py +25 -0
  109. reflex/components/radix/themes/typography/kbd.pyi +208 -0
  110. reflex/components/radix/themes/typography/link.py +49 -0
  111. reflex/components/radix/themes/typography/link.pyi +238 -0
  112. reflex/components/radix/themes/typography/quote.py +18 -0
  113. reflex/components/radix/themes/typography/quote.pyi +200 -0
  114. reflex/components/radix/themes/typography/strong.py +18 -0
  115. reflex/components/radix/themes/typography/strong.pyi +199 -0
  116. reflex/components/radix/themes/typography/text.py +50 -0
  117. reflex/components/radix/themes/typography/text.pyi +298 -0
  118. reflex/components/radix/themes/typography.py +1 -1
  119. reflex/constants/__init__.py +1 -0
  120. reflex/constants/base.py +7 -0
  121. reflex/constants/config.py +1 -1
  122. reflex/model.py +2 -1
  123. reflex/reflex.py +8 -1
  124. reflex/state.py +11 -0
  125. reflex/style.py +120 -10
  126. reflex/testing.py +4 -4
  127. reflex/utils/format.py +9 -5
  128. reflex/utils/prerequisites.py +49 -6
  129. reflex/utils/processes.py +8 -1
  130. reflex/utils/serializers.py +83 -0
  131. reflex/utils/types.py +22 -1
  132. reflex/vars.py +24 -1
  133. {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/METADATA +3 -2
  134. {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/RECORD +137 -44
  135. reflex/components/radix/themes/layout.py +0 -155
  136. {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/LICENSE +0 -0
  137. {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/WHEEL +0 -0
  138. {reflex-0.3.5a4.dist-info → reflex-0.3.7.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,291 @@
1
+ """Stub file for reflex/components/radix/themes/components/badge.py"""
2
+ # ------------------- DO NOT EDIT ----------------------
3
+ # This file was generated by `scripts/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 import el
12
+ from reflex.vars import Var
13
+ from ..base import (
14
+ CommonMarginProps,
15
+ LiteralAccentColor,
16
+ LiteralRadius,
17
+ RadixThemesComponent,
18
+ )
19
+
20
+ LiteralSwitchSize = Literal["1", "2", "3", "4"]
21
+
22
+ class Badge(el.Span, CommonMarginProps, RadixThemesComponent):
23
+ @overload
24
+ @classmethod
25
+ def create( # type: ignore
26
+ cls,
27
+ *children,
28
+ ration: Optional[Union[Var[float], float]] = None,
29
+ variant: Optional[
30
+ Union[
31
+ Var[Literal["solid", "soft", "surface", "outline"]],
32
+ Literal["solid", "soft", "surface", "outline"],
33
+ ]
34
+ ] = None,
35
+ size: Optional[Union[Var[Literal[1, 2]], Literal[1, 2]]] = None,
36
+ color: Optional[
37
+ Union[
38
+ Var[
39
+ Literal[
40
+ "tomato",
41
+ "red",
42
+ "ruby",
43
+ "crimson",
44
+ "pink",
45
+ "plum",
46
+ "purple",
47
+ "violet",
48
+ "iris",
49
+ "indigo",
50
+ "blue",
51
+ "cyan",
52
+ "teal",
53
+ "jade",
54
+ "green",
55
+ "grass",
56
+ "brown",
57
+ "orange",
58
+ "sky",
59
+ "mint",
60
+ "lime",
61
+ "yellow",
62
+ "amber",
63
+ "gold",
64
+ "bronze",
65
+ "gray",
66
+ ]
67
+ ],
68
+ Literal[
69
+ "tomato",
70
+ "red",
71
+ "ruby",
72
+ "crimson",
73
+ "pink",
74
+ "plum",
75
+ "purple",
76
+ "violet",
77
+ "iris",
78
+ "indigo",
79
+ "blue",
80
+ "cyan",
81
+ "teal",
82
+ "jade",
83
+ "green",
84
+ "grass",
85
+ "brown",
86
+ "orange",
87
+ "sky",
88
+ "mint",
89
+ "lime",
90
+ "yellow",
91
+ "amber",
92
+ "gold",
93
+ "bronze",
94
+ "gray",
95
+ ],
96
+ ]
97
+ ] = None,
98
+ high_contrast: Optional[Union[Var[bool], bool]] = None,
99
+ radius: Optional[
100
+ Union[
101
+ Var[Literal["none", "small", "medium", "large", "full"]],
102
+ Literal["none", "small", "medium", "large", "full"],
103
+ ]
104
+ ] = None,
105
+ access_key: Optional[
106
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
107
+ ] = None,
108
+ auto_capitalize: Optional[
109
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
110
+ ] = None,
111
+ content_editable: Optional[
112
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
113
+ ] = None,
114
+ context_menu: Optional[
115
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
116
+ ] = None,
117
+ dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
118
+ draggable: Optional[
119
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
120
+ ] = None,
121
+ enter_key_hint: Optional[
122
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
123
+ ] = None,
124
+ hidden: Optional[
125
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
126
+ ] = None,
127
+ input_mode: Optional[
128
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
129
+ ] = None,
130
+ item_prop: Optional[
131
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
132
+ ] = None,
133
+ lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
134
+ role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
135
+ slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
136
+ spell_check: Optional[
137
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
138
+ ] = None,
139
+ tab_index: Optional[
140
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
141
+ ] = None,
142
+ title: Optional[
143
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
144
+ ] = None,
145
+ translate: Optional[
146
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
147
+ ] = None,
148
+ m: Optional[
149
+ Union[
150
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
151
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
152
+ ]
153
+ ] = None,
154
+ mx: Optional[
155
+ Union[
156
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
157
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
158
+ ]
159
+ ] = None,
160
+ my: Optional[
161
+ Union[
162
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
163
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
164
+ ]
165
+ ] = None,
166
+ mt: Optional[
167
+ Union[
168
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
169
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
170
+ ]
171
+ ] = None,
172
+ mr: Optional[
173
+ Union[
174
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
175
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
176
+ ]
177
+ ] = None,
178
+ mb: Optional[
179
+ Union[
180
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
181
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
182
+ ]
183
+ ] = None,
184
+ ml: Optional[
185
+ Union[
186
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
187
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
188
+ ]
189
+ ] = None,
190
+ style: Optional[Style] = None,
191
+ key: Optional[Any] = None,
192
+ id: Optional[Any] = None,
193
+ class_name: Optional[Any] = None,
194
+ autofocus: Optional[bool] = None,
195
+ custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
196
+ on_blur: Optional[
197
+ Union[EventHandler, EventSpec, list, function, BaseVar]
198
+ ] = None,
199
+ on_click: Optional[
200
+ Union[EventHandler, EventSpec, list, function, BaseVar]
201
+ ] = None,
202
+ on_context_menu: Optional[
203
+ Union[EventHandler, EventSpec, list, function, BaseVar]
204
+ ] = None,
205
+ on_double_click: Optional[
206
+ Union[EventHandler, EventSpec, list, function, BaseVar]
207
+ ] = None,
208
+ on_focus: Optional[
209
+ Union[EventHandler, EventSpec, list, function, BaseVar]
210
+ ] = None,
211
+ on_mount: Optional[
212
+ Union[EventHandler, EventSpec, list, function, BaseVar]
213
+ ] = None,
214
+ on_mouse_down: Optional[
215
+ Union[EventHandler, EventSpec, list, function, BaseVar]
216
+ ] = None,
217
+ on_mouse_enter: Optional[
218
+ Union[EventHandler, EventSpec, list, function, BaseVar]
219
+ ] = None,
220
+ on_mouse_leave: Optional[
221
+ Union[EventHandler, EventSpec, list, function, BaseVar]
222
+ ] = None,
223
+ on_mouse_move: Optional[
224
+ Union[EventHandler, EventSpec, list, function, BaseVar]
225
+ ] = None,
226
+ on_mouse_out: Optional[
227
+ Union[EventHandler, EventSpec, list, function, BaseVar]
228
+ ] = None,
229
+ on_mouse_over: Optional[
230
+ Union[EventHandler, EventSpec, list, function, BaseVar]
231
+ ] = None,
232
+ on_mouse_up: Optional[
233
+ Union[EventHandler, EventSpec, list, function, BaseVar]
234
+ ] = None,
235
+ on_scroll: Optional[
236
+ Union[EventHandler, EventSpec, list, function, BaseVar]
237
+ ] = None,
238
+ on_unmount: Optional[
239
+ Union[EventHandler, EventSpec, list, function, BaseVar]
240
+ ] = None,
241
+ **props
242
+ ) -> "Badge":
243
+ """Create a new component instance.
244
+
245
+ Will prepend "RadixThemes" to the component tag to avoid conflicts with
246
+ other UI libraries for common names, like Text and Button.
247
+
248
+ Args:
249
+ *children: Child components.
250
+ ration: The ratio of the width to the height of the element
251
+ variant: The variant of the avatar
252
+ size: The size of the avatar
253
+ color: Color theme of the avatar
254
+ high_contrast: Whether to render the avatar with higher contrast color against background
255
+ radius: Override theme radius for avatar: "none" | "small" | "medium" | "large" | "full"
256
+ access_key: Provides a hint for generating a keyboard shortcut for the current element.
257
+ auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
258
+ content_editable: Indicates whether the element's content is editable.
259
+ context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
260
+ dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
261
+ draggable: Defines whether the element can be dragged.
262
+ enter_key_hint: Hints what media types the media element is able to play.
263
+ hidden: Defines whether the element is hidden.
264
+ input_mode: Defines the type of the element.
265
+ item_prop: Defines the name of the element for metadata purposes.
266
+ lang: Defines the language used in the element.
267
+ role: Defines the role of the element.
268
+ slot: Assigns a slot in a shadow DOM shadow tree to an element.
269
+ spell_check: Defines whether the element may be checked for spelling errors.
270
+ tab_index: Defines the position of the current element in the tabbing order.
271
+ title: Defines a tooltip for the element.
272
+ translate: Specifies whether the content of an element should be translated or not.
273
+ m: Margin: "0" - "9"
274
+ mx: Margin horizontal: "0" - "9"
275
+ my: Margin vertical: "0" - "9"
276
+ mt: Margin top: "0" - "9"
277
+ mr: Margin right: "0" - "9"
278
+ mb: Margin bottom: "0" - "9"
279
+ ml: Margin left: "0" - "9"
280
+ style: The style of the component.
281
+ key: A unique key for the component.
282
+ id: The id for the component.
283
+ class_name: The class name for the component.
284
+ autofocus: Whether the component should take the focus once the page is loaded
285
+ custom_attrs: custom attribute
286
+ **props: Component properties.
287
+
288
+ Returns:
289
+ A new component instance.
290
+ """
291
+ ...
@@ -0,0 +1,39 @@
1
+ """Interactive components provided by @radix-ui/themes."""
2
+ from typing import Literal
3
+
4
+ from reflex import el
5
+ from reflex.vars import Var
6
+
7
+ from ..base import (
8
+ CommonMarginProps,
9
+ LiteralAccentColor,
10
+ LiteralRadius,
11
+ LiteralVariant,
12
+ RadixThemesComponent,
13
+ )
14
+
15
+ LiteralButtonSize = Literal[1, 2, 3, 4]
16
+
17
+
18
+ class Button(el.Button, CommonMarginProps, RadixThemesComponent):
19
+ """Trigger an action or event, such as submitting a form or displaying a dialog."""
20
+
21
+ tag = "Button"
22
+
23
+ # Change the default rendered element for the one passed as a child, merging their props and behavior.
24
+ as_child: Var[bool]
25
+
26
+ # Button size "1" - "4"
27
+ size: Var[LiteralButtonSize]
28
+
29
+ # Variant of button: "solid" | "soft" | "outline" | "ghost"
30
+ variant: Var[LiteralVariant]
31
+
32
+ # Override theme color for button
33
+ color: Var[LiteralAccentColor]
34
+
35
+ # Whether to render the button with higher contrast color against background
36
+ high_contrast: Var[bool]
37
+
38
+ # Override theme radius for button: "none" | "small" | "medium" | "large" | "full"
39
+ radius: Var[LiteralRadius]
@@ -0,0 +1,330 @@
1
+ """Stub file for reflex/components/radix/themes/components/button.py"""
2
+ # ------------------- DO NOT EDIT ----------------------
3
+ # This file was generated by `scripts/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 import el
12
+ from reflex.vars import Var
13
+ from ..base import (
14
+ CommonMarginProps,
15
+ LiteralAccentColor,
16
+ LiteralRadius,
17
+ LiteralVariant,
18
+ RadixThemesComponent,
19
+ )
20
+
21
+ LiteralButtonSize = Literal[1, 2, 3, 4]
22
+
23
+ class Button(el.Button, CommonMarginProps, RadixThemesComponent):
24
+ @overload
25
+ @classmethod
26
+ def create( # type: ignore
27
+ cls,
28
+ *children,
29
+ as_child: Optional[Union[Var[bool], bool]] = None,
30
+ size: Optional[Union[Var[Literal[1, 2, 3, 4]], Literal[1, 2, 3, 4]]] = None,
31
+ variant: Optional[
32
+ Union[
33
+ Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]],
34
+ Literal["classic", "solid", "soft", "surface", "outline", "ghost"],
35
+ ]
36
+ ] = None,
37
+ color: Optional[
38
+ Union[
39
+ Var[
40
+ Literal[
41
+ "tomato",
42
+ "red",
43
+ "ruby",
44
+ "crimson",
45
+ "pink",
46
+ "plum",
47
+ "purple",
48
+ "violet",
49
+ "iris",
50
+ "indigo",
51
+ "blue",
52
+ "cyan",
53
+ "teal",
54
+ "jade",
55
+ "green",
56
+ "grass",
57
+ "brown",
58
+ "orange",
59
+ "sky",
60
+ "mint",
61
+ "lime",
62
+ "yellow",
63
+ "amber",
64
+ "gold",
65
+ "bronze",
66
+ "gray",
67
+ ]
68
+ ],
69
+ Literal[
70
+ "tomato",
71
+ "red",
72
+ "ruby",
73
+ "crimson",
74
+ "pink",
75
+ "plum",
76
+ "purple",
77
+ "violet",
78
+ "iris",
79
+ "indigo",
80
+ "blue",
81
+ "cyan",
82
+ "teal",
83
+ "jade",
84
+ "green",
85
+ "grass",
86
+ "brown",
87
+ "orange",
88
+ "sky",
89
+ "mint",
90
+ "lime",
91
+ "yellow",
92
+ "amber",
93
+ "gold",
94
+ "bronze",
95
+ "gray",
96
+ ],
97
+ ]
98
+ ] = None,
99
+ high_contrast: Optional[Union[Var[bool], bool]] = None,
100
+ radius: Optional[
101
+ Union[
102
+ Var[Literal["none", "small", "medium", "large", "full"]],
103
+ Literal["none", "small", "medium", "large", "full"],
104
+ ]
105
+ ] = None,
106
+ auto_focus: Optional[
107
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
108
+ ] = None,
109
+ disabled: Optional[
110
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
111
+ ] = None,
112
+ form: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
113
+ form_action: Optional[
114
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
115
+ ] = None,
116
+ form_enc_type: Optional[
117
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
118
+ ] = None,
119
+ form_method: Optional[
120
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
121
+ ] = None,
122
+ form_no_validate: Optional[
123
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
124
+ ] = None,
125
+ form_target: Optional[
126
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
127
+ ] = None,
128
+ name: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
129
+ type: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
130
+ value: Optional[
131
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
132
+ ] = None,
133
+ access_key: Optional[
134
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
135
+ ] = None,
136
+ auto_capitalize: Optional[
137
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
138
+ ] = None,
139
+ content_editable: Optional[
140
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
141
+ ] = None,
142
+ context_menu: Optional[
143
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
144
+ ] = None,
145
+ dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
146
+ draggable: Optional[
147
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
148
+ ] = None,
149
+ enter_key_hint: Optional[
150
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
151
+ ] = None,
152
+ hidden: Optional[
153
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
154
+ ] = None,
155
+ input_mode: Optional[
156
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
157
+ ] = None,
158
+ item_prop: Optional[
159
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
160
+ ] = None,
161
+ lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
162
+ role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
163
+ slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
164
+ spell_check: Optional[
165
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
166
+ ] = None,
167
+ tab_index: Optional[
168
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
169
+ ] = None,
170
+ title: Optional[
171
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
172
+ ] = None,
173
+ translate: Optional[
174
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
175
+ ] = None,
176
+ m: Optional[
177
+ Union[
178
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
179
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
180
+ ]
181
+ ] = None,
182
+ mx: Optional[
183
+ Union[
184
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
185
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
186
+ ]
187
+ ] = None,
188
+ my: Optional[
189
+ Union[
190
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
191
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
192
+ ]
193
+ ] = None,
194
+ mt: Optional[
195
+ Union[
196
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
197
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
198
+ ]
199
+ ] = None,
200
+ mr: Optional[
201
+ Union[
202
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
203
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
204
+ ]
205
+ ] = None,
206
+ mb: Optional[
207
+ Union[
208
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
209
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
210
+ ]
211
+ ] = None,
212
+ ml: Optional[
213
+ Union[
214
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
215
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
216
+ ]
217
+ ] = None,
218
+ style: Optional[Style] = None,
219
+ key: Optional[Any] = None,
220
+ id: Optional[Any] = None,
221
+ class_name: Optional[Any] = None,
222
+ autofocus: Optional[bool] = None,
223
+ custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
224
+ on_blur: Optional[
225
+ Union[EventHandler, EventSpec, list, function, BaseVar]
226
+ ] = None,
227
+ on_click: Optional[
228
+ Union[EventHandler, EventSpec, list, function, BaseVar]
229
+ ] = None,
230
+ on_context_menu: Optional[
231
+ Union[EventHandler, EventSpec, list, function, BaseVar]
232
+ ] = None,
233
+ on_double_click: Optional[
234
+ Union[EventHandler, EventSpec, list, function, BaseVar]
235
+ ] = None,
236
+ on_focus: Optional[
237
+ Union[EventHandler, EventSpec, list, function, BaseVar]
238
+ ] = None,
239
+ on_mount: Optional[
240
+ Union[EventHandler, EventSpec, list, function, BaseVar]
241
+ ] = None,
242
+ on_mouse_down: Optional[
243
+ Union[EventHandler, EventSpec, list, function, BaseVar]
244
+ ] = None,
245
+ on_mouse_enter: Optional[
246
+ Union[EventHandler, EventSpec, list, function, BaseVar]
247
+ ] = None,
248
+ on_mouse_leave: Optional[
249
+ Union[EventHandler, EventSpec, list, function, BaseVar]
250
+ ] = None,
251
+ on_mouse_move: Optional[
252
+ Union[EventHandler, EventSpec, list, function, BaseVar]
253
+ ] = None,
254
+ on_mouse_out: Optional[
255
+ Union[EventHandler, EventSpec, list, function, BaseVar]
256
+ ] = None,
257
+ on_mouse_over: Optional[
258
+ Union[EventHandler, EventSpec, list, function, BaseVar]
259
+ ] = None,
260
+ on_mouse_up: Optional[
261
+ Union[EventHandler, EventSpec, list, function, BaseVar]
262
+ ] = None,
263
+ on_scroll: Optional[
264
+ Union[EventHandler, EventSpec, list, function, BaseVar]
265
+ ] = None,
266
+ on_unmount: Optional[
267
+ Union[EventHandler, EventSpec, list, function, BaseVar]
268
+ ] = None,
269
+ **props
270
+ ) -> "Button":
271
+ """Create a new component instance.
272
+
273
+ Will prepend "RadixThemes" to the component tag to avoid conflicts with
274
+ other UI libraries for common names, like Text and Button.
275
+
276
+ Args:
277
+ *children: Child components.
278
+ as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
279
+ size: Button size "1" - "4"
280
+ variant: Variant of button: "solid" | "soft" | "outline" | "ghost"
281
+ color: Override theme color for button
282
+ high_contrast: Whether to render the button with higher contrast color against background
283
+ radius: Override theme radius for button: "none" | "small" | "medium" | "large" | "full"
284
+ auto_focus: Automatically focuses the button when the page loads
285
+ disabled: Disables the button
286
+ form: Associates the button with a form (by id)
287
+ form_action: URL to send the form data to (for type="submit" buttons)
288
+ form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
289
+ form_method: HTTP method to use for sending form data (for type="submit" buttons)
290
+ form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
291
+ form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
292
+ name: Name of the button, used when sending form data
293
+ type: Type of the button (submit, reset, or button)
294
+ value: Value of the button, used when sending form data
295
+ access_key: Provides a hint for generating a keyboard shortcut for the current element.
296
+ auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
297
+ content_editable: Indicates whether the element's content is editable.
298
+ context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
299
+ dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
300
+ draggable: Defines whether the element can be dragged.
301
+ enter_key_hint: Hints what media types the media element is able to play.
302
+ hidden: Defines whether the element is hidden.
303
+ input_mode: Defines the type of the element.
304
+ item_prop: Defines the name of the element for metadata purposes.
305
+ lang: Defines the language used in the element.
306
+ role: Defines the role of the element.
307
+ slot: Assigns a slot in a shadow DOM shadow tree to an element.
308
+ spell_check: Defines whether the element may be checked for spelling errors.
309
+ tab_index: Defines the position of the current element in the tabbing order.
310
+ title: Defines a tooltip for the element.
311
+ translate: Specifies whether the content of an element should be translated or not.
312
+ m: Margin: "0" - "9"
313
+ mx: Margin horizontal: "0" - "9"
314
+ my: Margin vertical: "0" - "9"
315
+ mt: Margin top: "0" - "9"
316
+ mr: Margin right: "0" - "9"
317
+ mb: Margin bottom: "0" - "9"
318
+ ml: Margin left: "0" - "9"
319
+ style: The style of the component.
320
+ key: A unique key for the component.
321
+ id: The id for the component.
322
+ class_name: The class name for the component.
323
+ autofocus: Whether the component should take the focus once the page is loaded
324
+ custom_attrs: custom attribute
325
+ **props: Component properties.
326
+
327
+ Returns:
328
+ A new component instance.
329
+ """
330
+ ...