@hanzo/ui 5.3.28 → 5.3.30

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.
Files changed (229) hide show
  1. package/dist/3d/button.js +298 -0
  2. package/dist/3d/button.mjs +273 -0
  3. package/dist/3d/card.js +234 -0
  4. package/dist/3d/card.mjs +207 -0
  5. package/dist/3d/carousel.js +371 -0
  6. package/dist/3d/carousel.mjs +344 -0
  7. package/dist/3d/grid.js +362 -0
  8. package/dist/3d/grid.mjs +337 -0
  9. package/dist/3d/index.js +1518 -0
  10. package/dist/3d/index.mjs +1472 -0
  11. package/dist/3d/marquee.js +352 -0
  12. package/dist/3d/marquee.mjs +327 -0
  13. package/dist/3d/pin.js +46 -0
  14. package/dist/3d/pin.mjs +24 -0
  15. package/dist/accordion.js +80 -0
  16. package/dist/accordion.mjs +55 -0
  17. package/dist/alert-dialog.js +220 -0
  18. package/dist/alert-dialog.mjs +187 -0
  19. package/dist/alert.js +68 -0
  20. package/dist/alert.mjs +64 -0
  21. package/dist/animation/animated-background.js +424 -0
  22. package/dist/animation/animated-background.mjs +418 -0
  23. package/dist/animation/animated-beam.js +119 -0
  24. package/dist/animation/animated-beam.mjs +97 -0
  25. package/dist/animation/animated-cursor.js +275 -0
  26. package/dist/animation/animated-cursor.mjs +270 -0
  27. package/dist/animation/animated-icon.js +357 -0
  28. package/dist/animation/animated-icon.mjs +351 -0
  29. package/dist/animation/animated-list.js +339 -0
  30. package/dist/animation/animated-list.mjs +333 -0
  31. package/dist/animation/animated-number.js +283 -0
  32. package/dist/animation/animated-number.mjs +277 -0
  33. package/dist/animation/animated-testimonials.js +97 -0
  34. package/dist/animation/animated-testimonials.mjs +75 -0
  35. package/dist/animation/animated-tooltip.js +67 -0
  36. package/dist/animation/animated-tooltip.mjs +45 -0
  37. package/dist/animation/apple-cards-carousel.js +308 -0
  38. package/dist/animation/apple-cards-carousel.mjs +285 -0
  39. package/dist/animation/apple-hello-effect.js +60 -0
  40. package/dist/animation/apple-hello-effect.mjs +38 -0
  41. package/dist/animation/index.js +1952 -0
  42. package/dist/animation/index.mjs +1921 -0
  43. package/dist/avatar.js +71 -0
  44. package/dist/avatar.mjs +47 -0
  45. package/dist/badge.js +66 -0
  46. package/dist/badge.mjs +40 -0
  47. package/dist/blocks/index.js +1665 -0
  48. package/dist/blocks/index.mjs +1626 -0
  49. package/dist/breadcrumb.js +107 -0
  50. package/dist/breadcrumb.mjs +99 -0
  51. package/dist/calendar.js +189 -0
  52. package/dist/calendar.mjs +164 -0
  53. package/dist/carousel.js +278 -0
  54. package/dist/carousel.mjs +249 -0
  55. package/dist/checkbox.js +60 -0
  56. package/dist/checkbox.mjs +35 -0
  57. package/dist/code/block.js +226 -0
  58. package/dist/code/block.mjs +203 -0
  59. package/dist/code/compare.js +446 -0
  60. package/dist/code/compare.mjs +423 -0
  61. package/dist/code/diff.js +430 -0
  62. package/dist/code/diff.mjs +407 -0
  63. package/dist/code/editor.js +243 -0
  64. package/dist/code/editor.mjs +218 -0
  65. package/dist/code/explorer.js +291 -0
  66. package/dist/code/explorer.mjs +268 -0
  67. package/dist/code/index.js +2551 -0
  68. package/dist/code/index.mjs +2510 -0
  69. package/dist/code/preview.js +400 -0
  70. package/dist/code/preview.mjs +377 -0
  71. package/dist/code/snippet.js +274 -0
  72. package/dist/code/snippet.mjs +250 -0
  73. package/dist/code/tabs.js +75 -0
  74. package/dist/code/tabs.mjs +53 -0
  75. package/dist/code/terminal.js +437 -0
  76. package/dist/code/terminal.mjs +414 -0
  77. package/dist/collapsible.js +33 -0
  78. package/dist/collapsible.mjs +9 -0
  79. package/dist/command.js +262 -0
  80. package/dist/command.mjs +232 -0
  81. package/dist/context-menu.js +207 -0
  82. package/dist/context-menu.mjs +171 -0
  83. package/dist/device/index.js +3 -0
  84. package/dist/device/index.mjs +2 -0
  85. package/dist/dialog.js +151 -0
  86. package/dist/dialog.mjs +121 -0
  87. package/dist/dock/basic.js +174 -0
  88. package/dist/dock/basic.mjs +151 -0
  89. package/dist/dock/index.js +628 -0
  90. package/dist/dock/index.mjs +601 -0
  91. package/dist/dock/limelight-nav.js +295 -0
  92. package/dist/dock/limelight-nav.mjs +274 -0
  93. package/dist/dock/macos.js +141 -0
  94. package/dist/dock/macos.mjs +118 -0
  95. package/dist/dock/menu.js +70 -0
  96. package/dist/dock/menu.mjs +48 -0
  97. package/dist/dock/message.js +144 -0
  98. package/dist/dock/message.mjs +122 -0
  99. package/dist/drawer.js +115 -0
  100. package/dist/drawer.mjs +103 -0
  101. package/dist/dropdown-menu.js +202 -0
  102. package/dist/dropdown-menu.mjs +166 -0
  103. package/dist/finance/AdvancedChart.js +48 -0
  104. package/dist/finance/AdvancedChart.mjs +46 -0
  105. package/dist/finance/CompanyProfile.js +48 -0
  106. package/dist/finance/CompanyProfile.mjs +46 -0
  107. package/dist/finance/CryptoScreener.js +45 -0
  108. package/dist/finance/CryptoScreener.mjs +43 -0
  109. package/dist/finance/Financials.js +52 -0
  110. package/dist/finance/Financials.mjs +50 -0
  111. package/dist/finance/ForexScreener.js +46 -0
  112. package/dist/finance/ForexScreener.mjs +44 -0
  113. package/dist/finance/MarketOverview.js +104 -0
  114. package/dist/finance/MarketOverview.mjs +102 -0
  115. package/dist/finance/NewsTimeline.js +44 -0
  116. package/dist/finance/NewsTimeline.mjs +42 -0
  117. package/dist/finance/OrderEntry.js +131 -0
  118. package/dist/finance/OrderEntry.mjs +129 -0
  119. package/dist/finance/OrdersHistory.js +64 -0
  120. package/dist/finance/OrdersHistory.mjs +62 -0
  121. package/dist/finance/PositionsList.js +80 -0
  122. package/dist/finance/PositionsList.mjs +78 -0
  123. package/dist/finance/StockScreener.js +46 -0
  124. package/dist/finance/StockScreener.mjs +44 -0
  125. package/dist/finance/SymbolInfo.js +46 -0
  126. package/dist/finance/SymbolInfo.mjs +44 -0
  127. package/dist/finance/TechnicalAnalysis.js +54 -0
  128. package/dist/finance/TechnicalAnalysis.mjs +52 -0
  129. package/dist/finance/TickerTape.js +56 -0
  130. package/dist/finance/TickerTape.mjs +54 -0
  131. package/dist/finance/TradingPanel.js +191 -0
  132. package/dist/finance/TradingPanel.mjs +189 -0
  133. package/dist/finance/index.js +930 -0
  134. package/dist/finance/index.mjs +914 -0
  135. package/dist/form/index.js +155 -0
  136. package/dist/form/index.mjs +125 -0
  137. package/dist/form.js +172 -0
  138. package/dist/form.mjs +142 -0
  139. package/dist/hover-card.js +58 -0
  140. package/dist/hover-card.mjs +34 -0
  141. package/dist/index.js +8467 -0
  142. package/dist/index.mjs +8087 -0
  143. package/dist/input-otp.js +79 -0
  144. package/dist/input-otp.mjs +54 -0
  145. package/dist/lib/utils.js +28 -0
  146. package/dist/lib/utils.mjs +24 -0
  147. package/dist/navigation/index.js +98 -0
  148. package/dist/navigation/index.mjs +79 -0
  149. package/dist/navigation-menu.js +149 -0
  150. package/dist/navigation-menu.mjs +116 -0
  151. package/dist/pattern/grid-pattern.js +333 -0
  152. package/dist/pattern/grid-pattern.mjs +310 -0
  153. package/dist/pattern/index.js +333 -0
  154. package/dist/pattern/index.mjs +310 -0
  155. package/dist/popover.js +63 -0
  156. package/dist/popover.mjs +37 -0
  157. package/dist/primitives/index.js +8467 -0
  158. package/dist/primitives/index.mjs +8087 -0
  159. package/dist/primitives-export.js +8467 -0
  160. package/dist/primitives-export.mjs +8087 -0
  161. package/dist/progress.js +62 -0
  162. package/dist/progress.mjs +37 -0
  163. package/dist/project/gantt.js +65 -0
  164. package/dist/project/gantt.mjs +43 -0
  165. package/dist/project/index.js +636 -0
  166. package/dist/project/index.mjs +611 -0
  167. package/dist/project/kanban.js +597 -0
  168. package/dist/project/kanban.mjs +572 -0
  169. package/dist/project/list.js +35 -0
  170. package/dist/project/list.mjs +12 -0
  171. package/dist/radio-group.js +68 -0
  172. package/dist/radio-group.mjs +45 -0
  173. package/dist/resizable.js +72 -0
  174. package/dist/resizable.mjs +48 -0
  175. package/dist/scroll-area.js +89 -0
  176. package/dist/scroll-area.mjs +66 -0
  177. package/dist/select.js +140 -0
  178. package/dist/select.mjs +111 -0
  179. package/dist/separator.js +59 -0
  180. package/dist/separator.mjs +34 -0
  181. package/dist/sheet.js +148 -0
  182. package/dist/sheet.mjs +117 -0
  183. package/dist/skeleton.js +32 -0
  184. package/dist/skeleton.mjs +27 -0
  185. package/dist/slider.js +99 -0
  186. package/dist/slider.mjs +73 -0
  187. package/dist/sonner.js +34 -0
  188. package/dist/sonner.mjs +29 -0
  189. package/dist/switch.js +62 -0
  190. package/dist/switch.mjs +37 -0
  191. package/dist/table.js +110 -0
  192. package/dist/table.mjs +101 -0
  193. package/dist/tabs.js +82 -0
  194. package/dist/tabs.mjs +57 -0
  195. package/dist/tailwind/index.js +2023 -0
  196. package/dist/tailwind/index.mjs +2011 -0
  197. package/dist/textarea.js +78 -0
  198. package/dist/textarea.mjs +56 -0
  199. package/dist/toggle-group.js +118 -0
  200. package/dist/toggle-group.mjs +93 -0
  201. package/dist/toggle.js +71 -0
  202. package/dist/toggle.mjs +48 -0
  203. package/dist/tooltip.js +67 -0
  204. package/dist/tooltip.mjs +40 -0
  205. package/dist/types/index.js +57 -0
  206. package/dist/types/index.mjs +51 -0
  207. package/dist/ui/announcement.js +129 -0
  208. package/dist/ui/announcement.mjs +107 -0
  209. package/dist/ui/avatar-group.js +88 -0
  210. package/dist/ui/avatar-group.mjs +65 -0
  211. package/dist/ui/banner.js +85 -0
  212. package/dist/ui/banner.mjs +62 -0
  213. package/dist/ui/cursor.js +78 -0
  214. package/dist/ui/cursor.mjs +56 -0
  215. package/dist/ui/index.js +475 -0
  216. package/dist/ui/index.mjs +442 -0
  217. package/dist/ui/marquee.js +74 -0
  218. package/dist/ui/marquee.mjs +52 -0
  219. package/dist/ui/pill.js +85 -0
  220. package/dist/ui/pill.mjs +62 -0
  221. package/dist/ui/spinner.js +28 -0
  222. package/dist/ui/spinner.mjs +26 -0
  223. package/dist/ui/tags.js +101 -0
  224. package/dist/ui/tags.mjs +79 -0
  225. package/dist/ui/ticker.js +73 -0
  226. package/dist/ui/ticker.mjs +51 -0
  227. package/dist/util/index.js +463 -0
  228. package/dist/util/index.mjs +404 -0
  229. package/package.json +1 -1
