@rhavenside/custom-ui-library 1.0.2 → 1.0.3

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 +11 -2
  2. package/package.json +11 -1
package/README.md CHANGED
@@ -19,15 +19,24 @@ import { Button, Input, Modal, Progress } from '@rhavenside/custom-ui-library';
19
19
  ### CSS Import
20
20
 
21
21
  ```javascript
22
+ // Option 1: Direct path (recommended for Vite projects)
22
23
  import '@rhavenside/custom-ui-library/dist/style.css';
24
+
25
+ // Option 2: Using the exports field (may require package reinstall)
26
+ import '@rhavenside/custom-ui-library/style.css';
23
27
  ```
24
28
 
29
+ **Note:** If the CSS import doesn't resolve:
30
+ 1. Make sure you've installed the latest version: `npm install @rhavenside/custom-ui-library@latest`
31
+ 2. Try using the direct path: `import '@rhavenside/custom-ui-library/dist/style.css'`
32
+ 3. If using Vite, you may need to restart the dev server after installing the package
33
+
25
34
  ### Example
26
35
 
27
36
  ```jsx
28
37
  import React from 'react';
29
38
  import { Button, Input, Modal } from '@rhavenside/custom-ui-library';
30
- import '@rhavenside/custom-ui-library/dist/style.css';
39
+ import '@rhavenside/custom-ui-library/style.css';
31
40
 
32
41
  function App() {
33
42
  return (
@@ -629,7 +638,7 @@ All components use CSS Custom Properties that can be overridden.
629
638
  ```
630
639
 
631
640
  ```javascript
632
- import '@rhavenside/custom-ui-library/dist/style.css';
641
+ import '@rhavenside/custom-ui-library/style.css';
633
642
  import './theme.css'; // Import after custom-ui-library
634
643
  ```
635
644
 
package/package.json CHANGED
@@ -1,11 +1,21 @@
1
1
  {
2
2
  "name": "@rhavenside/custom-ui-library",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "description": "A customizable React UI component library with CSS variables",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.esm.js",
8
8
  "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.esm.js",
12
+ "require": "./dist/index.cjs.js",
13
+ "types": "./dist/index.d.ts"
14
+ },
15
+ "./dist/style.css": "./dist/style.css",
16
+ "./style.css": "./dist/style.css",
17
+ "./package.json": "./package.json"
18
+ },
9
19
  "files": [
10
20
  "dist",
11
21
  "README.md"