@devalok/shilp-sutra-karm 0.8.2 → 0.9.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 (68) hide show
  1. package/dist/_chunks/chat-panel.js +376 -0
  2. package/dist/_chunks/daily-brief.js +177 -0
  3. package/dist/_chunks/kanban-board.js +597 -0
  4. package/dist/_chunks/project-card.js +121 -0
  5. package/dist/_chunks/render-adjustment-type.js +3596 -0
  6. package/dist/{tasks → _chunks}/task-constants.js +3 -3
  7. package/dist/_chunks/task-detail-panel.js +1305 -0
  8. package/dist/_chunks/use-composed-ref.js +12 -0
  9. package/dist/_chunks/vendor.js +11491 -0
  10. package/dist/admin/index.js +37 -60
  11. package/dist/board/index.js +3 -5
  12. package/dist/chat/index.js +6 -10
  13. package/dist/client/index.js +4 -6
  14. package/dist/dashboard/index.js +3 -4
  15. package/dist/index.js +189 -103
  16. package/dist/tasks/index.js +8 -14
  17. package/package.json +78 -80
  18. package/dist/admin/adjustments/approved-adjustments.js +0 -43
  19. package/dist/admin/break/break-admin-skeleton.js +0 -59
  20. package/dist/admin/break/break-admin.js +0 -373
  21. package/dist/admin/break/break-balance.js +0 -42
  22. package/dist/admin/break/breaks.js +0 -91
  23. package/dist/admin/break/delete-break.js +0 -55
  24. package/dist/admin/break/edit-break-balance.js +0 -113
  25. package/dist/admin/break/edit-break.js +0 -453
  26. package/dist/admin/break/header.js +0 -231
  27. package/dist/admin/break/leave-request.js +0 -162
  28. package/dist/admin/break/use-break-date-picker.js +0 -43
  29. package/dist/admin/dashboard/admin-dashboard.js +0 -337
  30. package/dist/admin/dashboard/associate-detail.js +0 -259
  31. package/dist/admin/dashboard/attendance-overview.js +0 -136
  32. package/dist/admin/dashboard/break-request.js +0 -176
  33. package/dist/admin/dashboard/calendar.js +0 -141
  34. package/dist/admin/dashboard/correction-list.js +0 -102
  35. package/dist/admin/dashboard/dashboard-header.js +0 -155
  36. package/dist/admin/dashboard/dashboard-skeleton.js +0 -109
  37. package/dist/admin/dashboard/leave-requests.js +0 -201
  38. package/dist/admin/dashboard/render-date.js +0 -144
  39. package/dist/admin/dashboard/use-calendar-navigation.js +0 -169
  40. package/dist/admin/dashboard/use-leave-request-interaction.js +0 -34
  41. package/dist/admin/utils/date-range-utils.js +0 -37
  42. package/dist/admin/utils/date-utils.js +0 -119
  43. package/dist/admin/utils/emoji-utils.js +0 -17
  44. package/dist/admin/utils/render-adjustment-type.js +0 -20
  45. package/dist/admin/utils/render-status.js +0 -22
  46. package/dist/board/board-column.js +0 -236
  47. package/dist/board/kanban-board.js +0 -218
  48. package/dist/board/task-card.js +0 -168
  49. package/dist/chat/chat-input.js +0 -54
  50. package/dist/chat/chat-panel.js +0 -151
  51. package/dist/chat/conversation-list.js +0 -99
  52. package/dist/chat/markdown-components.js +0 -35
  53. package/dist/chat/message-list.js +0 -59
  54. package/dist/chat/streaming-text.js +0 -17
  55. package/dist/client/accent-provider.js +0 -22
  56. package/dist/client/client-portal-header.js +0 -48
  57. package/dist/client/project-card.js +0 -60
  58. package/dist/dashboard/attendance-cta.js +0 -115
  59. package/dist/dashboard/daily-brief.js +0 -68
  60. package/dist/page-skeletons.js +0 -130
  61. package/dist/tasks/activity-tab.js +0 -185
  62. package/dist/tasks/conversation-tab.js +0 -138
  63. package/dist/tasks/files-tab.js +0 -186
  64. package/dist/tasks/review-tab.js +0 -170
  65. package/dist/tasks/subtasks-tab.js +0 -154
  66. package/dist/tasks/task-detail-panel.js +0 -210
  67. package/dist/tasks/task-properties.js +0 -324
  68. package/dist/utils/use-composed-ref.js +0 -12
