@umituz/react-native-design-system 1.4.3 → 1.7.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.
- package/README.md +0 -1
- package/lib/index.d.ts +2 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +17 -22
- package/lib/index.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 +1 -1
- package/lib/presentation/atoms/AtomicButton.js.map +1 -1
- package/lib/presentation/atoms/AtomicFormError.js +1 -1
- 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/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/picker/styles/pickerStyles.d.ts +4 -15
- 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/hooks/useAppDesignTokens.d.ts +6 -27
- package/lib/presentation/hooks/useAppDesignTokens.d.ts.map +1 -1
- package/lib/presentation/hooks/useAppDesignTokens.js +6 -32
- package/lib/presentation/hooks/useAppDesignTokens.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 +2 -21
- package/lib/presentation/molecules/AtomicConfirmationModal.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/organisms/AppHeader.d.ts +3 -2
- package/lib/presentation/organisms/AppHeader.d.ts.map +1 -1
- package/lib/presentation/organisms/AppHeader.js.map +1 -1
- package/lib/presentation/tokens/commonStyles.d.ts +1 -1
- package/lib/presentation/tokens/commonStyles.js +1 -1
- package/package.json +11 -5
- package/src/index.ts +35 -39
- package/src/presentation/atoms/AtomicBadge.tsx +1 -1
- package/src/presentation/atoms/AtomicButton.tsx +2 -2
- package/src/presentation/atoms/AtomicFormError.tsx +1 -1
- package/src/presentation/atoms/AtomicIcon.tsx +3 -4
- package/src/presentation/atoms/AtomicTouchable.tsx +1 -1
- package/src/presentation/atoms/fab/styles/fabStyles.ts +1 -1
- package/src/presentation/atoms/picker/styles/pickerStyles.ts +25 -5
- package/src/presentation/hooks/useAppDesignTokens.ts +6 -33
- package/src/presentation/molecules/AtomicConfirmationModal.tsx +4 -25
- 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/organisms/AppHeader.tsx +3 -2
- package/src/presentation/tokens/commonStyles.ts +1 -1
- 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/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/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
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { ViewStyle } from 'react-native';
|
|
7
7
|
import { ConfirmationModalVariant, ConfirmationModalVariantConfig } from '../types';
|
|
8
|
-
import type { DesignTokens } from '
|
|
8
|
+
import type { DesignTokens } from '@umituz/react-native-theme';
|
|
9
9
|
/**
|
|
10
10
|
* Get variant configuration (icon and color only)
|
|
11
11
|
* Note: Confirm text is handled in component with translations
|
package/lib/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirmationModalStyles.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,8BAA8B,EAAE,MAAM,UAAU,CAAC;AACpF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"confirmationModalStyles.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,8BAA8B,EAAE,MAAM,UAAU,CAAC;AACpF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAC3B,SAAS,wBAAwB,EACjC,QAAQ,YAAY,KACnB,IAAI,CAAC,8BAA8B,EAAE,aAAa,CAwBpD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,QAAQ,YAAY,KAAG,SAK1D,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAO,SAMlC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,QAAQ,YAAY,KAAG,SAS5D,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,QAAQ,YAAY,KAAG,SAE3D,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,QAAQ,YAAY,KAAG,SAE5D,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,QAAQ,YAAY,KAAG,SAE9D,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAAI,QAAQ,YAAY,KAAG,SAI7D,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc,QAAO,SAEhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,SAAS,wBAAwB,KAChC,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,OAYrD,CAAC"}
|
|
@@ -34,15 +34,13 @@ export interface AtomicConfirmationModalProps {
|
|
|
34
34
|
*/
|
|
35
35
|
variant?: ConfirmationModalVariant;
|
|
36
36
|
/**
|
|
37
|
-
* Confirm button text
|
|
38
|
-
* @default 'Confirm' (or variant-specific default)
|
|
37
|
+
* Confirm button text (required)
|
|
39
38
|
*/
|
|
40
|
-
confirmText
|
|
39
|
+
confirmText: string;
|
|
41
40
|
/**
|
|
42
|
-
* Cancel button text
|
|
43
|
-
* @default 'Cancel'
|
|
41
|
+
* Cancel button text (required)
|
|
44
42
|
*/
|
|
45
|
-
cancelText
|
|
43
|
+
cancelText: string;
|
|
46
44
|
/**
|
|
47
45
|
* Icon name to display at top (MaterialIcons name)
|
|
48
46
|
* If not provided, uses variant-specific default icon
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/molecules/confirmation-modal/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAChC,SAAS,GACT,aAAa,GACb,SAAS,GACT,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,OAAO,CAAC,EAAE,wBAAwB,CAAC;IAEnC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/molecules/confirmation-modal/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAChC,SAAS,GACT,aAAa,GACb,SAAS,GACT,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,OAAO,CAAC,EAAE,wBAAwB,CAAC;IAEnC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IAEtB;;OAEG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,eAAe,CAAC;CAC5B"}
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
export { FormField } from './FormField';
|
|
10
10
|
export { ListItem } from './ListItem';
|
|
11
11
|
export { SearchBar } from './SearchBar';
|
|
12
|
-
export { LanguageSwitcher } from './LanguageSwitcher';
|
|
13
12
|
export { SectionCard } from './SectionCard';
|
|
14
13
|
export { IconContainer } from './IconContainer';
|
|
15
14
|
export { ScreenHeader } from './ScreenHeader';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presentation/molecules/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presentation/molecules/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAM1F,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,YAAY,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAGxG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAE9E,MAAM,MAAM,sBAAsB,GAC9B,cAAc,GACd,aAAa,GACb,cAAc,GACd,iBAAiB,GACjB,4BAA4B,CAAC"}
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
export { FormField } from './FormField';
|
|
11
11
|
export { ListItem } from './ListItem';
|
|
12
12
|
export { SearchBar } from './SearchBar';
|
|
13
|
-
export { LanguageSwitcher } from './LanguageSwitcher';
|
|
14
13
|
export { SectionCard } from './SectionCard';
|
|
15
14
|
export { IconContainer } from './IconContainer';
|
|
16
15
|
export { ScreenHeader } from './ScreenHeader';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/presentation/molecules/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,oBAAoB;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/presentation/molecules/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,oBAAoB;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { ViewStyle } from 'react-native';
|
|
12
|
+
import type { IconName } from '@umituz/react-native-icon';
|
|
12
13
|
/**
|
|
13
14
|
* AppHeader component props
|
|
14
15
|
*
|
|
@@ -18,9 +19,9 @@ import { ViewStyle } from 'react-native';
|
|
|
18
19
|
export interface AppHeaderProps {
|
|
19
20
|
title: string;
|
|
20
21
|
subtitle?: string;
|
|
21
|
-
leftIcon?:
|
|
22
|
+
leftIcon?: IconName;
|
|
22
23
|
onLeftPress?: () => void;
|
|
23
|
-
rightIcon?:
|
|
24
|
+
rightIcon?: IconName;
|
|
24
25
|
onRightPress?: () => void;
|
|
25
26
|
showShadow?: boolean;
|
|
26
27
|
backgroundColor?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../../src/presentation/organisms/AppHeader.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,SAAS,EAAgB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../../src/presentation/organisms/AppHeader.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,SAAS,EAAgB,MAAM,cAAc,CAAC;AAK7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAM1D;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAMD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAwD9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeader.js","sourceRoot":"","sources":["../../../src/presentation/organisms/AppHeader.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAa,YAAY,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"AppHeader.js","sourceRoot":"","sources":["../../../src/presentation/organisms/AppHeader.tsx"],"names":[],"mappings":"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"}
|
|
@@ -51,7 +51,7 @@ export declare const useCommonStyles: () => {
|
|
|
51
51
|
scrollContentCentered: ViewStyle;
|
|
52
52
|
/**
|
|
53
53
|
* Centered container - both horizontal and vertical
|
|
54
|
-
* Perfect for empty states,
|
|
54
|
+
* Perfect for empty states, splash screens
|
|
55
55
|
*/
|
|
56
56
|
centerContainer: ViewStyle;
|
|
57
57
|
/**
|
|
@@ -82,7 +82,7 @@ export const useCommonStyles = () => {
|
|
|
82
82
|
// ========================================================================
|
|
83
83
|
/**
|
|
84
84
|
* Centered container - both horizontal and vertical
|
|
85
|
-
* Perfect for empty states,
|
|
85
|
+
* Perfect for empty states, splash screens
|
|
86
86
|
*/
|
|
87
87
|
centerContainer: {
|
|
88
88
|
flex: 1,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-design-system",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Universal design system for React Native apps - Domain-Driven Design architecture with Material Design 3 components",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
"zustand": "^5.0.2",
|
|
42
42
|
"expo-linear-gradient": "~13.0.2",
|
|
43
43
|
"@react-navigation/native": "^6.0.0",
|
|
44
|
-
"@umituz/react-native-
|
|
44
|
+
"@umituz/react-native-theme": "^1.0.0",
|
|
45
|
+
"@umituz/react-native-icon": "^1.0.0"
|
|
45
46
|
},
|
|
46
47
|
"peerDependenciesMeta": {
|
|
47
48
|
"expo-linear-gradient": {
|
|
@@ -50,8 +51,11 @@
|
|
|
50
51
|
"@react-navigation/native": {
|
|
51
52
|
"optional": true
|
|
52
53
|
},
|
|
53
|
-
"@umituz/react-native-
|
|
54
|
-
"optional":
|
|
54
|
+
"@umituz/react-native-theme": {
|
|
55
|
+
"optional": false
|
|
56
|
+
},
|
|
57
|
+
"@umituz/react-native-icon": {
|
|
58
|
+
"optional": false
|
|
55
59
|
}
|
|
56
60
|
},
|
|
57
61
|
"devDependencies": {
|
|
@@ -68,7 +72,9 @@
|
|
|
68
72
|
"react-native-safe-area-context": "^4.8.0",
|
|
69
73
|
"@react-native-community/datetimepicker": "8.0.1",
|
|
70
74
|
"expo-linear-gradient": "~13.0.2",
|
|
71
|
-
"@react-navigation/native": "^6.0.0"
|
|
75
|
+
"@react-navigation/native": "^6.0.0",
|
|
76
|
+
"@umituz/react-native-theme": "file:../react-native-theme",
|
|
77
|
+
"@umituz/react-native-icon": "file:../react-native-icon"
|
|
72
78
|
},
|
|
73
79
|
"publishConfig": {
|
|
74
80
|
"access": "public"
|
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,46 +225,44 @@ 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
|
+
// TOKENS - MOVED TO @umituz/react-native-theme
|
|
238
229
|
// =============================================================================
|
|
230
|
+
// All design tokens (BASE_TOKENS, STATIC_TOKENS, spacing, typography, etc.)
|
|
231
|
+
// have been moved to @umituz/react-native-theme package.
|
|
232
|
+
// Import directly from theme package:
|
|
233
|
+
// import { BASE_TOKENS, STATIC_TOKENS, spacing, typography } from '@umituz/react-native-theme';
|
|
234
|
+
// import { useAppDesignTokens, createDesignTokens, lightColors, darkColors } from '@umituz/react-native-theme';
|
|
239
235
|
|
|
236
|
+
// Re-export for backward compatibility (deprecated - use @umituz/react-native-theme directly)
|
|
240
237
|
export {
|
|
241
|
-
// Static tokens (don't change with theme)
|
|
242
|
-
STATIC_TOKENS,
|
|
243
238
|
BASE_TOKENS,
|
|
244
|
-
|
|
245
|
-
|
|
239
|
+
STATIC_TOKENS,
|
|
240
|
+
spacing,
|
|
241
|
+
typography,
|
|
242
|
+
borders,
|
|
243
|
+
iconSizes,
|
|
244
|
+
opacity,
|
|
245
|
+
avatarSizes,
|
|
246
|
+
sizes,
|
|
247
|
+
type Spacing,
|
|
248
|
+
type Typography,
|
|
249
|
+
type Borders,
|
|
250
|
+
type IconSizes,
|
|
251
|
+
type Opacity,
|
|
252
|
+
type AvatarSizes,
|
|
253
|
+
type Sizes,
|
|
254
|
+
type BaseTokens,
|
|
246
255
|
createDesignTokens,
|
|
247
|
-
|
|
248
|
-
// Color utilities
|
|
256
|
+
STATIC_DESIGN_TOKENS,
|
|
249
257
|
withAlpha,
|
|
250
258
|
lightColors,
|
|
251
259
|
darkColors,
|
|
252
260
|
getColorPalette,
|
|
253
|
-
|
|
254
|
-
// Individual base tokens
|
|
255
|
-
spacing,
|
|
256
|
-
typography,
|
|
257
|
-
borders,
|
|
258
|
-
|
|
259
|
-
// Type exports
|
|
260
261
|
type DesignTokens,
|
|
261
262
|
type ThemeMode,
|
|
262
263
|
type ColorPalette,
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
type Borders,
|
|
266
|
-
type BaseTokens,
|
|
267
|
-
} from './presentation/tokens/AppDesignTokens';
|
|
268
|
-
|
|
269
|
-
// Hook for dynamic theme-aware tokens (exported separately to avoid cycle)
|
|
270
|
-
export { useAppDesignTokens } from './presentation/hooks/useAppDesignTokens';
|
|
264
|
+
useAppDesignTokens,
|
|
265
|
+
} from '@umituz/react-native-theme';
|
|
271
266
|
|
|
272
267
|
export {
|
|
273
268
|
useCommonStyles,
|
|
@@ -325,21 +320,22 @@ export {
|
|
|
325
320
|
} from './presentation/utils/responsive';
|
|
326
321
|
|
|
327
322
|
// =============================================================================
|
|
328
|
-
// THEME MANAGEMENT -
|
|
323
|
+
// THEME MANAGEMENT - MOVED TO @umituz/react-native-theme
|
|
329
324
|
// =============================================================================
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
useDesignSystemTheme,
|
|
333
|
-
} from './infrastructure/theme/globalThemeStore';
|
|
325
|
+
// useDesignSystemTheme has been moved to @umituz/react-native-theme package.
|
|
326
|
+
// Import directly: import { useDesignSystemTheme } from '@umituz/react-native-theme';
|
|
334
327
|
|
|
335
328
|
// =============================================================================
|
|
336
|
-
// ICONS DOMAIN -
|
|
329
|
+
// ICONS DOMAIN - MOVED TO @umituz/react-native-icon
|
|
337
330
|
// =============================================================================
|
|
331
|
+
// Icon components have been moved to @umituz/react-native-icon package.
|
|
332
|
+
// Import directly: import { Icon, IconName, IconSize, IconColor } from '@umituz/react-native-icon';
|
|
338
333
|
|
|
334
|
+
// Re-export for backward compatibility (deprecated - use @umituz/react-native-icon directly)
|
|
339
335
|
export {
|
|
340
336
|
Icon,
|
|
341
337
|
type IconProps,
|
|
342
338
|
type IconSize,
|
|
343
339
|
type IconColor,
|
|
344
340
|
type IconName,
|
|
345
|
-
} from '
|
|
341
|
+
} from '@umituz/react-native-icon';
|
|
@@ -18,7 +18,7 @@ import React from 'react';
|
|
|
18
18
|
import { View, StyleSheet, StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
19
19
|
import { AtomicText } from './AtomicText';
|
|
20
20
|
import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
|
|
21
|
-
import type { DesignTokens } from '
|
|
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 '
|
|
4
|
+
import { Icon } from '@umituz/react-native-icon';
|
|
5
5
|
import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
|
|
6
|
-
import type { IconName } from '
|
|
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';
|
|
@@ -18,7 +18,7 @@ import React from 'react';
|
|
|
18
18
|
import { View, StyleSheet, StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
19
19
|
import { AtomicText } from './AtomicText';
|
|
20
20
|
import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
|
|
21
|
-
import { withAlpha } from '
|
|
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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Pressable
|
|
2
|
+
import { Pressable } from 'react-native';
|
|
3
3
|
import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
|
|
4
4
|
import { AtomicTouchableProps, TouchableFeedback, FeedbackStrength } from './touchable/types';
|
|
5
5
|
import {
|
|
@@ -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
|
|
@@ -2,8 +2,7 @@ import { ViewStyle, TextStyle } from 'react-native';
|
|
|
2
2
|
import { useAppDesignTokens } from '../../../hooks/useAppDesignTokens';
|
|
3
3
|
import { PickerSize } from '../types';
|
|
4
4
|
import { IOS_HIG, getMinTouchTarget } from '../../../utils/platformConstants';
|
|
5
|
-
|
|
6
|
-
type DesignTokens = ReturnType<typeof useAppDesignTokens>;
|
|
5
|
+
import type { DesignTokens } from '@umituz/react-native-theme';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* Picker container styles with iOS HIG compliance
|
|
@@ -50,7 +49,14 @@ export const getPickerContainerStyles = (tokens: DesignTokens) => ({
|
|
|
50
49
|
},
|
|
51
50
|
});
|
|
52
51
|
|
|
53
|
-
export const getPickerLabelStyles = (tokens: DesignTokens)
|
|
52
|
+
export const getPickerLabelStyles = (tokens: DesignTokens): {
|
|
53
|
+
base: TextStyle;
|
|
54
|
+
size: {
|
|
55
|
+
sm: TextStyle;
|
|
56
|
+
md: TextStyle;
|
|
57
|
+
lg: TextStyle;
|
|
58
|
+
};
|
|
59
|
+
} => ({
|
|
54
60
|
base: {
|
|
55
61
|
marginBottom: tokens.spacing.xs,
|
|
56
62
|
color: tokens.colors.textPrimary,
|
|
@@ -63,7 +69,14 @@ export const getPickerLabelStyles = (tokens: DesignTokens) => ({
|
|
|
63
69
|
},
|
|
64
70
|
});
|
|
65
71
|
|
|
66
|
-
export const getPickerPlaceholderStyles = (tokens: DesignTokens)
|
|
72
|
+
export const getPickerPlaceholderStyles = (tokens: DesignTokens): {
|
|
73
|
+
base: TextStyle;
|
|
74
|
+
size: {
|
|
75
|
+
sm: TextStyle;
|
|
76
|
+
md: TextStyle;
|
|
77
|
+
lg: TextStyle;
|
|
78
|
+
};
|
|
79
|
+
} => ({
|
|
67
80
|
base: {
|
|
68
81
|
color: tokens.colors.textSecondary,
|
|
69
82
|
},
|
|
@@ -74,7 +87,14 @@ export const getPickerPlaceholderStyles = (tokens: DesignTokens) => ({
|
|
|
74
87
|
},
|
|
75
88
|
});
|
|
76
89
|
|
|
77
|
-
export const getPickerValueStyles = (tokens: DesignTokens)
|
|
90
|
+
export const getPickerValueStyles = (tokens: DesignTokens): {
|
|
91
|
+
base: TextStyle;
|
|
92
|
+
size: {
|
|
93
|
+
sm: TextStyle;
|
|
94
|
+
md: TextStyle;
|
|
95
|
+
lg: TextStyle;
|
|
96
|
+
};
|
|
97
|
+
} => ({
|
|
78
98
|
base: {
|
|
79
99
|
flex: 1,
|
|
80
100
|
color: tokens.colors.textPrimary,
|
|
@@ -1,40 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* useAppDesignTokens Hook -
|
|
2
|
+
* useAppDesignTokens Hook - MOVED TO @umituz/react-native-theme
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* ✅ Returns tokens for current theme (light/dark)
|
|
7
|
-
* ✅ Single source of truth
|
|
4
|
+
* This hook has been moved to @umituz/react-native-theme package.
|
|
5
|
+
* Re-exported here for backward compatibility.
|
|
8
6
|
*
|
|
9
|
-
* @
|
|
7
|
+
* @deprecated Import from @umituz/react-native-theme instead
|
|
10
8
|
* ```typescript
|
|
11
|
-
* import { useAppDesignTokens } from '@umituz/react-native-
|
|
12
|
-
*
|
|
13
|
-
* const MyComponent = () => {
|
|
14
|
-
* const tokens = useAppDesignTokens(); // Automatically uses current theme!
|
|
15
|
-
* return (
|
|
16
|
-
* <View style={{
|
|
17
|
-
* backgroundColor: tokens.colors.primary,
|
|
18
|
-
* padding: tokens.spacing.md
|
|
19
|
-
* }}>
|
|
20
|
-
* <Text style={tokens.typography.bodyLarge}>Hello!</Text>
|
|
21
|
-
* </View>
|
|
22
|
-
* );
|
|
23
|
-
* };
|
|
9
|
+
* import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
24
10
|
* ```
|
|
25
|
-
*
|
|
26
|
-
* How it works:
|
|
27
|
-
* - Reads themeMode from global store (useDesignSystemTheme)
|
|
28
|
-
* - App's theme store syncs to global store automatically
|
|
29
|
-
* - All components get correct tokens without prop drilling
|
|
30
|
-
* - Change theme once, everything updates!
|
|
31
11
|
*/
|
|
32
12
|
|
|
33
|
-
|
|
34
|
-
import { createDesignTokens, type DesignTokens } from '../tokens/core/TokenFactory';
|
|
35
|
-
import { useDesignSystemTheme } from '../../infrastructure/theme/globalThemeStore';
|
|
36
|
-
|
|
37
|
-
export const useAppDesignTokens = (): DesignTokens => {
|
|
38
|
-
const { themeMode } = useDesignSystemTheme();
|
|
39
|
-
return useMemo(() => createDesignTokens(themeMode), [themeMode]);
|
|
40
|
-
};
|
|
13
|
+
export { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
@@ -40,8 +40,6 @@
|
|
|
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
|
|
44
|
-
import { useLocalization } from '@umituz/react-native-localization';
|
|
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);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { ViewStyle } from 'react-native';
|
|
8
8
|
import { ConfirmationModalVariant, ConfirmationModalVariantConfig } from '../types';
|
|
9
|
-
import type { DesignTokens } from '
|
|
9
|
+
import type { DesignTokens } from '@umituz/react-native-theme';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Get variant configuration (icon and color only)
|
|
@@ -45,16 +45,14 @@ export interface AtomicConfirmationModalProps {
|
|
|
45
45
|
variant?: ConfirmationModalVariant;
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
* Confirm button text
|
|
49
|
-
* @default 'Confirm' (or variant-specific default)
|
|
48
|
+
* Confirm button text (required)
|
|
50
49
|
*/
|
|
51
|
-
confirmText
|
|
50
|
+
confirmText: string;
|
|
52
51
|
|
|
53
52
|
/**
|
|
54
|
-
* Cancel button text
|
|
55
|
-
* @default 'Cancel'
|
|
53
|
+
* Cancel button text (required)
|
|
56
54
|
*/
|
|
57
|
-
cancelText
|
|
55
|
+
cancelText: string;
|
|
58
56
|
|
|
59
57
|
/**
|
|
60
58
|
* Icon name to display at top (MaterialIcons name)
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
export { FormField } from './FormField';
|
|
12
12
|
export { ListItem } from './ListItem';
|
|
13
13
|
export { SearchBar } from './SearchBar';
|
|
14
|
-
export { LanguageSwitcher } from './LanguageSwitcher';
|
|
15
14
|
export { SectionCard } from './SectionCard';
|
|
16
15
|
export { IconContainer } from './IconContainer';
|
|
17
16
|
export { ScreenHeader } from './ScreenHeader';
|
|
@@ -14,6 +14,7 @@ import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
|
|
|
14
14
|
import { AtomicText } from '../atoms/AtomicText';
|
|
15
15
|
import { AtomicButton } from '../atoms/AtomicButton';
|
|
16
16
|
import { AtomicIcon } from '../atoms/AtomicIcon';
|
|
17
|
+
import type { IconName } from '@umituz/react-native-icon';
|
|
17
18
|
|
|
18
19
|
// =============================================================================
|
|
19
20
|
// TYPE DEFINITIONS
|
|
@@ -28,9 +29,9 @@ import { AtomicIcon } from '../atoms/AtomicIcon';
|
|
|
28
29
|
export interface AppHeaderProps {
|
|
29
30
|
title: string;
|
|
30
31
|
subtitle?: string;
|
|
31
|
-
leftIcon?:
|
|
32
|
+
leftIcon?: IconName; // Icon name
|
|
32
33
|
onLeftPress?: () => void;
|
|
33
|
-
rightIcon?:
|
|
34
|
+
rightIcon?: IconName; // Icon name
|
|
34
35
|
onRightPress?: () => void;
|
|
35
36
|
showShadow?: boolean;
|
|
36
37
|
backgroundColor?: string;
|