@refineui/react-native-icons 0.3.7 → 0.3.8

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.
Files changed (2) hide show
  1. package/README.md +123 -102
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -19,23 +19,22 @@ pnpm add @refineui/react-native-icons
19
19
  ```tsx
20
20
  import React from "react";
21
21
  import { View, Text } from "react-native";
22
- import { Icon } from "@refineui/react-native-icons";
22
+ import { Home, Search, Settings, Heart } from "@refineui/react-native-icons";
23
23
 
24
24
  function App() {
25
25
  return (
26
26
  <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
27
27
  {/* Basic usage */}
28
- <Icon name="home" size={24} />
28
+ <Home size={24} />
29
29
 
30
30
  {/* With custom color */}
31
- <Icon name="search" size={20} color="#0078d4" />
31
+ <Search size={20} color="#0078d4" />
32
32
 
33
33
  {/* With custom style */}
34
- <Icon name="settings" size={16} style={{ marginTop: 10 }} />
34
+ <Settings size={16} style={{ marginTop: 10 }} />
35
35
 
36
36
  {/* With onPress handler */}
37
- <Icon
38
- name="heart"
37
+ <Heart
39
38
  size={24}
40
39
  onPress={() => console.log("Heart pressed!")}
41
40
  style={{ marginTop: 10 }}
@@ -50,12 +49,11 @@ export default App;
50
49
  ### Touchable Icon
51
50
 
52
51
  ```tsx
53
- import { Icon } from "@refineui/react-native-icons";
52
+ import { Star } from "@refineui/react-native-icons";
54
53
 
