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
@@ -7,11 +7,14 @@ from typing import Any, Dict, Literal, Optional, Union, overload
7
7
  from reflex.vars import Var, BaseVar, ComputedVar
8
8
  from reflex.event import EventChain, EventHandler, EventSpec
9
9
  from reflex.style import Style
10
- from typing import Any, Dict, Literal
10
+ from typing import Any, Dict, Literal, Union
11
11
  from reflex.components import el
12
+ from reflex.components.base.fragment import Fragment
12
13
  from reflex.components.component import Component, ComponentNamespace
13
14
  from reflex.components.core.debounce import DebounceInput
14
15
  from reflex.constants import EventTriggers
16
+ from reflex.style import Style, format_as_emotion
17
+ from reflex.utils import console
15
18
  from reflex.vars import Var
16
19
  from ..base import LiteralAccentColor, LiteralRadius, RadixThemesComponent
17
20
 
@@ -101,293 +104,18 @@ class TextFieldRoot(el.Div, RadixThemesComponent):
101
104
  Literal["none", "small", "medium", "large", "full"],
102
105
  ]
103
106
  ] = None,
104
- access_key: Optional[
105
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
106
- ] = None,
107
- auto_capitalize: Optional[
108
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
109
- ] = None,
110
- content_editable: Optional[
111
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
112
- ] = None,
113
- context_menu: Optional[
114
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
115
- ] = None,
116
- dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
117
- draggable: Optional[
118
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
119
- ] = None,
120
- enter_key_hint: Optional[
121
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
122
- ] = None,
123
- hidden: Optional[
124
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
125
- ] = None,
126
- input_mode: Optional[
127
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
128
- ] = None,
129
- item_prop: Optional[
130
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
131
- ] = None,
132
- lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
133
- role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
134
- slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
135
- spell_check: Optional[
136
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
137
- ] = None,
138
- tab_index: Optional[
139
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
140
- ] = None,
141
- title: Optional[
142
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
143
- ] = None,
144
- style: Optional[Style] = None,
145
- key: Optional[Any] = None,
146
- id: Optional[Any] = None,
147
- class_name: Optional[Any] = None,
148
- autofocus: Optional[bool] = None,
149
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
150
- on_blur: Optional[
151
- Union[EventHandler, EventSpec, list, function, BaseVar]
152
- ] = None,
153
- on_click: Optional[
154
- Union[EventHandler, EventSpec, list, function, BaseVar]
155
- ] = None,
156
- on_context_menu: Optional[
157
- Union[EventHandler, EventSpec, list, function, BaseVar]
158
- ] = None,
159
- on_double_click: Optional[
160
- Union[EventHandler, EventSpec, list, function, BaseVar]
161
- ] = None,
162
- on_focus: Optional[
163
- Union[EventHandler, EventSpec, list, function, BaseVar]
164
- ] = None,
165
- on_mount: Optional[
166
- Union[EventHandler, EventSpec, list, function, BaseVar]
167
- ] = None,
168
- on_mouse_down: Optional[
169
- Union[EventHandler, EventSpec, list, function, BaseVar]
170
- ] = None,
171
- on_mouse_enter: Optional[
172
- Union[EventHandler, EventSpec, list, function, BaseVar]
173
- ] = None,
174
- on_mouse_leave: Optional[
175
- Union[EventHandler, EventSpec, list, function, BaseVar]
176
- ] = None,
177
- on_mouse_move: Optional[
178
- Union[EventHandler, EventSpec, list, function, BaseVar]
179
- ] = None,
180
- on_mouse_out: Optional[
181
- Union[EventHandler, EventSpec, list, function, BaseVar]
182
- ] = None,
183
- on_mouse_over: Optional[
184
- Union[EventHandler, EventSpec, list, function, BaseVar]
185
- ] = None,
186
- on_mouse_up: Optional[
187
- Union[EventHandler, EventSpec, list, function, BaseVar]
188
- ] = None,
189
- on_scroll: Optional[
190
- Union[EventHandler, EventSpec, list, function, BaseVar]
191
- ] = None,
192
- on_unmount: Optional[
193
- Union[EventHandler, EventSpec, list, function, BaseVar]
194
- ] = None,
195
- **props
196
- ) -> "TextFieldRoot":
197
- """Create a new component instance.
198
-
199
- Will prepend "RadixThemes" to the component tag to avoid conflicts with
200
- other UI libraries for common names, like Text and Button.
201
-
202
- Args:
203
- *children: Child components.
204
- size: Text field size "1" - "3"
205
- variant: Variant of text field: "classic" | "surface" | "soft"
206
- color_scheme: Override theme color for text field
207
- radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
208
- access_key: Provides a hint for generating a keyboard shortcut for the current element.
209
- auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
210
- content_editable: Indicates whether the element's content is editable.
211
- context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
212
- dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
213
- draggable: Defines whether the element can be dragged.
214
- enter_key_hint: Hints what media types the media element is able to play.
215
- hidden: Defines whether the element is hidden.
216
- input_mode: Defines the type of the element.
217
- item_prop: Defines the name of the element for metadata purposes.
218
- lang: Defines the language used in the element.
219
- role: Defines the role of the element.
220
- slot: Assigns a slot in a shadow DOM shadow tree to an element.
221
- spell_check: Defines whether the element may be checked for spelling errors.
222
- tab_index: Defines the position of the current element in the tabbing order.
223
- title: Defines a tooltip for the element.
224
- style: The style of the component.
225
- key: A unique key for the component.
226
- id: The id for the component.
227
- class_name: The class name for the component.
228
- autofocus: Whether the component should take the focus once the page is loaded
229
- custom_attrs: custom attribute
230
- **props: Component properties.
231
-
232
- Returns:
233
- A new component instance.
234
- """
235
- ...
236
-
237
- class TextFieldInput(el.Input, TextFieldRoot):
238
- @overload
239
- @classmethod
240
- def create( # type: ignore
241
- cls,
242
- *children,
243
- accept: Optional[
244
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
245
- ] = None,
246
- alt: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
247
- auto_complete: Optional[
248
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
249
- ] = None,
250
- auto_focus: Optional[
251
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
252
- ] = None,
253
- capture: Optional[
254
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
255
- ] = None,
256
- checked: Optional[
257
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
258
- ] = None,
259
- default_checked: Optional[Union[Var[bool], bool]] = None,
107
+ auto_complete: Optional[Union[Var[bool], bool]] = None,
260
108
  default_value: Optional[Union[Var[str], str]] = None,
261
- dirname: Optional[
262
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
263
- ] = None,
264
- disabled: Optional[
265
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
266
- ] = None,
267
- form: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
268
- form_action: Optional[
269
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
270
- ] = None,
271
- form_enc_type: Optional[
272
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
273
- ] = None,
274
- form_method: Optional[
275
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
276
- ] = None,
277
- form_no_validate: Optional[
278
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
279
- ] = None,
280
- form_target: Optional[
281
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
282
- ] = None,
283
- list: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
284
- max: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
285
- max_length: Optional[
286
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
287
- ] = None,
288
- min_length: Optional[
289
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
290
- ] = None,
291
- min: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
292
- multiple: Optional[
293
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
294
- ] = None,
295
- name: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
296
- pattern: Optional[
297
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
298
- ] = None,
299
- placeholder: Optional[
300
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
301
- ] = None,
302
- read_only: Optional[
303
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
304
- ] = None,
305
- required: Optional[
306
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
307
- ] = None,
308
- size: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
309
- src: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
310
- step: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
311
- type: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
312
- use_map: Optional[
313
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
314
- ] = None,
109
+ disabled: Optional[Union[Var[bool], bool]] = None,
110
+ max_length: Optional[Union[Var[int], int]] = None,
111
+ min_length: Optional[Union[Var[int], int]] = None,
112
+ name: Optional[Union[Var[str], str]] = None,
113
+ placeholder: Optional[Union[Var[str], str]] = None,
114
+ read_only: Optional[Union[Var[bool], bool]] = None,
115
+ required: Optional[Union[Var[bool], bool]] = None,
116
+ type: Optional[Union[Var[str], str]] = None,
315
117
  value: Optional[
316
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
317
- ] = None,
318
- variant: Optional[
319
- Union[
320
- Var[Literal["classic", "surface", "soft"]],
321
- Literal["classic", "surface", "soft"],
322
- ]
323
- ] = None,
324
- color_scheme: Optional[
325
- Union[
326
- Var[
327
- Literal[
328
- "tomato",
329
- "red",
330
- "ruby",
331
- "crimson",
332
- "pink",
333
- "plum",
334
- "purple",
335
- "violet",
336
- "iris",
337
- "indigo",
338
- "blue",
339
- "cyan",
340
- "teal",
341
- "jade",
342
- "green",
343
- "grass",
344
- "brown",
345
- "orange",
346
- "sky",
347
- "mint",
348
- "lime",
349
- "yellow",
350
- "amber",
351
- "gold",
352
- "bronze",
353
- "gray",
354
- ]
355
- ],
356
- Literal[
357
- "tomato",
358
- "red",
359
- "ruby",
360
- "crimson",
361
- "pink",
362
- "plum",
363
- "purple",
364
- "violet",
365
- "iris",
366
- "indigo",
367
- "blue",
368
- "cyan",
369
- "teal",
370
- "jade",
371
- "green",
372
- "grass",
373
- "brown",
374
- "orange",
375
- "sky",
376
- "mint",
377
- "lime",
378
- "yellow",
379
- "amber",
380
- "gold",
381
- "bronze",
382
- "gray",
383
- ],
384
- ]
385
- ] = None,
386
- radius: Optional[
387
- Union[
388
- Var[Literal["none", "small", "medium", "large", "full"]],
389
- Literal["none", "small", "medium", "large", "full"],
390
- ]
118
+ Union[Var[Union[str, int, float]], Union[str, int, float]]
391
119
  ] = None,
392
120
  access_key: Optional[
393
121
  Union[Var[Union[str, int, bool]], Union[str, int, bool]]
@@ -490,47 +218,26 @@ class TextFieldInput(el.Input, TextFieldRoot):
490
218
  Union[EventHandler, EventSpec, list, function, BaseVar]
491
219
  ] = None,
492
220
  **props
493
- ) -> "TextFieldInput":
221
+ ) -> "TextFieldRoot":
494
222
  """Create an Input component.
495
223
 
496
224
  Args:
497
225
  *children: The children of the component.
498
- accept: Accepted types of files when the input is file type
499
- alt: Alternate text for input type="image"
226
+ size: Text field size "1" - "3"
227
+ variant: Variant of text field: "classic" | "surface" | "soft"
228
+ color_scheme: Override theme color for text field
229
+ radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
500
230
  auto_complete: Whether the input should have autocomplete enabled
501
- auto_focus: Automatically focuses the input when the page loads
502
- capture: Captures media from the user (camera or microphone)
503
- checked: Indicates whether the input is checked (for checkboxes and radio buttons)
504
- default_checked: The initial value (for checkboxes and radio buttons)
505
- default_value: The initial value for a text field
506
- dirname: Name part of the input to submit in 'dir' and 'name' pair when form is submitted
231
+ default_value: The value of the input when initially rendered.
507
232
  disabled: Disables the input
508
- form: Associates the input with a form (by id)
509
- form_action: URL to send the form data to (for type="submit" buttons)
510
- form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
511
- form_method: HTTP method to use for sending form data (for type="submit" buttons)
512
- form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
513
- form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
514
- list: References a datalist for suggested options
515
- max: Specifies the maximum value for the input
516
233
  max_length: Specifies the maximum number of characters allowed in the input
517
234
  min_length: Specifies the minimum number of characters required in the input
518
- min: Specifies the minimum value for the input
519
- multiple: Indicates whether multiple values can be entered in an input of the type email or file
520
235
  name: Name of the input, used when sending form data
521
- pattern: Regex pattern the input's value must match to be valid
522
236
  placeholder: Placeholder text in the input
523
237
  read_only: Indicates whether the input is read-only
524
238
  required: Indicates that the input is required
525
- size: Text field size "1" - "3"
526
- src: URL for image inputs
527
- step: Specifies the legal number intervals for an input
528
239
  type: Specifies the type of input
529
- use_map: Name of the image map used with the input
530
240
  value: Value of the input
531
- variant: Variant of text field: "classic" | "surface" | "soft"
532
- color_scheme: Override theme color for text field
533
- radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
534
241
  access_key: Provides a hint for generating a keyboard shortcut for the current element.
535
242
  auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
536
243
  content_editable: Indicates whether the element's content is editable.
@@ -559,6 +266,10 @@ class TextFieldInput(el.Input, TextFieldRoot):
559
266
  The component.
560
267
  """
