mavi-dashboard 0.0.6 → 0.0.8

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.
package/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # mavi-dashboard
2
+
3
+ Dashboard shell (sidebar, header, theme) built on `@heinricov/mavi-ui` and Tailwind CSS v4.
4
+
5
+ ## Vite setup
6
+
7
+ Styles are generated when Tailwind scans this package’s sources. Your app **must** use the Tailwind Vite plugin and a compatible Tailwind v4 stack.
8
+
9
+ 1. Install dev dependencies:
10
+
11
+ ```bash
12
+ npm i -D vite @vitejs/plugin-react tailwindcss @tailwindcss/vite
13
+ ```
14
+
15
+ 2. Register the plugin in `vite.config.ts`:
16
+
17
+ ```ts
18
+ import tailwindcss from "@tailwindcss/vite"
19
+ import react from "@vitejs/plugin-react"
20
+ import { defineConfig } from "vite"
21
+
22
+ export default defineConfig({
23
+ plugins: [react(), tailwindcss()],
24
+ })
25
+ ```
26
+
27
+ 3. `DashboardLayout` pulls in `@heinricov/mavi-ui/globals.css` from the sidebar. Ensure you render `DashboardLayout` (or import that CSS once in your entry file).
28
+
29
+ 4. If you use Tailwind utility classes in **your own** `src/` files, add a local stylesheet (e.g. `src/app.css`) imported from `main.tsx`:
30
+
31
+ ```css
32
+ @source "./**/*.{tsx,ts}";
33
+ ```
34
+
35
+ Without `@tailwindcss/vite`, or without scanning `mavi-dashboard` sources (fixed in `@heinricov/mavi-ui` ≥ 0.0.2), the layout will look unstyled.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mavi-dashboard",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "React dashboard layout with sidebar, header, and theme shell",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -24,13 +24,14 @@
24
24
  },
25
25
  "types": "./src/dashboard/index.ts",
26
26
  "files": [
27
- "src"
27
+ "src",
28
+ "README.md"
28
29
  ],
29
30
  "scripts": {
30
31
  "typecheck": "tsc --noEmit"
31
32
  },
32
33
  "dependencies": {
33
- "@heinricov/mavi-ui": "^0.0.1"
34
+ "@heinricov/mavi-ui": "^0.0.2"
34
35
  },
35
36
  "peerDependencies": {
36
37
  "lucide-react": "^1.8.0",
@@ -9,6 +9,7 @@ import {
9
9
  SidebarFooter,
10
10
  SidebarHeader,
11
11
  SidebarRail,
12
+ SidebarSeparator,
12
13
  } from "@heinricov/mavi-ui/components/sidebar"
13
14
  import { NavBrand } from "./nav-brand"
14
15
  import { NavDefault } from "./nav-default"
@@ -27,7 +27,7 @@ export function NavDefault({
27
27
  return (
28
28
  <>
29
29
  {navMenuItems.map((group, index) => (
30
- <SidebarGroup key={`${group.label}-${index}`} className="">
30
+ <SidebarGroup key={`${group.label}-${index}`} className="-ml-2">
31
31
  <SidebarGroupLabel>{group.label}</SidebarGroupLabel>
32
32
  <SidebarMenu>
33
33
  {group.items.map((item, itemIndex) => (
@@ -83,7 +83,7 @@ export function NavMenuGroup({
83
83
  activePathname?: string
84
84
  }) {
85
85
  return (
86
- <SidebarGroup>
86
+ <SidebarGroup className="mt-2">
87
87
  <SidebarGroupLabel>{group.label}</SidebarGroupLabel>
88
88
  <SidebarMenu>
89
89
  {group.items.map((item, itemIndex) => {