@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,209 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Pressable } from 'react-native';
|
|
3
|
-
import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
|
|
4
|
-
import { AtomicTouchableProps, TouchableFeedback, FeedbackStrength } from './touchable/types';
|
|
5
|
-
import {
|
|
6
|
-
getOpacityValue,
|
|
7
|
-
getTouchableContainerStyle,
|
|
8
|
-
getDisabledStyle,
|
|
9
|
-
normalizeHitSlop,
|
|
10
|
-
} from './touchable/styles/touchableStyles';
|
|
11
|
-
|
|
12
|
-
export type {
|
|
13
|
-
AtomicTouchableProps,
|
|
14
|
-
TouchableFeedback,
|
|
15
|
-
FeedbackStrength,
|
|
16
|
-
HitSlop,
|
|
17
|
-
} from './touchable/types';
|
|
18
|
-
|
|
19
|
-
export {
|
|
20
|
-
getOpacityValue,
|
|
21
|
-
getTouchableContainerStyle,
|
|
22
|
-
getDisabledStyle,
|
|
23
|
-
normalizeHitSlop,
|
|
24
|
-
} from './touchable/styles/touchableStyles';
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* AtomicTouchable - Unified Touchable Component
|
|
28
|
-
*
|
|
29
|
-
* A modern, accessible touchable wrapper using React Native's Pressable API.
|
|
30
|
-
* Provides consistent behavior across iOS, Android, and Web.
|
|
31
|
-
*
|
|
32
|
-
* Features:
|
|
33
|
-
* - Multiple feedback variants (opacity, highlight, ripple, none)
|
|
34
|
-
* - Configurable feedback strength (subtle, normal, strong)
|
|
35
|
-
* - Disabled state with visual feedback
|
|
36
|
-
* - Hit slop customization for small touch targets
|
|
37
|
-
* - Minimum 48x48 touch target (iOS HIG compliance)
|
|
38
|
-
* - Full accessibility support
|
|
39
|
-
* - Theme-aware ripple colors
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```tsx
|
|
43
|
-
* // Basic usage with opacity feedback
|
|
44
|
-
* <AtomicTouchable onPress={handlePress}>
|
|
45
|
-
* <AtomicText>Press Me</AtomicText>
|
|
46
|
-
* </AtomicTouchable>
|
|
47
|
-
*
|
|
48
|
-
* // With custom hit slop (extends touch area)
|
|
49
|
-
* <AtomicTouchable
|
|
50
|
-
* onPress={handlePress}
|
|
51
|
-
* hitSlop={8}
|
|
52
|
-
* feedback="ripple"
|
|
53
|
-
* >
|
|
54
|
-
* <AtomicIcon name="X" size="sm" />
|
|
55
|
-
* </AtomicTouchable>
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
export const AtomicTouchable: React.FC<AtomicTouchableProps> = ({
|
|
59
|
-
children,
|
|
60
|
-
onPress,
|
|
61
|
-
onPressIn,
|
|
62
|
-
onPressOut,
|
|
63
|
-
onLongPress,
|
|
64
|
-
feedback = 'opacity',
|
|
65
|
-
strength = 'normal',
|
|
66
|
-
disabled = false,
|
|
67
|
-
hitSlop,
|
|
68
|
-
style,
|
|
69
|
-
pressedStyle,
|
|
70
|
-
disabledStyle,
|
|
71
|
-
accessibilityLabel,
|
|
72
|
-
accessibilityHint,
|
|
73
|
-
accessibilityRole = 'button',
|
|
74
|
-
testID,
|
|
75
|
-
delayLongPress = 500,
|
|
76
|
-
rippleColor,
|
|
77
|
-
rippleRadius = 0,
|
|
78
|
-
}) => {
|
|
79
|
-
const tokens = useAppDesignTokens();
|
|
80
|
-
|
|
81
|
-
// Determine if touchable should be disabled
|
|
82
|
-
const isDisabled = disabled;
|
|
83
|
-
|
|
84
|
-
// Get opacity value based on strength
|
|
85
|
-
const opacityValue = getOpacityValue(strength as 'subtle' | 'normal' | 'strong');
|
|
86
|
-
|
|
87
|
-
// Normalize hit slop
|
|
88
|
-
const normalizedHitSlop = normalizeHitSlop(hitSlop);
|
|
89
|
-
|
|
90
|
-
// Default ripple color (theme primary with alpha)
|
|
91
|
-
const defaultRippleColor = tokens.colors.primary + '40'; // 40 = 25% opacity in hex
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Get style based on pressed state
|
|
95
|
-
*/
|
|
96
|
-
const getPressedStyle = ({ pressed }: { pressed: boolean }) => {
|
|
97
|
-
const baseStyle = [
|
|
98
|
-
getTouchableContainerStyle(),
|
|
99
|
-
style,
|
|
100
|
-
];
|
|
101
|
-
|
|
102
|
-
if (isDisabled) {
|
|
103
|
-
return [...baseStyle, getDisabledStyle(), disabledStyle];
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
if (pressed) {
|
|
107
|
-
// Apply feedback based on variant
|
|
108
|
-
switch (feedback) {
|
|
109
|
-
case 'opacity':
|
|
110
|
-
return [...baseStyle, { opacity: opacityValue }, pressedStyle];
|
|
111
|
-
case 'highlight':
|
|
112
|
-
return [
|
|
113
|
-
...baseStyle,
|
|
114
|
-
{ backgroundColor: tokens.colors.surfaceVariant },
|
|
115
|
-
pressedStyle,
|
|
116
|
-
];
|
|
117
|
-
case 'none':
|
|
118
|
-
return [...baseStyle, pressedStyle];
|
|
119
|
-
case 'ripple':
|
|
120
|
-
// Ripple is handled by android_ripple prop
|
|
121
|
-
return [...baseStyle, pressedStyle];
|
|
122
|
-
default:
|
|
123
|
-
return [...baseStyle, pressedStyle];
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
return baseStyle;
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Android ripple configuration
|
|
132
|
-
* Used when feedback='ripple'
|
|
133
|
-
* Pressable automatically ignores this prop on iOS/Web
|
|
134
|
-
*/
|
|
135
|
-
const androidRippleConfig = feedback === 'ripple'
|
|
136
|
-
? {
|
|
137
|
-
color: rippleColor || defaultRippleColor,
|
|
138
|
-
borderless: false,
|
|
139
|
-
radius: rippleRadius,
|
|
140
|
-
}
|
|
141
|
-
: undefined;
|
|
142
|
-
|
|
143
|
-
return (
|
|
144
|
-
<Pressable
|
|
145
|
-
onPress={isDisabled ? undefined : onPress}
|
|
146
|
-
onPressIn={isDisabled ? undefined : onPressIn}
|
|
147
|
-
onPressOut={isDisabled ? undefined : onPressOut}
|
|
148
|
-
onLongPress={isDisabled ? undefined : onLongPress}
|
|
149
|
-
delayLongPress={delayLongPress}
|
|
150
|
-
disabled={isDisabled}
|
|
151
|
-
hitSlop={normalizedHitSlop}
|
|
152
|
-
style={getPressedStyle}
|
|
153
|
-
android_ripple={androidRippleConfig}
|
|
154
|
-
accessibilityLabel={accessibilityLabel}
|
|
155
|
-
accessibilityHint={accessibilityHint}
|
|
156
|
-
accessibilityRole={accessibilityRole}
|
|
157
|
-
accessibilityState={{
|
|
158
|
-
disabled: isDisabled,
|
|
159
|
-
}}
|
|
160
|
-
testID={testID}
|
|
161
|
-
>
|
|
162
|
-
{children}
|
|
163
|
-
</Pressable>
|
|
164
|
-
);
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Preset touchable configurations for common use cases
|
|
169
|
-
*/
|
|
170
|
-
export const TouchablePresets = {
|
|
171
|
-
/**
|
|
172
|
-
* iOS-style opacity feedback (default)
|
|
173
|
-
*/
|
|
174
|
-
ios: {
|
|
175
|
-
feedback: 'opacity' as TouchableFeedback,
|
|
176
|
-
strength: 'normal' as FeedbackStrength,
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Android-style ripple feedback
|
|
181
|
-
*/
|
|
182
|
-
android: {
|
|
183
|
-
feedback: 'ripple' as TouchableFeedback,
|
|
184
|
-
strength: 'normal' as FeedbackStrength,
|
|
185
|
-
},
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Subtle feedback for secondary actions
|
|
189
|
-
*/
|
|
190
|
-
subtle: {
|
|
191
|
-
feedback: 'opacity' as TouchableFeedback,
|
|
192
|
-
strength: 'subtle' as FeedbackStrength,
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Strong feedback for primary actions
|
|
197
|
-
*/
|
|
198
|
-
strong: {
|
|
199
|
-
feedback: 'opacity' as TouchableFeedback,
|
|
200
|
-
strength: 'strong' as FeedbackStrength,
|
|
201
|
-
},
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* No visual feedback (use sparingly)
|
|
205
|
-
*/
|
|
206
|
-
none: {
|
|
207
|
-
feedback: 'none' as TouchableFeedback,
|
|
208
|
-
},
|
|
209
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { ViewStyle } from 'react-native';
|
|
2
|
-
import { FabVariant, FabSize, FabVariantConfig, FabSizeConfig } from '../types';
|
|
3
|
-
import type { DesignTokens } from '@umituz/react-native-theme';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Material Design 3 FAB size configurations
|
|
7
|
-
*/
|
|
8
|
-
export const FAB_SIZES: Record<FabSize, FabSizeConfig> = {
|
|
9
|
-
sm: {
|
|
10
|
-
width: 40,
|
|
11
|
-
height: 40,
|
|
12
|
-
borderRadius: 20, // Perfect circle
|
|
13
|
-
},
|
|
14
|
-
md: {
|
|
15
|
-
width: 56,
|
|
16
|
-
height: 56,
|
|
17
|
-
borderRadius: 28, // Perfect circle (Material Design 3 standard)
|
|
18
|
-
},
|
|
19
|
-
lg: {
|
|
20
|
-
width: 72,
|
|
21
|
-
height: 72,
|
|
22
|
-
borderRadius: 36, // Perfect circle
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Get FAB variant styles based on design tokens
|
|
28
|
-
* Note: Icon colors are handled via customColor in AtomicIcon
|
|
29
|
-
*/
|
|
30
|
-
export const getFabVariants = (tokens: DesignTokens): Record<FabVariant, FabVariantConfig> => ({
|
|
31
|
-
primary: {
|
|
32
|
-
backgroundColor: tokens.colors.primary,
|
|
33
|
-
iconColor: tokens.colors.onPrimary,
|
|
34
|
-
},
|
|
35
|
-
secondary: {
|
|
36
|
-
backgroundColor: tokens.colors.secondary,
|
|
37
|
-
iconColor: tokens.colors.onSecondary,
|
|
38
|
-
},
|
|
39
|
-
surface: {
|
|
40
|
-
backgroundColor: tokens.colors.surface,
|
|
41
|
-
iconColor: tokens.colors.onSurface,
|
|
42
|
-
},
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Get icon size based on FAB size
|
|
47
|
-
* Returns AtomicIconSize type ('sm', 'md', 'lg')
|
|
48
|
-
*/
|
|
49
|
-
export const getFabIconSize = (size: FabSize): 'sm' | 'md' | 'lg' => {
|
|
50
|
-
switch (size) {
|
|
51
|
-
case 'sm':
|
|
52
|
-
return 'sm';
|
|
53
|
-
case 'md':
|
|
54
|
-
return 'md';
|
|
55
|
-
case 'lg':
|
|
56
|
-
return 'lg';
|
|
57
|
-
default:
|
|
58
|
-
return 'md';
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Get FAB border for depth (shadows removed per CLAUDE.md)
|
|
64
|
-
* Subtle border provides visual elevation without shadow issues
|
|
65
|
-
*/
|
|
66
|
-
export const getFabBorder = (tokens: DesignTokens): ViewStyle => ({
|
|
67
|
-
borderWidth: 1,
|
|
68
|
-
borderColor: tokens.colors.outline,
|
|
69
|
-
});
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* FAB (Floating Action Button) size variants
|
|
5
|
-
* Based on Material Design 3 standards
|
|
6
|
-
*/
|
|
7
|
-
export type FabSize = 'sm' | 'md' | 'lg';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* FAB variant types
|
|
11
|
-
* - primary: Main action (uses primary color)
|
|
12
|
-
* - secondary: Secondary action (uses secondary color)
|
|
13
|
-
* - surface: Neutral action (uses surface color with border)
|
|
14
|
-
*/
|
|
15
|
-
export type FabVariant = 'primary' | 'secondary' | 'surface';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* FAB configuration for variant styling
|
|
19
|
-
*/
|
|
20
|
-
export interface FabVariantConfig {
|
|
21
|
-
backgroundColor: string;
|
|
22
|
-
iconColor: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* FAB configuration for size styling
|
|
27
|
-
*/
|
|
28
|
-
export interface FabSizeConfig {
|
|
29
|
-
width: number;
|
|
30
|
-
height: number;
|
|
31
|
-
borderRadius: number;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* AtomicFab component props
|
|
36
|
-
*/
|
|
37
|
-
export interface AtomicFabProps {
|
|
38
|
-
/**
|
|
39
|
-
* Icon name to display (required)
|
|
40
|
-
* Any MaterialIcons name (see https://fonts.google.com/icons)
|
|
41
|
-
* Examples: 'add', 'edit', 'camera', etc.
|
|
42
|
-
*/
|
|
43
|
-
icon: string;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Callback when FAB is pressed
|
|
47
|
-
*/
|
|
48
|
-
onPress: () => void;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Visual variant of the FAB
|
|
52
|
-
* @default 'primary'
|
|
53
|
-
*/
|
|
54
|
-
variant?: FabVariant;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Size of the FAB
|
|
58
|
-
* @default 'md'
|
|
59
|
-
*/
|
|
60
|
-
size?: FabSize;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Whether the FAB is disabled
|
|
64
|
-
* @default false
|
|
65
|
-
*/
|
|
66
|
-
disabled?: boolean;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Custom style for the FAB container
|
|
70
|
-
*/
|
|
71
|
-
style?: StyleProp<ViewStyle>;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Test ID for testing
|
|
75
|
-
*/
|
|
76
|
-
testID?: string;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Accessibility label
|
|
80
|
-
*/
|
|
81
|
-
accessibilityLabel?: string;
|
|
82
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ViewStyle } from 'react-native';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Filter container styles
|
|
5
|
-
* Horizontal scrollable filter chip list
|
|
6
|
-
*/
|
|
7
|
-
export const getFilterContainerStyle = (): ViewStyle => ({
|
|
8
|
-
flexDirection: 'row',
|
|
9
|
-
paddingHorizontal: 16,
|
|
10
|
-
paddingVertical: 12,
|
|
11
|
-
gap: 8, // Space between chips
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Clear all button container styles
|
|
16
|
-
*/
|
|
17
|
-
export const getClearAllContainerStyle = (): ViewStyle => ({
|
|
18
|
-
marginLeft: 8,
|
|
19
|
-
paddingHorizontal: 12,
|
|
20
|
-
paddingVertical: 6,
|
|
21
|
-
borderRadius: 16,
|
|
22
|
-
justifyContent: 'center',
|
|
23
|
-
alignItems: 'center',
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* ScrollView content container style
|
|
28
|
-
*/
|
|
29
|
-
export const getScrollContentContainerStyle = (): ViewStyle => ({
|
|
30
|
-
alignItems: 'center',
|
|
31
|
-
gap: 8,
|
|
32
|
-
});
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Filter option interface
|
|
5
|
-
* Represents a single filterable option
|
|
6
|
-
*/
|
|
7
|
-
export interface FilterOption {
|
|
8
|
-
/**
|
|
9
|
-
* Unique identifier for the filter option
|
|
10
|
-
*/
|
|
11
|
-
id: string;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Display label for the filter
|
|
15
|
-
*/
|
|
16
|
-
label: string;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Optional value associated with the filter
|
|
20
|
-
* Can be used for backend filtering
|
|
21
|
-
*/
|
|
22
|
-
value?: unknown;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Optional icon name to display
|
|
26
|
-
*/
|
|
27
|
-
icon?: string;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* AtomicFilter component props
|
|
32
|
-
*/
|
|
33
|
-
export interface AtomicFilterProps {
|
|
34
|
-
/**
|
|
35
|
-
* Array of filter options to display
|
|
36
|
-
*/
|
|
37
|
-
options: FilterOption[];
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Array of currently selected filter IDs
|
|
41
|
-
*/
|
|
42
|
-
selectedIds: string[];
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Callback when selection changes
|
|
46
|
-
* @param selectedIds - New array of selected IDs
|
|
47
|
-
*/
|
|
48
|
-
onSelectionChange: (selectedIds: string[]) => void;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Enable multi-select mode
|
|
52
|
-
* @default true
|
|
53
|
-
*/
|
|
54
|
-
multiSelect?: boolean;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Show "Clear All" button when filters are active
|
|
58
|
-
* @default true
|
|
59
|
-
*/
|
|
60
|
-
showClearAll?: boolean;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Chip variant style
|
|
64
|
-
* @default 'outlined'
|
|
65
|
-
*/
|
|
66
|
-
variant?: 'filled' | 'outlined' | 'soft';
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Chip color theme
|
|
70
|
-
* @default 'primary'
|
|
71
|
-
*/
|
|
72
|
-
color?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Chip size
|
|
76
|
-
* @default 'md'
|
|
77
|
-
*/
|
|
78
|
-
size?: 'sm' | 'md' | 'lg';
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Custom style for the container
|
|
82
|
-
*/
|
|
83
|
-
style?: StyleProp<ViewStyle>;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Test ID for testing
|
|
87
|
-
*/
|
|
88
|
-
testID?: string;
|
|
89
|
-
}
|