@umituz/react-native-design-system 2.5.17 → 2.5.19

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.5.17",
3
+ "version": "2.5.19",
4
4
  "description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive and safe area utilities",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -4,21 +4,24 @@ import { useAppDesignTokens } from '../theme';
4
4
  import { getTextColor, type TextStyleVariant, type ColorVariant } from '../typography';
5
5
 
6
6
  export interface AtomicTextProps extends TextProps {
7
+ /** Typographic style variant from tokens (alias for 'type') */
8
+ variant?: TextStyleVariant;
9
+
7
10
  /** Typographic style variant from tokens */
8
11
  type?: TextStyleVariant;
9
-
12
+
10
13
  /** Color variant from tokens or custom hex color */
11
14
  color?: ColorVariant | string;
12
-
15
+
13
16
  /** Text alignment */
14
17
  align?: TextStyle['textAlign'];
15
-
18
+
16
19
  /** Content to render */
17
20
  children: React.ReactNode;
18
-
21
+
19
22
  /** Custom text style */
20
23
  style?: StyleProp<TextStyle>;
21
-
24
+
22
25
  /** Test ID for automation */
23
26
  testID?: string;
24
27
  }
@@ -31,6 +34,7 @@ export interface AtomicTextProps extends TextProps {
31
34
  * ✅ SOLID, DRY, KISS
32
35
  */
33
36
  export const AtomicText = ({
37
+ variant,
34
38
  type = 'bodyMedium',
35
39
  color = 'textPrimary',
36
40
  align,
@@ -41,8 +45,11 @@ export const AtomicText = ({
41
45
  }: AtomicTextProps) => {
42
46
  const tokens = useAppDesignTokens();
43
47
 
48
+ // Support both 'variant' and 'type' props for backward compatibility
49
+ const textType = variant || type;
50
+
44
51
  // Get typography style from tokens
45
- const typographyStyle = (tokens.typography as Record<string, any>)[type];
52
+ const typographyStyle = (tokens.typography as Record<string, any>)[textType];
46
53
 
47
54
  // Use responsive font size if available
48
55
  const fontSize = typographyStyle?.responsiveFontSize || typographyStyle?.fontSize;
@@ -20,6 +20,7 @@ export interface AtomicTextAreaProps {
20
20
  maxLength?: number;
21
21
  numberOfLines?: number;
22
22
  rows?: number;
23
+ minHeight?: number;
23
24
  disabled?: boolean;
24
25
  style?: ViewStyle;
25
26
  testID?: string;
@@ -35,11 +36,13 @@ export const AtomicTextArea: React.FC<AtomicTextAreaProps> = ({
35
36
  maxLength,
36
37
  numberOfLines,
37
38
  rows = 4,
39
+ minHeight,
38
40
  disabled = false,
39
41
  style,
40
42
  testID,
41
43
  }) => {
42
44
  const lineCount = numberOfLines ?? rows;
45
+ const calculatedMinHeight = minHeight ?? lineCount * 24;
43
46
  const tokens = useAppDesignTokens();
44
47
  const hasError = !!errorText;
45
48
 
@@ -69,7 +72,7 @@ export const AtomicTextArea: React.FC<AtomicTextAreaProps> = ({
69
72
  backgroundColor: tokens.colors.surface,
70
73
  borderColor: hasError ? tokens.colors.error : tokens.colors.border,
71
74
  color: tokens.colors.textPrimary,
72
- minHeight: lineCount * 24,
75
+ minHeight: calculatedMinHeight,
73
76
  },
74
77
  disabled && { opacity: 0.5 },
75
78
  ]}