@unizap/uniui 1.0.7 → 1.0.9
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 +160 -42
- package/package.json +12 -1
package/README.md
CHANGED
|
@@ -1,54 +1,172 @@
|
|
|
1
|
-
|
|
1
|
+
<p></p>
|
|
2
|
+
<p align="center">
|
|
3
|
+
<img src="https://ik.imagekit.io/unizap/uniui.svg" alt="UniUI Logo" height="80"/>
|
|
4
|
+
</p>
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
<p align="center">
|
|
7
|
+
<b>UniUI is a comprehensive and highly customizable UI component library built for React. Inspired by modern design principles, UniUI offers a wide range of high-quality, flexible, and easy-to-use components to build elegant and functional user interfaces for web applications.</b>
|
|
8
|
+
</p>
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
---
|
|
6
11
|
|
|
7
|
-
|
|
8
|
-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
12
|
+
## 🚀 Installation
|
|
9
13
|
|
|
10
|
-
|
|
14
|
+
```sh
|
|
15
|
+
npm i @unizap/uniui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## ⚡ Usage
|
|
22
|
+
|
|
23
|
+
Import and use components in your React project:
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { Button, IconButton, Badge, Carousel, EmptyState, PasswordInput } from '@unizap/uniui';
|
|
27
|
+
|
|
28
|
+
<Button color="amber" variant="filled">Hello UniUI</Button>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 🧩 Components
|
|
34
|
+
|
|
35
|
+
- **Button**
|
|
36
|
+
- **IconButton**
|
|
37
|
+
- **Badge**
|
|
38
|
+
- **Carousel**
|
|
39
|
+
- **EmptyState**
|
|
40
|
+
- **PasswordInput**
|
|
41
|
+
- **CardWrapper**
|
|
42
|
+
- **Checkbox**
|
|
43
|
+
- **Dropdown**
|
|
44
|
+
- **DropzoneUploader**
|
|
45
|
+
- **Menu**
|
|
46
|
+
- **OtpInput**
|
|
47
|
+
- **Pill**
|
|
48
|
+
- **ProfileImageShowcase**
|
|
49
|
+
- **Stepper**
|
|
50
|
+
- **Table**
|
|
51
|
+
- **TextInput**
|
|
52
|
+
- **Skeleton**
|
|
53
|
+
- **TextArea**
|
|
54
|
+
- **Slider**
|
|
55
|
+
- **Snackbar**
|
|
56
|
+
- **Progress**
|
|
57
|
+
- **ToggleSwitch**
|
|
58
|
+
- **Typography**
|
|
59
|
+
- **Card**
|
|
60
|
+
- **Divider**
|
|
61
|
+
- **RadioGroup**
|
|
62
|
+
- **Select**
|
|
63
|
+
- **Tooltip**
|
|
64
|
+
- **Dialog**
|
|
65
|
+
- **ActionMenu**
|
|
66
|
+
- **Drawer**
|
|
67
|
+
- **Accordion**
|
|
68
|
+
- **Pagination**
|
|
69
|
+
- **Avatar**
|
|
70
|
+
- **Alert**
|
|
71
|
+
- **BottomNavigation**
|
|
72
|
+
- **Breadcrumbs**
|
|
73
|
+
- **DatePicker**
|
|
74
|
+
- **Tabs**
|
|
75
|
+
- **DashboardStatBoxes**
|
|
76
|
+
- **Sidebar**
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 🎨 Default Colors
|
|
81
|
+
|
|
82
|
+
UniUI provides a set of default colors you can use out of the box:
|
|
83
|
+
|
|
84
|
+
- **dark**
|
|
85
|
+
- **gray**
|
|
86
|
+
- **light**
|
|
87
|
+
- **pearl**
|
|
88
|
+
- **red**
|
|
89
|
+
- **orange**
|
|
90
|
+
- **amber**
|
|
91
|
+
- **yellow**
|
|
92
|
+
- **lime**
|
|
93
|
+
- **green**
|
|
94
|
+
- **emerald**
|
|
95
|
+
- **teal**
|
|
96
|
+
- **cyan**
|
|
97
|
+
- **sky**
|
|
98
|
+
- **blue**
|
|
99
|
+
- **indigo**
|
|
100
|
+
- **violet**
|
|
101
|
+
- **purple**
|
|
102
|
+
- **fuchsia**
|
|
103
|
+
- **pink**
|
|
104
|
+
- **rose**
|
|
105
|
+
|
|
106
|
+
To use the default color, simply pass its name to the `color` prop:
|
|
107
|
+
|
|
108
|
+
```tsx
|
|
109
|
+
<Button color="amber">Amber Button</Button>
|
|
110
|
+
<Button color="blue">Blue Button</Button>
|
|
111
|
+
```
|
|
11
112
|
|
|
12
|
-
|
|
113
|
+
## 🎨 How to Extend Color
|
|
114
|
+
|
|
115
|
+
To Extend and build sleek interfaces straight from your markup, you can install **UniCSS**:
|
|
116
|
+
[](https://www.npmjs.com/package/@unizap/unicss)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
```sh
|
|
120
|
+
npm i @unizap/unicss
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
You can add custom colors to UniUI's color system using the exported `extendColorMap` and `extendRangeColorMap` functions.
|
|
126
|
+
|
|
127
|
+
**Example:**
|
|
128
|
+
|
|
129
|
+
1. Create a file in your project (e.g. `brandColor.js`):
|
|
13
130
|
|
|
14
131
|
```js
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
parserOptions: {
|
|
27
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
28
|
-
tsconfigRootDir: import.meta.dirname,
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
})
|
|
132
|
+
import { extendColorMap } from "@unizap/uniui";
|
|
133
|
+
|
|
134
|
+
extendColorMap({
|
|
135
|
+
brand: {
|
|
136
|
+
filled: 'bg-color-violet-500 text-color-white',
|
|
137
|
+
outline: 'border-color-violet-500 text-color-violet-500',
|
|
138
|
+
transparent: 'text-color-violet-500',
|
|
139
|
+
accent: 'accent-color-violet-500',
|
|
140
|
+
peer: 'peer-checked:border-color-violet-500 peer-checked:text-color-violet-500',
|
|
141
|
+
}
|
|
142
|
+
});
|
|
32
143
|
```
|
|
33
144
|
|
|
34
|
-
|
|
145
|
+
2. Use your new color in any component:
|
|
146
|
+
|
|
147
|
+
```jsx
|
|
148
|
+
import './brandColor.js';
|
|
149
|
+
|
|
150
|
+
<Button color="brand">Brand Button</Button>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
You can also extend Slider colors:
|
|
35
154
|
|
|
36
155
|
```js
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
'
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
rules: {
|
|
48
|
-
// other rules...
|
|
49
|
-
// Enable its recommended typescript rules
|
|
50
|
-
...reactX.configs['recommended-typescript'].rules,
|
|
51
|
-
...reactDom.configs.recommended.rules,
|
|
52
|
-
},
|
|
53
|
-
})
|
|
156
|
+
import { extendRangeColorMap } from '@unizap/uniui';
|
|
157
|
+
|
|
158
|
+
extendRangeColorMap({
|
|
159
|
+
brand: {
|
|
160
|
+
track: 'bg-color-brand-200',
|
|
161
|
+
progress: 'bg-color-brand-500',
|
|
162
|
+
thumb: 'bg-color-brand-500 border-color-brand-600 shadow-color-brand-200',
|
|
163
|
+
thumbHover: 'bg-color-brand-600',
|
|
164
|
+
}
|
|
165
|
+
});
|
|
54
166
|
```
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## 📄 License
|
|
171
|
+
|
|
172
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unizap/uniui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "A UI component library for React",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -36,6 +36,17 @@
|
|
|
36
36
|
"prepare": "pnpm run build",
|
|
37
37
|
"storybook": "storybook dev -p 6006"
|
|
38
38
|
},
|
|
39
|
+
"keywords": [
|
|
40
|
+
"react",
|
|
41
|
+
"ui-components",
|
|
42
|
+
"component-library",
|
|
43
|
+
"customizable",
|
|
44
|
+
"design-system",
|
|
45
|
+
"modern-ui",
|
|
46
|
+
"web-development",
|
|
47
|
+
"frontend",
|
|
48
|
+
"typescript"
|
|
49
|
+
],
|
|
39
50
|
"peerDependencies": {
|
|
40
51
|
"react": ">=16.8.0",
|
|
41
52
|
"react-dom": ">=16.8.0"
|