@umituz/react-native-design-system 2.6.65 → 2.6.67

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 (25) hide show
  1. package/package.json +1 -1
  2. package/src/atoms/AtomicDatePicker.tsx +5 -63
  3. package/src/atoms/AtomicInput.tsx +3 -14
  4. package/src/atoms/AtomicPicker.tsx +10 -21
  5. package/src/atoms/datepicker/hooks/useDatePickerText.ts +64 -0
  6. package/src/atoms/datepicker/styles/datePickerStyles.ts +27 -0
  7. package/src/atoms/input/styles/inputStyles.ts +18 -0
  8. package/src/atoms/picker/components/PickerIcons.tsx +56 -0
  9. package/src/atoms/picker/styles/pickerModalStyles.ts +36 -0
  10. package/src/atoms/picker/styles/pickerOptionStyles.ts +32 -0
  11. package/src/atoms/picker/styles/pickerSearchStyles.ts +25 -0
  12. package/src/atoms/picker/styles/pickerStateStyles.ts +42 -0
  13. package/src/atoms/picker/styles/pickerStyles.ts +78 -184
  14. package/src/molecules/calendar/presentation/components/AtomicCalendar.tsx +19 -160
  15. package/src/molecules/calendar/presentation/components/CalendarDayCell.tsx +101 -0
  16. package/src/molecules/calendar/presentation/components/CalendarWeekdayHeader.tsx +28 -0
  17. package/src/molecules/calendar/presentation/components/calendarStyles.ts +56 -0
  18. package/src/theme/hooks/commonStyles/formStyles.ts +17 -0
  19. package/src/theme/hooks/commonStyles/layoutStyles.ts +38 -0
  20. package/src/theme/hooks/commonStyles/paddingStyles.ts +20 -0
  21. package/src/theme/hooks/commonStyles/screenContainerStyles.ts +22 -0
  22. package/src/theme/hooks/commonStyles/scrollContainerStyles.ts +28 -0
  23. package/src/theme/hooks/commonStyles/sectionStyles.ts +17 -0
  24. package/src/theme/hooks/commonStyles/textStyles.ts +36 -0
  25. package/src/theme/hooks/useCommonStyles.ts +15 -219
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Form Styles
3
+ */
4
+
5
+ import type { ViewStyle } from 'react-native';
6
+ import type { DesignTokens } from '../../types/ThemeTypes';
7
+
8
+ export const createFormStyles = (tokens: DesignTokens) => ({
9
+ form: {
10
+ width: '100%',
11
+ } as ViewStyle,
12
+
13
+ formHeader: {
14
+ alignItems: 'center',
15
+ marginBottom: tokens.spacing.xl,
16
+ } as ViewStyle,
17
+ });
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Layout Styles
3
+ */
4
+
5
+ import type { ViewStyle } from 'react-native';
6
+ import type { DesignTokens } from '../../types/ThemeTypes';
7
+
8
+ export const createLayoutStyles = (tokens: DesignTokens) => ({
9
+ centerContainer: {
10
+ flex: 1,
11
+ justifyContent: 'center',
12
+ alignItems: 'center',
13
+ } as ViewStyle,
14
+
15
+ centerContainerPadded: {
16
+ flex: 1,
17
+ justifyContent: 'center',
18
+ alignItems: 'center',
19
+ paddingHorizontal: tokens.spacing.xl,
20
+ } as ViewStyle,
21
+
22
+ row: {
23
+ flexDirection: 'row',
24
+ alignItems: 'center',
25
+ } as ViewStyle,
26
+
27
+ rowBetween: {
28
+ flexDirection: 'row',
29
+ alignItems: 'center',
30
+ justifyContent: 'space-between',
31
+ } as ViewStyle,
32
+
33
+ rowCenter: {
34
+ flexDirection: 'row',
35
+ alignItems: 'center',
36
+ justifyContent: 'center',
37
+ } as ViewStyle,
38
+ });
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Padding Styles
3
+ */
4
+
5
+ import type { ViewStyle } from 'react-native';
6
+ import type { DesignTokens } from '../../types/ThemeTypes';
7
+
8
+ export const createPaddingStyles = (tokens: DesignTokens) => ({
9
+ paddedHorizontal: {
10
+ paddingHorizontal: tokens.spacing.lg,
11
+ } as ViewStyle,
12
+
13
+ paddedVertical: {
14
+ paddingVertical: tokens.spacing.lg,
15
+ } as ViewStyle,
16
+
17
+ padded: {
18
+ padding: tokens.spacing.lg,
19
+ } as ViewStyle,
20
+ });
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Screen Container Styles
3
+ */
4
+
5
+ import type { ViewStyle } from 'react-native';
6
+ import type { DesignTokens } from '../../types/ThemeTypes';
7
+
8
+ export const createScreenContainerStyles = (tokens: DesignTokens) => ({
9
+ screenContainer: {
10
+ flex: 1,
11
+ backgroundColor: tokens.colors.backgroundPrimary,
12
+ } as ViewStyle,
13
+
14
+ flexContainer: {
15
+ flex: 1,
16
+ } as ViewStyle,
17
+
18
+ screenContainerSecondary: {
19
+ flex: 1,
20
+ backgroundColor: tokens.colors.backgroundSecondary,
21
+ } as ViewStyle,
22
+ });
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Scroll Container Styles
3
+ */
4
+
5
+ import type { ViewStyle } from 'react-native';
6
+ import type { DesignTokens } from '../../types/ThemeTypes';
7
+
8
+ export const createScrollContainerStyles = (tokens: DesignTokens) => ({
9
+ scrollView: {
10
+ flex: 1,
11
+ } as ViewStyle,
12
+
13
+ scrollContent: {
14
+ paddingHorizontal: tokens.spacing.lg,
15
+ paddingBottom: tokens.spacing.xl,
16
+ } as ViewStyle,
17
+
18
+ scrollContentGrow: {
19
+ flexGrow: 1,
20
+ padding: tokens.spacing.lg,
21
+ } as ViewStyle,
22
+
23
+ scrollContentCentered: {
24
+ flexGrow: 1,
25
+ padding: tokens.spacing.lg,
26
+ justifyContent: 'center',
27
+ } as ViewStyle,
28
+ });
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Section Styles
3
+ */
4
+
5
+ import type { ViewStyle } from 'react-native';
6
+ import type { DesignTokens } from '../../types/ThemeTypes';
7
+
8
+ export const createSectionStyles = (tokens: DesignTokens) => ({
9
+ section: {
10
+ marginBottom: tokens.spacing.xl,
11
+ } as ViewStyle,
12
+
13
+ sectionPadded: {
14
+ marginBottom: tokens.spacing.xl,
15
+ paddingHorizontal: tokens.spacing.lg,
16
+ } as ViewStyle,
17
+ });
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Text Styles
3
+ */
4
+
5
+ import type { TextStyle } from 'react-native';
6
+ import type { DesignTokens } from '../../types/ThemeTypes';
7
+
8
+ export const createTextStyles = (tokens: DesignTokens) => ({
9
+ screenTitle: {
10
+ ...tokens.typography.headingLarge,
11
+ color: tokens.colors.textPrimary,
12
+ marginBottom: tokens.spacing.sm,
13
+ } as TextStyle,
14
+
15
+ sectionTitle: {
16
+ ...tokens.typography.headingMedium,
17
+ color: tokens.colors.textPrimary,
18
+ marginBottom: tokens.spacing.md,
19
+ } as TextStyle,
20
+
21
+ subtitle: {
22
+ ...tokens.typography.bodyMedium,
23
+ color: tokens.colors.textSecondary,
24
+ textAlign: 'center',
25
+ } as TextStyle,
26
+
27
+ bodyText: {
28
+ ...tokens.typography.bodyMedium,
29
+ color: tokens.colors.textPrimary,
30
+ } as TextStyle,
31
+
32
+ secondaryText: {
33
+ ...tokens.typography.bodySmall,
34
+ color: tokens.colors.textSecondary,
35
+ } as TextStyle,
36
+ });
@@ -16,8 +16,14 @@
16
16
  */