55
54
  function TouchableIcon() {
56
55
  return (
57
- <Icon
58
- name="star"
56
+ <Star
59
57
  size={24}
60
58
  onPress={() => console.log("Star pressed!")}
61
59
  style={{
@@ -72,14 +70,25 @@ function TouchableIcon() {
72
70
 
73
71
  ### Icon Categories
74
72
 
75
- - **Navigation**: `home`, `search`, `menu`, `back`, `forward`, `up`, `down`, `left`, `right`
76
- - **Actions**: `add`, `edit`, `delete`, `save`, `cancel`, `refresh`, `download`, `upload`
77
- - **Communication**: `mail`, `phone`, `chat`, `notification`, `bell`, `message`
78
- - **Media**: `play`, `pause`, `stop`, `volume`, `mute`, `camera`, `image`, `video`
79
- - **System**: `settings`, `gear`, `user`, `lock`, `unlock`, `key`, `shield`
80
- - **Files**: `folder`, `file`, `document`, `image`, `pdf`, `zip`, `download`
73
+ - **Navigation**: `Home`, `Search`, `Menu`, `ArrowLeft`, `ArrowRight`, `ChevronUp`, `ChevronDown`
74
+ - **Actions**: `Add`, `Edit`, `Delete`, `Save`, `Cancel`, `Refresh`, `Download`, `Upload`
75
+ - **Communication**: `Mail`, `Phone`, `Chat`, `Notification`, `Bell`, `Message`
76
+ - **Media**: `Play`, `Pause`, `Stop`, `Volume`, `Mute`, `Camera`, `Image`, `Video`
77
+ - **System**: `Settings`, `Gear`, `Person`, `Lock`, `Unlock`, `Key`, `Shield`
78
+ - **Files**: `Folder`, `Document`, `Image`, `Download`
81
79
  - **And many more...** (434+ icons total)
82
80
 
81
+ ### Icon Naming Convention
82
+
83
+ Icons follow the pattern: `{Name}` (PascalCase)
84
+
85
+ - **Style**: `Regular` or `Filled` (imported separately)
86
+ - **Examples**:
87
+ - `Home` - Regular style home icon
88
+ - `HomeFilled` - Filled style home icon
89
+ - `Add` - Regular style add icon
90
+ - `AddFilled` - Filled style add icon
91
+
83
92
  ### Icon Sizes
84
93
 
85
94
  - **16px**: `size={16}`
@@ -93,29 +102,35 @@ function TouchableIcon() {
93
102
  ### TypeScript Support
94
103
 
95
104
  ```tsx
96
- import { Icon, IconProps } from "@refineui/react-native-icons";
105
+ import {
106
+ Home,
107
+ Search,
108
+ Settings,
109
+ IconProps,
110
+ } from "@refineui/react-native-icons";
97
111
 
98
112
  interface MyComponentProps {
99
- iconName: IconProps["name"];
100
- iconSize?: IconProps["size"];
101
- iconColor?: IconProps["color"];
102
- iconStyle?: IconProps["iconStyle"];
113
+ iconType: "home" | "search" | "settings";
114
+ iconSize?: number;
115
+ iconColor?: string;
103
116
  }
104
117
 
105
- function MyComponent({ iconName, iconSize = 24, iconColor }: MyComponentProps) {
106
- return <Icon name={iconName} size={iconSize} color={iconColor} />;
118
+ function MyComponent({ iconType, iconSize = 24, iconColor }: MyComponentProps) {
119
+ const IconComponent =
120
+ iconType === "home" ? Home : iconType === "search" ? Search : Settings;
121
+
122
+ return <IconComponent size={iconSize} color={iconColor} />;
107
123
  }
108
124
  ```
109
125
 
110
126
  ### Custom Styling
111
127
 
112
128
  ```tsx
113
- import { Icon } from "@refineui/react-native-icons";
129
+ import { Star } from "@refineui/react-native-icons";
114
130
 
115
131
  function CustomIcon() {
116
132
  return (
117
- <Icon
118
- name="star"
133
+ <Star
119
134
  size={24}
120
135
  color="#ffd700"
121
136
  style={{
@@ -133,7 +148,7 @@ function CustomIcon() {
133
148
  ### Dynamic Icon Selection
134
149
 
135
150
  ```tsx
136
- import { Icon } from "@refineui/react-native-icons";
151
+ import { Home, Search, Settings } from "@refineui/react-native-icons";
137
152
 
138
153
  function DynamicIcon({
139
154
  iconType,
@@ -141,14 +156,15 @@ function DynamicIcon({
141
156
  iconType: "home" | "search" | "settings";
142
157
  }) {
143
158
  const iconConfig = {
144
- home: { name: "home", color: "#0078d4" },
145
- search: { name: "search", color: "#107c10" },
146
- settings: { name: "settings", color: "#d83b01" },
159
+ home: { component: Home, color: "#0078d4" },
160
+ search: { component: Search, color: "#107c10" },
161
+ settings: { component: Settings, color: "#d83b01" },
147
162
  };
148
163
 
149
164
  const config = iconConfig[iconType];
165
+ const IconComponent = config.component;
150
166
 
151
- return <Icon name={config.name} size={24} color={config.color} />;
167
+ return <IconComponent size={24} color={config.color} />;
152
168
  }
153
169
  ```
154
170
 
@@ -162,31 +178,32 @@ function DynamicIcon({
162
178
 
163
179
  ```tsx
164
180
  import React, { useMemo } from "react";
165
- import { Icon } from "@refineui/react-native-icons";
181
+ import { Home, Search, Settings } from "@refineui/react-native-icons";
166
182
 
167
- function OptimizedIcon({ iconName, size = 24 }) {
183
+ function OptimizedIcon({ iconType, size = 24 }) {
168
184
  const iconProps = useMemo(
169
185
  () => ({
170
- name: iconName,
171
186
  size,
172
187
  color: "#0078d4",
173
188
  }),
174
- [iconName, size]
189
+ [size]
175
190
  );
176
191
 
177
- return <Icon {...iconProps} />;
192
+ const IconComponent =
193
+ iconType === "home" ? Home : iconType === "search" ? Search : Settings;
194
+
195
+ return <IconComponent {...iconProps} />;
178
196
  }
179
197
  ```
180
198
 
181
199
  ### 2. **Accessibility**
182
200
 
183
201
  ```tsx
184
- import { Icon } from "@refineui/react-native-icons";
202
+ import { Search } from "@refineui/react-native-icons";
185
203
 
186
204
  function AccessibleIcon() {
187
205
  return (
188
- <Icon
189
- name="search"
206
+ <Search
190
207
  size={24}
191
208
  accessible={true}
192
209
  accessibilityLabel="Search"
@@ -200,27 +217,30 @@ function AccessibleIcon() {
200
217
  ### 3. **Responsive Design**
201
218
 
202
219
  ```tsx
203
- import { Icon } from "@refineui/react-native-icons";
220
+ import { Menu } from "@refineui/react-native-icons";
204
221
  import { Dimensions } from "react-native";
205
222
 
206
223
  function ResponsiveIcon() {
207
224
  const { width } = Dimensions.get("window");
208
225
  const iconSize = width < 768 ? 20 : 24;
209
226
 
210
- return <Icon name="menu" size={iconSize} />;
227
+ return <Menu size={iconSize} />;
211
228
  }
212
229
  ```
213
230
 
214
231
  ### 4. **Theme Integration**
215
232
 
216
233
  ```tsx
217
- import { Icon } from "@refineui/react-native-icons";
234
+ import { Home, Search, Settings } from "@refineui/react-native-icons";
218
235
  import { useTheme } from "@react-navigation/native";
219
236
 
220
- function ThemedIcon({ name, size = 24 }) {
237
+ function ThemedIcon({ iconType, size = 24 }) {
221
238
  const theme = useTheme();
222
239
 
223
- return <Icon name={name} size={size} color={theme.colors.primary} />;
240
+ const IconComponent =
241
+ iconType === "home" ? Home : iconType === "search" ? Search : Settings;
242
+
243
+ return <IconComponent size={size} color={theme.colors.primary} />;
224
244
  }
225
245
  ```
226
246
 
@@ -229,16 +249,12 @@ function ThemedIcon({ name, size = 24 }) {
229
249
  ### iOS Specific
230
250
 
231
251
  ```tsx
232
- import { Icon } from "@refineui/react-native-icons";
252
+ import { Settings } from "@refineui/react-native-icons";
233
253
  import { Platform } from "react-native";
234
254
 
235
255
  function PlatformIcon() {
236
256
  return (
237
- <Icon
238
- name="settings"
239
- size={24}
240
- color={Platform.OS === "ios" ? "#007AFF" : "#0078d4"}
241
- />
257
+ <Settings size={24} color={Platform.OS === "ios" ? "#007AFF" : "#0078d4"} />
242
258
  );
243
259
  }
244
260
  ```
@@ -246,16 +262,12 @@ function PlatformIcon() {
246
262
  ### Android Specific
247
263
 
248
264
  ```tsx
249
- import { Icon } from "@refineui/react-native-icons";
265
+ import { Menu } from "@refineui/react-native-icons";
250
266
  import { Platform } from "react-native";
251
267
 
252
268
  function AndroidIcon() {
253
269
  return (
254
- <Icon
255
- name="menu"
256
- size={24}
257
- color={Platform.OS === "android" ? "#6200EA" : "#0078d4"}
258
- />
270
+ <Menu size={24} color={Platform.OS === "android" ? "#6200EA" : "#0078d4"} />
259
271
  );
260
272
  }
261
273
  ```
@@ -265,16 +277,21 @@ function AndroidIcon() {
265
277
  ### Navigation Bar Icons
266
278
 
267
279
  ```tsx
268
- import { Icon } from "@refineui/react-native-icons";
280
+ import {
281
+ Menu,
282
+ Search,
283
+ Notification,
284
+ Person,
285
+ } from "@refineui/react-native-icons";
269
286
  import { View, StyleSheet } from "react-native";
270
287
 
271
288
  function NavigationBar() {
272
289
  return (
273
290
  <View style={styles.navBar}>
274
- <Icon name="menu" size={24} style={styles.navIcon} />
275
- <Icon name="search" size={20} style={styles.navIcon} />
276
- <Icon name="notification" size={20} style={styles.navIcon} />
277
- <Icon name="user" size={20} style={styles.navIcon} />
291
+ <Menu size={24} style={styles.navIcon} />
292
+ <Search size={20} style={styles.navIcon} />
293
+ <Notification size={20} style={styles.navIcon} />
294
+ <Person size={20} style={styles.navIcon} />
278
295
  </View>
279
296
  );
280
297
  }
@@ -298,57 +315,62 @@ const styles = StyleSheet.create({
298
315
  ### Button with Icon
299
316
 
300
317
  ```tsx
301
- import { Icon } from "@refineui/react-native-icons";
318
+ import { Download } from "@refineui/react-native-icons";
302
319
  import { TouchableOpacity, Text, StyleSheet } from "react-native";
303
320
 
304
- function IconButton({ iconName, title, onPress }) {
321
+ function IconButton({ title, onPress }) {
305
322
  return (
306
323
  <TouchableOpacity style={styles.button} onPress={onPress}>
307
- <Icon name={iconName} size={16} color="#fff" />
324
+ <Download size={16} color="#fff" />
308
325
  <Text style={styles.buttonText}>{title}</Text>
309
326
  </TouchableOpacity>
310
327
  );
311
328
  }
329
+ ```
312
330
 
313
331
  const styles = StyleSheet.create({
314
- button: {
315
- flexDirection: "row",
316
- alignItems: "center",
317
- backgroundColor: "#0078d4",
318
- paddingHorizontal: 16,
319
- paddingVertical: 8,
320
- borderRadius: 4,
321
- },
322
- buttonText: {
323
- color: "#fff",
324
- marginLeft: 8,
325
- fontSize: 16,
326
- },
332
+ button: {
333
+ flexDirection: "row",
334
+ alignItems: "center",
335
+ backgroundColor: "#0078d4",
336
+ paddingHorizontal: 16,
337
+ paddingVertical: 8,
338
+ borderRadius: 4,
339
+ },
340
+ buttonText: {
341
+ color: "#fff",
342
+ marginLeft: 8,
343
+ fontSize: 16,
344
+ },
327
345
  });
328
- ```
346
+
347
+ ````
329
348
 
330
349
  ### Icon Grid
331
350
 
332
351
  ```tsx
333
- import { Icon } from "@refineui/react-native-icons";
352
+ import { Home, Search, Settings, Person, Mail, Phone } from "@refineui/react-native-icons";
334
353
  import { View, Text, StyleSheet, FlatList } from "react-native";
335
354
 
336
355
  function IconGrid() {
337
356
  const icons = [
338
- { name: "home", label: "Home" },
339
- { name: "search", label: "Search" },
340
- { name: "settings", label: "Settings" },
341
- { name: "user", label: "User" },
342
- { name: "mail", label: "Mail" },
343
- { name: "phone", label: "Phone" },
357
+ { component: Home, name: "home", label: "Home" },
358
+ { component: Search, name: "search", label: "Search" },
359
+ { component: Settings, name: "settings", label: "Settings" },
360
+ { component: Person, name: "user", label: "User" },
361
+ { component: Mail, name: "mail", label: "Mail" },
362
+ { component: Phone, name: "phone", label: "Phone" },
344
363
  ];
345
364
 
346
- const renderIcon = ({ item }) => (
347
- <View style={styles.iconItem}>
348
- <Icon name={item.name} size={24} />
349
- <Text style={styles.iconLabel}>{item.label}</Text>
350
- </View>
351
- );
365
+ const renderIcon = ({ item }) => {
366
+ const IconComponent = item.component;
367
+ return (
368
+ <View style={styles.iconItem}>
369
+ <IconComponent size={24} />
370
+ <Text style={styles.iconLabel}>{item.label}</Text>
371
+ </View>
372
+ );
373
+ };
352
374
 
353
375
  return (
354
376
  <FlatList
@@ -379,7 +401,7 @@ const styles = StyleSheet.create({
379
401
  textAlign: "center",
380
402
  },
381
403
  });
382
- ```
404
+ ````
383
405
 
384
406
  ## 🔍 Icon Search and Discovery
385
407
 
@@ -387,12 +409,12 @@ const styles = StyleSheet.create({
387
409
 
388
410
  ```tsx
389
411
  const iconCategories = {
390
- navigation: ["home", "search", "menu", "back", "forward"],
391
- actions: ["add", "edit", "delete", "save", "cancel"],
392
- communication: ["mail", "phone", "chat", "notification"],
393
- media: ["play", "pause", "stop", "volume", "camera"],
394
- system: ["settings", "gear", "user", "lock", "unlock"],
395
- files: ["folder", "file", "document", "image", "pdf"],
412
+ navigation: ["Home", "Search", "Menu", "ArrowLeft", "ArrowRight"],
413
+ actions: ["Add", "Edit", "Delete", "Save", "Cancel"],
414
+ communication: ["Mail", "Phone", "Chat", "Notification"],
415
+ media: ["Play", "Pause", "Stop", "Volume", "Camera"],
416
+ system: ["Settings", "Gear", "Person", "Lock", "Unlock"],
417
+ files: ["Folder", "Document", "Image", "Download"],
396
418
  };
397
419
  ```
398
420
 
@@ -408,7 +430,7 @@ function searchIcons(query: string) {
408
430
 
409
431
  // Usage
410
432
  const searchResults = searchIcons("home");
411
- // Returns: ['home']
433
+ // Returns: ['Home']
412
434
  ```
413
435
 
414
436
  ## 🛠️ Development
@@ -458,10 +480,9 @@ npm run build:react-native
458
480
 
459
481
  ### Getting Help
460
482
 
461
- - 📧 Email: support@refineui.com
462
- - 🐛 Issues: [GitHub Issues](https://github.com/refineui/system-icons/issues)
463
- - 📖 Documentation: [docs.refineui.com](https://docs.refineui.com)
464
- - 💬 Community: [Discord](https://discord.gg/refineui)
483
+ - 📧 Email: support@pelagornis.com
484
+ - 🐛 Issues: [GitHub Issues](https://github.com/pelagornis/refineui-system-icons/issues)
485
+ - 💬 Community: [Slack](https://pelagornis.slack.com)
465
486
 
466
487
  ## 📄 License
467
488
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@refineui/react-native-icons",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "RefineUI System Icons for React Native",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",