reflex 0.4.8a1__py3-none-any.whl → 0.4.9__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 (31) hide show
  1. reflex/app.py +3 -0
  2. reflex/components/component.py +10 -3
  3. reflex/components/core/debounce.py +4 -1
  4. reflex/constants/installer.py +1 -0
  5. reflex/experimental/__init__.py +2 -0
  6. reflex/experimental/hooks.py +19 -1
  7. reflex/experimental/layout.py +223 -0
  8. reflex/testing.py +23 -6
  9. reflex/utils/prerequisites.py +11 -7
  10. reflex/utils/processes.py +51 -30
  11. reflex/utils/pyi_generator.py +6 -1
  12. reflex/utils/serializers.py +14 -0
  13. reflex/vars.py +1 -1
  14. {reflex-0.4.8a1.dist-info → reflex-0.4.9.dist-info}/METADATA +1 -1
  15. {reflex-0.4.8a1.dist-info → reflex-0.4.9.dist-info}/RECORD +18 -30
  16. reflex/components/radix/themes/components/alertdialog.pyi +0 -1128
  17. reflex/components/radix/themes/components/aspectratio.pyi +0 -162
  18. reflex/components/radix/themes/components/contextmenu.pyi +0 -1249
  19. reflex/components/radix/themes/components/dropdownmenu.pyi +0 -1350
  20. reflex/components/radix/themes/components/hovercard.pyi +0 -700
  21. reflex/components/radix/themes/components/iconbutton.pyi +0 -284
  22. reflex/components/radix/themes/components/radiogroup.pyi +0 -701
  23. reflex/components/radix/themes/components/scrollarea.pyi +0 -176
  24. reflex/components/radix/themes/components/textfield.pyi +0 -1092
  25. reflex/components/radix/themes/typography/em.pyi +0 -213
  26. reflex/components/radix/themes/typography/kbd.pyi +0 -222
  27. reflex/components/radix/themes/typography/quote.pyi +0 -215
  28. reflex/components/radix/themes/typography/strong.pyi +0 -213
  29. {reflex-0.4.8a1.dist-info → reflex-0.4.9.dist-info}/LICENSE +0 -0
  30. {reflex-0.4.8a1.dist-info → reflex-0.4.9.dist-info}/WHEEL +0 -0
  31. {reflex-0.4.8a1.dist-info → reflex-0.4.9.dist-info}/entry_points.txt +0 -0
