@devjuliovilla/jv-ui 1.6.0 → 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
@@ -45,6 +45,7 @@ export class App {}
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
+ | List | `JvList`, `JvListItem` — list with title, description, icons, badges, and interactive items |
48
49
  | Feedback | `JvAlert`, `JvBadge`, `JvLoader`, `JvToast` |
49
50
  | Dialogs | `JvDialog`, `JvConfirmDialog` |
50
51
  | Layout | `JvDashboardShell`, `JvSidebar`, `JvTopbar`, `JvBreadcrumb`, `JvPage` |
@@ -196,6 +197,83 @@ export class ProductsComponent {
196
197
  }
197
198
  ```
198
199
 
200
+ ## List API
201
+
202
+ ```typescript
203
+ import { JvListComponent, JvListItemComponent } from '@devjuliovilla/jv-ui';
204
+ ```
205
+
206
+ **JvList inputs:**
207
+
208
+ | Input | Type | Default | Description |
209
+ |---|---|---|---|
210
+ | `role` | `'list' \| 'navigation'` | `'list'` | ARIA role for the list |
211
+ | `variant` | `'bordered' \| null` | `null` | Outer border + border-radius around the list (items always have bottom border) |
212
+ | `ariaLabel` | `string` | `''` | Accessible label |
213
+
214
+ **JvListItem inputs:**
215
+
216
+ | Input | Type | Default | Description |
217
+ |---|---|---|---|
218
+ | `title` | `string` (required) | — | Primary text |
219
+ | `description` | `string` | `''` | Secondary text below title |
220
+ | `leadingIcon` | `string \| null` | `null` | Lucide icon name on the left |
221
+ | `disabled` | `boolean` | `false` | Gray out and block interaction |
222
+ | `active` | `boolean` | `false` | Highlight with primary color and left border |
223
+
224
+ **JvListItem outputs:**
225
+
226
+ | Output | Type |
227
+ |---|---|
228
+ | `activated` | `void` |
229
+
230
+ **Content projection:** use the `meta` attribute selector for badges, icons, or any content on the right side:
231
+
232
+ ```html
233
+ <jv-list-item title="Inbox" description="New messages">
234
+ <jv-badge tone="primary" meta>3</jv-badge>
235
+ <jv-icon name="chevron-right" meta />
236
+ </jv-list-item>
237
+ ```
238
+
239
+ ### Example
240
+
241
+ ```typescript
242
+ import { Component } from '@angular/core';
243
+ import { JvListComponent, JvListItemComponent, JvBadgeComponent } from '@devjuliovilla/jv-ui';
244
+
245
+ @Component({
246
+ selector: 'app-nav-list',
247
+ standalone: true,
248
+ imports: [JvListComponent, JvListItemComponent, JvBadgeComponent],
249
+ template: `
250
+ <jv-list variant="bordered">
251
+ <jv-list-item
252
+ title="Dashboard"
253
+ description="Main overview"
254
+ leadingIcon="layout-dashboard"
255
+ [active]="true"
256
+ />
257
+ <jv-list-item
258
+ title="Notifications"
259
+ description="3 pending"
260
+ (activated)="onOpen()"
261
+ >
262
+ <jv-badge tone="primary" meta>3</jv-badge>
263
+ </jv-list-item>
264
+ <jv-list-item
265
+ title="Reports"
266
+ description="Coming soon"
267
+ [disabled]="true"
268
+ />
269
+ </jv-list>
270
+ `,
271
+ })
272
+ export class NavListComponent {
273
+ onOpen() { /* handle activation */ }
274
+ }
275
+ ```
276
+
199
277
  ## Pagination API
200
278
 
201
279
  ```typescript
@@ -281,7 +359,68 @@ node tools/generate-icons.mjs
281
359
 
282
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.
283
361
 
284
- ## Services
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
285
424
 
286
425
  | Service | Import Path | Description |
287
426
  |---|---|---|