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