admin-lte 4.0.2 → 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/ACCESSIBILITY-COMPLIANCE.md +60 -339
- package/CHANGELOG.md +66 -0
- package/README.md +15 -2
- package/dist/css/adminlte-docs.css +878 -0
- package/dist/css/adminlte-docs.css.map +1 -0
- package/dist/css/adminlte-docs.min.css +7 -0
- package/dist/css/adminlte-docs.min.css.map +1 -0
- package/dist/css/adminlte-docs.rtl.css +877 -0
- package/dist/css/adminlte-docs.rtl.css.map +1 -0
- package/dist/css/adminlte-docs.rtl.min.css +7 -0
- package/dist/css/adminlte-docs.rtl.min.css.map +1 -0
- package/dist/css/adminlte.css +1176 -2718
- package/dist/css/adminlte.css.map +1 -1
- package/dist/css/adminlte.min.css +2 -2
- package/dist/css/adminlte.min.css.map +1 -1
- package/dist/css/adminlte.rtl.css +1176 -2718
- package/dist/css/adminlte.rtl.css.map +1 -1
- package/dist/css/adminlte.rtl.min.css +2 -2
- package/dist/css/adminlte.rtl.min.css.map +1 -1
- package/dist/js/adminlte.esm.js +1365 -0
- package/dist/js/adminlte.esm.js.map +1 -0
- package/dist/js/adminlte.esm.min.js +7 -0
- package/dist/js/adminlte.esm.min.js.map +1 -0
- package/dist/js/adminlte.js +606 -310
- package/dist/js/adminlte.js.map +1 -1
- package/dist/js/adminlte.min.js +2 -2
- package/dist/js/adminlte.min.js.map +1 -1
- package/dist/js/types/accessibility.d.ts +46 -0
- package/dist/js/types/adminlte.d.ts +9 -0
- package/dist/js/types/base-component.d.ts +36 -0
- package/dist/js/types/card-widget.d.ts +30 -0
- package/dist/js/types/color-mode.d.ts +56 -0
- package/dist/js/types/direct-chat.d.ts +19 -0
- package/dist/js/types/fullscreen.d.ts +21 -0
- package/dist/js/types/layout.d.ts +19 -0
- package/dist/js/types/push-menu.d.ts +102 -0
- package/dist/js/types/treeview.d.ts +27 -0
- package/dist/js/types/util/index.d.ts +42 -0
- package/package.json +60 -21
- package/src/scss/_app-header.scss +3 -1
- package/src/scss/_app-main.scss +4 -0
- package/src/scss/_app-sidebar.scss +3 -1
- package/src/scss/_bootstrap-overrides.scss +60 -0
- package/src/scss/_callouts.scss +13 -3
- package/src/scss/_dropdown.scss +3 -1
- package/src/scss/_info-box.scss +3 -1
- package/src/scss/_progress-bars.scss +3 -1
- package/src/scss/_table.scss +4 -2
- package/src/scss/adminlte-docs.scss +25 -0
- package/src/scss/adminlte.scss +5 -4
- package/src/scss/pages/_login_and_register.scss +3 -1
- package/src/scss/parts/_core.scss +0 -1
- package/src/ts/accessibility.ts +129 -69
- package/src/ts/adminlte.ts +3 -1
- package/src/ts/base-component.ts +84 -0
- package/src/ts/card-widget.ts +134 -85
- package/src/ts/color-mode.ts +174 -0
- package/src/ts/direct-chat.ts +38 -32
- package/src/ts/fullscreen.ts +78 -63
- package/src/ts/layout.ts +2 -1
- package/src/ts/push-menu.ts +93 -44
- package/src/ts/treeview.ts +107 -47
- package/src/ts/util/index.ts +114 -29
- package/.browserslistrc +0 -17
- package/.prettierrc +0 -6
- package/CODE_OF_CONDUCT.md +0 -43
- package/SECURITY.md +0 -99
- package/dist/UI/general.html +0 -2317
- package/dist/UI/icons.html +0 -1126
- package/dist/UI/timeline.html +0 -1212
- package/dist/docs/browser-support.html +0 -826
- package/dist/docs/color-mode.html +0 -1142
- package/dist/docs/components/main-header.html +0 -1209
- package/dist/docs/components/main-sidebar.html +0 -924
- package/dist/docs/customization.html +0 -1080
- package/dist/docs/deployment.html +0 -1145
- package/dist/docs/faq.html +0 -1392
- package/dist/docs/getting-started.html +0 -991
- package/dist/docs/how-to-contribute.html +0 -890
- package/dist/docs/index.html +0 -16
- package/dist/docs/integrations.html +0 -1231
- package/dist/docs/introduction.html +0 -1008
- package/dist/docs/javascript/accessibility.html +0 -949
- package/dist/docs/javascript/card-widget.html +0 -1019
- package/dist/docs/javascript/direct-chat.html +0 -896
- package/dist/docs/javascript/fullscreen.html +0 -905
- package/dist/docs/javascript/layout.html +0 -908
- package/dist/docs/javascript/plugins-overview.html +0 -1144
- package/dist/docs/javascript/pushmenu.html +0 -1045
- package/dist/docs/javascript/treeview.html +0 -1024
- package/dist/docs/layout-blueprint.html +0 -1087
- package/dist/docs/layout.html +0 -842
- package/dist/docs/license.html +0 -807
- package/dist/docs/migration.html +0 -1149
- package/dist/docs/recipes.html +0 -1185
- package/dist/docs/rtl.html +0 -957
- package/dist/examples/lockscreen.html +0 -249
- package/dist/examples/login-v2.html +0 -282
- package/dist/examples/login.html +0 -272
- package/dist/examples/register-v2.html +0 -291
- package/dist/examples/register.html +0 -277
- package/dist/forms/elements.html +0 -1405
- package/dist/forms/layout.html +0 -1267
- package/dist/forms/validation.html +0 -1275
- package/dist/forms/wizard.html +0 -1410
- package/dist/generate/theme.html +0 -1082
- package/dist/index.html +0 -1745
- package/dist/index2.html +0 -2277
- package/dist/index3.html +0 -1532
- package/dist/layout/collapsed-sidebar-without-hover.html +0 -1144
- package/dist/layout/collapsed-sidebar.html +0 -1137
- package/dist/layout/fixed-complete.html +0 -1138
- package/dist/layout/fixed-footer.html +0 -1136
- package/dist/layout/fixed-header.html +0 -1136
- package/dist/layout/fixed-sidebar.html +0 -1138
- package/dist/layout/layout-custom-area.html +0 -1177
- package/dist/layout/layout-rtl.html +0 -1137
- package/dist/layout/logo-switch.html +0 -683
- package/dist/layout/sidebar-mini.html +0 -1137
- package/dist/layout/unfixed-sidebar.html +0 -1136
- package/dist/mailbox/compose.html +0 -1151
- package/dist/mailbox/inbox.html +0 -1509
- package/dist/mailbox/read.html +0 -1202
- package/dist/pages/404.html +0 -239
- package/dist/pages/500.html +0 -227
- package/dist/pages/calendar.html +0 -1266
- package/dist/pages/chat.html +0 -1427
- package/dist/pages/faq.html +0 -1383
- package/dist/pages/file-manager.html +0 -1835
- package/dist/pages/invoice.html +0 -1199
- package/dist/pages/kanban.html +0 -1439
- package/dist/pages/maintenance.html +0 -230
- package/dist/pages/pricing.html +0 -1279
- package/dist/pages/profile.html +0 -1382
- package/dist/pages/projects.html +0 -1644
- package/dist/pages/settings.html +0 -1387
- package/dist/tables/data.html +0 -1319
- package/dist/tables/simple.html +0 -1435
- package/dist/widgets/cards.html +0 -1356
- package/dist/widgets/info-box.html +0 -1429
- package/dist/widgets/small-box.html +0 -1225
- package/eslint.config.js +0 -82
- package/github-issue-response.md +0 -40
- package/index.html +0 -12
- package/netlify.toml +0 -16
- package/src/scss/_bootstrap-variables.scss +0 -1766
package/eslint.config.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import globals from 'globals'
|
|
2
|
-
import pluginJs from '@eslint/js'
|
|
3
|
-
import tseslint from 'typescript-eslint'
|
|
4
|
-
import pluginUnicorn from 'eslint-plugin-unicorn'
|
|
5
|
-
import astroPlugin from 'eslint-plugin-astro'
|
|
6
|
-
|
|
7
|
-
export default [
|
|
8
|
-
{
|
|
9
|
-
ignores: [
|
|
10
|
-
"dist/",
|
|
11
|
-
"node_modules/",
|
|
12
|
-
".cache/",
|
|
13
|
-
".astro/",
|
|
14
|
-
"**/*.min.js",
|
|
15
|
-
"**/plugins/",
|
|
16
|
-
"/.temp/",
|
|
17
|
-
"src/html/docs/",
|
|
18
|
-
"docs_html/",
|
|
19
|
-
"src/html/public/"
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
...tseslint.config(
|
|
23
|
-
pluginJs.configs.recommended,
|
|
24
|
-
...tseslint.configs.recommended
|
|
25
|
-
),
|
|
26
|
-
{
|
|
27
|
-
...pluginUnicorn.configs['flat/recommended']
|
|
28
|
-
},
|
|
29
|
-
...astroPlugin.configs['flat/recommended'],
|
|
30
|
-
{
|
|
31
|
-
files: ['**/*.{js,mjs,cjs,ts,mts,cts,astro}'],
|
|
32
|
-
languageOptions: {
|
|
33
|
-
globals: {
|
|
34
|
-
...globals.browser,
|
|
35
|
-
...globals.node
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
rules: {
|
|
39
|
-
'arrow-body-style': 'off',
|
|
40
|
-
'capitalized-comments': 'off',
|
|
41
|
-
'comma-dangle': ['error', 'never'],
|
|
42
|
-
'indent': ['error', 2, { 'MemberExpression': 'off', 'SwitchCase': 1 }],
|
|
43
|
-
'max-params': ['warn', 5],
|
|
44
|
-
'multiline-ternary': ['error', 'always-multiline'],
|
|
45
|
-
'new-cap': 'off',
|
|
46
|
-
'no-console': 'off',
|
|
47
|
-
'no-negated-condition': 'off',
|
|
48
|
-
'object-curly-spacing': ['error', 'always'],
|
|
49
|
-
'operator-linebreak': ['error', 'after'],
|
|
50
|
-
'no-unused-vars': 'warn',
|
|
51
|
-
'no-new': 'off',
|
|
52
|
-
'semi': 'off',
|
|
53
|
-
'unicorn/explicit-length-check': 'off',
|
|
54
|
-
'unicorn/no-array-callback-reference': 'off',
|
|
55
|
-
'unicorn/no-array-for-each': 'off',
|
|
56
|
-
'unicorn/no-array-method-this-argument': 'off',
|
|
57
|
-
'unicorn/no-null': 'off',
|
|
58
|
-
'unicorn/no-unused-properties': 'off',
|
|
59
|
-
'unicorn/prefer-array-flat': 'off',
|
|
60
|
-
'unicorn/prefer-dom-node-dataset': 'off',
|
|
61
|
-
'unicorn/prefer-export-from': 'off',
|
|
62
|
-
'unicorn/prefer-module': 'off',
|
|
63
|
-
'unicorn/prefer-query-selector': 'off',
|
|
64
|
-
'unicorn/prefer-spread': 'off',
|
|
65
|
-
'unicorn/prefer-string-replace-all': 'off',
|
|
66
|
-
'unicorn/prevent-abbreviations': 'off',
|
|
67
|
-
'astro/no-set-html-directive': 'off'
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
files: ['src/config/**'],
|
|
72
|
-
languageOptions: {
|
|
73
|
-
globals: {
|
|
74
|
-
...globals.node
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
rules: {
|
|
78
|
-
'no-console': 'off',
|
|
79
|
-
'unicorn/prefer-top-level-await': 'off'
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
]
|
package/github-issue-response.md
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
Thanks for the thorough write-up @bsshreesha — your root-cause analysis is spot on, and you even guessed the correct storage key (`lte-theme`). Reproduced and fixed. 👍
|
|
2
|
-
|
|
3
|
-
As you noted, the color-mode script lives in `_scripts.astro`, which is loaded at the **end of `<body>`**. So the browser paints the default (light) theme first, then the script swaps `data-bs-theme` once it runs — hence the flash for dark-mode users on every load.
|
|
4
|
-
|
|
5
|
-
**Fix:** I added a small render-blocking inline script to `_head.astro` (shared by every page), essentially your suggestion with a few refinements:
|
|
6
|
-
|
|
7
|
-
```html
|
|
8
|
-
<script is:inline>
|
|
9
|
-
;(() => {
|
|
10
|
-
"use strict"
|
|
11
|
-
const STORAGE_KEY = "lte-theme"
|
|
12
|
-
let stored = null
|
|
13
|
-
try {
|
|
14
|
-
stored = localStorage.getItem(STORAGE_KEY)
|
|
15
|
-
} catch {
|
|
16
|
-
// localStorage may be unavailable (private mode, sandboxed iframe).
|
|
17
|
-
}
|
|
18
|
-
const prefersDark = globalThis.matchMedia(
|
|
19
|
-
"(prefers-color-scheme: dark)"
|
|
20
|
-
).matches
|
|
21
|
-
const resolved =
|
|
22
|
-
stored === "dark" || stored === "light"
|
|
23
|
-
? stored
|
|
24
|
-
: prefersDark
|
|
25
|
-
? "dark"
|
|
26
|
-
: "light"
|
|
27
|
-
document.documentElement.setAttribute("data-bs-theme", resolved)
|
|
28
|
-
document.documentElement.style.colorScheme = resolved
|
|
29
|
-
})()
|
|
30
|
-
</script>
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Refinements vs. the snippet in the issue:
|
|
34
|
-
- **Mirrors the resolution already in `_scripts.astro`** so the stored `"auto"` value (and the unset case) consistently falls back to `prefers-color-scheme` — keeps the head and body logic in sync.
|
|
35
|
-
- **`try/catch` around `localStorage`** so it degrades gracefully where storage access throws (private mode, sandboxed iframes) instead of leaving the page un-themed.
|
|
36
|
-
- Placed right after `<title>`, before the stylesheet, so `data-bs-theme` is set before the first paint.
|
|
37
|
-
|
|
38
|
-
**Verified:** with `lte-theme=dark` set, a probe reading `document.documentElement.getAttribute("data-bs-theme")` at the very first line of `<body>` already returns `"dark"` — i.e. the theme is applied before any body content is laid out, so there's no flash. Pages now render directly in the stored theme on refresh.
|
|
39
|
-
|
|
40
|
-
Changed in `src/html/components/_head.astro` and the rebuilt `dist` (applies to all pages). It'll be in the next release. Thanks again for the detailed report and suggested fix!
|
package/index.html
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset='utf-8'>
|
|
5
|
-
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
|
6
|
-
<title>AdminLTE v4</title>
|
|
7
|
-
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<script>window.location.href = './dist/index.html'</script>
|
|
11
|
-
</body>
|
|
12
|
-
</html>
|
package/netlify.toml
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Netlify deploy configuration for adminlte-v4.netlify.app
|
|
2
|
-
#
|
|
3
|
-
# The dist/ folder is committed to the repo (see "rebuild dist" commits),
|
|
4
|
-
# so the production deploy just publishes those static files. This avoids
|
|
5
|
-
# running npm install on Netlify, which has been failing since rc7 due to
|
|
6
|
-
# a Node version drift between Netlify's default and the Node 22 used in
|
|
7
|
-
# CI (see .github/workflows/*).
|
|
8
|
-
|
|
9
|
-
[build]
|
|
10
|
-
publish = "dist"
|
|
11
|
-
command = "echo 'Static deploy of committed dist/'"
|
|
12
|
-
|
|
13
|
-
[build.environment]
|
|
14
|
-
# Match the Node version used in GitHub Actions so any future build
|
|
15
|
-
# command (eg. `npm run docs-compile`) resolves dependencies correctly.
|
|
16
|
-
NODE_VERSION = "22"
|