@org-design-system/icons 0.1.4 → 0.1.6
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 +26 -23
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,40 +1,43 @@
|
|
|
1
|
-
# @org-design-system/icons
|
|
1
|
+
# @org-design-system/icons 🛰️
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A specialized icon library for the Antaris Design System. This package transforms raw SVGs into optimized, type-safe React components.
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
- **'Icon' Suffix**: All components are named with an `Icon` suffix (e.g., `SatelliteIcon`) to avoid conflicts.
|
|
7
|
-
- **Dynamic Coloring**: Uses `currentColor` so you can color icons using standard CSS `color` or Tailwind text classes.
|
|
8
|
-
- **Optimized**: Tiny bundle size with full tree-shaking support.
|
|
5
|
+
## 🚀 Features
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
- **Icon Suffix**: All components follow the `[Name]Icon` convention (e.g., `SatelliteIcon`) for clarity and to avoid collision with standard HTML tags.
|
|
8
|
+
- **Dynamic Styling**: uses `currentColor` for fills/strokes, allowing icons to be styled with standard CSS `color` or Tailwind `text-*` utilities.
|
|
9
|
+
- **Sizing Control**: Standardized `width` and `height` props with sensible defaults.
|
|
10
|
+
- **Performance**: Fully tree-shakable ES modules.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
Add new SVG files to the `svg/` directory.
|
|
12
|
+
## 🛠️ Build Process
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
We use a custom automated pipeline to handle icons:
|
|
15
|
+
|
|
16
|
+
1. **SVG Optimization**: Raw SVGs are processed to remove hardcoded colors, unnecessary metadata, and standard styling.
|
|
17
|
+
2. **SVGR Transformation**: optimized SVGs are converted into React components.
|
|
18
|
+
3. **Component Generation**: Components are written to `src/components/` with proper React and TypeScript boilerplate.
|
|
19
|
+
4. **Index Generation**: A central export file is created to facilitate clean imports.
|
|
20
|
+
|
|
21
|
+
### Adding New Icons
|
|
22
|
+
Simply drop your `.svg` file into the `svg/` directory and run:
|
|
23
|
+
```bash
|
|
24
|
+
npm run build
|
|
25
|
+
```
|
|
21
26
|
|
|
22
27
|
## 📦 Usage
|
|
23
28
|
|
|
24
29
|
```tsx
|
|
25
30
|
import { RocketIcon, SatelliteIcon } from "@org-design-system/icons";
|
|
26
31
|
|
|
27
|
-
function
|
|
32
|
+
function Dashboard() {
|
|
28
33
|
return (
|
|
29
|
-
<div className="flex gap-
|
|
30
|
-
<RocketIcon width={24} height={24} />
|
|
31
|
-
<
|
|
34
|
+
<div className="text-zinc-50 flex gap-2">
|
|
35
|
+
<RocketIcon className="text-blue-500" width={24} height={24} />
|
|
36
|
+
<span>Mission Control</span>
|
|
32
37
|
</div>
|
|
33
38
|
);
|
|
34
39
|
}
|
|
35
40
|
```
|
|
36
41
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- **Sizing**: Use `width` and `height` props for precise control.
|
|
40
|
-
- **Color**: Control colors via parent text classes (e.g., `text-red-500`).
|
|
42
|
+
---
|
|
43
|
+
*Precision tools for visual communication.*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@org-design-system/icons",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Icon components for the @org-design-system",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"tailwindcss": "^4.0.0",
|
|
36
|
-
"@org-design-system/styles": "0.1.
|
|
36
|
+
"@org-design-system/styles": "0.1.6"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": ">=18"
|