@umituz/react-native-design-system 2.6.80 → 2.6.82

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-design-system",
3
- "version": "2.6.80",
3
+ "version": "2.6.82",
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",
@@ -53,7 +53,7 @@ function getDeviceLocale(): string | undefined {
53
53
  const locales = Localization.getLocales();
54
54
  if (locales && locales.length > 0) {
55
55
  const locale = locales[0];
56
- return locale.languageTag || undefined;
56
+ return locale?.languageTag || undefined;
57
57
  }
58
58
  return undefined;
59
59
  } catch {
@@ -43,8 +43,8 @@ export const ScreenLayout: React.FC<ScreenLayoutProps> = ({
43
43
 
44
44
  // Pre-compute styles
45
45
  const styles = useMemo(
46
- () => getScreenLayoutStyles(tokens, { maxWidth: finalMaxWidth, horizontalPadding, verticalPadding }),
47
- [tokens, finalMaxWidth, horizontalPadding, verticalPadding]
46
+ () => getScreenLayoutStyles({ maxWidth: finalMaxWidth, horizontalPadding, verticalPadding }),
47
+ [finalMaxWidth, horizontalPadding, verticalPadding]
48
48
  );
49
49
 
50
50
  const bgColor = backgroundColor || tokens.colors.backgroundPrimary;
@@ -3,7 +3,6 @@
3
3
  */
4
4
 
5
5
  import { StyleSheet } from 'react-native';
6
- import type { DesignTokens } from '../../../theme';
7
6
 
8
7
  export interface ScreenLayoutStylesConfig {
9
8
  readonly maxWidth?: number;
@@ -12,7 +11,6 @@ export interface ScreenLayoutStylesConfig {
12
11
  }
13
12
 
14
13
  export const getScreenLayoutStyles = (
15
- tokens: DesignTokens,
16
14
  config: ScreenLayoutStylesConfig,
17
15
  ) => {
18
16
  const { maxWidth, horizontalPadding, verticalPadding } = config;
@@ -9,12 +9,9 @@ import React from 'react';
9
9
  import { View, Image, StyleSheet, type StyleProp, type ViewStyle, type ImageStyle } from 'react-native';
10
10
  import { useAppDesignTokens } from '../../theme';
11
11
  import { AtomicText, AtomicIcon } from '../../atoms';
12
- import type { AvatarSize, AvatarShape } from './Avatar.utils';
13
- import {
14
- SIZE_CONFIGS,
15
- AvatarUtils,
16
- AVATAR_CONSTANTS,
17
- } from './Avatar.utils';
12
+ import type { AvatarSize, AvatarShape } from './Avatar.types';
13
+ import { SIZE_CONFIGS, AVATAR_CONSTANTS } from './Avatar.constants';
14
+ import { AvatarUtils } from './Avatar.utils';
18
15
 
19
16
  /**
20
17
  * Avatar component props
@@ -10,11 +10,8 @@ import { View, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
10
10
  import { useAppDesignTokens } from '../../theme';
11
11
  import { AtomicText } from '../../atoms';
12
12
  import { Avatar } from './Avatar';
13
- import type { AvatarSize, AvatarShape } from './Avatar.utils';
14
- import {
15
- SIZE_CONFIGS,
16
- AVATAR_CONSTANTS,
17
- } from './Avatar.utils';
13
+ import type { AvatarSize, AvatarShape } from './Avatar.types';
14
+ import { SIZE_CONFIGS, AVATAR_CONSTANTS } from './Avatar.constants';
18
15
 
19
16
  /**
20
17
  * Avatar item for group
@@ -43,32 +40,6 @@ export interface AvatarGroupProps {
43
40
  style?: StyleProp<ViewStyle>;
44
41
  }
45
42
 
46
- /**
47
- * AvatarGroup Component
48
- *
49
- * Displays multiple avatars in a horizontal stack.
50
- * Shows "+N" indicator when exceeding max visible count.
51
- *
52
- * USAGE:
53
- * ```typescript
54
- * const users = [
55
- * { name: 'Ümit Uz', uri: 'https://...' },
56
- * { name: 'John Doe', uri: 'https://...' },
57
- * { name: 'Jane Smith' },
58
- * { name: 'Bob Johnson' },
59
- * { name: 'Alice Brown' },
60
- * ];
61
- *
62
- * // Show 3 avatars + overflow
63
- * <AvatarGroup items={users} maxVisible={3} />
64
- *
65
- * // Custom spacing
66
- * <AvatarGroup items={users} spacing={-12} />
67
- *
68
- * // Different size
69
- * <AvatarGroup items={users} size="lg" />
70
- * ```
71
- */
72
43
  export const AvatarGroup: React.FC<AvatarGroupProps> = ({
73
44
  items,
74
45
  maxVisible = AVATAR_CONSTANTS.MAX_GROUP_VISIBLE,
@@ -87,7 +58,6 @@ export const AvatarGroup: React.FC<AvatarGroupProps> = ({
87
58
 
88
59
  return (
89
60
  <View style={[styles.container, style]}>
90
- {/* Render visible avatars */}
91
61
  {visibleItems.map((item, index) => (
92
62
  <View
93
63
  key={index}
@@ -113,7 +83,6 @@ export const AvatarGroup: React.FC<AvatarGroupProps> = ({
113
83
  </View>
114
84
  ))}
115
85
 
116
- {/* Overflow indicator */}
117
86
  {hasOverflow && (
118
87
  <View
119
88
  style={[
@@ -158,12 +127,8 @@ const styles = StyleSheet.create({
158
127
  flexDirection: 'row',
159
128
  alignItems: 'center',
160
129
  },
161
- avatarWrapper: {
162
- // Wrapper for easier spacing control
163
- },
164
- avatar: {
165
- // Avatar styles
166
- },
130
+ avatarWrapper: {},
131
+ avatar: {},
167
132
  overflow: {
168
133
  justifyContent: 'center',
169
134
  alignItems: 'center',
@@ -1,10 +1,5 @@
1
1
  export { Avatar, type AvatarProps } from './Avatar';
2
2
  export { AvatarGroup, type AvatarGroupProps, type AvatarGroupItem } from './AvatarGroup';
3
- export {
4
- AvatarUtils,
5
- AVATAR_CONSTANTS,
6
- type AvatarSize,
7
- type AvatarShape,
8
- type AvatarConfig,
9
- type AvatarType
10
- } from './Avatar.utils';
3
+ export { AvatarUtils } from './Avatar.utils';
4
+ export { AVATAR_CONSTANTS } from './Avatar.constants';
5
+ export type { AvatarSize, AvatarShape, AvatarConfig, AvatarType } from './Avatar.types';