diff --git a/CHANGELOG.md b/CHANGELOG.md index c33021e..90f5ecb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -All notable changes to **adminlte-react** are documented in this file. +All notable changes to **@colorlib/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). @@ -112,7 +112,7 @@ Next.js App Router and React Server Components. - Built with `tsup` to dual ESM + CJS with type declarations and source maps. The published bundle is tagged `"use client"` so it works under the App Router; the - AdminLTE stylesheet ships under the `adminlte-react/css` export. + AdminLTE stylesheet ships under the `@colorlib/adminlte-react/css` export. - Heavy third-party libraries are never bundled eagerly — they load via dynamic `import()` inside the components that use them. diff --git a/CLAUDE.md b/CLAUDE.md index 50abb19..a6bc235 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,9 +4,9 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## What this is -`adminlte-react` — an AdminLTE 4 / Bootstrap 5.3 component library built for Next.js 14+ App Router (React Server Components). **The repo root _is_ the library** (the published npm package). It's also a small pnpm workspace: the root package is the library, and `demo/` is a Next.js 14 App Router app that dogfoods it via `"adminlte-react": "workspace:*"` (pnpm symlinks `demo/node_modules/adminlte-react` → repo root). +`@colorlib/adminlte-react` — an AdminLTE 4 / Bootstrap 5.3 component library built for Next.js 14+ App Router (React Server Components). **The repo root _is_ the library** (the published npm package). It's also a small pnpm workspace: the root package is the library, and `demo/` is a Next.js 14 App Router app that dogfoods it via `"@colorlib/adminlte-react": "workspace:*"` (pnpm symlinks `demo/node_modules/adminlte-react` → repo root). -- Root (`src/`, `package.json` named `adminlte-react`, `tsup.config.ts`, `dist/`) — the publishable library +- Root (`src/`, `package.json` named `@colorlib/adminlte-react`, `tsup.config.ts`, `dist/`) — the publishable library - `demo/` — demo + dev playground; consumes the library through the workspace link There is no test framework configured. `pnpm lint` runs ESLint (`eslint.config.mjs`: typescript-eslint + react-hooks) over `src/`; `pnpm type-check` (`tsc --noEmit`) is the strict type gate. Both pass clean — keep them that way. @@ -74,7 +74,7 @@ Heavy third-party libs are **never** statically imported. Each wrapper component `next` is declared an **optional** peer dependency, but `layout/sidebar-nav.tsx` imports `usePathname` from `next/navigation` for active-link detection — so the sidebar in practice requires Next. Navigation uses plain `` (full page loads), not `next/link`. ### What the library ships vs. what the consumer provides -The library ships JS + **only** `dist/css/adminlte.css` (import via `'adminlte-react/css'`). Everything else is the consumer's responsibility, loaded via CDN in `demo/app/layout.tsx`: **Bootstrap JS bundle** (required for dropdowns/modals — the library does not bundle it), Popper, OverlayScrollbars, Bootstrap Icons, Source Sans 3 font, and the plugin CSS (ApexCharts, jsVectorMap, Tabulator). When adding a component that needs runtime JS or CSS the library doesn't bundle, document the CDN/import requirement and mirror it in the demo's root layout. +The library ships JS + **only** `dist/css/adminlte.css` (import via `'@colorlib/adminlte-react/css'`). Everything else is the consumer's responsibility, loaded via CDN in `demo/app/layout.tsx`: **Bootstrap JS bundle** (required for dropdowns/modals — the library does not bundle it), Popper, OverlayScrollbars, Bootstrap Icons, Source Sans 3 font, and the plugin CSS (ApexCharts, jsVectorMap, Tabulator). When adding a component that needs runtime JS or CSS the library doesn't bundle, document the CDN/import requirement and mirror it in the demo's root layout. ### Demo route groups `demo/app` uses route groups: `(dashboard)` (main shell via `demo/components/demo-layout.tsx`, which wraps `DashboardLayout` with shared brand/user/topbar), `(auth)` (login/register via `AuthLayout`), `(fullpage)` (layout-flag demos: fixed header/sidebar/footer, RTL, mini, etc.). diff --git a/README.md b/README.md index cb68728..797e5f9 100644 --- a/README.md +++ b/README.md @@ -60,9 +60,9 @@ A modern React/Next.js component library for building admin dashboards and web a ## Installation ```bash -npm install adminlte-react +npm install @colorlib/adminlte-react # or -pnpm add adminlte-react +pnpm add @colorlib/adminlte-react ``` ### Peer Dependencies @@ -104,7 +104,7 @@ for the full matrix. ```tsx // app/layout.tsx -import 'adminlte-react/css' +import '@colorlib/adminlte-react/css' import 'bootstrap-icons/font/bootstrap-icons.css' import './globals.css' @@ -135,7 +135,7 @@ export default function RootLayout({ children }) { ```tsx // app/(dashboard)/layout.tsx -import { DashboardLayout } from 'adminlte-react' +import { DashboardLayout } from '@colorlib/adminlte-react' import { menuItems } from '@/lib/menu' export default function Layout({ children }) { @@ -156,7 +156,7 @@ export default function Layout({ children }) { ```ts // lib/menu.ts -import type { MenuNode } from 'adminlte-react' +import type { MenuNode } from '@colorlib/adminlte-react' export const menuItems: MenuNode[] = [ { @@ -189,7 +189,7 @@ export const menuItems: MenuNode[] = [ ```tsx // app/(dashboard)/page.tsx -import { AppContent, SmallBox, Card, Progress } from 'adminlte-react' +import { AppContent, SmallBox, Card, Progress } from '@colorlib/adminlte-react' export default function Dashboard() { return ( @@ -289,7 +289,7 @@ Standalone hooks: ```tsx 'use client' -import { useSidebarContext, useColorModeContext } from 'adminlte-react' +import { useSidebarContext, useColorModeContext } from '@colorlib/adminlte-react' function Toolbar() { const { toggle } = useSidebarContext() @@ -320,7 +320,7 @@ All components use Bootstrap 5.3 utility classes. Customize via CSS variables or Full TypeScript support with exported types: ```tsx -import type { DashboardLayoutProps, MenuNode, BootstrapTheme } from 'adminlte-react' +import type { DashboardLayoutProps, MenuNode, BootstrapTheme } from '@colorlib/adminlte-react' const props: DashboardLayoutProps = { menuItems: [], @@ -368,65 +368,65 @@ Contributions are welcome! Open an issue or pull request on ## Upgrade to a Premium Dashboard -Need advanced features, more pages, and dedicated support? Explore Colorlib's collection of professional admin templates on [DashboardPack](https://dashboardpack.com/?utm_source=github&utm_medium=readme&utm_campaign=adminlte-react). +Need advanced features, more pages, and dedicated support? Explore Colorlib's collection of professional admin templates on [DashboardPack](https://dashboardpack.com/?utm_source=github&utm_medium=readme&utm_campaign=@colorlib/adminlte-react).
-
+
- Apex Dashboard + Apex Dashboard Next.js 16 + React 19 + Tailwind CSS v4 + shadcn/ui. 5 dashboard variants, 20+ app pages, 125+ routes, full CRUD. |
-
+
- Zenith Dashboard + Zenith Dashboard Next.js 16 + React 19 + Tailwind CSS v4 + shadcn/ui. Achromatic design, 50+ pages, 6 dashboards, live theme customizer. |
-
+
- Haze + Haze Nuxt 4 + Nuxt UI v4 + Tailwind CSS v4. 92+ pages, 7 layouts, 5 dashboards, RTL, i18n, mock API layer. |
-
+
- TailPanel + TailPanel React + TypeScript + Tailwind CSS + Vite. 9 dashboard designs, dark and light themes. |
-
+
- Admindek + Admindek Bootstrap 5 + vanilla JS. 100+ components, dark/light modes, RTL support, 10 color presets. |
-
+
- SvelteForge Premium + SvelteForge Premium SvelteKit + Tailwind CSS v4. 30+ wired-up modules, multi-tenant from row zero, dark/light/system mode. |
@@ -434,7 +434,7 @@ Need advanced features, more pages, and dedicated support? Explore Colorlib's co
- View All Premium Templates → + View All Premium Templates →
## License diff --git a/demo/app/(auth)/examples/login-v2/page.tsx b/demo/app/(auth)/examples/login-v2/page.tsx index 2846f89..a1d249a 100644 --- a/demo/app/(auth)/examples/login-v2/page.tsx +++ b/demo/app/(auth)/examples/login-v2/page.tsx @@ -1,4 +1,4 @@ -import { AuthLayout } from 'adminlte-react' +import { AuthLayout } from '@colorlib/adminlte-react' import { DemoForm } from '@/components/demo-form' export const metadata = { title: "Login v2" } diff --git a/demo/app/(auth)/examples/login/page.tsx b/demo/app/(auth)/examples/login/page.tsx index a0d4df1..3b1cb34 100644 --- a/demo/app/(auth)/examples/login/page.tsx +++ b/demo/app/(auth)/examples/login/page.tsx @@ -1,4 +1,4 @@ -import { AuthLayout } from 'adminlte-react' +import { AuthLayout } from '@colorlib/adminlte-react' import { DemoForm } from '@/components/demo-form' export const metadata = { title: "Login" } diff --git a/demo/app/(auth)/examples/register-v2/page.tsx b/demo/app/(auth)/examples/register-v2/page.tsx index 4693458..32e1027 100644 --- a/demo/app/(auth)/examples/register-v2/page.tsx +++ b/demo/app/(auth)/examples/register-v2/page.tsx @@ -1,4 +1,4 @@ -import { AuthLayout } from 'adminlte-react' +import { AuthLayout } from '@colorlib/adminlte-react' import { DemoForm } from '@/components/demo-form' export const metadata = { title: "Register v2" } diff --git a/demo/app/(auth)/examples/register/page.tsx b/demo/app/(auth)/examples/register/page.tsx index 8c72727..68e2a66 100644 --- a/demo/app/(auth)/examples/register/page.tsx +++ b/demo/app/(auth)/examples/register/page.tsx @@ -1,4 +1,4 @@ -import { AuthLayout } from 'adminlte-react' +import { AuthLayout } from '@colorlib/adminlte-react' import { DemoForm } from '@/components/demo-form' export const metadata = { title: "Register" } diff --git a/demo/app/(dashboard)/UI/general/page.tsx b/demo/app/(dashboard)/UI/general/page.tsx index 2ddf8b8..3e1dca5 100644 --- a/demo/app/(dashboard)/UI/general/page.tsx +++ b/demo/app/(dashboard)/UI/general/page.tsx @@ -1,5 +1,5 @@ import type { CSSProperties } from 'react' -import { AppContent } from 'adminlte-react' +import { AppContent } from '@colorlib/adminlte-react' import { ReactWidgetsDemo } from '@/components/react-widgets-demo' export const metadata = { title: "General UI" } @@ -14,7 +14,7 @@ export default function Page() { ]} >Typed, state-driven components from the adminlte-react library — no jQuery, no Bootstrap JS required.
Typed, state-driven components from the @colorlib/adminlte-react library — no jQuery, no Bootstrap JS required.
onHide callbacks fire on Bootstrap's modal
events.
- CommandItem[].
- Read and control the sidebar (desktop collapse + mobile off-canvas).
Open or close the ⌘K command palette programmatically.
- adminlte-react packages the AdminLTE 4 admin theme (built on Bootstrap
+ @colorlib/adminlte-react packages the AdminLTE 4 admin theme (built on Bootstrap
5.3) as a set of typed React components: a full dashboard shell, widgets, form
controls, and tool components. It is designed for the Next.js App Router and React
Server Components, but works in any React 18+ application.
diff --git a/demo/app/(dashboard)/docs/layout/page.tsx b/demo/app/(dashboard)/docs/layout/page.tsx
index cf93321..74d27fd 100644
--- a/demo/app/(dashboard)/docs/layout/page.tsx
+++ b/demo/app/(dashboard)/docs/layout/page.tsx
@@ -81,7 +81,7 @@ export default function LayoutDocsPage() {
These docs cover installation, the layout shell, theming, the dynamic-import
diff --git a/demo/app/(dashboard)/docs/plugins/page.tsx b/demo/app/(dashboard)/docs/plugins/page.tsx
index ee8e65b..e244c1b 100644
--- a/demo/app/(dashboard)/docs/plugins/page.tsx
+++ b/demo/app/(dashboard)/docs/plugins/page.tsx
@@ -71,7 +71,7 @@ export default function PluginsPage() {
load once (CDN or a bundler import). Libraries marked Required are listed
as external in the build, so you must install the npm
package for the JavaScript to resolve. Libraries marked Bundled ship inside{' '}
- adminlte-react's code-split chunks — installing them is optional
+ @colorlib/adminlte-react's code-split chunks — installing them is optional
for the JS, but you still need their CSS.