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