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
@@ -1,4 +1,4 @@
1
- """Stub file for reflex/components/radix/themes/components.py"""
1
+ """Stub file for reflex/components/radix/themes/components/textfield.py"""
2
2
  # ------------------- DO NOT EDIT ----------------------
3
3
  # This file was generated by `scripts/pyi_generator.py`!
4
4
  # ------------------------------------------------------
@@ -13,253 +13,30 @@ from reflex.components.component import Component
13
13
  from reflex.components.forms.debounce import DebounceInput
14
14
  from reflex.constants import EventTriggers
15
15
  from reflex.vars import Var
16
- from .base import (
16
+ from ..base import (
17
17
  CommonMarginProps,
18
18
  LiteralAccentColor,
19
19
  LiteralRadius,
20
20
  LiteralSize,
21
- LiteralVariant,
22
21
  RadixThemesComponent,
23
22
  )
24
23
 
25
- LiteralButtonSize = Literal["1", "2", "3", "4"]
26
-
27
- class Button(CommonMarginProps, RadixThemesComponent):
28
- @overload
29
- @classmethod
30
- def create( # type: ignore
31
- cls,
32
- *children,
33
- as_child: Optional[Union[Var[bool], bool]] = None,
34
- size: Optional[
35
- Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]]
36
- ] = None,
37
- variant: Optional[
38
- Union[
39
- Var[Literal["solid", "soft", "outline", "ghost"]],
40
- Literal["solid", "soft", "outline", "ghost"],
41
- ]
42
- ] = None,
43
- color: Optional[
44
- Union[
45
- Var[
46
- Literal[
47
- "tomato",
48
- "red",
49
- "ruby",
50
- "crimson",
51
- "pink",
52
- "plum",
53
- "purple",
54
- "violet",
55
- "iris",
56
- "indigo",
57
- "blue",
58
- "cyan",
59
- "teal",
60
- "jade",
61
- "green",
62
- "grass",
63
- "brown",
64
- "orange",
65
- "sky",
66
- "mint",
67
- "lime",
68
- "yellow",
69
- "amber",
70
- "gold",
71
- "bronze",
72
- "gray",
73
- ]
74
- ],
75
- Literal[
76
- "tomato",
77
- "red",
78
- "ruby",
79
- "crimson",
80
- "pink",
81
- "plum",
82
- "purple",
83
- "violet",
84
- "iris",
85
- "indigo",
86
- "blue",
87
- "cyan",
88
- "teal",
89
- "jade",
90
- "green",
91
- "grass",
92
- "brown",
93
- "orange",
94
- "sky",
95
- "mint",
96
- "lime",
97
- "yellow",
98
- "amber",
99
- "gold",
100
- "bronze",
101
- "gray",
102
- ],
103
- ]
104
- ] = None,
105
- high_contrast: Optional[Union[Var[bool], bool]] = None,
106
- radius: Optional[
107
- Union[
108
- Var[Literal["none", "small", "medium", "large", "full"]],
109
- Literal["none", "small", "medium", "large", "full"],
110
- ]
111
- ] = None,
112
- m: Optional[
113
- Union[
114
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
115
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
116
- ]
117
- ] = None,
118
- mx: Optional[
119
- Union[
120
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
121
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
122
- ]
123
- ] = None,
124
- my: Optional[
125
- Union[
126
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
127
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
128
- ]
129
- ] = None,
130
- mt: Optional[
131
- Union[
132
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
133
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
134
- ]
135
- ] = None,
136
- mr: Optional[
137
- Union[
138
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
139
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
140
- ]
141
- ] = None,
142
- mb: Optional[
143
- Union[
144
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
145
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
146
- ]
147
- ] = None,
148
- ml: Optional[
149
- Union[
150
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
151
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
152
- ]
153
- ] = None,
154
- style: Optional[Style] = None,
155
- key: Optional[Any] = None,
156
- id: Optional[Any] = None,
157
- class_name: Optional[Any] = None,
158
- autofocus: Optional[bool] = None,
159
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
160
- on_blur: Optional[
161
- Union[EventHandler, EventSpec, list, function, BaseVar]
162
- ] = None,
163
- on_click: Optional[
164
- Union[EventHandler, EventSpec, list, function, BaseVar]
165
- ] = None,
166
- on_context_menu: Optional[
167
- Union[EventHandler, EventSpec, list, function, BaseVar]
168
- ] = None,
169
- on_double_click: Optional[
170
- Union[EventHandler, EventSpec, list, function, BaseVar]
171
- ] = None,
172
- on_focus: Optional[
173
- Union[EventHandler, EventSpec, list, function, BaseVar]
174
- ] = None,
175
- on_mount: Optional[
176
- Union[EventHandler, EventSpec, list, function, BaseVar]
177
- ] = None,
178
- on_mouse_down: Optional[
179
- Union[EventHandler, EventSpec, list, function, BaseVar]
180
- ] = None,
181
- on_mouse_enter: Optional[
182
- Union[EventHandler, EventSpec, list, function, BaseVar]
183
- ] = None,
184
- on_mouse_leave: Optional[
185
- Union[EventHandler, EventSpec, list, function, BaseVar]
186
- ] = None,
187
- on_mouse_move: Optional[
188
- Union[EventHandler, EventSpec, list, function, BaseVar]
189
- ] = None,
190
- on_mouse_out: Optional[
191
- Union[EventHandler, EventSpec, list, function, BaseVar]
192
- ] = None,
193
- on_mouse_over: Optional[
194
- Union[EventHandler, EventSpec, list, function, BaseVar]
195
- ] = None,
196
- on_mouse_up: Optional[
197
- Union[EventHandler, EventSpec, list, function, BaseVar]
198
- ] = None,
199
- on_scroll: Optional[
200
- Union[EventHandler, EventSpec, list, function, BaseVar]
201
- ] = None,
202
- on_unmount: Optional[
203
- Union[EventHandler, EventSpec, list, function, BaseVar]
204
- ] = None,
205
- **props
206
- ) -> "Button":
207
- """Create a new component instance.
208
-
209
- Will prepend "RadixThemes" to the component tag to avoid conflicts with
210
- other UI libraries for common names, like Text and Button.
211
-
212
- Args:
213
- *children: Child components.
214
- as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
215
- size: Button size "1" - "4"
216
- variant: Variant of button: "solid" | "soft" | "outline" | "ghost"
217
- color: Override theme color for button
218
- high_contrast: Whether to render the button with higher contrast color against background
219
- radius: Override theme radius for button: "none" | "small" | "medium" | "large" | "full"
220
- m: Margin: "0" - "9"
221
- mx: Margin horizontal: "0" - "9"
222
- my: Margin vertical: "0" - "9"
223
- mt: Margin top: "0" - "9"
224
- mr: Margin right: "0" - "9"
225
- mb: Margin bottom: "0" - "9"
226
- ml: Margin left: "0" - "9"
227
- style: The style of the component.
228
- key: A unique key for the component.
229
- id: The id for the component.
230
- class_name: The class name for the component.
231
- autofocus: Whether the component should take the focus once the page is loaded
232
- custom_attrs: custom attribute
233
- **props: Component properties.
234
-
235
- Returns:
236
- A new component instance.
237
- """
238
- ...
239
-
240
- LiteralSwitchSize = Literal["1", "2", "3", "4"]
24
+ LiteralTextFieldSize = Literal["1", "2", "3"]
25
+ LiteralTextFieldVariant = Literal["classic", "surface", "soft"]
241
26
 
