admin-lte 4.0.4 → 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 (57) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/css/adminlte-docs.css +878 -0
  3. package/dist/css/adminlte-docs.css.map +1 -0
  4. package/dist/css/adminlte-docs.min.css +7 -0
  5. package/dist/css/adminlte-docs.min.css.map +1 -0
  6. package/dist/css/adminlte-docs.rtl.css +877 -0
  7. package/dist/css/adminlte-docs.rtl.css.map +1 -0
  8. package/dist/css/adminlte-docs.rtl.min.css +7 -0
  9. package/dist/css/adminlte-docs.rtl.min.css.map +1 -0
  10. package/dist/css/adminlte.css +2 -782
  11. package/dist/css/adminlte.css.map +1 -1
  12. package/dist/css/adminlte.min.css +2 -2
  13. package/dist/css/adminlte.min.css.map +1 -1
  14. package/dist/css/adminlte.rtl.css +2 -782
  15. package/dist/css/adminlte.rtl.css.map +1 -1
  16. package/dist/css/adminlte.rtl.min.css +2 -2
  17. package/dist/css/adminlte.rtl.min.css.map +1 -1
  18. package/dist/js/adminlte.esm.js +1365 -0
  19. package/dist/js/adminlte.esm.js.map +1 -0
  20. package/dist/js/adminlte.esm.min.js +7 -0
  21. package/dist/js/adminlte.esm.min.js.map +1 -0
  22. package/dist/js/adminlte.js +391 -200
  23. package/dist/js/adminlte.js.map +1 -1
  24. package/dist/js/adminlte.min.js +2 -2
  25. package/dist/js/adminlte.min.js.map +1 -1
  26. package/dist/js/types/accessibility.d.ts +46 -0
  27. package/dist/js/types/adminlte.d.ts +9 -0
  28. package/dist/js/types/base-component.d.ts +36 -0
  29. package/dist/js/types/card-widget.d.ts +30 -0
  30. package/dist/js/types/color-mode.d.ts +56 -0
  31. package/dist/js/types/direct-chat.d.ts +19 -0
  32. package/dist/js/types/fullscreen.d.ts +21 -0
  33. package/dist/js/types/layout.d.ts +19 -0
  34. package/dist/js/types/push-menu.d.ts +102 -0
  35. package/dist/js/types/treeview.d.ts +27 -0
  36. package/dist/js/types/util/index.d.ts +42 -0
  37. package/package.json +32 -6
  38. package/src/scss/_app-header.scss +3 -1
  39. package/src/scss/_app-main.scss +4 -0
  40. package/src/scss/_app-sidebar.scss +3 -1
  41. package/src/scss/_bootstrap-overrides.scss +60 -0
  42. package/src/scss/_info-box.scss +3 -1
  43. package/src/scss/_progress-bars.scss +3 -1
  44. package/src/scss/_table.scss +4 -2
  45. package/src/scss/adminlte-docs.scss +25 -0
  46. package/src/scss/adminlte.scss +5 -4
  47. package/src/scss/pages/_login_and_register.scss +3 -1
  48. package/src/ts/adminlte.ts +3 -1
  49. package/src/ts/base-component.ts +84 -0
  50. package/src/ts/card-widget.ts +124 -100
  51. package/src/ts/color-mode.ts +174 -0
  52. package/src/ts/direct-chat.ts +38 -32
  53. package/src/ts/fullscreen.ts +32 -23
  54. package/src/ts/push-menu.ts +69 -36
  55. package/src/ts/treeview.ts +84 -50
  56. package/src/ts/util/index.ts +1 -1
  57. package/src/scss/_bootstrap-variables.scss +0 -1766
