@ttianqii/takaui 0.0.3 → 0.0.4

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 CHANGED
@@ -1,73 +1,189 @@
1
- # React + TypeScript + Vite
1
+ # TakaUI
2
2
 
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3
+ A modern, customizable React UI component library built with TypeScript, Tailwind CSS, and Radix UI primitives.
4
4
 
5
- Currently, two official plugins are available:
5
+ ## 📦 Installation
6
6
 
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
7
+ ```bash
8
+ npm install @ttianqii/takaui
9
+ ```
10
+
11
+ ### Peer Dependencies
9
12
 
10
- ## React Compiler
13
+ TakaUI requires React 18+ or React 19+:
11
14
 
12
- The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
15
+ ```bash
16
+ npm install react react-dom
17
+ ```
13
18
 
14
- ## Expanding the ESLint configuration
19
+ ### Tailwind CSS Setup
15
20
 
16
- If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
21
+ TakaUI uses Tailwind CSS for styling. Add the TakaUI paths to your `tailwind.config.js`:
17
22
 
18
23
  ```js
19
- export default defineConfig([
20
- globalIgnores(['dist']),
21
- {
22
- files: ['**/*.{ts,tsx}'],
23
- extends: [
24
- // Other configs...
25
-
26
- // Remove tseslint.configs.recommended and replace with this
27
- tseslint.configs.recommendedTypeChecked,
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
- },
24
+ /** @type {import('tailwindcss').Config} */
25
+ export default {
26
+ content: [
27
+ "./index.html",
28
+ "./src/**/*.{js,ts,jsx,tsx}",
29
+ "./node_modules/@ttianqii/takaui/dist/**/*.{js,mjs,cjs}"
30
+ ],
31
+ theme: {
32
+ extend: {},
42
33
  },
43
- ])
34
+ plugins: [],
35
+ }
44
36
  ```
45
37
 
46
- You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
38
+ ### Import Styles
47
39
 