242
- class Switch(CommonMarginProps, RadixThemesComponent):
243
- def get_event_triggers(self) -> Dict[str, Any]: ...
27
+ class TextFieldRoot(el.Div, CommonMarginProps, RadixThemesComponent):
244
28
  @overload
245
29
  @classmethod
246
30
  def create( # type: ignore
247
31
  cls,
248
32
  *children,
249
- as_child: Optional[Union[Var[bool], bool]] = None,
250
- default_checked: Optional[Union[Var[bool], bool]] = None,
251
- checked: Optional[Union[Var[bool], bool]] = None,
252
- disabled: Optional[Union[Var[bool], bool]] = None,
253
- required: Optional[Union[Var[bool], bool]] = None,
254
- name: Optional[Union[Var[str], str]] = None,
255
- value: Optional[Union[Var[str], str]] = None,
256
33
  size: Optional[
257
- Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]]
34
+ Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
258
35
  ] = None,
259
36
  variant: Optional[
260
37
  Union[
261
- Var[Literal["solid", "soft", "outline", "ghost"]],
262
- Literal["solid", "soft", "outline", "ghost"],
38
+ Var[Literal["classic", "surface", "soft"]],
39
+ Literal["classic", "surface", "soft"],
263
40
  ]
264
41
  ] = None,
265
42
  color: Optional[
@@ -324,276 +101,95 @@ class Switch(CommonMarginProps, RadixThemesComponent):
324
101
  ],
