@umituz/react-native-design-system 2.3.1 → 2.3.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.
Files changed (54) hide show
  1. package/package.json +15 -3
  2. package/src/atoms/AtomicInput.tsx +0 -1
  3. package/src/atoms/AtomicPicker.tsx +0 -1
  4. package/src/atoms/picker/components/PickerChips.tsx +0 -1
  5. package/src/atoms/picker/components/PickerModal.tsx +1 -3
  6. package/src/atoms/picker/styles/pickerStyles.ts +1 -1
  7. package/src/{responsive → device/detection}/deviceDetection.ts +7 -7
  8. package/src/device/detection/iPadBreakpoints.ts +55 -0
  9. package/src/device/detection/iPadDetection.ts +48 -0
  10. package/src/device/detection/iPadLayoutUtils.ts +95 -0
  11. package/src/device/detection/iPadModalUtils.ts +98 -0
  12. package/src/device/detection/index.ts +54 -0
  13. package/src/device/domain/entities/Device.ts +207 -0
  14. package/src/device/domain/entities/DeviceMemoryUtils.ts +62 -0
  15. package/src/device/domain/entities/DeviceTypeUtils.ts +66 -0
  16. package/src/device/domain/entities/__tests__/DeviceMemoryUtils.test.ts +118 -0
  17. package/src/device/domain/entities/__tests__/DeviceTypeUtils.test.ts +104 -0
  18. package/src/device/domain/entities/__tests__/DeviceUtils.test.ts +167 -0
  19. package/src/device/index.ts +104 -0
  20. package/src/device/infrastructure/services/ApplicationInfoService.ts +86 -0
  21. package/src/device/infrastructure/services/DeviceCapabilityService.ts +60 -0
  22. package/src/device/infrastructure/services/DeviceIdService.ts +70 -0
  23. package/src/device/infrastructure/services/DeviceInfoService.ts +95 -0
  24. package/src/device/infrastructure/services/DeviceService.ts +104 -0
  25. package/src/device/infrastructure/services/PersistentDeviceIdService.ts +132 -0
  26. package/src/device/infrastructure/services/UserFriendlyIdService.ts +68 -0
  27. package/src/device/infrastructure/utils/__tests__/nativeModuleUtils.test.ts +158 -0
  28. package/src/device/infrastructure/utils/__tests__/stringUtils.test.ts +120 -0
  29. package/src/device/infrastructure/utils/nativeModuleUtils.ts +69 -0
  30. package/src/device/infrastructure/utils/stringUtils.ts +59 -0
  31. package/src/device/presentation/hooks/useAnonymousUser.ts +117 -0
  32. package/src/device/presentation/hooks/useDeviceInfo.ts +222 -0
  33. package/src/molecules/ConfirmationModalContent.tsx +4 -4
  34. package/src/molecules/ConfirmationModalMain.tsx +1 -1
  35. package/src/molecules/ScreenHeader.tsx +2 -2
  36. package/src/molecules/confirmation-modal/components.tsx +1 -1
  37. package/src/molecules/confirmation-modal/styles/confirmationModalStyles.ts +6 -7
  38. package/src/presentation/utils/variants/__tests__/core.test.ts +0 -1
  39. package/src/responsive/gridUtils.ts +1 -1
  40. package/src/responsive/index.ts +36 -20
  41. package/src/responsive/responsive.ts +2 -2
  42. package/src/responsive/responsiveLayout.ts +1 -1
  43. package/src/responsive/responsiveModal.ts +1 -1
  44. package/src/responsive/responsiveSizing.ts +1 -1
  45. package/src/responsive/useResponsive.ts +1 -1
  46. package/src/safe-area/__tests__/components/SafeAreaProvider.test.tsx +2 -2
  47. package/src/safe-area/__tests__/hooks/useContentSafeAreaPadding.test.tsx +2 -2
  48. package/src/safe-area/__tests__/hooks/useHeaderSafeAreaPadding.test.tsx +2 -2
  49. package/src/safe-area/__tests__/hooks/useSafeAreaInsets.test.tsx +2 -2
  50. package/src/safe-area/__tests__/hooks/useStatusBarSafeAreaPadding.test.tsx +2 -2
  51. package/src/safe-area/__tests__/integration/completeFlow.test.tsx +5 -4
  52. package/src/safe-area/__tests__/utils/testUtils.tsx +5 -4
  53. package/src/theme/infrastructure/stores/themeStore.ts +0 -2
  54. package/src/typography/presentation/utils/textColorUtils.ts +0 -1
@@ -1,15 +1,15 @@
1
1
  /**
2
2
  * Tests for useStatusBarSafeAreaPadding hook
3
3
  */
4
+ import { describe, it, expect } from '@jest/globals';
5
+ import { useStatusBarSafeAreaPadding } from '../../hooks/useStatusBarSafeAreaPadding';
4
6
 