17
17
 
18
18
  import { useMemo } from 'react';
19
- import type { ViewStyle, TextStyle } from 'react-native';
20
19
  import { useAppDesignTokens } from './useAppDesignTokens';
20
+ import { createScreenContainerStyles } from './commonStyles/screenContainerStyles';
21
+ import { createScrollContainerStyles } from './commonStyles/scrollContainerStyles';
22
+ import { createLayoutStyles } from './commonStyles/layoutStyles';
23
+ import { createPaddingStyles } from './commonStyles/paddingStyles';
24
+ import { createSectionStyles } from './commonStyles/sectionStyles';
25
+ import { createTextStyles } from './commonStyles/textStyles';
26
+ import { createFormStyles } from './commonStyles/formStyles';
21
27
 
22
28
  /**
23
29
  * Hook to get common styles with dynamic theme support
@@ -25,224 +31,14 @@ import { useAppDesignTokens } from './useAppDesignTokens';
25
31
  */
26
32
  export const useCommonStyles = () => {
27
33
  const tokens = useAppDesignTokens();
28
-
34
+
29
35
  return useMemo(() => ({
30
- // ========================================================================
31
- // SCREEN CONTAINERS
32
- // ========================================================================
33
- /**
34
- * Standard full-screen container
35
- * Most common pattern: flex: 1 with background color
36
- */
37
- screenContainer: {
38
- flex: 1,
39
- backgroundColor: tokens.colors.backgroundPrimary,
40
- } as ViewStyle,
41
-
42
- /**
43
- * Basic flex container without background
44
- * Use when background is set elsewhere or not needed
45
- */
46
- flexContainer: {
47
- flex: 1,
48
- } as ViewStyle,
49
-
50
- /**
51
- * Screen container with secondary background
52
- */
53
- screenContainerSecondary: {
54
- flex: 1,
55
- backgroundColor: tokens.colors.backgroundSecondary,
56
- } as ViewStyle,
57
-
58
- // ========================================================================
59
- // SCROLL CONTAINERS
60
- // ========================================================================
61
- /**
62
- * Standard ScrollView wrapper
63
- */
64
- scrollView: {
65
- flex: 1,
66
- } as ViewStyle,
67
-
68
- /**
69
- * ScrollView content container with standard padding
70
- */
71
- scrollContent: {
72
- paddingHorizontal: tokens.spacing.lg,
73
- paddingBottom: tokens.spacing.xl,
74
- } as ViewStyle,
75
-
76
- /**
77
- * ScrollView content that grows to fill available space
78
- */
79
- scrollContentGrow: {
80
- flexGrow: 1,
81
- padding: tokens.spacing.lg,
82
- } as ViewStyle,
83
-
84
- /**
85
- * Centered scroll content (for forms, onboarding screens)
86
- */
87
- scrollContentCentered: {
88
- flexGrow: 1,
89
- padding: tokens.spacing.lg,
90
- justifyContent: 'center',
91
- } as ViewStyle,
92
-
93
- // ========================================================================
94
- // LAYOUT UTILITIES
95
- // ========================================================================
96
- /**
97
- * Centered container - both horizontal and vertical
98
- * Perfect for empty states, splash screens
99
- */
100
- centerContainer: {
101
- flex: 1,
102
- justifyContent: 'center',
103
- alignItems: 'center',
104
- } as ViewStyle,
105
-
106
- /**
107
- * Centered container with padding
108
- */
109
- centerContainerPadded: {
110
- flex: 1,
111
- justifyContent: 'center',
112
- alignItems: 'center',
113
- paddingHorizontal: tokens.spacing.xl,
114
- } as ViewStyle,
115
-
116
- /**
117
- * Horizontal row layout
118
- */
119
- row: {
120
- flexDirection: 'row',
121
- alignItems: 'center',
122
- } as ViewStyle,
123
-
124
- /**
125
- * Horizontal row with space between
126
- */
127
- rowBetween: {
128
- flexDirection: 'row',
129
- alignItems: 'center',
130
- justifyContent: 'space-between',
131
- } as ViewStyle,
132
-
133
- /**
134
- * Horizontal row centered
135
- */
136
- rowCenter: {
137
- flexDirection: 'row',
138
- alignItems: 'center',
139
- justifyContent: 'center',
140
- } as ViewStyle,
141
-
142
- // ========================================================================
143
- // PADDING UTILITIES
144
- // ========================================================================
145
- /**
146
- * Standard horizontal padding
147
- */
148
- paddedHorizontal: {
149
- paddingHorizontal: tokens.spacing.lg,
150
- } as ViewStyle,
151
-
152
- /**
153
- * Standard vertical padding
154
- */
155
- paddedVertical: {
156
- paddingVertical: tokens.spacing.lg,
157
- } as ViewStyle,
158
-
159
- /**
160
- * Standard padding all sides
161
- */
162
- padded: {
163
- padding: tokens.spacing.lg,
164
- } as ViewStyle,
165
-
166
- // ========================================================================
167
- // SECTION STYLES
168
- // ========================================================================
169
- /**
170
- * Standard section container
171
- */
172
- section: {
173
- marginBottom: tokens.spacing.xl,
174
- } as ViewStyle,
175
-
176
- /**
177
- * Section with padding
178
- */
179
- sectionPadded: {
180
- marginBottom: tokens.spacing.xl,
181
- paddingHorizontal: tokens.spacing.lg,
182
- } as ViewStyle,
183
-
184
- // ========================================================================
185
- // TEXT STYLES
186
- // ========================================================================
187
- /**
188
- * Screen title - primary heading
189
- */
190
- screenTitle: {
191
- ...tokens.typography.headingLarge,
192
- color: tokens.colors.textPrimary,
193
- marginBottom: tokens.spacing.sm,
194
- } as TextStyle,
195
-
196
- /**
197
- * Section title
198
- */
199
- sectionTitle: {
200
- ...tokens.typography.headingMedium,
201
- color: tokens.colors.textPrimary,
202
- marginBottom: tokens.spacing.md,
203
- } as TextStyle,
204
-
205
- /**
206
- * Subtitle/description text
207
- */
208
- subtitle: {
209
- ...tokens.typography.bodyMedium,
210
- color: tokens.colors.textSecondary,
211
- textAlign: 'center',
212
- } as TextStyle,
213
-
214
- /**
215
- * Body text
216
- */
217
- bodyText: {
218
- ...tokens.typography.bodyMedium,
219
- color: tokens.colors.textPrimary,
220
- } as TextStyle,
221
-
222
- /**
223
- * Secondary text (muted)
224
- */
225
- secondaryText: {
226
- ...tokens.typography.bodySmall,
227
- color: tokens.colors.textSecondary,
228
- } as TextStyle,
229
-
230
- // ========================================================================
231
- // FORM STYLES
232
- // ========================================================================
233
- /**
234
- * Form container
235
- */
236
- form: {
237
- width: '100%',
238
- } as ViewStyle,
239
-
240
- /**
241
- * Form header section
242
- */
243
- formHeader: {
244
- alignItems: 'center',
245
- marginBottom: tokens.spacing.xl,
246
- } as ViewStyle,
36
+ ...createScreenContainerStyles(tokens),
37
+ ...createScrollContainerStyles(tokens),
38
+ ...createLayoutStyles(tokens),
39
+ ...createPaddingStyles(tokens),
40
+ ...createSectionStyles(tokens),
41
+ ...createTextStyles(tokens),
42
+ ...createFormStyles(tokens),
247
43
  }), [tokens]);
248
44
  };