@umituz/react-native-design-system 2.3.10 → 2.3.12
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/package.json +1 -1
- package/src/atoms/AtomicAvatar.tsx +1 -1
- package/src/atoms/AtomicBadge.tsx +1 -1
- package/src/atoms/AtomicButton.tsx +1 -1
- package/src/atoms/AtomicCard.tsx +1 -1
- package/src/atoms/AtomicChip.tsx +1 -1
- package/src/atoms/AtomicDatePicker.tsx +1 -1
- package/src/atoms/AtomicFab.tsx +2 -2
- package/src/atoms/AtomicIcon.tsx +1 -1
- package/src/atoms/AtomicInput.tsx +1 -1
- package/src/atoms/AtomicPicker.tsx +1 -1
- package/src/atoms/AtomicProgress.tsx +1 -1
- package/src/atoms/AtomicText.tsx +3 -3
- package/src/atoms/datepicker/components/DatePickerButton.tsx +1 -1
- package/src/atoms/datepicker/components/DatePickerModal.tsx +1 -1
- package/src/atoms/input/styles/inputStylesHelper.ts +1 -1
- package/src/atoms/picker/components/PickerChips.tsx +1 -1
- package/src/atoms/picker/components/PickerModal.tsx +1 -1
- package/src/atoms/picker/styles/pickerStyles.ts +1 -1
- package/src/atoms/skeleton/AtomicSkeleton.tsx +1 -1
- package/src/device/detection/deviceDetection.ts +2 -2
- package/src/device/detection/iPadDetection.ts +1 -1
- package/src/device/detection/iPadLayoutUtils.ts +1 -1
- package/src/index.ts +45 -9
- package/src/{organisms → layouts/AppHeader}/AppHeader.tsx +2 -2
- package/src/layouts/AppHeader/index.ts +1 -0
- package/src/{molecules → layouts}/Container/Container.tsx +2 -2
- package/src/{organisms → layouts}/FormLayout/FormLayout.tsx +2 -2
- package/src/{molecules → layouts}/Grid/Grid.tsx +2 -2
- package/src/{molecules → layouts/ScreenHeader}/ScreenHeader.tsx +2 -2
- package/src/layouts/ScreenHeader/index.ts +1 -0
- package/src/{organisms → layouts/ScreenLayout}/ScreenLayout.tsx +3 -5
- package/src/layouts/ScreenLayout/index.ts +1 -0
- package/src/layouts/index.ts +6 -0
- package/src/molecules/BaseModal.tsx +2 -2
- package/src/molecules/ConfirmationModalContent.tsx +1 -1
- package/src/molecules/ConfirmationModalMain.tsx +1 -1
- package/src/molecules/Divider/Divider.tsx +2 -2
- package/src/molecules/FormField.tsx +2 -2
- package/src/molecules/IconContainer.tsx +1 -1
- package/src/molecules/List/List.tsx +1 -1
- package/src/molecules/ListItem.tsx +2 -2
- package/src/molecules/SearchBar/SearchBar.tsx +2 -2
- package/src/molecules/SearchBar/SearchHistory.tsx +3 -3
- package/src/molecules/SearchBar/SearchSuggestions.tsx +2 -2
- package/src/molecules/StepProgress/StepProgress.tsx +1 -1
- package/src/molecules/alerts/AlertBanner.tsx +2 -2
- package/src/molecules/alerts/AlertContainer.tsx +1 -1
- package/src/molecules/alerts/AlertInline.tsx +2 -2
- package/src/molecules/alerts/AlertModal.tsx +2 -2
- package/src/molecules/alerts/AlertToast.tsx +2 -2
- package/src/molecules/avatar/Avatar.tsx +2 -2
- package/src/molecules/avatar/AvatarGroup.tsx +2 -2
- package/src/molecules/bottom-sheet/components/BottomSheet.tsx +1 -1
- package/src/molecules/bottom-sheet/components/BottomSheetModal.tsx +1 -1
- package/src/molecules/bottom-sheet/components/filter/FilterBottomSheet.tsx +2 -2
- package/src/molecules/bottom-sheet/components/filter/FilterSheet.tsx +2 -2
- package/src/molecules/bottom-sheet/components/filter/FilterSheetComponents/FilterSheetHeader.tsx +2 -2
- package/src/molecules/bottom-sheet/components/filter/FilterSheetComponents/FilterSheetOption.tsx +2 -2
- package/src/molecules/confirmation-modal/components.tsx +2 -2
- package/src/molecules/confirmation-modal/styles/confirmationModalStyles.ts +1 -1
- package/src/molecules/index.ts +0 -3
- package/src/molecules/listitem/styles/listItemStyles.ts +1 -1
- package/src/organisms/FormContainer.tsx +2 -2
- package/src/organisms/index.ts +1 -13
- package/src/responsive/gridUtils.ts +1 -1
- package/src/responsive/responsiveLayout.ts +1 -1
- package/src/responsive/responsiveModal.ts +1 -1
- package/src/responsive/responsiveSizing.ts +1 -1
- package/src/responsive/useResponsive.ts +1 -1
- package/src/theme/hooks/useResponsiveDesignTokens.ts +1 -1
- package/src/typography/presentation/utils/textColorUtils.ts +1 -1
- package/src/typography/presentation/utils/textStyleUtils.ts +1 -1
- /package/src/{molecules → layouts}/Container/index.ts +0 -0
- /package/src/{organisms → layouts}/FormLayout/index.ts +0 -0
- /package/src/{molecules → layouts}/Grid/index.ts +0 -0
- /package/src/{organisms → layouts/ScreenLayout}/ScreenLayout.example.tsx +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-design-system",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.12",
|
|
4
4
|
"description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive and safe area utilities",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { View, Image, StyleSheet, ViewStyle, ImageStyle, ImageSourcePropType } from 'react-native';
|
|
19
19
|
import { AtomicText } from './AtomicText';
|
|
20
|
-
import { useAppDesignTokens } from '
|
|
20
|
+
import { useAppDesignTokens } from '@theme';
|
|
21
21
|
|
|
22
22
|
// =============================================================================
|
|
23
23
|
// TYPE DEFINITIONS
|
|
@@ -7,7 +7,7 @@ import React from "react";
|
|
|
7
7
|
import { View, StyleSheet, type StyleProp, type ViewStyle, type TextStyle } from "react-native";
|
|
8
8
|
import { AtomicText } from "./AtomicText";
|
|
9
9
|
import { AtomicIcon, type IconName } from "./AtomicIcon";
|
|
10
|
-
import { useAppDesignTokens } from
|
|
10
|
+
import { useAppDesignTokens } from '@theme';
|
|
11
11
|
|
|
12
12
|
export type BadgeVariant = "primary" | "secondary" | "success" | "warning" | "error" | "info";
|
|
13
13
|
export type BadgeSize = "sm" | "md" | "lg";
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { StyleSheet, StyleProp, ViewStyle, TextStyle, TouchableOpacity, View } from 'react-native';
|
|
3
3
|
import { AtomicText } from './AtomicText';
|
|
4
4
|
import { AtomicIcon } from './AtomicIcon';
|
|
5
|
-
import { useAppDesignTokens } from '
|
|
5
|
+
import { useAppDesignTokens } from '@theme';
|
|
6
6
|
import type { IconName } from './AtomicIcon';
|
|
7
7
|
|
|
8
8
|
export type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'text' | 'danger';
|
package/src/atoms/AtomicCard.tsx
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { View, StyleSheet, type ViewStyle, type StyleProp } from 'react-native';
|
|
9
|
-
import { useAppDesignTokens } from '
|
|
9
|
+
import { useAppDesignTokens } from '@theme';
|
|
10
10
|
|
|
11
11
|
export type AtomicCardVariant = 'elevated' | 'outlined' | 'filled';
|
|
12
12
|
export type AtomicCardPadding = 'none' | 'sm' | 'md' | 'lg';
|
package/src/atoms/AtomicChip.tsx
CHANGED
|
@@ -19,7 +19,7 @@ import React from 'react';
|
|
|
19
19
|
import { View, ViewStyle, TouchableOpacity } from 'react-native';
|
|
20
20
|
import { AtomicText } from './AtomicText';
|
|
21
21
|
import { AtomicIcon } from './AtomicIcon';
|
|
22
|
-
import { useAppDesignTokens } from '
|
|
22
|
+
import { useAppDesignTokens } from '@theme';
|
|
23
23
|
|
|
24
24
|
// =============================================================================
|
|
25
25
|
// TYPE DEFINITIONS
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
type ViewStyle,
|
|
47
47
|
} from 'react-native';
|
|
48
48
|
import DateTimePicker, { DateTimePickerEvent } from '@react-native-community/datetimepicker';
|
|
49
|
-
import { useAppDesignTokens } from '
|
|
49
|
+
import { useAppDesignTokens } from '@theme';
|
|
50
50
|
import { AtomicText } from './AtomicText';
|
|
51
51
|
import { DatePickerModal } from './datepicker/components/DatePickerModal';
|
|
52
52
|
import { DatePickerButton } from './datepicker/components/DatePickerButton';
|
package/src/atoms/AtomicFab.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
|
-
import { useAppDesignTokens } from '
|
|
4
|
-
import { useResponsive } from '
|
|
3
|
+
import { useAppDesignTokens } from '@theme';
|
|
4
|
+
import { useResponsive } from '@responsive';
|
|
5
5
|
import { AtomicIcon } from './AtomicIcon';
|
|
6
6
|
import { AtomicFabProps } from './fab/types';
|
|
7
7
|
import {
|
package/src/atoms/AtomicIcon.tsx
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
import { View, StyleSheet, StyleProp, ViewStyle } from "react-native";
|
|
10
10
|
import { Ionicons } from "@expo/vector-icons";
|
|
11
|
-
import { useAppDesignTokens } from '
|
|
11
|
+
import { useAppDesignTokens } from '@theme';
|
|
12
12
|
import {
|
|
13
13
|
getIconSize,
|
|
14
14
|
type IconSize as BaseIconSize
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, TextInput, Pressable, StyleSheet, StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
3
|
-
import { useAppDesignTokens } from '
|
|
3
|
+
import { useAppDesignTokens } from '@theme';
|
|
4
4
|
import { AtomicIcon } from './AtomicIcon';
|
|
5
5
|
import { AtomicText } from './AtomicText';
|
|
6
6
|
import { useInputState } from './input/hooks/useInputState';
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
TouchableOpacity,
|
|
47
47
|
StyleSheet,
|
|
48
48
|
} from 'react-native';
|
|
49
|
-
import { useAppDesignTokens } from '
|
|
49
|
+
import { useAppDesignTokens } from '@theme';
|
|
50
50
|
import { AtomicPickerProps } from './picker/types';
|
|
51
51
|
import { AtomicIcon } from './AtomicIcon';
|
|
52
52
|
import { AtomicText } from './AtomicText';
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { View, StyleSheet, ViewStyle, DimensionValue, Text } from 'react-native';
|
|
19
|
-
import { useAppDesignTokens } from '
|
|
19
|
+
import { useAppDesignTokens } from '@theme';
|
|
20
20
|
|
|
21
21
|
// =============================================================================
|
|
22
22
|
// TYPE DEFINITIONS
|
package/src/atoms/AtomicText.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Text, StyleProp, TextStyle } from 'react-native';
|
|
3
|
-
import { useAppDesignTokens, useResponsiveDesignTokens } from '
|
|
4
|
-
import type { TextStyleVariant, ColorVariant } from '
|
|
5
|
-
import { getTextColor } from '
|
|
3
|
+
import { useAppDesignTokens, useResponsiveDesignTokens } from '@theme';
|
|
4
|
+
import type { TextStyleVariant, ColorVariant } from '@typography';
|
|
5
|
+
import { getTextColor } from '@typography';
|
|
6
6
|
|
|
7
7
|
export interface AtomicTextProps {
|
|
8
8
|
children: React.ReactNode;
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
TouchableOpacity,
|
|
12
12
|
StyleSheet,
|
|
13
13
|
} from 'react-native';
|
|
14
|
-
import { useAppDesignTokens } from '
|
|
14
|
+
import { useAppDesignTokens } from '@theme';
|
|
15
15
|
import { AtomicIcon } from '../../AtomicIcon';
|
|
16
16
|
import { AtomicText } from '../../AtomicText';
|
|
17
17
|
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from 'react-native';
|
|
16
16
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
17
17
|
import DateTimePicker, { DateTimePickerEvent } from '@react-native-community/datetimepicker';
|
|
18
|
-
import { useAppDesignTokens } from '
|
|
18
|
+
import { useAppDesignTokens } from '@theme';
|
|
19
19
|
import { AtomicText } from '../../AtomicText';
|
|
20
20
|
|
|
21
21
|
interface DatePickerModalProps {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { ViewStyle } from 'react-native';
|
|
9
|
-
import { useAppDesignTokens } from '
|
|
9
|
+
import { useAppDesignTokens } from '@theme';
|
|
10
10
|
import type { AtomicInputVariant, AtomicInputSize } from '../../AtomicInput';
|
|
11
11
|
|
|
12
12
|
interface GetVariantStyleParams {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { View, TouchableOpacity } from 'react-native';
|
|
10
|
-
import { useAppDesignTokens } from '
|
|
10
|
+
import { useAppDesignTokens } from '@theme';
|
|
11
11
|
import { PickerOption } from '../types';
|
|
12
12
|
import { AtomicIcon } from '../../AtomicIcon';
|
|
13
13
|
import { AtomicText } from '../../AtomicText';
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
TouchableOpacity,
|
|
21
21
|
} from 'react-native';
|
|
22
22
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
23
|
-
import { useAppDesignTokens } from '
|
|
23
|
+
import { useAppDesignTokens } from '@theme';
|
|
24
24
|
import { PickerOption } from '../types';
|
|
25
25
|
import { AtomicIcon } from '../../AtomicIcon';
|
|
26
26
|
import { AtomicText } from '../../AtomicText';
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
import React, { useEffect, useRef } from 'react';
|
|
26
26
|
import { View, StyleSheet, Animated, type StyleProp, type ViewStyle } from 'react-native';
|
|
27
|
-
import { useAppDesignTokens } from '
|
|
27
|
+
import { useAppDesignTokens } from '@theme';
|
|
28
28
|
import type { SkeletonPattern, SkeletonConfig } from './AtomicSkeleton.types';
|
|
29
29
|
import { SKELETON_PATTERNS } from './AtomicSkeleton.types';
|
|
30
30
|
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { Dimensions } from 'react-native';
|
|
9
|
-
import { DEVICE_BREAKPOINTS, LAYOUT_CONSTANTS } from '
|
|
10
|
-
import { validateScreenDimensions } from '
|
|
9
|
+
import { DEVICE_BREAKPOINTS, LAYOUT_CONSTANTS } from '@responsive/config';
|
|
10
|
+
import { validateScreenDimensions } from '@responsive/validation';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Helper function for device detection with fallback
|
package/src/index.ts
CHANGED
|
@@ -226,6 +226,25 @@ export {
|
|
|
226
226
|
type BadgeSize,
|
|
227
227
|
} from './atoms';
|
|
228
228
|
|
|
229
|
+
// =============================================================================
|
|
230
|
+
// LAYOUTS EXPORTS
|
|
231
|
+
// =============================================================================
|
|
232
|
+
|
|
233
|
+
export {
|
|
234
|
+
ScreenLayout,
|
|
235
|
+
AppHeader,
|
|
236
|
+
ScreenHeader,
|
|
237
|
+
Grid,
|
|
238
|
+
Container,
|
|
239
|
+
FormLayout,
|
|
240
|
+
type ScreenLayoutProps,
|
|
241
|
+
type AppHeaderProps,
|
|
242
|
+
type ScreenHeaderProps,
|
|
243
|
+
type GridProps,
|
|
244
|
+
type ContainerProps,
|
|
245
|
+
type FormLayoutProps,
|
|
246
|
+
} from './layouts';
|
|
247
|
+
|
|
229
248
|
// =============================================================================
|
|
230
249
|
// MOLECULES EXPORTS
|
|
231
250
|
// =============================================================================
|
|
@@ -235,14 +254,36 @@ export {
|
|
|
235
254
|
ListItem,
|
|
236
255
|
SearchBar,
|
|
237
256
|
IconContainer,
|
|
238
|
-
ScreenHeader,
|
|
239
257
|
BaseModal,
|
|
240
258
|
ConfirmationModal,
|
|
241
259
|
useConfirmationModal,
|
|
242
260
|
StepProgress,
|
|
243
|
-
Grid,
|
|
244
261
|
List,
|
|
245
|
-
|
|
262
|
+
Avatar,
|
|
263
|
+
AvatarGroup,
|
|
264
|
+
AvatarUtils,
|
|
265
|
+
type AvatarProps,
|
|
266
|
+
type AvatarGroupProps,
|
|
267
|
+
type AvatarGroupItem,
|
|
268
|
+
type AvatarSize,
|
|
269
|
+
type AvatarShape,
|
|
270
|
+
type AvatarConfig,
|
|
271
|
+
type AvatarType,
|
|
272
|
+
// Bottom Sheet
|
|
273
|
+
BottomSheet,
|
|
274
|
+
BottomSheetModal,
|
|
275
|
+
SafeBottomSheetModalProvider,
|
|
276
|
+
FilterBottomSheet,
|
|
277
|
+
FilterSheet,
|
|
278
|
+
useBottomSheet,
|
|
279
|
+
useBottomSheetModal,
|
|
280
|
+
useListFilters,
|
|
281
|
+
type BottomSheetProps,
|
|
282
|
+
type BottomSheetModalProps,
|
|
283
|
+
type BottomSheetRef,
|
|
284
|
+
type BottomSheetModalRef,
|
|
285
|
+
type FilterOption,
|
|
286
|
+
type FilterCategory,
|
|
246
287
|
// Alerts
|
|
247
288
|
AlertBanner,
|
|
248
289
|
AlertToast,
|
|
@@ -256,9 +297,7 @@ export {
|
|
|
256
297
|
AlertMode,
|
|
257
298
|
AlertPosition,
|
|
258
299
|
type BaseModalProps,
|
|
259
|
-
type GridProps,
|
|
260
300
|
type ListProps,
|
|
261
|
-
type ContainerProps,
|
|
262
301
|
type Alert,
|
|
263
302
|
type AlertAction,
|
|
264
303
|
type AlertOptions,
|
|
@@ -269,11 +308,8 @@ export {
|
|
|
269
308
|
// =============================================================================
|
|
270
309
|
|
|
271
310
|
export {
|
|
272
|
-
ScreenLayout,
|
|
273
|
-
AppHeader,
|
|
274
311
|
FormContainer,
|
|
275
|
-
|
|
276
|
-
type FormLayoutProps,
|
|
312
|
+
type FormContainerProps,
|
|
277
313
|
} from './organisms';
|
|
278
314
|
|
|
279
315
|
// =============================================================================
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { View, type ViewStyle } from 'react-native';
|
|
13
13
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
14
|
-
import { useAppDesignTokens } from '
|
|
15
|
-
import { AtomicText, AtomicButton, type IconName } from '
|
|
14
|
+
import { useAppDesignTokens } from '@theme';
|
|
15
|
+
import { AtomicText, AtomicButton, type IconName } from '@atoms';
|
|
16
16
|
|
|
17
17
|
// =============================================================================
|
|
18
18
|
// TYPE DEFINITIONS
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AppHeader';
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import React, { useMemo } from 'react';
|
|
9
9
|
import { View, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
|
|
10
|
-
import { useResponsive } from '
|
|
11
|
-
import { useResponsiveDesignTokens } from '
|
|
10
|
+
import { useResponsive } from '@responsive';
|
|
11
|
+
import { useResponsiveDesignTokens } from '@theme';
|
|
12
12
|
|
|
13
13
|
export interface ContainerProps {
|
|
14
14
|
/** Container content */
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import React, { useMemo } from 'react';
|
|
9
9
|
import { View, ScrollView, KeyboardAvoidingView, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
|
|
10
|
-
import { useResponsiveDesignTokens } from '
|
|
11
|
-
import { useResponsive } from '
|
|
10
|
+
import { useResponsiveDesignTokens } from '@theme';
|
|
11
|
+
import { useResponsive } from '@responsive';
|
|
12
12
|
|
|
13
13
|
export interface FormLayoutProps {
|
|
14
14
|
/** Form fields and content */
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import React, { useMemo } from 'react';
|
|
9
9
|
import { View, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
|
|
10
|
-
import { useResponsive } from '
|
|
11
|
-
import { useResponsiveDesignTokens } from '
|
|
10
|
+
import { useResponsive } from '@responsive';
|
|
11
|
+
import { useResponsiveDesignTokens } from '@theme';
|
|
12
12
|
|
|
13
13
|
export interface GridProps {
|
|
14
14
|
/** Grid items to render */
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
import React from 'react';
|
|
16
16
|
import { View, TouchableOpacity, ViewStyle } from 'react-native';
|
|
17
|
-
import { AtomicIcon, AtomicText } from '
|
|
18
|
-
import { useAppDesignTokens } from '
|
|
17
|
+
import { AtomicIcon, AtomicText } from '@atoms';
|
|
18
|
+
import { useAppDesignTokens } from '@theme';
|
|
19
19
|
|
|
20
20
|
export interface ScreenHeaderProps {
|
|
21
21
|
/** Screen title (centered) */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ScreenHeader';
|
|
@@ -27,10 +27,9 @@ import React, { useMemo } from 'react';
|
|
|
27
27
|
import { View, ScrollView, StyleSheet, type ViewStyle, RefreshControlProps } from 'react-native';
|
|
28
28
|
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
29
29
|
import type { Edge } from 'react-native-safe-area-context';
|
|
30
|
-
import { useAppDesignTokens } from '
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import { getResponsiveHorizontalPadding } from '../responsive/responsiveLayout';
|
|
30
|
+
import { useAppDesignTokens } from '@theme';
|
|
31
|
+
import { getResponsiveMaxWidth } from '@responsive/responsiveSizing';
|
|
32
|
+
import { getResponsiveHorizontalPadding } from '@responsive/responsiveLayout';
|
|
34
33
|
|
|
35
34
|
/**
|
|
36
35
|
* NOTE: This component now works in conjunction with the SafeAreaProvider
|
|
@@ -161,7 +160,6 @@ export const ScreenLayout: React.FC<ScreenLayoutProps> = ({
|
|
|
161
160
|
}) => {
|
|
162
161
|
// Automatically uses current theme from global store
|
|
163
162
|
const tokens = useAppDesignTokens();
|
|
164
|
-
const { isTabletDevice } = useResponsive();
|
|
165
163
|
const insets = useSafeAreaInsets();
|
|
166
164
|
|
|
167
165
|
const finalMaxWidth = maxWidth || (responsiveEnabled ? getResponsiveMaxWidth() : undefined);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ScreenLayout';
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { View, Modal, StyleSheet, TouchableOpacity, ViewStyle } from 'react-native';
|
|
9
|
-
import { useAppDesignTokens } from '
|
|
10
|
-
import { useResponsive } from '
|
|
9
|
+
import { useAppDesignTokens } from '@theme';
|
|
10
|
+
import { useResponsive } from '@responsive';
|
|
11
11
|
|
|
12
12
|
export interface BaseModalProps {
|
|
13
13
|
visible: boolean;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { View, ViewStyle, StyleProp } from 'react-native';
|
|
9
|
-
import { useAppDesignTokens } from '
|
|
9
|
+
import { useAppDesignTokens } from '@theme';
|
|
10
10
|
import { ConfirmationModalVariant } from './confirmation-modal/types/';
|
|
11
11
|
import {
|
|
12
12
|
getVariantConfig,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { View, Modal, TouchableOpacity } from 'react-native';
|
|
9
|
-
import { useAppDesignTokens } from '
|
|
9
|
+
import { useAppDesignTokens } from '@theme';
|
|
10
10
|
import { ConfirmationModalProps } from './confirmation-modal/types/';
|
|
11
11
|
import {
|
|
12
12
|
getModalOverlayStyle,
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { View, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
|
|
13
|
-
import { useAppDesignTokens } from '
|
|
14
|
-
import { AtomicText } from '
|
|
13
|
+
import { useAppDesignTokens } from '@theme/hooks/useAppDesignTokens';
|
|
14
|
+
import { AtomicText } from '@atoms/AtomicText';
|
|
15
15
|
import type { DividerOrientation, DividerStyle, DividerSpacing } from './types';
|
|
16
16
|
import {
|
|
17
17
|
DividerUtils,
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { View, ViewStyle } from 'react-native';
|
|
12
|
-
import { useAppDesignTokens } from '
|
|
13
|
-
import { AtomicText, AtomicInput, type AtomicInputProps } from '
|
|
12
|
+
import { useAppDesignTokens } from '@theme';
|
|
13
|
+
import { AtomicText, AtomicInput, type AtomicInputProps } from '@atoms';
|
|
14
14
|
|
|
15
15
|
// =============================================================================
|
|
16
16
|
// TYPE DEFINITIONS
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { FlatList, RefreshControl, type FlatListProps, type ListRenderItem } from 'react-native';
|
|
10
|
-
import { useResponsiveDesignTokens } from '
|
|
10
|
+
import { useResponsiveDesignTokens } from '@theme';
|
|
11
11
|
|
|
12
12
|
export interface ListProps<T> extends Omit<FlatListProps<T>, 'renderItem'> {
|
|
13
13
|
/** Data array */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TouchableOpacity, View } from 'react-native';
|
|
3
|
-
import { useAppDesignTokens } from '
|
|
4
|
-
import { AtomicText, AtomicIcon } from '
|
|
3
|
+
import { useAppDesignTokens } from '@theme';
|
|
4
|
+
import { AtomicText, AtomicIcon } from '@atoms';
|
|
5
5
|
import { ListItemProps } from './listitem/types';
|
|
6
6
|
import { getListItemStyles } from './listitem/styles/listItemStyles';
|
|
7
7
|
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
ActivityIndicator,
|
|
7
7
|
StyleSheet,
|
|
8
8
|
} from 'react-native';
|
|
9
|
-
import { useAppDesignTokens } from '
|
|
10
|
-
import { AtomicIcon } from '
|
|
9
|
+
import { useAppDesignTokens } from '@theme';
|
|
10
|
+
import { AtomicIcon } from '@atoms/AtomicIcon';
|
|
11
11
|
import type { SearchBarProps } from './types';
|
|
12
12
|
|
|
13
13
|
export const SearchBar = forwardRef<TextInput, SearchBarProps>(({
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
TouchableOpacity,
|
|
5
5
|
StyleSheet,
|
|
6
6
|
} from 'react-native';
|
|
7
|
-
import { AtomicText } from '
|
|
8
|
-
import { AtomicIcon } from '
|
|
9
|
-
import { useAppDesignTokens } from '
|
|
7
|
+
import { AtomicText } from '@atoms/AtomicText';
|
|
8
|
+
import { AtomicIcon } from '@atoms/AtomicIcon';
|
|
9
|
+
import { useAppDesignTokens } from '@theme';
|
|
10
10
|
import type { SearchHistoryProps } from './types';
|
|
11
11
|
|
|
12
12
|
export const SearchHistory: React.FC<SearchHistoryProps> = ({
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
TouchableOpacity,
|
|
5
5
|
StyleSheet,
|
|
6
6
|
} from 'react-native';
|
|
7
|
-
import { AtomicText } from '
|
|
8
|
-
import { useAppDesignTokens } from '
|
|
7
|
+
import { AtomicText } from '@atoms/AtomicText';
|
|
8
|
+
import { useAppDesignTokens } from '@theme';
|
|
9
9
|
import type { SearchSuggestionsProps } from './types';
|
|
10
10
|
|
|
11
11
|
export function SearchSuggestions<T>({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
2
|
import { View, StyleSheet, ViewStyle } from "react-native";
|
|
3
|
-
import { useAppDesignTokens } from
|
|
3
|
+
import { useAppDesignTokens } from '@theme/hooks/useAppDesignTokens';
|
|
4
4
|
|
|
5
5
|
export interface StepProgressProps {
|
|
6
6
|
currentStep: number;
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { StyleSheet, View, Pressable } from 'react-native';
|
|
10
10
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
11
|
-
import { AtomicText, AtomicIcon } from '
|
|
12
|
-
import { useAppDesignTokens } from '
|
|
11
|
+
import { AtomicText, AtomicIcon } from '@atoms';
|
|
12
|
+
import { useAppDesignTokens } from '@theme';
|
|
13
13
|
import { Alert, AlertType, AlertPosition } from './AlertTypes';
|
|
14
14
|
import { useAlertStore } from './AlertStore';
|
|
15
15
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { View, StyleSheet } from 'react-native';
|
|
7
7
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
8
|
-
import { useAppDesignTokens } from '
|
|
8
|
+
import { useAppDesignTokens } from '@theme';
|
|
9
9
|
import { useAlertStore } from './AlertStore';
|
|
10
10
|
import { AlertToast } from './AlertToast';
|
|
11
11
|
import { AlertBanner } from './AlertBanner';
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { StyleSheet, View } from 'react-native';
|
|
7
|
-
import { AtomicText } from '
|
|
8
|
-
import { useAppDesignTokens } from '
|
|
7
|
+
import { AtomicText } from '@atoms';
|
|
8
|
+
import { useAppDesignTokens } from '@theme';
|
|
9
9
|
import { Alert, AlertType } from './AlertTypes';
|
|
10
10
|
|
|
11
11
|
interface AlertInlineProps {
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { StyleSheet, View, Modal, Pressable } from 'react-native';
|
|
7
|
-
import { AtomicText, AtomicButton } from '
|
|
8
|
-
import { useAppDesignTokens } from '
|
|
7
|
+
import { AtomicText, AtomicButton } from '@atoms';
|
|
8
|
+
import { useAppDesignTokens } from '@theme';
|
|
9
9
|
import { Alert, AlertType } from './AlertTypes';
|
|
10
10
|
import { useAlertStore } from './AlertStore';
|
|
11
11
|
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { StyleSheet, View, Pressable, StyleProp, ViewStyle } from 'react-native';
|
|
10
|
-
import { AtomicText, AtomicIcon } from '
|
|
11
|
-
import { useAppDesignTokens } from '
|
|
10
|
+
import { AtomicText, AtomicIcon } from '@atoms';
|
|
11
|
+
import { useAppDesignTokens } from '@theme';
|
|
12
12
|
import { Alert, AlertType } from './AlertTypes';
|
|
13
13
|
import { useAlertStore } from './AlertStore';
|
|
14
14
|
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { View, Image, StyleSheet, type StyleProp, type ViewStyle, type ImageStyle } from 'react-native';
|
|
10
|
-
import { useAppDesignTokens } from '
|
|
11
|
-
import { AtomicText, AtomicIcon } from '
|
|
10
|
+
import { useAppDesignTokens } from '@theme';
|
|
11
|
+
import { AtomicText, AtomicIcon } from '@atoms';
|
|
12
12
|
import type { AvatarSize, AvatarShape } from './Avatar.utils';
|
|
13
13
|
import {
|
|
14
14
|
SIZE_CONFIGS,
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { View, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
|
|
10
|
-
import { useAppDesignTokens } from '
|
|
11
|
-
import { AtomicText } from '
|
|
10
|
+
import { useAppDesignTokens } from '@theme';
|
|
11
|
+
import { AtomicText } from '@atoms';
|
|
12
12
|
import { Avatar } from './Avatar';
|
|
13
13
|
import type { AvatarSize, AvatarShape } from './Avatar.utils';
|
|
14
14
|
import {
|
|
@@ -5,7 +5,7 @@ import GorhomBottomSheet, {
|
|
|
5
5
|
BottomSheetBackdrop,
|
|
6
6
|
type BottomSheetBackdropProps,
|
|
7
7
|
} from '@gorhom/bottom-sheet';
|
|
8
|
-
import { useAppDesignTokens } from '
|
|
8
|
+
import { useAppDesignTokens } from '@theme';
|
|
9
9
|
import type {
|
|
10
10
|
BottomSheetConfig,
|
|
11
11
|
BottomSheetRef,
|
|
@@ -8,8 +8,8 @@ import React, { forwardRef, useCallback } from 'react';
|
|
|
8
8
|
import { View, StyleSheet, TouchableOpacity, ScrollView } from 'react-native';
|
|
9
9
|
import { BottomSheetModal } from '../BottomSheetModal';
|
|
10
10
|
import type { BottomSheetModalRef } from '../../types/BottomSheet';
|
|
11
|
-
import { AtomicText, AtomicIcon, AtomicButton } from
|
|
12
|
-
import { useAppDesignTokens } from
|
|
11
|
+
import { AtomicText, AtomicIcon, AtomicButton } from "@atoms";
|
|
12
|
+
import { useAppDesignTokens } from "@theme";
|
|
13
13
|
import type { FilterOption, FilterCategory } from '../../types/Filter';
|
|
14
14
|
import { FilterUtils } from '../../types/Filter';
|
|
15
15
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useCallback } from "react";
|
|
2
2
|
import { View, StyleSheet, ScrollView, Modal, Pressable } from "react-native";
|
|
3
3
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
4
|
-
import { AtomicButton } from "
|
|
5
|
-
import { useAppDesignTokens } from "
|
|
4
|
+
import { AtomicButton } from "@atoms";
|
|
5
|
+
import { useAppDesignTokens } from "@theme";
|
|
6
6
|
import type { FilterOption } from "../../types/Filter";
|
|
7
7
|
import { FilterUtils } from "../../types/Filter";
|
|
8
8
|
import { FilterSheetHeader } from "./FilterSheetComponents/FilterSheetHeader";
|
package/src/molecules/bottom-sheet/components/filter/FilterSheetComponents/FilterSheetHeader.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
-
import { AtomicText, AtomicIcon } from '
|
|
4
|
-
import type { useAppDesignTokens } from '
|
|
3
|
+
import { AtomicText, AtomicIcon } from '@atoms';
|
|
4
|
+
import type { useAppDesignTokens } from '@theme';
|
|
5
5
|
|
|
6
6
|
interface FilterSheetHeaderProps {
|
|
7
7
|
title: string;
|
package/src/molecules/bottom-sheet/components/filter/FilterSheetComponents/FilterSheetOption.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
-
import { AtomicText, AtomicIcon } from '
|
|
4
|
-
import type { useAppDesignTokens } from '
|
|
3
|
+
import { AtomicText, AtomicIcon } from '@atoms';
|
|
4
|
+
import type { useAppDesignTokens } from '@theme';
|
|
5
5
|
import type { FilterOption } from '../../../types/Filter';
|
|
6
6
|
|
|
7
7
|
interface FilterSheetOptionProps {
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { View, ViewStyle, StyleProp } from 'react-native';
|
|
9
|
-
import { AtomicText, AtomicButton, AtomicIcon } from '
|
|
10
|
-
import type { DesignTokens } from '
|
|
9
|
+
import { AtomicText, AtomicButton, AtomicIcon } from '@atoms';
|
|
10
|
+
import type { DesignTokens } from '@theme';
|
|
11
11
|
import {
|
|
12
12
|
getButtonContainerStyle,
|
|
13
13
|
getButtonStyle,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { ViewStyle } from 'react-native';
|
|
8
8
|
import { ConfirmationModalVariant, ConfirmationModalVariantConfig } from '../types/';
|
|
9
|
-
import type { DesignTokens } from '
|
|
9
|
+
import type { DesignTokens } from '@theme';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Get variant configuration (icon and color only)
|
package/src/molecules/index.ts
CHANGED
|
@@ -10,7 +10,6 @@ export { FormField, type FormFieldProps } from './FormField';
|
|
|
10
10
|
export { ListItem, type ListItemProps } from './ListItem';
|
|
11
11
|
export { SearchBar, type SearchBarProps } from './SearchBar';
|
|
12
12
|
export { IconContainer } from './IconContainer';
|
|
13
|
-
export { ScreenHeader, type ScreenHeaderProps } from './ScreenHeader';
|
|
14
13
|
export { BaseModal, type BaseModalProps } from './BaseModal';
|
|
15
14
|
export { ConfirmationModal } from './ConfirmationModalMain';
|
|
16
15
|
export { useConfirmationModal } from './confirmation-modal/useConfirmationModal';
|
|
@@ -26,9 +25,7 @@ export * from './Divider';
|
|
|
26
25
|
export * from "./StepProgress";
|
|
27
26
|
|
|
28
27
|
// Responsive Components
|
|
29
|
-
export { Grid, type GridProps } from './Grid';
|
|
30
28
|
export { List, type ListProps } from './List';
|
|
31
|
-
export { Container, type ContainerProps } from './Container';
|
|
32
29
|
|
|
33
30
|
// Alerts
|
|
34
31
|
export * from './alerts';
|
|
@@ -52,8 +52,8 @@ import {
|
|
|
52
52
|
ViewStyle,
|
|
53
53
|
} from 'react-native';
|
|
54
54
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
55
|
-
import { useAppDesignTokens } from '
|
|
56
|
-
import { useResponsive } from '
|
|
55
|
+
import { useAppDesignTokens } from '@theme';
|
|
56
|
+
import { useResponsive } from '@responsive';
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* Props for FormContainer component
|
package/src/organisms/index.ts
CHANGED
|
@@ -11,25 +11,13 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
// Component exports
|
|
14
|
-
export { AppHeader } from './AppHeader';
|
|
15
|
-
export { ScreenLayout } from './ScreenLayout';
|
|
16
14
|
export { FormContainer } from './FormContainer';
|
|
17
|
-
export { FormLayout } from './FormLayout';
|
|
18
15
|
|
|
19
16
|
// Type exports
|
|
20
|
-
export type { AppHeaderProps } from './AppHeader';
|
|
21
|
-
export type { ScreenLayoutProps } from './ScreenLayout';
|
|
22
17
|
export type { FormContainerProps } from './FormContainer';
|
|
23
|
-
export type { FormLayoutProps } from './FormLayout';
|
|
24
18
|
|
|
25
19
|
// Union type for all organism props (used for type narrowing)
|
|
26
|
-
import type { AppHeaderProps } from './AppHeader';
|
|
27
|
-
import type { ScreenLayoutProps } from './ScreenLayout';
|
|
28
20
|
import type { FormContainerProps } from './FormContainer';
|
|
29
|
-
import type { FormLayoutProps } from './FormLayout';
|
|
30
21
|
|
|
31
22
|
export type OrganismComponentProps =
|
|
32
|
-
| { type: '
|
|
33
|
-
| { type: 'ScreenLayout'; props: ScreenLayoutProps }
|
|
34
|
-
| { type: 'FormContainer'; props: FormContainerProps }
|
|
35
|
-
| { type: 'FormLayout'; props: FormLayoutProps };
|
|
23
|
+
| { type: 'FormContainer'; props: FormContainerProps };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Responsive grid sizing and column calculations
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { getScreenDimensions } from '
|
|
6
|
+
import { getScreenDimensions } from '@device/detection';
|
|
7
7
|
import { DEVICE_BREAKPOINTS, GRID_CONFIG } from './config';
|
|
8
8
|
import { validateNumber } from './validation';
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Layout utilities for positioning and spacing.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { getScreenDimensions } from '
|
|
6
|
+
import { getScreenDimensions } from '@device/detection';
|
|
7
7
|
import { DEVICE_BREAKPOINTS, LAYOUT_CONSTANTS } from './config';
|
|
8
8
|
import { validateNumber, validateSafeAreaInsets } from './validation';
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import { useMemo } from 'react';
|
|
13
13
|
import { useDesignSystemTheme } from '../infrastructure/globalThemeStore';
|
|
14
14
|
import { createResponsiveDesignTokens, type ResponsiveDesignTokens } from '../core/ResponsiveTokenFactory';
|
|
15
|
-
import { useResponsive } from '
|
|
15
|
+
import { useResponsive } from '@responsive/useResponsive';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Hook for responsive design tokens
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
import type { ColorVariant } from '../../domain/entities/TypographyTypes';
|
|
27
|
-
import type { DesignTokens } from '
|
|
27
|
+
import type { DesignTokens } from '@theme';
|
|
28
28
|
|
|
29
29
|
// Cache for color variant validation to improve performance
|
|
30
30
|
const COLOR_VARIANT_SET = new Set<string>([
|
|
@@ -32,7 +32,7 @@ import type { TextStyle as RNTextStyle } from 'react-native';
|
|
|
32
32
|
type TextStyle = RNTextStyle;
|
|
33
33
|
|
|
34
34
|
import type { TextStyleVariant } from '../../domain/entities/TypographyTypes';
|
|
35
|
-
import type { DesignTokens } from '
|
|
35
|
+
import type { DesignTokens } from '@theme';
|
|
36
36
|
|
|
37
37
|
// Cache for text style variant validation to improve performance
|
|
38
38
|
const TEXT_STYLE_VARIANT_SET = new Set<string>([
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|