reflex 0.7.1a3__py3-none-any.whl → 0.7.2__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/utils/context.js.jinja2 +8 -8
- reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +3 -3
- reflex/.templates/web/utils/state.js +18 -18
- reflex/admin.py +1 -2
- reflex/app.py +53 -50
- reflex/app_mixins/lifespan.py +2 -2
- reflex/app_mixins/middleware.py +1 -2
- reflex/assets.py +1 -2
- reflex/base.py +2 -2
- reflex/compiler/compiler.py +51 -16
- reflex/compiler/utils.py +4 -13
- reflex/components/base/app_wrap.pyi +7 -7
- reflex/components/base/bare.py +3 -3
- reflex/components/base/body.pyi +7 -7
- reflex/components/base/document.py +1 -3
- reflex/components/base/document.pyi +32 -32
- reflex/components/base/error_boundary.py +2 -4
- reflex/components/base/error_boundary.pyi +11 -13
- reflex/components/base/fragment.pyi +7 -7
- reflex/components/base/head.pyi +13 -13
- reflex/components/base/link.pyi +22 -22
- reflex/components/base/meta.py +5 -7
- reflex/components/base/meta.pyi +40 -40
- reflex/components/base/script.pyi +11 -14
- reflex/components/base/strict_mode.pyi +7 -7
- reflex/components/component.py +188 -113
- reflex/components/core/auto_scroll.py +8 -1
- reflex/components/core/auto_scroll.pyi +183 -210
- reflex/components/core/banner.py +2 -4
- reflex/components/core/banner.pyi +390 -444
- reflex/components/core/breakpoints.py +5 -5
- reflex/components/core/client_side_routing.pyi +14 -14
- reflex/components/core/clipboard.py +4 -4
- reflex/components/core/clipboard.pyi +12 -14
- reflex/components/core/cond.py +17 -25
- reflex/components/core/debounce.py +3 -3
- reflex/components/core/debounce.pyi +14 -14
- reflex/components/core/foreach.py +7 -2
- reflex/components/core/html.py +1 -3
- reflex/components/core/html.pyi +184 -213
- reflex/components/core/match.py +15 -19
- reflex/components/core/sticky.pyi +930 -1078
- reflex/components/core/upload.py +4 -4
- reflex/components/core/upload.pyi +62 -62
- reflex/components/datadisplay/code.py +6 -6
- reflex/components/datadisplay/code.pyi +1159 -1165
- reflex/components/datadisplay/dataeditor.py +49 -49
- reflex/components/datadisplay/dataeditor.pyi +95 -123
- reflex/components/datadisplay/logo.py +1 -3
- reflex/components/datadisplay/shiki_code_block.py +8 -10
- reflex/components/datadisplay/shiki_code_block.pyi +1678 -1720
- reflex/components/el/element.pyi +7 -7
- reflex/components/el/elements/base.pyi +183 -210
- reflex/components/el/elements/forms.py +24 -24
- reflex/components/el/elements/forms.pyi +2572 -2934
- reflex/components/el/elements/inline.py +4 -4
- reflex/components/el/elements/inline.pyi +5191 -5953
- reflex/components/el/elements/media.py +47 -47
- reflex/components/el/elements/media.pyi +4802 -5500
- reflex/components/el/elements/metadata.py +1 -3
- reflex/components/el/elements/metadata.pyi +782 -896
- reflex/components/el/elements/other.pyi +1278 -1467
- reflex/components/el/elements/scripts.pyi +580 -667
- reflex/components/el/elements/sectioning.pyi +2761 -3166
- reflex/components/el/elements/tables.pyi +1840 -2119
- reflex/components/el/elements/typography.pyi +2772 -3179
- reflex/components/gridjs/datatable.py +7 -7
- reflex/components/gridjs/datatable.pyi +19 -19
- reflex/components/lucide/icon.pyi +21 -21
- reflex/components/markdown/markdown.py +2 -2
- reflex/components/markdown/markdown.pyi +9 -9
- reflex/components/moment/moment.py +11 -12
- reflex/components/moment/moment.pyi +44 -47
- reflex/components/next/base.pyi +7 -7
- reflex/components/next/image.py +3 -3
- reflex/components/next/image.pyi +19 -21
- reflex/components/next/link.pyi +9 -9
- reflex/components/next/video.py +1 -3
- reflex/components/next/video.pyi +9 -9
- reflex/components/plotly/plotly.py +22 -45
- reflex/components/plotly/plotly.pyi +164 -164
- reflex/components/radix/primitives/accordion.py +14 -14
- reflex/components/radix/primitives/accordion.pyi +439 -487
- reflex/components/radix/primitives/base.py +1 -3
- reflex/components/radix/primitives/base.pyi +15 -15
- reflex/components/radix/primitives/drawer.py +3 -3
- reflex/components/radix/primitives/drawer.pyi +110 -116
- reflex/components/radix/primitives/form.py +1 -1
- reflex/components/radix/primitives/form.pyi +668 -752
- reflex/components/radix/primitives/progress.py +6 -6
- reflex/components/radix/primitives/progress.pyi +225 -243
- reflex/components/radix/primitives/slider.py +6 -6
- reflex/components/radix/primitives/slider.pyi +52 -55
- reflex/components/radix/themes/base.py +3 -6
- reflex/components/radix/themes/base.pyi +197 -303
- reflex/components/radix/themes/color_mode.py +5 -5
- reflex/components/radix/themes/color_mode.pyi +366 -436
- reflex/components/radix/themes/components/alert_dialog.pyi +229 -262
- reflex/components/radix/themes/components/aspect_ratio.py +1 -3
- reflex/components/radix/themes/components/aspect_ratio.pyi +8 -8
- reflex/components/radix/themes/components/avatar.pyi +79 -94
- reflex/components/radix/themes/components/badge.pyi +252 -295
- reflex/components/radix/themes/components/button.pyi +269 -314
- reflex/components/radix/themes/components/callout.py +2 -2
- reflex/components/radix/themes/components/callout.pyi +1116 -1290
- reflex/components/radix/themes/components/card.pyi +194 -229
- reflex/components/radix/themes/components/checkbox.pyi +243 -278
- reflex/components/radix/themes/components/checkbox_cards.py +3 -7
- reflex/components/radix/themes/components/checkbox_cards.pyi +101 -135
- reflex/components/radix/themes/components/checkbox_group.py +2 -2
- reflex/components/radix/themes/components/checkbox_group.pyi +83 -96
- reflex/components/radix/themes/components/context_menu.py +18 -15
- reflex/components/radix/themes/components/context_menu.pyi +408 -458
- reflex/components/radix/themes/components/data_list.pyi +122 -147
- reflex/components/radix/themes/components/dialog.pyi +231 -264
- reflex/components/radix/themes/components/dropdown_menu.py +16 -13
- reflex/components/radix/themes/components/dropdown_menu.pyi +223 -246
- reflex/components/radix/themes/components/hover_card.py +2 -2
- reflex/components/radix/themes/components/hover_card.pyi +237 -282
- reflex/components/radix/themes/components/icon_button.pyi +269 -314
- reflex/components/radix/themes/components/inset.py +8 -8
- reflex/components/radix/themes/components/inset.pyi +232 -292
- reflex/components/radix/themes/components/popover.py +2 -2
- reflex/components/radix/themes/components/popover.pyi +229 -271
- reflex/components/radix/themes/components/progress.pyi +80 -96
- reflex/components/radix/themes/components/radio.pyi +73 -86
- reflex/components/radix/themes/components/radio_cards.py +4 -8
- reflex/components/radix/themes/components/radio_cards.pyi +117 -154
- reflex/components/radix/themes/components/radio_group.py +3 -3
- reflex/components/radix/themes/components/radio_group.pyi +250 -291
- reflex/components/radix/themes/components/scroll_area.pyi +14 -20
- reflex/components/radix/themes/components/segmented_control.py +6 -6
- reflex/components/radix/themes/components/segmented_control.pyi +89 -108
- reflex/components/radix/themes/components/select.py +7 -7
- reflex/components/radix/themes/components/select.pyi +376 -444
- reflex/components/radix/themes/components/separator.pyi +79 -93
- reflex/components/radix/themes/components/skeleton.pyi +32 -26
- reflex/components/radix/themes/components/slider.py +8 -8
- reflex/components/radix/themes/components/slider.pyi +99 -122
- reflex/components/radix/themes/components/spinner.pyi +12 -19
- reflex/components/radix/themes/components/switch.pyi +84 -99
- reflex/components/radix/themes/components/table.py +9 -9
- reflex/components/radix/themes/components/table.pyi +1440 -1794
- reflex/components/radix/themes/components/tabs.py +4 -4
- reflex/components/radix/themes/components/tabs.pyi +120 -132
- reflex/components/radix/themes/components/text_area.pyi +281 -331
- reflex/components/radix/themes/components/text_field.py +2 -2
- reflex/components/radix/themes/components/text_field.pyi +639 -734
- reflex/components/radix/themes/components/tooltip.py +6 -6
- reflex/components/radix/themes/components/tooltip.pyi +34 -43
- reflex/components/radix/themes/layout/base.pyi +85 -182
- reflex/components/radix/themes/layout/box.pyi +183 -210
- reflex/components/radix/themes/layout/center.pyi +225 -286
- reflex/components/radix/themes/layout/container.pyi +191 -224
- reflex/components/radix/themes/layout/flex.py +2 -2
- reflex/components/radix/themes/layout/flex.pyi +225 -286
- reflex/components/radix/themes/layout/grid.py +2 -2
- reflex/components/radix/themes/layout/grid.pyi +245 -315
- reflex/components/radix/themes/layout/list.py +2 -2
- reflex/components/radix/themes/layout/list.pyi +712 -815
- reflex/components/radix/themes/layout/section.pyi +187 -221
- reflex/components/radix/themes/layout/spacer.pyi +225 -286
- reflex/components/radix/themes/layout/stack.pyi +625 -768
- reflex/components/radix/themes/typography/blockquote.pyi +257 -299
- reflex/components/radix/themes/typography/code.pyi +259 -304
- reflex/components/radix/themes/typography/heading.pyi +272 -324
- reflex/components/radix/themes/typography/link.pyi +302 -358
- reflex/components/radix/themes/typography/text.pyi +1669 -1945
- reflex/components/react_player/audio.pyi +20 -22
- reflex/components/react_player/react_player.pyi +19 -19
- reflex/components/react_player/video.pyi +20 -22
- reflex/components/recharts/cartesian.py +100 -97
- reflex/components/recharts/cartesian.pyi +891 -1007
- reflex/components/recharts/charts.py +42 -42
- reflex/components/recharts/charts.pyi +212 -249
- reflex/components/recharts/general.py +22 -21
- reflex/components/recharts/general.pyi +198 -223
- reflex/components/recharts/polar.py +42 -45
- reflex/components/recharts/polar.pyi +254 -288
- reflex/components/recharts/recharts.pyi +13 -13
- reflex/components/sonner/toast.py +20 -20
- reflex/components/sonner/toast.pyi +58 -61
- reflex/components/suneditor/editor.py +9 -9
- reflex/components/suneditor/editor.pyi +78 -83
- reflex/components/tags/cond_tag.py +2 -2
- reflex/components/tags/iter_tag.py +10 -14
- reflex/components/tags/match_tag.py +2 -2
- reflex/components/tags/tag.py +10 -10
- reflex/config.py +36 -35
- reflex/constants/__init__.py +56 -53
- reflex/custom_components/custom_components.py +6 -7
- reflex/event.py +38 -42
- reflex/experimental/client_state.py +2 -4
- reflex/experimental/layout.py +2 -2
- reflex/experimental/layout.pyi +579 -663
- reflex/istate/data.py +4 -5
- reflex/middleware/hydrate_middleware.py +2 -2
- reflex/middleware/middleware.py +2 -2
- reflex/model.py +3 -5
- reflex/page.py +2 -2
- reflex/reflex.py +9 -10
- reflex/state.py +77 -49
- reflex/style.py +11 -5
- reflex/testing.py +21 -24
- reflex/utils/console.py +1 -1
- reflex/utils/decorator.py +26 -1
- reflex/utils/exec.py +6 -11
- reflex/utils/export.py +2 -3
- reflex/utils/format.py +4 -4
- reflex/utils/imports.py +12 -12
- reflex/utils/prerequisites.py +35 -84
- reflex/utils/processes.py +5 -5
- reflex/utils/pyi_generator.py +33 -22
- reflex/utils/serializers.py +60 -15
- reflex/utils/types.py +237 -56
- reflex/vars/base.py +122 -72
- reflex/vars/datetime.py +2 -2
- reflex/vars/function.py +52 -55
- reflex/vars/number.py +59 -5
- reflex/vars/object.py +57 -26
- reflex/vars/sequence.py +983 -958
- {reflex-0.7.1a3.dist-info → reflex-0.7.2.dist-info}/METADATA +3 -6
- reflex-0.7.2.dist-info/RECORD +405 -0
- {reflex-0.7.1a3.dist-info → reflex-0.7.2.dist-info}/WHEEL +1 -1
- reflex-0.7.1a3.dist-info/RECORD +0 -405
- {reflex-0.7.1a3.dist-info → reflex-0.7.2.dist-info}/LICENSE +0 -0
- {reflex-0.7.1a3.dist-info → reflex-0.7.2.dist-info}/entry_points.txt +0 -0
reflex/components/el/element.pyi
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# ------------------- DO NOT EDIT ----------------------
|
|
4
4
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
5
|
# ------------------------------------------------------
|
|
6
|
-
from typing import Any,
|
|
6
|
+
from typing import Any, Optional, overload
|
|
7
7
|
|
|
8
8
|
from reflex.components.component import Component
|
|
9
9
|
from reflex.event import EventType
|
|
@@ -16,12 +16,12 @@ class Element(Component):
|
|
|
16
16
|
def create( # type: ignore
|
|
17
17
|
cls,
|
|
18
18
|
*children,
|
|
19
|
-
style:
|
|
20
|
-
key:
|
|
21
|
-
id:
|
|
22
|
-
class_name:
|
|
23
|
-
autofocus:
|
|
24
|
-
custom_attrs:
|
|
19
|
+
style: Style | None = None,
|
|
20
|
+
key: Any | None = None,
|
|
21
|
+
id: Any | None = None,
|
|
22
|
+
class_name: Any | None = None,
|
|
23
|
+
autofocus: bool | None = None,
|
|
24
|
+
custom_attrs: dict[str, Var | Any] | None = None,
|
|
25
25
|
on_blur: Optional[EventType[()]] = None,
|
|
26
26
|
on_click: Optional[EventType[()]] = None,
|
|
27
27
|
on_context_menu: Optional[EventType[()]] = None,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# ------------------- DO NOT EDIT ----------------------
|
|
4
4
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
5
5
|
# ------------------------------------------------------
|
|
6
|
-
from typing import Any,
|
|
6
|
+
from typing import Any, Literal, Optional, overload
|
|
7
7
|
|
|
8
8
|
from reflex.components.el.element import Element
|
|
9
9
|
from reflex.event import EventType
|
|
@@ -94,217 +94,190 @@ class BaseHTML(Element):
|
|
|
94
94
|
def create( # type: ignore
|
|
95
95
|
cls,
|
|
96
96
|
*children,
|
|
97
|
-
access_key:
|
|
98
|
-
auto_capitalize:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
access_key: Var[str] | str | None = None,
|
|
98
|
+
auto_capitalize: Literal[
|
|
99
|
+
"characters", "none", "off", "on", "sentences", "words"
|
|
100
|
+
]
|
|
101
|
+
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
|
|
102
|
+
| None = None,
|
|
103
|
+
content_editable: Literal["inherit", "plaintext-only", False, True]
|
|
104
|
+
| Var[Literal["inherit", "plaintext-only", False, True]]
|
|
105
|
+
| None = None,
|
|
106
|
+
context_menu: Var[str] | str | None = None,
|
|
107
|
+
dir: Var[str] | str | None = None,
|
|
108
|
+
draggable: Var[bool] | bool | None = None,
|
|
109
|
+
enter_key_hint: Literal[
|
|
110
|
+
"done", "enter", "go", "next", "previous", "search", "send"
|
|
111
|
+
]
|
|
112
|
+
| Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
|
|
113
|
+
| None = None,
|
|
114
|
+
hidden: Var[bool] | bool | None = None,
|
|
115
|
+
input_mode: Literal[
|
|
116
|
+
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
117
|
+
]
|
|
118
|
+
| Var[
|
|
119
|
+
Literal[
|
|
120
|
+
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
102
121
|
]
|
|
103
|
-
]
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
122
|
+
]
|
|
123
|
+
| None = None,
|
|
124
|
+
item_prop: Var[str] | str | None = None,
|
|
125
|
+
lang: Var[str] | str | None = None,
|
|
126
|
+
role: 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
|
+
| Var[
|
|
198
|
+
Literal[
|
|
199
|
+
"alert",
|
|
200
|
+
"alertdialog",
|
|
201
|
+
"application",
|
|
202
|
+
"article",
|
|
203
|
+
"banner",
|
|
204
|
+
"button",
|
|
205
|
+
"cell",
|
|
206
|
+
"checkbox",
|
|
207
|
+
"columnheader",
|
|
208
|
+
"combobox",
|
|
209
|
+
"complementary",
|
|
210
|
+
"contentinfo",
|
|
211
|
+
"definition",
|
|
212
|
+
"dialog",
|
|
213
|
+
"directory",
|
|
214
|
+
"document",
|
|
215
|
+
"feed",
|
|
216
|
+
"figure",
|
|
217
|
+
"form",
|
|
218
|
+
"grid",
|
|
219
|
+
"gridcell",
|
|
220
|
+
"group",
|
|
221
|
+
"heading",
|
|
222
|
+
"img",
|
|
223
|
+
"link",
|
|
224
|
+
"list",
|
|
225
|
+
"listbox",
|
|
226
|
+
"listitem",
|
|
227
|
+
"log",
|
|
228
|
+
"main",
|
|
229
|
+
"marquee",
|
|
230
|
+
"math",
|
|
231
|
+
"menu",
|
|
232
|
+
"menubar",
|
|
233
|
+
"menuitem",
|
|
234
|
+
"menuitemcheckbox",
|
|
235
|
+
"menuitemradio",
|
|
236
|
+
"navigation",
|
|
237
|
+
"none",
|
|
238
|
+
"note",
|
|
239
|
+
"option",
|
|
240
|
+
"presentation",
|
|
241
|
+
"progressbar",
|
|
242
|
+
"radio",
|
|
243
|
+
"radiogroup",
|
|
244
|
+
"region",
|
|
245
|
+
"row",
|
|
246
|
+
"rowgroup",
|
|
247
|
+
"rowheader",
|
|
248
|
+
"scrollbar",
|
|
249
|
+
"search",
|
|
250
|
+
"searchbox",
|
|
251
|
+
"separator",
|
|
252
|
+
"slider",
|
|
253
|
+
"spinbutton",
|
|
254
|
+
"status",
|
|
255
|
+
"switch",
|
|
256
|
+
"tab",
|
|
257
|
+
"table",
|
|
258
|
+
"tablist",
|
|
259
|
+
"tabpanel",
|
|
260
|
+
"term",
|
|
261
|
+
"textbox",
|
|
262
|
+
"timer",
|
|
263
|
+
"toolbar",
|
|
264
|
+
"tooltip",
|
|
265
|
+
"tree",
|
|
266
|
+
"treegrid",
|
|
267
|
+
"treeitem",
|
|
108
268
|
]
|
|
109
|
-
]
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
] = None,
|
|
121
|
-
hidden: Optional[Union[Var[bool], bool]] = None,
|
|
122
|
-
input_mode: Optional[
|
|
123
|
-
Union[
|
|
124
|
-
Literal[
|
|
125
|
-
"decimal",
|
|
126
|
-
"email",
|
|
127
|
-
"none",
|
|
128
|
-
"numeric",
|
|
129
|
-
"search",
|
|
130
|
-
"tel",
|
|
131
|
-
"text",
|
|
132
|
-
"url",
|
|
133
|
-
],
|
|
134
|
-
Var[
|
|
135
|
-
Literal[
|
|
136
|
-
"decimal",
|
|
137
|
-
"email",
|
|
138
|
-
"none",
|
|
139
|
-
"numeric",
|
|
140
|
-
"search",
|
|
141
|
-
"tel",
|
|
142
|
-
"text",
|
|
143
|
-
"url",
|
|
144
|
-
]
|
|
145
|
-
],
|
|
146
|
-
]
|
|
147
|
-
] = None,
|
|
148
|
-
item_prop: Optional[Union[Var[str], str]] = None,
|
|
149
|
-
lang: Optional[Union[Var[str], str]] = None,
|
|
150
|
-
role: Optional[
|
|
151
|
-
Union[
|
|
152
|
-
Literal[
|
|
153
|
-
"alert",
|
|
154
|
-
"alertdialog",
|
|
155
|
-
"application",
|
|
156
|
-
"article",
|
|
157
|
-
"banner",
|
|
158
|
-
"button",
|
|
159
|
-
"cell",
|
|
160
|
-
"checkbox",
|
|
161
|
-
"columnheader",
|
|
162
|
-
"combobox",
|
|
163
|
-
"complementary",
|
|
164
|
-
"contentinfo",
|
|
165
|
-
"definition",
|
|
166
|
-
"dialog",
|
|
167
|
-
"directory",
|
|
168
|
-
"document",
|
|
169
|
-
"feed",
|
|
170
|
-
"figure",
|
|
171
|
-
"form",
|
|
172
|
-
"grid",
|
|
173
|
-
"gridcell",
|
|
174
|
-
"group",
|
|
175
|
-
"heading",
|
|
176
|
-
"img",
|
|
177
|
-
"link",
|
|
178
|
-
"list",
|
|
179
|
-
"listbox",
|
|
180
|
-
"listitem",
|
|
181
|
-
"log",
|
|
182
|
-
"main",
|
|
183
|
-
"marquee",
|
|
184
|
-
"math",
|
|
185
|
-
"menu",
|
|
186
|
-
"menubar",
|
|
187
|
-
"menuitem",
|
|
188
|
-
"menuitemcheckbox",
|
|
189
|
-
"menuitemradio",
|
|
190
|
-
"navigation",
|
|
191
|
-
"none",
|
|
192
|
-
"note",
|
|
193
|
-
"option",
|
|
194
|
-
"presentation",
|
|
195
|
-
"progressbar",
|
|
196
|
-
"radio",
|
|
197
|
-
"radiogroup",
|
|
198
|
-
"region",
|
|
199
|
-
"row",
|
|
200
|
-
"rowgroup",
|
|
201
|
-
"rowheader",
|
|
202
|
-
"scrollbar",
|
|
203
|
-
"search",
|
|
204
|
-
"searchbox",
|
|
205
|
-
"separator",
|
|
206
|
-
"slider",
|
|
207
|
-
"spinbutton",
|
|
208
|
-
"status",
|
|
209
|
-
"switch",
|
|
210
|
-
"tab",
|
|
211
|
-
"table",
|
|
212
|
-
"tablist",
|
|
213
|
-
"tabpanel",
|
|
214
|
-
"term",
|
|
215
|
-
"textbox",
|
|
216
|
-
"timer",
|
|
217
|
-
"toolbar",
|
|
218
|
-
"tooltip",
|
|
219
|
-
"tree",
|
|
220
|
-
"treegrid",
|
|
221
|
-
"treeitem",
|
|
222
|
-
],
|
|
223
|
-
Var[
|
|
224
|
-
Literal[
|
|
225
|
-
"alert",
|
|
226
|
-
"alertdialog",
|
|
227
|
-
"application",
|
|
228
|
-
"article",
|
|
229
|
-
"banner",
|
|
230
|
-
"button",
|
|
231
|
-
"cell",
|
|
232
|
-
"checkbox",
|
|
233
|
-
"columnheader",
|
|
234
|
-
"combobox",
|
|
235
|
-
"complementary",
|
|
236
|
-
"contentinfo",
|
|
237
|
-
"definition",
|
|
238
|
-
"dialog",
|
|
239
|
-
"directory",
|
|
240
|
-
"document",
|
|
241
|
-
"feed",
|
|
242
|
-
"figure",
|
|
243
|
-
"form",
|
|
244
|
-
"grid",
|
|
245
|
-
"gridcell",
|
|
246
|
-
"group",
|
|
247
|
-
"heading",
|
|
248
|
-
"img",
|
|
249
|
-
"link",
|
|
250
|
-
"list",
|
|
251
|
-
"listbox",
|
|
252
|
-
"listitem",
|
|
253
|
-
"log",
|
|
254
|
-
"main",
|
|
255
|
-
"marquee",
|
|
256
|
-
"math",
|
|
257
|
-
"menu",
|
|
258
|
-
"menubar",
|
|
259
|
-
"menuitem",
|
|
260
|
-
"menuitemcheckbox",
|
|
261
|
-
"menuitemradio",
|
|
262
|
-
"navigation",
|
|
263
|
-
"none",
|
|
264
|
-
"note",
|
|
265
|
-
"option",
|
|
266
|
-
"presentation",
|
|
267
|
-
"progressbar",
|
|
268
|
-
"radio",
|
|
269
|
-
"radiogroup",
|
|
270
|
-
"region",
|
|
271
|
-
"row",
|
|
272
|
-
"rowgroup",
|
|
273
|
-
"rowheader",
|
|
274
|
-
"scrollbar",
|
|
275
|
-
"search",
|
|
276
|
-
"searchbox",
|
|
277
|
-
"separator",
|
|
278
|
-
"slider",
|
|
279
|
-
"spinbutton",
|
|
280
|
-
"status",
|
|
281
|
-
"switch",
|
|
282
|
-
"tab",
|
|
283
|
-
"table",
|
|
284
|
-
"tablist",
|
|
285
|
-
"tabpanel",
|
|
286
|
-
"term",
|
|
287
|
-
"textbox",
|
|
288
|
-
"timer",
|
|
289
|
-
"toolbar",
|
|
290
|
-
"tooltip",
|
|
291
|
-
"tree",
|
|
292
|
-
"treegrid",
|
|
293
|
-
"treeitem",
|
|
294
|
-
]
|
|
295
|
-
],
|
|
296
|
-
]
|
|
297
|
-
] = None,
|
|
298
|
-
slot: Optional[Union[Var[str], str]] = None,
|
|
299
|
-
spell_check: Optional[Union[Var[bool], bool]] = None,
|
|
300
|
-
tab_index: Optional[Union[Var[int], int]] = None,
|
|
301
|
-
title: Optional[Union[Var[str], str]] = None,
|
|
302
|
-
style: Optional[Style] = None,
|
|
303
|
-
key: Optional[Any] = None,
|
|
304
|
-
id: Optional[Any] = None,
|
|
305
|
-
class_name: Optional[Any] = None,
|
|
306
|
-
autofocus: Optional[bool] = None,
|
|
307
|
-
custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
|
|
269
|
+
]
|
|
270
|
+
| None = None,
|
|
271
|
+
slot: Var[str] | str | None = None,
|
|
272
|
+
spell_check: Var[bool] | bool | None = None,
|
|
273
|
+
tab_index: Var[int] | int | None = None,
|
|
274
|
+
title: Var[str] | str | None = None,
|
|
275
|
+
style: Style | None = None,
|
|
276
|
+
key: Any | None = None,
|
|
277
|
+
id: Any | None = None,
|
|
278
|
+
class_name: Any | None = None,
|
|
279
|
+
autofocus: bool | None = None,
|
|
280
|
+
custom_attrs: dict[str, Var | Any] | None = None,
|
|
308
281
|
on_blur: Optional[EventType[()]] = None,
|
|
309
282
|
on_click: Optional[EventType[()]] = None,
|
|
310
283
|
on_context_menu: Optional[EventType[()]] = None,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from hashlib import md5
|
|
6
|
-
from typing import Any,
|
|
6
|
+
from typing import Any, Iterator, Literal
|
|
7
7
|
|
|
8
8
|
from jinja2 import Environment
|
|
9
9
|
|
|
@@ -32,7 +32,7 @@ HANDLE_SUBMIT_JS_JINJA2 = Environment().from_string(
|
|
|
32
32
|
ev.preventDefault()
|
|
33
33
|
const {{ form_data }} = {...Object.fromEntries(new FormData($form).entries()), ...{{ field_ref_mapping }}};
|
|
34
34
|
|
|
35
|
-
({{ on_submit_event_chain }}());
|
|
35
|
+
({{ on_submit_event_chain }}(ev));
|
|
36
36
|
|
|
37
37
|
if ({{ reset_on_submit }}) {
|
|
38
38
|
$form.reset()
|
|
@@ -80,7 +80,7 @@ class Button(BaseHTML):
|
|
|
80
80
|
type: Var[ButtonType]
|
|
81
81
|
|
|
82
82
|
# Value of the button, used when sending form data
|
|
83
|
-
value: Var[
|
|
83
|
+
value: Var[str | int | float]
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
class Datalist(BaseHTML):
|
|
@@ -104,7 +104,7 @@ class Fieldset(Element):
|
|
|
104
104
|
name: Var[str]
|
|
105
105
|
|
|
106
106
|
|
|
107
|
-
def on_submit_event_spec() ->
|
|
107
|
+
def on_submit_event_spec() -> tuple[Var[dict[str, Any]]]:
|
|
108
108
|
"""Event handler spec for the on_submit event.
|
|
109
109
|
|
|
110
110
|
Returns:
|
|
@@ -113,7 +113,7 @@ def on_submit_event_spec() -> Tuple[Var[dict[str, Any]]]:
|
|
|
113
113
|
return (FORM_DATA,)
|
|
114
114
|
|
|
115
115
|
|
|
116
|
-
def on_submit_string_event_spec() ->
|
|
116
|
+
def on_submit_string_event_spec() -> tuple[Var[dict[str, str]]]:
|
|
117
117
|
"""Event handler spec for the on_submit event.
|
|
118
118
|
|
|
119
119
|
Returns:
|
|
@@ -232,7 +232,7 @@ class Form(BaseHTML):
|
|
|
232
232
|
)
|
|
233
233
|
return render_tag
|
|
234
234
|
|
|
235
|
-
def _get_form_refs(self) ->
|
|
235
|
+
def _get_form_refs(self) -> dict[str, Any]:
|
|
236
236
|
# Send all the input refs to the handler.
|
|
237
237
|
form_refs = {}
|
|
238
238
|
for ref in self._get_all_refs():
|
|
@@ -321,7 +321,7 @@ class Input(BaseHTML):
|
|
|
321
321
|
default_checked: Var[bool]
|
|
322
322
|
|
|
323
323
|
# The initial value for a text field
|
|
324
|
-
default_value: Var[
|
|
324
|
+
default_value: Var[str | int | float]
|
|
325
325
|
|
|
326
326
|
# Disables the input
|
|
327
327
|
disabled: Var[bool]
|
|
@@ -348,16 +348,16 @@ class Input(BaseHTML):
|
|
|
348
348
|
list: Var[str]
|
|
349
349
|
|
|
350
350
|
# Specifies the maximum value for the input
|
|
351
|
-
max: Var[
|
|
351
|
+
max: Var[str | int | float]
|
|
352
352
|
|
|
353
353
|
# Specifies the maximum number of characters allowed in the input
|
|
354
|
-
max_length: Var[
|
|
354
|
+
max_length: Var[int | float]
|
|
355
355
|
|
|
356
356
|
# Specifies the minimum number of characters required in the input
|
|
357
|
-
min_length: Var[
|
|
357
|
+
min_length: Var[int | float]
|
|
358
358
|
|
|
359
359
|
# Specifies the minimum value for the input
|
|
360
|
-
min: Var[
|
|
360
|
+
min: Var[str | int | float]
|
|
361
361
|
|
|
362
362
|
# Indicates whether multiple values can be entered in an input of the type email or file
|
|
363
363
|
multiple: Var[bool]
|
|
@@ -378,19 +378,19 @@ class Input(BaseHTML):
|
|
|
378
378
|
required: Var[bool]
|
|
379
379
|
|
|
380
380
|
# Specifies the visible width of a text control
|
|
381
|
-
size: Var[
|
|
381
|
+
size: Var[int | float]
|
|
382
382
|
|
|
383
383
|
# URL for image inputs
|
|
384
384
|
src: Var[str]
|
|
385
385
|
|
|
386
386
|
# Specifies the legal number intervals for an input
|
|
387
|
-
step: Var[
|
|
387
|
+
step: Var[str | int | float]
|
|
388
388
|
|
|
389
389
|
# Specifies the type of input
|
|
390
390
|
type: Var[HTMLInputTypeAttribute]
|
|
391
391
|
|
|
392
392
|
# Value of the input
|
|
393
|
-
value: Var[
|
|
393
|
+
value: Var[str | int | float]
|
|
394
394
|
|
|
395
395
|
# Fired when the input value changes
|
|
396
396
|
on_change: EventHandler[input_event]
|
|
@@ -462,22 +462,22 @@ class Meter(BaseHTML):
|
|
|
462
462
|
form: Var[str]
|
|
463
463
|
|
|
464
464
|
# High limit of range (above this is considered high value)
|
|
465
|
-
high: Var[
|
|
465
|
+
high: Var[int | float]
|
|
466
466
|
|
|
467
467
|
# Low limit of range (below this is considered low value)
|
|
468
|
-
low: Var[
|
|
468
|
+
low: Var[int | float]
|
|
469
469
|
|
|
470
470
|
# Maximum value of the range
|
|
471
|
-
max: Var[
|
|
471
|
+
max: Var[int | float]
|
|
472
472
|
|
|
473
473
|
# Minimum value of the range
|
|
474
|
-
min: Var[
|
|
474
|
+
min: Var[int | float]
|
|
475
475
|
|
|
476
476
|
# Optimum value in the range
|
|
477
|
-
optimum: Var[
|
|
477
|
+
optimum: Var[int | float]
|
|
478
478
|
|
|
479
479
|
# Current value of the meter
|
|
480
|
-
value: Var[
|
|
480
|
+
value: Var[int | float]
|
|
481
481
|
|
|
482
482
|
|
|
483
483
|
class Optgroup(BaseHTML):
|
|
@@ -507,7 +507,7 @@ class Option(BaseHTML):
|
|
|
507
507
|
selected: Var[bool]
|
|
508
508
|
|
|
509
509
|
# Value to be sent as form data
|
|
510
|
-
value: Var[
|
|
510
|
+
value: Var[str | int | float]
|
|
511
511
|
|
|
512
512
|
|
|
513
513
|
class Output(BaseHTML):
|
|
@@ -534,10 +534,10 @@ class Progress(BaseHTML):
|
|
|
534
534
|
form: Var[str]
|
|
535
535
|
|
|
536
536
|
# Maximum value of the progress indicator
|
|
537
|
-
max: Var[
|
|
537
|
+
max: Var[str | int | float]
|
|
538
538
|
|
|
539
539
|
# Current value of the progress indicator
|
|
540
|
-
value: Var[
|
|
540
|
+
value: Var[str | int | float]
|
|
541
541
|
|
|
542
542
|
|
|
543
543
|
class Select(BaseHTML):
|
|
@@ -720,7 +720,7 @@ class Textarea(BaseHTML):
|
|
|
720
720
|
"enter_key_submit",
|
|
721
721
|
]
|
|
722
722
|
|
|
723
|
-
def _get_all_custom_code(self) ->
|
|
723
|
+
def _get_all_custom_code(self) -> set[str]:
|
|
724
724
|
"""Include the custom code for auto_height and enter_key_submit functionality.
|
|
725
725
|
|
|
726
726
|
Returns:
|