@solar-icons/react 2.0.0-beta.1 → 2.0.0-beta.2

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 +30 -65
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,93 +1,58 @@
1
- # @solar-icons/react-perf
1
+ # @solar-icons/react
2
2
 
3
- > **DEPRECATED** — This package is superseded by `@solar-icons/react` v3, which now uses the same unit-per-style architecture. Migrate to `@solar-icons/react` for the same API with future updates.
3
+ React components for Solar Icons. This package provides 7,476 SVG icons across 6 styles (Bold, Broken, Linear, Outline, Bold Duotone, Line Duotone), optimized for React applications.
4
4
 
5
- The `@solar-icons/react-perf` package provides a highly optimized, performance-focused library of React components for the Solar icon set. This package is tailored for developers who prioritize reduced bundle sizes and efficient rendering by focusing on single-style imports and simplified SVG structures.
5
+ ## Features
6
6
 
7
- ## Installation
7
+ - **7,476 SVGs:** 1,246 unique icons in 6 styles. Designed by 480 Design.
8
+ - **Tree-shakeable:** Import only the icons you use.
9
+ - **Global configuration:** Set defaults for size, color, and stroke width using `<SolarProvider>`.
10
+ - **Customizable:** Override size, color, and stroke width per icon via props or CSS variables.
11
+ - **Duotone support:** Secondary color controls for `bold-duotone` and `line-duotone` styles.
12
+ - **TypeScript:** Typed components and props.
8
13
 
9
- Install the package using npm or yarn:
14
+ ## Install
10
15
 
11
- ```bash
12
- npm install @solar-icons/react-perf
13
- ```
14
-
15
- or
16
-
17
- ```bash
18
- yarn add @solar-icons/react-perf
16
+ ```sh
17
+ npm install @solar-icons/react
19
18
  ```
20
19
 
21
20
  ## Usage
22
21
 
23
- ### Usage
24
-
25
- Import icons from the package:
26
-
27
- ```jsx
28
- import { AltArrowLeft, CheckCircle } from '@solar-icons/react-perf/Linear'
22
+ ```tsx
23
+ import { HomeIcon, LoginIcon } from '@solar-icons/react/linear'
29
24
 
30
25
  function App() {
31
26
  return (
32
27
  <div>
33
- <AltArrowLeft size={24} color="#000" />
34
- <CheckCircle size={32} color="green" />
28
+ <HomeIcon />
29
+ <LoginIcon color="#3b82f6" size={32} strokeWidth={2} />
35
30
  </div>
36
31
  )
37
32
  }
38
33
  ```
39
34
 
40
- ### Importing by Category
41
-
42
- ```jsx
43
- import { AltArrowLeft, ArrowUp } from '@solar-icons/react-perf/category/arrows/Linear'
44
- import { Cart, Bag } from '@solar-icons/react-perf/category/shopping/Bold'
45
- ```
46
-
47
- ## Key Features
48
-
49
- - **Performance-Oriented**: Each icon is packaged individually, ensuring that only the required assets are included in the final bundle.
50
- - **Single-Style Icons**: Icons are separated by style (e.g., `Bold`, `Linear`), enabling more precise imports.
51
- - **Lightweight SVGs**: Each icon is optimized for minimal SVG size to reduce load times.
52
-
53
- ### Properties
54
-
55
- Each icon component supports the following properties:
56
-
57
- - **`size`**: Defines the size of the icon (e.g., `24`, `"1.5em"`).
58
- - **`color`**: Sets the color of the icon (e.g., `"#000"`, `"currentColor"`).
59
- - **`mirrored`**: Flips the icon horizontally when set to `true`.
35
+ ### Global Configuration (Provider)
60
36
 
61
- ## Advanced Usage
37
+ Wrap your application in `<SolarProvider>` to set default properties:
62
38
 
63
- ### Custom Styling
39
+ ```tsx
40
+ import { SolarProvider } from '@solar-icons/react'
41
+ import { HomeIcon } from '@solar-icons/react/linear'
64
42
 
65
- Customize icons using standard React properties or additional CSS classes:
66
-
67
- ```jsx
68
- import { ArrowUpBold } from '@solar-icons/react-perf'
69
-
70
- function CustomIcon() {
71
- return <ArrowUpBold size="48" className="custom-class" />
43
+ function App() {
44
+ return (
45
+ <SolarProvider size={24} color="currentColor" strokeWidth={1.5}>
46
+ <HomeIcon />
47
+ </SolarProvider>
48
+ )
72
49
  }
73
50
  ```
74
51
 
75
- ## Performance Benefits
76
-
77
- Unlike the versatile `@solar-icons/react` package, `@solar-icons/react-perf` focuses solely on direct imports for enhanced performance and reduced overhead. This package avoids using a provider or dual SSR/CSR support to ensure lightweight integration.
52
+ ## Documentation
78
53
 
79
- ## Contributing
80
-
81
- Contributions to further optimize and expand the `@solar-icons/react-perf` package are welcome. If you wish to contribute, please follow our [contribution guidelines](../../CONTRIBUTING.md).
54
+ For installation guides, API reference, and a searchable icon catalog, visit the [React Documentation](https://solar-icons.vercel.app/docs/v2/frameworks/react).
82
55
 
83
56
  ## License
84
57
 
85
- The `@solar-icons/react-perf` code and library are licensed under the [MIT License](./LICENSE). The Solar icon pack itself is licensed under **CC BY 4.0** by **480 Design**, which requires attribution for any use. For more information and to view the original icon set, visit [480 Design's Figma page](https://www.figma.com/community/file/1166831539721848736).
86
-
87
- ## Acknowledgements
88
-
89
- Special thanks to **480 Design** for creating the original Solar icon pack. Additional appreciation goes to **Phosphor Icons** and **Lucide Icons** for their inspiration in shaping the design and approach of the Solar icon packages.
90
-
91
- ---
92
-
93
- For more details on other packages and usage examples, refer to the [project's main documentation](../../README.md).
58
+ MIT License. Icons by 480 Design (CC BY 4.0).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solar-icons/react",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.2",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -84,7 +84,7 @@
84
84
  "tsdown": "^0.22.4",
85
85
  "typescript": "^6.0.3",
86
86
  "vitest": "^4.1.10",
87
- "@solar-icons/core": "2.0.0-beta.0"
87
+ "@solar-icons/core": "2.0.0-beta.1"
88
88
  },
89
89
  "peerDependencies": {
90
90
  "react": ">= 16.8",