@@ -1,1092 +0,0 @@
1
- """Stub file for reflex/components/radix/themes/components/textfield.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 types import SimpleNamespace
11
- from typing import Any, Dict, Literal
12
- import reflex as rx
13
- from reflex.components import el
14
- from reflex.components.component import Component
15
- from reflex.components.core.debounce import DebounceInput
16
- from reflex.components.lucide.icon import Icon
17
- from reflex.constants import EventTriggers
18
- from reflex.vars import Var
19
- from ..base import LiteralAccentColor, LiteralRadius, RadixThemesComponent
20
-
21
- LiteralTextFieldSize = Literal["1", "2", "3"]
22
- LiteralTextFieldVariant = Literal["classic", "surface", "soft"]
23
-
24
- class TextFieldRoot(el.Div, RadixThemesComponent):
25
- @overload
26
- @classmethod
27
- def create( # type: ignore
28
- cls,
29
- *children,
30
- color: Optional[Union[Var[str], str]] = None,
31
- color_scheme: Optional[
32
- Union[
33
- Var[
34
- Literal[
35
- "tomato",
36
- "red",
37
- "ruby",
38
- "crimson",
39
- "pink",
40
- "plum",
41
- "purple",
42
- "violet",
43
- "iris",
44
- "indigo",
45
- "blue",
46
- "cyan",
47
- "teal",
48
- "jade",
49
- "green",
50
- "grass",
51
- "brown",
52
- "orange",
53
- "sky",
54
- "mint",
55
- "lime",
56
- "yellow",
57
- "amber",
58
- "gold",
59
- "bronze",
60
- "gray",
61
- ]
62
- ],
63
- Literal[
64
- "tomato",
65
- "red",
66
- "ruby",
67
- "crimson",
68
- "pink",
69
- "plum",
70
- "purple",
71
- "violet",
72
- "iris",
73
- "indigo",
74
- "blue",
75
- "cyan",
76
- "teal",
77
- "jade",
78
- "green",
79
- "grass",
80
- "brown",
81
- "orange",
82
- "sky",
83
- "mint",
84
- "lime",
85
- "yellow",
86
- "amber",
87
- "gold",
88
- "bronze",
89
- "gray",
90
- ],
91
- ]
92
- ] = None,
93
- size: Optional[
94
- Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
95
- ] = None,
96
- variant: Optional[
97
- Union[
98
- Var[Literal["classic", "surface", "soft"]],
99
- Literal["classic", "surface", "soft"],
100
- ]
101
- ] = None,
102
- radius: Optional[
103
- Union[
104
- Var[Literal["none", "small", "medium", "large", "full"]],
105
- Literal["none", "small", "medium", "large", "full"],
106
- ]
107
- ] = None,
108
- access_key: Optional[
109
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
110
- ] = None,
111
- auto_capitalize: Optional[
112
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
113
- ] = None,
114
- content_editable: Optional[
115
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
116
- ] = None,
117
- context_menu: Optional[
118
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
119
- ] = None,
120
- dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
121
- draggable: Optional[
122
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
123
- ] = None,
124
- enter_key_hint: Optional[
125
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
126
- ] = None,
127
- hidden: Optional[
128
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
129
- ] = None,
130
- input_mode: Optional[
131
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
132
- ] = None,
133
- item_prop: Optional[
134
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
135
- ] = None,
136
- lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
137
- role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
138
- slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
139
- spell_check: Optional[
140
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
141
- ] = None,
142
- tab_index: Optional[
143
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
144
- ] = None,
145
- title: Optional[
146
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
147
- ] = None,
148
- style: Optional[Style] = None,
149
- key: Optional[Any] = None,
150
- id: Optional[Any] = None,
151
- class_name: Optional[Any] = None,
152
- autofocus: Optional[bool] = None,
153
- _rename_props: Optional[Dict[str, str]] = None,
154
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
155
- on_blur: Optional[
156
- Union[EventHandler, EventSpec, list, function, BaseVar]
157
- ] = None,
158
- on_click: Optional[
159
- Union[EventHandler, EventSpec, list, function, BaseVar]
160
- ] = None,
161
- on_context_menu: Optional[
162
- Union[EventHandler, EventSpec, list, function, BaseVar]
163
- ] = None,
164
- on_double_click: Optional[
165
- Union[EventHandler, EventSpec, list, function, BaseVar]
166
- ] = None,
167
- on_focus: Optional[
168
- Union[EventHandler, EventSpec, list, function, BaseVar]
169
- ] = None,
170
- on_mount: Optional[
171
- Union[EventHandler, EventSpec, list, function, BaseVar]
172
- ] = None,
173
- on_mouse_down: Optional[
174
- Union[EventHandler, EventSpec, list, function, BaseVar]
175
- ] = None,
176
- on_mouse_enter: Optional[
177
- Union[EventHandler, EventSpec, list, function, BaseVar]
178
- ] = None,
179
- on_mouse_leave: Optional[
180
- Union[EventHandler, EventSpec, list, function, BaseVar]
181
- ] = None,
182
- on_mouse_move: Optional[
183
- Union[EventHandler, EventSpec, list, function, BaseVar]
184
- ] = None,
185
- on_mouse_out: Optional[
186
- Union[EventHandler, EventSpec, list, function, BaseVar]
187
- ] = None,
188
- on_mouse_over: Optional[
189
- Union[EventHandler, EventSpec, list, function, BaseVar]
190
- ] = None,
191
- on_mouse_up: Optional[
192
- Union[EventHandler, EventSpec, list, function, BaseVar]
193
- ] = None,
194
- on_scroll: Optional[
195
- Union[EventHandler, EventSpec, list, function, BaseVar]
196
- ] = None,
197
- on_unmount: Optional[
198
- Union[EventHandler, EventSpec, list, function, BaseVar]
199
- ] = None,
200
- **props
201
- ) -> "TextFieldRoot":
202
- """Create a new component instance.
203
-
204
- Will prepend "RadixThemes" to the component tag to avoid conflicts with
205
- other UI libraries for common names, like Text and Button.
206
-
207
- Args:
208
- *children: Child components.
209
- color: map to CSS default color property.
210
- color_scheme: map to radix color property.
211
- size: Text field size "1" - "3"
212
- variant: Variant of text field: "classic" | "surface" | "soft"
213
- radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
214
- access_key: Provides a hint for generating a keyboard shortcut for the current element.
215
- auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
216
- content_editable: Indicates whether the element's content is editable.
217
- context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
218
- dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
219
- draggable: Defines whether the element can be dragged.
220
- enter_key_hint: Hints what media types the media element is able to play.
221
- hidden: Defines whether the element is hidden.
222
- input_mode: Defines the type of the element.
223
- item_prop: Defines the name of the element for metadata purposes.
224
- lang: Defines the language used in the element.
225
- role: Defines the role of the element.
226
- slot: Assigns a slot in a shadow DOM shadow tree to an element.
227
- spell_check: Defines whether the element may be checked for spelling errors.
228
- tab_index: Defines the position of the current element in the tabbing order.
229
- title: Defines a tooltip for the element.
230
- style: The style of the component.
231
- key: A unique key for the component.
232
- id: The id for the component.
233
- class_name: The class name for the component.
234
- autofocus: Whether the component should take the focus once the page is loaded
235
- _rename_props: props to change the name of
236
- custom_attrs: custom attribute
237
- **props: Component properties.
238
-
239
- Returns:
240
- A new component instance.
241
- """
242
- ...
243
-
244
- class TextFieldInput(el.Input, TextFieldRoot):
245
- @overload
246
- @classmethod
247
- def create( # type: ignore
248
- cls,
249
- *children,
250
- accept: Optional[
251
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
252
- ] = None,
253
- alt: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
254
- auto_complete: Optional[
255
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
256
- ] = None,
257
- auto_focus: Optional[
258
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
259
- ] = None,
260
- capture: Optional[
261
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
262
- ] = None,
263
- checked: Optional[
264
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
265
- ] = None,
266
- dirname: Optional[
267
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
268
- ] = None,
269
- disabled: Optional[
270
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
271
- ] = None,
272
- form: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
273
- form_action: Optional[
274
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
275
- ] = None,
276
- form_enc_type: Optional[
277
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
278
- ] = None,
279
- form_method: Optional[
280
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
281
- ] = None,
282
- form_no_validate: Optional[
283
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
284
- ] = None,
285
- form_target: Optional[
286
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
287
- ] = None,
288
- list: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
289
- max: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
290
- max_length: Optional[
291
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
292
- ] = None,
293
- min_length: Optional[
294
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
295
- ] = None,
296
- min: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
297
- multiple: Optional[
298
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
299
- ] = None,
300
- name: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
301
- pattern: Optional[
302
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
303
- ] = None,
304
- placeholder: Optional[
305
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
306
- ] = None,
307
- read_only: Optional[
308
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
309
- ] = None,
310
- required: Optional[
311
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
312
- ] = None,
313
- size: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
314
- src: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
315
- step: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
316
- type: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
317
- use_map: Optional[
318
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
319
- ] = None,
320
- value: Optional[
321
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
322
- ] = None,
323
- variant: Optional[
324
- Union[
325
- Var[Literal["classic", "surface", "soft"]],
326
- Literal["classic", "surface", "soft"],
327
- ]
328
- ] = None,
329
- color_scheme: Optional[
330
- Union[
331
- Var[
332
- Literal[
333
- "tomato",
334
- "red",
335
- "ruby",
336
- "crimson",
337
- "pink",
338
- "plum",
339
- "purple",
340
- "violet",
341
- "iris",
342
- "indigo",
343
- "blue",
344
- "cyan",
345
- "teal",
346
- "jade",
347
- "green",
348
- "grass",
349
- "brown",
350
- "orange",
351
- "sky",
352
- "mint",
353
- "lime",
354
- "yellow",
355
- "amber",
356
- "gold",
357
- "bronze",
358
- "gray",
359
- ]
360
- ],
361
- Literal[
362
- "tomato",
363
- "red",
364
- "ruby",
365
- "crimson",
366
- "pink",
367
- "plum",
368
- "purple",
369
- "violet",
370
- "iris",
371
- "indigo",
372
- "blue",
373
- "cyan",
374
- "teal",
375
- "jade",
376
- "green",
377
- "grass",
378
- "brown",
379
- "orange",
380
- "sky",
381
- "mint",
382
- "lime",
383
- "yellow",
384
- "amber",
385
- "gold",
386
- "bronze",
387
- "gray",
388
- ],
389
- ]
390
- ] = None,
391
- radius: Optional[
392
- Union[
393
- Var[Literal["none", "small", "medium", "large", "full"]],
394
- Literal["none", "small", "medium", "large", "full"],
395
- ]
396
- ] = None,
397
- access_key: Optional[
398
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
399
- ] = None,
400
- auto_capitalize: Optional[
401
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
402
- ] = None,
403
- content_editable: Optional[
404
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
405
- ] = None,
406
- context_menu: Optional[
407
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
408
- ] = None,
409
- dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
410
- draggable: Optional[
411
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
412
- ] = None,
413
- enter_key_hint: Optional[
414
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
415
- ] = None,
416
- hidden: Optional[
417
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
418
- ] = None,
419
- input_mode: Optional[
420
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
421
- ] = None,
422
- item_prop: Optional[
423
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
424
- ] = None,
425
- lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
426
- role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
427
- slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
428
- spell_check: Optional[
429
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
430
- ] = None,
431
- tab_index: Optional[
432
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
433
- ] = None,
434
- title: Optional[
435
- Union[Var[Union[str, int, bool]], Union[str, int, bool]]
436
- ] = None,
437
- style: Optional[Style] = None,
438
- key: Optional[Any] = None,
439
- id: Optional[Any] = None,
440
- class_name: Optional[Any] = None,
441
- autofocus: Optional[bool] = None,
442
- _rename_props: Optional[Dict[str, str]] = None,
443
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
444
- on_blur: Optional[
445
- Union[EventHandler, EventSpec, list, function, BaseVar]
446
- ] = None,
447
- on_change: Optional[
448
- Union[EventHandler, EventSpec, list, function, BaseVar]
449
- ] = None,
450
- on_click: Optional[
451
- Union[EventHandler, EventSpec, list, function, BaseVar]
452
- ] = None,
453
- on_context_menu: Optional[
454
- Union[EventHandler, EventSpec, list, function, BaseVar]
455
- ] = None,
456
- on_double_click: Optional[
457
- Union[EventHandler, EventSpec, list, function, BaseVar]
458
- ] = None,
459
- on_focus: Optional[
460
- Union[EventHandler, EventSpec, list, function, BaseVar]
461
- ] = None,
462
- on_key_down: Optional[
463
- Union[EventHandler, EventSpec, list, function, BaseVar]
464
- ] = None,
465
- on_key_up: Optional[
466
- Union[EventHandler, EventSpec, list, function, BaseVar]
467
- ] = None,
468
- on_mount: Optional[
469
- Union[EventHandler, EventSpec, list, function, BaseVar]
470
- ] = None,
471
- on_mouse_down: Optional[
472
- Union[EventHandler, EventSpec, list, function, BaseVar]
473
- ] = None,
474
- on_mouse_enter: Optional[
475
- Union[EventHandler, EventSpec, list, function, BaseVar]
476
- ] = None,
477
- on_mouse_leave: Optional[
478
- Union[EventHandler, EventSpec, list, function, BaseVar]
479
- ] = None,
480
- on_mouse_move: Optional[
481
- Union[EventHandler, EventSpec, list, function, BaseVar]
482
- ] = None,
483
- on_mouse_out: Optional[
484
- Union[EventHandler, EventSpec, list, function, BaseVar]
485
- ] = None,
486
- on_mouse_over: Optional[
487
- Union[EventHandler, EventSpec, list, function, BaseVar]
488
- ] = None,
489
- on_mouse_up: Optional[
490
- Union[EventHandler, EventSpec, list, function, BaseVar]
491
- ] = None,
492
- on_scroll: Optional[
493
- Union[EventHandler, EventSpec, list, function, BaseVar]
494
- ] = None,
495
- on_unmount: Optional[
496
- Union[EventHandler, EventSpec, list, function, BaseVar]
497
- ] = None,
498
- **props
499
- ) -> "TextFieldInput":
500
- """Create an Input component.
501
-
502
- Args:
503
- *children: The children of the component.
504
- accept: Accepted types of files when the input is file type
505
- alt: Alternate text for input type="image"
506
- auto_complete: Whether the input should have autocomplete enabled
507
- auto_focus: Automatically focuses the input when the page loads
508
- capture: Captures media from the user (camera or microphone)
509
- checked: Indicates whether the input is checked (for checkboxes and radio buttons)
510
- dirname: Name part of the input to submit in 'dir' and 'name' pair when form is submitted
511
- disabled: Disables the input
512
- form: Associates the input with a form (by id)
513
- form_action: URL to send the form data to (for type="submit" buttons)
514
- form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
515
- form_method: HTTP method to use for sending form data (for type="submit" buttons)
516
- form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
517
- form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
518
- list: References a datalist for suggested options
519
- max: Specifies the maximum value for the input
520
- max_length: Specifies the maximum number of characters allowed in the input
521
- min_length: Specifies the minimum number of characters required in the input
522
- min: Specifies the minimum value for the input
523
- multiple: Indicates whether multiple values can be entered in an input of the type email or file
524
- name: Name of the input, used when sending form data
525
- pattern: Regex pattern the input's value must match to be valid
526
- placeholder: Placeholder text in the input
527
- read_only: Indicates whether the input is read-only
528
- required: Indicates that the input is required
529
- size: Text field size "1" - "3"
530
- src: URL for image inputs
531
- step: Specifies the legal number intervals for an input
532
- type: Specifies the type of input
533
- use_map: Name of the image map used with the input
534
- value: Value of the input
535
- variant: Variant of text field: "classic" | "surface" | "soft"
536
- color_scheme: Override theme color for text field
537
- radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
538
- access_key: Provides a hint for generating a keyboard shortcut for the current element.
539
- auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
540
- content_editable: Indicates whether the element's content is editable.
541
- context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
542
- dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
543
- draggable: Defines whether the element can be dragged.
544
- enter_key_hint: Hints what media types the media element is able to play.
545
- hidden: Defines whether the element is hidden.
546
- input_mode: Defines the type of the element.
547
- item_prop: Defines the name of the element for metadata purposes.
548
- lang: Defines the language used in the element.
549
- role: Defines the role of the element.
550
- slot: Assigns a slot in a shadow DOM shadow tree to an element.
551
- spell_check: Defines whether the element may be checked for spelling errors.
552
- tab_index: Defines the position of the current element in the tabbing order.
553
- title: Defines a tooltip for the element.
554
- style: The style of the component.
555
- key: A unique key for the component.
556
- id: The id for the component.
557
- class_name: The class name for the component.
558
- autofocus: Whether the component should take the focus once the page is loaded
559
- _rename_props: props to change the name of
560
- custom_attrs: custom attribute
561
- **props: The properties of the component.
562
-
563
- Returns:
564
- The component.
565
- """
566
- ...
567
- def get_event_triggers(self) -> Dict[str, Any]: ...
568
-
569
- class TextFieldSlot(RadixThemesComponent):
570
- @overload
571
- @classmethod
572
- def create( # type: ignore
573
- cls,
574
- *children,
575
- color: Optional[Union[Var[str], str]] = None,
576
- color_scheme: Optional[
577
- Union[
578
- Var[
579
- Literal[
580
- "tomato",
581
- "red",
582
- "ruby",
583
- "crimson",
584
- "pink",
585
- "plum",
586
- "purple",
587
- "violet",
588
- "iris",
589
- "indigo",
590
- "blue",
591
- "cyan",
592
- "teal",
593
- "jade",
594
- "green",
595
- "grass",
596
- "brown",
597
- "orange",
598
- "sky",
599
- "mint",
600
- "lime",
601
- "yellow",
602
- "amber",
603
- "gold",
604
- "bronze",
605
- "gray",
606
- ]
607
- ],
608
- Literal[
609
- "tomato",
610
- "red",
611
- "ruby",
612
- "crimson",
613
- "pink",
614
- "plum",
615
- "purple",
616
- "violet",
617
- "iris",
618
- "indigo",
619
- "blue",
620
- "cyan",
621
- "teal",
622
- "jade",
623
- "green",
624
- "grass",
625
- "brown",
626
- "orange",
627
- "sky",
628
- "mint",
629
- "lime",
630
- "yellow",
631
- "amber",
632
- "gold",
633
- "bronze",
634
- "gray",
635
- ],
636
- ]
637
- ] = None,
638
- style: Optional[Style] = None,
639
- key: Optional[Any] = None,
640
- id: Optional[Any] = None,
641
- class_name: Optional[Any] = None,
642
- autofocus: Optional[bool] = None,
643
- _rename_props: Optional[Dict[str, str]] = None,
644
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
645
- on_blur: Optional[
646
- Union[EventHandler, EventSpec, list, function, BaseVar]
647
- ] = None,
648
- on_click: Optional[
649
- Union[EventHandler, EventSpec, list, function, BaseVar]
650
- ] = None,
651
- on_context_menu: Optional[
652
- Union[EventHandler, EventSpec, list, function, BaseVar]
653
- ] = None,
654
- on_double_click: Optional[
655
- Union[EventHandler, EventSpec, list, function, BaseVar]
656
- ] = None,
657
- on_focus: Optional[
658
- Union[EventHandler, EventSpec, list, function, BaseVar]
659
- ] = None,
660
- on_mount: Optional[
661
- Union[EventHandler, EventSpec, list, function, BaseVar]
662
- ] = None,
663
- on_mouse_down: Optional[
664
- Union[EventHandler, EventSpec, list, function, BaseVar]
665
- ] = None,
666
- on_mouse_enter: Optional[
667
- Union[EventHandler, EventSpec, list, function, BaseVar]
668
- ] = None,
669
- on_mouse_leave: Optional[
670
- Union[EventHandler, EventSpec, list, function, BaseVar]
671
- ] = None,
672
- on_mouse_move: Optional[
673
- Union[EventHandler, EventSpec, list, function, BaseVar]
674
- ] = None,
675
- on_mouse_out: Optional[
676
- Union[EventHandler, EventSpec, list, function, BaseVar]
677
- ] = None,
678
- on_mouse_over: Optional[
679
- Union[EventHandler, EventSpec, list, function, BaseVar]
680
- ] = None,
681
- on_mouse_up: Optional[
682
- Union[EventHandler, EventSpec, list, function, BaseVar]
683
- ] = None,
684
- on_scroll: Optional[
685
- Union[EventHandler, EventSpec, list, function, BaseVar]
686
- ] = None,
687
- on_unmount: Optional[
688
- Union[EventHandler, EventSpec, list, function, BaseVar]
689
- ] = None,
690
- **props
691
- ) -> "TextFieldSlot":
692
- """Create a new component instance.
693
-
694
- Will prepend "RadixThemes" to the component tag to avoid conflicts with
695
- other UI libraries for common names, like Text and Button.
696
-
697
- Args:
698
- *children: Child components.
699
- color: map to CSS default color property.
700
- color_scheme: map to radix color property.
701
- style: The style of the component.
702
- key: A unique key for the component.
703
- id: The id for the component.
704
- class_name: The class name for the component.
705
- autofocus: Whether the component should take the focus once the page is loaded
706
- _rename_props: props to change the name of
707
- custom_attrs: custom attribute
708
- **props: Component properties.
709
-
710
- Returns:
711
- A new component instance.
712
- """
713
- ...
714
-
715
- class Input(RadixThemesComponent):
716
- @overload
717
- @classmethod
718
- def create( # type: ignore
719
- cls,
720
- *children,
721
- icon: Optional[Union[Var[str], str]] = None,
722
- size: Optional[
723
- Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
724
- ] = None,
725
- variant: Optional[
726
- Union[
727
- Var[Literal["classic", "surface", "soft"]],
728
- Literal["classic", "surface", "soft"],
729
- ]
730
- ] = None,
731
- color_scheme: Optional[
732
- Union[
733
- Var[
734
- Literal[
735
- "tomato",
736
- "red",
737
- "ruby",
738
- "crimson",
739
- "pink",
740
- "plum",
741
- "purple",
742
- "violet",
743
- "iris",
744
- "indigo",
745
- "blue",
746
- "cyan",
747
- "teal",
748
- "jade",
749
- "green",
750
- "grass",
751
- "brown",
752
- "orange",
753
- "sky",
754
- "mint",
755
- "lime",
756
- "yellow",
757
- "amber",
758
- "gold",
759
- "bronze",
760
- "gray",
761
- ]
762
- ],
763
- Literal[
764
- "tomato",
765
- "red",
766
- "ruby",
767
- "crimson",
768
- "pink",
769
- "plum",
770
- "purple",
771
- "violet",
772
- "iris",
773
- "indigo",
774
- "blue",
775
- "cyan",
776
- "teal",
777
- "jade",
778
- "green",
779
- "grass",
780
- "brown",
781
- "orange",
782
- "sky",
783
- "mint",
784
- "lime",
785
- "yellow",
786
- "amber",
787
- "gold",
788
- "bronze",
789
- "gray",
790
- ],
791
- ]
792
- ] = None,
793
- radius: Optional[
794
- Union[
795
- Var[Literal["none", "small", "medium", "large", "full"]],
796
- Literal["none", "small", "medium", "large", "full"],
797
- ]
798
- ] = None,
799
- auto_complete: Optional[Union[Var[bool], bool]] = None,
800
- default_value: Optional[Union[Var[str], str]] = None,
801
- disabled: Optional[Union[Var[bool], bool]] = None,
802
- max_length: Optional[Union[Var[str], str]] = None,
803
- min_length: Optional[Union[Var[str], str]] = None,
804
- name: Optional[Union[Var[str], str]] = None,
805
- placeholder: Optional[Union[Var[str], str]] = None,
806
- required: Optional[Union[Var[bool], bool]] = None,
807
- value: Optional[Union[Var[str], str]] = None,
808
- style: Optional[Style] = None,
809
- key: Optional[Any] = None,
810
- id: Optional[Any] = None,
811
- class_name: Optional[Any] = None,
812
- autofocus: Optional[bool] = None,
813
- _rename_props: Optional[Dict[str, str]] = None,
814
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
815
- on_blur: Optional[
816
- Union[EventHandler, EventSpec, list, function, BaseVar]
817
- ] = None,
818
- on_change: Optional[
819
- Union[EventHandler, EventSpec, list, function, BaseVar]
820
- ] = None,
821
- on_click: Optional[
822
- Union[EventHandler, EventSpec, list, function, BaseVar]
823
- ] = None,
824
- on_context_menu: Optional[
825
- Union[EventHandler, EventSpec, list, function, BaseVar]
826
- ] = None,
827
- on_double_click: Optional[
828
- Union[EventHandler, EventSpec, list, function, BaseVar]
829
- ] = None,
830
- on_focus: Optional[
831
- Union[EventHandler, EventSpec, list, function, BaseVar]
832
- ] = None,
833
- on_key_down: Optional[
834
- Union[EventHandler, EventSpec, list, function, BaseVar]
835
- ] = None,
836
- on_key_up: Optional[
837
- Union[EventHandler, EventSpec, list, function, BaseVar]
838
- ] = None,
839
- on_mount: Optional[
840
- Union[EventHandler, EventSpec, list, function, BaseVar]
841
- ] = None,
842
- on_mouse_down: Optional[
843
- Union[EventHandler, EventSpec, list, function, BaseVar]
844
- ] = None,
845
- on_mouse_enter: Optional[
846
- Union[EventHandler, EventSpec, list, function, BaseVar]
847
- ] = None,
848
- on_mouse_leave: Optional[
849
- Union[EventHandler, EventSpec, list, function, BaseVar]
850
- ] = None,
851
- on_mouse_move: Optional[
852
- Union[EventHandler, EventSpec, list, function, BaseVar]
853
- ] = None,
854
- on_mouse_out: Optional[
855
- Union[EventHandler, EventSpec, list, function, BaseVar]
856
- ] = None,
857
- on_mouse_over: Optional[
858
- Union[EventHandler, EventSpec, list, function, BaseVar]
859
- ] = None,
860
- on_mouse_up: Optional[
861
- Union[EventHandler, EventSpec, list, function, BaseVar]
862
- ] = None,
863
- on_scroll: Optional[
864
- Union[EventHandler, EventSpec, list, function, BaseVar]
865
- ] = None,
866
- on_unmount: Optional[
867
- Union[EventHandler, EventSpec, list, function, BaseVar]
868
- ] = None,
869
- **props
870
- ) -> "Input":
871
- """Create an Input component.
872
-
873
- Args:
874
- icon: The icon to render before the input.
875
- size: Text field size "1" - "3"
876
- variant: Variant of text field: "classic" | "surface" | "soft"
877
- color_scheme: Override theme color for text field
878
- radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
879
- auto_complete: Whether the input should have autocomplete enabled
880
- default_value: The value of the input when initially rendered.
881
- disabled: Disables the input
882
- max_length: Specifies the maximum number of characters allowed in the input
883
- min_length: Specifies the minimum number of characters required in the input
884
- name: Name of the input, used when sending form data
885
- placeholder: Placeholder text in the input
886
- required: Indicates that the input is required
887
- value: Value of the input
888
- style: The style of the component.
889
- key: A unique key for the component.
890
- id: The id for the component.
891
- class_name: The class name for the component.
892
- autofocus: Whether the component should take the focus once the page is loaded
893
- _rename_props: props to change the name of
894
- custom_attrs: custom attribute
895
- **props: The properties of the component.
896
-
897
- Returns:
898
- The component.
899
- """
900
- ...
901
- def get_event_triggers(self) -> Dict[str, Any]: ...
902
-
903
- class TextField(SimpleNamespace):
904
- root = staticmethod(TextFieldRoot.create)
905
- input = staticmethod(TextFieldInput.create)
906
- slot = staticmethod(TextFieldSlot.create)
907
-
908
- @staticmethod
909
- def __call__(
910
- *children,
911
- icon: Optional[Union[Var[str], str]] = None,
912
- size: Optional[
913
- Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
914
- ] = None,
915
- variant: Optional[
916
- Union[
917
- Var[Literal["classic", "surface", "soft"]],
918
- Literal["classic", "surface", "soft"],
919
- ]
920
- ] = None,
921
- color_scheme: Optional[
922
- Union[
923
- Var[
924
- Literal[
925
- "tomato",
926
- "red",
927
- "ruby",
928
- "crimson",
929
- "pink",
930
- "plum",
931
- "purple",
932
- "violet",
933
- "iris",
934
- "indigo",
935
- "blue",
936
- "cyan",
937
- "teal",
938
- "jade",
939
- "green",
940
- "grass",
941
- "brown",
942
- "orange",
943
- "sky",
944
- "mint",
945
- "lime",
946
- "yellow",
947
- "amber",
948
- "gold",
949
- "bronze",
950
- "gray",
951
- ]
952
- ],
953
- Literal[
954
- "tomato",
955
- "red",
956
- "ruby",
957
- "crimson",
958
- "pink",
959
- "plum",
960
- "purple",
961
- "violet",
962
- "iris",
963
- "indigo",
964
- "blue",
965
- "cyan",
966
- "teal",
967
- "jade",
968
- "green",
969
- "grass",
970
- "brown",
971
- "orange",
972
- "sky",
973
- "mint",
974
- "lime",
975
- "yellow",
976
- "amber",
977
- "gold",
978
- "bronze",
979
- "gray",
980
- ],
981
- ]
982
- ] = None,
983
- radius: Optional[
984
- Union[
985
- Var[Literal["none", "small", "medium", "large", "full"]],
986
- Literal["none", "small", "medium", "large", "full"],
987
- ]
988
- ] = None,
989
- auto_complete: Optional[Union[Var[bool], bool]] = None,
990
- default_value: Optional[Union[Var[str], str]] = None,
991
- disabled: Optional[Union[Var[bool], bool]] = None,
992
- max_length: Optional[Union[Var[str], str]] = None,
993
- min_length: Optional[Union[Var[str], str]] = None,
994
- name: Optional[Union[Var[str], str]] = None,
995
- placeholder: Optional[Union[Var[str], str]] = None,
996
- required: Optional[Union[Var[bool], bool]] = None,
997
- value: Optional[Union[Var[str], str]] = None,
998
- style: Optional[Style] = None,
999
- key: Optional[Any] = None,
1000
- id: Optional[Any] = None,
1001
- class_name: Optional[Any] = None,
1002
- autofocus: Optional[bool] = None,
1003
- _rename_props: Optional[Dict[str, str]] = None,
1004
- custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
1005
- on_blur: Optional[
1006
- Union[EventHandler, EventSpec, list, function, BaseVar]
1007
- ] = None,
1008
- on_change: Optional[
1009
- Union[EventHandler, EventSpec, list, function, BaseVar]
1010
- ] = None,
1011
- on_click: Optional[
1012
- Union[EventHandler, EventSpec, list, function, BaseVar]
1013
- ] = None,
1014
- on_context_menu: Optional[
1015
- Union[EventHandler, EventSpec, list, function, BaseVar]
1016
- ] = None,
1017
- on_double_click: Optional[
1018
- Union[EventHandler, EventSpec, list, function, BaseVar]
1019
- ] = None,
1020
- on_focus: Optional[
1021
- Union[EventHandler, EventSpec, list, function, BaseVar]
1022
- ] = None,
1023
- on_key_down: Optional[
1024
- Union[EventHandler, EventSpec, list, function, BaseVar]
1025
- ] = None,
1026
- on_key_up: Optional[
1027
- Union[EventHandler, EventSpec, list, function, BaseVar]
1028
- ] = None,
1029
- on_mount: Optional[
1030
- Union[EventHandler, EventSpec, list, function, BaseVar]
1031
- ] = None,
1032
- on_mouse_down: Optional[
1033
- Union[EventHandler, EventSpec, list, function, BaseVar]
1034
- ] = None,
1035
- on_mouse_enter: Optional[
1036
- Union[EventHandler, EventSpec, list, function, BaseVar]
1037
- ] = None,
1038
- on_mouse_leave: Optional[
1039
- Union[EventHandler, EventSpec, list, function, BaseVar]
1040
- ] = None,
1041
- on_mouse_move: Optional[
1042
- Union[EventHandler, EventSpec, list, function, BaseVar]
1043
- ] = None,
1044
- on_mouse_out: Optional[
1045
- Union[EventHandler, EventSpec, list, function, BaseVar]
1046
- ] = None,
1047
- on_mouse_over: Optional[
1048
- Union[EventHandler, EventSpec, list, function, BaseVar]
1049
- ] = None,
1050
- on_mouse_up: Optional[
1051
- Union[EventHandler, EventSpec, list, function, BaseVar]
1052
- ] = None,
1053
- on_scroll: Optional[
1054
- Union[EventHandler, EventSpec, list, function, BaseVar]
1055
- ] = None,
1056
- on_unmount: Optional[
1057
- Union[EventHandler, EventSpec, list, function, BaseVar]
1058
- ] = None,
1059
- **props
1060
- ) -> "Input":
1061
- """Create an Input component.
1062
-
1063
- Args:
1064
- icon: The icon to render before the input.
1065
- size: Text field size "1" - "3"
1066
- variant: Variant of text field: "classic" | "surface" | "soft"
1067
- color_scheme: Override theme color for text field
1068
- radius: Override theme radius for text field: "none" | "small" | "medium" | "large" | "full"
1069
- auto_complete: Whether the input should have autocomplete enabled
1070
- default_value: The value of the input when initially rendered.
1071
- disabled: Disables the input
1072
- max_length: Specifies the maximum number of characters allowed in the input
1073
- min_length: Specifies the minimum number of characters required in the input
1074
- name: Name of the input, used when sending form data
1075
- placeholder: Placeholder text in the input
1076
- required: Indicates that the input is required
1077
- value: Value of the input
1078
- style: The style of the component.
1079
- key: A unique key for the component.
1080
- id: The id for the component.
1081
- class_name: The class name for the component.
1082
- autofocus: Whether the component should take the focus once the page is loaded
1083
- _rename_props: props to change the name of
1084
- custom_attrs: custom attribute
1085
- **props: The properties of the component.
1086
-
1087
- Returns:
1088
- The component.
1089
- """
1090
- ...
1091
-
1092
- text_field = TextField()