@@ -1,210 +0,0 @@
1
- "use client";
2
- import { jsx as r, jsxs as a, Fragment as ie } from "react/jsx-runtime";
3
- import * as c from "react";
4
- import { cn as _ } from "@devalok/shilp-sutra/ui/lib/utils";
5
- import { Sheet as re, SheetContent as se, SheetTitle as le } from "@devalok/shilp-sutra/ui/sheet";
6
- import { VisuallyHidden as ae } from "@devalok/shilp-sutra/ui/visually-hidden";
7
- import { Skeleton as t } from "@devalok/shilp-sutra/ui/skeleton";
8
- import { Tabs as ce, TabsList as te, TabsTrigger as de } from "@devalok/shilp-sutra/ui";
9
- import { TaskProperties as fe } from "./task-properties.js";
10
- import { SubtasksTab as me } from "./subtasks-tab.js";
11
- import { ReviewTab as ne } from "./review-tab.js";
12
- import { ConversationTab as oe } from "./conversation-tab.js";
13
- import { FilesTab as be } from "./files-tab.js";
14
- import { ActivityTab as pe } from "./activity-tab.js";
15
- import { IconListCheck as he, IconGitPullRequest as ue, IconMessageCircle as ve, IconPaperclip as xe, IconActivity as ye } from "@tabler/icons-react";
16
- const z = [
17
- { id: "subtasks", label: "Subtasks", icon: he },
18
- { id: "review", label: "Review", icon: ue },
19
- { id: "conversation", label: "Conversation", icon: ve },
20
- { id: "files", label: "Files", icon: xe },
21
- { id: "activity", label: "Activity", icon: ye }
22
- ];
23
- function Ne() {
24
- return /* @__PURE__ */ a("div", { className: "space-y-ds-06 p-ds-06", children: [
25
- /* @__PURE__ */ r(t, { className: "h-ds-xs-plus w-3/4 bg-field" }),
26
- /* @__PURE__ */ r("div", { className: "space-y-ds-04", children: Array.from({ length: 6 }).map((V, i) => /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-04", children: [
27
- /* @__PURE__ */ r(t, { className: "h-[16px] w-[120px] bg-field" }),
28
- /* @__PURE__ */ r(t, { className: "h-[16px] flex-1 bg-field" })
29
- ] }, i)) }),
30
- /* @__PURE__ */ r("div", { className: "flex gap-ds-05 border-b border-border pb-ds-03", children: Array.from({ length: 5 }).map((V, i) => /* @__PURE__ */ r(t, { className: "h-[12px] w-[64px] bg-field" }, i)) }),
31
- /* @__PURE__ */ a("div", { className: "space-y-ds-04", children: [
32
- /* @__PURE__ */ r(t, { className: "h-ds-md w-full bg-field" }),
33
- /* @__PURE__ */ r(t, { className: "h-ds-md w-full bg-field" }),
34
- /* @__PURE__ */ r(t, { className: "h-ds-md w-4/5 bg-field" })
35
- ] })
36
- ] });
37
- }
38
- const Te = c.forwardRef(function({
39
- task: i,
40
- loading: G = !1,
41
- open: b,
42
- onOpenChange: H,
43
- columns: f,
44
- members: j,
45
- activities: J = [],
46
- enrichedComments: P,
47
- clientMode: s = !1,
48
- clientEditableFields: A = ["priority", "dueDate"],
49
- onTitleUpdate: p,
50
- onPropertyUpdate: h,
51
- onAssign: u,
52
- onUnassign: v,
53
- onCreateSubtask: x,
54
- onToggleSubtask: y,
55
- onRequestReview: N,
56
- onUpdateReviewStatus: T,
57
- onPostComment: w,
58
- onUploadFile: g,
59
- onDeleteFile: I,
60
- onTabChange: D,
61
- renderEditor: Q,
62
- renderViewer: W,
63
- renderPriorityIndicator: X,
64
- renderDatePicker: Y,
65
- isUploading: Z = !1
66
- }, $) {
67
- var C, K, L;
68
- const [d, B] = c.useState(s ? "conversation" : "subtasks"), [E, m] = c.useState(!1), [O, n] = c.useState(""), o = c.useRef(null);
69
- c.useEffect(() => {
70
- i && (n(i.title), m(!1));
71
- }, [i == null ? void 0 : i.id]), c.useEffect(() => {
72
- b && B(s ? "conversation" : "subtasks");
73
- }, [b, s]);
74
- const q = (e) => {
75
- B(e), D == null || D(e);
76
- }, S = () => {
77
- m(!1);
78
- const e = O.trim();
79
- e && e !== (i == null ? void 0 : i.title) ? p == null || p(e) : i && n(i.title);
80
- }, R = (e) => {
81
- e.key === "Enter" && (e.preventDefault(), S()), e.key === "Escape" && (m(!1), i && n(i.title));
82
- };
83
- c.useEffect(() => {
84
- E && o.current && (o.current.focus(), o.current.select());
85
- }, [E]);
86
- const F = (C = f.find((e) => e.isTerminal)) == null ? void 0 : C.id, k = ((K = f.find((e) => e.isDefault)) == null ? void 0 : K.id) || ((L = f[0]) == null ? void 0 : L.id) || "", M = s ? z.filter((e) => e.id === "conversation") : z, U = P || (i == null ? void 0 : i.comments) || [];
87
- return /* @__PURE__ */ r(re, { open: b, onOpenChange: H, children: /* @__PURE__ */ a(
88
- se,
89
- {
90
- ref: $,
91
- side: "right",
92
- className: _(
93
- /* intentional: task detail side panel takes 40% of screen, min 380px for form usability */
94
- "w-full sm:max-w-none sm:w-[40%] min-w-[380px] p-0",
95
- "flex flex-col overflow-hidden",
96
- "border-l border-border bg-layer-01"
97
- ),
98
- children: [
99
- /* @__PURE__ */ r(ae, { children: /* @__PURE__ */ r(le, { children: (i == null ? void 0 : i.title) || "Task Details" }) }),
100
- G || !i ? /* @__PURE__ */ r(Ne, {}) : /* @__PURE__ */ a(ie, { children: [
101
- /* @__PURE__ */ a("div", { className: "shrink-0 border-b border-border px-ds-06 pb-ds-05 pt-ds-06", children: [
102
- !s && E ? /* @__PURE__ */ r(
103
- "input",
104
- {
105
- ref: o,
106
- type: "text",
107
- value: O,
108
- onChange: (e) => n(e.target.value),
109
- onBlur: S,
110
- onKeyDown: R,
111
- className: "w-full bg-transparent text-ds-lg font-semibold text-text-primary outline-none"
112
- }
113
- ) : (
114
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events
115
- /* @__PURE__ */ r(
116
- "h2",
117
- {
118
- onClick: s ? void 0 : () => m(!0),
119
- className: _(
120
- "text-ds-lg font-semibold text-text-primary",
121
- !s && "cursor-text hover:text-interactive transition-colors"
122
- ),
123
- children: i.title
124
- }
125
- )
126
- ),
127
- i.parentTaskId && /* @__PURE__ */ r("p", { className: "mt-ds-02 text-ds-sm text-text-placeholder", children: "Subtask" })
128
- ] }),
129
- /* @__PURE__ */ a("div", { className: "flex-1 overflow-y-auto", children: [
130
- /* @__PURE__ */ r("div", { className: "border-b border-border px-ds-06 py-ds-05", children: /* @__PURE__ */ r(
131
- fe,
132
- {
133
- task: i,
134
- columns: f,
135
- members: j,
136
- onUpdate: (e, l) => {
137
- s && !A.includes(e) || h == null || h(e, l);
138
- },
139
- onAssign: (e) => u == null ? void 0 : u(e),
140
- onUnassign: (e) => v == null ? void 0 : v(e),
141
- readOnly: s,
142
- editableFields: s ? A : void 0,
143
- renderPriorityIndicator: X,
144
- renderDatePicker: Y
145
- }
146
- ) }),
147
- /* @__PURE__ */ r("div", { className: "sticky top-0 z-raised bg-layer-01 px-ds-06", children: /* @__PURE__ */ r(ce, { value: d, onValueChange: q, children: /* @__PURE__ */ r(te, { variant: "line", children: M.map((e) => /* @__PURE__ */ a(de, { value: e.id, children: [
148
- /* @__PURE__ */ r(e.icon, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
149
- e.label
150
- ] }, e.id)) }) }) }),
151
- /* @__PURE__ */ a("div", { className: "px-ds-06 py-ds-05", children: [
152
- d === "subtasks" && /* @__PURE__ */ r(
153
- me,
154
- {
155
- subtasks: i.subtasks ?? [],
156
- terminalColumnId: F,
157
- projectId: i.projectId,
158
- parentTaskId: i.id,
159
- defaultColumnId: k,
160
- onCreateSubtask: s ? () => {
161
- } : (e) => x == null ? void 0 : x(e),
162
- onToggleSubtask: s ? () => {
163
- } : (e, l) => y == null ? void 0 : y(e, l),
164
- readOnly: s
165
- }
166
- ),
167
- d === "review" && !s && /* @__PURE__ */ r(
168
- ne,
169
- {
170
- reviews: i.reviewRequests,
171
- members: j,
172
- onRequestReview: (e) => N == null ? void 0 : N(e),
173
- onUpdateStatus: (e, l, ee) => T == null ? void 0 : T(e, l, ee)
174
- }
175
- ),
176
- d === "conversation" && /* @__PURE__ */ r(
177
- oe,
178
- {
179
- comments: U,
180
- taskVisibility: i.visibility,
181
- onPostComment: (e, l) => w == null ? void 0 : w(e, l),
182
- clientMode: s,
183
- renderEditor: Q,
184
- renderViewer: W
185
- }
186
- ),
187
- d === "files" && /* @__PURE__ */ r(
188
- be,
189
- {
190
- files: i.files ?? [],
191
- onUpload: s ? () => {
192
- } : (e, l) => g == null ? void 0 : g(e, l),
193
- onDelete: s ? () => {
194
- } : (e) => I == null ? void 0 : I(e),
195
- isUploading: Z,
196
- readOnly: s
197
- }
198
- ),
199
- d === "activity" && /* @__PURE__ */ r(pe, { activities: J })
200
- ] })
201
- ] })
202
- ] })
203
- ]
204
- }
205
- ) });
206
- });
207
- Te.displayName = "TaskDetailPanel";
208
- export {
209
- Te as TaskDetailPanel
210
- };
@@ -1,324 +0,0 @@
1
- "use client";
2
- import { jsxs as l, jsx as t, Fragment as q } from "react/jsx-runtime";
3
- import * as c from "react";
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
- import { PRIORITY_DOT_COLORS as se, PRIORITY_LABELS as le } from "./task-constants.js";
11
- const re = ["LOW", "MEDIUM", "HIGH", "URGENT"];
12
- function d({
13
- icon: a,
14
- label: s,
15
- children: m,
16
- className: o
17
- }) {
18
- return /* @__PURE__ */ l(
19
- "div",
20
- {
21
- className: i(
22
- "flex items-center gap-ds-04 py-ds-03",
23
- o
24
- ),
25
- children: [
26
- /* @__PURE__ */ l("div", { className: "flex w-[120px] shrink-0 items-center gap-ds-03 text-text-placeholder", children: [
27
- /* @__PURE__ */ t(a, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
28
- /* @__PURE__ */ t("span", { className: "text-ds-sm", children: s })
29
- ] }),
30
- /* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: m })
31
- ]
32
- }
33
- );
34
- }
35
- function ne({ priority: a }) {
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[a]) }),
38
- /* @__PURE__ */ t("span", { className: "text-ds-md text-text-primary", children: le[a] || a })
39
- ] });
40
- }
41
- const de = c.forwardRef(
42
- function({
43
- task: s,
44
- columns: m,
45
- members: o,
46
- onUpdate: n,
47
- onAssign: V,
48
- onUnassign: f,
49
- className: Y,
50
- readOnly: r = !1,
51
- editableFields: u,
52
- renderPriorityIndicator: M,
53
- renderDatePicker: g,
54
- onConfirmVisibilityChange: N
55
- }, j) {
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
- ), B = (e) => {
60
- n("columnId", e);
61
- }, G = (e) => {
62
- n("ownerId", e === s.ownerId ? null : e);
63
- }, H = (e) => {
64
- v.includes(e) ? f(e) : V(e);
65
- }, $ = (e) => {
66
- n("priority", e);
67
- }, h = (e) => {
68
- n("dueDate", e ? e.toISOString() : null);
69
- }, I = () => {
70
- const e = y.trim();
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
- const e = s.visibility === "INTERNAL" ? "EVERYONE" : "INTERNAL";
76
- if (e === "EVERYONE" && N) {
77
- N();
78
- return;
79
- }
80
- n("visibility", e);
81
- }, E = M || ne;
82
- return /* @__PURE__ */ l("div", { ref: j, className: i("space-y-ds-01", Y), 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
- /* @__PURE__ */ t(T, { asChild: !0, children: /* @__PURE__ */ l(
85
- "button",
86
- {
87
- type: "button",
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
- children: [
90
- /* @__PURE__ */ t("span", { children: s.column.name }),
91
- /* @__PURE__ */ t(F, { className: "h-3 w-3 text-text-placeholder" })
92
- ]
93
- }
94
- ) }),
95
- /* @__PURE__ */ t(
96
- L,
97
- {
98
- className: "w-[180px] border-border bg-layer-01 p-ds-02",
99
- align: "start",
100
- sideOffset: 4,
101
- children: m.map((e) => /* @__PURE__ */ l(
102
- "button",
103
- {
104
- type: "button",
105
- onClick: () => B(e.id),
106
- className: i(
107
- "flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-left text-ds-md transition-colors",
108
- "hover:bg-field",
109
- e.id === s.columnId ? "text-interactive" : "text-text-primary"
110
- ),
111
- children: [
112
- e.name,
113
- e.id === s.columnId && /* @__PURE__ */ t(J, { className: "ml-auto h-ico-sm w-ico-sm" })
114
- ]
115
- },
116
- e.id
117
- ))
118
- }
119
- )
120
- ] }) }),
121
- !r && /* @__PURE__ */ t(d, { icon: Q, label: "Owner", children: /* @__PURE__ */ t(
122
- O,
123
- {
124
- members: w,
125
- selectedIds: s.ownerId ? [s.ownerId] : [],
126
- onSelect: G,
127
- children: /* @__PURE__ */ t(
128
- "button",
129
- {
130
- type: "button",
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(q, { children: [
133
- /* @__PURE__ */ l(C, { className: "h-ico-md w-ico-md", children: [
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: A(s.owner.name) })
136
- ] }),
137
- /* @__PURE__ */ t("span", { className: "text-ds-md text-text-primary", children: s.owner.name })
138
- ] }) : /* @__PURE__ */ t("span", { className: "text-ds-md text-text-placeholder", children: "No owner" })
139
- }
140
- )
141
- }
142
- ) }),
143
- /* @__PURE__ */ t(d, { icon: Z, label: "Assignees", children: /* @__PURE__ */ l("div", { className: "flex flex-wrap items-center gap-ds-02b", children: [
144
- s.assignees.map((e) => /* @__PURE__ */ l(
145
- "div",
146
- {
147
- className: "inline-flex items-center gap-ds-02 rounded-ds-full bg-layer-02 py-ds-01 pl-ds-01 pr-ds-03",
148
- children: [
149
- /* @__PURE__ */ l(C, { className: "h-ico-sm w-ico-sm", children: [
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: A(e.user.name) })
152
- ] }),
153
- /* @__PURE__ */ t("span", { className: "text-ds-sm text-text-secondary", children: e.user.name.split(" ")[0] }),
154
- !r && /* @__PURE__ */ t(
155
- "button",
156
- {
157
- type: "button",
158
- onClick: () => f(e.user.id),
159
- className: "ml-ds-01 rounded-ds-full p-ds-01 transition-colors hover:bg-field",
160
- "aria-label": `Remove ${e.user.name}`,
161
- children: /* @__PURE__ */ t(x, { className: "h-ds-03 w-ds-03 text-text-placeholder" })
162
- }
163
- )
164
- ]
165
- },
166
- e.user.id
167
- )),
168
- !r && /* @__PURE__ */ t(
169
- O,
170
- {
171
- members: w,
172
- selectedIds: v,
173
- onSelect: H,
174
- multiple: !0,
175
- children: /* @__PURE__ */ t(
176
- "button",
177
- {
178
- type: "button",
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",
181
- children: /* @__PURE__ */ t(S, { className: "h-3 w-3 text-text-placeholder" })
182
- }
183
- )
184
- }
185
- ),
186
- r && s.assignees.length === 0 && /* @__PURE__ */ t("span", { className: "text-ds-md text-text-placeholder", children: "None" })
187
- ] }) }),
188
- /* @__PURE__ */ t(d, { icon: U, label: "Priority", children: /* @__PURE__ */ l(P, { children: [
189
- /* @__PURE__ */ t(T, { asChild: !0, children: /* @__PURE__ */ t(
190
- "button",
191
- {
192
- type: "button",
193
- className: "rounded-ds-md px-ds-03 py-ds-02 transition-colors hover:bg-field",
194
- children: /* @__PURE__ */ t(E, { priority: s.priority })
195
- }
196
- ) }),
197
- /* @__PURE__ */ t(
198
- L,
199
- {
200
- className: "w-[160px] border-border bg-layer-01 p-ds-02",
201
- align: "start",
202
- sideOffset: 4,
203
- children: re.map((e) => /* @__PURE__ */ t(
204
- "button",
205
- {
206
- type: "button",
207
- onClick: () => $(e),
208
- className: i(
209
- "flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b transition-colors",
210
- "hover:bg-field",
211
- e === s.priority && "bg-field"
212
- ),
213
- children: /* @__PURE__ */ t(E, { priority: e })
214
- },
215
- e
216
- ))
217
- }
218
- )
219
- ] }) }),
220
- /* @__PURE__ */ t(d, { icon: k, label: "Due Date", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-ds-02", children: [
221
- g ? g({
222
- value: s.dueDate ? new Date(s.dueDate) : null,
223
- onChange: h,
224
- placeholder: "No due date",
225
- className: "h-ds-xs-plus border-none bg-transparent px-ds-03 text-ds-md hover:bg-field"
226
- }) : /* @__PURE__ */ t(
227
- "input",
228
- {
229
- type: "date",
230
- value: s.dueDate ? new Date(s.dueDate).toISOString().split("T")[0] : "",
231
- onChange: (e) => h(e.target.value ? new Date(e.target.value) : null),
232
- "aria-label": "Due date",
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"
234
- }
235
- ),
236
- s.dueDate && /* @__PURE__ */ t(
237
- "button",
238
- {
239
- type: "button",
240
- onClick: () => h(null),
241
- className: "rounded-ds-md p-ds-02 transition-colors hover:bg-field",
242
- "aria-label": "Clear due date",
243
- children: /* @__PURE__ */ t(x, { className: "h-3 w-3 text-text-placeholder" })
244
- }
245
- )
246
- ] }) }),
247
- /* @__PURE__ */ t(d, { icon: ee, label: "Labels", children: /* @__PURE__ */ l("div", { className: "flex flex-wrap items-center gap-ds-02b", children: [
248
- s.labels.map((e) => /* @__PURE__ */ l(
249
- "span",
250
- {
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",
252
- children: [
253
- e,
254
- !r && /* @__PURE__ */ t(
255
- "button",
256
- {
257
- type: "button",
258
- onClick: () => K(e),
259
- className: "rounded-ds-full p-ds-01 transition-colors hover:bg-field",
260
- "aria-label": `Remove label ${e}`,
261
- children: /* @__PURE__ */ t(x, { className: "h-ds-03 w-ds-03" })
262
- }
263
- )
264
- ]
265
- },
266
- e
267
- )),
268
- !r && (_ ? /* @__PURE__ */ t("div", { className: "inline-flex items-center gap-ds-02", children: /* @__PURE__ */ t(
269
- "input",
270
- {
271
- type: "text",
272
- value: y,
273
- onChange: (e) => p(e.target.value),
274
- "aria-label": "New label name",
275
- onKeyDown: (e) => {
276
- e.key === "Enter" && I(), e.key === "Escape" && (b(!1), p(""));
277
- },
278
- onBlur: I,
279
- placeholder: "Label name",
280
- 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",
281
- autoFocus: !0
282
- }
283
- ) }) : /* @__PURE__ */ t(
284
- "button",
285
- {
286
- type: "button",
287
- onClick: () => b(!0),
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",
290
- children: /* @__PURE__ */ t(S, { className: "h-3 w-3 text-text-placeholder" })
291
- }
292
- )),
293
- r && s.labels.length === 0 && /* @__PURE__ */ t("span", { className: "text-ds-md text-text-placeholder", children: "None" })
294
- ] }) }),
295
- !r && /* @__PURE__ */ t(d, { icon: te, label: "Visibility", children: /* @__PURE__ */ l(
296
- "button",
297
- {
298
- type: "button",
299
- onClick: W,
300
- className: i(
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",
302
- s.visibility === "EVERYONE" ? "bg-success-surface text-text-success" : "bg-layer-02 text-text-tertiary"
303
- ),
304
- children: [
305
- /* @__PURE__ */ t(
306
- "span",
307
- {
308
- className: i(
309
- "h-ds-02b w-ds-02b rounded-ds-full",
310
- s.visibility === "EVERYONE" ? "bg-success" : "bg-icon-disabled"
311
- )
312
- }
313
- ),
314
- s.visibility === "EVERYONE" ? "Everyone" : "Internal"
315
- ]
316
- }
317
- ) })
318
- ] });
319
- }
320
- );
321
- de.displayName = "TaskProperties";
322
- export {
323
- de as TaskProperties
324
- };
@@ -1,12 +0,0 @@
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
- };