@j3m-quantum/ui 0.7.2 → 0.7.4

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
@@ -8,28 +8,16 @@ J3M Quantum UI - A themed component library based on shadcn/ui with J3M design t
8
8
  - 🌙 **Dark Mode** - Full dark theme support via `.dark` class
9
9
  - ✨ **Glass Mode** - Frosted glass effects via `.theme-glass` class
10
10
  - 📦 **55+ Components** - All shadcn/ui components with J3M styling
11
- - 🎯 **TweakCN Style** - Single CSS import for complete theming
11
+ - 🎯 **Zero Config** - Radix UI included, just install and use
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 lucide-react
17
18
  ```
18
19
 
19
- ### Peer Dependencies
20
-
21
- The package requires these peer dependencies:
22
-
23
- ```bash
24
- npm install react react-dom tailwindcss lucide-react
25
- ```
26
-
27
- Plus Radix UI primitives for each component you use:
28
-
29
- ```bash
30
- # Example for Button, Dialog, Select
31
- npm install @radix-ui/react-slot @radix-ui/react-dialog @radix-ui/react-select
32
- ```
20
+ That's it! All Radix UI primitives are bundled with the package.
33
21
 
34
22
  ## Quick Start
35
23
 
@@ -55,24 +43,34 @@ export default defineConfig({
55
43
  })
56
44
  ```
57
45
 
58
- ### 3. Import Styles
46
+ ### 3. Import Styles (IMPORTANT ORDER)
59
47
 
60
48
  ```css
61
49
  /* src/index.css */
62
50
  @import "tailwindcss";
63
- @import "@j3m-quantum/ui/styles";
51
+ @import "tw-animate-css"; /* Required for animations */
52
+ @import "@j3m-quantum/ui/styles"; /* J3M theme and tokens */
64
53
  ```
65
54
 
55
+ > ⚠️ **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.
56
+
66
57
  ### 4. Use Components
67
58
 
68
59
  ```tsx
69
- import { Button, Card, Input } from '@j3m-quantum/ui'
60
+ import { Button, Card, Input, Dialog, DialogTrigger, DialogContent } from '@j3m-quantum/ui'
70
61
 
71
62
  function App() {
72
63
  return (
73
64
  <Card>
74
65
  <Input placeholder="Enter email" />
75
- <Button>Submit</Button>
66
+ <Dialog>
67
+ <DialogTrigger asChild>
68
+ <Button>Open Dialog</Button>
69
+ </DialogTrigger>
70
+ <DialogContent>
71
+ <p>This dialog has smooth animations!</p>
72
+ </DialogContent>
73
+ </Dialog>
76
74
  </Card>
77
75
  )
78
76
  }
@@ -121,7 +119,7 @@ Combine with dark mode:
121
119
 
122
120
  ## Optional Dependencies
123
121
 
124
- Some components require additional dependencies:
122
+ Some components require additional dependencies (installed only if you use them):
125
123
 
126
124
  | Component | Dependency | Install |
127
125
  |-----------|------------|---------|
@@ -151,6 +149,7 @@ Override CSS variables after the import:
151
149
 
152
150
  ```css
153
151
  @import "tailwindcss";
152
+ @import "tw-animate-css";
154
153
  @import "@j3m-quantum/ui/styles";
155
154
 
156
155
  /* Custom overrides */
@@ -160,7 +159,27 @@ Override CSS variables after the import:
160
159
  }
161
160
  ```
162
161
 
162
+ ## Troubleshooting
163
+
164
+ ### Animations not working (Dialog, Sheet, Select, etc.)
165
+ Make sure you've:
166
+ 1. Installed `tw-animate-css`: `npm install tw-animate-css`
167
+ 2. Imported it **before** the J3M styles:
168
+ ```css
169
+ @import "tw-animate-css";
170
+ @import "@j3m-quantum/ui/styles";
171
+ ```
172
+
173
+ ### "Invalid hook call" error
174
+ If using local file links during development, add `dedupe` to your Vite config:
175
+ ```typescript
176
+ export default defineConfig({
177
+ resolve: {
178
+ dedupe: ["react", "react-dom"],
179
+ },
180
+ })
181
+ ```
182
+
163
183
  ## License
164
184
 
165
185
  MIT
166
-
package/dist/index.cjs CHANGED
@@ -2670,7 +2670,7 @@ function Progress({
2670
2670
  {
2671
2671
  "data-slot": "progress",
2672
2672
  className: cn(
2673
- "bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
2673
+ "bg-muted relative h-2 w-full overflow-hidden rounded-full",
2674
2674
  className
2675
2675
  ),
2676
2676
  ...props,