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.
Files changed (146) hide show
  1. package/ACCESSIBILITY-COMPLIANCE.md +60 -339
  2. package/CHANGELOG.md +66 -0
  3. package/README.md +15 -2
  4. package/dist/css/adminlte-docs.css +878 -0
  5. package/dist/css/adminlte-docs.css.map +1 -0
  6. package/dist/css/adminlte-docs.min.css +7 -0
  7. package/dist/css/adminlte-docs.min.css.map +1 -0
  8. package/dist/css/adminlte-docs.rtl.css +877 -0
  9. package/dist/css/adminlte-docs.rtl.css.map +1 -0
  10. package/dist/css/adminlte-docs.rtl.min.css +7 -0
  11. package/dist/css/adminlte-docs.rtl.min.css.map +1 -0
  12. package/dist/css/adminlte.css +1176 -2718
  13. package/dist/css/adminlte.css.map +1 -1
  14. package/dist/css/adminlte.min.css +2 -2
  15. package/dist/css/adminlte.min.css.map +1 -1
  16. package/dist/css/adminlte.rtl.css +1176 -2718
  17. package/dist/css/adminlte.rtl.css.map +1 -1
  18. package/dist/css/adminlte.rtl.min.css +2 -2
  19. package/dist/css/adminlte.rtl.min.css.map +1 -1
  20. package/dist/js/adminlte.esm.js +1365 -0
  21. package/dist/js/adminlte.esm.js.map +1 -0
  22. package/dist/js/adminlte.esm.min.js +7 -0
  23. package/dist/js/adminlte.esm.min.js.map +1 -0
  24. package/dist/js/adminlte.js +606 -310
  25. package/dist/js/adminlte.js.map +1 -1
  26. package/dist/js/adminlte.min.js +2 -2
  27. package/dist/js/adminlte.min.js.map +1 -1
  28. package/dist/js/types/accessibility.d.ts +46 -0
  29. package/dist/js/types/adminlte.d.ts +9 -0
  30. package/dist/js/types/base-component.d.ts +36 -0
  31. package/dist/js/types/card-widget.d.ts +30 -0
  32. package/dist/js/types/color-mode.d.ts +56 -0
  33. package/dist/js/types/direct-chat.d.ts +19 -0
  34. package/dist/js/types/fullscreen.d.ts +21 -0
  35. package/dist/js/types/layout.d.ts +19 -0
  36. package/dist/js/types/push-menu.d.ts +102 -0
  37. package/dist/js/types/treeview.d.ts +27 -0
  38. package/dist/js/types/util/index.d.ts +42 -0
  39. package/package.json +60 -21
  40. package/src/scss/_app-header.scss +3 -1
  41. package/src/scss/_app-main.scss +4 -0
  42. package/src/scss/_app-sidebar.scss +3 -1
  43. package/src/scss/_bootstrap-overrides.scss +60 -0
  44. package/src/scss/_callouts.scss +13 -3
  45. package/src/scss/_dropdown.scss +3 -1
  46. package/src/scss/_info-box.scss +3 -1
  47. package/src/scss/_progress-bars.scss +3 -1
  48. package/src/scss/_table.scss +4 -2
  49. package/src/scss/adminlte-docs.scss +25 -0
  50. package/src/scss/adminlte.scss +5 -4
  51. package/src/scss/pages/_login_and_register.scss +3 -1
  52. package/src/scss/parts/_core.scss +0 -1
  53. package/src/ts/accessibility.ts +129 -69
  54. package/src/ts/adminlte.ts +3 -1
  55. package/src/ts/base-component.ts +84 -0
  56. package/src/ts/card-widget.ts +134 -85
  57. package/src/ts/color-mode.ts +174 -0
  58. package/src/ts/direct-chat.ts +38 -32
  59. package/src/ts/fullscreen.ts +78 -63
  60. package/src/ts/layout.ts +2 -1
  61. package/src/ts/push-menu.ts +93 -44
  62. package/src/ts/treeview.ts +107 -47
  63. package/src/ts/util/index.ts +114 -29
  64. package/.browserslistrc +0 -17
  65. package/.prettierrc +0 -6
  66. package/CODE_OF_CONDUCT.md +0 -43
  67. package/SECURITY.md +0 -99
  68. package/dist/UI/general.html +0 -2317
  69. package/dist/UI/icons.html +0 -1126
  70. package/dist/UI/timeline.html +0 -1212
  71. package/dist/docs/browser-support.html +0 -826
  72. package/dist/docs/color-mode.html +0 -1142
  73. package/dist/docs/components/main-header.html +0 -1209
  74. package/dist/docs/components/main-sidebar.html +0 -924
  75. package/dist/docs/customization.html +0 -1080
  76. package/dist/docs/deployment.html +0 -1145
  77. package/dist/docs/faq.html +0 -1392
  78. package/dist/docs/getting-started.html +0 -991
  79. package/dist/docs/how-to-contribute.html +0 -890
  80. package/dist/docs/index.html +0 -16
  81. package/dist/docs/integrations.html +0 -1231
  82. package/dist/docs/introduction.html +0 -1008
  83. package/dist/docs/javascript/accessibility.html +0 -949
  84. package/dist/docs/javascript/card-widget.html +0 -1019
  85. package/dist/docs/javascript/direct-chat.html +0 -896
  86. package/dist/docs/javascript/fullscreen.html +0 -905
  87. package/dist/docs/javascript/layout.html +0 -908
  88. package/dist/docs/javascript/plugins-overview.html +0 -1144
  89. package/dist/docs/javascript/pushmenu.html +0 -1045
  90. package/dist/docs/javascript/treeview.html +0 -1024
  91. package/dist/docs/layout-blueprint.html +0 -1087
  92. package/dist/docs/layout.html +0 -842
  93. package/dist/docs/license.html +0 -807
  94. package/dist/docs/migration.html +0 -1149
  95. package/dist/docs/recipes.html +0 -1185
  96. package/dist/docs/rtl.html +0 -957
  97. package/dist/examples/lockscreen.html +0 -249
  98. package/dist/examples/login-v2.html +0 -282
  99. package/dist/examples/login.html +0 -272
  100. package/dist/examples/register-v2.html +0 -291
  101. package/dist/examples/register.html +0 -277
  102. package/dist/forms/elements.html +0 -1405
  103. package/dist/forms/layout.html +0 -1267
  104. package/dist/forms/validation.html +0 -1275
  105. package/dist/forms/wizard.html +0 -1410
  106. package/dist/generate/theme.html +0 -1082
  107. package/dist/index.html +0 -1745
  108. package/dist/index2.html +0 -2277
  109. package/dist/index3.html +0 -1532
  110. package/dist/layout/collapsed-sidebar-without-hover.html +0 -1144
  111. package/dist/layout/collapsed-sidebar.html +0 -1137
  112. package/dist/layout/fixed-complete.html +0 -1138
  113. package/dist/layout/fixed-footer.html +0 -1136
  114. package/dist/layout/fixed-header.html +0 -1136
  115. package/dist/layout/fixed-sidebar.html +0 -1138
  116. package/dist/layout/layout-custom-area.html +0 -1177
  117. package/dist/layout/layout-rtl.html +0 -1137
  118. package/dist/layout/logo-switch.html +0 -683
  119. package/dist/layout/sidebar-mini.html +0 -1137
  120. package/dist/layout/unfixed-sidebar.html +0 -1136
  121. package/dist/mailbox/compose.html +0 -1151
  122. package/dist/mailbox/inbox.html +0 -1509
  123. package/dist/mailbox/read.html +0 -1202
  124. package/dist/pages/404.html +0 -239
  125. package/dist/pages/500.html +0 -227
  126. package/dist/pages/calendar.html +0 -1266
  127. package/dist/pages/chat.html +0 -1427
  128. package/dist/pages/faq.html +0 -1383
  129. package/dist/pages/file-manager.html +0 -1835
  130. package/dist/pages/invoice.html +0 -1199
  131. package/dist/pages/kanban.html +0 -1439
  132. package/dist/pages/maintenance.html +0 -230
  133. package/dist/pages/pricing.html +0 -1279
  134. package/dist/pages/profile.html +0 -1382
  135. package/dist/pages/projects.html +0 -1644
  136. package/dist/pages/settings.html +0 -1387
  137. package/dist/tables/data.html +0 -1319
  138. package/dist/tables/simple.html +0 -1435
  139. package/dist/widgets/cards.html +0 -1356
  140. package/dist/widgets/info-box.html +0 -1429
  141. package/dist/widgets/small-box.html +0 -1225
  142. package/eslint.config.js +0 -82
  143. package/github-issue-response.md +0 -40
  144. package/index.html +0 -12
  145. package/netlify.toml +0 -16
  146. package/src/scss/_bootstrap-variables.scss +0 -1766
