reflex 0.7.0a4__py3-none-any.whl → 0.7.1a1__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.
- reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +3 -1
- reflex/__init__.py +1 -0
- reflex/__init__.pyi +1 -0
- reflex/app.py +251 -68
- reflex/base.py +4 -10
- reflex/compiler/compiler.py +46 -12
- reflex/compiler/templates.py +1 -2
- reflex/compiler/utils.py +23 -14
- reflex/components/base/bare.py +109 -16
- reflex/components/component.py +179 -124
- reflex/components/core/__init__.py +1 -0
- reflex/components/core/__init__.pyi +1 -0
- reflex/components/core/auto_scroll.py +111 -0
- reflex/components/core/auto_scroll.pyi +284 -0
- reflex/components/core/banner.py +35 -5
- reflex/components/core/banner.pyi +398 -36
- reflex/components/core/breakpoints.py +1 -1
- reflex/components/core/cond.py +0 -8
- reflex/components/core/foreach.py +12 -2
- reflex/components/core/html.pyi +200 -19
- reflex/components/core/match.py +4 -4
- reflex/components/core/sticky.py +4 -30
- reflex/components/core/sticky.pyi +874 -90
- reflex/components/core/upload.py +3 -5
- reflex/components/core/upload.pyi +2 -4
- reflex/components/datadisplay/code.py +36 -10
- reflex/components/datadisplay/code.pyi +1 -1
- reflex/components/datadisplay/dataeditor.py +1 -3
- reflex/components/datadisplay/dataeditor.pyi +1 -3
- reflex/components/el/elements/base.py +95 -17
- reflex/components/el/elements/base.pyi +278 -19
- reflex/components/el/elements/forms.py +124 -102
- reflex/components/el/elements/forms.pyi +2787 -365
- reflex/components/el/elements/inline.py +24 -15
- reflex/components/el/elements/inline.pyi +5655 -546
- reflex/components/el/elements/media.py +79 -95
- reflex/components/el/elements/media.pyi +5167 -565
- reflex/components/el/elements/metadata.py +19 -17
- reflex/components/el/elements/metadata.pyi +841 -89
- reflex/components/el/elements/other.py +3 -5
- reflex/components/el/elements/other.pyi +1404 -137
- reflex/components/el/elements/scripts.py +10 -13
- reflex/components/el/elements/scripts.pyi +634 -65
- reflex/components/el/elements/sectioning.pyi +3001 -286
- reflex/components/el/elements/tables.py +14 -35
- reflex/components/el/elements/tables.pyi +2029 -218
- reflex/components/el/elements/typography.py +10 -13
- reflex/components/el/elements/typography.pyi +3014 -297
- reflex/components/lucide/icon.py +22 -6
- reflex/components/markdown/markdown.py +30 -10
- reflex/components/markdown/markdown.pyi +3 -2
- reflex/components/plotly/plotly.py +1 -3
- reflex/components/plotly/plotly.pyi +1 -3
- reflex/components/radix/primitives/form.pyi +624 -93
- reflex/components/radix/themes/color_mode.py +1 -1
- reflex/components/radix/themes/color_mode.pyi +213 -31
- reflex/components/radix/themes/components/alert_dialog.pyi +199 -18
- reflex/components/radix/themes/components/badge.pyi +199 -18
- reflex/components/radix/themes/components/button.pyi +213 -31
- reflex/components/radix/themes/components/callout.pyi +1000 -95
- reflex/components/radix/themes/components/card.pyi +199 -18
- reflex/components/radix/themes/components/context_menu.py +79 -1
- reflex/components/radix/themes/components/context_menu.pyi +320 -1
- reflex/components/radix/themes/components/dialog.pyi +199 -18
- reflex/components/radix/themes/components/hover_card.pyi +199 -18
- reflex/components/radix/themes/components/icon_button.pyi +213 -31
- reflex/components/radix/themes/components/inset.pyi +199 -18
- reflex/components/radix/themes/components/popover.pyi +199 -18
- reflex/components/radix/themes/components/table.pyi +1437 -154
- reflex/components/radix/themes/components/text_area.py +2 -2
- reflex/components/radix/themes/components/text_area.pyi +201 -20
- reflex/components/radix/themes/components/text_field.py +1 -1
- reflex/components/radix/themes/components/text_field.pyi +444 -88
- reflex/components/radix/themes/layout/box.pyi +200 -19
- reflex/components/radix/themes/layout/center.pyi +199 -18
- reflex/components/radix/themes/layout/container.pyi +199 -18
- reflex/components/radix/themes/layout/flex.pyi +199 -18
- reflex/components/radix/themes/layout/grid.pyi +199 -18
- reflex/components/radix/themes/layout/list.pyi +604 -57
- reflex/components/radix/themes/layout/section.pyi +199 -18
- reflex/components/radix/themes/layout/spacer.pyi +199 -18
- reflex/components/radix/themes/layout/stack.pyi +597 -54
- reflex/components/radix/themes/typography/blockquote.pyi +200 -19
- reflex/components/radix/themes/typography/code.pyi +199 -18
- reflex/components/radix/themes/typography/heading.pyi +199 -18
- reflex/components/radix/themes/typography/link.pyi +238 -28
- reflex/components/radix/themes/typography/text.pyi +1394 -127
- reflex/components/react_player/react_player.py +1 -1
- reflex/components/react_player/react_player.pyi +1 -3
- reflex/components/sonner/toast.py +19 -1
- reflex/components/sonner/toast.pyi +10 -1
- reflex/components/tags/iter_tag.py +4 -0
- reflex/components/tags/tag.py +3 -3
- reflex/config.py +187 -28
- reflex/constants/__init__.py +2 -0
- reflex/constants/base.py +6 -0
- reflex/constants/compiler.py +9 -0
- reflex/constants/event.py +1 -0
- reflex/constants/installer.py +4 -5
- reflex/constants/utils.py +1 -3
- reflex/event.py +7 -16
- reflex/experimental/layout.pyi +597 -54
- reflex/py.typed +0 -0
- reflex/reflex.py +44 -48
- reflex/state.py +49 -44
- reflex/style.py +6 -4
- reflex/testing.py +2 -0
- reflex/utils/build.py +12 -0
- reflex/utils/console.py +4 -0
- reflex/utils/decorator.py +25 -0
- reflex/utils/exec.py +92 -34
- reflex/utils/format.py +35 -6
- reflex/utils/path_ops.py +32 -1
- reflex/utils/prerequisites.py +54 -10
- reflex/utils/processes.py +12 -13
- reflex/utils/serializers.py +20 -43
- reflex/utils/telemetry.py +4 -15
- reflex/utils/types.py +36 -66
- reflex/vars/base.py +53 -76
- reflex/vars/function.py +17 -5
- reflex/vars/number.py +1 -1
- reflex/vars/sequence.py +80 -4
- {reflex-0.7.0a4.dist-info → reflex-0.7.1a1.dist-info}/METADATA +4 -5
- {reflex-0.7.0a4.dist-info → reflex-0.7.1a1.dist-info}/RECORD +127 -123
- {reflex-0.7.0a4.dist-info → reflex-0.7.1a1.dist-info}/LICENSE +0 -0
- {reflex-0.7.0a4.dist-info → reflex-0.7.1a1.dist-info}/WHEEL +0 -0
- {reflex-0.7.0a4.dist-info → reflex-0.7.1a1.dist-info}/entry_points.txt +0 -0
|
@@ -271,30 +271,211 @@ class ConnectionPulser(Div):
|
|
|
271
271
|
def create( # type: ignore
|
|
272
272
|
cls,
|
|
273
273
|
*children,
|
|
274
|
-
access_key: Optional[Union[Var[
|
|
274
|
+
access_key: Optional[Union[Var[str], str]] = None,
|
|
275
275
|
auto_capitalize: Optional[
|
|
276
|
-
Union[
|
|
276
|
+
Union[
|
|
277
|
+
Literal["characters", "none", "off", "on", "sentences", "words"],
|
|
278
|
+
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
|
279
|
+
]
|
|
277
280
|
] = None,
|
|
278
281
|
content_editable: Optional[
|
|
279
|
-
Union[
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
282
|
+
Union[
|
|
283
|
+
Literal["inherit", "plaintext-only", False, True],
|
|
284
|
+
Var[Literal["inherit", "plaintext-only", False, True]],
|
|
285
|
+
]
|
|
283
286
|
] = None,
|
|
284
|
-
|
|
285
|
-
|
|
287
|
+
context_menu: Optional[Union[Var[str], str]] = None,
|
|
288
|
+
dir: Optional[Union[Var[str], str]] = None,
|
|
289
|
+
draggable: Optional[Union[Var[bool], bool]] = None,
|
|
286
290
|
enter_key_hint: Optional[
|
|
287
|
-
Union[
|
|
291
|
+
Union[
|
|
292
|
+
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
|
293
|
+
Var[
|
|
294
|
+
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
|
295
|
+
],
|
|
296
|
+
]
|
|
297
|
+
] = None,
|
|
298
|
+
hidden: Optional[Union[Var[bool], bool]] = None,
|
|
299
|
+
input_mode: Optional[
|
|
300
|
+
Union[
|
|
301
|
+
Literal[
|
|
302
|
+
"decimal",
|
|
303
|
+
"email",
|
|
304
|
+
"none",
|
|
305
|
+
"numeric",
|
|
306
|
+
"search",
|
|
307
|
+
"tel",
|
|
308
|
+
"text",
|
|
309
|
+
"url",
|
|
310
|
+
],
|
|
311
|
+
Var[
|
|
312
|
+
Literal[
|
|
313
|
+
"decimal",
|
|
314
|
+
"email",
|
|
315
|
+
"none",
|
|
316
|
+
"numeric",
|
|
317
|
+
"search",
|
|
318
|
+
"tel",
|
|
319
|
+
"text",
|
|
320
|
+
"url",
|
|
321
|
+
]
|
|
322
|
+
],
|
|
323
|
+
]
|
|
324
|
+
] = None,
|
|
325
|
+
item_prop: Optional[Union[Var[str], str]] = None,
|
|
326
|
+
lang: Optional[Union[Var[str], str]] = None,
|
|
327
|
+
role: Optional[
|
|
328
|
+
Union[
|
|
329
|
+
Literal[
|
|
330
|
+
"alert",
|
|
331
|
+
"alertdialog",
|
|
332
|
+
"application",
|
|
333
|
+
"article",
|
|
334
|
+
"banner",
|
|
335
|
+
"button",
|
|
336
|
+
"cell",
|
|
337
|
+
"checkbox",
|
|
338
|
+
"columnheader",
|
|
339
|
+
"combobox",
|
|
340
|
+
"complementary",
|
|
341
|
+
"contentinfo",
|
|
342
|
+
"definition",
|
|
343
|
+
"dialog",
|
|
344
|
+
"directory",
|
|
345
|
+
"document",
|
|
346
|
+
"feed",
|
|
347
|
+
"figure",
|
|
348
|
+
"form",
|
|
349
|
+
"grid",
|
|
350
|
+
"gridcell",
|
|
351
|
+
"group",
|
|
352
|
+
"heading",
|
|
353
|
+
"img",
|
|
354
|
+
"link",
|
|
355
|
+
"list",
|
|
356
|
+
"listbox",
|
|
357
|
+
"listitem",
|
|
358
|
+
"log",
|
|
359
|
+
"main",
|
|
360
|
+
"marquee",
|
|
361
|
+
"math",
|
|
362
|
+
"menu",
|
|
363
|
+
"menubar",
|
|
364
|
+
"menuitem",
|
|
365
|
+
"menuitemcheckbox",
|
|
366
|
+
"menuitemradio",
|
|
367
|
+
"navigation",
|
|
368
|
+
"none",
|
|
369
|
+
"note",
|
|
370
|
+
"option",
|
|
371
|
+
"presentation",
|
|
372
|
+
"progressbar",
|
|
373
|
+
"radio",
|
|
374
|
+
"radiogroup",
|
|
375
|
+
"region",
|
|
376
|
+
"row",
|
|
377
|
+
"rowgroup",
|
|
378
|
+
"rowheader",
|
|
379
|
+
"scrollbar",
|
|
380
|
+
"search",
|
|
381
|
+
"searchbox",
|
|
382
|
+
"separator",
|
|
383
|
+
"slider",
|
|
384
|
+
"spinbutton",
|
|
385
|
+
"status",
|
|
386
|
+
"switch",
|
|
387
|
+
"tab",
|
|
388
|
+
"table",
|
|
389
|
+
"tablist",
|
|
390
|
+
"tabpanel",
|
|
391
|
+
"term",
|
|
392
|
+
"textbox",
|
|
393
|
+
"timer",
|
|
394
|
+
"toolbar",
|
|
395
|
+
"tooltip",
|
|
396
|
+
"tree",
|
|
397
|
+
"treegrid",
|
|
398
|
+
"treeitem",
|
|
399
|
+
],
|
|
400
|
+
Var[
|
|
401
|
+
Literal[
|
|
402
|
+
"alert",
|
|
403
|
+
"alertdialog",
|
|
404
|
+
"application",
|
|
405
|
+
"article",
|
|
406
|
+
"banner",
|
|
407
|
+
"button",
|
|
408
|
+
"cell",
|
|
409
|
+
"checkbox",
|
|
410
|
+
"columnheader",
|
|
411
|
+
"combobox",
|
|
412
|
+
"complementary",
|
|
413
|
+
"contentinfo",
|
|
414
|
+
"definition",
|
|
415
|
+
"dialog",
|
|
416
|
+
"directory",
|
|
417
|
+
"document",
|
|
418
|
+
"feed",
|
|
419
|
+
"figure",
|
|
420
|
+
"form",
|
|
421
|
+
"grid",
|
|
422
|
+
"gridcell",
|
|
423
|
+
"group",
|
|
424
|
+
"heading",
|
|
425
|
+
"img",
|
|
426
|
+
"link",
|
|
427
|
+
"list",
|
|
428
|
+
"listbox",
|
|
429
|
+
"listitem",
|
|
430
|
+
"log",
|
|
431
|
+
"main",
|
|
432
|
+
"marquee",
|
|
433
|
+
"math",
|
|
434
|
+
"menu",
|
|
435
|
+
"menubar",
|
|
436
|
+
"menuitem",
|
|
437
|
+
"menuitemcheckbox",
|
|
438
|
+
"menuitemradio",
|
|
439
|
+
"navigation",
|
|
440
|
+
"none",
|
|
441
|
+
"note",
|
|
442
|
+
"option",
|
|
443
|
+
"presentation",
|
|
444
|
+
"progressbar",
|
|
445
|
+
"radio",
|
|
446
|
+
"radiogroup",
|
|
447
|
+
"region",
|
|
448
|
+
"row",
|
|
449
|
+
"rowgroup",
|
|
450
|
+
"rowheader",
|
|
451
|
+
"scrollbar",
|
|
452
|
+
"search",
|
|
453
|
+
"searchbox",
|
|
454
|
+
"separator",
|
|
455
|
+
"slider",
|
|
456
|
+
"spinbutton",
|
|
457
|
+
"status",
|
|
458
|
+
"switch",
|
|
459
|
+
"tab",
|
|
460
|
+
"table",
|
|
461
|
+
"tablist",
|
|
462
|
+
"tabpanel",
|
|
463
|
+
"term",
|
|
464
|
+
"textbox",
|
|
465
|
+
"timer",
|
|
466
|
+
"toolbar",
|
|
467
|
+
"tooltip",
|
|
468
|
+
"tree",
|
|
469
|
+
"treegrid",
|
|
470
|
+
"treeitem",
|
|
471
|
+
]
|
|
472
|
+
],
|
|
473
|
+
]
|
|
288
474
|
] = None,
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
294
|
-
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
295
|
-
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
296
|
-
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
297
|
-
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
475
|
+
slot: Optional[Union[Var[str], str]] = None,
|
|
476
|
+
spell_check: Optional[Union[Var[bool], bool]] = None,
|
|
477
|
+
tab_index: Optional[Union[Var[int], int]] = None,
|
|
478
|
+
title: Optional[Union[Var[str], str]] = None,
|
|
298
479
|
style: Optional[Style] = None,
|
|
299
480
|
key: Optional[Any] = None,
|
|
300
481
|
id: Optional[Any] = None,
|
|
@@ -356,30 +537,211 @@ class BackendDisabled(Div):
|
|
|
356
537
|
def create( # type: ignore
|
|
357
538
|
cls,
|
|
358
539
|
*children,
|
|
359
|
-
access_key: Optional[Union[Var[
|
|
540
|
+
access_key: Optional[Union[Var[str], str]] = None,
|
|
360
541
|
auto_capitalize: Optional[
|
|
361
|
-
Union[
|
|
542
|
+
Union[
|
|
543
|
+
Literal["characters", "none", "off", "on", "sentences", "words"],
|
|
544
|
+
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
|
545
|
+
]
|
|
362
546
|
] = None,
|
|
363
547
|
content_editable: Optional[
|
|
364
|
-
Union[
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
548
|
+
Union[
|
|
549
|
+
Literal["inherit", "plaintext-only", False, True],
|
|
550
|
+
Var[Literal["inherit", "plaintext-only", False, True]],
|
|
551
|
+
]
|
|
368
552
|
] = None,
|
|
369
|
-
|
|
370
|
-
|
|
553
|
+
context_menu: Optional[Union[Var[str], str]] = None,
|
|
554
|
+
dir: Optional[Union[Var[str], str]] = None,
|
|
555
|
+
draggable: Optional[Union[Var[bool], bool]] = None,
|
|
371
556
|
enter_key_hint: Optional[
|
|
372
|
-
Union[
|
|
557
|
+
Union[
|
|
558
|
+
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
|
559
|
+
Var[
|
|
560
|
+
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
|
561
|
+
],
|
|
562
|
+
]
|
|
563
|
+
] = None,
|
|
564
|
+
hidden: Optional[Union[Var[bool], bool]] = None,
|
|
565
|
+
input_mode: Optional[
|
|
566
|
+
Union[
|
|
567
|
+
Literal[
|
|
568
|
+
"decimal",
|
|
569
|
+
"email",
|
|
570
|
+
"none",
|
|
571
|
+
"numeric",
|
|
572
|
+
"search",
|
|
573
|
+
"tel",
|
|
574
|
+
"text",
|
|
575
|
+
"url",
|
|
576
|
+
],
|
|
577
|
+
Var[
|
|
578
|
+
Literal[
|
|
579
|
+
"decimal",
|
|
580
|
+
"email",
|
|
581
|
+
"none",
|
|
582
|
+
"numeric",
|
|
583
|
+
"search",
|
|
584
|
+
"tel",
|
|
585
|
+
"text",
|
|
586
|
+
"url",
|
|
587
|
+
]
|
|
588
|
+
],
|
|
589
|
+
]
|
|
590
|
+
] = None,
|
|
591
|
+
item_prop: Optional[Union[Var[str], str]] = None,
|
|
592
|
+
lang: Optional[Union[Var[str], str]] = None,
|
|
593
|
+
role: Optional[
|
|
594
|
+
Union[
|
|
595
|
+
Literal[
|
|
596
|
+
"alert",
|
|
597
|
+
"alertdialog",
|
|
598
|
+
"application",
|
|
599
|
+
"article",
|
|
600
|
+
"banner",
|
|
601
|
+
"button",
|
|
602
|
+
"cell",
|
|
603
|
+
"checkbox",
|
|
604
|
+
"columnheader",
|
|
605
|
+
"combobox",
|
|
606
|
+
"complementary",
|
|
607
|
+
"contentinfo",
|
|
608
|
+
"definition",
|
|
609
|
+
"dialog",
|
|
610
|
+
"directory",
|
|
611
|
+
"document",
|
|
612
|
+
"feed",
|
|
613
|
+
"figure",
|
|
614
|
+
"form",
|
|
615
|
+
"grid",
|
|
616
|
+
"gridcell",
|
|
617
|
+
"group",
|
|
618
|
+
"heading",
|
|
619
|
+
"img",
|
|
620
|
+
"link",
|
|
621
|
+
"list",
|
|
622
|
+
"listbox",
|
|
623
|
+
"listitem",
|
|
624
|
+
"log",
|
|
625
|
+
"main",
|
|
626
|
+
"marquee",
|
|
627
|
+
"math",
|
|
628
|
+
"menu",
|
|
629
|
+
"menubar",
|
|
630
|
+
"menuitem",
|
|
631
|
+
"menuitemcheckbox",
|
|
632
|
+
"menuitemradio",
|
|
633
|
+
"navigation",
|
|
634
|
+
"none",
|
|
635
|
+
"note",
|
|
636
|
+
"option",
|
|
637
|
+
"presentation",
|
|
638
|
+
"progressbar",
|
|
639
|
+
"radio",
|
|
640
|
+
"radiogroup",
|
|
641
|
+
"region",
|
|
642
|
+
"row",
|
|
643
|
+
"rowgroup",
|
|
644
|
+
"rowheader",
|
|
645
|
+
"scrollbar",
|
|
646
|
+
"search",
|
|
647
|
+
"searchbox",
|
|
648
|
+
"separator",
|
|
649
|
+
"slider",
|
|
650
|
+
"spinbutton",
|
|
651
|
+
"status",
|
|
652
|
+
"switch",
|
|
653
|
+
"tab",
|
|
654
|
+
"table",
|
|
655
|
+
"tablist",
|
|
656
|
+
"tabpanel",
|
|
657
|
+
"term",
|
|
658
|
+
"textbox",
|
|
659
|
+
"timer",
|
|
660
|
+
"toolbar",
|
|
661
|
+
"tooltip",
|
|
662
|
+
"tree",
|
|
663
|
+
"treegrid",
|
|
664
|
+
"treeitem",
|
|
665
|
+
],
|
|
666
|
+
Var[
|
|
667
|
+
Literal[
|
|
668
|
+
"alert",
|
|
669
|
+
"alertdialog",
|
|
670
|
+
"application",
|
|
671
|
+
"article",
|
|
672
|
+
"banner",
|
|
673
|
+
"button",
|
|
674
|
+
"cell",
|
|
675
|
+
"checkbox",
|
|
676
|
+
"columnheader",
|
|
677
|
+
"combobox",
|
|
678
|
+
"complementary",
|
|
679
|
+
"contentinfo",
|
|
680
|
+
"definition",
|
|
681
|
+
"dialog",
|
|
682
|
+
"directory",
|
|
683
|
+
"document",
|
|
684
|
+
"feed",
|
|
685
|
+
"figure",
|
|
686
|
+
"form",
|
|
687
|
+
"grid",
|
|
688
|
+
"gridcell",
|
|
689
|
+
"group",
|
|
690
|
+
"heading",
|
|
691
|
+
"img",
|
|
692
|
+
"link",
|
|
693
|
+
"list",
|
|
694
|
+
"listbox",
|
|
695
|
+
"listitem",
|
|
696
|
+
"log",
|
|
697
|
+
"main",
|
|
698
|
+
"marquee",
|
|
699
|
+
"math",
|
|
700
|
+
"menu",
|
|
701
|
+
"menubar",
|
|
702
|
+
"menuitem",
|
|
703
|
+
"menuitemcheckbox",
|
|
704
|
+
"menuitemradio",
|
|
705
|
+
"navigation",
|
|
706
|
+
"none",
|
|
707
|
+
"note",
|
|
708
|
+
"option",
|
|
709
|
+
"presentation",
|
|
710
|
+
"progressbar",
|
|
711
|
+
"radio",
|
|
712
|
+
"radiogroup",
|
|
713
|
+
"region",
|
|
714
|
+
"row",
|
|
715
|
+
"rowgroup",
|
|
716
|
+
"rowheader",
|
|
717
|
+
"scrollbar",
|
|
718
|
+
"search",
|
|
719
|
+
"searchbox",
|
|
720
|
+
"separator",
|
|
721
|
+
"slider",
|
|
722
|
+
"spinbutton",
|
|
723
|
+
"status",
|
|
724
|
+
"switch",
|
|
725
|
+
"tab",
|
|
726
|
+
"table",
|
|
727
|
+
"tablist",
|
|
728
|
+
"tabpanel",
|
|
729
|
+
"term",
|
|
730
|
+
"textbox",
|
|
731
|
+
"timer",
|
|
732
|
+
"toolbar",
|
|
733
|
+
"tooltip",
|
|
734
|
+
"tree",
|
|
735
|
+
"treegrid",
|
|
736
|
+
"treeitem",
|
|
737
|
+
]
|
|
738
|
+
],
|
|
739
|
+
]
|
|
373
740
|
] = None,
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
379
|
-
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
380
|
-
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
381
|
-
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
382
|
-
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
|
741
|
+
slot: Optional[Union[Var[str], str]] = None,
|
|
742
|
+
spell_check: Optional[Union[Var[bool], bool]] = None,
|
|
743
|
+
tab_index: Optional[Union[Var[int], int]] = None,
|
|
744
|
+
title: Optional[Union[Var[str], str]] = None,
|
|
383
745
|
style: Optional[Style] = None,
|
|
384
746
|
key: Optional[Any] = None,
|
|
385
747
|
id: Optional[Any] = None,
|
reflex/components/core/cond.py
CHANGED
|
@@ -61,14 +61,6 @@ class Cond(MemoizationLeaf):
|
|
|
61
61
|
)
|
|
62
62
|
)
|
|
63
63
|
|
|
64
|
-
def _get_props_imports(self):
|
|
65
|
-
"""Get the imports needed for component's props.
|
|
66
|
-
|
|
67
|
-
Returns:
|
|
68
|
-
The imports for the component's props of the component.
|
|
69
|
-
"""
|
|
70
|
-
return []
|
|
71
|
-
|
|
72
64
|
def _render(self) -> Tag:
|
|
73
65
|
return CondTag(
|
|
74
66
|
cond=self.cond,
|
|
@@ -54,9 +54,10 @@ class Foreach(Component):
|
|
|
54
54
|
TypeError: If the render function is a ComponentState.
|
|
55
55
|
UntypedVarError: If the iterable is of type Any without a type annotation.
|
|
56
56
|
"""
|
|
57
|
-
from reflex.vars
|
|
57
|
+
from reflex.vars import ArrayVar, ObjectVar, StringVar
|
|
58
|
+
|
|
59
|
+
iterable = LiteralVar.create(iterable).guess_type()
|
|
58
60
|
|
|
59
|
-
iterable = LiteralVar.create(iterable)
|
|
60
61
|
if iterable._var_type == Any:
|
|
61
62
|
raise ForeachVarError(
|
|
62
63
|
f"Could not foreach over var `{iterable!s}` of type Any. "
|
|
@@ -75,6 +76,15 @@ class Foreach(Component):
|
|
|
75
76
|
if isinstance(iterable, ObjectVar):
|
|
76
77
|
iterable = iterable.entries()
|
|
77
78
|
|
|
79
|
+
if isinstance(iterable, StringVar):
|
|
80
|
+
iterable = iterable.split()
|
|
81
|
+
|
|
82
|
+
if not isinstance(iterable, ArrayVar):
|
|
83
|
+
raise ForeachVarError(
|
|
84
|
+
f"Could not foreach over var `{iterable!s}` of type {iterable._var_type}. "
|
|
85
|
+
"See https://reflex.dev/docs/library/dynamic-rendering/foreach/"
|
|
86
|
+
)
|
|
87
|
+
|
|
78
88
|
component = cls(
|
|
79
89
|
iterable=iterable,
|
|
80
90
|
render_fn=render_fn,
|