@@ -0,0 +1,572 @@
1
+ "use client";
2
+ import * as React from 'react';
3
+ import { useSensors, useSensor, PointerSensor, DndContext, closestCorners, DragOverlay } from '@dnd-kit/core';
4
+ import { arrayMove, useSortable, SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';
5
+ import { CSS } from '@dnd-kit/utilities';
6
+ import { cva } from 'class-variance-authority';
7
+ import { Search, User, Calendar, MoreHorizontal, Edit3, X, Plus } from 'lucide-react';
8
+ import { cn } from '@hanzo/ui/lib/utils';
9
+ import { Badge } from '@hanzo/ui/primitives/badge';
10
+ import { Button } from '@hanzo/ui/primitives/button';
11
+ import { Card, CardHeader } from '@hanzo/ui/primitives/card';
12
+ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from '@hanzo/ui/primitives/dialog';
13
+ import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from '@hanzo/ui/primitives/dropdown-menu';
14
+ import { Input } from '@hanzo/ui/primitives/input';
15
+ import { Label } from '@hanzo/ui/primitives/label';
16
+ import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '@hanzo/ui/primitives/select';
17
+ import { Textarea } from '@hanzo/ui/primitives/textarea';
18
+ import { jsxs, jsx } from 'react/jsx-runtime';
19
+
20
+ var __defProp = Object.defineProperty;
21
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
22
+ var priorityVariants = cva(
23
+ "inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-semibold",
24
+ {
25
+ variants: {
26
+ priority: {
27
+ low: "border-blue-200 bg-blue-50 text-blue-700 dark:border-blue-800 dark:bg-blue-900/20 dark:text-blue-400",
28
+ medium: "border-yellow-200 bg-yellow-50 text-yellow-700 dark:border-yellow-800 dark:bg-yellow-900/20 dark:text-yellow-400",
29
+ high: "border-orange-200 bg-orange-50 text-orange-700 dark:border-orange-800 dark:bg-orange-900/20 dark:text-orange-400",
30
+ urgent: "border-red-200 bg-red-50 text-red-700 dark:border-red-800 dark:bg-red-900/20 dark:text-red-400"
31
+ }
32
+ },
33
+ defaultVariants: {
34
+ priority: "low"
35
+ }
36
+ }
37
+ );
38
+ function SortableCard({
39
+ card,
40
+ onEdit,
41
+ onDelete
42
+ }) {
43
+ const {
44
+ attributes,
45
+ listeners,
46
+ setNodeRef,
47
+ transform,
48
+ transition,
49
+ isDragging
50
+ } = useSortable({ id: card.id });
51
+ const style = {
52
+ transform: CSS.Transform.toString(transform),
53
+ transition
54
+ };
55
+ return /* @__PURE__ */ jsx(
56
+ "div",
57
+ {
58
+ ref: setNodeRef,
59
+ style,
60
+ ...attributes,
61
+ ...listeners,
62
+ className: cn(
63
+ "cursor-grab active:cursor-grabbing",
64
+ isDragging && "opacity-50"
65
+ ),
66
+ children: /* @__PURE__ */ jsx(KanbanCardComponent, { card, onEdit, onDelete })
67
+ }
68
+ );
69
+ }
70
+ __name(SortableCard, "SortableCard");
71
+ function KanbanCardComponent({
72
+ card,
73
+ onEdit,
74
+ onDelete
75
+ }) {
76
+ return /* @__PURE__ */ jsx(Card, { className: "mb-3 group hover:shadow-md transition-shadow", children: /* @__PURE__ */ jsx(CardHeader, { className: "pb-3", children: /* @__PURE__ */ jsx("div", { className: "flex items-start justify-between", children: /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
77
+ /* @__PURE__ */ jsx("h4", { className: "font-medium text-sm leading-tight mb-2 break-words", children: card.title }),
78
+ card.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground line-clamp-2 mb-2", children: card.description }),
79
+ card.labels && card.labels.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 mb-2", children: card.labels.map((label) => /* @__PURE__ */ jsx(
80
+ Badge,
81
+ {
82
+ variant: "outline",
83
+ className: "text-xs h-5",
84
+ style: {
85
+ backgroundColor: `${label.color}20`,
86
+ borderColor: label.color,
87
+ color: label.color
88
+ },
89
+ children: label.name
90
+ },
91
+ label.id
92
+ )) }),
93
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-xs", children: [
94
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
95
+ card.priority && /* @__PURE__ */ jsx(
96
+ "span",
97
+ {
98
+ className: cn(
99
+ priorityVariants({ priority: card.priority })
100
+ ),
101
+ children: card.priority
102
+ }
103
+ ),
104
+ card.assignee && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-muted-foreground", children: [
105
+ /* @__PURE__ */ jsx(User, { className: "h-3 w-3" }),
106
+ /* @__PURE__ */ jsx("span", { children: card.assignee })
107
+ ] })
108
+ ] }),
109
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
110
+ card.dueDate && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-muted-foreground", children: [
111
+ /* @__PURE__ */ jsx(Calendar, { className: "h-3 w-3" }),
112
+ /* @__PURE__ */ jsx("span", { children: new Date(card.dueDate).toLocaleDateString() })
113
+ ] }),
114
+ /* @__PURE__ */ jsxs(DropdownMenu, { children: [
115
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
116
+ Button,
117
+ {
118
+ variant: "ghost",
119
+ size: "icon",
120
+ className: "h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity",
121
+ children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-3 w-3" })
122
+ }
123
+ ) }),
124
+ /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", children: [
125
+ /* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => onEdit(card), children: [
126
+ /* @__PURE__ */ jsx(Edit3, { className: "h-4 w-4 mr-2" }),
127
+ "Edit"
128
+ ] }),
129
+ /* @__PURE__ */ jsxs(
130
+ DropdownMenuItem,
131
+ {
132
+ onClick: () => onDelete(card.id),
133
+ className: "text-destructive",
134
+ children: [
135
+ /* @__PURE__ */ jsx(X, { className: "h-4 w-4 mr-2" }),
136
+ "Delete"
137
+ ]
138
+ }
139
+ )
140
+ ] })
141
+ ] })
142
+ ] })
143
+ ] })
144
+ ] }) }) }) });
145
+ }
146
+ __name(KanbanCardComponent, "KanbanCardComponent");
147
+ function KanbanColumnComponent({
148
+ column,
149
+ onAddCard,
150
+ onEditCard,
151
+ onDeleteCard
152
+ }) {
153
+ const { setNodeRef } = useSortable({ id: column.id });
154
+ return /* @__PURE__ */ jsxs(
155
+ "div",
156
+ {
157
+ ref: setNodeRef,
158
+ className: "bg-muted/50 rounded-lg p-4 min-w-[280px] max-w-[280px] flex flex-col",
159
+ children: [
160
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-4", children: [
161
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
162
+ /* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm", children: column.title }),
163
+ /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "text-xs", children: [
164
+ column.cards.length,
165
+ column.limit && `/${column.limit}`
166
+ ] })
167
+ ] }),
168
+ /* @__PURE__ */ jsx(
169
+ Button,
170
+ {
171
+ variant: "ghost",
172
+ size: "icon",
173
+ className: "h-8 w-8",
174
+ onClick: () => onAddCard(column.id),
175
+ children: /* @__PURE__ */ jsx(Plus, { className: "h-4 w-4" })
176
+ }
177
+ )
178
+ ] }),
179
+ /* @__PURE__ */ jsx(
180
+ SortableContext,
181
+ {
182
+ items: column.cards.map((card) => card.id),
183
+ strategy: verticalListSortingStrategy,
184
+ children: /* @__PURE__ */ jsx("div", { className: "flex-1 min-h-[200px]", children: column.cards.map((card) => /* @__PURE__ */ jsx(
185
+ SortableCard,
186
+ {
187
+ card,
188
+ onEdit: onEditCard,
189
+ onDelete: onDeleteCard
190
+ },
191
+ card.id
192
+ )) })
193
+ }
194
+ )
195
+ ]
196
+ }
197
+ );
198
+ }
199
+ __name(KanbanColumnComponent, "KanbanColumnComponent");
200
+ function CardFormDialog({
201
+ open,
202
+ onOpenChange,
203
+ card,
204
+ onSave,
205
+ labels
206
+ }) {
207
+ const [formData, setFormData] = React.useState({
208
+ title: card?.title || "",
209
+ description: card?.description || "",
210
+ priority: card?.priority || "low",
211
+ assignee: card?.assignee || "",
212
+ dueDate: card?.dueDate || "",
213
+ labels: card?.labels?.map((l) => l.id) || []
214
+ });
215
+ const handleSubmit = /* @__PURE__ */ __name((e) => {
216
+ e.preventDefault();
217
+ if (!formData.title.trim()) return;
218
+ onSave({
219
+ ...card,
220
+ ...formData,
221
+ labels: labels.filter((l) => formData.labels.includes(l.id)),
222
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
223
+ });
224
+ onOpenChange(false);
225
+ }, "handleSubmit");
226
+ React.useEffect(() => {
227
+ if (card) {
228
+ setFormData({
229
+ title: card.title,
230
+ description: card.description || "",
231
+ priority: card.priority || "low",
232
+ assignee: card.assignee || "",
233
+ dueDate: card.dueDate || "",
234
+ labels: card.labels?.map((l) => l.id) || []
235
+ });
236
+ } else {
237
+ setFormData({
238
+ title: "",
239
+ description: "",
240
+ priority: "low",
241
+ assignee: "",
242
+ dueDate: "",
243
+ labels: []
244
+ });
245
+ }
246
+ }, [card]);
247
+ return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-md", children: [
248
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [
249
+ /* @__PURE__ */ jsx(DialogTitle, { children: card ? "Edit Card" : "Create Card" }),
250
+ /* @__PURE__ */ jsx(DialogDescription, { children: card ? "Update the card details below." : "Create a new card for your kanban board." })
251
+ ] }),
252
+ /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className: "space-y-4", children: [
253
+ /* @__PURE__ */ jsxs("div", { children: [
254
+ /* @__PURE__ */ jsx(Label, { htmlFor: "title", children: "Title *" }),
255
+ /* @__PURE__ */ jsx(
256
+ Input,
257
+ {
258
+ id: "title",
259
+ value: formData.title,
260
+ onChange: (e) => setFormData((prev) => ({ ...prev, title: e.target.value })),
261
+ placeholder: "Enter card title...",
262
+ required: true
263
+ }
264
+ )
265
+ ] }),
266
+ /* @__PURE__ */ jsxs("div", { children: [
267
+ /* @__PURE__ */ jsx(Label, { htmlFor: "description", children: "Description" }),
268
+ /* @__PURE__ */ jsx(
269
+ Textarea,
270
+ {
271
+ id: "description",
272
+ value: formData.description,
273
+ onChange: (e) => setFormData((prev) => ({
274
+ ...prev,
275
+ description: e.target.value
276
+ })),
277
+ placeholder: "Enter card description...",
278
+ rows: 3
279
+ }
280
+ )
281
+ ] }),
282
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
283
+ /* @__PURE__ */ jsxs("div", { children: [
284
+ /* @__PURE__ */ jsx(Label, { htmlFor: "priority", children: "Priority" }),
285
+ /* @__PURE__ */ jsxs(
286
+ Select,
287
+ {
288
+ value: formData.priority,
289
+ onValueChange: (value) => setFormData((prev) => ({ ...prev, priority: value })),
290
+ children: [
291
+ /* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(SelectValue, {}) }),
292
+ /* @__PURE__ */ jsxs(SelectContent, { children: [
293
+ /* @__PURE__ */ jsx(SelectItem, { value: "low", children: "Low" }),
294
+ /* @__PURE__ */ jsx(SelectItem, { value: "medium", children: "Medium" }),
295
+ /* @__PURE__ */ jsx(SelectItem, { value: "high", children: "High" }),
296
+ /* @__PURE__ */ jsx(SelectItem, { value: "urgent", children: "Urgent" })
297
+ ] })
298
+ ]
299
+ }
300
+ )
301
+ ] }),
302
+ /* @__PURE__ */ jsxs("div", { children: [
303
+ /* @__PURE__ */ jsx(Label, { htmlFor: "assignee", children: "Assignee" }),
304
+ /* @__PURE__ */ jsx(
305
+ Input,
306
+ {
307
+ id: "assignee",
308
+ value: formData.assignee,
309
+ onChange: (e) => setFormData((prev) => ({ ...prev, assignee: e.target.value })),
310
+ placeholder: "Assign to..."
311
+ }
312
+ )
313
+ ] })
314
+ ] }),
315
+ /* @__PURE__ */ jsxs("div", { children: [
316
+ /* @__PURE__ */ jsx(Label, { htmlFor: "dueDate", children: "Due Date" }),
317
+ /* @__PURE__ */ jsx(
318
+ Input,
319
+ {
320
+ id: "dueDate",
321
+ type: "date",
322
+ value: formData.dueDate,
323
+ onChange: (e) => setFormData((prev) => ({ ...prev, dueDate: e.target.value }))
324
+ }
325
+ )
326
+ ] }),
327
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [
328
+ /* @__PURE__ */ jsx(
329
+ Button,
330
+ {
331
+ type: "button",
332
+ variant: "outline",
333
+ onClick: () => onOpenChange(false),
334
+ children: "Cancel"
335
+ }
336
+ ),
337
+ /* @__PURE__ */ jsxs(Button, { type: "submit", children: [
338
+ card ? "Update" : "Create",
339
+ " Card"
340
+ ] })
341
+ ] })
342
+ ] })
343
+ ] }) });
344
+ }
345
+ __name(CardFormDialog, "CardFormDialog");
346
+ function KanbanBoard({
347
+ board,
348
+ onUpdateBoard,
349
+ className
350
+ }) {
351
+ const [activeCard, setActiveCard] = React.useState(null);
352
+ const [searchQuery, setSearchQuery] = React.useState("");
353
+ const [cardFormOpen, setCardFormOpen] = React.useState(false);
354
+ const [editingCard, setEditingCard] = React.useState(
355
+ void 0
356
+ );
357
+ const [activeColumnId, setActiveColumnId] = React.useState("");
358
+ const sensors = useSensors(
359
+ useSensor(PointerSensor, {
360
+ activationConstraint: {
361
+ distance: 8
362
+ }
363
+ })
364
+ );
365
+ const filteredBoard = React.useMemo(() => {
366
+ if (!searchQuery.trim()) return board;
367
+ const filtered = {
368
+ ...board,
369
+ columns: board.columns.map((column) => ({
370
+ ...column,
371
+ cards: column.cards.filter(
372
+ (card) => card.title.toLowerCase().includes(searchQuery.toLowerCase()) || card.description?.toLowerCase().includes(searchQuery.toLowerCase()) || card.labels?.some(
373
+ (label) => label.name.toLowerCase().includes(searchQuery.toLowerCase())
374
+ )
375
+ )
376
+ }))
377
+ };
378
+ return filtered;
379
+ }, [board, searchQuery]);
380
+ const handleDragStart = /* @__PURE__ */ __name((event) => {
381
+ const { active } = event;
382
+ const card = board.columns.flatMap((col) => col.cards).find((card2) => card2.id === active.id);
383
+ setActiveCard(card || null);
384
+ }, "handleDragStart");
385
+ const handleDragOver = /* @__PURE__ */ __name((event) => {
386
+ const { active, over } = event;
387
+ if (!over) return;
388
+ const activeId = active.id;
389
+ const overId = over.id;
390
+ const activeContainer = findContainer(activeId);
391
+ const overContainer = findContainer(overId);
392
+ if (!activeContainer || !overContainer || activeContainer === overContainer) {
393
+ return;
394
+ }
395
+ const updatedBoard = { ...board };
396
+ const activeColumnIndex = updatedBoard.columns.findIndex(
397
+ (col) => col.id === activeContainer
398
+ );
399
+ const overColumnIndex = updatedBoard.columns.findIndex(
400
+ (col) => col.id === overContainer
401
+ );
402
+ const activeColumn = updatedBoard.columns[activeColumnIndex];
403
+ const overColumn = updatedBoard.columns[overColumnIndex];
404
+ const activeCardIndex = activeColumn.cards.findIndex(
405
+ (card) => card.id === activeId
406
+ );
407
+ const [movedCard] = activeColumn.cards.splice(activeCardIndex, 1);
408
+ if (overColumn.limit && overColumn.cards.length >= overColumn.limit) {
409
+ return;
410
+ }
411
+ overColumn.cards.push(movedCard);
412
+ onUpdateBoard(updatedBoard);
413
+ }, "handleDragOver");
414
+ const handleDragEnd = /* @__PURE__ */ __name((event) => {
415
+ const { active, over } = event;
416
+ setActiveCard(null);
417
+ if (!over) return;
418
+ const activeId = active.id;
419
+ const overId = over.id;
420
+ const activeContainer = findContainer(activeId);
421
+ const overContainer = findContainer(overId);
422
+ if (!activeContainer || !overContainer) return;
423
+ const activeColumnIndex = board.columns.findIndex(
424
+ (col) => col.id === activeContainer
425
+ );
426
+ const activeColumn = board.columns[activeColumnIndex];
427
+ if (activeContainer === overContainer) {
428
+ const oldIndex = activeColumn.cards.findIndex(
429
+ (card) => card.id === activeId
430
+ );
431
+ const newIndex = activeColumn.cards.findIndex(
432
+ (card) => card.id === overId
433
+ );
434
+ if (oldIndex !== newIndex) {
435
+ const updatedBoard = { ...board };
436
+ updatedBoard.columns[activeColumnIndex].cards = arrayMove(
437
+ activeColumn.cards,
438
+ oldIndex,
439
+ newIndex
440
+ );
441
+ onUpdateBoard(updatedBoard);
442
+ }
443
+ }
444
+ }, "handleDragEnd");
445
+ const findContainer = /* @__PURE__ */ __name((id) => {
446
+ if (board.columns.some((col) => col.id === id)) {
447
+ return id;
448
+ }
449
+ return board.columns.find((col) => col.cards.some((card) => card.id === id))?.id;
450
+ }, "findContainer");
451
+ const handleAddCard = /* @__PURE__ */ __name((columnId) => {
452
+ setActiveColumnId(columnId);
453
+ setEditingCard(void 0);
454
+ setCardFormOpen(true);
455
+ }, "handleAddCard");
456
+ const handleEditCard = /* @__PURE__ */ __name((card) => {
457
+ setEditingCard(card);
458
+ setActiveColumnId("");
459
+ setCardFormOpen(true);
460
+ }, "handleEditCard");
461
+ const handleSaveCard = /* @__PURE__ */ __name((cardData) => {
462
+ const updatedBoard = { ...board };
463
+ if (editingCard) {
464
+ const columnIndex = updatedBoard.columns.findIndex(
465
+ (col) => col.cards.some((card) => card.id === editingCard.id)
466
+ );
467
+ if (columnIndex !== -1) {
468
+ const cardIndex = updatedBoard.columns[columnIndex].cards.findIndex(
469
+ (card) => card.id === editingCard.id
470
+ );
471
+ if (cardIndex !== -1) {
472
+ updatedBoard.columns[columnIndex].cards[cardIndex] = {
473
+ ...editingCard,
474
+ ...cardData
475
+ };
476
+ }
477
+ }
478
+ } else {
479
+ const columnIndex = updatedBoard.columns.findIndex(
480
+ (col) => col.id === activeColumnId
481
+ );
482
+ if (columnIndex !== -1) {
483
+ const newCard = {
484
+ id: `card-${Date.now()}`,
485
+ title: cardData.title,
486
+ description: cardData.description,
487
+ labels: cardData.labels,
488
+ priority: cardData.priority,
489
+ assignee: cardData.assignee,
490
+ dueDate: cardData.dueDate,
491
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
492
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
493
+ };
494
+ updatedBoard.columns[columnIndex].cards.push(newCard);
495
+ }
496
+ }
497
+ onUpdateBoard(updatedBoard);
498
+ }, "handleSaveCard");
499
+ const handleDeleteCard = /* @__PURE__ */ __name((cardId) => {
500
+ const updatedBoard = { ...board };
501
+ const columnIndex = updatedBoard.columns.findIndex(
502
+ (col) => col.cards.some((card) => card.id === cardId)
503
+ );
504
+ if (columnIndex !== -1) {
505
+ updatedBoard.columns[columnIndex].cards = updatedBoard.columns[columnIndex].cards.filter((card) => card.id !== cardId);
506
+ onUpdateBoard(updatedBoard);
507
+ }
508
+ }, "handleDeleteCard");
509
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col h-full", className), children: [
510
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between p-4 border-b", children: [
511
+ /* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold", children: board.title }),
512
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
513
+ /* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
514
+ /* @__PURE__ */ jsx(
515
+ Input,
516
+ {
517
+ placeholder: "Search cards...",
518
+ value: searchQuery,
519
+ onChange: (e) => setSearchQuery(e.target.value),
520
+ className: "pl-9 w-64"
521
+ }
522
+ )
523
+ ] }) })
524
+ ] }),
525
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-x-auto", children: /* @__PURE__ */ jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ jsxs(
526
+ DndContext,
527
+ {
528
+ sensors,
529
+ collisionDetection: closestCorners,
530
+ onDragStart: handleDragStart,
531
+ onDragOver: handleDragOver,
532
+ onDragEnd: handleDragEnd,
533
+ children: [
534
+ /* @__PURE__ */ jsx("div", { className: "flex gap-6 h-full pb-4", children: filteredBoard.columns.map((column) => /* @__PURE__ */ jsx(
535
+ KanbanColumnComponent,
536
+ {
537
+ column,
538
+ onAddCard: handleAddCard,
539
+ onEditCard: handleEditCard,
540
+ onDeleteCard: handleDeleteCard
541
+ },
542
+ column.id
543
+ )) }),
544
+ /* @__PURE__ */ jsx(DragOverlay, { children: activeCard ? /* @__PURE__ */ jsx(
545
+ KanbanCardComponent,
546
+ {
547
+ card: activeCard,
548
+ onEdit: () => {
549
+ },
550
+ onDelete: () => {
551
+ }
552
+ }
553
+ ) : null })
554
+ ]
555
+ }
556
+ ) }) }),
557
+ /* @__PURE__ */ jsx(
558
+ CardFormDialog,
559
+ {
560
+ open: cardFormOpen,
561
+ onOpenChange: setCardFormOpen,
562
+ card: editingCard,
563
+ onSave: handleSaveCard,
564
+ labels: board.labels
565
+ }
566
+ )
567
+ ] });
568
+ }
569
+ __name(KanbanBoard, "KanbanBoard");
570
+ var kanban_default = KanbanBoard;
571
+
572
+ export { KanbanBoard, kanban_default as default };
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var React = require('react');
5
+ var utils = require('@hanzo/ui/lib/utils');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+
8
+ function _interopNamespace(e) {
9
+ if (e && e.__esModule) return e;
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
20
+ });
21
+ }
22
+ n.default = e;
23
+ return Object.freeze(n);
24
+ }
25
+
26
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
27
+
28
+ // src/project/list.tsx
29
+ var List = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("ul", { ref, className: utils.cn("space-y-2", className), ...props }));
30
+ List.displayName = "List";
31
+ var ListItem = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: utils.cn("", className), ...props }));
32
+ ListItem.displayName = "ListItem";
33
+
34
+ exports.List = List;
35
+ exports.ListItem = ListItem;
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import * as React from 'react';
3
+ import { cn } from '@hanzo/ui/lib/utils';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ // src/project/list.tsx
7
+ var List = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("ul", { ref, className: cn("space-y-2", className), ...props }));
8
+ List.displayName = "List";
9
+ var ListItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("", className), ...props }));
10
+ ListItem.displayName = "ListItem";
11
+
12
+ export { List, ListItem };
@@ -0,0 +1,68 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
5
+ var lucideReact = require('lucide-react');
6
+ var clsx = require('clsx');
7
+ var tailwindMerge = require('tailwind-merge');
8
+ var jsxRuntime = require('react/jsx-runtime');
9
+
10
+ function _interopNamespace(e) {
11
+ if (e && e.__esModule) return e;
12
+ var n = Object.create(null);
13
+ if (e) {
14
+ Object.keys(e).forEach(function (k) {
15
+ if (k !== 'default') {
16
+ var d = Object.getOwnPropertyDescriptor(e, k);
17
+ Object.defineProperty(n, k, d.get ? d : {
18
+ enumerable: true,
19
+ get: function () { return e[k]; }
20
+ });
21
+ }
22
+ });
23
+ }
24
+ n.default = e;
25
+ return Object.freeze(n);
26
+ }
27
+
28
+ var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
29
+
30
+ var __defProp = Object.defineProperty;
31
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
32
+ function cn(...inputs) {
33
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
34
+ }
35
+ __name(cn, "cn");
36
+ var RadioGroup = /* @__PURE__ */ __name(({
37
+ className,
38
+ ...props
39
+ }) => {
40
+ return /* @__PURE__ */ jsxRuntime.jsx(
41
+ RadioGroupPrimitive__namespace.Root,
42
+ {
43
+ className: cn("grid gap-2", className),
44
+ ...props
45
+ }
46
+ );
47
+ }, "RadioGroup");
48
+ RadioGroup.displayName = RadioGroupPrimitive__namespace.Root.displayName;
49
+ var RadioGroupItem = /* @__PURE__ */ __name(({
50
+ className,
51
+ ...props
52
+ }) => {
53
+ return /* @__PURE__ */ jsxRuntime.jsx(
54
+ RadioGroupPrimitive__namespace.Item,
55
+ {
56
+ className: cn(
57
+ "border-brand text-brand ring-offset-background focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border focus:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
58
+ className
59
+ ),
60
+ ...props,
61
+ children: /* @__PURE__ */ jsxRuntime.jsx(RadioGroupPrimitive__namespace.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-2.5 w-2.5 fill-current text-current" }) })
62
+ }
63
+ );
64
+ }, "RadioGroupItem");
65
+ RadioGroupItem.displayName = RadioGroupPrimitive__namespace.Item.displayName;
66
+
67
+ exports.RadioGroup = RadioGroup;
68
+ exports.RadioGroupItem = RadioGroupItem;