@devalok/shilp-sutra-karm 0.18.1 → 0.20.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.
- package/dist/_chunks/render-adjustment-type.js +50 -48
- package/dist/_chunks/sidebar-scratchpad.js +714 -326
- package/dist/_chunks/task-detail-panel.js +1638 -1175
- package/dist/_chunks/vendor.js +1154 -1123
- package/dist/dashboard/index.d.ts +20 -0
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/index.js +451 -5
- package/dist/dashboard/project-health-card.d.ts +22 -0
- package/dist/dashboard/project-health-card.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/index.d.ts +13 -0
- package/dist/dashboard/scratchpad/index.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-add-input.d.ts +11 -0
- package/dist/dashboard/scratchpad/scratchpad-add-input.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-collapse.d.ts +15 -0
- package/dist/dashboard/scratchpad/scratchpad-collapse.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-context.d.ts +44 -0
- package/dist/dashboard/scratchpad/scratchpad-context.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-empty-state.d.ts +13 -0
- package/dist/dashboard/scratchpad/scratchpad-empty-state.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-filter-toggle.d.ts +7 -0
- package/dist/dashboard/scratchpad/scratchpad-filter-toggle.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-header.d.ts +9 -0
- package/dist/dashboard/scratchpad/scratchpad-header.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-item.d.ts +13 -0
- package/dist/dashboard/scratchpad/scratchpad-item.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-list.d.ts +9 -0
- package/dist/dashboard/scratchpad/scratchpad-list.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-progress-ring.d.ts +11 -0
- package/dist/dashboard/scratchpad/scratchpad-progress-ring.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-root.d.ts +8 -0
- package/dist/dashboard/scratchpad/scratchpad-root.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad.d.ts +29 -0
- package/dist/dashboard/scratchpad/scratchpad.d.ts.map +1 -0
- package/dist/dashboard/scratchpad-widget.d.ts +5 -5
- package/dist/dashboard/scratchpad-widget.d.ts.map +1 -1
- package/dist/dashboard/sidebar-scratchpad.d.ts +8 -1
- package/dist/dashboard/sidebar-scratchpad.d.ts.map +1 -1
- package/dist/dashboard/week-heatmap/index.d.ts +10 -0
- package/dist/dashboard/week-heatmap/index.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-context.d.ts +31 -0
- package/dist/dashboard/week-heatmap/week-heatmap-context.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-day-strip.d.ts +7 -0
- package/dist/dashboard/week-heatmap/week-heatmap-day-strip.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-day.d.ts +15 -0
- package/dist/dashboard/week-heatmap/week-heatmap-day.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-progress-bar.d.ts +7 -0
- package/dist/dashboard/week-heatmap/week-heatmap-progress-bar.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-root.d.ts +8 -0
- package/dist/dashboard/week-heatmap/week-heatmap-root.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-streak.d.ts +7 -0
- package/dist/dashboard/week-heatmap/week-heatmap-streak.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-summary.d.ts +7 -0
- package/dist/dashboard/week-heatmap/week-heatmap-summary.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap.d.ts +33 -0
- package/dist/dashboard/week-heatmap/week-heatmap.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +57 -56
- package/dist/tasks/activity-tab.d.ts +2 -11
- package/dist/tasks/activity-tab.d.ts.map +1 -1
- package/dist/tasks/conversation-tab.d.ts +2 -21
- package/dist/tasks/conversation-tab.d.ts.map +1 -1
- package/dist/tasks/files-tab.d.ts +2 -18
- package/dist/tasks/files-tab.d.ts.map +1 -1
- package/dist/tasks/index.d.ts +13 -6
- package/dist/tasks/index.d.ts.map +1 -1
- package/dist/tasks/index.js +766 -8
- package/dist/tasks/pickers/index.d.ts +16 -0
- package/dist/tasks/pickers/index.d.ts.map +1 -0
- package/dist/tasks/pickers/task-assignee-picker.d.ts +14 -0
- package/dist/tasks/pickers/task-assignee-picker.d.ts.map +1 -0
- package/dist/tasks/pickers/task-column-picker.d.ts +13 -0
- package/dist/tasks/pickers/task-column-picker.d.ts.map +1 -0
- package/dist/tasks/pickers/task-date-picker.d.ts +12 -0
- package/dist/tasks/pickers/task-date-picker.d.ts.map +1 -0
- package/dist/tasks/pickers/task-label-editor.d.ts +13 -0
- package/dist/tasks/pickers/task-label-editor.d.ts.map +1 -0
- package/dist/tasks/pickers/task-member-picker.d.ts +14 -0
- package/dist/tasks/pickers/task-member-picker.d.ts.map +1 -0
- package/dist/tasks/pickers/task-priority-picker.d.ts +12 -0
- package/dist/tasks/pickers/task-priority-picker.d.ts.map +1 -0
- package/dist/tasks/pickers/task-visibility-picker.d.ts +13 -0
- package/dist/tasks/pickers/task-visibility-picker.d.ts.map +1 -0
- package/dist/tasks/review-tab.d.ts +4 -20
- package/dist/tasks/review-tab.d.ts.map +1 -1
- package/dist/tasks/subtasks-tab.d.ts +2 -18
- package/dist/tasks/subtasks-tab.d.ts.map +1 -1
- package/dist/tasks/tabs/activity-entry.d.ts +9 -0
- package/dist/tasks/tabs/activity-entry.d.ts.map +1 -0
- package/dist/tasks/tabs/activity-timeline.d.ts +8 -0
- package/dist/tasks/tabs/activity-timeline.d.ts.map +1 -0
- package/dist/tasks/tabs/file-drop-zone.d.ts +10 -0
- package/dist/tasks/tabs/file-drop-zone.d.ts.map +1 -0
- package/dist/tasks/tabs/file-item.d.ts +11 -0
- package/dist/tasks/tabs/file-item.d.ts.map +1 -0
- package/dist/tasks/tabs/file-list.d.ts +8 -0
- package/dist/tasks/tabs/file-list.d.ts.map +1 -0
- package/dist/tasks/tabs/index.d.ts +34 -0
- package/dist/tasks/tabs/index.d.ts.map +1 -0
- package/dist/tasks/tabs/message-bubble.d.ts +14 -0
- package/dist/tasks/tabs/message-bubble.d.ts.map +1 -0
- package/dist/tasks/tabs/message-input.d.ts +16 -0
- package/dist/tasks/tabs/message-input.d.ts.map +1 -0
- package/dist/tasks/tabs/message-list.d.ts +9 -0
- package/dist/tasks/tabs/message-list.d.ts.map +1 -0
- package/dist/tasks/tabs/review-card.d.ts +10 -0
- package/dist/tasks/tabs/review-card.d.ts.map +1 -0
- package/dist/tasks/tabs/review-request-button.d.ts +10 -0
- package/dist/tasks/tabs/review-request-button.d.ts.map +1 -0
- package/dist/tasks/tabs/review-response-form.d.ts +11 -0
- package/dist/tasks/tabs/review-response-form.d.ts.map +1 -0
- package/dist/tasks/tabs/subtask-add-form.d.ts +9 -0
- package/dist/tasks/tabs/subtask-add-form.d.ts.map +1 -0
- package/dist/tasks/tabs/subtask-item.d.ts +12 -0
- package/dist/tasks/tabs/subtask-item.d.ts.map +1 -0
- package/dist/tasks/tabs/subtask-list.d.ts +8 -0
- package/dist/tasks/tabs/subtask-list.d.ts.map +1 -0
- package/dist/tasks/tabs/subtask-progress.d.ts +9 -0
- package/dist/tasks/tabs/subtask-progress.d.ts.map +1 -0
- package/dist/tasks/tabs/visibility-warning.d.ts +7 -0
- package/dist/tasks/tabs/visibility-warning.d.ts.map +1 -0
- package/dist/tasks/task-action-row/index.d.ts +3 -0
- package/dist/tasks/task-action-row/index.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-checkbox.d.ts +8 -0
- package/dist/tasks/task-action-row/task-action-row-checkbox.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-context.d.ts +21 -0
- package/dist/tasks/task-action-row/task-action-row-context.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-due-date.d.ts +5 -0
- package/dist/tasks/task-action-row/task-action-row-due-date.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-labels.d.ts +8 -0
- package/dist/tasks/task-action-row/task-action-row-labels.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-navigate.d.ts +9 -0
- package/dist/tasks/task-action-row/task-action-row-navigate.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-priority.d.ts +5 -0
- package/dist/tasks/task-action-row/task-action-row-priority.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-project-badge.d.ts +8 -0
- package/dist/tasks/task-action-row/task-action-row-project-badge.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-root.d.ts +14 -0
- package/dist/tasks/task-action-row/task-action-row-root.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-status-badge.d.ts +5 -0
- package/dist/tasks/task-action-row/task-action-row-status-badge.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-title.d.ts +9 -0
- package/dist/tasks/task-action-row/task-action-row-title.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row.d.ts +48 -0
- package/dist/tasks/task-action-row/task-action-row.d.ts.map +1 -0
- package/dist/tasks/task-detail-panel.d.ts.map +1 -1
- package/dist/tasks/task-panel.d.ts +104 -0
- package/dist/tasks/task-panel.d.ts.map +1 -0
- package/dist/tasks/task-properties.d.ts +2 -12
- package/dist/tasks/task-properties.d.ts.map +1 -1
- package/dist/tasks/task-types.d.ts +104 -0
- package/dist/tasks/task-types.d.ts.map +1 -0
- package/docs/components/admin/admin-dashboard.md +6 -6
- package/docs/components/admin/admin-utils.md +2 -2
- package/docs/components/admin/break-admin.md +14 -14
- package/docs/components/board/board-provider.md +16 -0
- package/docs/components/board/column-empty.md +1 -1
- package/docs/components/board/task-card.md +4 -0
- package/docs/components/chat/streaming-text.md +1 -1
- package/docs/components/client/client-portal-header.md +2 -2
- package/docs/components/dashboard/attendance-cta.md +3 -3
- package/docs/components/dashboard/daily-brief.md +1 -1
- package/docs/components/dashboard/project-health-card.md +90 -0
- package/docs/components/dashboard/scratchpad-widget.md +17 -0
- package/docs/components/dashboard/scratchpad.md +151 -0
- package/docs/components/dashboard/sidebar-scratchpad.md +29 -5
- package/docs/components/dashboard/week-heatmap.md +95 -0
- package/docs/components/tasks/activity-tab.md +4 -0
- package/docs/components/tasks/conversation-tab.md +4 -0
- package/docs/components/tasks/files-tab.md +4 -0
- package/docs/components/tasks/review-tab.md +5 -1
- package/docs/components/tasks/subtasks-tab.md +5 -0
- package/docs/components/tasks/task-action-row.md +159 -0
- package/docs/components/tasks/task-assignee-picker.md +36 -0
- package/docs/components/tasks/task-column-picker.md +37 -0
- package/docs/components/tasks/task-date-picker.md +49 -0
- package/docs/components/tasks/task-detail-panel.md +256 -84
- package/docs/components/tasks/task-label-editor.md +42 -0
- package/docs/components/tasks/task-member-picker.md +35 -0
- package/docs/components/tasks/task-panel.md +89 -0
- package/docs/components/tasks/task-priority-picker.md +37 -0
- package/docs/components/tasks/task-properties.md +5 -0
- package/docs/components/tasks/task-visibility-picker.md +38 -0
- package/llms.txt +40 -13
- package/package.json +1 -1
package/dist/tasks/index.js
CHANGED
|
@@ -1,11 +1,769 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as e, jsxs as c, Fragment as E } from "react/jsx-runtime";
|
|
3
|
+
import * as i from "react";
|
|
4
|
+
import { cn as p } from "@devalok/shilp-sutra/ui/lib/utils";
|
|
5
|
+
import { Tabs as J, TabsList as ee, TabsTrigger as se, TabsContent as te } from "@devalok/shilp-sutra/ui";
|
|
6
|
+
import { Skeleton as v } from "@devalok/shilp-sutra/ui/skeleton";
|
|
7
|
+
import { P as ae } from "../_chunks/task-detail-panel.js";
|
|
8
|
+
import { c as We, A as qe, d as ze, C as Qe, e as Ue, f as Xe, g as Ze, F as Je, M as es, h as ss, i as ts, j as as, k as rs, l as ns, R as cs, m as is, n as ls, o as os, p as ds, S as us, T as fs, a as ms, b as ps, V as gs } from "../_chunks/task-detail-panel.js";
|
|
9
|
+
import { Avatar as M, AvatarImage as O, AvatarFallback as A } from "@devalok/shilp-sutra/ui/avatar";
|
|
10
|
+
import { MemberPicker as _ } from "@devalok/shilp-sutra/composed/member-picker";
|
|
11
|
+
import { getInitials as L } from "@devalok/shilp-sutra/composed/lib/string-utils";
|
|
12
|
+
import { IconChevronDown as F, IconCheck as V, IconArrowDown as re, IconMinus as ne, IconArrowUp as ce, IconAlertTriangleFilled as ie, IconX as B, IconPlus as j, IconCalendarEvent as le, IconLock as oe, IconWorld as de } from "@tabler/icons-react";
|
|
13
|
+
import { Popover as T, PopoverTrigger as P, PopoverContent as C } from "@devalok/shilp-sutra/ui/popover";
|
|
14
|
+
import { Dialog as ue, DialogContent as fe, DialogHeader as me, DialogTitle as pe, DialogDescription as ge, DialogFooter as he, DialogClose as be } from "@devalok/shilp-sutra/ui/dialog";
|
|
15
|
+
import { Button as Y } from "@devalok/shilp-sutra/ui/button";
|
|
16
|
+
function H(r) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
H.displayName = "TaskPanelTab";
|
|
20
|
+
const xe = H;
|
|
21
|
+
function K({ children: r, className: s }) {
|
|
22
|
+
return /* @__PURE__ */ e("div", { className: p("flex flex-col overflow-hidden h-full", s), children: r });
|
|
23
|
+
}
|
|
24
|
+
K.displayName = "TaskPanelRoot";
|
|
25
|
+
function $({ children: r, className: s }) {
|
|
26
|
+
return /* @__PURE__ */ e(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
className: p(
|
|
30
|
+
"shrink-0 border-b border-surface-border-strong px-ds-06 pb-ds-05 pt-ds-06",
|
|
31
|
+
s
|
|
32
|
+
),
|
|
33
|
+
children: r
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
$.displayName = "TaskPanelHeader";
|
|
38
|
+
function G({
|
|
39
|
+
value: r,
|
|
40
|
+
editable: s = !1,
|
|
41
|
+
onUpdate: n,
|
|
42
|
+
subtask: l = !1,
|
|
43
|
+
className: f
|
|
44
|
+
}) {
|
|
45
|
+
const [u, h] = i.useState(!1), [o, t] = i.useState(r), m = i.useRef(null);
|
|
46
|
+
i.useEffect(() => {
|
|
47
|
+
u || t(r);
|
|
48
|
+
}, [r, u]), i.useEffect(() => {
|
|
49
|
+
u && m.current && (m.current.focus(), m.current.select());
|
|
50
|
+
}, [u]);
|
|
51
|
+
const g = () => {
|
|
52
|
+
h(!1);
|
|
53
|
+
const x = o.trim();
|
|
54
|
+
x && x !== r ? n == null || n(x) : t(r);
|
|
55
|
+
};
|
|
56
|
+
return /* @__PURE__ */ c("div", { className: f, children: [
|
|
57
|
+
l && /* @__PURE__ */ e("p", { className: "text-ds-xs text-surface-fg-subtle uppercase tracking-wide mb-ds-01", children: "Subtask" }),
|
|
58
|
+
s && u ? /* @__PURE__ */ e(
|
|
59
|
+
"input",
|
|
60
|
+
{
|
|
61
|
+
ref: m,
|
|
62
|
+
type: "text",
|
|
63
|
+
value: o,
|
|
64
|
+
onChange: (x) => t(x.target.value),
|
|
65
|
+
onBlur: g,
|
|
66
|
+
onKeyDown: (x) => {
|
|
67
|
+
x.key === "Enter" && (x.preventDefault(), g()), x.key === "Escape" && (h(!1), t(r));
|
|
68
|
+
},
|
|
69
|
+
className: "w-full bg-transparent text-ds-lg font-semibold text-surface-fg outline-none"
|
|
70
|
+
}
|
|
71
|
+
) : s ? /* @__PURE__ */ e(
|
|
72
|
+
"button",
|
|
73
|
+
{
|
|
74
|
+
type: "button",
|
|
75
|
+
onClick: () => {
|
|
76
|
+
s && h(!0);
|
|
77
|
+
},
|
|
78
|
+
className: "w-full cursor-text text-left text-ds-lg font-semibold text-surface-fg transition-colors hover:text-accent-11",
|
|
79
|
+
children: r
|
|
80
|
+
}
|
|
81
|
+
) : /* @__PURE__ */ e("h2", { className: "text-ds-lg font-semibold text-surface-fg", children: r })
|
|
82
|
+
] });
|
|
83
|
+
}
|
|
84
|
+
G.displayName = "TaskPanelTitle";
|
|
85
|
+
function W({ children: r, className: s }) {
|
|
86
|
+
return /* @__PURE__ */ e(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
className: p(
|
|
90
|
+
"border-b border-surface-border-strong px-ds-06 py-ds-05 space-y-0",
|
|
91
|
+
s
|
|
92
|
+
),
|
|
93
|
+
children: r
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
W.displayName = "TaskPanelProperties";
|
|
98
|
+
function q({ icon: r, label: s, children: n, className: l }) {
|
|
99
|
+
return /* @__PURE__ */ c("div", { className: p("flex items-center gap-ds-04 py-ds-03", l), children: [
|
|
100
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-ds-03 w-[120px] shrink-0 text-ds-sm text-surface-fg-muted [&>svg]:h-ico-sm [&>svg]:w-ico-sm", children: [
|
|
101
|
+
r,
|
|
102
|
+
/* @__PURE__ */ e("span", { children: s })
|
|
103
|
+
] }),
|
|
104
|
+
/* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: n })
|
|
105
|
+
] });
|
|
106
|
+
}
|
|
107
|
+
q.displayName = "TaskPanelProperty";
|
|
108
|
+
function z({
|
|
109
|
+
defaultTab: r,
|
|
110
|
+
onTabChange: s,
|
|
111
|
+
children: n,
|
|
112
|
+
className: l
|
|
113
|
+
}) {
|
|
114
|
+
const [f, u] = i.useState(r), h = i.useCallback(
|
|
115
|
+
(t) => {
|
|
116
|
+
u(t), s == null || s(t);
|
|
117
|
+
},
|
|
118
|
+
[s]
|
|
119
|
+
), o = [];
|
|
120
|
+
return i.Children.toArray(n).forEach((t) => {
|
|
121
|
+
i.isValidElement(t) && t.type === xe && o.push(t.props);
|
|
122
|
+
}), /* @__PURE__ */ c(
|
|
123
|
+
J,
|
|
124
|
+
{
|
|
125
|
+
value: f,
|
|
126
|
+
onValueChange: h,
|
|
127
|
+
className: p("flex flex-col flex-1 min-h-0", l),
|
|
128
|
+
children: [
|
|
129
|
+
/* @__PURE__ */ e("div", { className: "sticky top-0 bg-surface-2 z-raised px-ds-06", children: /* @__PURE__ */ e(ee, { variant: "line", children: o.map((t) => /* @__PURE__ */ c(se, { value: t.id, children: [
|
|
130
|
+
t.icon && /* @__PURE__ */ e("span", { className: "[&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:stroke-[1.5] shrink-0", children: t.icon }),
|
|
131
|
+
t.label
|
|
132
|
+
] }, t.id)) }) }),
|
|
133
|
+
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-ds-06 py-ds-05", children: o.map((t) => /* @__PURE__ */ e(te, { value: t.id, className: "mt-0", children: t.children }, t.id)) })
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
z.displayName = "TaskPanelTabs";
|
|
139
|
+
function Q({ className: r }) {
|
|
140
|
+
return /* @__PURE__ */ c("div", { className: p("space-y-ds-06 p-ds-06", r), children: [
|
|
141
|
+
/* @__PURE__ */ e(v, { className: "h-ds-xs-plus w-3/4 bg-surface-3" }),
|
|
142
|
+
/* @__PURE__ */ e("div", { className: "space-y-ds-04", children: Array.from({ length: 6 }).map((s, n) => /* @__PURE__ */ c("div", { className: "flex items-center gap-ds-04", children: [
|
|
143
|
+
/* @__PURE__ */ e(v, { className: "h-[16px] w-[120px] bg-surface-3" }),
|
|
144
|
+
/* @__PURE__ */ e(v, { className: "h-[16px] flex-1 bg-surface-3" })
|
|
145
|
+
] }, n)) }),
|
|
146
|
+
/* @__PURE__ */ e("div", { className: "flex gap-ds-05 border-b border-surface-border-strong pb-ds-03", children: Array.from({ length: 5 }).map((s, n) => /* @__PURE__ */ e(v, { className: "h-[12px] w-[64px] bg-surface-3" }, n)) }),
|
|
147
|
+
/* @__PURE__ */ c("div", { className: "space-y-ds-04", children: [
|
|
148
|
+
/* @__PURE__ */ e(v, { className: "h-ds-md w-full bg-surface-3" }),
|
|
149
|
+
/* @__PURE__ */ e(v, { className: "h-ds-md w-full bg-surface-3" }),
|
|
150
|
+
/* @__PURE__ */ e(v, { className: "h-ds-md w-4/5 bg-surface-3" })
|
|
151
|
+
] })
|
|
152
|
+
] });
|
|
153
|
+
}
|
|
154
|
+
Q.displayName = "TaskPanelLoading";
|
|
155
|
+
const Ke = Object.assign(K, {
|
|
156
|
+
Header: $,
|
|
157
|
+
Title: G,
|
|
158
|
+
Properties: W,
|
|
159
|
+
Property: q,
|
|
160
|
+
Tabs: z,
|
|
161
|
+
Tab: H,
|
|
162
|
+
Loading: Q
|
|
163
|
+
}), Ne = i.forwardRef(
|
|
164
|
+
function({ columns: s, value: n, onChange: l, readOnly: f, className: u }, h) {
|
|
165
|
+
const [o, t] = i.useState(!1), m = s.find((a) => a.id === n), g = (m == null ? void 0 : m.name) ?? "Select column";
|
|
166
|
+
return f ? /* @__PURE__ */ e("span", { className: p("px-ds-03 py-ds-02 text-ds-md text-surface-fg", u), children: g }) : /* @__PURE__ */ c(T, { open: o, onOpenChange: t, children: [
|
|
167
|
+
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ c(
|
|
168
|
+
"button",
|
|
169
|
+
{
|
|
170
|
+
ref: h,
|
|
171
|
+
type: "button",
|
|
172
|
+
className: p(
|
|
173
|
+
"inline-flex items-center gap-ds-02b rounded-ds-md px-ds-03 py-ds-02 text-ds-md text-surface-fg transition-colors hover:bg-surface-3",
|
|
174
|
+
u
|
|
175
|
+
),
|
|
176
|
+
children: [
|
|
177
|
+
/* @__PURE__ */ e("span", { children: g }),
|
|
178
|
+
/* @__PURE__ */ e(F, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
) }),
|
|
182
|
+
/* @__PURE__ */ e(
|
|
183
|
+
C,
|
|
184
|
+
{
|
|
185
|
+
className: "w-[180px] border-surface-border-strong bg-surface-1 p-ds-02",
|
|
186
|
+
align: "start",
|
|
187
|
+
sideOffset: 4,
|
|
188
|
+
children: s.map((a) => /* @__PURE__ */ c(
|
|
189
|
+
"button",
|
|
190
|
+
{
|
|
191
|
+
type: "button",
|
|
192
|
+
onClick: () => {
|
|
193
|
+
l(a.id), t(!1);
|
|
194
|
+
},
|
|
195
|
+
className: p(
|
|
196
|
+
"flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-left text-ds-md transition-colors",
|
|
197
|
+
"hover:bg-surface-3",
|
|
198
|
+
a.id === n ? "text-accent-11" : "text-surface-fg"
|
|
199
|
+
),
|
|
200
|
+
children: [
|
|
201
|
+
a.name,
|
|
202
|
+
a.id === n && /* @__PURE__ */ e(V, { className: "ml-auto h-ico-sm w-ico-sm" })
|
|
203
|
+
]
|
|
204
|
+
},
|
|
205
|
+
a.id
|
|
206
|
+
))
|
|
207
|
+
}
|
|
208
|
+
)
|
|
209
|
+
] });
|
|
210
|
+
}
|
|
211
|
+
);
|
|
212
|
+
Ne.displayName = "TaskColumnPicker";
|
|
213
|
+
const ye = {
|
|
214
|
+
URGENT: { icon: ie, className: "text-error-9" },
|
|
215
|
+
HIGH: { icon: ce, className: "text-warning-9" },
|
|
216
|
+
MEDIUM: { icon: ne, className: "text-surface-fg-muted" },
|
|
217
|
+
LOW: { icon: re, className: "text-surface-fg-subtle" }
|
|
218
|
+
}, ke = ["URGENT", "HIGH", "MEDIUM", "LOW"];
|
|
219
|
+
function I({ priority: r }) {
|
|
220
|
+
const s = ye[r], n = s.icon;
|
|
221
|
+
return /* @__PURE__ */ c("div", { className: "flex items-center gap-ds-02b", children: [
|
|
222
|
+
/* @__PURE__ */ e(n, { className: p("h-ico-sm w-ico-sm", s.className) }),
|
|
223
|
+
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg", children: ae[r] ?? r })
|
|
224
|
+
] });
|
|
225
|
+
}
|
|
226
|
+
const we = i.forwardRef(
|
|
227
|
+
function({ value: s, onChange: n, readOnly: l, className: f }, u) {
|
|
228
|
+
const [h, o] = i.useState(!1);
|
|
229
|
+
return l ? /* @__PURE__ */ e("div", { className: p("px-ds-03 py-ds-02", f), children: /* @__PURE__ */ e(I, { priority: s }) }) : /* @__PURE__ */ c(T, { open: h, onOpenChange: o, children: [
|
|
230
|
+
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ c(
|
|
231
|
+
"button",
|
|
232
|
+
{
|
|
233
|
+
ref: u,
|
|
234
|
+
type: "button",
|
|
235
|
+
className: p(
|
|
236
|
+
"inline-flex items-center gap-ds-02b rounded-ds-md px-ds-03 py-ds-02 transition-colors hover:bg-surface-3",
|
|
237
|
+
f
|
|
238
|
+
),
|
|
239
|
+
children: [
|
|
240
|
+
/* @__PURE__ */ e(I, { priority: s }),
|
|
241
|
+
/* @__PURE__ */ e(F, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
242
|
+
]
|
|
243
|
+
}
|
|
244
|
+
) }),
|
|
245
|
+
/* @__PURE__ */ e(
|
|
246
|
+
C,
|
|
247
|
+
{
|
|
248
|
+
className: "w-[180px] border-surface-border-strong bg-surface-1 p-ds-02",
|
|
249
|
+
align: "start",
|
|
250
|
+
sideOffset: 4,
|
|
251
|
+
children: ke.map((t) => /* @__PURE__ */ c(
|
|
252
|
+
"button",
|
|
253
|
+
{
|
|
254
|
+
type: "button",
|
|
255
|
+
onClick: () => {
|
|
256
|
+
n(t), o(!1);
|
|
257
|
+
},
|
|
258
|
+
className: p(
|
|
259
|
+
"flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b transition-colors",
|
|
260
|
+
"hover:bg-surface-3",
|
|
261
|
+
t === s && "bg-surface-3"
|
|
262
|
+
),
|
|
263
|
+
children: [
|
|
264
|
+
/* @__PURE__ */ e(I, { priority: t }),
|
|
265
|
+
t === s && /* @__PURE__ */ e(V, { className: "ml-auto h-ico-sm w-ico-sm text-accent-11" })
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
t
|
|
269
|
+
))
|
|
270
|
+
}
|
|
271
|
+
)
|
|
272
|
+
] });
|
|
273
|
+
}
|
|
274
|
+
);
|
|
275
|
+
we.displayName = "TaskPriorityPicker";
|
|
276
|
+
const ve = i.forwardRef(
|
|
277
|
+
function({ members: s, value: n, onChange: l, placeholder: f = "No owner", readOnly: u, className: h }, o) {
|
|
278
|
+
const t = s.find((a) => a.id === n) ?? null, m = i.useMemo(
|
|
279
|
+
() => s.map((a) => ({ id: a.id, name: a.name, avatar: a.image ?? void 0 })),
|
|
280
|
+
[s]
|
|
281
|
+
), g = i.useCallback(
|
|
282
|
+
(a) => {
|
|
283
|
+
l(a === n ? null : a);
|
|
284
|
+
},
|
|
285
|
+
[l, n]
|
|
286
|
+
);
|
|
287
|
+
return u ? /* @__PURE__ */ e("div", { className: p("inline-flex items-center gap-ds-03 px-ds-03 py-ds-02", h), children: t ? /* @__PURE__ */ c(E, { children: [
|
|
288
|
+
/* @__PURE__ */ c(M, { className: "h-ico-md w-ico-md", children: [
|
|
289
|
+
t.image && /* @__PURE__ */ e(O, { src: t.image, alt: t.name }),
|
|
290
|
+
/* @__PURE__ */ e(A, { className: "bg-surface-3 text-ds-xs font-semibold text-accent-fg", children: L(t.name) })
|
|
291
|
+
] }),
|
|
292
|
+
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg", children: t.name })
|
|
293
|
+
] }) : /* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-subtle", children: f }) }) : /* @__PURE__ */ e(
|
|
294
|
+
_,
|
|
295
|
+
{
|
|
296
|
+
members: m,
|
|
297
|
+
selectedIds: n ? [n] : [],
|
|
298
|
+
onSelect: g,
|
|
299
|
+
children: /* @__PURE__ */ e(
|
|
300
|
+
"button",
|
|
301
|
+
{
|
|
302
|
+
ref: o,
|
|
303
|
+
type: "button",
|
|
304
|
+
className: p(
|
|
305
|
+
"inline-flex items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02 transition-colors hover:bg-surface-3",
|
|
306
|
+
h
|
|
307
|
+
),
|
|
308
|
+
children: t ? /* @__PURE__ */ c(E, { children: [
|
|
309
|
+
/* @__PURE__ */ c(M, { className: "h-ico-md w-ico-md", children: [
|
|
310
|
+
t.image && /* @__PURE__ */ e(O, { src: t.image, alt: t.name }),
|
|
311
|
+
/* @__PURE__ */ e(A, { className: "bg-surface-3 text-ds-xs font-semibold text-accent-fg", children: L(t.name) })
|
|
312
|
+
] }),
|
|
313
|
+
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg", children: t.name })
|
|
314
|
+
] }) : /* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-subtle", children: f })
|
|
315
|
+
}
|
|
316
|
+
)
|
|
317
|
+
}
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
);
|
|
321
|
+
ve.displayName = "TaskMemberPicker";
|
|
322
|
+
const Te = i.forwardRef(
|
|
323
|
+
function({ members: s, value: n, onAssign: l, onUnassign: f, readOnly: u, className: h }, o) {
|
|
324
|
+
const t = n.map((a) => a.id), m = i.useMemo(
|
|
325
|
+
() => s.map((a) => ({ id: a.id, name: a.name, avatar: a.image ?? void 0 })),
|
|
326
|
+
[s]
|
|
327
|
+
), g = i.useCallback(
|
|
328
|
+
(a) => {
|
|
329
|
+
t.includes(a) ? f(a) : l(a);
|
|
330
|
+
},
|
|
331
|
+
[t, l, f]
|
|
332
|
+
);
|
|
333
|
+
return /* @__PURE__ */ c("div", { ref: o, className: p("flex flex-wrap items-center gap-ds-02b", h), children: [
|
|
334
|
+
n.map((a) => /* @__PURE__ */ c(
|
|
335
|
+
"div",
|
|
336
|
+
{
|
|
337
|
+
className: "inline-flex items-center gap-ds-02 rounded-ds-full bg-surface-2 py-ds-01 pl-ds-01 pr-ds-03",
|
|
338
|
+
children: [
|
|
339
|
+
/* @__PURE__ */ c(M, { className: "h-ico-sm w-ico-sm", children: [
|
|
340
|
+
a.image && /* @__PURE__ */ e(O, { src: a.image, alt: a.name }),
|
|
341
|
+
/* @__PURE__ */ e(A, { className: "bg-surface-3 text-ds-xs font-semibold text-accent-fg", children: L(a.name) })
|
|
342
|
+
] }),
|
|
343
|
+
/* @__PURE__ */ e("span", { className: "text-ds-sm text-surface-fg-muted", children: a.name.split(" ")[0] }),
|
|
344
|
+
!u && /* @__PURE__ */ e(
|
|
345
|
+
"button",
|
|
346
|
+
{
|
|
347
|
+
type: "button",
|
|
348
|
+
onClick: () => f(a.id),
|
|
349
|
+
className: "ml-ds-01 rounded-ds-full p-ds-01 transition-colors hover:bg-surface-3",
|
|
350
|
+
"aria-label": `Remove ${a.name}`,
|
|
351
|
+
children: /* @__PURE__ */ e(B, { className: "h-ds-03 w-ds-03 text-surface-fg-subtle" })
|
|
352
|
+
}
|
|
353
|
+
)
|
|
354
|
+
]
|
|
355
|
+
},
|
|
356
|
+
a.id
|
|
357
|
+
)),
|
|
358
|
+
!u && /* @__PURE__ */ e(
|
|
359
|
+
_,
|
|
360
|
+
{
|
|
361
|
+
members: m,
|
|
362
|
+
selectedIds: t,
|
|
363
|
+
onSelect: g,
|
|
364
|
+
multiple: !0,
|
|
365
|
+
children: /* @__PURE__ */ e(
|
|
366
|
+
"button",
|
|
367
|
+
{
|
|
368
|
+
type: "button",
|
|
369
|
+
className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded-ds-full border border-dashed border-surface-border transition-colors hover:bg-surface-3 hover:border-surface-border",
|
|
370
|
+
"aria-label": "Add assignee",
|
|
371
|
+
children: /* @__PURE__ */ e(j, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
372
|
+
}
|
|
373
|
+
)
|
|
374
|
+
}
|
|
375
|
+
),
|
|
376
|
+
u && n.length === 0 && /* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-subtle", children: "None" })
|
|
377
|
+
] });
|
|
378
|
+
}
|
|
379
|
+
);
|
|
380
|
+
Te.displayName = "TaskAssigneePicker";
|
|
381
|
+
function Pe(r) {
|
|
382
|
+
return r.toLocaleDateString("en-US", {
|
|
383
|
+
month: "short",
|
|
384
|
+
day: "numeric",
|
|
385
|
+
year: "numeric"
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
function Ce(r) {
|
|
389
|
+
const s = r.getFullYear(), n = String(r.getMonth() + 1).padStart(2, "0"), l = String(r.getDate()).padStart(2, "0");
|
|
390
|
+
return `${s}-${n}-${l}`;
|
|
391
|
+
}
|
|
392
|
+
function De() {
|
|
393
|
+
const r = /* @__PURE__ */ new Date(), s = r.getDay(), n = s === 0 ? 1 : 8 - s, l = new Date(r);
|
|
394
|
+
return l.setDate(r.getDate() + n), l;
|
|
395
|
+
}
|
|
396
|
+
function R(r) {
|
|
397
|
+
const s = /* @__PURE__ */ new Date();
|
|
398
|
+
return s.setDate(s.getDate() + r), s;
|
|
399
|
+
}
|
|
400
|
+
const Ie = i.forwardRef(
|
|
401
|
+
function({ value: s, onChange: n, presets: l = !0, readOnly: f, className: u }, h) {
|
|
402
|
+
const [o, t] = i.useState(!1), m = i.useMemo(() => s ? s instanceof Date ? s : new Date(s) : null, [s]), g = m ? Pe(m) : "No date", a = (y) => {
|
|
403
|
+
n(y), t(!1);
|
|
404
|
+
}, k = (y) => {
|
|
405
|
+
n(y.target.value ? new Date(y.target.value) : null);
|
|
406
|
+
}, x = (y) => {
|
|
407
|
+
y.stopPropagation(), n(null);
|
|
408
|
+
};
|
|
409
|
+
return f ? /* @__PURE__ */ e("span", { className: p("px-ds-03 py-ds-02 text-ds-md text-surface-fg", u), children: g }) : /* @__PURE__ */ c("div", { className: p("inline-flex items-center gap-ds-02", u), children: [
|
|
410
|
+
/* @__PURE__ */ c(T, { open: o, onOpenChange: t, children: [
|
|
411
|
+
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ c(
|
|
412
|
+
"button",
|
|
413
|
+
{
|
|
414
|
+
ref: h,
|
|
415
|
+
type: "button",
|
|
416
|
+
className: "inline-flex items-center gap-ds-02b rounded-ds-md px-ds-03 py-ds-02 text-ds-md transition-colors hover:bg-surface-3",
|
|
417
|
+
children: [
|
|
418
|
+
/* @__PURE__ */ e(le, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle", stroke: 1.5 }),
|
|
419
|
+
/* @__PURE__ */ e("span", { className: m ? "text-surface-fg" : "text-surface-fg-subtle", children: g })
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
) }),
|
|
423
|
+
/* @__PURE__ */ e(
|
|
424
|
+
C,
|
|
425
|
+
{
|
|
426
|
+
className: "w-[220px] border-surface-border-strong bg-surface-1 p-ds-03",
|
|
427
|
+
align: "start",
|
|
428
|
+
sideOffset: 4,
|
|
429
|
+
children: /* @__PURE__ */ c("div", { className: "space-y-ds-03", children: [
|
|
430
|
+
/* @__PURE__ */ e(
|
|
431
|
+
"input",
|
|
432
|
+
{
|
|
433
|
+
type: "date",
|
|
434
|
+
value: m ? Ce(m) : "",
|
|
435
|
+
onChange: k,
|
|
436
|
+
"aria-label": "Select date",
|
|
437
|
+
className: "w-full rounded-ds-md border border-surface-border-strong bg-transparent px-ds-03 py-ds-02 text-ds-md text-surface-fg outline-none focus:border-accent-7"
|
|
438
|
+
}
|
|
439
|
+
),
|
|
440
|
+
l && /* @__PURE__ */ c("div", { className: "space-y-ds-01", children: [
|
|
441
|
+
/* @__PURE__ */ e("p", { className: "text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle", children: "Quick select" }),
|
|
442
|
+
/* @__PURE__ */ c("div", { className: "grid grid-cols-2 gap-ds-02", children: [
|
|
443
|
+
/* @__PURE__ */ e(
|
|
444
|
+
"button",
|
|
445
|
+
{
|
|
446
|
+
type: "button",
|
|
447
|
+
onClick: () => a(/* @__PURE__ */ new Date()),
|
|
448
|
+
className: "rounded-ds-md px-ds-03 py-ds-02 text-left text-ds-sm text-surface-fg transition-colors hover:bg-surface-3",
|
|
449
|
+
children: "Today"
|
|
450
|
+
}
|
|
451
|
+
),
|
|
452
|
+
/* @__PURE__ */ e(
|
|
453
|
+
"button",
|
|
454
|
+
{
|
|
455
|
+
type: "button",
|
|
456
|
+
onClick: () => a(R(1)),
|
|
457
|
+
className: "rounded-ds-md px-ds-03 py-ds-02 text-left text-ds-sm text-surface-fg transition-colors hover:bg-surface-3",
|
|
458
|
+
children: "Tomorrow"
|
|
459
|
+
}
|
|
460
|
+
),
|
|
461
|
+
/* @__PURE__ */ e(
|
|
462
|
+
"button",
|
|
463
|
+
{
|
|
464
|
+
type: "button",
|
|
465
|
+
onClick: () => a(De()),
|
|
466
|
+
className: "rounded-ds-md px-ds-03 py-ds-02 text-left text-ds-sm text-surface-fg transition-colors hover:bg-surface-3",
|
|
467
|
+
children: "Next Monday"
|
|
468
|
+
}
|
|
469
|
+
),
|
|
470
|
+
/* @__PURE__ */ e(
|
|
471
|
+
"button",
|
|
472
|
+
{
|
|
473
|
+
type: "button",
|
|
474
|
+
onClick: () => a(R(7)),
|
|
475
|
+
className: "rounded-ds-md px-ds-03 py-ds-02 text-left text-ds-sm text-surface-fg transition-colors hover:bg-surface-3",
|
|
476
|
+
children: "+7 days"
|
|
477
|
+
}
|
|
478
|
+
),
|
|
479
|
+
/* @__PURE__ */ e(
|
|
480
|
+
"button",
|
|
481
|
+
{
|
|
482
|
+
type: "button",
|
|
483
|
+
onClick: () => a(R(14)),
|
|
484
|
+
className: "rounded-ds-md px-ds-03 py-ds-02 text-left text-ds-sm text-surface-fg transition-colors hover:bg-surface-3",
|
|
485
|
+
children: "+14 days"
|
|
486
|
+
}
|
|
487
|
+
),
|
|
488
|
+
/* @__PURE__ */ e(
|
|
489
|
+
"button",
|
|
490
|
+
{
|
|
491
|
+
type: "button",
|
|
492
|
+
onClick: () => a(null),
|
|
493
|
+
className: "rounded-ds-md px-ds-03 py-ds-02 text-left text-ds-sm text-surface-fg-subtle transition-colors hover:bg-surface-3",
|
|
494
|
+
children: "Clear"
|
|
495
|
+
}
|
|
496
|
+
)
|
|
497
|
+
] })
|
|
498
|
+
] })
|
|
499
|
+
] })
|
|
500
|
+
}
|
|
501
|
+
)
|
|
502
|
+
] }),
|
|
503
|
+
m && /* @__PURE__ */ e(
|
|
504
|
+
"button",
|
|
505
|
+
{
|
|
506
|
+
type: "button",
|
|
507
|
+
onClick: x,
|
|
508
|
+
className: "rounded-ds-md p-ds-02 transition-colors hover:bg-surface-3",
|
|
509
|
+
"aria-label": "Clear due date",
|
|
510
|
+
children: /* @__PURE__ */ e(B, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
511
|
+
}
|
|
512
|
+
)
|
|
513
|
+
] });
|
|
514
|
+
}
|
|
515
|
+
);
|
|
516
|
+
Ie.displayName = "TaskDatePicker";
|
|
517
|
+
const Re = i.forwardRef(
|
|
518
|
+
function({ value: s, onChange: n, availableLabels: l = [], readOnly: f, className: u }, h) {
|
|
519
|
+
const [o, t] = i.useState(""), [m, g] = i.useState(!1), [a, k] = i.useState(!1), x = i.useRef(null), y = i.useRef(!1), N = i.useMemo(() => {
|
|
520
|
+
const d = /* @__PURE__ */ new Map();
|
|
521
|
+
for (const b of l)
|
|
522
|
+
d.set(b.name, b.color);
|
|
523
|
+
return d;
|
|
524
|
+
}, [l]), w = i.useMemo(() => {
|
|
525
|
+
if (!o.trim()) return [];
|
|
526
|
+
const d = o.toLowerCase();
|
|
527
|
+
return l.filter(
|
|
528
|
+
(b) => b.name.toLowerCase().includes(d) && !s.includes(b.name)
|
|
529
|
+
);
|
|
530
|
+
}, [o, l, s]), D = (d) => {
|
|
531
|
+
const b = d.trim();
|
|
532
|
+
b && !s.includes(b) && n([...s, b]), t(""), g(!1), k(!1);
|
|
533
|
+
}, U = (d) => {
|
|
534
|
+
n(s.filter((b) => b !== d));
|
|
535
|
+
}, X = (d) => {
|
|
536
|
+
d.key === "Enter" && (d.preventDefault(), w.length > 0 ? D(w[0].name) : D(o)), d.key === "Escape" && (g(!1), t(""), k(!1));
|
|
537
|
+
}, Z = (d) => {
|
|
538
|
+
t(d.target.value);
|
|
539
|
+
};
|
|
540
|
+
return i.useEffect(() => {
|
|
541
|
+
k(o.trim().length > 0 && w.length > 0);
|
|
542
|
+
}, [w, o]), /* @__PURE__ */ c("div", { ref: h, className: p("flex flex-wrap items-center gap-ds-02b", u), children: [
|
|
543
|
+
s.map((d) => {
|
|
544
|
+
const b = N.get(d);
|
|
545
|
+
return /* @__PURE__ */ c(
|
|
546
|
+
"span",
|
|
547
|
+
{
|
|
548
|
+
className: "inline-flex items-center gap-ds-02 rounded-ds-full bg-accent-2 px-ds-03 py-ds-01 text-ds-sm font-medium text-accent-11",
|
|
549
|
+
children: [
|
|
550
|
+
b && /* @__PURE__ */ e(
|
|
551
|
+
"span",
|
|
552
|
+
{
|
|
553
|
+
className: "h-2 w-2 shrink-0 rounded-ds-full",
|
|
554
|
+
style: { backgroundColor: b }
|
|
555
|
+
}
|
|
556
|
+
),
|
|
557
|
+
d,
|
|
558
|
+
!f && /* @__PURE__ */ e(
|
|
559
|
+
"button",
|
|
560
|
+
{
|
|
561
|
+
type: "button",
|
|
562
|
+
onClick: () => U(d),
|
|
563
|
+
className: "rounded-ds-full p-ds-01 transition-colors hover:bg-surface-3",
|
|
564
|
+
"aria-label": `Remove label ${d}`,
|
|
565
|
+
children: /* @__PURE__ */ e(B, { className: "h-ds-03 w-ds-03" })
|
|
566
|
+
}
|
|
567
|
+
)
|
|
568
|
+
]
|
|
569
|
+
},
|
|
570
|
+
d
|
|
571
|
+
);
|
|
572
|
+
}),
|
|
573
|
+
!f && (m ? /* @__PURE__ */ c(T, { open: a, onOpenChange: k, children: [
|
|
574
|
+
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "inline-flex items-center gap-ds-02", children: /* @__PURE__ */ e(
|
|
575
|
+
"input",
|
|
576
|
+
{
|
|
577
|
+
ref: x,
|
|
578
|
+
type: "text",
|
|
579
|
+
value: o,
|
|
580
|
+
onChange: Z,
|
|
581
|
+
onKeyDown: X,
|
|
582
|
+
onBlur: () => {
|
|
583
|
+
if (y.current) {
|
|
584
|
+
y.current = !1;
|
|
585
|
+
return;
|
|
586
|
+
}
|
|
587
|
+
o.trim() ? D(o) : (g(!1), k(!1));
|
|
588
|
+
},
|
|
589
|
+
placeholder: "Label name",
|
|
590
|
+
"aria-label": "New label name",
|
|
591
|
+
className: "h-5 w-24 rounded border border-surface-border-strong bg-transparent px-ds-02b text-ds-sm text-surface-fg outline-none placeholder:text-surface-fg-subtle focus:border-surface-border",
|
|
592
|
+
autoFocus: !0
|
|
593
|
+
}
|
|
594
|
+
) }) }),
|
|
595
|
+
w.length > 0 && /* @__PURE__ */ e(
|
|
596
|
+
C,
|
|
597
|
+
{
|
|
598
|
+
className: "w-[180px] border-surface-border-strong bg-surface-1 p-ds-02",
|
|
599
|
+
align: "start",
|
|
600
|
+
sideOffset: 4,
|
|
601
|
+
onOpenAutoFocus: (d) => d.preventDefault(),
|
|
602
|
+
children: w.map((d) => /* @__PURE__ */ c(
|
|
603
|
+
"button",
|
|
604
|
+
{
|
|
605
|
+
type: "button",
|
|
606
|
+
onMouseDown: (b) => {
|
|
607
|
+
b.preventDefault(), y.current = !0, D(d.name);
|
|
608
|
+
},
|
|
609
|
+
className: "flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-left text-ds-sm transition-colors hover:bg-surface-3",
|
|
610
|
+
children: [
|
|
611
|
+
d.color && /* @__PURE__ */ e(
|
|
612
|
+
"span",
|
|
613
|
+
{
|
|
614
|
+
className: "h-2 w-2 shrink-0 rounded-ds-full",
|
|
615
|
+
style: { backgroundColor: d.color }
|
|
616
|
+
}
|
|
617
|
+
),
|
|
618
|
+
/* @__PURE__ */ e("span", { className: "text-surface-fg", children: d.name })
|
|
619
|
+
]
|
|
620
|
+
},
|
|
621
|
+
d.name
|
|
622
|
+
))
|
|
623
|
+
}
|
|
624
|
+
)
|
|
625
|
+
] }) : /* @__PURE__ */ e(
|
|
626
|
+
"button",
|
|
627
|
+
{
|
|
628
|
+
type: "button",
|
|
629
|
+
onClick: () => g(!0),
|
|
630
|
+
className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded-ds-full border border-dashed border-surface-border transition-colors hover:bg-surface-3 hover:border-surface-border",
|
|
631
|
+
"aria-label": "Add label",
|
|
632
|
+
children: /* @__PURE__ */ e(j, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
633
|
+
}
|
|
634
|
+
)),
|
|
635
|
+
f && s.length === 0 && /* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-subtle", children: "None" })
|
|
636
|
+
] });
|
|
637
|
+
}
|
|
638
|
+
);
|
|
639
|
+
Re.displayName = "TaskLabelEditor";
|
|
640
|
+
const S = [
|
|
641
|
+
{
|
|
642
|
+
value: "INTERNAL",
|
|
643
|
+
icon: oe,
|
|
644
|
+
label: "Internal",
|
|
645
|
+
description: "Only team members"
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
value: "EVERYONE",
|
|
649
|
+
icon: de,
|
|
650
|
+
label: "Everyone",
|
|
651
|
+
description: "Visible to clients"
|
|
652
|
+
}
|
|
653
|
+
], Se = i.forwardRef(
|
|
654
|
+
function({ value: s, onChange: n, confirmOnPublic: l, readOnly: f, className: u }, h) {
|
|
655
|
+
const [o, t] = i.useState(!1), [m, g] = i.useState(!1), a = S.find((N) => N.value === s) ?? S[0], k = a.icon, x = (N) => {
|
|
656
|
+
if (N === s) {
|
|
657
|
+
t(!1);
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
660
|
+
if (N === "EVERYONE" && l) {
|
|
661
|
+
t(!1), g(!0);
|
|
662
|
+
return;
|
|
663
|
+
}
|
|
664
|
+
n(N), t(!1);
|
|
665
|
+
}, y = () => {
|
|
666
|
+
n("EVERYONE"), g(!1);
|
|
667
|
+
};
|
|
668
|
+
return f ? /* @__PURE__ */ c("div", { className: p("inline-flex items-center gap-ds-02b px-ds-03 py-ds-02 text-ds-md text-surface-fg", u), children: [
|
|
669
|
+
/* @__PURE__ */ e(k, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
|
|
670
|
+
/* @__PURE__ */ e("span", { children: a.label })
|
|
671
|
+
] }) : /* @__PURE__ */ c(E, { children: [
|
|
672
|
+
/* @__PURE__ */ c(T, { open: o, onOpenChange: t, children: [
|
|
673
|
+
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ c(
|
|
674
|
+
"button",
|
|
675
|
+
{
|
|
676
|
+
ref: h,
|
|
677
|
+
type: "button",
|
|
678
|
+
className: p(
|
|
679
|
+
"inline-flex items-center gap-ds-02b rounded-ds-md px-ds-03 py-ds-02 text-ds-md text-surface-fg transition-colors hover:bg-surface-3",
|
|
680
|
+
u
|
|
681
|
+
),
|
|
682
|
+
children: [
|
|
683
|
+
/* @__PURE__ */ e(k, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
|
|
684
|
+
/* @__PURE__ */ e("span", { children: a.label }),
|
|
685
|
+
/* @__PURE__ */ e(F, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
686
|
+
]
|
|
687
|
+
}
|
|
688
|
+
) }),
|
|
689
|
+
/* @__PURE__ */ e(
|
|
690
|
+
C,
|
|
691
|
+
{
|
|
692
|
+
className: "w-[220px] border-surface-border-strong bg-surface-1 p-ds-02",
|
|
693
|
+
align: "start",
|
|
694
|
+
sideOffset: 4,
|
|
695
|
+
children: S.map((N) => {
|
|
696
|
+
const w = N.icon;
|
|
697
|
+
return /* @__PURE__ */ c(
|
|
698
|
+
"button",
|
|
699
|
+
{
|
|
700
|
+
type: "button",
|
|
701
|
+
onClick: () => x(N.value),
|
|
702
|
+
className: p(
|
|
703
|
+
"flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-left transition-colors",
|
|
704
|
+
"hover:bg-surface-3",
|
|
705
|
+
N.value === s && "bg-surface-3"
|
|
706
|
+
),
|
|
707
|
+
children: [
|
|
708
|
+
/* @__PURE__ */ e(w, { className: "h-ico-sm w-ico-sm shrink-0 text-surface-fg-muted", stroke: 1.5 }),
|
|
709
|
+
/* @__PURE__ */ c("div", { className: "flex-1 min-w-0", children: [
|
|
710
|
+
/* @__PURE__ */ e("div", { className: "text-ds-md text-surface-fg", children: N.label }),
|
|
711
|
+
/* @__PURE__ */ e("div", { className: "text-ds-xs text-surface-fg-subtle", children: N.description })
|
|
712
|
+
] }),
|
|
713
|
+
N.value === s && /* @__PURE__ */ e(V, { className: "h-ico-sm w-ico-sm shrink-0 text-accent-11" })
|
|
714
|
+
]
|
|
715
|
+
},
|
|
716
|
+
N.value
|
|
717
|
+
);
|
|
718
|
+
})
|
|
719
|
+
}
|
|
720
|
+
)
|
|
721
|
+
] }),
|
|
722
|
+
/* @__PURE__ */ e(ue, { open: m, onOpenChange: g, children: /* @__PURE__ */ c(fe, { children: [
|
|
723
|
+
/* @__PURE__ */ c(me, { children: [
|
|
724
|
+
/* @__PURE__ */ e(pe, { children: "Make visible to everyone?" }),
|
|
725
|
+
/* @__PURE__ */ e(ge, { children: "This task will become visible to clients. Team-only comments and internal details may be exposed. Are you sure you want to continue?" })
|
|
726
|
+
] }),
|
|
727
|
+
/* @__PURE__ */ c(he, { children: [
|
|
728
|
+
/* @__PURE__ */ e(be, { asChild: !0, children: /* @__PURE__ */ e(Y, { variant: "outline", children: "Cancel" }) }),
|
|
729
|
+
/* @__PURE__ */ e(Y, { onClick: y, children: "Confirm" })
|
|
730
|
+
] })
|
|
731
|
+
] }) })
|
|
732
|
+
] });
|
|
733
|
+
}
|
|
734
|
+
);
|
|
735
|
+
Se.displayName = "TaskVisibilityPicker";
|
|
3
736
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
737
|
+
We as ActivityEntry,
|
|
738
|
+
qe as ActivityTab,
|
|
739
|
+
ze as ActivityTimeline,
|
|
740
|
+
Qe as ConversationTab,
|
|
741
|
+
Ue as FileDropZone,
|
|
742
|
+
Xe as FileItem,
|
|
743
|
+
Ze as FileList,
|
|
744
|
+
Je as FilesTab,
|
|
745
|
+
es as MessageBubble,
|
|
746
|
+
ss as MessageInput,
|
|
747
|
+
ts as MessageList,
|
|
748
|
+
as as ReviewCard,
|
|
749
|
+
rs as ReviewRequestButton,
|
|
750
|
+
ns as ReviewResponseForm,
|
|
751
|
+
cs as ReviewTab,
|
|
752
|
+
is as SubtaskAddForm,
|
|
753
|
+
ls as SubtaskItem,
|
|
754
|
+
os as SubtaskList,
|
|
755
|
+
ds as SubtaskProgress,
|
|
756
|
+
us as SubtasksTab,
|
|
757
|
+
fs as TaskActionRow,
|
|
758
|
+
Te as TaskAssigneePicker,
|
|
759
|
+
Ne as TaskColumnPicker,
|
|
760
|
+
Ie as TaskDatePicker,
|
|
761
|
+
ms as TaskDetailPanel,
|
|
762
|
+
Re as TaskLabelEditor,
|
|
763
|
+
ve as TaskMemberPicker,
|
|
764
|
+
Ke as TaskPanel,
|
|
765
|
+
we as TaskPriorityPicker,
|
|
766
|
+
ps as TaskProperties,
|
|
767
|
+
Se as TaskVisibilityPicker,
|
|
768
|
+
gs as VisibilityWarning
|
|
11
769
|
};
|