48
- ```js
49
- // eslint.config.js
50
- import reactX from 'eslint-plugin-react-x'
51
- import reactDom from 'eslint-plugin-react-dom'
52
-
53
- export default defineConfig([
54
- globalIgnores(['dist']),
55
- {
56
- files: ['**/*.{ts,tsx}'],
57
- extends: [
58
- // Other configs...
59
- // Enable lint rules for React
60
- reactX.configs['recommended-typescript'],
61
- // Enable lint rules for React DOM
62
- reactDom.configs.recommended,
63
- ],
64
- languageOptions: {
65
- parserOptions: {
66
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
67
- tsconfigRootDir: import.meta.dirname,
68
- },
69
- // other options...
70
- },
71
- },
72
- ])
40
+ Import the TakaUI styles in your main entry file (e.g., `main.tsx` or `App.tsx`):
41
+
42
+ ```tsx
43
+ import '@ttianqii/takaui/styles.css'
44
+ ```
45
+
46
+ ## 🚀 Quick Start
47
+
48
+ ```tsx
49
+ import { Calendar, TimePicker, DataTable } from '@ttianqii/takaui'
50
+ import '@ttianqii/takaui/styles.css'
51
+ import { useState } from 'react'
52
+
53
+ function App() {
54
+ const [date, setDate] = useState<Date | undefined>(new Date())
55
+
56
+ return (
57
+ <div>
58
+ <Calendar
59
+ mode="single"
60
+ selected={date}
61
+ onSelect={setDate}
62
+ />
63
+ </div>
64
+ )
65
+ }
66
+ ```
67
+
68
+ ## 📚 Components
69
+
70
+ TakaUI includes the following components:
71
+
72
+ ### Form & Input Components
73
+
74
+ - **[Calendar](./docs/CALENDAR.md)** - Flexible date picker with multiple selection modes
75
+ - **[DatePicker](./docs/DATEPICKER.md)** - Date picker with popover and custom formatting
76
+ - **[TimePicker](./docs/TIMEPICKER.md)** - Time picker with 12h/24h formats and timezone support
77
+ - **[DropdownMenu](./docs/DROPDOWN.md)** - Accessible dropdown menu component
78
+
79
+ ### Data Display Components
80
+
81
+ - **[DataTable](./docs/DATATABLE.md)** - Powerful table with sorting, filtering, and pagination
82
+ - **[Schedule](./docs/SCHEDULE.md)** - Weekly schedule component with custom fields
83
+ - **[WeekNavigator](./docs/WEEKNAVIGATOR.md)** - Week navigation with date range display
84
+
85
+ ### Base UI Components
86
+
87
+ All components are built on top of shadcn/ui primitives:
88
+
89
+ - Button
90
+ - Input
91
+ - Label
92
+ - Select
93
+ - Popover
94
+ - Dialog/Modal
95
+ - Checkbox
96
+ - Card
97
+
98
+ ## 📖 Documentation
99
+
100
+ Detailed documentation for each component:
101
+
102
+ - [Calendar Documentation](./docs/CALENDAR.md)
103
+ - [DatePicker Documentation](./docs/DATEPICKER.md)
104
+ - [TimePicker Documentation](./docs/TIMEPICKER.md)
105
+ - [DataTable Documentation](./docs/DATATABLE.md)
106
+ - [Schedule Documentation](./docs/SCHEDULE.md)
107
+ - [WeekNavigator Documentation](./docs/WEEKNAVIGATOR.md)
108
+ - [DropdownMenu Documentation](./docs/DROPDOWN.md)
109
+
110
+ ## 🎨 Customization
111
+
112
+ ### Styling with Tailwind
113
+
114
+ All components accept a `className` prop for custom styling:
115
+
116
+ ```tsx
117
+ <Calendar
118
+ className="rounded-lg shadow-lg border-2 border-blue-500"
119
+ mode="single"
120
+ selected={date}
121
+ onSelect={setDate}
122
+ />
73
123
  ```
124
+
125
+ ### Theming
126
+
127
+ TakaUI components use CSS variables for theming. You can customize colors in your global CSS:
128
+
129
+ ```css
130
+ :root {
131
+ --primary: 220 90% 56%;
132
+ --primary-foreground: 0 0% 100%;
133
+ --destructive: 0 84% 60%;
134
+ /* Add more custom variables */
135
+ }
136
+ ```
137
+
138
+ ## 🔧 TypeScript Support
139
+
140
+ TakaUI is built with TypeScript and includes full type definitions. All props are fully typed for excellent IDE support.
141
+
142
+ ```tsx
143
+ import type { CalendarProps, DatePickerProps } from '@ttianqii/takaui'
144
+ ```
145
+
146
+ ## 📦 Tree Shaking
147
+
148
+ TakaUI supports tree shaking. Import only the components you need:
149
+
150
+ ```tsx
151
+ // Good - Only imports Calendar
152
+ import { Calendar } from '@ttianqii/takaui'
153
+
154
+ // Also works - Named imports
155
+ import { Calendar, TimePicker, DataTable } from '@ttianqii/takaui'
156
+ ```
157
+
158
+ ## 🤝 Contributing
159
+
160
+ Contributions are welcome! Please feel free to submit a Pull Request.
161
+
162
+ ## 📄 License
163
+
164
+ MIT
165
+
166
+ ## 🔗 Links
167
+
168
+ - [GitHub Repository](https://github.com/ttianqii/takaui)
169
+ - [npm Package](https://www.npmjs.com/package/@ttianqii/takaui)
170
+
171
+ ## 📞 Support
172
+
173
+ For issues and questions:
174
+
175
+ - Open an issue on [GitHub](https://github.com/ttianqii/takaui/issues)
176
+ - Check the [documentation](./docs/)
177
+
178
+ ## 🎯 Roadmap
179
+
180
+ - [ ] Additional form components (Switch, Radio, Slider)
181
+ - [ ] Chart components
182
+ - [ ] Toast notifications
183
+ - [ ] Command palette
184
+ - [ ] Theme switcher
185
+ - [ ] More data display components
186
+
187
+ ---
188
+
189
+ Made with ❤️ by [@ttianqii](https://github.com/ttianqii)