561
268
  ...
269
+ @classmethod
270
+ def create_root_deprecated(cls, *children, **props) -> Component: ...
271
+ @classmethod
272
+ def create_input_deprecated(cls, *children, **props) -> Component: ...
562
273
  def get_event_triggers(self) -> Dict[str, Any]: ...
563
274
 
564
275
  class TextFieldSlot(RadixThemesComponent):
@@ -703,11 +414,13 @@ class TextFieldSlot(RadixThemesComponent):
703
414
  """
704
415
  ...
705
416
 
706
- class Input(RadixThemesComponent):
707
- @overload
708
- @classmethod
709
- def create( # type: ignore
710
- cls,
417
+ class TextField(ComponentNamespace):
418
+ root = staticmethod(TextFieldRoot.create_root_deprecated)
419
+ input = staticmethod(TextFieldRoot.create_input_deprecated)
420
+ slot = staticmethod(TextFieldSlot.create)
421
+
422
+ @staticmethod
423
+ def __call__(
711
424
  *children,
712
425
  size: Optional[
713
426
  Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
@@ -789,204 +502,56 @@ class Input(RadixThemesComponent):
789
502
  auto_complete: Optional[Union[Var[bool], bool]] = None,
790
503
  default_value: Optional[Union[Var[str], str]] = None,
791
504
  disabled: Optional[Union[Var[bool], bool]] = None,
792
- max_length: Optional[Union[Var[str], str]] = None,
793
- min_length: Optional[Union[Var[str], str]] = None,
505
+ max_length: Optional[Union[Var[int], int]] = None,
506
+ min_length: Optional[Union[Var[int], int]] = None,
794
507
  name: Optional[Union[Var[str], str]] = None,
795
508
  placeholder: Optional[Union[Var[str], str]] = None,
796
509
  read_only: Optional[Union[Var[bool], bool]] = None,
797
510
  required: Optional[Union[Var[bool], bool]] = None,
798
511
  type: Optional[Union[Var[str], str]] = None,
799
- value: Optional[Union[Var[str], str]] = None,
800
- style: Optional[Style] = None,
801
- key: Optional[Any] = None,
802
- id: Optional[Any] = None,
803
- class_name: Optional[Any] = None,
804
- autofocus: Optional[bool] = None,
805
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
806
- on_blur: Optional[
807
- Union[EventHandler, EventSpec, list, function, BaseVar]
808
- ] = None,
809
- on_change: Optional[
810
- Union[EventHandler, EventSpec, list, function, BaseVar]
811
- ] = None,
812
- on_click: Optional[
813
- Union[EventHandler, EventSpec, list, function, BaseVar]
814
- ] = None,
815
- on_context_menu: Optional[
816
- Union[EventHandler, EventSpec, list, function, BaseVar]
817
- ] = None,
818
- on_double_click: Optional[
819
- Union[EventHandler, EventSpec, list, function, BaseVar]
820
- ] = None,
821
- on_focus: Optional[
822
- Union[EventHandler, EventSpec, list, function, BaseVar]
823
- ] = None,
824
- on_key_down: Optional[
825
- Union[EventHandler, EventSpec, list, function, BaseVar]
826
- ] = None,
827
- on_key_up: Optional[
828
- Union[EventHandler, EventSpec, list, function, BaseVar]
829
- ] = None,
830
- on_mount: Optional[
831
- Union[EventHandler, EventSpec, list, function, BaseVar]
832
- ] = None,
833
- on_mouse_down: Optional[
834
- Union[EventHandler, EventSpec, list, function, BaseVar]
512
+ value: Optional[
513
+ Union[Var[Union[str, int, float]], Union[str, int, float]]
835
514
  ] = None,
836
- on_mouse_enter: Optional[
837
- Union[EventHandler, EventSpec, list, function, BaseVar]
515
+ access_key: Optional[
516
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
838
517
  ] = None,
839
- on_mouse_leave: Optional[
840
- Union[EventHandler, EventSpec, list, function, BaseVar]
518
+ auto_capitalize: Optional[
519
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
841
520
  ] = None,
842
- on_mouse_move: Optional[
843
- Union[EventHandler, EventSpec, list, function, BaseVar]
521
+ content_editable: Optional[
522
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
844
523
  ] = None,
845
- on_mouse_out: Optional[
846
- Union[EventHandler, EventSpec, list, function, BaseVar]
524
+ context_menu: Optional[
525
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
847
526
  ] = None,
848
- on_mouse_over: Optional[
849
- Union[EventHandler, EventSpec, list, function, BaseVar]
527
+ dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
528
+ draggable: Optional[
529
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
850
530
  ] = None,
851
- on_mouse_up: Optional[
852
- Union[EventHandler, EventSpec, list, function, BaseVar]
531
+ enter_key_hint: Optional[
532
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
853
533
  ] = None,
854
- on_scroll: Optional[
855
- Union[EventHandler, EventSpec, list, function, BaseVar]
534
+ hidden: Optional[
535
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
856
536
  ] = None,
857
- on_unmount: Optional[
858
- Union[EventHandler, EventSpec, list, function, BaseVar]
537
+ input_mode: Optional[
538
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
859
539
  ] = None,
860
- **props
861
- ) -> "Input":
862
- """Create an Input component.
863
-
864
- Args:
865
- size: Text field size "1" - "3"
866
- variant: Variant of text field: "classic" | "surface" | "soft"
867
- color_scheme: Override theme color for text field
868
- radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
869
- auto_complete: Whether the input should have autocomplete enabled
870
- default_value: The value of the input when initially rendered.
871
- disabled: Disables the input
872
- max_length: Specifies the maximum number of characters allowed in the input
873
- min_length: Specifies the minimum number of characters required in the input
874
- name: Name of the input, used when sending form data
875
- placeholder: Placeholder text in the input
876
- read_only: Indicates whether the input is read-only
877
- required: Indicates that the input is required
878
- type: Specifies the type of input
879
- value: Value of the input
880
- style: The style of the component.
881
- key: A unique key for the component.
882
- id: The id for the component.
883
- class_name: The class name for the component.
884
- autofocus: Whether the component should take the focus once the page is loaded
885
- custom_attrs: custom attribute
886
- **props: The properties of the component.
887
-
888
- Returns:
889
- The component.
890
- """
891
- ...
892
- def get_event_triggers(self) -> Dict[str, Any]: ...
893
-
894
- class TextField(ComponentNamespace):
895
- root = staticmethod(TextFieldRoot.create)
896
- input = staticmethod(TextFieldInput.create)
897
- slot = staticmethod(TextFieldSlot.create)
898
-
899
- @staticmethod
900
- def __call__(
901
- *children,
902
- size: Optional[
903
- Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
540
+ item_prop: Optional[
541
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
904
542
  ] = None,
905
- variant: Optional[
906
- Union[
907
- Var[Literal["classic", "surface", "soft"]],
908
- Literal["classic", "surface", "soft"],
909
- ]
543
+ lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
544
+ role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
545
+ slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
546
+ spell_check: Optional[
547
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
910
548
  ] = None,
911
- color_scheme: Optional[
912
- Union[
913
- Var[
914
- Literal[
915
- "tomato",
916
- "red",
917
- "ruby",
918
- "crimson",
919
- "pink",
920
- "plum",
921
- "purple",
922
- "violet",
923
- "iris",
924
- "indigo",
925
- "blue",
926
- "cyan",
927
- "teal",
928
- "jade",
929
- "green",
930
- "grass",
931
- "brown",
932
- "orange",
933
- "sky",
934
- "mint",
935
- "lime",
936
- "yellow",
937
- "amber",
938
- "gold",
939
- "bronze",
940
- "gray",
941
- ]
942
- ],
943
- Literal[
944
- "tomato",
945
- "red",
946
- "ruby",
947
- "crimson",
948
- "pink",
949
- "plum",
950
- "purple",
951
- "violet",
952
- "iris",
953
- "indigo",
954
- "blue",
955
- "cyan",
956
- "teal",
957
- "jade",
958
- "green",
959
- "grass",
960
- "brown",
961
- "orange",
962
- "sky",
963
- "mint",
964
- "lime",
965
- "yellow",
966
- "amber",
967
- "gold",
968
- "bronze",
969
- "gray",
970
- ],
971
- ]
549
+ tab_index: Optional[
550
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
972
551
  ] = None,
973
- radius: Optional[
974
- Union[
975
- Var[Literal["none", "small", "medium", "large", "full"]],
976
- Literal["none", "small", "medium", "large", "full"],
977
- ]
552
+ title: Optional[
553
+ Union[Var[Union[str, int, bool]], Union[str, int, bool]]
978
554
  ] = None,
979
- auto_complete: Optional[Union[Var[bool], bool]] = None,
980
- default_value: Optional[Union[Var[str], str]] = None,
981
- disabled: Optional[Union[Var[bool], bool]] = None,
982
- max_length: Optional[Union[Var[str], str]] = None,
983
- min_length: Optional[Union[Var[str], str]] = None,
984
- name: Optional[Union[Var[str], str]] = None,
985
- placeholder: Optional[Union[Var[str], str]] = None,
986
- read_only: Optional[Union[Var[bool], bool]] = None,
987
- required: Optional[Union[Var[bool], bool]] = None,
988
- type: Optional[Union[Var[str], str]] = None,
989
- value: Optional[Union[Var[str], str]] = None,
990
555
  style: Optional[Style] = None,
991
556
  key: Optional[Any] = None,
992
557
  id: Optional[Any] = None,
@@ -1048,10 +613,11 @@ class TextField(ComponentNamespace):
1048
613
  Union[EventHandler, EventSpec, list, function, BaseVar]
1049
614
  ] = None,
1050
615
  **props
1051
- ) -> "Input":
616
+ ) -> "TextFieldRoot":
1052
617
  """Create an Input component.
