@devalok/shilp-sutra-karm 0.22.0 → 0.23.0

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.
@@ -1,26 +1,26 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as a, Fragment as ve } from "react/jsx-runtime";
3
- import * as P from "react";
4
- import { useMemo as re, useState as E, useEffect as oe, useCallback as O, useContext as bt, createContext as xt, useRef as ye } from "react";
5
- import { createPortal as wt } from "react-dom";
6
- import { u as Pe, C as _e, a as vt, S as ze, v as yt, b as kt, c as De, D as Ct, d as Nt, h as It, e as Dt, s as Tt, K as Rt, T as St, P as At } from "./vendor-dnd.js";
2
+ import { jsx as e, jsxs as a, Fragment as me } from "react/jsx-runtime";
3
+ import * as F from "react";
4
+ import { useMemo as he, useState as E, useEffect as ge, useCallback as L, useContext as It, useSyncExternalStore as Dt, createContext as Tt, useRef as Ie } from "react";
5
+ import { createPortal as St } from "react-dom";
6
+ import { u as Ge, C as je, a as Rt, S as Ye, v as Mt, b as At, c as Ae, s as Lt, K as Et, T as Ot, P as Bt, D as Wt, d as $t, h as zt, e as Ft } from "./vendor-dnd.js";
7
7
  import { cn as N } from "@devalok/shilp-sutra/ui/lib/utils";
