@umituz/react-native-design-system 1.4.3 → 1.5.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.
- package/README.md +0 -1
- package/lib/index.d.ts +4 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +14 -17
- package/lib/index.js.map +1 -1
- package/lib/presentation/atoms/AtomicAvatar.js +1 -1
- package/lib/presentation/atoms/AtomicAvatar.js.map +1 -1
- package/lib/presentation/atoms/AtomicAvatarGroup.js +1 -1
- package/lib/presentation/atoms/AtomicAvatarGroup.js.map +1 -1
- package/lib/presentation/atoms/AtomicBadge.js +1 -1
- package/lib/presentation/atoms/AtomicBadge.js.map +1 -1
- package/lib/presentation/atoms/AtomicButton.d.ts +1 -1
- package/lib/presentation/atoms/AtomicButton.d.ts.map +1 -1
- package/lib/presentation/atoms/AtomicButton.js +2 -2
- package/lib/presentation/atoms/AtomicButton.js.map +1 -1
- package/lib/presentation/atoms/AtomicCard.js +1 -1
- package/lib/presentation/atoms/AtomicCard.js.map +1 -1
- package/lib/presentation/atoms/AtomicChip.js +1 -1
- package/lib/presentation/atoms/AtomicChip.js.map +1 -1
- package/lib/presentation/atoms/AtomicDatePicker.js +1 -1
- package/lib/presentation/atoms/AtomicDatePicker.js.map +1 -1
- package/lib/presentation/atoms/AtomicDivider.js +1 -1
- package/lib/presentation/atoms/AtomicDivider.js.map +1 -1
- package/lib/presentation/atoms/AtomicFab.js +1 -1
- package/lib/presentation/atoms/AtomicFab.js.map +1 -1
- package/lib/presentation/atoms/AtomicFilter.js +1 -1
- package/lib/presentation/atoms/AtomicFilter.js.map +1 -1
- package/lib/presentation/atoms/AtomicFormError.js +2 -2
- package/lib/presentation/atoms/AtomicFormError.js.map +1 -1
- package/lib/presentation/atoms/AtomicIcon.d.ts +2 -3
- package/lib/presentation/atoms/AtomicIcon.d.ts.map +1 -1
- package/lib/presentation/atoms/AtomicIcon.js +1 -1
- package/lib/presentation/atoms/AtomicIcon.js.map +1 -1
- package/lib/presentation/atoms/AtomicImage.js +1 -1
- package/lib/presentation/atoms/AtomicImage.js.map +1 -1
- package/lib/presentation/atoms/AtomicInput.js +1 -1
- package/lib/presentation/atoms/AtomicInput.js.map +1 -1
- package/lib/presentation/atoms/AtomicPicker.js +1 -1
- package/lib/presentation/atoms/AtomicPicker.js.map +1 -1
- package/lib/presentation/atoms/AtomicProgress.js +1 -1
- package/lib/presentation/atoms/AtomicProgress.js.map +1 -1
- package/lib/presentation/atoms/AtomicSearchBar.js +1 -1
- package/lib/presentation/atoms/AtomicSearchBar.js.map +1 -1
- package/lib/presentation/atoms/AtomicSort.js +1 -1
- package/lib/presentation/atoms/AtomicSort.js.map +1 -1
- package/lib/presentation/atoms/AtomicSwitch.js +1 -1
- package/lib/presentation/atoms/AtomicSwitch.js.map +1 -1
- package/lib/presentation/atoms/AtomicText.d.ts +21 -1
- package/lib/presentation/atoms/AtomicText.d.ts.map +1 -1
- package/lib/presentation/atoms/AtomicText.js +31 -10
- package/lib/presentation/atoms/AtomicText.js.map +1 -1
- package/lib/presentation/atoms/AtomicTextArea.js +1 -1
- package/lib/presentation/atoms/AtomicTextArea.js.map +1 -1
- package/lib/presentation/atoms/AtomicTouchable.js +1 -1
- package/lib/presentation/atoms/AtomicTouchable.js.map +1 -1
- package/lib/presentation/atoms/fab/styles/fabStyles.d.ts +1 -1
- package/lib/presentation/atoms/fab/styles/fabStyles.d.ts.map +1 -1
- package/lib/presentation/atoms/index.d.ts +1 -1
- package/lib/presentation/atoms/input/styles/inputStyles.d.ts +1 -1
- package/lib/presentation/atoms/input/styles/inputStyles.d.ts.map +1 -1
- package/lib/presentation/atoms/picker/styles/pickerStyles.d.ts +12 -23
- package/lib/presentation/atoms/picker/styles/pickerStyles.d.ts.map +1 -1
- package/lib/presentation/atoms/picker/styles/pickerStyles.js.map +1 -1
- package/lib/presentation/molecules/AtomicConfirmationModal.d.ts +2 -2
- package/lib/presentation/molecules/AtomicConfirmationModal.d.ts.map +1 -1
- package/lib/presentation/molecules/AtomicConfirmationModal.js +3 -22
- package/lib/presentation/molecules/AtomicConfirmationModal.js.map +1 -1
- package/lib/presentation/molecules/EmptyState.js +1 -1
- package/lib/presentation/molecules/EmptyState.js.map +1 -1
- package/lib/presentation/molecules/FormField.js +1 -1
- package/lib/presentation/molecules/FormField.js.map +1 -1
- package/lib/presentation/molecules/IconContainer.js +1 -1
- package/lib/presentation/molecules/IconContainer.js.map +1 -1
- package/lib/presentation/molecules/ListItem.js +1 -1
- package/lib/presentation/molecules/ListItem.js.map +1 -1
- package/lib/presentation/molecules/ScreenHeader.js +1 -1
- package/lib/presentation/molecules/ScreenHeader.js.map +1 -1
- package/lib/presentation/molecules/SearchBar.js +1 -1
- package/lib/presentation/molecules/SearchBar.js.map +1 -1
- package/lib/presentation/molecules/SectionCard.js +1 -1
- package/lib/presentation/molecules/SectionCard.js.map +1 -1
- package/lib/presentation/molecules/SectionContainer.js +1 -1
- package/lib/presentation/molecules/SectionContainer.js.map +1 -1
- package/lib/presentation/molecules/SectionHeader.js +1 -1
- package/lib/presentation/molecules/SectionHeader.js.map +1 -1
- package/lib/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.d.ts +1 -1
- package/lib/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.d.ts.map +1 -1
- package/lib/presentation/molecules/confirmation-modal/types/index.d.ts +4 -6
- package/lib/presentation/molecules/confirmation-modal/types/index.d.ts.map +1 -1
- package/lib/presentation/molecules/index.d.ts +0 -1
- package/lib/presentation/molecules/index.d.ts.map +1 -1
- package/lib/presentation/molecules/index.js +0 -1
- package/lib/presentation/molecules/index.js.map +1 -1
- package/lib/presentation/molecules/listitem/styles/listItemStyles.d.ts +1 -1
- package/lib/presentation/molecules/listitem/styles/listItemStyles.d.ts.map +1 -1
- package/lib/presentation/organisms/AppHeader.d.ts +3 -2
- package/lib/presentation/organisms/AppHeader.d.ts.map +1 -1
- package/lib/presentation/organisms/AppHeader.js +1 -1
- package/lib/presentation/organisms/AppHeader.js.map +1 -1
- package/lib/presentation/organisms/FormContainer.js +1 -1
- package/lib/presentation/organisms/FormContainer.js.map +1 -1
- package/lib/presentation/organisms/ScreenLayout.js +1 -1
- package/lib/presentation/organisms/ScreenLayout.js.map +1 -1
- package/lib/presentation/tokens/commonStyles.d.ts +1 -1
- package/lib/presentation/tokens/commonStyles.js +2 -2
- package/lib/presentation/tokens/commonStyles.js.map +1 -1
- package/package.json +2 -6
- package/src/index.ts +17 -26
- package/src/presentation/atoms/AtomicAvatar.tsx +1 -1
- package/src/presentation/atoms/AtomicAvatarGroup.tsx +1 -1
- package/src/presentation/atoms/AtomicBadge.tsx +2 -2
- package/src/presentation/atoms/AtomicButton.tsx +3 -3
- package/src/presentation/atoms/AtomicCard.tsx +1 -1
- package/src/presentation/atoms/AtomicChip.tsx +1 -1
- package/src/presentation/atoms/AtomicDatePicker.tsx +1 -1
- package/src/presentation/atoms/AtomicDivider.tsx +1 -1
- package/src/presentation/atoms/AtomicFab.tsx +1 -1
- package/src/presentation/atoms/AtomicFilter.tsx +1 -1
- package/src/presentation/atoms/AtomicFormError.tsx +2 -2
- package/src/presentation/atoms/AtomicIcon.tsx +3 -4
- package/src/presentation/atoms/AtomicImage.tsx +1 -1
- package/src/presentation/atoms/AtomicInput.tsx +1 -1
- package/src/presentation/atoms/AtomicPicker.tsx +1 -1
- package/src/presentation/atoms/AtomicProgress.tsx +1 -1
- package/src/presentation/atoms/AtomicSearchBar.tsx +1 -1
- package/src/presentation/atoms/AtomicSort.tsx +1 -1
- package/src/presentation/atoms/AtomicSwitch.tsx +1 -1
- package/src/presentation/atoms/AtomicText.tsx +80 -14
- package/src/presentation/atoms/AtomicTextArea.tsx +1 -1
- package/src/presentation/atoms/AtomicTouchable.tsx +2 -2
- package/src/presentation/atoms/fab/styles/fabStyles.ts +1 -1
- package/src/presentation/atoms/input/styles/inputStyles.ts +1 -1
- package/src/presentation/atoms/picker/styles/pickerStyles.ts +13 -6
- package/src/presentation/molecules/AtomicConfirmationModal.tsx +5 -26
- package/src/presentation/molecules/EmptyState.tsx +1 -1
- package/src/presentation/molecules/FormField.tsx +1 -1
- package/src/presentation/molecules/IconContainer.tsx +1 -1
- package/src/presentation/molecules/ListItem.tsx +1 -1
- package/src/presentation/molecules/ScreenHeader.tsx +1 -1
- package/src/presentation/molecules/SearchBar.tsx +1 -1
- package/src/presentation/molecules/SectionCard.tsx +1 -1
- package/src/presentation/molecules/SectionContainer.tsx +1 -1
- package/src/presentation/molecules/SectionHeader.tsx +1 -1
- package/src/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.ts +1 -1
- package/src/presentation/molecules/confirmation-modal/types/index.ts +4 -6
- package/src/presentation/molecules/index.ts +0 -1
- package/src/presentation/molecules/listitem/styles/listItemStyles.ts +1 -1
- package/src/presentation/organisms/AppHeader.tsx +4 -3
- package/src/presentation/organisms/FormContainer.tsx +1 -1
- package/src/presentation/organisms/ScreenLayout.tsx +1 -1
- package/src/presentation/tokens/commonStyles.ts +2 -2
- package/lib/domains/icons/domain/config/IconLibraryConfig.d.ts +0 -91
- package/lib/domains/icons/domain/config/IconLibraryConfig.d.ts.map +0 -1
- package/lib/domains/icons/domain/config/IconLibraryConfig.js +0 -85
- package/lib/domains/icons/domain/config/IconLibraryConfig.js.map +0 -1
- package/lib/domains/icons/domain/entities/Icon.d.ts +0 -111
- package/lib/domains/icons/domain/entities/Icon.d.ts.map +0 -1
- package/lib/domains/icons/domain/entities/Icon.js +0 -87
- package/lib/domains/icons/domain/entities/Icon.js.map +0 -1
- package/lib/domains/icons/domain/interfaces/IIconAdapter.d.ts +0 -114
- package/lib/domains/icons/domain/interfaces/IIconAdapter.d.ts.map +0 -1
- package/lib/domains/icons/domain/interfaces/IIconAdapter.js +0 -17
- package/lib/domains/icons/domain/interfaces/IIconAdapter.js.map +0 -1
- package/lib/domains/icons/index.d.ts +0 -84
- package/lib/domains/icons/index.d.ts.map +0 -1
- package/lib/domains/icons/index.js +0 -89
- package/lib/domains/icons/index.js.map +0 -1
- package/lib/domains/icons/infrastructure/adapters/LucideAdapter.d.ts +0 -24
- package/lib/domains/icons/infrastructure/adapters/LucideAdapter.d.ts.map +0 -1
- package/lib/domains/icons/infrastructure/adapters/LucideAdapter.js +0 -85
- package/lib/domains/icons/infrastructure/adapters/LucideAdapter.js.map +0 -1
- package/lib/domains/icons/infrastructure/registries/ExpoIconRegistry.d.ts +0 -23
- package/lib/domains/icons/infrastructure/registries/ExpoIconRegistry.d.ts.map +0 -1
- package/lib/domains/icons/infrastructure/registries/ExpoIconRegistry.js +0 -178
- package/lib/domains/icons/infrastructure/registries/ExpoIconRegistry.js.map +0 -1
- package/lib/domains/icons/presentation/components/Icon.d.ts +0 -42
- package/lib/domains/icons/presentation/components/Icon.d.ts.map +0 -1
- package/lib/domains/icons/presentation/components/Icon.js +0 -86
- package/lib/domains/icons/presentation/components/Icon.js.map +0 -1
- package/lib/domains/icons/presentation/hooks/useIconLibrary.d.ts +0 -38
- package/lib/domains/icons/presentation/hooks/useIconLibrary.d.ts.map +0 -1
- package/lib/domains/icons/presentation/hooks/useIconLibrary.js +0 -114
- package/lib/domains/icons/presentation/hooks/useIconLibrary.js.map +0 -1
- package/lib/infrastructure/theme/globalThemeStore.d.ts +0 -42
- package/lib/infrastructure/theme/globalThemeStore.d.ts.map +0 -1
- package/lib/infrastructure/theme/globalThemeStore.js +0 -38
- package/lib/infrastructure/theme/globalThemeStore.js.map +0 -1
- package/lib/presentation/hooks/useAppDesignTokens.d.ts +0 -34
- package/lib/presentation/hooks/useAppDesignTokens.d.ts.map +0 -1
- package/lib/presentation/hooks/useAppDesignTokens.js +0 -39
- package/lib/presentation/hooks/useAppDesignTokens.js.map +0 -1
- package/lib/presentation/molecules/LanguageSwitcher.d.ts +0 -10
- package/lib/presentation/molecules/LanguageSwitcher.d.ts.map +0 -1
- package/lib/presentation/molecules/LanguageSwitcher.js +0 -24
- package/lib/presentation/molecules/LanguageSwitcher.js.map +0 -1
- package/lib/presentation/molecules/languageswitcher/config/languageSwitcherConfig.d.ts +0 -11
- package/lib/presentation/molecules/languageswitcher/config/languageSwitcherConfig.d.ts.map +0 -1
- package/lib/presentation/molecules/languageswitcher/config/languageSwitcherConfig.js +0 -6
- package/lib/presentation/molecules/languageswitcher/config/languageSwitcherConfig.js.map +0 -1
- package/lib/presentation/molecules/languageswitcher/hooks/useLanguageNavigation.d.ts +0 -5
- package/lib/presentation/molecules/languageswitcher/hooks/useLanguageNavigation.d.ts.map +0 -1
- package/lib/presentation/molecules/languageswitcher/hooks/useLanguageNavigation.js +0 -14
- package/lib/presentation/molecules/languageswitcher/hooks/useLanguageNavigation.js.map +0 -1
- package/lib/presentation/tokens/AppDesignTokens.d.ts +0 -14
- package/lib/presentation/tokens/AppDesignTokens.d.ts.map +0 -1
- package/lib/presentation/tokens/AppDesignTokens.js +0 -23
- package/lib/presentation/tokens/AppDesignTokens.js.map +0 -1
- package/lib/presentation/tokens/core/BaseTokens.d.ts +0 -312
- package/lib/presentation/tokens/core/BaseTokens.d.ts.map +0 -1
- package/lib/presentation/tokens/core/BaseTokens.js +0 -307
- package/lib/presentation/tokens/core/BaseTokens.js.map +0 -1
- package/lib/presentation/tokens/core/ColorPalette.d.ts +0 -216
- package/lib/presentation/tokens/core/ColorPalette.d.ts.map +0 -1
- package/lib/presentation/tokens/core/ColorPalette.js +0 -330
- package/lib/presentation/tokens/core/ColorPalette.js.map +0 -1
- package/lib/presentation/tokens/core/TokenFactory.d.ts +0 -216
- package/lib/presentation/tokens/core/TokenFactory.d.ts.map +0 -1
- package/lib/presentation/tokens/core/TokenFactory.js +0 -86
- package/lib/presentation/tokens/core/TokenFactory.js.map +0 -1
- package/src/domains/icons/domain/config/IconLibraryConfig.ts +0 -93
- package/src/domains/icons/domain/entities/Icon.ts +0 -143
- package/src/domains/icons/domain/interfaces/IIconAdapter.ts +0 -147
- package/src/domains/icons/index.ts +0 -109
- package/src/domains/icons/infrastructure/adapters/LucideAdapter.ts +0 -100
- package/src/domains/icons/infrastructure/registries/ExpoIconRegistry.ts +0 -191
- package/src/domains/icons/presentation/components/Icon.tsx +0 -132
- package/src/domains/icons/presentation/hooks/useIconLibrary.ts +0 -141
- package/src/infrastructure/theme/globalThemeStore.ts +0 -51
- package/src/presentation/hooks/useAppDesignTokens.ts +0 -40
- package/src/presentation/molecules/LanguageSwitcher.tsx +0 -42
- package/src/presentation/molecules/languageswitcher/config/languageSwitcherConfig.ts +0 -5
- package/src/presentation/molecules/languageswitcher/hooks/useLanguageNavigation.ts +0 -16
- package/src/presentation/tokens/AppDesignTokens.ts +0 -55
- package/src/presentation/tokens/core/BaseTokens.ts +0 -376
- package/src/presentation/tokens/core/ColorPalette.ts +0 -400
- package/src/presentation/tokens/core/TokenFactory.ts +0 -118
package/src/index.ts
CHANGED
|
@@ -162,11 +162,8 @@ export {
|
|
|
162
162
|
type SearchBarProps,
|
|
163
163
|
} from './presentation/molecules/SearchBar';
|
|
164
164
|
|
|
165
|
-
export {
|
|
166
|
-
LanguageSwitcher,
|
|
167
|
-
} from './presentation/molecules/LanguageSwitcher';
|
|
168
|
-
|
|
169
165
|
// SettingItem moved to @domains/settings/presentation/components/SettingItem
|
|
166
|
+
// LanguageSwitcher moved to @umituz/react-native-localization
|
|
170
167
|
// Import directly: import { SettingItem } from '@domains/settings/presentation/components/SettingItem';
|
|
171
168
|
|
|
172
169
|
export {
|
|
@@ -228,22 +225,17 @@ export {
|
|
|
228
225
|
// Import from feedback domain: import { FeedbackModal } from '@domains/feedback';
|
|
229
226
|
|
|
230
227
|
// =============================================================================
|
|
231
|
-
//
|
|
232
|
-
// =============================================================================
|
|
233
|
-
// Loading components moved to separate package
|
|
234
|
-
// Import from @umituz/react-native-loading when available
|
|
235
|
-
|
|
236
|
-
// =============================================================================
|
|
237
|
-
// TOKENS - Design Tokens (Refactored with ZERO duplication)
|
|
228
|
+
// THEME-RELATED EXPORTS - Re-exported from @umituz/react-native-theme
|
|
238
229
|
// =============================================================================
|
|
230
|
+
// All tokens, colors, and theme utilities come from @umituz/react-native-theme
|
|
231
|
+
// Design system does NOT define any tokens - it only uses them from theme package
|
|
239
232
|
|
|
240
233
|
export {
|
|
241
|
-
// Static tokens (don't change with theme)
|
|
242
|
-
STATIC_TOKENS,
|
|
243
|
-
BASE_TOKENS,
|
|
244
|
-
|
|
245
234
|
// Token factory
|
|
246
235
|
createDesignTokens,
|
|
236
|
+
STATIC_DESIGN_TOKENS,
|
|
237
|
+
BASE_TOKENS,
|
|
238
|
+
STATIC_TOKENS,
|
|
247
239
|
|
|
248
240
|
// Color utilities
|
|
249
241
|
withAlpha,
|
|
@@ -251,23 +243,18 @@ export {
|
|
|
251
243
|
darkColors,
|
|
252
244
|
getColorPalette,
|
|
253
245
|
|
|
254
|
-
// Individual base tokens
|
|
255
|
-
spacing,
|
|
256
|
-
typography,
|
|
257
|
-
borders,
|
|
258
|
-
|
|
259
246
|
// Type exports
|
|
260
247
|
type DesignTokens,
|
|
261
248
|
type ThemeMode,
|
|
262
249
|
type ColorPalette,
|
|
250
|
+
type BaseTokens,
|
|
263
251
|
type Spacing,
|
|
264
252
|
type Typography,
|
|
265
253
|
type Borders,
|
|
266
|
-
|
|
267
|
-
} from './presentation/tokens/AppDesignTokens';
|
|
254
|
+
} from '@umituz/react-native-theme';
|
|
268
255
|
|
|
269
|
-
// Hook for dynamic theme-aware tokens (exported
|
|
270
|
-
export { useAppDesignTokens } from '
|
|
256
|
+
// Hook for dynamic theme-aware tokens (re-exported from theme package)
|
|
257
|
+
export { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
271
258
|
|
|
272
259
|
export {
|
|
273
260
|
useCommonStyles,
|
|
@@ -328,18 +315,22 @@ export {
|
|
|
328
315
|
// THEME MANAGEMENT - Global Theme Store
|
|
329
316
|
// =============================================================================
|
|
330
317
|
|
|
318
|
+
// Theme management moved to @umituz/react-native-theme
|
|
331
319
|
export {
|
|
332
320
|
useDesignSystemTheme,
|
|
333
|
-
} from '
|
|
321
|
+
} from '@umituz/react-native-theme';
|
|
334
322
|
|
|
335
323
|
// =============================================================================
|
|
336
324
|
// ICONS DOMAIN - Universal Icon System
|
|
337
325
|
// =============================================================================
|
|
326
|
+
// Icon components have been moved to @umituz/react-native-icon package.
|
|
327
|
+
// Import directly: import { Icon, IconName, IconSize, IconColor } from '@umituz/react-native-icon';
|
|
338
328
|
|
|
329
|
+
// Re-export for backward compatibility (deprecated - use @umituz/react-native-icon directly)
|
|
339
330
|
export {
|
|
340
331
|
Icon,
|
|
341
332
|
type IconProps,
|
|
342
333
|
type IconSize,
|
|
343
334
|
type IconColor,
|
|
344
335
|
type IconName,
|
|
345
|
-
} from '
|
|
336
|
+
} from '@umituz/react-native-icon';
|
|
@@ -18,7 +18,7 @@ import React from 'react';
|
|
|
18
18
|
import { View, StyleSheet, ViewStyle, ImageStyle } from 'react-native';
|
|
19
19
|
import { AtomicImage } from './AtomicImage';
|
|
20
20
|
import { AtomicText } from './AtomicText';
|
|
21
|
-
import { useAppDesignTokens } from '
|
|
21
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
22
22
|
|
|
23
23
|
// =============================================================================
|
|
24
24
|
// TYPE DEFINITIONS
|
|
@@ -19,7 +19,7 @@ import React from 'react';
|
|
|
19
19
|
import { View, StyleSheet, ViewStyle } from 'react-native';
|
|
20
20
|
import { AtomicAvatar, AtomicAvatarProps } from './AtomicAvatar';
|
|
21
21
|
import { AtomicText } from './AtomicText';
|
|
22
|
-
import { useAppDesignTokens } from '
|
|
22
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
23
23
|
|
|
24
24
|
// =============================================================================
|
|
25
25
|
// TYPE DEFINITIONS
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { View, StyleSheet, StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
19
19
|
import { AtomicText } from './AtomicText';
|
|
20
|
-
import { useAppDesignTokens } from '
|
|
21
|
-
import type { DesignTokens } from '
|
|
20
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
21
|
+
import type { DesignTokens } from '@umituz/react-native-theme';
|
|
22
22
|
|
|
23
23
|
// =============================================================================
|
|
24
24
|
// TYPE DEFINITIONS
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, StyleProp, ViewStyle, TextStyle, TouchableOpacity, View } from 'react-native';
|
|
3
3
|
import { AtomicText } from './AtomicText';
|
|
4
|
-
import { Icon } from '
|
|
5
|
-
import { useAppDesignTokens } from '
|
|
6
|
-
import type { IconName } from '
|
|
4
|
+
import { Icon } from '@umituz/react-native-icon';
|
|
5
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
6
|
+
import type { IconName } from '@umituz/react-native-icon';
|
|
7
7
|
|
|
8
8
|
export type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'text' | 'danger';
|
|
9
9
|
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, StyleProp, ViewStyle, Pressable } from 'react-native';
|
|
3
|
-
import { useAppDesignTokens } from '
|
|
3
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
4
4
|
|
|
5
5
|
export type AtomicCardVariant = 'flat' | 'elevated' | 'outlined';
|
|
6
6
|
export type AtomicCardPadding = 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -19,7 +19,7 @@ import React from 'react';
|
|
|
19
19
|
import { View, StyleSheet, ViewStyle, TouchableOpacity } from 'react-native';
|
|
20
20
|
import { AtomicText } from './AtomicText';
|
|
21
21
|
import { AtomicIcon } from './AtomicIcon';
|
|
22
|
-
import { useAppDesignTokens } from '
|
|
22
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
23
23
|
|
|
24
24
|
// =============================================================================
|
|
25
25
|
// TYPE DEFINITIONS
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
} from 'react-native';
|
|
48
48
|
import DateTimePicker, { DateTimePickerEvent } from '@react-native-community/datetimepicker';
|
|
49
49
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
50
|
-
import { useAppDesignTokens } from '
|
|
50
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
51
51
|
import { useResponsive } from '../hooks/useResponsive';
|
|
52
52
|
import { AtomicIcon, type AtomicIconColor } from './AtomicIcon';
|
|
53
53
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import React from 'react';
|
|
19
19
|
import { View, StyleSheet, ViewStyle } from 'react-native';
|
|
20
|
-
import { useAppDesignTokens } from '
|
|
20
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
21
21
|
|
|
22
22
|
// =============================================================================
|
|
23
23
|
// TYPE DEFINITIONS
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
|
-
import { useAppDesignTokens } from '
|
|
3
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
4
4
|
import { useResponsive } from '../hooks/useResponsive';
|
|
5
5
|
import { AtomicIcon } from './AtomicIcon';
|
|
6
6
|
import { AtomicFabProps } from './fab/types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ScrollView, View, TouchableOpacity, ViewStyle } from 'react-native';
|
|
3
|
-
import { useAppDesignTokens } from '
|
|
3
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
4
4
|
import { AtomicChip } from './AtomicChip';
|
|
5
5
|
import { AtomicText } from './AtomicText';
|
|
6
6
|
import { AtomicIcon } from './AtomicIcon';
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { View, StyleSheet, StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
19
19
|
import { AtomicText } from './AtomicText';
|
|
20
|
-
import { useAppDesignTokens } from '
|
|
21
|
-
import { withAlpha } from '
|
|
20
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
21
|
+
import { withAlpha } from '@umituz/react-native-theme';
|
|
22
22
|
|
|
23
23
|
// =============================================================================
|
|
24
24
|
// TYPE DEFINITIONS
|
|
@@ -7,9 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import { Icon } from '
|
|
11
|
-
import type { IconProps, IconSize, IconColor } from '
|
|
12
|
-
import type { LucideIconName } from '../../domains/icons/infrastructure/adapters/LucideAdapter';
|
|
10
|
+
import { Icon } from '@umituz/react-native-icon';
|
|
11
|
+
import type { IconProps, IconSize, IconColor, IconName } from '@umituz/react-native-icon';
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
14
|
* AtomicIcon Component
|
|
@@ -38,4 +37,4 @@ export const AtomicIcon: React.FC<IconProps> = (props) => {
|
|
|
38
37
|
export type AtomicIconProps = IconProps;
|
|
39
38
|
export type AtomicIconSize = IconSize;
|
|
40
39
|
export type AtomicIconColor = IconColor;
|
|
41
|
-
export type AtomicIconName =
|
|
40
|
+
export type AtomicIconName = IconName;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { Image, ImageProps, StyleSheet, ViewStyle } from 'react-native';
|
|
19
|
-
import { useAppDesignTokens } from '
|
|
19
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
20
20
|
|
|
21
21
|
// =============================================================================
|
|
22
22
|
// TYPE DEFINITIONS
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { View, TextInput, Pressable, StyleSheet, StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
3
|
-
import { useAppDesignTokens } from '
|
|
3
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
4
4
|
import { AtomicIcon } from './AtomicIcon';
|
|
5
5
|
import { AtomicText } from './AtomicText';
|
|
6
6
|
import type { AtomicIconName, AtomicIconSize } from './AtomicIcon';
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
StyleSheet,
|
|
52
52
|
} from 'react-native';
|
|
53
53
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
54
|
-
import { useAppDesignTokens } from '
|
|
54
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
55
55
|
import { AtomicPickerProps, PickerOption } from './picker/types';
|
|
56
56
|
import { AtomicIcon } from './AtomicIcon';
|
|
57
57
|
import { AtomicText } from './AtomicText';
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { View, StyleSheet, ViewStyle, DimensionValue, Text } from 'react-native';
|
|
19
|
-
import { useAppDesignTokens } from '
|
|
19
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
20
20
|
|
|
21
21
|
// =============================================================================
|
|
22
22
|
// TYPE DEFINITIONS
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, TextInput, TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
3
|
import type { StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
4
|
-
import { useAppDesignTokens } from '
|
|
4
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
5
5
|
import { AtomicIcon } from './AtomicIcon';
|
|
6
6
|
|
|
7
7
|
export interface AtomicSearchBarProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ScrollView, View } from 'react-native';
|
|
3
3
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
4
|
-
import { useAppDesignTokens } from '
|
|
4
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
5
5
|
import { AtomicChip } from './AtomicChip';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { Switch, SwitchProps, StyleSheet, ViewStyle } from 'react-native';
|
|
19
|
-
import { useAppDesignTokens } from '
|
|
19
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
20
20
|
|
|
21
21
|
// =============================================================================
|
|
22
22
|
// TYPE DEFINITIONS
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Text, StyleProp, TextStyle } from 'react-native';
|
|
3
|
-
import { useAppDesignTokens } from '
|
|
3
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
4
4
|
|
|
5
5
|
export type TextStyleVariant =
|
|
6
6
|
| 'displayLarge' | 'displayMedium' | 'displaySmall'
|
|
@@ -9,22 +9,60 @@ export type TextStyleVariant =
|
|
|
9
9
|
| 'bodyLarge' | 'bodyMedium' | 'bodySmall'
|
|
10
10
|
| 'labelLarge' | 'labelMedium' | 'labelSmall';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Material Design 3 Text Color Variants
|
|
14
|
+
*
|
|
15
|
+
* TEXT COLORS (for text on surfaces):
|
|
16
|
+
* - textPrimary, textSecondary, textTertiary: General text colors
|
|
17
|
+
* - onSurface, onBackground: Text on surface/background
|
|
18
|
+
*
|
|
19
|
+
* ON COLORS (for text on colored backgrounds):
|
|
20
|
+
* - onPrimary, onSecondary: Text on primary/secondary colored backgrounds
|
|
21
|
+
* - onSuccess, onError, onWarning, onInfo: Text on semantic colored backgrounds
|
|
22
|
+
*
|
|
23
|
+
* SEMANTIC COLORS (can be used as text colors):
|
|
24
|
+
* - success, error, warning, info: Semantic colors (can be text or background)
|
|
25
|
+
*
|
|
26
|
+
* NOTE: 'primary' and 'secondary' are BACKGROUND colors, not text colors.
|
|
27
|
+
* Use 'onPrimary'/'onSecondary' for text on colored backgrounds, or
|
|
28
|
+
* 'textPrimary'/'textSecondary' for general text.
|
|
29
|
+
*/
|
|
12
30
|
export type ColorVariant =
|
|
31
|
+
// General text colors (Material Design 3)
|
|
32
|
+
| 'textPrimary'
|
|
33
|
+
| 'textSecondary'
|
|
34
|
+
| 'textTertiary'
|
|
35
|
+
| 'textDisabled'
|
|
36
|
+
| 'textInverse'
|
|
37
|
+
// Text on surfaces (Material Design 3)
|
|
38
|
+
| 'onSurface'
|
|
39
|
+
| 'onBackground'
|
|
40
|
+
// Text on colored backgrounds (Material Design 3)
|
|
41
|
+
| 'onPrimary'
|
|
42
|
+
| 'onSecondary'
|
|
43
|
+
| 'onSuccess'
|
|
44
|
+
| 'onError'
|
|
45
|
+
| 'onWarning'
|
|
46
|
+
| 'onInfo'
|
|
47
|
+
// Semantic colors (can be used as text)
|
|
48
|
+
| 'success'
|
|
49
|
+
| 'error'
|
|
50
|
+
| 'warning'
|
|
51
|
+
| 'info'
|
|
52
|
+
// Legacy support (deprecated - use textPrimary/textSecondary instead)
|
|
13
53
|
| 'primary'
|
|
14
54
|
| 'secondary'
|
|
15
55
|
| 'tertiary'
|
|
16
56
|
| 'disabled'
|
|
17
|
-
| 'inverse'
|
|
18
|
-
| 'success'
|
|
19
|
-
| 'error'
|
|
20
|
-
| 'warning'
|
|
21
|
-
| 'info';
|
|
57
|
+
| 'inverse';
|
|
22
58
|
|
|
23
59
|
export interface AtomicTextProps {
|
|
24
60
|
children: React.ReactNode;
|
|
25
61
|
type?: TextStyleVariant;
|
|
26
62
|
color?: ColorVariant | string;
|
|
27
63
|
numberOfLines?: number;
|
|
64
|
+
ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';
|
|
65
|
+
textAlign?: 'auto' | 'left' | 'right' | 'center' | 'justify';
|
|
28
66
|
style?: StyleProp<TextStyle>;
|
|
29
67
|
testID?: string;
|
|
30
68
|
}
|
|
@@ -34,6 +72,8 @@ export const AtomicText: React.FC<AtomicTextProps> = ({
|
|
|
34
72
|
type = 'bodyMedium',
|
|
35
73
|
color,
|
|
36
74
|
numberOfLines,
|
|
75
|
+
ellipsizeMode,
|
|
76
|
+
textAlign,
|
|
37
77
|
style,
|
|
38
78
|
testID,
|
|
39
79
|
}) => {
|
|
@@ -48,17 +88,39 @@ export const AtomicText: React.FC<AtomicTextProps> = ({
|
|
|
48
88
|
return tokens.colors.textPrimary;
|
|
49
89
|
}
|
|
50
90
|
|
|
51
|
-
//
|
|
52
|
-
const colorMap: Record<ColorVariant, string
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
91
|
+
// Material Design 3 text color mapping
|
|
92
|
+
const colorMap: Partial<Record<ColorVariant, string>> = {
|
|
93
|
+
// General text colors (Material Design 3)
|
|
94
|
+
textPrimary: tokens.colors.textPrimary,
|
|
95
|
+
textSecondary: tokens.colors.textSecondary,
|
|
96
|
+
textTertiary: tokens.colors.textTertiary,
|
|
97
|
+
textDisabled: tokens.colors.textDisabled,
|
|
98
|
+
textInverse: tokens.colors.textInverse,
|
|
99
|
+
|
|
100
|
+
// Text on surfaces (Material Design 3)
|
|
101
|
+
onSurface: tokens.colors.onSurface,
|
|
102
|
+
onBackground: tokens.colors.onBackground,
|
|
103
|
+
|
|
104
|
+
// Text on colored backgrounds (Material Design 3)
|
|
105
|
+
onPrimary: tokens.colors.onPrimary,
|
|
106
|
+
onSecondary: tokens.colors.onSecondary,
|
|
107
|
+
onSuccess: tokens.colors.onSuccess,
|
|
108
|
+
onError: tokens.colors.onError,
|
|
109
|
+
onWarning: tokens.colors.onWarning,
|
|
110
|
+
onInfo: tokens.colors.onInfo,
|
|
111
|
+
|
|
112
|
+
// Semantic colors (can be used as text)
|
|
58
113
|
success: tokens.colors.success,
|
|
59
114
|
error: tokens.colors.error,
|
|
60
115
|
warning: tokens.colors.warning,
|
|
61
116
|
info: tokens.colors.info,
|
|
117
|
+
|
|
118
|
+
// Legacy support (deprecated - maps to new names)
|
|
119
|
+
primary: tokens.colors.textPrimary, // Legacy: use textPrimary or onPrimary
|
|
120
|
+
secondary: tokens.colors.textSecondary, // Legacy: use textSecondary or onSecondary
|
|
121
|
+
tertiary: tokens.colors.textTertiary, // Legacy: use textTertiary
|
|
122
|
+
disabled: tokens.colors.textDisabled, // Legacy: use textDisabled
|
|
123
|
+
inverse: tokens.colors.textInverse, // Legacy: use textInverse
|
|
62
124
|
};
|
|
63
125
|
|
|
64
126
|
return colorMap[color as ColorVariant] || color;
|
|
@@ -66,13 +128,17 @@ export const AtomicText: React.FC<AtomicTextProps> = ({
|
|
|
66
128
|
|
|
67
129
|
const textStyle: StyleProp<TextStyle> = [
|
|
68
130
|
typographyStyle,
|
|
69
|
-
{
|
|
131
|
+
{
|
|
132
|
+
color: getTextColor(),
|
|
133
|
+
...(textAlign && { textAlign }),
|
|
134
|
+
},
|
|
70
135
|
style,
|
|
71
136
|
];
|
|
72
137
|
|
|
73
138
|
return (
|
|
74
139
|
<Text
|
|
75
140
|
numberOfLines={numberOfLines}
|
|
141
|
+
ellipsizeMode={ellipsizeMode}
|
|
76
142
|
style={textStyle}
|
|
77
143
|
testID={testID}
|
|
78
144
|
>
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
import React, { useState } from 'react';
|
|
35
35
|
import { View, TextInput, StyleSheet, StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
36
|
-
import { useAppDesignTokens } from '
|
|
36
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
37
37
|
import { AtomicText } from './AtomicText';
|
|
38
38
|
|
|
39
39
|
export type AtomicTextAreaVariant = 'outlined' | 'filled' | 'flat';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Pressable
|
|
3
|
-
import { useAppDesignTokens } from '
|
|
2
|
+
import { Pressable } from 'react-native';
|
|
3
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
4
4
|
import { AtomicTouchableProps, TouchableFeedback, FeedbackStrength } from './touchable/types';
|
|
5
5
|
import {
|
|
6
6
|
getOpacityValue,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ViewStyle } from 'react-native';
|
|
2
2
|
import { FabVariant, FabSize, FabVariantConfig, FabSizeConfig } from '../types';
|
|
3
|
-
import type { DesignTokens } from '
|
|
3
|
+
import type { DesignTokens } from '@umituz/react-native-theme';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Material Design 3 FAB size configurations
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ViewStyle, TextStyle } from 'react-native';
|
|
2
|
-
import { useAppDesignTokens } from '
|
|
2
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
3
3
|
import { AtomicInputVariant, AtomicInputSize, AtomicInputState } from '../types';
|
|
4
4
|
|
|
5
5
|
type DesignTokens = ReturnType<typeof useAppDesignTokens>;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { ViewStyle, TextStyle } from 'react-native';
|
|
2
|
-
import { useAppDesignTokens } from '
|
|
2
|
+
import { useAppDesignTokens, type DesignTokens } from '@umituz/react-native-theme';
|
|
3
3
|
import { PickerSize } from '../types';
|
|
4
4
|
import { IOS_HIG, getMinTouchTarget } from '../../../utils/platformConstants';
|
|
5
5
|
|
|
6
|
-
type DesignTokens = ReturnType<typeof useAppDesignTokens>;
|
|
7
|
-
|
|
8
6
|
/**
|
|
9
7
|
* Picker container styles with iOS HIG compliance
|
|
10
8
|
*
|
|
@@ -50,7 +48,10 @@ export const getPickerContainerStyles = (tokens: DesignTokens) => ({
|
|
|
50
48
|
},
|
|
51
49
|
});
|
|
52
50
|
|
|
53
|
-
export const getPickerLabelStyles = (tokens: DesignTokens)
|
|
51
|
+
export const getPickerLabelStyles = (tokens: DesignTokens): {
|
|
52
|
+
base: TextStyle;
|
|
53
|
+
size: { sm: TextStyle; md: TextStyle; lg: TextStyle };
|
|
54
|
+
} => ({
|
|
54
55
|
base: {
|
|
55
56
|
marginBottom: tokens.spacing.xs,
|
|
56
57
|
color: tokens.colors.textPrimary,
|
|
@@ -63,7 +64,10 @@ export const getPickerLabelStyles = (tokens: DesignTokens) => ({
|
|
|
63
64
|
},
|
|
64
65
|
});
|
|
65
66
|
|
|
66
|
-
export const getPickerPlaceholderStyles = (tokens: DesignTokens)
|
|
67
|
+
export const getPickerPlaceholderStyles = (tokens: DesignTokens): {
|
|
68
|
+
base: TextStyle;
|
|
69
|
+
size: { sm: TextStyle; md: TextStyle; lg: TextStyle };
|
|
70
|
+
} => ({
|
|
67
71
|
base: {
|
|
68
72
|
color: tokens.colors.textSecondary,
|
|
69
73
|
},
|
|
@@ -74,7 +78,10 @@ export const getPickerPlaceholderStyles = (tokens: DesignTokens) => ({
|
|
|
74
78
|
},
|
|
75
79
|
});
|
|
76
80
|
|
|
77
|
-
export const getPickerValueStyles = (tokens: DesignTokens)
|
|
81
|
+
export const getPickerValueStyles = (tokens: DesignTokens): {
|
|
82
|
+
base: TextStyle;
|
|
83
|
+
size: { sm: TextStyle; md: TextStyle; lg: TextStyle };
|
|
84
|
+
} => ({
|
|
78
85
|
base: {
|
|
79
86
|
flex: 1,
|
|
80
87
|
color: tokens.colors.textPrimary,
|
|
@@ -39,9 +39,7 @@
|
|
|
39
39
|
|
|
40
40
|
import React from 'react';
|
|
41
41
|
import { View, Modal, TouchableOpacity } from 'react-native';
|
|
42
|
-
import { useAppDesignTokens } from '
|
|
43
|
-
// @ts-ignore - Optional peer dependency
|
|
44
|
-
import { useLocalization } from '@umituz/react-native-localization';
|
|
42
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
45
43
|
import { AtomicText } from '../atoms/AtomicText';
|
|
46
44
|
import { AtomicButton } from '../atoms/AtomicButton';
|
|
47
45
|
import { AtomicIcon } from '../atoms/AtomicIcon';
|
|
@@ -80,29 +78,10 @@ export const AtomicConfirmationModal: React.FC<AtomicConfirmationModalProps> = (
|
|
|
80
78
|
testID = 'atomic-confirmation-modal',
|
|
81
79
|
}) => {
|
|
82
80
|
const tokens = useAppDesignTokens();
|
|
83
|
-
const { t } = useLocalization();
|
|
84
81
|
|
|
85
82
|
// Get variant-specific configuration (icon and color only)
|
|
86
83
|
const variantConfig = getVariantConfig(variant as 'default' | 'destructive' | 'warning' | 'success', tokens);
|
|
87
84
|
|
|
88
|
-
// Get locale-aware default text based on variant
|
|
89
|
-
const getDefaultConfirmText = (): string => {
|
|
90
|
-
switch (variant) {
|
|
91
|
-
case 'destructive':
|
|
92
|
-
return t('general.delete');
|
|
93
|
-
case 'warning':
|
|
94
|
-
return t('general.continue');
|
|
95
|
-
case 'success':
|
|
96
|
-
case 'default':
|
|
97
|
-
default:
|
|
98
|
-
return t('general.confirm');
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
// Determine final text values
|
|
103
|
-
const finalConfirmText = confirmText || getDefaultConfirmText();
|
|
104
|
-
const finalCancelText = cancelText || t('general.cancel');
|
|
105
|
-
|
|
106
85
|
// Determine final icon
|
|
107
86
|
const finalIcon = icon || variantConfig.icon;
|
|
108
87
|
|
|
@@ -185,7 +164,7 @@ export const AtomicConfirmationModal: React.FC<AtomicConfirmationModalProps> = (
|
|
|
185
164
|
style={getButtonStyle()}
|
|
186
165
|
testID={`${testID}-cancel-button`}
|
|
187
166
|
>
|
|
188
|
-
{
|
|
167
|
+
{cancelText}
|
|
189
168
|
</AtomicButton>
|
|
190
169
|
|
|
191
170
|
{/* Confirm Button */}
|
|
@@ -201,7 +180,7 @@ export const AtomicConfirmationModal: React.FC<AtomicConfirmationModalProps> = (
|
|
|
201
180
|
]}
|
|
202
181
|
testID={`${testID}-confirm-button`}
|
|
203
182
|
>
|
|
204
|
-
{
|
|
183
|
+
{confirmText}
|
|
205
184
|
</AtomicButton>
|
|
206
185
|
</View>
|
|
207
186
|
</View>
|
|
@@ -231,8 +210,8 @@ export const useConfirmationModal = (config: {
|
|
|
231
210
|
title: string;
|
|
232
211
|
message: string;
|
|
233
212
|
variant?: ConfirmationModalVariant;
|
|
234
|
-
confirmText
|
|
235
|
-
cancelText
|
|
213
|
+
confirmText: string;
|
|
214
|
+
cancelText: string;
|
|
236
215
|
onConfirm: () => void;
|
|
237
216
|
}) => {
|
|
238
217
|
const [visible, setVisible] = React.useState(false);
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { View, StyleSheet, ViewStyle, TextStyle } from 'react-native';
|
|
19
19
|
import { AtomicText, AtomicIcon } from '../atoms';
|
|
20
|
-
import { useAppDesignTokens } from '
|
|
20
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
21
21
|
|
|
22
22
|
// =============================================================================
|
|
23
23
|
// TYPE DEFINITIONS
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { View, ViewStyle } from 'react-native';
|
|
13
|
-
import { useAppDesignTokens } from '
|
|
13
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
14
14
|
import { AtomicText } from '../atoms/AtomicText';
|
|
15
15
|
import { AtomicInput, AtomicInputProps } from '../atoms/AtomicInput';
|
|
16
16
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { View, StyleSheet } from 'react-native';
|
|
19
|
-
import { useAppDesignTokens } from '
|
|
19
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
20
20
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
21
21
|
|
|
22
22
|
interface IconContainerProps {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TouchableOpacity, View } from 'react-native';
|
|
3
|
-
import { useAppDesignTokens } from '
|
|
3
|
+
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
4
4
|
import { AtomicText } from '../atoms/AtomicText';
|
|
5
5
|
import { AtomicIcon } from '../atoms/AtomicIcon';
|
|
6
6
|
import { ListItemProps } from './listitem/types';
|