@rfdtech/components 1.0.0 → 1.0.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 +11 -1
  2. package/package.json +12 -1
package/README.md CHANGED
@@ -2,7 +2,17 @@
2
2
 
3
3
  Shared React component library for Ghana School of Law (GSL) projects.
4
4
 
5
- Requires React 18+ and a bundler. Styles are included automatically when you import from `@rfdtech/components` — no separate CSS import is needed.
5
+ Requires React 18+ and a bundler that processes CSS (Vite, Webpack, etc.).
6
+
7
+ ## Styles
8
+
9
+ Component styles load automatically when you import from `@rfdtech/components` (the JS bundle includes `import './index.css'`). For reliable styling in production, add this once in your app entry (`main.tsx` or `App.tsx`):
10
+
11
+ ```ts
12
+ import "@rfdtech/components/style.css";
13
+ ```
14
+
15
+ After upgrading the package, clear Vite's dependency cache if styles look stale: `rm -rf node_modules/.vite`.
6
16
 
7
17
  ## Shared theming
8
18
 
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@rfdtech/components",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Shared React component library for Ghana School of Law (GSL) projects",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
+ "sideEffects": ["**/*.css", "./dist/index.css"],
9
10
  "exports": {
10
11
  ".": {
11
12
  "import": {
@@ -16,6 +17,16 @@
16
17
  "types": "./dist/index.d.ts",
17
18
  "default": "./dist/index.cjs"
18
19
  }
20
+ },
21
+ "./style.css": {
22
+ "import": "./dist/index.css",
23
+ "require": "./dist/index.css",
24
+ "default": "./dist/index.css"
25
+ },
26
+ "./dist/index.css": {
27
+ "import": "./dist/index.css",
28
+ "require": "./dist/index.css",
29
+ "default": "./dist/index.css"
19
30
  }
20
31
  },
21
32
  "files": [