@umituz/react-native-design-system 1.7.1 → 1.7.3
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 +71 -271
- 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,154 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ScrollView, View, TouchableOpacity, ViewStyle } from 'react-native';
|
|
3
|
-
import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
|
|
4
|
-
import { AtomicChip } from './AtomicChip';
|
|
5
|
-
import { AtomicText } from './AtomicText';
|
|
6
|
-
import { AtomicIcon } from './AtomicIcon';
|
|
7
|
-
import { AtomicFilterProps, FilterOption } from './filter/types';
|
|
8
|
-
import {
|
|
9
|
-
getFilterContainerStyle,
|
|
10
|
-
getClearAllContainerStyle,
|
|
11
|
-
getScrollContentContainerStyle,
|
|
12
|
-
} from './filter/styles/filterStyles';
|
|
13
|
-
|
|
14
|
-
export type { FilterOption, AtomicFilterProps } from './filter/types';
|
|
15
|
-
export {
|
|
16
|
-
getFilterContainerStyle,
|
|
17
|
-
getClearAllContainerStyle,
|
|
18
|
-
getScrollContentContainerStyle,
|
|
19
|
-
} from './filter/styles/filterStyles';
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* AtomicFilter - Horizontal Filter Chip Component
|
|
23
|
-
*
|
|
24
|
-
* A Material Design 3 compliant filter component using chip selection.
|
|
25
|
-
* Supports single and multi-select modes with "Clear All" functionality.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```tsx
|
|
29
|
-
* const [selectedFilters, setSelectedFilters] = useState<string[]>([]);
|
|
30
|
-
*
|
|
31
|
-
* <AtomicFilter
|
|
32
|
-
* options={[
|
|
33
|
-
* { id: 'active', label: 'Active', icon: 'check-circle' },
|
|
34
|
-
* { id: 'completed', label: 'Completed', icon: 'check' },
|
|
35
|
-
* { id: 'pending', label: 'Pending', icon: 'clock' },
|
|
36
|
-
* ]}
|
|
37
|
-
* selectedIds={selectedFilters}
|
|
38
|
-
* onSelectionChange={setSelectedFilters}
|
|
39
|
-
* multiSelect={true}
|
|
40
|
-
* showClearAll={true}
|
|
41
|
-
* />
|
|
42
|
-
* ```
|
|
43
|
-
*
|
|
44
|
-
* Features:
|
|
45
|
-
* - Horizontal scrollable filter chips
|
|
46
|
-
* - Single/Multi-select modes
|
|
47
|
-
* - Clear all button (when filters active)
|
|
48
|
-
* - Theme-aware colors from design tokens
|
|
49
|
-
* - Icon support per filter option
|
|
50
|
-
* - Fully controlled component
|
|
51
|
-
*/
|
|
52
|
-
export const AtomicFilter: React.FC<AtomicFilterProps> = ({
|
|
53
|
-
options,
|
|
54
|
-
selectedIds,
|
|
55
|
-
onSelectionChange,
|
|
56
|
-
multiSelect = true,
|
|
57
|
-
showClearAll = true,
|
|
58
|
-
variant = 'outlined',
|
|
59
|
-
color = 'primary',
|
|
60
|
-
size = 'md',
|
|
61
|
-
style,
|
|
62
|
-
testID,
|
|
63
|
-
}) => {
|
|
64
|
-
const tokens = useAppDesignTokens();
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Handle filter chip press
|
|
68
|
-
*/
|
|
69
|
-
const handleFilterPress = (optionId: string) => {
|
|
70
|
-
if (multiSelect) {
|
|
71
|
-
// Multi-select mode: Toggle selection
|
|
72
|
-
if (selectedIds.includes(optionId)) {
|
|
73
|
-
// Deselect
|
|
74
|
-
onSelectionChange(selectedIds.filter(id => id !== optionId));
|
|
75
|
-
} else {
|
|
76
|
-
// Select
|
|
77
|
-
onSelectionChange([...selectedIds, optionId]);
|
|
78
|
-
}
|
|
79
|
-
} else {
|
|
80
|
-
// Single-select mode: Replace selection
|
|
81
|
-
if (selectedIds.includes(optionId)) {
|
|
82
|
-
// Deselect (clear selection)
|
|
83
|
-
onSelectionChange([]);
|
|
84
|
-
} else {
|
|
85
|
-
// Select (only this one)
|
|
86
|
-
onSelectionChange([optionId]);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Handle clear all button press
|
|
93
|
-
*/
|
|
94
|
-
const handleClearAll = () => {
|
|
95
|
-
onSelectionChange([]);
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
const hasActiveFilters = selectedIds.length > 0;
|
|
99
|
-
|
|
100
|
-
return (
|
|
101
|
-
<ScrollView
|
|
102
|
-
horizontal
|
|
103
|
-
showsHorizontalScrollIndicator={false}
|
|
104
|
-
contentContainerStyle={getScrollContentContainerStyle()}
|
|
105
|
-
style={[style]}
|
|
106
|
-
testID={testID}
|
|
107
|
-
>
|
|
108
|
-
<View style={getFilterContainerStyle()}>
|
|
109
|
-
{options.map((option) => {
|
|
110
|
-
const isSelected = selectedIds.includes(option.id);
|
|
111
|
-
|
|
112
|
-
return (
|
|
113
|
-
<AtomicChip
|
|
114
|
-
key={option.id}
|
|
115
|
-
variant={isSelected ? 'filled' : variant}
|
|
116
|
-
color={color}
|
|
117
|
-
size={size}
|
|
118
|
-
leadingIcon={option.icon}
|
|
119
|
-
selected={isSelected}
|
|
120
|
-
clickable={true}
|
|
121
|
-
onPress={() => handleFilterPress(option.id)}
|
|
122
|
-
testID={`filter-chip-${option.id}`}
|
|
123
|
-
>
|
|
124
|
-
{option.label}
|
|
125
|
-
</AtomicChip>
|
|
126
|
-
);
|
|
127
|
-
})}
|
|
128
|
-
|
|
129
|
-
{/* Clear All Button */}
|
|
130
|
-
{showClearAll && hasActiveFilters && (
|
|
131
|
-
<TouchableOpacity
|
|
132
|
-
onPress={handleClearAll}
|
|
133
|
-
style={[
|
|
134
|
-
getClearAllContainerStyle(),
|
|
135
|
-
{
|
|
136
|
-
backgroundColor: tokens.colors.surfaceVariant,
|
|
137
|
-
borderWidth: 1,
|
|
138
|
-
borderColor: tokens.colors.outline,
|
|
139
|
-
}
|
|
140
|
-
]}
|
|
141
|
-
testID="clear-all-button"
|
|
142
|
-
>
|
|
143
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', gap: tokens.spacing.xs }}>
|
|
144
|
-
<AtomicIcon name="X" size="xs" color="surfaceVariant" />
|
|
145
|
-
<AtomicText type="labelSmall" style={{ color: tokens.colors.textSecondary }}>
|
|
146
|
-
Clear All
|
|
147
|
-
</AtomicText>
|
|
148
|
-
</View>
|
|
149
|
-
</TouchableOpacity>
|
|
150
|
-
)}
|
|
151
|
-
</View>
|
|
152
|
-
</ScrollView>
|
|
153
|
-
);
|
|
154
|
-
};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AtomicFormError - Universal Form Error Component
|
|
3
|
-
*
|
|
4
|
-
* Provides consistent error message display for forms
|
|
5
|
-
* Theme: {{THEME_NAME}} ({{CATEGORY}} category)
|
|
6
|
-
*
|
|
7
|
-
* Atomic Design Level: ATOM
|
|
8
|
-
* Purpose: Display validation error messages
|
|
9
|
-
*
|
|
10
|
-
* Usage:
|
|
11
|
-
* - Form field validation errors
|
|
12
|
-
* - Global form error messages
|
|
13
|
-
* - API error display
|
|
14
|
-
* - Input validation feedback
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import React from 'react';
|
|
18
|
-
import { View, StyleSheet, StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
19
|
-
import { AtomicText } from './AtomicText';
|
|
20
|
-
import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
|
|
21
|
-
import { withAlpha } from '@umituz/react-native-theme';
|
|
22
|
-
|
|
23
|
-
// =============================================================================
|
|
24
|
-
// TYPE DEFINITIONS
|
|
25
|
-
// =============================================================================
|
|
26
|
-
|
|
27
|
-
export interface AtomicFormErrorProps {
|
|
28
|
-
/** Error message to display */
|
|
29
|
-
message: string | null | undefined;
|
|
30
|
-
/** Error display variant */
|
|
31
|
-
variant?: 'global' | 'field';
|
|
32
|
-
/** Custom container style */
|
|
33
|
-
style?: StyleProp<ViewStyle>;
|
|
34
|
-
/** Custom text style */
|
|
35
|
-
textStyle?: StyleProp<TextStyle>;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// =============================================================================
|
|
39
|
-
// COMPONENT IMPLEMENTATION
|
|
40
|
-
// =============================================================================
|
|
41
|
-
|
|
42
|
-
export const AtomicFormError: React.FC<AtomicFormErrorProps> = ({
|
|
43
|
-
message,
|
|
44
|
-
variant = 'field',
|
|
45
|
-
style,
|
|
46
|
-
textStyle,
|
|
47
|
-
}) => {
|
|
48
|
-
const tokens = useAppDesignTokens();
|
|
49
|
-
|
|
50
|
-
if (!message) {
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (variant === 'global') {
|
|
55
|
-
return (
|
|
56
|
-
<View
|
|
57
|
-
style={[
|
|
58
|
-
{
|
|
59
|
-
padding: tokens.spacing.md,
|
|
60
|
-
borderRadius: tokens.borders.radius.md,
|
|
61
|
-
marginBottom: tokens.spacing.sm,
|
|
62
|
-
backgroundColor: withAlpha(tokens.colors.error, 0.15),
|
|
63
|
-
},
|
|
64
|
-
style,
|
|
65
|
-
]}
|
|
66
|
-
>
|
|
67
|
-
<AtomicText
|
|
68
|
-
type="bodySmall"
|
|
69
|
-
color="error"
|
|
70
|
-
style={StyleSheet.flatten([
|
|
71
|
-
{
|
|
72
|
-
textAlign: 'center',
|
|
73
|
-
fontWeight: tokens.typography.medium,
|
|
74
|
-
},
|
|
75
|
-
textStyle,
|
|
76
|
-
])}
|
|
77
|
-
>
|
|
78
|
-
{message}
|
|
79
|
-
</AtomicText>
|
|
80
|
-
</View>
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return (
|
|
85
|
-
<AtomicText
|
|
86
|
-
type="bodySmall"
|
|
87
|
-
color="error"
|
|
88
|
-
style={StyleSheet.flatten([
|
|
89
|
-
{
|
|
90
|
-
marginTop: tokens.spacing.xs,
|
|
91
|
-
marginLeft: tokens.spacing.xs,
|
|
92
|
-
},
|
|
93
|
-
textStyle,
|
|
94
|
-
])}
|
|
95
|
-
>
|
|
96
|
-
{message}
|
|
97
|
-
</AtomicText>
|
|
98
|
-
);
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
// =============================================================================
|
|
102
|
-
// EXPORTS
|
|
103
|
-
// =============================================================================
|
|
104
|
-
|
|
105
|
-
export default AtomicFormError;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AtomicIcon - Atomic Design System Icon Component
|
|
3
|
-
*
|
|
4
|
-
* Wrapper for the universal Icon component from @domains/icons
|
|
5
|
-
* Provides backward compatibility with AtomicIcon naming convention
|
|
6
|
-
* while leveraging the full power of the icons domain architecture.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import { Icon } from '@umituz/react-native-icon';
|
|
11
|
-
import type { IconProps, IconSize, IconColor, IconName } from '@umituz/react-native-icon';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* AtomicIcon Component
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```tsx
|
|
18
|
-
* import { AtomicIcon } from '@umituz/react-native-design-system';
|
|
19
|
-
*
|
|
20
|
-
* // Basic usage
|
|
21
|
-
* <AtomicIcon name="Settings" size="md" color="primary" />
|
|
22
|
-
*
|
|
23
|
-
* // Custom size and color
|
|
24
|
-
* <AtomicIcon name="Heart" customSize={32} customColor="#FF0000" />
|
|
25
|
-
*
|
|
26
|
-
* // With background
|
|
27
|
-
* <AtomicIcon name="Info" size="lg" withBackground backgroundColor="#667eea" />
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export const AtomicIcon: React.FC<IconProps> = (props) => {
|
|
31
|
-
return <Icon {...props} />;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Re-export types with Atomic naming convention
|
|
36
|
-
*/
|
|
37
|
-
export type AtomicIconProps = IconProps;
|
|
38
|
-
export type AtomicIconSize = IconSize;
|
|
39
|
-
export type AtomicIconColor = IconColor;
|
|
40
|
-
export type AtomicIconName = IconName;
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AtomicImage - Universal Image Component
|
|
3
|
-
*
|
|
4
|
-
* Provides consistent image handling across the app with theme integration
|
|
5
|
-
* Theme: {{THEME_NAME}} ({{CATEGORY}} category)
|
|
6
|
-
*
|
|
7
|
-
* Atomic Design Level: ATOM
|
|
8
|
-
* Purpose: Basic image display with consistent styling
|
|
9
|
-
*
|
|
10
|
-
* Usage:
|
|
11
|
-
* - Profile pictures
|
|
12
|
-
* - Product images
|
|
13
|
-
* - Icons and illustrations
|
|
14
|
-
* - Background images
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import React from 'react';
|
|
18
|
-
import { Image, ImageProps, StyleSheet, ViewStyle } from 'react-native';
|
|
19
|
-
import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
|
|
20
|
-
|
|
21
|
-
// =============================================================================
|
|
22
|
-
// TYPE DEFINITIONS
|
|
23
|
-
// =============================================================================
|
|
24
|
-
|
|
25
|
-
export interface AtomicImageProps extends Omit<ImageProps, 'style'> {
|
|
26
|
-
/** Image source */
|
|
27
|
-
source: ImageProps['source'];
|
|
28
|
-
/** Size variant */
|
|
29
|
-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
30
|
-
/** Shape variant */
|
|
31
|
-
shape?: 'square' | 'circle' | 'rounded';
|
|
32
|
-
/** Border radius override */
|
|
33
|
-
borderRadius?: number;
|
|
34
|
-
/** Container style override */
|
|
35
|
-
style?: ViewStyle | ViewStyle[];
|
|
36
|
-
/** Image style override */
|
|
37
|
-
imageStyle?: ImageProps['style'];
|
|
38
|
-
/** Background color */
|
|
39
|
-
backgroundColor?: string;
|
|
40
|
-
/** Border color */
|
|
41
|
-
borderColor?: string;
|
|
42
|
-
/** Border width */
|
|
43
|
-
borderWidth?: number;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// =============================================================================
|
|
47
|
-
// SIZE CONFIGURATION
|
|
48
|
-
// =============================================================================
|
|
49
|
-
|
|
50
|
-
const SIZE_CONFIG = {
|
|
51
|
-
xs: 24,
|
|
52
|
-
sm: 32,
|
|
53
|
-
md: 48,
|
|
54
|
-
lg: 64,
|
|
55
|
-
xl: 96,
|
|
56
|
-
xxl: 128,
|
|
57
|
-
} as const;
|
|
58
|
-
|
|
59
|
-
// =============================================================================
|
|
60
|
-
// COMPONENT IMPLEMENTATION
|
|
61
|
-
// =============================================================================
|
|
62
|
-
|
|
63
|
-
export const AtomicImage: React.FC<AtomicImageProps> = ({
|
|
64
|
-
source,
|
|
65
|
-
size = 'md',
|
|
66
|
-
shape = 'rounded',
|
|
67
|
-
borderRadius,
|
|
68
|
-
style,
|
|
69
|
-
imageStyle,
|
|
70
|
-
backgroundColor,
|
|
71
|
-
borderColor,
|
|
72
|
-
borderWidth = 0,
|
|
73
|
-
...props
|
|
74
|
-
}) => {
|
|
75
|
-
const tokens = useAppDesignTokens();
|
|
76
|
-
const styles = getStyles(tokens);
|
|
77
|
-
|
|
78
|
-
const imageSize = SIZE_CONFIG[size as 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'];
|
|
79
|
-
const calculatedBorderRadius = borderRadius ?? getBorderRadius(shape as 'square' | 'circle' | 'rounded', imageSize, tokens);
|
|
80
|
-
|
|
81
|
-
const containerStyle = [
|
|
82
|
-
styles.container,
|
|
83
|
-
{
|
|
84
|
-
width: imageSize,
|
|
85
|
-
height: imageSize,
|
|
86
|
-
borderRadius: calculatedBorderRadius,
|
|
87
|
-
backgroundColor: backgroundColor || tokens.colors.surface,
|
|
88
|
-
borderColor: borderColor || tokens.colors.border,
|
|
89
|
-
borderWidth,
|
|
90
|
-
},
|
|
91
|
-
style,
|
|
92
|
-
];
|
|
93
|
-
|
|
94
|
-
const finalImageStyle = [
|
|
95
|
-
styles.image,
|
|
96
|
-
{
|
|
97
|
-
borderRadius: calculatedBorderRadius,
|
|
98
|
-
},
|
|
99
|
-
imageStyle,
|
|
100
|
-
];
|
|
101
|
-
|
|
102
|
-
return (
|
|
103
|
-
<Image
|
|
104
|
-
source={source}
|
|
105
|
-
style={finalImageStyle}
|
|
106
|
-
{...props}
|
|
107
|
-
/>
|
|
108
|
-
);
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
// =============================================================================
|
|
112
|
-
// HELPER FUNCTIONS
|
|
113
|
-
// =============================================================================
|
|
114
|
-
|
|
115
|
-
const getBorderRadius = (shape: AtomicImageProps['shape'], size: number, tokens: ReturnType<typeof useAppDesignTokens>): number => {
|
|
116
|
-
switch (shape) {
|
|
117
|
-
case 'circle':
|
|
118
|
-
return size / 2;
|
|
119
|
-
case 'square':
|
|
120
|
-
return 0;
|
|
121
|
-
case 'rounded':
|
|
122
|
-
default:
|
|
123
|
-
return tokens.borders.radius.md;
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
// =============================================================================
|
|
128
|
-
// STYLES
|
|
129
|
-
// =============================================================================
|
|
130
|
-
|
|
131
|
-
const getStyles = (tokens: ReturnType<typeof useAppDesignTokens>) =>
|
|
132
|
-
StyleSheet.create({
|
|
133
|
-
container: {
|
|
134
|
-
overflow: 'hidden',
|
|
135
|
-
justifyContent: 'center',
|
|
136
|
-
alignItems: 'center',
|
|
137
|
-
},
|
|
138
|
-
image: {
|
|
139
|
-
width: '100%',
|
|
140
|
-
height: '100%',
|
|
141
|
-
resizeMode: 'cover',
|
|
142
|
-
},
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
// =============================================================================
|
|
146
|
-
// EXPORTS
|
|
147
|
-
// =============================================================================
|
|
148
|
-
|
|
149
|
-
export default AtomicImage;
|