@umituz/react-native-notifications 1.3.12 → 1.3.14

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-notifications",
3
- "version": "1.3.12",
3
+ "version": "1.3.14",
4
4
  "description": "Offline-first local notifications system for React Native apps using expo-notifications",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -29,7 +29,9 @@
29
29
  "@umituz/react-native-design-system": "latest",
30
30
  "@umituz/react-native-design-system-atoms": "latest",
31
31
  "@umituz/react-native-design-system-theme": "latest",
32
+ "@umituz/react-native-haptics": "latest",
32
33
  "expo-device": ">=6.0.0",
34
+ "expo-haptics": ">=15.0.0",
33
35
  "expo-linear-gradient": ">=14.0.0",
34
36
  "expo-notifications": ">=0.28.0",
35
37
  "react": ">=18.2.0",
@@ -3,7 +3,7 @@
3
3
  * Reusable toggle row for settings
4
4
  */
5
5
 
6
- import React, { useMemo } from 'react';
6
+ import React, { useMemo, useCallback } from 'react';
7
7
  import { View, StyleSheet, Switch } from 'react-native';
8
8
  import { AtomicText, AtomicIcon } from '@umituz/react-native-design-system';
9
9
  import { useAppDesignTokens } from '@umituz/react-native-design-system-theme';
@@ -14,6 +14,7 @@ export interface SettingRowProps {
14
14
  description: string;
15
15
  value: boolean;
16
16
  onToggle: (value: boolean) => void;
17
+ onHapticFeedback?: () => void;
17
18
  }
18
19
 
19
20
  export const SettingRow: React.FC<SettingRowProps> = ({
@@ -21,11 +22,17 @@ export const SettingRow: React.FC<SettingRowProps> = ({
21
22
  title,
22
23
  description,
23
24
  value,
24
- onToggle
25
+ onToggle,
26
+ onHapticFeedback,
25
27
  }) => {
26
28
  const tokens = useAppDesignTokens();
27
29
  const styles = useMemo(() => createStyles(tokens), [tokens]);
28
30
 
31
+ const handleToggle = useCallback((newValue: boolean) => {
32
+ onHapticFeedback?.();
33
+ onToggle(newValue);
34
+ }, [onToggle, onHapticFeedback]);
35
+
29
36
  return (
30
37
  <View style={styles.container}>
31
38
  <View style={styles.iconContainer}>
@@ -41,7 +48,7 @@ export const SettingRow: React.FC<SettingRowProps> = ({
41
48
  </View>
42
49
  <Switch
43
50
  value={value}
44
- onValueChange={onToggle}
51
+ onValueChange={handleToggle}
45
52
  trackColor={{
46
53
  false: tokens.colors.surfaceSecondary,
47
54
  true: tokens.colors.primary
@@ -19,6 +19,7 @@ export interface NotificationSettingsScreenProps {
19
19
  onRemindersPress: () => void;
20
20
  onStartTimePress: () => void;
21
21
  onEndTimePress: () => void;
22
+ onHapticFeedback?: () => void;
22
23
  }
23
24
 
24
25
  export const NotificationSettingsScreen: React.FC<NotificationSettingsScreenProps> = ({
@@ -27,6 +28,7 @@ export const NotificationSettingsScreen: React.FC<NotificationSettingsScreenProp
27
28
  onRemindersPress,
28
29
  onStartTimePress,
29
30
  onEndTimePress,
31
+ onHapticFeedback,
30
32
  }) => {
31
33
  const tokens = useAppDesignTokens();
32
34
  const styles = useMemo(() => createStyles(tokens), [tokens]);
@@ -62,6 +64,7 @@ export const NotificationSettingsScreen: React.FC<NotificationSettingsScreenProp
62
64
  description={translations.masterToggleDescription}
63
65
  value={preferences.enabled}
64
66
  onToggle={handleMasterToggle}
67
+ onHapticFeedback={onHapticFeedback}
65
68
  />
66
69
  </AtomicCard>
67
70
 
@@ -74,6 +77,7 @@ export const NotificationSettingsScreen: React.FC<NotificationSettingsScreenProp
74
77
  description={translations.soundDescription}
75
78
  value={preferences.sound}
76
79
  onToggle={handleSoundToggle}
80
+ onHapticFeedback={onHapticFeedback}
77
81
  />
78
82
  <View style={styles.divider} />
79
83
  <SettingRow
@@ -82,6 +86,7 @@ export const NotificationSettingsScreen: React.FC<NotificationSettingsScreenProp
82
86
  description={translations.vibrationDescription}
83
87
  value={preferences.vibration}
84
88
  onToggle={handleVibrationToggle}
89
+ onHapticFeedback={onHapticFeedback}
85
90
  />
86
91
  </AtomicCard>
87
92
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  import React, { useEffect, useMemo, useCallback } from 'react';
7
7
  import { View, FlatList, StyleSheet, ActivityIndicator, TouchableOpacity } from 'react-native';
8
- import { AtomicText, AtomicIcon, ScreenLayout } from '@umituz/react-native-design-system';
8
+ import { AtomicText, AtomicIcon } from '@umituz/react-native-design-system';
9
9
  import { useAppDesignTokens } from '@umituz/react-native-design-system-theme';
10
10
  import { ReminderItem } from '../components/ReminderItem';
11
11
  import { useRemindersStore, useReminders, useRemindersLoading } from '../../infrastructure/storage/RemindersStore';
@@ -76,16 +76,14 @@ export const ReminderListScreen: React.FC<ReminderListScreenProps> = ({
76
76
 
77
77
  if (isLoading) {
78
78
  return (
79
- <ScreenLayout>
80
- <View style={styles.loadingContainer}>
81
- <ActivityIndicator size="large" color={tokens.colors.primary} />
82
- </View>
83
- </ScreenLayout>
79
+ <View style={styles.loadingContainer}>
80
+ <ActivityIndicator size="large" color={tokens.colors.primary} />
81
+ </View>
84
82
  );
85
83
  }
86
84
 
87
85
  return (
88
- <ScreenLayout hideScrollIndicator>
86
+ <View style={{ flex: 1 }}>
89
87
  <FlatList
90
88
  data={reminders}
91
89
  renderItem={renderItem}
@@ -101,7 +99,7 @@ export const ReminderListScreen: React.FC<ReminderListScreenProps> = ({
101
99
  <AtomicText type="bodyMedium" style={styles.fabText}>{translations.addButtonLabel}</AtomicText>
102
100
  </TouchableOpacity>
103
101
  )}
104
- </ScreenLayout>
102
+ </View>
105
103
  );
106
104
  };
107
105