@devalok/shilp-sutra-karm 0.9.0 → 0.10.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.
Files changed (37) hide show
  1. package/dist/_chunks/kanban-board.js +1869 -482
  2. package/dist/_chunks/task-detail-panel.js +122 -108
  3. package/dist/_chunks/vendor.js +1 -1
  4. package/dist/board/board-column.d.ts +2 -13
  5. package/dist/board/board-column.d.ts.map +1 -1
  6. package/dist/board/board-constants.d.ts +17 -0
  7. package/dist/board/board-constants.d.ts.map +1 -0
  8. package/dist/board/board-context.d.ts +65 -0
  9. package/dist/board/board-context.d.ts.map +1 -0
  10. package/dist/board/board-toolbar.d.ts +5 -0
  11. package/dist/board/board-toolbar.d.ts.map +1 -0
  12. package/dist/board/board-types.d.ts +48 -0
  13. package/dist/board/board-types.d.ts.map +1 -0
  14. package/dist/board/bulk-action-bar.d.ts +5 -0
  15. package/dist/board/bulk-action-bar.d.ts.map +1 -0
  16. package/dist/board/column-empty.d.ts +14 -0
  17. package/dist/board/column-empty.d.ts.map +1 -0
  18. package/dist/board/column-header.d.ts +10 -0
  19. package/dist/board/column-header.d.ts.map +1 -0
  20. package/dist/board/index.d.ts +13 -3
  21. package/dist/board/index.d.ts.map +1 -1
  22. package/dist/board/index.js +20 -5
  23. package/dist/board/kanban-board.d.ts +4 -13
  24. package/dist/board/kanban-board.d.ts.map +1 -1
  25. package/dist/board/task-card.d.ts +11 -16
  26. package/dist/board/task-card.d.ts.map +1 -1
  27. package/dist/board/task-context-menu.d.ts +10 -0
  28. package/dist/board/task-context-menu.d.ts.map +1 -0
  29. package/dist/board/use-board-filters.d.ts +3 -0
  30. package/dist/board/use-board-filters.d.ts.map +1 -0
  31. package/dist/board/use-board-keyboard.d.ts +14 -0
  32. package/dist/board/use-board-keyboard.d.ts.map +1 -0
  33. package/dist/index.d.ts +1 -1
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +129 -119
  36. package/package.json +1 -1
  37. package/dist/_chunks/task-constants.js +0 -22
@@ -2,22 +2,36 @@
2
2
  import { jsxs as s, jsx as t, Fragment as ue } from "react/jsx-runtime";
3
3
  import * as p from "react";
4
4
  import { cn as N } from "@devalok/shilp-sutra/ui/lib/utils";
5
- import { Sheet as Ve, SheetContent as $e, SheetTitle as je } from "@devalok/shilp-sutra/ui/sheet";
5
+ import { Sheet as Ve, SheetContent as je, SheetTitle as $e } from "@devalok/shilp-sutra/ui/sheet";
6
6
  import { VisuallyHidden as ke } from "@devalok/shilp-sutra/ui/visually-hidden";
7
7
  import { Skeleton as P } from "@devalok/shilp-sutra/ui/skeleton";
8
- import { Progress as Be, Tabs as Fe, TabsList as ze, TabsTrigger as He } from "@devalok/shilp-sutra/ui";
9
- import { Avatar as _, AvatarImage as V, AvatarFallback as $ } from "@devalok/shilp-sutra/ui/avatar";
8
+ import { Progress as He, Tabs as Ge, TabsList as Me, TabsTrigger as Be } from "@devalok/shilp-sutra/ui";
9
+ import { Avatar as _, AvatarImage as V, AvatarFallback as j } from "@devalok/shilp-sutra/ui/avatar";
10
10
  import { Popover as ie, PopoverTrigger as ae, PopoverContent as le } from "@devalok/shilp-sutra/ui/popover";
11
- import { IconColumns3 as Ye, IconChevronDown as qe, IconCheck as pe, IconUser as Me, IconUsers as Ge, IconX as G, IconPlus as j, IconFlag as he, IconCalendarEvent as xe, IconTag as fe, IconEye as be, IconSquareCheck as Ke, IconSquare as Je, IconListCheck as ge, IconMessage as Ne, IconGitPullRequest as X, IconMessageCircle as ye, IconSend as We, IconUpload as Qe, IconDownload as Xe, IconTrash as Ze, IconPaperclip as Z, IconFile as oe, IconPhoto as Ue, IconFileText as et, IconFileCode as tt, IconFileSpreadsheet as st, IconFileZip as rt, IconActivity as U, IconCircleCheck as nt, IconUserMinus as it, IconUserPlus as at, IconArrowRight as lt, IconEdit as ot } from "@tabler/icons-react";
11
+ import { IconColumns3 as Fe, IconChevronDown as ze, IconCheck as pe, IconUser as qe, IconUsers as Ye, IconX as Y, IconPlus as $, IconFlag as he, IconCalendarEvent as xe, IconTag as fe, IconEye as be, IconSquareCheck as Ke, IconSquare as We, IconListCheck as ge, IconMessage as Ne, IconGitPullRequest as X, IconMessageCircle as ye, IconSend as Je, IconUpload as Qe, IconDownload as Xe, IconTrash as Ze, IconPaperclip as Z, IconFile as oe, IconPhoto as Ue, IconFileText as et, IconFileCode as tt, IconFileSpreadsheet as st, IconFileZip as rt, IconActivity as U, IconCircleCheck as nt, IconUserMinus as it, IconUserPlus as at, IconArrowRight as lt, IconEdit as ot } from "@tabler/icons-react";
12
12
  import { getInitials as k } from "@devalok/shilp-sutra/composed/lib/string-utils";
13
13
  import { MemberPicker as Q } from "@devalok/shilp-sutra/composed/member-picker";
