@refineui/react-icons 0.3.6 → 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 +91 -73
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,23 +16,22 @@ pnpm add @refineui/react-icons
16
16
 
17
17
  ```tsx
18
18
  import React from "react";
19
- import { Icon } from "@refineui/react-icons";
19
+ import { Home, Search, Settings, Heart } from "@refineui/react-icons";
20
20
 
21
21
  function App() {
22
22
  return (
23
23
  <div>
24
24
  {/* Basic usage */}
25
- <Icon name="home" size={24} />
25
+ <Home size={24} />
26
26
 
27
27
  {/* With custom color */}
28
- <Icon name="search" size={20} color="#0078d4" />
28
+ <Search size={20} color="#0078d4" />
29
29
 
30
30
  {/* With custom className */}
31
- <Icon name="settings" size={16} className="my-icon" />
31
+ <Settings size={16} className="my-icon" />
32
32
 
33
33
  {/* With onClick handler */}
34
- <Icon
35
- name="heart"
34
+ <Heart
36
35
  size={24}
37
36
  onClick={() => console.log("Heart clicked!")}
38
37
  style={{ cursor: "pointer" }}
@@ -48,14 +47,25 @@ export default App;
48
47
 
49
48
  ### Icon Categories
50
49
 
51
- - **Navigation**: `home`, `search`, `menu`, `back`, `forward`, `up`, `down`, `left`, `right`
52
- - **Actions**: `add`, `edit`, `delete`, `save`, `cancel`, `refresh`, `download`, `upload`
53
- - **Communication**: `mail`, `phone`, `chat`, `notification`, `bell`, `message`
54
- - **Media**: `play`, `pause`, `stop`, `volume`, `mute`, `camera`, `image`, `video`
55
- - **System**: `settings`, `gear`, `user`, `lock`, `unlock`, `key`, `shield`
56
- - **Files**: `folder`, `file`, `document`, `image`, `pdf`, `zip`, `download`
50
+ - **Navigation**: `Home`, `Search`, `Menu`, `ArrowLeft`, `ArrowRight`, `ChevronUp`, `ChevronDown`
51
+ - **Actions**: `Add`, `Edit`, `Delete`, `Save`, `Cancel`, `Refresh`, `Download`, `Upload`
52
+ - **Communication**: `Mail`, `Phone`, `Chat`, `Notification`, `Bell`, `Message`
53
+ - **Media**: `Play`, `Pause`, `Stop`, `Volume`, `Mute`, `Camera`, `Image`, `Video`
54
+ - **System**: `Settings`, `Gear`, `Person`, `Lock`, `Unlock`, `Key`, `Shield`
55
+ - **Files**: `Folder`, `Document`, `Image`, `Download`
57
56
  - **And many more...** (434+ icons total)
58
57
 
58
+ ### Icon Naming Convention
59
+
60
+ Icons follow the pattern: `{Name}` (PascalCase)
61
+
62
+ - **Style**: `Regular` or `Filled` (imported separately)
63
+ - **Examples**:
64
+ - `Home` - Regular style home icon
65
+ - `HomeFilled` - Filled style home icon
66
+ - `Add` - Regular style add icon
67
+ - `AddFilled` - Filled style add icon
68
+
59
69
  ### Icon Sizes
60
70
 
61
71
  - **16px**: `size={16}`
@@ -69,29 +79,30 @@ export default App;
69
79
  ### TypeScript Support
70
80
 
71
81
  ```tsx
72
- import { Icon, IconProps } from "@refineui/react-icons";
82
+ import { Home, Search, Settings, IconProps } from "@refineui/react-icons";
73
83
 
74
84
  interface MyComponentProps {
75
- iconName: IconProps["name"];
76
- iconSize?: IconProps["size"];
77
- iconColor?: IconProps["color"];
78
- iconStyle?: IconProps["iconStyle"];
85
+ iconType: "home" | "search" | "settings";
86
+ iconSize?: number;
87
+ iconColor?: string;
79
88
  }
80
89
 
