@umituz/react-native-design-system 1.5.35 → 1.5.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": "1.5.35",
3
+ "version": "1.5.36",
4
4
  "description": "Universal design system for React Native apps - Domain-Driven Design architecture with Material Design 3 components",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./dist/index.d.ts",
@@ -44,6 +44,8 @@ import {
44
44
  TouchableOpacity,
45
45
  StyleSheet,
46
46
  useWindowDimensions,
47
+ type StyleProp,
48
+ type ViewStyle,
47
49
  } from 'react-native';
48
50
  import DateTimePicker, { DateTimePickerEvent } from '@react-native-community/datetimepicker';
49
51
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
@@ -78,7 +80,7 @@ export interface AtomicDatePickerProps {
78
80
  /** Optional test ID for E2E testing */
79
81
  testID?: string;
80
82
  /** Optional container style */
81
- style?: import('react-native').StyleProp<import('react-native').ViewStyle>;
83
+ style?: StyleProp<ViewStyle>;
82
84
  }
83
85
 
84
86
  /**
@@ -108,7 +110,7 @@ export const AtomicDatePicker: React.FC<AtomicDatePickerProps> = ({
108
110
  const { height } = useWindowDimensions();
109
111
  const insets = useSafeAreaInsets();
110
112
  const { modalRef, present, dismiss } = useBottomSheetModal();
111
- const [tempDate, setTempDate] = useState<Date>(value || new Date());
113
+ const [tempDate, setTempDate] = useState<Date>(value ?? new Date());
112
114
 
113
115
  // Update tempDate when value prop changes
114
116
  useEffect(() => {
@@ -139,7 +141,7 @@ export const AtomicDatePicker: React.FC<AtomicDatePickerProps> = ({
139
141
  * Handle open - reset temp date to current value
140
142
  */
141
143
  const handleOpen = () => {
142
- setTempDate(value || new Date());
144
+ setTempDate(value ?? new Date());
143
145
  present();
144
146
  };
145
147
 
@@ -239,7 +241,7 @@ export const AtomicDatePicker: React.FC<AtomicDatePickerProps> = ({
239
241
  enableHandleIndicator
240
242
  onDismiss={() => {
241
243
  // Reset temp date when closed without saving
242
- setTempDate(value || new Date());
244
+ setTempDate(value ?? new Date());
243
245
  }}
244
246
  >
245
247
  <View style={styles.bottomSheetContent}>