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

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.63",
3
+ "version": "4.25.64",
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",
@@ -4,7 +4,7 @@
4
4
  * Content component for confirmation modal
5
5
  */
6
6
 
7
- import React, { useCallback } from 'react';
7
+ import React, { useMemo } from 'react';
8
8
  import { View, ViewStyle, StyleProp } from 'react-native';
9
9
  import { useAppDesignTokens } from '../theme';
10
10
  import { ConfirmationModalVariant } from './confirmation-modal/types/';
@@ -27,7 +27,7 @@ const useConfirmButtonStyle = (
27
27
  variant: ConfirmationModalVariant,
28
28
  tokens: ReturnType<typeof useAppDesignTokens>
29
29
  ) => {
30
- return useCallback(() => {
30
+ return useMemo(() => {
31
31
  const baseStyle = getButtonStyle();
32
32
  const variantStyles: ViewStyle[] = [];
33
33
 
@@ -54,7 +54,7 @@ export const ConfirmationModalContent: React.FC<{
54
54
  }> = ({ tokens, variant, title, message, confirmText, cancelText, icon, onConfirm, onCancel, style, testID }) => {
55
55
  const variantConfig = getVariantConfig(variant as 'default' | 'destructive' | 'warning' | 'success');
56
56
  const finalIcon = icon || variantConfig.icon;
57
- const getConfirmButtonStyle = useConfirmButtonStyle(variant, tokens);
57
+ const confirmButtonStyle = useConfirmButtonStyle(variant, tokens);
58
58
 
59
59
  return (
60
60
  <View style={[getModalContainerStyle(tokens), style]}>
@@ -79,7 +79,7 @@ export const ConfirmationModalContent: React.FC<{
79
79
  cancelText={cancelText}
80
80
  onConfirm={onConfirm}
81
81
  onCancel={onCancel}
82
- confirmButtonStyle={getConfirmButtonStyle()}
82
+ confirmButtonStyle={confirmButtonStyle}
83
83
  testID={testID}
84
84
  />
85
85
  </View>
@@ -26,7 +26,7 @@ const ConfirmationModalBackdrop: React.FC<{
26
26
  showBackdrop: boolean;
27
27
  onBackdropPress: () => void;
28
28
  testID: string;
29
- }> = ({ showBackdrop, onBackdropPress, testID }) => {
29
+ }> = React.memo(({ showBackdrop, onBackdropPress, testID }) => {
30
30
  if (!showBackdrop) return null;
31
31
 
32
32
  return (
@@ -37,7 +37,7 @@ const ConfirmationModalBackdrop: React.FC<{
37
37
  testID={`${testID}-backdrop`}
38
38
  />
39
39
  );
40
- };
40
+ });
41
41
 
42
42
  export const ConfirmationModal: React.FC<ConfirmationModalProps> = ({
43
43
  visible,
@@ -38,7 +38,7 @@ interface AvatarContentProps {
38
38
  imageStyle?: StyleProp<ImageStyle>;
39
39
  }
40
40
 
41
- const AvatarContent: React.FC<AvatarContentProps> = ({
41
+ const AvatarContent: React.FC<AvatarContentProps> = React.memo(({
42
42
  hasImage,
43
43
  hasName,
44
44
  uri,
@@ -91,7 +91,7 @@ const AvatarContent: React.FC<AvatarContentProps> = ({
91
91
  customColor={tokens.colors.textInverse}
92
92
  />
93
93
  );
94
- };
94
+ });
95
95
 
96
96
  export const Avatar: React.FC<AvatarProps> = ({
97
97
  uri,
@@ -103,7 +103,12 @@ export const FilterBottomSheet = forwardRef<BottomSheetModalRef, FilterBottomShe
103
103
  <View style={styles.container}>
104
104
  <View style={styles.header}>
105
105
  <AtomicText type="headlineSmall">{title || 'Filter'}</AtomicText>
106
- <TouchableOpacity onPress={() => internalRef.current?.dismiss()}>
106
+ <TouchableOpacity
107
+ onPress={() => internalRef.current?.dismiss()}
108
+ hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
109
+ accessibilityRole="button"
110
+ accessibilityLabel="Close filter"
111
+ >
107
112
  <AtomicIcon name={icons.close} size="md" color="textPrimary" />
108
113
  </TouchableOpacity>
109
114
  </View>
@@ -22,7 +22,7 @@ interface CalendarDayCellProps {
22
22
  testID?: string;
23
23
  }
24
24
 
25
- export const CalendarDayCell: React.FC<CalendarDayCellProps> = ({
25
+ export const CalendarDayCell: React.FC<CalendarDayCellProps> = React.memo(({
26
26
  day,
27
27
  index,
28
28
  isSelected,
@@ -98,4 +98,4 @@ export const CalendarDayCell: React.FC<CalendarDayCellProps> = ({
98
98
  </View>
99
99
  </TouchableOpacity>
100
100
  );
101
- };
101
+ });