@devjuliovilla/jv-ui 1.14.0 → 1.16.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.
Files changed (49) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +1059 -1033
  3. package/fesm2022/devjuliovilla-jv-ui.mjs +3385 -4044
  4. package/fesm2022/devjuliovilla-jv-ui.mjs.map +1 -1
  5. package/package.json +85 -1
  6. package/secondary/auth-pages.d.ts +1 -0
  7. package/secondary/auth-pages.mjs +1 -0
  8. package/secondary/buttons.d.ts +1 -0
  9. package/secondary/buttons.mjs +1 -0
  10. package/secondary/calendar.d.ts +1 -0
  11. package/secondary/calendar.mjs +1 -0
  12. package/secondary/collapsible.d.ts +1 -0
  13. package/secondary/collapsible.mjs +1 -0
  14. package/secondary/config.d.ts +1 -0
  15. package/secondary/config.mjs +1 -0
  16. package/secondary/containers.d.ts +1 -0
  17. package/secondary/containers.mjs +1 -0
  18. package/secondary/core.d.ts +1 -0
  19. package/secondary/core.mjs +1 -0
  20. package/secondary/dialogs.d.ts +1 -0
  21. package/secondary/dialogs.mjs +1 -0
  22. package/secondary/feedback.d.ts +1 -0
  23. package/secondary/feedback.mjs +1 -0
  24. package/secondary/forms.d.ts +1 -0
  25. package/secondary/forms.mjs +1 -0
  26. package/secondary/gallery.d.ts +1 -0
  27. package/secondary/gallery.mjs +1 -0
  28. package/secondary/grid.d.ts +1 -0
  29. package/secondary/grid.mjs +1 -0
  30. package/secondary/i18n.d.ts +1 -0
  31. package/secondary/i18n.mjs +1 -0
  32. package/secondary/icons.d.ts +1 -0
  33. package/secondary/icons.mjs +1 -0
  34. package/secondary/layout.d.ts +1 -0
  35. package/secondary/layout.mjs +1 -0
  36. package/secondary/list.d.ts +1 -0
  37. package/secondary/list.mjs +1 -0
  38. package/secondary/pagination.d.ts +1 -0
  39. package/secondary/pagination.mjs +1 -0
  40. package/secondary/services.d.ts +1 -0
  41. package/secondary/services.mjs +1 -0
  42. package/secondary/slider.d.ts +1 -0
  43. package/secondary/slider.mjs +1 -0
  44. package/secondary/tabs.d.ts +1 -0
  45. package/secondary/tabs.mjs +1 -0
  46. package/secondary/tooltip.d.ts +1 -0
  47. package/secondary/tooltip.mjs +1 -0
  48. package/styles/jv-theme.css +135 -135
  49. package/types/devjuliovilla-jv-ui.d.ts +13 -21
