reflex 0.7.6a0__py3-none-any.whl → 0.7.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/web/utils/state.js +9 -0
- reflex/app.py +7 -0
- reflex/components/component.py +2 -1
- reflex/components/el/elements/forms.py +63 -18
- reflex/components/el/elements/forms.pyi +1132 -4
- reflex/components/recharts/__init__.py +1 -0
- reflex/components/recharts/__init__.pyi +1 -0
- reflex/components/recharts/general.py +1 -1
- reflex/components/recharts/general.pyi +1 -1
- reflex/event.py +37 -0
- reflex/reflex.py +17 -13
- reflex/state.py +3 -2
- reflex/utils/decorator.py +21 -0
- reflex/utils/export.py +2 -2
- reflex/utils/prerequisites.py +28 -19
- reflex/utils/pyi_generator.py +13 -7
- reflex/utils/telemetry.py +82 -21
- reflex/utils/types.py +12 -0
- reflex/vars/base.py +15 -1
- reflex/vars/number.py +21 -0
- {reflex-0.7.6a0.dist-info → reflex-0.7.7.dist-info}/METADATA +16 -16
- {reflex-0.7.6a0.dist-info → reflex-0.7.7.dist-info}/RECORD +25 -25
- {reflex-0.7.6a0.dist-info → reflex-0.7.7.dist-info}/WHEEL +0 -0
- {reflex-0.7.6a0.dist-info → reflex-0.7.7.dist-info}/entry_points.txt +0 -0
- {reflex-0.7.6a0.dist-info → reflex-0.7.7.dist-info}/licenses/LICENSE +0 -0
|
@@ -893,7 +893,1131 @@ HTMLInputTypeAttribute = Literal[
|
|
|
893
893
|
"week",
|
|
894
894
|
]
|
|
895
895
|
|
|
896
|
-
class
|
|
896
|
+
class BaseInput(BaseHTML):
|
|
897
|
+
@overload
|
|
898
|
+
@classmethod
|
|
899
|
+
def create( # type: ignore
|
|
900
|
+
cls,
|
|
901
|
+
*children,
|
|
902
|
+
accept: Var[str] | str | None = None,
|
|
903
|
+
alt: Var[str] | str | None = None,
|
|
904
|
+
auto_complete: Var[str] | str | None = None,
|
|
905
|
+
auto_focus: Var[bool] | bool | None = None,
|
|
906
|
+
capture: Literal["environment", "user", False, True]
|
|
907
|
+
| Var[Literal["environment", "user", False, True]]
|
|
908
|
+
| None = None,
|
|
909
|
+
checked: Var[bool] | bool | None = None,
|
|
910
|
+
default_checked: Var[bool] | bool | None = None,
|
|
911
|
+
default_value: Var[float | int | str] | float | int | str | None = None,
|
|
912
|
+
disabled: Var[bool] | bool | None = None,
|
|
913
|
+
form: Var[str] | str | None = None,
|
|
914
|
+
form_action: Var[str] | str | None = None,
|
|
915
|
+
form_enc_type: Var[str] | str | None = None,
|
|
916
|
+
form_method: Var[str] | str | None = None,
|
|
917
|
+
form_no_validate: Var[bool] | bool | None = None,
|
|
918
|
+
form_target: Var[str] | str | None = None,
|
|
919
|
+
list: Var[str] | str | None = None,
|
|
920
|
+
max: Var[float | int | str] | float | int | str | None = None,
|
|
921
|
+
max_length: Var[float | int] | float | int | None = None,
|
|
922
|
+
min_length: Var[float | int] | float | int | None = None,
|
|
923
|
+
min: Var[float | int | str] | float | int | str | None = None,
|
|
924
|
+
multiple: Var[bool] | bool | None = None,
|
|
925
|
+
name: Var[str] | str | None = None,
|
|
926
|
+
pattern: Var[str] | str | None = None,
|
|
927
|
+
placeholder: Var[str] | str | None = None,
|
|
928
|
+
read_only: Var[bool] | bool | None = None,
|
|
929
|
+
required: Var[bool] | bool | None = None,
|
|
930
|
+
size: Var[float | int] | float | int | None = None,
|
|
931
|
+
src: Var[str] | str | None = None,
|
|
932
|
+
step: Var[float | int | str] | float | int | str | None = None,
|
|
933
|
+
type: Literal[
|
|
934
|
+
"button",
|
|
935
|
+
"checkbox",
|
|
936
|
+
"color",
|
|
937
|
+
"date",
|
|
938
|
+
"datetime-local",
|
|
939
|
+
"email",
|
|
940
|
+
"file",
|
|
941
|
+
"hidden",
|
|
942
|
+
"image",
|
|
943
|
+
"month",
|
|
944
|
+
"number",
|
|
945
|
+
"password",
|
|
946
|
+
"radio",
|
|
947
|
+
"range",
|
|
948
|
+
"reset",
|
|
949
|
+
"search",
|
|
950
|
+
"submit",
|
|
951
|
+
"tel",
|
|
952
|
+
"text",
|
|
953
|
+
"time",
|
|
954
|
+
"url",
|
|
955
|
+
"week",
|
|
956
|
+
]
|
|
957
|
+
| Var[
|
|
958
|
+
Literal[
|
|
959
|
+
"button",
|
|
960
|
+
"checkbox",
|
|
961
|
+
"color",
|
|
962
|
+
"date",
|
|
963
|
+
"datetime-local",
|
|
964
|
+
"email",
|
|
965
|
+
"file",
|
|
966
|
+
"hidden",
|
|
967
|
+
"image",
|
|
968
|
+
"month",
|
|
969
|
+
"number",
|
|
970
|
+
"password",
|
|
971
|
+
"radio",
|
|
972
|
+
"range",
|
|
973
|
+
"reset",
|
|
974
|
+
"search",
|
|
975
|
+
"submit",
|
|
976
|
+
"tel",
|
|
977
|
+
"text",
|
|
978
|
+
"time",
|
|
979
|
+
"url",
|
|
980
|
+
"week",
|
|
981
|
+
]
|
|
982
|
+
]
|
|
983
|
+
| None = None,
|
|
984
|
+
value: Var[float | int | str] | float | int | str | None = None,
|
|
985
|
+
access_key: Var[str] | str | None = None,
|
|
986
|
+
auto_capitalize: Literal[
|
|
987
|
+
"characters", "none", "off", "on", "sentences", "words"
|
|
988
|
+
]
|
|
989
|
+
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
|
|
990
|
+
| None = None,
|
|
991
|
+
content_editable: Literal["inherit", "plaintext-only", False, True]
|
|
992
|
+
| Var[Literal["inherit", "plaintext-only", False, True]]
|
|
993
|
+
| None = None,
|
|
994
|
+
context_menu: Var[str] | str | None = None,
|
|
995
|
+
dir: Var[str] | str | None = None,
|
|
996
|
+
draggable: Var[bool] | bool | None = None,
|
|
997
|
+
enter_key_hint: Literal[
|
|
998
|
+
"done", "enter", "go", "next", "previous", "search", "send"
|
|
999
|
+
]
|
|
1000
|
+
| Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
|
|
1001
|
+
| None = None,
|
|
1002
|
+
hidden: Var[bool] | bool | None = None,
|
|
1003
|
+
input_mode: Literal[
|
|
1004
|
+
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
1005
|
+
]
|
|
1006
|
+
| Var[
|
|
1007
|
+
Literal[
|
|
1008
|
+
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
1009
|
+
]
|
|
1010
|
+
]
|
|
1011
|
+
| None = None,
|
|
1012
|
+
item_prop: Var[str] | str | None = None,
|
|
1013
|
+
lang: Var[str] | str | None = None,
|
|
1014
|
+
role: Literal[
|
|
1015
|
+
"alert",
|
|
1016
|
+
"alertdialog",
|
|
1017
|
+
"application",
|
|
1018
|
+
"article",
|
|
1019
|
+
"banner",
|
|
1020
|
+
"button",
|
|
1021
|
+
"cell",
|
|
1022
|
+
"checkbox",
|
|
1023
|
+
"columnheader",
|
|
1024
|
+
"combobox",
|
|
1025
|
+
"complementary",
|
|
1026
|
+
"contentinfo",
|
|
1027
|
+
"definition",
|
|
1028
|
+
"dialog",
|
|
1029
|
+
"directory",
|
|
1030
|
+
"document",
|
|
1031
|
+
"feed",
|
|
1032
|
+
"figure",
|
|
1033
|
+
"form",
|
|
1034
|
+
"grid",
|
|
1035
|
+
"gridcell",
|
|
1036
|
+
"group",
|
|
1037
|
+
"heading",
|
|
1038
|
+
"img",
|
|
1039
|
+
"link",
|
|
1040
|
+
"list",
|
|
1041
|
+
"listbox",
|
|
1042
|
+
"listitem",
|
|
1043
|
+
"log",
|
|
1044
|
+
"main",
|
|
1045
|
+
"marquee",
|
|
1046
|
+
"math",
|
|
1047
|
+
"menu",
|
|
1048
|
+
"menubar",
|
|
1049
|
+
"menuitem",
|
|
1050
|
+
"menuitemcheckbox",
|
|
1051
|
+
"menuitemradio",
|
|
1052
|
+
"navigation",
|
|
1053
|
+
"none",
|
|
1054
|
+
"note",
|
|
1055
|
+
"option",
|
|
1056
|
+
"presentation",
|
|
1057
|
+
"progressbar",
|
|
1058
|
+
"radio",
|
|
1059
|
+
"radiogroup",
|
|
1060
|
+
"region",
|
|
1061
|
+
"row",
|
|
1062
|
+
"rowgroup",
|
|
1063
|
+
"rowheader",
|
|
1064
|
+
"scrollbar",
|
|
1065
|
+
"search",
|
|
1066
|
+
"searchbox",
|
|
1067
|
+
"separator",
|
|
1068
|
+
"slider",
|
|
1069
|
+
"spinbutton",
|
|
1070
|
+
"status",
|
|
1071
|
+
"switch",
|
|
1072
|
+
"tab",
|
|
1073
|
+
"table",
|
|
1074
|
+
"tablist",
|
|
1075
|
+
"tabpanel",
|
|
1076
|
+
"term",
|
|
1077
|
+
"textbox",
|
|
1078
|
+
"timer",
|
|
1079
|
+
"toolbar",
|
|
1080
|
+
"tooltip",
|
|
1081
|
+
"tree",
|
|
1082
|
+
"treegrid",
|
|
1083
|
+
"treeitem",
|
|
1084
|
+
]
|
|
1085
|
+
| Var[
|
|
1086
|
+
Literal[
|
|
1087
|
+
"alert",
|
|
1088
|
+
"alertdialog",
|
|
1089
|
+
"application",
|
|
1090
|
+
"article",
|
|
1091
|
+
"banner",
|
|
1092
|
+
"button",
|
|
1093
|
+
"cell",
|
|
1094
|
+
"checkbox",
|
|
1095
|
+
"columnheader",
|
|
1096
|
+
"combobox",
|
|
1097
|
+
"complementary",
|
|
1098
|
+
"contentinfo",
|
|
1099
|
+
"definition",
|
|
1100
|
+
"dialog",
|
|
1101
|
+
"directory",
|
|
1102
|
+
"document",
|
|
1103
|
+
"feed",
|
|
1104
|
+
"figure",
|
|
1105
|
+
"form",
|
|
1106
|
+
"grid",
|
|
1107
|
+
"gridcell",
|
|
1108
|
+
"group",
|
|
1109
|
+
"heading",
|
|
1110
|
+
"img",
|
|
1111
|
+
"link",
|
|
1112
|
+
"list",
|
|
1113
|
+
"listbox",
|
|
1114
|
+
"listitem",
|
|
1115
|
+
"log",
|
|
1116
|
+
"main",
|
|
1117
|
+
"marquee",
|
|
1118
|
+
"math",
|
|
1119
|
+
"menu",
|
|
1120
|
+
"menubar",
|
|
1121
|
+
"menuitem",
|
|
1122
|
+
"menuitemcheckbox",
|
|
1123
|
+
"menuitemradio",
|
|
1124
|
+
"navigation",
|
|
1125
|
+
"none",
|
|
1126
|
+
"note",
|
|
1127
|
+
"option",
|
|
1128
|
+
"presentation",
|
|
1129
|
+
"progressbar",
|
|
1130
|
+
"radio",
|
|
1131
|
+
"radiogroup",
|
|
1132
|
+
"region",
|
|
1133
|
+
"row",
|
|
1134
|
+
"rowgroup",
|
|
1135
|
+
"rowheader",
|
|
1136
|
+
"scrollbar",
|
|
1137
|
+
"search",
|
|
1138
|
+
"searchbox",
|
|
1139
|
+
"separator",
|
|
1140
|
+
"slider",
|
|
1141
|
+
"spinbutton",
|
|
1142
|
+
"status",
|
|
1143
|
+
"switch",
|
|
1144
|
+
"tab",
|
|
1145
|
+
"table",
|
|
1146
|
+
"tablist",
|
|
1147
|
+
"tabpanel",
|
|
1148
|
+
"term",
|
|
1149
|
+
"textbox",
|
|
1150
|
+
"timer",
|
|
1151
|
+
"toolbar",
|
|
1152
|
+
"tooltip",
|
|
1153
|
+
"tree",
|
|
1154
|
+
"treegrid",
|
|
1155
|
+
"treeitem",
|
|
1156
|
+
]
|
|
1157
|
+
]
|
|
1158
|
+
| None = None,
|
|
1159
|
+
slot: Var[str] | str | None = None,
|
|
1160
|
+
spell_check: Var[bool] | bool | None = None,
|
|
1161
|
+
tab_index: Var[int] | int | None = None,
|
|
1162
|
+
title: Var[str] | str | None = None,
|
|
1163
|
+
style: Sequence[Mapping[str, Any]]
|
|
1164
|
+
| Mapping[str, Any]
|
|
1165
|
+
| Var[Mapping[str, Any]]
|
|
1166
|
+
| Breakpoints
|
|
1167
|
+
| None = None,
|
|
1168
|
+
key: Any | None = None,
|
|
1169
|
+
id: Any | None = None,
|
|
1170
|
+
class_name: Any | None = None,
|
|
1171
|
+
autofocus: bool | None = None,
|
|
1172
|
+
custom_attrs: dict[str, Var | Any] | None = None,
|
|
1173
|
+
on_blur: Optional[EventType[()]] = None,
|
|
1174
|
+
on_click: Optional[EventType[()]] = None,
|
|
1175
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
1176
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
1177
|
+
on_focus: Optional[EventType[()]] = None,
|
|
1178
|
+
on_key_down: Optional[
|
|
1179
|
+
EventType[()] | EventType[str] | EventType[str, KeyInputInfo]
|
|
1180
|
+
] = None,
|
|
1181
|
+
on_key_up: Optional[
|
|
1182
|
+
EventType[()] | EventType[str] | EventType[str, KeyInputInfo]
|
|
1183
|
+
] = None,
|
|
1184
|
+
on_mount: Optional[EventType[()]] = None,
|
|
1185
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
1186
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
1187
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
1188
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
1189
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
1190
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
1191
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
1192
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
1193
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
1194
|
+
**props,
|
|
1195
|
+
) -> "BaseInput":
|
|
1196
|
+
"""Create the component.
|
|
1197
|
+
|
|
1198
|
+
Args:
|
|
1199
|
+
*children: The children of the component.
|
|
1200
|
+
accept: Accepted types of files when the input is file type
|
|
1201
|
+
alt: Alternate text for input type="image"
|
|
1202
|
+
auto_complete: Whether the input should have autocomplete enabled
|
|
1203
|
+
auto_focus: Automatically focuses the input when the page loads
|
|
1204
|
+
capture: Captures media from the user (camera or microphone)
|
|
1205
|
+
checked: Indicates whether the input is checked (for checkboxes and radio buttons)
|
|
1206
|
+
default_checked: The initial value (for checkboxes and radio buttons)
|
|
1207
|
+
default_value: The initial value for a text field
|
|
1208
|
+
disabled: Disables the input
|
|
1209
|
+
form: Associates the input with a form (by id)
|
|
1210
|
+
form_action: URL to send the form data to (for type="submit" buttons)
|
|
1211
|
+
form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
|
|
1212
|
+
form_method: HTTP method to use for sending form data (for type="submit" buttons)
|
|
1213
|
+
form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
|
|
1214
|
+
form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
|
|
1215
|
+
list: References a datalist for suggested options
|
|
1216
|
+
max: Specifies the maximum value for the input
|
|
1217
|
+
max_length: Specifies the maximum number of characters allowed in the input
|
|
1218
|
+
min_length: Specifies the minimum number of characters required in the input
|
|
1219
|
+
min: Specifies the minimum value for the input
|
|
1220
|
+
multiple: Indicates whether multiple values can be entered in an input of the type email or file
|
|
1221
|
+
name: Name of the input, used when sending form data
|
|
1222
|
+
pattern: Regex pattern the input's value must match to be valid
|
|
1223
|
+
placeholder: Placeholder text in the input
|
|
1224
|
+
read_only: Indicates whether the input is read-only
|
|
1225
|
+
required: Indicates that the input is required
|
|
1226
|
+
size: Specifies the visible width of a text control
|
|
1227
|
+
src: URL for image inputs
|
|
1228
|
+
step: Specifies the legal number intervals for an input
|
|
1229
|
+
type: Specifies the type of input
|
|
1230
|
+
value: Value of the input
|
|
1231
|
+
on_key_down: Fired when a key is pressed down
|
|
1232
|
+
on_key_up: Fired when a key is released
|
|
1233
|
+
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
1234
|
+
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
1235
|
+
content_editable: Indicates whether the element's content is editable.
|
|
1236
|
+
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
|
1237
|
+
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
|
1238
|
+
draggable: Defines whether the element can be dragged.
|
|
1239
|
+
enter_key_hint: Hints what media types the media element is able to play.
|
|
1240
|
+
hidden: Defines whether the element is hidden.
|
|
1241
|
+
input_mode: Defines the type of the element.
|
|
1242
|
+
item_prop: Defines the name of the element for metadata purposes.
|
|
1243
|
+
lang: Defines the language used in the element.
|
|
1244
|
+
role: Defines the role of the element.
|
|
1245
|
+
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
|
1246
|
+
spell_check: Defines whether the element may be checked for spelling errors.
|
|
1247
|
+
tab_index: Defines the position of the current element in the tabbing order.
|
|
1248
|
+
title: Defines a tooltip for the element.
|
|
1249
|
+
style: The style of the component.
|
|
1250
|
+
key: A unique key for the component.
|
|
1251
|
+
id: The id for the component.
|
|
1252
|
+
class_name: The class name for the component.
|
|
1253
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
1254
|
+
custom_attrs: custom attribute
|
|
1255
|
+
**props: The props of the component.
|
|
1256
|
+
|
|
1257
|
+
Returns:
|
|
1258
|
+
The component.
|
|
1259
|
+
"""
|
|
1260
|
+
...
|
|
1261
|
+
|
|
1262
|
+
class CheckboxInput(BaseInput):
|
|
1263
|
+
@overload
|
|
1264
|
+
@classmethod
|
|
1265
|
+
def create( # type: ignore
|
|
1266
|
+
cls,
|
|
1267
|
+
*children,
|
|
1268
|
+
accept: Var[str] | str | None = None,
|
|
1269
|
+
alt: Var[str] | str | None = None,
|
|
1270
|
+
auto_complete: Var[str] | str | None = None,
|
|
1271
|
+
auto_focus: Var[bool] | bool | None = None,
|
|
1272
|
+
capture: Literal["environment", "user", False, True]
|
|
1273
|
+
| Var[Literal["environment", "user", False, True]]
|
|
1274
|
+
| None = None,
|
|
1275
|
+
checked: Var[bool] | bool | None = None,
|
|
1276
|
+
default_checked: Var[bool] | bool | None = None,
|
|
1277
|
+
default_value: Var[float | int | str] | float | int | str | None = None,
|
|
1278
|
+
disabled: Var[bool] | bool | None = None,
|
|
1279
|
+
form: Var[str] | str | None = None,
|
|
1280
|
+
form_action: Var[str] | str | None = None,
|
|
1281
|
+
form_enc_type: Var[str] | str | None = None,
|
|
1282
|
+
form_method: Var[str] | str | None = None,
|
|
1283
|
+
form_no_validate: Var[bool] | bool | None = None,
|
|
1284
|
+
form_target: Var[str] | str | None = None,
|
|
1285
|
+
list: Var[str] | str | None = None,
|
|
1286
|
+
max: Var[float | int | str] | float | int | str | None = None,
|
|
1287
|
+
max_length: Var[float | int] | float | int | None = None,
|
|
1288
|
+
min_length: Var[float | int] | float | int | None = None,
|
|
1289
|
+
min: Var[float | int | str] | float | int | str | None = None,
|
|
1290
|
+
multiple: Var[bool] | bool | None = None,
|
|
1291
|
+
name: Var[str] | str | None = None,
|
|
1292
|
+
pattern: Var[str] | str | None = None,
|
|
1293
|
+
placeholder: Var[str] | str | None = None,
|
|
1294
|
+
read_only: Var[bool] | bool | None = None,
|
|
1295
|
+
required: Var[bool] | bool | None = None,
|
|
1296
|
+
size: Var[float | int] | float | int | None = None,
|
|
1297
|
+
src: Var[str] | str | None = None,
|
|
1298
|
+
step: Var[float | int | str] | float | int | str | None = None,
|
|
1299
|
+
type: Literal[
|
|
1300
|
+
"button",
|
|
1301
|
+
"checkbox",
|
|
1302
|
+
"color",
|
|
1303
|
+
"date",
|
|
1304
|
+
"datetime-local",
|
|
1305
|
+
"email",
|
|
1306
|
+
"file",
|
|
1307
|
+
"hidden",
|
|
1308
|
+
"image",
|
|
1309
|
+
"month",
|
|
1310
|
+
"number",
|
|
1311
|
+
"password",
|
|
1312
|
+
"radio",
|
|
1313
|
+
"range",
|
|
1314
|
+
"reset",
|
|
1315
|
+
"search",
|
|
1316
|
+
"submit",
|
|
1317
|
+
"tel",
|
|
1318
|
+
"text",
|
|
1319
|
+
"time",
|
|
1320
|
+
"url",
|
|
1321
|
+
"week",
|
|
1322
|
+
]
|
|
1323
|
+
| Var[
|
|
1324
|
+
Literal[
|
|
1325
|
+
"button",
|
|
1326
|
+
"checkbox",
|
|
1327
|
+
"color",
|
|
1328
|
+
"date",
|
|
1329
|
+
"datetime-local",
|
|
1330
|
+
"email",
|
|
1331
|
+
"file",
|
|
1332
|
+
"hidden",
|
|
1333
|
+
"image",
|
|
1334
|
+
"month",
|
|
1335
|
+
"number",
|
|
1336
|
+
"password",
|
|
1337
|
+
"radio",
|
|
1338
|
+
"range",
|
|
1339
|
+
"reset",
|
|
1340
|
+
"search",
|
|
1341
|
+
"submit",
|
|
1342
|
+
"tel",
|
|
1343
|
+
"text",
|
|
1344
|
+
"time",
|
|
1345
|
+
"url",
|
|
1346
|
+
"week",
|
|
1347
|
+
]
|
|
1348
|
+
]
|
|
1349
|
+
| None = None,
|
|
1350
|
+
value: Var[float | int | str] | float | int | str | None = None,
|
|
1351
|
+
access_key: Var[str] | str | None = None,
|
|
1352
|
+
auto_capitalize: Literal[
|
|
1353
|
+
"characters", "none", "off", "on", "sentences", "words"
|
|
1354
|
+
]
|
|
1355
|
+
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
|
|
1356
|
+
| None = None,
|
|
1357
|
+
content_editable: Literal["inherit", "plaintext-only", False, True]
|
|
1358
|
+
| Var[Literal["inherit", "plaintext-only", False, True]]
|
|
1359
|
+
| None = None,
|
|
1360
|
+
context_menu: Var[str] | str | None = None,
|
|
1361
|
+
dir: Var[str] | str | None = None,
|
|
1362
|
+
draggable: Var[bool] | bool | None = None,
|
|
1363
|
+
enter_key_hint: Literal[
|
|
1364
|
+
"done", "enter", "go", "next", "previous", "search", "send"
|
|
1365
|
+
]
|
|
1366
|
+
| Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
|
|
1367
|
+
| None = None,
|
|
1368
|
+
hidden: Var[bool] | bool | None = None,
|
|
1369
|
+
input_mode: Literal[
|
|
1370
|
+
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
1371
|
+
]
|
|
1372
|
+
| Var[
|
|
1373
|
+
Literal[
|
|
1374
|
+
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
1375
|
+
]
|
|
1376
|
+
]
|
|
1377
|
+
| None = None,
|
|
1378
|
+
item_prop: Var[str] | str | None = None,
|
|
1379
|
+
lang: Var[str] | str | None = None,
|
|
1380
|
+
role: Literal[
|
|
1381
|
+
"alert",
|
|
1382
|
+
"alertdialog",
|
|
1383
|
+
"application",
|
|
1384
|
+
"article",
|
|
1385
|
+
"banner",
|
|
1386
|
+
"button",
|
|
1387
|
+
"cell",
|
|
1388
|
+
"checkbox",
|
|
1389
|
+
"columnheader",
|
|
1390
|
+
"combobox",
|
|
1391
|
+
"complementary",
|
|
1392
|
+
"contentinfo",
|
|
1393
|
+
"definition",
|
|
1394
|
+
"dialog",
|
|
1395
|
+
"directory",
|
|
1396
|
+
"document",
|
|
1397
|
+
"feed",
|
|
1398
|
+
"figure",
|
|
1399
|
+
"form",
|
|
1400
|
+
"grid",
|
|
1401
|
+
"gridcell",
|
|
1402
|
+
"group",
|
|
1403
|
+
"heading",
|
|
1404
|
+
"img",
|
|
1405
|
+
"link",
|
|
1406
|
+
"list",
|
|
1407
|
+
"listbox",
|
|
1408
|
+
"listitem",
|
|
1409
|
+
"log",
|
|
1410
|
+
"main",
|
|
1411
|
+
"marquee",
|
|
1412
|
+
"math",
|
|
1413
|
+
"menu",
|
|
1414
|
+
"menubar",
|
|
1415
|
+
"menuitem",
|
|
1416
|
+
"menuitemcheckbox",
|
|
1417
|
+
"menuitemradio",
|
|
1418
|
+
"navigation",
|
|
1419
|
+
"none",
|
|
1420
|
+
"note",
|
|
1421
|
+
"option",
|
|
1422
|
+
"presentation",
|
|
1423
|
+
"progressbar",
|
|
1424
|
+
"radio",
|
|
1425
|
+
"radiogroup",
|
|
1426
|
+
"region",
|
|
1427
|
+
"row",
|
|
1428
|
+
"rowgroup",
|
|
1429
|
+
"rowheader",
|
|
1430
|
+
"scrollbar",
|
|
1431
|
+
"search",
|
|
1432
|
+
"searchbox",
|
|
1433
|
+
"separator",
|
|
1434
|
+
"slider",
|
|
1435
|
+
"spinbutton",
|
|
1436
|
+
"status",
|
|
1437
|
+
"switch",
|
|
1438
|
+
"tab",
|
|
1439
|
+
"table",
|
|
1440
|
+
"tablist",
|
|
1441
|
+
"tabpanel",
|
|
1442
|
+
"term",
|
|
1443
|
+
"textbox",
|
|
1444
|
+
"timer",
|
|
1445
|
+
"toolbar",
|
|
1446
|
+
"tooltip",
|
|
1447
|
+
"tree",
|
|
1448
|
+
"treegrid",
|
|
1449
|
+
"treeitem",
|
|
1450
|
+
]
|
|
1451
|
+
| Var[
|
|
1452
|
+
Literal[
|
|
1453
|
+
"alert",
|
|
1454
|
+
"alertdialog",
|
|
1455
|
+
"application",
|
|
1456
|
+
"article",
|
|
1457
|
+
"banner",
|
|
1458
|
+
"button",
|
|
1459
|
+
"cell",
|
|
1460
|
+
"checkbox",
|
|
1461
|
+
"columnheader",
|
|
1462
|
+
"combobox",
|
|
1463
|
+
"complementary",
|
|
1464
|
+
"contentinfo",
|
|
1465
|
+
"definition",
|
|
1466
|
+
"dialog",
|
|
1467
|
+
"directory",
|
|
1468
|
+
"document",
|
|
1469
|
+
"feed",
|
|
1470
|
+
"figure",
|
|
1471
|
+
"form",
|
|
1472
|
+
"grid",
|
|
1473
|
+
"gridcell",
|
|
1474
|
+
"group",
|
|
1475
|
+
"heading",
|
|
1476
|
+
"img",
|
|
1477
|
+
"link",
|
|
1478
|
+
"list",
|
|
1479
|
+
"listbox",
|
|
1480
|
+
"listitem",
|
|
1481
|
+
"log",
|
|
1482
|
+
"main",
|
|
1483
|
+
"marquee",
|
|
1484
|
+
"math",
|
|
1485
|
+
"menu",
|
|
1486
|
+
"menubar",
|
|
1487
|
+
"menuitem",
|
|
1488
|
+
"menuitemcheckbox",
|
|
1489
|
+
"menuitemradio",
|
|
1490
|
+
"navigation",
|
|
1491
|
+
"none",
|
|
1492
|
+
"note",
|
|
1493
|
+
"option",
|
|
1494
|
+
"presentation",
|
|
1495
|
+
"progressbar",
|
|
1496
|
+
"radio",
|
|
1497
|
+
"radiogroup",
|
|
1498
|
+
"region",
|
|
1499
|
+
"row",
|
|
1500
|
+
"rowgroup",
|
|
1501
|
+
"rowheader",
|
|
1502
|
+
"scrollbar",
|
|
1503
|
+
"search",
|
|
1504
|
+
"searchbox",
|
|
1505
|
+
"separator",
|
|
1506
|
+
"slider",
|
|
1507
|
+
"spinbutton",
|
|
1508
|
+
"status",
|
|
1509
|
+
"switch",
|
|
1510
|
+
"tab",
|
|
1511
|
+
"table",
|
|
1512
|
+
"tablist",
|
|
1513
|
+
"tabpanel",
|
|
1514
|
+
"term",
|
|
1515
|
+
"textbox",
|
|
1516
|
+
"timer",
|
|
1517
|
+
"toolbar",
|
|
1518
|
+
"tooltip",
|
|
1519
|
+
"tree",
|
|
1520
|
+
"treegrid",
|
|
1521
|
+
"treeitem",
|
|
1522
|
+
]
|
|
1523
|
+
]
|
|
1524
|
+
| None = None,
|
|
1525
|
+
slot: Var[str] | str | None = None,
|
|
1526
|
+
spell_check: Var[bool] | bool | None = None,
|
|
1527
|
+
tab_index: Var[int] | int | None = None,
|
|
1528
|
+
title: Var[str] | str | None = None,
|
|
1529
|
+
style: Sequence[Mapping[str, Any]]
|
|
1530
|
+
| Mapping[str, Any]
|
|
1531
|
+
| Var[Mapping[str, Any]]
|
|
1532
|
+
| Breakpoints
|
|
1533
|
+
| None = None,
|
|
1534
|
+
key: Any | None = None,
|
|
1535
|
+
id: Any | None = None,
|
|
1536
|
+
class_name: Any | None = None,
|
|
1537
|
+
autofocus: bool | None = None,
|
|
1538
|
+
custom_attrs: dict[str, Var | Any] | None = None,
|
|
1539
|
+
on_blur: Optional[EventType[()] | EventType[bool]] = None,
|
|
1540
|
+
on_change: Optional[EventType[()] | EventType[bool]] = None,
|
|
1541
|
+
on_click: Optional[EventType[()]] = None,
|
|
1542
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
1543
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
1544
|
+
on_focus: Optional[EventType[()] | EventType[bool]] = None,
|
|
1545
|
+
on_key_down: Optional[
|
|
1546
|
+
EventType[()] | EventType[str] | EventType[str, KeyInputInfo]
|
|
1547
|
+
] = None,
|
|
1548
|
+
on_key_up: Optional[
|
|
1549
|
+
EventType[()] | EventType[str] | EventType[str, KeyInputInfo]
|
|
1550
|
+
] = None,
|
|
1551
|
+
on_mount: Optional[EventType[()]] = None,
|
|
1552
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
1553
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
1554
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
1555
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
1556
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
1557
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
1558
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
1559
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
1560
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
1561
|
+
**props,
|
|
1562
|
+
) -> "CheckboxInput":
|
|
1563
|
+
"""Create the component.
|
|
1564
|
+
|
|
1565
|
+
Args:
|
|
1566
|
+
*children: The children of the component.
|
|
1567
|
+
on_change: Fired when the input value changes
|
|
1568
|
+
on_focus: Fired when the input gains focus
|
|
1569
|
+
on_blur: Fired when the input loses focus
|
|
1570
|
+
accept: Accepted types of files when the input is file type
|
|
1571
|
+
alt: Alternate text for input type="image"
|
|
1572
|
+
auto_complete: Whether the input should have autocomplete enabled
|
|
1573
|
+
auto_focus: Automatically focuses the input when the page loads
|
|
1574
|
+
capture: Captures media from the user (camera or microphone)
|
|
1575
|
+
checked: Indicates whether the input is checked (for checkboxes and radio buttons)
|
|
1576
|
+
default_checked: The initial value (for checkboxes and radio buttons)
|
|
1577
|
+
default_value: The initial value for a text field
|
|
1578
|
+
disabled: Disables the input
|
|
1579
|
+
form: Associates the input with a form (by id)
|
|
1580
|
+
form_action: URL to send the form data to (for type="submit" buttons)
|
|
1581
|
+
form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
|
|
1582
|
+
form_method: HTTP method to use for sending form data (for type="submit" buttons)
|
|
1583
|
+
form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
|
|
1584
|
+
form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
|
|
1585
|
+
list: References a datalist for suggested options
|
|
1586
|
+
max: Specifies the maximum value for the input
|
|
1587
|
+
max_length: Specifies the maximum number of characters allowed in the input
|
|
1588
|
+
min_length: Specifies the minimum number of characters required in the input
|
|
1589
|
+
min: Specifies the minimum value for the input
|
|
1590
|
+
multiple: Indicates whether multiple values can be entered in an input of the type email or file
|
|
1591
|
+
name: Name of the input, used when sending form data
|
|
1592
|
+
pattern: Regex pattern the input's value must match to be valid
|
|
1593
|
+
placeholder: Placeholder text in the input
|
|
1594
|
+
read_only: Indicates whether the input is read-only
|
|
1595
|
+
required: Indicates that the input is required
|
|
1596
|
+
size: Specifies the visible width of a text control
|
|
1597
|
+
src: URL for image inputs
|
|
1598
|
+
step: Specifies the legal number intervals for an input
|
|
1599
|
+
type: Specifies the type of input
|
|
1600
|
+
value: Value of the input
|
|
1601
|
+
on_key_down: Fired when a key is pressed down
|
|
1602
|
+
on_key_up: Fired when a key is released
|
|
1603
|
+
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
1604
|
+
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
1605
|
+
content_editable: Indicates whether the element's content is editable.
|
|
1606
|
+
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
|
1607
|
+
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
|
1608
|
+
draggable: Defines whether the element can be dragged.
|
|
1609
|
+
enter_key_hint: Hints what media types the media element is able to play.
|
|
1610
|
+
hidden: Defines whether the element is hidden.
|
|
1611
|
+
input_mode: Defines the type of the element.
|
|
1612
|
+
item_prop: Defines the name of the element for metadata purposes.
|
|
1613
|
+
lang: Defines the language used in the element.
|
|
1614
|
+
role: Defines the role of the element.
|
|
1615
|
+
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
|
1616
|
+
spell_check: Defines whether the element may be checked for spelling errors.
|
|
1617
|
+
tab_index: Defines the position of the current element in the tabbing order.
|
|
1618
|
+
title: Defines a tooltip for the element.
|
|
1619
|
+
style: The style of the component.
|
|
1620
|
+
key: A unique key for the component.
|
|
1621
|
+
id: The id for the component.
|
|
1622
|
+
class_name: The class name for the component.
|
|
1623
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
1624
|
+
custom_attrs: custom attribute
|
|
1625
|
+
**props: The props of the component.
|
|
1626
|
+
|
|
1627
|
+
Returns:
|
|
1628
|
+
The component.
|
|
1629
|
+
"""
|
|
1630
|
+
...
|
|
1631
|
+
|
|
1632
|
+
class ValueNumberInput(BaseInput):
|
|
1633
|
+
@overload
|
|
1634
|
+
@classmethod
|
|
1635
|
+
def create( # type: ignore
|
|
1636
|
+
cls,
|
|
1637
|
+
*children,
|
|
1638
|
+
accept: Var[str] | str | None = None,
|
|
1639
|
+
alt: Var[str] | str | None = None,
|
|
1640
|
+
auto_complete: Var[str] | str | None = None,
|
|
1641
|
+
auto_focus: Var[bool] | bool | None = None,
|
|
1642
|
+
capture: Literal["environment", "user", False, True]
|
|
1643
|
+
| Var[Literal["environment", "user", False, True]]
|
|
1644
|
+
| None = None,
|
|
1645
|
+
checked: Var[bool] | bool | None = None,
|
|
1646
|
+
default_checked: Var[bool] | bool | None = None,
|
|
1647
|
+
default_value: Var[float | int | str] | float | int | str | None = None,
|
|
1648
|
+
disabled: Var[bool] | bool | None = None,
|
|
1649
|
+
form: Var[str] | str | None = None,
|
|
1650
|
+
form_action: Var[str] | str | None = None,
|
|
1651
|
+
form_enc_type: Var[str] | str | None = None,
|
|
1652
|
+
form_method: Var[str] | str | None = None,
|
|
1653
|
+
form_no_validate: Var[bool] | bool | None = None,
|
|
1654
|
+
form_target: Var[str] | str | None = None,
|
|
1655
|
+
list: Var[str] | str | None = None,
|
|
1656
|
+
max: Var[float | int | str] | float | int | str | None = None,
|
|
1657
|
+
max_length: Var[float | int] | float | int | None = None,
|
|
1658
|
+
min_length: Var[float | int] | float | int | None = None,
|
|
1659
|
+
min: Var[float | int | str] | float | int | str | None = None,
|
|
1660
|
+
multiple: Var[bool] | bool | None = None,
|
|
1661
|
+
name: Var[str] | str | None = None,
|
|
1662
|
+
pattern: Var[str] | str | None = None,
|
|
1663
|
+
placeholder: Var[str] | str | None = None,
|
|
1664
|
+
read_only: Var[bool] | bool | None = None,
|
|
1665
|
+
required: Var[bool] | bool | None = None,
|
|
1666
|
+
size: Var[float | int] | float | int | None = None,
|
|
1667
|
+
src: Var[str] | str | None = None,
|
|
1668
|
+
step: Var[float | int | str] | float | int | str | None = None,
|
|
1669
|
+
type: Literal[
|
|
1670
|
+
"button",
|
|
1671
|
+
"checkbox",
|
|
1672
|
+
"color",
|
|
1673
|
+
"date",
|
|
1674
|
+
"datetime-local",
|
|
1675
|
+
"email",
|
|
1676
|
+
"file",
|
|
1677
|
+
"hidden",
|
|
1678
|
+
"image",
|
|
1679
|
+
"month",
|
|
1680
|
+
"number",
|
|
1681
|
+
"password",
|
|
1682
|
+
"radio",
|
|
1683
|
+
"range",
|
|
1684
|
+
"reset",
|
|
1685
|
+
"search",
|
|
1686
|
+
"submit",
|
|
1687
|
+
"tel",
|
|
1688
|
+
"text",
|
|
1689
|
+
"time",
|
|
1690
|
+
"url",
|
|
1691
|
+
"week",
|
|
1692
|
+
]
|
|
1693
|
+
| Var[
|
|
1694
|
+
Literal[
|
|
1695
|
+
"button",
|
|
1696
|
+
"checkbox",
|
|
1697
|
+
"color",
|
|
1698
|
+
"date",
|
|
1699
|
+
"datetime-local",
|
|
1700
|
+
"email",
|
|
1701
|
+
"file",
|
|
1702
|
+
"hidden",
|
|
1703
|
+
"image",
|
|
1704
|
+
"month",
|
|
1705
|
+
"number",
|
|
1706
|
+
"password",
|
|
1707
|
+
"radio",
|
|
1708
|
+
"range",
|
|
1709
|
+
"reset",
|
|
1710
|
+
"search",
|
|
1711
|
+
"submit",
|
|
1712
|
+
"tel",
|
|
1713
|
+
"text",
|
|
1714
|
+
"time",
|
|
1715
|
+
"url",
|
|
1716
|
+
"week",
|
|
1717
|
+
]
|
|
1718
|
+
]
|
|
1719
|
+
| None = None,
|
|
1720
|
+
value: Var[float | int | str] | float | int | str | None = None,
|
|
1721
|
+
access_key: Var[str] | str | None = None,
|
|
1722
|
+
auto_capitalize: Literal[
|
|
1723
|
+
"characters", "none", "off", "on", "sentences", "words"
|
|
1724
|
+
]
|
|
1725
|
+
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
|
|
1726
|
+
| None = None,
|
|
1727
|
+
content_editable: Literal["inherit", "plaintext-only", False, True]
|
|
1728
|
+
| Var[Literal["inherit", "plaintext-only", False, True]]
|
|
1729
|
+
| None = None,
|
|
1730
|
+
context_menu: Var[str] | str | None = None,
|
|
1731
|
+
dir: Var[str] | str | None = None,
|
|
1732
|
+
draggable: Var[bool] | bool | None = None,
|
|
1733
|
+
enter_key_hint: Literal[
|
|
1734
|
+
"done", "enter", "go", "next", "previous", "search", "send"
|
|
1735
|
+
]
|
|
1736
|
+
| Var[Literal["done", "enter", "go", "next", "previous", "search", "send"]]
|
|
1737
|
+
| None = None,
|
|
1738
|
+
hidden: Var[bool] | bool | None = None,
|
|
1739
|
+
input_mode: Literal[
|
|
1740
|
+
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
1741
|
+
]
|
|
1742
|
+
| Var[
|
|
1743
|
+
Literal[
|
|
1744
|
+
"decimal", "email", "none", "numeric", "search", "tel", "text", "url"
|
|
1745
|
+
]
|
|
1746
|
+
]
|
|
1747
|
+
| None = None,
|
|
1748
|
+
item_prop: Var[str] | str | None = None,
|
|
1749
|
+
lang: Var[str] | str | None = None,
|
|
1750
|
+
role: Literal[
|
|
1751
|
+
"alert",
|
|
1752
|
+
"alertdialog",
|
|
1753
|
+
"application",
|
|
1754
|
+
"article",
|
|
1755
|
+
"banner",
|
|
1756
|
+
"button",
|
|
1757
|
+
"cell",
|
|
1758
|
+
"checkbox",
|
|
1759
|
+
"columnheader",
|
|
1760
|
+
"combobox",
|
|
1761
|
+
"complementary",
|
|
1762
|
+
"contentinfo",
|
|
1763
|
+
"definition",
|
|
1764
|
+
"dialog",
|
|
1765
|
+
"directory",
|
|
1766
|
+
"document",
|
|
1767
|
+
"feed",
|
|
1768
|
+
"figure",
|
|
1769
|
+
"form",
|
|
1770
|
+
"grid",
|
|
1771
|
+
"gridcell",
|
|
1772
|
+
"group",
|
|
1773
|
+
"heading",
|
|
1774
|
+
"img",
|
|
1775
|
+
"link",
|
|
1776
|
+
"list",
|
|
1777
|
+
"listbox",
|
|
1778
|
+
"listitem",
|
|
1779
|
+
"log",
|
|
1780
|
+
"main",
|
|
1781
|
+
"marquee",
|
|
1782
|
+
"math",
|
|
1783
|
+
"menu",
|
|
1784
|
+
"menubar",
|
|
1785
|
+
"menuitem",
|
|
1786
|
+
"menuitemcheckbox",
|
|
1787
|
+
"menuitemradio",
|
|
1788
|
+
"navigation",
|
|
1789
|
+
"none",
|
|
1790
|
+
"note",
|
|
1791
|
+
"option",
|
|
1792
|
+
"presentation",
|
|
1793
|
+
"progressbar",
|
|
1794
|
+
"radio",
|
|
1795
|
+
"radiogroup",
|
|
1796
|
+
"region",
|
|
1797
|
+
"row",
|
|
1798
|
+
"rowgroup",
|
|
1799
|
+
"rowheader",
|
|
1800
|
+
"scrollbar",
|
|
1801
|
+
"search",
|
|
1802
|
+
"searchbox",
|
|
1803
|
+
"separator",
|
|
1804
|
+
"slider",
|
|
1805
|
+
"spinbutton",
|
|
1806
|
+
"status",
|
|
1807
|
+
"switch",
|
|
1808
|
+
"tab",
|
|
1809
|
+
"table",
|
|
1810
|
+
"tablist",
|
|
1811
|
+
"tabpanel",
|
|
1812
|
+
"term",
|
|
1813
|
+
"textbox",
|
|
1814
|
+
"timer",
|
|
1815
|
+
"toolbar",
|
|
1816
|
+
"tooltip",
|
|
1817
|
+
"tree",
|
|
1818
|
+
"treegrid",
|
|
1819
|
+
"treeitem",
|
|
1820
|
+
]
|
|
1821
|
+
| Var[
|
|
1822
|
+
Literal[
|
|
1823
|
+
"alert",
|
|
1824
|
+
"alertdialog",
|
|
1825
|
+
"application",
|
|
1826
|
+
"article",
|
|
1827
|
+
"banner",
|
|
1828
|
+
"button",
|
|
1829
|
+
"cell",
|
|
1830
|
+
"checkbox",
|
|
1831
|
+
"columnheader",
|
|
1832
|
+
"combobox",
|
|
1833
|
+
"complementary",
|
|
1834
|
+
"contentinfo",
|
|
1835
|
+
"definition",
|
|
1836
|
+
"dialog",
|
|
1837
|
+
"directory",
|
|
1838
|
+
"document",
|
|
1839
|
+
"feed",
|
|
1840
|
+
"figure",
|
|
1841
|
+
"form",
|
|
1842
|
+
"grid",
|
|
1843
|
+
"gridcell",
|
|
1844
|
+
"group",
|
|
1845
|
+
"heading",
|
|
1846
|
+
"img",
|
|
1847
|
+
"link",
|
|
1848
|
+
"list",
|
|
1849
|
+
"listbox",
|
|
1850
|
+
"listitem",
|
|
1851
|
+
"log",
|
|
1852
|
+
"main",
|
|
1853
|
+
"marquee",
|
|
1854
|
+
"math",
|
|
1855
|
+
"menu",
|
|
1856
|
+
"menubar",
|
|
1857
|
+
"menuitem",
|
|
1858
|
+
"menuitemcheckbox",
|
|
1859
|
+
"menuitemradio",
|
|
1860
|
+
"navigation",
|
|
1861
|
+
"none",
|
|
1862
|
+
"note",
|
|
1863
|
+
"option",
|
|
1864
|
+
"presentation",
|
|
1865
|
+
"progressbar",
|
|
1866
|
+
"radio",
|
|
1867
|
+
"radiogroup",
|
|
1868
|
+
"region",
|
|
1869
|
+
"row",
|
|
1870
|
+
"rowgroup",
|
|
1871
|
+
"rowheader",
|
|
1872
|
+
"scrollbar",
|
|
1873
|
+
"search",
|
|
1874
|
+
"searchbox",
|
|
1875
|
+
"separator",
|
|
1876
|
+
"slider",
|
|
1877
|
+
"spinbutton",
|
|
1878
|
+
"status",
|
|
1879
|
+
"switch",
|
|
1880
|
+
"tab",
|
|
1881
|
+
"table",
|
|
1882
|
+
"tablist",
|
|
1883
|
+
"tabpanel",
|
|
1884
|
+
"term",
|
|
1885
|
+
"textbox",
|
|
1886
|
+
"timer",
|
|
1887
|
+
"toolbar",
|
|
1888
|
+
"tooltip",
|
|
1889
|
+
"tree",
|
|
1890
|
+
"treegrid",
|
|
1891
|
+
"treeitem",
|
|
1892
|
+
]
|
|
1893
|
+
]
|
|
1894
|
+
| None = None,
|
|
1895
|
+
slot: Var[str] | str | None = None,
|
|
1896
|
+
spell_check: Var[bool] | bool | None = None,
|
|
1897
|
+
tab_index: Var[int] | int | None = None,
|
|
1898
|
+
title: Var[str] | str | None = None,
|
|
1899
|
+
style: Sequence[Mapping[str, Any]]
|
|
1900
|
+
| Mapping[str, Any]
|
|
1901
|
+
| Var[Mapping[str, Any]]
|
|
1902
|
+
| Breakpoints
|
|
1903
|
+
| None = None,
|
|
1904
|
+
key: Any | None = None,
|
|
1905
|
+
id: Any | None = None,
|
|
1906
|
+
class_name: Any | None = None,
|
|
1907
|
+
autofocus: bool | None = None,
|
|
1908
|
+
custom_attrs: dict[str, Var | Any] | None = None,
|
|
1909
|
+
on_blur: Optional[
|
|
1910
|
+
Union[
|
|
1911
|
+
EventType[()] | EventType[float],
|
|
1912
|
+
EventType[()] | EventType[int],
|
|
1913
|
+
EventType[()] | EventType[str],
|
|
1914
|
+
]
|
|
1915
|
+
] = None,
|
|
1916
|
+
on_change: Optional[
|
|
1917
|
+
Union[
|
|
1918
|
+
EventType[()] | EventType[float],
|
|
1919
|
+
EventType[()] | EventType[int],
|
|
1920
|
+
EventType[()] | EventType[str],
|
|
1921
|
+
]
|
|
1922
|
+
] = None,
|
|
1923
|
+
on_click: Optional[EventType[()]] = None,
|
|
1924
|
+
on_context_menu: Optional[EventType[()]] = None,
|
|
1925
|
+
on_double_click: Optional[EventType[()]] = None,
|
|
1926
|
+
on_focus: Optional[
|
|
1927
|
+
Union[
|
|
1928
|
+
EventType[()] | EventType[float],
|
|
1929
|
+
EventType[()] | EventType[int],
|
|
1930
|
+
EventType[()] | EventType[str],
|
|
1931
|
+
]
|
|
1932
|
+
] = None,
|
|
1933
|
+
on_key_down: Optional[
|
|
1934
|
+
EventType[()] | EventType[str] | EventType[str, KeyInputInfo]
|
|
1935
|
+
] = None,
|
|
1936
|
+
on_key_up: Optional[
|
|
1937
|
+
EventType[()] | EventType[str] | EventType[str, KeyInputInfo]
|
|
1938
|
+
] = None,
|
|
1939
|
+
on_mount: Optional[EventType[()]] = None,
|
|
1940
|
+
on_mouse_down: Optional[EventType[()]] = None,
|
|
1941
|
+
on_mouse_enter: Optional[EventType[()]] = None,
|
|
1942
|
+
on_mouse_leave: Optional[EventType[()]] = None,
|
|
1943
|
+
on_mouse_move: Optional[EventType[()]] = None,
|
|
1944
|
+
on_mouse_out: Optional[EventType[()]] = None,
|
|
1945
|
+
on_mouse_over: Optional[EventType[()]] = None,
|
|
1946
|
+
on_mouse_up: Optional[EventType[()]] = None,
|
|
1947
|
+
on_scroll: Optional[EventType[()]] = None,
|
|
1948
|
+
on_unmount: Optional[EventType[()]] = None,
|
|
1949
|
+
**props,
|
|
1950
|
+
) -> "ValueNumberInput":
|
|
1951
|
+
"""Create the component.
|
|
1952
|
+
|
|
1953
|
+
Args:
|
|
1954
|
+
*children: The children of the component.
|
|
1955
|
+
on_change: Fired when the input value changes
|
|
1956
|
+
on_focus: Fired when the input gains focus
|
|
1957
|
+
on_blur: Fired when the input loses focus
|
|
1958
|
+
accept: Accepted types of files when the input is file type
|
|
1959
|
+
alt: Alternate text for input type="image"
|
|
1960
|
+
auto_complete: Whether the input should have autocomplete enabled
|
|
1961
|
+
auto_focus: Automatically focuses the input when the page loads
|
|
1962
|
+
capture: Captures media from the user (camera or microphone)
|
|
1963
|
+
checked: Indicates whether the input is checked (for checkboxes and radio buttons)
|
|
1964
|
+
default_checked: The initial value (for checkboxes and radio buttons)
|
|
1965
|
+
default_value: The initial value for a text field
|
|
1966
|
+
disabled: Disables the input
|
|
1967
|
+
form: Associates the input with a form (by id)
|
|
1968
|
+
form_action: URL to send the form data to (for type="submit" buttons)
|
|
1969
|
+
form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
|
|
1970
|
+
form_method: HTTP method to use for sending form data (for type="submit" buttons)
|
|
1971
|
+
form_no_validate: Bypasses form validation when submitting (for type="submit" buttons)
|
|
1972
|
+
form_target: Specifies where to display the response after submitting the form (for type="submit" buttons)
|
|
1973
|
+
list: References a datalist for suggested options
|
|
1974
|
+
max: Specifies the maximum value for the input
|
|
1975
|
+
max_length: Specifies the maximum number of characters allowed in the input
|
|
1976
|
+
min_length: Specifies the minimum number of characters required in the input
|
|
1977
|
+
min: Specifies the minimum value for the input
|
|
1978
|
+
multiple: Indicates whether multiple values can be entered in an input of the type email or file
|
|
1979
|
+
name: Name of the input, used when sending form data
|
|
1980
|
+
pattern: Regex pattern the input's value must match to be valid
|
|
1981
|
+
placeholder: Placeholder text in the input
|
|
1982
|
+
read_only: Indicates whether the input is read-only
|
|
1983
|
+
required: Indicates that the input is required
|
|
1984
|
+
size: Specifies the visible width of a text control
|
|
1985
|
+
src: URL for image inputs
|
|
1986
|
+
step: Specifies the legal number intervals for an input
|
|
1987
|
+
type: Specifies the type of input
|
|
1988
|
+
value: Value of the input
|
|
1989
|
+
on_key_down: Fired when a key is pressed down
|
|
1990
|
+
on_key_up: Fired when a key is released
|
|
1991
|
+
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
1992
|
+
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
1993
|
+
content_editable: Indicates whether the element's content is editable.
|
|
1994
|
+
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
|
1995
|
+
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
|
1996
|
+
draggable: Defines whether the element can be dragged.
|
|
1997
|
+
enter_key_hint: Hints what media types the media element is able to play.
|
|
1998
|
+
hidden: Defines whether the element is hidden.
|
|
1999
|
+
input_mode: Defines the type of the element.
|
|
2000
|
+
item_prop: Defines the name of the element for metadata purposes.
|
|
2001
|
+
lang: Defines the language used in the element.
|
|
2002
|
+
role: Defines the role of the element.
|
|
2003
|
+
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
|
2004
|
+
spell_check: Defines whether the element may be checked for spelling errors.
|
|
2005
|
+
tab_index: Defines the position of the current element in the tabbing order.
|
|
2006
|
+
title: Defines a tooltip for the element.
|
|
2007
|
+
style: The style of the component.
|
|
2008
|
+
key: A unique key for the component.
|
|
2009
|
+
id: The id for the component.
|
|
2010
|
+
class_name: The class name for the component.
|
|
2011
|
+
autofocus: Whether the component should take the focus once the page is loaded
|
|
2012
|
+
custom_attrs: custom attribute
|
|
2013
|
+
**props: The props of the component.
|
|
2014
|
+
|
|
2015
|
+
Returns:
|
|
2016
|
+
The component.
|
|
2017
|
+
"""
|
|
2018
|
+
...
|
|
2019
|
+
|
|
2020
|
+
class Input(BaseInput):
|
|
897
2021
|
@overload
|
|
898
2022
|
@classmethod
|
|
899
2023
|
def create( # type: ignore
|
|
@@ -1198,6 +2322,9 @@ class Input(BaseHTML):
|
|
|
1198
2322
|
|
|
1199
2323
|
Args:
|
|
1200
2324
|
*children: The children of the component.
|
|
2325
|
+
on_change: Fired when the input value changes
|
|
2326
|
+
on_focus: Fired when the input gains focus
|
|
2327
|
+
on_blur: Fired when the input loses focus
|
|
1201
2328
|
accept: Accepted types of files when the input is file type
|
|
1202
2329
|
alt: Alternate text for input type="image"
|
|
1203
2330
|
auto_complete: Whether the input should have autocomplete enabled
|
|
@@ -1229,9 +2356,6 @@ class Input(BaseHTML):
|
|
|
1229
2356
|
step: Specifies the legal number intervals for an input
|
|
1230
2357
|
type: Specifies the type of input
|
|
1231
2358
|
value: Value of the input
|
|
1232
|
-
on_change: Fired when the input value changes
|
|
1233
|
-
on_focus: Fired when the input gains focus
|
|
1234
|
-
on_blur: Fired when the input loses focus
|
|
1235
2359
|
on_key_down: Fired when a key is pressed down
|
|
1236
2360
|
on_key_up: Fired when a key is released
|
|
1237
2361
|
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
@@ -3027,6 +4151,8 @@ class Select(BaseHTML):
|
|
|
3027
4151
|
name: Var[str] | str | None = None,
|
|
3028
4152
|
required: Var[bool] | bool | None = None,
|
|
3029
4153
|
size: Var[int] | int | None = None,
|
|
4154
|
+
value: Var[str] | str | None = None,
|
|
4155
|
+
default_value: Var[str] | str | None = None,
|
|
3030
4156
|
access_key: Var[str] | str | None = None,
|
|
3031
4157
|
auto_capitalize: Literal[
|
|
3032
4158
|
"characters", "none", "off", "on", "sentences", "words"
|
|
@@ -3246,6 +4372,8 @@ class Select(BaseHTML):
|
|
|
3246
4372
|
required: Indicates that the select control must have a selected option
|
|
3247
4373
|
size: Number of visible options in a drop-down list
|
|
3248
4374
|
on_change: Fired when the select value changes
|
|
4375
|
+
value: The controlled value of the select, read only unless used with on_change
|
|
4376
|
+
default_value: The default value of the select when initially rendered
|
|
3249
4377
|
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
|
3250
4378
|
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
|
3251
4379
|
content_editable: Indicates whether the element's content is editable.
|