@umituz/react-native-design-system 4.28.23 → 4.29.1

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": "4.28.23",
3
+ "version": "4.29.1",
4
4
  "description": "Universal design system for React Native apps with safe navigation hooks - updated SKILL.md with navigation documentation",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./dist/index.d.ts",
@@ -23,6 +23,8 @@ export {
23
23
  useIconRenderer,
24
24
  useIconName,
25
25
  useHasIconConfig,
26
+ iconStore,
27
+ DEFAULT_ICON_NAMES,
26
28
  type IconNames,
27
29
  type IconRenderer,
28
30
  type IconRenderProps,
@@ -8,6 +8,7 @@ import type { ThemeMode } from '../../core/ColorPalette';
8
8
  import type { CustomThemeColors } from '../../core/CustomColors';
9
9
  import type { SplashScreenProps } from '../../../molecules/splash/types';
10
10
  import { FIVE_SECONDS_MS } from '../../../utils/constants/TimeConstants';
11
+ import { iconStore, DEFAULT_ICON_NAMES } from '../../../atoms/icon/iconStore';
11
12
 
12
13
  // Lazy load SplashScreen to avoid circular dependency
13
14
  const SplashScreen = lazy(() => import('../../../molecules/splash').then(m => ({ default: m.SplashScreen })));
@@ -24,6 +25,10 @@ interface DesignSystemProviderProps {
24
25
  loadingComponent?: ReactNode;
25
26
  onInitialized?: () => void;
26
27
  onError?: (error: unknown) => void;
28
+ /** Icon names available in the app (defaults to standard set) */
29
+ iconNames?: string[];
30
+ /** Icon renderer function from @umituz/react-native-icons or similar */
31
+ iconRenderer?: (props: { name: string; size: number; color: string }) => React.ReactNode;
27
32
  }
28
33
 
29
34
  export const DesignSystemProvider: React.FC<DesignSystemProviderProps> = ({
@@ -36,6 +41,8 @@ export const DesignSystemProvider: React.FC<DesignSystemProviderProps> = ({
36
41
  loadingComponent,
37
42
  onInitialized,
38
43
  onError,
44
+ iconNames,
45
+ iconRenderer,
39
46
  }) => {
40
47
  const [isInitialized, setIsInitialized] = useState(false);
41
48
  const hasCustomFonts = fonts != null && Object.keys(fonts).length > 0;
@@ -101,6 +108,13 @@ export const DesignSystemProvider: React.FC<DesignSystemProviderProps> = ({
101
108
  }
102
109
  }, [fontError, onError]);
103
110
 
111
+ // Configure icon renderer if provided
112
+ useEffect(() => {
113
+ if (iconRenderer) {
114
+ iconStore.setConfig(iconNames || DEFAULT_ICON_NAMES, iconRenderer);
115
+ }
116
+ }, [iconRenderer, iconNames]);
117
+
104
118
  const isLoading = showLoadingIndicator && (!isInitialized || !effectiveFontsLoaded);
105
119
 
106
120
  let content: ReactNode;