adminium 1.0.1 → 1.0.2

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 CHANGED
@@ -1,21 +1,33 @@
1
- # @metronic/ui
1
+ # Adminium
2
2
 
3
- A beautiful, reusable React component library built with Tailwind CSS, based on
4
- the Metronic theme design system.
3
+ A beautiful, reusable React component library built with Tailwind CSS v4, based
4
+ on the Metronic theme design system.
5
5
 
6
6
  ## Features
7
7
 
8
- - 🎨 **25+ UI Components** - Buttons, Cards, Dialogs, Forms, Tables, and more
9
- - 🌙 **Dark Mode Support** - Built-in light and dark mode theming
10
- - 📦 **Tree Shakeable** - Only import what you need
11
- - 💪 **TypeScript** - Full type definitions included
12
- - 🎯 **Tailwind CSS v4** - Modern CSS with CSS variables
13
- - ⚡ **Radix UI Primitives** - Accessible and unstyled components
8
+ - UI Components - Buttons, Cards, Dialogs, Forms, Tables, and more
9
+ - Dark Mode Support - Built-in light and dark mode theming
10
+ - Tree Shakeable - Only import what you need
11
+ - TypeScript - Full type definitions included
12
+ - Tailwind CSS v4 - Modern CSS with CSS variables
13
+ - Radix UI Primitives - Accessible and unstyled components
14
+ - CVA Variants - Type-safe component variants with Class Variance Authority
15
+
16
+ ## Tech Stack
17
+
18
+ - React 19+ / TypeScript 5.8
19
+ - Tailwind CSS v4 (CSS variables approach)
20
+ - Radix UI primitives
21
+ - Storybook 10 with Vitest integration
22
+ - TSUP for bundling
23
+ - Next.js 16 for demo app
14
24
 
15
25
  ## Installation
16
26
 
17
27
  ```bash
18
- npm install @metronic/ui
28
+ npm install adminium
29
+ # or
30
+ yarn add adminium
19
31
  ```
20
32
 
21
33
  ### Peer Dependencies
@@ -28,19 +40,22 @@ npm install react react-dom tailwindcss
28
40
 
29
41
  ## Quick Start
30
42
 
31
- ### 1. Import the theme CSS
43
+ ### 1. Import styles (choose one approach)
32
44
 
33
- Add the theme CSS to your global styles or root layout:
45
+ If your app already uses Tailwind (recommended), import the library styles into
46
+ your global CSS so Tailwind can generate both your app utilities and the library
47
+ utilities:
34
48
 
35
- ```tsx
36
- // In your root layout or _app.tsx
37
- import "@metronic/ui/styles";
49
+ ```css
50
+ @import "tailwindcss";
51
+ @import "adminium/styles/global.css";
38
52
  ```
39
53
 
40
- Or import directly in your CSS:
54
+ If you do not use Tailwind in the host app, import the precompiled CSS instead
55
+ (your app won't have Tailwind utilities like `lg:flex`):
41
56
 
42
- ```css
43
- @import "@metronic/ui/src/styles/theme.css";
57
+ ```tsx
58
+ import "adminium/styles/adminium.css";
44
59
  ```
45
60
 
46
61
  ### 2. Use the components
@@ -53,7 +68,7 @@ import {
53
68
  CardTitle,
54
69
  CardContent,
55
70
  Badge,
56
- } from "@metronic/ui";
71
+ } from "adminium";
57
72
 
58
73
  function App() {
59
74
  return (
@@ -62,7 +77,7 @@ function App() {
62
77
  <CardTitle>Welcome</CardTitle>
63
78
  </CardHeader>
64
79
  <CardContent>
65
- <p>Hello from Metronic UI!</p>
80
+ <p>Hello from Adminium UI!</p>
66
81
  <Button variant="primary" size="md">
67
82
  Get Started
68
83
  </Button>
@@ -117,7 +132,7 @@ function App() {
117
132
  ## Hooks
118
133
 
119
134
  ```tsx
120
- import { useIsMobile, useCopyToClipboard, useMounted } from "@metronic/ui";
135
+ import { useIsMobile, useCopyToClipboard, useMounted } from "adminium";
121
136
 
122
137
  // Detect mobile viewport
123
138
  const isMobile = useIsMobile();
@@ -132,7 +147,7 @@ const mounted = useMounted();
132
147
  ## Utility Functions
133
148
 
134
149
  ```tsx
135
- import { cn } from "@metronic/ui";
150
+ import { cn } from "adminium";
136
151
 
137
152
  // Merge Tailwind classes intelligently
138
153
  const className = cn("bg-primary text-white", isActive && "ring-2", className);
@@ -159,19 +174,56 @@ The library uses CSS custom properties for theming. Override them in your CSS:
159
174
  }
160
175
  ```
161
176
 
162
- ## Building the Package
177
+ ## Development
163
178
 
164
- ```bash
165
- # Install dependencies
166
- npm install
179
+ ### Commands
167
180
 
168
- # Build the package
169
- npm run build
181
+ ```bash
182
+ yarn run dev # Start Next.js development server
183
+ yarn run dev:lib # Watch mode for library development
184
+ yarn run build # Build library (tsup + PostCSS for CSS)
185
+ yarn run storybook # Start Storybook dev server on port 6006
186
+ yarn run lint # Run ESLint
187
+ yarn run format # Format with Prettier
188
+ yarn run typecheck # TypeScript type checking
189
+ ```
170
190
 
171
- # Development mode with watch
172
- npm run dev
191
+ ### Folder Structure
192
+
193
+ ```text
194
+ src/
195
+ ├── components/
196
+ │ ├── Button/
197
+ │ │ ├── button.tsx # Component implementation
198
+ │ │ └── Button.stories.ts # Storybook stories
199
+ │ ├── Card/
200
+ │ │ ├── Card.tsx
201
+ │ │ └── Card.stories.tsx
202
+ │ ├── [ComponentName]/ # Each component follows this pattern
203
+ │ └── index.ts # Barrel export for all components
204
+ ├── hooks/
205
+ │ ├── use-mobile.tsx
206
+ │ ├── use-copy-to-clipboard.ts
207
+ │ ├── use-mounted.ts
208
+ │ └── index.ts
209
+ ├── lib/
210
+ │ └── utils.ts # cn() utility
211
+ ├── styles/
212
+ │ ├── global.css # Main CSS entry
213
+ │ └── config.reui.css # Theme CSS variables
214
+ └── index.ts # Main library entry point
173
215
  ```
174
216
 
217
+ ### Build Output
218
+
219
+ - **ESM**: `dist/index.js`
220
+ - **CJS**: `dist/index.cjs`
221
+ - **Types**: `dist/index.d.ts`
222
+ - **CSS**: `dist/styles/adminium.css`
223
+
224
+ The build automatically adds `"use client"` directive to the bundled output for
225
+ Next.js compatibility.
226
+
175
227
  ## License
176
228
 
177
229
  MIT