@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,452 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Responsive Design Utilities
|
|
3
|
-
*
|
|
4
|
-
* Centralized responsive sizing and spacing utilities to prevent
|
|
5
|
-
* Apple App Store rejection due to layout issues on different devices.
|
|
6
|
-
*
|
|
7
|
-
* Supports:
|
|
8
|
-
* - iPhone 13 mini (5.4" - smallest)
|
|
9
|
-
* - iPhone 13/14/15 (6.1" - standard)
|
|
10
|
-
* - iPhone 14 Pro Max (6.7" - largest phone)
|
|
11
|
-
* - iPad Air (10.9" - tablet)
|
|
12
|
-
*/
|
|
13
|
-
import { Dimensions } from 'react-native';
|
|
14
|
-
// Device breakpoints
|
|
15
|
-
const BREAKPOINTS = {
|
|
16
|
-
SMALL_PHONE: 375, // iPhone 13 mini and smaller
|
|
17
|
-
MEDIUM_PHONE: 414, // iPhone 13/14/15
|
|
18
|
-
LARGE_PHONE: 428, // iPhone 14 Pro Max
|
|
19
|
-
SMALL_TABLET: 768, // iPad mini
|
|
20
|
-
TABLET: 1024, // iPad Air
|
|
21
|
-
};
|
|
22
|
-
// Safe minimum sizes (Apple HIG recommendations)
|
|
23
|
-
const MIN_TOUCH_TARGET = 44;
|
|
24
|
-
const MIN_TEXT_SIZE = 11;
|
|
25
|
-
const MIN_ICON_SIZE = 22;
|
|
26
|
-
// Spacing scale (matches design token scales)
|
|
27
|
-
// Used for centralized responsive calculations - components should NEVER calculate spacing
|
|
28
|
-
const SPACING_SCALE = {
|
|
29
|
-
xs: 4,
|
|
30
|
-
sm: 8,
|
|
31
|
-
md: 16,
|
|
32
|
-
lg: 24,
|
|
33
|
-
xl: 32,
|
|
34
|
-
xxl: 40,
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Get current screen dimensions
|
|
38
|
-
*/
|
|
39
|
-
export const getScreenDimensions = () => {
|
|
40
|
-
const { width, height } = Dimensions.get('window');
|
|
41
|
-
return { width, height };
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Check if current device is a small phone (iPhone 13 mini, SE)
|
|
45
|
-
*/
|
|
46
|
-
export const isSmallPhone = () => {
|
|
47
|
-
const { width } = getScreenDimensions();
|
|
48
|
-
return width <= BREAKPOINTS.SMALL_PHONE;
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Check if current device is a tablet (iPad)
|
|
52
|
-
*/
|
|
53
|
-
export const isTablet = () => {
|
|
54
|
-
const { width } = getScreenDimensions();
|
|
55
|
-
return width >= BREAKPOINTS.SMALL_TABLET;
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Responsive logo/icon size
|
|
59
|
-
* Small devices: 100-120px
|
|
60
|
-
* Medium devices: 120-160px
|
|
61
|
-
* Tablets: 160-200px
|
|
62
|
-
*/
|
|
63
|
-
export const getResponsiveLogoSize = (baseSize = 140) => {
|
|
64
|
-
const { width } = getScreenDimensions();
|
|
65
|
-
if (width <= BREAKPOINTS.SMALL_PHONE) {
|
|
66
|
-
// iPhone 13 mini: 28% of width, max 120px
|
|
67
|
-
return Math.min(Math.max(width * 0.28, 100), 120);
|
|
68
|
-
}
|
|
69
|
-
else if (width >= BREAKPOINTS.TABLET) {
|
|
70
|
-
// iPad: 15% of width, max 200px
|
|
71
|
-
return Math.min(Math.max(width * 0.15, 140), 200);
|
|
72
|
-
}
|
|
73
|
-
// Standard phones: use base size
|
|
74
|
-
return baseSize;
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* Responsive multiline input height
|
|
78
|
-
* Prevents keyboard overlap on small devices
|
|
79
|
-
*
|
|
80
|
-
* Small devices: 100-120px
|
|
81
|
-
* Medium devices: 120-150px
|
|
82
|
-
* Tablets: 150-200px
|
|
83
|
-
*/
|
|
84
|
-
export const getResponsiveInputHeight = (baseHeight = 200) => {
|
|
85
|
-
const { height } = getScreenDimensions();
|
|
86
|
-
if (height <= 667) {
|
|
87
|
-
// iPhone SE, iPhone 8: 15% of height, max 120px
|
|
88
|
-
return Math.min(height * 0.15, 120);
|
|
89
|
-
}
|
|
90
|
-
else if (height <= 844) {
|
|
91
|
-
// iPhone 13 mini, iPhone 13: 18% of height, max 150px
|
|
92
|
-
return Math.min(height * 0.18, 150);
|
|
93
|
-
}
|
|
94
|
-
// Larger devices: use base height capped at 200px
|
|
95
|
-
return Math.min(baseHeight, 200);
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* Responsive horizontal padding
|
|
99
|
-
* Accounts for safe area on notched devices and iPad
|
|
100
|
-
*/
|
|
101
|
-
export const getResponsiveHorizontalPadding = (basePadding = 16, insets = { left: 0, right: 0 }) => {
|
|
102
|
-
const { width } = getScreenDimensions();
|
|
103
|
-
// iPad: larger padding
|
|
104
|
-
if (width >= BREAKPOINTS.TABLET) {
|
|
105
|
-
return Math.max(basePadding * 1.5, insets.left + 16, insets.right + 16);
|
|
106
|
-
}
|
|
107
|
-
// Phones: account for safe area
|
|
108
|
-
return Math.max(basePadding, insets.left + 8, insets.right + 8);
|
|
109
|
-
};
|
|
110
|
-
/**
|
|
111
|
-
* Responsive bottom positioning
|
|
112
|
-
* Accounts for home indicator and safe area
|
|
113
|
-
*/
|
|
114
|
-
export const getResponsiveBottomPosition = (basePosition = 32, insets = { bottom: 0 }) => {
|
|
115
|
-
return Math.max(basePosition, insets.bottom + 16);
|
|
116
|
-
};
|
|
117
|
-
/**
|
|
118
|
-
* Responsive FAB (Floating Action Button) position
|
|
119
|
-
* CRITICAL: Ensures FAB appears above tab bar (70-90px tall) and safe areas
|
|
120
|
-
*
|
|
121
|
-
* Tab bar heights:
|
|
122
|
-
* - iOS: ~80-90px (including safe area)
|
|
123
|
-
* - Android: ~70px
|
|
124
|
-
*
|
|
125
|
-
* FAB positioning:
|
|
126
|
-
* - Tablets: 100px from bottom (generous spacing)
|
|
127
|
-
* - Phones: 90px from bottom (above tab bar)
|
|
128
|
-
* - Safe area aware (home indicator clearance)
|
|
129
|
-
*/
|
|
130
|
-
export const getResponsiveFABPosition = (insets = { bottom: 0, right: 0 }) => {
|
|
131
|
-
const { width } = getScreenDimensions();
|
|
132
|
-
// Tab bar offset: FAB must be above tab bar
|
|
133
|
-
const TAB_BAR_OFFSET = 90; // Tab bar height + spacing
|
|
134
|
-
// iPad: larger margins, higher position
|
|
135
|
-
if (width >= BREAKPOINTS.TABLET) {
|
|
136
|
-
return {
|
|
137
|
-
bottom: Math.max(100, insets.bottom + TAB_BAR_OFFSET),
|
|
138
|
-
right: Math.max(24, insets.right + 16),
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
// Phones: standard position above tab bar, respect safe area
|
|
142
|
-
return {
|
|
143
|
-
bottom: Math.max(TAB_BAR_OFFSET, insets.bottom + TAB_BAR_OFFSET),
|
|
144
|
-
right: Math.max(20, insets.right + 8),
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
/**
|
|
148
|
-
* Responsive modal max height
|
|
149
|
-
* Prevents modals from taking too much space on tablets
|
|
150
|
-
* or too little on small devices
|
|
151
|
-
*/
|
|
152
|
-
export const getResponsiveModalMaxHeight = () => {
|
|
153
|
-
const { height } = getScreenDimensions();
|
|
154
|
-
if (height <= 667) {
|
|
155
|
-
// Small devices: 75% of height
|
|
156
|
-
return '75%';
|
|
157
|
-
}
|
|
158
|
-
else if (height >= 1024) {
|
|
159
|
-
// Tablets: 60% of height
|
|
160
|
-
return '60%';
|
|
161
|
-
}
|
|
162
|
-
// Standard: 70%
|
|
163
|
-
return '70%';
|
|
164
|
-
};
|
|
165
|
-
/**
|
|
166
|
-
* Responsive modal min height
|
|
167
|
-
* Ensures modals are always usable and not too small
|
|
168
|
-
* Complements getResponsiveModalMaxHeight for complete modal sizing
|
|
169
|
-
*/
|
|
170
|
-
export const getResponsiveMinModalHeight = () => {
|
|
171
|
-
const { height } = getScreenDimensions();
|
|
172
|
-
if (height <= 667) {
|
|
173
|
-
// iPhone SE, 8: 40% of height, min 250px
|
|
174
|
-
return Math.max(height * 0.4, 250);
|
|
175
|
-
}
|
|
176
|
-
else if (height >= 1024) {
|
|
177
|
-
// iPad: 35% of height, min 350px, max 500px (capped for usability)
|
|
178
|
-
return Math.min(Math.max(height * 0.35, 350), 500);
|
|
179
|
-
}
|
|
180
|
-
// Standard: 45% of height, min 300px
|
|
181
|
-
return Math.max(height * 0.45, 300);
|
|
182
|
-
};
|
|
183
|
-
/**
|
|
184
|
-
* Responsive icon container size
|
|
185
|
-
* Used in onboarding, cards, etc.
|
|
186
|
-
*/
|
|
187
|
-
export const getResponsiveIconContainerSize = (baseSize = 140) => {
|
|
188
|
-
const { width } = getScreenDimensions();
|
|
189
|
-
if (width <= BREAKPOINTS.SMALL_PHONE) {
|
|
190
|
-
// Small phones: 30% of width, capped at 120px
|
|
191
|
-
return Math.min(width * 0.30, 120);
|
|
192
|
-
}
|
|
193
|
-
else if (width >= BREAKPOINTS.TABLET) {
|
|
194
|
-
// Tablets: 20% of width, capped at 180px
|
|
195
|
-
return Math.min(width * 0.20, 180);
|
|
196
|
-
}
|
|
197
|
-
return baseSize;
|
|
198
|
-
};
|
|
199
|
-
/**
|
|
200
|
-
* Responsive grid columns
|
|
201
|
-
* Returns number of columns for grid layouts
|
|
202
|
-
*/
|
|
203
|
-
export const getResponsiveGridColumns = (mobileColumns = 2, tabletColumns = 4) => {
|
|
204
|
-
const { width } = getScreenDimensions();
|
|
205
|
-
return width >= BREAKPOINTS.TABLET ? tabletColumns : mobileColumns;
|
|
206
|
-
};
|
|
207
|
-
/**
|
|
208
|
-
* Responsive max width for content
|
|
209
|
-
* Prevents text from stretching too wide on tablets
|
|
210
|
-
*/
|
|
211
|
-
export const getResponsiveMaxWidth = (baseWidth = 400) => {
|
|
212
|
-
const { width } = getScreenDimensions();
|
|
213
|
-
if (width <= BREAKPOINTS.SMALL_PHONE) {
|
|
214
|
-
// Small phones: 90% of width
|
|
215
|
-
return width * 0.9;
|
|
216
|
-
}
|
|
217
|
-
else if (width >= BREAKPOINTS.TABLET) {
|
|
218
|
-
// Tablets: 60% of width, max 600px
|
|
219
|
-
return Math.min(width * 0.6, 600);
|
|
220
|
-
}
|
|
221
|
-
// Standard phones: use base width
|
|
222
|
-
return Math.min(width * 0.85, baseWidth);
|
|
223
|
-
};
|
|
224
|
-
/**
|
|
225
|
-
* Responsive font size
|
|
226
|
-
* Scales text for different devices while respecting minimum sizes
|
|
227
|
-
*/
|
|
228
|
-
export const getResponsiveFontSize = (baseFontSize) => {
|
|
229
|
-
const { width } = getScreenDimensions();
|
|
230
|
-
if (width <= BREAKPOINTS.SMALL_PHONE) {
|
|
231
|
-
// Small phones: slightly smaller text
|
|
232
|
-
return Math.max(baseFontSize * 0.9, MIN_TEXT_SIZE);
|
|
233
|
-
}
|
|
234
|
-
else if (width >= BREAKPOINTS.TABLET) {
|
|
235
|
-
// Tablets: slightly larger text
|
|
236
|
-
return baseFontSize * 1.1;
|
|
237
|
-
}
|
|
238
|
-
return baseFontSize;
|
|
239
|
-
};
|
|
240
|
-
/**
|
|
241
|
-
* Check if device is in landscape mode
|
|
242
|
-
*/
|
|
243
|
-
export const isLandscape = () => {
|
|
244
|
-
const { width, height } = getScreenDimensions();
|
|
245
|
-
return width > height;
|
|
246
|
-
};
|
|
247
|
-
/**
|
|
248
|
-
* Get universal keyboard behavior
|
|
249
|
-
* Returns 'padding' which works across all platforms (iOS, Android, Web)
|
|
250
|
-
*/
|
|
251
|
-
export const getKeyboardBehavior = () => {
|
|
252
|
-
return 'padding';
|
|
253
|
-
};
|
|
254
|
-
/**
|
|
255
|
-
* Device type enum for conditional rendering
|
|
256
|
-
*/
|
|
257
|
-
export var DeviceType;
|
|
258
|
-
(function (DeviceType) {
|
|
259
|
-
DeviceType["SMALL_PHONE"] = "SMALL_PHONE";
|
|
260
|
-
DeviceType["MEDIUM_PHONE"] = "MEDIUM_PHONE";
|
|
261
|
-
DeviceType["LARGE_PHONE"] = "LARGE_PHONE";
|
|
262
|
-
DeviceType["TABLET"] = "TABLET";
|
|
263
|
-
})(DeviceType || (DeviceType = {}));
|
|
264
|
-
/**
|
|
265
|
-
* Get current device type
|
|
266
|
-
*/
|
|
267
|
-
export const getDeviceType = () => {
|
|
268
|
-
const { width } = getScreenDimensions();
|
|
269
|
-
if (width <= BREAKPOINTS.SMALL_PHONE) {
|
|
270
|
-
return DeviceType.SMALL_PHONE;
|
|
271
|
-
}
|
|
272
|
-
else if (width <= BREAKPOINTS.MEDIUM_PHONE) {
|
|
273
|
-
return DeviceType.MEDIUM_PHONE;
|
|
274
|
-
}
|
|
275
|
-
else if (width <= BREAKPOINTS.LARGE_PHONE) {
|
|
276
|
-
return DeviceType.LARGE_PHONE;
|
|
277
|
-
}
|
|
278
|
-
return DeviceType.TABLET;
|
|
279
|
-
};
|
|
280
|
-
/**
|
|
281
|
-
* Apple HIG compliant touch target size
|
|
282
|
-
*/
|
|
283
|
-
export const getMinTouchTargetSize = () => MIN_TOUCH_TARGET;
|
|
284
|
-
/**
|
|
285
|
-
* Responsive spacing multiplier
|
|
286
|
-
* Returns a multiplier for spacing based on device size
|
|
287
|
-
*/
|
|
288
|
-
export const getSpacingMultiplier = () => {
|
|
289
|
-
const { width } = getScreenDimensions();
|
|
290
|
-
if (width <= BREAKPOINTS.SMALL_PHONE) {
|
|
291
|
-
return 0.9; // Slightly tighter spacing on small devices
|
|
292
|
-
}
|
|
293
|
-
else if (width >= BREAKPOINTS.TABLET) {
|
|
294
|
-
return 1.2; // More generous spacing on tablets
|
|
295
|
-
}
|
|
296
|
-
return 1.0; // Standard spacing
|
|
297
|
-
};
|
|
298
|
-
// =============================================================================
|
|
299
|
-
// ONBOARDING SPACING - CENTRALIZED CALCULATIONS
|
|
300
|
-
// =============================================================================
|
|
301
|
-
// ⚠️ CRITICAL: ALL onboarding spacing calculations MUST be here.
|
|
302
|
-
// Components should NEVER calculate spacing - they consume pre-calculated values
|
|
303
|
-
// from useResponsive() hook.
|
|
304
|
-
//
|
|
305
|
-
// This prevents Apple rejection due to layout issues on different devices.
|
|
306
|
-
// Pattern: Small phones get tighter spacing, tablets get generous spacing.
|
|
307
|
-
// =============================================================================
|
|
308
|
-
/**
|
|
309
|
-
* Onboarding icon container top margin
|
|
310
|
-
* Small phones: 24px (lg), Others: 40px (xxl)
|
|
311
|
-
*/
|
|
312
|
-
export const getOnboardingIconMarginTop = () => {
|
|
313
|
-
return isSmallPhone() ? SPACING_SCALE.lg : SPACING_SCALE.xxl;
|
|
314
|
-
};
|
|
315
|
-
/**
|
|
316
|
-
* Onboarding icon container bottom margin
|
|
317
|
-
* Tablets: 60px (xxl * 1.5 for extra breathing room), Others: 40px (xxl)
|
|
318
|
-
*/
|
|
319
|
-
export const getOnboardingIconMarginBottom = () => {
|
|
320
|
-
return isTablet() ? SPACING_SCALE.xxl * 1.5 : SPACING_SCALE.xxl;
|
|
321
|
-
};
|
|
322
|
-
/**
|
|
323
|
-
* Onboarding title bottom margin
|
|
324
|
-
* Tablets: 24px (lg), Others: 16px (md)
|
|
325
|
-
*/
|
|
326
|
-
export const getOnboardingTitleMarginBottom = () => {
|
|
327
|
-
return isTablet() ? SPACING_SCALE.lg : SPACING_SCALE.md;
|
|
328
|
-
};
|
|
329
|
-
/**
|
|
330
|
-
* Onboarding text horizontal padding (title and description)
|
|
331
|
-
* Small phones: 8px (sm for tighter fit), Others: 16px (md)
|
|
332
|
-
*/
|
|
333
|
-
export const getOnboardingTextPadding = () => {
|
|
334
|
-
return isSmallPhone() ? SPACING_SCALE.sm : SPACING_SCALE.md;
|
|
335
|
-
};
|
|
336
|
-
/**
|
|
337
|
-
* Onboarding description top margin
|
|
338
|
-
* Small phones: 4px (xs), Others: 8px (sm)
|
|
339
|
-
*/
|
|
340
|
-
export const getOnboardingDescriptionMarginTop = () => {
|
|
341
|
-
return isSmallPhone() ? SPACING_SCALE.xs : SPACING_SCALE.sm;
|
|
342
|
-
};
|
|
343
|
-
/**
|
|
344
|
-
* Onboarding icon size (for icon inside container)
|
|
345
|
-
* Calculated as ~55% of icon container size for proper visual balance
|
|
346
|
-
* Small phones: ~66px (55% of 120px), Standard: ~77px (55% of 140px), Tablets: ~99px (55% of 180px)
|
|
347
|
-
*/
|
|
348
|
-
export const getOnboardingIconSize = () => {
|
|
349
|
-
const containerSize = getResponsiveIconContainerSize();
|
|
350
|
-
// Icon should be 55% of container for optimal visual balance
|
|
351
|
-
return Math.round(containerSize * 0.55);
|
|
352
|
-
};
|
|
353
|
-
// =============================================================================
|
|
354
|
-
// FORM COMPONENT SPACING - CENTRALIZED CALCULATIONS
|
|
355
|
-
// =============================================================================
|
|
356
|
-
// ⚠️ CRITICAL: ALL form-related spacing/sizing calculations MUST be here.
|
|
357
|
-
// Components (FormContainer, AtomicInput, AtomicTextArea) should NEVER
|
|
358
|
-
// calculate dimensions - they consume pre-calculated values from useResponsive().
|
|
359
|
-
//
|
|
360
|
-
// Pattern: Universal values that work across iOS, Android, Web.
|
|
361
|
-
// No platform-specific code - write universal patterns only.
|
|
362
|
-
// =============================================================================
|
|
363
|
-
/**
|
|
364
|
-
* Keyboard vertical offset for KeyboardAvoidingView
|
|
365
|
-
* Accounts for header/navigation bar height
|
|
366
|
-
* Universal value that works across all platforms
|
|
367
|
-
*/
|
|
368
|
-
export const getKeyboardVerticalOffset = () => {
|
|
369
|
-
// 90px accounts for:
|
|
370
|
-
// - Navigation header: ~56-60px (standard across platforms)
|
|
371
|
-
// - Safe area top: ~30-44px (notch on iPhone)
|
|
372
|
-
// Total: ~90px ensures keyboard doesn't cover inputs
|
|
373
|
-
return 90;
|
|
374
|
-
};
|
|
375
|
-
/**
|
|
376
|
-
* Form container bottom padding
|
|
377
|
-
* Prevents overlap with bottom tab navigation and ensures submit buttons are accessible
|
|
378
|
-
*
|
|
379
|
-
* Formula: safeAreaBottom + tabBarHeight + extraSpace
|
|
380
|
-
* - Tab bar height: ~56px (iOS/Android standard)
|
|
381
|
-
* - Extra space: ~24px (breathing room for submit button)
|
|
382
|
-
* - Safe area: Variable (home indicator on iPhone)
|
|
383
|
-
* - Minimum: 100px (ensures buttons always accessible)
|
|
384
|
-
*/
|
|
385
|
-
export const getFormBottomPadding = (safeAreaBottom) => {
|
|
386
|
-
const TAB_BAR_HEIGHT = 56;
|
|
387
|
-
const EXTRA_SPACE = 24;
|
|
388
|
-
const calculatedPadding = safeAreaBottom + TAB_BAR_HEIGHT + EXTRA_SPACE;
|
|
389
|
-
// Ensure minimum 100px for accessibility
|
|
390
|
-
return Math.max(calculatedPadding, 100);
|
|
391
|
-
};
|
|
392
|
-
/**
|
|
393
|
-
* Input field icon size
|
|
394
|
-
* Used for leading/trailing icons and password toggle
|
|
395
|
-
* Apple HIG: Minimum 22px for touch targets
|
|
396
|
-
*/
|
|
397
|
-
export const getInputIconSize = () => {
|
|
398
|
-
const { width } = getScreenDimensions();
|
|
399
|
-
if (width <= BREAKPOINTS.SMALL_PHONE) {
|
|
400
|
-
// Small phones: 18px (slightly smaller for space)
|
|
401
|
-
return 18;
|
|
402
|
-
}
|
|
403
|
-
else if (width >= BREAKPOINTS.TABLET) {
|
|
404
|
-
// Tablets: 24px (larger for readability)
|
|
405
|
-
return 24;
|
|
406
|
-
}
|
|
407
|
-
// Standard: 20px (matches Material Design)
|
|
408
|
-
return 20;
|
|
409
|
-
};
|
|
410
|
-
/**
|
|
411
|
-
* Form content container width
|
|
412
|
-
* Forms need more generous width than regular content to prevent cramped layouts
|
|
413
|
-
*
|
|
414
|
-
* Strategy:
|
|
415
|
-
* - Phones: undefined (no max width restriction, fills available space)
|
|
416
|
-
* - Tablets: Max 700px (readable but not restrictive)
|
|
417
|
-
*
|
|
418
|
-
* Different from getResponsiveMaxWidth which is for text content (max 400px)
|
|
419
|
-
*
|
|
420
|
-
* @returns number for tablets (700px max), undefined for phones (no restriction)
|
|
421
|
-
*/
|
|
422
|
-
export const getFormContentWidth = () => {
|
|
423
|
-
const { width } = getScreenDimensions();
|
|
424
|
-
if (width >= BREAKPOINTS.TABLET) {
|
|
425
|
-
// Tablets: 70% of width, max 700px (generous for forms)
|
|
426
|
-
return Math.min(width * 0.7, 700);
|
|
427
|
-
}
|
|
428
|
-
// Phones: No max width restriction (undefined allows full width)
|
|
429
|
-
return undefined;
|
|
430
|
-
};
|
|
431
|
-
/**
|
|
432
|
-
* Form element spacing (vertical)
|
|
433
|
-
* Vertical spacing between form elements (inputs, buttons, etc.)
|
|
434
|
-
* Used with Children.map() wrapper pattern for universal compatibility
|
|
435
|
-
* Replaces CSS gap property (old RN version compatibility)
|
|
436
|
-
*
|
|
437
|
-
* Universal pattern - works on iOS, Android, Web
|
|
438
|
-
*/
|
|
439
|
-
export const getFormElementSpacing = () => {
|
|
440
|
-
const { width } = getScreenDimensions();
|
|
441
|
-
if (width <= BREAKPOINTS.SMALL_PHONE) {
|
|
442
|
-
// Small phones: 16px (adequate for space efficiency)
|
|
443
|
-
return 16;
|
|
444
|
-
}
|
|
445
|
-
else if (width >= BREAKPOINTS.TABLET) {
|
|
446
|
-
// Tablets: 24px (generous spacing for larger screens)
|
|
447
|
-
return 24;
|
|
448
|
-
}
|
|
449
|
-
// Standard: 20px (comfortable vertical rhythm)
|
|
450
|
-
return 20;
|
|
451
|
-
};
|
|
452
|
-
//# sourceMappingURL=responsive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"responsive.js","sourceRoot":"","sources":["../../../src/presentation/utils/responsive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,qBAAqB;AACrB,MAAM,WAAW,GAAG;IAClB,WAAW,EAAE,GAAG,EAAK,6BAA6B;IAClD,YAAY,EAAE,GAAG,EAAI,kBAAkB;IACvC,WAAW,EAAE,GAAG,EAAK,oBAAoB;IACzC,YAAY,EAAE,GAAG,EAAI,YAAY;IACjC,MAAM,EAAE,IAAI,EAAS,WAAW;CACxB,CAAC;AAEX,iDAAiD;AACjD,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,aAAa,GAAG,EAAE,CAAC;AAEzB,8CAA8C;AAC9C,2FAA2F;AAC3F,MAAM,aAAa,GAAG;IACpB,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,GAAG,EAAE,EAAE;CACC,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,MAAM,EAAE,KAAK,EAAE,MAAM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AChC,wDAAwD;QACxD,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,EAAE,GAAG,CAAC,CAAC;IACpC,CAAC;IAED,iEAAiE;IACjE,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAW,EAAE;IAChD,MAAM,EAAE,KAAK,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAExC,IAAI,KAAK,IAAI,WAAW,CAAC,WAAW,EAAE,CAAC;QACrC,qDAAqD;QACrD,OAAO,EAAE,CAAC;IACZ,CAAC;SAAM,IAAI,KAAK,IAAI,WAAW,CAAC,MAAM,EAAE,CAAC;QACvC,sDAAsD;QACtD,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,+CAA+C;IAC/C,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Style, VariantConfig, VariantProps } from './core';
|
|
2
|
-
export type CompoundVariant<T extends Record<string, any>> = {
|
|
3
|
-
conditions: Partial<VariantProps<T>>;
|
|
4
|
-
style: Style;
|
|
5
|
-
};
|
|
6
|
-
export type AdvancedVariantConfig<T extends Record<string, any>> = VariantConfig<T> & {
|
|
7
|
-
compoundVariants?: CompoundVariant<T>[];
|
|
8
|
-
};
|
|
9
|
-
export declare function createAdvancedVariants<T extends Record<string, any>>(config: AdvancedVariantConfig<T>): (props?: VariantProps<T>) => Style;
|
|
10
|
-
//# sourceMappingURL=compound.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compound.d.ts","sourceRoot":"","sources":["../../../../src/presentation/utils/variants/compound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,YAAY,EAAkB,MAAM,QAAQ,CAAC;AAE5E,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI;IAC3D,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,GAAG;IACpF,gBAAgB,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;CACzC,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC,IAGnF,QAAO,YAAY,CAAC,CAAC,CAAM,KAAG,KAAK,CAcrD"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { createVariants } from './core';
|
|
2
|
-
export function createAdvancedVariants(config) {
|
|
3
|
-
const baseVariantFn = createVariants(config);
|
|
4
|
-
return function (props = {}) {
|
|
5
|
-
let result = baseVariantFn(props);
|
|
6
|
-
if (config.compoundVariants) {
|
|
7
|
-
for (const compound of config.compoundVariants) {
|
|
8
|
-
const conditionsMet = Object.entries(compound.conditions).every(([key, value]) => props[key] === value);
|
|
9
|
-
if (conditionsMet)
|
|
10
|
-
result = { ...result, ...compound.style };
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return result;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=compound.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compound.js","sourceRoot":"","sources":["../../../../src/presentation/utils/variants/compound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,cAAc,EAAE,MAAM,QAAQ,CAAC;AAW5E,MAAM,UAAU,sBAAsB,CAAgC,MAAgC;IACpG,MAAM,aAAa,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IAE7C,OAAO,UAAU,QAAyB,EAAE;QAC1C,IAAI,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;QAElC,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;YAC5B,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;gBAC/C,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,KAAK,CAC7D,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAc,CAAC,KAAK,KAAK,CAClD,CAAC;gBACF,IAAI,aAAa;oBAAE,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;YAC/D,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ViewStyle, TextStyle, ImageStyle } from 'react-native';
|
|
2
|
-
type Style = ViewStyle | TextStyle | ImageStyle;
|
|
3
|
-
export type VariantConfig<T extends Record<string, any>> = {
|
|
4
|
-
base?: Style;
|
|
5
|
-
variants?: T;
|
|
6
|
-
defaultVariants?: {
|
|
7
|
-
[K in keyof T]?: keyof T[K];
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export type VariantProps<T extends Record<string, any>> = {
|
|
11
|
-
[K in keyof T]?: keyof T[K];
|
|
12
|
-
};
|
|
13
|
-
export declare function createVariants<T extends Record<string, any>>(config: VariantConfig<T>): (props?: VariantProps<T>) => Style;
|
|
14
|
-
export type { Style };
|
|
15
|
-
//# sourceMappingURL=core.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../../src/presentation/utils/variants/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEhE,KAAK,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEhD,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI;IACzD,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,CAAC;IACb,eAAe,CAAC,EAAE;SAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;KAAE,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI;KACvD,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CAC5B,CAAC;AAEF,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,IACnE,QAAO,YAAY,CAAC,CAAC,CAAM,KAAG,KAAK,CAqBrD;AAED,YAAY,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export function createVariants(config) {
|
|
2
|
-
return function (props = {}) {
|
|
3
|
-
let result = { ...config.base };
|
|
4
|
-
if (config.defaultVariants) {
|
|
5
|
-
for (const [variantKey, defaultValue] of Object.entries(config.defaultVariants)) {
|
|
6
|
-
if (config.variants?.[variantKey] && defaultValue) {
|
|
7
|
-
const variantStyle = config.variants[variantKey][defaultValue];
|
|
8
|
-
if (variantStyle)
|
|
9
|
-
result = { ...result, ...variantStyle };
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
for (const [variantKey, variantValue] of Object.entries(props)) {
|
|
14
|
-
if (config.variants?.[variantKey] && variantValue) {
|
|
15
|
-
const variantStyle = config.variants[variantKey][variantValue];
|
|
16
|
-
if (variantStyle)
|
|
17
|
-
result = { ...result, ...variantStyle };
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return result;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=core.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../../../src/presentation/utils/variants/core.ts"],"names":[],"mappings":"AAcA,MAAM,UAAU,cAAc,CAAgC,MAAwB;IACpF,OAAO,UAAU,QAAyB,EAAE;QAC1C,IAAI,MAAM,GAAU,EAAE,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;QAEvC,IAAI,MAAM,CAAC,eAAe,EAAE,CAAC;YAC3B,KAAK,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC;gBAChF,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,IAAI,YAAY,EAAE,CAAC;oBAClD,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,YAAsB,CAAC,CAAC;oBACzE,IAAI,YAAY;wBAAE,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,GAAG,YAAY,EAAE,CAAC;gBAC5D,CAAC;YACH,CAAC;QACH,CAAC;QAED,KAAK,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC/D,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,IAAI,YAAY,EAAE,CAAC;gBAClD,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,YAAsB,CAAC,CAAC;gBACzE,IAAI,YAAY;oBAAE,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,GAAG,YAAY,EAAE,CAAC;YAC5D,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Style } from './core';
|
|
2
|
-
export declare function combineStyles<T extends Style>(...styles: (T | undefined | null | false)[]): T;
|
|
3
|
-
export declare function conditionalStyle<T extends Style>(condition: boolean, trueStyle: T, falseStyle?: T): T | undefined;
|
|
4
|
-
export declare function responsiveStyle<T extends Style>(small: T, medium?: T, large?: T): T;
|
|
5
|
-
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/presentation/utils/variants/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,GAAG,KAAK,CAAC,EAAE,GAAG,CAAC,CAE7F;AAED,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,UAAU,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS,CAEjH;AAED,wBAAgB,eAAe,CAAC,CAAC,SAAS,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAEnF"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export function combineStyles(...styles) {
|
|
2
|
-
return styles.reduce((acc, style) => (style ? { ...acc, ...style } : acc), {});
|
|
3
|
-
}
|
|
4
|
-
export function conditionalStyle(condition, trueStyle, falseStyle) {
|
|
5
|
-
return condition ? trueStyle : falseStyle;
|
|
6
|
-
}
|
|
7
|
-
export function responsiveStyle(small, medium, large) {
|
|
8
|
-
return small;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../src/presentation/utils/variants/helpers.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,aAAa,CAAkB,GAAG,MAAwC;IACxF,OAAO,MAAM,CAAC,MAAM,CAAI,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,GAAG,KAAK,EAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAO,CAAC,CAAC;AAC9F,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAkB,SAAkB,EAAE,SAAY,EAAE,UAAc;IAChG,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,eAAe,CAAkB,KAAQ,EAAE,MAAU,EAAE,KAAS;IAC9E,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../src/presentation/utils/variants.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"variants.js","sourceRoot":"","sources":["../../../src/presentation/utils/variants.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|