@@ -0,0 +1,56 @@
1
+ /**
2
+ * --------------------------------------------
3
+ * @file AdminLTE color-mode.ts
4
+ * @description Color mode (light/dark/auto) switcher for AdminLTE.
5
+ * Persists the choice in localStorage, follows the OS preference in
6
+ * "auto" mode, and keeps [data-bs-theme-value] toggles and
7
+ * [data-lte-theme-icon] indicator icons in sync.
8
+ *
9
+ * Ships in the bundle so applications no longer need to copy the demo's
10
+ * inline script. The tiny no-flash snippet in <head> (see _head.astro)
11
+ * remains inline by design — it must run before first paint.
12
+ * @license MIT
13
+ * --------------------------------------------
14
+ */
15
+ type Theme = 'light' | 'dark' | 'auto';
16
+ /**
17
+ * Class Definition
18
+ * ====================================================
19
+ */
20
+ declare class ColorMode {
21
+ /**
22
+ * Read the persisted theme choice, or null when nothing was stored or
23
+ * localStorage is unavailable (private mode, sandboxed iframe).
24
+ */
25
+ getStoredTheme(): Theme | null;
26
+ /**
27
+ * The user's effective choice: the stored theme, falling back to the OS
28
+ * preference.
29
+ */
30
+ getPreferredTheme(): Theme;
31
+ /**
32
+ * Resolve "auto" against the OS preference.
33
+ */
34
+ resolveTheme(theme: Theme): 'light' | 'dark';
35
+ /**
36
+ * Apply a theme and persist the choice. Dispatches
37
+ * `changed.lte.color-mode` on the document with { theme, resolved }.
38
+ */
39
+ setTheme(theme: Theme): void;
40
+ /**
41
+ * Apply without persisting — used on init and when the OS preference
42
+ * changes while in "auto" mode.
43
+ */
44
+ _applyTheme(theme: Theme): void;
45
+ _prefersDark(): boolean;
46
+ /**
47
+ * Sync the [data-bs-theme-value] toggles (active state, pressed state,
48
+ * check mark) and the [data-lte-theme-icon] indicator icons.
49
+ */
50
+ _showActiveTheme(theme: Theme): void;
51
+ /**
52
+ * Apply the preferred theme and sync the UI without persisting anything.
53
+ */
54
+ init(): void;
55
+ }
56
+ export default ColorMode;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * --------------------------------------------
3
+ * @file AdminLTE direct-chat.ts
4
+ * @description Direct chat for AdminLTE.
5
+ * @license MIT
6
+ * --------------------------------------------
7
+ */
8
+ import { BaseComponent } from './base-component';
9
+ /**
10
+ * Class Definition
11
+ * ====================================================
12
+ */
13
+ declare class DirectChat extends BaseComponent {
14
+ static get NAME(): string;
15
+ static getInstance(element: Element | null | undefined): DirectChat | null;
16
+ static getOrCreateInstance(element: HTMLElement): DirectChat;
17
+ toggle(): void;
18
+ }
19
+ export default DirectChat;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * --------------------------------------------
3
+ * @file AdminLTE fullscreen.ts
4
+ * @description Fullscreen plugin for AdminLTE.
5
+ * @license MIT
6
+ * --------------------------------------------
7
+ */
8
+ import { BaseComponent } from './base-component';
9
+ /**
10
+ * Class Definition.
11
+ * ============================================================================
12
+ */
13
+ declare class FullScreen extends BaseComponent {
14
+ static get NAME(): string;
15
+ static getInstance(element: Element | null | undefined): FullScreen | null;
16
+ static getOrCreateInstance(element: HTMLElement): FullScreen;
17
+ inFullScreen(): void;
18
+ outFullscreen(): void;
19
+ toggleFullScreen(): void;
20
+ }
21
+ export default FullScreen;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * @file AdminLTE layout.ts
4
+ * @description Layout for AdminLTE.
5
+ * @license MIT
6
+ * ----------------------------------------------------------------------------
7
+ */
8
+ /**
9
+ * ----------------------------------------------------------------------------
10
+ * Class Definition
11
+ * ----------------------------------------------------------------------------
12
+ */
13
+ declare class Layout {
14
+ _element: HTMLElement;
15
+ _holdTransitionTimer: ReturnType<typeof setTimeout> | undefined;
16
+ constructor(element: HTMLElement);
17
+ holdTransition(time?: number): void;
18
+ }
19
+ export default Layout;
@@ -0,0 +1,102 @@
1
+ /**
2
+ * ----------------------------------------------------------------------------
3
+ * @file AdminLTE push-menu.ts
4
+ * @description Push menu for AdminLTE.
5
+ * @license MIT
6
+ * ----------------------------------------------------------------------------
7
+ */
8
+ import { BaseComponent } from './base-component';
9
+ /**
10
+ * ----------------------------------------------------------------------------
11
+ * Configuration Object Interface
12
+ * - sidebarBreakpoint: The screen width (in pixels) below which the sidebar
13
+ * is considered to be on a "mobile" size and should be collapsed by default
14
+ * unless explicitly opened.
15
+ * - enablePersistence: Whether to save the sidebar state (collapsed/open) in
16
+ * localStorage and restore it on page load.
17
+ * ----------------------------------------------------------------------------
18
+ */
19
+ type Config = {
20
+ sidebarBreakpoint: number;
21
+ enablePersistence: boolean;
22
+ };
23
+ /**
24
+ * ----------------------------------------------------------------------------
25
+ * Class Definition
26
+ * ----------------------------------------------------------------------------
27
+ */
28
+ declare class PushMenu extends BaseComponent {
29
+ static get NAME(): string;
30
+ static getInstance(element: Element | null | undefined): PushMenu | null;
31
+ static getOrCreateInstance(element: HTMLElement, config?: Partial<Config>): PushMenu;
32
+ _config: Config;
33
+ constructor(element: HTMLElement, config?: Partial<Config>);
34
+ /**
35
+ * Check if the sidebar is collapsed.
36
+ *
37
+ * @returns True if the sidebar is collapsed, false otherwise.
38
+ */
39
+ isCollapsed(): boolean;
40
+ /**
41
+ * Check if the sidebar is explicitly open on mobile sizes.
42
+ *
43
+ * @returns True if the sidebar is explicitly open, false otherwise.
44
+ */
45
+ isExplicitlyOpen(): boolean;
46
+ /**
47
+ * Check if the sidebar is in mini mode.
48
+ *
49
+ * @returns True if the sidebar is in mini mode, false otherwise.
50
+ */
51
+ isMiniMode(): boolean;
52
+ /**
53
+ * Check if the current screen size is considered "mobile" based on the
54
+ * sidebarBreakpoint config value.
55
+ *
56
+ * @returns True if the screen size is mobile, false otherwise.
57
+ */
58
+ isMobileSize(): boolean;
59
+ /**
60
+ * Expand the sidebar menu.
61
+ */
62
+ expand(): void;
63
+ /**
64
+ * Collapse the sidebar menu.
65
+ */
66
+ collapse(): void;
67
+ /**
68
+ * Toggle the sidebar menu state.
69
+ */
70
+ toggle(): void;
71
+ /**
72
+ * Read the CSS breakpoint of the sidebar from the DOM and update the
73
+ * sidebarBreakpoint config. This breakpoint is defined using a CSS ::before
74
+ * pseudo element on the sidebar-expand element when @media queries are used
75
+ * to change the sidebar behavior based on screen size.
76
+ */
77
+ setupSidebarBreakPoint(): void;
78
+ /**
79
+ * Update the sidebar state based on the current screen size and the
80
+ * sidebarBreakpoint config value.
81
+ */
82
+ updateStateByResponsiveLogic(): void;
83
+ /**
84
+ * Save sidebar state to localStorage.
85
+ *
86
+ * @param state The state to save ('sidebar-open' or 'sidebar-collapse').
87
+ */
88
+ saveSidebarState(state: string): void;
89
+ /**
90
+ * Load sidebar state from localStorage.
91
+ */
92
+ loadSidebarState(): void;
93
+ /**
94
+ * Clear sidebar state from localStorage.
95
+ */
96
+ clearSidebarState(): void;
97
+ /**
98
+ * Initialize the push menu plugin and setup the initial sidebar state.
99
+ */
100
+ init(): void;
101
+ }
102
+ export default PushMenu;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * --------------------------------------------
3
+ * @file AdminLTE treeview.ts
4
+ * @description Treeview plugin for AdminLTE.
5
+ * @license MIT
6
+ * --------------------------------------------
7
+ */
8
+ import { BaseComponent } from './base-component';
9
+ type Config = {
10
+ animationSpeed: number;
11
+ accordion: boolean;
12
+ };
13
+ /**
14
+ * Class Definition
15
+ * ====================================================
16
+ */
17
+ declare class Treeview extends BaseComponent {
18
+ static get NAME(): string;
19
+ static getInstance(element: Element | null | undefined): Treeview | null;
20
+ static getOrCreateInstance(element: HTMLElement, config?: Partial<Config>): Treeview;
21
+ _config: Config;
22
+ constructor(element: HTMLElement, config?: Partial<Config>);
23
+ open(): void;
24
+ close(): void;
25
+ toggle(): void;
26
+ }
27
+ export default Treeview;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Lifecycle management
3
+ * ============================================================================
4
+ *
5
+ * Plugins register their initialisation through `onDOMContentLoaded`. Besides
6
+ * the initial page load, every registered callback is re-run on Hotwired Turbo
7
+ * navigations (`turbo:load`): Turbo Drive swaps the <body> without a full page
8
+ * reload, so without re-initialisation plugins such as PushMenu and TreeView
9
+ * stop working after the first in-app link click (#563, #5890).
10
+ *
11
+ * Re-running init would normally leak listeners, because callbacks also bind to
12
+ * `window`/`document`, which survive Turbo's <body> swap. To prevent that, each
13
+ * cycle has its own `AbortController`: callbacks should attach their
14
+ * window/document-level listeners with the signal from `getLifecycleSignal()`.
15
+ * The signal is aborted on `turbo:before-render`, tearing down the previous
16
+ * cycle's listeners before the callbacks run again. Listeners bound to elements
17
+ * inside <body> don't need the signal — Turbo discards the old <body>, so they
18
+ * are cleaned up automatically.
19
+ */
20
+ /**
21
+ * The AbortSignal for the current lifecycle. Pass it as the
22
+ * `{ signal }` option to window/document `addEventListener` calls made during
23
+ * initialisation so they are removed automatically on the next Turbo render.
24
+ */
25
+ declare const getLifecycleSignal: () => AbortSignal;
26
+ declare const onDOMContentLoaded: (callback: () => void) => void;
27
+ /**
28
+ * Check if an element has a specific data attribute using ES2022 Object.hasOwn()
29
+ */
30
+ declare const hasDataAttribute: (element: HTMLElement, attribute: string) => boolean;
31
+ /**
32
+ * Get the last element from a NodeList using ES2022 Array.at()
33
+ */
34
+ declare const getLastElement: <T extends Element>(elements: NodeListOf<T> | T[]) => T | undefined;
35
+ /**
36
+ * Safe property access with better error handling
37
+ */
38
+ declare const safePropertyAccess: (obj: Record<string, unknown>, property: string) => unknown;
39
+ declare const slideUp: (target: HTMLElement, duration?: number) => void;
40
+ declare const slideDown: (target: HTMLElement, duration?: number) => void;
41
+ declare const slideToggle: (target: HTMLElement, duration?: number) => void;
42
+ export { onDOMContentLoaded, getLifecycleSignal, slideUp, slideDown, slideToggle, hasDataAttribute, getLastElement, safePropertyAccess };
package/package.json CHANGED
@@ -1,27 +1,56 @@
1
1
  {
2
2
  "name": "admin-lte",
3
3
  "description": "Responsive open source admin dashboard and control panel.",
4
- "version": "4.0.2",
4
+ "version": "4.1.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": "Colorlib <https://colorlib.com>",
8
8
  "main": "dist/js/adminlte.min.js",
9
+ "module": "dist/js/adminlte.esm.js",
10
+ "types": "dist/js/types/adminlte.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/js/types/adminlte.d.ts",
14
+ "sass": "./src/scss/adminlte.scss",
15
+ "style": "./dist/css/adminlte.css",
16
+ "import": "./dist/js/adminlte.esm.js",
17
+ "require": "./dist/js/adminlte.min.js"
18
+ },
19
+ "./dist/*": "./dist/*",
20
+ "./src/scss/*": "./src/scss/*",
21
+ "./package.json": "./package.json"
22
+ },
23
+ "files": [
24
+ "dist/css/",
25
+ "dist/js/",
26
+ "dist/assets/",
27
+ "src/scss/",
28
+ "src/ts/",
29
+ "CHANGELOG.md",
30
+ "ACCESSIBILITY-COMPLIANCE.md"
31
+ ],
32
+ "engines": {
33
+ "node": ">=20"
34
+ },
9
35
  "scripts": {
10
36
  "start": "npm run dev",
11
37
  "dev": "npm-run-all --parallel watch docs-serve",
12
38
  "build": "npm-run-all clean compile",
13
39
  "css": "npm-run-all css-compile css-prefix css-rtl css-minify",
14
- "css-compile": "sass --style expanded --load-path=\"node_modules\" --source-map --embed-sources --no-error-css --quiet src/scss/:dist/css/",
40
+ "css-compile": "sass --style expanded --load-path=\"node_modules\" --source-map --embed-sources --no-error-css --quiet-deps --silence-deprecation=import src/scss/:dist/css/",
15
41
  "css-rtl": "cross-env NODE_ENV=RTL postcss --config src/config/postcss.config.mjs --dir \"dist/css\" --ext \".rtl.css\" \"dist/css/*.css\" \"!dist/css/*.min.css\" \"!dist/css/*.rtl.css\"",
16
42
  "css-lint": "stylelint \"src/scss/**/*.scss\" --cache --cache-location .cache/.stylelintcache --rd",
17
43
  "css-minify": "npm-run-all --aggregate-output --parallel css-minify-*",
18
44
  "css-minify-main": "cleancss -O1 --format breakWith=lf --with-rebase --source-map --source-map-inline-sources --output dist/css/ --batch --batch-suffix \".min\" \"dist/css/*.css\" \"!dist/css/*.min.css\" \"!dist/css/*rtl*.css\"",
19
45
  "css-minify-rtl": "cleancss -O1 --format breakWith=lf --with-rebase --source-map --source-map-inline-sources --output dist/css/ --batch --batch-suffix \".min\" \"dist/css/*rtl.css\" \"!dist/css/*.min.css\"",
20
46
  "css-prefix": "postcss --config src/config/postcss.config.mjs --replace \"dist/css/*.css\" \"!dist/css/*.rtl*.css\" \"!dist/css/*.min.css\"",
21
- "js": "npm-run-all js-compile js-minify",
47
+ "js": "npm-run-all js-compile js-types js-minify",
22
48
  "js-compile": "rollup --config src/config/rollup.config.js --sourcemap",
49
+ "js-types": "tsc -p tsconfig.types.json",
23
50
  "js-lint": "eslint --format=stylish .",
24
- "js-minify": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/adminlte.js.map,includeSources,url=adminlte.min.js.map\" --output dist/js/adminlte.min.js dist/js/adminlte.js",
51
+ "js-minify": "npm-run-all --aggregate-output --parallel js-minify-*",
52
+ "js-minify-main": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/adminlte.js.map,includeSources,url=adminlte.min.js.map\" --output dist/js/adminlte.min.js dist/js/adminlte.js",
53
+ "js-minify-esm": "terser --compress passes=2 --module --mangle --comments \"/^!/\" --source-map \"content=dist/js/adminlte.esm.js.map,includeSources,url=adminlte.esm.min.js.map\" --output dist/js/adminlte.esm.min.js dist/js/adminlte.esm.js",
25
54
  "bundlewatch": "bundlewatch --config .bundlewatch.config.json",
26
55
  "lockfile-lint": "lockfile-lint --allowed-hosts npm --allowed-schemes https: --empty-hostname false --type npm --path package-lock.json",
27
56
  "docs-compile": "npm run copy-assets && astro --config src/config/astro.config.mjs build",
@@ -31,10 +60,14 @@
31
60
  "copy-assets": "rimraf src/html/public && shx mkdir -p src/html/public && shx cp -r dist/css dist/js dist/assets src/html/public/",
32
61
  "flatten-build": "shx cp -r dist/html/* dist/ && shx rm -rf dist/html && shx rm -rf dist/.astro && shx mkdir -p dist/docs && shx mv dist/docs.html dist/docs/index.html",
33
62
  "assets": "node src/config/assets.config.mjs",
63
+ "version": "node src/config/sync-version.mjs",
64
+ "test": "vitest run",
65
+ "test-watch": "vitest",
66
+ "test-a11y": "node tests/a11y.mjs",
34
67
  "lint": "npm-run-all --aggregate-output --continue-on-error --parallel js-lint css-lint docs-lint lockfile-lint",
35
68
  "clean": "rimraf dist",
36
69
  "compile": "npm-run-all css js assets copy-assets docs-compile docs-format flatten-build",
37
- "production": "npm-run-all clean lint compile bundlewatch",
70
+ "production": "npm-run-all clean lint test compile bundlewatch",
38
71
  "watch": "concurrently \"npm:watch-*\"",
39
72
  "watch-css-main": "nodemon --watch src/scss/ --ext scss --exec \"npm-run-all css-lint css-compile css-prefix copy-assets\"",
40
73
  "watch-css-dist": "nodemon --watch dist/css/ --ext css --ignore \"dist/css/*.rtl.*\" --exec \"npm run css-rtl\"",
@@ -62,6 +95,9 @@
62
95
  "bugs": {
63
96
  "url": "https://github.com/ColorlibHQ/AdminLTE/issues"
64
97
  },
98
+ "peerDependencies": {
99
+ "bootstrap": "^5.3.8"
100
+ },
65
101
  "overrides": {
66
102
  "axios": "0.32.0",
67
103
  "stylelint-config-twbs-bootstrap": {
@@ -71,40 +107,43 @@
71
107
  },
72
108
  "devDependencies": {
73
109
  "@astrojs/check": "^0.9.9",
74
- "@astrojs/mdx": "^6.0.2",
110
+ "@astrojs/mdx": "^7.0.0",
75
111
  "@eslint/js": "^10.0.1",
76
112
  "@rollup/plugin-typescript": "^12.3.0",
77
- "@typescript-eslint/eslint-plugin": "^8.60.1",
78
- "@typescript-eslint/parser": "^8.60.1",
79
- "astro": "^6.4.4",
80
- "autoprefixer": "^10.5.0",
113
+ "@typescript-eslint/eslint-plugin": "^8.62.1",
114
+ "@typescript-eslint/parser": "^8.62.1",
115
+ "astro": "^7.0.4",
116
+ "autoprefixer": "^10.5.2",
117
+ "axe-core": "^4.12.1",
81
118
  "bootstrap": "^5.3.8",
82
119
  "bundlewatch": "^0.4.2",
83
120
  "clean-css-cli": "^5.6.3",
84
121
  "concurrently": "^10.0.3",
85
122
  "cross-env": "^10.1.0",
86
- "eslint": "^10.4.1",
87
- "eslint-plugin-astro": "^1.7.0",
88
- "eslint-plugin-unicorn": "^64.0.0",
89
- "fs-extra": "^11.3.5",
90
- "globals": "^17.6.0",
123
+ "eslint": "^10.6.0",
124
+ "eslint-plugin-astro": "^2.1.1",
125
+ "eslint-plugin-unicorn": "^69.0.0",
126
+ "fs-extra": "^11.3.6",
127
+ "globals": "^17.7.0",
128
+ "happy-dom": "^20.10.6",
91
129
  "lockfile-lint": "^5.0.0",
92
130
  "nodemon": "^3.1.14",
93
131
  "npm-run-all": "^4.1.5",
94
- "postcss": "^8.5.15",
132
+ "postcss": "^8.5.16",
95
133
  "postcss-cli": "^11.0.1",
96
- "prettier": "^3.8.3",
134
+ "prettier": "^3.9.4",
97
135
  "prettier-plugin-astro": "^0.14.1",
98
136
  "rimraf": "^6.1.3",
99
- "rollup": "^4.61.1",
137
+ "rollup": "^4.62.2",
100
138
  "rtlcss": "^4.3.0",
101
- "sass": "^1.100.0",
139
+ "sass": "^1.101.0",
102
140
  "shx": "^0.4.0",
103
- "stylelint": "^17.12.0",
141
+ "stylelint": "^17.14.0",
104
142
  "stylelint-config-twbs-bootstrap": "^16.1.0",
105
143
  "terser": "^5.48.0",
106
144
  "tslib": "^2.8.1",
107
145
  "typescript": "^6.0.3",
108
- "typescript-eslint": "^8.60.1"
146
+ "typescript-eslint": "^8.62.1",
147
+ "vitest": "^4.1.9"
109
148
  }
110
149
  }
@@ -1,3 +1,5 @@
1
+ @use "sass:map";
2
+
1
3
  //
2
4
  // Core: Main Header
3
5
  //
@@ -38,7 +40,7 @@
38
40
  // stay visible while the page content scrolls beneath the fixed header.
39
41
  // Only applied on `sidebar-expand-*` breakpoints, since the mobile sidebar
40
42
  // is an off-canvas overlay that handles its own positioning.
41
- @each $breakpoint in map-keys($grid-breakpoints) {
43
+ @each $breakpoint in map.keys($grid-breakpoints) {
42
44
  $next: breakpoint-next($breakpoint, $grid-breakpoints);
43
45
  $infix: breakpoint-infix($next, $grid-breakpoints);
44
46
 
@@ -16,6 +16,10 @@
16
16
  line-height: 2.5rem;
17
17
 
18
18
  a {
19
+ // Bootstrap's default link blue is only 4.26:1 against the
20
+ // body-secondary background the demo uses behind the content header;
21
+ // the hover shade clears WCAG AA's 4.5:1 in both color modes.
22
+ color: var(--#{$prefix}link-hover-color);
19
23
  text-decoration: none;
20
24
  }
21
25
  }
@@ -1,3 +1,5 @@
1
+ @use "sass:map";
2
+
1
3
  .app-sidebar {
2
4
  --#{$lte-prefix}sidebar-hover-bg: #{$lte-sidebar-hover-bg};
3
5
  --#{$lte-prefix}sidebar-color: #{$lte-sidebar-color};
@@ -462,7 +464,7 @@
462
464
  }
463
465
 
464
466
  .sidebar-expand {
465
- @each $breakpoint in map-keys($grid-breakpoints) {
467
+ @each $breakpoint in map.keys($grid-breakpoints) {
466
468
  $next: breakpoint-next($breakpoint, $grid-breakpoints);
467
469
  $infix: breakpoint-infix($next, $grid-breakpoints);
468
470
 
@@ -0,0 +1,60 @@
1
+ //
2
+ // AdminLTE's Bootstrap overrides.
3
+ //
4
+ // Loaded BEFORE `bootstrap/scss/variables`: every Bootstrap variable uses
5
+ // `!default`, so anything declared here wins while everything not declared
6
+ // keeps Bootstrap's own default. This replaces the old 1,700-line vendored
7
+ // copy of Bootstrap's variables file (which carried these same ~10 changes
8
+ // and had to be re-synced by hand on every Bootstrap release).
9
+ //
10
+ // To override any variable yourself, declare it before importing AdminLTE —
11
+ // see the Customization docs.
12
+ //
13
+
14
+ // Options
15
+ $enable-shadows: true !default;
16
+ $enable-negative-margins: true !default;
17
+
18
+ // Typography
19
+ // stylelint-disable-next-line value-keyword-case
20
+ $font-family-sans-serif: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default;
21
+
22
+ // The type-scale variables below mirror Bootstrap's defaults. They are
23
+ // declared here (still with !default, so user overrides keep working) only
24
+ // because AdminLTE's extra sizes and the extended $font-sizes map need them
25
+ // before `bootstrap/scss/variables` has loaded.
26
+ $font-size-base: 1rem !default;
27
+ $font-size-sm: $font-size-base * .875 !default;
28
+ $font-size-lg: $font-size-base * 1.25 !default;
29
+
30
+ // AdminLTE additions to the type scale.
31
+ $font-size-xs: $font-size-base * .75 !default;
32
+ $font-size-xl: $font-size-base * 2 !default;
33
+
34
+ $h1-font-size: $font-size-base * 2.5 !default;
35
+ $h2-font-size: $font-size-base * 2 !default;
36
+ $h3-font-size: $font-size-base * 1.75 !default;
37
+ $h4-font-size: $font-size-base * 1.5 !default;
38
+ $h5-font-size: $font-size-base * 1.25 !default;
39
+ $h6-font-size: $font-size-base !default;
40
+ $h7-font-size: $font-size-sm !default;
41
+ $h8-font-size: $font-size-xs !default;
42
+
43
+ // Extends Bootstrap's map with sizes 7 and 8 (.fs-7 / .fs-8 utilities).
44
+ $font-sizes: (
45
+ 1: $h1-font-size,
46
+ 2: $h2-font-size,
47
+ 3: $h3-font-size,
48
+ 4: $h4-font-size,
49
+ 5: $h5-font-size,
50
+ 6: $h6-font-size,
51
+ 7: $h7-font-size,
52
+ 8: $h8-font-size
53
+ ) !default;
54
+
55
+ // Navbar
56
+ $navbar-nav-link-padding-x: 1rem !default;
57
+
58
+ // AdminLTE keeps `$modal-content-color: null` so the modal text colour is
59
+ // inherited from the document. Bootstrap's default is `var(--#{$prefix}body-color)`.
60
+ $modal-content-color: null !default;
@@ -3,14 +3,22 @@
3
3
  //
4
4
 
5
5
  .callout {
6
- --#{$prefix}link-color-rgb: var(--#{$lte-prefix}callout-link);
7
- --#{$prefix}code-color: var(--#{$lte-prefix}callout-code-color);
8
-
9
6
  padding: 1.25rem;
10
7
  color: var(--#{$lte-prefix}callout-color, inherit);
11
8
  background-color: var(--#{$lte-prefix}callout-bg, var(--bs-gray-100));
12
9
  border-left: .25rem solid var(--#{$lte-prefix}callout-border, var(--bs-gray-300));
13
10
 
11
+ // Tint plain links and inline code to the variant's emphasis color so they
12
+ // stay readable on the subtle background (falls back to the defaults in an
13
+ // unvarianted callout).
14
+ a {
15
+ color: var(--#{$lte-prefix}callout-link, var(--#{$prefix}link-color));
16
+ }
17
+
18
+ code {
19
+ color: var(--#{$lte-prefix}callout-code-color, var(--#{$prefix}code-color));
20
+ }
21
+
14
22
  .callout-link {
15
23
  font-weight: $lte-callout-link-font-weight;
16
24
  color: var(--#{$prefix}callout-link-color);
@@ -35,6 +43,8 @@
35
43
  --#{$lte-prefix}callout-color: var(--#{$prefix}#{$name}-text-emphasis);
36
44
  --#{$lte-prefix}callout-bg: var(--#{$prefix}#{$name}-bg-subtle);
37
45
  --#{$lte-prefix}callout-border: var(--#{$prefix}#{$name}-border-subtle);
46
+ --#{$lte-prefix}callout-link: var(--#{$prefix}#{$name}-text-emphasis);
47
+ --#{$lte-prefix}callout-code-color: var(--#{$prefix}#{$name}-text-emphasis);
38
48
  --#{$prefix}callout-link-color: var(--#{$prefix}#{$name}-text-emphasis);
39
49
  }
40
50
  }
@@ -203,7 +203,9 @@
203
203
  > .user-footer {
204
204
  @include clearfix();
205
205
  padding: 10px;
206
- background-color: var(--#{$prefix}light-bg);
206
+ // --bs-light-bg does not exist in Bootstrap 5.3; tertiary-bg is the
207
+ // color-mode-aware token for this kind of muted surface.
208
+ background-color: var(--#{$prefix}tertiary-bg);
207
209
  }
208
210
  }
209
211
 
@@ -1,3 +1,5 @@
1
+ @use "sass:map";
2
+
1
3
  //
2
4
  // Component: Info Box
3
5
  //
@@ -11,7 +13,7 @@
11
13
  width: 100%;
12
14
  min-height: 80px;
13
15
  padding: .5rem;
14
- margin-bottom: map-get($spacers, 3);
16
+ margin-bottom: map.get($spacers, 3);
15
17
  color: var(--#{$prefix}body-color);
16
18
  background-color: var(--#{$prefix}body-bg);
17
19
 
@@ -1,3 +1,5 @@
1
+ @use "sass:map";
2
+
1
3
  //
2
4
  // Component: Progress Bar
3
5
  //
@@ -40,7 +42,7 @@
40
42
  }
41
43
 
42
44
  .progress-group {
43
- margin-bottom: map-get($spacers, 2);
45
+ margin-bottom: map.get($spacers, 2);
44
46
  }
45
47
 
46
48
  // size variation
@@ -1,3 +1,5 @@
1
+ @use "sass:map";
2
+
1
3
  //
2
4
  // Component: Table
3
5
  //
@@ -56,11 +58,11 @@
56
58
  tbody > tr > th,
57
59
  tbody > tr > td {
58
60
  &:first-of-type {
59
- padding-left: map-get($spacers, 4);
61
+ padding-left: map.get($spacers, 4);
60
62
  }
61
63
 
62
64
  &:last-of-type {
63
- padding-right: map-get($spacers, 4);
65
+ padding-right: map.get($spacers, 4);
64
66
  }
65
67
  }
66
68
  }