@npm-questionpro/wick-ui-icon 1.3.1 → 2.0.0-next.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.
package/README.md CHANGED
@@ -1,14 +1,19 @@
1
- ````markdown
2
1
  # @npm-questionpro/wick-ui-icon
3
2
 
4
- An icon font library featuring Material icons and custom icons for QuestionPro. This package generates a web font from SVG icons and provides the corresponding CSS for usage in web applications.
3
+ An icon font library featuring Material icons and custom icons for QuestionPro.
4
+ This package generates a web font from SVG icons and provides the corresponding
5
+ CSS for usage in web applications.
5
6
 
6
7
  ## Features
7
8
 
8
- - **Material Icons**: Includes icons from Google's Material Design Icons.
9
- - **Custom Icons**: Allows you to include custom SVG icons by placing them in the appropriate folders.
10
- - **Web Font**: The icons are bundled as a web font for easy inclusion in web projects.
11
- - **CSS Integration**: The package generates a CSS file to easily style and use the icons.
9
+ - **Material Symbols**: Includes icons from Google's Material Design Symbols
10
+ (grad200 fill1 wight400 size24px).
11
+ - **Custom Icons**: Allows you to include custom SVG icons by placing them in
12
+ the appropriate folders.
13
+ - **Web Font**: The icons are bundled as a web font for easy inclusion in web
14
+ projects.
15
+ - **CSS Integration**: The package generates a CSS file to easily style and use
16
+ the icons.
12
17
 
13
18
  ## Installation
14
19
 
@@ -21,30 +26,47 @@ pnpm add @npm-questionpro/wick-ui-icon
21
26
  # or
22
27
  yarn add @npm-questionpro/wick-ui-icon
23
28
  ```
24
- ````
25
29
 
26
30
  ## Usage
27
31
 
28
- 1. **CSS Integration**: To use the icons in your project, include the `wu-icon.css` file in your HTML:
32
+ 1. **CSS Integration**: To use the icons in your project, include the
33
+ `wu-icon.css` file in your HTML/Globals CSS/Main ts/tsx/js/jsx:
29
34
 
30
35
  ```html
31
- <link rel="stylesheet" href="path-to-wick-ui-icon/dist/wu-icon.css" />
36
+ <link
37
+ rel="stylesheet"
38
+ href="@npm-questionpro/wick-ui-icon/dist/wu-icon.css"
39
+ />
32
40
  ```
33
41
 
34
- 2. **Font Classes**: After including the CSS file, you can use the icons by adding the corresponding class to an element. For example:
42
+ ```css
43
+ @import url('@npm-questionpro/wick-ui-icon/dist/wu-icon.css');
44
+ ```
45
+
46
+ ```jsx
47
+ import '@npm-questionpro/wick-ui-icon/dist/wu-icon.css'
48
+ ```
49
+
50
+ 2. **Font Classes**: After including the CSS file, you can use the icons by
51
+ adding the corresponding class to an element. For example:
35
52
 
36
53
  ```jsx
37
54
  <i className="wm-home"></i>
55
+ <span className="wc-logo"></span>
38
56
  ```
39
57
 
40
- The class names follow the format `wc-{icon-name}`. Material icons will be prefixed with `wm-`, and custom icons with `wc-`.
58
+ The class names follow the format `wc-{icon-name}`. Material icons will be
59
+ prefixed with `wm-`, custom icons with `wc-`, production icons with `wp-`.
41
60
 
42
61
  ## Directory Structure
43
62
 
44
- - `svg/`: Place your custom SVG icons in this folder. The folder structure will determine the icon name prefix.
63
+ - `svg/`: Place your custom SVG icons in this folder. The folder structure will
64
+ determine the icon name prefix.
65
+ - For custom icons, upload all the svg files to icomoon and then download
66
+ generated svgs. Put them in `custom` folder.
45
67
  - `dist/`: Contains the generated font and CSS file.
46
- - `.temp-svg/`: Temporary folder used for processing the SVG files.
47
- - `material-design-icons/`: Clone and update the Material Design icons repository using the provided scripts.
68
+ - `material-design-icons/`: Clone and update the Material Design icons
69
+ repository using the provided scripts.
48
70
 
49
71
  ## Scripts
50
72
 
@@ -81,7 +103,8 @@ To release a new version, use the following commands:
81
103
 
82
104
  You can clone or update the Material Design icons using the following scripts:
83
105
 
84
- - Clone Material Design Icons. This will take a lot of time, so it's recommended to do it only once:
106
+ - Clone Material Design Icons. This will take a lot of time, so it's recommended
107
+ to do it only once:
85
108
 
86
109
  ```bash
87
110
  npm run mat:clone
@@ -101,8 +124,79 @@ You can clone or update the Material Design icons using the following scripts:
101
124
 
102
125
  ### Local Development
103
126
 
104
- To develop locally, you can modify the SVG icons in the `svg/` directory and run the build command to regenerate the font and CSS.
127
+ To develop locally, you can modify the SVG icons in the `svg/` directory and run
128
+ the build command to regenerate the font and CSS.
105
129
 
106
130
  ### Cleaning Up Unnecessary Files
107
131
 
108
- During the build process, unnecessary files (like LESS, SCSS, and HTML files) will be removed to ensure a clean output.
132
+ During the build process, unnecessary files (like LESS, SCSS, and HTML files)
133
+ will be removed to ensure a clean output.
134
+
135
+ ---
136
+
137
+ # Icon Contribution Guide
138
+
139
+ Follow the steps below to create and add a new icon to the project:
140
+
141
+ ## Steps
142
+
143
+ ### 1. Download SVG Icons
144
+
145
+ - Open **Figma** and download the required icons in **SVG format**.
146
+
147
+ ### 2. Upload to Icomoon
148
+
149
+ - Go to the [Icomoon App](https://icomoon.io/app/).
150
+ - Upload the downloaded **SVG icons**.
151
+ - Verify that the icons render correctly.
152
+ - Download the generated package from Icomoon.
153
+
154
+ ### 3. Install Dependencies
155
+
156
+ Make sure the required dev dependencies are installed:
157
+
158
+ ```bash
159
+ pnpm install -D svgo svgtofont
160
+ ```
161
+
162
+ Run:
163
+
164
+ ```bash
165
+ pnpm install
166
+ ```
167
+
168
+ ### 4. Build the Package
169
+
170
+ ```bash
171
+ pnpm build
172
+ ```
173
+
174
+ ### 5. Version Update
175
+
176
+ Choose the appropriate version update:
177
+
178
+ ```bash
179
+ pnpm version patch # for bug fixes
180
+ pnpm version minor # for new features
181
+ pnpm version major # for breaking changes
182
+ ```
183
+
184
+ ### 6. Push to Repository
185
+
186
+ ```bash
187
+ git push
188
+ ```
189
+
190
+ ### 7. Generate Icons
191
+
192
+ Run the icon generation script:
193
+
194
+ ```bash
195
+ node wickIcon.js
196
+ ```
197
+
198
+ > ⚡ Make sure to run this command from the **wick-ui-lib** directory.
199
+
200
+ ---
201
+
202
+ ✅ Done! The new icons should now be available in the project.