14
- import { a as ve, P as dt, R as ct } from "./task-constants.js";
15
- import { EmptyState as B } from "@devalok/shilp-sutra/composed/empty-state";
16
- import { Badge as mt } from "@devalok/shilp-sutra/ui/badge";
17
- import { RichTextViewer as ut, RichTextEditor as pt } from "@devalok/shilp-sutra/composed/rich-text-editor";
18
- import { Dialog as ht, DialogTrigger as xt, DialogContent as ft, DialogHeader as bt, DialogTitle as gt, DialogDescription as Nt, DialogFooter as yt, DialogClose as de } from "@devalok/shilp-sutra/ui/dialog";
14
+ import { EmptyState as H } from "@devalok/shilp-sutra/composed/empty-state";
15
+ import { Badge as dt } from "@devalok/shilp-sutra/ui/badge";
16
+ import { RichTextViewer as ct, RichTextEditor as mt } from "@devalok/shilp-sutra/composed/rich-text-editor";
17
+ import { Dialog as ut, DialogTrigger as pt, DialogContent as ht, DialogHeader as xt, DialogTitle as ft, DialogDescription as bt, DialogFooter as gt, DialogClose as de } from "@devalok/shilp-sutra/ui/dialog";
19
18
  import { Button as ce } from "@devalok/shilp-sutra/ui/button";