325
102
  ]
326
103
  ] = None,
327
- high_contrast: Optional[Union[Var[bool], bool]] = None,
328
104
  radius: Optional[
329
105
  Union[
330
106
  Var[Literal["none", "small", "medium", "large", "full"]],
331
107
  Literal["none", "small", "medium", "large", "full"],
332
108
  ]
333
109
  ] = None,
334
- m: Optional[
335
- Union[
336
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
337
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
338
- ]
339
- ] = None,
340
- mx: Optional[
341
- Union[
342
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
343
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
344
- ]
345
- ] = None,
346
- my: Optional[
347
- Union[
348
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
349
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
350
- ]
351
- ] = None,
352
- mt: Optional[
353
- Union[
354
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
355
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
356
- ]
357
- ] = None,
358
- mr: Optional[
359
- Union[
360
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
361
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
362
- ]
363
- ] = None,
364
- mb: Optional[
365
- Union[
366
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
367
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
368
- ]
369
- ] = None,
370
- ml: Optional[
371
- Union[
372
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
373
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
374
- ]
375
- ] = None,
376
- style: Optional[Style] = None,
377
- key: Optional[Any] = None,
378
- id: Optional[Any] = None,
379
- class_name: Optional[Any] = None,
380
- autofocus: Optional[bool] = None,
381
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
382
- on_blur: Optional[
383
- Union[EventHandler, EventSpec, list, function, BaseVar]
384
- ] = None,
385
- on_checked_change: Optional[
386
- Union[EventHandler, EventSpec, list, function, BaseVar]
387
- ] = None,
388
- on_click: Optional[
389
- Union[EventHandler, EventSpec, list, function, BaseVar]
390
- ] = None,
391
- on_context_menu: Optional[
392
- Union[EventHandler, EventSpec, list, function, BaseVar]
393
- ] = None,
394
- on_double_click: Optional[
395
- Union[EventHandler, EventSpec, list, function, BaseVar]
396
- ] = None,
397
- on_focus: Optional[
398
- Union[EventHandler, EventSpec, list, function, BaseVar]
399
- ] = None,
400
- on_mount: Optional[
401
- Union[EventHandler, EventSpec, list, function, BaseVar]
402
- ] = None,
403
- on_mouse_down: Optional[
404
- Union[EventHandler, EventSpec, list, function, BaseVar]
405
- ] = None,
406
- on_mouse_enter: Optional[
407
- Union[EventHandler, EventSpec, list, function, BaseVar]
110
+ access_key: Optional[
111
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
408
112
  ] = None,
409
- on_mouse_leave: Optional[
410
- Union[EventHandler, EventSpec, list, function, BaseVar]
113
+ auto_capitalize: Optional[
114
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
411
115
  ] = None,
412
- on_mouse_move: Optional[
413
- Union[EventHandler, EventSpec, list, function, BaseVar]
116
+ content_editable: Optional[
117
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
414
118
  ] = None,
415
- on_mouse_out: Optional[
416
- Union[EventHandler, EventSpec, list, function, BaseVar]
119
+ context_menu: Optional[
120
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
417
121
  ] = None,
418
- on_mouse_over: Optional[
419
- Union[EventHandler, EventSpec, list, function, BaseVar]
122
+ dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
123
+ draggable: Optional[
124
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
420
125
  ] = None,
421
- on_mouse_up: Optional[
422
- Union[EventHandler, EventSpec, list, function, BaseVar]
126
+ enter_key_hint: Optional[
127
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
423
128
  ] = None,
424
- on_scroll: Optional[
425
- Union[EventHandler, EventSpec, list, function, BaseVar]
129
+ hidden: Optional[
130
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
426
131
  ] = None,
427
- on_unmount: Optional[
428
- Union[EventHandler, EventSpec, list, function, BaseVar]
132
+ input_mode: Optional[
133
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
429
134
  ] = None,
430
- **props
431
- ) -> "Switch":
432
- """Create a new component instance.
433
-
434
- Will prepend "RadixThemes" to the component tag to avoid conflicts with
435
- other UI libraries for common names, like Text and Button.
436
-
437
- Args:
438
- *children: Child components.
439
- as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
440
- default_checked: Whether the switch is checked by default
441
- checked: Whether the switch is checked
442
- disabled: If true, prevent the user from interacting with the switch
443
- required: If true, the user must interact with the switch to submit the form
444
- name: The name of the switch (when submitting a form)
445
- value: The value associated with the "on" position
446
- size: Switch size "1" - "4"
447
- variant: Variant of switch: "solid" | "soft" | "outline" | "ghost"
448
- color: Override theme color for switch
449
- high_contrast: Whether to render the switch with higher contrast color against background
450
- radius: Override theme radius for switch: "none" | "small" | "medium" | "large" | "full"
451
- m: Margin: "0" - "9"
452
- mx: Margin horizontal: "0" - "9"
453
- my: Margin vertical: "0" - "9"
454
- mt: Margin top: "0" - "9"
455
- mr: Margin right: "0" - "9"
456
- mb: Margin bottom: "0" - "9"
457
- ml: Margin left: "0" - "9"
458
- style: The style of the component.
459
- key: A unique key for the component.
460
- id: The id for the component.
461
- class_name: The class name for the component.
462
- autofocus: Whether the component should take the focus once the page is loaded
463
- custom_attrs: custom attribute
464
- **props: Component properties.
465
-
466
- Returns:
467
- A new component instance.
468
- """
469
- ...
470
-
471
- LiteralTextFieldSize = Literal["1", "2", "3"]
472
- LiteralTextFieldVariant = Literal["classic", "surface", "soft"]
473
-
474
- class TextFieldRoot(CommonMarginProps, RadixThemesComponent):
475
- @overload
476
- @classmethod
477
- def create( # type: ignore
478
- cls,
479
- *children,
480
- size: Optional[
481
- Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
135
+ item_prop: Optional[
136
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
482
137
  ] = None,
483
- variant: Optional[
484
- Union[
485
- Var[Literal["classic", "surface", "soft"]],
486
- Literal["classic", "surface", "soft"],
487
- ]
138
+ lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
139
+ role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
140
+ slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
141
+ spell_check: Optional[
142
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
488
143
  ] = None,
489
- color: Optional[
490
- Union[
491
- Var[
492
- Literal[
493
- "tomato",
494
- "red",
495
- "ruby",
496
- "crimson",
497
- "pink",
498
- "plum",
499
- "purple",
500
- "violet",
501
- "iris",
502
- "indigo",
503
- "blue",
504
- "cyan",
505
- "teal",
506
- "jade",
507
- "green",
508
- "grass",
509
- "brown",
510
- "orange",
511
- "sky",
512
- "mint",
513
- "lime",
514
- "yellow",
515
- "amber",
516
- "gold",
517
- "bronze",
518
- "gray",
519
- ]
520
- ],
521
- Literal[
522
- "tomato",
523
- "red",
524
- "ruby",
525
- "crimson",
526
- "pink",
527
- "plum",
528
- "purple",
529
- "violet",
530
- "iris",
531
- "indigo",
532
- "blue",
533
- "cyan",
534
- "teal",
535
- "jade",
536
- "green",
537
- "grass",
538
- "brown",
539
- "orange",
540
- "sky",
541
- "mint",
542
- "lime",
543
- "yellow",
544
- "amber",
545
- "gold",
546
- "bronze",
547
- "gray",
548
- ],
549
- ]
144
+ tab_index: Optional[
145
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
550
146
  ] = None,
551
- radius: Optional[
552
- Union[
553
- Var[Literal["none", "small", "medium", "large", "full"]],
554
- Literal["none", "small", "medium", "large", "full"],
555
- ]
147
+ title: Optional[
148
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
149
+ ] = None,
150
+ translate: Optional[
151
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
556
152
  ] = None,
557
153
  m: Optional[
558
154
  Union[
559
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
560
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
155
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
156
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
561
157
  ]
562
158
  ] = None,
563
159
  mx: Optional[
564
160
  Union[
565
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
566
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
161
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
162
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
567
163
  ]
568
164
  ] = None,
569
165
  my: Optional[
570
166
  Union[
571
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
572
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
167
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
168
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
573
169
  ]
574
170
  ] = None,
575
171
  mt: Optional[
576
172
  Union[
577
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
578
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
173
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
174
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
579
175
  ]
580
176
  ] = None,
581
177
  mr: Optional[
582
178
  Union[
583
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
584
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
179
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
180
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
585
181
  ]
586
182
  ] = None,
587
183
  mb: Optional[
588
184
  Union[
589
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
590
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
185
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
186
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
591
187
  ]
592
188
  ] = None,
593
189
  ml: Optional[
594
190
  Union[
595
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
596
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
191
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
192
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
597
193
  ]
598
194
  ] = None,
599
195
  style: Optional[Style] = None,
@@ -660,6 +256,23 @@ class TextFieldRoot(CommonMarginProps, RadixThemesComponent):
660
256
  variant: Variant of text field: "classic" | "surface" | "soft"
661
257
  color: Override theme color for text field
662
258
  radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
259
+ access_key: Provides a hint for generating a keyboard shortcut for the current element.
260
+ auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
261
+ content_editable: Indicates whether the element's content is editable.
262
+ context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
263
+ dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
264
+ draggable: Defines whether the element can be dragged.
265
+ enter_key_hint: Hints what media types the media element is able to play.
266
+ hidden: Defines whether the element is hidden.
267
+ input_mode: Defines the type of the element.
268
+ item_prop: Defines the name of the element for metadata purposes.
269
+ lang: Defines the language used in the element.
270
+ role: Defines the role of the element.
271
+ slot: Assigns a slot in a shadow DOM shadow tree to an element.
272
+ spell_check: Defines whether the element may be checked for spelling errors.
273
+ tab_index: Defines the position of the current element in the tabbing order.
274
+ title: Defines a tooltip for the element.
275
+ translate: Specifies whether the content of an element should be translated or not.
663
276
  m: Margin: "0" - "9"
664
277
  mx: Margin horizontal: "0" - "9"
665
278
  my: Margin vertical: "0" - "9"
@@ -680,131 +293,12 @@ class TextFieldRoot(CommonMarginProps, RadixThemesComponent):
680
293
  """
681
294
  ...
682
295
 
683
- class TextField(TextFieldRoot, el.Input):
296
+ class TextFieldInput(el.Input, TextFieldRoot):
684
297
  @overload
685
298
  @classmethod
686
299
  def create( # type: ignore
687
300
  cls,
688
301
  *children,
689
- size: Optional[
690
- Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
691
- ] = None,
692
- variant: Optional[
693
- Union[
694
- Var[Literal["classic", "surface", "soft"]],
695
- Literal["classic", "surface", "soft"],
696
- ]
697
- ] = None,
698
- color: Optional[
699
- Union[
700
- Var[
701
- Literal[
702
- "tomato",
703
- "red",
704
- "ruby",
705
- "crimson",
706
- "pink",
707
- "plum",
708
- "purple",
709
- "violet",
710
- "iris",
711
- "indigo",
712
- "blue",
713
- "cyan",
714
- "teal",
715
- "jade",
716
- "green",
717
- "grass",
718
- "brown",
719
- "orange",
720
- "sky",
721
- "mint",
722
- "lime",
723
- "yellow",
724
- "amber",
725
- "gold",
726
- "bronze",
727
- "gray",
728
- ]
729
- ],
730
- Literal[
731
- "tomato",
732
- "red",
733
- "ruby",
734
- "crimson",
735
- "pink",
736
- "plum",
737
- "purple",
738
- "violet",
739
- "iris",
740
- "indigo",
741
- "blue",
742
- "cyan",
743
- "teal",
744
- "jade",
745
- "green",
746
- "grass",
747
- "brown",
748
- "orange",
749
- "sky",
750
- "mint",
751
- "lime",
752
- "yellow",
753
- "amber",
754
- "gold",
755
- "bronze",
756
- "gray",
757
- ],
758
- ]
759
- ] = None,
760
- radius: Optional[
761
- Union[
762
- Var[Literal["none", "small", "medium", "large", "full"]],
763
- Literal["none", "small", "medium", "large", "full"],
764
- ]
765
- ] = None,
766
- m: Optional[
767
- Union[
768
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
769
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
770
- ]
771
- ] = None,
772
- mx: Optional[
773
- Union[
774
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
775
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
776
- ]
777
- ] = None,
778
- my: Optional[
779
- Union[
780
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
781
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
782
- ]
783
- ] = None,
784
- mt: Optional[
785
- Union[
786
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
787
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
788
- ]
789
- ] = None,
790
- mr: Optional[
791
- Union[
792
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
793
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
794
- ]
795
- ] = None,
796
- mb: Optional[
797
- Union[
798
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
799
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
800
- ]
801
- ] = None,
802
- ml: Optional[
803
- Union[
804
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
805
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
806
- ]
807
- ] = None,
808
302
  accept: Optional[
809
303
  Union[Var[Union[str, int, bool]], Union[str, int, bool]]
810
304
  ] = None,
@@ -871,6 +365,7 @@ class TextField(TextFieldRoot, el.Input):
871
365
  required: Optional[
872
366
  Union[Var[Union[str, int, bool]], Union[str, int, bool]]
873
367
  ] = None,
368
+ size: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
874
369
  src: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
875
370
  step: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
876
371
  type: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
@@ -883,6 +378,80 @@ class TextField(TextFieldRoot, el.Input):
883
378
  width: Optional[
884
379
  Union[Var[Union[str, int, bool]], Union[str, int, bool]]
885
380
  ] = None,
381
+ variant: Optional[
382
+ Union[
383
+ Var[Literal["classic", "surface", "soft"]],
384
+ Literal["classic", "surface", "soft"],
385
+ ]
386
+ ] = None,
387
+ color: Optional[
388
+ Union[
389
+ Var[
390
+ Literal[
391
+ "tomato",
392
+ "red",
393
+ "ruby",
394
+ "crimson",
395
+ "pink",
396
+ "plum",
397
+ "purple",
398
+ "violet",
399
+ "iris",
400
+ "indigo",
401
+ "blue",
402
+ "cyan",
403
+ "teal",
404
+ "jade",
405
+ "green",
406
+ "grass",
407
+ "brown",
408
+ "orange",
409
+ "sky",
410
+ "mint",
411
+ "lime",
412
+ "yellow",
413
+ "amber",
414
+ "gold",
415
+ "bronze",
416
+ "gray",
417
+ ]
418
+ ],
419
+ Literal[
420
+ "tomato",
421
+ "red",
422
+ "ruby",
423
+ "crimson",
424
+ "pink",
425
+ "plum",
426
+ "purple",
427
+ "violet",
428
+ "iris",
429
+ "indigo",
430
+ "blue",
431
+ "cyan",
432
+ "teal",
433
+ "jade",
434
+ "green",
435
+ "grass",
436
+ "brown",
437
+ "orange",
438
+ "sky",
439
+ "mint",
440
+ "lime",
441
+ "yellow",
442
+ "amber",
443
+ "gold",
444
+ "bronze",
445
+ "gray",
446
+ ],
447
+ ]
448
+ ] = None,
449
+ radius: Optional[
450
+ Union[
451
+ Var[Literal["none", "small", "medium", "large", "full"]],
452
+ Literal["none", "small", "medium", "large", "full"],
453
+ ]
454
+ ] = None,
886
455
  access_key: Optional[
887
456
  Union[Var[Union[str, int, bool]], Union[str, int, bool]]
888
457
  ] = None,
@@ -926,6 +495,48 @@ class TextField(TextFieldRoot, el.Input):
926
495
  translate: Optional[
927
496
  Union[Var[Union[str, int, bool]], Union[str, int, bool]]
928
497
  ] = None,
498
+ m: Optional[
499
+ Union[
500
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
501
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
502
+ ]
503
+ ] = None,
504
+ mx: Optional[
505
+ Union[
506
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
507
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
508
+ ]
509
+ ] = None,
510
+ my: Optional[
511
+ Union[
512
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
513
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
514
+ ]
515
+ ] = None,
516
+ mt: Optional[
517
+ Union[
518
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
519
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
520
+ ]
521
+ ] = None,
522
+ mr: Optional[
523
+ Union[
524
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
525
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
526
+ ]
527
+ ] = None,
528
+ mb: Optional[
529
+ Union[
530
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
531
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
532
+ ]
533
+ ] = None,
534
+ ml: Optional[
535
+ Union[
536
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
537
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
538
+ ]
539
+ ] = None,
929
540
  style: Optional[Style] = None,
930
541
  key: Optional[Any] = None,
931
542
  id: Optional[Any] = None,
@@ -987,22 +598,11 @@ class TextField(TextFieldRoot, el.Input):
987
598
  Union[EventHandler, EventSpec, list, function, BaseVar]
988
599
  ] = None,
989
600
  **props
990
- ) -> "TextField":
601
+ ) -> "TextFieldInput":
991
602
  """Create an Input component.
992
603
 
993
604
  Args:
994
605
  *children: The children of the component.
995
- size: Specifies the visible width of a text control
996
- variant: Variant of text field: "classic" | "surface" | "soft"
997
- color: Override theme color for text field
998
- radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
999
- m: Margin: "0" - "9"
1000
- mx: Margin horizontal: "0" - "9"
1001
- my: Margin vertical: "0" - "9"
1002
- mt: Margin top: "0" - "9"
1003
- mr: Margin right: "0" - "9"
1004
- mb: Margin bottom: "0" - "9"
1005
- ml: Margin left: "0" - "9"
1006
606
  accept: Accepted types of files when the input is file type
1007
607
  alt: Alternate text for input type="image"
1008
608
  auto_complete: Whether the input should have autocomplete enabled
@@ -1029,12 +629,16 @@ class TextField(TextFieldRoot, el.Input):
1029
629
  placeholder: Placeholder text in the input
1030
630
  read_only: Indicates whether the input is read-only
1031
631
  required: Indicates that the input is required
632
+ size: Text field size "1" - "3"
1032
633
  src: URL for image inputs
1033
634
  step: Specifies the legal number intervals for an input
1034
635
  type: Specifies the type of input
1035
636
  use_map: Name of the image map used with the input
1036
637
  value: Value of the input
1037
638
  width: The width of the input (only for type="image")
639
+ variant: Variant of text field: "classic" | "surface" | "soft"
640
+ color: Override theme color for text field
641
+ radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
1038
642
  access_key: Provides a hint for generating a keyboard shortcut for the current element.
1039
643
  auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
1040
644
  content_editable: Indicates whether the element's content is editable.
@@ -1052,6 +656,13 @@ class TextField(TextFieldRoot, el.Input):
1052
656
  tab_index: Defines the position of the current element in the tabbing order.
1053
657
  title: Defines a tooltip for the element.
1054
658
  translate: Specifies whether the content of an element should be translated or not.
659
+ m: Margin: "0" - "9"
660
+ mx: Margin horizontal: "0" - "9"
661
+ my: Margin vertical: "0" - "9"
662
+ mt: Margin top: "0" - "9"
663
+ mr: Margin right: "0" - "9"
664
+ mb: Margin bottom: "0" - "9"
665
+ ml: Margin left: "0" - "9"
1055
666
  style: The style of the component.
1056
667
  key: A unique key for the component.
1057
668
  id: The id for the component.
@@ -1136,8 +747,8 @@ class TextFieldSlot(RadixThemesComponent):
1136
747
  ] = None,
1137
748
  gap: Optional[
1138
749
  Union[
1139
- Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
1140
- Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
750
+ Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
751
+ Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
1141
752
  ]
1142
753
  ] = None,
1143
754
  style: Optional[Style] = None,