admin-lte 4.2.0 → 4.4.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 (63) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/README.md +18 -1
  3. package/dist/css/adminlte-colors.css +1261 -0
  4. package/dist/css/adminlte-colors.css.map +1 -0
  5. package/dist/css/adminlte-colors.min.css +15 -0
  6. package/dist/css/adminlte-colors.min.css.map +1 -0
  7. package/dist/css/adminlte-colors.rtl.css +1260 -0
  8. package/dist/css/adminlte-colors.rtl.css.map +1 -0
  9. package/dist/css/adminlte-colors.rtl.min.css +15 -0
  10. package/dist/css/adminlte-colors.rtl.min.css.map +1 -0
  11. package/dist/css/adminlte-docs.css +1 -1
  12. package/dist/css/adminlte-docs.css.map +1 -1
  13. package/dist/css/adminlte-docs.min.css +1 -1
  14. package/dist/css/adminlte-docs.min.css.map +1 -1
  15. package/dist/css/adminlte-docs.rtl.css +1 -1
  16. package/dist/css/adminlte-docs.rtl.css.map +1 -1
  17. package/dist/css/adminlte-docs.rtl.min.css +1 -1
  18. package/dist/css/adminlte-docs.rtl.min.css.map +1 -1
  19. package/dist/css/adminlte-select2.css +329 -0
  20. package/dist/css/adminlte-select2.css.map +1 -0
  21. package/dist/css/adminlte-select2.min.css +12 -0
  22. package/dist/css/adminlte-select2.min.css.map +1 -0
  23. package/dist/css/adminlte-select2.rtl.css +328 -0
  24. package/dist/css/adminlte-select2.rtl.css.map +1 -0
  25. package/dist/css/adminlte-select2.rtl.min.css +12 -0
  26. package/dist/css/adminlte-select2.rtl.min.css.map +1 -0
  27. package/dist/css/adminlte.css +323 -19
  28. package/dist/css/adminlte.css.map +1 -1
  29. package/dist/css/adminlte.min.css +2 -2
  30. package/dist/css/adminlte.min.css.map +1 -1
  31. package/dist/css/adminlte.rtl.css +323 -19
  32. package/dist/css/adminlte.rtl.css.map +1 -1
  33. package/dist/css/adminlte.rtl.min.css +2 -2
  34. package/dist/css/adminlte.rtl.min.css.map +1 -1
  35. package/dist/js/adminlte.esm.js +231 -81
  36. package/dist/js/adminlte.esm.js.map +1 -1
  37. package/dist/js/adminlte.esm.min.js +2 -2
  38. package/dist/js/adminlte.esm.min.js.map +1 -1
  39. package/dist/js/adminlte.js +231 -80
  40. package/dist/js/adminlte.js.map +1 -1
  41. package/dist/js/adminlte.min.js +2 -2
  42. package/dist/js/adminlte.min.js.map +1 -1
  43. package/dist/js/types/adminlte.d.ts +2 -1
  44. package/dist/js/types/sidebar-search.d.ts +46 -0
  45. package/package.json +2 -1
  46. package/src/scss/_app-header.scss +49 -1
  47. package/src/scss/_app-sidebar.scss +22 -2
  48. package/src/scss/_mixins.scss +1 -0
  49. package/src/scss/_ribbon.scss +75 -0
  50. package/src/scss/_variables.scss +36 -0
  51. package/src/scss/_widgets.scss +192 -0
  52. package/src/scss/adminlte-colors.scss +35 -0
  53. package/src/scss/adminlte-docs.scss +1 -1
  54. package/src/scss/adminlte-select2.scss +31 -0
  55. package/src/scss/adminlte.scss +1 -1
  56. package/src/scss/colors/_colors.scss +159 -0
  57. package/src/scss/colors/_variables.scss +85 -0
  58. package/src/scss/compat/_select2.scss +476 -0
  59. package/src/scss/mixins/_search-field.scss +46 -0
  60. package/src/scss/parts/_extra-components.scss +2 -0
  61. package/src/ts/accessibility.ts +25 -13
  62. package/src/ts/adminlte.ts +3 -1
  63. package/src/ts/sidebar-search.ts +252 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,58 @@ All notable changes to AdminLTE will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [4.4.0] - 2026-08-18