5
7
  describe('useStatusBarSafeAreaPadding', () => {
6
8
  it('should be defined', () => {
7
- const { useStatusBarSafeAreaPadding } = require('../../hooks/useStatusBarSafeAreaPadding');
8
9
  expect(useStatusBarSafeAreaPadding).toBeDefined();
9
10
  });
10
11
 
11
12
  it('should return function', () => {
12
- const { useStatusBarSafeAreaPadding } = require('../../hooks/useStatusBarSafeAreaPadding');
13
13
  expect(typeof useStatusBarSafeAreaPadding).toBe('function');
14
14
  });
15
15
  });
@@ -1,25 +1,26 @@
1
1
  /**
2
2
  * Integration tests for complete flow
3
3
  */
4
+ import { describe, it, expect } from '@jest/globals';
5
+ import { useSafeAreaInsets } from '../../hooks/useSafeAreaInsets';
6
+ import { useStatusBarSafeAreaPadding } from '../../hooks/useStatusBarSafeAreaPadding';
7
+ import { useHeaderSafeAreaPadding } from '../../hooks/useHeaderSafeAreaPadding';
8
+ import { useContentSafeAreaPadding } from '../../hooks/useContentSafeAreaPadding';
4
9
 
5
10
  describe('Integration Tests', () => {
6
11
  it('should import useSafeAreaInsets', () => {
7
- const { useSafeAreaInsets } = require('../../hooks/useSafeAreaInsets');
8
12
  expect(useSafeAreaInsets).toBeDefined();
9
13
  });
10
14
 
11
15
  it('should import useStatusBarSafeAreaPadding', () => {
12
- const { useStatusBarSafeAreaPadding } = require('../../hooks/useStatusBarSafeAreaPadding');
13
16
  expect(useStatusBarSafeAreaPadding).toBeDefined();
14
17
  });
15
18
 
16
19
  it('should import useHeaderSafeAreaPadding', () => {
17
- const { useHeaderSafeAreaPadding } = require('../../hooks/useHeaderSafeAreaPadding');
18
20
  expect(useHeaderSafeAreaPadding).toBeDefined();
19
21
  });
20
22
 
21
23
  it('should import useContentSafeAreaPadding', () => {
22
- const { useContentSafeAreaPadding } = require('../../hooks/useContentSafeAreaPadding');
23
24
  expect(useContentSafeAreaPadding).toBeDefined();
24
25
  });
25
26
  });
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Simple test utilities for safe area package
3
3
  */
4
+ import { describe, it, expect, jest } from '@jest/globals';
4
5
 
5
6
  export const mockSafeAreaInsets = {
6
7
  top: 44,
@@ -9,7 +10,7 @@ export const mockSafeAreaInsets = {
9
10
  right: 0,
10
11
  };
11
12
 
12
- export const createWrapper = (insets = mockSafeAreaInsets) => {
13
+ export const createWrapper = () => {
13
14
  return ({ children }: { children: any }) => children;
14
15
  };
15
16
 
@@ -21,11 +22,11 @@ export const renderHookWithSafeArea = <T, P>(
21
22
  insets?: typeof mockSafeAreaInsets;
22
23
  },
23
24
  ) => {
24
- const wrapper = options?.wrapper || createWrapper(options?.insets);
25
-
25
+ // wrapper not used in this stub implementation
26
+
26
27
  return {
27
28
  result: { current: hook(options?.initialProps as P) },
28
- rerender: () => {},
29
+ rerender: () => { },
29
30
  };
30
31
  };
31
32
 
@@ -66,7 +66,6 @@ export const useTheme = create<ThemeState>()((set: any, get: any) => ({
66
66
  useDesignSystemTheme.getState().setThemeMode('dark');
67
67
  }
68
68
  } catch (error) {
69
- /* eslint-disable-next-line no-console */
70
69
  if (__DEV__) console.error('[ThemeStore] Initialization error:', error);
71
70
  // Silent failure - still mark as initialized to prevent blocking
72
71
  set({ isInitialized: true });
@@ -90,7 +89,6 @@ export const useTheme = create<ThemeState>()((set: any, get: any) => ({
90
89
  // Sync with design system global theme
91
90
  useDesignSystemTheme.getState().setThemeMode(mode);
92
91
  } catch (error) {
93
- /* eslint-disable-next-line no-console */
94
92
  if (__DEV__) console.error('[ThemeStore] Error setting theme mode:', error);
95
93
  }
96
94
  },
@@ -124,7 +124,6 @@ class MaterialColorMapper implements ColorMapper {
124
124
 
125
125
  default:
126
126
  if (__DEV__) {
127
- // eslint-disable-next-line no-console
128
127
  console.warn(`Unknown color variant: ${color}`);
129
128
  }
130
129
  return tokens.colors.textPrimary;