@devjuliovilla/jv-ui 1.6.1 → 1.6.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.
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ export class App {}
|
|
|
44
44
|
| Buttons | `JvButton`, `JvButtonGroup`, `JvIconButton` |
|
|
45
45
|
| Forms | `JvInput`, `JvTextarea`, `JvSelect`, `JvCheckbox`, `JvRadio`, `JvSwitch`, `JvFormContainer` |
|
|
46
46
|
| Data Grid | `JvGrid` — full-featured data table (see below) |
|
|
47
|
-
|
|
|
47
|
+
| Containers | `JvCard`, `JvSection`, `JvDivider` |
|
|
48
48
|
| List | `JvList`, `JvListItem` — list with title, description, icons, badges, and interactive items |
|
|
49
49
|
| Feedback | `JvAlert`, `JvBadge`, `JvLoader`, `JvToast` |
|
|
50
50
|
| Dialogs | `JvDialog`, `JvConfirmDialog` |
|
|
@@ -359,7 +359,68 @@ node tools/generate-icons.mjs
|
|
|
359
359
|
|
|
360
360
|
This reads all SVG files from `lucide-static/icons` and produces `jv-icon-registry.ts` with the complete set (~1500 icons). Run it after updating `lucide-static` to keep icons in sync.
|
|
361
361
|
|
|
362
|
-
##
|
|
362
|
+
## Layout API
|
|
363
|
+
|
|
364
|
+
### JvDashboardShell
|
|
365
|
+
|
|
366
|
+
```typescript
|
|
367
|
+
import { JvDashboardShellComponent } from '@devjuliovilla/jv-ui';
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
| Input | Type | Default | Description |
|
|
371
|
+
|---|---|---|---|
|
|
372
|
+
| `title` | `string` | — | App / brand title |
|
|
373
|
+
| `sidebarSubtitle` | `string` | `''` | Subtitle below brand |
|
|
374
|
+
| `brandIcon` | `string` | `'monitor'` | Brand Lucide icon |
|
|
375
|
+
| `navItems` | `JvNavItem[]` | `[]` | Navigation items (supports nested children) |
|
|
376
|
+
| `sidebarCollapsed` | `boolean` | `false` | Desktop sidebar collapsed state |
|
|
377
|
+
| `mobileSidebarOpen` | `boolean` | `false` | Mobile sidebar open/closed |
|
|
378
|
+
| `topbarTitle` | `string` | `''` | Topbar page title |
|
|
379
|
+
| `topbarSubtitle` | `string` | `''` | Topbar subtitle |
|
|
380
|
+
| `currentTheme` | `JvTheme` | `'light'` | Active theme value |
|
|
381
|
+
| `themeOptions` | `JvThemeOption[]` | `[]` | Theme selector options |
|
|
382
|
+
| `topbarActions` | `JvTopbarAction[]` | `[]` | Icon buttons in topbar |
|
|
383
|
+
| `showThemeSelector` | `boolean` | `true` | Show theme pills |
|
|
384
|
+
|
|
385
|
+
| Output | Description |
|
|
386
|
+
|---|---|
|
|
387
|
+
| `menuClick` | Hamburger button clicked — toggle mobile sidebar |
|
|
388
|
+
| `mobileClose` | Backdrop clicked or navigation selected — close mobile sidebar |
|
|
389
|
+
| `sidebarCollapseToggle` | Collapse toggle clicked — collapse/expand sidebar |
|
|
390
|
+
| `themeChange` | Theme pill clicked |
|
|
391
|
+
| `topbarActionClick` | Topbar action button clicked |
|
|
392
|
+
|
|
393
|
+
**Mobile behavior:** at viewports ≤ 900px the sidebar becomes a fixed overlay with slide-in animation (`transform: translateX`) and a semi-transparent backdrop. The sidebar emits `mobileClose` when the backdrop is clicked or a nav link is followed.
|
|
394
|
+
|
|
395
|
+
### JvSidebar
|
|
396
|
+
|
|
397
|
+
| Input | Type | Default | Description |
|
|
398
|
+
|---|---|---|---|
|
|
399
|
+
| `title` | `string` | — | Brand title |
|
|
400
|
+
| `subtitle` | `string` | `''` | Brand subtitle |
|
|
401
|
+
| `brandIcon` | `string` | `'monitor'` | Brand icon |
|
|
402
|
+
| `items` | `JvNavItem[]` | `[]` | Navigation items |
|
|
403
|
+
| `collapsed` | `boolean` | `false` | Collapse to icon-only |
|
|
404
|
+
| `mobileOpen` | `boolean` | `false` | Show on mobile |
|
|
405
|
+
| `ariaLabel` | `string` | `'Sidebar navigation'` | Accessible label |
|
|
406
|
+
|
|
407
|
+
| Output | Description |
|
|
408
|
+
|---|---|
|
|
409
|
+
| `collapseToggle` | Collapse button clicked |
|
|
410
|
+
| `mobileClose` | Backdrop or nav item interaction — request close |
|
|
411
|
+
|
|
412
|
+
## Responsive Design
|
|
413
|
+
|
|
414
|
+
The library includes basic responsive behavior:
|
|
415
|
+
|
|
416
|
+
- **Breakpoints** defined as CSS custom properties: `--jv-breakpoint-sm` (640px), `--jv-breakpoint-md` (768px), `--jv-breakpoint-lg` (1024px), `--jv-breakpoint-xl` (1280px)
|
|
417
|
+
- **Dashboard shell** collapses to single column at ≤ 900px; sidebar becomes a slide-in overlay with backdrop
|
|
418
|
+
- **Topbar** stacks vertically at ≤ 900px
|
|
419
|
+
- **Grid** pagination and toolbar stack at ≤ 640px; table scrolls horizontally with `overflow-x: auto`
|
|
420
|
+
- **Flex-wrap** is used extensively for natural overflow handling
|
|
421
|
+
- **Dialog** and **Toast** constrain width with `min()` to never exceed the viewport
|
|
422
|
+
|
|
423
|
+
## Services
|
|
363
424
|
|
|
364
425
|
| Service | Import Path | Description |
|
|
365
426
|
|---|---|---|
|