@idealyst/components 1.2.73 → 1.2.74

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idealyst/components",
3
- "version": "1.2.73",
3
+ "version": "1.2.74",
4
4
  "description": "Shared component library for React and React Native",
5
5
  "documentation": "https://github.com/IdealystIO/idealyst-framework/tree/main/packages/components#readme",
6
6
  "readme": "README.md",
@@ -56,7 +56,7 @@
56
56
  "publish:npm": "npm publish"
57
57
  },
58
58
  "peerDependencies": {
59
- "@idealyst/theme": "^1.2.73",
59
+ "@idealyst/theme": "^1.2.74",
60
60
  "@mdi/js": ">=7.0.0",
61
61
  "@mdi/react": ">=1.0.0",
62
62
  "@react-native-vector-icons/common": ">=12.0.0",
@@ -107,7 +107,7 @@
107
107
  },
108
108
  "devDependencies": {
109
109
  "@idealyst/blur": "^1.2.40",
110
- "@idealyst/theme": "^1.2.73",
110
+ "@idealyst/theme": "^1.2.74",
111
111
  "@idealyst/tooling": "^1.2.30",
112
112
  "@mdi/react": "^1.6.1",
113
113
  "@types/react": "^19.1.0",
@@ -86,6 +86,7 @@ const TextInput = React.forwardRef<IdealystElement, TextInputProps>(({
86
86
  // Submit handling
87
87
  onSubmitEditing,
88
88
  returnKeyType = 'default',
89
+ textContentType,
89
90
  }, ref) => {
90
91
  const [isFocused, setIsFocused] = useState(false);
91
92
  const [isPasswordVisible, setIsPasswordVisible] = useState(false);
@@ -183,6 +184,10 @@ const TextInput = React.forwardRef<IdealystElement, TextInputProps>(({
183
184
  hasError,
184
185
  ]);
185
186
 
187
+ // Determine the textContentType for iOS AutoFill
188
+ // If explicitly provided, use that; otherwise default password fields to 'password'
189
+ const resolvedTextContentType = textContentType ?? (isSecureField ? 'password' : undefined);
190
+
186
191
  // Memoized TextInput props (everything except value/onChangeText)
187
192
  const textInputProps = useMemo(() => ({
188
193
  onPress: handlePress,
@@ -196,6 +201,7 @@ const TextInput = React.forwardRef<IdealystElement, TextInputProps>(({
196
201
  onSubmitEditing: handleSubmitEditing,
197
202
  returnKeyType,
198
203
  placeholderTextColor: '#999999',
204
+ textContentType: resolvedTextContentType,
199
205
  ...nativeA11yProps,
200
206
  }), [
201
207
  handlePress,
@@ -209,6 +215,7 @@ const TextInput = React.forwardRef<IdealystElement, TextInputProps>(({
209
215
  handleBlur,
210
216
  handleSubmitEditing,
211
217
  returnKeyType,
218
+ resolvedTextContentType,
212
219
  nativeA11yProps,
213
220
  ]);
214
221
 
@@ -23,6 +23,31 @@ export type TextInputMode = 'text' | 'email' | 'password' | 'number';
23
23
  */
24
24
  export type ReturnKeyType = 'done' | 'go' | 'next' | 'search' | 'send' | 'default';
25
25
 
26
+ /**
27
+ * Text content type for iOS AutoFill.
28
+ * Helps iOS identify the purpose of the field for password/credential autofill.
29
+ * @platform ios
30
+ */
31
+ export type TextContentType =
32
+ | 'none'
33
+ | 'username'
34
+ | 'password'
35
+ | 'newPassword'
36
+ | 'oneTimeCode'
37
+ | 'emailAddress'
38
+ | 'name'
39
+ | 'givenName'
40
+ | 'familyName'
41
+ | 'telephoneNumber'
42
+ | 'streetAddressLine1'
43
+ | 'streetAddressLine2'
44
+ | 'addressCity'
45
+ | 'addressState'
46
+ | 'addressCityAndState'
47
+ | 'postalCode'
48
+ | 'countryName'
49
+ | 'creditCardNumber';
50
+
26
51
  /**
27
52
  * Single-line text input field with support for icons, validation states, and multiple visual styles.
28
53
  * Includes built-in password visibility toggle and platform-specific keyboard handling.
@@ -160,6 +185,15 @@ export interface TextInputProps extends FormInputStyleProps, FormAccessibilityPr
160
185
  */
161
186
  returnKeyType?: ReturnKeyType;
162
187
 
188
+ /**
189
+ * iOS AutoFill content type. Helps iOS identify the field purpose for
190
+ * password/credential autofill. Set to 'none' to disable autofill suggestions.
191
+ * For password fields, use 'password' for existing passwords or 'newPassword' for signup.
192
+ * Pair with a username field using 'username' or 'emailAddress' for best results.
193
+ * @platform ios
194
+ */
195
+ textContentType?: TextContentType;
196
+
163
197
  /**
164
198
  * Additional styles (platform-specific)
165
199
  */