Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,36 @@ All notable changes to **@adminlte/react** are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.7.1] - 2026-11-17

### Changed

- **AdminLTE core upgraded to 4.10.2** (from 4.8.1), covering core [4.9.0](https://github.com/ColorlibHQ/AdminLTE/blob/master/CHANGELOG.md#490---2026-08-26) through [4.10.2](https://github.com/ColorlibHQ/AdminLTE/blob/master/CHANGELOG.md#4102---2026-11-16). The bundled stylesheet (`@adminlte/react/css`) now ships on **Bootstrap 5.3.9** and picks up:
- **Print defaults** (core 4.9.0 / 4.9.1) — a printed page is a document again: the header, sidebar and footer no longer print, the layout drops its viewport-sized `min-height` / `max-width` in print, and a page that ends near a sheet boundary no longer prints a blank trailing sheet. `data-lte-print="plain"` still works (and is now matched per token, so `"plain app"` sets both). Verified by printing demo pages to PDF.
- Every other core fix in the range that lives in CSS (contrast and dark-mode token fixes, mini-sidebar brand centring, Bootstrap 5.3.9's `.modal-xxl`, reduced-motion placeholders).
- The demo's `public/css/adminlte.rtl.css` was refreshed from core 4.10.2.
- The optional palette sheets (`adminlte-colors.css`, `adminlte-colors-v3.css`, `data-lte-primary`, `data-lte-contrast="aa"`) are unchanged in how you use them — see the README. Core's opt-in Select2 compat sheet (`adminlte-select2.css`) is irrelevant here (the port uses Tom Select).
- **Bootstrap JS 5.3.9** in the README, the install docs and the demo (CDN).
- **Pinned demo CDN libraries refreshed:** Bootstrap Icons 1.13.2, Source Sans 3 5.3.1, OverlayScrollbars 2.17.0, Tabulator 6.7.1, Tom Select 2.7.0, FullCalendar 7.1.5.
- **Dependencies refreshed to latest:** React / React DOM 19.3.1, Next.js 16.4.6, Chart.js 4.6.1, Tabulator 6.7.1, Tom Select 2.7.0, vitest 5.1 (major), jsdom 31 (major), tsup 9 (major), ESLint 10.15, typescript-eslint 8.73, Playwright 1.65.1, `@axe-core/playwright` 4.14, `@types/*`. `pnpm audit` now reports a single *low* advisory — Quill 2.0.3's HTML-export XSS, for which no patched release exists (Quill is an optional peer; the library never calls its HTML export).
- Peer dependency ranges are unchanged, so nothing consumers depend on narrowed.

### Added

- **`colorModeInitScript`** — an inline-script string that applies the persisted colour mode (`lte-theme`: `light` / `dark` / `auto`) to `<html data-bs-theme>` before first paint. Render it in `<head>` of your root layout (with `suppressHydrationWarning` on `<html>`) so dark-mode visitors no longer get a light flash on load. The demo does this.

### Fixed

- **`ColorModeProvider` applied and persisted the default mode before reading the saved one**, so a stored `dark` was briefly replaced by `auto` (and written back to `localStorage`) on every mount. It now waits until the saved mode has been loaded.

### Maintenance

- Verified: library build, type-check, lint (0 errors, 13 pre-existing warnings) and 26 unit tests; the CI RSC-boundary check (35 client modules in `src/` and `dist/`); demo type-check, production build and the `EXPORT=true` subpath export; **192 Playwright tests** against the production server (every route smoke-tested, 5 axe audits, every route again as a dark-mode visitor and at 390 px, chart canvas); a full light/dark × 1440/390 crawl of all 62 routes with zero console errors, failed same-origin requests or horizontal overflow; demo pages printed to PDF (no header/sidebar/footer, the invoice fits one sheet).
- Visual diff against the previous release at 1440 px: identical on the dashboards, forms and tables; the only change at 390 px is the topbar, which core 4.10.1 rebalanced to stop it overflowing.
- **TypeScript stays on 6.0.3** — `typescript-eslint` 8.73 still peers `typescript@<6.1.0`.
- **pnpm stays on 10.33.2** (`packageManager`) — the toolchain and CI are pinned to it; pnpm 12 was not adopted in this release.
- Demo Playwright config reads `PORT` / `PW_COMMAND` from the environment and no longer reuses an already-running server (it could silently test another project's build). New `layout.spec.ts`: every route is loaded as a dark-mode visitor (hydration must be clean, `data-bs-theme="dark"` set) and at 390 px (no horizontal overflow), plus a chart-canvas check.

## [0.7.0] - 2026-10-01

### Changed — breaking
Expand Down Expand Up @@ -300,6 +330,7 @@ Next.js App Router and React Server Components.
- Heavy third-party libraries are never bundled eagerly — they load via dynamic
`import()` inside the components that use them.

[0.7.1]: https://github.com/ColorlibHQ/adminlte-react/compare/v0.7.0...v0.7.1
[0.7.0]: https://github.com/ColorlibHQ/adminlte-react/compare/v0.6.1...v0.7.0
[0.6.1]: https://github.com/ColorlibHQ/adminlte-react/compare/v0.6.0...v0.6.1
[0.6.0]: https://github.com/ColorlibHQ/adminlte-react/compare/v0.5.0...v0.6.0
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ for the full matrix.

```tsx
// app/layout.tsx
import { colorModeInitScript } from '@adminlte/react'
import '@adminlte/react/css'
import 'bootstrap-icons/font/bootstrap-icons.css'
import './globals.css'
Expand All @@ -117,17 +118,19 @@ export const metadata = {

export default function RootLayout({ children }) {
return (
<html lang="en">
<html lang="en" suppressHydrationWarning>
<head>
{/* Optional: apply the saved dark/light mode before first paint (no flash) */}
<script dangerouslySetInnerHTML={{ __html: colorModeInitScript }} />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.css"
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.2/font/bootstrap-icons.css"
/>
</head>
<body>
{children}
{/* Bootstrap JS required for dropdowns, modals, etc */}
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.9/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
)
Expand Down
4 changes: 2 additions & 2 deletions demo/app/(dashboard)/docs/installation/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ export default function RootLayout({ children }: { children: React.ReactNode })
<head>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css"
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.2/font/bootstrap-icons.min.css"
/>
</head>
<body>
{children}
{/* Required for dropdowns, modals, tooltips, toasts */}
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" />
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.9/dist/js/bootstrap.bundle.min.js" />
</body>
</html>
)
Expand Down
6 changes: 3 additions & 3 deletions demo/app/(dashboard)/docs/plugins/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default function PluginsPage() {
filename="app/layout.tsx"
code={`<head>
{/* Tabulator (datatable) — Bootstrap 5 theme */}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tabulator-tables@6.5.2/dist/css/tabulator_bootstrap5.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tabulator-tables@6.7.1/dist/css/tabulator_bootstrap5.min.css" />
{/* jsVectorMap (world map) */}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jsvectormap@1.7.0/dist/jsvectormap.min.css" />
</head>`}
Expand All @@ -130,9 +130,9 @@ import 'flatpickr/dist/flatpickr.min.css'`}
</p>
<CodeBlock
filename="app/layout.tsx"
code={`<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/overlayscrollbars@2.16.0/styles/overlayscrollbars.min.css" />
code={`<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/overlayscrollbars@2.17.0/styles/overlayscrollbars.min.css" />
{/* ...at end of <body>: */}
<script src="https://cdn.jsdelivr.net/npm/overlayscrollbars@2.16.0/browser/overlayscrollbars.browser.es6.min.js" />`}
<script src="https://cdn.jsdelivr.net/npm/overlayscrollbars@2.17.0/browser/overlayscrollbars.browser.es6.min.js" />`}
/>
</DocsPage>
)
Expand Down
21 changes: 13 additions & 8 deletions demo/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import type { Metadata } from 'next'
import Script from 'next/script'
import { colorModeInitScript } from '@adminlte/react'
import '@adminlte/react/css'
import './globals.css'
import { SubpathLinks } from '@/components/subpath-links'
import { InertLinks } from '@/components/inert-links'
import { withBase } from '@/lib/base'

export const metadata: Metadata = {
metadataBase: new URL('https://adminlte.io/themes/next-react'),
Expand All @@ -14,6 +16,7 @@ export const metadata: Metadata = {
description:
'AdminLTE 4 + Bootstrap 5.3 admin dashboard components for React & Next.js (App Router / RSC) — 60+ demo pages, dark mode, and a ⌘K command palette.',
applicationName: 'AdminLTE React',
icons: { icon: withBase('/assets/img/AdminLTELogo.png') },
authors: [{ name: 'Colorlib', url: 'https://colorlib.com' }],
openGraph: {
title: 'AdminLTE React — Bootstrap 5 admin dashboard',
Expand All @@ -36,26 +39,28 @@ export default function RootLayout({
children: React.ReactNode
}) {
return (
<html lang="en">
<html lang="en" suppressHydrationWarning>
<head>
{/* Apply the saved colour mode before first paint (no light flash / no hydration flicker in dark mode) */}
<script dangerouslySetInnerHTML={{ __html: colorModeInitScript }} />
{/* Open the CDN connection early — every stylesheet below comes from it.
The crossOrigin variant covers the CORS-mode font file requests. */}
<link rel="preconnect" href="https://cdn.jsdelivr.net" />
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossOrigin="anonymous" />
{/* Source Sans 3 (AdminLTE's default typeface) */}
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@fontsource/source-sans-3@5.3.0/index.css"
href="https://cdn.jsdelivr.net/npm/@fontsource/source-sans-3@5.3.1/index.css"
/>
{/* Bootstrap Icons */}
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css"
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.2/font/bootstrap-icons.min.css"
/>
{/* OverlayScrollbars CSS */}
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/overlayscrollbars@2.16.0/styles/overlayscrollbars.min.css"
href="https://cdn.jsdelivr.net/npm/overlayscrollbars@2.17.0/styles/overlayscrollbars.min.css"
/>
{/* jsVectorMap CSS */}
<link
Expand All @@ -65,7 +70,7 @@ export default function RootLayout({
{/* Tabulator CSS (Bootstrap 5 theme) */}
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/tabulator-tables@6.5.2/dist/css/tabulator_bootstrap5.min.css"
href="https://cdn.jsdelivr.net/npm/tabulator-tables@6.7.1/dist/css/tabulator_bootstrap5.min.css"
/>
{/* Quill (rich-text editor) — Snow theme */}
<link
Expand All @@ -80,7 +85,7 @@ export default function RootLayout({
{/* Tom Select (advanced select) — Bootstrap 5 theme */}
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/tom-select@2.6.2/dist/css/tom-select.bootstrap5.min.css"
href="https://cdn.jsdelivr.net/npm/tom-select@2.7.0/dist/css/tom-select.bootstrap5.min.css"
/>
</head>
<body>
Expand All @@ -89,12 +94,12 @@ export default function RootLayout({
<InertLinks />
{/* Bootstrap JS (the bundle build already includes Popper) */}
<Script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js"
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.9/dist/js/bootstrap.bundle.min.js"
strategy="afterInteractive"
/>
{/* OverlayScrollbars JS */}
<Script
src="https://cdn.jsdelivr.net/npm/overlayscrollbars@2.16.0/browser/overlayscrollbars.browser.es6.min.js"
src="https://cdn.jsdelivr.net/npm/overlayscrollbars@2.17.0/browser/overlayscrollbars.browser.es6.min.js"
strategy="afterInteractive"
/>
</body>
Expand Down
2 changes: 1 addition & 1 deletion demo/components/calendar-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useEffect, useRef } from 'react'
// FullCalendar v7 no longer bundles CSS in the JS, and the theme is a separate
// plugin — the "classic" theme reproduces the pre-v7 look. Core must load
// before the theme script (the theme registers itself on the global).
const FC_BASE = 'https://cdn.jsdelivr.net/npm/fullcalendar@7.0.2'
const FC_BASE = 'https://cdn.jsdelivr.net/npm/fullcalendar@7.1.5'
const FC_SCRIPTS = [`${FC_BASE}/all/global.min.js`, `${FC_BASE}/themes/classic/global.min.js`]
const FC_STYLES = [
`${FC_BASE}/skeleton.min.css`,
Expand Down
2 changes: 1 addition & 1 deletion demo/components/kanban-board.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export function KanbanBoard() {
<div className="kanban-cards" data-lane-id="done">
<article className="kanban-card">
<span className="badge text-bg-primary mb-2"> feature </span>
<p className="fw-semibold mb-1 small">Upgrade to Bootstrap 5.3.8</p>
<p className="fw-semibold mb-1 small">Upgrade to Bootstrap 5.3.9</p>

<div className="d-flex justify-content-between align-items-center">
<div className="kanban-assignees">
Expand Down
22 changes: 11 additions & 11 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@
},
"dependencies": {
"@adminlte/react": "workspace:*",
"chart.js": "^4.5.1",
"chart.js": "^4.6.1",
"flatpickr": "^4.6.13",
"jsvectormap": "^1.7.0",
"next": "^16.3.1",
"next": "^16.4.6",
"quill": "^2.0.3",
"react": "^19.2.8",
"react-dom": "^19.2.8",
"react": "^19.3.1",
"react-dom": "^19.3.1",
"sortablejs": "^1.15.7",
"tabulator-tables": "^6.5.2",
"tom-select": "^2.6.2"
"tabulator-tables": "^6.7.1",
"tom-select": "^2.7.0"
},
"devDependencies": {
"@axe-core/playwright": "^4.13.0",
"@playwright/test": "^1.62.1",
"@types/node": "^26.2.0",
"@types/react": "^19.2.18",
"@types/react-dom": "^19.2.4",
"@axe-core/playwright": "^4.14.0",
"@playwright/test": "^1.65.1",
"@types/node": "^26.6.6",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@types/sortablejs": "^1.15.9",
"typescript": "^6.0.3"
}
Expand Down
7 changes: 4 additions & 3 deletions demo/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from '@playwright/test'

const PORT = 3210
// Override with PORT=… when other servers are running (never reuse a foreign server)
const PORT = Number(process.env.PORT) || 3210
const baseURL = `http://localhost:${PORT}`

/**
Expand All @@ -21,9 +22,9 @@ export default defineConfig({
headless: true,
},
webServer: {
command: `pnpm exec next dev -p ${PORT}`,
command: process.env.PW_COMMAND || `pnpm exec next dev -p ${PORT}`,
url: baseURL,
reuseExistingServer: true,
reuseExistingServer: false,
timeout: 120_000,
},
})
Loading
Loading