stera-icons 3.2.0 → 5.0.0

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/README.md CHANGED
@@ -37,37 +37,43 @@ The package includes 728+ icons across outline and filled variants, but thanks t
37
37
  ### Basic Usage
38
38
 
39
39
  ```tsx
40
- import { Search, Heart, Star, Cog, User, Home, Envalope, Phone, Calendar, Download } from 'stera-icons';
40
+ import { SearchIcon, HeartIcon, StarIcon, CogIcon, UserIcon, HomeIcon, MailIcon, PhoneIcon, CalendarIcon, DownloadIcon } from 'stera-icons';
41
41
 
42
42
  function App() {
43
43
  return (
44
44
  <div>
45
- <Search size={24} color="#646cff" aria-label="Search" />
46
- <Heart size={20} color="red" />
47
- <Star size={32} />
48
- <Cog size={24} aria-label="Settings" />
49
- <User size={20} />
50
- <Home size={24} />
51
- <Envalope size={20} aria-label="Email" />
52
- <Phone size={24} />
53
- <Calendar size={20} />
54
- <Download size={24} />
45
+ <SearchIcon size={24} color="#646cff" aria-label="Search" />
46
+ <HeartIcon size={20} color="red" />
47
+ <StarIcon size={32} />
48
+ <CogIcon size={24} aria-label="Settings" />
49
+ <UserIcon size={20} />
50
+ <HomeIcon size={24} />
51
+ <MailIcon size={20} aria-label="Email" />
52
+ <PhoneIcon size={24} />
53
+ <CalendarIcon size={20} />
54
+ <DownloadIcon size={24} />
55
55
  </div>
56
56
  );
57
57
  }
58
58
  ```
59
59
 
60
- ### Per-icon Imports (Recommended)
60
+ ### With Variants
61
61
 
62
62
  ```tsx
63
- import SearchIcon from 'stera-icons/search';
64
- import HeartFilled from 'stera-icons/heart-filled';
63
+ import { SearchIcon, HeartIcon } from 'stera-icons';
65
64
 
66
65
  function App() {
67
66
  return (
68
67
  <div>
69
- <SearchIcon size={24} />
70
- <HeartFilled size={20} color="red" />
68
+ {/* Use variant prop on wrapper component */}
69
+ <SearchIcon variant="regular" size={24} />
70
+ <SearchIcon variant="bold" size={24} />
71
+ <SearchIcon variant="filled" size={24} />
72
+
73
+ {/* Or import specific variants directly */}
74
+ <HeartIcon size={20} /> {/* Regular variant */}
75
+ <HeartIconBold size={20} /> {/* Bold variant */}
76
+ <HeartIconFilled size={20} /> {/* Filled variant */}
71
77
  </div>
72
78
  );
73
79
  }
@@ -86,12 +92,12 @@ function App() {
86
92
 
87
93
  ## Icon Naming
88
94
 
89
- Icons follow these naming patterns:
95
+ All icon components are suffixed with "Icon" to prevent naming conflicts with your existing components:
90
96
 
91
- - **Settings**: `Cog` (gear icon)
92
- - **Mail/Email**: `Envalope` (envelope icon)
93
- - **Filled variants**: Add `Filled` suffix (e.g., `HeartFilled`, `StarFilled`)
94
- - **Default variants**: Use the base name (e.g., `Heart`, `Star`)
97
+ - **Pattern**: `{Name}Icon` (e.g., `SearchIcon`, `HomeIcon`, `UserIcon`)
98
+ - **Bold variants**: `{Name}IconBold` (e.g., `SearchIconBold`, `HeartIconBold`)
99
+ - **Filled variants**: `{Name}IconFilled` (e.g., `SearchIconFilled`, `HeartIconFilled`)
100
+ - **Regular variants**: `{Name}Icon` (e.g., `SearchIcon`, `HeartIcon`)
95
101
 
96
102
  ## API
97
103
 
@@ -113,12 +119,12 @@ All icons accept these props:
113
119
  ### Styling with CSS
114
120
 
115
121
  ```tsx
116
- import { Search } from 'stera-icons';
122
+ import { SearchIcon } from 'stera-icons';
117
123
 
118
124
  function SearchButton() {
119
125
  return (
120
126
  <button className="search-btn">
121
- <Search size={20} className="search-icon" />
127
+ <SearchIcon size={20} className="search-icon" />
122
128
  Search
123
129
  </button>
124
130
  );
@@ -151,10 +157,10 @@ function SearchButton() {
151
157
  import { useState } from 'react';
152
158
  import * as Icons from 'stera-icons';
153
159
 
154
- const iconNames = ['Search', 'Heart', 'Star', 'Cog', 'User'] as const;
160
+ const iconNames = ['SearchIcon', 'HeartIcon', 'StarIcon', 'CogIcon', 'UserIcon'] as const;
155
161
 
156
162
  function IconSelector() {
157
- const [selectedIcon, setSelectedIcon] = useState('Search');
163
+ const [selectedIcon, setSelectedIcon] = useState('SearchIcon');
158
164
 
159
165
  const IconComponent = Icons[selectedIcon as keyof typeof Icons];
160
166