1053
618
 
1054
619
  Args:
620
+ *children: The children of the component.
1055
621
  size: Text field size "1" - "3"
1056
622
  variant: Variant of text field: "classic" | "surface" | "soft"
1057
623
  color_scheme: Override theme color for text field
@@ -1067,6 +633,22 @@ class TextField(ComponentNamespace):
1067
633
  required: Indicates that the input is required
1068
634
  type: Specifies the type of input
1069
635
  value: Value of the input
636
+ access_key: Provides a hint for generating a keyboard shortcut for the current element.
637
+ auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
638
+ content_editable: Indicates whether the element's content is editable.
639
+ context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
640
+ dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
641
+ draggable: Defines whether the element can be dragged.
642
+ enter_key_hint: Hints what media types the media element is able to play.
643
+ hidden: Defines whether the element is hidden.
644
+ input_mode: Defines the type of the element.
645
+ item_prop: Defines the name of the element for metadata purposes.
646
+ lang: Defines the language used in the element.
647
+ role: Defines the role of the element.
648
+ slot: Assigns a slot in a shadow DOM shadow tree to an element.
649
+ spell_check: Defines whether the element may be checked for spelling errors.
650
+ tab_index: Defines the position of the current element in the tabbing order.
651
+ title: Defines a tooltip for the element.
1070
652
  style: The style of the component.
1071
653
  key: A unique key for the component.
1072
654
  id: The id for the component.