@adminlte/angular 0.2.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/LICENSE +20 -0
- package/README.md +192 -0
- package/css/adminlte.css +17258 -0
- package/css/adminlte.rtl.css +17231 -0
- package/fesm2022/adminlte-angular.mjs +4360 -0
- package/fesm2022/adminlte-angular.mjs.map +1 -0
- package/package.json +78 -0
- package/types/adminlte-angular.d.ts +1169 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014-2026 ColorlibHQ
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# AdminLTE 4 for Angular
|
|
2
|
+
|
|
3
|
+
The official **[AdminLTE 4](https://adminlte.io)** port for **Angular 22** — a signal-first, standalone-component library on **Bootstrap 5.3**. Dark mode, a config-driven sidebar, and a ⌘K command palette, all without jQuery or NgModules.
|
|
4
|
+
|
|
5
|
+
[](./LICENSE)
|
|
6
|
+
[](https://angular.dev)
|
|
7
|
+
[](https://getbootstrap.com)
|
|
8
|
+
[](https://www.typescriptlang.org/)
|
|
9
|
+
[](https://angular.dev/guide/signals)
|
|
10
|
+
|
|
11
|
+
> Standalone components, signal inputs (`input()`/`output()`/`model()`), the new control flow (`@if`/`@for`/`@switch`), SSR-safe theming, and the modern esbuild application builder.
|
|
12
|
+
|
|
13
|
+
## Also available for your stack
|
|
14
|
+
|
|
15
|
+
The same AdminLTE 4 dashboard, in the framework you know best — you're looking at the **Angular** edition:
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
<a href="https://github.com/ColorlibHQ/adminlte-angular"><img height="36" alt="Angular — you are here" src="https://img.shields.io/badge/Angular-you%20are%20here-DD0031?style=for-the-badge&logo=angular&logoColor=white"></a>
|
|
19
|
+
<a href="https://github.com/ColorlibHQ/adminlte-react"><img height="36" alt="React" src="https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB"></a>
|
|
20
|
+
<a href="https://github.com/ColorlibHQ/adminlte-react"><img height="36" alt="Next.js" src="https://img.shields.io/badge/Next.js-000000?style=for-the-badge&logo=nextdotjs&logoColor=white"></a>
|
|
21
|
+
<a href="https://github.com/ColorlibHQ/adminlte-vue"><img height="36" alt="Vue" src="https://img.shields.io/badge/Vue.js-4FC08D?style=for-the-badge&logo=vuedotjs&logoColor=white"></a>
|
|
22
|
+
<a href="https://github.com/ColorlibHQ/adminlte-vue"><img height="36" alt="Nuxt" src="https://img.shields.io/badge/Nuxt-00DC82?style=for-the-badge&logo=nuxt&logoColor=white"></a>
|
|
23
|
+
<a href="https://github.com/ColorlibHQ/adminlte-laravel"><img height="36" alt="Laravel" src="https://img.shields.io/badge/Laravel-FF2D20?style=for-the-badge&logo=laravel&logoColor=white"></a>
|
|
24
|
+
<a href="https://github.com/ColorlibHQ/adminlte-django"><img height="36" alt="Django" src="https://img.shields.io/badge/Django-092E20?style=for-the-badge&logo=django&logoColor=white"></a>
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
<p align="center"><sub>
|
|
28
|
+
Frameworks:
|
|
29
|
+
<strong>Angular</strong> (you are here) ·
|
|
30
|
+
<a href="https://github.com/ColorlibHQ/adminlte-react">React</a> ·
|
|
31
|
+
<a href="https://github.com/ColorlibHQ/adminlte-react">Next.js</a> ·
|
|
32
|
+
<a href="https://github.com/ColorlibHQ/adminlte-vue">Vue</a> ·
|
|
33
|
+
<a href="https://github.com/ColorlibHQ/adminlte-vue">Nuxt</a> ·
|
|
34
|
+
<a href="https://github.com/ColorlibHQ/adminlte-laravel">Laravel</a> ·
|
|
35
|
+
<a href="https://github.com/ColorlibHQ/adminlte-django">Django</a> ·
|
|
36
|
+
<a href="https://github.com/ColorlibHQ/AdminLTE">AdminLTE core</a>
|
|
37
|
+
</sub></p>
|
|
38
|
+
|
|
39
|
+
## Features
|
|
40
|
+
|
|
41
|
+
- 🅰️ **Angular 22, signal-first** — standalone components, `input()`/`output()`/`model()`, the new control flow, zoneless-friendly.
|
|
42
|
+
- 🌗 **SSR-safe dark mode** — `data-bs-theme` on `<html>`, persisted to `localStorage` with a system-preference fallback and a no-flash inline script.
|
|
43
|
+
- 🧭 **Config-driven sidebar** — a typed `MenuNode[]` (headers, links, collapsible groups, badges, per-item `visible` flags) with active-link detection and accordion treeviews.
|
|
44
|
+
- ⌘ **Command palette (⌘K)** — fuzzy search over your menu with full keyboard navigation, routing through the Angular Router.
|
|
45
|
+
- 🧩 **40+ components** — layout, widgets and form controls, all with the `Lte` prefix.
|
|
46
|
+
- 📦 **Tree-shakeable** — standalone components, optional peer deps (ApexCharts, flatpickr, Tom Select, simple-datatables) lazy-loaded.
|
|
47
|
+
- 🎨 **Bootstrap 5.3** — ships AdminLTE's compiled CSS via `@adminlte/angular/css`.
|
|
48
|
+
|
|
49
|
+
## Installation
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npm install @adminlte/angular admin-lte bootstrap bootstrap-icons
|
|
53
|
+
# optional, for charts:
|
|
54
|
+
npm install apexcharts
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`@adminlte/angular` lists `@angular/core`, `@angular/common`, `@angular/forms`, `@angular/router`, `bootstrap` and `admin-lte` as peer dependencies.
|
|
58
|
+
|
|
59
|
+
### 1. Add the styles
|
|
60
|
+
|
|
61
|
+
In `angular.json` (or your global stylesheet):
|
|
62
|
+
|
|
63
|
+
```jsonc
|
|
64
|
+
"styles": [
|
|
65
|
+
"node_modules/bootstrap-icons/font/bootstrap-icons.css",
|
|
66
|
+
"node_modules/@adminlte/angular/css/adminlte.css",
|
|
67
|
+
"src/styles.css"
|
|
68
|
+
]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 2. No-flash theme script
|
|
72
|
+
|
|
73
|
+
Add this to your `index.html` `<head>` so the correct theme is applied before first paint:
|
|
74
|
+
|
|
75
|
+
```html
|
|
76
|
+
<script>
|
|
77
|
+
(function () {
|
|
78
|
+
try {
|
|
79
|
+
var m = localStorage.getItem('lte-theme') || 'auto';
|
|
80
|
+
var d = m === 'dark' || (m === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches);
|
|
81
|
+
document.documentElement.setAttribute('data-bs-theme', d ? 'dark' : 'light');
|
|
82
|
+
} catch (e) {}
|
|
83
|
+
})();
|
|
84
|
+
</script>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
(`COLOR_MODE_NO_FLASH_SCRIPT` is also exported from the library for SSR injection.)
|
|
88
|
+
|
|
89
|
+
## Usage
|
|
90
|
+
|
|
91
|
+
Define a typed menu and drop the dashboard layout around your routed content:
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
import { Component, signal } from '@angular/core';
|
|
95
|
+
import { RouterOutlet } from '@angular/router';
|
|
96
|
+
import { DashboardLayoutComponent, type MenuNode } from '@adminlte/angular';
|
|
97
|
+
|
|
98
|
+
const MENU: MenuNode[] = [
|
|
99
|
+
{ type: 'header', text: 'MAIN NAVIGATION' },
|
|
100
|
+
{ type: 'item', text: 'Dashboard', route: '/', icon: 'bi-speedometer' },
|
|
101
|
+
{
|
|
102
|
+
type: 'group',
|
|
103
|
+
text: 'UI Elements',
|
|
104
|
+
icon: 'bi-collection',
|
|
105
|
+
children: [
|
|
106
|
+
{ type: 'item', text: 'Forms', route: '/forms', icon: 'bi-input-cursor-text' },
|
|
107
|
+
{ type: 'item', text: 'Tables', route: '/tables', icon: 'bi-table' },
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
{ type: 'item', text: 'Admin only', route: '/admin', icon: 'bi-lock', visible: false },
|
|
111
|
+
];
|
|
112
|
+
|
|
113
|
+
@Component({
|
|
114
|
+
selector: 'app-shell',
|
|
115
|
+
imports: [DashboardLayoutComponent, RouterOutlet],
|
|
116
|
+
template: `
|
|
117
|
+
<lte-dashboard-layout [menuItems]="menu" [currentPath]="currentPath()" [accordion]="true">
|
|
118
|
+
<router-outlet />
|
|
119
|
+
<span footer><b>Version</b> 4.0.0</span>
|
|
120
|
+
</lte-dashboard-layout>
|
|
121
|
+
`,
|
|
122
|
+
})
|
|
123
|
+
export class ShellComponent {
|
|
124
|
+
readonly menu = MENU;
|
|
125
|
+
readonly currentPath = signal('/'); // wire from Router NavigationEnd events
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Then build a page with the widgets:
|
|
130
|
+
|
|
131
|
+
```html
|
|
132
|
+
<lte-app-content title="Dashboard" [breadcrumbs]="[{ label: 'Home', route: '/' }, { label: 'Dashboard' }]">
|
|
133
|
+
<div class="row">
|
|
134
|
+
<div class="col-lg-3 col-6">
|
|
135
|
+
<lte-small-box title="150" text="New Orders" icon="bi-bag" theme="primary" url="#" />
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<lte-card title="Sales" icon="bi-bar-chart" [collapsible]="true" [maximizable]="true">
|
|
140
|
+
<lte-apex-chart [options]="chartOptions()" />
|
|
141
|
+
</lte-card>
|
|
142
|
+
</lte-app-content>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Components
|
|
146
|
+
|
|
147
|
+
**Layout** — `LteDashboardLayout` · `LteAuthLayout` · `LteAppContent` · `LteTopbar` · `LteSidebar` · `LteSidebarBrand` · `LteSidebarNav` · `LteSidebarNavItem` · `LteSidebarOverlay` · `LteFooter` · `LteColorModeToggle` · `LteFullscreenToggle`
|
|
148
|
+
|
|
149
|
+
**Widgets** — `LteCard` · `LteSmallBox` · `LteInfoBox` · `LteAlert` · `LteCallout` · `LteProgress` · `LteProgressGroup` · `LteRatings` · `LteTimeline` · `LteProfileCard` · `LteDescriptionBlock` · `LteBreadcrumb` · `LteCommandPalette` · `LteApexChart` · `LteModal` · `LteDirectChat` · `LteTabs` / `LteTab` · `LteAccordion` / `LteAccordionItem` · `LteDatatable`
|
|
150
|
+
|
|
151
|
+
**Topbar dropdowns** — `LteNavMessages` · `LteNavNotifications` · `LteNavTasks` (drop into the topbar `[topbar-end]` slot)
|
|
152
|
+
|
|
153
|
+
**Forms** — `LteButton` · `LteInput` · `LteSelect` · `LteTextarea` · `LteInputSwitch` · `LteInputFlatpickr` · `LteInputTomSelect` (all `ControlValueAccessor` + `model()` two-way binding)
|
|
154
|
+
|
|
155
|
+
**Optional plugin wrappers** lazy-load their library only when used: `LteApexChart` (apexcharts), `LteInputFlatpickr` (flatpickr), `LteInputTomSelect` (tom-select), `LteDatatable` (simple-datatables). Install the ones you need:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
npm install apexcharts flatpickr tom-select simple-datatables
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
> Selectors use the `lte-` prefix (`<lte-card>`); class names use the `Lte…Component` convention.
|
|
162
|
+
|
|
163
|
+
## Services
|
|
164
|
+
|
|
165
|
+
State is exposed through `providedIn: 'root'` signal services:
|
|
166
|
+
|
|
167
|
+
| Service | Responsibility |
|
|
168
|
+
|---|---|
|
|
169
|
+
| `ColorModeService` | light/dark/auto, `data-bs-theme`, `localStorage` persistence, system fallback |
|
|
170
|
+
| `SidebarService` | responsive collapse/overlay/mini state + `<body>` classes |
|
|
171
|
+
| `CommandPaletteService` | ⌘K open/close + global key listener |
|
|
172
|
+
| `FullscreenService` | Fullscreen API wrapper, `fullscreenchange`-driven |
|
|
173
|
+
| `TreeviewService` | sidebar accordion/expand registry (provided per sidebar) |
|
|
174
|
+
|
|
175
|
+
## Development
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
npm install # install workspace deps
|
|
179
|
+
npm run build # build the library (ng-packagr) + copy AdminLTE CSS
|
|
180
|
+
npm start # serve the demo at http://localhost:4200
|
|
181
|
+
npm run build:demo # production build of the demo app
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
The repo is an Angular workspace: the library lives in `projects/adminlte-angular`, the demo that dogfoods it in `projects/demo`.
|
|
185
|
+
|
|
186
|
+
## Browser support
|
|
187
|
+
|
|
188
|
+
Modern evergreen browsers (Chrome, Edge, Firefox, Safari). Matches Bootstrap 5.3 and Angular 22 support targets.
|
|
189
|
+
|
|
190
|
+
## License
|
|
191
|
+
|
|
192
|
+
[MIT](./LICENSE) © 2014–2026 ColorlibHQ. Built on [AdminLTE](https://github.com/ColorlibHQ/AdminLTE).
|