3030
3131
3232class KeyboardType (Enum ):
33+ """
34+ The type of information for which to optimize the text input control.
35+
36+ On Android, behavior may vary across device and keyboard provider.
37+ """
38+
3339 NONE = "none"
40+ """
41+ Prevents the OS from showing the on-screen virtual keyboard.
42+ """
43+
3444 TEXT = "text"
45+ """
46+ Optimized for textual information.
47+
48+ Requests the default platform keyboard.
49+ """
50+
3551 MULTILINE = "multiline"
52+ """
53+ Optimized for multiline textual information.
54+
55+ Requests the default platform keyboard, but accepts newlines when the
56+ enter key is pressed. This is the input type used for all multiline text
57+ fields.
58+ """
59+
3660 NUMBER = "number"
61+ """
62+ Optimized for unsigned numerical information without a decimal point.
63+
64+ Requests a default keyboard with ready access to the number keys.
65+ """
66+
3767 PHONE = "phone"
68+ """
69+ Optimized for telephone numbers.
70+
71+ Requests a keyboard with ready access to the number keys, `"*"`, and `"#"`.
72+ """
73+
3874 DATETIME = "datetime"
75+ """
76+ Optimized for date and time information.
77+
78+ - On iOS, requests the default keyboard.
79+ - On Android, requests a keyboard with ready
80+ access to the number keys, `":"`, and `"-"`.
81+ """
82+
3983 EMAIL = "email"
84+ """
85+ Optimized for email addresses.
86+
87+ Requests a keyboard with ready access to the `"@"` and `"."` keys.
88+ """
89+
4090 URL = "url"
91+ """
92+ Optimized for URLs.
93+
94+ Requests a keyboard with ready access to the `"/"` and `"."` keys.
95+ """
96+
4197 VISIBLE_PASSWORD = "visiblePassword"
98+ """
99+ Optimized for passwords that are visible to the user.
100+
101+ Requests a keyboard with ready access to both letters and numbers.
102+ """
103+
42104 NAME = "name"
105+ """
106+ Optimized for a person's name.
107+
108+ - On iOS, requests the [UIKeyboardType.namePhonePad](https://developer.apple.com/documentation/uikit/uikeyboardtype/namephonepad)
109+ keyboard, a keyboard optimized for entering a person’s name or phone number.
110+ Does not support auto-capitalization.
111+ - On Android, requests a keyboard optimized for
112+ [TYPE_TEXT_VARIATION_PERSON_NAME](https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_PERSON_NAME).
113+ """ # noqa: E501
114+
43115 STREET_ADDRESS = "streetAddress"
116+ """
117+ Optimized for postal mailing addresses.
118+
119+ - On iOS, requests the default keyboard.
120+ - On Android, requests a keyboard optimized for
121+ [TYPE_TEXT_VARIATION_POSTAL_ADDRESS](https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_POSTAL_ADDRESS).
122+ """ # noqa: E501
123+
124+ WEB_SEARCH = "webSearch"
125+ """
126+ Optimized for web searches.
127+
128+ Requests a keyboard that includes keys useful for web searches as well as URLs.
129+
130+ - On iOS, requests a default keyboard with ready access to the `"."` key.
131+ In contrast to [`URL`][(c).], a space bar is available.
132+ - On Android this is remapped to the [`URL`][(c).] keyboard type as it always
133+ shows a space bar.
134+ """
135+
136+ TWITTER = "twitter"
137+ """
138+ Optimized for social media.
139+
140+ Requests a keyboard that includes keys useful for handles and tags.
141+
142+ - On iOS, requests a default keyboard with ready access to the `"@"` and `"#"` keys.
143+ - On Android this is remapped to the [`EMAIL`][(c).] keyboard type as it
144+ always shows the `"@"` key.
145+ """
44146
45147
46148class TextCapitalization (Enum ):
149+ """
150+ Configures how the platform keyboard will select an uppercase or
151+ lowercase keyboard.
152+
153+ Only supports text keyboards, other keyboard types will ignore this
154+ configuration. Capitalization is locale-aware.
155+ """
156+
47157 CHARACTERS = "characters"
158+ """
159+ Uppercase keyboard for each character.
160+
161+ Info:
162+ Corresponds to `InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS` on Android, and
163+ `UITextAutocapitalizationTypeAllCharacters` on iOS.
164+ """
165+
48166 WORDS = "words"
167+ """
168+ Uppercase keyboard for the first letter of each word.
169+
170+ Info:
171+ Corresponds to `InputType.TYPE_TEXT_FLAG_CAP_WORDS` on Android, and
172+ `UITextAutocapitalizationTypeWords` on iOS.
173+ """
174+
49175 SENTENCES = "sentences"
176+ """
177+ Uppercase keyboard for the first letter of each sentence.
178+
179+ Info:
180+ Corresponds to `InputType.TYPE_TEXT_FLAG_CAP_SENTENCES` on Android, and
181+ `UITextAutocapitalizationTypeSentences` on iOS.
182+ """
183+
184+ NONE = "none"
185+ """
186+ Lowercase keyboard.
187+ """
50188
51189
52190@dataclass
53191class InputFilter :
54192 """
55- `InputFilter` class.
193+ An input filter that uses a regular expression to allow or deny/block certain
194+ patterns in the input.
56195 """
57196
58197 regex_string : str
@@ -79,7 +218,7 @@ class InputFilter:
79218 """
80219 Whether this regular expression matches multiple lines.
81220
82- If the regexp does match multiple lines, the "^" and "$" characters match the
221+ If the regexp does match multiple lines, the ` "^"` and ` "$"` characters match the
83222 beginning and end of lines. If not, the characters match the beginning and end of
84223 the input.
85224 """
@@ -100,10 +239,10 @@ class InputFilter:
100239
101240 dot_all : bool = False
102241 """
103- Whether "." in this regular expression matches line terminators.
242+ Whether ` "."` in this regular expression matches line terminators.
104243
105- When false, the "." character matches a single character, unless that character
106- terminates a line. When true, then the "." character will match any single
244+ When false, the ` "."` character matches a single character, unless that character
245+ terminates a line. When true, then the ` "."` character will match any single
107246 character including line terminators.
108247
109248 This feature is distinct from `multiline`. They affect the behavior of different
0 commit comments