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