reflex 0.3.6__py3-none-any.whl → 0.3.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of reflex might be problematic. Click here for more details.
- reflex/.templates/jinja/web/pages/base_page.js.jinja2 +2 -0
- reflex/__init__.py +29 -6
- reflex/__init__.pyi +2 -0
- reflex/app.py +3 -0
- reflex/components/__init__.py +2 -0
- reflex/components/chakra/__init__.py +23 -0
- reflex/components/{media → chakra/media}/image.py +1 -28
- reflex/components/chakra/media/image.pyi +120 -0
- reflex/components/component.py +27 -2
- reflex/components/datadisplay/datatable.py +1 -37
- reflex/components/datadisplay/datatable.pyi +1 -11
- reflex/components/el/elements/forms.py +43 -1
- reflex/components/el/elements/forms.pyi +26 -1
- reflex/components/graphing/plotly.py +0 -22
- reflex/components/graphing/plotly.pyi +0 -12
- reflex/components/media/__init__.py +0 -1
- reflex/components/media/image.pyi +0 -9
- reflex/components/next/__init__.py +8 -0
- reflex/components/next/base.py +8 -0
- reflex/components/next/base.pyi +91 -0
- reflex/components/next/image.py +114 -0
- reflex/components/next/image.pyi +122 -0
- reflex/components/next/video.py +33 -0
- reflex/components/next/video.pyi +92 -0
- reflex/components/radix/primitives/__init__.py +3 -0
- reflex/components/radix/primitives/accordion.py +279 -0
- reflex/components/radix/primitives/accordion.pyi +619 -0
- reflex/components/radix/themes/__init__.py +4 -73
- reflex/components/radix/themes/base.py +7 -7
- reflex/components/radix/themes/base.pyi +21 -21
- reflex/components/radix/themes/components/__init__.py +193 -0
- reflex/components/radix/themes/components/alertdialog.py +72 -0
- reflex/components/radix/themes/components/alertdialog.pyi +733 -0
- reflex/components/radix/themes/components/aspectratio.py +20 -0
- reflex/components/radix/themes/components/aspectratio.pyi +144 -0
- reflex/components/radix/themes/components/avatar.py +38 -0
- reflex/components/radix/themes/components/avatar.pyi +233 -0
- reflex/components/radix/themes/components/badge.py +38 -0
- reflex/components/radix/themes/components/badge.pyi +291 -0
- reflex/components/radix/themes/components/button.py +39 -0
- reflex/components/radix/themes/components/button.pyi +330 -0
- reflex/components/radix/themes/components/callout.py +49 -0
- reflex/components/radix/themes/components/callout.pyi +668 -0
- reflex/components/radix/themes/components/card.py +25 -0
- reflex/components/radix/themes/components/card.pyi +214 -0
- reflex/components/radix/themes/components/checkbox.py +67 -0
- reflex/components/radix/themes/components/checkbox.pyi +249 -0
- reflex/components/radix/themes/components/contextmenu.py +134 -0
- reflex/components/radix/themes/{typography.pyi → components/contextmenu.pyi} +182 -602
- reflex/components/radix/themes/components/dialog.py +75 -0
- reflex/components/radix/themes/components/dialog.pyi +739 -0
- reflex/components/radix/themes/components/dropdownmenu.py +101 -0
- reflex/components/radix/themes/components/dropdownmenu.pyi +1065 -0
- reflex/components/radix/themes/components/hovercard.py +63 -0
- reflex/components/radix/themes/components/hovercard.pyi +487 -0
- reflex/components/radix/themes/components/iconbutton.py +39 -0
- reflex/components/radix/themes/components/iconbutton.pyi +332 -0
- reflex/components/radix/themes/components/icons.py +400 -0
- reflex/components/radix/themes/components/icons.pyi +185 -0
- reflex/components/radix/themes/components/inset.py +44 -0
- reflex/components/radix/themes/components/inset.pyi +230 -0
- reflex/components/radix/themes/components/popover.py +85 -0
- reflex/components/radix/themes/components/popover.pyi +634 -0
- reflex/components/radix/themes/components/radiogroup.py +72 -0
- reflex/components/radix/themes/components/radiogroup.pyi +369 -0
- reflex/components/radix/themes/components/scrollarea.py +31 -0
- reflex/components/radix/themes/components/scrollarea.pyi +165 -0
- reflex/components/radix/themes/components/select.py +137 -0
- reflex/components/radix/themes/{layout.pyi → components/select.pyi} +422 -418
- reflex/components/radix/themes/components/separator.py +30 -0
- reflex/components/radix/themes/components/separator.pyi +218 -0
- reflex/components/radix/themes/components/slider.py +68 -0
- reflex/components/radix/themes/components/slider.pyi +254 -0
- reflex/components/radix/themes/components/switch.py +68 -0
- reflex/components/radix/themes/components/switch.pyi +250 -0
- reflex/components/radix/themes/components/table.py +79 -0
- reflex/components/radix/themes/components/table.pyi +1485 -0
- reflex/components/radix/themes/components/tabs.py +65 -0
- reflex/components/radix/themes/components/tabs.pyi +549 -0
- reflex/components/radix/themes/components/textarea.py +68 -0
- reflex/components/radix/themes/components/textarea.pyi +333 -0
- reflex/components/radix/themes/{components.py → components/textfield.py} +3 -87
- reflex/components/radix/themes/{components.pyi → components/textfield.pyi} +202 -591
- reflex/components/radix/themes/layout/__init__.py +13 -0
- reflex/components/radix/themes/layout/base.py +48 -0
- reflex/components/radix/themes/layout/base.pyi +195 -0
- reflex/components/radix/themes/layout/box.py +12 -0
- reflex/components/radix/themes/layout/box.pyi +252 -0
- reflex/components/radix/themes/layout/container.py +23 -0
- reflex/components/radix/themes/layout/container.pyi +260 -0
- reflex/components/radix/themes/layout/flex.py +45 -0
- reflex/components/radix/themes/layout/flex.pyi +303 -0
- reflex/components/radix/themes/layout/grid.py +53 -0
- reflex/components/radix/themes/layout/grid.pyi +203 -0
- reflex/components/radix/themes/layout/section.py +20 -0
- reflex/components/radix/themes/layout/section.pyi +260 -0
- reflex/components/radix/themes/typography/__init__.py +21 -0
- reflex/components/radix/themes/typography/base.py +12 -0
- reflex/components/radix/themes/typography/blockquote.py +36 -0
- reflex/components/radix/themes/typography/blockquote.pyi +282 -0
- reflex/components/radix/themes/typography/code.py +40 -0
- reflex/components/radix/themes/typography/code.pyi +292 -0
- reflex/components/radix/themes/typography/em.py +18 -0
- reflex/components/radix/themes/typography/em.pyi +199 -0
- reflex/components/radix/themes/typography/heading.py +50 -0
- reflex/components/radix/themes/typography/heading.pyi +298 -0
- reflex/components/radix/themes/typography/kbd.py +25 -0
- reflex/components/radix/themes/typography/kbd.pyi +208 -0
- reflex/components/radix/themes/typography/link.py +49 -0
- reflex/components/radix/themes/typography/link.pyi +238 -0
- reflex/components/radix/themes/typography/quote.py +18 -0
- reflex/components/radix/themes/typography/quote.pyi +200 -0
- reflex/components/radix/themes/typography/strong.py +18 -0
- reflex/components/radix/themes/typography/strong.pyi +199 -0
- reflex/components/radix/themes/typography/text.py +50 -0
- reflex/components/radix/themes/typography/text.pyi +298 -0
- reflex/constants/__init__.py +1 -0
- reflex/constants/base.py +7 -0
- reflex/constants/config.py +1 -1
- reflex/model.py +2 -1
- reflex/reflex.py +5 -0
- reflex/state.py +11 -0
- reflex/style.py +120 -10
- reflex/testing.py +4 -4
- reflex/utils/format.py +9 -5
- reflex/utils/prerequisites.py +49 -6
- reflex/utils/processes.py +8 -1
- reflex/utils/serializers.py +83 -0
- reflex/utils/types.py +22 -1
- reflex/vars.py +24 -1
- {reflex-0.3.6.dist-info → reflex-0.3.7.dist-info}/METADATA +3 -2
- {reflex-0.3.6.dist-info → reflex-0.3.7.dist-info}/RECORD +135 -42
- reflex/components/radix/themes/layout.py +0 -155
- {reflex-0.3.6.dist-info → reflex-0.3.7.dist-info}/LICENSE +0 -0
- {reflex-0.3.6.dist-info → reflex-0.3.7.dist-info}/WHEEL +0 -0
- {reflex-0.3.6.dist-info → reflex-0.3.7.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"""Stub file for reflex/components/radix/themes/layout/grid.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 typing import Literal
|
|
11
|
+
from reflex import el
|
|
12
|
+
from reflex.vars import Var
|
|
13
|
+
from ..base import LiteralAlign, LiteralJustify, LiteralSize, RadixThemesComponent
|
|
14
|
+
|
|
15
|
+
LiteralGridDisplay = Literal["none", "inline-grid", "grid"]
|
|
16
|
+
LiteralGridFlow = Literal["row", "column", "dense", "row-dense", "column-dense"]
|
|
17
|
+
|
|
18
|
+
class Grid(el.Div, RadixThemesComponent):
|
|
19
|
+
@overload
|
|
20
|
+
@classmethod
|
|
21
|
+
def create( # type: ignore
|
|
22
|
+
cls,
|
|
23
|
+
*children,
|
|
24
|
+
as_child: Optional[Union[Var[bool], bool]] = None,
|
|
25
|
+
display: Optional[
|
|
26
|
+
Union[
|
|
27
|
+
Var[Literal["none", "inline-grid", "grid"]],
|
|
28
|
+
Literal["none", "inline-grid", "grid"],
|
|
29
|
+
]
|
|
30
|
+
] = None,
|
|
31
|
+
columns: Optional[Union[Var[str], str]] = None,
|
|
32
|
+
rows: Optional[Union[Var[str], str]] = None,
|
|
33
|
+
flow: Optional[
|
|
34
|
+
Union[
|
|
35
|
+
Var[Literal["row", "column", "dense", "row-dense", "column-dense"]],
|
|
36
|
+
Literal["row", "column", "dense", "row-dense", "column-dense"],
|
|
37
|
+
]
|
|
38
|
+
] = None,
|
|
39
|
+
align: Optional[
|
|
40
|
+
Union[
|
|
41
|
+
Var[Literal["start", "center", "end", "baseline", "stretch"]],
|
|
42
|
+
Literal["start", "center", "end", "baseline", "stretch"],
|
|
43
|
+
]
|
|
44
|
+
] = None,
|
|
45
|
+
justify: Optional[
|
|
46
|
+
Union[
|
|
47
|
+
Var[Literal["start", "center", "end", "between"]],
|
|
48
|
+
Literal["start", "center", "end", "between"],
|
|
49
|
+
]
|
|
50
|
+
] = None,
|
|
51
|
+
gap: Optional[
|
|
52
|
+
Union[
|
|
53
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
54
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
55
|
+
]
|
|
56
|
+
] = None,
|
|
57
|
+
gap_x: Optional[
|
|
58
|
+
Union[
|
|
59
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
60
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
61
|
+
]
|
|
62
|
+
] = None,
|
|
63
|
+
access_key: Optional[
|
|
64
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
65
|
+
] = None,
|
|
66
|
+
auto_capitalize: Optional[
|
|
67
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
68
|
+
] = None,
|
|
69
|
+
content_editable: Optional[
|
|
70
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
71
|
+
] = None,
|
|
72
|
+
context_menu: Optional[
|
|
73
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
74
|
+
] = None,
|
|
75
|
+
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
76
|
+
draggable: Optional[
|
|
77
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
78
|
+
] = None,
|
|
79
|
+
enter_key_hint: Optional[
|
|
80
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
81
|
+
] = None,
|
|
82
|
+
hidden: Optional[
|
|
83
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
84
|
+
] = None,
|
|
85
|
+
input_mode: Optional[
|
|
86
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
87
|
+
] = None,
|
|
88
|
+
item_prop: Optional[
|
|
89
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
90
|
+
] = None,
|
|
91
|
+
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
92
|
+
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
93
|
+
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
94
|
+
spell_check: Optional[
|
|
95
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
96
|
+
] = None,
|
|
97
|
+
tab_index: Optional[
|
|
98
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
99
|
+
] = None,
|
|
100
|
+
title: Optional[
|
|
101
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
102
|
+
] = None,
|
|
103
|
+
translate: Optional[
|
|
104
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
105
|
+
] = None,
|
|
106
|
+
style: Optional[Style] = None,
|
|
107
|
+
key: Optional[Any] = None,
|
|
108
|
+
id: Optional[Any] = None,
|
|
109
|
+
class_name: Optional[Any] = None,
|
|
110
|
+
autofocus: Optional[bool] = None,
|
|
111
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
112
|
+
on_blur: Optional[
|
|
113
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
114
|
+
] = None,
|
|
115
|
+
on_click: Optional[
|
|
116
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
117
|
+
] = None,
|
|
118
|
+
on_context_menu: Optional[
|
|
119
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
120
|
+
] = None,
|
|
121
|
+
on_double_click: Optional[
|
|
122
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
123
|
+
] = None,
|
|
124
|
+
on_focus: Optional[
|
|
125
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
126
|
+
] = None,
|
|
127
|
+
on_mount: Optional[
|
|
128
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
129
|
+
] = None,
|
|
130
|
+
on_mouse_down: Optional[
|
|
131
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
132
|
+
] = None,
|
|
133
|
+
on_mouse_enter: Optional[
|
|
134
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
135
|
+
] = None,
|
|
136
|
+
on_mouse_leave: Optional[
|
|
137
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
138
|
+
] = None,
|
|
139
|
+
on_mouse_move: Optional[
|
|
140
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
141
|
+
] = None,
|
|
142
|
+
on_mouse_out: Optional[
|
|
143
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
144
|
+
] = None,
|
|
145
|
+
on_mouse_over: Optional[
|
|
146
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
147
|
+
] = None,
|
|
148
|
+
on_mouse_up: Optional[
|
|
149
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
150
|
+
] = None,
|
|
151
|
+
on_scroll: Optional[
|
|
152
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
153
|
+
] = None,
|
|
154
|
+
on_unmount: Optional[
|
|
155
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
156
|
+
] = None,
|
|
157
|
+
**props
|
|
158
|
+
) -> "Grid":
|
|
159
|
+
"""Create a new component instance.
|
|
160
|
+
|
|
161
|
+
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
162
|
+
other UI libraries for common names, like Text and Button.
|
|
163
|
+
|
|
164
|
+
Args:
|
|
165
|
+
*children: Child components.
|
|
166
|
+
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
167
|
+
display: How to display the element: "none" | "inline-grid" | "grid"
|
|
168
|
+
columns: Number of columns
|
|
169
|
+
rows: Number of rows
|
|
170
|
+
flow: How the grid items are layed out: "row" | "column" | "dense" | "row-dense" | "column-dense"
|
|
171
|
+
align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
|
|
172
|
+
justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between"
|
|
173
|
+
gap: Gap between children: "0" - "9"
|
|
174
|
+
gap_x: Gap between children vertical: "0" - "9"
|
|
175
|
+
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
176
|
+
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
177
|
+
content_editable: Indicates whether the element's content is editable.
|
|
178
|
+
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
|
179
|
+
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
|
180
|
+
draggable: Defines whether the element can be dragged.
|
|
181
|
+
enter_key_hint: Hints what media types the media element is able to play.
|
|
182
|
+
hidden: Defines whether the element is hidden.
|
|
183
|
+
input_mode: Defines the type of the element.
|
|
184
|
+
item_prop: Defines the name of the element for metadata purposes.
|
|
185
|
+
lang: Defines the language used in the element.
|
|
186
|
+
role: Defines the role of the element.
|
|
187
|
+
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
|
188
|
+
spell_check: Defines whether the element may be checked for spelling errors.
|
|
189
|
+
tab_index: Defines the position of the current element in the tabbing order.
|
|
190
|
+
title: Defines a tooltip for the element.
|
|
191
|
+
translate: Specifies whether the content of an element should be translated or not.
|
|
192
|
+
style: The style of the component.
|
|
193
|
+
key: A unique key for the component.
|
|
194
|
+
id: The id for the component.
|
|
195
|
+
class_name: The class name for the component.
|
|
196
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
197
|
+
custom_attrs: custom attribute
|
|
198
|
+
**props: Component properties.
|
|
199
|
+
|
|
200
|
+
Returns:
|
|
201
|
+
A new component instance.
|
|
202
|
+
"""
|
|
203
|
+
...
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""Declarative layout and common spacing props."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from typing import Literal
|
|
5
|
+
|
|
6
|
+
from reflex import el
|
|
7
|
+
from reflex.vars import Var
|
|
8
|
+
|
|
9
|
+
from .base import LayoutComponent
|
|
10
|
+
|
|
11
|
+
LiteralSectionSize = Literal["1", "2", "3"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Section(el.Section, LayoutComponent):
|
|
15
|
+
"""Denotes a section of page content."""
|
|
16
|
+
|
|
17
|
+
tag = "Section"
|
|
18
|
+
|
|
19
|
+
# The size of the section: "1" - "3" (default "3")
|
|
20
|
+
size: Var[LiteralSectionSize]
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
"""Stub file for reflex/components/radix/themes/layout/section.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 typing import Literal
|
|
11
|
+
from reflex import el
|
|
12
|
+
from reflex.vars import Var
|
|
13
|
+
from .base import LayoutComponent
|
|
14
|
+
|
|
15
|
+
LiteralSectionSize = Literal["1", "2", "3"]
|
|
16
|
+
|
|
17
|
+
class Section(el.Section, LayoutComponent):
|
|
18
|
+
@overload
|
|
19
|
+
@classmethod
|
|
20
|
+
def create( # type: ignore
|
|
21
|
+
cls,
|
|
22
|
+
*children,
|
|
23
|
+
size: Optional[
|
|
24
|
+
Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]]
|
|
25
|
+
] = None,
|
|
26
|
+
access_key: Optional[
|
|
27
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
28
|
+
] = None,
|
|
29
|
+
auto_capitalize: Optional[
|
|
30
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
31
|
+
] = None,
|
|
32
|
+
content_editable: Optional[
|
|
33
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
34
|
+
] = None,
|
|
35
|
+
context_menu: Optional[
|
|
36
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
37
|
+
] = None,
|
|
38
|
+
dir: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
39
|
+
draggable: Optional[
|
|
40
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
41
|
+
] = None,
|
|
42
|
+
enter_key_hint: Optional[
|
|
43
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
44
|
+
] = None,
|
|
45
|
+
hidden: Optional[
|
|
46
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
47
|
+
] = None,
|
|
48
|
+
input_mode: Optional[
|
|
49
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
50
|
+
] = None,
|
|
51
|
+
item_prop: Optional[
|
|
52
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
53
|
+
] = None,
|
|
54
|
+
lang: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
55
|
+
role: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
56
|
+
slot: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None,
|
|
57
|
+
spell_check: Optional[
|
|
58
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
59
|
+
] = None,
|
|
60
|
+
tab_index: Optional[
|
|
61
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
62
|
+
] = None,
|
|
63
|
+
title: Optional[
|
|
64
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
65
|
+
] = None,
|
|
66
|
+
translate: Optional[
|
|
67
|
+
Union[Var[Union[str, int, bool]], Union[str, int, bool]]
|
|
68
|
+
] = None,
|
|
69
|
+
p: Optional[
|
|
70
|
+
Union[
|
|
71
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
72
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
73
|
+
]
|
|
74
|
+
] = None,
|
|
75
|
+
px: Optional[
|
|
76
|
+
Union[
|
|
77
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
78
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
79
|
+
]
|
|
80
|
+
] = None,
|
|
81
|
+
py: Optional[
|
|
82
|
+
Union[
|
|
83
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
84
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
85
|
+
]
|
|
86
|
+
] = None,
|
|
87
|
+
pt: Optional[
|
|
88
|
+
Union[
|
|
89
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
90
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
91
|
+
]
|
|
92
|
+
] = None,
|
|
93
|
+
pr: Optional[
|
|
94
|
+
Union[
|
|
95
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
96
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
97
|
+
]
|
|
98
|
+
] = None,
|
|
99
|
+
pb: Optional[
|
|
100
|
+
Union[
|
|
101
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
102
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
103
|
+
]
|
|
104
|
+
] = None,
|
|
105
|
+
pl: Optional[
|
|
106
|
+
Union[
|
|
107
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
108
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
109
|
+
]
|
|
110
|
+
] = None,
|
|
111
|
+
shrink: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None,
|
|
112
|
+
grow: Optional[Union[Var[Literal["0", "1"]], Literal["0", "1"]]] = None,
|
|
113
|
+
m: Optional[
|
|
114
|
+
Union[
|
|
115
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
116
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
117
|
+
]
|
|
118
|
+
] = None,
|
|
119
|
+
mx: Optional[
|
|
120
|
+
Union[
|
|
121
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
122
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
123
|
+
]
|
|
124
|
+
] = None,
|
|
125
|
+
my: Optional[
|
|
126
|
+
Union[
|
|
127
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
128
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
129
|
+
]
|
|
130
|
+
] = None,
|
|
131
|
+
mt: Optional[
|
|
132
|
+
Union[
|
|
133
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
134
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
135
|
+
]
|
|
136
|
+
] = None,
|
|
137
|
+
mr: Optional[
|
|
138
|
+
Union[
|
|
139
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
140
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
141
|
+
]
|
|
142
|
+
] = None,
|
|
143
|
+
mb: Optional[
|
|
144
|
+
Union[
|
|
145
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
146
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
147
|
+
]
|
|
148
|
+
] = None,
|
|
149
|
+
ml: Optional[
|
|
150
|
+
Union[
|
|
151
|
+
Var[Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
|
152
|
+
Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
153
|
+
]
|
|
154
|
+
] = None,
|
|
155
|
+
style: Optional[Style] = None,
|
|
156
|
+
key: Optional[Any] = None,
|
|
157
|
+
id: Optional[Any] = None,
|
|
158
|
+
class_name: Optional[Any] = None,
|
|
159
|
+
autofocus: Optional[bool] = None,
|
|
160
|
+
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
|
161
|
+
on_blur: Optional[
|
|
162
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
163
|
+
] = None,
|
|
164
|
+
on_click: Optional[
|
|
165
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
166
|
+
] = None,
|
|
167
|
+
on_context_menu: Optional[
|
|
168
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
169
|
+
] = None,
|
|
170
|
+
on_double_click: Optional[
|
|
171
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
172
|
+
] = None,
|
|
173
|
+
on_focus: Optional[
|
|
174
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
175
|
+
] = None,
|
|
176
|
+
on_mount: Optional[
|
|
177
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
178
|
+
] = None,
|
|
179
|
+
on_mouse_down: Optional[
|
|
180
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
181
|
+
] = None,
|
|
182
|
+
on_mouse_enter: Optional[
|
|
183
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
184
|
+
] = None,
|
|
185
|
+
on_mouse_leave: Optional[
|
|
186
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
187
|
+
] = None,
|
|
188
|
+
on_mouse_move: Optional[
|
|
189
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
190
|
+
] = None,
|
|
191
|
+
on_mouse_out: Optional[
|
|
192
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
193
|
+
] = None,
|
|
194
|
+
on_mouse_over: Optional[
|
|
195
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
196
|
+
] = None,
|
|
197
|
+
on_mouse_up: Optional[
|
|
198
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
199
|
+
] = None,
|
|
200
|
+
on_scroll: Optional[
|
|
201
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
202
|
+
] = None,
|
|
203
|
+
on_unmount: Optional[
|
|
204
|
+
Union[EventHandler, EventSpec, list, function, BaseVar]
|
|
205
|
+
] = None,
|
|
206
|
+
**props
|
|
207
|
+
) -> "Section":
|
|
208
|
+
"""Create a new component instance.
|
|
209
|
+
|
|
210
|
+
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
|
211
|
+
other UI libraries for common names, like Text and Button.
|
|
212
|
+
|
|
213
|
+
Args:
|
|
214
|
+
*children: Child components.
|
|
215
|
+
size: The size of the section: "1" - "3" (default "3")
|
|
216
|
+
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
217
|
+
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
218
|
+
content_editable: Indicates whether the element's content is editable.
|
|
219
|
+
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
|
220
|
+
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
|
221
|
+
draggable: Defines whether the element can be dragged.
|
|
222
|
+
enter_key_hint: Hints what media types the media element is able to play.
|
|
223
|
+
hidden: Defines whether the element is hidden.
|
|
224
|
+
input_mode: Defines the type of the element.
|
|
225
|
+
item_prop: Defines the name of the element for metadata purposes.
|
|
226
|
+
lang: Defines the language used in the element.
|
|
227
|
+
role: Defines the role of the element.
|
|
228
|
+
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
|
229
|
+
spell_check: Defines whether the element may be checked for spelling errors.
|
|
230
|
+
tab_index: Defines the position of the current element in the tabbing order.
|
|
231
|
+
title: Defines a tooltip for the element.
|
|
232
|
+
translate: Specifies whether the content of an element should be translated or not.
|
|
233
|
+
p: Padding: "0" - "9"
|
|
234
|
+
px: Padding horizontal: "0" - "9"
|
|
235
|
+
py: Padding vertical: "0" - "9"
|
|
236
|
+
pt: Padding top: "0" - "9"
|
|
237
|
+
pr: Padding right: "0" - "9"
|
|
238
|
+
pb: Padding bottom: "0" - "9"
|
|
239
|
+
pl: Padding left: "0" - "9"
|
|
240
|
+
shrink: Whether the element will take up the smallest possible space: "0" | "1"
|
|
241
|
+
grow: Whether the element will take up the largest possible space: "0" | "1"
|
|
242
|
+
m: Margin: "0" - "9"
|
|
243
|
+
mx: Margin horizontal: "0" - "9"
|
|
244
|
+
my: Margin vertical: "0" - "9"
|
|
245
|
+
mt: Margin top: "0" - "9"
|
|
246
|
+
mr: Margin right: "0" - "9"
|
|
247
|
+
mb: Margin bottom: "0" - "9"
|
|
248
|
+
ml: Margin left: "0" - "9"
|
|
249
|
+
style: The style of the component.
|
|
250
|
+
key: A unique key for the component.
|
|
251
|
+
id: The id for the component.
|
|
252
|
+
class_name: The class name for the component.
|
|
253
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
254
|
+
custom_attrs: custom attribute
|
|
255
|
+
**props: Component properties.
|
|
256
|
+
|
|
257
|
+
Returns:
|
|
258
|
+
A new component instance.
|
|
259
|
+
"""
|
|
260
|
+
...
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""Typographic components."""
|
|
2
|
+
|
|
3
|
+
from .blockquote import Blockquote
|
|
4
|
+
from .code import Code
|
|
5
|
+
from .em import Em
|
|
6
|
+
from .heading import Heading
|
|
7
|
+
from .kbd import Kbd
|
|
8
|
+
from .link import Link
|
|
9
|
+
from .quote import Quote
|
|
10
|
+
from .strong import Strong
|
|
11
|
+
from .text import Text
|
|
12
|
+
|
|
13
|
+
blockquote = Blockquote.create
|
|
14
|
+
code = Code.create
|
|
15
|
+
em = Em.create
|
|
16
|
+
heading = Heading.create
|
|
17
|
+
kbd = Kbd.create
|
|
18
|
+
link = Link.create
|
|
19
|
+
quote = Quote.create
|
|
20
|
+
strong = Strong.create
|
|
21
|
+
text = Text.create
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""Components for rendering text.
|
|
2
|
+
|
|
3
|
+
https://www.radix-ui.com/themes/docs/theme/typography
|
|
4
|
+
"""
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Literal
|
|
8
|
+
|
|
9
|
+
LiteralTextWeight = Literal["light", "regular", "medium", "bold"]
|
|
10
|
+
LiteralTextAlign = Literal["left", "center", "right"]
|
|
11
|
+
LiteralTextSize = Literal["1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
12
|
+
LiteralTextTrim = Literal["normal", "start", "end", "both"]
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""Components for rendering heading.
|
|
2
|
+
|
|
3
|
+
https://www.radix-ui.com/themes/docs/theme/typography
|
|
4
|
+
"""
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from reflex import el
|
|
8
|
+
from reflex.vars import Var
|
|
9
|
+
|
|
10
|
+
from ..base import (
|
|
11
|
+
CommonMarginProps,
|
|
12
|
+
LiteralAccentColor,
|
|
13
|
+
RadixThemesComponent,
|
|
14
|
+
)
|
|
15
|
+
from .base import (
|
|
16
|
+
LiteralTextSize,
|
|
17
|
+
LiteralTextWeight,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Blockquote(el.Blockquote, CommonMarginProps, RadixThemesComponent):
|
|
22
|
+
"""A block level extended quotation."""
|
|
23
|
+
|
|
24
|
+
tag = "Blockquote"
|
|
25
|
+
|
|
26
|
+
# Text size: "1" - "9"
|
|
27
|
+
size: Var[LiteralTextSize]
|
|
28
|
+
|
|
29
|
+
# Thickness of text: "light" | "regular" | "medium" | "bold"
|
|
30
|
+
weight: Var[LiteralTextWeight]
|
|
31
|
+
|
|
32
|
+
# Overrides the accent color inherited from the Theme.
|
|
33
|
+
color: Var[LiteralAccentColor]
|
|
34
|
+
|
|
35
|
+
# Whether to render the text with higher contrast color
|
|
36
|
+
high_contrast: Var[bool]
|