@umituz/react-native-design-system 2.8.35 → 2.8.36
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": "@umituz/react-native-design-system",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.36",
|
|
4
4
|
"description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive, safe area, exception, infinite scroll, UUID, image, timezone, offline, and onboarding utilities",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -52,6 +52,7 @@ export const AtomicInput = React.forwardRef<TextInput, AtomicInputProps>(({
|
|
|
52
52
|
onFocus,
|
|
53
53
|
multiline = false,
|
|
54
54
|
numberOfLines,
|
|
55
|
+
textContentType,
|
|
55
56
|
}, ref) => {
|
|
56
57
|
const tokens = useAppDesignTokens();
|
|
57
58
|
|
|
@@ -114,7 +115,7 @@ export const AtomicInput = React.forwardRef<TextInput, AtomicInputProps>(({
|
|
|
114
115
|
fontSize: sizeConfig.fontSize,
|
|
115
116
|
lineHeight: (sizeConfig.fontSize || 16) * 1.2,
|
|
116
117
|
color: textColor,
|
|
117
|
-
paddingVertical:
|
|
118
|
+
paddingVertical: 4,
|
|
118
119
|
},
|
|
119
120
|
leadingIcon ? { paddingLeft: sizeConfig.iconSize + 8 } : undefined,
|
|
120
121
|
(trailingIcon || showPasswordToggle) ? { paddingRight: sizeConfig.iconSize + 8 } : undefined,
|
|
@@ -153,6 +154,7 @@ export const AtomicInput = React.forwardRef<TextInput, AtomicInputProps>(({
|
|
|
153
154
|
editable={!isDisabled}
|
|
154
155
|
multiline={multiline}
|
|
155
156
|
numberOfLines={numberOfLines}
|
|
157
|
+
textContentType={textContentType}
|
|
156
158
|
style={textInputStyle}
|
|
157
159
|
onBlur={() => {
|
|
158
160
|
setIsFocused(false);
|
package/src/atoms/input/types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StyleProp } from 'react-native';
|
|
1
|
+
import type { StyleProp, TextInputProps } from 'react-native';
|
|
2
2
|
import type { TextStyle, ViewStyle } from 'react-native';
|
|
3
3
|
import type { IconName } from '../AtomicIcon';
|
|
4
4
|
|
|
@@ -67,6 +67,8 @@ export interface AtomicInputProps {
|
|
|
67
67
|
multiline?: boolean;
|
|
68
68
|
/** Number of lines for multiline input */
|
|
69
69
|
numberOfLines?: number;
|
|
70
|
+
/** iOS text content type for AutoFill */
|
|
71
|
+
textContentType?: TextInputProps['textContentType'];
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
export type { AtomicInputProps as InputProps };
|
package/src/exports/molecules.ts
CHANGED
|
@@ -33,10 +33,10 @@ export function AlertBanner({ alert }: AlertBannerProps) {
|
|
|
33
33
|
// Auto-dismiss after duration
|
|
34
34
|
useEffect(() => {
|
|
35
35
|
const duration = alert.duration ?? DEFAULT_DURATION;
|
|
36
|
-
if (duration
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
if (duration <= 0) return;
|
|
37
|
+
|
|
38
|
+
const timer = setTimeout(handleDismiss, duration);
|
|
39
|
+
return () => clearTimeout(timer);
|
|
40
40
|
}, [alert.id, alert.duration]);
|
|
41
41
|
|
|
42
42
|
const getBackgroundColor = (type: AlertType): string => {
|
|
@@ -36,10 +36,10 @@ export function AlertToast({ alert }: AlertToastProps) {
|
|
|
36
36
|
// Auto-dismiss after duration
|
|
37
37
|
useEffect(() => {
|
|
38
38
|
const duration = alert.duration ?? DEFAULT_DURATION;
|
|
39
|
-
if (duration
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
if (duration <= 0) return;
|
|
40
|
+
|
|
41
|
+
const timer = setTimeout(dismiss, duration);
|
|
42
|
+
return () => clearTimeout(timer);
|
|
43
43
|
}, [alert.id, alert.duration]);
|
|
44
44
|
|
|
45
45
|
const getBackgroundColor = (type: AlertType): string => {
|