@umituz/react-native-design-system 4.25.64 → 4.25.65

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": "4.25.64",
3
+ "version": "4.25.65",
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, onboarding, and loading utilities",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -54,7 +54,7 @@ export interface AtomicAvatarProps {
54
54
  // COMPONENT IMPLEMENTATION
55
55
  // =============================================================================
56
56
 
57
- export const AtomicAvatar: React.FC<AtomicAvatarProps> = ({
57
+ export const AtomicAvatar: React.FC<AtomicAvatarProps> = React.memo(({
58
58
  source,
59
59
  name,
60
60
  size = 'md',
@@ -152,5 +152,5 @@ export const AtomicAvatar: React.FC<AtomicAvatarProps> = ({
152
152
  )}
153
153
  </View>
154
154
  );
155
- };
155
+ });
156
156
 
@@ -73,23 +73,21 @@ export const Grid: React.FC<GridProps> = ({
73
73
  [responsiveGap]
74
74
  );
75
75
 
76
+ const itemStyle = useMemo(() => ({
77
+ flex: columns ? 1 / columns - 0.01 : undefined,
78
+ minWidth: columns ? `${100 / columns - 1}%` as const : undefined,
79
+ }), [columns]);
80
+
76
81
  // Convert children to array for mapping
77
82
  const childArray = React.Children.toArray(children);
78
83
 
79
84
  return (
80
85
  <View style={[styles.container, style]} testID={testID}>
81
86
  {childArray.map((child, index) => {
82
- // Use child's key if available, otherwise use index
83
87
  const key = (child as React.ReactElement).key || `grid-item-${index}`;
84
88
 
85
89
  return (
86
- <View
87
- key={key}
88
- style={{
89
- flex: columns ? 1 / columns - 0.01 : undefined,
90
- minWidth: columns ? `${100 / columns - 1}%` : undefined,
91
- }}
92
- >
90
+ <View key={key} style={itemStyle}>
93
91
  {child}
94
92
  </View>
95
93
  );
@@ -97,7 +97,7 @@ const ScreenHeaderTitle: React.FC<{
97
97
  title: string;
98
98
  tokens: ReturnType<typeof useAppDesignTokens>;
99
99
  testID?: string;
100
- }> = ({ title, tokens, testID }) => (
100
+ }> = React.memo(({ title, tokens, testID }) => (
101
101
  <View style={{ flex: 1, alignItems: 'center', paddingHorizontal: tokens.spacing.sm }}>
102
102
  <AtomicText
103
103
  type="headlineMedium"
@@ -114,15 +114,15 @@ const ScreenHeaderTitle: React.FC<{
114
114
  {title}
115
115
  </AtomicText>
116
116
  </View>
117
- );
117
+ ));
118
118
 
119
119
  const ScreenHeaderRightAction: React.FC<{
120
120
  rightAction?: React.ReactNode;
121
- }> = ({ rightAction }) => (
121
+ }> = React.memo(({ rightAction }) => (
122
122
  <View style={{ width: 40, alignItems: 'flex-start' }}>
123
123
  {rightAction || <View style={{ width: 40 }} />}
124
124
  </View>
125
- );
125
+ ));
126
126
 
127
127
  export const ScreenHeader: React.FC<ScreenHeaderProps> = ({
128
128
  title,