@devjuliovilla/jv-ui 1.15.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +104 -16
- package/fesm2022/devjuliovilla-jv-ui.mjs +971 -1289
- package/fesm2022/devjuliovilla-jv-ui.mjs.map +1 -1
- package/package.json +85 -1
- package/secondary/auth-pages.d.ts +1 -0
- package/secondary/auth-pages.mjs +1 -0
- package/secondary/buttons.d.ts +1 -0
- package/secondary/buttons.mjs +1 -0
- package/secondary/calendar.d.ts +1 -0
- package/secondary/calendar.mjs +1 -0
- package/secondary/collapsible.d.ts +1 -0
- package/secondary/collapsible.mjs +1 -0
- package/secondary/config.d.ts +1 -0
- package/secondary/config.mjs +1 -0
- package/secondary/containers.d.ts +1 -0
- package/secondary/containers.mjs +1 -0
- package/secondary/core.d.ts +1 -0
- package/secondary/core.mjs +1 -0
- package/secondary/dialogs.d.ts +1 -0
- package/secondary/dialogs.mjs +1 -0
- package/secondary/feedback.d.ts +1 -0
- package/secondary/feedback.mjs +1 -0
- package/secondary/forms.d.ts +1 -0
- package/secondary/forms.mjs +1 -0
- package/secondary/gallery.d.ts +1 -0
- package/secondary/gallery.mjs +1 -0
- package/secondary/grid.d.ts +1 -0
- package/secondary/grid.mjs +1 -0
- package/secondary/i18n.d.ts +1 -0
- package/secondary/i18n.mjs +1 -0
- package/secondary/icons.d.ts +1 -0
- package/secondary/icons.mjs +1 -0
- package/secondary/layout.d.ts +1 -0
- package/secondary/layout.mjs +1 -0
- package/secondary/list.d.ts +1 -0
- package/secondary/list.mjs +1 -0
- package/secondary/pagination.d.ts +1 -0
- package/secondary/pagination.mjs +1 -0
- package/secondary/services.d.ts +1 -0
- package/secondary/services.mjs +1 -0
- package/secondary/slider.d.ts +1 -0
- package/secondary/slider.mjs +1 -0
- package/secondary/tabs.d.ts +1 -0
- package/secondary/tabs.mjs +1 -0
- package/secondary/tooltip.d.ts +1 -0
- package/secondary/tooltip.mjs +1 -0
- package/types/devjuliovilla-jv-ui.d.ts +41 -12
package/README.md
CHANGED
|
@@ -40,6 +40,30 @@ import { JvButtonComponent } from '@devjuliovilla/jv-ui';
|
|
|
40
40
|
export class App {}
|
|
41
41
|
```
|
|
42
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
|
+
|
|
43
67
|
## Components
|
|
44
68
|
|
|
45
69
|
| Category | Components |
|
|
@@ -950,20 +974,21 @@ This reads all SVG files from `lucide-static/icons` and produces `jv-icon-regist
|
|
|
950
974
|
import { JvDashboardShellComponent } from '@devjuliovilla/jv-ui';
|
|
951
975
|
```
|
|
952
976
|
|
|
953
|
-
| Input | Type
|
|
954
|
-
| ------------------- |
|
|
955
|
-
| `title` | `string`
|
|
956
|
-
| `
|
|
957
|
-
| `
|
|
958
|
-
| `
|
|
959
|
-
| `
|
|
960
|
-
| `
|
|
961
|
-
| `
|
|
962
|
-
| `
|
|
963
|
-
| `
|
|
964
|
-
| `
|
|
965
|
-
| `
|
|
966
|
-
| `
|
|
977
|
+
| Input | Type | Default | Description |
|
|
978
|
+
| ------------------- | ----------------------- | ----------- | ------------------------------------------- |
|
|
979
|
+
| `title` | `string` | — | App / brand title |
|
|
980
|
+
| `navigationMode` | `'sidebar' \| 'topbar'` | `'sidebar'` | Main navigation presentation |
|
|
981
|
+
| `sidebarSubtitle` | `string` | `''` | Subtitle below brand |
|
|
982
|
+
| `brandIcon` | `string` | `'monitor'` | Brand Lucide icon |
|
|
983
|
+
| `navItems` | `JvNavItem[]` | `[]` | Navigation items (supports nested children) |
|
|
984
|
+
| `sidebarCollapsed` | `boolean` | `false` | Desktop sidebar collapsed state |
|
|
985
|
+
| `mobileSidebarOpen` | `boolean` | `false` | Mobile sidebar open/closed |
|
|
986
|
+
| `topbarTitle` | `string` | `''` | Topbar page title |
|
|
987
|
+
| `topbarSubtitle` | `string` | `''` | Topbar subtitle |
|
|
988
|
+
| `currentTheme` | `JvTheme` | `'light'` | Active theme value |
|
|
989
|
+
| `themeOptions` | `JvThemeOption[]` | `[]` | Theme selector options |
|
|
990
|
+
| `topbarActions` | `JvTopbarAction[]` | `[]` | Icon buttons in topbar |
|
|
991
|
+
| `showThemeSelector` | `boolean` | `true` | Show theme pills |
|
|
967
992
|
|
|
968
993
|
| Output | Description |
|
|
969
994
|
| ----------------------- | -------------------------------------------------------------- |
|
|
@@ -973,7 +998,27 @@ import { JvDashboardShellComponent } from '@devjuliovilla/jv-ui';
|
|
|
973
998
|
| `themeChange` | Theme pill clicked |
|
|
974
999
|
| `topbarActionClick` | Topbar action button clicked |
|
|
975
1000
|
|
|
976
|
-
**Mobile behavior:** at viewports ≤ 900px the
|
|
1001
|
+
**Mobile behavior:** at viewports ≤ 900px the selected navigation becomes a fixed overlay with slide-in animation (`transform: translateX`) and a semi-transparent backdrop. The selected navigation emits `mobileClose` when the backdrop is clicked or a nav link is followed.
|
|
1002
|
+
|
|
1003
|
+
Use `navigationMode="topbar"` to render the brand, expandable navigation sections, and right-side actions in a horizontal menu. The default `sidebar` mode preserves the desktop sidebar and contextual topbar composition.
|
|
1004
|
+
|
|
1005
|
+
#### Switch an existing shell to topbar
|
|
1006
|
+
|
|
1007
|
+
The navigation data does not change. Keep the same `navItems` and set the mode explicitly:
|
|
1008
|
+
|
|
1009
|
+
```html
|
|
1010
|
+
<jv-dashboard-shell
|
|
1011
|
+
title="Admin"
|
|
1012
|
+
navigationMode="topbar"
|
|
1013
|
+
[navItems]="navItems"
|
|
1014
|
+
[topbarActions]="topbarActions"
|
|
1015
|
+
(topbarActionClick)="onTopbarAction($event)"
|
|
1016
|
+
>
|
|
1017
|
+
<router-outlet />
|
|
1018
|
+
</jv-dashboard-shell>
|
|
1019
|
+
```
|
|
1020
|
+
|
|
1021
|
+
This renders one navigation surface at a time. `sidebar` remains the default, so existing shell integrations do not need to change.
|
|
977
1022
|
|
|
978
1023
|
### JvSidebar
|
|
979
1024
|
|
|
@@ -992,13 +1037,55 @@ import { JvDashboardShellComponent } from '@devjuliovilla/jv-ui';
|
|
|
992
1037
|
| `collapseToggle` | Collapse button clicked |
|
|
993
1038
|
| `mobileClose` | Backdrop or nav item interaction — request close |
|
|
994
1039
|
|
|
1040
|
+
### JvTopbarMenu
|
|
1041
|
+
|
|
1042
|
+
Use this component directly when the application has its own shell instead of `JvDashboardShell`:
|
|
1043
|
+
|
|
1044
|
+
```typescript
|
|
1045
|
+
import { JvTopbarMenuComponent } from '@devjuliovilla/jv-ui';
|
|
1046
|
+
```
|
|
1047
|
+
|
|
1048
|
+
```html
|
|
1049
|
+
<jv-topbar-menu
|
|
1050
|
+
title="Admin"
|
|
1051
|
+
[items]="navItems"
|
|
1052
|
+
[actions]="topbarActions"
|
|
1053
|
+
[mobileOpen]="mobileMenuOpen"
|
|
1054
|
+
(menuClick)="mobileMenuOpen = !mobileMenuOpen"
|
|
1055
|
+
(mobileClose)="mobileMenuOpen = false"
|
|
1056
|
+
(actionClick)="onTopbarAction($event)"
|
|
1057
|
+
>
|
|
1058
|
+
</jv-topbar-menu>
|
|
1059
|
+
```
|
|
1060
|
+
|
|
1061
|
+
| Input | Type | Default | Description |
|
|
1062
|
+
| ------------------- | ------------------ | ----------- | ------------------------------------------ |
|
|
1063
|
+
| `title` | `string` | — | Brand title |
|
|
1064
|
+
| `subtitle` | `string` | `''` | Brand subtitle |
|
|
1065
|
+
| `brandIcon` | `string` | `'monitor'` | Brand icon |
|
|
1066
|
+
| `items` | `JvNavItem[]` | `[]` | Horizontal navigation with nested sections |
|
|
1067
|
+
| `mobileOpen` | `boolean` | `false` | Mobile navigation panel state |
|
|
1068
|
+
| `currentTheme` | `JvTheme` | `'light'` | Active theme value |
|
|
1069
|
+
| `themeOptions` | `JvThemeOption[]` | `[]` | Theme selector options |
|
|
1070
|
+
| `actions` | `JvTopbarAction[]` | `[]` | Right-side action buttons |
|
|
1071
|
+
| `showThemeSelector` | `boolean` | `true` | Show theme pills |
|
|
1072
|
+
|
|
1073
|
+
| Output | Description |
|
|
1074
|
+
| ------------- | ------------------------------------------ |
|
|
1075
|
+
| `menuClick` | Mobile menu button clicked |
|
|
1076
|
+
| `mobileClose` | Backdrop or navigation item requests close |
|
|
1077
|
+
| `themeChange` | Theme option clicked |
|
|
1078
|
+
| `actionClick` | Right-side action clicked; emits its `id` |
|
|
1079
|
+
|
|
1080
|
+
The topbar keeps one expandable section open at a time. Selecting a child route closes its dropdown. At mobile widths, the navigation becomes a slide-in panel.
|
|
1081
|
+
|
|
995
1082
|
## Responsive Design
|
|
996
1083
|
|
|
997
1084
|
The library includes basic responsive behavior:
|
|
998
1085
|
|
|
999
1086
|
- **Breakpoints** defined as CSS custom properties: `--jv-breakpoint-sm` (640px), `--jv-breakpoint-md` (768px), `--jv-breakpoint-lg` (1024px), `--jv-breakpoint-xl` (1280px)
|
|
1000
1087
|
- **Dashboard shell** collapses to single column at ≤ 900px; sidebar becomes a slide-in overlay with backdrop
|
|
1001
|
-
- **Topbar**
|
|
1088
|
+
- **Topbar menu** keeps the brand and actions visible and changes navigation to a slide-in panel at ≤ 900px
|
|
1002
1089
|
- **Grid** pagination and toolbar stack at ≤ 640px; table scrolls horizontally with `overflow-x: auto`
|
|
1003
1090
|
- **Flex-wrap** is used extensively for natural overflow handling
|
|
1004
1091
|
- **Dialog** and **Toast** constrain width with `min()` to never exceed the viewport
|
|
@@ -1023,6 +1110,7 @@ The library includes basic responsive behavior:
|
|
|
1023
1110
|
- `aria-sort` on sortable grid headers
|
|
1024
1111
|
- `aria-selected` on selectable grid rows
|
|
1025
1112
|
- `aria-label` and `aria-labelledby` on interactive controls
|
|
1113
|
+
- Icon actions expose a visible text label alongside the icon and provide a hover/focus tooltip for screen readers
|
|
1026
1114
|
- Supports `prefers-reduced-motion`
|
|
1027
1115
|
|
|
1028
1116
|
## Requirements
|