adminium 1.0.1-beta.7 → 1.0.1-patch.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.
- package/README.md +69 -23
- package/dist/styles/adminium.css +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,21 +1,33 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Adminium
|
|
2
2
|
|
|
3
|
-
A beautiful, reusable React component library built with Tailwind CSS, based
|
|
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
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
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
|
|
28
|
+
npm install adminium
|
|
29
|
+
# or
|
|
30
|
+
yarn add adminium
|
|
19
31
|
```
|
|
20
32
|
|
|
21
33
|
### Peer Dependencies
|
|
@@ -46,9 +58,6 @@ If you do not use Tailwind in the host app, import the precompiled CSS instead
|
|
|
46
58
|
import "adminium/styles/adminium.css";
|
|
47
59
|
```
|
|
48
60
|
|
|
49
|
-
If you need style isolation later, we can reintroduce a scoped build that
|
|
50
|
-
prefixes selectors with a wrapper class.
|
|
51
|
-
|
|
52
61
|
### 2. Use the components
|
|
53
62
|
|
|
54
63
|
```tsx
|
|
@@ -123,7 +132,7 @@ function App() {
|
|
|
123
132
|
## Hooks
|
|
124
133
|
|
|
125
134
|
```tsx
|
|
126
|
-
import { useIsMobile, useCopyToClipboard, useMounted } from "
|
|
135
|
+
import { useIsMobile, useCopyToClipboard, useMounted } from "adminium";
|
|
127
136
|
|
|
128
137
|
// Detect mobile viewport
|
|
129
138
|
const isMobile = useIsMobile();
|
|
@@ -138,7 +147,7 @@ const mounted = useMounted();
|
|
|
138
147
|
## Utility Functions
|
|
139
148
|
|
|
140
149
|
```tsx
|
|
141
|
-
import { cn } from "
|
|
150
|
+
import { cn } from "adminium";
|
|
142
151
|
|
|
143
152
|
// Merge Tailwind classes intelligently
|
|
144
153
|
const className = cn("bg-primary text-white", isActive && "ring-2", className);
|
|
@@ -165,19 +174,56 @@ The library uses CSS custom properties for theming. Override them in your CSS:
|
|
|
165
174
|
}
|
|
166
175
|
```
|
|
167
176
|
|
|
168
|
-
##
|
|
177
|
+
## Development
|
|
169
178
|
|
|
170
|
-
|
|
171
|
-
# Install dependencies
|
|
172
|
-
npm install
|
|
179
|
+
### Commands
|
|
173
180
|
|
|
174
|
-
|
|
175
|
-
|
|
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
|
+
```
|
|
176
190
|
|
|
177
|
-
|
|
178
|
-
|
|
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
|
|
179
215
|
```
|
|
180
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
|
+
|
|
181
227
|
## License
|
|
182
228
|
|
|
183
229
|
MIT
|
package/dist/styles/adminium.css
CHANGED
package/package.json
CHANGED