@umituz/react-native-design-system 1.5.0 → 1.7.1

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 (105) hide show
  1. package/lib/index.d.ts +2 -4
  2. package/lib/index.d.ts.map +1 -1
  3. package/lib/index.js +17 -17
  4. package/lib/index.js.map +1 -1
  5. package/lib/presentation/atoms/AtomicButton.d.ts +1 -1
  6. package/lib/presentation/atoms/AtomicButton.d.ts.map +1 -1
  7. package/lib/presentation/atoms/AtomicButton.js +1 -1
  8. package/lib/presentation/atoms/AtomicButton.js.map +1 -1
  9. package/lib/presentation/atoms/AtomicFormError.js +1 -1
  10. package/lib/presentation/atoms/AtomicFormError.js.map +1 -1
  11. package/lib/presentation/atoms/AtomicIcon.d.ts +2 -3
  12. package/lib/presentation/atoms/AtomicIcon.d.ts.map +1 -1
  13. package/lib/presentation/atoms/AtomicIcon.js +1 -1
  14. package/lib/presentation/atoms/AtomicIcon.js.map +1 -1
  15. package/lib/presentation/atoms/fab/styles/fabStyles.d.ts +1 -1
  16. package/lib/presentation/atoms/fab/styles/fabStyles.d.ts.map +1 -1
  17. package/lib/presentation/atoms/index.d.ts +1 -1
  18. package/lib/presentation/atoms/picker/styles/pickerStyles.d.ts +4 -15
  19. package/lib/presentation/atoms/picker/styles/pickerStyles.d.ts.map +1 -1
  20. package/lib/presentation/atoms/picker/styles/pickerStyles.js.map +1 -1
  21. package/lib/presentation/hooks/useAppDesignTokens.d.ts +6 -27
  22. package/lib/presentation/hooks/useAppDesignTokens.d.ts.map +1 -1
  23. package/lib/presentation/hooks/useAppDesignTokens.js +6 -32
  24. package/lib/presentation/hooks/useAppDesignTokens.js.map +1 -1
  25. package/lib/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.d.ts +1 -1
  26. package/lib/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.d.ts.map +1 -1
  27. package/lib/presentation/organisms/AppHeader.d.ts +3 -2
  28. package/lib/presentation/organisms/AppHeader.d.ts.map +1 -1
  29. package/lib/presentation/organisms/AppHeader.js.map +1 -1
  30. package/package.json +13 -3
  31. package/src/index.ts +34 -29
  32. package/src/presentation/atoms/AtomicBadge.tsx +1 -1
  33. package/src/presentation/atoms/AtomicButton.tsx +2 -2
  34. package/src/presentation/atoms/AtomicFormError.tsx +1 -1
  35. package/src/presentation/atoms/AtomicIcon.tsx +3 -4
  36. package/src/presentation/atoms/fab/styles/fabStyles.ts +1 -1
  37. package/src/presentation/atoms/picker/styles/pickerStyles.ts +25 -5
  38. package/src/presentation/hooks/useAppDesignTokens.ts +6 -33
  39. package/src/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.ts +1 -1
  40. package/src/presentation/organisms/AppHeader.tsx +3 -2
  41. package/lib/domains/icons/domain/config/IconLibraryConfig.d.ts +0 -91
  42. package/lib/domains/icons/domain/config/IconLibraryConfig.d.ts.map +0 -1
  43. package/lib/domains/icons/domain/config/IconLibraryConfig.js +0 -85
  44. package/lib/domains/icons/domain/config/IconLibraryConfig.js.map +0 -1
  45. package/lib/domains/icons/domain/entities/Icon.d.ts +0 -111
  46. package/lib/domains/icons/domain/entities/Icon.d.ts.map +0 -1
  47. package/lib/domains/icons/domain/entities/Icon.js +0 -87
  48. package/lib/domains/icons/domain/entities/Icon.js.map +0 -1
  49. package/lib/domains/icons/domain/interfaces/IIconAdapter.d.ts +0 -114
  50. package/lib/domains/icons/domain/interfaces/IIconAdapter.d.ts.map +0 -1
  51. package/lib/domains/icons/domain/interfaces/IIconAdapter.js +0 -17
  52. package/lib/domains/icons/domain/interfaces/IIconAdapter.js.map +0 -1
  53. package/lib/domains/icons/index.d.ts +0 -84
  54. package/lib/domains/icons/index.d.ts.map +0 -1
  55. package/lib/domains/icons/index.js +0 -89
  56. package/lib/domains/icons/index.js.map +0 -1
  57. package/lib/domains/icons/infrastructure/adapters/LucideAdapter.d.ts +0 -24
  58. package/lib/domains/icons/infrastructure/adapters/LucideAdapter.d.ts.map +0 -1
  59. package/lib/domains/icons/infrastructure/adapters/LucideAdapter.js +0 -85
  60. package/lib/domains/icons/infrastructure/adapters/LucideAdapter.js.map +0 -1
  61. package/lib/domains/icons/infrastructure/registries/ExpoIconRegistry.d.ts +0 -23
  62. package/lib/domains/icons/infrastructure/registries/ExpoIconRegistry.d.ts.map +0 -1
  63. package/lib/domains/icons/infrastructure/registries/ExpoIconRegistry.js +0 -178
  64. package/lib/domains/icons/infrastructure/registries/ExpoIconRegistry.js.map +0 -1
  65. package/lib/domains/icons/presentation/components/Icon.d.ts +0 -42
  66. package/lib/domains/icons/presentation/components/Icon.d.ts.map +0 -1
  67. package/lib/domains/icons/presentation/components/Icon.js +0 -86
  68. package/lib/domains/icons/presentation/components/Icon.js.map +0 -1
  69. package/lib/domains/icons/presentation/hooks/useIconLibrary.d.ts +0 -38
  70. package/lib/domains/icons/presentation/hooks/useIconLibrary.d.ts.map +0 -1
  71. package/lib/domains/icons/presentation/hooks/useIconLibrary.js +0 -114
  72. package/lib/domains/icons/presentation/hooks/useIconLibrary.js.map +0 -1
  73. package/lib/infrastructure/theme/globalThemeStore.d.ts +0 -42
  74. package/lib/infrastructure/theme/globalThemeStore.d.ts.map +0 -1
  75. package/lib/infrastructure/theme/globalThemeStore.js +0 -38
  76. package/lib/infrastructure/theme/globalThemeStore.js.map +0 -1
  77. package/lib/presentation/tokens/AppDesignTokens.d.ts +0 -14
  78. package/lib/presentation/tokens/AppDesignTokens.d.ts.map +0 -1
  79. package/lib/presentation/tokens/AppDesignTokens.js +0 -23
  80. package/lib/presentation/tokens/AppDesignTokens.js.map +0 -1
  81. package/lib/presentation/tokens/core/BaseTokens.d.ts +0 -312
  82. package/lib/presentation/tokens/core/BaseTokens.d.ts.map +0 -1
  83. package/lib/presentation/tokens/core/BaseTokens.js +0 -304
  84. package/lib/presentation/tokens/core/BaseTokens.js.map +0 -1
  85. package/lib/presentation/tokens/core/ColorPalette.d.ts +0 -216
  86. package/lib/presentation/tokens/core/ColorPalette.d.ts.map +0 -1
  87. package/lib/presentation/tokens/core/ColorPalette.js +0 -330
  88. package/lib/presentation/tokens/core/ColorPalette.js.map +0 -1
  89. package/lib/presentation/tokens/core/TokenFactory.d.ts +0 -216
  90. package/lib/presentation/tokens/core/TokenFactory.d.ts.map +0 -1
  91. package/lib/presentation/tokens/core/TokenFactory.js +0 -86
  92. package/lib/presentation/tokens/core/TokenFactory.js.map +0 -1
  93. package/src/domains/icons/domain/config/IconLibraryConfig.ts +0 -93
  94. package/src/domains/icons/domain/entities/Icon.ts +0 -143
  95. package/src/domains/icons/domain/interfaces/IIconAdapter.ts +0 -147
  96. package/src/domains/icons/index.ts +0 -109
  97. package/src/domains/icons/infrastructure/adapters/LucideAdapter.ts +0 -100
  98. package/src/domains/icons/infrastructure/registries/ExpoIconRegistry.ts +0 -191
  99. package/src/domains/icons/presentation/components/Icon.tsx +0 -132
  100. package/src/domains/icons/presentation/hooks/useIconLibrary.ts +0 -141
  101. package/src/infrastructure/theme/globalThemeStore.ts +0 -51
  102. package/src/presentation/tokens/AppDesignTokens.ts +0 -55
  103. package/src/presentation/tokens/core/BaseTokens.ts +0 -372
  104. package/src/presentation/tokens/core/ColorPalette.ts +0 -400
  105. package/src/presentation/tokens/core/TokenFactory.ts +0 -118