package/CHANGELOG.md CHANGED
@@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.1.0] - 2026-07-02
11
+
12
+ ### Added
13
+
14
+ - **ESM bundle and TypeScript declarations on npm:** `dist/js/adminlte.esm.js` (+ `.min`) ships alongside the UMD build, generated `.d.ts` files ship under `dist/js/types/`, and package.json gains `module`, `types`, and a full `exports` map (with `sass`/`style` conditions and `./dist/*` + `./src/scss/*` subpaths). `import { PushMenu } from "admin-lte"` now resolves natively in Vite/webpack and type-checks out of the box — previously the package shipped a single minified UMD file with no typings at all.
15
+ - **Component lifecycle API (Bootstrap-style):** every JS component now has `getInstance(element)`, `getOrCreateInstance(element, config?)` and `dispose()`, backed by a per-element WeakMap registry (instances are garbage-collected with their elements — Turbo-safe). The data API now uses **delegated document-level listeners**, so toggles inside content inserted after page load (AJAX partials, Turbo Frames) work without re-initialisation. `PushMenu` is finally controllable programmatically via `PushMenu.getInstance(sidebar)`.
16
+ - **`ColorMode` module in the bundle:** the light/dark/auto switcher (persisted in `lte-theme`, OS-preference aware, `[data-bs-theme-value]` data-API, `changed.lte.color-mode` event) is now part of `adminlte.js`. Applications no longer need to copy the demo's inline script; the demo pages now use the bundled module. Only the tiny no-flash snippet in `<head>` remains inline, by design.
17
+ - **`bootstrap` declared as a peer dependency** — the Sass source imports it, so `@use "admin-lte/src/scss/adminlte"` now works after a plain `npm install admin-lte` (npm installs the peer automatically). Documented the required Sass load-path setup.
18
+ - **New demo pages:** a blank **starter page** (the most-requested v3 page, absent from v4), a dedicated **ApexCharts** page with six chart types, and a **Users** management page (searchable directory table, add-user and delete-confirmation modals, pagination). All linked from the sidebar.
19
+ - **Test baseline:** a vitest + happy-dom unit suite (30 tests across the component lifecycle, card/treeview/push-menu behavior, ColorMode, and slide animations) wired into `npm run production`; plus `npm run test-a11y` — an axe-core check over key built demo pages that fails on serious/critical WCAG violations, with a dedicated GitHub workflow.
20
+
21
+ ### Fixed
22
+
23
+ - First findings of the new axe gate, fixed at the source: breadcrumb links now use the darker link shade (Bootstrap's default blue was 4.26:1 against the content-header's gray background — below WCAG AA's 4.5:1), the direct-chat message pane is keyboard-focusable (`tabindex="0"` + `role="log"`), and muted footnote text uses `text-body-secondary` instead of the failing `text-secondary`.
24
+
25
+ ### Changed
26
+
27
+ - **Component events overhauled (behavior change):** all plugin events are now bubbling `CustomEvent`s dispatched on the component's root element (the card, the nav item, the sidebar) — previously most were non-bubbling and card events fired on whatever was clicked, including the `<i>` icon. Animated actions gained cancelable "before" events (`collapse`/`expand`/`remove.lte.card-widget`, `expand`/`collapse.lte.treeview`, `open`/`collapse.lte.push-menu`) and their "after" events (`collapsed`, `expanded`, `removed`, `opened`, …) now fire when the animation completes, not when it starts. If you listened for card events on the tool buttons themselves, listen on the card or on `document` instead.
28
+ - **Docs styles split out of the production CSS:** the documentation/FAQ styling now compiles to a separate `adminlte-docs.css`, loaded only by the docs pages. Together with the 4.0.4 dedup, `adminlte.min.css` is down to ~40.4 KB gzip (from 46.7 KB in 4.0.3); bundlewatch budgets tightened accordingly.
29
+ - **Vendored Bootstrap variables fork replaced:** the 1,766-line `_bootstrap-variables.scss` copy (which had to be re-synced by hand every Bootstrap release) is gone; AdminLTE's ~10 actual changes now live in a small `_bootstrap-overrides.scss` loaded before Bootstrap's own variables. Compiled CSS is byte-identical.
30
+ - **Sass deprecation policy:** the build no longer silences all warnings (`--quiet`); it silences only dependency warnings and the known `@import` deprecation (`--quiet-deps --silence-deprecation=import`), so new deprecations in AdminLTE's own code surface at build time. All deprecated global built-ins (`map-get`, `map-keys`) migrated to the `sass:map` module. The full `@use` module-system migration is intentionally deferred until Bootstrap ships module-system Sass (Bootstrap 6) — Bootstrap 5's partials are designed around `@import`'s shared global namespace and cannot be loaded individually via `@use`.
31
+ - Rewrote the color-mode docs page around the bundled `ColorMode` module (the old copy-paste script it showed used a stale storage key); tsconfig.json no longer carries the invalid `"root": true` option.
32
+
10
33
  ## [4.0.4] - 2026-07-02
11
34
 
12
35
  ### Added