9
+
10
+ ### Added
11
+
12
+ - **Extended colour palette (`dist/css/adminlte-colors.css`)** — an opt-in stylesheet (≈ 5 kB gzipped; `adminlte.css` is unchanged) that adds fourteen colours — orange, amber, olive, teal, sky, indigo, violet, fuchsia, pink, and the chrome neutrals navy, steel, slate, graphite, midnight — as `--bs-*` tokens plus every family Bootstrap generates for its own theme colours: `.bg-*`, `.text-bg-*`, `.text-*`, `.border-*`, `.link-*`, `.bg-gradient-*` (also for the eight theme colours, as in v3), `.card-*` / `.card-outline`, `.callout-*`, `.direct-chat-*`, with the subtle/emphasis tokens for dark mode and a hover shade for `.btn.bg-*`. The palette is generated, not picked: in OKLCH, each chromatic colour is the lightest value whose white text still reaches 4.6:1 (WCAG AA), hues sit ≥ 17° from every Bootstrap theme colour and ≥ 20° from each other, chroma is capped at parity with `primary`, and the five neutrals are cool-tinted and sit at the lightness steps popular admin kits use for sidebars. `scripts/palette.mjs` regenerates it (`npm run palette`) and checks it (`--check`); a unit test keeps the Sass map and the demo data in step. Add your own with `$lte-palette-custom: ("brand": #hex)`, replace the set with `$lte-palette`, restore v3 names with `$lte-palette-aliases: ("lightblue": "sky", "maroon": "pink")`. Documented on the new **Colors** page (`docs/colors.html`) — palette, class families, 17 skin presets in four families (light, semi-dark, full dark, coloured & gradient) each with a layout thumbnail, widget-set presets, brand-colour recipe, design rules with a hue/chroma plot — and demonstrated on **UI → Colors** (`UI/colors.html`), which recolours its own sidebar and header live from thumbnail presets, shows the four dashboard sets and every component, and has a brand-colour checker that reports contrast, proposes a same-hue value that passes, and prints the Sass snippet (#6103, requested by @johnnyq).
13
+ - **Header search and sidebar filter restyled** — one shared treatment (`mixins/_search-field.scss`): a quiet pill with the icon inside as the submit button, coloured only from theme-relative tokens (`--bs-emphasis-color-rgb`, `--bs-body-color`), so it reads as soft glass on any coloured or dark header / sidebar and soft grey on a white one, instead of a boxed `.input-group` with an outline button that turned near-black under `data-bs-theme="dark"`. The header field widens slightly on focus; below `md` an icon links to the search page. New variables `$lte-search-field-*` (width, focus width, font size, padding, icon space); the Main Header docs snippet, which still showed v3's inert `data-widget="navbar-search"`, now shows the real markup.
14
+ - **Theme Customize (`generate/theme.html`)** offers the palette in its sidebar / navbar / footer pickers under "Extended palette", gained a preset row with the same thumbnails, reflects the page's current state on load, and defaults the colour mode to dark when a palette colour is picked; its three duplicated scripts are one controller.
15
+ - The Migration and Customization pages point to the palette; the migration guide maps every AdminLTE 3 colour and skin class to its v4 form.
16
+
17
+ ### Fixed
18
+
19
+ - **Sidebar taller than the viewport with the sidebar filter in place.** `.sidebar-wrapper` was sized with a hard-coded `100vh − header height`, which assumed only the brand sat above it; the `SidebarSearch` field added in 4.3.0 sits between the brand and the wrapper (on purpose, so it stays put while the menu scrolls), so the wrapper overflowed the sidebar by exactly the filter's height and the last menu items were cut off. `.app-sidebar` is now a flex column: brand and filter keep their size (`flex: 0 0 auto`), `.sidebar-wrapper` fills the rest (`flex: 1 1 auto; min-height: 0`) and scrolls — in fixed layouts, the `fixed-header`-only case, and the off-canvas sidebar. Anything else placed above or below the menu now sizes correctly too, without a height calc (#6104, reported by @dfsmania).
20
+
21
+ ## [4.3.1] - 2026-08-10
22
+
23
+ ### Fixed
24
+
25
+ - **Ribbons left the card corner bare.** The banner was centred on its clipping square, but the square's centre is the point *furthest* from the corner — so the banner sat too far into the card, left a large empty triangle at the corner it is supposed to cover, and had its label cut off by the clip. The banner's centre now sits on the corner's bisector at ~46% of the square's side, the proportion that leaves the label room and fills the corner, and the width is the chord across the corner rather than the square's diagonal. RTL mirrors as before.
26
+ - The ribbons demo uses short labels and states the constraint: the banner is clipped to the corner, so only about `64px` of it is readable at the default size. `.ribbon-lg` and `.ribbon-xl` give more room. Documented on the Miscellaneous components page.
27
+
28
+ ## [4.3.0] - 2026-08-10
29
+
30
+ ### Added
31
+
32
+ - **Gallery page (`pages/gallery.html`)** — a filterable media library: responsive tile grid, per-item action menus, a live result count and an empty state. It carries **no image library at all** — the tiles are a Bootstrap `.ratio` box plus `.object-fit-cover`, and the category filter is ~25 lines of page-local script, so nothing is added to `adminlte.js` and no CDN dependency is imposed on anyone who just wants the grid. A lightbox stays deliberately out of scope; it is the part that needs a dependency.
33
+ - **Search results page (`pages/search-results.html`)** — typed results (page / user / file / project, each with its own icon and badge) over a tabbed type filter, plus a refine panel, related searches, pagination and a worked "no results" state. The navbar search now posts to it with `name="q"` instead of `action="#"`, so the search added alongside `SidebarSearch` has a real destination.
34
+ - **Language menu in the app header** — a `bi-translate` dropdown listing five locales with the current one marked via `.active` + `aria-current`, and `hreflang` on each item. It is markup only, by design; the new **"A language switcher wired to a real locale"** recipe in the docs covers the four things that separate a working switcher from set dressing — real per-locale links rather than `#` plus a click handler, the locale living in the URL or a cookie rather than `localStorage` (the server has to know it *before* it renders), marking the current language for assistive tech, and serving `adminlte.rtl.css` alongside `dir="rtl"` when switching to an RTL locale.
35
+ - **`SidebarSearch` plugin** — a filter field above the sidebar menu (`data-lte-toggle="sidebar-search"` on an input, optional `data-lte-target` for the menu). Typing hides non-matching entries and expands whatever submenu holds a match; a group whose own name matches keeps its entire subtree, so expanding it is never a dead end. Clearing the field — `ESC`, the native clear button, or `clear()` — restores every entry *and* each submenu's previous open state, including the inline `display` Treeview's slide animation leaves behind. Entries are hidden with the `hidden` attribute rather than a class, so they leave the accessibility tree too. Fires `filtered.lte.sidebar-search` with `{ query, matches }`; both listeners are delegated on `document`, so a sidebar rendered after load needs no re-initialisation. Wired into every demo and docs page, and documented at `docs/javascript/sidebar-search.html`.
36
+ - **Navbar search** in the app header — a `role="search"` form with a visually-hidden label, shown from the `md` breakpoint up, posting to the new search results page.
37
+ - **Ribbons** (`.ribbon-wrapper` + `.ribbon`, sizes `.ribbon-lg` / `.ribbon-xl`) — the corner banner from v3, rebuilt. The wrapper clips the banner and the banner is centred on it before rotating, so the whole geometry follows one custom property (`--lte-ribbon-size`) and stays correct at every scale; the clip inherits the parent's corner radius, so it follows a rounded card instead of cutting a square out of it. Colour comes from a `.text-bg-*` utility and long labels truncate rather than breaking the shape. rtlcss mirrors both the corner and the rotation, so RTL needs no extra markup. New demo page at `UI/ribbons.html`.
38
+ - **Social and post widgets** (`.user-block`, `.post`, `.widget-user`, `.widget-user-2`, `.description-block`) — the profile cards and activity-feed blocks from v3, keeping their v3 class names so migrating markup works unchanged, but laid out with grid and flex rather than floats and coloured with Bootstrap utilities. `.user-block` renders avatar, name and meta from flat markup with no wrapper element. New demo page at `widgets/social.html`.
39
+ - **Nav tabs & pills, modal and offcanvas sections** on `UI/general.html` — the three Bootstrap components the components showcase did not yet cover.
40
+ - **Card and Miscellaneous documentation pages** (`docs/components/card.html`, `docs/components/miscellaneous.html`) — between them they document every AdminLTE component that ships CSS but had no reference until now: cards (anatomy, colour variants, states, tabbed cards, Sass variables), callouts, ribbons, small box, info box, timeline, the social/post widgets, progress-bar sizes, themed toasts and the image-size utilities.
41
+ - **Select2 compatibility theme (`dist/css/adminlte-select2.css`)** — an opt-in, **CSS-only** sheet for projects that can't drop Select2 yet. AdminLTE still bundles neither Select2 nor jQuery and nothing is added to `adminlte.css`; load this one extra stylesheet after `select2.css` and a Select2 you bring yourself inherits Bootstrap 5.3's form metrics (`.form-select-sm` / `-lg` on the original `<select>` are honoured), focus ring, `.is-invalid` / `.is-valid` states, input-group corner rounding, badge-style multi-select pills, and `data-bs-theme` dark mode — including the body-appended dropdown. It also raises the dropdown above `.modal`, which removes the usual need for `dropdownParent`. Source lives in `src/scss/compat/_select2.scss` for anyone compiling their own Sass; RTL and minified variants are generated alongside the rest of the CSS (#6097, requested by @saddam2512).
42
+ - **Third-party plugin replacement table** on the Migration page: every jQuery widget AdminLTE 3 bundled (Select2, DataTables, Summernote, iCheck, bootstrap-datepicker, jQuery Knob, Mapael, …) mapped to its vanilla-JS successor. The old plugin names were absent from the v4 docs entirely, so anyone searching for the plugin they knew found nothing and concluded it was unsupported.
43
+ - **Select2 → Tom Select API mapping**, on both the Advanced Elements demo page and the Integrations docs page: 19 options, methods and events translated one-to-one (`ajax` → `load` + `loadThrottle`, `templateResult` → `render.option`, `select2("destroy")` → `ts.destroy()`, and so on).
44
+ - **jsVectorMap** documented on the Integrations page as the dependency-free successor to AdminLTE 3's jQuery Mapael.
45
+ - **New FAQ entry, "Does AdminLTE 4 support Select2?"**, plus a pointer from the existing jQuery question to the replacement table. The Deployment asset table and the RTL page now list the optional Select2 sheet alongside the core builds, and the README's breaking-changes list links the replacement table.
46
+
47
+ ### Changed
48
+
49
+ - **Removed the dead `src/html/components/docs/faq.mdx`.** The docs FAQ has been rendered from the typed `sections` array in `src/html/pages/docs/faq.astro` since the accordion rewrite, and nothing imported the `.mdx` any more — but two later commits kept editing it, so those edits silently did nothing. It is the only docs `.mdx` with no importer; every other one is rendered by its matching `pages/docs/*.astro`.
50
+ - **The remote-data Tom Select demo in `forms/advanced.html` is now the real pattern**, not a `setTimeout` sketch: request debouncing via `loadThrottle`, in-flight cancellation via `AbortController`, and page-by-page loading through the `virtual_scroll` plugin against a 72-record stub whose `{ results, next }` response shape matches a real endpoint — swap the stub body for a single `fetch()` and it works unchanged. The single select also gained the `clear_button` plugin.
51
+ - **The axe gate covers 16 pages** (from 10), adding `UI/general.html`, `UI/ribbons.html`, `widgets/social.html`, `pages/gallery.html`, `pages/search-results.html` and `docs/components/miscellaneous.html`. Unit tests are up to 62 (from 51). The two new pages needed three Bootstrap-default contrast fixes the gate caught: `.text-secondary` under 4.5:1 on the tertiary page ground, the nav-tab link blue under it on the same ground (the tabs moved onto the card surface, which is the documented `.card-tabs` shape), and `.btn-outline-secondary` under it on a card footer.
52
+ - **Outline buttons on `UI/general.html` are demonstrated where they are legible.** The warning, info and light outline variants draw their text in a light colour that falls below 4.5:1 on a light surface — adding the page to the axe gate surfaced it. They now sit on a dark panel, with a note saying why, which is also the guidance Bootstrap gives for them.
53
+ - **Bundlewatch budgets raised** for the ribbon, widget and SidebarSearch additions: `adminlte.min.css` 42.5 → 43.5 kB and `adminlte.min.js` 7.5 → 8.5 kB gzip (and the matching RTL/ESM/unminified entries).
54
+
55
+ ### Fixed
56
+
57
+ - **Dashboard v2 linked to a page that does not exist.** Seven order-number links in `index2.html` pointed at `pages/examples/invoice.html`; the invoice page is at `pages/invoice.html`. Caught by a new link-resolution pass over every built page.
58
+ - **`#navigation` no longer resolves to the app header.** `ensureSkipTargets()` looked its two skip-link targets up with a single selector list each (`#navigation, nav, [role="navigation"]`), but a selector list resolves in *document order* rather than by which selector matched — so on every demo page, where the header `<nav>` precedes the sidebar menu that already carries `id="navigation"`, the header was stamped with the id a second time. That left a duplicate id in the document, pointed the "Skip to navigation" link at the header instead of the menu, and silently redirected any application code doing `document.querySelector("#navigation")` to the wrong element. An element the page already gave the id to now always wins.
59
+
8
60
  ## [4.2.0] - 2026-08-06
9
61
 
10
62
  ### Added
package/README.md CHANGED
@@ -113,6 +113,21 @@ The v4 line is a ground-up rewrite on Bootstrap 5.3 with **no jQuery**: 18 new d
113
113
  a documentation overhaul, and major dependency upgrades. See the
114
114
  [CHANGELOG](CHANGELOG.md) for full details.
115
115
 
116
+ ### New in 4.3
117
+
118
+ - **Sidebar search** — a new `SidebarSearch` plugin filters the menu as you type, expanding
119
+ whatever submenu holds a match and restoring the menu exactly as it was when cleared.
120
+ Paired with a navbar search in the app header.
121
+ - **Ribbons** — corner banners (`.ribbon-wrapper` + `.ribbon`) in three sizes, mirrored
122
+ automatically in RTL, with the clip following the card's corner radius.
123
+ - **Social & post widgets** — `.user-block`, `.post`, `.widget-user`, `.widget-user-2` and
124
+ `.description-block`, laid out with grid and flex.
125
+ - **Three new demo pages** — Gallery (filterable media library, no image library required),
126
+ Search Results (typed results with a refine panel), and Ribbons.
127
+ - **Nav tabs, modals and offcanvas** added to the General UI Elements showcase.
128
+ - **Card and Miscellaneous docs pages**, plus a language switcher recipe — every component
129
+ that ships CSS now has a reference page.
130
+
116
131
  <details>
117
132
  <summary>Highlights</summary>
118
133
 
@@ -128,7 +143,7 @@ a documentation overhaul, and major dependency upgrades. See the
128
143
 
129
144
  - New pages: Getting Started, Customization & Theming, RTL Support, Migration from v3, Layout Blueprint, Recipes, Deployment & Performance, Recommended Integrations, JavaScript Plugins Overview
130
145
  - Rewritten Introduction with four labelled install paths (CDN / npm / source / Composer)
131
- - FAQ rebuilt with hero, live search, section chips, and an accordion of 19 questions
146
+ - FAQ rebuilt with hero, live search, section chips, and an accordion of 23 questions
132
147
  - Split sidebar navigation: dashboard demo and docs each have their own nav
133
148
 
134
149
  **Major dependency upgrades**
@@ -145,6 +160,8 @@ a documentation overhaul, and major dependency upgrades. See the
145
160
  - Data attributes: `data-toggle` → `data-bs-toggle`, `data-widget="pushmenu"` → `data-lte-toggle="sidebar"`, `data-widget="treeview"` → `data-lte-toggle="treeview"`
146
161
  - Dark mode: `.dark-mode` body class → `data-bs-theme="dark"` attribute (Bootstrap 5.3 native)
147
162
  - jQuery no longer required; plugins are vanilla TypeScript
163
+ - The bundled `plugins/` folder is gone — every v3 jQuery widget has a documented vanilla-JS successor ([replacement table](https://adminlte.io/themes/v4/docs/migration.html#third-party-plugin-replacements): Select2 → Tom Select, DataTables → Tabulator, Summernote → Quill, …)
164
+ - The v3 extra colours (`.bg-navy`, `.bg-teal`, the sidebar skins, …) live in an opt-in stylesheet, `dist/css/adminlte-colors.css` — fourteen redesigned colours, every one readable with white text, 17 skin presets, plus a one-line hook for your brand colour ([Colors docs](https://adminlte.io/themes/v4/docs/colors.html), [live demo](https://adminlte.io/themes/v4/UI/colors.html)). Nothing is added to `adminlte.css`.
148
165
 
149
166
  See the dedicated [Migration from v3](https://adminlte.io/themes/v4/docs/migration.html) guide.
150
167