@j3m-quantum/ui 1.0.0 → 1.3.0

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
@@ -84,52 +84,59 @@ function App() {
84
84
 
85
85
  ## Theme Modes
86
86
 
87
- ### Dark Mode
87
+ The design system supports four theme modes. Use the `.j3m-app-bg` utility class for proper backgrounds:
88
+
89
+ ### Light Mode (Default)
88
90
 
89
- Add the `dark` class to your root element:
91
+ ```tsx
92
+ <div className="j3m-app-bg">
93
+ {/* Light themed content */}
94
+ </div>
95
+ ```
96
+
97
+ ### Dark Mode
90
98
 
91
99
  ```tsx
92
- <div className="dark">
100
+ <div className="dark j3m-app-bg">
93
101
  {/* Dark themed content */}
94
102
  </div>
95
103
  ```
96
104
 
97
- ### Glass Mode
105
+ ### Glass Mode (Light)
98
106
 
99
- Add `theme-glass` class for frosted glass effects:
107
+ Frosted glass on colorful gradient background:
100
108
 
101
109
  ```tsx
102
- <div className="theme-glass">
103
- {/* Glass themed content */}
110
+ <div className="theme-glass j3m-app-bg">
111
+ {/* Light glass themed content */}
104
112
  </div>
105
113
  ```
106
114
 
107
- Combine with dark mode:
115
+ ### Glass Mode (Dark)
116
+
117
+ Dark frosted glass on deep gradient - sophisticated industrial aesthetic:
108
118
 
109
119
  ```tsx
110
- <div className="dark theme-glass">
120
+ <div className="dark theme-glass j3m-app-bg">
111
121
  {/* Dark glass themed content */}
112
122
  </div>
113
123
  ```
114
124
 
115
- ## Design Tokens
125
+ ### Mesh Variant
116
126
 
117
- ### Color System: Radix 12-Step Scale
127
+ For a more complex gradient background, add the `.mesh` class:
118
128
 
119
- Colors use HSL format for easy theming and opacity manipulation:
129
+ ```tsx
130
+ <div className="theme-glass j3m-app-bg mesh">
131
+ {/* Glass with mesh gradient */}
132
+ </div>
133
+ ```
120
134
 
121
- ```css
122
- /* Change accent color once, updates everywhere */
123
- :root {
124
- --primary: 24 91% 62%; /* Your brand orange */
125
- }
135
+ ## Design Tokens
126
136
 
127
- /* Usage with opacity */
128
- background: hsl(var(--primary)); /* Solid */
129
- background: hsl(var(--primary) / 0.3); /* 30% opacity */
130
- ```
137
+ ### Color System: 12-Step Scale
131
138
 
132
- ### Color Scales
139
+ Colors use HEX format for simplicity and compatibility:
133
140
 
134
141
  | Scale | Steps | Purpose |
135
142
  |-------|-------|---------|
@@ -150,7 +157,7 @@ background: hsl(var(--primary) / 0.3); /* 30% opacity */
150
157
 
151
158
  | Token | Description |
152
159
  |-------|-------------|
153
- | `--primary` | Brand accent (orange-9) |
160
+ | `--primary` | Brand accent (#F58446) |
154
161
  | `--background` | Page background |
155
162
  | `--foreground` | Main text |
156
163
  | `--muted` | Subtle backgrounds |
@@ -158,6 +165,42 @@ background: hsl(var(--primary) / 0.3); /* 30% opacity */
158
165
  | `--ring` | Focus rings |
159
166
  | `--radius` | Global border radius (12px) |
160
167
 
168
+ ### Background & Surface Tokens
169
+
170
+ A hierarchical system that adapts to all four theme modes automatically:
171
+
172
+ | Token | Purpose |
173
+ |-------|---------|
174
+ | `--j3m-bg-app` | Root app canvas |
175
+ | `--j3m-bg-page` | Content area |
176
+ | `--j3m-bg-surface` | Cards, sections |
177
+ | `--j3m-bg-surface-hover` | Hovered cards |
178
+ | `--j3m-bg-surface-active` | Active/pressed cards |
179
+ | `--j3m-bg-elevated` | Raised elements |
180
+ | `--j3m-bg-overlay` | Popovers, tooltips |
181
+ | `--j3m-bg-muted` | Subtle backgrounds |
182
+ | `--j3m-bg-subtle` | Very subtle backgrounds |
183
+ | `--j3m-bg-element` | Interactive elements |
184
+ | `--j3m-bg-input` | Input backgrounds |
185
+ | `--j3m-bg-sidebar` | Sidebar background |
186
+
187
+ These tokens automatically resolve to the correct values in each theme mode:
188
+ - **Light/Dark solid**: Solid gray colors
189
+ - **Glass Light**: Frosted white glass fills
190
+ - **Glass Dark**: Dark frosted glass with blue tint
191
+
192
+ ### Dark Glass Primitives
193
+
194
+ For advanced dark glass customization:
195
+
196
+ | Token | Description |
197
+ |-------|-------------|
198
+ | `--j3m-glass-dark-surface` | Main dark glass surface |
199
+ | `--j3m-glass-dark-elevated` | Elevated dark glass |
200
+ | `--j3m-glass-dark-overlay` | Dark glass overlays |
201
+ | `--j3m-glass-dark-border` | Subtle white border |
202
+ | `--j3m-glass-dark-element` | Interactive element highlight |
203
+
161
204
  ## Included Dependencies
162
205
 
163
206
  All of these are bundled and ready to use:
@@ -176,31 +219,139 @@ All of these are bundled and ready to use:
176
219
  ## Exports
177
220
 
178
221
  ```typescript
179
- // Components
180
- import { Button, Card, Dialog, ... } from '@j3m-quantum/ui'
222
+ // Everything from one package!
223
+ import {
224
+ Button, Card, Dialog,
225
+ SidebarProvider, Sidebar, SidebarContent,
226
+ NavMain, NavUser, SiteHeader
227
+ } from '@j3m-quantum/ui'
181
228
 
182
229
  // Styles (CSS)
183
230
  import '@j3m-quantum/ui/styles'
184
231
  ```
185
232
 
233
+ ## Blocks
234
+
235
+ Pre-built, composable sidebar components for enterprise applications.
236
+
237
+ ### Sidebar with Header
238
+
239
+ A collapsible sidebar with sticky header, based on shadcn's sidebar-16.
240
+
241
+ ```tsx
242
+ import {
243
+ SidebarProvider,
244
+ SidebarInset,
245
+ SidebarTrigger,
246
+ Sidebar,
247
+ SidebarContent,
248
+ SidebarFooter,
249
+ SiteHeader,
250
+ NavMain,
251
+ NavUser,
252
+ } from '@j3m-quantum/ui'
253
+ import { HomeIcon, SettingsIcon } from 'lucide-react'
254
+
255
+ const navItems = [
256
+ {
257
+ title: "Dashboard",
258
+ url: "/dashboard",
259
+ icon: HomeIcon,
260
+ isActive: true,
261
+ items: [
262
+ { title: "Overview", url: "/dashboard" },
263
+ { title: "Analytics", url: "/dashboard/analytics" },
264
+ ],
265
+ },
266
+ ]
267
+
268
+ export default function Dashboard() {
269
+ return (
270
+ <div style={{ "--header-height": "3.5rem" }}>
271
+ <SidebarProvider>
272
+ <SiteHeader
273
+ trigger={<SidebarTrigger />}
274
+ breadcrumbs={[{ label: "Dashboard" }]}
275
+ />
276
+ <div className="flex flex-1">
277
+ <Sidebar>
278
+ <SidebarContent>
279
+ <NavMain items={navItems} />
280
+ </SidebarContent>
281
+ <SidebarFooter>
282
+ <NavUser user={{ name: "User", email: "user@example.com", avatar: "" }} />
283
+ </SidebarFooter>
284
+ </Sidebar>
285
+ <SidebarInset>
286
+ <main className="p-4">
287
+ {/* Your content */}
288
+ </main>
289
+ </SidebarInset>
290
+ </div>
291
+ </SidebarProvider>
292
+ </div>
293
+ )
294
+ }
295
+ ```
296
+
297
+ ### Block Components
298
+
299
+ | Component | Description |
300
+ |-----------|-------------|
301
+ | `SiteHeader` | Sticky header with breadcrumbs and trigger slot |
302
+ | `NavMain` | Collapsible navigation groups with sub-items |
303
+ | `NavProjects` | Projects section with dropdown actions |
304
+ | `NavSecondary` | Secondary links (Support, Feedback) |
305
+ | `NavUser` | User avatar with dropdown menu |
306
+ | `SearchForm` | Search input component |
307
+
308
+ ### Custom Navigation
309
+
310
+ ```tsx
311
+ import { NavMain, type NavItem } from '@j3m-quantum/ui'
312
+ import { HomeIcon, SettingsIcon } from 'lucide-react'
313
+
314
+ const navItems: NavItem[] = [
315
+ {
316
+ title: "Dashboard",
317
+ url: "/dashboard",
318
+ icon: HomeIcon,
319
+ isActive: true,
320
+ items: [
321
+ { title: "Overview", url: "/dashboard" },
322
+ { title: "Analytics", url: "/dashboard/analytics" },
323
+ ],
324
+ },
325
+ {
326
+ title: "Settings",
327
+ url: "/settings",
328
+ icon: SettingsIcon,
329
+ items: [
330
+ { title: "Profile", url: "/settings/profile" },
331
+ { title: "Team", url: "/settings/team" },
332
+ ],
333
+ },
334
+ ]
335
+
336
+ <NavMain items={navItems} />
337
+ ```
338
+
186
339
  ## Customization
187
340
 
188
- Override CSS variables after the import using HSL format:
341
+ Override CSS variables after the import:
189
342
 
190
343
  ```css
191
344
  @import "tailwindcss";
192
345
  @import "tw-animate-css";
193
346
  @import "@j3m-quantum/ui/styles";
194
347
 
195
- /* Custom overrides - use HSL values */
348
+ /* Custom overrides */
196
349
  :root {
197
- --primary: 210 100% 50%; /* Blue accent instead of orange */
350
+ --primary: #3B82F6; /* Blue accent instead of orange */
198
351
  --radius: 8px;
199
352
  }
200
353
  ```
201
354
 
202
- The HSL format allows automatic opacity variations throughout the UI.
203
-
204
355
  ## Troubleshooting
205
356
 
206
357
  ### Animations not working (Dialog, Sheet, Select, etc.)
@@ -253,6 +404,10 @@ npm update @j3m-quantum/ui
253
404
  npm install @j3m-quantum/ui@latest
254
405
  ```
255
406
 
407
+ ## Third-Party Licenses
408
+
409
+ - **Event Calendar**: Based on [big-calendar](https://github.com/lramos33/big-calendar) by Leonardo Ramos, MIT License
410
+
256
411
  ## License
257
412
 
258
413
  MIT