@j3m-quantum/ui 0.7.2 → 0.7.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 +50 -7
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -9,11 +9,12 @@ J3M Quantum UI - A themed component library based on shadcn/ui with J3M design t
9
9
  - ✨ **Glass Mode** - Frosted glass effects via `.theme-glass` class
10
10
  - 📦 **55+ Components** - All shadcn/ui components with J3M styling
11
11
  - 🎯 **TweakCN Style** - Single CSS import for complete theming
12
+ - 🎬 **Smooth Animations** - Powered by tw-animate-css
12
13
 
13
14
  ## Installation
14
15
 
15
16
  ```bash
16
- npm install @j3m-quantum/ui
17
+ npm install @j3m-quantum/ui tw-animate-css
17
18
  ```
18
19
 
19
20
  ### Peer Dependencies
@@ -27,8 +28,19 @@ npm install react react-dom tailwindcss lucide-react
27
28
  Plus Radix UI primitives for each component you use:
28
29
 
29
30
  ```bash
30
- # Example for Button, Dialog, Select
31
+ # Core components
31
32
  npm install @radix-ui/react-slot @radix-ui/react-dialog @radix-ui/react-select
33
+
34
+ # All Radix packages (if using all components)
35
+ npm install @radix-ui/react-accordion @radix-ui/react-alert-dialog @radix-ui/react-avatar \
36
+ @radix-ui/react-checkbox @radix-ui/react-collapsible @radix-ui/react-context-menu \
37
+ @radix-ui/react-dialog @radix-ui/react-dropdown-menu @radix-ui/react-hover-card \
38
+ @radix-ui/react-label @radix-ui/react-menubar @radix-ui/react-navigation-menu \
39
+ @radix-ui/react-popover @radix-ui/react-progress @radix-ui/react-radio-group \
40
+ @radix-ui/react-scroll-area @radix-ui/react-select @radix-ui/react-separator \
41
+ @radix-ui/react-slider @radix-ui/react-slot @radix-ui/react-switch \
42
+ @radix-ui/react-tabs @radix-ui/react-toggle @radix-ui/react-toggle-group \
43
+ @radix-ui/react-tooltip
32
44
  ```
33
45
 
34
46
  ## Quick Start
@@ -55,24 +67,34 @@ export default defineConfig({
55
67
  })
56
68
  ```
57
69
 
58
- ### 3. Import Styles
70
+ ### 3. Import Styles (IMPORTANT ORDER)
59
71
 
60
72
  ```css
61
73
  /* src/index.css */
62
74
  @import "tailwindcss";
63
- @import "@j3m-quantum/ui/styles";
75
+ @import "tw-animate-css"; /* Required for animations */
76
+ @import "@j3m-quantum/ui/styles"; /* J3M theme and tokens */
64
77
  ```
65
78
 
79
+ > ⚠️ **Order matters!** Import `tw-animate-css` before `@j3m-quantum/ui/styles` to ensure animations work correctly on Dialog, Sheet, Select, Popover, and other overlay components.
80
+
66
81
  ### 4. Use Components
67
82
 
68
83
  ```tsx
69
- import { Button, Card, Input } from '@j3m-quantum/ui'
84
+ import { Button, Card, Input, Dialog, DialogTrigger, DialogContent } from '@j3m-quantum/ui'
70
85
 
71
86
  function App() {
72
87
  return (
73
88
  <Card>
74
89
  <Input placeholder="Enter email" />
75
- <Button>Submit</Button>
90
+ <Dialog>
91
+ <DialogTrigger asChild>
92
+ <Button>Open Dialog</Button>
93
+ </DialogTrigger>
94
+ <DialogContent>
95
+ <p>This dialog has smooth animations!</p>
96
+ </DialogContent>
97
+ </Dialog>
76
98
  </Card>
77
99
  )
78
100
  }
@@ -151,6 +173,7 @@ Override CSS variables after the import:
151
173
 
152
174
  ```css
153
175
  @import "tailwindcss";
176
+ @import "tw-animate-css";
154
177
  @import "@j3m-quantum/ui/styles";
155
178
 
156
179
  /* Custom overrides */
@@ -160,7 +183,27 @@ Override CSS variables after the import:
160
183
  }
161
184
  ```
162
185
 
186
+ ## Troubleshooting
187
+
188
+ ### Animations not working (Dialog, Sheet, Select, etc.)
189
+ Make sure you've:
190
+ 1. Installed `tw-animate-css`: `npm install tw-animate-css`
191
+ 2. Imported it **before** the J3M styles:
192
+ ```css
193
+ @import "tw-animate-css";
194
+ @import "@j3m-quantum/ui/styles";
195
+ ```
196
+
197
+ ### "Invalid hook call" error
198
+ If using local file links during development, add `dedupe` to your Vite config:
199
+ ```typescript
200
+ export default defineConfig({
201
+ resolve: {
202
+ dedupe: ["react", "react-dom"],
203
+ },
204
+ })
205
+ ```
206
+
163
207
  ## License
164
208
 
165
209
  MIT
166
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@j3m-quantum/ui",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "J3M UI Component Library - themed shadcn/ui components with design tokens",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -53,6 +53,7 @@
53
53
  "react": ">=18",
54
54
  "react-dom": ">=18",
55
55
  "tailwindcss": ">=4",
56
+ "tw-animate-css": "^1.0.0",
56
57
  "@radix-ui/react-accordion": "^1.2.0",
57
58
  "@radix-ui/react-alert-dialog": "^1.1.0",
58
59
  "@radix-ui/react-aspect-ratio": "^1.1.0",