@viliha/vui-ui 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/README.md +82 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,82 @@
1
+ # @viliha/vui-ui
2
+
3
+ A clean, **token-driven React admin/CRM component library** built on Tailwind
4
+ CSS v4, shadcn-style patterns, and Radix Icons. Ships as **TypeScript source**
5
+ (Just-in-Time) — your app's bundler compiles only what you import.
6
+
7
+ Part of [**Vui Starter**](https://github.com/myviliha/vui-starter) — a free,
8
+ open-source admin design system. See the repo for the full docs, a live
9
+ backoffice demo, and per-toolchain setup guides.
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install @viliha/vui-ui # or: pnpm add / yarn add / bun add
15
+ npm install -D tailwindcss @tailwindcss/postcss
16
+ ```
17
+
18
+ `react` and `react-dom` are peer dependencies.
19
+
20
+ ## Setup
21
+
22
+ **1. Import the theme** in your global stylesheet (design tokens, `@theme`
23
+ mapping, base reset, and component scanning — all in one import):
24
+
25
+ ```css
26
+ @import "tailwindcss";
27
+ @import "@viliha/vui-ui/theme.css";
28
+ ```
29
+
30
+ **2. Next.js only** — transpile the source package in `next.config.ts`:
31
+
32
+ ```ts
33
+ const nextConfig = { transpilePackages: ["@viliha/vui-ui"] };
34
+ export default nextConfig;
35
+ ```
36
+
37
+ (Vite and most bundlers need no extra config.)
38
+
39
+ ## Usage
40
+
41
+ Each component is its own entry point, so you only ship what you use:
42
+
43
+ ```tsx
44
+ import { Button } from "@viliha/vui-ui/button";
45
+ import { Badge } from "@viliha/vui-ui/badge";
46
+ import { RecordView, type RecordField } from "@viliha/vui-ui/record-view";
47
+
48
+ export function Example() {
49
+ return (
50
+ <div className="p-4">
51
+ <Badge variant="success">Active</Badge>
52
+ <Button variant="primary">Save</Button>
53
+ </div>
54
+ );
55
+ }
56
+ ```
57
+
58
+ ## Components
59
+
60
+ `avatar` · `badge` · `button` · `card` · `chart` (themed Recharts wrapper) ·
61
+ `checkbox` · `dialog` · `confirm-dialog` · `dropdown-menu` · `input` · `menu` ·
62
+ `select` · `table` · `record-view` (the full datatable) · plus the `utils`
63
+ (`cn`) helper and the `theme.css` design tokens.
64
+
65
+ ## Theming
66
+
67
+ Every design decision lives in `@viliha/vui-ui/theme.css` as CSS variables
68
+ (colors, radius, typography, dark mode). Override any token **after** the import
69
+ to rebrand the whole system:
70
+
71
+ ```css
72
+ @import "@viliha/vui-ui/theme.css";
73
+
74
+ :root {
75
+ --primary: oklch(0.55 0.2 260);
76
+ --radius: 0.5rem;
77
+ }
78
+ ```
79
+
80
+ ## License
81
+
82
+ MIT © Suman Bonakurthi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viliha/vui-ui",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Vui UI — a clean, token-driven React admin/CRM component library built on Tailwind CSS v4, shadcn-style patterns, and Radix Icons. Ships as TypeScript source (Just-in-Time), compiled by the consuming app.",
5
5
  "license": "MIT",
6
6
  "author": "Suman Bonakurthi",