@umituz/react-native-design-system 1.7.0 → 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,196 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AtomicTextArea Component
|
|
3
|
-
*
|
|
4
|
-
* A multiline text input component with pure React Native implementation
|
|
5
|
-
* for longer text entry with consistent styling.
|
|
6
|
-
*
|
|
7
|
-
* Features:
|
|
8
|
-
* - Pure React Native TextInput with multiline
|
|
9
|
-
* - Outlined/filled/flat variants
|
|
10
|
-
* - Error, success, disabled states
|
|
11
|
-
* - Character counter with max length
|
|
12
|
-
* - Helper text for guidance or errors
|
|
13
|
-
* - Configurable rows for height
|
|
14
|
-
* - Theme-aware styling
|
|
15
|
-
* - Full accessibility support
|
|
16
|
-
*
|
|
17
|
-
* Usage:
|
|
18
|
-
* ```tsx
|
|
19
|
-
* const [description, setDescription] = useState('');
|
|
20
|
-
*
|
|
21
|
-
* <AtomicTextArea
|
|
22
|
-
* value={description}
|
|
23
|
-
* onChangeText={setDescription}
|
|
24
|
-
* label="Description"
|
|
25
|
-
* placeholder="Enter description..."
|
|
26
|
-
* maxLength={500}
|
|
27
|
-
* showCharacterCount
|
|
28
|
-
* rows={6}
|
|
29
|
-
* helperText="Provide a detailed description"
|
|
30
|
-
* />
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
import React, { useState } from 'react';
|
|
34
|
-
import { View, TextInput, StyleSheet } from 'react-native';
|
|
35
|
-
import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
|
|
36
|
-
import { AtomicText } from './AtomicText';
|
|
37
|
-
/**
|
|
38
|
-
* AtomicTextArea - Pure React Native Multiline Text Input
|
|
39
|
-
*/
|
|
40
|
-
export const AtomicTextArea = ({ variant = 'outlined', state = 'default', size = 'md', label, value = '', onChangeText, placeholder, helperText, maxLength, showCharacterCount = false, rows = 4, minHeight, autoCapitalize = 'sentences', autoCorrect = true, disabled = false, style, inputStyle, testID, onBlur, onFocus, }) => {
|
|
41
|
-
const tokens = useAppDesignTokens();
|
|
42
|
-
const [isFocused, setIsFocused] = useState(false);
|
|
43
|
-
const isDisabled = state === 'disabled' || disabled;
|
|
44
|
-
const characterCount = value?.toString().length || 0;
|
|
45
|
-
const hasError = state === 'error';
|
|
46
|
-
const hasSuccess = state === 'success';
|
|
47
|
-
// Size configuration
|
|
48
|
-
const sizeConfig = {
|
|
49
|
-
sm: {
|
|
50
|
-
paddingVertical: tokens.spacing.xs,
|
|
51
|
-
paddingHorizontal: tokens.spacing.sm,
|
|
52
|
-
fontSize: tokens.typography.bodySmall.fontSize,
|
|
53
|
-
lineHeight: 20,
|
|
54
|
-
},
|
|
55
|
-
md: {
|
|
56
|
-
paddingVertical: tokens.spacing.sm,
|
|
57
|
-
paddingHorizontal: tokens.spacing.md,
|
|
58
|
-
fontSize: tokens.typography.bodyMedium.fontSize,
|
|
59
|
-
lineHeight: 24,
|
|
60
|
-
},
|
|
61
|
-
lg: {
|
|
62
|
-
paddingVertical: tokens.spacing.md,
|
|
63
|
-
paddingHorizontal: tokens.spacing.lg,
|
|
64
|
-
fontSize: tokens.typography.bodyLarge.fontSize,
|
|
65
|
-
lineHeight: 28,
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
const config = sizeConfig[size];
|
|
69
|
-
// Calculate height based on rows
|
|
70
|
-
const getTextAreaHeight = () => {
|
|
71
|
-
if (minHeight)
|
|
72
|
-
return minHeight;
|
|
73
|
-
const paddingVertical = config.paddingVertical * 2;
|
|
74
|
-
return (rows * config.lineHeight) + paddingVertical;
|
|
75
|
-
};
|
|
76
|
-
// Get variant styles
|
|
77
|
-
const getVariantStyle = () => {
|
|
78
|
-
const baseStyle = {
|
|
79
|
-
backgroundColor: tokens.colors.surface,
|
|
80
|
-
borderRadius: tokens.borders.radius.md,
|
|
81
|
-
};
|
|
82
|
-
let borderColor = tokens.colors.border;
|
|
83
|
-
if (isFocused)
|
|
84
|
-
borderColor = tokens.colors.primary;
|
|
85
|
-
if (hasError)
|
|
86
|
-
borderColor = tokens.colors.error;
|
|
87
|
-
if (hasSuccess)
|
|
88
|
-
borderColor = tokens.colors.success;
|
|
89
|
-
if (isDisabled)
|
|
90
|
-
borderColor = tokens.colors.borderDisabled;
|
|
91
|
-
switch (variant) {
|
|
92
|
-
case 'outlined':
|
|
93
|
-
return {
|
|
94
|
-
...baseStyle,
|
|
95
|
-
borderWidth: isFocused ? 2 : 1,
|
|
96
|
-
borderColor,
|
|
97
|
-
};
|
|
98
|
-
case 'filled':
|
|
99
|
-
return {
|
|
100
|
-
...baseStyle,
|
|
101
|
-
backgroundColor: tokens.colors.surfaceSecondary,
|
|
102
|
-
borderWidth: 0,
|
|
103
|
-
borderBottomWidth: isFocused ? 2 : 1,
|
|
104
|
-
borderBottomColor: borderColor,
|
|
105
|
-
};
|
|
106
|
-
case 'flat':
|
|
107
|
-
return {
|
|
108
|
-
...baseStyle,
|
|
109
|
-
backgroundColor: 'transparent',
|
|
110
|
-
borderWidth: 0,
|
|
111
|
-
borderBottomWidth: 1,
|
|
112
|
-
borderBottomColor: borderColor,
|
|
113
|
-
borderRadius: 0,
|
|
114
|
-
};
|
|
115
|
-
default:
|
|
116
|
-
return baseStyle;
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
// Get text color based on state
|
|
120
|
-
const getTextColor = () => {
|
|
121
|
-
if (isDisabled)
|
|
122
|
-
return tokens.colors.textDisabled;
|
|
123
|
-
if (hasError)
|
|
124
|
-
return tokens.colors.error;
|
|
125
|
-
if (hasSuccess)
|
|
126
|
-
return tokens.colors.success;
|
|
127
|
-
return tokens.colors.textPrimary;
|
|
128
|
-
};
|
|
129
|
-
const containerStyle = [
|
|
130
|
-
styles.container,
|
|
131
|
-
getVariantStyle(),
|
|
132
|
-
{
|
|
133
|
-
paddingVertical: config.paddingVertical,
|
|
134
|
-
paddingHorizontal: config.paddingHorizontal,
|
|
135
|
-
height: getTextAreaHeight(),
|
|
136
|
-
opacity: isDisabled ? 0.5 : 1,
|
|
137
|
-
},
|
|
138
|
-
style,
|
|
139
|
-
];
|
|
140
|
-
const textInputStyle = [
|
|
141
|
-
styles.input,
|
|
142
|
-
{
|
|
143
|
-
fontSize: config.fontSize,
|
|
144
|
-
lineHeight: config.lineHeight,
|
|
145
|
-
color: getTextColor(),
|
|
146
|
-
},
|
|
147
|
-
inputStyle,
|
|
148
|
-
];
|
|
149
|
-
return (<View testID={testID}>
|
|
150
|
-
{label && (<AtomicText type="labelMedium" color={hasError ? 'error' : hasSuccess ? 'success' : 'secondary'} style={styles.label}>
|
|
151
|
-
{label}
|
|
152
|
-
</AtomicText>)}
|
|
153
|
-
|
|
154
|
-
<View style={containerStyle}>
|
|
155
|
-
<TextInput value={value} onChangeText={onChangeText} placeholder={placeholder} placeholderTextColor={tokens.colors.textSecondary} maxLength={maxLength} autoCapitalize={autoCapitalize} autoCorrect={autoCorrect} editable={!isDisabled} multiline={true} numberOfLines={rows} textAlignVertical="top" style={textInputStyle} onBlur={() => {
|
|
156
|
-
setIsFocused(false);
|
|
157
|
-
onBlur?.();
|
|
158
|
-
}} onFocus={() => {
|
|
159
|
-
setIsFocused(true);
|
|
160
|
-
onFocus?.();
|
|
161
|
-
}} testID={testID ? `${testID}-input` : undefined}/>
|
|
162
|
-
</View>
|
|
163
|
-
|
|
164
|
-
{(helperText || showCharacterCount) && (<View style={styles.helperRow}>
|
|
165
|
-
{helperText && (<AtomicText type="bodySmall" color={hasError ? 'error' : 'secondary'} style={styles.helperText} testID={testID ? `${testID}-helper` : undefined}>
|
|
166
|
-
{helperText}
|
|
167
|
-
</AtomicText>)}
|
|
168
|
-
{showCharacterCount && maxLength && (<AtomicText type="bodySmall" color="secondary" style={styles.characterCount} testID={testID ? `${testID}-count` : undefined}>
|
|
169
|
-
{characterCount}/{maxLength}
|
|
170
|
-
</AtomicText>)}
|
|
171
|
-
</View>)}
|
|
172
|
-
</View>);
|
|
173
|
-
};
|
|
174
|
-
const styles = StyleSheet.create({
|
|
175
|
-
container: {
|
|
176
|
-
justifyContent: 'flex-start',
|
|
177
|
-
},
|
|
178
|
-
input: {
|
|
179
|
-
flex: 1,
|
|
180
|
-
},
|
|
181
|
-
label: {
|
|
182
|
-
marginBottom: 4,
|
|
183
|
-
},
|
|
184
|
-
helperRow: {
|
|
185
|
-
flexDirection: 'row',
|
|
186
|
-
justifyContent: 'space-between',
|
|
187
|
-
marginTop: 4,
|
|
188
|
-
},
|
|
189
|
-
helperText: {
|
|
190
|
-
flex: 1,
|
|
191
|
-
},
|
|
192
|
-
characterCount: {
|
|
193
|
-
marginLeft: 8,
|
|
194
|
-
},
|
|
195
|
-
});
|
|
196
|
-
//# sourceMappingURL=AtomicTextArea.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AtomicTextArea.js","sourceRoot":"","sources":["../../../src/presentation/atoms/AtomicTextArea.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAmC,MAAM,cAAc,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAiD1C;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC5D,OAAO,GAAG,UAAU,EACpB,KAAK,GAAG,SAAS,EACjB,IAAI,GAAG,IAAI,EACX,KAAK,EACL,KAAK,GAAG,EAAE,EACV,YAAY,EACZ,WAAW,EACX,UAAU,EACV,SAAS,EACT,kBAAkB,GAAG,KAAK,EAC1B,IAAI,GAAG,CAAC,EACR,SAAS,EACT,cAAc,GAAG,WAAW,EAC5B,WAAW,GAAG,IAAI,EAClB,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,UAAU,EACV,MAAM,EACN,MAAM,EACN,OAAO,GACR,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,kBAAkB,EAAE,CAAC;IACpC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,UAAU,GAAG,KAAK,KAAK,UAAU,IAAI,QAAQ,CAAC;IACpD,MAAM,cAAc,GAAG,KAAK,EAAE,QAAQ,EAAE,CAAC,MAAM,IAAI,CAAC,CAAC;IACrD,MAAM,QAAQ,GAAG,KAAK,KAAK,OAAO,CAAC;IACnC,MAAM,UAAU,GAAG,KAAK,KAAK,S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,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAE/C;cAAA,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAC7B;YAAA,EAAE,UAAU,CAAC,CACd,CACH;QAAA,EAAE,IAAI,CAAC,CACR,CACH;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,cAAc,EAAE,YAAY;KAC7B;IACD,KAAK,EAAE;QACL,IAAI,EAAE,CAAC;KACR;IACD,KAAK,EAAE;QACL,YAAY,EAAE,CAAC;KAChB;IACD,SAAS,EAAE;QACT,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,eAAe;QAC/B,SAAS,EAAE,CAAC;KACb;IACD,UAAU,EAAE;QACV,IAAI,EAAE,CAAC;KACR;IACD,cAAc,EAAE;QACd,UAAU,EAAE,CAAC;KACd;CACF,CAAC,CAAC"}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AtomicTouchableProps, TouchableFeedback, FeedbackStrength } from './touchable/types';
|
|
3
|
-
export type { AtomicTouchableProps, TouchableFeedback, FeedbackStrength, HitSlop, } from './touchable/types';
|
|
4
|
-
export { getOpacityValue, getTouchableContainerStyle, getDisabledStyle, normalizeHitSlop, } from './touchable/styles/touchableStyles';
|
|
5
|
-
/**
|
|
6
|
-
* AtomicTouchable - Unified Touchable Component
|
|
7
|
-
*
|
|
8
|
-
* A modern, accessible touchable wrapper using React Native's Pressable API.
|
|
9
|
-
* Provides consistent behavior across iOS, Android, and Web.
|
|
10
|
-
*
|
|
11
|
-
* Features:
|
|
12
|
-
* - Multiple feedback variants (opacity, highlight, ripple, none)
|
|
13
|
-
* - Configurable feedback strength (subtle, normal, strong)
|
|
14
|
-
* - Disabled state with visual feedback
|
|
15
|
-
* - Hit slop customization for small touch targets
|
|
16
|
-
* - Minimum 48x48 touch target (iOS HIG compliance)
|
|
17
|
-
* - Full accessibility support
|
|
18
|
-
* - Theme-aware ripple colors
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```tsx
|
|
22
|
-
* // Basic usage with opacity feedback
|
|
23
|
-
* <AtomicTouchable onPress={handlePress}>
|
|
24
|
-
* <AtomicText>Press Me</AtomicText>
|
|
25
|
-
* </AtomicTouchable>
|
|
26
|
-
*
|
|
27
|
-
* // With custom hit slop (extends touch area)
|
|
28
|
-
* <AtomicTouchable
|
|
29
|
-
* onPress={handlePress}
|
|
30
|
-
* hitSlop={8}
|
|
31
|
-
* feedback="ripple"
|
|
32
|
-
* >
|
|
33
|
-
* <AtomicIcon name="X" size="sm" />
|
|
34
|
-
* </AtomicTouchable>
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
export declare const AtomicTouchable: React.FC<AtomicTouchableProps>;
|
|
38
|
-
/**
|
|
39
|
-
* Preset touchable configurations for common use cases
|
|
40
|
-
*/
|
|
41
|
-
export declare const TouchablePresets: {
|
|
42
|
-
/**
|
|
43
|
-
* iOS-style opacity feedback (default)
|
|
44
|
-
*/
|
|
45
|
-
ios: {
|
|
46
|
-
feedback: TouchableFeedback;
|
|
47
|
-
strength: FeedbackStrength;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Android-style ripple feedback
|
|
51
|
-
*/
|
|
52
|
-
android: {
|
|
53
|
-
feedback: TouchableFeedback;
|
|
54
|
-
strength: FeedbackStrength;
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* Subtle feedback for secondary actions
|
|
58
|
-
*/
|
|
59
|
-
subtle: {
|
|
60
|
-
feedback: TouchableFeedback;
|
|
61
|
-
strength: FeedbackStrength;
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Strong feedback for primary actions
|
|
65
|
-
*/
|
|
66
|
-
strong: {
|
|
67
|
-
feedback: TouchableFeedback;
|
|
68
|
-
strength: FeedbackStrength;
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* No visual feedback (use sparingly)
|
|
72
|
-
*/
|
|
73
|
-
none: {
|
|
74
|
-
feedback: TouchableFeedback;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
//# sourceMappingURL=AtomicTouchable.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AtomicTouchable.d.ts","sourceRoot":"","sources":["../../../src/presentation/atoms/AtomicTouchable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAQ9F,YAAY,EACV,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,OAAO,GACR,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,oCAAoC,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2G1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;IAC3B;;OAEG;;kBAEsB,iBAAiB;kBAClB,gBAAgB;;IAGxC;;OAEG;;kBAEqB,iBAAiB;kBACjB,gBAAgB;;IAGxC;;OAEG;;kBAEsB,iBAAiB;kBAClB,gBAAgB;;IAGxC;;OAEG;;kBAEsB,iBAAiB;kBAClB,gBAAgB;;IAGxC;;OAEG;;kBAEmB,iBAAiB;;CAExC,CAAC"}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Pressable } from 'react-native';
|
|
3
|
-
import { useAppDesignTokens } from '../hooks/useAppDesignTokens';
|
|
4
|
-
import { getOpacityValue, getTouchableContainerStyle, getDisabledStyle, normalizeHitSlop, } from './touchable/styles/touchableStyles';
|
|
5
|
-
export { getOpacityValue, getTouchableContainerStyle, getDisabledStyle, normalizeHitSlop, } from './touchable/styles/touchableStyles';
|
|
6
|
-
/**
|
|
7
|
-
* AtomicTouchable - Unified Touchable Component
|
|
8
|
-
*
|
|
9
|
-
* A modern, accessible touchable wrapper using React Native's Pressable API.
|
|
10
|
-
* Provides consistent behavior across iOS, Android, and Web.
|
|
11
|
-
*
|
|
12
|
-
* Features:
|
|
13
|
-
* - Multiple feedback variants (opacity, highlight, ripple, none)
|
|
14
|
-
* - Configurable feedback strength (subtle, normal, strong)
|
|
15
|
-
* - Disabled state with visual feedback
|
|
16
|
-
* - Hit slop customization for small touch targets
|
|
17
|
-
* - Minimum 48x48 touch target (iOS HIG compliance)
|
|
18
|
-
* - Full accessibility support
|
|
19
|
-
* - Theme-aware ripple colors
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```tsx
|
|
23
|
-
* // Basic usage with opacity feedback
|
|
24
|
-
* <AtomicTouchable onPress={handlePress}>
|
|
25
|
-
* <AtomicText>Press Me</AtomicText>
|
|
26
|
-
* </AtomicTouchable>
|
|
27
|
-
*
|
|
28
|
-
* // With custom hit slop (extends touch area)
|
|
29
|
-
* <AtomicTouchable
|
|
30
|
-
* onPress={handlePress}
|
|
31
|
-
* hitSlop={8}
|
|
32
|
-
* feedback="ripple"
|
|
33
|
-
* >
|
|
34
|
-
* <AtomicIcon name="X" size="sm" />
|
|
35
|
-
* </AtomicTouchable>
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
export const AtomicTouchable = ({ children, onPress, onPressIn, onPressOut, onLongPress, feedback = 'opacity', strength = 'normal', disabled = false, hitSlop, style, pressedStyle, disabledStyle, accessibilityLabel, accessibilityHint, accessibilityRole = 'button', testID, delayLongPress = 500, rippleColor, rippleRadius = 0, }) => {
|
|
39
|
-
const tokens = useAppDesignTokens();
|
|
40
|
-
// Determine if touchable should be disabled
|
|
41
|
-
const isDisabled = disabled;
|
|
42
|
-
// Get opacity value based on strength
|
|
43
|
-
const opacityValue = getOpacityValue(strength);
|
|
44
|
-
// Normalize hit slop
|
|
45
|
-
const normalizedHitSlop = normalizeHitSlop(hitSlop);
|
|
46
|
-
// Default ripple color (theme primary with alpha)
|
|
47
|
-
const defaultRippleColor = tokens.colors.primary + '40'; // 40 = 25% opacity in hex
|
|
48
|
-
/**
|
|
49
|
-
* Get style based on pressed state
|
|
50
|
-
*/
|
|
51
|
-
const getPressedStyle = ({ pressed }) => {
|
|
52
|
-
const baseStyle = [
|
|
53
|
-
getTouchableContainerStyle(),
|
|
54
|
-
style,
|
|
55
|
-
];
|
|
56
|
-
if (isDisabled) {
|
|
57
|
-
return [...baseStyle, getDisabledStyle(), disabledStyle];
|
|
58
|
-
}
|
|
59
|
-
if (pressed) {
|
|
60
|
-
// Apply feedback based on variant
|
|
61
|
-
switch (feedback) {
|
|
62
|
-
case 'opacity':
|
|
63
|
-
return [...baseStyle, { opacity: opacityValue }, pressedStyle];
|
|
64
|
-
case 'highlight':
|
|
65
|
-
return [
|
|
66
|
-
...baseStyle,
|
|
67
|
-
{ backgroundColor: tokens.colors.surfaceVariant },
|
|
68
|
-
pressedStyle,
|
|
69
|
-
];
|
|
70
|
-
case 'none':
|
|
71
|
-
return [...baseStyle, pressedStyle];
|
|
72
|
-
case 'ripple':
|
|
73
|
-
// Ripple is handled by android_ripple prop
|
|
74
|
-
return [...baseStyle, pressedStyle];
|
|
75
|
-
default:
|
|
76
|
-
return [...baseStyle, pressedStyle];
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return baseStyle;
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* Android ripple configuration
|
|
83
|
-
* Used when feedback='ripple'
|
|
84
|
-
* Pressable automatically ignores this prop on iOS/Web
|
|
85
|
-
*/
|
|
86
|
-
const androidRippleConfig = feedback === 'ripple'
|
|
87
|
-
? {
|
|
88
|
-
color: rippleColor || defaultRippleColor,
|
|
89
|
-
borderless: false,
|
|
90
|
-
radius: rippleRadius,
|
|
91
|
-
}
|
|
92
|
-
: undefined;
|
|
93
|
-
return (<Pressable onPress={isDisabled ? undefined : onPress} onPressIn={isDisabled ? undefined : onPressIn} onPressOut={isDisabled ? undefined : onPressOut} onLongPress={isDisabled ? undefined : onLongPress} delayLongPress={delayLongPress} disabled={isDisabled} hitSlop={normalizedHitSlop} style={getPressedStyle} android_ripple={androidRippleConfig} accessibilityLabel={accessibilityLabel} accessibilityHint={accessibilityHint} accessibilityRole={accessibilityRole} accessibilityState={{
|
|
94
|
-
disabled: isDisabled,
|
|
95
|
-
}} testID={testID}>
|
|
96
|
-
{children}
|
|
97
|
-
</Pressable>);
|
|
98
|
-
};
|
|
99
|
-
/**
|
|
100
|
-
* Preset touchable configurations for common use cases
|
|
101
|
-
*/
|
|
102
|
-
export const TouchablePresets = {
|
|
103
|
-
/**
|
|
104
|
-
* iOS-style opacity feedback (default)
|
|
105
|
-
*/
|
|
106
|
-
ios: {
|
|
107
|
-
feedback: 'opacity',
|
|
108
|
-
strength: 'normal',
|
|
109
|
-
},
|
|
110
|
-
/**
|
|
111
|
-
* Android-style ripple feedback
|
|
112
|
-
*/
|
|
113
|
-
android: {
|
|
114
|
-
feedback: 'ripple',
|
|
115
|
-
strength: 'normal',
|
|
116
|
-
},
|
|
117
|
-
/**
|
|
118
|
-
* Subtle feedback for secondary actions
|
|
119
|
-
*/
|
|
120
|
-
subtle: {
|
|
121
|
-
feedback: 'opacity',
|
|
122
|
-
strength: 'subtle',
|
|
123
|
-
},
|
|
124
|
-
/**
|
|
125
|
-
* Strong feedback for primary actions
|
|
126
|
-
*/
|
|
127
|
-
strong: {
|
|
128
|
-
feedback: 'opacity',
|
|
129
|
-
strength: 'strong',
|
|
130
|
-
},
|
|
131
|
-
/**
|
|
132
|
-
* No visual feedback (use sparingly)
|
|
133
|
-
*/
|
|
134
|
-
none: {
|
|
135
|
-
feedback: 'none',
|
|
136
|
-
},
|
|
137
|
-
};
|
|
138
|
-
//# sourceMappingURL=AtomicTouchable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AtomicTouchable.js","sourceRoot":"","sources":["../../../src/presentation/atoms/AtomicTouchable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,oCAAoC,CAAC;AAS5C,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,oCAAoC,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAC9D,QAAQ,EACR,OAAO,EACP,SAAS,EACT,UAAU,EACV,WAAW,EACX,QAAQ,GAAG,SAAS,EACpB,QAAQ,GAAG,QAAQ,EACnB,QAAQ,GAAG,KAAK,EAChB,OAAO,EACP,KAAK,EACL,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,GAAG,QAAQ,EAC5B,MAAM,EACN,cAAc,GAAG,GAAG,EACpB,WAAW,EACX,YAAY,GAAG,CAAC,GACjB,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,kBAAkB,EAAE,CAAC;IAEpC,4CAA4C;IAC5C,MAAM,UAAU,GAAG,QAAQ,CAAC;IAE5B,sCAAsC;IACtC,MAAM,YAAY,GAAG,eAAe,CAAC,QAA0C,CAAC,CAAC;IAEjF,qBAAqB;IACrB,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAEpD,kDAAkD;IAClD,MAAM,kBAAkB,GAAG,MA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C"}
|
|
@@ -1,23 +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
|
-
* Material Design 3 FAB size configurations
|
|
6
|
-
*/
|
|
7
|
-
export declare const FAB_SIZES: Record<FabSize, FabSizeConfig>;
|
|
8
|
-
/**
|
|
9
|
-
* Get FAB variant styles based on design tokens
|
|
10
|
-
* Note: Icon colors are handled via customColor in AtomicIcon
|
|
11
|
-
*/
|
|
12
|
-
export declare const getFabVariants: (tokens: DesignTokens) => Record<FabVariant, FabVariantConfig>;
|
|
13
|
-
/**
|
|
14
|
-
* Get icon size based on FAB size
|
|
15
|
-
* Returns AtomicIconSize type ('sm', 'md', 'lg')
|
|
16
|
-
*/
|
|
17
|
-
export declare const getFabIconSize: (size: FabSize) => "sm" | "md" | "lg";
|
|
18
|
-
/**
|
|
19
|
-
* Get FAB border for depth (shadows removed per CLAUDE.md)
|
|
20
|
-
* Subtle border provides visual elevation without shadow issues
|
|
21
|
-
*/
|
|
22
|
-
export declare const getFabBorder: (tokens: DesignTokens) => ViewStyle;
|
|
23
|
-
//# sourceMappingURL=fabStyles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fabStyles.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/atoms/fab/styles/fabStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,OAAO,EAAE,aAAa,CAgBpD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,YAAY,KAAG,MAAM,CAAC,UAAU,EAAE,gBAAgB,CAavF,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,OAAO,KAAG,IAAI,GAAG,IAAI,GAAG,IAW5D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,YAAY,KAAG,SAGlD,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Material Design 3 FAB size configurations
|
|
3
|
-
*/
|
|
4
|
-
export const FAB_SIZES = {
|
|
5
|
-
sm: {
|
|
6
|
-
width: 40,
|
|
7
|
-
height: 40,
|
|
8
|
-
borderRadius: 20, // Perfect circle
|
|
9
|
-
},
|
|
10
|
-
md: {
|
|
11
|
-
width: 56,
|
|
12
|
-
height: 56,
|
|
13
|
-
borderRadius: 28, // Perfect circle (Material Design 3 standard)
|
|
14
|
-
},
|
|
15
|
-
lg: {
|
|
16
|
-
width: 72,
|
|
17
|
-
height: 72,
|
|
18
|
-
borderRadius: 36, // Perfect circle
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Get FAB variant styles based on design tokens
|
|
23
|
-
* Note: Icon colors are handled via customColor in AtomicIcon
|
|
24
|
-
*/
|
|
25
|
-
export const getFabVariants = (tokens) => ({
|
|
26
|
-
primary: {
|
|
27
|
-
backgroundColor: tokens.colors.primary,
|
|
28
|
-
iconColor: tokens.colors.onPrimary,
|
|
29
|
-
},
|
|
30
|
-
secondary: {
|
|
31
|
-
backgroundColor: tokens.colors.secondary,
|
|
32
|
-
iconColor: tokens.colors.onSecondary,
|
|
33
|
-
},
|
|
34
|
-
surface: {
|
|
35
|
-
backgroundColor: tokens.colors.surface,
|
|
36
|
-
iconColor: tokens.colors.onSurface,
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
/**
|
|
40
|
-
* Get icon size based on FAB size
|
|
41
|
-
* Returns AtomicIconSize type ('sm', 'md', 'lg')
|
|
42
|
-
*/
|
|
43
|
-
export const getFabIconSize = (size) => {
|
|
44
|
-
switch (size) {
|
|
45
|
-
case 'sm':
|
|
46
|
-
return 'sm';
|
|
47
|
-
case 'md':
|
|
48
|
-
return 'md';
|
|
49
|
-
case 'lg':
|
|
50
|
-
return 'lg';
|
|
51
|
-
default:
|
|
52
|
-
return 'md';
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* Get FAB border for depth (shadows removed per CLAUDE.md)
|
|
57
|
-
* Subtle border provides visual elevation without shadow issues
|
|
58
|
-
*/
|
|
59
|
-
export const getFabBorder = (tokens) => ({
|
|
60
|
-
borderWidth: 1,
|
|
61
|
-
borderColor: tokens.colors.outline,
|
|
62
|
-
});
|
|
63
|
-
//# sourceMappingURL=fabStyles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fabStyles.js","sourceRoot":"","sources":["../../../../../src/presentation/atoms/fab/styles/fabStyles.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAmC;IACvD,EAAE,EAAE;QACF,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,EAAE,EAAE,iBAAiB;KACpC;IACD,EAAE,EAAE;QACF,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,EAAE,EAAE,8CAA8C;KACjE;IACD,EAAE,EAAE;QACF,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,EAAE,EAAE,iBAAiB;KACpC;CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAoB,EAAwC,EAAE,CAAC,CAAC;IAC7F,OAAO,EAAE;QACP,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO;QACtC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS;KACnC;IACD,SAAS,EAAE;QACT,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS;QACxC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,WAAW;KACrC;IACD,OAAO,EAAE;QACP,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO;QACtC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS;KACnC;CACF,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAa,EAAsB,EAAE;IAClE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,IAAI;YACP,OAAO,IAAI,CAAC;QACd,KAAK,IAAI;YACP,OAAO,IAAI,CAAC;QACd,KAAK,IAAI;YACP,OAAO,IAAI,CAAC;QACd;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAoB,EAAa,EAAE,CAAC,CAAC;IAChE,WAAW,EAAE,CAAC;IACd,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO;CACnC,CAAC,CAAC"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
-
/**
|
|
3
|
-
* FAB (Floating Action Button) size variants
|
|
4
|
-
* Based on Material Design 3 standards
|
|
5
|
-
*/
|
|
6
|
-
export type FabSize = 'sm' | 'md' | 'lg';
|
|
7
|
-
/**
|
|
8
|
-
* FAB variant types
|
|
9
|
-
* - primary: Main action (uses primary color)
|
|
10
|
-
* - secondary: Secondary action (uses secondary color)
|
|
11
|
-
* - surface: Neutral action (uses surface color with border)
|
|
12
|
-
*/
|
|
13
|
-
export type FabVariant = 'primary' | 'secondary' | 'surface';
|
|
14
|
-
/**
|
|
15
|
-
* FAB configuration for variant styling
|
|
16
|
-
*/
|
|
17
|
-
export interface FabVariantConfig {
|
|
18
|
-
backgroundColor: string;
|
|
19
|
-
iconColor: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* FAB configuration for size styling
|
|
23
|
-
*/
|
|
24
|
-
export interface FabSizeConfig {
|
|
25
|
-
width: number;
|
|
26
|
-
height: number;
|
|
27
|
-
borderRadius: number;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* AtomicFab component props
|
|
31
|
-
*/
|
|
32
|
-
export interface AtomicFabProps {
|
|
33
|
-
/**
|
|
34
|
-
* Icon name to display (required)
|
|
35
|
-
* Any MaterialIcons name (see https://fonts.google.com/icons)
|
|
36
|
-
* Examples: 'add', 'edit', 'camera', etc.
|
|
37
|
-
*/
|
|
38
|
-
icon: string;
|
|
39
|
-
/**
|
|
40
|
-
* Callback when FAB is pressed
|
|
41
|
-
*/
|
|
42
|
-
onPress: () => void;
|
|
43
|
-
/**
|
|
44
|
-
* Visual variant of the FAB
|
|
45
|
-
* @default 'primary'
|
|
46
|
-
*/
|
|
47
|
-
variant?: FabVariant;
|
|
48
|
-
/**
|
|
49
|
-
* Size of the FAB
|
|
50
|
-
* @default 'md'
|
|
51
|
-
*/
|
|
52
|
-
size?: FabSize;
|
|
53
|
-
/**
|
|
54
|
-
* Whether the FAB is disabled
|
|
55
|
-
* @default false
|
|
56
|
-
*/
|
|
57
|
-
disabled?: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Custom style for the FAB container
|
|
60
|
-
*/
|
|
61
|
-
style?: StyleProp<ViewStyle>;
|
|
62
|
-
/**
|
|
63
|
-
* Test ID for testing
|
|
64
|
-
*/
|
|
65
|
-
testID?: string;
|
|
66
|
-
/**
|
|
67
|
-
* Accessibility label
|
|
68
|
-
*/
|
|
69
|
-
accessibilityLabel?: string;
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/atoms/fab/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;;OAGG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC;IAErB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/presentation/atoms/fab/types/index.ts"],"names":[],"mappings":""}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ViewStyle } from 'react-native';
|
|
2
|
-
/**
|
|
3
|
-
* Filter container styles
|
|
4
|
-
* Horizontal scrollable filter chip list
|
|
5
|
-
*/
|
|
6
|
-
export declare const getFilterContainerStyle: () => ViewStyle;
|
|
7
|
-
/**
|
|
8
|
-
* Clear all button container styles
|
|
9
|
-
*/
|
|
10
|
-
export declare const getClearAllContainerStyle: () => ViewStyle;
|
|
11
|
-
/**
|
|
12
|
-
* ScrollView content container style
|
|
13
|
-
*/
|
|
14
|
-
export declare const getScrollContentContainerStyle: () => ViewStyle;
|
|
15
|
-
//# sourceMappingURL=filterStyles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterStyles.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/atoms/filter/styles/filterStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;;GAGG;AACH,eAAO,MAAM,uBAAuB,QAAO,SAKzC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB,QAAO,SAO3C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,8BAA8B,QAAO,SAGhD,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Filter container styles
|
|
3
|
-
* Horizontal scrollable filter chip list
|
|
4
|
-
*/
|
|
5
|
-
export const getFilterContainerStyle = () => ({
|
|
6
|
-
flexDirection: 'row',
|
|
7
|
-
paddingHorizontal: 16,
|
|
8
|
-
paddingVertical: 12,
|
|
9
|
-
gap: 8, // Space between chips
|
|
10
|
-
});
|
|
11
|
-
/**
|
|
12
|
-
* Clear all button container styles
|
|
13
|
-
*/
|
|
14
|
-
export const getClearAllContainerStyle = () => ({
|
|
15
|
-
marginLeft: 8,
|
|
16
|
-
paddingHorizontal: 12,
|
|
17
|
-
paddingVertical: 6,
|
|
18
|
-
borderRadius: 16,
|
|
19
|
-
justifyContent: 'center',
|
|
20
|
-
alignItems: 'center',
|
|
21
|
-
});
|
|
22
|
-
/**
|
|
23
|
-
* ScrollView content container style
|
|
24
|
-
*/
|
|
25
|
-
export const getScrollContentContainerStyle = () => ({
|
|
26
|
-
alignItems: 'center',
|
|
27
|
-
gap: 8,
|
|
28
|
-
});
|
|
29
|
-
//# sourceMappingURL=filterStyles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterStyles.js","sourceRoot":"","sources":["../../../../../src/presentation/atoms/filter/styles/filterStyles.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAc,EAAE,CAAC,CAAC;IACvD,aAAa,EAAE,KAAK;IACpB,iBAAiB,EAAE,EAAE;IACrB,eAAe,EAAE,EAAE;IACnB,GAAG,EAAE,CAAC,EAAE,sBAAsB;CAC/B,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAc,EAAE,CAAC,CAAC;IACzD,UAAU,EAAE,CAAC;IACb,iBAAiB,EAAE,EAAE;IACrB,eAAe,EAAE,CAAC;IAClB,YAAY,EAAE,EAAE;IAChB,cAAc,EAAE,QAAQ;IACxB,UAAU,EAAE,QAAQ;CACrB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAc,EAAE,CAAC,CAAC;IAC9D,UAAU,EAAE,QAAQ;IACpB,GAAG,EAAE,CAAC;CACP,CAAC,CAAC"}
|