81
- function MyComponent({ iconName, iconSize = 24, iconColor }: MyComponentProps) {
82
- return <Icon name={iconName} size={iconSize} color={iconColor} />;
90
+ function MyComponent({ iconType, iconSize = 24, iconColor }: MyComponentProps) {
91
+ const IconComponent =
92
+ iconType === "home" ? Home : iconType === "search" ? Search : Settings;
93
+
94
+ return <IconComponent size={iconSize} color={iconColor} />;
83
95
  }
84
96
  ```
85
97
 
86
98
  ### Custom Styling
87
99
 
88
100
  ```tsx
89
- import { Icon } from "@refineui/react-icons";
101
+ import { Star } from "@refineui/react-icons";
90
102
 
91
103
  function CustomIcon() {
92
104
  return (
93
- <Icon
94
- name="star"
105
+ <Star
95
106
  size={24}
96
107
  className="my-custom-icon"
97
108
  style={{
@@ -131,8 +142,7 @@ function CustomIcon() {
131
142
  ### 3. **Accessibility**
132
143
 
133
144
  ```tsx
134
- <Icon
135
- name="search"
145
+ <Search
136
146
  size={24}
137
147
  aria-label="Search"
138
148
  role="button"
@@ -148,12 +158,11 @@ function CustomIcon() {
148
158
  ### 4. **Responsive Design**
149
159
 
150
160
  ```tsx
151
- import { Icon } from "@refineui/react-icons";
161
+ import { Menu } from "@refineui/react-icons";
152
162
 
153
163
  function ResponsiveIcon() {
154
164
  return (
155
- <Icon
156
- name="menu"
165
+ <Menu
157
166
  size={window.innerWidth < 768 ? 20 : 24}
158
167
  className="responsive-icon"
159
168
  />
@@ -166,15 +175,15 @@ function ResponsiveIcon() {
166
175
  ### Navigation Bar
167
176
 
168
177
  ```tsx
169
- import { Icon } from "@refineui/react-icons";
178
+ import { Menu, Search, Notification, Person } from "@refineui/react-icons";
170
179
 
171
180
  function NavigationBar() {
172
181
  return (
173
182
  <nav className="navbar">
174
- <Icon name="menu" size={24} className="nav-icon" />
175
- <Icon name="search" size={20} className="nav-icon" />
176
- <Icon name="notification" size={20} className="nav-icon" />
177
- <Icon name="user" size={20} className="nav-icon" />
183
+ <Menu size={24} className="nav-icon" />
184
+ <Search size={20} className="nav-icon" />
185
+ <Notification size={20} className="nav-icon" />
186
+ <Person size={20} className="nav-icon" />
178
187
  </nav>
179
188
  );
180
189
  }
@@ -183,37 +192,49 @@ function NavigationBar() {
183
192
  ### Button with Icon
184
193
 
185
194
  ```tsx
186
- import { Icon } from "@refineui/react-icons";
195
+ import { Download } from "@refineui/react-icons";
187
196
 
188
- function IconButton({ iconName, children, onClick }) {
197
+ function IconButton({ children, onClick }) {
189
198
  return (
190
199
  <button className="icon-button" onClick={onClick}>
191
- <Icon name={iconName} size={16} />
200
+ <Download size={16} />
192
201
  {children}
193
202
  </button>
194
203
  );
195
204
  }
196
205
 
197
206
  // Usage
198
- <IconButton iconName="download" onClick={handleDownload}>
199
- Download
200
- </IconButton>;
207
+ <IconButton onClick={handleDownload}>Download</IconButton>;
201
208
  ```
202
209
 
203
210
  ### Icon Grid
204
211
 
205
212
  ```tsx
206
- import { Icon } from "@refineui/react-icons";
213
+ import {
214
+ Home,
215
+ Search,
216
+ Settings,
217
+ Person,
218
+ Mail,
219
+ Phone,
220
+ } from "@refineui/react-icons";
207
221
 
208
222
  function IconGrid() {
209
- const icons = ["home", "search", "settings", "user", "mail", "phone"];
223
+ const icons = [
224
+ { component: Home, name: "home" },
225
+ { component: Search, name: "search" },
226
+ { component: Settings, name: "settings" },
227
+ { component: Person, name: "user" },
228
+ { component: Mail, name: "mail" },
229
+ { component: Phone, name: "phone" },
230
+ ];
210
231
 
211
232
  return (
212
233
  <div className="icon-grid">
213
- {icons.map((iconName) => (
214
- <div key={iconName} className="icon-item">
215
- <Icon name={iconName} size={24} />
216
- <span>{iconName}</span>
234
+ {icons.map(({ component: IconComponent, name }) => (
235
+ <div key={name} className="icon-item">
236
+ <IconComponent size={24} />
237
+ <span>{name}</span>
217
238
  </div>
218
239
  ))}
219
240
  </div>
@@ -227,42 +248,40 @@ function IconGrid() {
227
248
 
228
249
  ```tsx
229
250
  // Search for icons containing "home"
230
- const homeIcons = ["home", "home-filled", "home-outline"];
251
+ const homeIcons = ["Home", "HomeFilled"];
231
252
 
232
253
  // Search for icons containing "arrow"
233
- const arrowIcons = ["arrow-up", "arrow-down", "arrow-left", "arrow-right"];
254
+ const arrowIcons = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
234
255
  ```
235
256
 
236
257
  ### Icon Categories
237
258
 
238
259
  ```tsx
239
260
  const navigationIcons = [
240
- "home",
241
- "search",
242
- "menu",
243
- "back",
244
- "forward",
245
- "up",
246
- "down",
247
- "left",
248
- "right",
249
- "chevron-up",
250
- "chevron-down",
251
- "chevron-left",
252
- "chevron-right",
261
+ "Home",
262
+ "Search",
263
+ "Menu",
264
+ "ArrowLeft",
265
+ "ArrowRight",
266
+ "ArrowUp",
267
+ "ArrowDown",
268
+ "ChevronUp",
269
+ "ChevronDown",
270
+ "ChevronLeft",
271
+ "ChevronRight",
253
272
  ];
254
273
 
255
274
  const actionIcons = [
256
- "add",
257
- "edit",
258
- "delete",
259
- "save",
260
- "cancel",
261
- "refresh",
262
- "download",
263
- "upload",
264
- "copy",
265
- "cut",
275
+ "Add",
276
+ "Edit",
277
+ "Delete",
278
+ "Save",
279
+ "Cancel",
280
+ "Refresh",
281
+ "Download",
282
+ "Upload",
283
+ "Copy",
284
+ "Cut",
266
285
  ];
267
286
  ```
268
287
 
@@ -289,10 +308,9 @@ const actionIcons = [
289
308
 
290
309
  ### Getting Help
291
310
 
292
- - 📧 Email: support@refineui.com
293
- - 🐛 Issues: [GitHub Issues](https://github.com/refineui/system-icons/issues)
294
- - 📖 Documentation: [docs.refineui.com](https://docs.refineui.com)
295
- - 💬 Community: [Discord](https://discord.gg/refineui)
311
+ - 📧 Email: support@pelagornis.com
312
+ - 🐛 Issues: [GitHub Issues](https://github.com/pelagornis/refineui-system-icons/issues)
313
+ - 💬 Community: [Slack](https://pelagornis.slack.com)
296
314
 
297
315
  ## 📄 License
298
316
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@refineui/react-icons",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "description": "RefineUI System Icons for React",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",