package/README.md CHANGED
@@ -1,1033 +1,1059 @@
1
- # @devjuliovilla/jv-ui
2
-
3
- Accessibility-first Angular component library built with signals and standalone APIs. Includes components, forms, data grids, dialogs, layout primitives, services, and i18n infrastructure.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install @devjuliovilla/jv-ui
9
- ```
10
-
11
- Import the theme CSS in your `angular.json` or `styles` array:
12
-
13
- ```json
14
- "styles": ["@devjuliovilla/jv-ui/styles/jv-theme.css"]
15
- ```
16
-
17
- ## Quick start
18
-
19
- ```typescript
20
- import { ApplicationConfig } from '@angular/core';
21
- import { provideJvUi } from '@devjuliovilla/jv-ui';
22
-
23
- export const appConfig: ApplicationConfig = {
24
- providers: [provideJvUi({ messagesLocale: 'en', formatLocale: 'en-US' })],
25
- };
26
- ```
27
-
28
- ```typescript
29
- import { Component } from '@angular/core';
30
- import { JvButtonComponent } from '@devjuliovilla/jv-ui';
31
-
32
- @Component({
33
- selector: 'app-root',
34
- standalone: true,
35
- imports: [JvButtonComponent],
36
- template: '<jv-button variant="primary">Hello</jv-button>',
37
- })
38
- export class App {}
39
- ```
40
-
41
- ## Components
42
-
43
- | Category | Components |
44
- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
45
- | Buttons | `JvButton`, `JvButtonGroup`, `JvIconButton` |
46
- | Calendar | `JvMonthCalendar`, `JvDayPlanner` — reusable month view and agenda primitives, usable together or independently |
47
- | Forms | `JvInput`, `JvTextarea`, `JvCode`, `JvSelect`, `JvCheckbox`, `JvRadio`, `JvSwitch`, `JvDatePicker`, `JvModalSelector`, `JvFileInput`, `JvFormContainer` |
48
- | Data Grid | `JvGrid` — full-featured data table (see below) |
49
- | Containers | `JvCard`, `JvSection`, `JvDivider` |
50
- | List | `JvList`, `JvListItem` — list with title, description, icons, badges, and interactive items |
51
- | Tabs | `JvTabs`, `JvTabPanelDirective` — horizontal tabs with keyboard navigation and animated transitions |
52
- | Slider | `JvImageSlider` — responsive image slider with thumbnails and keyboard navigation |
53
- | Gallery | `JvImageGallery` — horizontal image gallery with wheel scrolling and full-screen viewer |
54
- | Feedback | `JvAlert`, `JvBadge`, `JvLoader`, `JvToast` |
55
- | Dialogs | `JvDialog`, `JvConfirmDialog`, `JvWindowModal` — compact dialogs plus a larger workflow overlay surface |
56
- | Layout | `JvDashboardShell`, `JvSidebar`, `JvTopbar`, `JvBreadcrumb`, `JvPage` |
57
- | Auth Pages | `JvLoginPage`, `JvForgotPasswordPage`, `JvChangePasswordPage` |
58
- | Icon | `JvIcon` — Lucide-based icon component with 1500+ auto-generated icons |
59
- | Pagination | `JvPagination` — standalone pagination with i18n |
60
-
61
- ## Calendar API
62
-
63
- The scheduling primitives are split into **two separate components**:
64
-
65
- - `JvMonthCalendar`: inline month grid with selection, navigation, and day markers
66
- - `JvDayPlanner`: agenda / list view for scheduled items with optional grouping and expandable details
67
-
68
- You can use either one on its own, or compose both together in a master-detail scheduling layout.
69
-
70
- ### JvMonthCalendar
71
-
72
- ```typescript
73
- import {
74
- JvMonthCalendarComponent,
75
- JvMonthCalendarDayDirective,
76
- JvMonthCalendarDayMeta,
77
- } from '@devjuliovilla/jv-ui';
78
- ```
79
-
80
- **Inputs:**
81
-
82
- | Input | Type | Default | Description |
83
- | -------------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ---------------------------------------------------------- |
84
- | `value` | `Date \| string \| null` | `undefined` | Selected day |
85
- | `visibleMonth` | `Date \| string \| null` | `undefined` | Controlled visible month independent from the selected day |
86
- | `dayMeta` | `JvMonthCalendarDayMeta[]` | `[]` | Marker/counter metadata per day |
87
- | `ariaLabel` | `string` | localized default | Accessible label for the grid |
88
- | `monthLabel` | `string` | `Month` | Accessible label for the month selector |
89
- | `yearLabel` | `string` | `Year` | Accessible label for the year selector |
90
- | `minYear` | `number` | current year - 10 | Lower year bound for the year selector |
91
- | `maxYear` | `number` | current year + 10 | Upper year bound for the year selector |
92
- | `navigation` | `{ previousMonth?: boolean; nextMonth?: boolean; previousYear?: boolean; nextYear?: boolean }` | `{ previousMonth: true, nextMonth: true, previousYear: false, nextYear: false }` | Controls which month/year navigation buttons are rendered |
93
-
94
- **Outputs:**
95
-
96
- | Output | Type |
97
- | -------------------- | ------ |
98
- | `selectionChange` | `Date` |
99
- | `visibleMonthChange` | `Date` |
100
-
101
- **Day metadata:**
102
-
103
- | Property | Type | Description |
104
- | -------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------- |
105
- | `date` | `Date \| string` | Day associated with the marker |
106
- | `count` | `number` | Optional numeric badge rendered inside the cell |
107
- | `tone` | `'primary' \| 'secondary' \| 'success' \| 'warning' \| 'danger' \| 'info' \| 'neutral'` | Visual tone for the badge or dot |
108
- | `label` | `string` | Extra accessibility text appended to the day `aria-label` |
109
-
110
- **Template hook:**
111
-
112
- Use `ng-template[jvMonthCalendarDay]` to fully customize the day cell.
113
-
114
- **Standalone example:**
115
-
116
- ```typescript
117
- import { Component, signal } from '@angular/core';
118
- import { JvMonthCalendarComponent, JvMonthCalendarDayMeta } from '@devjuliovilla/jv-ui';
119
-
120
- @Component({
121
- selector: 'app-calendar-only',
122
- standalone: true,
123
- imports: [JvMonthCalendarComponent],
124
- template: `
125
- <jv-month-calendar
126
- [value]="selectedDate()"
127
- [dayMeta]="calendarMeta"
128
- (selectionChange)="selectedDate.set($event)"
129
- />
130
- `,
131
- })
132
- export class CalendarOnlyComponent {
133
- readonly selectedDate = signal(new Date(2026, 5, 15));
134
- readonly calendarMeta: JvMonthCalendarDayMeta[] = [
135
- { date: '2026-06-15', count: 2, tone: 'primary', label: '2 activities' },
136
- { date: '2026-06-16', count: 1, tone: 'secondary', label: '1 activity' },
137
- ];
138
- }
139
- ```
140
-
141
- ### JvDayPlanner
142
-
143
- ```typescript
144
- import {
145
- JvDayPlannerComponent,
146
- JvDayPlannerDetailDirective,
147
- JvDayPlannerItem,
148
- JvDayPlannerItemDirective,
149
- } from '@devjuliovilla/jv-ui';
150
- ```
151
-
152
- **Inputs:**
153
-
154
- | Input | Type | Default | Description |
155
- | ------------------------ | ---------------------- | ----------------- | ---------------------------------------- |
156
- | `items` | `JvDayPlannerItem[]` | `[]` | Agenda items |
157
- | `groupByDate` | `boolean` | `false` | Group items under a date heading |
158
- | `emptyMessage` | `string` | localized default | Empty state copy |
159
- | `ariaLabel` | `string` | localized default | Accessible label for the agenda |
160
- | `defaultExpandedItemIds` | `(string \| number)[]` | `[]` | Items whose detail should start expanded |
161
-
162
- **Outputs:**
163
-
164
- | Output | Type |
165
- | ------------ | ------------------ |
166
- | `itemSelect` | `JvDayPlannerItem` |
167
-
168
- **Planner item shape:**
169
-
170
- | Property | Type | Description |
171
- | ------------- | ------------------------ | ----------------------------------------- |
172
- | `id` | `string \| number` | Stable identity |
173
- | `title` | `string` | Primary label |
174
- | `date` | `Date \| string \| null` | Logical day when start time is not enough |
175
- | `start` | `Date \| string \| null` | Optional start datetime |
176
- | `end` | `Date \| string \| null` | Optional end datetime |
177
- | `status` | `string` | Status badge label |
178
- | `statusTone` | `JvTone` | Visual tone for status badge |
179
- | `type` | `string` | Type/category badge label |
180
- | `typeTone` | `JvTone` | Visual tone for type badge |
181
- | `responsible` | `string` | Responsible person |
182
- | `location` | `string` | Location metadata |
183
- | `details` | `string` | Expandable detail text |
184
- | `completed` | `boolean` | Reduced emphasis for completed items |
185
-
186
- **Template hooks:**
187
-
188
- - `ng-template[jvDayPlannerItem]` customizes the visible item row
189
- - `ng-template[jvDayPlannerDetail]` customizes the expanded detail panel
190
-
191
- **Standalone example:**
192
-
193
- ```typescript
194
- import { Component } from '@angular/core';
195
- import { JvDayPlannerComponent, JvDayPlannerItem } from '@devjuliovilla/jv-ui';
196
-
197
- @Component({
198
- selector: 'app-planner-only',
199
- standalone: true,
200
- imports: [JvDayPlannerComponent],
201
- template: `
202
- <jv-day-planner [items]="items" [groupByDate]="true" (itemSelect)="handleSelect($event)" />
203
- `,
204
- })
205
- export class PlannerOnlyComponent {
206
- readonly items: JvDayPlannerItem[] = [
207
- {
208
- id: 1,
209
- title: 'Venue setup',
210
- start: '2026-06-15T08:30:00',
211
- end: '2026-06-15T10:00:00',
212
- status: 'Scheduled',
213
- statusTone: 'primary',
214
- type: 'Logistics',
215
- responsible: 'Ana Lopez',
216
- location: 'Main hall',
217
- details: 'Prepare seating and signage.',
218
- },
219
- ];
220
-
221
- handleSelect(item: JvDayPlannerItem) {
222
- console.log(item);
223
- }
224
- }
225
- ```
226
-
227
- ### Combined example
228
-
229
- Use both components together when you need a left-side month selector and a right-side agenda:
230
-
231
- ```html
232
- <jv-month-calendar
233
- [value]="selectedDate()"
234
- [dayMeta]="calendarMeta()"
235
- (selectionChange)="selectedDate.set($event)"
236
- />
237
-
238
- <jv-day-planner
239
- [items]="filteredItems()"
240
- [groupByDate]="showAll()"
241
- (itemSelect)="selectedItem.set($event)"
242
- />
243
- ```
244
-
245
- ## Grid Features
246
-
247
- | Feature | Description |
248
- | ------------------ | ---------------------------------------------------------------- |
249
- | Sorting | Client-side multi-column sorting with sort icons and `aria-sort` |
250
- | Search | Global text search across visible columns |
251
- | Pagination | Configurable page size, page range buttons, first/last/prev/next |
252
- | Selection | Checkbox row selection with `selectedIds` / `selectionChange` |
253
- | Row actions | Custom action buttons per row |
254
- | Density modes | Compact, normal, comfortable |
255
- | Sticky columns | Pin columns to left or right |
256
- | Column resizing | Drag column header borders to resize |
257
- | Column reordering | Drag & drop column headers |
258
- | Grouped headers | Multi-row header with `colspan` via `children` |
259
- | Per-column filters | Filter input row with operators |
260
- | Inline editing | Double-click or Enter to edit: text, number, select, boolean |
261
- | Virtual scrolling | Render only visible rows for large datasets |
262
- | CSV/Excel export | Built-in toolbar buttons, no external deps |
263
- | Server-side mode | Delegate sort/filter/page to parent component |
264
- | TrackBy | Custom trackBy key or function |
265
- | i18n | All labels configurable via translation dictionary |
266
-
267
- ### Grid API
268
-
269
- ```typescript
270
- import { JvGridComponent } from '@devjuliovilla/jv-ui';
271
- ```
272
-
273
- **Inputs:**
274
-
275
- | Input | Type | Default | Description |
276
- | ------------- | ----------------------------- | ------- | -------------------------- |
277
- | `data` | `T[]` | `[]` | Row data array |
278
- | `columns` | `JvGridColumn<T>[]` | `[]` | Column definitions |
279
- | `actions` | `JvGridAction<T>[]` | `[]` | Row action button configs |
280
- | `options` | `Partial<JvGridOptions>` | `{}` | Feature toggles and config |
281
- | `trackBy` | `keyof T \| Function \| null` | `null` | Row identity |
282
- | `selectedIds` | `(string \| number)[]` | `[]` | Controlled selection IDs |
283
-
284
- **Outputs:**
285
-
286
- | Output | Type |
287
- | ----------------- | ----------------------------------------------------------- |
288
- | `rowClick` | `T` |
289
- | `rowDoubleClick` | `T` |
290
- | `actionClick` | `{ actionId: string; row: T }` |
291
- | `selectionChange` | `(string \| number)[]` |
292
- | `pageChange` | `{ pageIndex: number; pageSize: number }` |
293
- | `searchChange` | `string` |
294
- | `sortChange` | `{ columnKey: string; direction: 'asc' \| 'desc' \| null }` |
295
- | `columnFilter` | `{ columnKey: string; value: string }` |
296
- | `columnResize` | `{ columnKey: string; width: string }` |
297
- | `columnReorder` | `{ columnKey: string; newIndex: number }` |
298
- | `rowEdit` | `{ row: T; column: JvGridColumn<T>; value: unknown }` |
299
-
300
- **JvGridColumn options:**
301
-
302
- | Property | Type | Description |
303
- | --------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------- |
304
- | `key` | `keyof T \| string` | Data field key |
305
- | `header` | `string` | Column display header |
306
- | `sortable` | `boolean` | Enable column sorting |
307
- | `searchable` | `boolean` | Include in global search |
308
- | `filterable` | `boolean` | Show per-column filter input |
309
- | `hidden` | `boolean` | Hide column from display |
310
- | `sticky` | `'left' \| 'right'` | Pin column position |
311
- | `editable` | `boolean` | Allow inline cell editing |
312
- | `editType` | `'text' \| 'number' \| 'select' \| 'boolean'` | Editor type |
313
- | `editOptions` | `{ label: string; value: unknown }[]` | Options for select editor |
314
- | `width` | `string` | Column width (e.g. '8rem') |
315
- | `align` | `'start' \| 'center' \| 'end'` | Text alignment |
316
- | `type` | `'text' \| 'integer' \| 'number' \| 'currency' \| 'percent' \| 'date' \| 'time' \| 'datetime' \| 'boolean'` | Data type for formatting |
317
- | `formatOptions` | `Intl.NumberFormatOptions & Intl.DateTimeFormatOptions` | Per-column formatting overrides |
318
- | `format` | `(value, row) => string` | Custom display formatter |
319
- | `children` | `JvGridColumn<T>[]` | Child columns for grouped headers |
320
- | `resizable` | `boolean` | Allow column resize |
321
- | `cellClass` | `string` | CSS class for cells |
322
- | `headerClass` | `string` | CSS class for header |
323
-
324
- **JvGridOptions:**
325
-
326
- | Option | Type | Default | Description |
327
- | ------------------------ | ---------------------------------------- | ------------------- | ------------------------------------------------------------------------------------- |
328
- | `searchable` | `boolean` | `true` | Show search bar |
329
- | `sortable` | `boolean` | `true` | Enable column sorting |
330
- | `pageable` | `boolean` | `true` | Enable pagination |
331
- | `selectable` | `boolean` | `false` | Show selection checkboxes |
332
- | `pageSize` | `number` | `20` | Default page size |
333
- | `pageSizeOptions` | `number[]` | `[10, 20, 50, 100]` | Page size selector options |
334
- | `density` | `'compact' \| 'normal' \| 'comfortable'` | `'normal'` | Row density |
335
- | `loading` | `boolean` | `false` | Show loading spinner |
336
- | `emptyMessage` | `string` | — | Empty state message |
337
- | `exportable` | `boolean` | `false` | Show CSV/Excel export buttons |
338
- | `exportFileName` | `string` | `''` | Base filename used for CSV/Excel exports; the component applies the correct extension |
339
- | `serverSide` | `boolean` | `false` | Disable client-side processing |
340
- | `totalItems` | `number` | `0` | Total items for server-side mode |
341
- | `stickyColumns` | `boolean` | `false` | Enable sticky column support |
342
- | `resizableColumns` | `boolean` | `false` | Enable column resizing |
343
- | `reorderableColumns` | `boolean` | `false` | Enable column reordering |
344
- | `editable` | `boolean` | `false` | Enable inline editing |
345
- | `virtualScroll` | `boolean` | `false` | Enable virtual scrolling |
346
- | `virtualScrollRowHeight` | `number` | `48` | Row height for virtual scroll |
347
- | `columnFilters` | `boolean` | `false` | Show filter row below headers |
348
- | `rowDoubleClick` | `boolean` | `false` | Enable row double-click event |
349
- | `keyboardNavigation` | `boolean` | `false` | Enable arrow-key cell navigation and `F2` editing flow |
350
- | `ariaLabel` | `string` | — | Accessible label for the grid |
351
-
352
- ### Grid example
353
-
354
- ```typescript
355
- import { Component } from '@angular/core';
356
- import { JvGridComponent, JvGridColumn, JvGridOptions } from '@devjuliovilla/jv-ui';
357
-
358
- interface Product {
359
- id: number;
360
- name: string;
361
- price: number;
362
- status: string;
363
- }
364
-
365
- @Component({
366
- selector: 'app-products',
367
- standalone: true,
368
- imports: [JvGridComponent],
369
- template: `
370
- <jv-grid
371
- [data]="products"
372
- [columns]="columns"
373
- [options]="{ selectable: true, exportable: true, exportFileName: 'products', pageSize: 10 }"
374
- [trackBy]="'id'"
375
- [selectedIds]="selectedIds"
376
- (selectionChange)="selectedIds = $event"
377
- />
378
- `,
379
- })
380
- export class ProductsComponent {
381
- products: Product[] = [
382
- /* ... */
383
- ];
384
- selectedIds: (string | number)[] = [];
385
- columns: JvGridColumn<Product>[] = [
386
- { key: 'id', header: 'ID', width: '4rem' },
387
- { key: 'name', header: 'Product', sortable: true, filterable: true },
388
- { key: 'price', header: 'Price', type: 'number', align: 'end', format: (v) => '$' + v },
389
- { key: 'status', header: 'Status', sortable: true },
390
- ];
391
- }
392
- ```
393
-
394
- ### Grid behavior notes
395
-
396
- - **Row identity:** when `trackBy` is not provided, rows with an `id` property use that value as their identity. Provide `[trackBy]` when the row identity uses another field or a custom function.
397
- - **Controlled selection:** use `[selectedIds]` together with `(selectionChange)` when the parent owns selection state. The component accepts an empty array, so selection can start fully controlled without special initialization.
398
- - **Pagination:** `pageSize` is clamped to the configured `pageSizeOptions`, and page indexes are clamped when the data or page size changes. Use `(pageChange)` to synchronize server-side pagination.
399
- - **Grouped headers:** define parent columns with `children`. The grouped header is rendered with `colspan`, while sorting, filtering, editing, resizing, reordering, and export operate on the leaf columns.
400
- - **Virtual scrolling:** place the grid inside a container with a constrained height and set `virtualScroll: true`. The default row height is `48`; set `virtualScrollRowHeight` to the actual rendered row height when it differs.
401
- - **Formatting:** column `type` and `formatOptions` affect display only. Sorting and export use the raw field value, not the localized text shown in the cell.
402
- - **Inline editing:** set both `editable: true` in `options` and `editable: true` on the column. `select` editors emit the configured option value, while `boolean` editors emit a boolean. Press `F2` to start, `Enter` to commit, and `Escape` to cancel when keyboard navigation is enabled.
403
-
404
- ### Keyboard navigation example
405
-
406
- ```typescript
407
- const gridOptions: JvGridOptions = {
408
- keyboardNavigation: true,
409
- editable: true,
410
- pageable: false,
411
- };
412
-
413
- const columns: JvGridColumn<Product>[] = [
414
- { key: 'name', header: 'Product', editable: true, editType: 'text' },
415
- {
416
- key: 'status',
417
- header: 'Status',
418
- editable: true,
419
- editType: 'select',
420
- editOptions: [
421
- { label: 'Active', value: 'active' },
422
- { label: 'Paused', value: 'paused' },
423
- ],
424
- },
425
- ];
426
- ```
427
-
428
- ```html
429
- <jv-grid
430
- [data]="products"
431
- [columns]="columns"
432
- [options]="gridOptions"
433
- (rowEdit)="onRowEdit($event)"
434
- />
435
- ```
436
-
437
- With `keyboardNavigation` enabled, arrow keys move between data cells without trapping row action buttons. `Tab` continues to the row actions, `F2` starts editing, `Enter` commits, and `Escape` cancels.
438
-
439
- ## List API
440
-
441
- ```typescript
442
- import { JvListComponent, JvListItemComponent } from '@devjuliovilla/jv-ui';
443
- ```
444
-
445
- **JvList inputs:**
446
-
447
- | Input | Type | Default | Description |
448
- | ----------- | ------------------------ | -------- | ------------------------------------------------------------------------------ |
449
- | `role` | `'list' \| 'navigation'` | `'list'` | ARIA role for the list |
450
- | `variant` | `'bordered' \| null` | `null` | Outer border + border-radius around the list (items always have bottom border) |
451
- | `ariaLabel` | `string` | `''` | Accessible label |
452
-
453
- **JvListItem inputs:**
454
-
455
- | Input | Type | Default | Description |
456
- | ------------- | ------------------- | ------- | -------------------------------------------- |
457
- | `title` | `string` (required) | — | Primary text |
458
- | `description` | `string` | `''` | Secondary text below title |
459
- | `leadingIcon` | `string \| null` | `null` | Lucide icon name on the left |
460
- | `disabled` | `boolean` | `false` | Gray out and block interaction |
461
- | `active` | `boolean` | `false` | Highlight with primary color and left border |
462
-
463
- **JvListItem outputs:**
464
-
465
- | Output | Type |
466
- | ----------- | ------ |
467
- | `activated` | `void` |
468
-
469
- **Content projection:** use the `meta` attribute selector for badges, icons, or any content on the right side:
470
-
471
- ```html
472
- <jv-list-item title="Inbox" description="New messages">
473
- <jv-badge tone="primary" meta>3</jv-badge>
474
- <jv-icon name="chevron-right" meta />
475
- </jv-list-item>
476
- ```
477
-
478
- ### Example
479
-
480
- ```typescript
481
- import { Component } from '@angular/core';
482
- import { JvListComponent, JvListItemComponent, JvBadgeComponent } from '@devjuliovilla/jv-ui';
483
-
484
- @Component({
485
- selector: 'app-nav-list',
486
- standalone: true,
487
- imports: [JvListComponent, JvListItemComponent, JvBadgeComponent],
488
- template: `
489
- <jv-list variant="bordered">
490
- <jv-list-item
491
- title="Dashboard"
492
- description="Main overview"
493
- leadingIcon="layout-dashboard"
494
- [active]="true"
495
- />
496
- <jv-list-item title="Notifications" description="3 pending" (activated)="onOpen()">
497
- <jv-badge tone="primary" meta>3</jv-badge>
498
- </jv-list-item>
499
- <jv-list-item title="Reports" description="Coming soon" [disabled]="true" />
500
- </jv-list>
501
- `,
502
- })
503
- export class NavListComponent {
504
- onOpen() {
505
- /* handle activation */
506
- }
507
- }
508
- ```
509
-
510
- ## Pagination API
511
-
512
- ```typescript
513
- import { JvPaginationComponent } from '@devjuliovilla/jv-ui';
514
- ```
515
-
516
- | Input | Type | Default | Description |
517
- | ----------------- | ---------- | ------------------- | ------------------------ |
518
- | `totalItems` | `number` | `0` | Total items |
519
- | `pageSize` | `number` | `20` | Items per page |
520
- | `pageSizeOptions` | `number[]` | `[10, 20, 50, 100]` | Page size options |
521
- | `pageIndex` | `number` | `0` | Current page (0-based) |
522
- | `maxVisiblePages` | `number` | `5` | Max page buttons to show |
523
-
524
- | Output | Type |
525
- | ------------ | ----------------------------------------- |
526
- | `pageChange` | `{ pageIndex: number; pageSize: number }` |
527
-
528
- ## Tabs API
529
-
530
- ```typescript
531
- import { JvTabsComponent, JvTabPanelDirective, JvTabItem } from '@devjuliovilla/jv-ui';
532
- ```
533
-
534
- **Inputs:**
535
-
536
- | Input | Type | Default | Description |
537
- | ------------- | ------------------------------------- | ------- | --------------------------------------------------------- |
538
- | `tabs` | `JvTabItem[]` | `[]` | Tab definitions (`{ id, label, icon?, disabled? }`) |
539
- | `activeTabId` | `string \| null` | `null` | Controlled active tab ID |
540
- | `keepMounted` | `boolean` | `true` | Keep all panels in DOM; `false` renders only active panel |
541
- | `transition` | `'none' \| 'fade' \| 'slide' \| null` | `null` | Panel transition animation (falls back to global config) |
542
-
543
- **Outputs:**
544
-
545
- | Output | Type |
546
- | ----------------- | -------- |
547
- | `activeTabChange` | `string` |
548
-
549
- **Content projection:** use `jvTabPanel` directive on `ng-template` to define panel content:
550
-
551
- ```html
552
- <jv-tabs [tabs]="tabs" [activeTabId]="activeTabId()" (activeTabChange)="activeTabId.set($event)">
553
- <ng-template jvTabPanel="overview">
554
- <p>Overview content</p>
555
- </ng-template>
556
- <ng-template jvTabPanel="analytics">
557
- <p>Analytics content</p>
558
- </ng-template>
559
- </jv-tabs>
560
- ```
561
-
562
- ### Tab Transitions
563
-
564
- Tabs support animated transitions between panels. Configure globally via `provideJvUi()` or per-instance via the `transition` input:
565
-
566
- ```typescript
567
- // Global default
568
- provideJvUi({ tabsTransition: 'fade' });
569
- ```
570
-
571
- ```typescript
572
- // Per-instance override
573
- <jv-tabs transition="slide" [keepMounted]="false">...</jv-tabs>
574
- ```
575
-
576
- | Transition | `keepMounted=true` | `keepMounted=false` | Description |
577
- | ---------- | ---------------------- | ------------------- | ------------------------------------ |
578
- | `'none'` | Instant switch | Instant switch | No animation |
579
- | `'fade'` | Opacity cross-fade | Opacity cross-fade | Smooth fade between panels |
580
- | `'slide'` | Falls back to `'fade'` | Directional slide | Slides left/right based on tab index |
581
-
582
- **Note:** `slide` requires `keepMounted=false` because it needs to animate both entering and exiting panels simultaneously. When used with `keepMounted=true`, it automatically falls back to `fade`.
583
-
584
- ### Tabs Example
585
-
586
- ```typescript
587
- import { Component, signal } from '@angular/core';
588
- import { JvTabItem, JvTabPanelDirective, JvTabsComponent } from '@devjuliovilla/jv-ui';
589
-
590
- @Component({
591
- standalone: true,
592
- imports: [JvTabsComponent, JvTabPanelDirective],
593
- template: `
594
- <jv-tabs
595
- [tabs]="tabs"
596
- [activeTabId]="activeTabId()"
597
- transition="fade"
598
- (activeTabChange)="activeTabId.set($event)"
599
- >
600
- <ng-template jvTabPanel="overview">
601
- <p>Overview content</p>
602
- </ng-template>
603
- <ng-template jvTabPanel="analytics">
604
- <p>Analytics content</p>
605
- </ng-template>
606
- </jv-tabs>
607
- `,
608
- })
609
- export class TabsExampleComponent {
610
- readonly activeTabId = signal('overview');
611
- readonly tabs: JvTabItem[] = [
612
- { id: 'overview', label: 'Overview' },
613
- { id: 'analytics', label: 'Analytics', icon: 'chart-column' },
614
- ];
615
- }
616
- ```
617
-
618
- ## Image Slider API
619
-
620
- ```typescript
621
- import { JvImageSliderComponent, JvSliderImage } from '@devjuliovilla/jv-ui';
622
- ```
623
-
624
- **JvSliderImage:**
625
-
626
- | Property | Type | Required | Description |
627
- | ------------- | -------- | -------- | ---------------------------------------- |
628
- | `src` | `string` | Yes | Image URL |
629
- | `alt` | `string` | Yes | Alternative text for accessibility |
630
- | `description` | `string` | No | Caption displayed below the image |
631
- | `thumbnail` | `string` | No | Custom thumbnail URL (defaults to `src`) |
632
-
633
- **Inputs:**
634
-
635
- | Input | Type | Default | Description |
636
- | ----------------- | ----------------- | ------- | --------------------------------- |
637
- | `images` | `JvSliderImage[]` | `[]` | Array of images to display |
638
- | `showThumbnails` | `boolean` | `true` | Show thumbnail strip below slider |
639
- | `showDescription` | `boolean` | `true` | Show image description |
640
-
641
- **Outputs:**
642
-
643
- | Output | Type | Description |
644
- | ------------- | -------- | ------------------------------------- |
645
- | `imageChange` | `number` | Emits index when active image changes |
646
-
647
- **i18n support:**
648
-
649
- The component automatically translates aria labels using `JvTranslationService`:
650
-
651
- | Key | English | Spanish |
652
- | ---------------------- | ---------------- | ---------------------- |
653
- | `slider.prevImage` | Previous image | Imagen anterior |
654
- | `slider.nextImage` | Next image | Imagen siguiente |
655
- | `slider.thumbnailList` | Image thumbnails | Miniaturas de imagenes |
656
-
657
- ### Features
658
-
659
- - **Keyboard navigation:** ArrowLeft/ArrowRight to navigate, Home/End for first/last image
660
- - **Responsive:** Images scale to fit container with `object-fit: contain`
661
- - **Thumbnails:** Scrollable thumbnail strip with active state indicator
662
- - **Single image mode:** Navigation controls hidden when only one image is provided
663
- - **Lazy loading:** Images use native `loading="lazy"` attribute
664
- - **i18n:** Aria labels automatically translated based on configured locale
665
-
666
- ### Example
667
-
668
- ```typescript
669
- import { Component } from '@angular/core';
670
- import { JvImageSliderComponent, JvSliderImage } from '@devjuliovilla/jv-ui';
671
-
672
- @Component({
673
- standalone: true,
674
- imports: [JvImageSliderComponent],
675
- template: `
676
- <jv-image-slider
677
- [images]="images"
678
- [showThumbnails]="true"
679
- [showDescription]="true"
680
- (imageChange)="onImageChange($event)"
681
- />
682
- `,
683
- })
684
- export class SliderComponent {
685
- readonly images: JvSliderImage[] = [
686
- { src: 'photo1.jpg', alt: 'Sunset', description: 'Beautiful sunset over the ocean' },
687
- { src: 'photo2.jpg', alt: 'Mountain', description: 'Snow-capped mountain peak' },
688
- { src: 'photo3.jpg', alt: 'Forest', description: 'Dense forest trail' },
689
- ];
690
-
691
- onImageChange(index: number) {
692
- console.log('Viewing image:', index);
693
- }
694
- }
695
- ```
696
-
697
- ## Image Gallery API
698
-
699
- ```typescript
700
- import { JvImageGalleryComponent, JvGalleryImage, JvGalleryAction } from '@devjuliovilla/jv-ui';
701
- ```
702
-
703
- **JvGalleryImage:**
704
-
705
- | Property | Type | Required | Description |
706
- | ----------- | -------- | -------- | ---------------------------------------- |
707
- | `src` | `string` | Yes | Image URL |
708
- | `alt` | `string` | Yes | Alternative text for accessibility |
709
- | `thumbnail` | `string` | No | Custom thumbnail URL (defaults to `src`) |
710
-
711
- **JvGalleryAction:**
712
-
713
- | Property | Type | Required | Description |
714
- | -------- | ---------- | -------- | ------------------------ |
715
- | `id` | `string` | Yes | Unique action identifier |
716
- | `label` | `string` | Yes | Button label text |
717
- | `icon` | `string` | No | Lucide icon name |
718
- | `tone` | `JvIntent` | No | Button variant |
719
-
720
- **Inputs:**
721
-
722
- | Input | Type | Default | Description |
723
- | --------------- | ------------------- | ------- | ------------------------------------------------------------------------------------- |
724
- | `images` | `JvGalleryImage[]` | `[]` | Array of images to display |
725
- | `stripHeightVh` | `number` | `25` | Height of the thumbnail strip in viewport-height units, clamped between `0` and `100` |
726
- | `actions` | `JvGalleryAction[]` | `[]` | Action buttons shown in dialog footer |
727
-
728
- **Outputs:**
729
-
730
- | Output | Type | Description |
731
- | ------------- | --------------------------------------------- | -------------------------------------- |
732
- | `imageClick` | `JvGalleryImage` | Emits when an image is clicked |
733
- | `actionClick` | `{ actionId: string; image: JvGalleryImage }` | Emits when an action button is clicked |
734
-
735
- ### Features
736
-
737
- - **Horizontal strip:** Scrollable thumbnail strip with configurable height in `vh`
738
- - **Full-screen viewer:** Click any image to open in a dialog with dark background
739
- - **Navigation:** Prev/next buttons and keyboard arrows (← →) in the viewer
740
- - **Configurable actions:** Action buttons in dialog footer (favorite, edit, delete, etc.)
741
- - **Responsive:** Shows multiple columns on desktop, single column with scroll on mobile
742
- - **Lazy loading:** All images use native `loading="lazy"` attribute
743
- - **i18n:** Close and navigation labels automatically translated
744
-
745
- ### Example
746
-
747
- ```typescript
748
- import { Component } from '@angular/core';
749
- import { JvImageGalleryComponent, JvGalleryImage, JvGalleryAction } from '@devjuliovilla/jv-ui';
750
-
751
- @Component({
752
- standalone: true,
753
- imports: [JvImageGalleryComponent],
754
- template: `
755
- <jv-image-gallery
756
- [images]="images"
757
- [stripHeightVh]="30"
758
- [actions]="actions"
759
- (imageClick)="onImageClick($event)"
760
- (actionClick)="onActionClick($event)"
761
- />
762
- `,
763
- })
764
- export class GalleryComponent {
765
- readonly images: JvGalleryImage[] = [
766
- { src: 'photo1.jpg', alt: 'Sunset' },
767
- { src: 'photo2.jpg', alt: 'Mountain' },
768
- { src: 'photo3.jpg', alt: 'Forest' },
769
- ];
770
-
771
- readonly actions: JvGalleryAction[] = [
772
- { id: 'favorite', label: 'Favorite', icon: 'heart', tone: 'danger' },
773
- { id: 'edit', label: 'Edit', icon: 'pencil' },
774
- { id: 'delete', label: 'Delete', icon: 'trash-2', tone: 'danger' },
775
- ];
776
-
777
- onImageClick(image: JvGalleryImage) {
778
- console.log('Viewing:', image.alt);
779
- }
780
-
781
- onActionClick(event: { actionId: string; image: JvGalleryImage }) {
782
- console.log(event.actionId, 'on', event.image.alt);
783
- }
784
- }
785
- ```
786
-
787
- ## Textarea API
788
-
789
- ```typescript
790
- import { JvTextareaComponent } from '@devjuliovilla/jv-ui';
791
- ```
792
-
793
- | Input | Type | Default | Description |
794
- | ------------- | --------- | ----------------- | ---------------------------------------------------- |
795
- | `placeholder` | `string` | `''` | Placeholder text |
796
- | `required` | `boolean` | `false` | Mark field as required |
797
- | `invalid` | `boolean` | `false` | Show invalid state |
798
- | `readonly` | `boolean` | `false` | Make textarea read-only |
799
- | `rows` | `number` | `3` | Visible number of rows |
800
- | `cols` | `number` | — | Visible width in columns |
801
- | `maxlength` | `number` | — | Maximum character length |
802
- | `describedBy` | `string` | `''` | ID of description/error element for aria-describedby |
803
- | `inputId` | `string` | `jv-textarea-{n}` | Auto-generated unique ID |
804
-
805
- Implements `ControlValueAccessor` — compatible with `[(ngModel)]` and reactive forms via `formControlName`.
806
-
807
- ### Example
808
-
809
- ```typescript
810
- import { Component } from '@angular/core';
811
- import { JvTextareaComponent } from '@devjuliovilla/jv-ui';
812
- import { ReactiveFormsModule, FormBuilder } from '@angular/forms';
813
-
814
- @Component({
815
- selector: 'app-profile',
816
- standalone: true,
817
- imports: [ReactiveFormsModule, JvTextareaComponent],
818
- template: `
819
- <jv-textarea
820
- formControlName="bio"
821
- placeholder="Tell us about yourself..."
822
- [rows]="4"
823
- [maxlength]="500"
824
- />
825
- `,
826
- })
827
- export class ProfileComponent {
828
- form = inject(FormBuilder).group({ bio: [''] });
829
- }
830
- ```
831
-
832
- ## Code API
833
-
834
- ```typescript
835
- import { JvCodeComponent } from '@devjuliovilla/jv-ui';
836
- ```
837
-
838
- | Input | Type | Default | Description |
839
- | ---------- | ------------------------------------------------------------------------- | ------------------ | --------------------------------------------------------------------- |
840
- | `code` | `string` | — | Code or text content to render |
841
- | `language` | `string` | `''` | Optional language badge |
842
- | `title` | `string` | `''` | Optional header title |
843
- | `font` | `'jetbrains-mono' \| 'fira-code' \| 'cascadia' \| 'consolas' \| 'system'` | `'jetbrains-mono'` | Mono font preset for the rendered block |
844
- | `editable` | `boolean` | `false` | Renders a textarea-style editing surface instead of read-only preview |
845
- | `width` | `string` | `'100%'` | CSS width applied to the component |
846
- | `height` | `string` | `'auto'` | CSS height for the editable surface or minimum preview height |
847
-
848
- Use `JvCode` for read-only payloads or long single-line content where horizontal scrolling should be preserved instead of wrapping.
849
- The library does not bundle font files. `JvCode` references common mono families and will use any web font you load at the application level.
850
-
851
- When `editable` is enabled, `JvCode` emits `codeChange` on every edit so the parent can keep the source text in sync.
852
-
853
- ### Example
854
-
855
- ```typescript
856
- import { Component } from '@angular/core';
857
- import { JvCodeComponent } from '@devjuliovilla/jv-ui';
858
-
859
- @Component({
860
- selector: 'app-payload-preview',
861
- standalone: true,
862
- imports: [JvCodeComponent],
863
- template: `
864
- <jv-code
865
- [code]="payload"
866
- language="json"
867
- title="HTTP payload preview"
868
- font="fira-code"
869
- [editable]="true"
870
- width="100%"
871
- height="18rem"
872
- (codeChange)="payload = $event"
873
- />
874
- `,
875
- })
876
- export class PayloadPreviewComponent {
877
- payload = '{"status":"ok"}';
878
- }
879
- ```
880
-
881
- If you want hosted fonts without shipping them in your package, load them at the app level, for example:
882
-
883
- ```css
884
- @import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');
885
- ```
886
-
887
- ## Confirm Dialog Labels
888
-
889
- `JvDialogService.confirm()` already supports `confirmLabel` and `cancelLabel` overrides per dialog. If you omit them, the defaults come from the active translation dictionary using `dialog.confirm` and `dialog.cancel`.
890
-
891
- This lets you either:
892
-
893
- - override labels directly for a specific action like `Guardar evento` / `Descartar cambios`
894
- - or register translated defaults in your i18n dictionary for each supported language
895
-
896
- Example with business copy:
897
-
898
- ```typescript
899
- const confirmed = await dialogService.confirm({
900
- title: 'Guardar evento',
901
- message: 'Se aplicaran cambios a la agenda del equipo.',
902
- confirmLabel: 'Guardar evento',
903
- cancelLabel: 'Descartar cambios',
904
- tone: 'primary',
905
- });
906
-
907
- if (confirmed) {
908
- saveEvent();
909
- }
910
- ```
911
-
912
- Example using translated defaults from your dictionary:
913
-
914
- ```typescript
915
- await dialogService.confirm({
916
- message: 'This action will publish the current draft.',
917
- tone: 'primary',
918
- });
919
- ```
920
-
921
- ## Icon System
922
-
923
- ```typescript
924
- import { JvIconComponent, JV_LUCIDE_ICON_REGISTRY } from '@devjuliovilla/jv-ui';
925
- ```
926
-
927
- | Input | Type | Default | Description |
928
- | ------------- | --------- | ------- | ----------------------------------------------- |
929
- | `name` | `string` | — | Icon name (from auto-generated Lucide registry) |
930
- | `size` | `number` | `24` | Width and height in pixels |
931
- | `strokeWidth` | `number` | `2` | SVG stroke width |
932
- | `decorative` | `boolean` | `true` | `aria-hidden="true"` when decorative |
933
- | `ariaLabel` | `string` | — | Accessible label when not decorative |
934
-
935
- Icons are auto-generated from [lucide-static](https://www.npmjs.com/package/lucide-static) via:
936
-
937
- ```bash
938
- node tools/generate-icons.mjs
939
- ```
940
-
941
- 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.
942
-
943
- ## Layout API
944
-
945
- ### JvDashboardShell
946
-
947
- ```typescript
948
- import { JvDashboardShellComponent } from '@devjuliovilla/jv-ui';
949
- ```
950
-
951
- | Input | Type | Default | Description |
952
- | ------------------- | ------------------ | ----------- | ------------------------------------------- |
953
- | `title` | `string` | — | App / brand title |
954
- | `sidebarSubtitle` | `string` | `''` | Subtitle below brand |
955
- | `brandIcon` | `string` | `'monitor'` | Brand Lucide icon |
956
- | `navItems` | `JvNavItem[]` | `[]` | Navigation items (supports nested children) |
957
- | `sidebarCollapsed` | `boolean` | `false` | Desktop sidebar collapsed state |
958
- | `mobileSidebarOpen` | `boolean` | `false` | Mobile sidebar open/closed |
959
- | `topbarTitle` | `string` | `''` | Topbar page title |
960
- | `topbarSubtitle` | `string` | `''` | Topbar subtitle |
961
- | `currentTheme` | `JvTheme` | `'light'` | Active theme value |
962
- | `themeOptions` | `JvThemeOption[]` | `[]` | Theme selector options |
963
- | `topbarActions` | `JvTopbarAction[]` | `[]` | Icon buttons in topbar |
964
- | `showThemeSelector` | `boolean` | `true` | Show theme pills |
965
-
966
- | Output | Description |
967
- | ----------------------- | -------------------------------------------------------------- |
968
- | `menuClick` | Hamburger button clicked — toggle mobile sidebar |
969
- | `mobileClose` | Backdrop clicked or navigation selected — close mobile sidebar |
970
- | `sidebarCollapseToggle` | Collapse toggle clicked — collapse/expand sidebar |
971
- | `themeChange` | Theme pill clicked |
972
- | `topbarActionClick` | Topbar action button clicked |
973
-
974
- **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.
975
-
976
- ### JvSidebar
977
-
978
- | Input | Type | Default | Description |
979
- | ------------ | ------------- | ---------------------- | --------------------- |
980
- | `title` | `string` | — | Brand title |
981
- | `subtitle` | `string` | `''` | Brand subtitle |
982
- | `brandIcon` | `string` | `'monitor'` | Brand icon |
983
- | `items` | `JvNavItem[]` | `[]` | Navigation items |
984
- | `collapsed` | `boolean` | `false` | Collapse to icon-only |
985
- | `mobileOpen` | `boolean` | `false` | Show on mobile |
986
- | `ariaLabel` | `string` | `'Sidebar navigation'` | Accessible label |
987
-
988
- | Output | Description |
989
- | ---------------- | ------------------------------------------------ |
990
- | `collapseToggle` | Collapse button clicked |
991
- | `mobileClose` | Backdrop or nav item interaction — request close |
992
-
993
- ## Responsive Design
994
-
995
- The library includes basic responsive behavior:
996
-
997
- - **Breakpoints** defined as CSS custom properties: `--jv-breakpoint-sm` (640px), `--jv-breakpoint-md` (768px), `--jv-breakpoint-lg` (1024px), `--jv-breakpoint-xl` (1280px)
998
- - **Dashboard shell** collapses to single column at ≤ 900px; sidebar becomes a slide-in overlay with backdrop
999
- - **Topbar** stacks vertically at ≤ 900px
1000
- - **Grid** pagination and toolbar stack at ≤ 640px; table scrolls horizontally with `overflow-x: auto`
1001
- - **Flex-wrap** is used extensively for natural overflow handling
1002
- - **Dialog** and **Toast** constrain width with `min()` to never exceed the viewport
1003
-
1004
- ## Services
1005
-
1006
- | Service | Import Path | Description |
1007
- | ----------------------- | ---------------------- | -------------------------------------------- |
1008
- | `JvThemeService` | `@devjuliovilla/jv-ui` | Light / dark / high-contrast theme switching |
1009
- | `JvTranslationService` | `@devjuliovilla/jv-ui` | Dictionary-based i18n (en/es) |
1010
- | `JvToastService` | `@devjuliovilla/jv-ui` | Toast notification system |
1011
- | `JvLoaderService` | `@devjuliovilla/jv-ui` | Full-screen loader with request counter |
1012
- | `JvDialogService` | `@devjuliovilla/jv-ui` | Programmatic confirm dialogs |
1013
- | `JvAnnouncementService` | `@devjuliovilla/jv-ui` | Screen-reader live-region announcements |
1014
-
1015
- ## Accessibility
1016
-
1017
- - WCAG 2.2 AA target
1018
- - Keyboard navigation for all interactive components
1019
- - Focus management with visible focus indicators
1020
- - Screen reader announcements (loading, empty states, page changes)
1021
- - `aria-sort` on sortable grid headers
1022
- - `aria-selected` on selectable grid rows
1023
- - `aria-label` and `aria-labelledby` on interactive controls
1024
- - Supports `prefers-reduced-motion`
1025
-
1026
- ## Requirements
1027
-
1028
- - Angular 21.2+
1029
- - TypeScript 5.9+
1030
-
1031
- ## License
1032
-
1033
- MIT
1
+ # @devjuliovilla/jv-ui
2
+
3
+ Accessibility-first Angular component library built with signals and standalone APIs. Includes components, forms, data grids, dialogs, layout primitives, services, and i18n infrastructure.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @devjuliovilla/jv-ui
9
+ ```
10
+
11
+ This release line targets Angular 21. Future package changes will be tracked in the repository [CHANGELOG.md](https://github.com/devjuliovilla/JV_UI/blob/develop/CHANGELOG.md).
12
+
13
+ Import the theme CSS in your `angular.json` or `styles` array:
14
+
15
+ ```json
16
+ "styles": ["@devjuliovilla/jv-ui/styles/jv-theme.css"]
17
+ ```
18
+
19
+ ## Quick start
20
+
21
+ ```typescript
22
+ import { ApplicationConfig } from '@angular/core';
23
+ import { provideJvUi } from '@devjuliovilla/jv-ui';
24
+
25
+ export const appConfig: ApplicationConfig = {
26
+ providers: [provideJvUi({ messagesLocale: 'en', formatLocale: 'en-US' })],
27
+ };
28
+ ```
29
+
30
+ ```typescript
31
+ import { Component } from '@angular/core';
32
+ import { JvButtonComponent } from '@devjuliovilla/jv-ui';
33
+
34
+ @Component({
35
+ selector: 'app-root',
36
+ standalone: true,
37
+ imports: [JvButtonComponent],
38
+ template: '<jv-button variant="primary">Hello</jv-button>',
39
+ })
40
+ export class App {}
41
+ ```
42
+
43
+ ## Secondary entry points
44
+
45
+ The main entry point remains supported:
46
+
47
+ ```typescript
48
+ import { JvGridComponent } from '@devjuliovilla/jv-ui';
49
+ ```
50
+
51
+ Feature entry points are also available when you prefer imports grouped by module:
52
+
53
+ ```typescript
54
+ import { JvGridComponent } from '@devjuliovilla/jv-ui/grid';
55
+ import { JvButtonComponent } from '@devjuliovilla/jv-ui/buttons';
56
+ import { JvInputComponent } from '@devjuliovilla/jv-ui/forms';
57
+ ```
58
+
59
+ Available feature paths are `auth-pages`, `buttons`, `calendar`, `collapsible`, `config`,
60
+ `containers`, `core`, `dialogs`, `feedback`, `forms`, `gallery`, `grid`, `i18n`, `icons`,
61
+ `layout`, `list`, `pagination`, `services`, `slider`, `tabs`, and `tooltip`.
62
+
63
+ Both import styles expose the same public symbols. Components keep their own standalone
64
+ dependencies, so importing `JvGridComponent` does not require importing its internal buttons,
65
+ inputs, or icons separately. Existing imports from `@devjuliovilla/jv-ui` remain supported.
66
+
67
+ ## Components
68
+
69
+ | Category | Components |
70
+ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
71
+ | Buttons | `JvButton`, `JvButtonGroup`, `JvIconButton` |
72
+ | Calendar | `JvMonthCalendar`, `JvDayPlanner` — reusable month view and agenda primitives, usable together or independently |
73
+ | Forms | `JvInput`, `JvTextarea`, `JvCode`, `JvSelect`, `JvCheckbox`, `JvRadio`, `JvSwitch`, `JvDatePicker`, `JvModalSelector`, `JvFileInput`, `JvFormContainer` |
74
+ | Data Grid | `JvGrid` — full-featured data table (see below) |
75
+ | Containers | `JvCard`, `JvSection`, `JvDivider` |
76
+ | List | `JvList`, `JvListItem` — list with title, description, icons, badges, and interactive items |
77
+ | Tabs | `JvTabs`, `JvTabPanelDirective` — horizontal tabs with keyboard navigation and animated transitions |
78
+ | Slider | `JvImageSlider` — responsive image slider with thumbnails and keyboard navigation |
79
+ | Gallery | `JvImageGallery` — horizontal image gallery with wheel scrolling and full-screen viewer |
80
+ | Feedback | `JvAlert`, `JvBadge`, `JvLoader`, `JvToast` |
81
+ | Dialogs | `JvDialog`, `JvConfirmDialog`, `JvWindowModal` — compact dialogs plus a larger workflow overlay surface |
82
+ | Layout | `JvDashboardShell`, `JvSidebar`, `JvTopbar`, `JvBreadcrumb`, `JvPage` |
83
+ | Auth Pages | `JvLoginPage`, `JvForgotPasswordPage`, `JvChangePasswordPage` |
84
+ | Icon | `JvIcon` — Lucide-based icon component with 1500+ auto-generated icons |
85
+ | Pagination | `JvPagination` — standalone pagination with i18n |
86
+
87
+ ## Calendar API
88
+
89
+ The scheduling primitives are split into **two separate components**:
90
+
91
+ - `JvMonthCalendar`: inline month grid with selection, navigation, and day markers
92
+ - `JvDayPlanner`: agenda / list view for scheduled items with optional grouping and expandable details
93
+
94
+ You can use either one on its own, or compose both together in a master-detail scheduling layout.
95
+
96
+ ### JvMonthCalendar
97
+
98
+ ```typescript
99
+ import {
100
+ JvMonthCalendarComponent,
101
+ JvMonthCalendarDayDirective,
102
+ JvMonthCalendarDayMeta,
103
+ } from '@devjuliovilla/jv-ui';
104
+ ```
105
+
106
+ **Inputs:**
107
+
108
+ | Input | Type | Default | Description |
109
+ | -------------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ---------------------------------------------------------- |
110
+ | `value` | `Date \| string \| null` | `undefined` | Selected day |
111
+ | `visibleMonth` | `Date \| string \| null` | `undefined` | Controlled visible month independent from the selected day |
112
+ | `dayMeta` | `JvMonthCalendarDayMeta[]` | `[]` | Marker/counter metadata per day |
113
+ | `ariaLabel` | `string` | localized default | Accessible label for the grid |
114
+ | `monthLabel` | `string` | `Month` | Accessible label for the month selector |
115
+ | `yearLabel` | `string` | `Year` | Accessible label for the year selector |
116
+ | `minYear` | `number` | current year - 10 | Lower year bound for the year selector |
117
+ | `maxYear` | `number` | current year + 10 | Upper year bound for the year selector |
118
+ | `navigation` | `{ previousMonth?: boolean; nextMonth?: boolean; previousYear?: boolean; nextYear?: boolean }` | `{ previousMonth: true, nextMonth: true, previousYear: false, nextYear: false }` | Controls which month/year navigation buttons are rendered |
119
+
120
+ **Outputs:**
121
+
122
+ | Output | Type |
123
+ | -------------------- | ------ |
124
+ | `selectionChange` | `Date` |
125
+ | `visibleMonthChange` | `Date` |
126
+
127
+ **Day metadata:**
128
+
129
+ | Property | Type | Description |
130
+ | -------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------- |
131
+ | `date` | `Date \| string` | Day associated with the marker |
132
+ | `count` | `number` | Optional numeric badge rendered inside the cell |
133
+ | `tone` | `'primary' \| 'secondary' \| 'success' \| 'warning' \| 'danger' \| 'info' \| 'neutral'` | Visual tone for the badge or dot |
134
+ | `label` | `string` | Extra accessibility text appended to the day `aria-label` |
135
+
136
+ **Template hook:**
137
+
138
+ Use `ng-template[jvMonthCalendarDay]` to fully customize the day cell.
139
+
140
+ **Standalone example:**
141
+
142
+ ```typescript
143
+ import { Component, signal } from '@angular/core';
144
+ import { JvMonthCalendarComponent, JvMonthCalendarDayMeta } from '@devjuliovilla/jv-ui';
145
+
146
+ @Component({
147
+ selector: 'app-calendar-only',
148
+ standalone: true,
149
+ imports: [JvMonthCalendarComponent],
150
+ template: `
151
+ <jv-month-calendar
152
+ [value]="selectedDate()"
153
+ [dayMeta]="calendarMeta"
154
+ (selectionChange)="selectedDate.set($event)"
155
+ />
156
+ `,
157
+ })
158
+ export class CalendarOnlyComponent {
159
+ readonly selectedDate = signal(new Date(2026, 5, 15));
160
+ readonly calendarMeta: JvMonthCalendarDayMeta[] = [
161
+ { date: '2026-06-15', count: 2, tone: 'primary', label: '2 activities' },
162
+ { date: '2026-06-16', count: 1, tone: 'secondary', label: '1 activity' },
163
+ ];
164
+ }
165
+ ```
166
+
167
+ ### JvDayPlanner
168
+
169
+ ```typescript
170
+ import {
171
+ JvDayPlannerComponent,
172
+ JvDayPlannerDetailDirective,
173
+ JvDayPlannerItem,
174
+ JvDayPlannerItemDirective,
175
+ } from '@devjuliovilla/jv-ui';
176
+ ```
177
+
178
+ **Inputs:**
179
+
180
+ | Input | Type | Default | Description |
181
+ | ------------------------ | ---------------------- | ----------------- | ---------------------------------------- |
182
+ | `items` | `JvDayPlannerItem[]` | `[]` | Agenda items |
183
+ | `groupByDate` | `boolean` | `false` | Group items under a date heading |
184
+ | `emptyMessage` | `string` | localized default | Empty state copy |
185
+ | `ariaLabel` | `string` | localized default | Accessible label for the agenda |
186
+ | `defaultExpandedItemIds` | `(string \| number)[]` | `[]` | Items whose detail should start expanded |
187
+
188
+ **Outputs:**
189
+
190
+ | Output | Type |
191
+ | ------------ | ------------------ |
192
+ | `itemSelect` | `JvDayPlannerItem` |
193
+
194
+ **Planner item shape:**
195
+
196
+ | Property | Type | Description |
197
+ | ------------- | ------------------------ | ----------------------------------------- |
198
+ | `id` | `string \| number` | Stable identity |
199
+ | `title` | `string` | Primary label |
200
+ | `date` | `Date \| string \| null` | Logical day when start time is not enough |
201
+ | `start` | `Date \| string \| null` | Optional start datetime |
202
+ | `end` | `Date \| string \| null` | Optional end datetime |
203
+ | `status` | `string` | Status badge label |
204
+ | `statusTone` | `JvTone` | Visual tone for status badge |
205
+ | `type` | `string` | Type/category badge label |
206
+ | `typeTone` | `JvTone` | Visual tone for type badge |
207
+ | `responsible` | `string` | Responsible person |
208
+ | `location` | `string` | Location metadata |
209
+ | `details` | `string` | Expandable detail text |
210
+ | `completed` | `boolean` | Reduced emphasis for completed items |
211
+
212
+ **Template hooks:**
213
+
214
+ - `ng-template[jvDayPlannerItem]` customizes the visible item row
215
+ - `ng-template[jvDayPlannerDetail]` customizes the expanded detail panel
216
+
217
+ **Standalone example:**
218
+
219
+ ```typescript
220
+ import { Component } from '@angular/core';
221
+ import { JvDayPlannerComponent, JvDayPlannerItem } from '@devjuliovilla/jv-ui';
222
+
223
+ @Component({
224
+ selector: 'app-planner-only',
225
+ standalone: true,
226
+ imports: [JvDayPlannerComponent],
227
+ template: `
228
+ <jv-day-planner [items]="items" [groupByDate]="true" (itemSelect)="handleSelect($event)" />
229
+ `,
230
+ })
231
+ export class PlannerOnlyComponent {
232
+ readonly items: JvDayPlannerItem[] = [
233
+ {
234
+ id: 1,
235
+ title: 'Venue setup',
236
+ start: '2026-06-15T08:30:00',
237
+ end: '2026-06-15T10:00:00',
238
+ status: 'Scheduled',
239
+ statusTone: 'primary',
240
+ type: 'Logistics',
241
+ responsible: 'Ana Lopez',
242
+ location: 'Main hall',
243
+ details: 'Prepare seating and signage.',
244
+ },
245
+ ];
246
+
247
+ handleSelect(item: JvDayPlannerItem) {
248
+ console.log(item);
249
+ }
250
+ }
251
+ ```
252
+
253
+ ### Combined example
254
+
255
+ Use both components together when you need a left-side month selector and a right-side agenda:
256
+
257
+ ```html
258
+ <jv-month-calendar
259
+ [value]="selectedDate()"
260
+ [dayMeta]="calendarMeta()"
261
+ (selectionChange)="selectedDate.set($event)"
262
+ />
263
+
264
+ <jv-day-planner
265
+ [items]="filteredItems()"
266
+ [groupByDate]="showAll()"
267
+ (itemSelect)="selectedItem.set($event)"
268
+ />
269
+ ```
270
+
271
+ ## Grid Features
272
+
273
+ | Feature | Description |
274
+ | ------------------ | ---------------------------------------------------------------- |
275
+ | Sorting | Client-side multi-column sorting with sort icons and `aria-sort` |
276
+ | Search | Global text search across visible columns |
277
+ | Pagination | Configurable page size, page range buttons, first/last/prev/next |
278
+ | Selection | Checkbox row selection with `selectedIds` / `selectionChange` |
279
+ | Row actions | Custom action buttons per row |
280
+ | Density modes | Compact, normal, comfortable |
281
+ | Sticky columns | Pin columns to left or right |
282
+ | Column resizing | Drag column header borders to resize |
283
+ | Column reordering | Drag & drop column headers |
284
+ | Grouped headers | Multi-row header with `colspan` via `children` |
285
+ | Per-column filters | Filter input row with operators |
286
+ | Inline editing | Double-click or Enter to edit: text, number, select, boolean |
287
+ | Virtual scrolling | Render only visible rows for large datasets |
288
+ | CSV/Excel export | Built-in toolbar buttons, no external deps |
289
+ | Server-side mode | Delegate sort/filter/page to parent component |
290
+ | TrackBy | Custom trackBy key or function |
291
+ | i18n | All labels configurable via translation dictionary |
292
+
293
+ ### Grid API
294
+
295
+ ```typescript
296
+ import { JvGridComponent } from '@devjuliovilla/jv-ui';
297
+ ```
298
+
299
+ **Inputs:**
300
+
301
+ | Input | Type | Default | Description |
302
+ | ------------- | ----------------------------- | ------- | -------------------------- |
303
+ | `data` | `T[]` | `[]` | Row data array |
304
+ | `columns` | `JvGridColumn<T>[]` | `[]` | Column definitions |
305
+ | `actions` | `JvGridAction<T>[]` | `[]` | Row action button configs |
306
+ | `options` | `Partial<JvGridOptions>` | `{}` | Feature toggles and config |
307
+ | `trackBy` | `keyof T \| Function \| null` | `null` | Row identity |
308
+ | `selectedIds` | `(string \| number)[]` | `[]` | Controlled selection IDs |
309
+
310
+ **Outputs:**
311
+
312
+ | Output | Type |
313
+ | ----------------- | ----------------------------------------------------------- |
314
+ | `rowClick` | `T` |
315
+ | `rowDoubleClick` | `T` |
316
+ | `actionClick` | `{ actionId: string; row: T }` |
317
+ | `selectionChange` | `(string \| number)[]` |
318
+ | `pageChange` | `{ pageIndex: number; pageSize: number }` |
319
+ | `searchChange` | `string` |
320
+ | `sortChange` | `{ columnKey: string; direction: 'asc' \| 'desc' \| null }` |
321
+ | `columnFilter` | `{ columnKey: string; value: string }` |
322
+ | `columnResize` | `{ columnKey: string; width: string }` |
323
+ | `columnReorder` | `{ columnKey: string; newIndex: number }` |
324
+ | `rowEdit` | `{ row: T; column: JvGridColumn<T>; value: unknown }` |
325
+
326
+ **JvGridColumn options:**
327
+
328
+ | Property | Type | Description |
329
+ | --------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------- |
330
+ | `key` | `keyof T \| string` | Data field key |
331
+ | `header` | `string` | Column display header |
332
+ | `sortable` | `boolean` | Enable column sorting |
333
+ | `searchable` | `boolean` | Include in global search |
334
+ | `filterable` | `boolean` | Show per-column filter input |
335
+ | `hidden` | `boolean` | Hide column from display |
336
+ | `sticky` | `'left' \| 'right'` | Pin column position |
337
+ | `editable` | `boolean` | Allow inline cell editing |
338
+ | `editType` | `'text' \| 'number' \| 'select' \| 'boolean'` | Editor type |
339
+ | `editOptions` | `{ label: string; value: unknown }[]` | Options for select editor |
340
+ | `width` | `string` | Column width (e.g. '8rem') |
341
+ | `align` | `'start' \| 'center' \| 'end'` | Text alignment |
342
+ | `type` | `'text' \| 'integer' \| 'number' \| 'currency' \| 'percent' \| 'date' \| 'time' \| 'datetime' \| 'boolean'` | Data type for formatting |
343
+ | `formatOptions` | `Intl.NumberFormatOptions & Intl.DateTimeFormatOptions` | Per-column formatting overrides |
344
+ | `format` | `(value, row) => string` | Custom display formatter |
345
+ | `children` | `JvGridColumn<T>[]` | Child columns for grouped headers |
346
+ | `resizable` | `boolean` | Allow column resize |
347
+ | `cellClass` | `string` | CSS class for cells |
348
+ | `headerClass` | `string` | CSS class for header |
349
+
350
+ **JvGridOptions:**
351
+
352
+ | Option | Type | Default | Description |
353
+ | ------------------------ | ---------------------------------------- | ------------------- | ------------------------------------------------------------------------------------- |
354
+ | `searchable` | `boolean` | `true` | Show search bar |
355
+ | `sortable` | `boolean` | `true` | Enable column sorting |
356
+ | `pageable` | `boolean` | `true` | Enable pagination |
357
+ | `selectable` | `boolean` | `false` | Show selection checkboxes |
358
+ | `pageSize` | `number` | `20` | Default page size |
359
+ | `pageSizeOptions` | `number[]` | `[10, 20, 50, 100]` | Page size selector options |
360
+ | `density` | `'compact' \| 'normal' \| 'comfortable'` | `'normal'` | Row density |
361
+ | `loading` | `boolean` | `false` | Show loading spinner |
362
+ | `emptyMessage` | `string` | — | Empty state message |
363
+ | `exportable` | `boolean` | `false` | Show CSV/Excel export buttons |
364
+ | `exportFileName` | `string` | `''` | Base filename used for CSV/Excel exports; the component applies the correct extension |
365
+ | `serverSide` | `boolean` | `false` | Disable client-side processing |
366
+ | `totalItems` | `number` | `0` | Total items for server-side mode |
367
+ | `stickyColumns` | `boolean` | `false` | Enable sticky column support |
368
+ | `resizableColumns` | `boolean` | `false` | Enable column resizing |
369
+ | `reorderableColumns` | `boolean` | `false` | Enable column reordering |
370
+ | `editable` | `boolean` | `false` | Enable inline editing |
371
+ | `virtualScroll` | `boolean` | `false` | Enable virtual scrolling |
372
+ | `virtualScrollRowHeight` | `number` | `48` | Row height for virtual scroll |
373
+ | `columnFilters` | `boolean` | `false` | Show filter row below headers |
374
+ | `rowDoubleClick` | `boolean` | `false` | Enable row double-click event |
375
+ | `keyboardNavigation` | `boolean` | `false` | Enable arrow-key cell navigation and `F2` editing flow |
376
+ | `ariaLabel` | `string` | — | Accessible label for the grid |
377
+
378
+ ### Grid example
379
+
380
+ ```typescript
381
+ import { Component } from '@angular/core';
382
+ import { JvGridComponent, JvGridColumn, JvGridOptions } from '@devjuliovilla/jv-ui';
383
+
384
+ interface Product {
385
+ id: number;
386
+ name: string;
387
+ price: number;
388
+ status: string;
389
+ }
390
+
391
+ @Component({
392
+ selector: 'app-products',
393
+ standalone: true,
394
+ imports: [JvGridComponent],
395
+ template: `
396
+ <jv-grid
397
+ [data]="products"
398
+ [columns]="columns"
399
+ [options]="{ selectable: true, exportable: true, exportFileName: 'products', pageSize: 10 }"
400
+ [trackBy]="'id'"
401
+ [selectedIds]="selectedIds"
402
+ (selectionChange)="selectedIds = $event"
403
+ />
404
+ `,
405
+ })
406
+ export class ProductsComponent {
407
+ products: Product[] = [
408
+ /* ... */
409
+ ];
410
+ selectedIds: (string | number)[] = [];
411
+ columns: JvGridColumn<Product>[] = [
412
+ { key: 'id', header: 'ID', width: '4rem' },
413
+ { key: 'name', header: 'Product', sortable: true, filterable: true },
414
+ { key: 'price', header: 'Price', type: 'number', align: 'end', format: (v) => '$' + v },
415
+ { key: 'status', header: 'Status', sortable: true },
416
+ ];
417
+ }
418
+ ```
419
+
420
+ ### Grid behavior notes
421
+
422
+ - **Row identity:** when `trackBy` is not provided, rows with an `id` property use that value as their identity. Provide `[trackBy]` when the row identity uses another field or a custom function.
423
+ - **Controlled selection:** use `[selectedIds]` together with `(selectionChange)` when the parent owns selection state. The component accepts an empty array, so selection can start fully controlled without special initialization.
424
+ - **Pagination:** `pageSize` is clamped to the configured `pageSizeOptions`, and page indexes are clamped when the data or page size changes. Use `(pageChange)` to synchronize server-side pagination.
425
+ - **Grouped headers:** define parent columns with `children`. The grouped header is rendered with `colspan`, while sorting, filtering, editing, resizing, reordering, and export operate on the leaf columns.
426
+ - **Virtual scrolling:** place the grid inside a container with a constrained height and set `virtualScroll: true`. The default row height is `48`; set `virtualScrollRowHeight` to the actual rendered row height when it differs.
427
+ - **Formatting:** column `type` and `formatOptions` affect display only. Sorting and export use the raw field value, not the localized text shown in the cell.
428
+ - **Inline editing:** set both `editable: true` in `options` and `editable: true` on the column. `select` editors emit the configured option value, while `boolean` editors emit a boolean. Press `F2` to start, `Enter` to commit, and `Escape` to cancel when keyboard navigation is enabled.
429
+
430
+ ### Keyboard navigation example
431
+
432
+ ```typescript
433
+ const gridOptions: JvGridOptions = {
434
+ keyboardNavigation: true,
435
+ editable: true,
436
+ pageable: false,
437
+ };
438
+
439
+ const columns: JvGridColumn<Product>[] = [
440
+ { key: 'name', header: 'Product', editable: true, editType: 'text' },
441
+ {
442
+ key: 'status',
443
+ header: 'Status',
444
+ editable: true,
445
+ editType: 'select',
446
+ editOptions: [
447
+ { label: 'Active', value: 'active' },
448
+ { label: 'Paused', value: 'paused' },
449
+ ],
450
+ },
451
+ ];
452
+ ```
453
+
454
+ ```html
455
+ <jv-grid
456
+ [data]="products"
457
+ [columns]="columns"
458
+ [options]="gridOptions"
459
+ (rowEdit)="onRowEdit($event)"
460
+ />
461
+ ```
462
+
463
+ With `keyboardNavigation` enabled, arrow keys move between data cells without trapping row action buttons. `Tab` continues to the row actions, `F2` starts editing, `Enter` commits, and `Escape` cancels.
464
+
465
+ ## List API
466
+
467
+ ```typescript
468
+ import { JvListComponent, JvListItemComponent } from '@devjuliovilla/jv-ui';
469
+ ```
470
+
471
+ **JvList inputs:**
472
+
473
+ | Input | Type | Default | Description |
474
+ | ----------- | ------------------------ | -------- | ------------------------------------------------------------------------------ |
475
+ | `role` | `'list' \| 'navigation'` | `'list'` | ARIA role for the list |
476
+ | `variant` | `'bordered' \| null` | `null` | Outer border + border-radius around the list (items always have bottom border) |
477
+ | `ariaLabel` | `string` | `''` | Accessible label |
478
+
479
+ **JvListItem inputs:**
480
+
481
+ | Input | Type | Default | Description |
482
+ | ------------- | ------------------- | ------- | -------------------------------------------- |
483
+ | `title` | `string` (required) | — | Primary text |
484
+ | `description` | `string` | `''` | Secondary text below title |
485
+ | `leadingIcon` | `string \| null` | `null` | Lucide icon name on the left |
486
+ | `disabled` | `boolean` | `false` | Gray out and block interaction |
487
+ | `active` | `boolean` | `false` | Highlight with primary color and left border |
488
+
489
+ **JvListItem outputs:**
490
+
491
+ | Output | Type |
492
+ | ----------- | ------ |
493
+ | `activated` | `void` |
494
+
495
+ **Content projection:** use the `meta` attribute selector for badges, icons, or any content on the right side:
496
+
497
+ ```html
498
+ <jv-list-item title="Inbox" description="New messages">
499
+ <jv-badge tone="primary" meta>3</jv-badge>
500
+ <jv-icon name="chevron-right" meta />
501
+ </jv-list-item>
502
+ ```
503
+
504
+ ### Example
505
+
506
+ ```typescript
507
+ import { Component } from '@angular/core';
508
+ import { JvListComponent, JvListItemComponent, JvBadgeComponent } from '@devjuliovilla/jv-ui';
509
+
510
+ @Component({
511
+ selector: 'app-nav-list',
512
+ standalone: true,
513
+ imports: [JvListComponent, JvListItemComponent, JvBadgeComponent],
514
+ template: `
515
+ <jv-list variant="bordered">
516
+ <jv-list-item
517
+ title="Dashboard"
518
+ description="Main overview"
519
+ leadingIcon="layout-dashboard"
520
+ [active]="true"
521
+ />
522
+ <jv-list-item title="Notifications" description="3 pending" (activated)="onOpen()">
523
+ <jv-badge tone="primary" meta>3</jv-badge>
524
+ </jv-list-item>
525
+ <jv-list-item title="Reports" description="Coming soon" [disabled]="true" />
526
+ </jv-list>
527
+ `,
528
+ })
529
+ export class NavListComponent {
530
+ onOpen() {
531
+ /* handle activation */
532
+ }
533
+ }
534
+ ```
535
+
536
+ ## Pagination API
537
+
538
+ ```typescript
539
+ import { JvPaginationComponent } from '@devjuliovilla/jv-ui';
540
+ ```
541
+
542
+ | Input | Type | Default | Description |
543
+ | ----------------- | ---------- | ------------------- | ------------------------ |
544
+ | `totalItems` | `number` | `0` | Total items |
545
+ | `pageSize` | `number` | `20` | Items per page |
546
+ | `pageSizeOptions` | `number[]` | `[10, 20, 50, 100]` | Page size options |
547
+ | `pageIndex` | `number` | `0` | Current page (0-based) |
548
+ | `maxVisiblePages` | `number` | `5` | Max page buttons to show |
549
+
550
+ | Output | Type |
551
+ | ------------ | ----------------------------------------- |
552
+ | `pageChange` | `{ pageIndex: number; pageSize: number }` |
553
+
554
+ ## Tabs API
555
+
556
+ ```typescript
557
+ import { JvTabsComponent, JvTabPanelDirective, JvTabItem } from '@devjuliovilla/jv-ui';
558
+ ```
559
+
560
+ **Inputs:**
561
+
562
+ | Input | Type | Default | Description |
563
+ | ------------- | ------------------------------------- | ------- | --------------------------------------------------------- |
564
+ | `tabs` | `JvTabItem[]` | `[]` | Tab definitions (`{ id, label, icon?, disabled? }`) |
565
+ | `activeTabId` | `string \| null` | `null` | Controlled active tab ID |
566
+ | `keepMounted` | `boolean` | `true` | Keep all panels in DOM; `false` renders only active panel |
567
+ | `transition` | `'none' \| 'fade' \| 'slide' \| null` | `null` | Panel transition animation (falls back to global config) |
568
+
569
+ **Outputs:**
570
+
571
+ | Output | Type |
572
+ | ----------------- | -------- |
573
+ | `activeTabChange` | `string` |
574
+
575
+ **Content projection:** use `jvTabPanel` directive on `ng-template` to define panel content:
576
+
577
+ ```html
578
+ <jv-tabs [tabs]="tabs" [activeTabId]="activeTabId()" (activeTabChange)="activeTabId.set($event)">
579
+ <ng-template jvTabPanel="overview">
580
+ <p>Overview content</p>
581
+ </ng-template>
582
+ <ng-template jvTabPanel="analytics">
583
+ <p>Analytics content</p>
584
+ </ng-template>
585
+ </jv-tabs>
586
+ ```
587
+
588
+ ### Tab Transitions
589
+
590
+ Tabs support animated transitions between panels. Configure globally via `provideJvUi()` or per-instance via the `transition` input:
591
+
592
+ ```typescript
593
+ // Global default
594
+ provideJvUi({ tabsTransition: 'fade' });
595
+ ```
596
+
597
+ ```typescript
598
+ // Per-instance override
599
+ <jv-tabs transition="slide" [keepMounted]="false">...</jv-tabs>
600
+ ```
601
+
602
+ | Transition | `keepMounted=true` | `keepMounted=false` | Description |
603
+ | ---------- | ---------------------- | ------------------- | ------------------------------------ |
604
+ | `'none'` | Instant switch | Instant switch | No animation |
605
+ | `'fade'` | Opacity cross-fade | Opacity cross-fade | Smooth fade between panels |
606
+ | `'slide'` | Falls back to `'fade'` | Directional slide | Slides left/right based on tab index |
607
+
608
+ **Note:** `slide` requires `keepMounted=false` because it needs to animate both entering and exiting panels simultaneously. When used with `keepMounted=true`, it automatically falls back to `fade`.
609
+
610
+ ### Tabs Example
611
+
612
+ ```typescript
613
+ import { Component, signal } from '@angular/core';
614
+ import { JvTabItem, JvTabPanelDirective, JvTabsComponent } from '@devjuliovilla/jv-ui';
615
+
616
+ @Component({
617
+ standalone: true,
618
+ imports: [JvTabsComponent, JvTabPanelDirective],
619
+ template: `
620
+ <jv-tabs
621
+ [tabs]="tabs"
622
+ [activeTabId]="activeTabId()"
623
+ transition="fade"
624
+ (activeTabChange)="activeTabId.set($event)"
625
+ >
626
+ <ng-template jvTabPanel="overview">
627
+ <p>Overview content</p>
628
+ </ng-template>
629
+ <ng-template jvTabPanel="analytics">
630
+ <p>Analytics content</p>
631
+ </ng-template>
632
+ </jv-tabs>
633
+ `,
634
+ })
635
+ export class TabsExampleComponent {
636
+ readonly activeTabId = signal('overview');
637
+ readonly tabs: JvTabItem[] = [
638
+ { id: 'overview', label: 'Overview' },
639
+ { id: 'analytics', label: 'Analytics', icon: 'chart-column' },
640
+ ];
641
+ }
642
+ ```
643
+
644
+ ## Image Slider API
645
+
646
+ ```typescript
647
+ import { JvImageSliderComponent, JvSliderImage } from '@devjuliovilla/jv-ui';
648
+ ```
649
+
650
+ **JvSliderImage:**
651
+
652
+ | Property | Type | Required | Description |
653
+ | ------------- | -------- | -------- | ---------------------------------------- |
654
+ | `src` | `string` | Yes | Image URL |
655
+ | `alt` | `string` | Yes | Alternative text for accessibility |
656
+ | `description` | `string` | No | Caption displayed below the image |
657
+ | `thumbnail` | `string` | No | Custom thumbnail URL (defaults to `src`) |
658
+
659
+ **Inputs:**
660
+
661
+ | Input | Type | Default | Description |
662
+ | ----------------- | ----------------- | ------- | --------------------------------- |
663
+ | `images` | `JvSliderImage[]` | `[]` | Array of images to display |
664
+ | `showThumbnails` | `boolean` | `true` | Show thumbnail strip below slider |
665
+ | `showDescription` | `boolean` | `true` | Show image description |
666
+
667
+ **Outputs:**
668
+
669
+ | Output | Type | Description |
670
+ | ------------- | -------- | ------------------------------------- |
671
+ | `imageChange` | `number` | Emits index when active image changes |
672
+
673
+ **i18n support:**
674
+
675
+ The component automatically translates aria labels using `JvTranslationService`:
676
+
677
+ | Key | English | Spanish |
678
+ | ---------------------- | ---------------- | ---------------------- |
679
+ | `slider.prevImage` | Previous image | Imagen anterior |
680
+ | `slider.nextImage` | Next image | Imagen siguiente |
681
+ | `slider.thumbnailList` | Image thumbnails | Miniaturas de imagenes |
682
+
683
+ ### Features
684
+
685
+ - **Keyboard navigation:** ArrowLeft/ArrowRight to navigate, Home/End for first/last image
686
+ - **Responsive:** Images scale to fit container with `object-fit: contain`
687
+ - **Thumbnails:** Scrollable thumbnail strip with active state indicator
688
+ - **Single image mode:** Navigation controls hidden when only one image is provided
689
+ - **Lazy loading:** Images use native `loading="lazy"` attribute
690
+ - **i18n:** Aria labels automatically translated based on configured locale
691
+
692
+ ### Example
693
+
694
+ ```typescript
695
+ import { Component } from '@angular/core';
696
+ import { JvImageSliderComponent, JvSliderImage } from '@devjuliovilla/jv-ui';
697
+
698
+ @Component({
699
+ standalone: true,
700
+ imports: [JvImageSliderComponent],
701
+ template: `
702
+ <jv-image-slider
703
+ [images]="images"
704
+ [showThumbnails]="true"
705
+ [showDescription]="true"
706
+ (imageChange)="onImageChange($event)"
707
+ />
708
+ `,
709
+ })
710
+ export class SliderComponent {
711
+ readonly images: JvSliderImage[] = [
712
+ { src: 'photo1.jpg', alt: 'Sunset', description: 'Beautiful sunset over the ocean' },
713
+ { src: 'photo2.jpg', alt: 'Mountain', description: 'Snow-capped mountain peak' },
714
+ { src: 'photo3.jpg', alt: 'Forest', description: 'Dense forest trail' },
715
+ ];
716
+
717
+ onImageChange(index: number) {
718
+ console.log('Viewing image:', index);
719
+ }
720
+ }
721
+ ```
722
+
723
+ ## Image Gallery API
724
+
725
+ ```typescript
726
+ import { JvImageGalleryComponent, JvGalleryImage, JvGalleryAction } from '@devjuliovilla/jv-ui';
727
+ ```
728
+
729
+ **JvGalleryImage:**
730
+
731
+ | Property | Type | Required | Description |
732
+ | ----------- | -------- | -------- | ---------------------------------------- |
733
+ | `src` | `string` | Yes | Image URL |
734
+ | `alt` | `string` | Yes | Alternative text for accessibility |
735
+ | `thumbnail` | `string` | No | Custom thumbnail URL (defaults to `src`) |
736
+
737
+ **JvGalleryAction:**
738
+
739
+ | Property | Type | Required | Description |
740
+ | -------- | ---------- | -------- | ------------------------ |
741
+ | `id` | `string` | Yes | Unique action identifier |
742
+ | `label` | `string` | Yes | Button label text |
743
+ | `icon` | `string` | No | Lucide icon name |
744
+ | `tone` | `JvIntent` | No | Button variant |
745
+
746
+ **Inputs:**
747
+
748
+ | Input | Type | Default | Description |
749
+ | --------------- | ------------------- | ------- | ------------------------------------------------------------------------------------- |
750
+ | `images` | `JvGalleryImage[]` | `[]` | Array of images to display |
751
+ | `stripHeightVh` | `number` | `25` | Height of the thumbnail strip in viewport-height units, clamped between `0` and `100` |
752
+ | `actions` | `JvGalleryAction[]` | `[]` | Action buttons shown in dialog footer |
753
+
754
+ **Outputs:**
755
+
756
+ | Output | Type | Description |
757
+ | ------------- | --------------------------------------------- | -------------------------------------- |
758
+ | `imageClick` | `JvGalleryImage` | Emits when an image is clicked |
759
+ | `actionClick` | `{ actionId: string; image: JvGalleryImage }` | Emits when an action button is clicked |
760
+
761
+ ### Features
762
+
763
+ - **Horizontal strip:** Scrollable thumbnail strip with configurable height in `vh`
764
+ - **Full-screen viewer:** Click any image to open in a dialog with dark background
765
+ - **Navigation:** Prev/next buttons and keyboard arrows (← →) in the viewer
766
+ - **Configurable actions:** Action buttons in dialog footer (favorite, edit, delete, etc.)
767
+ - **Responsive:** Shows multiple columns on desktop, single column with scroll on mobile
768
+ - **Lazy loading:** All images use native `loading="lazy"` attribute
769
+ - **i18n:** Close and navigation labels automatically translated
770
+
771
+ ### Example
772
+
773
+ ```typescript
774
+ import { Component } from '@angular/core';
775
+ import { JvImageGalleryComponent, JvGalleryImage, JvGalleryAction } from '@devjuliovilla/jv-ui';
776
+
777
+ @Component({
778
+ standalone: true,
779
+ imports: [JvImageGalleryComponent],
780
+ template: `
781
+ <jv-image-gallery
782
+ [images]="images"
783
+ [stripHeightVh]="30"
784
+ [actions]="actions"
785
+ (imageClick)="onImageClick($event)"
786
+ (actionClick)="onActionClick($event)"
787
+ />
788
+ `,
789
+ })
790
+ export class GalleryComponent {
791
+ readonly images: JvGalleryImage[] = [
792
+ { src: 'photo1.jpg', alt: 'Sunset' },
793
+ { src: 'photo2.jpg', alt: 'Mountain' },
794
+ { src: 'photo3.jpg', alt: 'Forest' },
795
+ ];
796
+
797
+ readonly actions: JvGalleryAction[] = [
798
+ { id: 'favorite', label: 'Favorite', icon: 'heart', tone: 'danger' },
799
+ { id: 'edit', label: 'Edit', icon: 'pencil' },
800
+ { id: 'delete', label: 'Delete', icon: 'trash-2', tone: 'danger' },
801
+ ];
802
+
803
+ onImageClick(image: JvGalleryImage) {
804
+ console.log('Viewing:', image.alt);
805
+ }
806
+
807
+ onActionClick(event: { actionId: string; image: JvGalleryImage }) {
808
+ console.log(event.actionId, 'on', event.image.alt);
809
+ }
810
+ }
811
+ ```
812
+
813
+ ## Textarea API
814
+
815
+ ```typescript
816
+ import { JvTextareaComponent } from '@devjuliovilla/jv-ui';
817
+ ```
818
+
819
+ | Input | Type | Default | Description |
820
+ | ------------- | --------- | ----------------- | ---------------------------------------------------- |
821
+ | `placeholder` | `string` | `''` | Placeholder text |
822
+ | `required` | `boolean` | `false` | Mark field as required |
823
+ | `invalid` | `boolean` | `false` | Show invalid state |
824
+ | `readonly` | `boolean` | `false` | Make textarea read-only |
825
+ | `rows` | `number` | `3` | Visible number of rows |
826
+ | `cols` | `number` | — | Visible width in columns |
827
+ | `maxlength` | `number` | — | Maximum character length |
828
+ | `describedBy` | `string` | `''` | ID of description/error element for aria-describedby |
829
+ | `inputId` | `string` | `jv-textarea-{n}` | Auto-generated unique ID |
830
+
831
+ Implements `ControlValueAccessor` — compatible with `[(ngModel)]` and reactive forms via `formControlName`.
832
+
833
+ ### Example
834
+
835
+ ```typescript
836
+ import { Component } from '@angular/core';
837
+ import { JvTextareaComponent } from '@devjuliovilla/jv-ui';
838
+ import { ReactiveFormsModule, FormBuilder } from '@angular/forms';
839
+
840
+ @Component({
841
+ selector: 'app-profile',
842
+ standalone: true,
843
+ imports: [ReactiveFormsModule, JvTextareaComponent],
844
+ template: `
845
+ <jv-textarea
846
+ formControlName="bio"
847
+ placeholder="Tell us about yourself..."
848
+ [rows]="4"
849
+ [maxlength]="500"
850
+ />
851
+ `,
852
+ })
853
+ export class ProfileComponent {
854
+ form = inject(FormBuilder).group({ bio: [''] });
855
+ }
856
+ ```
857
+
858
+ ## Code API
859
+
860
+ ```typescript
861
+ import { JvCodeComponent } from '@devjuliovilla/jv-ui';
862
+ ```
863
+
864
+ | Input | Type | Default | Description |
865
+ | ---------- | ------------------------------------------------------------------------- | ------------------ | --------------------------------------------------------------------- |
866
+ | `code` | `string` | — | Code or text content to render |
867
+ | `language` | `string` | `''` | Optional language badge |
868
+ | `title` | `string` | `''` | Optional header title |
869
+ | `font` | `'jetbrains-mono' \| 'fira-code' \| 'cascadia' \| 'consolas' \| 'system'` | `'jetbrains-mono'` | Mono font preset for the rendered block |
870
+ | `editable` | `boolean` | `false` | Renders a textarea-style editing surface instead of read-only preview |
871
+ | `width` | `string` | `'100%'` | CSS width applied to the component |
872
+ | `height` | `string` | `'auto'` | CSS height for the editable surface or minimum preview height |
873
+
874
+ Use `JvCode` for read-only payloads or long single-line content where horizontal scrolling should be preserved instead of wrapping.
875
+ The library does not bundle font files. `JvCode` references common mono families and will use any web font you load at the application level.
876
+
877
+ When `editable` is enabled, `JvCode` emits `codeChange` on every edit so the parent can keep the source text in sync.
878
+
879
+ ### Example
880
+
881
+ ```typescript
882
+ import { Component } from '@angular/core';
883
+ import { JvCodeComponent } from '@devjuliovilla/jv-ui';
884
+
885
+ @Component({
886
+ selector: 'app-payload-preview',
887
+ standalone: true,
888
+ imports: [JvCodeComponent],
889
+ template: `
890
+ <jv-code
891
+ [code]="payload"
892
+ language="json"
893
+ title="HTTP payload preview"
894
+ font="fira-code"
895
+ [editable]="true"
896
+ width="100%"
897
+ height="18rem"
898
+ (codeChange)="payload = $event"
899
+ />
900
+ `,
901
+ })
902
+ export class PayloadPreviewComponent {
903
+ payload = '{"status":"ok"}';
904
+ }
905
+ ```
906
+
907
+ If you want hosted fonts without shipping them in your package, load them at the app level, for example:
908
+
909
+ ```css
910
+ @import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');
911
+ ```
912
+
913
+ ## Confirm Dialog Labels
914
+
915
+ `JvDialogService.confirm()` already supports `confirmLabel` and `cancelLabel` overrides per dialog. If you omit them, the defaults come from the active translation dictionary using `dialog.confirm` and `dialog.cancel`.
916
+
917
+ This lets you either:
918
+
919
+ - override labels directly for a specific action like `Guardar evento` / `Descartar cambios`
920
+ - or register translated defaults in your i18n dictionary for each supported language
921
+
922
+ Example with business copy:
923
+
924
+ ```typescript
925
+ const confirmed = await dialogService.confirm({
926
+ title: 'Guardar evento',
927
+ message: 'Se aplicaran cambios a la agenda del equipo.',
928
+ confirmLabel: 'Guardar evento',
929
+ cancelLabel: 'Descartar cambios',
930
+ tone: 'primary',
931
+ });
932
+
933
+ if (confirmed) {
934
+ saveEvent();
935
+ }
936
+ ```
937
+
938
+ Example using translated defaults from your dictionary:
939
+
940
+ ```typescript
941
+ await dialogService.confirm({
942
+ message: 'This action will publish the current draft.',
943
+ tone: 'primary',
944
+ });
945
+ ```
946
+
947
+ ## Icon System
948
+
949
+ ```typescript
950
+ import { JvIconComponent, JV_LUCIDE_ICON_REGISTRY } from '@devjuliovilla/jv-ui';
951
+ ```
952
+
953
+ | Input | Type | Default | Description |
954
+ | ------------- | --------- | ------- | ----------------------------------------------- |
955
+ | `name` | `string` | — | Icon name (from auto-generated Lucide registry) |
956
+ | `size` | `number` | `24` | Width and height in pixels |
957
+ | `strokeWidth` | `number` | `2` | SVG stroke width |
958
+ | `decorative` | `boolean` | `true` | `aria-hidden="true"` when decorative |
959
+ | `ariaLabel` | `string` | — | Accessible label when not decorative |
960
+
961
+ Icons are auto-generated from [lucide-static](https://www.npmjs.com/package/lucide-static) via:
962
+
963
+ ```bash
964
+ node tools/generate-icons.mjs
965
+ ```
966
+
967
+ 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.
968
+
969
+ ## Layout API
970
+
971
+ ### JvDashboardShell
972
+
973
+ ```typescript
974
+ import { JvDashboardShellComponent } from '@devjuliovilla/jv-ui';
975
+ ```
976
+
977
+ | Input | Type | Default | Description |
978
+ | ------------------- | ------------------ | ----------- | ------------------------------------------- |
979
+ | `title` | `string` | — | App / brand title |
980
+ | `sidebarSubtitle` | `string` | `''` | Subtitle below brand |
981
+ | `brandIcon` | `string` | `'monitor'` | Brand Lucide icon |
982
+ | `navItems` | `JvNavItem[]` | `[]` | Navigation items (supports nested children) |
983
+ | `sidebarCollapsed` | `boolean` | `false` | Desktop sidebar collapsed state |
984
+ | `mobileSidebarOpen` | `boolean` | `false` | Mobile sidebar open/closed |
985
+ | `topbarTitle` | `string` | `''` | Topbar page title |
986
+ | `topbarSubtitle` | `string` | `''` | Topbar subtitle |
987
+ | `currentTheme` | `JvTheme` | `'light'` | Active theme value |
988
+ | `themeOptions` | `JvThemeOption[]` | `[]` | Theme selector options |
989
+ | `topbarActions` | `JvTopbarAction[]` | `[]` | Icon buttons in topbar |
990
+ | `showThemeSelector` | `boolean` | `true` | Show theme pills |
991
+
992
+ | Output | Description |
993
+ | ----------------------- | -------------------------------------------------------------- |
994
+ | `menuClick` | Hamburger button clicked — toggle mobile sidebar |
995
+ | `mobileClose` | Backdrop clicked or navigation selected — close mobile sidebar |
996
+ | `sidebarCollapseToggle` | Collapse toggle clicked — collapse/expand sidebar |
997
+ | `themeChange` | Theme pill clicked |
998
+ | `topbarActionClick` | Topbar action button clicked |
999
+
1000
+ **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.
1001
+
1002
+ ### JvSidebar
1003
+
1004
+ | Input | Type | Default | Description |
1005
+ | ------------ | ------------- | ---------------------- | --------------------- |
1006
+ | `title` | `string` | — | Brand title |
1007
+ | `subtitle` | `string` | `''` | Brand subtitle |
1008
+ | `brandIcon` | `string` | `'monitor'` | Brand icon |
1009
+ | `items` | `JvNavItem[]` | `[]` | Navigation items |
1010
+ | `collapsed` | `boolean` | `false` | Collapse to icon-only |
1011
+ | `mobileOpen` | `boolean` | `false` | Show on mobile |
1012
+ | `ariaLabel` | `string` | `'Sidebar navigation'` | Accessible label |
1013
+
1014
+ | Output | Description |
1015
+ | ---------------- | ------------------------------------------------ |
1016
+ | `collapseToggle` | Collapse button clicked |
1017
+ | `mobileClose` | Backdrop or nav item interaction — request close |
1018
+
1019
+ ## Responsive Design
1020
+
1021
+ The library includes basic responsive behavior:
1022
+
1023
+ - **Breakpoints** defined as CSS custom properties: `--jv-breakpoint-sm` (640px), `--jv-breakpoint-md` (768px), `--jv-breakpoint-lg` (1024px), `--jv-breakpoint-xl` (1280px)
1024
+ - **Dashboard shell** collapses to single column at ≤ 900px; sidebar becomes a slide-in overlay with backdrop
1025
+ - **Topbar** stacks vertically at ≤ 900px
1026
+ - **Grid** pagination and toolbar stack at ≤ 640px; table scrolls horizontally with `overflow-x: auto`
1027
+ - **Flex-wrap** is used extensively for natural overflow handling
1028
+ - **Dialog** and **Toast** constrain width with `min()` to never exceed the viewport
1029
+
1030
+ ## Services
1031
+
1032
+ | Service | Import Path | Description |
1033
+ | ----------------------- | ---------------------- | -------------------------------------------- |
1034
+ | `JvThemeService` | `@devjuliovilla/jv-ui` | Light / dark / high-contrast theme switching |
1035
+ | `JvTranslationService` | `@devjuliovilla/jv-ui` | Dictionary-based i18n (en/es) |
1036
+ | `JvToastService` | `@devjuliovilla/jv-ui` | Toast notification system |
1037
+ | `JvLoaderService` | `@devjuliovilla/jv-ui` | Full-screen loader with request counter |
1038
+ | `JvDialogService` | `@devjuliovilla/jv-ui` | Programmatic confirm dialogs |
1039
+ | `JvAnnouncementService` | `@devjuliovilla/jv-ui` | Screen-reader live-region announcements |
1040
+
1041
+ ## Accessibility
1042
+
1043
+ - WCAG 2.2 AA target
1044
+ - Keyboard navigation for all interactive components
1045
+ - Focus management with visible focus indicators
1046
+ - Screen reader announcements (loading, empty states, page changes)
1047
+ - `aria-sort` on sortable grid headers
1048
+ - `aria-selected` on selectable grid rows
1049
+ - `aria-label` and `aria-labelledby` on interactive controls
1050
+ - Supports `prefers-reduced-motion`
1051
+
1052
+ ## Requirements
1053
+
1054
+ - Angular 21.2+
1055
+ - TypeScript 5.9+
1056
+
1057
+ ## License
1058
+
1059
+ MIT