@refineui/web-icons 0.3.18 → 0.3.19

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 +10 -13
  2. package/package.json +12 -1
package/README.md CHANGED
@@ -19,27 +19,24 @@ pnpm add @refineui/web-icons
19
19
 
20
20
  You need to load the font CSS once to display icons.
21
21
 
22
- **HTML**
22
+ **With a bundler (recommended)**
23
23
 
24
- ```html
25
- <link
26
- rel="stylesheet"
27
- href="node_modules/@refineui/web-icons/dist/fonts/refineui-system-icons.css"
28
- />
24
+ ```javascript
25
+ import "@refineui/web-icons/dist/fonts/refineui-system-icons.css";
29
26
  ```
30
27
 
31
- **CSS**
28
+ Bundlers (Vite, Webpack, Parcel, etc.) resolve this path via the package `exports` field.
32
29
 
33
- ```css
34
- @import "@refineui/web-icons/dist/fonts/refineui-system-icons.css";
35
- ```
30
+ **Without a bundler (plain HTML)**
36
31
 
37
- **JavaScript**
32
+ The package does not expose a URL you can use directly in `href`. Copy the CSS (and fonts) from `node_modules/@refineui/web-icons/dist/fonts/` into your project’s static folder (e.g. `public/` or `static/`) and link it:
38
33
 
39
- ```javascript
40
- import "@refineui/web-icons/dist/fonts/refineui-system-icons.css";
34
+ ```html
35
+ <link rel="stylesheet" href="/path/to/your-copy/refineui-system-icons.css" />
41
36
  ```
42
37
 
38
+ Or use a CDN if you publish the file there.
39
+
43
40
  ### 2. Using HTML Strings (createIconHTML)
44
41
 
45
42
  Pass an icon name and style (`regular` | `filled`), and it returns a function that accepts size, color, and className.
package/package.json CHANGED
@@ -1,10 +1,21 @@
1
1
  {
2
2
  "name": "@refineui/web-icons",
3
- "version": "0.3.18",
3
+ "version": "0.3.19",
4
4
  "description": "RefineUI System Icons for Web",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
7
7
  "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.esm.js",
11
+ "require": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ },
14
+ "./dist/fonts/refineui-system-icons.css": "./dist/fonts/refineui-system-icons.css",
15
+ "./dist/fonts/refineui-system-icons-regular.css": "./dist/fonts/refineui-system-icons-regular.css",
16
+ "./dist/fonts/refineui-system-icons-filled.css": "./dist/fonts/refineui-system-icons-filled.css",
17
+ "./package.json": "./package.json"
18
+ },
8
19
  "files": [
9
20
  "dist",
10
21
  "src/metadata.json"