@umituz/react-native-design-system 4.26.1 → 4.26.3

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.
@@ -3,5 +3,6 @@ export interface NavigationHeaderProps {
3
3
  title: string;
4
4
  onBackPress?: () => void;
5
5
  rightElement?: React.ReactNode;
6
+ centerTitle?: boolean;
6
7
  }
7
8
  export declare const NavigationHeader: React.FC<NavigationHeaderProps>;
@@ -64,6 +64,8 @@ export interface ITimezoneManipulation {
64
64
  endOfDay(date: Date | string | number): Date;
65
65
  /** Get middle of day (12:00:00) */
66
66
  getMiddleOfDay(date: Date | string | number): Date;
67
+ /** Set specific time of day (hours and minutes) */
68
+ setTimeOfDay(date: Date | string | number, hours: number, minutes: number): Date;
67
69
  /** Convert date from one timezone to another */
68
70
  convertTimezone(date: Date | string | number, fromTimezone: string, toTimezone: string): Date;
69
71
  /** Add business days (skip weekends) */
@@ -10,3 +10,4 @@ export type { TimezoneInfo, TimezoneCalendarDay, ITimezoneService, } from './dom
10
10
  export { timezoneService, TimezoneService } from './infrastructure/services/TimezoneService';
11
11
  export { useTimezone } from './presentation/hooks/useTimezone';
12
12
  export type { UseTimezoneReturn } from './presentation/hooks/useTimezone';
13
+ export { formatTimeComponent, parseTimeComponent, millisecondsToSeconds, } from './infrastructure/utils/TimeUtils';
@@ -14,6 +14,7 @@ export declare class CalendarManager {
14
14
  addDays(date: Date | string | number, days: number): Date;
15
15
  startOfDay(date: Date | string | number): Date;
16
16
  endOfDay(date: Date | string | number): Date;
17
+ setTimeOfDay(date: Date | string | number, hours: number, minutes: number): Date;
17
18
  getDifferenceInDays(date1: Date | string | number, date2: Date | string | number): number;
18
19
  getDaysUntil(date: Date | string | number): number;
19
20
  isFuture(date: Date | string | number): boolean;
@@ -23,6 +23,7 @@ export declare class TimezoneService implements ITimezoneService {
23
23
  addDays(date: Date | string | number, days: number): Date;
24
24
  startOfDay(date: Date | string | number): Date;
25
25
  endOfDay(date: Date | string | number): Date;
26
+ setTimeOfDay(date: Date | string | number, hours: number, minutes: number): Date;
26
27
  formatDateToString(date: Date | string | number): string;
27
28
  getCurrentISOString(): string;
28
29
  formatToISOString(date: Date | string | number): string;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Time Utilities
3
+ * Utility functions for time formatting and conversion
4
+ */
5
+ /**
6
+ * Format hours and minutes as "HH:MM" string
7
+ *
8
+ * @example
9
+ * formatTimeComponent(14, 30) // Returns "14:30"
10
+ * formatTimeComponent(9, 5) // Returns "09:05"
11
+ *
12
+ * @param hours - Hours (0-23)
13
+ * @param minutes - Minutes (0-59)
14
+ * @returns Formatted time string
15
+ */
16
+ export declare function formatTimeComponent(hours: number, minutes: number): string;
17
+ /**
18
+ * Parse a time string "HH:MM" to hours and minutes
19
+ *
20
+ * @example
21
+ * parseTimeComponent("14:30") // Returns { hours: 14, minutes: 30 }
22
+ * parseTimeComponent("09:05") // Returns { hours: 9, minutes: 5 }
23
+ *
24
+ * @param timeStr - Time string in "HH:MM" format
25
+ * @returns Object with hours and minutes
26
+ */
27
+ export declare function parseTimeComponent(timeStr: string): {
28
+ hours: number;
29
+ minutes: number;
30
+ };
31
+ /**
32
+ * Convert milliseconds to seconds
33
+ *
34
+ * @example
35
+ * millisecondsToSeconds(5000) // Returns 5
36
+ *
37
+ * @param ms - Milliseconds
38
+ * @returns Seconds
39
+ */
40
+ export declare function millisecondsToSeconds(ms: number): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-design-system",
3
- "version": "4.26.1",
3
+ "version": "4.26.3",
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 - TanStack persistence and expo-image-manipulator now lazy loaded",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./dist/index.d.ts",
@@ -75,6 +75,7 @@ export const NavigationHeader: React.FC<NavigationHeaderProps> = ({
75
75
  type="titleLarge"
76
76
  color="textPrimary"
77
77
  numberOfLines={1}
78
+ align={centerTitle ? 'center' : 'left'}
78
79
  style={styles.title}
79
80
  >
80
81
  {title}