20
- const vt = ["LOW", "MEDIUM", "HIGH", "URGENT"];
19
+ const Nt = {
20
+ LOW: "Low",
21
+ MEDIUM: "Medium",
22
+ HIGH: "High",
23
+ URGENT: "Urgent"
24
+ }, ve = {
25
+ LOW: "bg-[var(--color-category-slate)]",
26
+ MEDIUM: "bg-[var(--color-warning)]",
27
+ HIGH: "bg-[var(--color-error)]",
28
+ URGENT: "bg-[var(--color-error)]"
29
+ }, yt = {
30
+ PENDING: { color: "warning", label: "Pending" },
31
+ APPROVED: { color: "success", label: "Approved" },
32
+ CHANGES_REQUESTED: { color: "brand", label: "Changes Requested" },
33
+ REJECTED: { color: "error", label: "Rejected" }
34
+ }, vt = ["LOW", "MEDIUM", "HIGH", "URGENT"];
21
35
  function L({
22
36
  icon: n,
23
37
  label: e,
@@ -44,7 +58,7 @@ function L({
44
58
  function wt({ priority: n }) {
45
59
  return /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-02b", children: [
46
60
  /* @__PURE__ */ t("div", { className: N("h-2 w-2 rounded-ds-full", ve[n]) }),
47
- /* @__PURE__ */ t("span", { className: "text-ds-md text-text-primary", children: dt[n] || n })
61
+ /* @__PURE__ */ t("span", { className: "text-ds-md text-text-primary", children: Nt[n] || n })
48
62
  ] });
49
63
  }
50
64
  const we = p.forwardRef(
@@ -62,7 +76,7 @@ const we = p.forwardRef(
62
76
  renderDatePicker: v,
63
77
  onConfirmVisibilityChange: w
64
78
  }, l) {
65
- const [I, o] = p.useState(""), [i, h] = p.useState(!1), u = e.assignees.map((r) => r.user.id), C = p.useMemo(
79
+ const [I, o] = p.useState(""), [i, h] = p.useState(!1), u = e.assignees.map((r) => r.user.id), E = p.useMemo(
66
80
  () => x.map((r) => ({ id: r.id, name: r.name, avatar: r.image ?? void 0 })),
67
81
  [x]
68
82
  ), T = (r) => {
@@ -71,25 +85,25 @@ const we = p.forwardRef(
71
85
  d("ownerId", r === e.ownerId ? null : r);
72
86
  }, S = (r) => {
73
87
  u.includes(r) ? g(r) : c(r);
74
- }, E = (r) => {
88
+ }, C = (r) => {
75
89
  d("priority", r);
76
90
  }, O = (r) => {
77
91
  d("dueDate", r ? r.toISOString() : null);
78
- }, F = () => {
92
+ }, G = () => {
79
93
  const r = I.trim();
80
94
  r && !e.labels.includes(r) && d("labels", [...e.labels, r]), o(""), h(!1);
81
95
  }, K = (r) => {
82
- d("labels", e.labels.filter((H) => H !== r));
83
- }, J = () => {
96
+ d("labels", e.labels.filter((B) => B !== r));
97
+ }, W = () => {
84
98
  const r = e.visibility === "INTERNAL" ? "EVERYONE" : "INTERNAL";
85
99
  if (r === "EVERYONE" && w) {
86
100
  w();
87
101
  return;
88
102
  }
89
103
  d("visibility", r);
90
- }, z = y || wt;
104
+ }, M = y || wt;
91
105
  return /* @__PURE__ */ s("div", { ref: l, className: N("space-y-ds-01", D), children: [
92
- /* @__PURE__ */ t(L, { icon: Ye, label: "Column", children: f && !(m != null && m.includes("columnId")) ? /* @__PURE__ */ t("span", { className: "px-ds-03 py-ds-02 text-ds-md text-text-primary", children: e.column.name }) : /* @__PURE__ */ s(ie, { children: [
106
+ /* @__PURE__ */ t(L, { icon: Fe, label: "Column", children: f && !(m != null && m.includes("columnId")) ? /* @__PURE__ */ t("span", { className: "px-ds-03 py-ds-02 text-ds-md text-text-primary", children: e.column.name }) : /* @__PURE__ */ s(ie, { children: [
93
107
  /* @__PURE__ */ t(ae, { asChild: !0, children: /* @__PURE__ */ s(
94
108
  "button",
95
109
  {
@@ -97,7 +111,7 @@ const we = p.forwardRef(
97
111
  className: "inline-flex items-center gap-ds-02b rounded-ds-md px-ds-03 py-ds-02 text-ds-md text-text-primary transition-colors hover:bg-field",
98
112
  children: [
99
113
  /* @__PURE__ */ t("span", { children: e.column.name }),
100
- /* @__PURE__ */ t(qe, { className: "h-3 w-3 text-text-placeholder" })
114
+ /* @__PURE__ */ t(ze, { className: "h-3 w-3 text-text-placeholder" })
101
115
  ]
102
116
  }
103
117
  ) }),
@@ -127,10 +141,10 @@ const we = p.forwardRef(
127
141
  }
128
142
  )
129
143
  ] }) }),
130
- !f && /* @__PURE__ */ t(L, { icon: Me, label: "Owner", children: /* @__PURE__ */ t(
144
+ !f && /* @__PURE__ */ t(L, { icon: qe, label: "Owner", children: /* @__PURE__ */ t(
131
145
  Q,
132
146
  {
133
- members: C,
147
+ members: E,
134
148
  selectedIds: e.ownerId ? [e.ownerId] : [],
135
149
  onSelect: A,
136
150
  children: /* @__PURE__ */ t(
@@ -141,7 +155,7 @@ const we = p.forwardRef(
141
155
  children: e.owner ? /* @__PURE__ */ s(ue, { children: [
142
156
  /* @__PURE__ */ s(_, { className: "h-ico-md w-ico-md", children: [
143
157
  e.owner.image && /* @__PURE__ */ t(V, { src: e.owner.image, alt: e.owner.name }),
144
- /* @__PURE__ */ t($, { className: "bg-layer-03 text-ds-xs font-semibold text-text-on-color", children: k(e.owner.name) })
158
+ /* @__PURE__ */ t(j, { className: "bg-layer-03 text-ds-xs font-semibold text-text-on-color", children: k(e.owner.name) })
145
159
  ] }),
146
160
  /* @__PURE__ */ t("span", { className: "text-ds-md text-text-primary", children: e.owner.name })
147
161
  ] }) : /* @__PURE__ */ t("span", { className: "text-ds-md text-text-placeholder", children: "No owner" })
@@ -149,7 +163,7 @@ const we = p.forwardRef(
149
163
  )
150
164
  }
151
165
  ) }),
152
- /* @__PURE__ */ t(L, { icon: Ge, label: "Assignees", children: /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-ds-02b", children: [
166
+ /* @__PURE__ */ t(L, { icon: Ye, label: "Assignees", children: /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-ds-02b", children: [
153
167
  e.assignees.map((r) => /* @__PURE__ */ s(
154
168
  "div",
155
169
  {
@@ -157,7 +171,7 @@ const we = p.forwardRef(
157
171
  children: [
158
172
  /* @__PURE__ */ s(_, { className: "h-ico-sm w-ico-sm", children: [
159
173
  r.user.image && /* @__PURE__ */ t(V, { src: r.user.image, alt: r.user.name }),
160
- /* @__PURE__ */ t($, { className: "bg-layer-03 text-ds-xs font-semibold text-text-on-color", children: k(r.user.name) })
174
+ /* @__PURE__ */ t(j, { className: "bg-layer-03 text-ds-xs font-semibold text-text-on-color", children: k(r.user.name) })
161
175
  ] }),
162
176
  /* @__PURE__ */ t("span", { className: "text-ds-sm text-text-secondary", children: r.user.name.split(" ")[0] }),
163
177
  !f && /* @__PURE__ */ t(
@@ -167,7 +181,7 @@ const we = p.forwardRef(
167
181
  onClick: () => g(r.user.id),
168
182
  className: "ml-ds-01 rounded-ds-full p-ds-01 transition-colors hover:bg-field",
169
183
  "aria-label": `Remove ${r.user.name}`,
170
- children: /* @__PURE__ */ t(G, { className: "h-ds-03 w-ds-03 text-text-placeholder" })
184
+ children: /* @__PURE__ */ t(Y, { className: "h-ds-03 w-ds-03 text-text-placeholder" })
171
185
  }
172
186
  )
173
187
  ]
@@ -177,7 +191,7 @@ const we = p.forwardRef(
177
191
  !f && /* @__PURE__ */ t(
178
192
  Q,
179
193
  {
180
- members: C,
194
+ members: E,
181
195
  selectedIds: u,
182
196
  onSelect: S,
183
197
  multiple: !0,
@@ -187,7 +201,7 @@ const we = p.forwardRef(
187
201
  type: "button",
188
202
  className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded-ds-full border border-dashed border-border-subtle transition-colors hover:bg-field hover:border-text-placeholder",
189
203
  "aria-label": "Add assignee",
190
- children: /* @__PURE__ */ t(j, { className: "h-3 w-3 text-text-placeholder" })
204
+ children: /* @__PURE__ */ t($, { className: "h-3 w-3 text-text-placeholder" })
191
205
  }
192
206
  )
193
207
  }
@@ -200,7 +214,7 @@ const we = p.forwardRef(
200
214
  {
201
215
  type: "button",
202
216
  className: "rounded-ds-md px-ds-03 py-ds-02 transition-colors hover:bg-field",
203
- children: /* @__PURE__ */ t(z, { priority: e.priority })
217
+ children: /* @__PURE__ */ t(M, { priority: e.priority })
204
218
  }
205
219
  ) }),
206
220
  /* @__PURE__ */ t(
@@ -213,13 +227,13 @@ const we = p.forwardRef(
213
227
  "button",
214
228
  {
215
229
  type: "button",
216
- onClick: () => E(r),
230
+ onClick: () => C(r),
217
231
  className: N(
218
232
  "flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b transition-colors",
219
233
  "hover:bg-field",
220
234
  r === e.priority && "bg-field"
221
235
  ),
222
- children: /* @__PURE__ */ t(z, { priority: r })
236
+ children: /* @__PURE__ */ t(M, { priority: r })
223
237
  },
224
238
  r
225
239
  ))
@@ -249,7 +263,7 @@ const we = p.forwardRef(
249
263
  onClick: () => O(null),
250
264
  className: "rounded-ds-md p-ds-02 transition-colors hover:bg-field",
251
265
  "aria-label": "Clear due date",
252
- children: /* @__PURE__ */ t(G, { className: "h-3 w-3 text-text-placeholder" })
266
+ children: /* @__PURE__ */ t(Y, { className: "h-3 w-3 text-text-placeholder" })
253
267
  }
254
268
  )
255
269
  ] }) }),
@@ -267,7 +281,7 @@ const we = p.forwardRef(
267
281
  onClick: () => K(r),
268
282
  className: "rounded-ds-full p-ds-01 transition-colors hover:bg-field",
269
283
  "aria-label": `Remove label ${r}`,
270
- children: /* @__PURE__ */ t(G, { className: "h-ds-03 w-ds-03" })
284
+ children: /* @__PURE__ */ t(Y, { className: "h-ds-03 w-ds-03" })
271
285
  }
272
286
  )
273
287
  ]
@@ -282,9 +296,9 @@ const we = p.forwardRef(
282
296
  onChange: (r) => o(r.target.value),
283
297
  "aria-label": "New label name",
284
298
  onKeyDown: (r) => {
285
- r.key === "Enter" && F(), r.key === "Escape" && (h(!1), o(""));
299
+ r.key === "Enter" && G(), r.key === "Escape" && (h(!1), o(""));
286
300
  },
287
- onBlur: F,
301
+ onBlur: G,
288
302
  placeholder: "Label name",
289
303
  className: "h-5 w-20 rounded border border-border bg-transparent px-ds-02b text-ds-sm text-text-primary outline-none placeholder:text-text-placeholder focus:border-border-subtle",
290
304
  autoFocus: !0
@@ -296,7 +310,7 @@ const we = p.forwardRef(
296
310
  onClick: () => h(!0),
297
311
  className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded-ds-full border border-dashed border-border-subtle transition-colors hover:bg-field hover:border-text-placeholder",
298
312
  "aria-label": "Add label",
299
- children: /* @__PURE__ */ t(j, { className: "h-3 w-3 text-text-placeholder" })
313
+ children: /* @__PURE__ */ t($, { className: "h-3 w-3 text-text-placeholder" })
300
314
  }
301
315
  )),
302
316
  f && e.labels.length === 0 && /* @__PURE__ */ t("span", { className: "text-ds-md text-text-placeholder", children: "None" })
@@ -305,7 +319,7 @@ const we = p.forwardRef(
305
319
  "button",
306
320
  {
307
321
  type: "button",
308
- onClick: J,
322
+ onClick: W,
309
323
  className: N(
310
324
  "inline-flex items-center gap-ds-02b rounded-ds-full px-ds-03 py-ds-01 text-ds-sm font-semibold tracking-wide transition-colors",
311
325
  e.visibility === "EVERYONE" ? "bg-success-surface text-text-success" : "bg-layer-02 text-text-tertiary"
@@ -340,8 +354,8 @@ const Ie = p.forwardRef(
340
354
  }, f) {
341
355
  const [m, y] = p.useState(""), [v, w] = p.useState(!1), l = p.useRef(null), I = e.filter(
342
356
  (u) => {
343
- var C;
344
- return ((C = u.column) == null ? void 0 : C.isTerminal) || u.columnId === b;
357
+ var E;
358
+ return ((E = u.column) == null ? void 0 : E.isTerminal) || u.columnId === b;
345
359
  }
346
360
  ).length, o = e.length, i = () => {
347
361
  const u = m.trim();
@@ -353,7 +367,7 @@ const Ie = p.forwardRef(
353
367
  v && l.current && l.current.focus();
354
368
  }, [v]), /* @__PURE__ */ s("div", { ref: f, className: N("flex flex-col", g), children: [
355
369
  o > 0 && /* @__PURE__ */ s("div", { className: "mb-ds-05 flex items-center gap-ds-04", children: [
356
- /* @__PURE__ */ t(Be, { value: o > 0 ? I / o * 100 : 0, className: "h-ds-02b" }),
370
+ /* @__PURE__ */ t(He, { value: o > 0 ? I / o * 100 : 0, className: "h-ds-02b" }),
357
371
  /* @__PURE__ */ s("span", { className: "shrink-0 text-ds-sm font-medium text-text-placeholder", children: [
358
372
  I,
359
373
  "/",
@@ -362,7 +376,7 @@ const Ie = p.forwardRef(
362
376
  ] }),
363
377
  e.length > 0 ? /* @__PURE__ */ t("div", { className: "space-y-ds-01", children: e.map((u) => {
364
378
  var A, S;
365
- const C = ((A = u.column) == null ? void 0 : A.isTerminal) || u.columnId === b, T = (S = u.assignees[0]) == null ? void 0 : S.user;
379
+ const E = ((A = u.column) == null ? void 0 : A.isTerminal) || u.columnId === b, T = (S = u.assignees[0]) == null ? void 0 : S.user;
366
380
  return /* @__PURE__ */ s(
367
381
  "div",
368
382
  {
@@ -373,22 +387,22 @@ const Ie = p.forwardRef(
373
387
  "hover:bg-field cursor-pointer"
374
388
  ),
375
389
  onClick: () => c == null ? void 0 : c(u.id),
376
- onKeyDown: (E) => {
377
- (E.key === "Enter" || E.key === " ") && (E.preventDefault(), c == null || c(u.id));
390
+ onKeyDown: (C) => {
391
+ (C.key === "Enter" || C.key === " ") && (C.preventDefault(), c == null || c(u.id));
378
392
  },
379
393
  children: [
380
394
  /* @__PURE__ */ t(
381
395
  "button",
382
396
  {
383
397
  type: "button",
384
- onClick: (E) => {
385
- E.stopPropagation(), D || d(u.id, !C);
398
+ onClick: (C) => {
399
+ C.stopPropagation(), D || d(u.id, !E);
386
400
  },
387
401
  className: N(
388
402
  "shrink-0 rounded p-ds-01 transition-colors",
389
403
  D ? "cursor-default" : "hover:bg-layer-02"
390
404
  ),
391
- children: C ? /* @__PURE__ */ t(Ke, { className: "h-ico-sm w-ico-sm text-interactive", stroke: 1.5 }) : /* @__PURE__ */ t(Je, { className: "h-ico-sm w-ico-sm text-text-placeholder", stroke: 1.5 })
405
+ children: E ? /* @__PURE__ */ t(Ke, { className: "h-ico-sm w-ico-sm text-interactive", stroke: 1.5 }) : /* @__PURE__ */ t(We, { className: "h-ico-sm w-ico-sm text-text-placeholder", stroke: 1.5 })
392
406
  }
393
407
  ),
394
408
  /* @__PURE__ */ t(
@@ -405,21 +419,21 @@ const Ie = p.forwardRef(
405
419
  {
406
420
  className: N(
407
421
  "flex-1 truncate text-ds-md",
408
- C ? "text-text-placeholder line-through" : "text-text-primary"
422
+ E ? "text-text-placeholder line-through" : "text-text-primary"
409
423
  ),
410
424
  children: u.title
411
425
  }
412
426
  ),
413
427
  T && /* @__PURE__ */ s(_, { className: "h-ico-md w-ico-md shrink-0", children: [
414
428
  T.image && /* @__PURE__ */ t(V, { src: T.image, alt: T.name }),
415
- /* @__PURE__ */ t($, { className: "bg-layer-03 text-ds-xs font-semibold text-text-on-color", children: k(T.name) })
429
+ /* @__PURE__ */ t(j, { className: "bg-layer-03 text-ds-xs font-semibold text-text-on-color", children: k(T.name) })
416
430
  ] })
417
431
  ]
418
432
  },
419
433
  u.id
420
434
  );
421
435
  }) }) : !v && /* @__PURE__ */ t(
422
- B,
436
+ H,
423
437
  {
424
438
  icon: /* @__PURE__ */ t(ge, {}),
425
439
  title: "No subtasks",
@@ -460,7 +474,7 @@ const Ie = p.forwardRef(
460
474
  onClick: () => w(!0),
461
475
  className: "mt-ds-03 inline-flex items-center gap-ds-02b rounded-ds-lg px-ds-03 py-ds-02b text-ds-md text-text-placeholder transition-colors hover:bg-field hover:text-text-secondary",
462
476
  children: [
463
- /* @__PURE__ */ t(j, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
477
+ /* @__PURE__ */ t($, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
464
478
  "Add subtask"
465
479
  ]
466
480
  }
@@ -480,7 +494,7 @@ function It(n) {
480
494
  const Dt = [
481
495
  { status: "APPROVED", label: "Approve", icon: pe },
482
496
  { status: "CHANGES_REQUESTED", label: "Request Changes", icon: Ne },
483
- { status: "REJECTED", label: "Reject", icon: G }
497
+ { status: "REJECTED", label: "Reject", icon: Y }
484
498
  ], De = p.forwardRef(
485
499
  function({
486
500
  reviews: e,
@@ -500,7 +514,7 @@ const Dt = [
500
514
  };
501
515
  return /* @__PURE__ */ s("div", { ref: g, className: N("flex flex-col", c), children: [
502
516
  e.length > 0 ? /* @__PURE__ */ t("div", { className: "space-y-ds-04", children: e.map((l) => {
503
- const I = ct[l.status], o = m === l.id;
517
+ const I = yt[l.status], o = m === l.id;
504
518
  return /* @__PURE__ */ s(
505
519
  "div",
506
520
  {
@@ -515,7 +529,7 @@ const Dt = [
515
529
  alt: l.reviewer.name
516
530
  }
517
531
  ),
518
- /* @__PURE__ */ t($, { className: "bg-layer-03 text-ds-xs font-semibold text-text-on-color", children: k(l.reviewer.name) })
532
+ /* @__PURE__ */ t(j, { className: "bg-layer-03 text-ds-xs font-semibold text-text-on-color", children: k(l.reviewer.name) })
519
533
  ] }),
520
534
  /* @__PURE__ */ s("div", { className: "flex-1 min-w-0", children: [
521
535
  /* @__PURE__ */ t("span", { className: "text-ds-md font-medium text-text-primary", children: l.reviewer.name }),
@@ -525,7 +539,7 @@ const Dt = [
525
539
  ] })
526
540
  ] }),
527
541
  /* @__PURE__ */ t(
528
- mt,
542
+ dt,
529
543
  {
530
544
  color: I.color,
531
545
  children: I.label
@@ -594,7 +608,7 @@ const Dt = [
594
608
  l.id
595
609
  );
596
610
  }) }) : /* @__PURE__ */ t(
597
- B,
611
+ H,
598
612
  {
599
613
  icon: /* @__PURE__ */ t(X, {}),
600
614
  title: "No reviews yet",
@@ -614,7 +628,7 @@ const Dt = [
614
628
  type: "button",
615
629
  className: "mt-ds-04 inline-flex items-center gap-ds-02b rounded-ds-lg px-ds-03 py-ds-02b text-ds-md text-text-placeholder transition-colors hover:bg-field hover:text-text-secondary",
616
630
  children: [
617
- /* @__PURE__ */ t(j, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
631
+ /* @__PURE__ */ t($, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
618
632
  "Request Review"
619
633
  ]
620
634
  }
@@ -625,7 +639,7 @@ const Dt = [
625
639
  }
626
640
  );
627
641
  De.displayName = "ReviewTab";
628
- function Ct(n) {
642
+ function Et(n) {
629
643
  const e = new Date(n), x = (/* @__PURE__ */ new Date()).getTime() - e.getTime(), d = Math.floor(x / 6e4), c = Math.floor(d / 60), g = Math.floor(c / 24);
630
644
  return d < 1 ? "Just now" : d < 60 ? `${d}m ago` : c < 24 ? `${c}h ago` : g < 7 ? `${g}d ago` : e.toLocaleDateString("en-IN", {
631
645
  month: "short",
@@ -642,10 +656,10 @@ function Tt(n) {
642
656
  image: null
643
657
  } : { id: n.authorId, name: "Unknown", image: null };
644
658
  }
645
- function Et(n) {
659
+ function Ct(n) {
646
660
  return n.replace(/<[^>]*>/g, "");
647
661
  }
648
- const Ce = p.forwardRef(
662
+ const Ee = p.forwardRef(
649
663
  function({
650
664
  comments: e,
651
665
  taskVisibility: b,
@@ -657,7 +671,7 @@ const Ce = p.forwardRef(
657
671
  renderViewer: f
658
672
  }, m) {
659
673
  const [y, v] = p.useState(""), w = p.useRef(null), l = D ?? (g ? (i) => /* @__PURE__ */ t(
660
- pt,
674
+ mt,
661
675
  {
662
676
  content: i.content,
663
677
  onChange: i.onChange,
@@ -665,7 +679,7 @@ const Ce = p.forwardRef(
665
679
  editable: !0,
666
680
  className: "min-h-[80px]"
667
681
  }
668
- ) : void 0), I = f ?? (g ? (i) => /* @__PURE__ */ t(ut, { content: i.content, className: i.className }) : void 0), o = () => {
682
+ ) : void 0), I = f ?? (g ? (i) => /* @__PURE__ */ t(ct, { content: i.content, className: i.className }) : void 0), o = () => {
669
683
  const i = y.trim();
670
684
  i.replace(/<[^>]*>/g, "").trim() && (x(i, c ? "CLIENT" : "INTERNAL"), v(""));
671
685
  };
@@ -683,7 +697,7 @@ const Ce = p.forwardRef(
683
697
  /* @__PURE__ */ s(_, { className: "h-ds-xs-plus w-ds-xs-plus shrink-0 mt-ds-01", children: [
684
698
  h.image && /* @__PURE__ */ t(V, { src: h.image, alt: h.name }),
685
699
  /* @__PURE__ */ t(
686
- $,
700
+ j,
687
701
  {
688
702
  className: N(
689
703
  "text-ds-xs font-semibold",
@@ -698,18 +712,18 @@ const Ce = p.forwardRef(
698
712
  /* @__PURE__ */ s("div", { className: "flex items-baseline gap-ds-03", children: [
699
713
  /* @__PURE__ */ t("span", { className: "text-ds-md font-medium text-text-primary", children: h.name }),
700
714
  c ? !u && /* @__PURE__ */ t("span", { className: "rounded bg-layer-03 px-ds-02 py-px text-ds-xs font-semibold uppercase tracking-wider text-text-on-color", children: "Team" }) : u && /* @__PURE__ */ t("span", { className: "rounded bg-warning-surface px-ds-02 py-px text-ds-xs font-semibold uppercase tracking-wider text-text-warning", children: "Client" }),
701
- /* @__PURE__ */ t("span", { className: "text-ds-sm text-text-placeholder", children: Ct(i.createdAt) })
715
+ /* @__PURE__ */ t("span", { className: "text-ds-sm text-text-placeholder", children: Et(i.createdAt) })
702
716
  ] }),
703
717
  /* @__PURE__ */ t("div", { className: "mt-ds-02", children: I ? I({
704
718
  content: i.content,
705
719
  className: "[&_.ProseMirror]:!min-h-0 [&_.ProseMirror]:!p-0"
706
- }) : /* @__PURE__ */ t("p", { className: "text-ds-md text-text-secondary whitespace-pre-wrap", children: Et(i.content) }) })
720
+ }) : /* @__PURE__ */ t("p", { className: "text-ds-md text-text-secondary whitespace-pre-wrap", children: Ct(i.content) }) })
707
721
  ] })
708
722
  ] }, i.id);
709
723
  })
710
724
  }
711
725
  ) : /* @__PURE__ */ t(
712
- B,
726
+ H,
713
727
  {
714
728
  icon: /* @__PURE__ */ t(ye, {}),
715
729
  title: "No comments yet",
@@ -741,7 +755,7 @@ const Ce = p.forwardRef(
741
755
  disabled: !y.replace(/<[^>]*>/g, "").trim(),
742
756
  className: "inline-flex items-center gap-ds-02b rounded-ds-lg bg-interactive px-ds-04 py-ds-02b text-ds-sm font-semibold text-text-on-color transition-colors hover:bg-interactive-hover disabled:opacity-[0.38] disabled:cursor-not-allowed",
743
757
  children: [
744
- /* @__PURE__ */ t(We, { className: "h-ico-sm w-ico-sm", stroke: 2 }),
758
+ /* @__PURE__ */ t(Je, { className: "h-ico-sm w-ico-sm", stroke: 2 }),
745
759
  "Comment"
746
760
  ]
747
761
  }
@@ -750,7 +764,7 @@ const Ce = p.forwardRef(
750
764
  ] });
751
765
  }
752
766
  );
753
- Ce.displayName = "ConversationTab";
767
+ Ee.displayName = "ConversationTab";
754
768
  function Rt(n) {
755
769
  if (!n) return oe;
756
770
  const e = n.toLowerCase();
@@ -874,8 +888,8 @@ const Te = p.forwardRef(
874
888
  children: /* @__PURE__ */ t(Xe, { className: "h-ico-sm w-ico-sm text-text-tertiary" })
875
889
  }
876
890
  ),
877
- !g && /* @__PURE__ */ s(ht, { children: [
878
- /* @__PURE__ */ t(xt, { asChild: !0, children: /* @__PURE__ */ t(
891
+ !g && /* @__PURE__ */ s(ut, { children: [
892
+ /* @__PURE__ */ t(pt, { asChild: !0, children: /* @__PURE__ */ t(
879
893
  "button",
880
894
  {
881
895
  type: "button",
@@ -884,16 +898,16 @@ const Te = p.forwardRef(
884
898
  children: /* @__PURE__ */ t(Ze, { className: "h-ico-sm w-ico-sm text-text-error" })
885
899
  }
886
900
  ) }),
887
- /* @__PURE__ */ s(ft, { children: [
888
- /* @__PURE__ */ s(bt, { children: [
889
- /* @__PURE__ */ t(gt, { children: "Delete file?" }),
890
- /* @__PURE__ */ s(Nt, { children: [
901
+ /* @__PURE__ */ s(ht, { children: [
902
+ /* @__PURE__ */ s(xt, { children: [
903
+ /* @__PURE__ */ t(ft, { children: "Delete file?" }),
904
+ /* @__PURE__ */ s(bt, { children: [
891
905
  '"',
892
906
  o.title,
893
907
  '" will be permanently deleted. This cannot be undone.'
894
908
  ] })
895
909
  ] }),
896
- /* @__PURE__ */ s(yt, { children: [
910
+ /* @__PURE__ */ s(gt, { children: [
897
911
  /* @__PURE__ */ t(de, { asChild: !0, children: /* @__PURE__ */ t(ce, { variant: "outline", size: "sm", children: "Cancel" }) }),
898
912
  /* @__PURE__ */ t(de, { asChild: !0, children: /* @__PURE__ */ t(
899
913
  ce,
@@ -914,7 +928,7 @@ const Te = p.forwardRef(
914
928
  o.id
915
929
  );
916
930
  }) }) : /* @__PURE__ */ t("div", { className: "mt-ds-03", children: /* @__PURE__ */ t(
917
- B,
931
+ H,
918
932
  {
919
933
  icon: /* @__PURE__ */ t(Z, {}),
920
934
  title: "No files attached",
@@ -928,7 +942,7 @@ const Te = p.forwardRef(
928
942
  Te.displayName = "FilesTab";
929
943
  const St = {
930
944
  "task.created": {
931
- icon: j,
945
+ icon: $,
932
946
  color: "text-success-text",
933
947
  dotColor: "bg-success",
934
948
  getDescription: () => "created this task"
@@ -1054,10 +1068,10 @@ function Ot(n) {
1054
1068
  const e = n.metadata;
1055
1069
  return e != null && e.actorName ? e.actorName : n.actorType === "SYSTEM" ? "System" : n.actorType === "AGENT" ? "AI Agent" : "Someone";
1056
1070
  }
1057
- const Ee = p.forwardRef(
1071
+ const Ce = p.forwardRef(
1058
1072
  function({ activities: e, className: b }, x) {
1059
1073
  return e.length === 0 ? /* @__PURE__ */ t(
1060
- B,
1074
+ H,
1061
1075
  {
1062
1076
  ref: x,
1063
1077
  icon: /* @__PURE__ */ t(U, {}),
@@ -1101,7 +1115,7 @@ const Ee = p.forwardRef(
1101
1115
  ] });
1102
1116
  }
1103
1117
  );
1104
- Ee.displayName = "ActivityTab";
1118
+ Ce.displayName = "ActivityTab";
1105
1119
  const me = [
1106
1120
  { id: "subtasks", label: "Subtasks", icon: ge },
1107
1121
  { id: "review", label: "Review", icon: X },
@@ -1143,40 +1157,40 @@ const Vt = p.forwardRef(function({
1143
1157
  onToggleSubtask: i,
1144
1158
  onRequestReview: h,
1145
1159
  onUpdateReviewStatus: u,
1146
- onPostComment: C,
1160
+ onPostComment: E,
1147
1161
  onUploadFile: T,
1148
1162
  onDeleteFile: A,
1149
1163
  onTabChange: S,
1150
- renderEditor: E,
1164
+ renderEditor: C,
1151
1165
  renderViewer: O,
1152
- renderPriorityIndicator: F,
1166
+ renderPriorityIndicator: G,
1153
1167
  renderDatePicker: K,
1154
- isUploading: J = !1
1155
- }, z) {
1168
+ isUploading: W = !1
1169
+ }, M) {
1156
1170
  var se, re, ne;
1157
- const [r, H] = p.useState(m ? "conversation" : "subtasks"), [W, Y] = p.useState(!1), [ee, q] = p.useState(""), M = p.useRef(null);
1171
+ const [r, B] = p.useState(m ? "conversation" : "subtasks"), [J, F] = p.useState(!1), [ee, z] = p.useState(""), q = p.useRef(null);
1158
1172
  p.useEffect(() => {
1159
- e && (q(e.title), Y(!1));
1173
+ e && (z(e.title), F(!1));
1160
1174
  }, [e == null ? void 0 : e.id]), p.useEffect(() => {
1161
- x && H(m ? "conversation" : "subtasks");
1175
+ x && B(m ? "conversation" : "subtasks");
1162
1176
  }, [x, m]);
1163
1177
  const Re = (a) => {
1164
- H(a), S == null || S(a);
1178
+ B(a), S == null || S(a);
1165
1179
  }, te = () => {
1166
- Y(!1);
1180
+ F(!1);
1167
1181
  const a = ee.trim();
1168
- a && a !== (e == null ? void 0 : e.title) ? v == null || v(a) : e && q(e.title);
1182
+ a && a !== (e == null ? void 0 : e.title) ? v == null || v(a) : e && z(e.title);
1169
1183
  }, Ae = (a) => {
1170
- a.key === "Enter" && (a.preventDefault(), te()), a.key === "Escape" && (Y(!1), e && q(e.title));
1184
+ a.key === "Enter" && (a.preventDefault(), te()), a.key === "Escape" && (F(!1), e && z(e.title));
1171
1185
  };
1172
1186
  p.useEffect(() => {
1173
- W && M.current && (M.current.focus(), M.current.select());
1174
- }, [W]);
1187
+ J && q.current && (q.current.focus(), q.current.select());
1188
+ }, [J]);
1175
1189
  const Se = (se = c.find((a) => a.isTerminal)) == null ? void 0 : se.id, Pe = ((re = c.find((a) => a.isDefault)) == null ? void 0 : re.id) || ((ne = c[0]) == null ? void 0 : ne.id) || "", Le = m ? me.filter((a) => a.id === "conversation") : me, Oe = f || (e == null ? void 0 : e.comments) || [];
1176
1190
  return /* @__PURE__ */ t(Ve, { open: x, onOpenChange: d, children: /* @__PURE__ */ s(
1177
- $e,
1191
+ je,
1178
1192
  {
1179
- ref: z,
1193
+ ref: M,
1180
1194
  side: "right",
1181
1195
  className: N(
1182
1196
  /* intentional: task detail side panel takes 40% of screen, min 380px for form usability */
@@ -1185,16 +1199,16 @@ const Vt = p.forwardRef(function({
1185
1199
  "border-l border-border bg-layer-01"
1186
1200
  ),
1187
1201
  children: [
1188
- /* @__PURE__ */ t(ke, { children: /* @__PURE__ */ t(je, { children: (e == null ? void 0 : e.title) || "Task Details" }) }),
1202
+ /* @__PURE__ */ t(ke, { children: /* @__PURE__ */ t($e, { children: (e == null ? void 0 : e.title) || "Task Details" }) }),
1189
1203
  b || !e ? /* @__PURE__ */ t(_t, {}) : /* @__PURE__ */ s(ue, { children: [
1190
1204
  /* @__PURE__ */ s("div", { className: "shrink-0 border-b border-border px-ds-06 pb-ds-05 pt-ds-06", children: [
1191
- !m && W ? /* @__PURE__ */ t(
1205
+ !m && J ? /* @__PURE__ */ t(
1192
1206
  "input",
1193
1207
  {
1194
- ref: M,
1208
+ ref: q,
1195
1209
  type: "text",
1196
1210
  value: ee,
1197
- onChange: (a) => q(a.target.value),
1211
+ onChange: (a) => z(a.target.value),
1198
1212
  onBlur: te,
1199
1213
  onKeyDown: Ae,
1200
1214
  className: "w-full bg-transparent text-ds-lg font-semibold text-text-primary outline-none"
@@ -1204,7 +1218,7 @@ const Vt = p.forwardRef(function({
1204
1218
  /* @__PURE__ */ t(
1205
1219
  "h2",
1206
1220
  {
1207
- onClick: m ? void 0 : () => Y(!0),
1221
+ onClick: m ? void 0 : () => F(!0),
1208
1222
  className: N(
1209
1223
  "text-ds-lg font-semibold text-text-primary",
1210
1224
  !m && "cursor-text hover:text-interactive transition-colors"
@@ -1229,11 +1243,11 @@ const Vt = p.forwardRef(function({
1229
1243
  onUnassign: (a) => I == null ? void 0 : I(a),
1230
1244
  readOnly: m,
1231
1245
  editableFields: m ? y : void 0,
1232
- renderPriorityIndicator: F,
1246
+ renderPriorityIndicator: G,
1233
1247
  renderDatePicker: K
1234
1248
  }
1235
1249
  ) }),
1236
- /* @__PURE__ */ t("div", { className: "sticky top-0 z-raised bg-layer-01 px-ds-06", children: /* @__PURE__ */ t(Fe, { value: r, onValueChange: Re, children: /* @__PURE__ */ t(ze, { variant: "line", children: Le.map((a) => /* @__PURE__ */ s(He, { value: a.id, children: [
1250
+ /* @__PURE__ */ t("div", { className: "sticky top-0 z-raised bg-layer-01 px-ds-06", children: /* @__PURE__ */ t(Ge, { value: r, onValueChange: Re, children: /* @__PURE__ */ t(Me, { variant: "line", children: Le.map((a) => /* @__PURE__ */ s(Be, { value: a.id, children: [
1237
1251
  /* @__PURE__ */ t(a.icon, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
1238
1252
  a.label
1239
1253
  ] }, a.id)) }) }) }),
@@ -1263,13 +1277,13 @@ const Vt = p.forwardRef(function({
1263
1277
  }
1264
1278
  ),
1265
1279
  r === "conversation" && /* @__PURE__ */ t(
1266
- Ce,
1280
+ Ee,
1267
1281
  {
1268
1282
  comments: Oe,
1269
1283
  taskVisibility: e.visibility,
1270
- onPostComment: (a, R) => C == null ? void 0 : C(a, R),
1284
+ onPostComment: (a, R) => E == null ? void 0 : E(a, R),
1271
1285
  clientMode: m,
1272
- renderEditor: E,
1286
+ renderEditor: C,
1273
1287
  renderViewer: O
1274
1288
  }
1275
1289
  ),
@@ -1281,11 +1295,11 @@ const Vt = p.forwardRef(function({
1281
1295
  } : (a, R) => T == null ? void 0 : T(a, R),
1282
1296
  onDelete: m ? () => {
1283
1297
  } : (a) => A == null ? void 0 : A(a),
1284
- isUploading: J,
1298
+ isUploading: W,
1285
1299
  readOnly: m
1286
1300
  }
1287
1301
  ),
1288
- r === "activity" && /* @__PURE__ */ t(Ee, { activities: D })
1302
+ r === "activity" && /* @__PURE__ */ t(Ce, { activities: D })
1289
1303
  ] })
1290
1304
  ] })
1291
1305
  ] })
@@ -1295,8 +1309,8 @@ const Vt = p.forwardRef(function({
1295
1309
  });
1296
1310
  Vt.displayName = "TaskDetailPanel";
1297
1311
  export {
1298
- Ee as A,
1299
- Ce as C,
1312
+ Ce as A,
1313
+ Ee as C,
1300
1314
  Te as F,
1301
1315
  De as R,
1302
1316
  Ie as S,