@ttianqii/takaui 0.0.3 → 0.0.5
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 +235 -58
- package/dist/takaui.cjs +23 -22
- package/dist/takaui.css +1 -1
- package/dist/takaui.js +8393 -4947
- package/package.json +10 -2
package/README.md
CHANGED
|
@@ -1,73 +1,250 @@
|
|
|
1
|
-
#
|
|
1
|
+
# TakaUI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A modern, customizable React UI component library built with TypeScript, Tailwind CSS, and Radix UI primitives.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 📦 Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
```bash
|
|
8
|
+
# npm
|
|
9
|
+
npm install @ttianqii/takaui
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
# yarn
|
|
12
|
+
yarn add @ttianqii/takaui
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
# pnpm
|
|
15
|
+
pnpm add @ttianqii/takaui
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
# bun
|
|
18
|
+
bun add @ttianqii/takaui
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Peer Dependencies
|
|
22
|
+
|
|
23
|
+
TakaUI requires React 18+ or React 19+:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# npm
|
|
27
|
+
npm install react react-dom
|
|
28
|
+
|
|
29
|
+
# yarn
|
|
30
|
+
yarn add react react-dom
|
|
31
|
+
|
|
32
|
+
# pnpm
|
|
33
|
+
pnpm add react react-dom
|
|
34
|
+
|
|
35
|
+
# bun
|
|
36
|
+
bun add react react-dom
|
|
37
|
+
```
|
|
15
38
|
|
|
16
|
-
|
|
39
|
+
### Tailwind CSS Setup
|
|
40
|
+
|
|
41
|
+
TakaUI uses Tailwind CSS for styling. Add the TakaUI paths to your `tailwind.config.js`:
|
|
17
42
|
|
|
18
43
|
```js
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
// Alternatively, use this for stricter rules
|
|
29
|
-
tseslint.configs.strictTypeChecked,
|
|
30
|
-
// Optionally, add this for stylistic rules
|
|
31
|
-
tseslint.configs.stylisticTypeChecked,
|
|
32
|
-
|
|
33
|
-
// Other configs...
|
|
34
|
-
],
|
|
35
|
-
languageOptions: {
|
|
36
|
-
parserOptions: {
|
|
37
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
38
|
-
tsconfigRootDir: import.meta.dirname,
|
|
39
|
-
},
|
|
40
|
-
// other options...
|
|
41
|
-
},
|
|
44
|
+
/** @type {import('tailwindcss').Config} */
|
|
45
|
+
export default {
|
|
46
|
+
content: [
|
|
47
|
+
"./index.html",
|
|
48
|
+
"./src/**/*.{js,ts,jsx,tsx}",
|
|
49
|
+
"./node_modules/@ttianqii/takaui/dist/**/*.{js,mjs,cjs}"
|
|
50
|
+
],
|
|
51
|
+
theme: {
|
|
52
|
+
extend: {},
|
|
42
53
|
},
|
|
43
|
-
]
|
|
54
|
+
plugins: [],
|
|
55
|
+
}
|
|
44
56
|
```
|
|
45
57
|
|
|
46
|
-
|
|
58
|
+
### Import Styles
|
|
47
59
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
import
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
60
|
+
Import the TakaUI styles in your main entry file (e.g., `main.tsx` or `App.tsx`):
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
import '@ttianqii/takaui/styles.css'
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## 🚀 Quick Start
|
|
67
|
+
|
|
68
|
+
```tsx
|
|
69
|
+
import { Calendar, TimePicker, DataTable } from '@ttianqii/takaui'
|
|
70
|
+
import '@ttianqii/takaui/styles.css'
|
|
71
|
+
import { useState } from 'react'
|
|
72
|
+
|
|
73
|
+
function App() {
|
|
74
|
+
const [date, setDate] = useState<Date | undefined>(new Date())
|
|
75
|
+
|
|
76
|
+
// DataTable example - No TanStack required!
|
|
77
|
+
const columns = [
|
|
78
|
+
{ key: 'name', header: 'Name', sortable: true },
|
|
79
|
+
{ key: 'email', header: 'Email' },
|
|
80
|
+
{
|
|
81
|
+
key: 'status',
|
|
82
|
+
header: 'Status',
|
|
83
|
+
cell: (value) => (
|
|
84
|
+
<span className="px-2 py-1 bg-green-100 text-green-800 rounded">
|
|
85
|
+
{value}
|
|
86
|
+
</span>
|
|
87
|
+
)
|
|
70
88
|
},
|
|
71
|
-
|
|
72
|
-
|
|
89
|
+
]
|
|
90
|
+
|
|
91
|
+
const data = [
|
|
92
|
+
{ id: 1, name: 'John', email: 'john@example.com', status: 'Active' },
|
|
93
|
+
{ id: 2, name: 'Jane', email: 'jane@example.com', status: 'Active' },
|
|
94
|
+
]
|
|
95
|
+
|
|
96
|
+
return (
|
|
97
|
+
<div>
|
|
98
|
+
<Calendar
|
|
99
|
+
mode="single"
|
|
100
|
+
selected={date}
|
|
101
|
+
onSelect={setDate}
|
|
102
|
+
/>
|
|
103
|
+
|
|
104
|
+
<DataTable
|
|
105
|
+
data={data}
|
|
106
|
+
columns={columns}
|
|
107
|
+
showSearch
|
|
108
|
+
searchPlaceholder="Search users..."
|
|
109
|
+
/>
|
|
110
|
+
</div>
|
|
111
|
+
)
|
|
112
|
+
}
|
|
73
113
|
```
|
|
114
|
+
|
|
115
|
+
## 📚 Components
|
|
116
|
+
|
|
117
|
+
TakaUI includes the following components:
|
|
118
|
+
|
|
119
|
+
### Form & Input Components
|
|
120
|
+
|
|
121
|
+
- **[Calendar](./docs/CALENDAR.md)** - Flexible date picker with multiple selection modes
|
|
122
|
+
- **[DatePicker](./docs/DATEPICKER.md)** - Date picker with popover and custom formatting
|
|
123
|
+
- **[TimePicker](./docs/TIMEPICKER.md)** - Time picker with 12h/24h formats and timezone support
|
|
124
|
+
- **[DropdownMenu](./docs/DROPDOWN.md)** - Accessible dropdown menu component
|
|
125
|
+
|
|
126
|
+
### Data Display Components
|
|
127
|
+
|
|
128
|
+
- **[DataTable](./docs/DATATABLE_NEW.md)** - **NEW!** Independent table with sorting, filtering, and pagination (No TanStack!)
|
|
129
|
+
- ✅ Zero external dependencies (except icons)
|
|
130
|
+
- ✅ Built-in sorting, pagination, search
|
|
131
|
+
- ✅ Custom cell rendering
|
|
132
|
+
- ✅ Loading states
|
|
133
|
+
- [Quick Reference](./DATATABLE_QUICKREF.md) - Cheat sheet
|
|
134
|
+
- **[Schedule](./docs/SCHEDULE.md)** - Weekly schedule component with custom fields
|
|
135
|
+
- **[WeekNavigator](./docs/WEEKNAVIGATOR.md)** - Week navigation with date range display
|
|
136
|
+
|
|
137
|
+
### Advanced Table System (Optional)
|
|
138
|
+
|
|
139
|
+
For advanced users who need TanStack Table features:
|
|
140
|
+
|
|
141
|
+
- **[TableRoot, TableContent, TableNavigator](./docs/DATATABLE.md)** - Modular table components
|
|
142
|
+
- Requires: `npm install @tanstack/react-table`
|
|
143
|
+
- [Modular Structure](./docs/DATATABLE_MODULAR.md)
|
|
144
|
+
- [Architecture](./DATATABLE_ARCHITECTURE.md)
|
|
145
|
+
|
|
146
|
+
### Base UI Components
|
|
147
|
+
|
|
148
|
+
All components are built on top of shadcn/ui primitives:
|
|
149
|
+
|
|
150
|
+
- Button
|
|
151
|
+
- Input
|
|
152
|
+
- Label
|
|
153
|
+
- Select
|
|
154
|
+
- Popover
|
|
155
|
+
- Dialog/Modal
|
|
156
|
+
- Checkbox
|
|
157
|
+
- Card
|
|
158
|
+
|
|
159
|
+
## 📖 Documentation
|
|
160
|
+
|
|
161
|
+
Detailed documentation for each component:
|
|
162
|
+
|
|
163
|
+
- [Calendar Documentation](./docs/CALENDAR.md)
|
|
164
|
+
- [DatePicker Documentation](./docs/DATEPICKER.md)
|
|
165
|
+
- [TimePicker Documentation](./docs/TIMEPICKER.md)
|
|
166
|
+
- [DataTable Documentation](./docs/DATATABLE.md)
|
|
167
|
+
- [Schedule Documentation](./docs/SCHEDULE.md)
|
|
168
|
+
- [WeekNavigator Documentation](./docs/WEEKNAVIGATOR.md)
|
|
169
|
+
- [DropdownMenu Documentation](./docs/DROPDOWN.md)
|
|
170
|
+
|
|
171
|
+
## 🎨 Customization
|
|
172
|
+
|
|
173
|
+
### Styling with Tailwind
|
|
174
|
+
|
|
175
|
+
All components accept a `className` prop for custom styling:
|
|
176
|
+
|
|
177
|
+
```tsx
|
|
178
|
+
<Calendar
|
|
179
|
+
className="rounded-lg shadow-lg border-2 border-blue-500"
|
|
180
|
+
mode="single"
|
|
181
|
+
selected={date}
|
|
182
|
+
onSelect={setDate}
|
|
183
|
+
/>
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Theming
|
|
187
|
+
|
|
188
|
+
TakaUI components use CSS variables for theming. You can customize colors in your global CSS:
|
|
189
|
+
|
|
190
|
+
```css
|
|
191
|
+
:root {
|
|
192
|
+
--primary: 220 90% 56%;
|
|
193
|
+
--primary-foreground: 0 0% 100%;
|
|
194
|
+
--destructive: 0 84% 60%;
|
|
195
|
+
/* Add more custom variables */
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## 🔧 TypeScript Support
|
|
200
|
+
|
|
201
|
+
TakaUI is built with TypeScript and includes full type definitions. All props are fully typed for excellent IDE support.
|
|
202
|
+
|
|
203
|
+
```tsx
|
|
204
|
+
import type { CalendarProps, DatePickerProps } from '@ttianqii/takaui'
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## 📦 Tree Shaking
|
|
208
|
+
|
|
209
|
+
TakaUI supports tree shaking. Import only the components you need:
|
|
210
|
+
|
|
211
|
+
```tsx
|
|
212
|
+
// Good - Only imports Calendar
|
|
213
|
+
import { Calendar } from '@ttianqii/takaui'
|
|
214
|
+
|
|
215
|
+
// Also works - Named imports
|
|
216
|
+
import { Calendar, TimePicker, DataTable } from '@ttianqii/takaui'
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## 🤝 Contributing
|
|
220
|
+
|
|
221
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
222
|
+
|
|
223
|
+
## 📄 License
|
|
224
|
+
|
|
225
|
+
MIT
|
|
226
|
+
|
|
227
|
+
## 🔗 Links
|
|
228
|
+
|
|
229
|
+
- [GitHub Repository](https://github.com/ttianqii/takaui)
|
|
230
|
+
- [npm Package](https://www.npmjs.com/package/@ttianqii/takaui)
|
|
231
|
+
|
|
232
|
+
## 📞 Support
|
|
233
|
+
|
|
234
|
+
For issues and questions:
|
|
235
|
+
|
|
236
|
+
- Open an issue on [GitHub](https://github.com/ttianqii/takaui/issues)
|
|
237
|
+
- Check the [documentation](./docs/)
|
|
238
|
+
|
|
239
|
+
## 🎯 Roadmap
|
|
240
|
+
|
|
241
|
+
- [ ] Additional form components (Switch, Radio, Slider)
|
|
242
|
+
- [ ] Chart components
|
|
243
|
+
- [ ] Toast notifications
|
|
244
|
+
- [ ] Command palette
|
|
245
|
+
- [ ] Theme switcher
|
|
246
|
+
- [ ] More data display components
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
Made with ❤️ by [@ttianqii](https://github.com/ttianqii)
|