@devalok/shilp-sutra-karm 0.6.2 → 0.8.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 (61) hide show
  1. package/dist/admin/break/break-admin-skeleton.js +1 -1
  2. package/dist/admin/break/break-admin.js +2 -2
  3. package/dist/admin/break/break-balance.js +1 -1
  4. package/dist/admin/break/breaks.js +2 -2
  5. package/dist/admin/break/delete-break.js +4 -4
  6. package/dist/admin/break/edit-break-balance.js +4 -4
  7. package/dist/admin/break/edit-break.js +4 -4
  8. package/dist/admin/break/header.js +3 -3
  9. package/dist/admin/break/leave-request.js +5 -5
  10. package/dist/admin/dashboard/admin-dashboard.js +1 -1
  11. package/dist/admin/dashboard/associate-detail.js +4 -4
  12. package/dist/admin/dashboard/attendance-overview.js +2 -2
  13. package/dist/admin/dashboard/break-request.js +4 -4
  14. package/dist/admin/dashboard/calendar.js +3 -3
  15. package/dist/admin/dashboard/correction-list.js +3 -3
  16. package/dist/admin/dashboard/dashboard-header.js +5 -5
  17. package/dist/admin/dashboard/dashboard-skeleton.js +8 -8
  18. package/dist/admin/dashboard/leave-requests.js +3 -3
  19. package/dist/admin/dashboard/render-date.js +1 -1
  20. package/dist/admin/types.d.ts +6 -6
  21. package/dist/admin/types.d.ts.map +1 -1
  22. package/dist/board/board-column.d.ts.map +1 -1
  23. package/dist/board/board-column.js +18 -16
  24. package/dist/board/kanban-board.d.ts.map +1 -1
  25. package/dist/board/kanban-board.js +118 -119
  26. package/dist/board/task-card.d.ts.map +1 -1
  27. package/dist/board/task-card.js +113 -115
  28. package/dist/chat/chat-input.d.ts.map +1 -1
  29. package/dist/chat/chat-input.js +2 -1
  30. package/dist/chat/chat-panel.js +2 -2
  31. package/dist/chat/conversation-list.js +1 -1
  32. package/dist/chat/markdown-components.d.ts +4 -0
  33. package/dist/chat/markdown-components.d.ts.map +1 -1
  34. package/dist/chat/markdown-components.js +30 -12
  35. package/dist/chat/message-list.d.ts.map +1 -1
  36. package/dist/chat/message-list.js +29 -30
  37. package/dist/chat/streaming-text.js +9 -9
  38. package/dist/client/client-portal-header.js +2 -2
  39. package/dist/client/project-card.js +3 -3
  40. package/dist/dashboard/daily-brief.js +1 -1
  41. package/dist/index.d.ts +0 -1
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +78 -82
  44. package/dist/page-skeletons.js +2 -2
  45. package/dist/tasks/activity-tab.js +2 -2
  46. package/dist/tasks/conversation-tab.d.ts +2 -0
  47. package/dist/tasks/conversation-tab.d.ts.map +1 -1
  48. package/dist/tasks/conversation-tab.js +68 -57
  49. package/dist/tasks/files-tab.js +25 -25
  50. package/dist/tasks/review-tab.js +6 -6
  51. package/dist/tasks/subtasks-tab.js +4 -4
  52. package/dist/tasks/task-detail-panel.d.ts +1 -1
  53. package/dist/tasks/task-detail-panel.d.ts.map +1 -1
  54. package/dist/tasks/task-detail-panel.js +4 -4
  55. package/dist/tasks/task-properties.d.ts.map +1 -1
  56. package/dist/tasks/task-properties.js +66 -59
  57. package/dist/utils/use-composed-ref.d.ts +3 -0
  58. package/dist/utils/use-composed-ref.d.ts.map +1 -0
  59. package/dist/utils/use-composed-ref.js +12 -0
  60. package/llms.txt +16 -1
  61. package/package.json +73 -69
