@umituz/react-native-design-system 1.3.5 → 1.4.0

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 (114) hide show
  1. package/README.md +1 -2
  2. package/lib/domains/icons/presentation/components/Icon.d.ts.map +1 -1
  3. package/lib/domains/icons/presentation/components/Icon.js.map +1 -1
  4. package/lib/index.d.ts +2 -6
  5. package/lib/index.d.ts.map +1 -1
  6. package/lib/index.js +2 -9
  7. package/lib/index.js.map +1 -1
  8. package/lib/presentation/atoms/AtomicBadge.js.map +1 -1
  9. package/lib/presentation/atoms/AtomicButton.d.ts +0 -1
  10. package/lib/presentation/atoms/AtomicButton.d.ts.map +1 -1
  11. package/lib/presentation/atoms/AtomicButton.js +7 -28
  12. package/lib/presentation/atoms/AtomicButton.js.map +1 -1
  13. package/lib/presentation/atoms/AtomicCard.d.ts.map +1 -1
  14. package/lib/presentation/atoms/AtomicCard.js +4 -23
  15. package/lib/presentation/atoms/AtomicCard.js.map +1 -1
  16. package/lib/presentation/atoms/AtomicDatePicker.js +1 -1
  17. package/lib/presentation/atoms/AtomicDatePicker.js.map +1 -1
  18. package/lib/presentation/atoms/AtomicFab.d.ts +0 -1
  19. package/lib/presentation/atoms/AtomicFab.d.ts.map +1 -1
  20. package/lib/presentation/atoms/AtomicFab.js +4 -5
  21. package/lib/presentation/atoms/AtomicFab.js.map +1 -1
  22. package/lib/presentation/atoms/AtomicImage.js.map +1 -1
  23. package/lib/presentation/atoms/AtomicPicker.js +1 -1
  24. package/lib/presentation/atoms/AtomicPicker.js.map +1 -1
  25. package/lib/presentation/atoms/AtomicProgress.d.ts +0 -3
  26. package/lib/presentation/atoms/AtomicProgress.d.ts.map +1 -1
  27. package/lib/presentation/atoms/AtomicProgress.js +1 -2
  28. package/lib/presentation/atoms/AtomicProgress.js.map +1 -1
  29. package/lib/presentation/atoms/AtomicSkeleton.d.ts +4 -10
  30. package/lib/presentation/atoms/AtomicSkeleton.d.ts.map +1 -1
  31. package/lib/presentation/atoms/AtomicSkeleton.js +7 -38
  32. package/lib/presentation/atoms/AtomicSkeleton.js.map +1 -1
  33. package/lib/presentation/atoms/AtomicSwitch.js.map +1 -1
  34. package/lib/presentation/atoms/AtomicTouchable.d.ts +1 -11
  35. package/lib/presentation/atoms/AtomicTouchable.d.ts.map +1 -1
  36. package/lib/presentation/atoms/AtomicTouchable.js +6 -19
  37. package/lib/presentation/atoms/AtomicTouchable.js.map +1 -1
  38. package/lib/presentation/atoms/fab/types/index.d.ts +0 -5
  39. package/lib/presentation/atoms/fab/types/index.d.ts.map +1 -1
  40. package/lib/presentation/atoms/touchable/styles/touchableStyles.d.ts +0 -5
  41. package/lib/presentation/atoms/touchable/styles/touchableStyles.d.ts.map +1 -1
  42. package/lib/presentation/atoms/touchable/styles/touchableStyles.js +0 -8
  43. package/lib/presentation/atoms/touchable/styles/touchableStyles.js.map +1 -1
  44. package/lib/presentation/atoms/touchable/types/index.d.ts +1 -7
  45. package/lib/presentation/atoms/touchable/types/index.d.ts.map +1 -1
  46. package/lib/presentation/molecules/AtomicConfirmationModal.d.ts.map +1 -1
  47. package/lib/presentation/molecules/AtomicConfirmationModal.js +2 -1
  48. package/lib/presentation/molecules/AtomicConfirmationModal.js.map +1 -1
  49. package/lib/presentation/molecules/languageswitcher/hooks/useLanguageNavigation.d.ts +1 -1
  50. package/lib/presentation/molecules/languageswitcher/hooks/useLanguageNavigation.d.ts.map +1 -1
  51. package/lib/presentation/molecules/languageswitcher/hooks/useLanguageNavigation.js +2 -0
  52. package/lib/presentation/molecules/languageswitcher/hooks/useLanguageNavigation.js.map +1 -1
  53. package/lib/presentation/organisms/ScreenLayout.d.ts +0 -15
  54. package/lib/presentation/organisms/ScreenLayout.d.ts.map +1 -1
  55. package/lib/presentation/organisms/ScreenLayout.js +1 -10
  56. package/lib/presentation/organisms/ScreenLayout.js.map +1 -1
  57. package/lib/presentation/tokens/AppDesignTokens.d.ts +1 -1
  58. package/lib/presentation/tokens/AppDesignTokens.d.ts.map +1 -1
  59. package/lib/presentation/tokens/AppDesignTokens.js +1 -1
  60. package/lib/presentation/tokens/AppDesignTokens.js.map +1 -1
  61. package/lib/presentation/tokens/commonStyles.d.ts +1 -1
  62. package/lib/presentation/tokens/commonStyles.js +1 -1
  63. package/lib/presentation/tokens/core/BaseTokens.d.ts +0 -25
  64. package/lib/presentation/tokens/core/BaseTokens.d.ts.map +1 -1
  65. package/lib/presentation/tokens/core/BaseTokens.js +0 -18
  66. package/lib/presentation/tokens/core/BaseTokens.js.map +1 -1
  67. package/lib/presentation/tokens/core/TokenFactory.d.ts +2 -15
  68. package/lib/presentation/tokens/core/TokenFactory.d.ts.map +1 -1
  69. package/lib/presentation/tokens/core/TokenFactory.js +1 -2
  70. package/lib/presentation/tokens/core/TokenFactory.js.map +1 -1
  71. package/package.json +1 -3
  72. package/src/domains/icons/presentation/components/Icon.tsx +3 -3
  73. package/src/index.ts +1 -27
  74. package/src/presentation/atoms/AtomicBadge.tsx +3 -3
  75. package/src/presentation/atoms/AtomicButton.tsx +8 -44
  76. package/src/presentation/atoms/AtomicCard.tsx +4 -32
  77. package/src/presentation/atoms/AtomicDatePicker.tsx +1 -1
  78. package/src/presentation/atoms/AtomicFab.tsx +6 -12
  79. package/src/presentation/atoms/AtomicImage.tsx +2 -2
  80. package/src/presentation/atoms/AtomicPicker.tsx +1 -1
  81. package/src/presentation/atoms/AtomicProgress.tsx +0 -4
  82. package/src/presentation/atoms/AtomicSkeleton.tsx +6 -57
  83. package/src/presentation/atoms/AtomicSwitch.tsx +2 -2
  84. package/src/presentation/atoms/AtomicTouchable.tsx +4 -28
  85. package/src/presentation/atoms/fab/types/index.ts +0 -6
  86. package/src/presentation/atoms/touchable/styles/touchableStyles.ts +0 -9
  87. package/src/presentation/atoms/touchable/types/index.ts +1 -8
  88. package/src/presentation/molecules/AtomicConfirmationModal.tsx +3 -2
  89. package/src/presentation/molecules/languageswitcher/hooks/useLanguageNavigation.ts +2 -0
  90. package/src/presentation/organisms/ScreenLayout.tsx +0 -40
  91. package/src/presentation/tokens/AppDesignTokens.ts +0 -2
  92. package/src/presentation/tokens/commonStyles.ts +1 -1
  93. package/src/presentation/tokens/core/BaseTokens.ts +0 -22
  94. package/src/presentation/tokens/core/TokenFactory.ts +2 -4
  95. package/lib/presentation/loading/index.d.ts +0 -23
  96. package/lib/presentation/loading/index.d.ts.map +0 -1
  97. package/lib/presentation/loading/index.js +0 -26
  98. package/lib/presentation/loading/index.js.map +0 -1
  99. package/lib/presentation/loading/presentation/components/LoadingSpinner.d.ts +0 -28
  100. package/lib/presentation/loading/presentation/components/LoadingSpinner.d.ts.map +0 -1
  101. package/lib/presentation/loading/presentation/components/LoadingSpinner.js +0 -77
  102. package/lib/presentation/loading/presentation/components/LoadingSpinner.js.map +0 -1
  103. package/lib/presentation/loading/presentation/components/LoadingState.d.ts +0 -39
  104. package/lib/presentation/loading/presentation/components/LoadingState.d.ts.map +0 -1
  105. package/lib/presentation/loading/presentation/components/LoadingState.js +0 -123
  106. package/lib/presentation/loading/presentation/components/LoadingState.js.map +0 -1
  107. package/lib/presentation/loading/presentation/hooks/useLoading.d.ts +0 -50
  108. package/lib/presentation/loading/presentation/hooks/useLoading.d.ts.map +0 -1
  109. package/lib/presentation/loading/presentation/hooks/useLoading.js +0 -49
  110. package/lib/presentation/loading/presentation/hooks/useLoading.js.map +0 -1
  111. package/src/presentation/loading/index.ts +0 -40
  112. package/src/presentation/loading/presentation/components/LoadingSpinner.tsx +0 -116
  113. package/src/presentation/loading/presentation/components/LoadingState.tsx +0 -200
  114. package/src/presentation/loading/presentation/hooks/useLoading.ts +0 -100
