@underverse-ui/underverse 0.1.1 → 0.1.3
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 +56 -36
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -1,20 +1,28 @@
|
|
|
1
|
-
Underverse UI
|
|
1
|
+
# Underverse UI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Author:** Tran Van Bach
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
A comprehensive UI component library for React/Next.js applications, extracted from the main project. Built with Tailwind CSS, `clsx`, and `tailwind-merge`. Some components support `next-intl` (optional).
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
6
8
|
- Node >= 18
|
|
7
|
-
- Peer
|
|
9
|
+
- Peer dependencies: `react`, `react-dom`, `next`, `next-intl`
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
```bash
|
|
13
|
+
# Install the package
|
|
14
|
+
npm i @underverse-ui/underverse
|
|
8
15
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
# Install peer dependencies (if not already in your app)
|
|
17
|
+
npm i react react-dom next next-intl
|
|
18
|
+
```
|
|
12
19
|
|
|
13
|
-
|
|
14
|
-
|
|
20
|
+
## Tailwind CSS Configuration
|
|
21
|
+
Components use color variables like `primary`, `secondary`, `destructive`, etc. Make sure your Tailwind theme/tokens include these variables.
|
|
15
22
|
|
|
16
|
-
|
|
23
|
+
## Quick Start
|
|
17
24
|
|
|
25
|
+
```tsx
|
|
18
26
|
import { Button, ToastProvider, useToast } from "@underverse-ui/underverse";
|
|
19
27
|
|
|
20
28
|
function App() {
|
|
@@ -27,30 +35,42 @@ function App() {
|
|
|
27
35
|
</ToastProvider>
|
|
28
36
|
);
|
|
29
37
|
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Exported Components
|
|
41
|
+
|
|
42
|
+
### Core Components
|
|
43
|
+
- **Buttons:** `Button`
|
|
44
|
+
- **Display:** `Badge`, `Card`, `Avatar`, `Skeleton`, `Progress`
|
|
45
|
+
- **Form Inputs:** `Input`, `Textarea`, `Checkbox`, `Switch`, `Label`
|
|
46
|
+
|
|
47
|
+
### Feedback & Overlays
|
|
48
|
+
- `Modal`, `ToastProvider`, `useToast`, `Tooltip`, `Popover`, `Sheet` (includes `Drawer`, `SlideOver`, `BottomSheet`, `SidebarSheet`), `Alert`, `GlobalLoading` (includes `PageLoading`, `InlineLoading`, `ButtonLoading`)
|
|
49
|
+
|
|
50
|
+
### Form Controls & Pickers
|
|
51
|
+
- `RadioGroup`, `Slider`, `DatePicker`, `Combobox`, `MultiCombobox`, `CategoryTreeSelect`
|
|
52
|
+
|
|
53
|
+
### Navigation & Structure
|
|
54
|
+
- `Breadcrumb`, `Tabs` (includes `SimpleTabs`, `PillTabs`, `VerticalTabs`), `DropdownMenu`, `Pagination`, `Section`, `ScrollArea`
|
|
55
|
+
|
|
56
|
+
### Data Display
|
|
57
|
+
- `Table`, `DataTable`
|
|
58
|
+
|
|
59
|
+
### Media Components
|
|
60
|
+
- `SmartImage`, `ImageUpload`, `ProductImageUpload`, `Carousel`
|
|
61
|
+
|
|
62
|
+
### Utilities
|
|
63
|
+
- `ClientOnly`, `Loading`, `NotificationModal`, `FloatingContacts`, `AccessDenied`
|
|
64
|
+
- Utility functions: `cn`, `DateUtils`, style constants
|
|
65
|
+
|
|
66
|
+
## Important Notes
|
|
67
|
+
- Some components (like `DatePicker`) depend on `next-intl`. If your app doesn't use `next-intl`, either import only components without this dependency or install `next-intl` as a peer dependency.
|
|
68
|
+
- `NotificationBell` is **not exported** to keep the package neutral (it depends on project-specific API/socket implementations).
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
|
|
72
|
+
MIT
|
|
73
|
+
|
|
74
|
+
## Author
|
|
30
75
|
|
|
31
|
-
|
|
32
|
-
- Buttons: `Button`
|
|
33
|
-
- Thông báo/feedback: `ToastProvider`, `useToast`, `Modal`, `Tooltip`, `Popover`, `Sheet`, `Alert`, `GlobalLoading`
|
|
34
|
-
- Form/nhập liệu: `Input`, `Textarea`, `Checkbox`, `RadioGroup`, `Slider`, `DatePicker`, `Combobox`, `MultiCombobox`, `CategoryTreeSelect`
|
|
35
|
-
- Trình bày: `Badge`, `Card`, `Table`, `DataTable`, `Tab/Tabs`, `Section`, `ScrollArea`, `Skeleton`, `Progress`
|
|
36
|
-
- Media: `SmartImage`, `ImageUpload`, `ProductImageUpload`, `Carousel`
|
|
37
|
-
- Khác: `Avatar`, `ClientOnly`, `Loading`, `ThemeToggle`, `NotificationModal`, `FloatingContacts`, `Breadcrumb`, `DropdownMenu`, `Pagination`
|
|
38
|
-
|
|
39
|
-
Lưu ý
|
|
40
|
-
- Một số component (như `DatePicker`, `Form`) dùng `next-intl`. Nếu app không dùng `next-intl`, chỉ import các component không phụ thuộc hoặc cài `next-intl` như peer.
|
|
41
|
-
- `NotificationBell` (phụ thuộc API/socket cụ thể dự án) không được export để giữ package trung tính.
|
|
42
|
-
|
|
43
|
-
Phát triển & build (local)
|
|
44
|
-
- Trong thư mục package: `cd packages/underverse`
|
|
45
|
-
- Cài deps: `npm i`
|
|
46
|
-
- Build: `npm run build` (xuất ESM + CJS + d.ts vào `dist/`)
|
|
47
|
-
- Kiểm tra gói: `npm pack` (tạo file `.tgz` để test cài đặt cục bộ)
|
|
48
|
-
|
|
49
|
-
Publish lên npm (tóm tắt)
|
|
50
|
-
1) `cd packages/underverse`
|
|
51
|
-
2) Đăng nhập: `npm login`
|
|
52
|
-
3) Tăng version: `npm version patch` (hoặc `minor|major`)
|
|
53
|
-
4) Publish: `npm publish --access public`
|
|
54
|
-
- Dùng beta tag: `npm publish --access public --tag beta`
|
|
55
|
-
|
|
56
|
-
Chi tiết từng bước xem thêm trong PUBLISHING.md cùng thư mục.
|
|
76
|
+
Tran Van Bach
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@underverse-ui/underverse",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Underverse UI – reusable React/Next.js UI components",
|
|
6
6
|
"type": "module",
|
|
@@ -19,9 +19,14 @@
|
|
|
19
19
|
],
|
|
20
20
|
"sideEffects": false,
|
|
21
21
|
"scripts": {
|
|
22
|
+
"dev": "tsup --config tsup.config.ts --watch",
|
|
22
23
|
"build": "tsup --config tsup.config.ts",
|
|
23
24
|
"clean": "rimraf dist",
|
|
24
|
-
"prepublishOnly": "npm run clean && npm run build"
|
|
25
|
+
"prepublishOnly": "npm run clean && npm run build",
|
|
26
|
+
"release": "node ./scripts/release.mjs",
|
|
27
|
+
"release:patch": "node ./scripts/release.mjs patch",
|
|
28
|
+
"release:minor": "node ./scripts/release.mjs minor",
|
|
29
|
+
"release:major": "node ./scripts/release.mjs major"
|
|
25
30
|
},
|
|
26
31
|
"peerDependencies": {
|
|
27
32
|
"react": ">=18",
|