8
- import { MotionStagger as le, MotionStaggerItem as Q } from "@devalok/shilp-sutra/motion/primitives";
9
- import { Input as ke } from "@devalok/shilp-sutra/ui/input";
10
- import { Button as F } from "@devalok/shilp-sutra/ui/button";
11
- import { Badge as Mt } from "@devalok/shilp-sutra/ui/badge";
12
- import { DropdownMenu as U, DropdownMenuTrigger as V, DropdownMenuContent as G, DropdownMenuLabel as te, DropdownMenuSeparator as Y, DropdownMenuCheckboxItem as Te, DropdownMenuRadioGroup as Lt, DropdownMenuRadioItem as Et, DropdownMenuItem as _ } from "@devalok/shilp-sutra/ui/dropdown-menu";
13
- import { SegmentedControl as Ot } from "@devalok/shilp-sutra/ui/segmented-control";
14
- import { IconX as Ce, IconSearch as Bt, IconFilter as Wt, IconUser as ce, IconLayoutGrid as Ft, IconLayoutList as $t, IconArrowRight as Se, IconAlertTriangle as Ne, IconEye as de, IconTrash as Ae, IconPlus as Me, IconDots as Pt, IconPencil as _t, IconGauge as zt, IconEyeOff as Ue, IconCalendar as Le, IconCheck as Ut, IconArrowUp as Ve, IconArrowDown as Ge, IconGripVertical as Vt, IconSubtask as Gt, IconLock as Kt, IconTag as Ht } from "@tabler/icons-react";
15
- import { AnimatePresence as ie, motion as se } from "framer-motion";
16
- import { springs as ae, motionProps as jt } from "@devalok/shilp-sutra/ui/lib/motion";
17
- import { AvatarGroup as Yt } from "@devalok/shilp-sutra/composed/avatar-group";
18
- import { u as Ke } from "./use-composed-ref.js";
19
- import { w as He } from "./vendor-utils.js";
20
- import { Checkbox as je } from "@devalok/shilp-sutra/ui";
21
- import { Avatar as Qt, AvatarImage as qt, AvatarFallback as Xt } from "@devalok/shilp-sutra/ui/avatar";
22
- import { ContextMenu as Jt, ContextMenuTrigger as Zt, ContextMenuContent as es, ContextMenuSub as be, ContextMenuSubTrigger as xe, ContextMenuSubContent as we, ContextMenuItem as ee, ContextMenuSeparator as ts } from "@devalok/shilp-sutra/ui/context-menu";
23
- const ss = 320, Be = [
8
+ import { MotionStagger as pe, MotionStaggerItem as J } from "@devalok/shilp-sutra/motion/primitives";
9
+ import { Input as De } from "@devalok/shilp-sutra/ui/input";
10
+ import { Button as W } from "@devalok/shilp-sutra/ui/button";
11
+ import { Badge as qe } from "@devalok/shilp-sutra/ui/badge";
12
+ import { DropdownMenu as H, DropdownMenuTrigger as K, DropdownMenuContent as G, DropdownMenuLabel as se, DropdownMenuSeparator as X, DropdownMenuCheckboxItem as Le, DropdownMenuRadioGroup as Pt, DropdownMenuRadioItem as _t, DropdownMenuItem as U } from "@devalok/shilp-sutra/ui/dropdown-menu";
13
+ import { SegmentedControl as Ut } from "@devalok/shilp-sutra/ui/segmented-control";
14
+ import { IconX as Te, IconSearch as Vt, IconFilter as Ht, IconUser as xe, IconLayoutGrid as Kt, IconLayoutList as Gt, IconArrowRight as Be, IconAlertTriangle as Re, IconEye as re, IconTrash as We, IconEyeOff as Oe, IconPlus as $e, IconDots as jt, IconPencil as Yt, IconGauge as qt, IconCalendar as ze, IconCheck as Qt, IconArrowUp as Qe, IconArrowDown as Xe, IconGripVertical as Xt, IconSubtask as Jt, IconLock as Zt, IconTag as es } from "@tabler/icons-react";
15
+ import { AnimatePresence as fe, motion as ie } from "framer-motion";
16
+ import { springs as oe, motionProps as ts } from "@devalok/shilp-sutra/ui/lib/motion";
17
+ import { AvatarGroup as ss } from "@devalok/shilp-sutra/composed/avatar-group";
18
+ import { u as Je } from "./use-composed-ref.js";
19
+ import { w as Ze } from "./vendor-utils.js";
20
+ import { Checkbox as et } from "@devalok/shilp-sutra/ui";
21
+ import { Avatar as as, AvatarImage as ns, AvatarFallback as rs } from "@devalok/shilp-sutra/ui/avatar";
22
+ import { ContextMenu as is, ContextMenuTrigger as os, ContextMenuContent as ls, ContextMenuSub as ye, ContextMenuSubTrigger as Ce, ContextMenuSubContent as Ne, ContextMenuItem as te, ContextMenuSeparator as cs } from "@devalok/shilp-sutra/ui/context-menu";
23
+ const ds = 320, Se = [
24
24
  "bg-category-cyan-9",
25
25
  "bg-category-amber-9",
26
26
  "bg-category-teal-9",
@@ -29,41 +29,41 @@ const ss = 320, Be = [
29
29
  "bg-category-emerald-9",
30
30
  "bg-category-slate-9",
31
31
  "bg-accent-9"
32
- ], Vs = {
32
+ ], ta = {
33
33
  LOW: "IconArrowDown",
34
34
  MEDIUM: "IconArrowRight",
35
35
  HIGH: "IconArrowUp",
36
36
  URGENT: "IconAlertTriangle"
37
- }, Ie = {
37
+ }, Me = {
38
38
  LOW: "text-surface-fg-subtle",
39
39
  MEDIUM: "text-warning-11",
40
40
  HIGH: "text-error-11",
41
41
  URGENT: "text-error-11"
42
- }, We = {
42
+ }, Ve = {
43
43
  search: "",
44
44
  assignees: [],
45
45
  priorities: [],
46
46
  labels: [],
47
47
  dueDateRange: null
48
48
  };
49
- function as(t) {
49
+ function us(t) {
50
50
  const s = /* @__PURE__ */ new Set(), n = [];
51
- for (const r of t)
52
- for (const c of r.tasks) {
51
+ for (const i of t)
52
+ for (const c of i.tasks) {
53
53
  c.owner && !s.has(c.owner.id) && (s.add(c.owner.id), n.push(c.owner));
54
- for (const o of c.assignees)
55
- s.has(o.id) || (s.add(o.id), n.push(o));
54
+ for (const r of c.assignees)
55
+ s.has(r.id) || (s.add(r.id), n.push(r));
56
56
  }
57
57
  return n;
58
58
  }
59
- function Ye(t) {
59
+ function tt(t) {
60
60
  const s = /* @__PURE__ */ new Set();
61
61
  for (const n of t)
62
- for (const r of n.tasks)
63
- for (const c of r.labels) s.add(c);
62
+ for (const i of n.tasks)
63
+ for (const c of i.labels) s.add(c);
64
64
  return Array.from(s).sort();
65
65
  }
66
- function ns(t, s) {
66
+ function ms(t, s) {
67
67
  if (s.search) {
68
68
  const n = s.search.toLowerCase();
69
69
  if (!t.title.toLowerCase().includes(n) && !t.taskId.toLowerCase().includes(n))
@@ -74,410 +74,437 @@ function ns(t, s) {
74
74
  if (s.assignees.length > 0) {
75
75
  const n = [
76
76
  ...t.owner ? [t.owner.id] : [],
77
- ...t.assignees.map((r) => r.id)
77
+ ...t.assignees.map((i) => i.id)
78
78
  ];
79
- if (!s.assignees.some((r) => n.includes(r))) return !1;
79
+ if (!s.assignees.some((i) => n.includes(i))) return !1;
80
80
  }
81
81
  if (s.labels.length > 0 && !s.labels.some((n) => t.labels.includes(n)))
82
82
  return !1;
83
83
  if (s.dueDateRange && s.dueDateRange !== "none") {
84
84
  if (!t.dueDate) return !1;
85
- const n = new Date(t.dueDate), r = /* @__PURE__ */ new Date();
86
- r.setHours(0, 0, 0, 0);
87
- const c = new Date(r);
85
+ const n = new Date(t.dueDate), i = /* @__PURE__ */ new Date();
86
+ i.setHours(0, 0, 0, 0);
87
+ const c = new Date(i);
88
88
  switch (c.setHours(23, 59, 59, 999), s.dueDateRange) {
89
89
  case "overdue":
90
- if (n >= r) return !1;
90
+ if (n >= i) return !1;
91
91
  break;
92
92
  case "today":
93
- if (n < r || n > c) return !1;
93
+ if (n < i || n > c) return !1;
94
94
  break;
95
95
  case "this-week": {
96
- const o = new Date(r);
97
- if (o.setDate(r.getDate() + (7 - r.getDay())), o.setHours(23, 59, 59, 999), n < r || n > o) return !1;
96
+ const r = new Date(i);
97
+ if (r.setDate(i.getDate() + (7 - i.getDay())), r.setHours(23, 59, 59, 999), n < i || n > r) return !1;
98
98
  break;
99
99
  }
100
100
  }
101
101
  }
102
102
  return !0;
103
103
  }
104
- function rs(t, s) {
105
- return re(() => s.search !== "" || s.priorities.length > 0 || s.assignees.length > 0 || s.labels.length > 0 || s.dueDateRange != null && s.dueDateRange !== "none" ? t.map((r) => ({
106
- ...r,
107
- tasks: r.tasks.filter((c) => ns(c, s))
104
+ function hs(t, s) {
105
+ return he(() => s.search !== "" || s.priorities.length > 0 || s.assignees.length > 0 || s.labels.length > 0 || s.dueDateRange != null && s.dueDateRange !== "none" ? t.map((i) => ({
106
+ ...i,
107
+ tasks: i.tasks.filter((c) => ms(c, s))
108
108
  })) : t, [t, s]);
109
109
  }
110
- const Qe = xt(null);
111
- function K() {
112
- const t = bt(Qe);
110
+ const st = Tt(null);
111
+ function P() {
112
+ const t = It(st);
113
113
  if (!t) throw new Error("useBoardContext must be used within <BoardProvider>");
114
114
  return t;
115
115
  }
116
116
  const B = () => {
117
- };
118
- function is({
117
+ }, fs = { sm: 640, md: 768 };
118
+ function gs(t) {
119
+ const s = `(max-width: ${fs[t] - 1}px)`, n = L(
120
+ (r) => {
121
+ const u = window.matchMedia(s);
122
+ return u.addEventListener("change", r), () => u.removeEventListener("change", r);
123
+ },
124
+ [s]
125
+ ), i = L(() => window.matchMedia(s).matches, [s]), c = L(() => !1, []);
126
+ return Dt(n, i, c);
127
+ }
128
+ function ps({
119
129
  initialData: t,
120
130
  currentUserId: s = null,
121
131
  members: n,
122
- children: r,
123
- onTaskMove: c,
124
- onTaskAdd: o,
125
- onBulkAction: d,
126
- onColumnReorder: I,
127
- onColumnRename: w,
128
- onColumnDelete: p,
129
- onColumnToggleVisibility: x,
130
- onColumnWipLimitChange: g,
131
- onClickTask: u,
132
- onAddColumn: C,
133
- onQuickPriorityChange: D,
134
- onQuickAssign: l,
135
- onQuickDueDateChange: v,
136
- onQuickLabelAdd: m,
137
- onQuickVisibilityChange: R,
138
- onQuickDelete: h
132
+ children: i,
133
+ completedColumnId: c,
134
+ showCompleted: r = !0,
135
+ onToggleCompleted: u,
136
+ mobileView: k = "scroll",
137
+ mobileBreakpoint: b = "md",
138
+ onTaskMove: g,
139
+ onTaskAdd: m,
140
+ onBulkAction: p,
141
+ onColumnReorder: x,
142
+ onColumnRename: D,
143
+ onColumnDelete: M,
144
+ onColumnToggleVisibility: l,
145
+ onColumnWipLimitChange: w,
146
+ onClickTask: h,
147
+ onAddColumn: S,
148
+ onQuickPriorityChange: d,
149
+ onQuickAssign: v,
150
+ onQuickDueDateChange: I,
151
+ onQuickLabelAdd: A,
152
+ onQuickVisibilityChange: $,
153
+ onQuickDelete: T
139
154
  }) {
140
- const [f, T] = E(t.columns);
141
- oe(() => {
142
- T(t.columns);
155
+ const [o, f] = E(t.columns);
156
+ ge(() => {
157
+ f(t.columns);
143
158
  }, [t]);
144
- const [L, $] = E("default"), [y, i] = E(We), b = O((H) => {
145
- i((Z) => ({ ...Z, ...H }));
146
- }, []), A = O(() => i(We), []), M = re(
159
+ const [R, O] = E("default"), [y, z] = E(Ve), j = L((q) => {
160
+ z((ee) => ({ ...ee, ...q }));
161
+ }, []), _ = L(() => z(Ve), []), ae = he(
147
162
  () => y.search !== "" || y.priorities.length > 0 || y.assignees.length > 0 || y.labels.length > 0 || y.dueDateRange != null && y.dueDateRange !== "none",
148
163
  [y]
149
- ), S = rs(f, y), W = re(
150
- () => n ?? as(f),
151
- [n, f]
152
- ), [q, X] = E(/* @__PURE__ */ new Set()), ue = O((H) => {
153
- X((Z) => {
154
- const z = new Set(Z);
155
- return z.has(H) ? z.delete(H) : z.add(H), z;
164
+ ), Y = hs(o, y), le = he(
165
+ () => n ?? us(o),
166
+ [n, o]
167
+ ), [ce, ne] = E(/* @__PURE__ */ new Set()), Z = L((q) => {
168
+ ne((ee) => {
169
+ const V = new Set(ee);
170
+ return V.has(q) ? V.delete(q) : V.add(q), V;
156
171
  });
157
- }, []), J = O(
158
- (H, Z) => {
159
- const z = S.flatMap((j) => j.tasks), ge = z.findIndex((j) => j.id === H), pe = z.findIndex((j) => j.id === Z);
160
- if (ge === -1 || pe === -1) return;
161
- const [ht, ft] = ge < pe ? [ge, pe] : [pe, ge], gt = z.slice(ht, ft + 1).map((j) => j.id);
162
- X((j) => {
163
- const Oe = new Set(j);
164
- return gt.forEach((pt) => Oe.add(pt)), Oe;
172
+ }, []), de = L(
173
+ (q, ee) => {
174
+ const V = Y.flatMap((Q) => Q.tasks), ve = V.findIndex((Q) => Q.id === q), ke = V.findIndex((Q) => Q.id === ee);
175
+ if (ve === -1 || ke === -1) return;
176
+ const [kt, yt] = ve < ke ? [ve, ke] : [ke, ve], Ct = V.slice(kt, yt + 1).map((Q) => Q.id);
177
+ ne((Q) => {
178
+ const Ue = new Set(Q);
179
+ return Ct.forEach((Nt) => Ue.add(Nt)), Ue;
165
180
  });
166
181
  },
167
- [S]
168
- ), ne = O(() => {
169
- const H = S.flatMap((Z) => Z.tasks.map((z) => z.id));
170
- X(new Set(H));
171
- }, [S]), me = O(() => X(/* @__PURE__ */ new Set()), []), [he, fe] = E(null), [k, dt] = E(!1), [Ee, ut] = E(null), mt = re(
182
+ [Y]
183
+ ), be = L(() => {
184
+ const q = Y.flatMap((ee) => ee.tasks.map((V) => V.id));
185
+ ne(new Set(q));
186
+ }, [Y]), we = L(() => ne(/* @__PURE__ */ new Set()), []), [ue, C] = E(null), [Fe, xt] = E(!1), [Pe, bt] = E(null), wt = gs(b), _e = k === "list" && wt, vt = he(
172
187
  () => ({
173
- columns: S,
174
- rawColumns: f,
175
- members: W,
176
- viewMode: L,
177
- setViewMode: $,
188
+ columns: Y,
189
+ rawColumns: o,
190
+ members: le,
191
+ viewMode: R,
192
+ setViewMode: O,
178
193
  filters: y,
179
- setFilters: b,
180
- clearFilters: A,
181
- hasActiveFilters: M,
182
- selectedTaskIds: q,
183
- toggleTaskSelection: ue,
184
- selectRange: J,
185
- selectAll: ne,
186
- clearSelection: me,
187
- focusedTaskId: he,
188
- setFocusedTaskId: fe,
194
+ setFilters: j,
195
+ clearFilters: _,
196
+ hasActiveFilters: ae,
197
+ selectedTaskIds: ce,
198
+ toggleTaskSelection: Z,
199
+ selectRange: de,
200
+ selectAll: be,
201
+ clearSelection: we,
202
+ focusedTaskId: ue,
203
+ setFocusedTaskId: C,
189
204
  currentUserId: s,
190
- highlightMyTasks: k,
191
- setHighlightMyTasks: dt,
192
- activeTask: Ee,
193
- setActiveTask: ut,
194
- onTaskMove: c ?? B,
195
- onTaskAdd: o ?? B,
196
- onBulkAction: d ?? B,
197
- onColumnReorder: I ?? B,
198
- onColumnRename: w ?? B,
199
- onColumnDelete: p ?? B,
200
- onColumnToggleVisibility: x ?? B,
201
- onColumnWipLimitChange: g ?? B,
202
- onClickTask: u ?? B,
203
- onAddColumn: C ?? B,
204
- onQuickPriorityChange: D ?? B,
205
- onQuickAssign: l ?? B,
206
- onQuickDueDateChange: v ?? B,
207
- onQuickLabelAdd: m ?? B,
208
- onQuickVisibilityChange: R ?? B,
209
- onQuickDelete: h ?? B
205
+ highlightMyTasks: Fe,
206
+ setHighlightMyTasks: xt,
207
+ activeTask: Pe,
208
+ setActiveTask: bt,
209
+ completedColumnId: c,
210
+ showCompleted: r,
211
+ onToggleCompleted: u ?? B,
212
+ mobileView: k,
213
+ mobileBreakpoint: b,
214
+ isMobileListView: _e,
215
+ onTaskMove: g ?? B,
216
+ onTaskAdd: m ?? B,
217
+ onBulkAction: p ?? B,
218
+ onColumnReorder: x ?? B,
219
+ onColumnRename: D ?? B,
220
+ onColumnDelete: M ?? B,
221
+ onColumnToggleVisibility: l ?? B,
222
+ onColumnWipLimitChange: w ?? B,
223
+ onClickTask: h ?? B,
224
+ onAddColumn: S ?? B,
225
+ onQuickPriorityChange: d ?? B,
226
+ onQuickAssign: v ?? B,
227
+ onQuickDueDateChange: I ?? B,
228
+ onQuickLabelAdd: A ?? B,
229
+ onQuickVisibilityChange: $ ?? B,
230
+ onQuickDelete: T ?? B
210
231
  }),
211
232
  [
212
- S,
213
- f,
214
- W,
215
- L,
233
+ Y,
234
+ o,
235
+ le,
236
+ R,
216
237
  y,
217
- b,
218
- A,
219
- M,
220
- q,
238
+ j,
239
+ _,
240
+ ae,
241
+ ce,
242
+ Z,
243
+ de,
244
+ be,
245
+ we,
221
246
  ue,
222
- J,
223
- ne,
224
- me,
225
- he,
226
247
  s,
227
- k,
228
- Ee,
248
+ Fe,
249
+ Pe,
229
250
  c,
230
- o,
231
- d,
232
- I,
233
- w,
251
+ r,
252
+ u,
253
+ k,
254
+ b,
255
+ _e,
256
+ g,
257
+ m,
234
258
  p,
235
259
  x,
236
- g,
237
- u,
238
- C,
239
260
  D,
261
+ M,
240
262
  l,
263
+ w,
264
+ h,
265
+ S,
266
+ d,
241
267
  v,
242
- m,
243
- R,
244
- h
268
+ I,
269
+ A,
270
+ $,
271
+ T
245
272
  ]
246
273
  );
247
- return /* @__PURE__ */ e(Qe.Provider, { value: mt, children: r });
274
+ return /* @__PURE__ */ e(st.Provider, { value: vt, children: i });
248
275
  }
249
- const os = ["LOW", "MEDIUM", "HIGH", "URGENT"], Fe = [
276
+ const xs = ["LOW", "MEDIUM", "HIGH", "URGENT"], He = [
250
277
  { value: "overdue", label: "Overdue" },
251
278
  { value: "today", label: "Today" },
252
279
  { value: "this-week", label: "This week" }
253
- ], qe = P.forwardRef(({ className: t, ...s }, n) => {
280
+ ], at = F.forwardRef(({ className: t, ...s }, n) => {
254
281
  const {
255
- rawColumns: r,
282
+ rawColumns: i,
256
283
  members: c,
257
- filters: o,
258
- setFilters: d,
259
- clearFilters: I,
260
- hasActiveFilters: w,
261
- viewMode: p,
262
- setViewMode: x,
263
- highlightMyTasks: g,
264
- setHighlightMyTasks: u
265
- } = K(), [C, D] = E(o.search), l = ye(null), v = O(
266
- (i) => {
267
- const b = i.target.value;
268
- D(b), l.current && clearTimeout(l.current), l.current = setTimeout(() => {
269
- d({ search: b });
284
+ filters: r,
285
+ setFilters: u,
286
+ clearFilters: k,
287
+ hasActiveFilters: b,
288
+ viewMode: g,
289
+ setViewMode: m,
290
+ highlightMyTasks: p,
291
+ setHighlightMyTasks: x
292
+ } = P(), [D, M] = E(r.search), l = Ie(null), w = L(
293
+ (o) => {
294
+ const f = o.target.value;
295
+ M(f), l.current && clearTimeout(l.current), l.current = setTimeout(() => {
296
+ u({ search: f });
270
297
  }, 200);
271
298
  },
272
- [d]
299
+ [u]
273
300
  );
274
- oe(() => () => {
301
+ ge(() => () => {
275
302
  l.current && clearTimeout(l.current);
276
- }, []), oe(() => {
277
- D(o.search);
278
- }, [o.search]);
279
- const m = c, R = Ye(r), h = (i) => {
280
- const b = o.priorities;
281
- d({
282
- priorities: b.includes(i) ? b.filter((A) => A !== i) : [...b, i]
303
+ }, []), ge(() => {
304
+ M(r.search);
305
+ }, [r.search]);
306
+ const h = c, S = tt(i), d = (o) => {
307
+ const f = r.priorities;
308
+ u({
309
+ priorities: f.includes(o) ? f.filter((R) => R !== o) : [...f, o]
283
310
  });
284
- }, f = (i) => {
285
- const b = o.assignees;
286
- d({
287
- assignees: b.includes(i) ? b.filter((A) => A !== i) : [...b, i]
311
+ }, v = (o) => {
312
+ const f = r.assignees;
313
+ u({
314
+ assignees: f.includes(o) ? f.filter((R) => R !== o) : [...f, o]
288
315
  });
289
- }, T = (i) => {
290
- const b = o.labels;
291
- d({
292
- labels: b.includes(i) ? b.filter((A) => A !== i) : [...b, i]
316
+ }, I = (o) => {
317
+ const f = r.labels;
318
+ u({
319
+ labels: f.includes(o) ? f.filter((R) => R !== o) : [...f, o]
293
320
  });
294
- }, L = (i) => {
295
- d({
296
- dueDateRange: i === o.dueDateRange ? null : i
321
+ }, A = (o) => {
322
+ u({
323
+ dueDateRange: o === r.dueDateRange ? null : o
297
324
  });
298
325
  }, $ = [
299
- { id: "default", text: "Board", icon: Ft },
300
- { id: "compact", text: "Compact", icon: $t }
301
- ], y = [];
302
- for (const i of o.priorities)
303
- y.push({
304
- key: `priority-${i}`,
305
- label: i.charAt(0) + i.slice(1).toLowerCase(),
306
- onRemove: () => h(i)
326
+ { id: "default", text: "Board", icon: Kt },
327
+ { id: "compact", text: "Compact", icon: Gt }
328
+ ], T = [];
329
+ for (const o of r.priorities)
330
+ T.push({
331
+ key: `priority-${o}`,
332
+ label: o.charAt(0) + o.slice(1).toLowerCase(),
333
+ onRemove: () => d(o)
307
334
  });
308
- for (const i of o.assignees) {
309
- const b = m.find((A) => A.id === i);
310
- y.push({
311
- key: `assignee-${i}`,
312
- label: (b == null ? void 0 : b.name) ?? i,
313
- onRemove: () => f(i)
335
+ for (const o of r.assignees) {
336
+ const f = h.find((R) => R.id === o);
337
+ T.push({
338
+ key: `assignee-${o}`,
339
+ label: (f == null ? void 0 : f.name) ?? o,
340
+ onRemove: () => v(o)
314
341
  });
315
342
  }
316
- for (const i of o.labels)
317
- y.push({
318
- key: `label-${i}`,
319
- label: i,
320
- onRemove: () => T(i)
343
+ for (const o of r.labels)
344
+ T.push({
345
+ key: `label-${o}`,
346
+ label: o,
347
+ onRemove: () => I(o)
321
348
  });
322
- if (o.dueDateRange && o.dueDateRange !== "none") {
323
- const i = Fe.find((b) => b.value === o.dueDateRange);
324
- y.push({
349
+ if (r.dueDateRange && r.dueDateRange !== "none") {
350
+ const o = He.find((f) => f.value === r.dueDateRange);
351
+ T.push({
325
352
  key: "due-date",
326
- label: (i == null ? void 0 : i.label) ?? o.dueDateRange,
327
- onRemove: () => d({ dueDateRange: null })
353
+ label: (o == null ? void 0 : o.label) ?? r.dueDateRange,
354
+ onRemove: () => u({ dueDateRange: null })
328
355
  });
329
356
  }
330
357
  return /* @__PURE__ */ a("div", { ref: n, className: N("flex flex-col gap-ds-02", t), ...s, children: [
331
358
  /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-03", children: [
332
359
  /* @__PURE__ */ e("div", { className: "relative flex-1 max-w-xs", children: /* @__PURE__ */ e(
333
- ke,
360
+ De,
334
361
  {
335
- value: C,
336
- onChange: v,
362
+ value: D,
363
+ onChange: w,
337
364
  placeholder: "Search tasks...",
338
365
  "aria-label": "Search tasks",
339
366
  size: "sm",
340
- startIcon: /* @__PURE__ */ e(Bt, { className: "h-ico-sm w-ico-sm" }),
341
- endIcon: C ? /* @__PURE__ */ e(
367
+ startIcon: /* @__PURE__ */ e(Vt, { className: "h-ico-sm w-ico-sm" }),
368
+ endIcon: D ? /* @__PURE__ */ e(
342
369
  "button",
343
370
  {
344
371
  onClick: () => {
345
- D(""), d({ search: "" });
372
+ M(""), u({ search: "" });
346
373
  },
347
374
  className: "pointer-events-auto cursor-pointer text-surface-fg-subtle hover:text-surface-fg",
348
375
  "aria-label": "Clear search",
349
- children: /* @__PURE__ */ e(Ce, { className: "h-3 w-3" })
376
+ children: /* @__PURE__ */ e(Te, { className: "h-3 w-3" })
350
377
  }
351
378
  ) : void 0
352
379
  }
353
380
  ) }),
354
381
  /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-01", children: [
355
- /* @__PURE__ */ a(U, { children: [
356
- /* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ a(
357
- F,
382
+ /* @__PURE__ */ a(H, { children: [
383
+ /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ a(
384
+ W,
358
385
  {
359
386
  variant: "ghost",
360
387
  size: "sm",
361
388
  className: N(
362
- o.priorities.length > 0 && "text-accent-11"
389
+ r.priorities.length > 0 && "text-accent-11"
363
390
  ),
364
391
  title: "Filter by priority",
365
392
  children: [
366
- /* @__PURE__ */ e(Wt, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
393
+ /* @__PURE__ */ e(Ht, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
367
394
  "Priority",
368
- o.priorities.length > 0 && /* @__PURE__ */ a("span", { className: "ml-ds-01 text-ds-xs", children: [
395
+ r.priorities.length > 0 && /* @__PURE__ */ a("span", { className: "ml-ds-01 text-ds-xs", children: [
369
396
  "(",
370
- o.priorities.length,
397
+ r.priorities.length,
371
398
  ")"
372
399
  ] })
373
400
  ]
374
401
  }
375
402
  ) }),
376
403
  /* @__PURE__ */ a(G, { align: "start", className: "w-44", children: [
377
- /* @__PURE__ */ e(te, { children: "Priority" }),
378
- /* @__PURE__ */ e(Y, {}),
379
- os.map((i) => /* @__PURE__ */ e(
380
- Te,
404
+ /* @__PURE__ */ e(se, { children: "Priority" }),
405
+ /* @__PURE__ */ e(X, {}),
406
+ xs.map((o) => /* @__PURE__ */ e(
407
+ Le,
381
408
  {
382
- checked: o.priorities.includes(i),
383
- onCheckedChange: () => h(i),
384
- children: i.charAt(0) + i.slice(1).toLowerCase()
409
+ checked: r.priorities.includes(o),
410
+ onCheckedChange: () => d(o),
411
+ children: o.charAt(0) + o.slice(1).toLowerCase()
385
412
  },
386
- i
413
+ o
387
414
  ))
388
415
  ] })
389
416
  ] }),
390
- m.length > 0 && /* @__PURE__ */ a(U, { children: [
391
- /* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ a(
392
- F,
417
+ h.length > 0 && /* @__PURE__ */ a(H, { children: [
418
+ /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ a(
419
+ W,
393
420
  {
394
421
  variant: "ghost",
395
422
  size: "sm",
396
423
  className: N(
397
- o.assignees.length > 0 && "text-accent-11"
424
+ r.assignees.length > 0 && "text-accent-11"
398
425
  ),
399
426
  title: "Filter by assignee",
400
427
  children: [
401
- /* @__PURE__ */ e(ce, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
428
+ /* @__PURE__ */ e(xe, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
402
429
  "Assignee",
403
- o.assignees.length > 0 && /* @__PURE__ */ a("span", { className: "ml-ds-01 text-ds-xs", children: [
430
+ r.assignees.length > 0 && /* @__PURE__ */ a("span", { className: "ml-ds-01 text-ds-xs", children: [
404
431
  "(",
405
- o.assignees.length,
432
+ r.assignees.length,
406
433
  ")"
407
434
  ] })
408
435
  ]
409
436
  }
410
437
  ) }),
411
438
  /* @__PURE__ */ a(G, { align: "start", className: "w-48 max-h-56 overflow-y-auto", children: [
412
- /* @__PURE__ */ e(te, { children: "Assignee" }),
413
- /* @__PURE__ */ e(Y, {}),
414
- m.map((i) => /* @__PURE__ */ e(
415
- Te,
439
+ /* @__PURE__ */ e(se, { children: "Assignee" }),
440
+ /* @__PURE__ */ e(X, {}),
441
+ h.map((o) => /* @__PURE__ */ e(
442
+ Le,
416
443
  {
417
- checked: o.assignees.includes(i.id),
418
- onCheckedChange: () => f(i.id),
419
- children: i.name
444
+ checked: r.assignees.includes(o.id),
445
+ onCheckedChange: () => v(o.id),
446
+ children: o.name
420
447
  },
421
- i.id
448
+ o.id
422
449
  ))
423
450
  ] })
424
451
  ] }),
425
- R.length > 0 && /* @__PURE__ */ a(U, { children: [
426
- /* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ a(
427
- F,
452
+ S.length > 0 && /* @__PURE__ */ a(H, { children: [
453
+ /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ a(
454
+ W,
428
455
  {
429
456
  variant: "ghost",
430
457
  size: "sm",
431
458
  className: N(
432
- o.labels.length > 0 && "text-accent-11"
459
+ r.labels.length > 0 && "text-accent-11"
433
460
  ),
434
461
  title: "Filter by label",
435
462
  children: [
436
463
  "Label",
437
- o.labels.length > 0 && /* @__PURE__ */ a("span", { className: "ml-ds-01 text-ds-xs", children: [
464
+ r.labels.length > 0 && /* @__PURE__ */ a("span", { className: "ml-ds-01 text-ds-xs", children: [
438
465
  "(",
439
- o.labels.length,
466
+ r.labels.length,
440
467
  ")"
441
468
  ] })
442
469
  ]
443
470
  }
444
471
  ) }),
445
472
  /* @__PURE__ */ a(G, { align: "start", className: "w-44 max-h-56 overflow-y-auto", children: [
446
- /* @__PURE__ */ e(te, { children: "Label" }),
447
- /* @__PURE__ */ e(Y, {}),
448
- R.map((i) => /* @__PURE__ */ e(
449
- Te,
473
+ /* @__PURE__ */ e(se, { children: "Label" }),
474
+ /* @__PURE__ */ e(X, {}),
475
+ S.map((o) => /* @__PURE__ */ e(
476
+ Le,
450
477
  {
451
- checked: o.labels.includes(i),
452
- onCheckedChange: () => T(i),
453
- children: i
478
+ checked: r.labels.includes(o),
479
+ onCheckedChange: () => I(o),
480
+ children: o
454
481
  },
455
- i
482
+ o
456
483
  ))
457
484
  ] })
458
485
  ] }),
459
- /* @__PURE__ */ a(U, { children: [
460
- /* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ e(
461
- F,
486
+ /* @__PURE__ */ a(H, { children: [
487
+ /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(
488
+ W,
462
489
  {
463
490
  variant: "ghost",
464
491
  size: "sm",
465
492
  className: N(
466
- o.dueDateRange && o.dueDateRange !== "none" && "text-accent-11"
493
+ r.dueDateRange && r.dueDateRange !== "none" && "text-accent-11"
467
494
  ),
468
495
  title: "Filter by due date",
469
496
  children: "Due date"
470
497
  }
471
498
  ) }),
472
499
  /* @__PURE__ */ a(G, { align: "start", className: "w-40", children: [
473
- /* @__PURE__ */ e(te, { children: "Due date" }),
474
- /* @__PURE__ */ e(Y, {}),
500
+ /* @__PURE__ */ e(se, { children: "Due date" }),
501
+ /* @__PURE__ */ e(X, {}),
475
502
  /* @__PURE__ */ e(
476
- Lt,
503
+ Pt,
477
504
  {
478
- value: o.dueDateRange ?? "",
479
- onValueChange: L,
480
- children: Fe.map((i) => /* @__PURE__ */ e(Et, { value: i.value, children: i.label }, i.value))
505
+ value: r.dueDateRange ?? "",
506
+ onValueChange: A,
507
+ children: He.map((o) => /* @__PURE__ */ e(_t, { value: o.value, children: o.label }, o.value))
481
508
  }
482
509
  )
483
510
  ] })
@@ -485,43 +512,43 @@ const os = ["LOW", "MEDIUM", "HIGH", "URGENT"], Fe = [
485
512
  ] }),
486
513
  /* @__PURE__ */ e("div", { className: "flex-1" }),
487
514
  /* @__PURE__ */ e(
488
- F,
515
+ W,
489
516
  {
490
- variant: g ? "outline" : "ghost",
517
+ variant: p ? "outline" : "ghost",
491
518
  size: "sm",
492
- onClick: () => u(!g),
519
+ onClick: () => x(!p),
493
520
  title: "Highlight my tasks",
494
521
  "aria-label": "Highlight my tasks",
495
- "aria-pressed": g,
496
- className: N(g && "text-accent-11"),
497
- children: /* @__PURE__ */ e(ce, { className: "h-ico-sm w-ico-sm" })
522
+ "aria-pressed": p,
523
+ className: N(p && "text-accent-11"),
524
+ children: /* @__PURE__ */ e(xe, { className: "h-ico-sm w-ico-sm" })
498
525
  }
499
526
  ),
500
527
  /* @__PURE__ */ e(
501
- Ot,
528
+ Ut,
502
529
  {
503
530
  size: "sm",
504
531
  variant: "tonal",
505
532
  options: $,
506
- selectedId: p,
507
- onSelect: (i) => x(i)
533
+ selectedId: g,
534
+ onSelect: (o) => m(o)
508
535
  }
509
536
  )
510
537
  ] }),
511
- y.length > 0 && /* @__PURE__ */ a(le, { className: "flex items-center gap-ds-02 flex-wrap", children: [
512
- y.map((i) => /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(
513
- Mt,
538
+ T.length > 0 && /* @__PURE__ */ a(pe, { className: "flex items-center gap-ds-02 flex-wrap", children: [
539
+ T.map((o) => /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(
540
+ qe,
514
541
  {
515
542
  variant: "subtle",
516
543
  size: "sm",
517
- onDismiss: i.onRemove,
518
- children: i.label
544
+ onDismiss: o.onRemove,
545
+ children: o.label
519
546
  }
520
- ) }, i.key)),
547
+ ) }, o.key)),
521
548
  /* @__PURE__ */ e(
522
549
  "button",
523
550
  {
524
- onClick: I,
551
+ onClick: k,
525
552
  className: "text-ds-xs text-surface-fg-subtle hover:text-accent-11 transition-colors",
526
553
  "aria-label": "Clear all filters",
527
554
  children: "Clear all"
@@ -530,126 +557,126 @@ const os = ["LOW", "MEDIUM", "HIGH", "URGENT"], Fe = [
530
557
  ] })
531
558
  ] });
532
559
  });
533
- qe.displayName = "BoardToolbar";
534
- const ls = ["LOW", "MEDIUM", "HIGH", "URGENT"], Xe = P.forwardRef(({ className: t, ...s }, n) => {
560
+ at.displayName = "BoardToolbar";
561
+ const bs = ["LOW", "MEDIUM", "HIGH", "URGENT"], nt = F.forwardRef(({ className: t, ...s }, n) => {
535
562
  const {
536
- columns: r,
563
+ columns: i,
537
564
  members: c,
538
- selectedTaskIds: o,
539
- clearSelection: d,
540
- onBulkAction: I
541
- } = K(), w = o.size, p = Array.from(o), x = c, g = (u, C) => {
542
- I({ type: u, taskIds: p, value: C }), d();
565
+ selectedTaskIds: r,
566
+ clearSelection: u,
567
+ onBulkAction: k
568
+ } = P(), b = r.size, g = Array.from(r), m = c, p = (x, D) => {
569
+ k({ type: x, taskIds: g, value: D }), u();
543
570
  };
544
- return /* @__PURE__ */ e(ie, { initial: !1, children: w > 0 && /* @__PURE__ */ e(
545
- se.div,
571
+ return /* @__PURE__ */ e(fe, { initial: !1, children: b > 0 && /* @__PURE__ */ e(
572
+ ie.div,
546
573
  {
547
574
  ref: n,
548
575
  initial: { height: 0, opacity: 0 },
549
576
  animate: { height: "auto", opacity: 1 },
550
577
  exit: { height: 0, opacity: 0 },
551
- transition: ae.smooth,
578
+ transition: oe.smooth,
552
579
  className: N("overflow-hidden", t),
553
- ...jt(s),
580
+ ...ts(s),
554
581
  "aria-live": "polite",
555
582
  children: /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-03 py-ds-02", children: [
556
583
  /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-02", children: [
557
584
  /* @__PURE__ */ a("span", { className: "text-ds-sm font-medium text-surface-fg", children: [
558
- w,
585
+ b,
559
586
  " selected"
560
587
  ] }),
561
588
  /* @__PURE__ */ e(
562
- F,
589
+ W,
563
590
  {
564
591
  variant: "ghost",
565
592
  size: "icon-md",
566
- onClick: d,
593
+ onClick: u,
567
594
  "aria-label": "Clear selection",
568
595
  title: "Clear selection",
569
596
  className: "h-6 w-6",
570
- children: /* @__PURE__ */ e(Ce, { className: "h-3.5 w-3.5" })
597
+ children: /* @__PURE__ */ e(Te, { className: "h-3.5 w-3.5" })
571
598
  }
572
599
  )
573
600
  ] }),
574
601
  /* @__PURE__ */ e("div", { className: "h-4 w-px bg-surface-border" }),
575
- /* @__PURE__ */ a(le, { className: "contents", children: [
576
- /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ a(U, { children: [
577
- /* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ a(F, { variant: "ghost", size: "sm", title: "Move to column", children: [
578
- /* @__PURE__ */ e(Se, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
602
+ /* @__PURE__ */ a(pe, { className: "contents", children: [
603
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ a(H, { children: [
604
+ /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ a(W, { variant: "ghost", size: "sm", title: "Move to column", children: [
605
+ /* @__PURE__ */ e(Be, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
579
606
  "Move"
580
607
  ] }) }),
581
608
  /* @__PURE__ */ a(G, { align: "start", className: "w-44", children: [
582
- /* @__PURE__ */ e(te, { children: "Move to" }),
583
- /* @__PURE__ */ e(Y, {}),
584
- r.map((u) => /* @__PURE__ */ e(
585
- _,
609
+ /* @__PURE__ */ e(se, { children: "Move to" }),
610
+ /* @__PURE__ */ e(X, {}),
611
+ i.map((x) => /* @__PURE__ */ e(
612
+ U,
586
613
  {
587
- onClick: () => g("move", u.id),
588
- children: u.name
614
+ onClick: () => p("move", x.id),
615
+ children: x.name
589
616
  },
590
- u.id
617
+ x.id
591
618
  ))
592
619
  ] })
593
620
  ] }) }),
594
- /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ a(U, { children: [
595
- /* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ a(F, { variant: "ghost", size: "sm", title: "Set priority", children: [
596
- /* @__PURE__ */ e(Ne, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
621
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ a(H, { children: [
622
+ /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ a(W, { variant: "ghost", size: "sm", title: "Set priority", children: [
623
+ /* @__PURE__ */ e(Re, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
597
624
  "Priority"
598
625
  ] }) }),
599
626
  /* @__PURE__ */ a(G, { align: "start", className: "w-40", children: [
600
- /* @__PURE__ */ e(te, { children: "Set priority" }),
601
- /* @__PURE__ */ e(Y, {}),
602
- ls.map((u) => /* @__PURE__ */ e(
603
- _,
627
+ /* @__PURE__ */ e(se, { children: "Set priority" }),
628
+ /* @__PURE__ */ e(X, {}),
629
+ bs.map((x) => /* @__PURE__ */ e(
630
+ U,
604
631
  {
605
- onClick: () => g("priority", u),
606
- className: Ie[u],
607
- children: u.charAt(0) + u.slice(1).toLowerCase()
632
+ onClick: () => p("priority", x),
633
+ className: Me[x],
634
+ children: x.charAt(0) + x.slice(1).toLowerCase()
608
635
  },
609
- u
636
+ x
610
637
  ))
611
638
  ] })
612
639
  ] }) }),
613
- x.length > 0 && /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ a(U, { children: [
614
- /* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ a(F, { variant: "ghost", size: "sm", title: "Assign", children: [
615
- /* @__PURE__ */ e(ce, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
640
+ m.length > 0 && /* @__PURE__ */ e(J, { children: /* @__PURE__ */ a(H, { children: [
641
+ /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ a(W, { variant: "ghost", size: "sm", title: "Assign", children: [
642
+ /* @__PURE__ */ e(xe, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
616
643
  "Assign"
617
644
  ] }) }),
618
645
  /* @__PURE__ */ a(G, { align: "start", className: "w-44 max-h-48 overflow-y-auto", children: [
619
- /* @__PURE__ */ e(te, { children: "Assign to" }),
620
- /* @__PURE__ */ e(Y, {}),
621
- x.map((u) => /* @__PURE__ */ e(
622
- _,
646
+ /* @__PURE__ */ e(se, { children: "Assign to" }),
647
+ /* @__PURE__ */ e(X, {}),
648
+ m.map((x) => /* @__PURE__ */ e(
649
+ U,
623
650
  {
624
- onClick: () => g("assign", u.id),
625
- children: u.name
651
+ onClick: () => p("assign", x.id),
652
+ children: x.name
626
653
  },
627
- u.id
654
+ x.id
628
655
  ))
629
656
  ] })
630
657
  ] }) }),
631
- /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ a(U, { children: [
632
- /* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ a(F, { variant: "ghost", size: "sm", title: "Set visibility", children: [
633
- /* @__PURE__ */ e(de, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
658
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ a(H, { children: [
659
+ /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ a(W, { variant: "ghost", size: "sm", title: "Set visibility", children: [
660
+ /* @__PURE__ */ e(re, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
634
661
  "Visibility"
635
662
  ] }) }),
636
663
  /* @__PURE__ */ a(G, { align: "start", className: "w-40", children: [
637
- /* @__PURE__ */ e(_, { onClick: () => g("visibility", "INTERNAL"), children: "Internal only" }),
638
- /* @__PURE__ */ e(_, { onClick: () => g("visibility", "EVERYONE"), children: "Visible to all" })
664
+ /* @__PURE__ */ e(U, { onClick: () => p("visibility", "INTERNAL"), children: "Internal only" }),
665
+ /* @__PURE__ */ e(U, { onClick: () => p("visibility", "EVERYONE"), children: "Visible to all" })
639
666
  ] })
640
667
  ] }) })
641
668
  ] }),
642
669
  /* @__PURE__ */ e("div", { className: "flex-1" }),
643
- /* @__PURE__ */ e(le, { children: /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ a(
644
- F,
670
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(J, { children: /* @__PURE__ */ a(
671
+ W,
645
672
  {
646
673
  variant: "ghost",
647
674
  size: "sm",
648
675
  className: "text-error hover:text-error",
649
- onClick: () => g("delete"),
676
+ onClick: () => p("delete"),
650
677
  title: "Delete selected tasks",
651
678
  children: [
652
- /* @__PURE__ */ e(Ae, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
679
+ /* @__PURE__ */ e(We, { className: "h-ico-sm w-ico-sm mr-ds-01" }),
653
680
  "Delete"
654
681
  ]
655
682
  }
@@ -658,39 +685,39 @@ const ls = ["LOW", "MEDIUM", "HIGH", "URGENT"], Xe = P.forwardRef(({ className:
658
685
  }
659
686
  ) });
660
687
  });
661
- Xe.displayName = "BulkActionBar";
662
- function cs(t) {
688
+ nt.displayName = "BulkActionBar";
689
+ function ws(t) {
663
690
  const s = /* @__PURE__ */ new Set(), n = [];
664
- for (const r of t.tasks) {
665
- r.owner && !s.has(r.owner.id) && (s.add(r.owner.id), n.push(r.owner));
666
- for (const c of r.assignees)
691
+ for (const i of t.tasks) {
692
+ i.owner && !s.has(i.owner.id) && (s.add(i.owner.id), n.push(i.owner));
693
+ for (const c of i.assignees)
667
694
  s.has(c.id) || (s.add(c.id), n.push(c));
668
695
  }
669
696
  return n;
670
697
  }
671
- function ds({ columnId: t, currentLimit: s, onClose: n }) {
672
- const { onColumnWipLimitChange: r } = K(), [c, o] = E(s != null ? String(s) : ""), d = O(() => {
673
- const w = c.trim();
674
- if (w === "")
675
- r(t, null);
698
+ function vs({ columnId: t, currentLimit: s, onClose: n }) {
699
+ const { onColumnWipLimitChange: i } = P(), [c, r] = E(s != null ? String(s) : ""), u = L(() => {
700
+ const b = c.trim();
701
+ if (b === "")
702
+ i(t, null);
676
703
  else {
677
- const p = parseInt(w, 10);
678
- !isNaN(p) && p > 0 && r(t, p);
704
+ const g = parseInt(b, 10);
705
+ !isNaN(g) && g > 0 && i(t, g);
679
706
  }
680
707
  n();
681
- }, [c, t, r, n]);
708
+ }, [c, t, i, n]);
682
709
  return (
683
710
  // eslint-disable-next-line jsx-a11y/no-autofocus -- intentional: input opens after user selects "Set WIP Limit"
684
711
  /* @__PURE__ */ e(
685
- ke,
712
+ De,
686
713
  {
687
714
  type: "number",
688
715
  min: 1,
689
716
  value: c,
690
- onChange: (w) => o(w.target.value),
691
- onBlur: d,
692
- onKeyDown: (w) => {
693
- w.key === "Enter" && d(), w.key === "Escape" && n();
717
+ onChange: (b) => r(b.target.value),
718
+ onBlur: u,
719
+ onKeyDown: (b) => {
720
+ b.key === "Enter" && u(), b.key === "Escape" && n();
694
721
  },
695
722
  placeholder: "Limit...",
696
723
  "aria-label": "WIP limit",
@@ -701,57 +728,60 @@ function ds({ columnId: t, currentLimit: s, onClose: n }) {
701
728
  )
702
729
  );
703
730
  }
704
- const Je = P.forwardRef(({ column: t, index: s, className: n, ...r }, c) => {
705
- var fe;
731
+ const rt = F.forwardRef(({ column: t, index: s, className: n, ...i }, c) => {
732
+ var ue;
706
733
  const {
707
- members: o,
708
- onColumnRename: d,
709
- onColumnDelete: I,
710
- onColumnToggleVisibility: w,
711
- onTaskAdd: p
712
- } = K(), [x, g] = E(!1), [u, C] = E(t.name), [D, l] = E(!1), [v, m] = E(!1), [R, h] = E(""), [f, T] = E(null), [L, $] = E(""), y = ye(null), i = o, b = Be[s % Be.length], A = t.tasks.length, M = t.wipLimit ?? null, S = M != null && A > M, W = cs(t), q = () => {
713
- C(t.name), g(!0);
714
- }, X = () => {
715
- const k = u.trim();
716
- k && k !== t.name && d(t.id, k), g(!1);
717
- }, ue = (k) => {
718
- k.key === "Enter" && X(), k.key === "Escape" && (C(t.name), g(!1));
719
- }, J = () => {
720
- h(""), T(null), $(""), m(!1);
721
- }, ne = () => {
722
- const k = R.trim();
723
- k && (p(t.id, {
724
- title: k,
725
- ownerId: f,
726
- dueDate: L || null
727
- }), J());
728
- }, me = (k) => {
729
- k.key === "Enter" && ne(), k.key === "Escape" && J();
730
- }, he = () => {
731
- v ? J() : (m(!0), setTimeout(() => {
732
- var k;
733
- return (k = y.current) == null ? void 0 : k.focus();
734
+ members: r,
735
+ onColumnRename: u,
736
+ onColumnDelete: k,
737
+ onColumnToggleVisibility: b,
738
+ onTaskAdd: g,
739
+ completedColumnId: m,
740
+ showCompleted: p,
741
+ onToggleCompleted: x
742
+ } = P(), D = m != null && t.id === m, [M, l] = E(!1), [w, h] = E(t.name), [S, d] = E(!1), [v, I] = E(!1), [A, $] = E(""), [T, o] = E(null), [f, R] = E(""), O = Ie(null), y = r, z = Se[s % Se.length], j = t.tasks.length, _ = t.wipLimit ?? null, ae = _ != null && j > _, Y = ws(t), le = () => {
743
+ h(t.name), l(!0);
744
+ }, ce = () => {
745
+ const C = w.trim();
746
+ C && C !== t.name && u(t.id, C), l(!1);
747
+ }, ne = (C) => {
748
+ C.key === "Enter" && ce(), C.key === "Escape" && (h(t.name), l(!1));
749
+ }, Z = () => {
750
+ $(""), o(null), R(""), I(!1);
751
+ }, de = () => {
752
+ const C = A.trim();
753
+ C && (g(t.id, {
754
+ title: C,
755
+ ownerId: T,
756
+ dueDate: f || null
757
+ }), Z());
758
+ }, be = (C) => {
759
+ C.key === "Enter" && de(), C.key === "Escape" && Z();
760
+ }, we = () => {
761
+ v ? Z() : (I(!0), setTimeout(() => {
762
+ var C;
763
+ return (C = O.current) == null ? void 0 : C.focus();
734
764
  }, 50));
735
765
  };
736
- return /* @__PURE__ */ a("div", { ref: c, className: N("group/header flex flex-col gap-ds-02", n), ...r, children: [
766
+ return /* @__PURE__ */ a("div", { ref: c, className: N("group/header flex flex-col gap-ds-02", n), ...i, children: [
737
767
  /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-02 px-ds-04 pt-ds-03 pb-ds-02", children: [
738
768
  /* @__PURE__ */ e(
739
769
  "span",
740
770
  {
741
- className: N("h-2.5 w-2.5 flex-shrink-0 rounded-full", b),
771
+ className: N("h-2.5 w-2.5 flex-shrink-0 rounded-full", z),
742
772
  "aria-hidden": "true",
743
773
  title: t.name
744
774
  }
745
775
  ),
746
- x ? (
776
+ M ? (
747
777
  // eslint-disable-next-line jsx-a11y/no-autofocus -- intentional: input appears after user double-clicks to rename
748
778
  /* @__PURE__ */ e(
749
- ke,
779
+ De,
750
780
  {
751
- value: u,
752
- onChange: (k) => C(k.target.value),
753
- onBlur: X,
754
- onKeyDown: ue,
781
+ value: w,
782
+ onChange: (C) => h(C.target.value),
783
+ onBlur: ce,
784
+ onKeyDown: ne,
755
785
  "aria-label": "Column name",
756
786
  size: "sm",
757
787
  className: "h-ds-xs flex-1 text-ds-sm font-semibold",
@@ -762,42 +792,54 @@ const Je = P.forwardRef(({ column: t, index: s, className: n, ...r }, c) => {
762
792
  "h3",
763
793
  {
764
794
  className: "flex-1 truncate text-ds-sm font-semibold text-surface-fg",
765
- onDoubleClick: q,
795
+ onDoubleClick: le,
766
796
  title: t.name,
767
- "aria-label": M != null ? `${t.name}, ${A} of ${M} tasks${S ? ", WIP limit exceeded" : ""}` : `${t.name}, ${A} tasks`,
797
+ "aria-label": _ != null ? `${t.name}, ${j} of ${_} tasks${ae ? ", WIP limit exceeded" : ""}` : `${t.name}, ${j} tasks`,
768
798
  children: [
769
799
  t.name,
770
800
  /* @__PURE__ */ a("span", { className: "ml-ds-02 text-ds-xs font-normal text-surface-fg-subtle", children: [
771
801
  "(",
772
- A,
802
+ j,
773
803
  ")"
774
804
  ] })
775
805
  ]
776
806
  }
777
807
  ),
778
- D ? /* @__PURE__ */ e(
779
- ds,
808
+ S ? /* @__PURE__ */ e(
809
+ vs,
780
810
  {
781
811
  columnId: t.id,
782
- currentLimit: M,
783
- onClose: () => l(!1)
812
+ currentLimit: _,
813
+ onClose: () => d(!1)
784
814
  }
785
- ) : M != null ? /* @__PURE__ */ a(
815
+ ) : _ != null ? /* @__PURE__ */ a(
786
816
  "span",
787
817
  {
788
818
  className: N(
789
819
  "flex-shrink-0 text-ds-xs tabular-nums",
790
- S ? "font-semibold text-error-11" : "text-surface-fg-subtle"
820
+ ae ? "font-semibold text-error-11" : "text-surface-fg-subtle"
791
821
  ),
792
- "aria-label": `WIP limit: ${M}${S ? ", exceeded" : ""}`,
822
+ "aria-label": `WIP limit: ${_}${ae ? ", exceeded" : ""}`,
793
823
  children: [
794
824
  "/ ",
795
- M
825
+ _
796
826
  ]
797
827
  }
798
828
  ) : null,
829
+ D && /* @__PURE__ */ e(
830
+ W,
831
+ {
832
+ variant: "ghost",
833
+ size: "icon-md",
834
+ className: "h-ds-xs w-ds-xs flex-shrink-0 hover:bg-accent-2 hover:text-accent-11",
835
+ "aria-label": p ? "Hide completed tasks" : "Show completed tasks",
836
+ title: p ? "Hide completed tasks" : "Show completed tasks",
837
+ onClick: () => x(!p),
838
+ children: p ? /* @__PURE__ */ e(re, { className: "h-ico-sm w-ico-sm" }) : /* @__PURE__ */ e(Oe, { className: "h-ico-sm w-ico-sm" })
839
+ }
840
+ ),
799
841
  /* @__PURE__ */ e(
800
- F,
842
+ W,
801
843
  {
802
844
  variant: "ghost",
803
845
  size: "icon-md",
@@ -808,13 +850,13 @@ const Je = P.forwardRef(({ column: t, index: s, className: n, ...r }, c) => {
808
850
  ),
809
851
  "aria-label": "Add task",
810
852
  title: "Add task",
811
- onClick: he,
812
- children: /* @__PURE__ */ e(Me, { className: "h-ico-sm w-ico-sm" })
853
+ onClick: we,
854
+ children: /* @__PURE__ */ e($e, { className: "h-ico-sm w-ico-sm" })
813
855
  }
814
856
  ),
815
- /* @__PURE__ */ a(U, { children: [
816
- /* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ e(
817
- F,
857
+ /* @__PURE__ */ a(H, { children: [
858
+ /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(
859
+ W,
818
860
  {
819
861
  variant: "ghost",
820
862
  size: "icon-md",
@@ -824,39 +866,39 @@ const Je = P.forwardRef(({ column: t, index: s, className: n, ...r }, c) => {
824
866
  ),
825
867
  "aria-label": "Column options",
826
868
  title: "Column options",
827
- children: /* @__PURE__ */ e(Pt, { className: "h-ico-sm w-ico-sm" })
869
+ children: /* @__PURE__ */ e(jt, { className: "h-ico-sm w-ico-sm" })
828
870
  }
829
871
  ) }),
830
872
  /* @__PURE__ */ a(G, { align: "end", className: "w-48", children: [
831
- /* @__PURE__ */ a(_, { onClick: q, children: [
832
- /* @__PURE__ */ e(_t, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
873
+ /* @__PURE__ */ a(U, { onClick: le, children: [
874
+ /* @__PURE__ */ e(Yt, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
833
875
  "Rename"
834
876
  ] }),
835
- /* @__PURE__ */ a(_, { onClick: () => l(!0), children: [
836
- /* @__PURE__ */ e(zt, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
877
+ /* @__PURE__ */ a(U, { onClick: () => d(!0), children: [
878
+ /* @__PURE__ */ e(qt, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
837
879
  "Set WIP Limit"
838
880
  ] }),
839
881
  /* @__PURE__ */ e(
840
- _,
882
+ U,
841
883
  {
842
- onClick: () => w(t.id, !(t.isClientVisible ?? !1)),
843
- children: t.isClientVisible ? /* @__PURE__ */ a(ve, { children: [
844
- /* @__PURE__ */ e(Ue, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
884
+ onClick: () => b(t.id, !(t.isClientVisible ?? !1)),
885
+ children: t.isClientVisible ? /* @__PURE__ */ a(me, { children: [
886
+ /* @__PURE__ */ e(Oe, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
845
887
  "Hide from client"
846
- ] }) : /* @__PURE__ */ a(ve, { children: [
847
- /* @__PURE__ */ e(de, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
888
+ ] }) : /* @__PURE__ */ a(me, { children: [
889
+ /* @__PURE__ */ e(re, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
848
890
  "Show to client"
849
891
  ] })
850
892
  }
851
893
  ),
852
- /* @__PURE__ */ e(Y, {}),
894
+ /* @__PURE__ */ e(X, {}),
853
895
  /* @__PURE__ */ a(
854
- _,
896
+ U,
855
897
  {
856
898
  className: "text-error-11 focus:text-error-11",
857
- onClick: () => I(t.id),
899
+ onClick: () => k(t.id),
858
900
  children: [
859
- /* @__PURE__ */ e(Ae, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
901
+ /* @__PURE__ */ e(We, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
860
902
  "Delete column"
861
903
  ]
862
904
  }
@@ -864,31 +906,31 @@ const Je = P.forwardRef(({ column: t, index: s, className: n, ...r }, c) => {
864
906
  ] })
865
907
  ] })
866
908
  ] }),
867
- W.length > 0 && /* @__PURE__ */ e("div", { className: "px-ds-04 pb-ds-02", children: /* @__PURE__ */ e(
868
- Yt,
909
+ Y.length > 0 && /* @__PURE__ */ e("div", { className: "px-ds-04 pb-ds-02", children: /* @__PURE__ */ e(
910
+ ss,
869
911
  {
870
- users: W,
912
+ users: Y,
871
913
  max: 3,
872
914
  size: "sm",
873
915
  showTooltip: !0
874
916
  }
875
917
  ) }),
876
- /* @__PURE__ */ e(ie, { initial: !1, children: v && /* @__PURE__ */ e(
877
- se.div,
918
+ /* @__PURE__ */ e(fe, { initial: !1, children: v && /* @__PURE__ */ e(
919
+ ie.div,
878
920
  {
879
921
  initial: { height: 0, opacity: 0 },
880
922
  animate: { height: "auto", opacity: 1 },
881
923
  exit: { height: 0, opacity: 0 },
882
- transition: ae.smooth,
924
+ transition: oe.smooth,
883
925
  className: "overflow-hidden",
884
926
  children: /* @__PURE__ */ a("div", { className: "px-ds-04 pb-ds-03 flex flex-col gap-ds-02", children: [
885
927
  /* @__PURE__ */ e(
886
- ke,
928
+ De,
887
929
  {
888
- ref: y,
889
- value: R,
890
- onChange: (k) => h(k.target.value),
891
- onKeyDown: me,
930
+ ref: O,
931
+ value: A,
932
+ onChange: (C) => $(C.target.value),
933
+ onKeyDown: be,
892
934
  placeholder: "Task title...",
893
935
  "aria-label": "New task title",
894
936
  size: "sm",
@@ -896,36 +938,36 @@ const Je = P.forwardRef(({ column: t, index: s, className: n, ...r }, c) => {
896
938
  }
897
939
  ),
898
940
  /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-01", children: [
899
- /* @__PURE__ */ a(U, { children: [
900
- /* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ e(
941
+ /* @__PURE__ */ a(H, { children: [
942
+ /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(
901
943
  "button",
902
944
  {
903
945
  className: N(
904
946
  "flex items-center justify-center h-6 w-6 rounded-ds-md transition-colors",
905
- f ? "text-accent-11 bg-accent-2" : "text-surface-fg-subtle hover:text-surface-fg hover:bg-surface-raised-active"
947
+ T ? "text-accent-11 bg-accent-2" : "text-surface-fg-subtle hover:text-surface-fg hover:bg-surface-raised-active"
906
948
  ),
907
- title: f ? `Lead: ${(fe = i.find((k) => k.id === f)) == null ? void 0 : fe.name}` : "Assign task lead",
949
+ title: T ? `Lead: ${(ue = y.find((C) => C.id === T)) == null ? void 0 : ue.name}` : "Assign task lead",
908
950
  "aria-label": "Assign task lead",
909
- children: /* @__PURE__ */ e(ce, { className: "h-3.5 w-3.5" })
951
+ children: /* @__PURE__ */ e(xe, { className: "h-3.5 w-3.5" })
910
952
  }
911
953
  ) }),
912
954
  /* @__PURE__ */ a(G, { align: "start", className: "w-44 max-h-48 overflow-y-auto", children: [
913
- i.length === 0 && /* @__PURE__ */ e("div", { className: "px-ds-03 py-ds-02 text-ds-xs text-surface-fg-subtle", children: "No members found" }),
914
- f && /* @__PURE__ */ a(ve, { children: [
915
- /* @__PURE__ */ a(_, { onClick: () => T(null), children: [
916
- /* @__PURE__ */ e(Ce, { className: "mr-ds-02 h-3 w-3 text-surface-fg-subtle" }),
955
+ y.length === 0 && /* @__PURE__ */ e("div", { className: "px-ds-03 py-ds-02 text-ds-xs text-surface-fg-subtle", children: "No members found" }),
956
+ T && /* @__PURE__ */ a(me, { children: [
957
+ /* @__PURE__ */ a(U, { onClick: () => o(null), children: [
958
+ /* @__PURE__ */ e(Te, { className: "mr-ds-02 h-3 w-3 text-surface-fg-subtle" }),
917
959
  "Clear lead"
918
960
  ] }),
919
- /* @__PURE__ */ e(Y, {})
961
+ /* @__PURE__ */ e(X, {})
920
962
  ] }),
921
- i.map((k) => /* @__PURE__ */ e(
922
- _,
963
+ y.map((C) => /* @__PURE__ */ e(
964
+ U,
923
965
  {
924
- onClick: () => T(k.id),
925
- className: N(f === k.id && "bg-accent-2"),
926
- children: k.name
966
+ onClick: () => o(C.id),
967
+ className: N(T === C.id && "bg-accent-2"),
968
+ children: C.name
927
969
  },
928
- k.id
970
+ C.id
929
971
  ))
930
972
  ] })
931
973
  ] }),
@@ -934,18 +976,18 @@ const Je = P.forwardRef(({ column: t, index: s, className: n, ...r }, c) => {
934
976
  {
935
977
  className: N(
936
978
  "relative flex items-center justify-center h-6 w-6 rounded-ds-md cursor-pointer transition-colors",
937
- L ? "text-accent-11 bg-accent-2" : "text-surface-fg-subtle hover:text-surface-fg hover:bg-surface-raised-active"
979
+ f ? "text-accent-11 bg-accent-2" : "text-surface-fg-subtle hover:text-surface-fg hover:bg-surface-raised-active"
938
980
  ),
939
- title: L ? `Due: ${L}` : "Set due date",
981
+ title: f ? `Due: ${f}` : "Set due date",
940
982
  "aria-label": "Set due date",
941
983
  children: [
942
- /* @__PURE__ */ e(Le, { className: "h-3.5 w-3.5" }),
984
+ /* @__PURE__ */ e(ze, { className: "h-3.5 w-3.5" }),
943
985
  /* @__PURE__ */ e(
944
986
  "input",
945
987
  {
946
988
  type: "date",
947
- value: L,
948
- onChange: (k) => $(k.target.value),
989
+ value: f,
990
+ onChange: (C) => R(C.target.value),
949
991
  className: "absolute inset-0 opacity-0 cursor-pointer w-full h-full",
950
992
  "aria-label": "Due date"
951
993
  }
@@ -957,25 +999,25 @@ const Je = P.forwardRef(({ column: t, index: s, className: n, ...r }, c) => {
957
999
  /* @__PURE__ */ e(
958
1000
  "button",
959
1001
  {
960
- onClick: ne,
961
- disabled: !R.trim(),
1002
+ onClick: de,
1003
+ disabled: !A.trim(),
962
1004
  className: N(
963
1005
  "flex items-center justify-center h-6 w-6 rounded-ds-md transition-colors",
964
- R.trim() ? "text-success-11 hover:bg-success-3" : "text-surface-fg-subtle cursor-not-allowed"
1006
+ A.trim() ? "text-success-11 hover:bg-success-3" : "text-surface-fg-subtle cursor-not-allowed"
965
1007
  ),
966
1008
  title: "Confirm add task",
967
1009
  "aria-label": "Confirm add task",
968
- children: /* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5" })
1010
+ children: /* @__PURE__ */ e(Qt, { className: "h-3.5 w-3.5" })
969
1011
  }
970
1012
  ),
971
1013
  /* @__PURE__ */ e(
972
1014
  "button",
973
1015
  {
974
- onClick: J,
1016
+ onClick: Z,
975
1017
  className: "flex items-center justify-center h-6 w-6 rounded-ds-md text-surface-fg-subtle hover:text-surface-fg hover:bg-surface-raised-active transition-colors",
976
1018
  title: "Cancel",
977
1019
  "aria-label": "Cancel adding task",
978
- children: /* @__PURE__ */ e(Ce, { className: "h-3.5 w-3.5" })
1020
+ children: /* @__PURE__ */ e(Te, { className: "h-3.5 w-3.5" })
979
1021
  }
980
1022
  )
981
1023
  ] })
@@ -984,8 +1026,8 @@ const Je = P.forwardRef(({ column: t, index: s, className: n, ...r }, c) => {
984
1026
  ) })
985
1027
  ] });
986
1028
  });
987
- Je.displayName = "ColumnHeader";
988
- function us() {
1029
+ rt.displayName = "ColumnHeader";
1030
+ function ks() {
989
1031
  return /* @__PURE__ */ a(
990
1032
  "svg",
991
1033
  {
@@ -1005,7 +1047,7 @@ function us() {
1005
1047
  }
1006
1048
  );
1007
1049
  }
1008
- function ms() {
1050
+ function ys() {
1009
1051
  return /* @__PURE__ */ a(
1010
1052
  "svg",
1011
1053
  {
@@ -1024,7 +1066,7 @@ function ms() {
1024
1066
  }
1025
1067
  );
1026
1068
  }
1027
- function hs() {
1069
+ function Cs() {
1028
1070
  return /* @__PURE__ */ a(
1029
1071
  "svg",
1030
1072
  {
@@ -1050,7 +1092,7 @@ function hs() {
1050
1092
  }
1051
1093
  );
1052
1094
  }
1053
- function fs() {
1095
+ function Ns() {
1054
1096
  return /* @__PURE__ */ a(
1055
1097
  "svg",
1056
1098
  {
@@ -1086,34 +1128,34 @@ function fs() {
1086
1128
  }
1087
1129
  );
1088
1130
  }
1089
- const $e = [
1090
- us,
1091
- ms,
1092
- hs,
1093
- fs
1094
- ], Ze = P.forwardRef(({ index: t, onAddTask: s, isDropTarget: n = !1, className: r, ...c }, o) => {
1095
- const d = $e[t % $e.length];
1131
+ const Ke = [
1132
+ ks,
1133
+ ys,
1134
+ Cs,
1135
+ Ns
1136
+ ], it = F.forwardRef(({ index: t, onAddTask: s, isDropTarget: n = !1, className: i, ...c }, r) => {
1137
+ const u = Ke[t % Ke.length];
1096
1138
  return /* @__PURE__ */ a(
1097
1139
  "div",
1098
1140
  {
1099
- ref: o,
1141
+ ref: r,
1100
1142
  className: N(
1101
1143
  "flex flex-col items-center justify-center gap-ds-03 py-ds-07 text-center",
1102
- r
1144
+ i
1103
1145
  ),
1104
1146
  ...c,
1105
1147
  children: [
1106
- /* @__PURE__ */ e("span", { className: "text-surface-fg-subtle", children: /* @__PURE__ */ e(d, {}) }),
1107
- n ? /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg-subtle", children: "Drop tasks here" }) : /* @__PURE__ */ a(ve, { children: [
1148
+ /* @__PURE__ */ e("span", { className: "text-surface-fg-subtle", children: /* @__PURE__ */ e(u, {}) }),
1149
+ n ? /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg-subtle", children: "Drop tasks here" }) : /* @__PURE__ */ a(me, { children: [
1108
1150
  /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg-subtle", children: "No tasks yet" }),
1109
1151
  /* @__PURE__ */ a(
1110
- F,
1152
+ W,
1111
1153
  {
1112
1154
  variant: "ghost",
1113
1155
  size: "sm",
1114
1156
  onClick: s,
1115
1157
  children: [
1116
- /* @__PURE__ */ e(Me, { className: "h-ico-sm w-ico-sm" }),
1158
+ /* @__PURE__ */ e($e, { className: "h-ico-sm w-ico-sm" }),
1117
1159
  "Add a task"
1118
1160
  ]
1119
1161
  }
@@ -1123,20 +1165,20 @@ const $e = [
1123
1165
  }
1124
1166
  );
1125
1167
  });
1126
- Ze.displayName = "ColumnEmpty";
1127
- function gs(t) {
1128
- const s = new Date(t), n = /* @__PURE__ */ new Date(), r = new Date(s.getFullYear(), s.getMonth(), s.getDate()), c = new Date(n.getFullYear(), n.getMonth(), n.getDate()), o = Math.round((r.getTime() - c.getTime()) / (1e3 * 60 * 60 * 24));
1129
- return o < 0 ? { label: "Overdue", className: "text-error-11" } : o === 0 ? { label: "Today", className: "text-warning-11" } : o === 1 ? { label: "Tomorrow", className: "text-warning-11" } : {
1168
+ it.displayName = "ColumnEmpty";
1169
+ function Is(t) {
1170
+ const s = new Date(t), n = /* @__PURE__ */ new Date(), i = new Date(s.getFullYear(), s.getMonth(), s.getDate()), c = new Date(n.getFullYear(), n.getMonth(), n.getDate()), r = Math.round((i.getTime() - c.getTime()) / (1e3 * 60 * 60 * 24));
1171
+ return r < 0 ? { label: "Overdue", className: "text-error-11" } : r === 0 ? { label: "Today", className: "text-warning-11" } : r === 1 ? { label: "Tomorrow", className: "text-warning-11" } : {
1130
1172
  label: s.toLocaleDateString("en-IN", { month: "short", day: "numeric" }),
1131
1173
  className: "text-surface-fg-subtle"
1132
1174
  };
1133
1175
  }
1134
- const et = {
1135
- LOW: Ge,
1136
- MEDIUM: Se,
1137
- HIGH: Ve,
1138
- URGENT: Ne
1139
- }, ps = He(
1176
+ const ot = {
1177
+ LOW: Xe,
1178
+ MEDIUM: Be,
1179
+ HIGH: Qe,
1180
+ URGENT: Re
1181
+ }, Ds = Ze(
1140
1182
  "group/card relative rounded-ds-lg border border-transparent bg-surface-raised pl-3 pr-ds-03 py-ds-03 transition-[box-shadow,border-color,transform] duration-fast-02 ease-productive-standard cursor-pointer",
1141
1183
  {
1142
1184
  variants: {
@@ -1166,30 +1208,30 @@ const et = {
1166
1208
  }
1167
1209
  }
1168
1210
  );
1169
- function tt(t) {
1211
+ function lt(t) {
1170
1212
  const s = t.trim();
1171
1213
  if (!s) return "";
1172
1214
  const n = s.split(/\s+/);
1173
1215
  return n.length >= 2 ? (n[0][0] + n[1][0]).toUpperCase() : s.slice(0, 2).toUpperCase();
1174
1216
  }
1175
- function st({
1217
+ function ct({
1176
1218
  task: t,
1177
1219
  isDragging: s,
1178
1220
  isDragOverlay: n,
1179
- dragHandleProps: r
1221
+ dragHandleProps: i
1180
1222
  }) {
1181
- var R;
1223
+ var S;
1182
1224
  const {
1183
1225
  selectedTaskIds: c,
1184
- toggleTaskSelection: o,
1185
- focusedTaskId: d,
1186
- currentUserId: I,
1187
- highlightMyTasks: w,
1188
- onClickTask: p
1189
- } = K(), x = c.has(t.id), g = c.size > 0, u = d === t.id, C = t.dueDate ? gs(t.dueDate) : null, D = et[t.priority], l = Ie[t.priority], v = w && I != null && ((R = t.owner) == null ? void 0 : R.id) !== I && !t.assignees.some((h) => h.id === I), m = [];
1190
- t.owner && m.push({ name: t.owner.name, image: t.owner.image, isOwner: !0 });
1191
- for (const h of t.assignees)
1192
- t.owner && h.id === t.owner.id || m.push({ name: h.name, image: h.image, isOwner: !1 });
1226
+ toggleTaskSelection: r,
1227
+ focusedTaskId: u,
1228
+ currentUserId: k,
1229
+ highlightMyTasks: b,
1230
+ onClickTask: g
1231
+ } = P(), m = c.has(t.id), p = c.size > 0, x = u === t.id, D = t.dueDate ? Is(t.dueDate) : null, M = ot[t.priority], l = Me[t.priority], w = b && k != null && ((S = t.owner) == null ? void 0 : S.id) !== k && !t.assignees.some((d) => d.id === k), h = [];
1232
+ t.owner && h.push({ name: t.owner.name, image: t.owner.image, isOwner: !0 });
1233
+ for (const d of t.assignees)
1234
+ t.owner && d.id === t.owner.id || h.push({ name: d.name, image: d.image, isOwner: !1 });
1193
1235
  return (
1194
1236
  // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- role="group" groups task content for screen readers; click/key handlers are intentional
1195
1237
  /* @__PURE__ */ a(
@@ -1200,37 +1242,37 @@ function st({
1200
1242
  "data-task-id": t.id,
1201
1243
  "aria-label": `Task ${t.taskId}: ${t.title}`,
1202
1244
  className: N(
1203
- ps({
1245
+ Ds({
1204
1246
  state: n ? "overlay" : s ? "dragging" : "default",
1205
1247
  blocked: t.isBlocked,
1206
- selected: x,
1207
- dimmed: v
1248
+ selected: m,
1249
+ dimmed: w
1208
1250
  }),
1209
1251
  n && "scale-[1.03] rotate-[1.5deg] shadow-floating",
1210
1252
  s && "opacity-40",
1211
- u && "ring-1 ring-accent-9"
1253
+ x && "ring-1 ring-accent-9"
1212
1254
  ),
1213
- onClick: () => p(t.id),
1214
- onKeyDown: (h) => {
1215
- (h.key === "Enter" || h.key === " ") && (h.preventDefault(), p(t.id));
1255
+ onClick: () => g(t.id),
1256
+ onKeyDown: (d) => {
1257
+ (d.key === "Enter" || d.key === " ") && (d.preventDefault(), g(t.id));
1216
1258
  },
1217
1259
  children: [
1218
1260
  /* @__PURE__ */ e(
1219
- se.div,
1261
+ ie.div,
1220
1262
  {
1221
1263
  className: N(
1222
1264
  "absolute -top-2 -left-2 z-10 transition-opacity duration-fast-02",
1223
- g || x ? "opacity-100" : "opacity-0 group-hover/card:opacity-100"
1265
+ p || m ? "opacity-100" : "opacity-0 group-hover/card:opacity-100"
1224
1266
  ),
1225
- initial: g || x ? { scale: 0.85 } : !1,
1267
+ initial: p || m ? { scale: 0.85 } : !1,
1226
1268
  animate: { scale: 1 },
1227
- transition: ae.bouncy,
1269
+ transition: oe.bouncy,
1228
1270
  children: /* @__PURE__ */ e(
1229
- je,
1271
+ et,
1230
1272
  {
1231
- checked: x,
1232
- onCheckedChange: () => o(t.id),
1233
- onClick: (h) => h.stopPropagation(),
1273
+ checked: m,
1274
+ onCheckedChange: () => r(t.id),
1275
+ onClick: (d) => d.stopPropagation(),
1234
1276
  "aria-label": `Select task ${t.taskId}`,
1235
1277
  className: "rounded-full bg-surface-base shadow-raised"
1236
1278
  }
@@ -1239,7 +1281,7 @@ function st({
1239
1281
  ),
1240
1282
  /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-02", children: [
1241
1283
  /* @__PURE__ */ e("span", { className: "text-ds-xs font-mono leading-none text-surface-fg-subtle", children: t.taskId }),
1242
- /* @__PURE__ */ e(D, { className: N("h-3 w-3 flex-shrink-0", l), title: `Priority: ${t.priority}` }),
1284
+ /* @__PURE__ */ e(M, { className: N("h-3 w-3 flex-shrink-0", l), title: `Priority: ${t.priority}` }),
1243
1285
  /* @__PURE__ */ e("div", { className: "flex-1" }),
1244
1286
  /* @__PURE__ */ e(
1245
1287
  "button",
@@ -1250,28 +1292,28 @@ function st({
1250
1292
  "active:cursor-grabbing",
1251
1293
  n && "opacity-action-disabled"
1252
1294
  ),
1253
- ...(r == null ? void 0 : r.attributes) ?? {},
1254
- ...(r == null ? void 0 : r.listeners) ?? {},
1295
+ ...(i == null ? void 0 : i.attributes) ?? {},
1296
+ ...(i == null ? void 0 : i.listeners) ?? {},
1255
1297
  "aria-label": `Drag handle for task: ${t.title}`,
1256
1298
  "aria-roledescription": "sortable",
1257
- onClick: (h) => h.stopPropagation(),
1258
- children: /* @__PURE__ */ e(Vt, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle" })
1299
+ onClick: (d) => d.stopPropagation(),
1300
+ children: /* @__PURE__ */ e(Xt, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle" })
1259
1301
  }
1260
1302
  )
1261
1303
  ] }),
1262
1304
  /* @__PURE__ */ e("p", { className: "mt-ds-02 text-ds-sm font-medium text-surface-fg line-clamp-2", children: t.title }),
1263
1305
  /* @__PURE__ */ a("div", { className: "mt-ds-03 flex items-center gap-ds-02", children: [
1264
- C && /* @__PURE__ */ a(
1306
+ D && /* @__PURE__ */ a(
1265
1307
  "div",
1266
1308
  {
1267
1309
  className: N(
1268
1310
  "flex items-center gap-ds-01 text-ds-xs leading-tight",
1269
- C.className
1311
+ D.className
1270
1312
  ),
1271
- title: `Due: ${C.label}`,
1313
+ title: `Due: ${D.label}`,
1272
1314
  children: [
1273
- /* @__PURE__ */ e(Le, { className: "h-3 w-3" }),
1274
- /* @__PURE__ */ e("span", { children: C.label })
1315
+ /* @__PURE__ */ e(ze, { className: "h-3 w-3" }),
1316
+ /* @__PURE__ */ e("span", { children: D.label })
1275
1317
  ]
1276
1318
  }
1277
1319
  ),
@@ -1281,7 +1323,7 @@ function st({
1281
1323
  className: "flex items-center gap-ds-01 text-ds-xs text-surface-fg-subtle",
1282
1324
  title: `Subtasks: ${t.subtasksDone} of ${t.subtaskCount} done`,
1283
1325
  children: [
1284
- /* @__PURE__ */ e(Gt, { className: "h-3 w-3" }),
1326
+ /* @__PURE__ */ e(Jt, { className: "h-3 w-3" }),
1285
1327
  /* @__PURE__ */ a("span", { children: [
1286
1328
  t.subtasksDone,
1287
1329
  "/",
@@ -1290,31 +1332,31 @@ function st({
1290
1332
  ]
1291
1333
  }
1292
1334
  ),
1293
- t.visibility === "EVERYONE" && /* @__PURE__ */ e("span", { className: "flex items-center text-surface-fg-subtle", "aria-label": "Client visible", title: "Visible to client", children: /* @__PURE__ */ e(de, { className: "h-3 w-3" }) }),
1294
- t.isBlocked && /* @__PURE__ */ e("span", { className: "flex items-center text-error-11", "aria-label": "Blocked", title: "Blocked", children: /* @__PURE__ */ e(Kt, { className: "h-3 w-3" }) }),
1335
+ t.visibility === "EVERYONE" && /* @__PURE__ */ e("span", { className: "flex items-center text-surface-fg-subtle", "aria-label": "Client visible", title: "Visible to client", children: /* @__PURE__ */ e(re, { className: "h-3 w-3" }) }),
1336
+ t.isBlocked && /* @__PURE__ */ e("span", { className: "flex items-center text-error-11", "aria-label": "Blocked", title: "Blocked", children: /* @__PURE__ */ e(Zt, { className: "h-3 w-3" }) }),
1295
1337
  /* @__PURE__ */ e("div", { className: "flex-1" }),
1296
- m.length > 0 && /* @__PURE__ */ a("div", { className: "flex items-center flex-shrink-0", children: [
1297
- m.slice(0, 3).map((h, f) => /* @__PURE__ */ a(
1298
- Qt,
1338
+ h.length > 0 && /* @__PURE__ */ a("div", { className: "flex items-center flex-shrink-0", children: [
1339
+ h.slice(0, 3).map((d, v) => /* @__PURE__ */ a(
1340
+ as,
1299
1341
  {
1300
1342
  size: "xs",
1301
1343
  className: N(
1302
1344
  "text-ds-xs border-2 border-surface-base",
1303
- f > 0 && "-ml-ds-02b",
1304
- h.isOwner && "shadow-[0_0_0_1.5px_rgba(var(--accent-rgb,99,102,241),0.35),0_0_6px_rgba(var(--accent-rgb,99,102,241),0.2)]"
1345
+ v > 0 && "-ml-ds-02b",
1346
+ d.isOwner && "shadow-[0_0_0_1.5px_rgba(var(--accent-rgb,99,102,241),0.35),0_0_6px_rgba(var(--accent-rgb,99,102,241),0.2)]"
1305
1347
  ),
1306
- style: { zIndex: m.length - f },
1307
- title: h.name,
1348
+ style: { zIndex: h.length - v },
1349
+ title: d.name,
1308
1350
  children: [
1309
- h.image && /* @__PURE__ */ e(qt, { src: h.image, alt: h.name }),
1310
- /* @__PURE__ */ e(Xt, { className: "font-body font-semibold", children: tt(h.name) })
1351
+ d.image && /* @__PURE__ */ e(ns, { src: d.image, alt: d.name }),
1352
+ /* @__PURE__ */ e(rs, { className: "font-body font-semibold", children: lt(d.name) })
1311
1353
  ]
1312
1354
  },
1313
- f
1355
+ v
1314
1356
  )),
1315
- m.length > 3 && /* @__PURE__ */ a("span", { className: "ml-ds-01 text-ds-xs text-surface-fg-subtle", children: [
1357
+ h.length > 3 && /* @__PURE__ */ a("span", { className: "ml-ds-01 text-ds-xs text-surface-fg-subtle", children: [
1316
1358
  "+",
1317
- m.length - 3
1359
+ h.length - 3
1318
1360
  ] })
1319
1361
  ] })
1320
1362
  ] })
@@ -1323,37 +1365,37 @@ function st({
1323
1365
  )
1324
1366
  );
1325
1367
  }
1326
- const at = P.forwardRef(
1327
- function({ task: s, className: n, ...r }, c) {
1368
+ const dt = F.forwardRef(
1369
+ function({ task: s, className: n, ...i }, c) {
1328
1370
  const {
1329
- attributes: o,
1330
- listeners: d,
1331
- setNodeRef: I,
1332
- transform: w,
1333
- transition: p,
1334
- isDragging: x
1335
- } = Pe({
1371
+ attributes: r,
1372
+ listeners: u,
1373
+ setNodeRef: k,
1374
+ transform: b,
1375
+ transition: g,
1376
+ isDragging: m
1377
+ } = Ge({
1336
1378
  id: s.id,
1337
1379
  data: {
1338
1380
  type: "task",
1339
1381
  task: s
1340
1382
  }
1341
- }), g = Ke(I, c), u = {
1342
- transform: _e.Transform.toString(w),
1343
- transition: p
1383
+ }), p = Je(k, c), x = {
1384
+ transform: je.Transform.toString(b),
1385
+ transition: g
1344
1386
  };
1345
- return /* @__PURE__ */ e("div", { ref: g, style: u, className: n, ...r, children: /* @__PURE__ */ e(
1346
- st,
1387
+ return /* @__PURE__ */ e("div", { ref: p, style: x, className: n, ...i, children: /* @__PURE__ */ e(
1388
+ ct,
1347
1389
  {
1348
1390
  task: s,
1349
- isDragging: x,
1350
- dragHandleProps: { attributes: o, listeners: d }
1391
+ isDragging: m,
1392
+ dragHandleProps: { attributes: r, listeners: u }
1351
1393
  }
1352
1394
  ) });
1353
1395
  }
1354
1396
  );
1355
- at.displayName = "TaskCard";
1356
- const bs = He(
1397
+ dt.displayName = "TaskCard";
1398
+ const Ts = Ze(
1357
1399
  "group/card flex items-center gap-ds-02 py-2 pl-3 pr-ds-03 border border-transparent rounded-ds-lg bg-surface-raised transition-[box-shadow,border-color,transform,background-color] duration-fast-02 ease-productive-standard cursor-pointer hover:bg-surface-raised-hover hover:shadow-raised-hover hover:-translate-y-px",
1358
1400
  {
1359
1401
  variants: {
@@ -1372,20 +1414,20 @@ const bs = He(
1372
1414
  }
1373
1415
  }
1374
1416
  );
1375
- function nt({
1417
+ function ut({
1376
1418
  task: t,
1377
1419
  isDragging: s,
1378
1420
  isDragOverlay: n
1379
1421
  }) {
1380
- var v;
1422
+ var w;
1381
1423
  const {
1382
- selectedTaskIds: r,
1424
+ selectedTaskIds: i,
1383
1425
  toggleTaskSelection: c,
1384
- focusedTaskId: o,
1385
- currentUserId: d,
1386
- highlightMyTasks: I,
1387
- onClickTask: w
1388
- } = K(), p = r.has(t.id), x = r.size > 0, g = o === t.id, u = et[t.priority], C = Ie[t.priority], D = I && d != null && ((v = t.owner) == null ? void 0 : v.id) !== d && !t.assignees.some((m) => m.id === d), l = t.owner ?? t.assignees[0] ?? null;
1426
+ focusedTaskId: r,
1427
+ currentUserId: u,
1428
+ highlightMyTasks: k,
1429
+ onClickTask: b
1430
+ } = P(), g = i.has(t.id), m = i.size > 0, p = r === t.id, x = ot[t.priority], D = Me[t.priority], M = k && u != null && ((w = t.owner) == null ? void 0 : w.id) !== u && !t.assignees.some((h) => h.id === u), l = t.owner ?? t.assignees[0] ?? null;
1389
1431
  return (
1390
1432
  // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- role="group" groups task content for screen readers; click/key handlers are intentional
1391
1433
  /* @__PURE__ */ a(
@@ -1397,42 +1439,42 @@ function nt({
1397
1439
  "aria-label": `Task ${t.taskId}: ${t.title}`,
1398
1440
  className: N(
1399
1441
  "relative",
1400
- bs({
1401
- selected: p,
1402
- dimmed: D
1442
+ Ts({
1443
+ selected: g,
1444
+ dimmed: M
1403
1445
  }),
1404
1446
  s && "opacity-40",
1405
1447
  n && "scale-[1.03] rotate-[1.5deg] shadow-floating",
1406
- g && "ring-1 ring-accent-9"
1448
+ p && "ring-1 ring-accent-9"
1407
1449
  ),
1408
- onClick: () => w(t.id),
1409
- onKeyDown: (m) => {
1410
- (m.key === "Enter" || m.key === " ") && (m.preventDefault(), w(t.id));
1450
+ onClick: () => b(t.id),
1451
+ onKeyDown: (h) => {
1452
+ (h.key === "Enter" || h.key === " ") && (h.preventDefault(), b(t.id));
1411
1453
  },
1412
1454
  children: [
1413
1455
  /* @__PURE__ */ e(
1414
- se.div,
1456
+ ie.div,
1415
1457
  {
1416
1458
  className: N(
1417
1459
  "absolute -top-1.5 -left-1.5 z-10 transition-opacity duration-fast-02",
1418
- x || p ? "opacity-100" : "opacity-0 group-hover/card:opacity-100"
1460
+ m || g ? "opacity-100" : "opacity-0 group-hover/card:opacity-100"
1419
1461
  ),
1420
- initial: x || p ? { scale: 0.85 } : !1,
1462
+ initial: m || g ? { scale: 0.85 } : !1,
1421
1463
  animate: { scale: 1 },
1422
- transition: ae.bouncy,
1464
+ transition: oe.bouncy,
1423
1465
  children: /* @__PURE__ */ e(
1424
- je,
1466
+ et,
1425
1467
  {
1426
- checked: p,
1468
+ checked: g,
1427
1469
  onCheckedChange: () => c(t.id),
1428
- onClick: (m) => m.stopPropagation(),
1470
+ onClick: (h) => h.stopPropagation(),
1429
1471
  "aria-label": `Select task ${t.taskId}`,
1430
1472
  className: "rounded-full bg-surface-base shadow-raised"
1431
1473
  }
1432
1474
  )
1433
1475
  }
1434
1476
  ),
1435
- /* @__PURE__ */ e(u, { className: N("h-3.5 w-3.5 flex-shrink-0", C), title: `Priority: ${t.priority}` }),
1477
+ /* @__PURE__ */ e(x, { className: N("h-3.5 w-3.5 flex-shrink-0", D), title: `Priority: ${t.priority}` }),
1436
1478
  /* @__PURE__ */ e("span", { className: "text-ds-xs font-mono text-surface-fg-subtle flex-shrink-0", children: t.taskId }),
1437
1479
  /* @__PURE__ */ e("span", { className: "text-ds-sm text-surface-fg line-clamp-1 flex-1 min-w-0", children: t.title }),
1438
1480
  t.subtaskCount > 0 && /* @__PURE__ */ a("span", { className: "text-ds-xs text-surface-fg-subtle flex-shrink-0", children: [
@@ -1448,7 +1490,7 @@ function nt({
1448
1490
  t.owner && "shadow-[0_0_0_1px_rgba(var(--accent-rgb,99,102,241),0.35),0_0_4px_rgba(var(--accent-rgb,99,102,241),0.2)]"
1449
1491
  ),
1450
1492
  title: l.name,
1451
- children: l.image ? /* @__PURE__ */ e("img", { src: l.image, alt: l.name, className: "h-full w-full object-cover" }) : tt(l.name)
1493
+ children: l.image ? /* @__PURE__ */ e("img", { src: l.image, alt: l.name, className: "h-full w-full object-cover" }) : lt(l.name)
1452
1494
  }
1453
1495
  )
1454
1496
  ]
@@ -1456,83 +1498,83 @@ function nt({
1456
1498
  )
1457
1499
  );
1458
1500
  }
1459
- const rt = P.forwardRef(
1460
- function({ task: s, className: n, ...r }, c) {
1501
+ const mt = F.forwardRef(
1502
+ function({ task: s, className: n, ...i }, c) {
1461
1503
  const {
1462
- attributes: o,
1463
- listeners: d,
1464
- setNodeRef: I,
1465
- transform: w,
1466
- transition: p,
1467
- isDragging: x
1468
- } = Pe({
1504
+ attributes: r,
1505
+ listeners: u,
1506
+ setNodeRef: k,
1507
+ transform: b,
1508
+ transition: g,
1509
+ isDragging: m
1510
+ } = Ge({
1469
1511
  id: s.id,
1470
1512
  data: {
1471
1513
  type: "task",
1472
1514
  task: s
1473
1515
  }
1474
- }), g = Ke(I, c), u = {
1475
- transform: _e.Transform.toString(w),
1476
- transition: p
1516
+ }), p = Je(k, c), x = {
1517
+ transform: je.Transform.toString(b),
1518
+ transition: g
1477
1519
  };
1478
- return /* @__PURE__ */ e("div", { ref: g, style: u, className: n, ...r, children: /* @__PURE__ */ e(
1479
- nt,
1520
+ return /* @__PURE__ */ e("div", { ref: p, style: x, className: n, ...i, children: /* @__PURE__ */ e(
1521
+ ut,
1480
1522
  {
1481
1523
  task: s,
1482
- isDragging: x,
1483
- dragHandleProps: { attributes: o, listeners: d }
1524
+ isDragging: m,
1525
+ dragHandleProps: { attributes: r, listeners: u }
1484
1526
  }
1485
1527
  ) });
1486
1528
  }
1487
1529
  );
1488
- rt.displayName = "TaskCardCompact";
1489
- const it = P.forwardRef(function({ task: s, className: n, ...r }, c) {
1490
- return /* @__PURE__ */ e("div", { ref: c, className: n, ...r, children: /* @__PURE__ */ e(nt, { task: s, isDragOverlay: !0 }) });
1530
+ mt.displayName = "TaskCardCompact";
1531
+ const ht = F.forwardRef(function({ task: s, className: n, ...i }, c) {
1532
+ return /* @__PURE__ */ e("div", { ref: c, className: n, ...i, children: /* @__PURE__ */ e(ut, { task: s, isDragOverlay: !0 }) });
1491
1533
  });
1492
- it.displayName = "TaskCardCompactOverlay";
1493
- const ot = P.forwardRef(
1494
- function({ task: s, className: n, ...r }, c) {
1495
- return /* @__PURE__ */ e("div", { ref: c, className: n, ...r, children: /* @__PURE__ */ e(st, { task: s, isDragOverlay: !0 }) });
1534
+ ht.displayName = "TaskCardCompactOverlay";
1535
+ const ft = F.forwardRef(
1536
+ function({ task: s, className: n, ...i }, c) {
1537
+ return /* @__PURE__ */ e("div", { ref: c, className: n, ...i, children: /* @__PURE__ */ e(ct, { task: s, isDragOverlay: !0 }) });
1496
1538
  }
1497
1539
  );
1498
- ot.displayName = "TaskCardOverlay";
1499
- const xs = [
1500
- { value: "LOW", label: "Low", icon: Ge },
1501
- { value: "MEDIUM", label: "Medium", icon: Se },
1502
- { value: "HIGH", label: "High", icon: Ve },
1503
- { value: "URGENT", label: "Urgent", icon: Ne }
1504
- ], lt = P.forwardRef(({ taskId: t, children: s, className: n }, r) => {
1540
+ ft.displayName = "TaskCardOverlay";
1541
+ const Ss = [
1542
+ { value: "LOW", label: "Low", icon: Xe },
1543
+ { value: "MEDIUM", label: "Medium", icon: Be },
1544
+ { value: "HIGH", label: "High", icon: Qe },
1545
+ { value: "URGENT", label: "Urgent", icon: Re }
1546
+ ], gt = F.forwardRef(({ taskId: t, children: s, className: n }, i) => {
1505
1547
  const {
1506
1548
  rawColumns: c,
1507
- members: o,
1508
- onQuickPriorityChange: d,
1509
- onQuickAssign: I,
1510
- onQuickLabelAdd: w,
1511
- onQuickDueDateChange: p,
1512
- onQuickVisibilityChange: x,
1513
- onQuickDelete: g
1514
- } = K(), u = o, C = Ye(c), D = P.useRef(null);
1515
- return /* @__PURE__ */ a(Jt, { children: [
1516
- /* @__PURE__ */ e(Zt, { ref: r, children: s }),
1517
- /* @__PURE__ */ a(es, { className: N("w-52", n), children: [
1518
- /* @__PURE__ */ a(be, { children: [
1519
- /* @__PURE__ */ a(xe, { children: [
1520
- /* @__PURE__ */ e(Ne, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
1549
+ members: r,
1550
+ onQuickPriorityChange: u,
1551
+ onQuickAssign: k,
1552
+ onQuickLabelAdd: b,
1553
+ onQuickDueDateChange: g,
1554
+ onQuickVisibilityChange: m,
1555
+ onQuickDelete: p
1556
+ } = P(), x = r, D = tt(c), M = F.useRef(null);
1557
+ return /* @__PURE__ */ a(is, { children: [
1558
+ /* @__PURE__ */ e(os, { ref: i, children: s }),
1559
+ /* @__PURE__ */ a(ls, { className: N("w-52", n), children: [
1560
+ /* @__PURE__ */ a(ye, { children: [
1561
+ /* @__PURE__ */ a(Ce, { children: [
1562
+ /* @__PURE__ */ e(Re, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
1521
1563
  "Set Priority"
1522
1564
  ] }),
1523
- /* @__PURE__ */ e(we, { className: "w-40", children: xs.map((l) => {
1524
- const v = l.icon;
1565
+ /* @__PURE__ */ e(Ne, { className: "w-40", children: Ss.map((l) => {
1566
+ const w = l.icon;
1525
1567
  return /* @__PURE__ */ a(
1526
- ee,
1568
+ te,
1527
1569
  {
1528
- onSelect: () => d(t, l.value),
1570
+ onSelect: () => u(t, l.value),
1529
1571
  children: [
1530
1572
  /* @__PURE__ */ e(
1531
- v,
1573
+ w,
1532
1574
  {
1533
1575
  className: N(
1534
1576
  "mr-ds-03 h-ico-sm w-ico-sm",
1535
- Ie[l.value]
1577
+ Me[l.value]
1536
1578
  )
1537
1579
  }
1538
1580
  ),
@@ -1543,52 +1585,52 @@ const xs = [
1543
1585
  );
1544
1586
  }) })
1545
1587
  ] }),
1546
- u.length > 0 && /* @__PURE__ */ a(be, { children: [
1547
- /* @__PURE__ */ a(xe, { children: [
1548
- /* @__PURE__ */ e(ce, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
1588
+ x.length > 0 && /* @__PURE__ */ a(ye, { children: [
1589
+ /* @__PURE__ */ a(Ce, { children: [
1590
+ /* @__PURE__ */ e(xe, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
1549
1591
  "Assign"
1550
1592
  ] }),
1551
- /* @__PURE__ */ e(we, { className: "w-44 max-h-48 overflow-y-auto", children: u.map((l) => /* @__PURE__ */ e(
1552
- ee,
1593
+ /* @__PURE__ */ e(Ne, { className: "w-44 max-h-48 overflow-y-auto", children: x.map((l) => /* @__PURE__ */ e(
1594
+ te,
1553
1595
  {
1554
- onSelect: () => I(t, l.id),
1596
+ onSelect: () => k(t, l.id),
1555
1597
  children: l.name
1556
1598
  },
1557
1599
  l.id
1558
1600
  )) })
1559
1601
  ] }),
1560
- /* @__PURE__ */ a(be, { children: [
1561
- /* @__PURE__ */ a(xe, { children: [
1562
- /* @__PURE__ */ e(Ht, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
1602
+ /* @__PURE__ */ a(ye, { children: [
1603
+ /* @__PURE__ */ a(Ce, { children: [
1604
+ /* @__PURE__ */ e(es, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
1563
1605
  "Add Label"
1564
1606
  ] }),
1565
- /* @__PURE__ */ e(we, { className: "w-40 max-h-48 overflow-y-auto", children: C.length > 0 ? C.map((l) => /* @__PURE__ */ e(
1566
- ee,
1607
+ /* @__PURE__ */ e(Ne, { className: "w-40 max-h-48 overflow-y-auto", children: D.length > 0 ? D.map((l) => /* @__PURE__ */ e(
1608
+ te,
1567
1609
  {
1568
- onSelect: () => w(t, l),
1610
+ onSelect: () => b(t, l),
1569
1611
  children: l
1570
1612
  },
1571
1613
  l
1572
1614
  )) : /* @__PURE__ */ e("div", { className: "px-ds-03 py-ds-02 text-ds-xs text-surface-fg-subtle", children: "No labels found" }) })
1573
1615
  ] }),
1574
1616
  /* @__PURE__ */ a(
1575
- ee,
1617
+ te,
1576
1618
  {
1577
1619
  onSelect: (l) => {
1578
- var v;
1579
- l.preventDefault(), (v = D.current) == null || v.showPicker();
1620
+ var w;
1621
+ l.preventDefault(), (w = M.current) == null || w.showPicker();
1580
1622
  },
1581
1623
  children: [
1582
- /* @__PURE__ */ e(Le, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
1624
+ /* @__PURE__ */ e(ze, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
1583
1625
  "Set Due Date",
1584
1626
  /* @__PURE__ */ e(
1585
1627
  "input",
1586
1628
  {
1587
- ref: D,
1629
+ ref: M,
1588
1630
  type: "date",
1589
1631
  className: "absolute opacity-0 pointer-events-none w-0 h-0",
1590
1632
  onChange: (l) => {
1591
- p(t, l.target.value || null);
1633
+ g(t, l.target.value || null);
1592
1634
  },
1593
1635
  tabIndex: -1
1594
1636
  }
@@ -1596,42 +1638,42 @@ const xs = [
1596
1638
  ]
1597
1639
  }
1598
1640
  ),
1599
- /* @__PURE__ */ a(be, { children: [
1600
- /* @__PURE__ */ a(xe, { children: [
1601
- /* @__PURE__ */ e(de, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
1641
+ /* @__PURE__ */ a(ye, { children: [
1642
+ /* @__PURE__ */ a(Ce, { children: [
1643
+ /* @__PURE__ */ e(re, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
1602
1644
  "Visibility"
1603
1645
  ] }),
1604
- /* @__PURE__ */ a(we, { className: "w-44", children: [
1646
+ /* @__PURE__ */ a(Ne, { className: "w-44", children: [
1605
1647
  /* @__PURE__ */ a(
1606
- ee,
1648
+ te,
1607
1649
  {
1608
- onSelect: () => x(t, "INTERNAL"),
1650
+ onSelect: () => m(t, "INTERNAL"),
1609
1651
  children: [
1610
- /* @__PURE__ */ e(Ue, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
1652
+ /* @__PURE__ */ e(Oe, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
1611
1653
  "Internal only"
1612
1654
  ]
1613
1655
  }
1614
1656
  ),
1615
1657
  /* @__PURE__ */ a(
1616
- ee,
1658
+ te,
1617
1659
  {
1618
- onSelect: () => x(t, "EVERYONE"),
1660
+ onSelect: () => m(t, "EVERYONE"),
1619
1661
  children: [
1620
- /* @__PURE__ */ e(de, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
1662
+ /* @__PURE__ */ e(re, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
1621
1663
  "Visible to all"
1622
1664
  ]
1623
1665
  }
1624
1666
  )
1625
1667
  ] })
1626
1668
  ] }),
1627
- /* @__PURE__ */ e(ts, {}),
1669
+ /* @__PURE__ */ e(cs, {}),
1628
1670
  /* @__PURE__ */ a(
1629
- ee,
1671
+ te,
1630
1672
  {
1631
1673
  className: "text-error-11 focus:text-error-11",
1632
- onSelect: () => g(t),
1674
+ onSelect: () => p(t),
1633
1675
  children: [
1634
- /* @__PURE__ */ e(Ae, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
1676
+ /* @__PURE__ */ e(We, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
1635
1677
  "Delete"
1636
1678
  ]
1637
1679
  }
@@ -1639,15 +1681,15 @@ const xs = [
1639
1681
  ] })
1640
1682
  ] });
1641
1683
  });
1642
- lt.displayName = "TaskContextMenu";
1643
- function Re() {
1684
+ gt.displayName = "TaskContextMenu";
1685
+ function Ee() {
1644
1686
  return /* @__PURE__ */ a(
1645
- se.div,
1687
+ ie.div,
1646
1688
  {
1647
1689
  initial: { opacity: 0, scale: 0.95 },
1648
1690
  animate: { opacity: 1, scale: 1 },
1649
1691
  exit: { opacity: 0, scale: 0.95 },
1650
- transition: ae.snappy,
1692
+ transition: oe.snappy,
1651
1693
  className: "rounded-ds-lg border-2 border-dashed border-accent-6 bg-accent-1 px-ds-04 py-ds-05",
1652
1694
  "aria-hidden": !0,
1653
1695
  children: [
@@ -1657,55 +1699,62 @@ function Re() {
1657
1699
  }
1658
1700
  );
1659
1701
  }
1660
- const ct = P.forwardRef(
1661
- function({ column: s, index: n, isOverlay: r, dragPreview: c, draggedTask: o, className: d, ...I }, w) {
1662
- const { viewMode: p } = K(), { setNodeRef: x, isOver: g } = vt({
1702
+ const pt = F.forwardRef(
1703
+ function({ column: s, index: n, isOverlay: i, dragPreview: c, draggedTask: r, className: u, ...k }, b) {
1704
+ const { viewMode: g, completedColumnId: m, showCompleted: p, onToggleCompleted: x } = P(), M = m != null && s.id === m && !p, { setNodeRef: l, isOver: w } = Rt({
1663
1705
  id: `column-${s.id}`,
1664
1706
  data: {
1665
1707
  type: "column",
1666
1708
  column: s
1667
1709
  }
1668
- }), u = s.tasks.map((D) => D.id), C = s.wipLimit != null && s.tasks.length > s.wipLimit;
1710
+ }), h = s.tasks.map((d) => d.id), S = s.wipLimit != null && s.tasks.length > s.wipLimit;
1669
1711
  return /* @__PURE__ */ a(
1670
1712
  "div",
1671
1713
  {
1672
- ref: w,
1714
+ ref: b,
1673
1715
  className: N(
1674
1716
  "flex h-full flex-shrink-0 flex-col rounded-ds-xl bg-surface-sunken border border-surface-border-subtle hover:border-surface-border transition-colors p-1",
1675
- r && "shadow-overlay",
1676
- C && "bg-error-3 border-error-7",
1677
- d
1717
+ i && "shadow-overlay",
1718
+ S && "bg-error-3 border-error-7",
1719
+ u
1678
1720
  ),
1679
- ...I,
1680
- style: { ...I.style, width: ss },
1721
+ ...k,
1722
+ style: { ...k.style, width: ds },
1681
1723
  children: [
1682
- /* @__PURE__ */ e(Je, { column: s, index: n }),
1683
- /* @__PURE__ */ a(
1684
- se.div,
1724
+ /* @__PURE__ */ e(rt, { column: s, index: n }),
1725
+ /* @__PURE__ */ e(
1726
+ ie.div,
1685
1727
  {
1686
- ref: x,
1728
+ ref: l,
1687
1729
  animate: {
1688
- backgroundColor: g ? "var(--color-accent-1, rgba(59,130,246,0.06))" : "transparent"
1730
+ backgroundColor: w ? "var(--color-accent-1, rgba(59,130,246,0.06))" : "transparent"
1689
1731
  },
1690
- transition: ae.snappy,
1732
+ transition: oe.snappy,
1691
1733
  className: "no-scrollbar flex flex-1 flex-col gap-ds-02 overflow-y-auto px-ds-03 pt-2.5 pb-ds-03",
1692
- children: [
1693
- /* @__PURE__ */ a(ze, { items: u, strategy: yt, children: [
1694
- /* @__PURE__ */ e(le, { className: "contents", children: s.tasks.map((D, l) => /* @__PURE__ */ a(P.Fragment, { children: [
1695
- /* @__PURE__ */ e(ie, { children: c && c.index === l && /* @__PURE__ */ e(Re, {}) }),
1696
- /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(lt, { taskId: D.id, children: p === "compact" ? /* @__PURE__ */ e(rt, { task: D }) : /* @__PURE__ */ e(at, { task: D }) }) })
1697
- ] }, D.id)) }),
1698
- /* @__PURE__ */ e(ie, { children: c && c.index >= s.tasks.length && /* @__PURE__ */ e(Re, {}) })
1734
+ children: M ? (
1735
+ /* Completed column collapsed: show only a muted summary */
1736
+ /* @__PURE__ */ a("div", { className: "py-ds-04 text-center text-ds-xs text-surface-fg-subtle", children: [
1737
+ s.tasks.length,
1738
+ " completed ",
1739
+ s.tasks.length === 1 ? "task" : "tasks"
1740
+ ] })
1741
+ ) : /* @__PURE__ */ a(me, { children: [
1742
+ /* @__PURE__ */ a(Ye, { items: h, strategy: Mt, children: [
1743
+ /* @__PURE__ */ e(pe, { className: "contents", children: s.tasks.map((d, v) => /* @__PURE__ */ a(F.Fragment, { children: [
1744
+ /* @__PURE__ */ e(fe, { children: c && c.index === v && /* @__PURE__ */ e(Ee, {}) }),
1745
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(gt, { taskId: d.id, children: g === "compact" ? /* @__PURE__ */ e(mt, { task: d }) : /* @__PURE__ */ e(dt, { task: d }) }) })
1746
+ ] }, d.id)) }),
1747
+ /* @__PURE__ */ e(fe, { children: c && c.index >= s.tasks.length && /* @__PURE__ */ e(Ee, {}) })
1699
1748
  ] }),
1700
1749
  s.tasks.length === 0 && !c && /* @__PURE__ */ e(
1701
- Ze,
1750
+ it,
1702
1751
  {
1703
1752
  index: n,
1704
- isDropTarget: g
1753
+ isDropTarget: w
1705
1754
  }
1706
1755
  ),
1707
- /* @__PURE__ */ e(ie, { children: s.tasks.length === 0 && c && /* @__PURE__ */ e(Re, {}) })
1708
- ]
1756
+ /* @__PURE__ */ e(fe, { children: s.tasks.length === 0 && c && /* @__PURE__ */ e(Ee, {}) })
1757
+ ] })
1709
1758
  }
1710
1759
  )
1711
1760
  ]
@@ -1713,91 +1762,91 @@ const ct = P.forwardRef(
1713
1762
  );
1714
1763
  }
1715
1764
  );
1716
- ct.displayName = "BoardColumn";
1717
- function ws(t) {
1765
+ pt.displayName = "BoardColumn";
1766
+ function Rs(t) {
1718
1767
  const {
1719
1768
  columns: s,
1720
1769
  focusedTaskId: n,
1721
- setFocusedTaskId: r,
1770
+ setFocusedTaskId: i,
1722
1771
  selectedTaskIds: c,
1723
- toggleTaskSelection: o,
1724
- selectRange: d,
1725
- clearSelection: I,
1726
- clearFilters: w,
1727
- hasActiveFilters: p,
1728
- onClickTask: x
1729
- } = K(), g = O(
1772
+ toggleTaskSelection: r,
1773
+ selectRange: u,
1774
+ clearSelection: k,
1775
+ clearFilters: b,
1776
+ hasActiveFilters: g,
1777
+ onClickTask: m
1778
+ } = P(), p = L(
1730
1779
  (l) => {
1731
- for (let v = 0; v < s.length; v++)
1732
- for (let m = 0; m < s[v].tasks.length; m++)
1733
- if (s[v].tasks[m].id === l)
1734
- return { columnIndex: v, taskIndex: m, taskId: l };
1780
+ for (let w = 0; w < s.length; w++)
1781
+ for (let h = 0; h < s[w].tasks.length; h++)
1782
+ if (s[w].tasks[h].id === l)
1783
+ return { columnIndex: w, taskIndex: h, taskId: l };
1735
1784
  return null;
1736
1785
  },
1737
1786
  [s]
1738
- ), u = O(
1739
- (l, v) => {
1740
- const m = s[l];
1741
- if (!m) return null;
1742
- const R = m.tasks[v];
1743
- return (R == null ? void 0 : R.id) ?? null;
1787
+ ), x = L(
1788
+ (l, w) => {
1789
+ const h = s[l];
1790
+ if (!h) return null;
1791
+ const S = h.tasks[w];
1792
+ return (S == null ? void 0 : S.id) ?? null;
1744
1793
  },
1745
1794
  [s]
1746
- ), C = O((l) => {
1747
- const v = document.querySelector(`[data-task-id="${l}"]`);
1748
- v && v.scrollIntoView({ block: "nearest", behavior: "smooth" });
1749
- }, []), D = O(
1795
+ ), D = L((l) => {
1796
+ const w = document.querySelector(`[data-task-id="${l}"]`);
1797
+ w && w.scrollIntoView({ block: "nearest", behavior: "smooth" });
1798
+ }, []), M = L(
1750
1799
  (l) => {
1751
- const v = l.target;
1752
- if (!(v.tagName === "INPUT" || v.tagName === "TEXTAREA" || v.isContentEditable))
1800
+ const w = l.target;
1801
+ if (!(w.tagName === "INPUT" || w.tagName === "TEXTAREA" || w.isContentEditable))
1753
1802
  switch (l.key) {
1754
1803
  case "ArrowDown":
1755
1804
  case "ArrowUp": {
1756
1805
  l.preventDefault();
1757
- const m = l.key === "ArrowDown" ? 1 : -1;
1806
+ const h = l.key === "ArrowDown" ? 1 : -1;
1758
1807
  if (!n) {
1759
- for (const T of s)
1760
- if (T.tasks.length > 0) {
1761
- const L = T.tasks[0].id;
1762
- r(L), C(L);
1808
+ for (const I of s)
1809
+ if (I.tasks.length > 0) {
1810
+ const A = I.tasks[0].id;
1811
+ i(A), D(A);
1763
1812
  break;
1764
1813
  }
1765
1814
  return;
1766
1815
  }
1767
- const R = g(n);
1768
- if (!R) return;
1769
- const h = R.taskIndex + m, f = u(R.columnIndex, h);
1770
- f && (r(f), C(f), l.shiftKey && n && d(n, f));
1816
+ const S = p(n);
1817
+ if (!S) return;
1818
+ const d = S.taskIndex + h, v = x(S.columnIndex, d);
1819
+ v && (i(v), D(v), l.shiftKey && n && u(n, v));
1771
1820
  return;
1772
1821
  }
1773
1822
  case "ArrowLeft":
1774
1823
  case "ArrowRight": {
1775
1824
  l.preventDefault();
1776
- const m = l.key === "ArrowRight" ? 1 : -1;
1825
+ const h = l.key === "ArrowRight" ? 1 : -1;
1777
1826
  if (!n) return;
1778
- const R = g(n);
1779
- if (!R) return;
1780
- let h = R.columnIndex + m;
1781
- for (; h >= 0 && h < s.length; ) {
1782
- if (s[h].tasks.length > 0) {
1783
- const f = Math.min(R.taskIndex, s[h].tasks.length - 1), T = s[h].tasks[f].id;
1784
- r(T), C(T);
1827
+ const S = p(n);
1828
+ if (!S) return;
1829
+ let d = S.columnIndex + h;
1830
+ for (; d >= 0 && d < s.length; ) {
1831
+ if (s[d].tasks.length > 0) {
1832
+ const v = Math.min(S.taskIndex, s[d].tasks.length - 1), I = s[d].tasks[v].id;
1833
+ i(I), D(I);
1785
1834
  return;
1786
1835
  }
1787
- h += m;
1836
+ d += h;
1788
1837
  }
1789
1838
  return;
1790
1839
  }
1791
1840
  case "Enter": {
1792
- n && (l.preventDefault(), x(n));
1841
+ n && (l.preventDefault(), m(n));
1793
1842
  return;
1794
1843
  }
1795
1844
  case " ": {
1796
- n && (l.preventDefault(), o(n));
1845
+ n && (l.preventDefault(), r(n));
1797
1846
  return;
1798
1847
  }
1799
1848
  case "Escape": {
1800
- l.preventDefault(), c.size > 0 ? I() : p && w();
1849
+ l.preventDefault(), c.size > 0 ? k() : g && b();
1801
1850
  return;
1802
1851
  }
1803
1852
  }
@@ -1806,25 +1855,25 @@ function ws(t) {
1806
1855
  n,
1807
1856
  s,
1808
1857
  c,
1809
- p,
1810
1858
  g,
1811
- u,
1859
+ p,
1860
+ x,
1861
+ i,
1862
+ D,
1812
1863
  r,
1813
- C,
1814
- o,
1815
- d,
1816
- I,
1817
- w,
1818
- x
1864
+ u,
1865
+ k,
1866
+ b,
1867
+ m
1819
1868
  ]
1820
1869
  );
1821
- oe(() => {
1870
+ ge(() => {
1822
1871
  const l = t.current;
1823
1872
  if (l)
1824
- return l.addEventListener("keydown", D), () => l.removeEventListener("keydown", D);
1825
- }, [t, D]);
1873
+ return l.addEventListener("keydown", M), () => l.removeEventListener("keydown", M);
1874
+ }, [t, M]);
1826
1875
  }
1827
- function vs() {
1876
+ function Ms() {
1828
1877
  return {
1829
1878
  onDragStart({ active: t }) {
1830
1879
  const s = t.data.current;
@@ -1846,151 +1895,194 @@ function vs() {
1846
1895
  }
1847
1896
  };
1848
1897
  }
1849
- function ys({ className: t }) {
1898
+ function As() {
1899
+ const {
1900
+ columns: t,
1901
+ viewMode: s,
1902
+ completedColumnId: n,
1903
+ showCompleted: i,
1904
+ onClickTask: c
1905
+ } = P();
1906
+ return /* @__PURE__ */ e("div", { className: "flex flex-col gap-ds-03 pb-ds-05", children: t.map((r, u) => {
1907
+ const b = n != null && r.id === n && !i, g = Se[u % Se.length];
1908
+ return /* @__PURE__ */ a("div", { className: "flex flex-col", children: [
1909
+ /* @__PURE__ */ a("div", { className: "sticky top-0 z-10 flex items-center gap-ds-02 bg-surface-base px-ds-04 py-ds-03 border-b border-surface-border-subtle", children: [
1910
+ /* @__PURE__ */ e(
1911
+ "span",
1912
+ {
1913
+ className: `h-2.5 w-2.5 flex-shrink-0 rounded-full ${g}`,
1914
+ "aria-hidden": "true"
1915
+ }
1916
+ ),
1917
+ /* @__PURE__ */ e("span", { className: "text-ds-sm font-semibold text-surface-fg", children: r.name }),
1918
+ /* @__PURE__ */ e(qe, { variant: "subtle", className: "ml-auto text-ds-xs", children: r.tasks.length })
1919
+ ] }),
1920
+ b ? /* @__PURE__ */ a("div", { className: "px-ds-04 py-ds-03 text-ds-xs text-surface-fg-subtle", children: [
1921
+ r.tasks.length,
1922
+ " completed ",
1923
+ r.tasks.length === 1 ? "task" : "tasks"
1924
+ ] }) : r.tasks.length === 0 ? /* @__PURE__ */ e("div", { className: "px-ds-04 py-ds-03 text-ds-xs text-surface-fg-subtle", children: "No tasks" }) : /* @__PURE__ */ e("div", { className: "flex flex-col", children: r.tasks.map((m) => /* @__PURE__ */ a(
1925
+ "button",
1926
+ {
1927
+ type: "button",
1928
+ onClick: () => c(m.id),
1929
+ className: "flex items-center gap-ds-03 border-b border-surface-border-subtle px-ds-04 py-ds-03 text-left transition-colors hover:bg-surface-raised-hover",
1930
+ children: [
1931
+ /* @__PURE__ */ e("span", { className: "flex-1 truncate text-ds-sm text-surface-fg", children: m.title }),
1932
+ m.priority && /* @__PURE__ */ e("span", { className: "flex-shrink-0 text-ds-xs text-surface-fg-subtle", children: m.priority }),
1933
+ m.owner && /* @__PURE__ */ e("span", { className: "flex-shrink-0 text-ds-xs text-surface-fg-subtle", children: m.owner.name })
1934
+ ]
1935
+ },
1936
+ m.id
1937
+ )) })
1938
+ ] }, r.id);
1939
+ }) });
1940
+ }
1941
+ function Ls({ className: t }) {
1850
1942
  const {
1851
1943
  columns: s,
1852
1944
  viewMode: n,
1853
- activeTask: r,
1945
+ activeTask: i,
1854
1946
  setActiveTask: c,
1855
- onTaskMove: o,
1856
- onAddColumn: d
1857
- } = K(), [I, w] = E(!1), [p, x] = E(null);
1858
- ye(null);
1859
- const g = ye(null);
1860
- ws(g), oe(() => {
1861
- w(!0);
1947
+ onTaskMove: r,
1948
+ onAddColumn: u
1949
+ } = P(), [k, b] = E(!1), [g, m] = E(null);
1950
+ Ie(null);
1951
+ const p = Ie(null);
1952
+ Rs(p), ge(() => {
1953
+ b(!0);
1862
1954
  }, []);
1863
- const u = kt(
1864
- De(At, {
1955
+ const x = At(
1956
+ Ae(Bt, {
1865
1957
  activationConstraint: { distance: 5 }
1866
1958
  }),
1867
- De(St, {
1959
+ Ae(Ot, {
1868
1960
  activationConstraint: { delay: 200, tolerance: 5 }
1869
1961
  }),
1870
- De(Rt, {
1871
- coordinateGetter: Tt
1962
+ Ae(Et, {
1963
+ coordinateGetter: Lt
1872
1964
  })
1873
- ), C = re(() => vs(), []), D = s.map((f) => `column-${f.id}`), l = O(
1874
- (f) => {
1875
- for (const T of s)
1876
- if (T.tasks.some((L) => L.id === f))
1877
- return T.id;
1965
+ ), D = he(() => Ms(), []), M = s.map((v) => `column-${v.id}`), l = L(
1966
+ (v) => {
1967
+ for (const I of s)
1968
+ if (I.tasks.some((A) => A.id === v))
1969
+ return I.id;
1878
1970
  return null;
1879
1971
  },
1880
1972
  [s]
1881
- ), v = O(
1882
- (f) => {
1883
- const T = f.active.data.current;
1884
- (T == null ? void 0 : T.type) === "task" && c(T.task);
1973
+ ), w = L(
1974
+ (v) => {
1975
+ const I = v.active.data.current;
1976
+ (I == null ? void 0 : I.type) === "task" && c(I.task);
1885
1977
  },
1886
1978
  [c]
1887
- ), m = O(
1888
- (f) => {
1889
- const { active: T, over: L } = f;
1890
- if (!L) {
1891
- x(null);
1979
+ ), h = L(
1980
+ (v) => {
1981
+ const { active: I, over: A } = v;
1982
+ if (!A) {
1983
+ m(null);
1892
1984
  return;
1893
1985
  }
1894
- const $ = T.id, y = L.id, i = l($);
1895
- if (!i) return;
1896
- let b = null, A = 0;
1897
- if (y.startsWith("column-")) {
1898
- b = y.replace("column-", "");
1899
- const M = s.find((S) => S.id === b);
1900
- A = (M == null ? void 0 : M.tasks.length) ?? 0;
1901
- } else if (b = l(y), b) {
1902
- const M = s.find((S) => S.id === b);
1903
- A = (M == null ? void 0 : M.tasks.findIndex((S) => S.id === y)) ?? 0;
1986
+ const $ = I.id, T = A.id, o = l($);
1987
+ if (!o) return;
1988
+ let f = null, R = 0;
1989
+ if (T.startsWith("column-")) {
1990
+ f = T.replace("column-", "");
1991
+ const O = s.find((y) => y.id === f);
1992
+ R = (O == null ? void 0 : O.tasks.length) ?? 0;
1993
+ } else if (f = l(T), f) {
1994
+ const O = s.find((y) => y.id === f);
1995
+ R = (O == null ? void 0 : O.tasks.findIndex((y) => y.id === T)) ?? 0;
1904
1996
  }
1905
- if (!b) {
1906
- x(null);
1997
+ if (!f) {
1998
+ m(null);
1907
1999
  return;
1908
2000
  }
1909
- if (i === b) {
1910
- x(null);
2001
+ if (o === f) {
2002
+ m(null);
1911
2003
  return;
1912
2004
  }
1913
- x({ taskId: $, columnId: b, index: A });
2005
+ m({ taskId: $, columnId: f, index: R });
1914
2006
  },
1915
2007
  [s, l]
1916
- ), R = O(
1917
- (f) => {
1918
- const { active: T, over: L } = f, $ = p;
1919
- if (c(null), x(null), !L) return;
1920
- const y = T.id, i = L.id, b = l(y);
1921
- if (!b) return;
1922
- if ($ && $.taskId === y) {
1923
- o(y, $.columnId, $.index);
2008
+ ), S = L(
2009
+ (v) => {
2010
+ const { active: I, over: A } = v, $ = g;
2011
+ if (c(null), m(null), !A) return;
2012
+ const T = I.id, o = A.id, f = l(T);
2013
+ if (!f) return;
2014
+ if ($ && $.taskId === T) {
2015
+ r(T, $.columnId, $.index);
1924
2016
  return;
1925
2017
  }
1926
- let A, M;
1927
- if (i.startsWith("column-")) {
1928
- A = i.replace("column-", "");
1929
- const S = s.find((W) => W.id === A);
1930
- if (M = (S == null ? void 0 : S.tasks.length) ?? 0, b === A) {
1931
- const W = S == null ? void 0 : S.tasks.findIndex((q) => q.id === y);
1932
- W !== void 0 && W >= 0 && (M = W);
2018
+ let R, O;
2019
+ if (o.startsWith("column-")) {
2020
+ R = o.replace("column-", "");
2021
+ const y = s.find((z) => z.id === R);
2022
+ if (O = (y == null ? void 0 : y.tasks.length) ?? 0, f === R) {
2023
+ const z = y == null ? void 0 : y.tasks.findIndex((j) => j.id === T);
2024
+ z !== void 0 && z >= 0 && (O = z);
1933
2025
  }
1934
2026
  } else {
1935
- A = l(i) ?? b;
1936
- const S = s.find((W) => W.id === A);
1937
- M = (S == null ? void 0 : S.tasks.findIndex((W) => W.id === i)) ?? 0;
2027
+ R = l(o) ?? f;
2028
+ const y = s.find((z) => z.id === R);
2029
+ O = (y == null ? void 0 : y.tasks.findIndex((z) => z.id === o)) ?? 0;
1938
2030
  }
1939
- o(y, A, M);
2031
+ r(T, R, O);
1940
2032
  },
1941
- [s, p, l, c, o]
1942
- ), h = O(() => {
1943
- c(null), x(null);
2033
+ [s, g, l, c, r]
2034
+ ), d = L(() => {
2035
+ c(null), m(null);
1944
2036
  }, [c]);
1945
2037
  return /* @__PURE__ */ a(
1946
- Ct,
2038
+ Wt,
1947
2039
  {
1948
- sensors: u,
1949
- collisionDetection: Nt,
1950
- onDragStart: v,
1951
- onDragOver: m,
1952
- onDragEnd: R,
1953
- onDragCancel: h,
1954
- accessibility: { announcements: C },
2040
+ sensors: x,
2041
+ collisionDetection: $t,
2042
+ onDragStart: w,
2043
+ onDragOver: h,
2044
+ onDragEnd: S,
2045
+ onDragCancel: d,
2046
+ accessibility: { announcements: D },
1955
2047
  children: [
1956
2048
  /* @__PURE__ */ a(
1957
2049
  "div",
1958
2050
  {
1959
- ref: g,
2051
+ ref: p,
1960
2052
  tabIndex: 0,
1961
2053
  className: "no-scrollbar flex h-full gap-ds-05 overflow-x-auto pb-ds-05 outline-none",
1962
2054
  children: [
1963
2055
  /* @__PURE__ */ e(
1964
- ze,
2056
+ Ye,
1965
2057
  {
1966
- items: D,
1967
- strategy: It,
1968
- children: /* @__PURE__ */ e(le, { delay: 0.05, className: "contents", children: s.map((f, T) => /* @__PURE__ */ e(
1969
- Q,
2058
+ items: M,
2059
+ strategy: zt,
2060
+ children: /* @__PURE__ */ e(pe, { delay: 0.05, className: "contents", children: s.map((v, I) => /* @__PURE__ */ e(
2061
+ J,
1970
2062
  {
1971
2063
  className: "flex-shrink-0",
1972
2064
  children: /* @__PURE__ */ e(
1973
- ct,
2065
+ pt,
1974
2066
  {
1975
- column: f,
1976
- index: T,
1977
- dragPreview: (p == null ? void 0 : p.columnId) === f.id ? p : void 0,
1978
- draggedTask: r
2067
+ column: v,
2068
+ index: I,
2069
+ dragPreview: (g == null ? void 0 : g.columnId) === v.id ? g : void 0,
2070
+ draggedTask: i
1979
2071
  }
1980
2072
  )
1981
2073
  },
1982
- f.id
2074
+ v.id
1983
2075
  )) })
1984
2076
  }
1985
2077
  ),
1986
- d && /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ a(
1987
- F,
2078
+ u && /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ a(
2079
+ W,
1988
2080
  {
1989
2081
  variant: "ghost",
1990
- onClick: d,
2082
+ onClick: u,
1991
2083
  className: "h-ds-md w-[320px] justify-start gap-ds-03 rounded-ds-xl border border-dashed border-surface-border bg-surface-raised text-surface-fg-subtle hover:border-accent-7 hover:bg-accent-2 hover:text-accent-11",
1992
2084
  children: [
1993
- /* @__PURE__ */ e(Me, { className: "h-ico-sm w-ico-sm" }),
2085
+ /* @__PURE__ */ e($e, { className: "h-ico-sm w-ico-sm" }),
1994
2086
  "Add column"
1995
2087
  ]
1996
2088
  }
@@ -1998,42 +2090,46 @@ function ys({ className: t }) {
1998
2090
  ]
1999
2091
  }
2000
2092
  ),
2001
- I && wt(
2002
- /* @__PURE__ */ e(Dt, { dropAnimation: { duration: 240, easing: "cubic-bezier(0.34, 1.56, 0.64, 1)" }, children: r ? n === "compact" ? /* @__PURE__ */ e(it, { task: r }) : /* @__PURE__ */ e(ot, { task: r }) : null }),
2093
+ k && St(
2094
+ /* @__PURE__ */ e(Ft, { dropAnimation: { duration: 240, easing: "cubic-bezier(0.34, 1.56, 0.64, 1)" }, children: i ? n === "compact" ? /* @__PURE__ */ e(ht, { task: i }) : /* @__PURE__ */ e(ft, { task: i }) : null }),
2003
2095
  document.body
2004
2096
  )
2005
2097
  ]
2006
2098
  }
2007
2099
  );
2008
2100
  }
2009
- const ks = P.forwardRef(
2010
- function({ className: s, ...n }, r) {
2011
- return /* @__PURE__ */ e("div", { ref: r, className: s, children: /* @__PURE__ */ e(is, { ...n, children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-ds-03", children: [
2012
- /* @__PURE__ */ e(qe, {}),
2013
- /* @__PURE__ */ e(Xe, {}),
2014
- /* @__PURE__ */ e(ys, {})
2015
- ] }) }) });
2101
+ function Es() {
2102
+ const { isMobileListView: t } = P();
2103
+ return /* @__PURE__ */ a("div", { className: "flex flex-col gap-ds-03", children: [
2104
+ /* @__PURE__ */ e(at, {}),
2105
+ /* @__PURE__ */ e(nt, {}),
2106
+ t ? /* @__PURE__ */ e(As, {}) : /* @__PURE__ */ e(Ls, {})
2107
+ ] });
2108
+ }
2109
+ const Os = F.forwardRef(
2110
+ function({ className: s, ...n }, i) {
2111
+ return /* @__PURE__ */ e("div", { ref: i, className: s, children: /* @__PURE__ */ e(ps, { ...n, children: /* @__PURE__ */ e(Es, {}) }) });
2016
2112
  }
2017
2113
  );
2018
- ks.displayName = "KanbanBoard";
2114
+ Os.displayName = "KanbanBoard";
2019
2115
  export {
2020
- ct as B,
2021
- Be as C,
2022
- We as D,
2023
- ks as K,
2024
- Ie as P,
2025
- at as T,
2026
- is as a,
2027
- qe as b,
2028
- Xe as c,
2029
- ss as d,
2030
- Ze as e,
2031
- Je as f,
2032
- Vs as g,
2033
- rt as h,
2034
- it as i,
2035
- ot as j,
2036
- lt as k,
2037
- ws as l,
2038
- K as u
2116
+ pt as B,
2117
+ Se as C,
2118
+ Ve as D,
2119
+ Os as K,
2120
+ Me as P,
2121
+ dt as T,
2122
+ ps as a,
2123
+ at as b,
2124
+ nt as c,
2125
+ ds as d,
2126
+ it as e,
2127
+ rt as f,
2128
+ ta as g,
2129
+ mt as h,
2130
+ ht as i,
2131
+ ft as j,
2132
+ gt as k,
2133
+ Rs as l,
2134
+ P as u
2039
2135
  };