reflex 0.7.14a1__py3-none-any.whl → 0.7.14a3__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.

@@ -1,814 +0,0 @@
1
- """Stub file for reflex/experimental/layout.py"""
2
-
3
- # ------------------- DO NOT EDIT ----------------------
4
- # This file was generated by `reflex/utils/pyi_generator.py`!
5
- # ------------------------------------------------------
6
- from collections.abc import Mapping, Sequence
7
- from typing import Any, Literal, overload
8
-
9
- from reflex import color
10
- from reflex.components.base.fragment import Fragment
11
- from reflex.components.component import Component, ComponentNamespace, MemoizationLeaf
12
- from reflex.components.core.breakpoints import Breakpoints
13
- from reflex.components.radix.primitives.drawer import DrawerRoot
14
- from reflex.components.radix.themes.layout.box import Box
15
- from reflex.event import EventType
16
- from reflex.state import ComponentState
17
- from reflex.vars.base import Var
18
-
19
- class Sidebar(Box, MemoizationLeaf):
20
- @overload
21
- @classmethod
22
- def create( # type: ignore
23
- cls,
24
- *children,
25
- access_key: Var[str] | str | None = None,
26
- auto_capitalize: Literal[
27
- "characters", "none", "off", "on", "sentences", "words"
28
- ]
29
- | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
30
- | None = None,
31
- content_editable: Literal["inherit", "plaintext-only", False, True]
32
- | Var[Literal["inherit", "plaintext-only", False, True]]
33
- | None = None,
34
- context_menu: Var[str] | str | None = None,
35
- dir: Var[str] | str | None = None,
36
- draggable: Var[bool] | bool | None = None,
37
- enter_key_hint: Literal[
38
- "done", "enter", "go", "next", "previous", "search", "send"
39
- ]
40
- | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
41
- | None = None,
42
- hidden: Var[bool] | bool | None = None,
43
- input_mode: Literal[
44
- "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
45
- ]
46
- | Var[
47
- Literal[
48
- "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
49
- ]
50
- ]
51
- | None = None,
52
- item_prop: Var[str] | str | None = None,
53
- lang: Var[str] | str | None = None,
54
- role: Literal[
55
- "alert",
56
- "alertdialog",
57
- "application",
58
- "article",
59
- "banner",
60
- "button",
61
- "cell",
62
- "checkbox",
63
- "columnheader",
64
- "combobox",
65
- "complementary",
66
- "contentinfo",
67
- "definition",
68
- "dialog",
69
- "directory",
70
- "document",
71
- "feed",
72
- "figure",
73
- "form",
74
- "grid",
75
- "gridcell",
76
- "group",
77
- "heading",
78
- "img",
79
- "link",
80
- "list",
81
- "listbox",
82
- "listitem",
83
- "log",
84
- "main",
85
- "marquee",
86
- "math",
87
- "menu",
88
- "menubar",
89
- "menuitem",
90
- "menuitemcheckbox",
91
- "menuitemradio",
92
- "navigation",
93
- "none",
94
- "note",
95
- "option",
96
- "presentation",
97
- "progressbar",
98
- "radio",
99
- "radiogroup",
100
- "region",
101
- "row",
102
- "rowgroup",
103
- "rowheader",
104
- "scrollbar",
105
- "search",
106
- "searchbox",
107
- "separator",
108
- "slider",
109
- "spinbutton",
110
- "status",
111
- "switch",
112
- "tab",
113
- "table",
114
- "tablist",
115
- "tabpanel",
116
- "term",
117
- "textbox",
118
- "timer",
119
- "toolbar",
120
- "tooltip",
121
- "tree",
122
- "treegrid",
123
- "treeitem",
124
- ]
125
- | Var[
126
- Literal[
127
- "alert",
128
- "alertdialog",
129
- "application",
130
- "article",
131
- "banner",
132
- "button",
133
- "cell",
134
- "checkbox",
135
- "columnheader",
136
- "combobox",
137
- "complementary",
138
- "contentinfo",
139
- "definition",
140
- "dialog",
141
- "directory",
142
- "document",
143
- "feed",
144
- "figure",
145
- "form",
146
- "grid",
147
- "gridcell",
148
- "group",
149
- "heading",
150
- "img",
151
- "link",
152
- "list",
153
- "listbox",
154
- "listitem",
155
- "log",
156
- "main",
157
- "marquee",
158
- "math",
159
- "menu",
160
- "menubar",
161
- "menuitem",
162
- "menuitemcheckbox",
163
- "menuitemradio",
164
- "navigation",
165
- "none",
166
- "note",
167
- "option",
168
- "presentation",
169
- "progressbar",
170
- "radio",
171
- "radiogroup",
172
- "region",
173
- "row",
174
- "rowgroup",
175
- "rowheader",
176
- "scrollbar",
177
- "search",
178
- "searchbox",
179
- "separator",
180
- "slider",
181
- "spinbutton",
182
- "status",
183
- "switch",
184
- "tab",
185
- "table",
186
- "tablist",
187
- "tabpanel",
188
- "term",
189
- "textbox",
190
- "timer",
191
- "toolbar",
192
- "tooltip",
193
- "tree",
194
- "treegrid",
195
- "treeitem",
196
- ]
197
- ]
198
- | None = None,
199
- slot: Var[str] | str | None = None,
200
- spell_check: Var[bool] | bool | None = None,
201
- tab_index: Var[int] | int | None = None,
202
- title: Var[str] | str | None = None,
203
- style: Sequence[Mapping[str, Any]]
204
- | Mapping[str, Any]
205
- | Var[Mapping[str, Any]]
206
- | Breakpoints
207
- | None = None,
208
- key: Any | None = None,
209
- id: Any | None = None,
210
- ref: Var | None = None,
211
- class_name: Any | None = None,
212
- autofocus: bool | None = None,
213
- custom_attrs: dict[str, Var | Any] | None = None,
214
- on_blur: EventType[()] | None = None,
215
- on_click: EventType[()] | None = None,
216
- on_context_menu: EventType[()] | None = None,
217
- on_double_click: EventType[()] | None = None,
218
- on_focus: EventType[()] | None = None,
219
- on_mount: EventType[()] | None = None,
220
- on_mouse_down: EventType[()] | None = None,
221
- on_mouse_enter: EventType[()] | None = None,
222
- on_mouse_leave: EventType[()] | None = None,
223
- on_mouse_move: EventType[()] | None = None,
224
- on_mouse_out: EventType[()] | None = None,
225
- on_mouse_over: EventType[()] | None = None,
226
- on_mouse_up: EventType[()] | None = None,
227
- on_scroll: EventType[()] | None = None,
228
- on_unmount: EventType[()] | None = None,
229
- **props,
230
- ) -> Sidebar:
231
- """Create the sidebar component.
232
-
233
- Args:
234
- children: The children components.
235
- props: The properties of the sidebar.
236
-
237
- Returns:
238
- The sidebar component.
239
- """
240
-
241
- def add_style(self) -> dict[str, Any] | None: ...
242
- def add_hooks(self) -> list[Var]: ...
243
-
244
- class StatefulSidebar(ComponentState):
245
- open: bool
246
-
247
- def toggle(self): ...
248
- @classmethod
249
- def get_component(cls, *children, **props): ...
250
-
251
- class DrawerSidebar(DrawerRoot):
252
- @overload
253
- @classmethod
254
- def create( # type: ignore
255
- cls,
256
- *children,
257
- default_open: Var[bool] | bool | None = None,
258
- open: Var[bool] | bool | None = None,
259
- modal: Var[bool] | bool | None = None,
260
- direction: Literal["bottom", "left", "right", "top"]
261
- | Var[Literal["bottom", "left", "right", "top"]]
262
- | None = None,
263
- dismissible: Var[bool] | bool | None = None,
264
- handle_only: Var[bool] | bool | None = None,
265
- snap_points: Sequence[float | str] | None = None,
266
- fade_from_index: Var[int] | int | None = None,
267
- scroll_lock_timeout: Var[int] | int | None = None,
268
- prevent_scroll_restoration: Var[bool] | bool | None = None,
269
- should_scale_background: Var[bool] | bool | None = None,
270
- close_threshold: Var[float] | float | None = None,
271
- as_child: Var[bool] | bool | None = None,
272
- style: Sequence[Mapping[str, Any]]
273
- | Mapping[str, Any]
274
- | Var[Mapping[str, Any]]
275
- | Breakpoints
276
- | None = None,
277
- key: Any | None = None,
278
- id: Any | None = None,
279
- ref: Var | None = None,
280
- class_name: Any | None = None,
281
- autofocus: bool | None = None,
282
- custom_attrs: dict[str, Var | Any] | None = None,
283
- on_animation_end: EventType[()] | EventType[bool] | None = None,
284
- on_blur: EventType[()] | None = None,
285
- on_click: EventType[()] | None = None,
286
- on_context_menu: EventType[()] | None = None,
287
- on_double_click: EventType[()] | None = None,
288
- on_focus: EventType[()] | None = None,
289
- on_mount: EventType[()] | None = None,
290
- on_mouse_down: EventType[()] | None = None,
291
- on_mouse_enter: EventType[()] | None = None,
292
- on_mouse_leave: EventType[()] | None = None,
293
- on_mouse_move: EventType[()] | None = None,
294
- on_mouse_out: EventType[()] | None = None,
295
- on_mouse_over: EventType[()] | None = None,
296
- on_mouse_up: EventType[()] | None = None,
297
- on_open_change: EventType[()] | EventType[bool] | None = None,
298
- on_scroll: EventType[()] | None = None,
299
- on_unmount: EventType[()] | None = None,
300
- **props,
301
- ) -> DrawerSidebar:
302
- """Create the sidebar component.
303
-
304
- Args:
305
- children: The children components.
306
- props: The properties of the sidebar.
307
-
308
- Returns:
309
- The drawer sidebar component.
310
- """
311
-
312
- sidebar_trigger_style = {
313
- "position": "fixed",
314
- "z_index": "15",
315
- "color": color("accent", 12),
316
- "background_color": "transparent",
317
- "padding": "0",
318
- }
319
-
320
- class SidebarTrigger(Fragment):
321
- @overload
322
- @classmethod
323
- def create( # type: ignore
324
- cls,
325
- *children,
326
- style: Sequence[Mapping[str, Any]]
327
- | Mapping[str, Any]
328
- | Var[Mapping[str, Any]]
329
- | Breakpoints
330
- | None = None,
331
- key: Any | None = None,
332
- id: Any | None = None,
333
- ref: Var | None = None,
334
- class_name: Any | None = None,
335
- autofocus: bool | None = None,
336
- custom_attrs: dict[str, Var | Any] | None = None,
337
- on_blur: EventType[()] | None = None,
338
- on_click: EventType[()] | None = None,
339
- on_context_menu: EventType[()] | None = None,
340
- on_double_click: EventType[()] | None = None,
341
- on_focus: EventType[()] | None = None,
342
- on_mount: EventType[()] | None = None,
343
- on_mouse_down: EventType[()] | None = None,
344
- on_mouse_enter: EventType[()] | None = None,
345
- on_mouse_leave: EventType[()] | None = None,
346
- on_mouse_move: EventType[()] | None = None,
347
- on_mouse_out: EventType[()] | None = None,
348
- on_mouse_over: EventType[()] | None = None,
349
- on_mouse_up: EventType[()] | None = None,
350
- on_scroll: EventType[()] | None = None,
351
- on_unmount: EventType[()] | None = None,
352
- **props,
353
- ) -> SidebarTrigger:
354
- """Create the sidebar trigger component.
355
-
356
- Args:
357
- sidebar: The sidebar component.
358
- props: The properties of the sidebar trigger.
359
-
360
- Returns:
361
- The sidebar trigger component.
362
- """
363
-
364
- class Layout(Box):
365
- @overload
366
- @classmethod
367
- def create( # type: ignore
368
- cls,
369
- *children,
370
- sidebar: Component | None = None,
371
- access_key: Var[str] | str | None = None,
372
- auto_capitalize: Literal[
373
- "characters", "none", "off", "on", "sentences", "words"
374
- ]
375
- | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
376
- | None = None,
377
- content_editable: Literal["inherit", "plaintext-only", False, True]
378
- | Var[Literal["inherit", "plaintext-only", False, True]]
379
- | None = None,
380
- context_menu: Var[str] | str | None = None,
381
- dir: Var[str] | str | None = None,
382
- draggable: Var[bool] | bool | None = None,
383
- enter_key_hint: Literal[
384
- "done", "enter", "go", "next", "previous", "search", "send"
385
- ]
386
- | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
387
- | None = None,
388
- hidden: Var[bool] | bool | None = None,
389
- input_mode: Literal[
390
- "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
391
- ]
392
- | Var[
393
- Literal[
394
- "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
395
- ]
396
- ]
397
- | None = None,
398
- item_prop: Var[str] | str | None = None,
399
- lang: Var[str] | str | None = None,
400
- role: Literal[
401
- "alert",
402
- "alertdialog",
403
- "application",
404
- "article",
405
- "banner",
406
- "button",
407
- "cell",
408
- "checkbox",
409
- "columnheader",
410
- "combobox",
411
- "complementary",
412
- "contentinfo",
413
- "definition",
414
- "dialog",
415
- "directory",
416
- "document",
417
- "feed",
418
- "figure",
419
- "form",
420
- "grid",
421
- "gridcell",
422
- "group",
423
- "heading",
424
- "img",
425
- "link",
426
- "list",
427
- "listbox",
428
- "listitem",
429
- "log",
430
- "main",
431
- "marquee",
432
- "math",
433
- "menu",
434
- "menubar",
435
- "menuitem",
436
- "menuitemcheckbox",
437
- "menuitemradio",
438
- "navigation",
439
- "none",
440
- "note",
441
- "option",
442
- "presentation",
443
- "progressbar",
444
- "radio",
445
- "radiogroup",
446
- "region",
447
- "row",
448
- "rowgroup",
449
- "rowheader",
450
- "scrollbar",
451
- "search",
452
- "searchbox",
453
- "separator",
454
- "slider",
455
- "spinbutton",
456
- "status",
457
- "switch",
458
- "tab",
459
- "table",
460
- "tablist",
461
- "tabpanel",
462
- "term",
463
- "textbox",
464
- "timer",
465
- "toolbar",
466
- "tooltip",
467
- "tree",
468
- "treegrid",
469
- "treeitem",
470
- ]
471
- | Var[
472
- Literal[
473
- "alert",
474
- "alertdialog",
475
- "application",
476
- "article",
477
- "banner",
478
- "button",
479
- "cell",
480
- "checkbox",
481
- "columnheader",
482
- "combobox",
483
- "complementary",
484
- "contentinfo",
485
- "definition",
486
- "dialog",
487
- "directory",
488
- "document",
489
- "feed",
490
- "figure",
491
- "form",
492
- "grid",
493
- "gridcell",
494
- "group",
495
- "heading",
496
- "img",
497
- "link",
498
- "list",
499
- "listbox",
500
- "listitem",
501
- "log",
502
- "main",
503
- "marquee",
504
- "math",
505
- "menu",
506
- "menubar",
507
- "menuitem",
508
- "menuitemcheckbox",
509
- "menuitemradio",
510
- "navigation",
511
- "none",
512
- "note",
513
- "option",
514
- "presentation",
515
- "progressbar",
516
- "radio",
517
- "radiogroup",
518
- "region",
519
- "row",
520
- "rowgroup",
521
- "rowheader",
522
- "scrollbar",
523
- "search",
524
- "searchbox",
525
- "separator",
526
- "slider",
527
- "spinbutton",
528
- "status",
529
- "switch",
530
- "tab",
531
- "table",
532
- "tablist",
533
- "tabpanel",
534
- "term",
535
- "textbox",
536
- "timer",
537
- "toolbar",
538
- "tooltip",
539
- "tree",
540
- "treegrid",
541
- "treeitem",
542
- ]
543
- ]
544
- | None = None,
545
- slot: Var[str] | str | None = None,
546
- spell_check: Var[bool] | bool | None = None,
547
- tab_index: Var[int] | int | None = None,
548
- title: Var[str] | str | None = None,
549
- style: Sequence[Mapping[str, Any]]
550
- | Mapping[str, Any]
551
- | Var[Mapping[str, Any]]
552
- | Breakpoints
553
- | None = None,
554
- key: Any | None = None,
555
- id: Any | None = None,
556
- ref: Var | None = None,
557
- class_name: Any | None = None,
558
- autofocus: bool | None = None,
559
- custom_attrs: dict[str, Var | Any] | None = None,
560
- on_blur: EventType[()] | None = None,
561
- on_click: EventType[()] | None = None,
562
- on_context_menu: EventType[()] | None = None,
563
- on_double_click: EventType[()] | None = None,
564
- on_focus: EventType[()] | None = None,
565
- on_mount: EventType[()] | None = None,
566
- on_mouse_down: EventType[()] | None = None,
567
- on_mouse_enter: EventType[()] | None = None,
568
- on_mouse_leave: EventType[()] | None = None,
569
- on_mouse_move: EventType[()] | None = None,
570
- on_mouse_out: EventType[()] | None = None,
571
- on_mouse_over: EventType[()] | None = None,
572
- on_mouse_up: EventType[()] | None = None,
573
- on_scroll: EventType[()] | None = None,
574
- on_unmount: EventType[()] | None = None,
575
- **props,
576
- ) -> Layout:
577
- """Create the layout component.
578
-
579
- Args:
580
- content: The content component.
581
- sidebar: The sidebar component.
582
- props: The properties of the layout.
583
-
584
- Returns:
585
- The layout component.
586
- """
587
-
588
- class LayoutNamespace(ComponentNamespace):
589
- drawer_sidebar = staticmethod(DrawerSidebar.create)
590
- stateful_sidebar = staticmethod(StatefulSidebar.create)
591
- sidebar = staticmethod(Sidebar.create)
592
-
593
- @staticmethod
594
- def __call__(
595
- *children,
596
- sidebar: Component | None = None,
597
- access_key: Var[str] | str | None = None,
598
- auto_capitalize: Literal[
599
- "characters", "none", "off", "on", "sentences", "words"
600
- ]
601
- | Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
602
- | None = None,
603
- content_editable: Literal["inherit", "plaintext-only", False, True]
604
- | Var[Literal["inherit", "plaintext-only", False, True]]
605
- | None = None,
606
- context_menu: Var[str] | str | None = None,
607
- dir: Var[str] | str | None = None,
608
- draggable: Var[bool] | bool | None = None,
609
- enter_key_hint: Literal[
610
- "done", "enter", "go", "next", "previous", "search", "send"
611
- ]
612
- | Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
613
- | None = None,
614
- hidden: Var[bool] | bool | None = None,
615
- input_mode: Literal[
616
- "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
617
- ]
618
- | Var[
619
- Literal[
620
- "decimal", "email", "none", "numeric", "search", "tel", "text", "url"
621
- ]
622
- ]
623
- | None = None,
624
- item_prop: Var[str] | str | None = None,
625
- lang: Var[str] | str | None = None,
626
- role: Literal[
627
- "alert",
628
- "alertdialog",
629
- "application",
630
- "article",
631
- "banner",
632
- "button",
633
- "cell",
634
- "checkbox",
635
- "columnheader",
636
- "combobox",
637
- "complementary",
638
- "contentinfo",
639
- "definition",
640
- "dialog",
641
- "directory",
642
- "document",
643
- "feed",
644
- "figure",
645
- "form",
646
- "grid",
647
- "gridcell",
648
- "group",
649
- "heading",
650
- "img",
651
- "link",
652
- "list",
653
- "listbox",
654
- "listitem",
655
- "log",
656
- "main",
657
- "marquee",
658
- "math",
659
- "menu",
660
- "menubar",
661
- "menuitem",
662
- "menuitemcheckbox",
663
- "menuitemradio",
664
- "navigation",
665
- "none",
666
- "note",
667
- "option",
668
- "presentation",
669
- "progressbar",
670
- "radio",
671
- "radiogroup",
672
- "region",
673
- "row",
674
- "rowgroup",
675
- "rowheader",
676
- "scrollbar",
677
- "search",
678
- "searchbox",
679
- "separator",
680
- "slider",
681
- "spinbutton",
682
- "status",
683
- "switch",
684
- "tab",
685
- "table",
686
- "tablist",
687
- "tabpanel",
688
- "term",
689
- "textbox",
690
- "timer",
691
- "toolbar",
692
- "tooltip",
693
- "tree",
694
- "treegrid",
695
- "treeitem",
696
- ]
697
- | Var[
698
- Literal[
699
- "alert",
700
- "alertdialog",
701
- "application",
702
- "article",
703
- "banner",
704
- "button",
705
- "cell",
706
- "checkbox",
707
- "columnheader",
708
- "combobox",
709
- "complementary",
710
- "contentinfo",
711
- "definition",
712
- "dialog",
713
- "directory",
714
- "document",
715
- "feed",
716
- "figure",
717
- "form",
718
- "grid",
719
- "gridcell",
720
- "group",
721
- "heading",
722
- "img",
723
- "link",
724
- "list",
725
- "listbox",
726
- "listitem",
727
- "log",
728
- "main",
729
- "marquee",
730
- "math",
731
- "menu",
732
- "menubar",
733
- "menuitem",
734
- "menuitemcheckbox",
735
- "menuitemradio",
736
- "navigation",
737
- "none",
738
- "note",
739
- "option",
740
- "presentation",
741
- "progressbar",
742
- "radio",
743
- "radiogroup",
744
- "region",
745
- "row",
746
- "rowgroup",
747
- "rowheader",
748
- "scrollbar",
749
- "search",
750
- "searchbox",
751
- "separator",
752
- "slider",
753
- "spinbutton",
754
- "status",
755
- "switch",
756
- "tab",
757
- "table",
758
- "tablist",
759
- "tabpanel",
760
- "term",
761
- "textbox",
762
- "timer",
763
- "toolbar",
764
- "tooltip",
765
- "tree",
766
- "treegrid",
767
- "treeitem",
768
- ]
769
- ]
770
- | None = None,
771
- slot: Var[str] | str | None = None,
772
- spell_check: Var[bool] | bool | None = None,
773
- tab_index: Var[int] | int | None = None,
774
- title: Var[str] | str | None = None,
775
- style: Sequence[Mapping[str, Any]]
776
- | Mapping[str, Any]
777
- | Var[Mapping[str, Any]]
778
- | Breakpoints
779
- | None = None,
780
- key: Any | None = None,
781
- id: Any | None = None,
782
- ref: Var | None = None,
783
- class_name: Any | None = None,
784
- autofocus: bool | None = None,
785
- custom_attrs: dict[str, Var | Any] | None = None,
786
- on_blur: EventType[()] | None = None,
787
- on_click: EventType[()] | None = None,
788
- on_context_menu: EventType[()] | None = None,
789
- on_double_click: EventType[()] | None = None,
790
- on_focus: EventType[()] | None = None,
791
- on_mount: EventType[()] | None = None,
792
- on_mouse_down: EventType[()] | None = None,
793
- on_mouse_enter: EventType[()] | None = None,
794
- on_mouse_leave: EventType[()] | None = None,
795
- on_mouse_move: EventType[()] | None = None,
796
- on_mouse_out: EventType[()] | None = None,
797
- on_mouse_over: EventType[()] | None = None,
798
- on_mouse_up: EventType[()] | None = None,
799
- on_scroll: EventType[()] | None = None,
800
- on_unmount: EventType[()] | None = None,
801
- **props,
802
- ) -> Layout:
803
- """Create the layout component.
804
-
805
- Args:
806
- content: The content component.
807
- sidebar: The sidebar component.
808
- props: The properties of the layout.
809
-
810
- Returns:
811
- The layout component.
812
- """
813
-
814
- layout = LayoutNamespace()