@umituz/react-native-design-system 1.7.1 → 1.7.2
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 +2 -2
- package/package.json +61 -35
- package/src/index.ts +72 -272
- package/lib/index.d.ts +0 -59
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -99
- package/lib/index.js.map +0 -1
- package/lib/presentation/atoms/AtomicAvatar.d.ts +0 -48
- package/lib/presentation/atoms/AtomicAvatar.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicAvatar.js +0 -85
- package/lib/presentation/atoms/AtomicAvatar.js.map +0 -1
- package/lib/presentation/atoms/AtomicAvatarGroup.d.ts +0 -56
- package/lib/presentation/atoms/AtomicAvatarGroup.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicAvatarGroup.js +0 -83
- package/lib/presentation/atoms/AtomicAvatarGroup.js.map +0 -1
- package/lib/presentation/atoms/AtomicBadge.d.ts +0 -42
- package/lib/presentation/atoms/AtomicBadge.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicBadge.js +0 -168
- package/lib/presentation/atoms/AtomicBadge.js.map +0 -1
- package/lib/presentation/atoms/AtomicButton.d.ts +0 -21
- package/lib/presentation/atoms/AtomicButton.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicButton.js +0 -172
- package/lib/presentation/atoms/AtomicButton.js.map +0 -1
- package/lib/presentation/atoms/AtomicCard.d.ts +0 -15
- package/lib/presentation/atoms/AtomicCard.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicCard.js +0 -70
- package/lib/presentation/atoms/AtomicCard.js.map +0 -1
- package/lib/presentation/atoms/AtomicChip.d.ts +0 -53
- package/lib/presentation/atoms/AtomicChip.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicChip.js +0 -131
- package/lib/presentation/atoms/AtomicChip.js.map +0 -1
- package/lib/presentation/atoms/AtomicDatePicker.d.ts +0 -75
- package/lib/presentation/atoms/AtomicDatePicker.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicDatePicker.js +0 -246
- package/lib/presentation/atoms/AtomicDatePicker.js.map +0 -1
- package/lib/presentation/atoms/AtomicDivider.d.ts +0 -45
- package/lib/presentation/atoms/AtomicDivider.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicDivider.js +0 -58
- package/lib/presentation/atoms/AtomicDivider.js.map +0 -1
- package/lib/presentation/atoms/AtomicFab.d.ts +0 -37
- package/lib/presentation/atoms/AtomicFab.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicFab.js +0 -68
- package/lib/presentation/atoms/AtomicFab.js.map +0 -1
- package/lib/presentation/atoms/AtomicFilter.d.ts +0 -37
- package/lib/presentation/atoms/AtomicFilter.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicFilter.js +0 -104
- package/lib/presentation/atoms/AtomicFilter.js.map +0 -1
- package/lib/presentation/atoms/AtomicFormError.d.ts +0 -30
- package/lib/presentation/atoms/AtomicFormError.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicFormError.js +0 -64
- package/lib/presentation/atoms/AtomicFormError.js.map +0 -1
- package/lib/presentation/atoms/AtomicIcon.d.ts +0 -35
- package/lib/presentation/atoms/AtomicIcon.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicIcon.js +0 -30
- package/lib/presentation/atoms/AtomicIcon.js.map +0 -1
- package/lib/presentation/atoms/AtomicImage.d.ts +0 -40
- package/lib/presentation/atoms/AtomicImage.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicImage.js +0 -92
- package/lib/presentation/atoms/AtomicImage.js.map +0 -1
- package/lib/presentation/atoms/AtomicInput.d.ts +0 -71
- package/lib/presentation/atoms/AtomicInput.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicInput.js +0 -196
- package/lib/presentation/atoms/AtomicInput.js.map +0 -1
- package/lib/presentation/atoms/AtomicNumberInput.d.ts +0 -69
- package/lib/presentation/atoms/AtomicNumberInput.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicNumberInput.js +0 -125
- package/lib/presentation/atoms/AtomicNumberInput.js.map +0 -1
- package/lib/presentation/atoms/AtomicPicker.d.ts +0 -52
- package/lib/presentation/atoms/AtomicPicker.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicPicker.js +0 -299
- package/lib/presentation/atoms/AtomicPicker.js.map +0 -1
- package/lib/presentation/atoms/AtomicProgress.d.ts +0 -44
- package/lib/presentation/atoms/AtomicProgress.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicProgress.js +0 -80
- package/lib/presentation/atoms/AtomicProgress.js.map +0 -1
- package/lib/presentation/atoms/AtomicSearchBar.d.ts +0 -19
- package/lib/presentation/atoms/AtomicSearchBar.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicSearchBar.js +0 -46
- package/lib/presentation/atoms/AtomicSearchBar.js.map +0 -1
- package/lib/presentation/atoms/AtomicSort.d.ts +0 -72
- package/lib/presentation/atoms/AtomicSort.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicSort.js +0 -77
- package/lib/presentation/atoms/AtomicSort.js.map +0 -1
- package/lib/presentation/atoms/AtomicSwitch.d.ts +0 -43
- package/lib/presentation/atoms/AtomicSwitch.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicSwitch.js +0 -104
- package/lib/presentation/atoms/AtomicSwitch.js.map +0 -1
- package/lib/presentation/atoms/AtomicText.d.ts +0 -14
- package/lib/presentation/atoms/AtomicText.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicText.js +0 -36
- package/lib/presentation/atoms/AtomicText.js.map +0 -1
- package/lib/presentation/atoms/AtomicTextArea.d.ts +0 -85
- package/lib/presentation/atoms/AtomicTextArea.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicTextArea.js +0 -196
- package/lib/presentation/atoms/AtomicTextArea.js.map +0 -1
- package/lib/presentation/atoms/AtomicTouchable.d.ts +0 -77
- package/lib/presentation/atoms/AtomicTouchable.d.ts.map +0 -1
- package/lib/presentation/atoms/AtomicTouchable.js +0 -138
- package/lib/presentation/atoms/AtomicTouchable.js.map +0 -1
- package/lib/presentation/atoms/fab/styles/fabStyles.d.ts +0 -23
- package/lib/presentation/atoms/fab/styles/fabStyles.d.ts.map +0 -1
- package/lib/presentation/atoms/fab/styles/fabStyles.js +0 -63
- package/lib/presentation/atoms/fab/styles/fabStyles.js.map +0 -1
- package/lib/presentation/atoms/fab/types/index.d.ts +0 -71
- package/lib/presentation/atoms/fab/types/index.d.ts.map +0 -1
- package/lib/presentation/atoms/fab/types/index.js +0 -2
- package/lib/presentation/atoms/fab/types/index.js.map +0 -1
- package/lib/presentation/atoms/filter/styles/filterStyles.d.ts +0 -15
- package/lib/presentation/atoms/filter/styles/filterStyles.d.ts.map +0 -1
- package/lib/presentation/atoms/filter/styles/filterStyles.js +0 -29
- package/lib/presentation/atoms/filter/styles/filterStyles.js.map +0 -1
- package/lib/presentation/atoms/filter/types/index.d.ts +0 -76
- package/lib/presentation/atoms/filter/types/index.d.ts.map +0 -1
- package/lib/presentation/atoms/filter/types/index.js +0 -2
- package/lib/presentation/atoms/filter/types/index.js.map +0 -1
- package/lib/presentation/atoms/index.d.ts +0 -273
- package/lib/presentation/atoms/index.d.ts.map +0 -1
- package/lib/presentation/atoms/index.js +0 -146
- package/lib/presentation/atoms/index.js.map +0 -1
- package/lib/presentation/atoms/input/hooks/useInputState.d.ts +0 -7
- package/lib/presentation/atoms/input/hooks/useInputState.d.ts.map +0 -1
- package/lib/presentation/atoms/input/hooks/useInputState.js +0 -13
- package/lib/presentation/atoms/input/hooks/useInputState.js.map +0 -1
- package/lib/presentation/atoms/input/styles/inputStyles.d.ts +0 -13
- package/lib/presentation/atoms/input/styles/inputStyles.d.ts.map +0 -1
- package/lib/presentation/atoms/input/styles/inputStyles.js +0 -59
- package/lib/presentation/atoms/input/styles/inputStyles.js.map +0 -1
- package/lib/presentation/atoms/input/types/index.d.ts +0 -24
- package/lib/presentation/atoms/input/types/index.d.ts.map +0 -1
- package/lib/presentation/atoms/input/types/index.js +0 -2
- package/lib/presentation/atoms/input/types/index.js.map +0 -1
- package/lib/presentation/atoms/picker/styles/pickerStyles.d.ts +0 -85
- package/lib/presentation/atoms/picker/styles/pickerStyles.d.ts.map +0 -1
- package/lib/presentation/atoms/picker/styles/pickerStyles.js +0 -177
- package/lib/presentation/atoms/picker/styles/pickerStyles.js.map +0 -1
- package/lib/presentation/atoms/picker/types/index.d.ts +0 -38
- package/lib/presentation/atoms/picker/types/index.d.ts.map +0 -1
- package/lib/presentation/atoms/picker/types/index.js +0 -2
- package/lib/presentation/atoms/picker/types/index.js.map +0 -1
- package/lib/presentation/atoms/touchable/styles/touchableStyles.d.ts +0 -31
- package/lib/presentation/atoms/touchable/styles/touchableStyles.d.ts.map +0 -1
- package/lib/presentation/atoms/touchable/styles/touchableStyles.js +0 -54
- package/lib/presentation/atoms/touchable/styles/touchableStyles.js.map +0 -1
- package/lib/presentation/atoms/touchable/types/index.d.ts +0 -134
- package/lib/presentation/atoms/touchable/types/index.d.ts.map +0 -1
- package/lib/presentation/atoms/touchable/types/index.js +0 -2
- package/lib/presentation/atoms/touchable/types/index.js.map +0 -1
- package/lib/presentation/hooks/useAppDesignTokens.d.ts +0 -13
- package/lib/presentation/hooks/useAppDesignTokens.d.ts.map +0 -1
- package/lib/presentation/hooks/useAppDesignTokens.js +0 -13
- package/lib/presentation/hooks/useAppDesignTokens.js.map +0 -1
- package/lib/presentation/hooks/useResponsive.d.ts +0 -80
- package/lib/presentation/hooks/useResponsive.d.ts.map +0 -1
- package/lib/presentation/hooks/useResponsive.js +0 -82
- package/lib/presentation/hooks/useResponsive.js.map +0 -1
- package/lib/presentation/molecules/AtomicConfirmationModal.d.ts +0 -73
- package/lib/presentation/molecules/AtomicConfirmationModal.d.ts.map +0 -1
- package/lib/presentation/molecules/AtomicConfirmationModal.js +0 -154
- package/lib/presentation/molecules/AtomicConfirmationModal.js.map +0 -1
- package/lib/presentation/molecules/EmptyState.d.ts +0 -41
- package/lib/presentation/molecules/EmptyState.d.ts.map +0 -1
- package/lib/presentation/molecules/EmptyState.js +0 -68
- package/lib/presentation/molecules/EmptyState.js.map +0 -1
- package/lib/presentation/molecules/FormField.d.ts +0 -22
- package/lib/presentation/molecules/FormField.d.ts.map +0 -1
- package/lib/presentation/molecules/FormField.js +0 -76
- package/lib/presentation/molecules/FormField.js.map +0 -1
- package/lib/presentation/molecules/GridContainer.d.ts +0 -40
- package/lib/presentation/molecules/GridContainer.d.ts.map +0 -1
- package/lib/presentation/molecules/GridContainer.js +0 -77
- package/lib/presentation/molecules/GridContainer.js.map +0 -1
- package/lib/presentation/molecules/IconContainer.d.ts +0 -29
- package/lib/presentation/molecules/IconContainer.d.ts.map +0 -1
- package/lib/presentation/molecules/IconContainer.js +0 -60
- package/lib/presentation/molecules/IconContainer.js.map +0 -1
- package/lib/presentation/molecules/ListItem.d.ts +0 -5
- package/lib/presentation/molecules/ListItem.d.ts.map +0 -1
- package/lib/presentation/molecules/ListItem.js +0 -24
- package/lib/presentation/molecules/ListItem.js.map +0 -1
- package/lib/presentation/molecules/ScreenHeader.d.ts +0 -55
- package/lib/presentation/molecules/ScreenHeader.d.ts.map +0 -1
- package/lib/presentation/molecules/ScreenHeader.js +0 -94
- package/lib/presentation/molecules/ScreenHeader.js.map +0 -1
- package/lib/presentation/molecules/SearchBar.d.ts +0 -18
- package/lib/presentation/molecules/SearchBar.d.ts.map +0 -1
- package/lib/presentation/molecules/SearchBar.js +0 -47
- package/lib/presentation/molecules/SearchBar.js.map +0 -1
- package/lib/presentation/molecules/SectionCard.d.ts +0 -25
- package/lib/presentation/molecules/SectionCard.d.ts.map +0 -1
- package/lib/presentation/molecules/SectionCard.js +0 -47
- package/lib/presentation/molecules/SectionCard.js.map +0 -1
- package/lib/presentation/molecules/SectionContainer.d.ts +0 -33
- package/lib/presentation/molecules/SectionContainer.d.ts.map +0 -1
- package/lib/presentation/molecules/SectionContainer.js +0 -64
- package/lib/presentation/molecules/SectionContainer.js.map +0 -1
- package/lib/presentation/molecules/SectionHeader.d.ts +0 -37
- package/lib/presentation/molecules/SectionHeader.d.ts.map +0 -1
- package/lib/presentation/molecules/SectionHeader.js +0 -73
- package/lib/presentation/molecules/SectionHeader.js.map +0 -1
- package/lib/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.d.ts +0 -50
- package/lib/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.d.ts.map +0 -1
- package/lib/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.js +0 -115
- package/lib/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.js.map +0 -1
- package/lib/presentation/molecules/confirmation-modal/types/index.d.ts +0 -86
- package/lib/presentation/molecules/confirmation-modal/types/index.d.ts.map +0 -1
- package/lib/presentation/molecules/confirmation-modal/types/index.js +0 -7
- package/lib/presentation/molecules/confirmation-modal/types/index.js.map +0 -1
- package/lib/presentation/molecules/index.d.ts +0 -27
- package/lib/presentation/molecules/index.d.ts.map +0 -1
- package/lib/presentation/molecules/index.js +0 -17
- package/lib/presentation/molecules/index.js.map +0 -1
- package/lib/presentation/molecules/listitem/styles/listItemStyles.d.ts +0 -12
- package/lib/presentation/molecules/listitem/styles/listItemStyles.d.ts.map +0 -1
- package/lib/presentation/molecules/listitem/styles/listItemStyles.js +0 -15
- package/lib/presentation/molecules/listitem/styles/listItemStyles.js.map +0 -1
- package/lib/presentation/molecules/listitem/types/index.d.ts +0 -17
- package/lib/presentation/molecules/listitem/types/index.d.ts.map +0 -1
- package/lib/presentation/molecules/listitem/types/index.js +0 -2
- package/lib/presentation/molecules/listitem/types/index.js.map +0 -1
- package/lib/presentation/organisms/AppHeader.d.ts +0 -31
- package/lib/presentation/organisms/AppHeader.d.ts.map +0 -1
- package/lib/presentation/organisms/AppHeader.js +0 -78
- package/lib/presentation/organisms/AppHeader.js.map +0 -1
- package/lib/presentation/organisms/FormContainer.d.ts +0 -76
- package/lib/presentation/organisms/FormContainer.d.ts.map +0 -1
- package/lib/presentation/organisms/FormContainer.js +0 -127
- package/lib/presentation/organisms/FormContainer.js.map +0 -1
- package/lib/presentation/organisms/ScreenLayout.d.ts +0 -84
- package/lib/presentation/organisms/ScreenLayout.d.ts.map +0 -1
- package/lib/presentation/organisms/ScreenLayout.js +0 -69
- package/lib/presentation/organisms/ScreenLayout.js.map +0 -1
- package/lib/presentation/organisms/index.d.ts +0 -16
- package/lib/presentation/organisms/index.d.ts.map +0 -1
- package/lib/presentation/organisms/index.js +0 -14
- package/lib/presentation/organisms/index.js.map +0 -1
- package/lib/presentation/tokens/commonStyles.d.ts +0 -122
- package/lib/presentation/tokens/commonStyles.d.ts.map +0 -1
- package/lib/presentation/tokens/commonStyles.js +0 -220
- package/lib/presentation/tokens/commonStyles.js.map +0 -1
- package/lib/presentation/utils/platformConstants.d.ts +0 -100
- package/lib/presentation/utils/platformConstants.d.ts.map +0 -1
- package/lib/presentation/utils/platformConstants.js +0 -114
- package/lib/presentation/utils/platformConstants.js.map +0 -1
- package/lib/presentation/utils/responsive.d.ts +0 -218
- package/lib/presentation/utils/responsive.d.ts.map +0 -1
- package/lib/presentation/utils/responsive.js +0 -452
- package/lib/presentation/utils/responsive.js.map +0 -1
- package/lib/presentation/utils/variants/compound.d.ts +0 -10
- package/lib/presentation/utils/variants/compound.d.ts.map +0 -1
- package/lib/presentation/utils/variants/compound.js +0 -16
- package/lib/presentation/utils/variants/compound.js.map +0 -1
- package/lib/presentation/utils/variants/core.d.ts +0 -15
- package/lib/presentation/utils/variants/core.d.ts.map +0 -1
- package/lib/presentation/utils/variants/core.js +0 -23
- package/lib/presentation/utils/variants/core.js.map +0 -1
- package/lib/presentation/utils/variants/helpers.d.ts +0 -5
- package/lib/presentation/utils/variants/helpers.d.ts.map +0 -1
- package/lib/presentation/utils/variants/helpers.js +0 -10
- package/lib/presentation/utils/variants/helpers.js.map +0 -1
- package/lib/presentation/utils/variants.d.ts +0 -4
- package/lib/presentation/utils/variants.d.ts.map +0 -1
- package/lib/presentation/utils/variants.js +0 -4
- package/lib/presentation/utils/variants.js.map +0 -1
- package/src/presentation/atoms/AtomicAvatar.tsx +0 -157
- package/src/presentation/atoms/AtomicAvatarGroup.tsx +0 -169
- package/src/presentation/atoms/AtomicBadge.tsx +0 -232
- package/src/presentation/atoms/AtomicButton.tsx +0 -236
- package/src/presentation/atoms/AtomicCard.tsx +0 -107
- package/src/presentation/atoms/AtomicChip.tsx +0 -223
- package/src/presentation/atoms/AtomicDatePicker.tsx +0 -354
- package/src/presentation/atoms/AtomicDivider.tsx +0 -114
- package/src/presentation/atoms/AtomicFab.tsx +0 -98
- package/src/presentation/atoms/AtomicFilter.tsx +0 -154
- package/src/presentation/atoms/AtomicFormError.tsx +0 -105
- package/src/presentation/atoms/AtomicIcon.tsx +0 -40
- package/src/presentation/atoms/AtomicImage.tsx +0 -149
- package/src/presentation/atoms/AtomicInput.tsx +0 -350
- package/src/presentation/atoms/AtomicNumberInput.tsx +0 -182
- package/src/presentation/atoms/AtomicPicker.tsx +0 -458
- package/src/presentation/atoms/AtomicProgress.tsx +0 -139
- package/src/presentation/atoms/AtomicSearchBar.tsx +0 -114
- package/src/presentation/atoms/AtomicSort.tsx +0 -145
- package/src/presentation/atoms/AtomicSwitch.tsx +0 -166
- package/src/presentation/atoms/AtomicText.tsx +0 -82
- package/src/presentation/atoms/AtomicTextArea.tsx +0 -313
- package/src/presentation/atoms/AtomicTouchable.tsx +0 -209
- package/src/presentation/atoms/fab/styles/fabStyles.ts +0 -69
- package/src/presentation/atoms/fab/types/index.ts +0 -82
- package/src/presentation/atoms/filter/styles/filterStyles.ts +0 -32
- package/src/presentation/atoms/filter/types/index.ts +0 -89
- package/src/presentation/atoms/index.ts +0 -366
- package/src/presentation/atoms/input/hooks/useInputState.ts +0 -15
- package/src/presentation/atoms/input/styles/inputStyles.ts +0 -66
- package/src/presentation/atoms/input/types/index.ts +0 -25
- package/src/presentation/atoms/picker/styles/pickerStyles.ts +0 -220
- package/src/presentation/atoms/picker/types/index.ts +0 -40
- package/src/presentation/atoms/touchable/styles/touchableStyles.ts +0 -62
- package/src/presentation/atoms/touchable/types/index.ts +0 -155
- package/src/presentation/hooks/useAppDesignTokens.ts +0 -13
- package/src/presentation/hooks/useResponsive.ts +0 -180
- package/src/presentation/molecules/AtomicConfirmationModal.tsx +0 -243
- package/src/presentation/molecules/EmptyState.tsx +0 -130
- package/src/presentation/molecules/FormField.tsx +0 -128
- package/src/presentation/molecules/GridContainer.tsx +0 -124
- package/src/presentation/molecules/IconContainer.tsx +0 -94
- package/src/presentation/molecules/ListItem.tsx +0 -36
- package/src/presentation/molecules/ScreenHeader.tsx +0 -140
- package/src/presentation/molecules/SearchBar.tsx +0 -85
- package/src/presentation/molecules/SectionCard.tsx +0 -74
- package/src/presentation/molecules/SectionContainer.tsx +0 -106
- package/src/presentation/molecules/SectionHeader.tsx +0 -125
- package/src/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.ts +0 -133
- package/src/presentation/molecules/confirmation-modal/types/index.ts +0 -105
- package/src/presentation/molecules/index.ts +0 -41
- package/src/presentation/molecules/listitem/styles/listItemStyles.ts +0 -19
- package/src/presentation/molecules/listitem/types/index.ts +0 -17
- package/src/presentation/organisms/AppHeader.tsx +0 -137
- package/src/presentation/organisms/FormContainer.tsx +0 -180
- package/src/presentation/organisms/ScreenLayout.tsx +0 -171
- package/src/presentation/organisms/index.ts +0 -25
- package/src/presentation/tokens/commonStyles.ts +0 -253
- package/src/presentation/utils/platformConstants.ts +0 -124
- package/src/presentation/utils/responsive.ts +0 -516
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Common Styles - Reusable Style Patterns
|
|
3
|
-
*
|
|
4
|
-
* Centralized style utilities to reduce duplication across screens.
|
|
5
|
-
* These styles are composable and follow DRY principles.
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
* ```typescript
|
|
9
|
-
* import { useCommonStyles } from '@domains/design-system/commonStyles';
|
|
10
|
-
*
|
|
11
|
-
* const MyComponent = () => {
|
|
12
|
-
* const commonStyles = useCommonStyles();
|
|
13
|
-
* return <View style={commonStyles.screenContainer}>...</View>;
|
|
14
|
-
* };
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
import { ViewStyle, TextStyle } from 'react-native';
|
|
19
|
-
import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Hook to get common styles with dynamic theme support
|
|
23
|
-
*/
|
|
24
|
-
export const useCommonStyles = () => {
|
|
25
|
-
const tokens = useAppDesignTokens();
|
|
26
|
-
|
|
27
|
-
return {
|
|
28
|
-
// ========================================================================
|
|
29
|
-
// SCREEN CONTAINERS
|
|
30
|
-
// ========================================================================
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Standard full-screen container
|
|
34
|
-
* Most common pattern: flex: 1 with background color
|
|
35
|
-
*/
|
|
36
|
-
screenContainer: {
|
|
37
|
-
flex: 1,
|
|
38
|
-
backgroundColor: tokens.colors.backgroundPrimary,
|
|
39
|
-
} as ViewStyle,
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Basic flex container without background
|
|
43
|
-
* Use when background is set elsewhere or not needed
|
|
44
|
-
*/
|
|
45
|
-
flexContainer: {
|
|
46
|
-
flex: 1,
|
|
47
|
-
} as ViewStyle,
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Screen container with secondary background
|
|
51
|
-
*/
|
|
52
|
-
screenContainerSecondary: {
|
|
53
|
-
flex: 1,
|
|
54
|
-
backgroundColor: tokens.colors.backgroundSecondary,
|
|
55
|
-
} as ViewStyle,
|
|
56
|
-
|
|
57
|
-
// ========================================================================
|
|
58
|
-
// SCROLL CONTAINERS
|
|
59
|
-
// ========================================================================
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Standard ScrollView wrapper
|
|
63
|
-
*/
|
|
64
|
-
scrollView: {
|
|
65
|
-
flex: 1,
|
|
66
|
-
} as ViewStyle,
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* ScrollView content container with standard padding
|
|
70
|
-
*/
|
|
71
|
-
scrollContent: {
|
|
72
|
-
paddingHorizontal: tokens.spacing.lg,
|
|
73
|
-
paddingBottom: tokens.spacing.xl,
|
|
74
|
-
} as ViewStyle,
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* ScrollView content that grows to fill available space
|
|
78
|
-
*/
|
|
79
|
-
scrollContentGrow: {
|
|
80
|
-
flexGrow: 1,
|
|
81
|
-
padding: tokens.spacing.lg,
|
|
82
|
-
} as ViewStyle,
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Centered scroll content (for forms, onboarding screens)
|
|
86
|
-
*/
|
|
87
|
-
scrollContentCentered: {
|
|
88
|
-
flexGrow: 1,
|
|
89
|
-
padding: tokens.spacing.lg,
|
|
90
|
-
justifyContent: 'center' as const,
|
|
91
|
-
} as ViewStyle,
|
|
92
|
-
|
|
93
|
-
// ========================================================================
|
|
94
|
-
// LAYOUT UTILITIES
|
|
95
|
-
// ========================================================================
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Centered container - both horizontal and vertical
|
|
99
|
-
* Perfect for empty states, splash screens
|
|
100
|
-
*/
|
|
101
|
-
centerContainer: {
|
|
102
|
-
flex: 1,
|
|
103
|
-
justifyContent: 'center' as const,
|
|
104
|
-
alignItems: 'center' as const,
|
|
105
|
-
} as ViewStyle,
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Centered container with padding
|
|
109
|
-
*/
|
|
110
|
-
centerContainerPadded: {
|
|
111
|
-
flex: 1,
|
|
112
|
-
justifyContent: 'center' as const,
|
|
113
|
-
alignItems: 'center' as const,
|
|
114
|
-
paddingHorizontal: tokens.spacing.xl,
|
|
115
|
-
} as ViewStyle,
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Horizontal row layout
|
|
119
|
-
*/
|
|
120
|
-
row: {
|
|
121
|
-
flexDirection: 'row' as const,
|
|
122
|
-
alignItems: 'center' as const,
|
|
123
|
-
} as ViewStyle,
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Horizontal row with space between
|
|
127
|
-
*/
|
|
128
|
-
rowBetween: {
|
|
129
|
-
flexDirection: 'row' as const,
|
|
130
|
-
alignItems: 'center' as const,
|
|
131
|
-
justifyContent: 'space-between' as const,
|
|
132
|
-
} as ViewStyle,
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Horizontal row centered
|
|
136
|
-
*/
|
|
137
|
-
rowCenter: {
|
|
138
|
-
flexDirection: 'row' as const,
|
|
139
|
-
alignItems: 'center' as const,
|
|
140
|
-
justifyContent: 'center' as const,
|
|
141
|
-
} as ViewStyle,
|
|
142
|
-
|
|
143
|
-
// ========================================================================
|
|
144
|
-
// PADDING UTILITIES
|
|
145
|
-
// ========================================================================
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Standard horizontal padding
|
|
149
|
-
*/
|
|
150
|
-
paddedHorizontal: {
|
|
151
|
-
paddingHorizontal: tokens.spacing.lg,
|
|
152
|
-
} as ViewStyle,
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Standard vertical padding
|
|
156
|
-
*/
|
|
157
|
-
paddedVertical: {
|
|
158
|
-
paddingVertical: tokens.spacing.lg,
|
|
159
|
-
} as ViewStyle,
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Standard padding all sides
|
|
163
|
-
*/
|
|
164
|
-
padded: {
|
|
165
|
-
padding: tokens.spacing.lg,
|
|
166
|
-
} as ViewStyle,
|
|
167
|
-
|
|
168
|
-
// ========================================================================
|
|
169
|
-
// SECTION STYLES
|
|
170
|
-
// ========================================================================
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Standard section container
|
|
174
|
-
*/
|
|
175
|
-
section: {
|
|
176
|
-
marginBottom: tokens.spacing.xl,
|
|
177
|
-
} as ViewStyle,
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Section with padding
|
|
181
|
-
*/
|
|
182
|
-
sectionPadded: {
|
|
183
|
-
marginBottom: tokens.spacing.xl,
|
|
184
|
-
paddingHorizontal: tokens.spacing.lg,
|
|
185
|
-
} as ViewStyle,
|
|
186
|
-
|
|
187
|
-
// ========================================================================
|
|
188
|
-
// TEXT STYLES
|
|
189
|
-
// ========================================================================
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Screen title - primary heading
|
|
193
|
-
*/
|
|
194
|
-
screenTitle: {
|
|
195
|
-
...tokens.typography.headingLarge,
|
|
196
|
-
color: tokens.colors.textPrimary,
|
|
197
|
-
marginBottom: tokens.spacing.sm,
|
|
198
|
-
} as TextStyle,
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* Section title
|
|
202
|
-
*/
|
|
203
|
-
sectionTitle: {
|
|
204
|
-
...tokens.typography.headingMedium,
|
|
205
|
-
color: tokens.colors.textPrimary,
|
|
206
|
-
marginBottom: tokens.spacing.md,
|
|
207
|
-
} as TextStyle,
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Subtitle/description text
|
|
211
|
-
*/
|
|
212
|
-
subtitle: {
|
|
213
|
-
...tokens.typography.bodyMedium,
|
|
214
|
-
color: tokens.colors.textSecondary,
|
|
215
|
-
textAlign: 'center' as const,
|
|
216
|
-
} as TextStyle,
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Body text
|
|
220
|
-
*/
|
|
221
|
-
bodyText: {
|
|
222
|
-
...tokens.typography.bodyMedium,
|
|
223
|
-
color: tokens.colors.textPrimary,
|
|
224
|
-
} as TextStyle,
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* Secondary text (muted)
|
|
228
|
-
*/
|
|
229
|
-
secondaryText: {
|
|
230
|
-
...tokens.typography.bodySmall,
|
|
231
|
-
color: tokens.colors.textSecondary,
|
|
232
|
-
} as TextStyle,
|
|
233
|
-
|
|
234
|
-
// ========================================================================
|
|
235
|
-
// FORM STYLES
|
|
236
|
-
// ========================================================================
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* Form container
|
|
240
|
-
*/
|
|
241
|
-
form: {
|
|
242
|
-
width: '100%',
|
|
243
|
-
} as ViewStyle,
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* Form header section
|
|
247
|
-
*/
|
|
248
|
-
formHeader: {
|
|
249
|
-
alignItems: 'center' as const,
|
|
250
|
-
marginBottom: tokens.spacing.xl,
|
|
251
|
-
} as ViewStyle,
|
|
252
|
-
};
|
|
253
|
-
};
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Platform-Specific Constants
|
|
3
|
-
*
|
|
4
|
-
* Design system constants that ensure compliance with platform guidelines.
|
|
5
|
-
* These values are based on official Human Interface Guidelines (HIG) from Apple and Material Design from Google.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* iOS Human Interface Guidelines (HIG) Constants
|
|
10
|
-
*
|
|
11
|
-
* @see https://developer.apple.com/design/human-interface-guidelines/layout
|
|
12
|
-
*/
|
|
13
|
-
export const IOS_HIG = {
|
|
14
|
-
/**
|
|
15
|
-
* Minimum Touch Target Size
|
|
16
|
-
*
|
|
17
|
-
* Apple requires a minimum tappable area of 44pt x 44pt for ALL interactive controls.
|
|
18
|
-
* This is enforced during App Store review.
|
|
19
|
-
*
|
|
20
|
-
* @critical Violating this can result in App Store rejection
|
|
21
|
-
*/
|
|
22
|
-
MIN_TOUCH_TARGET: 44,
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Recommended Minimum Touch Target Size
|
|
26
|
-
*
|
|
27
|
-
* For better accessibility and usability, Apple recommends 48pt x 48pt.
|
|
28
|
-
*/
|
|
29
|
-
RECOMMENDED_TOUCH_TARGET: 48,
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Minimum Text Size
|
|
33
|
-
*
|
|
34
|
-
* Minimum font size for body text to ensure readability.
|
|
35
|
-
*/
|
|
36
|
-
MIN_TEXT_SIZE: 17,
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Minimum Contrast Ratio
|
|
40
|
-
*
|
|
41
|
-
* WCAG AA compliance requires 4.5:1 for normal text.
|
|
42
|
-
*/
|
|
43
|
-
MIN_CONTRAST_RATIO: 4.5,
|
|
44
|
-
} as const;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Android Material Design Guidelines Constants
|
|
48
|
-
*
|
|
49
|
-
* @see https://m3.material.io/foundations/layout/applying-layout/window-size-classes
|
|
50
|
-
*/
|
|
51
|
-
export const ANDROID_MATERIAL = {
|
|
52
|
-
/**
|
|
53
|
-
* Minimum Touch Target Size
|
|
54
|
-
*
|
|
55
|
-
* Material Design 3 recommends a minimum of 48dp x 48dp.
|
|
56
|
-
*/
|
|
57
|
-
MIN_TOUCH_TARGET: 48,
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Minimum Text Size
|
|
61
|
-
*
|
|
62
|
-
* Minimum font size for body text.
|
|
63
|
-
*/
|
|
64
|
-
MIN_TEXT_SIZE: 14,
|
|
65
|
-
} as const;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Universal Platform Constants
|
|
69
|
-
*
|
|
70
|
-
* These values work across both iOS and Android, taking the more restrictive requirement.
|
|
71
|
-
*/
|
|
72
|
-
export const PLATFORM_CONSTANTS = {
|
|
73
|
-
/**
|
|
74
|
-
* Minimum Touch Target Size
|
|
75
|
-
*
|
|
76
|
-
* Uses iOS requirement (44pt) as it's more restrictive than Android (48dp).
|
|
77
|
-
* This ensures compliance on both platforms.
|
|
78
|
-
*/
|
|
79
|
-
MIN_TOUCH_TARGET: Math.max(IOS_HIG.MIN_TOUCH_TARGET, ANDROID_MATERIAL.MIN_TOUCH_TARGET),
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Recommended Touch Target Size
|
|
83
|
-
*
|
|
84
|
-
* Uses the higher value between iOS and Android recommendations.
|
|
85
|
-
*/
|
|
86
|
-
RECOMMENDED_TOUCH_TARGET: 48,
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Minimum Text Size
|
|
90
|
-
*
|
|
91
|
-
* Uses iOS requirement as it's larger.
|
|
92
|
-
*/
|
|
93
|
-
MIN_TEXT_SIZE: Math.max(IOS_HIG.MIN_TEXT_SIZE, ANDROID_MATERIAL.MIN_TEXT_SIZE),
|
|
94
|
-
} as const;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Helper function to validate touch target size
|
|
98
|
-
*
|
|
99
|
-
* @param size - The size to validate (in pt/dp)
|
|
100
|
-
* @returns true if size meets platform requirements
|
|
101
|
-
*/
|
|
102
|
-
export const isValidTouchTarget = (size: number): boolean => {
|
|
103
|
-
return size >= IOS_HIG.MIN_TOUCH_TARGET;
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Helper function to get minimum touch target for component
|
|
108
|
-
*
|
|
109
|
-
* @param componentType - The type of component ('button' | 'input' | 'icon' | 'generic')
|
|
110
|
-
* @returns The minimum touch target size for that component type
|
|
111
|
-
*/
|
|
112
|
-
export const getMinTouchTarget = (componentType: 'button' | 'input' | 'icon' | 'generic' = 'generic'): number => {
|
|
113
|
-
switch (componentType) {
|
|
114
|
-
case 'button':
|
|
115
|
-
return PLATFORM_CONSTANTS.RECOMMENDED_TOUCH_TARGET; // 48pt recommended for buttons
|
|
116
|
-
case 'input':
|
|
117
|
-
return PLATFORM_CONSTANTS.RECOMMENDED_TOUCH_TARGET; // 48pt recommended for inputs
|
|
118
|
-
case 'icon':
|
|
119
|
-
return IOS_HIG.MIN_TOUCH_TARGET; // 44pt minimum for icon buttons
|
|
120
|
-
case 'generic':
|
|
121
|
-
default:
|
|
122
|
-
return IOS_HIG.MIN_TOUCH_TARGET; // 44pt minimum for all other interactive elements
|
|
123
|
-
}
|
|
124
|
-
};
|