adminium 1.0.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 ADDED
@@ -0,0 +1,177 @@
1
+ # @metronic/ui
2
+
3
+ A beautiful, reusable React component library built with Tailwind CSS, based on
4
+ the Metronic theme design system.
5
+
6
+ ## Features
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
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm install @metronic/ui
19
+ ```
20
+
21
+ ### Peer Dependencies
22
+
23
+ Make sure you have the following peer dependencies installed:
24
+
25
+ ```bash
26
+ npm install react react-dom tailwindcss
27
+ ```
28
+
29
+ ## Quick Start
30
+
31
+ ### 1. Import the theme CSS
32
+
33
+ Add the theme CSS to your global styles or root layout:
34
+
35
+ ```tsx
36
+ // In your root layout or _app.tsx
37
+ import "@metronic/ui/styles";
38
+ ```
39
+
40
+ Or import directly in your CSS:
41
+
42
+ ```css
43
+ @import "@metronic/ui/src/styles/theme.css";
44
+ ```
45
+
46
+ ### 2. Use the components
47
+
48
+ ```tsx
49
+ import {
50
+ Button,
51
+ Card,
52
+ CardHeader,
53
+ CardTitle,
54
+ CardContent,
55
+ Badge,
56
+ } from "@metronic/ui";
57
+
58
+ function App() {
59
+ return (
60
+ <Card>
61
+ <CardHeader>
62
+ <CardTitle>Welcome</CardTitle>
63
+ </CardHeader>
64
+ <CardContent>
65
+ <p>Hello from Metronic UI!</p>
66
+ <Button variant="primary" size="md">
67
+ Get Started
68
+ </Button>
69
+ <Badge variant="success" appearance="light">
70
+ New
71
+ </Badge>
72
+ </CardContent>
73
+ </Card>
74
+ );
75
+ }
76
+ ```
77
+
78
+ ## Components
79
+
80
+ ### Form Components
81
+
82
+ - `Button` - Buttons with multiple variants and sizes
83
+ - `Input` - Text inputs with addons and grouping
84
+ - `Textarea` - Multi-line text input
85
+ - `Checkbox` - Checkbox with indeterminate state
86
+ - `RadioGroup` - Radio button groups
87
+ - `Select` - Dropdown select with search
88
+ - `Switch` - Toggle switch
89
+ - `Slider` - Range slider
90
+ - `Label` - Form labels
91
+
92
+ ### Layout Components
93
+
94
+ - `Card` - Content container with header/footer
95
+ - `Separator` - Visual dividers
96
+ - `Tabs` - Tab navigation
97
+ - `Accordion` - Collapsible content sections
98
+ - `ScrollArea` - Custom scrollbar container
99
+
100
+ ### Overlay Components
101
+
102
+ - `Dialog` - Modal dialogs
103
+ - `Popover` - Floating content
104
+ - `Tooltip` - Hover tooltips
105
+ - `DropdownMenu` - Context menus
106
+
107
+ ### Display Components
108
+
109
+ - `Badge` - Status indicators
110
+ - `Avatar` - User avatars
111
+ - `Alert` - Feedback messages
112
+ - `Progress` - Progress indicators
113
+ - `Skeleton` - Loading placeholders
114
+ - `Table` - Data tables
115
+ - `Breadcrumb` - Navigation breadcrumbs
116
+
117
+ ## Hooks
118
+
119
+ ```tsx
120
+ import { useIsMobile, useCopyToClipboard, useMounted } from "@metronic/ui";
121
+
122
+ // Detect mobile viewport
123
+ const isMobile = useIsMobile();
124
+
125
+ // Copy to clipboard with feedback
126
+ const { isCopied, copyToClipboard } = useCopyToClipboard();
127
+
128
+ // Track component mount state
129
+ const mounted = useMounted();
130
+ ```
131
+
132
+ ## Utility Functions
133
+
134
+ ```tsx
135
+ import { cn } from "@metronic/ui";
136
+
137
+ // Merge Tailwind classes intelligently
138
+ const className = cn("bg-primary text-white", isActive && "ring-2", className);
139
+ ```
140
+
141
+ ## Theming
142
+
143
+ The library uses CSS custom properties for theming. Override them in your CSS:
144
+
145
+ ```css
146
+ :root {
147
+ --primary: hsl(220, 90%, 56%);
148
+ --primary-foreground: hsl(0, 0%, 100%);
149
+ --background: hsl(0, 0%, 100%);
150
+ --foreground: hsl(240, 10%, 3.9%);
151
+ /* ... more variables */
152
+ }
153
+
154
+ .dark {
155
+ --primary: hsl(220, 90%, 56%);
156
+ --primary-foreground: hsl(0, 0%, 100%);
157
+ --background: hsl(240, 10%, 3.9%);
158
+ --foreground: hsl(0, 0%, 98%);
159
+ }
160
+ ```
161
+
162
+ ## Building the Package
163
+
164
+ ```bash
165
+ # Install dependencies
166
+ npm install
167
+
168
+ # Build the package
169
+ npm run build
170
+
171
+ # Development mode with watch
172
+ npm run dev
173
+ ```
174
+
175
+ ## License
176
+
177
+ MIT