@@ -1,22 +1,22 @@
1
1
  /**
2
- * AtomicSkeleton - Universal Skeleton Loading Component
2
+ * AtomicSkeleton - Universal Skeleton Placeholder Component
3
3
  *
4
- * Displays animated skeleton placeholders for loading states
4
+ * Displays skeleton placeholders for content
5
5
  * Theme: {{THEME_NAME}} ({{CATEGORY}} category)
6
6
  *
7
7
  * Atomic Design Level: ATOM
8
- * Purpose: Loading state placeholder
8
+ * Purpose: Content placeholder
9
9
  *
10
10
  * Usage:
11
- * - Content loading placeholders
11
+ * - Content placeholders
12
12
  * - List item skeletons
13
13
  * - Card skeletons
14
14
  * - Text line skeletons
15
15
  * - Image placeholders
16
16
  */
17
17
 
18
- import React, { useEffect, useRef } from 'react';
19
- import { View, StyleSheet, ViewStyle, Animated, DimensionValue } from 'react-native';
18
+ import React from 'react';
19
+ import { View, StyleSheet, ViewStyle, DimensionValue } from 'react-native';
20
20
  import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
21
21
 
22
22
  // =============================================================================
@@ -32,14 +32,8 @@ export interface AtomicSkeletonProps {
32
32
  shape?: 'rectangle' | 'circle' | 'rounded';
33
33
  /** Border radius for rounded shapes */
34
34
  borderRadius?: number;
35
- /** Animation duration in milliseconds */
36
- duration?: number;
37
- /** Whether to show animation */
38
- animated?: boolean;
39
35
  /** Skeleton color */
40
36
  color?: string;
41
- /** Highlight color for animation */
42
- highlightColor?: string;
43
37
  /** Style overrides */
44
38
  style?: ViewStyle;
45
39
  /** Test ID for testing */
@@ -55,43 +49,14 @@ export const AtomicSkeleton: React.FC<AtomicSkeletonProps> = ({
55
49
  height = 20,
56
50
  shape = 'rectangle',
57
51
  borderRadius,
58
- duration,
59
- animated = true,
60
52
  color,
61
- highlightColor,
62
53
  style,
63
54
  testID,
64
55
  }) => {
65
56
  const tokens = useAppDesignTokens();
66
- const animatedValue = useRef(new Animated.Value(0)).current;
67
57
 
68
58
  // Default values
69
- const finalDuration = duration ?? tokens.animations.slowest;
70
59
  const skeletonColor = color || tokens.colors.surfaceVariant;
71
- const skeletonHighlight = highlightColor || tokens.colors.surface;
72
-
73
- // Animation effect
74
- useEffect(() => {
75
- if (animated) {
76
- const animation = Animated.loop(
77
- Animated.sequence([
78
- Animated.timing(animatedValue, {
79
- toValue: 1,
80
- duration: finalDuration,
81
- useNativeDriver: false,
82
- }),
83
- Animated.timing(animatedValue, {
84
- toValue: 0,
85
- duration: finalDuration,
86
- useNativeDriver: false,
87
- }),
88
- ])
89
- );
90
- animation.start();
91
-
92
- return () => animation.stop();
93
- }
94
- }, [animated, finalDuration, animatedValue]);
95
60
 
96
61
  // Calculate border radius based on shape
97
62
  const getBorderRadius = (): number => {
@@ -115,22 +80,6 @@ export const AtomicSkeleton: React.FC<AtomicSkeletonProps> = ({
115
80
  borderRadius: getBorderRadius(),
116
81
  };
117
82
 
118
- if (animated) {
119
- const animatedStyle = {
120
- backgroundColor: animatedValue.interpolate({
121
- inputRange: [0, 1],
122
- outputRange: [skeletonColor, skeletonHighlight],
123
- }),
124
- };
125
-
126
- return (
127
- <Animated.View
128
- style={[skeletonStyle, animatedStyle, style]}
129
- testID={testID}
130
- />
131
- );
132
- }
133
-
134
83
  return (
135
84
  <View
136
85
  style={[skeletonStyle, style]}
@@ -72,8 +72,8 @@ export const AtomicSwitch: React.FC<AtomicSwitchProps> = ({
72
72
  const tokens = useAppDesignTokens();
73
73
  const styles = getStyles(tokens);
74
74
 
75
- const sizeConfig = SIZE_CONFIG[size];
76
- const colors = getVariantColors(tokens, variant);
75
+ const sizeConfig = SIZE_CONFIG[size as 'sm' | 'md' | 'lg'];
76
+ const colors = getVariantColors(tokens, variant as 'primary' | 'secondary' | 'success' | 'warning' | 'error');
77
77
 
78
78
  const defaultTrackColor = trackColor || {
79
79
  false: colors.trackFalse,
@@ -1,12 +1,11 @@
1
1
  import React from 'react';
2
- import { Pressable, View, ActivityIndicator, StyleSheet } from 'react-native';
2
+ import { Pressable, StyleSheet } from 'react-native';
3
3
  import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
4
4
  import { AtomicTouchableProps, TouchableFeedback, FeedbackStrength } from './touchable/types';
5
5
  import {
6
6
  getOpacityValue,
7
7
  getTouchableContainerStyle,
8
8
  getDisabledStyle,
9
- getLoadingContainerStyle,
10
9
  normalizeHitSlop,
11
10
  } from './touchable/styles/touchableStyles';
12
11
 
@@ -21,7 +20,6 @@ export {
21
20
  getOpacityValue,
22
21
  getTouchableContainerStyle,
23
22
  getDisabledStyle,
24
- getLoadingContainerStyle,
25
23
  normalizeHitSlop,
26
24
  } from './touchable/styles/touchableStyles';
27
25
 
@@ -34,7 +32,6 @@ export {
34
32
  * Features:
35
33
  * - Multiple feedback variants (opacity, highlight, ripple, none)
36
34
  * - Configurable feedback strength (subtle, normal, strong)
37
- * - Loading state with indicator
38
35
  * - Disabled state with visual feedback
39
36
  * - Hit slop customization for small touch targets
40
37
  * - Minimum 48x48 touch target (iOS HIG compliance)
@@ -48,15 +45,6 @@ export {
48
45
  * <AtomicText>Press Me</AtomicText>
49
46
  * </AtomicTouchable>
50
47
  *
51
- * // With loading state
52
- * <AtomicTouchable
53
- * onPress={handleSubmit}
54
- * loading={isSubmitting}
55
- * feedback="highlight"
56
- * >
57
- * <AtomicText>Submit</AtomicText>
58
- * </AtomicTouchable>
59
- *
60
48
  * // With custom hit slop (extends touch area)
61
49
  * <AtomicTouchable
62
50
  * onPress={handlePress}
@@ -76,7 +64,6 @@ export const AtomicTouchable: React.FC<AtomicTouchableProps> = ({
76
64
  feedback = 'opacity',
77
65
  strength = 'normal',
78
66
  disabled = false,
79
- loading = false,
80
67
  hitSlop,
81
68
  style,
82
69
  pressedStyle,
@@ -92,10 +79,10 @@ export const AtomicTouchable: React.FC<AtomicTouchableProps> = ({
92
79
  const tokens = useAppDesignTokens();
93
80
 
94
81
  // Determine if touchable should be disabled
95
- const isDisabled = disabled || loading;
82
+ const isDisabled = disabled;
96
83
 
97
84
  // Get opacity value based on strength
98
- const opacityValue = getOpacityValue(strength);
85
+ const opacityValue = getOpacityValue(strength as 'subtle' | 'normal' | 'strong');
99
86
 
100
87
  // Normalize hit slop
101
88
  const normalizedHitSlop = normalizeHitSlop(hitSlop);
@@ -169,21 +156,10 @@ export const AtomicTouchable: React.FC<AtomicTouchableProps> = ({
169
156
  accessibilityRole={accessibilityRole}
170
157
  accessibilityState={{
171
158
  disabled: isDisabled,
172
- busy: loading,
173
159
  }}
174
160
  testID={testID}
175
161
  >
176
- {loading ? (
177
- <View style={getLoadingContainerStyle()}>
178
- <ActivityIndicator
179
- size="small"
180
- color={tokens.colors.primary}
181
- testID={`${testID}-loading`}
182
- />
183
- </View>
184
- ) : (
185
- children
186
- )}
162
+ {children}
187
163
  </Pressable>
188
164
  );
189
165
  };
@@ -65,12 +65,6 @@ export interface AtomicFabProps {
65
65
  */
66
66
  disabled?: boolean;
67
67
 
68
- /**
69
- * Whether to show loading state
70
- * @default false
71
- */
72
- loading?: boolean;
73
-
74
68
  /**
75
69
  * Custom style for the FAB container
76
70
  */
@@ -35,15 +35,6 @@ export const getDisabledStyle = (): ViewStyle => ({
35
35
  opacity: 0.5,
36
36
  });
37
37
 
38
- /**
39
- * Get loading container style
40
- * Centers the loading indicator
41
- */
42
- export const getLoadingContainerStyle = (): ViewStyle => ({
43
- justifyContent: 'center',
44
- alignItems: 'center',
45
- });
46
-
47
38
  /**
48
39
  * Convert number to HitSlop object
49
40
  * If hitSlop is a number, apply it to all sides
@@ -40,8 +40,7 @@ export interface HitSlop {
40
40
  * onPress={handlePress}
41
41
  * feedback="opacity"
42
42
  * strength="normal"
43
- * disabled={isLoading}
44
- * loading={isLoading}
43
+ * disabled={isDisabled}
45
44
  * hitSlop={{ top: 8, bottom: 8, left: 8, right: 8 }}
46
45
  * style={styles.touchable}
47
46
  * >
@@ -93,12 +92,6 @@ export interface AtomicTouchableProps {
93
92
  */
94
93
  disabled?: boolean;
95
94
 
96
- /**
97
- * Show loading indicator (disables touch)
98
- * @default false
99
- */
100
- loading?: boolean;
101
-
102
95
  /**
103
96
  * Hit slop - extends touchable area
104
97
  * Useful for small touch targets
@@ -40,6 +40,7 @@
40
40
  import React from 'react';
41
41
  import { View, Modal, TouchableOpacity } from 'react-native';
42
42
  import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
43
+ // @ts-ignore - Optional peer dependency
43
44
  import { useLocalization } from '@umituz/react-native-localization';
44
45
  import { AtomicText } from '../atoms/AtomicText';
45
46
  import { AtomicButton } from '../atoms/AtomicButton';
@@ -82,7 +83,7 @@ export const AtomicConfirmationModal: React.FC<AtomicConfirmationModalProps> = (
82
83
  const { t } = useLocalization();
83
84
 
84
85
  // Get variant-specific configuration (icon and color only)
85
- const variantConfig = getVariantConfig(variant, tokens);
86
+ const variantConfig = getVariantConfig(variant as 'default' | 'destructive' | 'warning' | 'success', tokens);
86
87
 
87
88
  // Get locale-aware default text based on variant
88
89
  const getDefaultConfirmText = (): string => {
@@ -116,7 +117,7 @@ export const AtomicConfirmationModal: React.FC<AtomicConfirmationModalProps> = (
116
117
  <Modal
117
118
  visible={visible}
118
119
  transparent
119
- animationType="fade"
120
+ animationType="none"
120
121
  onRequestClose={onCancel}
121
122
  statusBarTranslucent
122
123
  testID={testID}
@@ -1,4 +1,6 @@
1
+ // @ts-ignore - Optional peer dependency
1
2
  import { useNavigation } from '@react-navigation/native';
3
+ // @ts-ignore - Optional peer dependency
2
4
  import { useLocalization, getLanguageByCode, getDefaultLanguage } from '@umituz/react-native-localization';
3
5
 
4
6
  export const useLanguageNavigation = (navigationScreen: string) => {
@@ -4,7 +4,6 @@
4
4
  * Provides consistent layout structure for all screens:
5
5
  * - SafeAreaView with configurable edges
6
6
  * - Optional ScrollView for content
7
- * - Loading state support
8
7
  * - Theme-aware background colors
9
8
  * - Optional header/footer slots
10
9
  * - Consistent spacing and padding
@@ -17,7 +16,6 @@
17
16
  * Advanced:
18
17
  * <ScreenLayout
19
18
  * scrollable={false}
20
- * loading={isLoading}
21
19
  * edges={['top', 'bottom']}
22
20
  * header={<CustomHeader />}
23
21
  * >
@@ -29,7 +27,6 @@ import React, { useMemo } from 'react';
29
27
  import { View, ScrollView, StyleSheet, ViewStyle } from 'react-native';
30
28
  import { SafeAreaView, Edge } from 'react-native-safe-area-context';
31
29
  import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
32
- import { LoadingState } from '../loading/presentation/components/LoadingState';
33
30
 
34
31
  export interface ScreenLayoutProps {
35
32
  /**
@@ -52,22 +49,6 @@ export interface ScreenLayoutProps {
52
49
  */
53
50
  edges?: Edge[];
54
51
 
55
- /**
56
- * Show loading state
57
- * When true, displays LoadingState component
58
- */
59
- loading?: boolean;
60
-
61
- /**
62
- * Loading icon name (default: 'settings')
63
- */
64
- loadingIcon?: string;
65
-
66
- /**
67
- * Loading message (default: 'Loading...')
68
- */
69
- loadingMessage?: string;
70
-
71
52
  /**
72
53
  * Optional header component
73
54
  * Rendered above scrollable content
@@ -118,9 +99,6 @@ export const ScreenLayout: React.FC<ScreenLayoutProps> = ({
118
99
  children,
119
100
  scrollable = true,
120
101
  edges = ['top'],
121
- loading = false,
122
- loadingIcon = 'settings',
123
- loadingMessage = 'Loading...',
124
102
  header,
125
103
  footer,
126
104
  backgroundColor,
@@ -136,24 +114,6 @@ export const ScreenLayout: React.FC<ScreenLayoutProps> = ({
136
114
 
137
115
  const bgColor = backgroundColor || tokens.colors.backgroundPrimary;
138
116
 
139
- // Show loading state
140
- if (loading) {
141
- return (
142
- <SafeAreaView
143
- style={[styles.container, { backgroundColor: bgColor }, containerStyle]}
144
- edges={edges}
145
- testID={testID}
146
- >
147
- <LoadingState
148
- icon={loadingIcon}
149
- message={loadingMessage}
150
- size="large"
151
- fullScreen
152
- />
153
- </SafeAreaView>
154
- );
155
- }
156
-
157
117
  // Non-scrollable layout
158
118
  if (!scrollable) {
159
119
  return (
@@ -31,14 +31,12 @@ export {
31
31
  BASE_TOKENS,
32
32
  spacing,
33
33
  typography,
34
- animations,
35
34
  borders,
36
35
  iconSizes,
37
36
  opacity,
38
37
  avatarSizes,
39
38
  type Spacing,
40
39
  type Typography,
41
- type Animations,
42
40
  type Borders,
43
41
  type IconSizes,
44
42
  type Opacity,
@@ -96,7 +96,7 @@ export const useCommonStyles = () => {
96
96
 
97
97
  /**
98
98
  * Centered container - both horizontal and vertical
99
- * Perfect for empty states, loading screens, splash screens
99
+ * Perfect for empty states, splash screens
100
100
  */
101
101
  centerContainer: {
102
102
  flex: 1,
@@ -219,26 +219,6 @@ export const typography = {
219
219
  } as TextStyle,
220
220
  } as const;
221
221
 
222
- // =============================================================================
223
- // ANIMATION TOKENS
224
- // =============================================================================
225
-
226
- export const animations = {
227
- // Duration scale (milliseconds)
228
- fastest: 150,
229
- fast: 150,
230
- normal: 300,
231
- slow: 500,
232
- slower: 750,
233
- slowest: 1000,
234
-
235
- // Easing functions
236
- easeInOut: 'ease-in-out' as const,
237
- easeIn: 'ease-in' as const,
238
- easeOut: 'ease-out' as const,
239
- linear: 'linear' as const,
240
- } as const;
241
-
242
222
  // =============================================================================
243
223
  // OPACITY TOKENS
244
224
  // =============================================================================
@@ -371,7 +351,6 @@ export const avatarSizes = {
371
351
  export const BASE_TOKENS = {
372
352
  spacing,
373
353
  typography,
374
- animations,
375
354
  opacity,
376
355
  borders,
377
356
  sizes,
@@ -385,7 +364,6 @@ export const BASE_TOKENS = {
385
364
 
386
365
  export type Spacing = typeof spacing;
387
366
  export type Typography = typeof typography;
388
- export type Animations = typeof animations;
389
367
  export type Opacity = typeof opacity;
390
368
  export type Borders = typeof borders;
391
369
  export type Sizes = typeof sizes;
@@ -18,13 +18,12 @@ import { getColorPalette, withAlpha, type ThemeMode, type ColorPalette } from '.
18
18
 
19
19
  /**
20
20
  * Complete design tokens shape
21
- * Combines static tokens (spacing, typography, animations, borders) + dynamic colors
21
+ * Combines static tokens (spacing, typography, borders) + dynamic colors
22
22
  */
23
23
  export type DesignTokens = {
24
24
  colors: ColorPalette;
25
25
  spacing: typeof BASE_TOKENS.spacing;
26
26
  typography: typeof BASE_TOKENS.typography;
27
- animations: typeof BASE_TOKENS.animations;
28
27
  iconSizes: typeof BASE_TOKENS.iconSizes;
29
28
  opacity: typeof BASE_TOKENS.opacity;
30
29
  avatarSizes: typeof BASE_TOKENS.avatarSizes;
@@ -67,7 +66,6 @@ export const createDesignTokens = (mode: ThemeMode): DesignTokens => {
67
66
  // ✅ STATIC: These don't change with theme
68
67
  spacing: BASE_TOKENS.spacing,
69
68
  typography: BASE_TOKENS.typography,
70
- animations: BASE_TOKENS.animations,
71
69
  iconSizes: BASE_TOKENS.iconSizes,
72
70
  opacity: BASE_TOKENS.opacity,
73
71
  avatarSizes: BASE_TOKENS.avatarSizes,
@@ -107,7 +105,7 @@ export const createDesignTokens = (mode: ThemeMode): DesignTokens => {
107
105
  export const STATIC_DESIGN_TOKENS = createDesignTokens('light');
108
106
 
109
107
  /**
110
- * STATIC TOKENS (spacing, typography, animations, borders)
108
+ * STATIC TOKENS (spacing, typography, borders)
111
109
  * These DON'T change with theme - safe to use anywhere
112
110
  */
113
111
  export const STATIC_TOKENS = BASE_TOKENS;
@@ -1,23 +0,0 @@
1
- /**
2
- * Loading Domain - Public API
3
- *
4
- * Domain-Driven Design (DDD) Architecture
5
- * Theme: {{THEME_NAME}} ({{CATEGORY}} category)
6
- *
7
- * This is the SINGLE SOURCE OF TRUTH for the Loading domain.
8
- * ALL imports from this domain MUST go through this file.
9
- *
10
- * Architecture:
11
- * - presentation/components: UI components (LoadingState, LoadingSpinner)
12
- * - presentation/hooks: React hooks (useLoading)
13
- *
14
- * Usage:
15
- * import { LoadingState, LoadingSpinner, useLoading } from '@domains/design-system';
16
- */
17
- export { LoadingState } from './presentation/components/LoadingState';
18
- export type { LoadingStateProps, LoadingStateSize } from './presentation/components/LoadingState';
19
- export { LoadingSpinner } from './presentation/components/LoadingSpinner';
20
- export type { LoadingSpinnerProps, LoadingSpinnerSize, LoadingSpinnerColor, } from './presentation/components/LoadingSpinner';
21
- export { useLoading } from './presentation/hooks/useLoading';
22
- export type { LoadingConfig, UseLoadingReturn, } from './presentation/hooks/useLoading';
23
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presentation/loading/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAElG,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,0CAA0C,CAAC;AAMlD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,YAAY,EACV,aAAa,EACb,gBAAgB,GACjB,MAAM,iCAAiC,CAAC"}
@@ -1,26 +0,0 @@
1
- /**
2
- * Loading Domain - Public API
3
- *
4
- * Domain-Driven Design (DDD) Architecture
5
- * Theme: {{THEME_NAME}} ({{CATEGORY}} category)
6
- *
7
- * This is the SINGLE SOURCE OF TRUTH for the Loading domain.
8
- * ALL imports from this domain MUST go through this file.
9
- *
10
- * Architecture:
11
- * - presentation/components: UI components (LoadingState, LoadingSpinner)
12
- * - presentation/hooks: React hooks (useLoading)
13
- *
14
- * Usage:
15
- * import { LoadingState, LoadingSpinner, useLoading } from '@domains/design-system';
16
- */
17
- // =============================================================================
18
- // PRESENTATION LAYER - Components
19
- // =============================================================================
20
- export { LoadingState } from './presentation/components/LoadingState';
21
- export { LoadingSpinner } from './presentation/components/LoadingSpinner';
22
- // =============================================================================
23
- // PRESENTATION LAYER - Hooks
24
- // =============================================================================
25
- export { useLoading } from './presentation/hooks/useLoading';
26
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/presentation/loading/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,gFAAgF;AAChF,kCAAkC;AAClC,gFAAgF;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAGtE,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAO1E,gFAAgF;AAChF,6BAA6B;AAC7B,gFAAgF;AAEhF,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC"}
@@ -1,28 +0,0 @@
1
- /**
2
- * LoadingSpinner - Theme-Aware Activity Indicator
3
- *
4
- * Refactored from AtomicLoadingSpinner - now part of Loading domain
5
- * Uses central useAppDesignTokens() hook for automatic theme switching
6
- * Theme: {{THEME_NAME}} ({{CATEGORY}} category)
7
- *
8
- * Features:
9
- * - ✅ AUTOMATIC theme switching via useAppDesignTokens()
10
- * - ✅ Multiple size variants (small, medium, large)
11
- * - ✅ Dynamic color customization
12
- * - ✅ Overlay support
13
- * - ✅ Message display
14
- */
15
- import React from 'react';
16
- import { ViewStyle } from 'react-native';
17
- export type LoadingSpinnerSize = 'small' | 'medium' | 'large';
18
- export type LoadingSpinnerColor = 'primary' | 'secondary' | 'white';
19
- export interface LoadingSpinnerProps {
20
- size?: LoadingSpinnerSize;
21
- color?: LoadingSpinnerColor;
22
- message?: string;
23
- overlay?: boolean;
24
- style?: ViewStyle;
25
- }
26
- export declare const LoadingSpinner: React.FC<LoadingSpinnerProps>;
27
- export default LoadingSpinner;
28
- //# sourceMappingURL=LoadingSpinner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LoadingSpinner.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/loading/presentation/components/LoadingSpinner.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA2B,SAAS,EAAE,MAAM,cAAc,CAAC;AASlE,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC9D,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;AAEpE,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAgBD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+DxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,77 +0,0 @@
1
- /**
2
- * LoadingSpinner - Theme-Aware Activity Indicator
3
- *
4
- * Refactored from AtomicLoadingSpinner - now part of Loading domain
5
- * Uses central useAppDesignTokens() hook for automatic theme switching
6
- * Theme: {{THEME_NAME}} ({{CATEGORY}} category)
7
- *
8
- * Features:
9
- * - ✅ AUTOMATIC theme switching via useAppDesignTokens()
10
- * - ✅ Multiple size variants (small, medium, large)
11
- * - ✅ Dynamic color customization
12
- * - ✅ Overlay support
13
- * - ✅ Message display
14
- */
15
- import React from 'react';
16
- import { View, ActivityIndicator } from 'react-native';
17
- import { useAppDesignTokens } from '../../../hooks/useAppDesignTokens';
18
- import { withAlpha } from '../../../tokens/AppDesignTokens';
19
- import { AtomicText } from '../../../atoms/AtomicText';
20
- // =============================================================================
21
- // SIZE VARIANTS
22
- // =============================================================================
23
- const sizeVariants = {
24
- small: 'small',
25
- medium: 'large',
26
- large: 'large',
27
- };
28
- // =============================================================================
29
- // COMPONENT IMPLEMENTATION
30
- // =============================================================================
31
- export const LoadingSpinner = ({ size = 'medium', color = 'primary', message, overlay = false, style, }) => {
32
- // ✅ DYNAMIC tokens from central hook
33
- const tokens = useAppDesignTokens();
34
- const spinnerSize = sizeVariants[size];
35
- /**
36
- * Get spinner color from dynamic theme
37
- * ✅ Automatically updates when theme changes
38
- */
39
- const getSpinnerColor = () => {
40
- switch (color) {
41
- case 'primary':
42
- return tokens.colors.primary;
43
- case 'secondary':
44
- return tokens.colors.secondary;
45
- case 'white':
46
- return tokens.colors.textInverse;
47
- default:
48
- return tokens.colors.primary;
49
- }
50
- };
51
- const spinnerColor = getSpinnerColor();
52
- const containerStyle = overlay
53
- ? {
54
- position: 'absolute',
55
- top: 0,
56
- left: 0,
57
- right: 0,
58
- bottom: 0,
59
- backgroundColor: withAlpha(tokens.colors.black, 0.5),
60
- justifyContent: 'center',
61
- alignItems: 'center',
62
- zIndex: 9999,
63
- }
64
- : {
65
- justifyContent: 'center',
66
- alignItems: 'center',
67
- padding: tokens.spacing.lg,
68
- };
69
- return (<View style={[containerStyle, style]}>
70
- <ActivityIndicator size={spinnerSize} color={spinnerColor}/>
71
- {message && (<AtomicText type="bodyMedium" color={overlay ? 'inverse' : 'primary'} style={{ marginTop: tokens.spacing.md, textAlign: 'center' }}>
72
- {message}
73
- </AtomicText>)}
74
- </View>);
75
- };
76
- export default LoadingSpinner;
77
- //# sourceMappingURL=LoadingSpinner.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LoadingSpinner.js","sourceRoot":"","sources":["../../../../../src/presentation/loading/presentation/components/LoadingSpinner.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAa,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAiBvD,gFAAgF;AAChF,gBAAgB;AAChB,gFAAgF;AAEhF,MAAM,YAAY,GAAkD;IAClE,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,OAAO;CACf,CAAC;AAEF,gFAAgF;AAChF,2BAA2B;AAC3B,gFAAgF;AAEhF,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC5D,IAAI,GAAG,QAAQ,EACf,KAAK,GAAG,SAAS,EACjB,OAAO,EACP,OAAO,GAAG,KAAK,EACf,KAAK,GACN,EAAE,EAAE;IACH,qCAAqC;IACrC,MAAM,MAAM,GAAG,kBAAkB,EAAE,CAAC;IAEpC,MAAM,WAAW,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAEvC;;;OAGG;IACH,MAAM,eAAe,GAAG,GAAW,EAAE;QACnC,QAAQ,KAAK,EAAE,CAAC;YACd,KAAK,SAAS;gBACZ,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;YAC/B,KAAK,WAAW;gBACd,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC;YACjC,KAAK,OAAO;gBACV,OAAO,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC;YACnC;gBACE,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;QACjC,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,MAAM,cAAc,GAAc,OAAO;QACvC,CAAC,CAAC;YACE,QAAQ,EAAE,UAAU;YACpB,GAAG,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,CAAC;YACT,eAAe,EAAE,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC;YACpD,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,MAAM,EAAE,IAAI;SACb;QACH,CAAC,CAAC;YACE,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;SAC3B,CAAC;IAEN,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,CACnC;MAAA,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,EAC1D;MAAA,CAAC,OAAO,IAAI,CACV,CAAC,UAAU,CACT,IAAI,CAAC,YAAY,CACjB,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CACvC,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAE7D;UAAA,CAAC,OAAO,CACV;QAAA,EAAE,UAAU,CAAC,CACd,CACH;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}