@@ -1,30 +1,30 @@
1
1
  "use client";
2
- import { jsxs as l, jsx as t, Fragment as z } from "react/jsx-runtime";
2
+ import { jsxs as l, jsx as t, Fragment as q } from "react/jsx-runtime";
3
3
  import * as c from "react";
4
- import { cn as i } from "@devalok/shilp-sutra/ui";
5
- import { Avatar as C, AvatarImage as R, AvatarFallback as D } from "@devalok/shilp-sutra/ui";
6
- import { Popover as P, PopoverTrigger as T, PopoverContent as L } from "@devalok/shilp-sutra/ui";
7
- import { IconColumns3 as F, IconChevronDown as J, IconCheck as Q, IconUser as Z, IconUsers as $, IconX as x, IconPlus as S, IconFlag as U, IconCalendarEvent as k, IconTag as ee, IconEye as te } from "@tabler/icons-react";
8
- import { getInitials as O } from "@devalok/shilp-sutra/composed";
9
- import { MemberPicker as A } from "@devalok/shilp-sutra/composed";
4
+ import { cn as i } from "@devalok/shilp-sutra/ui/lib/utils";
5
+ import { Avatar as C, AvatarImage as R, AvatarFallback as D } from "@devalok/shilp-sutra/ui/avatar";
6
+ import { Popover as P, PopoverTrigger as T, PopoverContent as L } from "@devalok/shilp-sutra/ui/popover";
7
+ import { IconColumns3 as z, IconChevronDown as F, IconCheck as J, IconUser as Q, IconUsers as Z, IconX as x, IconPlus as S, IconFlag as U, IconCalendarEvent as k, IconTag as ee, IconEye as te } from "@tabler/icons-react";
8
+ import { getInitials as A } from "@devalok/shilp-sutra/composed/lib/string-utils";
9
+ import { MemberPicker as O } from "@devalok/shilp-sutra/composed/member-picker";
10
10
  import { PRIORITY_DOT_COLORS as se, PRIORITY_LABELS as le } from "./task-constants.js";
