@umituz/react-native-design-system 2.5.23 → 2.5.24
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.5.
|
|
3
|
+
"version": "2.5.24",
|
|
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",
|
package/src/atoms/AtomicIcon.tsx
CHANGED
|
@@ -8,6 +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 Svg, { Path } from "react-native-svg";
|
|
11
12
|
import { useAppDesignTokens } from '../theme';
|
|
12
13
|
import {
|
|
13
14
|
type IconSize as BaseIconSize
|
|
@@ -50,6 +51,10 @@ export interface AtomicIconProps {
|
|
|
50
51
|
color?: IconColor;
|
|
51
52
|
/** Custom color (overrides color) */
|
|
52
53
|
customColor?: string;
|
|
54
|
+
/** Custom SVG path for generic icons */
|
|
55
|
+
svgPath?: string;
|
|
56
|
+
/** ViewBox for custom SVG (default: 0 0 24 24) */
|
|
57
|
+
svgViewBox?: string;
|
|
53
58
|
/** Add circular background */
|
|
54
59
|
withBackground?: boolean;
|
|
55
60
|
/** Background color */
|
|
@@ -102,6 +107,8 @@ export const AtomicIcon: React.FC<AtomicIconProps> = React.memo(({
|
|
|
102
107
|
customColor,
|
|
103
108
|
withBackground = false,
|
|
104
109
|
backgroundColor,
|
|
110
|
+
svgPath,
|
|
111
|
+
svgViewBox = "0 0 24 24",
|
|
105
112
|
accessibilityLabel,
|
|
106
113
|
testID,
|
|
107
114
|
style,
|
|
@@ -123,10 +130,21 @@ export const AtomicIcon: React.FC<AtomicIconProps> = React.memo(({
|
|
|
123
130
|
: tokens.colors.textPrimary;
|
|
124
131
|
|
|
125
132
|
// Validate icon - use fallback silently if invalid
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
133
|
+
const iconName = name && name in Ionicons.glyphMap ? name : FALLBACK_ICON;
|
|
134
|
+
|
|
135
|
+
const iconElement = svgPath ? (
|
|
136
|
+
<Svg
|
|
137
|
+
viewBox={svgViewBox}
|
|
138
|
+
width={sizeInPixels}
|
|
139
|
+
height={sizeInPixels}
|
|
140
|
+
key="custom-svg-icon"
|
|
141
|
+
>
|
|
142
|
+
<Path
|
|
143
|
+
d={svgPath}
|
|
144
|
+
fill={iconColor}
|
|
145
|
+
/>
|
|
146
|
+
</Svg>
|
|
147
|
+
) : (
|
|
130
148
|
<Ionicons
|
|
131
149
|
name={iconName as keyof typeof Ionicons.glyphMap}
|
|
132
150
|
size={sizeInPixels}
|
|
@@ -40,11 +40,6 @@ export const CelebrationModalContent: React.FC<CelebrationModalContentProps> = (
|
|
|
40
40
|
{
|
|
41
41
|
backgroundColor: tokens.colors.surface,
|
|
42
42
|
borderColor: tokens.colors.surfaceVariant,
|
|
43
|
-
shadowColor: tokens.colors.onSurface,
|
|
44
|
-
shadowOffset: { width: 0, height: 8 },
|
|
45
|
-
shadowOpacity: 0.15,
|
|
46
|
-
shadowRadius: 24,
|
|
47
|
-
elevation: 8,
|
|
48
43
|
},
|
|
49
44
|
]}
|
|
50
45
|
>
|