react-shadcn-kit 0.2.0 → 0.2.2
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 +90 -0
- package/dist/assets/global.css +1 -1
- package/dist/components/composites/ComponentSearch.js +141 -0
- package/dist/components/composites/ComponentSearch.js.map +1 -0
- package/dist/index.d.ts +1123 -10
- package/dist/index.js +374 -372
- package/dist/index.js.map +1 -1
- package/package.json +17 -20
- package/dist/components/composites/action-button.d.ts +0 -16
- package/dist/components/composites/index.d.ts +0 -8
- package/dist/components/composites/sidebar-wrapper.d.ts +0 -27
- package/dist/components/composites/theme-toggle.d.ts +0 -9
- package/dist/components/composites/user-menu.d.ts +0 -18
- package/dist/components/marketing/hero.d.ts +0 -12
- package/dist/components/marketing/index.d.ts +0 -6
- package/dist/components/marketing/social-proof.d.ts +0 -10
- package/dist/components/marketing/value-props.d.ts +0 -14
- package/dist/components/primitives/accordion.d.ts +0 -7
- package/dist/components/primitives/alert-dialog.d.ts +0 -14
- package/dist/components/primitives/alert.d.ts +0 -9
- package/dist/components/primitives/aspect-ratio.d.ts +0 -3
- package/dist/components/primitives/avatar.d.ts +0 -6
- package/dist/components/primitives/badge-variants.d.ts +0 -3
- package/dist/components/primitives/badge.d.ts +0 -9
- package/dist/components/primitives/breadcrumb.d.ts +0 -11
- package/dist/components/primitives/button-group-variants.d.ts +0 -3
- package/dist/components/primitives/button-group.d.ts +0 -13
- package/dist/components/primitives/button-variants.d.ts +0 -4
- package/dist/components/primitives/button.d.ts +0 -9
- package/dist/components/primitives/calendar.d.ts +0 -8
- package/dist/components/primitives/card.d.ts +0 -9
- package/dist/components/primitives/carousel.d.ts +0 -19
- package/dist/components/primitives/chart.d.ts +0 -53
- package/dist/components/primitives/checkbox.d.ts +0 -4
- package/dist/components/primitives/collapsible.d.ts +0 -5
- package/dist/components/primitives/command.d.ts +0 -18
- package/dist/components/primitives/context-menu.d.ts +0 -25
- package/dist/components/primitives/custom-button-variants.d.ts +0 -5
- package/dist/components/primitives/custom-button.d.ts +0 -22
- package/dist/components/primitives/dialog.d.ts +0 -15
- package/dist/components/primitives/drawer.d.ts +0 -13
- package/dist/components/primitives/dropdown-menu.d.ts +0 -25
- package/dist/components/primitives/empty.d.ts +0 -11
- package/dist/components/primitives/field.d.ts +0 -24
- package/dist/components/primitives/form-context.d.ts +0 -23
- package/dist/components/primitives/form.d.ts +0 -11
- package/dist/components/primitives/hover-card.d.ts +0 -6
- package/dist/components/primitives/index.d.ts +0 -116
- package/dist/components/primitives/input-group.d.ts +0 -16
- package/dist/components/primitives/input-otp.d.ts +0 -11
- package/dist/components/primitives/input.d.ts +0 -3
- package/dist/components/primitives/item.d.ts +0 -23
- package/dist/components/primitives/kbd.d.ts +0 -3
- package/dist/components/primitives/label.d.ts +0 -4
- package/dist/components/primitives/loading-swap.d.ts +0 -8
- package/dist/components/primitives/menubar.d.ts +0 -26
- package/dist/components/primitives/navigation-menu-variants.d.ts +0 -1
- package/dist/components/primitives/navigation-menu.d.ts +0 -13
- package/dist/components/primitives/pagination.d.ts +0 -13
- package/dist/components/primitives/popover.d.ts +0 -7
- package/dist/components/primitives/progress.d.ts +0 -4
- package/dist/components/primitives/radio-group.d.ts +0 -5
- package/dist/components/primitives/resizable.d.ts +0 -8
- package/dist/components/primitives/scroll-area.d.ts +0 -5
- package/dist/components/primitives/select.d.ts +0 -15
- package/dist/components/primitives/separator.d.ts +0 -4
- package/dist/components/primitives/sheet.d.ts +0 -13
- package/dist/components/primitives/sidebar-context.d.ts +0 -12
- package/dist/components/primitives/sidebar-variants.d.ts +0 -4
- package/dist/components/primitives/sidebar.d.ts +0 -56
- package/dist/components/primitives/skeleton.d.ts +0 -2
- package/dist/components/primitives/slider.d.ts +0 -4
- package/dist/components/primitives/sonner.d.ts +0 -3
- package/dist/components/primitives/spinner.d.ts +0 -2
- package/dist/components/primitives/switch.d.ts +0 -4
- package/dist/components/primitives/table.d.ts +0 -10
- package/dist/components/primitives/tabs.d.ts +0 -7
- package/dist/components/primitives/textarea.d.ts +0 -3
- package/dist/components/primitives/theme-provider.d.ts +0 -3
- package/dist/components/primitives/toggle-group.d.ts +0 -9
- package/dist/components/primitives/toggle-variants.d.ts +0 -4
- package/dist/components/primitives/toggle.d.ts +0 -9
- package/dist/components/primitives/tooltip.d.ts +0 -7
- package/dist/composites/index.js +0 -11
- package/dist/composites/index.js.map +0 -1
- package/dist/hooks/index.d.ts +0 -8
- package/dist/hooks/index.js +0 -11
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/use-aria-live.d.ts +0 -22
- package/dist/hooks/use-focus-visible.d.ts +0 -15
- package/dist/hooks/use-mobile.d.ts +0 -1
- package/dist/hooks/use-screen-reader-only.d.ts +0 -14
- package/dist/lib/index.d.ts +0 -4
- package/dist/lib/index.js +0 -11
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/utils-enhanced.d.ts +0 -27
- package/dist/lib/utils-enhanced.test.d.ts +0 -1
- package/dist/lib/utils.d.ts +0 -2
- package/dist/marketing/index.js +0 -9
- package/dist/marketing/index.js.map +0 -1
- package/dist/primitives/index.js +0 -345
- package/dist/primitives/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -9,6 +9,7 @@ A state-of-the-art, high-performance UI library built with **React 19**, **Tailw
|
|
|
9
9
|
- **⚡ Performance First**: Zero Tailwind runtime overhead, optimized build pipeline, and light-weight exports.
|
|
10
10
|
- **🛡️ Type Safety**: Full TypeScript support with strict mode and exported types for every component.
|
|
11
11
|
- **🌟 Interactive Elements**: Advanced components like `ActionButton` with built-in transitions and `CustomButton` with rich hover effects.
|
|
12
|
+
- **📊 Data Components**: Production-ready `Kanban` board with drag-and-drop and `DataTable` with sorting, filtering, and pagination.
|
|
12
13
|
- **📣 Accessibility**: Built-in ARIA hooks and screen-reader utilities.
|
|
13
14
|
|
|
14
15
|
## 📦 Installation
|
|
@@ -77,6 +78,95 @@ const date = formatDate(new Date()); // "Oct 24, 2023"
|
|
|
77
78
|
const slug = generateSlug("Hello World!"); // "hello-world"
|
|
78
79
|
```
|
|
79
80
|
|
|
81
|
+
### 📋 Kanban Board
|
|
82
|
+
|
|
83
|
+
Build interactive task boards with drag-and-drop functionality.
|
|
84
|
+
|
|
85
|
+
```tsx
|
|
86
|
+
import { Kanban, type KanbanItem, type KanbanColumnDef } from "react-shadcn-kit/composites";
|
|
87
|
+
|
|
88
|
+
interface Task extends KanbanItem {
|
|
89
|
+
title: string;
|
|
90
|
+
description?: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const columns: KanbanColumnDef[] = [
|
|
94
|
+
{ id: "todo", title: "To Do" },
|
|
95
|
+
{ id: "in-progress", title: "In Progress" },
|
|
96
|
+
{ id: "done", title: "Done" },
|
|
97
|
+
];
|
|
98
|
+
|
|
99
|
+
const tasks: Task[] = [
|
|
100
|
+
{ id: "1", status: "todo", title: "Design homepage", description: "Create mockups" },
|
|
101
|
+
{ id: "2", status: "in-progress", title: "Build API", description: "REST endpoints" },
|
|
102
|
+
];
|
|
103
|
+
|
|
104
|
+
<Kanban
|
|
105
|
+
items={tasks}
|
|
106
|
+
columns={columns}
|
|
107
|
+
onItemUpdate={(itemId, newStatus) => {
|
|
108
|
+
// Handle status update
|
|
109
|
+
console.log(`Task ${itemId} moved to ${newStatus}`);
|
|
110
|
+
}}
|
|
111
|
+
onItemClick={(item) => {
|
|
112
|
+
// Handle card click
|
|
113
|
+
console.log("Clicked:", item);
|
|
114
|
+
}}
|
|
115
|
+
/>;
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 📊 Data Table
|
|
119
|
+
|
|
120
|
+
Advanced data tables with sorting, filtering, and pagination.
|
|
121
|
+
|
|
122
|
+
```tsx
|
|
123
|
+
import { DataTable, DataTableColumnHeader } from "react-shadcn-kit/composites";
|
|
124
|
+
import { ColumnDef } from "@tanstack/react-table";
|
|
125
|
+
|
|
126
|
+
type Payment = {
|
|
127
|
+
id: string;
|
|
128
|
+
amount: number;
|
|
129
|
+
status: "pending" | "processing" | "success" | "failed";
|
|
130
|
+
email: string;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
const columns: ColumnDef<Payment>[] = [
|
|
134
|
+
{
|
|
135
|
+
accessorKey: "email",
|
|
136
|
+
header: ({ column }) => <DataTableColumnHeader column={column} title="Email" />,
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
accessorKey: "amount",
|
|
140
|
+
header: "Amount",
|
|
141
|
+
cell: ({ row }) => {
|
|
142
|
+
const amount = parseFloat(row.getValue("amount"));
|
|
143
|
+
return new Intl.NumberFormat("en-US", {
|
|
144
|
+
style: "currency",
|
|
145
|
+
currency: "USD",
|
|
146
|
+
}).format(amount);
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
];
|
|
150
|
+
|
|
151
|
+
const data: Payment[] = [{ id: "1", amount: 100, status: "success", email: "user@example.com" }];
|
|
152
|
+
|
|
153
|
+
<DataTable
|
|
154
|
+
columns={columns}
|
|
155
|
+
data={data}
|
|
156
|
+
searchKey="email"
|
|
157
|
+
facetedFilters={[
|
|
158
|
+
{
|
|
159
|
+
columnId: "status",
|
|
160
|
+
title: "Status",
|
|
161
|
+
options: [
|
|
162
|
+
{ label: "Success", value: "success" },
|
|
163
|
+
{ label: "Pending", value: "pending" },
|
|
164
|
+
],
|
|
165
|
+
},
|
|
166
|
+
]}
|
|
167
|
+
/>;
|
|
168
|
+
```
|
|
169
|
+
|
|
80
170
|
## 🛠️ Development
|
|
81
171
|
|
|
82
172
|
Run the playground locally:
|