11
- const ne = ["LOW", "MEDIUM", "HIGH", "URGENT"];
11
+ const re = ["LOW", "MEDIUM", "HIGH", "URGENT"];
12
12
  function d({
13
- icon: o,
13
+ icon: a,
14
14
  label: s,
15
15
  children: m,
16
- className: a
16
+ className: o
17
17
  }) {
18
18
  return /* @__PURE__ */ l(
19
19
  "div",
20
20
  {
21
21
  className: i(
22
22
  "flex items-center gap-ds-04 py-ds-03",
23
- a
23
+ o
24
24
  ),
25
25
  children: [
26
26
  /* @__PURE__ */ l("div", { className: "flex w-[120px] shrink-0 items-center gap-ds-03 text-text-placeholder", children: [
27
- /* @__PURE__ */ t(o, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
27
+ /* @__PURE__ */ t(a, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
28
28
  /* @__PURE__ */ t("span", { className: "text-ds-sm", children: s })
29
29
  ] }),
30
30
  /* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: m })
@@ -32,55 +32,55 @@ function d({
32
32
  }
33
33
  );
34
34
  }
35
- function re({ priority: o }) {
35
+ function ne({ priority: a }) {
36
36
  return /* @__PURE__ */ l("div", { className: "flex items-center gap-ds-02b", children: [
37
- /* @__PURE__ */ t("div", { className: i("h-2 w-2 rounded-ds-full", se[o]) }),
38
- /* @__PURE__ */ t("span", { className: "text-ds-md text-text-primary", children: le[o] || o })
37
+ /* @__PURE__ */ t("div", { className: i("h-2 w-2 rounded-ds-full", se[a]) }),
38
+ /* @__PURE__ */ t("span", { className: "text-ds-md text-text-primary", children: le[a] || a })
39
39
  ] });
40
40
  }
41
41
  const de = c.forwardRef(
42
42
  function({
43
43
  task: s,
44
44
  columns: m,
45
- members: a,
46
- onUpdate: r,
45
+ members: o,
46
+ onUpdate: n,
47
47
  onAssign: V,
48
48
  onUnassign: f,
49
49
  className: Y,
50
- readOnly: n = !1,
50
+ readOnly: r = !1,
51
51
  editableFields: u,
52
52
  renderPriorityIndicator: M,
53
53
  renderDatePicker: g,
54
54
  onConfirmVisibilityChange: N
55
55
  }, j) {
56
- const [y, p] = c.useState(""), [_, h] = c.useState(!1), v = s.assignees.map((e) => e.user.id), w = c.useMemo(
57
- () => a.map((e) => ({ id: e.id, name: e.name, avatar: e.image ?? void 0 })),
58
- [a]
56
+ const [y, p] = c.useState(""), [_, b] = c.useState(!1), v = s.assignees.map((e) => e.user.id), w = c.useMemo(
57
+ () => o.map((e) => ({ id: e.id, name: e.name, avatar: e.image ?? void 0 })),
58
+ [o]
59
59
  ), B = (e) => {
60
- r("columnId", e);
60
+ n("columnId", e);
61
61
  }, G = (e) => {
62
- r("ownerId", e === s.ownerId ? null : e);
62
+ n("ownerId", e === s.ownerId ? null : e);
63
63
  }, H = (e) => {
64
64
  v.includes(e) ? f(e) : V(e);
65
- }, K = (e) => {
66
- r("priority", e);
67
- }, b = (e) => {
68
- r("dueDate", e ? e.toISOString() : null);
65
+ }, $ = (e) => {
66
+ n("priority", e);
67
+ }, h = (e) => {
68
+ n("dueDate", e ? e.toISOString() : null);
69
69
  }, I = () => {
70
70
  const e = y.trim();
71
- e && !s.labels.includes(e) && r("labels", [...s.labels, e]), p(""), h(!1);
72
- }, W = (e) => {
73
- r("labels", s.labels.filter((q) => q !== e));
74
- }, X = () => {
71
+ e && !s.labels.includes(e) && n("labels", [...s.labels, e]), p(""), b(!1);
72
+ }, K = (e) => {
73
+ n("labels", s.labels.filter((X) => X !== e));
74
+ }, W = () => {
75
75
  const e = s.visibility === "INTERNAL" ? "EVERYONE" : "INTERNAL";
76
76
  if (e === "EVERYONE" && N) {
77
77
  N();
78
78
  return;
79
79
  }
80
- r("visibility", e);
81
- }, E = M || re;
80
+ n("visibility", e);
81
+ }, E = M || ne;
82
82
  return /* @__PURE__ */ l("div", { ref: j, className: i("space-y-ds-01", Y), children: [
83
- /* @__PURE__ */ t(d, { icon: F, label: "Column", children: n && !(u != null && u.includes("columnId")) ? /* @__PURE__ */ t("span", { className: "px-ds-03 py-ds-02 text-ds-md text-text-primary", children: s.column.name }) : /* @__PURE__ */ l(P, { children: [
83
+ /* @__PURE__ */ t(d, { icon: z, label: "Column", children: r && !(u != null && u.includes("columnId")) ? /* @__PURE__ */ t("span", { className: "px-ds-03 py-ds-02 text-ds-md text-text-primary", children: s.column.name }) : /* @__PURE__ */ l(P, { children: [
84
84
  /* @__PURE__ */ t(T, { asChild: !0, children: /* @__PURE__ */ l(
85
85
  "button",
86
86
  {
@@ -88,7 +88,7 @@ const de = c.forwardRef(
88
88
  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",
89
89
  children: [
90
90
  /* @__PURE__ */ t("span", { children: s.column.name }),
91
- /* @__PURE__ */ t(J, { className: "h-3 w-3 text-text-placeholder" })
91
+ /* @__PURE__ */ t(F, { className: "h-3 w-3 text-text-placeholder" })
92
92
  ]
93
93
  }
94
94
  ) }),
@@ -110,7 +110,7 @@ const de = c.forwardRef(
110
110
  ),
111
111
  children: [
112
112
  e.name,
113
- e.id === s.columnId && /* @__PURE__ */ t(Q, { className: "ml-auto h-ico-sm w-ico-sm" })
113
+ e.id === s.columnId && /* @__PURE__ */ t(J, { className: "ml-auto h-ico-sm w-ico-sm" })
114
114
  ]
115
115
  },
116
116
  e.id
@@ -118,8 +118,8 @@ const de = c.forwardRef(
118
118
  }
119
119
  )
120
120
  ] }) }),
121
- !n && /* @__PURE__ */ t(d, { icon: Z, label: "Owner", children: /* @__PURE__ */ t(
122
- A,
121
+ !r && /* @__PURE__ */ t(d, { icon: Q, label: "Owner", children: /* @__PURE__ */ t(
122
+ O,
123
123
  {
124
124
  members: w,
125
125
  selectedIds: s.ownerId ? [s.ownerId] : [],
@@ -129,10 +129,10 @@ const de = c.forwardRef(
129
129
  {
130
130
  type: "button",
131
131
  className: "inline-flex items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02 transition-colors hover:bg-field",
132
- children: s.owner ? /* @__PURE__ */ l(z, { children: [
132
+ children: s.owner ? /* @__PURE__ */ l(q, { children: [
133
133
  /* @__PURE__ */ l(C, { className: "h-ico-md w-ico-md", children: [
134
134
  s.owner.image && /* @__PURE__ */ t(R, { src: s.owner.image, alt: s.owner.name }),
135
- /* @__PURE__ */ t(D, { className: "bg-layer-03 text-ds-xs font-semibold text-text-on-color", children: O(s.owner.name) })
135
+ /* @__PURE__ */ t(D, { className: "bg-layer-03 text-ds-xs font-semibold text-text-on-color", children: A(s.owner.name) })
136
136
  ] }),
137
137
  /* @__PURE__ */ t("span", { className: "text-ds-md text-text-primary", children: s.owner.name })
138
138
  ] }) : /* @__PURE__ */ t("span", { className: "text-ds-md text-text-placeholder", children: "No owner" })
@@ -140,7 +140,7 @@ const de = c.forwardRef(
140
140
  )
141
141
  }
142
142
  ) }),
143
- /* @__PURE__ */ t(d, { icon: $, label: "Assignees", children: /* @__PURE__ */ l("div", { className: "flex flex-wrap items-center gap-ds-02b", children: [
143
+ /* @__PURE__ */ t(d, { icon: Z, label: "Assignees", children: /* @__PURE__ */ l("div", { className: "flex flex-wrap items-center gap-ds-02b", children: [
144
144
  s.assignees.map((e) => /* @__PURE__ */ l(
145
145
  "div",
146
146
  {
@@ -148,15 +148,16 @@ const de = c.forwardRef(
148
148
  children: [
149
149
  /* @__PURE__ */ l(C, { className: "h-ico-sm w-ico-sm", children: [
150
150
  e.user.image && /* @__PURE__ */ t(R, { src: e.user.image, alt: e.user.name }),
151
- /* @__PURE__ */ t(D, { className: "bg-layer-03 text-ds-xs font-semibold text-text-on-color", children: O(e.user.name) })
151
+ /* @__PURE__ */ t(D, { className: "bg-layer-03 text-ds-xs font-semibold text-text-on-color", children: A(e.user.name) })
152
152
  ] }),
153
153
  /* @__PURE__ */ t("span", { className: "text-ds-sm text-text-secondary", children: e.user.name.split(" ")[0] }),
154
- !n && /* @__PURE__ */ t(
154
+ !r && /* @__PURE__ */ t(
155
155
  "button",
156
156
  {
157
157
  type: "button",
158
158
  onClick: () => f(e.user.id),
159
159
  className: "ml-ds-01 rounded-ds-full p-ds-01 transition-colors hover:bg-field",
160
+ "aria-label": `Remove ${e.user.name}`,
160
161
  children: /* @__PURE__ */ t(x, { className: "h-ds-03 w-ds-03 text-text-placeholder" })
161
162
  }
162
163
  )
@@ -164,8 +165,8 @@ const de = c.forwardRef(
164
165
  },
165
166
  e.user.id
166
167
  )),
167
- !n && /* @__PURE__ */ t(
168
- A,
168
+ !r && /* @__PURE__ */ t(
169
+ O,
169
170
  {
170
171
  members: w,
171
172
  selectedIds: v,
@@ -176,12 +177,13 @@ const de = c.forwardRef(
176
177
  {
177
178
  type: "button",
178
179
  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",
180
+ "aria-label": "Add assignee",
179
181
  children: /* @__PURE__ */ t(S, { className: "h-3 w-3 text-text-placeholder" })
180
182
  }
181
183
  )
182
184
  }
183
185
  ),
184
- n && s.assignees.length === 0 && /* @__PURE__ */ t("span", { className: "text-ds-md text-text-placeholder", children: "None" })
186
+ r && s.assignees.length === 0 && /* @__PURE__ */ t("span", { className: "text-ds-md text-text-placeholder", children: "None" })
185
187
  ] }) }),
186
188
  /* @__PURE__ */ t(d, { icon: U, label: "Priority", children: /* @__PURE__ */ l(P, { children: [
187
189
  /* @__PURE__ */ t(T, { asChild: !0, children: /* @__PURE__ */ t(
@@ -198,11 +200,11 @@ const de = c.forwardRef(
198
200
  className: "w-[160px] border-border bg-layer-01 p-ds-02",
199
201
  align: "start",
200
202
  sideOffset: 4,
201
- children: ne.map((e) => /* @__PURE__ */ t(
203
+ children: re.map((e) => /* @__PURE__ */ t(
202
204
  "button",
203
205
  {
204
206
  type: "button",
205
- onClick: () => K(e),
207
+ onClick: () => $(e),
206
208
  className: i(
207
209
  "flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b transition-colors",
208
210
  "hover:bg-field",
@@ -218,7 +220,7 @@ const de = c.forwardRef(
218
220
  /* @__PURE__ */ t(d, { icon: k, label: "Due Date", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-ds-02", children: [
219
221
  g ? g({
220
222
  value: s.dueDate ? new Date(s.dueDate) : null,
221
- onChange: b,
223
+ onChange: h,
222
224
  placeholder: "No due date",
223
225
  className: "h-ds-xs-plus border-none bg-transparent px-ds-03 text-ds-md hover:bg-field"
224
226
  }) : /* @__PURE__ */ t(
@@ -226,7 +228,8 @@ const de = c.forwardRef(
226
228
  {
227
229
  type: "date",
228
230
  value: s.dueDate ? new Date(s.dueDate).toISOString().split("T")[0] : "",
229
- onChange: (e) => b(e.target.value ? new Date(e.target.value) : null),
231
+ onChange: (e) => h(e.target.value ? new Date(e.target.value) : null),
232
+ "aria-label": "Due date",
230
233
  className: "h-ds-xs-plus border-none bg-transparent px-ds-03 text-ds-md text-text-primary outline-none hover:bg-field rounded-ds-md"
231
234
  }
232
235
  ),
@@ -234,8 +237,9 @@ const de = c.forwardRef(
234
237
  "button",
235
238
  {
236
239
  type: "button",
237
- onClick: () => b(null),
240
+ onClick: () => h(null),
238
241
  className: "rounded-ds-md p-ds-02 transition-colors hover:bg-field",
242
+ "aria-label": "Clear due date",
239
243
  children: /* @__PURE__ */ t(x, { className: "h-3 w-3 text-text-placeholder" })
240
244
  }
241
245
  )
@@ -247,12 +251,13 @@ const de = c.forwardRef(
247
251
  className: "inline-flex items-center gap-ds-02 rounded-ds-full bg-interactive/10 px-ds-03 py-ds-01 text-ds-sm font-medium text-interactive",
248
252
  children: [
249
253
  e,
250
- !n && /* @__PURE__ */ t(
254
+ !r && /* @__PURE__ */ t(
251
255
  "button",
252
256
  {
253
257
  type: "button",
254
- onClick: () => W(e),
258
+ onClick: () => K(e),
255
259
  className: "rounded-ds-full p-ds-01 transition-colors hover:bg-field",
260
+ "aria-label": `Remove label ${e}`,
256
261
  children: /* @__PURE__ */ t(x, { className: "h-ds-03 w-ds-03" })
257
262
  }
258
263
  )
@@ -260,14 +265,15 @@ const de = c.forwardRef(
260
265
  },
261
266
  e
262
267
  )),
263
- !n && (_ ? /* @__PURE__ */ t("div", { className: "inline-flex items-center gap-ds-02", children: /* @__PURE__ */ t(
268
+ !r && (_ ? /* @__PURE__ */ t("div", { className: "inline-flex items-center gap-ds-02", children: /* @__PURE__ */ t(
264
269
  "input",
265
270
  {
266
271
  type: "text",
267
272
  value: y,
268
273
  onChange: (e) => p(e.target.value),
274
+ "aria-label": "New label name",
269
275
  onKeyDown: (e) => {
270
- e.key === "Enter" && I(), e.key === "Escape" && (h(!1), p(""));
276
+ e.key === "Enter" && I(), e.key === "Escape" && (b(!1), p(""));
271
277
  },
272
278
  onBlur: I,
273
279
  placeholder: "Label name",
@@ -278,18 +284,19 @@ const de = c.forwardRef(
278
284
  "button",
279
285
  {
280
286
  type: "button",
281
- onClick: () => h(!0),
287
+ onClick: () => b(!0),
282
288
  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",
289
+ "aria-label": "Add label",
283
290
  children: /* @__PURE__ */ t(S, { className: "h-3 w-3 text-text-placeholder" })
284
291
  }
285
292
  )),
286
- n && s.labels.length === 0 && /* @__PURE__ */ t("span", { className: "text-ds-md text-text-placeholder", children: "None" })
293
+ r && s.labels.length === 0 && /* @__PURE__ */ t("span", { className: "text-ds-md text-text-placeholder", children: "None" })
287
294
  ] }) }),
288
- !n && /* @__PURE__ */ t(d, { icon: te, label: "Visibility", children: /* @__PURE__ */ l(
295
+ !r && /* @__PURE__ */ t(d, { icon: te, label: "Visibility", children: /* @__PURE__ */ l(
289
296
  "button",
290
297
  {
291
298
  type: "button",
292
- onClick: X,
299
+ onClick: W,
293
300
  className: i(
294
301
  "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",
295
302
  s.visibility === "EVERYONE" ? "bg-success-surface text-text-success" : "bg-layer-02 text-text-tertiary"
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ export declare function useComposedRef<T>(...refs: Array<React.Ref<T> | undefined>): React.RefCallback<T>;
3
+ //# sourceMappingURL=use-composed-ref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-composed-ref.d.ts","sourceRoot":"","sources":["../../src/utils/use-composed-ref.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,wBAAgB,cAAc,CAAC,CAAC,EAC9B,GAAG,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,GACvC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAWtB"}
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import * as u from "react";
3
+ function c(...o) {
4
+ return u.useCallback((e) => {
5
+ o.forEach((t) => {
6
+ t && (typeof t == "function" ? t(e) : t.current = e);
7
+ });
8
+ }, o);
9
+ }
10
+ export {
11
+ c as useComposedRef
12
+ };
package/llms.txt CHANGED
@@ -22,7 +22,7 @@ import { KanbanBoard, TaskDetailPanel, ChatPanel } from '@devalok/shilp-sutra-ka
22
22
  ## Module Reference
23
23
 
24
24
  ### Board (`/board`)
25
- - KanbanBoard: initialData(BoardData), onTaskMove, onTaskAdd, onColumnRename, onColumnDelete, onClickTask, onAddColumn
25
+ - KanbanBoard: initialData(BoardData), onTaskMove, onTaskAdd, onColumnRename, onColumnDelete, onColumnToggleVisibility, onClickTask, onAddColumn
26
26
  - BoardColumn: column(BoardColumnData), index, onAddTask, onClickTask, onRenameColumn, onDeleteColumn
27
27
  - TaskCard: task(BoardTask), onClickTask
28
28
  - TaskCardOverlay: task(BoardTask) — drag overlay variant
@@ -32,6 +32,21 @@ BoardData shape: { columns: [{ id, name, isClientVisible, tasks[] }] }
32
32
 
33
33
  Uses dnd-kit for drag-and-drop. KanbanBoard manages all DnD state internally.
34
34
 
35
+ Column management callbacks: `onColumnRename`, `onColumnDelete`, `onColumnToggleVisibility`, and `onAddColumn`
36
+ are fire-and-forget — the board renders an "Add column" button and column header menus only when the
37
+ corresponding callbacks are provided. The consumer must build their own confirmation UI (e.g., ConfirmDialog)
38
+ and state updates. Example wiring a custom column header action:
39
+
40
+ <KanbanBoard
41
+ initialData={boardData}
42
+ onColumnRename={(columnId, name) => updateColumn(columnId, { name })}
43
+ onColumnDelete={(columnId) => {
44
+ setColumnToDelete(columnId) // open your own ConfirmDialog
45
+ }}
46
+ onColumnToggleVisibility={(columnId, visible) => updateColumn(columnId, { isClientVisible: visible })}
47
+ onAddColumn={() => setShowNewColumnDialog(true)}
48
+ />
49
+
35
50
  ### Tasks (`/tasks`)
36
51
  - TaskDetailPanel: task(FullTask|null), open, onOpenChange, columns[], members[], activities[], clientMode?, onTitleUpdate, onPropertyUpdate, onAssign, onUnassign, onCreateSubtask, onToggleSubtask, onRequestReview, onUpdateReviewStatus + more callbacks
37
52
  - TaskProperties: task, columns[], members[], onUpdate, onAssign, onUnassign, readOnly?, editableFields?, renderPriorityIndicator?, renderDatePicker?
package/package.json CHANGED
@@ -1,69 +1,73 @@
1
- {
2
- "name": "@devalok/shilp-sutra-karm",
3
- "version": "0.6.2",
4
- "description": "Domain components for Karm — board, tasks, chat, dashboard, client, and admin",
5
- "license": "MIT",
6
- "type": "module",
7
- "sideEffects": [
8
- "**/*.css"
9
- ],
10
- "exports": {
11
- ".": {
12
- "import": "./dist/index.js",
13
- "types": "./dist/index.d.ts"
14
- },
15
- "./board": {
16
- "import": "./dist/board/index.js",
17
- "types": "./dist/board/index.d.ts"
18
- },
19
- "./tasks": {
20
- "import": "./dist/tasks/index.js",
21
- "types": "./dist/tasks/index.d.ts"
22
- },
23
- "./chat": {
24
- "import": "./dist/chat/index.js",
25
- "types": "./dist/chat/index.d.ts"
26
- },
27
- "./dashboard": {
28
- "import": "./dist/dashboard/index.js",
29
- "types": "./dist/dashboard/index.d.ts"
30
- },
31
- "./client": {
32
- "import": "./dist/client/index.js",
33
- "types": "./dist/client/index.d.ts"
34
- },
35
- "./admin": {
36
- "import": "./dist/admin/index.js",
37
- "types": "./dist/admin/index.d.ts"
38
- }
39
- },
40
- "files": [
41
- "dist",
42
- "README.md",
43
- "llms.txt"
44
- ],
45
- "scripts": {
46
- "build": "vite build && node scripts/inject-use-client.mjs",
47
- "typecheck": "tsc --noEmit",
48
- "lint": "eslint src/"
49
- },
50
- "peerDependencies": {
51
- "@devalok/shilp-sutra": ">=0.3.0",
52
- "react": "^18 || ^19",
53
- "react-dom": "^18 || ^19"
54
- },
55
- "devDependencies": {
56
- "@devalok/shilp-sutra": "workspace:*"
57
- },
58
- "dependencies": {
59
- "@dnd-kit/core": "^6.3.1",
60
- "@dnd-kit/sortable": "^10.0.0",
61
- "@dnd-kit/utilities": "^3.2.2",
62
- "@tabler/icons-react": "^3.37.1",
63
- "class-variance-authority": "^0.7.1",
64
- "clsx": "^2.1.1",
65
- "date-fns": "^4.1.0",
66
- "react-markdown": "^10.1.0",
67
- "tailwind-merge": "^3.0.1"
68
- }
69
- }
1
+ {
2
+ "name": "@devalok/shilp-sutra-karm",
3
+ "version": "0.8.0",
4
+ "description": "Domain components for Karm — board, tasks, chat, dashboard, client, and admin",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "module": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "sideEffects": [
11
+ "**/*.css"
12
+ ],
13
+ "exports": {
14
+ ".": {
15
+ "import": "./dist/index.js",
16
+ "types": "./dist/index.d.ts"
17
+ },
18
+ "./board": {
19
+ "import": "./dist/board/index.js",
20
+ "types": "./dist/board/index.d.ts"
21
+ },
22
+ "./tasks": {
23
+ "import": "./dist/tasks/index.js",
24
+ "types": "./dist/tasks/index.d.ts"
25
+ },
26
+ "./chat": {
27
+ "import": "./dist/chat/index.js",
28
+ "types": "./dist/chat/index.d.ts"
29
+ },
30
+ "./dashboard": {
31
+ "import": "./dist/dashboard/index.js",
32
+ "types": "./dist/dashboard/index.d.ts"
33
+ },
34
+ "./client": {
35
+ "import": "./dist/client/index.js",
36
+ "types": "./dist/client/index.d.ts"
37
+ },
38
+ "./admin": {
39
+ "import": "./dist/admin/index.js",
40
+ "types": "./dist/admin/index.d.ts"
41
+ }
42
+ },
43
+ "files": [
44
+ "dist",
45
+ "README.md",
46
+ "llms.txt"
47
+ ],
48
+ "scripts": {
49
+ "build": "vite build && node scripts/inject-use-client.mjs",
50
+ "typecheck": "tsc --noEmit",
51
+ "lint": "eslint src/",
52
+ "prepublishOnly": "pnpm build"
53
+ },
54
+ "peerDependencies": {
55
+ "@devalok/shilp-sutra": ">=0.7.0",
56
+ "@tabler/icons-react": "^3.0.0",
57
+ "react": "^18 || ^19",
58
+ "react-dom": "^18 || ^19"
59
+ },
60
+ "devDependencies": {
61
+ "@devalok/shilp-sutra": "workspace:*"
62
+ },
63
+ "dependencies": {
64
+ "@dnd-kit/core": "^6.3.1",
65
+ "@dnd-kit/sortable": "^10.0.0",
66
+ "@dnd-kit/utilities": "^3.2.2",
67
+ "class-variance-authority": "^0.7.1",
68
+ "clsx": "^2.1.1",
69
+ "date-fns": "^4.1.0",
70
+ "react-markdown": "^10.1.0",
71
+ "tailwind-merge": "^3.0.1"
72
+ }
73
+ }