@@ -1,51 +0,0 @@
1
- /**
2
- * Global Theme Store for Design System
3
- *
4
- * Minimal Zustand store for theme state management.
5
- * Apps can sync their theme state with this global store.
6
- *
7
- * WHY THIS EXISTS:
8
- * - ScreenLayout needs to know current theme mode
9
- * - Without prop drilling or Context API
10
- * - Single source of truth for design system components
11
- * - Apps control theme, design system reacts
12
- *
13
- * USAGE IN APP:
14
- * ```typescript
15
- * import { useDesignSystemTheme } from '@umituz/react-native-design-system';
16
- * import { useTheme } from '@domains/theme';
17
- *
18
- * // Sync app theme with design system
19
- * const { themeMode } = useTheme();
20
- * const { setThemeMode } = useDesignSystemTheme();
21
- *
22
- * useEffect(() => {
23
- * setThemeMode(themeMode);
24
- * }, [themeMode]);
25
- * ```
26
- */
27
-
28
- import { create } from 'zustand';
29
- import type { ThemeMode } from '../../presentation/tokens/core/ColorPalette';
30
-
31
- interface GlobalThemeStore {
32
- /** Current theme mode */
33
- themeMode: ThemeMode;
34
-
35
- /** Update theme mode (called by app when theme changes) */
36
- setThemeMode: (mode: ThemeMode) => void;
37
- }
38
-
39
- /**
40
- * Global theme store for design system components
41
- *
42
- * This is a MINIMAL store - app has the real theme logic.
43
- * Design system just mirrors the current theme for its components.
44
- */
45
- export const useDesignSystemTheme = create<GlobalThemeStore>((set) => ({
46
- themeMode: 'light',
47
- setThemeMode: (mode: ThemeMode) => set({ themeMode: mode }),
48
- }));
49
-
50
- // Re-export ThemeMode for backward compatibility
51
- export type { ThemeMode };
@@ -1,55 +0,0 @@
1
- /**
2
- * DESIGN TOKENS - PUBLIC API
3
- *
4
- * ✅ CLEAN BARREL EXPORT - Single source of truth
5
- * ✅ ZERO DUPLICATION - All tokens from TokenFactory
6
- * ✅ TYPE-SAFE - Full TypeScript support
7
- * ✅ FACTORY-FIRST - Benefits all 100+ generated apps
8
- *
9
- * @module AppDesignTokens
10
- */
11
-
12
- // =============================================================================
13
- // CORE EXPORTS (from TokenFactory)
14
- // =============================================================================
15
-
16
- export {
17
- createDesignTokens,
18
- STATIC_DESIGN_TOKENS,
19
- STATIC_TOKENS,
20
- withAlpha,
21
- type DesignTokens,
22
- type ThemeMode,
23
- type ColorPalette,
24
- } from './core/TokenFactory';
25
-
26
- // =============================================================================
27
- // BASE TOKEN EXPORTS
28
- // =============================================================================
29
-
30
- export {
31
- BASE_TOKENS,
32
- spacing,
33
- typography,
34
- borders,
35
- iconSizes,
36
- opacity,
37
- avatarSizes,
38
- type Spacing,
39
- type Typography,
40
- type Borders,
41
- type IconSizes,
42
- type Opacity,
43
- type AvatarSizes,
44
- type BaseTokens,
45
- } from './core/BaseTokens';
46
-
47
- // =============================================================================
48
- // COLOR PALETTE EXPORTS
49
- // =============================================================================
50
-
51
- export {
52
- lightColors,
53
- darkColors,
54
- getColorPalette,
55
- } from './core/ColorPalette';
@@ -1,372 +0,0 @@
1
- /**
2
- * BASE DESIGN TOKENS - SINGLE SOURCE OF TRUTH
3
- *
4
- * ✅ STATIC tokens that don't change with theme
5
- * ✅ DRY Principle - Each value defined ONCE
6
- * ✅ Type-safe with full TypeScript support
7
- * ✅ Factory-first design for 100+ generated apps
8
- *
9
- * @module BaseTokens
10
- */
11
-
12
- import { TextStyle } from 'react-native';
13
-
14
- // =============================================================================
15
- // SPACING TOKENS
16
- // =============================================================================
17
-
18
- export const spacing = {
19
- // Base spacing scale
20
- xs: 4,
21
- sm: 8,
22
- md: 16,
23
- lg: 24,
24
- xl: 32,
25
- xxl: 48,
26
- xxxl: 64,
27
-
28
- // Component-specific spacing
29
- screenPadding: 20,
30
- cardPadding: 16,
31
- buttonPadding: 16,
32
- inputPadding: 8,
33
- sectionSpacing: 24,
34
-
35
- // Icon sizes
36
- iconSizeSmall: 16,
37
- iconSizeMedium: 20,
38
- iconSizeLarge: 24,
39
- iconSizeXLarge: 32,
40
- iconSizeHero: 64,
41
-
42
- // Component heights
43
- buttonHeight: 48,
44
- inputHeight: 48,
45
- appBarHeight: 56,
46
- tabBarHeight: 60,
47
- } as const;
48
-
49
- // =============================================================================
50
- // TYPOGRAPHY TOKENS
51
- // =============================================================================
52
-
53
- export const typography = {
54
- // Font families
55
- fontPrimary: 'System',
56
- fontSecondary: 'System',
57
- fontMono: 'Courier New',
58
-
59
- // Font sizes
60
- xs: 12,
61
- sm: 14,
62
- md: 16,
63
- lg: 18,
64
- xl: 20,
65
- xxl: 24,
66
- xxxl: 32,
67
-
68
- // Font weights
69
- light: '300' as const,
70
- regular: '400' as const,
71
- medium: '500' as const,
72
- semibold: '600' as const,
73
- bold: '700' as const,
74
-
75
- // Line heights
76
- lineHeightTight: 1.2,
77
- lineHeightNormal: 1.5,
78
- lineHeightRelaxed: 1.7,
79
-
80
- // =============================================================================
81
- // MATERIAL DESIGN 3 TYPE SCALE
82
- // =============================================================================
83
-
84
- // Display styles (largest)
85
- displayLarge: {
86
- fontSize: 57,
87
- fontWeight: '400' as const,
88
- lineHeight: 64,
89
- } as TextStyle,
90
-
91
- displayMedium: {
92
- fontSize: 45,
93
- fontWeight: '400' as const,
94
- lineHeight: 52,
95
- } as TextStyle,
96
-
97
- displaySmall: {
98
- fontSize: 36,
99
- fontWeight: '400' as const,
100
- lineHeight: 44,
101
- } as TextStyle,
102
-
103
- // Headline styles
104
- headlineLarge: {
105
- fontSize: 32,
106
- fontWeight: '400' as const,
107
- lineHeight: 40,
108
- } as TextStyle,
109
-
110
- headlineMedium: {
111
- fontSize: 28,
112
- fontWeight: '400' as const,
113
- lineHeight: 36,
114
- } as TextStyle,
115
-
116
- headlineSmall: {
117
- fontSize: 24,
118
- fontWeight: '400' as const,
119
- lineHeight: 32,
120
- } as TextStyle,
121
-
122
- // Title styles
123
- titleLarge: {
124
- fontSize: 22,
125
- fontWeight: '400' as const,
126
- lineHeight: 28,
127
- } as TextStyle,
128
-
129
- titleMedium: {
130
- fontSize: 16,
131
- fontWeight: '500' as const,
132
- lineHeight: 24,
133
- } as TextStyle,
134
-
135
- titleSmall: {
136
- fontSize: 14,
137
- fontWeight: '500' as const,
138
- lineHeight: 20,
139
- } as TextStyle,
140
-
141
- // Body styles
142
- bodyLarge: {
143
- fontSize: 18,
144
- fontWeight: '400' as const,
145
- lineHeight: 27,
146
- } as TextStyle,
147
-
148
- bodyMedium: {
149
- fontSize: 16,
150
- fontWeight: '400' as const,
151
- lineHeight: 24,
152
- } as TextStyle,
153
-
154
- bodySmall: {
155
- fontSize: 14,
156
- fontWeight: '400' as const,
157
- lineHeight: 21,
158
- } as TextStyle,
159
-
160
- // Label styles
161
- labelLarge: {
162
- fontSize: 16,
163
- fontWeight: '500' as const,
164
- lineHeight: 19.2,
165
- } as TextStyle,
166
-
167
- labelMedium: {
168
- fontSize: 14,
169
- fontWeight: '500' as const,
170
- lineHeight: 16.8,
171
- } as TextStyle,
172
-
173
- labelSmall: {
174
- fontSize: 12,
175
- fontWeight: '500' as const,
176
- lineHeight: 14.4,
177
- } as TextStyle,
178
-
179
- // =============================================================================
180
- // LEGACY SUPPORT (backwards compatibility)
181
- // =============================================================================
182
-
183
- headingLarge: {
184
- fontSize: 32,
185
- fontWeight: '700' as const,
186
- lineHeight: 38.4,
187
- } as TextStyle,
188
-
189
- headingMedium: {
190
- fontSize: 24,
191
- fontWeight: '600' as const,
192
- lineHeight: 28.8,
193
- } as TextStyle,
194
-
195
- headingSmall: {
196
- fontSize: 20,
197
- fontWeight: '600' as const,
198
- lineHeight: 24,
199
- } as TextStyle,
200
-
201
- button: {
202
- fontSize: 16,
203
- fontWeight: '600' as const,
204
- lineHeight: 19.2,
205
- } as TextStyle,
206
-
207
- caption: {
208
- fontSize: 12,
209
- fontWeight: '400' as const,
210
- lineHeight: 18,
211
- } as TextStyle,
212
-
213
- overline: {
214
- fontSize: 12,
215
- fontWeight: '500' as const,
216
- lineHeight: 18,
217
- textTransform: 'uppercase' as const,
218
- letterSpacing: 1,
219
- } as TextStyle,
220
- } as const;
221
-
222
- // =============================================================================
223
- // OPACITY TOKENS
224
- // =============================================================================
225
-
226
- export const opacity = {
227
- disabled: 0.6,
228
- subtle: 0.8,
229
- medium: 0.5,
230
- light: 0.3,
231
- veryLight: 0.1,
232
- } as const;
233
-
234
- // =============================================================================
235
- // BORDER TOKENS
236
- // =============================================================================
237
-
238
- export const borders = {
239
- // Radius scale
240
- radius: {
241
- none: 0,
242
- xs: 2,
243
- sm: 4,
244
- md: 8,
245
- lg: 12,
246
- xl: 16,
247
- xxl: 24,
248
- full: 9999,
249
- },
250
-
251
- // Width scale
252
- width: {
253
- none: 0,
254
- thin: 1,
255
- medium: 2,
256
- thick: 4,
257
- },
258
-
259
- // Component-specific borders (without colors - colors injected by TokenFactory)
260
- button: {
261
- borderRadius: 8,
262
- borderWidth: 0,
263
- },
264
-
265
- card: {
266
- borderRadius: 12,
267
- borderWidth: 1,
268
- },
269
-
270
- input: {
271
- borderRadius: 8,
272
- borderWidth: 1,
273
- },
274
-
275
- pill: {
276
- borderRadius: 9999,
277
- borderWidth: 0,
278
- },
279
- } as const;
280
-
281
- // =============================================================================
282
- // COMPONENT SIZES (Touch Targets, Buttons, UI Elements)
283
- // =============================================================================
284
-
285
- export const sizes = {
286
- // Touch targets (Apple HIG minimum: 44x44)
287
- touchTarget: 44,
288
- touchTargetSmall: 36,
289
- touchTargetLarge: 56,
290
-
291
- // Button heights
292
- buttonHeight: {
293
- sm: 40,
294
- md: 48,
295
- lg: 56,
296
- xl: 64,
297
- },
298
-
299
- // Pagination dots (onboarding, carousels)
300
- dot: {
301
- inactive: 8,
302
- active: 24,
303
- },
304
-
305
- // Progress bars
306
- progressBar: {
307
- thin: 2,
308
- normal: 4,
309
- thick: 6,
310
- },
311
-
312
- // Common UI element sizes
313
- divider: 1,
314
- separator: 2,
315
- } as const;
316
-
317
- // =============================================================================
318
- // ICON SIZES
319
- // =============================================================================
320
-
321
- export const iconSizes = {
322
- xs: 12,
323
- sm: 16,
324
- md: 20,
325
- lg: 24,
326
- xl: 32,
327
- xxl: 40,
328
- } as const;
329
-
330
- // =============================================================================
331
- // AVATAR SIZES
332
- // =============================================================================
333
-
334
- export const avatarSizes = {
335
- xs: 24,
336
- sm: 32,
337
- md: 40,
338
- lg: 48,
339
- xl: 64,
340
- xxl: 80,
341
- } as const;
342
-
343
- // =============================================================================
344
- // CONSOLIDATED STATIC TOKENS
345
- // =============================================================================
346
-
347
- /**
348
- * All static design tokens in one place
349
- * These values DON'T change with theme (light/dark)
350
- */
351
- export const BASE_TOKENS = {
352
- spacing,
353
- typography,
354
- opacity,
355
- borders,
356
- sizes,
357
- iconSizes,
358
- avatarSizes,
359
- } as const;
360
-
361
- // =============================================================================
362
- // TYPE EXPORTS
363
- // =============================================================================
364
-
365
- export type Spacing = typeof spacing;
366
- export type Typography = typeof typography;
367
- export type Opacity = typeof opacity;
368
- export type Borders = typeof borders;
369
- export type Sizes = typeof sizes;
370
- export type IconSizes = typeof iconSizes;
371
- export type AvatarSizes = typeof avatarSizes;
372
- export type BaseTokens = typeof BASE_TOKENS;