@org-design-system/icons 0.1.4 → 0.1.5

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 +26 -23
  2. 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 collection of high-quality SVG icons optimized as React components.
3
+ A specialized icon library for the Antaris Design System. This package transforms raw SVGs into optimized, type-safe React components.
4
4
 
5
- ## 🛰️ Features
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
- ## 🛠️ How it Works
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
- ### 1. Source SVGs
13
- Add new SVG files to the `svg/` directory.
12
+ ## 🛠️ Build Process
14
13
 
15
- ### 2. Build Process
16
- Run `npm run build` to trigger the `build.js` script.
17
- - It cleans the `src/` folder.
18
- - Uses `SVGR` to transform SVGs into standard React components.
19
- - Automatically appends the `Icon` suffix to filenames and component names.
20
- - Generates a central `src/index.ts` for clean exports.
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 App() {
32
+ function Dashboard() {
28
33
  return (
29
- <div className="flex gap-4 text-blue-500">
30
- <RocketIcon width={24} height={24} />
31
- <SatelliteIcon className="animate-spin" />
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
- ## 📝 Best Practices
38
- - **Consistency**: Always use the `Icon` suffixed names.
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.4",
3
+ "version": "0.1.5",
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.4"
36
+ "@org-design-system/styles": "0.1.5"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "react": ">=18"