@adminkit/core 4.0.0 → 4.1.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 +21 -21
- package/README.md +31 -139
- package/dist/charts-chartjs.html +2 -2
- package/dist/css/app.css +2 -2
- package/dist/icons-lucide.html +1851 -1009
- package/dist/index.html +6 -6
- package/dist/js/app.js +3 -3
- package/dist/js/icons-all.js +1 -1
- package/dist/maps-google.html +2 -2
- package/dist/pages-404.html +1 -1
- package/dist/pages-500.html +1 -1
- package/dist/pages-blank.html +2 -2
- package/dist/pages-invoice.html +2 -2
- package/dist/pages-pricing.html +2 -2
- package/dist/pages-profile.html +2 -2
- package/dist/pages-sign-in.html +1 -1
- package/dist/pages-sign-up.html +1 -1
- package/dist/tables-bootstrap.html +2 -2
- package/dist/ui-alerts.html +2 -2
- package/dist/ui-buttons.html +2 -2
- package/dist/ui-cards.html +2 -2
- package/dist/ui-forms.html +2 -2
- package/dist/ui-modals.html +2 -2
- package/dist/ui-typography.html +2 -2
- package/dist/upgrade-to-pro.html +27 -27
- package/package.json +9 -5
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020-2024 AdminKit Authors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all 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,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020-2024 AdminKit Authors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all 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,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
12
|
<a href="https://www.npmjs.com/package/@adminkit/core" rel="nofollow"><img src="https://img.shields.io/npm/v/@adminkit/core" alt="NPM version"></a>
|
|
13
|
-
<a href="https://github.com/adminkit/adminkit/blob/
|
|
13
|
+
<a href="https://github.com/adminkit/adminkit/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
|
|
14
14
|
<a href="https://github.com/adminkit/adminkit/issues?q=is%3Aopen+is%3Aissue"><img src="https://img.shields.io/github/issues/adminkit/adminkit.svg" alt="GitHub issues open"></a>
|
|
15
15
|
<a href="https://github.com/adminkit/adminkit/issues?q=is%3Aissue+is%3Aclosed"><img src="https://img.shields.io/github/issues-closed-raw/adminkit/adminkit.svg" alt="GitHub issues closed"></a>
|
|
16
16
|
<a href="https://demo.adminkit.io/" rel="nofollow"><img src="https://img.shields.io/badge/demo-online-green.svg" alt="Live Demo"></a>
|
|
@@ -21,16 +21,26 @@
|
|
|
21
21
|
|
|
22
22
|
## Preview
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
A professional admin and dashboard template based on Bootstrap 5, with dashboards, pages, forms, tables, charts and icons. Free and MIT-licensed. [Open the demo](https://demo.adminkit.io/).
|
|
25
25
|
|
|
26
26
|
<picture>
|
|
27
27
|
<source media="(prefers-color-scheme: dark)" srcset=".github/screenshots/dashboard-dark.webp">
|
|
28
|
-
<img src=".github/screenshots/dashboard-light.webp" width="1600"
|
|
28
|
+
<img src=".github/screenshots/dashboard-light.webp" width="1600" alt="The AdminKit Analytics dashboard: visitors, page views, bounce rate and session duration, monthly visitors, browser usage, a calendar, a real-time visitors map, top pages and traffic sources">
|
|
29
29
|
</picture>
|
|
30
30
|
|
|
31
|
+
## Features
|
|
32
|
+
|
|
33
|
+
- **Dark mode:** light, dark and auto, built on Bootstrap's color modes.
|
|
34
|
+
- **No jQuery:** AdminKit and every plugin it uses run on plain JavaScript.
|
|
35
|
+
- **Accessible:** targets WCAG 2.2 AA in light and dark mode.
|
|
36
|
+
- **Fully responsive:** the sidebar turns into an off-canvas sheet on small screens.
|
|
37
|
+
- **Any framework:** plain HTML, CSS and JavaScript, with setup guides for React, Vue, Angular, Laravel and more.
|
|
38
|
+
- **npm and CDN:** `@adminkit/core` ships TypeScript declarations and is safe to import during server-side rendering.
|
|
39
|
+
- **Modern tooling:** Vite, Handlebars pages and Sass.
|
|
40
|
+
|
|
31
41
|
## AdminKit and AdminKit PRO
|
|
32
42
|
|
|
33
|
-
AdminKit PRO
|
|
43
|
+
Need more? [AdminKit PRO](https://adminkit.io/pricing/) adds more pages, dashboards and plugins, AI features and a settings panel.
|
|
34
44
|
|
|
35
45
|
<!-- stats:start -->
|
|
36
46
|
|
|
@@ -39,11 +49,11 @@ AdminKit PRO is the commercial edition, with more pages, dashboards and plugins,
|
|
|
39
49
|
| Pages | 20 | 53 |
|
|
40
50
|
| Dashboards | 1 | 5 |
|
|
41
51
|
| Plugins | 4 | 11 |
|
|
42
|
-
| Icons |
|
|
52
|
+
| Icons | 2,015 | 4,178 |
|
|
43
53
|
| Sidebar color schemes | 1 | 3 |
|
|
44
|
-
| Dark mode |
|
|
45
|
-
| AI
|
|
46
|
-
| Settings panel |
|
|
54
|
+
| Dark mode | ✔ | ✔ |
|
|
55
|
+
| AI features | | ✔ |
|
|
56
|
+
| Settings panel | | ✔ |
|
|
47
57
|
| Support | GitHub issues | Email |
|
|
48
58
|
| License | MIT | Commercial |
|
|
49
59
|
|
|
@@ -51,154 +61,38 @@ AdminKit PRO is the commercial edition, with more pages, dashboards and plugins,
|
|
|
51
61
|
|
|
52
62
|
## Quick start
|
|
53
63
|
|
|
54
|
-
|
|
64
|
+
Clone the repository and install the dependencies (Node.js 24):
|
|
55
65
|
|
|
56
66
|
```sh
|
|
57
|
-
git clone
|
|
67
|
+
git clone https://github.com/adminkit/adminkit.git
|
|
68
|
+
cd adminkit
|
|
69
|
+
npm install
|
|
58
70
|
```
|
|
59
71
|
|
|
60
|
-
|
|
72
|
+
Start the development server on http://localhost:8080:
|
|
61
73
|
|
|
62
74
|
```sh
|
|
63
|
-
npm
|
|
75
|
+
npm start
|
|
64
76
|
```
|
|
65
77
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
## npm and CDN
|
|
69
|
-
|
|
70
|
-
The built CSS and JavaScript are published to npm as [`@adminkit/core`](https://www.npmjs.com/package/@adminkit/core):
|
|
78
|
+
Build the production files into `dist/`:
|
|
71
79
|
|
|
72
80
|
```sh
|
|
73
|
-
npm
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
With a bundler, import the stylesheet and the script once, in the entry module or root layout:
|
|
77
|
-
|
|
78
|
-
```js
|
|
79
|
-
import "@adminkit/core/css";
|
|
80
|
-
import "@adminkit/core";
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
`@adminkit/core` is `dist/js/app.js` and `@adminkit/core/css` is `dist/css/app.css`; `@adminkit/core/head` is `dist/js/head.js`, and every other file stays available under `@adminkit/core/dist/`. The package ships TypeScript declarations for the import and the globals it adds. Imported during server-side rendering, where there is no `window`, the script does nothing, so it can be imported at the top of a module that also runs on the server.
|
|
84
|
-
|
|
85
|
-
The same files are on the unpkg CDN. `js/app.js` is a plain script, so it needs no build step or `type="module"`:
|
|
86
|
-
|
|
87
|
-
```html
|
|
88
|
-
<script src="https://unpkg.com/@adminkit/core@latest/dist/js/head.js"></script>
|
|
89
|
-
<link
|
|
90
|
-
rel="stylesheet"
|
|
91
|
-
href="https://unpkg.com/@adminkit/core@latest/dist/css/app.css"
|
|
92
|
-
/>
|
|
93
|
-
<script src="https://unpkg.com/@adminkit/core@latest/dist/js/app.js"></script>
|
|
81
|
+
npm run build
|
|
94
82
|
```
|
|
95
83
|
|
|
96
|
-
|
|
84
|
+
You can also [download a zip](https://adminkit.io/#download), or install the built files from npm (`npm install @adminkit/core`) or the unpkg CDN; see [Download](https://adminkit.io/docs/getting-started/download/).
|
|
97
85
|
|
|
98
86
|
## Frameworks
|
|
99
87
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
- [HTML](https://adminkit.io/docs/frameworks/html/)
|
|
103
|
-
- [Laravel](https://adminkit.io/docs/frameworks/laravel/)
|
|
104
|
-
- [Django](https://adminkit.io/docs/frameworks/django/)
|
|
105
|
-
- [Rails](https://adminkit.io/docs/frameworks/rails/)
|
|
106
|
-
- [Symfony](https://adminkit.io/docs/frameworks/symfony/)
|
|
107
|
-
- [React](https://adminkit.io/docs/frameworks/react/)
|
|
108
|
-
- [Next.js](https://adminkit.io/docs/frameworks/nextjs/)
|
|
109
|
-
- [Vue](https://adminkit.io/docs/frameworks/vue/)
|
|
110
|
-
- [Nuxt](https://adminkit.io/docs/frameworks/nuxt/)
|
|
111
|
-
- [Angular](https://adminkit.io/docs/frameworks/angular/)
|
|
112
|
-
- [SvelteKit](https://adminkit.io/docs/frameworks/sveltekit/)
|
|
113
|
-
- [Astro](https://adminkit.io/docs/frameworks/astro/)
|
|
114
|
-
|
|
115
|
-
## Dark mode
|
|
116
|
-
|
|
117
|
-
`css/app.css` holds a light and a dark color mode, built on [Bootstrap's color modes](https://getbootstrap.com/docs/5.3/customize/color-modes/). Set `data-bs-theme="dark"` on `<html>` for dark mode, or on any other element for that part of the page. The navbar toggle switches between light, dark and auto (the operating system setting) and stores the choice in `localStorage` (`adminkit_config_colorMode`). To apply the stored mode before the first paint, load `js/head.js` in `<head>`, before the stylesheet, as a plain blocking script (no `defer` or `type="module"`):
|
|
118
|
-
|
|
119
|
-
```html
|
|
120
|
-
<script src="js/head.js"></script>
|
|
121
|
-
<link rel="stylesheet" href="css/app.css" />
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
It is a few hundred bytes, needs no `unsafe-inline` in a Content Security Policy and also hides the cards that fade in until `js/app.js` runs. Without it `js/app.js` still sets the mode, after the first paint.
|
|
88
|
+
Setup guides for [HTML](https://adminkit.io/docs/frameworks/html/), [Laravel](https://adminkit.io/docs/frameworks/laravel/), [Django](https://adminkit.io/docs/frameworks/django/), [Rails](https://adminkit.io/docs/frameworks/rails/), [Symfony](https://adminkit.io/docs/frameworks/symfony/), [React](https://adminkit.io/docs/frameworks/react/), [Next.js](https://adminkit.io/docs/frameworks/nextjs/), [Vue](https://adminkit.io/docs/frameworks/vue/), [Nuxt](https://adminkit.io/docs/frameworks/nuxt/), [Angular](https://adminkit.io/docs/frameworks/angular/), [SvelteKit](https://adminkit.io/docs/frameworks/sveltekit/) and [Astro](https://adminkit.io/docs/frameworks/astro/).
|
|
125
89
|
|
|
126
|
-
|
|
90
|
+
## Documentation
|
|
127
91
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
## Google Maps
|
|
131
|
-
|
|
132
|
-
The Google Maps page loads the Maps JavaScript API without an API key, so Google marks the maps "For development purposes only" and logs a `NoApiKeys` warning (and an `ApiProjectMapError` per map) in the console. For production, create a key in Google Cloud, restrict it by HTTP referrer and add `key=YOUR_KEY` to the script URL in `src/pages/maps-google.html`.
|
|
133
|
-
|
|
134
|
-
## File structure
|
|
135
|
-
|
|
136
|
-
The package contains the following directories and files:
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
adminkit/
|
|
140
|
-
├── .nvmrc
|
|
141
|
-
├── README.md
|
|
142
|
-
├── package.json
|
|
143
|
-
├── postcss.config.mjs
|
|
144
|
-
├── vite.config.js
|
|
145
|
-
├── public/
|
|
146
|
-
│ └── img/
|
|
147
|
-
├── scripts/
|
|
148
|
-
├── src/
|
|
149
|
-
│ ├── data/
|
|
150
|
-
│ ├── helpers/
|
|
151
|
-
│ ├── js/
|
|
152
|
-
│ │ ├── modules/
|
|
153
|
-
│ │ └── app.js
|
|
154
|
-
│ ├── layouts/
|
|
155
|
-
│ ├── pages/
|
|
156
|
-
│ ├── partials/
|
|
157
|
-
│ │ ├── charts/
|
|
158
|
-
│ │ └── dashboard/
|
|
159
|
-
│ └── scss/
|
|
160
|
-
│ ├── 1-variables/
|
|
161
|
-
│ ├── 2-mixins/
|
|
162
|
-
│ ├── 3-components/
|
|
163
|
-
│ ├── 4-utilities/
|
|
164
|
-
│ ├── 5-vendor/
|
|
165
|
-
│ └── app.scss
|
|
166
|
-
├── vite/
|
|
167
|
-
└── dist/
|
|
168
|
-
├── *.html
|
|
169
|
-
├── css/
|
|
170
|
-
│ └── app.css
|
|
171
|
-
├── img/
|
|
172
|
-
└── js/
|
|
173
|
-
├── app.js
|
|
174
|
-
├── head.js
|
|
175
|
-
└── icons-all.js
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
`src/pages` holds one Handlebars template per page with YAML frontmatter; `src/layouts` and `src/partials` are the shared markup, with the chart and dashboard widgets in `src/partials/charts` and `src/partials/dashboard`; a page's inline script sits at the end of the page, a widget's script in the widget's partial. `public/` is copied to `dist/` as it is.
|
|
179
|
-
|
|
180
|
-
## Sidebar
|
|
181
|
-
|
|
182
|
-
From Bootstrap's lg breakpoint (992px) up, the navbar toggle hides and shows the sidebar. On smaller screens the sidebar is a Bootstrap offcanvas (`.offcanvas-lg` on `#sidebar`): the toggle opens it as a sheet over the page, Escape, the backdrop or a link close it, and focus stays inside while it is open.
|
|
183
|
-
|
|
184
|
-
## Motion
|
|
185
|
-
|
|
186
|
-
Cards fade up as they scroll into view (`.ak-reveal-cards` on `<main>`, `.ak-reveal` on anything else), stat numbers with `data-count-up` count up, charts animate in, and cards whose content JavaScript draws show a skeleton placeholder until it is ready. Durations and easings are the `--ak-duration-fast|base|slow` and `--ak-ease-standard|emphasized` custom properties (`$ak-transition-*` in Sass). With `prefers-reduced-motion: reduce` nothing moves: content only fades in, numbers and charts show their final state at once. The cards only fade in on pages that load `js/head.js`; without it the content shows at once.
|
|
187
|
-
|
|
188
|
-
## Accessibility
|
|
189
|
-
|
|
190
|
-
The template targets WCAG 2.2 AA in both color modes: 4.5:1 contrast for text, 3:1 for large text, icons and other controls, named controls and a logical heading order. Every page is checked in light and dark mode with axe (`@axe-core/playwright`), including the sidebar and navbar. New colors must pass too: derive text colors with `ak-readable($color, $background)` from `src/scss/1-variables/_functions.scss`, which darkens (or, on dark backgrounds, lightens) a color just enough, and use `$theme-text-colors` / `$theme-text-colors-dark` for theme colors drawn as text.
|
|
191
|
-
|
|
192
|
-
## Icons
|
|
193
|
-
|
|
194
|
-
AdminKit uses [Lucide](https://lucide.dev/icons/) icons: `<i data-lucide="house"></i>` gets the icon as an inline SVG inside it, also when the markup is added after the page has loaded. `js/app.js` only bundles the icons the templates use, listed in `src/js/modules/icons.js`. To use another icon, import it there and add it to `icons`; `npm run lint` fails when a template uses an icon that is not bundled, or the list bundles one that no template uses.
|
|
195
|
-
|
|
196
|
-
The icons page loads `js/icons-all.js`, which holds every Lucide icon. Its icon list, `src/data/icons-lucide.json`, is generated from `lucide-static`; run `npm run icons:list` after upgrading `lucide` and `lucide-static`.
|
|
92
|
+
[Quick start](https://adminkit.io/docs/getting-started/quick-start/), [file structure](https://adminkit.io/docs/getting-started/contents/), [customization](https://adminkit.io/docs/getting-started/customization/), [dark mode](https://adminkit.io/docs/getting-started/dark-mode/), [icons](https://adminkit.io/docs/icons/lucide-icons/), [animations](https://adminkit.io/docs/getting-started/animations/), [accessibility](https://adminkit.io/docs/getting-started/accessibility/) and every component are documented at [adminkit.io/docs](https://adminkit.io/docs/).
|
|
197
93
|
|
|
198
94
|
## Browser support
|
|
199
95
|
|
|
200
|
-
The build targets the browsers Vite calls "baseline widely available". The `browserslist` field in `package.json` lists the same set for Autoprefixer.
|
|
201
|
-
|
|
202
96
|
| <img src="https://assets.adminkit.io/browsers/edge.png" alt="Edge" width="24px" height="24px" /><br/>Edge | <img src="https://assets.adminkit.io/browsers/firefox.png" alt="Firefox" width="24px" height="24px" /><br/>Firefox | <img src="https://assets.adminkit.io/browsers/chrome.png" alt="Chrome" width="24px" height="24px" /><br/>Chrome | <img src="https://assets.adminkit.io/browsers/safari.png" alt="Safari" width="24px" height="24px" /><br/>Safari | <img src="https://assets.adminkit.io/browsers/safari-ios.png" alt="iOS Safari" width="24px" height="24px" /><br/>iOS Safari |
|
|
203
97
|
| --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
204
98
|
| 111+ | 114+ | 111+ | 16.4+ | 16.4+ |
|
|
@@ -207,10 +101,8 @@ The build targets the browsers Vite calls "baseline widely available". The `brow
|
|
|
207
101
|
|
|
208
102
|
- [Demo](https://demo.adminkit.io/)
|
|
209
103
|
- [Website](https://adminkit.io/)
|
|
210
|
-
- [Documentation](https://adminkit.io/docs)
|
|
104
|
+
- [Documentation](https://adminkit.io/docs/)
|
|
211
105
|
- [Support](https://adminkit.io/support/)
|
|
212
106
|
- [Affiliate Program](https://adminkit.io/affiliate-program)
|
|
213
107
|
|
|
214
|
-
## Bugs and feature requests
|
|
215
|
-
|
|
216
108
|
To report a bug or request a feature, [open a new issue](https://github.com/adminkit/adminkit/issues/new).
|
package/dist/charts-chartjs.html
CHANGED
|
@@ -368,7 +368,7 @@
|
|
|
368
368
|
</div>
|
|
369
369
|
</nav>
|
|
370
370
|
|
|
371
|
-
<main class="content
|
|
371
|
+
<main class="content reveal-cards">
|
|
372
372
|
<div class="container-fluid p-0">
|
|
373
373
|
<div class="mb-3">
|
|
374
374
|
<h1 class="h3 d-inline align-middle">Chart.js</h1>
|
|
@@ -443,7 +443,7 @@
|
|
|
443
443
|
</div>
|
|
444
444
|
</main>
|
|
445
445
|
|
|
446
|
-
<footer class="footer
|
|
446
|
+
<footer class="footer reveal">
|
|
447
447
|
<div class="container-fluid">
|
|
448
448
|
<div class="row text-body-secondary">
|
|
449
449
|
<div class="col-6 text-start">
|