@ttianqii/takaui 0.1.4 → 0.1.6

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,314 +1,172 @@
1
1
  # TakaUI
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@ttianqii/takaui.svg)](https://www.npmjs.com/package/@ttianqii/takaui)
4
- [![npm downloads](https://img.shields.io/npm/dm/@ttianqii/takaui.svg)](https://www.npmjs.com/package/@ttianqii/takaui)
5
- [![license](https://img.shields.io/npm/l/@ttianqii/takaui.svg)](https://github.com/ttianqii/takaui/blob/main/LICENSE)
6
-
7
- A modern, customizable React UI component library built with TypeScript, Tailwind CSS, and Radix UI primitives.
8
-
9
- **Current Version:** 0.1.0
10
-
11
- ## ✨ What's New in 0.1.0
12
-
13
- - 🎯 **Table Alignment Fixed** - Table cells now properly align horizontally with headers
14
- - 📐 **Consistent Padding** - Checkbox columns and all table content use matching padding (px-3 py-2)
15
- - ✨ **Previous Features** - All v0.0.9 features (no CSS imports, pure Tailwind, original design preserved)
3
+ Modern, accessible React component library built with TypeScript, Tailwind CSS, and Radix UI primitives.
16
4
 
17
- ## 📦 Installation
5
+ [![npm version](https://img.shields.io/npm/v/@ttianqii/takaui.svg)](https://www.npmjs.com/package/@ttianqii/takaui)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
18
7
 
19
- ### Quick Setup (Recommended)
8
+ ## 📚 Documentation
20
9
 
21
- Run the automatic setup wizard:
10
+ - **[Getting Started Guide](./GETTING_STARTED.md)** - Complete installation and setup instructions
11
+ - **[Components Reference](./COMPONENTS.md)** - Detailed component documentation with examples
12
+ - **[GitHub Repository](https://github.com/ttianqii/takaui)** - Source code and issues
22
13
 
23
- ```bash
24
- npm install @ttianqii/takaui
25
- npx takaui-setup
26
- ```
14
+ ## ✨ Features
27
15
 
28
- This will:
29
- - Configure your Tailwind config automatically
30
- - Verify your setup is correct
16
+ - 🎯 **TypeScript** - Full type safety and IntelliSense support
17
+ - 🎨 **Tailwind CSS** - Utility-first styling, fully customizable
18
+ - **Accessible** - Built with Radix UI primitives for accessibility
19
+ - 📦 **Tree-shakeable** - Only bundle what you use
20
+ - 🚀 **No dependencies** - Core components work standalone (DataTable, DataGrid)
21
+ - 📅 **Rich Components** - Calendar, DatePicker, TimePicker, Schedule, and more
31
22
 
32
- **No CSS imports needed!** Components work with pure Tailwind CSS.
33
-
34
- ### Manual Installation
23
+ ## 🚀 Quick Start
35
24
 
36
- If you prefer manual setup:
25
+ ### Installation
37
26
 
38
27
  ```bash
39
- # npm
40
28
  npm install @ttianqii/takaui
41
-
42
- # yarn
43
- yarn add @ttianqii/takaui
44
-
45
- # pnpm
46
- pnpm add @ttianqii/takaui
47
-
48
- # bun
49
- bun add @ttianqii/takaui
50
29
  ```
51
30
 
52
- **That's it!** Just make sure you have Tailwind CSS configured in your project.
53
-
54
- ### Peer Dependencies
55
-
56
- TakaUI requires React 18+ or React 19+:
57
-
58
- ```bash
59
- # npm
60
- npm install react react-dom
61
-
62
- # yarn
63
- yarn add react react-dom
64
-
65
- # pnpm
66
- pnpm add react react-dom
67
-
68
- # bun
69
- bun add react react-dom
70
- ```
71
-
72
- ### Tailwind CSS Setup
73
-
74
- **Important:** TakaUI uses Tailwind CSS for styling (no CSS imports needed!). You must have Tailwind CSS configured in your project.
75
-
76
- #### 1. Install Tailwind CSS (if not already installed)
77
-
78
- ```bash
79
- npm install -D tailwindcss postcss autoprefixer
80
- npx tailwindcss init -p
81
- ```
82
-
83
- #### 2. Configure Tailwind
84
-
85
- Add TakaUI to your `tailwind.config.js` content paths:
86
-
87
- ```js
88
- /** @type {import('tailwindcss').Config} */
89
- export default {
90
- content: [
91
- "./index.html",
92
- "./src/**/*.{js,ts,jsx,tsx}",
93
- "./node_modules/@ttianqii/takaui/dist/**/*.{js,mjs,cjs}"
94
- ],
95
- theme: {
96
- extend: {},
97
- },
98
- plugins: [],
99
- }
100
- ```
101
-
102
- #### 3. Add Tailwind directives
103
-
104
- In your main CSS file (e.g., `src/index.css`):
31
+ **All package managers supported:** npm, yarn, pnpm, bun
105
32
 
106
- ```css
107
- @tailwind base;
108
- @tailwind components;
109
- @tailwind utilities;
110
- ```
111
-
112
- **That's it!** No CSS imports needed from TakaUI. 🎉
33
+ 👉 For complete setup instructions, see the **[Getting Started Guide](./GETTING_STARTED.md)**
113
34
 
114
- ## 🚀 Quick Start
35
+ ### Basic Example
115
36
 
116
37
  ```tsx
117
- import { DatePicker, TimePicker, DataTable } from '@ttianqii/takaui'
118
- import '@ttianqii/takaui/styles.css'
38
+ import { Button, DatePicker, Card } from '@ttianqii/takaui'
119
39
  import { useState } from 'react'
120
40
 
121
41
  function App() {
122
- const [date, setDate] = useState<Date | undefined>(new Date())
123
- const [dateRange, setDateRange] = useState<{ from: Date; to?: Date }>()
124
-
125
- // DataTable example - No TanStack required!
126
- const columns = [
127
- { key: 'name', header: 'Name', sortable: true },
128
- { key: 'email', header: 'Email' },
129
- {
130
- key: 'status',
131
- header: 'Status',
132
- cell: (value) => (
133
- <span className="px-2 py-1 bg-green-100 text-green-800 rounded">
134
- {value}
135
- </span>
136
- )
137
- },
138
- ]
139
-
140
- const data = [
141
- { id: 1, name: 'John', email: 'john@example.com', status: 'Active' },
142
- { id: 2, name: 'Jane', email: 'jane@example.com', status: 'Active' },
143
- ]
144
-
42
+ const [date, setDate] = useState<Date>()
43
+
145
44
  return (
146
- <div>
147
- {/* Single Date Picker */}
148
- <DatePicker
149
- date={date}
150
- onDateChange={setDate}
151
- />
152
-
153
- {/* Date Range Picker - NEW! */}
154
- <DatePicker
155
- mode="range"
156
- dateRange={dateRange}
157
- onDateRangeChange={setDateRange}
158
- numberOfMonths={2}
159
- />
160
-
161
- <DataTable
162
- data={data}
163
- columns={columns}
164
- showSearch
165
- searchPlaceholder="Search users..."
166
- />
167
- </div>
45
+ <Card className="p-6">
46
+ <h1 className="text-2xl font-bold mb-4">Welcome to TakaUI</h1>
47
+ <DatePicker selected={date} onSelect={setDate} />
48
+ <Button className="mt-4">Submit</Button>
49
+ </Card>
168
50
  )
169
51
  }
170
52
  ```
171
53
 
172
- ## 📚 Components
173
-
174
- TakaUI includes the following components:
54
+ ## 📦 Available Components
175
55
 
176
- ### Form & Input Components
56
+ ### 📅 Date & Time
57
+ - **Calendar** - Interactive calendar with holiday support
58
+ - **DatePicker** - Dropdown date selector
59
+ - **TimePicker** - Time selection input
60
+ - **WeekNavigator** - Week-based navigation
61
+ - **Schedule** - Weekly schedule view with events
177
62
 
178
- - **[Calendar](./docs/CALENDAR.md)** - Flexible date picker with multiple selection modes
179
- - **[DatePicker](./docs/DATEPICKER.md)** - Date picker with popover and custom formatting
180
- - **NEW:** Range selection with dual month view
181
- - ✨ **NEW:** Enhanced hover states for better UX
182
- - **[TimePicker](./docs/TIMEPICKER.md)** - Time picker with 12h/24h formats and timezone support
183
- - **[DropdownMenu](./docs/DROPDOWN.md)** - Accessible dropdown menu component
63
+ ### 📊 Data Display
64
+ - **DataTable** - Powerful table with sorting and pagination (no dependencies!)
65
+ - **DataGrid** - Advanced grid system with modular components
184
66
 
185
- ### Data Display Components
67
+ ### 🎨 UI Components
68
+ - **Button** - Multiple variants and sizes
69
+ - **Card** - Container with header, content, footer
70
+ - **Input** - Form text input
71
+ - **Checkbox** - Accessible checkbox
72
+ - **Select** - Dropdown select
73
+ - **Modal** - Dialog overlay
74
+ - **DropdownMenu** - Accessible dropdown menu
75
+ - **Table** - Basic table components
76
+ - **Popover** - Floating content
77
+ - **Label** - Form labels
78
+ - **Separator** - Visual divider
186
79
 
187
- - **[DataTable](./docs/DATATABLE_NEW.md)** - Independent table with sorting, filtering, and pagination (No TanStack!)
188
- - ✅ Zero external dependencies (except icons)
189
- - ✅ Built-in sorting, pagination, search
190
- - ✅ Custom cell rendering
191
- - ✅ Loading states
192
- - [Quick Reference](./DATATABLE_QUICKREF.md) - Cheat sheet
193
- - **DataGrid System** - ✨ **NEW!** Modular table components for custom layouts
194
- - DataGrid, DataGridTable, DataGridPagination
195
- - DataGridColumnHeader, DataGridRowSelect
196
- - Perfect for complex table compositions
197
- - **[Schedule](./docs/SCHEDULE.md)** - Weekly schedule component with custom fields
198
- - ✨ **NEW:** Supports Date type in metadata
199
- - **[WeekNavigator](./docs/WEEKNAVIGATOR.md)** - Week navigation with date range display
80
+ 👉 See **[Components Reference](./COMPONENTS.md)** for detailed documentation
200
81
 
201
- ### Advanced Table System (Optional)
82
+ ## 💡 Component Examples
202
83
 
203
- For advanced users who need TanStack Table features:
84
+ ### Calendar with Holidays
204
85
 
205
- - **[TableRoot, TableContent, TableNavigator](./docs/DATATABLE.md)** - Modular table components
206
- - Requires: `npm install @tanstack/react-table`
207
- - [Modular Structure](./docs/DATATABLE_MODULAR.md)
208
- - [Architecture](./DATATABLE_ARCHITECTURE.md)
86
+ ```tsx
87
+ import { Calendar } from '@ttianqii/takaui'
209
88
 
210
- ### Base UI Components
89
+ <Calendar
90
+ selected={date}
91
+ onSelect={setDate}
92
+ holidays={['US', 'GB']}
93
+ />
94
+ ```
211
95
 
212
- All components are built on top of shadcn/ui primitives:
96
+ ### Data Table
213
97
 
214
- - Button
215
- - Input
216
- - Label
217
- - Select
218
- - Popover
219
- - Dialog/Modal
220
- - Checkbox
221
- - Card
98
+ ```tsx
99
+ import { DataTable, DataTableColumn } from '@ttianqii/takaui'
222
100
 
223
- ## 📖 Documentation
101
+ const columns: DataTableColumn<User>[] = [
102
+ { id: 'name', accessorKey: 'name', header: 'Name' },
103
+ { id: 'email', accessorKey: 'email', header: 'Email' },
104
+ ]
224
105
 
225
- Detailed documentation for each component:
106
+ <DataTable columns={columns} data={users} />
107
+ ```
226
108
 
227
- - [Calendar Documentation](./docs/CALENDAR.md)
228
- - [DatePicker Documentation](./docs/DATEPICKER.md)
229
- - [TimePicker Documentation](./docs/TIMEPICKER.md)
230
- - [DataTable Documentation](./docs/DATATABLE.md)
231
- - [Schedule Documentation](./docs/SCHEDULE.md)
232
- - [WeekNavigator Documentation](./docs/WEEKNAVIGATOR.md)
233
- - [DropdownMenu Documentation](./docs/DROPDOWN.md)
109
+ ### Time Picker
234
110
 
235
- ## 🎨 Customization
111
+ ```tsx
112
+ import { TimePicker } from '@ttianqii/takaui'
236
113
 
237
- ### Styling with Tailwind
114
+ <TimePicker value="14:30" onChange={setTime} />
115
+ ```
238
116
 
239
- All components accept a `className` prop for custom styling:
117
+ ### Button Variants
240
118
 
241
119
  ```tsx
242
- <Calendar
243
- className="rounded-lg shadow-lg border-2 border-blue-500"
244
- mode="single"
245
- selected={date}
246
- onSelect={setDate}
247
- />
248
- ```
120
+ import { Button } from '@ttianqii/takaui'
249
121
 
250
- ### Theming
122
+ <Button variant="default">Primary</Button>
123
+ <Button variant="destructive">Delete</Button>
124
+ <Button variant="outline">Outline</Button>
125
+ <Button variant="ghost">Ghost</Button>
126
+ ```
251
127
 
252
- TakaUI components use CSS variables for theming. You can customize colors in your global CSS:
128
+ ## 🛠️ Requirements
253
129
 
254
- ```css
255
- :root {
256
- --primary: 220 90% 56%;
257
- --primary-foreground: 0 0% 100%;
258
- --destructive: 0 84% 60%;
259
- /* Add more custom variables */
260
- }
261
- ```
130
+ - React 18.x or 19.x
131
+ - Tailwind CSS 3.x
132
+ - TypeScript (optional but recommended)
262
133
 
263
- ## 🔧 TypeScript Support
134
+ ## 🎨 Customization
264
135
 
265
- TakaUI is built with TypeScript and includes full type definitions. All props are fully typed for excellent IDE support.
136
+ All components accept `className` for custom styling:
266
137
 
267
138
  ```tsx
268
- import type { CalendarProps, DatePickerProps } from '@ttianqii/takaui'
139
+ <Button className="bg-purple-500 hover:bg-purple-600">
140
+ Custom Style
141
+ </Button>
269
142
  ```
270
143
 
271
- ## 📦 Tree Shaking
144
+ ## 📝 TypeScript Support
272
145
 
273
- TakaUI supports tree shaking. Import only the components you need:
146
+ TakaUI is built with TypeScript and includes full type definitions:
274
147
 
275
148
  ```tsx
276
- // Good - Only imports Calendar
277
- import { Calendar } from '@ttianqii/takaui'
278
-
279
- // Also works - Named imports
280
- import { Calendar, TimePicker, DataTable } from '@ttianqii/takaui'
149
+ import type {
150
+ ButtonProps,
151
+ DatePickerProps,
152
+ DataTableColumn,
153
+ } from '@ttianqii/takaui'
281
154
  ```
282
155
 
283
156
  ## 🤝 Contributing
284
157
 
285
- Contributions are welcome! Please feel free to submit a Pull Request.
158
+ Contributions welcome! Please open an issue or submit a PR on [GitHub](https://github.com/ttianqii/takaui).
286
159
 
287
160
  ## 📄 License
288
161
 
289
- MIT
162
+ MIT © [ttianqii](https://github.com/ttianqii)
290
163
 
291
164
  ## 🔗 Links
292
165
 
293
- - [GitHub Repository](https://github.com/ttianqii/takaui)
294
166
  - [npm Package](https://www.npmjs.com/package/@ttianqii/takaui)
295
-
296
- ## 📞 Support
297
-
298
- For issues and questions:
299
-
300
- - Open an issue on [GitHub](https://github.com/ttianqii/takaui/issues)
301
- - Check the [documentation](./docs/)
302
-
303
- ## 🎯 Roadmap
304
-
305
- - [ ] Additional form components (Switch, Radio, Slider)
306
- - [ ] Chart components
307
- - [ ] Toast notifications
308
- - [ ] Command palette
309
- - [ ] Theme switcher
310
- - [ ] More data display components
167
+ - [GitHub Repository](https://github.com/ttianqii/takaui)
168
+ - [Report Issues](https://github.com/ttianqii/takaui/issues)
311
169
 
312
170
  ---
313
171
 
314
- Made with ❤️ by [@ttianqii](https://github.com/ttianqii)
172
+ Made with ❤️ using React, TypeScript, and Tailwind CSS
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
2
2
  import { ClassValue } from 'clsx';
3
- import { Column } from '@tanstack/react-table';
4
3
  import { default as default_2 } from 'react';
5
4
  import * as DialogPrimitive from '@radix-ui/react-dialog';
6
5
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
@@ -10,7 +9,6 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
10
9
  import * as React_2 from 'react';
11
10
  import { ReactNode } from 'react';
12
11
  import * as SelectPrimitive from '@radix-ui/react-select';
13
- import { Table as Table_2 } from '@tanstack/react-table';
14
12
 
15
13
  export declare const Button: React_2.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
16
14
 
@@ -354,14 +352,6 @@ declare interface SeparatorProps extends React_2.HTMLAttributes<HTMLDivElement>
354
352
  decorative?: boolean;
355
353
  }
356
354
 
357
- export declare function SortableHeader<TData, TValue>({ column, title, align, className, }: SortableHeaderProps<TData, TValue>): JSX.Element;
358
-
359
- export declare interface SortableHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {
360
- column: Column<TData, TValue>;
361
- title: string;
362
- align?: "left" | "center" | "right";
363
- }
364
-
365
355
  export declare function Table({ className, variant, ...props }: React_2.ComponentProps<"table"> & {
366
356
  variant?: TableVariant;
367
357
  }): JSX.Element;
@@ -372,42 +362,16 @@ export declare function TableCaption({ className, ...props }: React_2.ComponentP
372
362
 
373
363
  export declare function TableCell({ className, ...props }: React_2.ComponentProps<"td">): JSX.Element;
374
364
 
375
- export declare function TableContent(): JSX.Element;
376
-
377
365
  export declare function TableFooter({ className, ...props }: React_2.ComponentProps<"tfoot">): JSX.Element;
378
366
 
379
367
  export declare function TableHead({ className, ...props }: React_2.ComponentProps<"th">): JSX.Element;
380
368
 
381
369
  export declare function TableHeader({ className, ...props }: React_2.ComponentProps<"thead">): JSX.Element;
382
370
 
383
- export declare function TableNavigator({ rowsPerPageOptions, showPageSelector, showRecordInfo, showControls, }?: TableNavigatorProps): JSX.Element;
384
-
385
- export declare interface TableNavigatorProps {
386
- rowsPerPageOptions?: number[];
387
- showPageSelector?: boolean;
388
- showRecordInfo?: boolean;
389
- showControls?: boolean;
390
- }
391
-
392
- export declare function TableRoot<TData>({ table, totalRecords, children }: TableRootProps<TData>): JSX.Element;
393
-
394
- declare interface TableRootProps<TData> {
395
- table: Table_2<TData>;
396
- totalRecords: number;
397
- children: React_2.ReactNode;
398
- }
399
-
400
371
  export declare function TableRow({ className, ...props }: React_2.ComponentProps<"tr">): JSX.Element;
401
372
 
402
373
  declare type TableVariant = "default" | "clean";
403
374
 
404
- export declare function TableWrapper({ children, className }: TableWrapperProps): JSX.Element;
405
-
406
- declare interface TableWrapperProps {
407
- children: React_2.ReactNode;
408
- className?: string;
409
- }
410
-
411
375
  export declare const TimePicker: default_2.FC<TimePickerProps>;
412
376
 
413
377
  declare interface TimePickerProps {