@devalok/shilp-sutra-karm 0.20.2 → 0.21.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/chat-panel.js +51 -51
- package/dist/_chunks/kanban-board.js +40 -39
- package/dist/_chunks/markdown-components.js +15 -15
- package/dist/_chunks/project-card.js +25 -25
- package/dist/_chunks/render-adjustment-type.js +190 -190
- package/dist/_chunks/sidebar-scratchpad.js +225 -224
- package/dist/_chunks/task-detail-panel.js +362 -350
- package/dist/_chunks/vendor-dnd.js +3353 -0
- package/dist/_chunks/vendor-markdown.js +4939 -0
- package/dist/_chunks/vendor-utils.js +3264 -0
- package/dist/dashboard/index.js +80 -80
- package/dist/index.js +8 -8
- package/dist/tasks/index.js +205 -205
- package/dist/tasks/task-detail-panel.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/_chunks/vendor.js +0 -11522
package/dist/tasks/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as e, jsxs as
|
|
3
|
-
import * as
|
|
2
|
+
import { jsx as e, jsxs as i, Fragment as E } from "react/jsx-runtime";
|
|
3
|
+
import * as c from "react";
|
|
4
4
|
import { cn as p } from "@devalok/shilp-sutra/ui/lib/utils";
|
|
5
5
|
import { Tabs as J, TabsList as ee, TabsTrigger as se, TabsContent as te } from "@devalok/shilp-sutra/ui";
|
|
6
|
-
import { Skeleton as
|
|
6
|
+
import { Skeleton as w } from "@devalok/shilp-sutra/ui/skeleton";
|
|
7
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
|
|
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 is, m as cs, n as os, o as ds, p as ls, S as us, T as fs, a as ms, b as ps, V as hs } from "../_chunks/task-detail-panel.js";
|
|
9
9
|
import { Avatar as M, AvatarImage as O, AvatarFallback as A } from "@devalok/shilp-sutra/ui/avatar";
|
|
10
10
|
import { MemberPicker as _ } from "@devalok/shilp-sutra/composed/member-picker";
|
|
11
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
|
|
12
|
+
import { IconChevronDown as F, IconCheck as V, IconArrowDown as re, IconMinus as ne, IconArrowUp as ie, IconAlertTriangleFilled as ce, IconX as B, IconPlus as j, IconCalendarEvent as oe, IconLock as de, IconWorld as le } from "@tabler/icons-react";
|
|
13
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
|
|
14
|
+
import { Dialog as ue, DialogContent as fe, DialogHeader as me, DialogTitle as pe, DialogDescription as he, DialogFooter as ge, DialogClose as be } from "@devalok/shilp-sutra/ui/dialog";
|
|
15
15
|
import { Button as Y } from "@devalok/shilp-sutra/ui/button";
|
|
16
16
|
function H(r) {
|
|
17
17
|
return null;
|
|
@@ -39,32 +39,32 @@ function G({
|
|
|
39
39
|
value: r,
|
|
40
40
|
editable: s = !1,
|
|
41
41
|
onUpdate: n,
|
|
42
|
-
subtask:
|
|
42
|
+
subtask: o = !1,
|
|
43
43
|
className: f
|
|
44
44
|
}) {
|
|
45
|
-
const [u,
|
|
46
|
-
|
|
45
|
+
const [u, g] = c.useState(!1), [d, t] = c.useState(r), m = c.useRef(null);
|
|
46
|
+
c.useEffect(() => {
|
|
47
47
|
u || t(r);
|
|
48
|
-
}, [r, u]),
|
|
48
|
+
}, [r, u]), c.useEffect(() => {
|
|
49
49
|
u && m.current && (m.current.focus(), m.current.select());
|
|
50
50
|
}, [u]);
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
const x =
|
|
51
|
+
const h = () => {
|
|
52
|
+
g(!1);
|
|
53
|
+
const x = d.trim();
|
|
54
54
|
x && x !== r ? n == null || n(x) : t(r);
|
|
55
55
|
};
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
|
|
56
|
+
return /* @__PURE__ */ i("div", { className: f, children: [
|
|
57
|
+
o && /* @__PURE__ */ e("p", { className: "text-ds-xs text-surface-fg-subtle uppercase tracking-wide mb-ds-01", children: "Subtask" }),
|
|
58
58
|
s && u ? /* @__PURE__ */ e(
|
|
59
59
|
"input",
|
|
60
60
|
{
|
|
61
61
|
ref: m,
|
|
62
62
|
type: "text",
|
|
63
|
-
value:
|
|
63
|
+
value: d,
|
|
64
64
|
onChange: (x) => t(x.target.value),
|
|
65
|
-
onBlur:
|
|
65
|
+
onBlur: h,
|
|
66
66
|
onKeyDown: (x) => {
|
|
67
|
-
x.key === "Enter" && (x.preventDefault(),
|
|
67
|
+
x.key === "Enter" && (x.preventDefault(), h()), x.key === "Escape" && (g(!1), t(r));
|
|
68
68
|
},
|
|
69
69
|
className: "w-full bg-transparent text-ds-lg font-semibold text-surface-fg outline-none"
|
|
70
70
|
}
|
|
@@ -73,7 +73,7 @@ function G({
|
|
|
73
73
|
{
|
|
74
74
|
type: "button",
|
|
75
75
|
onClick: () => {
|
|
76
|
-
s &&
|
|
76
|
+
s && g(!0);
|
|
77
77
|
},
|
|
78
78
|
className: "w-full cursor-text text-left text-ds-lg font-semibold text-surface-fg transition-colors hover:text-accent-11",
|
|
79
79
|
children: r
|
|
@@ -95,9 +95,9 @@ function W({ children: r, className: s }) {
|
|
|
95
95
|
);
|
|
96
96
|
}
|
|
97
97
|
W.displayName = "TaskPanelProperties";
|
|
98
|
-
function q({ icon: r, label: s, children: n, className:
|
|
99
|
-
return /* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */
|
|
98
|
+
function q({ icon: r, label: s, children: n, className: o }) {
|
|
99
|
+
return /* @__PURE__ */ i("div", { className: p("flex items-center gap-ds-04 py-ds-03", o), children: [
|
|
100
|
+
/* @__PURE__ */ i("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
101
|
r,
|
|
102
102
|
/* @__PURE__ */ e("span", { children: s })
|
|
103
103
|
] }),
|
|
@@ -109,45 +109,45 @@ function z({
|
|
|
109
109
|
defaultTab: r,
|
|
110
110
|
onTabChange: s,
|
|
111
111
|
children: n,
|
|
112
|
-
className:
|
|
112
|
+
className: o
|
|
113
113
|
}) {
|
|
114
|
-
const [f, u] =
|
|
114
|
+
const [f, u] = c.useState(r), g = c.useCallback(
|
|
115
115
|
(t) => {
|
|
116
116
|
u(t), s == null || s(t);
|
|
117
117
|
},
|
|
118
118
|
[s]
|
|
119
|
-
),
|
|
120
|
-
return
|
|
121
|
-
|
|
122
|
-
}), /* @__PURE__ */
|
|
119
|
+
), d = [];
|
|
120
|
+
return c.Children.toArray(n).forEach((t) => {
|
|
121
|
+
c.isValidElement(t) && t.type === xe && d.push(t.props);
|
|
122
|
+
}), /* @__PURE__ */ i(
|
|
123
123
|
J,
|
|
124
124
|
{
|
|
125
125
|
value: f,
|
|
126
|
-
onValueChange:
|
|
127
|
-
className: p("flex flex-col flex-1 min-h-0",
|
|
126
|
+
onValueChange: g,
|
|
127
|
+
className: p("flex flex-col flex-1 min-h-0", o),
|
|
128
128
|
children: [
|
|
129
|
-
/* @__PURE__ */ e("div", { className: "sticky top-0 bg-surface-
|
|
129
|
+
/* @__PURE__ */ e("div", { className: "sticky top-0 bg-surface-raised z-raised px-ds-06", children: /* @__PURE__ */ e(ee, { variant: "line", children: d.map((t) => /* @__PURE__ */ i(se, { value: t.id, children: [
|
|
130
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
131
|
t.label
|
|
132
132
|
] }, t.id)) }) }),
|
|
133
|
-
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-ds-06 py-ds-05", children:
|
|
133
|
+
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-ds-06 py-ds-05", children: d.map((t) => /* @__PURE__ */ e(te, { value: t.id, className: "mt-0", children: t.children }, t.id)) })
|
|
134
134
|
]
|
|
135
135
|
}
|
|
136
136
|
);
|
|
137
137
|
}
|
|
138
138
|
z.displayName = "TaskPanelTabs";
|
|
139
139
|
function Q({ className: r }) {
|
|
140
|
-
return /* @__PURE__ */
|
|
141
|
-
/* @__PURE__ */ e(
|
|
142
|
-
/* @__PURE__ */ e("div", { className: "space-y-ds-04", children: Array.from({ length: 6 }).map((s, n) => /* @__PURE__ */
|
|
143
|
-
/* @__PURE__ */ e(
|
|
144
|
-
/* @__PURE__ */ e(
|
|
140
|
+
return /* @__PURE__ */ i("div", { className: p("space-y-ds-06 p-ds-06", r), children: [
|
|
141
|
+
/* @__PURE__ */ e(w, { className: "h-ds-xs-plus w-3/4 bg-surface-raised-hover" }),
|
|
142
|
+
/* @__PURE__ */ e("div", { className: "space-y-ds-04", children: Array.from({ length: 6 }).map((s, n) => /* @__PURE__ */ i("div", { className: "flex items-center gap-ds-04", children: [
|
|
143
|
+
/* @__PURE__ */ e(w, { className: "h-[16px] w-[120px] bg-surface-raised-hover" }),
|
|
144
|
+
/* @__PURE__ */ e(w, { className: "h-[16px] flex-1 bg-surface-raised-hover" })
|
|
145
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(
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
/* @__PURE__ */ e(
|
|
149
|
-
/* @__PURE__ */ e(
|
|
150
|
-
/* @__PURE__ */ e(
|
|
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(w, { className: "h-[12px] w-[64px] bg-surface-raised-hover" }, n)) }),
|
|
147
|
+
/* @__PURE__ */ i("div", { className: "space-y-ds-04", children: [
|
|
148
|
+
/* @__PURE__ */ e(w, { className: "h-ds-md w-full bg-surface-raised-hover" }),
|
|
149
|
+
/* @__PURE__ */ e(w, { className: "h-ds-md w-full bg-surface-raised-hover" }),
|
|
150
|
+
/* @__PURE__ */ e(w, { className: "h-ds-md w-4/5 bg-surface-raised-hover" })
|
|
151
151
|
] })
|
|
152
152
|
] });
|
|
153
153
|
}
|
|
@@ -160,21 +160,21 @@ const Ke = Object.assign(K, {
|
|
|
160
160
|
Tabs: z,
|
|
161
161
|
Tab: H,
|
|
162
162
|
Loading: Q
|
|
163
|
-
}), Ne =
|
|
164
|
-
function({ columns: s, value: n, onChange:
|
|
165
|
-
const [
|
|
166
|
-
return f ? /* @__PURE__ */ e("span", { className: p("px-ds-03 py-ds-02 text-ds-md text-surface-fg", u), children:
|
|
167
|
-
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */
|
|
163
|
+
}), Ne = c.forwardRef(
|
|
164
|
+
function({ columns: s, value: n, onChange: o, readOnly: f, className: u }, g) {
|
|
165
|
+
const [d, t] = c.useState(!1), m = s.find((a) => a.id === n), h = (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: h }) : /* @__PURE__ */ i(T, { open: d, onOpenChange: t, children: [
|
|
167
|
+
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ i(
|
|
168
168
|
"button",
|
|
169
169
|
{
|
|
170
|
-
ref:
|
|
170
|
+
ref: g,
|
|
171
171
|
type: "button",
|
|
172
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-
|
|
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-raised-hover",
|
|
174
174
|
u
|
|
175
175
|
),
|
|
176
176
|
children: [
|
|
177
|
-
/* @__PURE__ */ e("span", { children:
|
|
177
|
+
/* @__PURE__ */ e("span", { children: h }),
|
|
178
178
|
/* @__PURE__ */ e(F, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
179
179
|
]
|
|
180
180
|
}
|
|
@@ -182,19 +182,19 @@ const Ke = Object.assign(K, {
|
|
|
182
182
|
/* @__PURE__ */ e(
|
|
183
183
|
C,
|
|
184
184
|
{
|
|
185
|
-
className: "w-[180px] border-surface-border-strong bg-surface-
|
|
185
|
+
className: "w-[180px] border-surface-border-strong bg-surface-overlay p-ds-02",
|
|
186
186
|
align: "start",
|
|
187
187
|
sideOffset: 4,
|
|
188
|
-
children: s.map((a) => /* @__PURE__ */
|
|
188
|
+
children: s.map((a) => /* @__PURE__ */ i(
|
|
189
189
|
"button",
|
|
190
190
|
{
|
|
191
191
|
type: "button",
|
|
192
192
|
onClick: () => {
|
|
193
|
-
|
|
193
|
+
o(a.id), t(!1);
|
|
194
194
|
},
|
|
195
195
|
className: p(
|
|
196
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-
|
|
197
|
+
"hover:bg-surface-raised-hover",
|
|
198
198
|
a.id === n ? "text-accent-11" : "text-surface-fg"
|
|
199
199
|
),
|
|
200
200
|
children: [
|
|
@@ -211,29 +211,29 @@ const Ke = Object.assign(K, {
|
|
|
211
211
|
);
|
|
212
212
|
Ne.displayName = "TaskColumnPicker";
|
|
213
213
|
const ye = {
|
|
214
|
-
URGENT: { icon:
|
|
215
|
-
HIGH: { icon:
|
|
214
|
+
URGENT: { icon: ce, className: "text-error-9" },
|
|
215
|
+
HIGH: { icon: ie, className: "text-warning-9" },
|
|
216
216
|
MEDIUM: { icon: ne, className: "text-surface-fg-muted" },
|
|
217
217
|
LOW: { icon: re, className: "text-surface-fg-subtle" }
|
|
218
218
|
}, ke = ["URGENT", "HIGH", "MEDIUM", "LOW"];
|
|
219
219
|
function I({ priority: r }) {
|
|
220
220
|
const s = ye[r], n = s.icon;
|
|
221
|
-
return /* @__PURE__ */
|
|
221
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center gap-ds-02b", children: [
|
|
222
222
|
/* @__PURE__ */ e(n, { className: p("h-ico-sm w-ico-sm", s.className) }),
|
|
223
223
|
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg", children: ae[r] ?? r })
|
|
224
224
|
] });
|
|
225
225
|
}
|
|
226
|
-
const
|
|
227
|
-
function({ value: s, onChange: n, readOnly:
|
|
228
|
-
const [
|
|
229
|
-
return
|
|
230
|
-
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */
|
|
226
|
+
const ve = c.forwardRef(
|
|
227
|
+
function({ value: s, onChange: n, readOnly: o, className: f }, u) {
|
|
228
|
+
const [g, d] = c.useState(!1);
|
|
229
|
+
return o ? /* @__PURE__ */ e("div", { className: p("px-ds-03 py-ds-02", f), children: /* @__PURE__ */ e(I, { priority: s }) }) : /* @__PURE__ */ i(T, { open: g, onOpenChange: d, children: [
|
|
230
|
+
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ i(
|
|
231
231
|
"button",
|
|
232
232
|
{
|
|
233
233
|
ref: u,
|
|
234
234
|
type: "button",
|
|
235
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-
|
|
236
|
+
"inline-flex items-center gap-ds-02b rounded-ds-md px-ds-03 py-ds-02 transition-colors hover:bg-surface-raised-hover",
|
|
237
237
|
f
|
|
238
238
|
),
|
|
239
239
|
children: [
|
|
@@ -245,20 +245,20 @@ const we = i.forwardRef(
|
|
|
245
245
|
/* @__PURE__ */ e(
|
|
246
246
|
C,
|
|
247
247
|
{
|
|
248
|
-
className: "w-[180px] border-surface-border-strong bg-surface-
|
|
248
|
+
className: "w-[180px] border-surface-border-strong bg-surface-overlay p-ds-02",
|
|
249
249
|
align: "start",
|
|
250
250
|
sideOffset: 4,
|
|
251
|
-
children: ke.map((t) => /* @__PURE__ */
|
|
251
|
+
children: ke.map((t) => /* @__PURE__ */ i(
|
|
252
252
|
"button",
|
|
253
253
|
{
|
|
254
254
|
type: "button",
|
|
255
255
|
onClick: () => {
|
|
256
|
-
n(t),
|
|
256
|
+
n(t), d(!1);
|
|
257
257
|
},
|
|
258
258
|
className: p(
|
|
259
259
|
"flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b transition-colors",
|
|
260
|
-
"hover:bg-surface-
|
|
261
|
-
t === s && "bg-surface-
|
|
260
|
+
"hover:bg-surface-raised-hover",
|
|
261
|
+
t === s && "bg-surface-raised-hover"
|
|
262
262
|
),
|
|
263
263
|
children: [
|
|
264
264
|
/* @__PURE__ */ e(I, { priority: t }),
|
|
@@ -272,22 +272,22 @@ const we = i.forwardRef(
|
|
|
272
272
|
] });
|
|
273
273
|
}
|
|
274
274
|
);
|
|
275
|
-
|
|
276
|
-
const
|
|
277
|
-
function({ members: s, value: n, onChange:
|
|
278
|
-
const t = s.find((a) => a.id === n) ?? null, m =
|
|
275
|
+
ve.displayName = "TaskPriorityPicker";
|
|
276
|
+
const we = c.forwardRef(
|
|
277
|
+
function({ members: s, value: n, onChange: o, placeholder: f = "No owner", readOnly: u, className: g }, d) {
|
|
278
|
+
const t = s.find((a) => a.id === n) ?? null, m = c.useMemo(
|
|
279
279
|
() => s.map((a) => ({ id: a.id, name: a.name, avatar: a.image ?? void 0 })),
|
|
280
280
|
[s]
|
|
281
|
-
),
|
|
281
|
+
), h = c.useCallback(
|
|
282
282
|
(a) => {
|
|
283
|
-
|
|
283
|
+
o(a === n ? null : a);
|
|
284
284
|
},
|
|
285
|
-
[
|
|
285
|
+
[o, n]
|
|
286
286
|
);
|
|
287
|
-
return u ? /* @__PURE__ */ e("div", { className: p("inline-flex items-center gap-ds-03 px-ds-03 py-ds-02",
|
|
288
|
-
/* @__PURE__ */
|
|
287
|
+
return u ? /* @__PURE__ */ e("div", { className: p("inline-flex items-center gap-ds-03 px-ds-03 py-ds-02", g), children: t ? /* @__PURE__ */ i(E, { children: [
|
|
288
|
+
/* @__PURE__ */ i(M, { className: "h-ico-md w-ico-md", children: [
|
|
289
289
|
t.image && /* @__PURE__ */ e(O, { src: t.image, alt: t.name }),
|
|
290
|
-
/* @__PURE__ */ e(A, { className: "bg-surface-
|
|
290
|
+
/* @__PURE__ */ e(A, { className: "bg-surface-raised-hover text-ds-xs font-semibold text-surface-fg", children: L(t.name) })
|
|
291
291
|
] }),
|
|
292
292
|
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg", children: t.name })
|
|
293
293
|
] }) : /* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-subtle", children: f }) }) : /* @__PURE__ */ e(
|
|
@@ -295,20 +295,20 @@ const ve = i.forwardRef(
|
|
|
295
295
|
{
|
|
296
296
|
members: m,
|
|
297
297
|
selectedIds: n ? [n] : [],
|
|
298
|
-
onSelect:
|
|
298
|
+
onSelect: h,
|
|
299
299
|
children: /* @__PURE__ */ e(
|
|
300
300
|
"button",
|
|
301
301
|
{
|
|
302
|
-
ref:
|
|
302
|
+
ref: d,
|
|
303
303
|
type: "button",
|
|
304
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-
|
|
306
|
-
|
|
305
|
+
"inline-flex items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02 transition-colors hover:bg-surface-raised-hover",
|
|
306
|
+
g
|
|
307
307
|
),
|
|
308
|
-
children: t ? /* @__PURE__ */
|
|
309
|
-
/* @__PURE__ */
|
|
308
|
+
children: t ? /* @__PURE__ */ i(E, { children: [
|
|
309
|
+
/* @__PURE__ */ i(M, { className: "h-ico-md w-ico-md", children: [
|
|
310
310
|
t.image && /* @__PURE__ */ e(O, { src: t.image, alt: t.name }),
|
|
311
|
-
/* @__PURE__ */ e(A, { className: "bg-surface-
|
|
311
|
+
/* @__PURE__ */ e(A, { className: "bg-surface-raised-hover text-ds-xs font-semibold text-surface-fg", children: L(t.name) })
|
|
312
312
|
] }),
|
|
313
313
|
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg", children: t.name })
|
|
314
314
|
] }) : /* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-subtle", children: f })
|
|
@@ -318,27 +318,27 @@ const ve = i.forwardRef(
|
|
|
318
318
|
);
|
|
319
319
|
}
|
|
320
320
|
);
|
|
321
|
-
|
|
322
|
-
const Te =
|
|
323
|
-
function({ members: s, value: n, onAssign:
|
|
324
|
-
const t = n.map((a) => a.id), m =
|
|
321
|
+
we.displayName = "TaskMemberPicker";
|
|
322
|
+
const Te = c.forwardRef(
|
|
323
|
+
function({ members: s, value: n, onAssign: o, onUnassign: f, readOnly: u, className: g }, d) {
|
|
324
|
+
const t = n.map((a) => a.id), m = c.useMemo(
|
|
325
325
|
() => s.map((a) => ({ id: a.id, name: a.name, avatar: a.image ?? void 0 })),
|
|
326
326
|
[s]
|
|
327
|
-
),
|
|
327
|
+
), h = c.useCallback(
|
|
328
328
|
(a) => {
|
|
329
|
-
t.includes(a) ? f(a) :
|
|
329
|
+
t.includes(a) ? f(a) : o(a);
|
|
330
330
|
},
|
|
331
|
-
[t,
|
|
331
|
+
[t, o, f]
|
|
332
332
|
);
|
|
333
|
-
return /* @__PURE__ */
|
|
334
|
-
n.map((a) => /* @__PURE__ */
|
|
333
|
+
return /* @__PURE__ */ i("div", { ref: d, className: p("flex flex-wrap items-center gap-ds-02b", g), children: [
|
|
334
|
+
n.map((a) => /* @__PURE__ */ i(
|
|
335
335
|
"div",
|
|
336
336
|
{
|
|
337
|
-
className: "inline-flex items-center gap-ds-02 rounded-ds-full bg-surface-
|
|
337
|
+
className: "inline-flex items-center gap-ds-02 rounded-ds-full bg-surface-raised py-ds-01 pl-ds-01 pr-ds-03",
|
|
338
338
|
children: [
|
|
339
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ i(M, { className: "h-ico-sm w-ico-sm", children: [
|
|
340
340
|
a.image && /* @__PURE__ */ e(O, { src: a.image, alt: a.name }),
|
|
341
|
-
/* @__PURE__ */ e(A, { className: "bg-surface-
|
|
341
|
+
/* @__PURE__ */ e(A, { className: "bg-surface-raised-hover text-ds-xs font-semibold text-surface-fg", children: L(a.name) })
|
|
342
342
|
] }),
|
|
343
343
|
/* @__PURE__ */ e("span", { className: "text-ds-sm text-surface-fg-muted", children: a.name.split(" ")[0] }),
|
|
344
344
|
!u && /* @__PURE__ */ e(
|
|
@@ -346,7 +346,7 @@ const Te = i.forwardRef(
|
|
|
346
346
|
{
|
|
347
347
|
type: "button",
|
|
348
348
|
onClick: () => f(a.id),
|
|
349
|
-
className: "ml-ds-01 rounded-ds-full p-ds-01 transition-colors hover:bg-surface-
|
|
349
|
+
className: "ml-ds-01 rounded-ds-full p-ds-01 transition-colors hover:bg-surface-raised-hover",
|
|
350
350
|
"aria-label": `Remove ${a.name}`,
|
|
351
351
|
children: /* @__PURE__ */ e(B, { className: "h-ds-03 w-ds-03 text-surface-fg-subtle" })
|
|
352
352
|
}
|
|
@@ -360,13 +360,13 @@ const Te = i.forwardRef(
|
|
|
360
360
|
{
|
|
361
361
|
members: m,
|
|
362
362
|
selectedIds: t,
|
|
363
|
-
onSelect:
|
|
363
|
+
onSelect: h,
|
|
364
364
|
multiple: !0,
|
|
365
365
|
children: /* @__PURE__ */ e(
|
|
366
366
|
"button",
|
|
367
367
|
{
|
|
368
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-
|
|
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-raised-hover hover:border-surface-border",
|
|
370
370
|
"aria-label": "Add assignee",
|
|
371
371
|
children: /* @__PURE__ */ e(j, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
372
372
|
}
|
|
@@ -386,47 +386,47 @@ function Pe(r) {
|
|
|
386
386
|
});
|
|
387
387
|
}
|
|
388
388
|
function Ce(r) {
|
|
389
|
-
const s = r.getFullYear(), n = String(r.getMonth() + 1).padStart(2, "0"),
|
|
390
|
-
return `${s}-${n}-${
|
|
389
|
+
const s = r.getFullYear(), n = String(r.getMonth() + 1).padStart(2, "0"), o = String(r.getDate()).padStart(2, "0");
|
|
390
|
+
return `${s}-${n}-${o}`;
|
|
391
391
|
}
|
|
392
392
|
function De() {
|
|
393
|
-
const r = /* @__PURE__ */ new Date(), s = r.getDay(), n = s === 0 ? 1 : 8 - s,
|
|
394
|
-
return
|
|
393
|
+
const r = /* @__PURE__ */ new Date(), s = r.getDay(), n = s === 0 ? 1 : 8 - s, o = new Date(r);
|
|
394
|
+
return o.setDate(r.getDate() + n), o;
|
|
395
395
|
}
|
|
396
396
|
function R(r) {
|
|
397
397
|
const s = /* @__PURE__ */ new Date();
|
|
398
398
|
return s.setDate(s.getDate() + r), s;
|
|
399
399
|
}
|
|
400
|
-
const Ie =
|
|
401
|
-
function({ value: s, onChange: n, presets:
|
|
402
|
-
const [
|
|
400
|
+
const Ie = c.forwardRef(
|
|
401
|
+
function({ value: s, onChange: n, presets: o = !0, readOnly: f, className: u }, g) {
|
|
402
|
+
const [d, t] = c.useState(!1), m = c.useMemo(() => s ? s instanceof Date ? s : new Date(s) : null, [s]), h = m ? Pe(m) : "No date", a = (y) => {
|
|
403
403
|
n(y), t(!1);
|
|
404
404
|
}, k = (y) => {
|
|
405
405
|
n(y.target.value ? new Date(y.target.value) : null);
|
|
406
406
|
}, x = (y) => {
|
|
407
407
|
y.stopPropagation(), n(null);
|
|
408
408
|
};
|
|
409
|
-
return f ? /* @__PURE__ */ e("span", { className: p("px-ds-03 py-ds-02 text-ds-md text-surface-fg", u), children:
|
|
410
|
-
/* @__PURE__ */
|
|
411
|
-
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */
|
|
409
|
+
return f ? /* @__PURE__ */ e("span", { className: p("px-ds-03 py-ds-02 text-ds-md text-surface-fg", u), children: h }) : /* @__PURE__ */ i("div", { className: p("inline-flex items-center gap-ds-02", u), children: [
|
|
410
|
+
/* @__PURE__ */ i(T, { open: d, onOpenChange: t, children: [
|
|
411
|
+
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ i(
|
|
412
412
|
"button",
|
|
413
413
|
{
|
|
414
|
-
ref:
|
|
414
|
+
ref: g,
|
|
415
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-
|
|
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-raised-hover",
|
|
417
417
|
children: [
|
|
418
|
-
/* @__PURE__ */ e(
|
|
419
|
-
/* @__PURE__ */ e("span", { className: m ? "text-surface-fg" : "text-surface-fg-subtle", children:
|
|
418
|
+
/* @__PURE__ */ e(oe, { 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: h })
|
|
420
420
|
]
|
|
421
421
|
}
|
|
422
422
|
) }),
|
|
423
423
|
/* @__PURE__ */ e(
|
|
424
424
|
C,
|
|
425
425
|
{
|
|
426
|
-
className: "w-[220px] border-surface-border-strong bg-surface-
|
|
426
|
+
className: "w-[220px] border-surface-border-strong bg-surface-overlay p-ds-03",
|
|
427
427
|
align: "start",
|
|
428
428
|
sideOffset: 4,
|
|
429
|
-
children: /* @__PURE__ */
|
|
429
|
+
children: /* @__PURE__ */ i("div", { className: "space-y-ds-03", children: [
|
|
430
430
|
/* @__PURE__ */ e(
|
|
431
431
|
"input",
|
|
432
432
|
{
|
|
@@ -437,15 +437,15 @@ const Ie = i.forwardRef(
|
|
|
437
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
438
|
}
|
|
439
439
|
),
|
|
440
|
-
|
|
440
|
+
o && /* @__PURE__ */ i("div", { className: "space-y-ds-01", children: [
|
|
441
441
|
/* @__PURE__ */ e("p", { className: "text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle", children: "Quick select" }),
|
|
442
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ i("div", { className: "grid grid-cols-2 gap-ds-02", children: [
|
|
443
443
|
/* @__PURE__ */ e(
|
|
444
444
|
"button",
|
|
445
445
|
{
|
|
446
446
|
type: "button",
|
|
447
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-
|
|
448
|
+
className: "rounded-ds-md px-ds-03 py-ds-02 text-left text-ds-sm text-surface-fg transition-colors hover:bg-surface-raised-hover",
|
|
449
449
|
children: "Today"
|
|
450
450
|
}
|
|
451
451
|
),
|
|
@@ -454,7 +454,7 @@ const Ie = i.forwardRef(
|
|
|
454
454
|
{
|
|
455
455
|
type: "button",
|
|
456
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-
|
|
457
|
+
className: "rounded-ds-md px-ds-03 py-ds-02 text-left text-ds-sm text-surface-fg transition-colors hover:bg-surface-raised-hover",
|
|
458
458
|
children: "Tomorrow"
|
|
459
459
|
}
|
|
460
460
|
),
|
|
@@ -463,7 +463,7 @@ const Ie = i.forwardRef(
|
|
|
463
463
|
{
|
|
464
464
|
type: "button",
|
|
465
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-
|
|
466
|
+
className: "rounded-ds-md px-ds-03 py-ds-02 text-left text-ds-sm text-surface-fg transition-colors hover:bg-surface-raised-hover",
|
|
467
467
|
children: "Next Monday"
|
|
468
468
|
}
|
|
469
469
|
),
|
|
@@ -472,7 +472,7 @@ const Ie = i.forwardRef(
|
|
|
472
472
|
{
|
|
473
473
|
type: "button",
|
|
474
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-
|
|
475
|
+
className: "rounded-ds-md px-ds-03 py-ds-02 text-left text-ds-sm text-surface-fg transition-colors hover:bg-surface-raised-hover",
|
|
476
476
|
children: "+7 days"
|
|
477
477
|
}
|
|
478
478
|
),
|
|
@@ -481,7 +481,7 @@ const Ie = i.forwardRef(
|
|
|
481
481
|
{
|
|
482
482
|
type: "button",
|
|
483
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-
|
|
484
|
+
className: "rounded-ds-md px-ds-03 py-ds-02 text-left text-ds-sm text-surface-fg transition-colors hover:bg-surface-raised-hover",
|
|
485
485
|
children: "+14 days"
|
|
486
486
|
}
|
|
487
487
|
),
|
|
@@ -490,7 +490,7 @@ const Ie = i.forwardRef(
|
|
|
490
490
|
{
|
|
491
491
|
type: "button",
|
|
492
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-
|
|
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-raised-hover",
|
|
494
494
|
children: "Clear"
|
|
495
495
|
}
|
|
496
496
|
)
|
|
@@ -505,7 +505,7 @@ const Ie = i.forwardRef(
|
|
|
505
505
|
{
|
|
506
506
|
type: "button",
|
|
507
507
|
onClick: x,
|
|
508
|
-
className: "rounded-ds-md p-ds-02 transition-colors hover:bg-surface-
|
|
508
|
+
className: "rounded-ds-md p-ds-02 transition-colors hover:bg-surface-raised-hover",
|
|
509
509
|
"aria-label": "Clear due date",
|
|
510
510
|
children: /* @__PURE__ */ e(B, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
511
511
|
}
|
|
@@ -514,35 +514,35 @@ const Ie = i.forwardRef(
|
|
|
514
514
|
}
|
|
515
515
|
);
|
|
516
516
|
Ie.displayName = "TaskDatePicker";
|
|
517
|
-
const Re =
|
|
518
|
-
function({ value: s, onChange: n, availableLabels:
|
|
519
|
-
const [
|
|
520
|
-
const
|
|
521
|
-
for (const b of
|
|
522
|
-
|
|
523
|
-
return
|
|
524
|
-
}, [
|
|
525
|
-
if (!
|
|
526
|
-
const
|
|
527
|
-
return
|
|
528
|
-
(b) => b.name.toLowerCase().includes(
|
|
517
|
+
const Re = c.forwardRef(
|
|
518
|
+
function({ value: s, onChange: n, availableLabels: o = [], readOnly: f, className: u }, g) {
|
|
519
|
+
const [d, t] = c.useState(""), [m, h] = c.useState(!1), [a, k] = c.useState(!1), x = c.useRef(null), y = c.useRef(!1), N = c.useMemo(() => {
|
|
520
|
+
const l = /* @__PURE__ */ new Map();
|
|
521
|
+
for (const b of o)
|
|
522
|
+
l.set(b.name, b.color);
|
|
523
|
+
return l;
|
|
524
|
+
}, [o]), v = c.useMemo(() => {
|
|
525
|
+
if (!d.trim()) return [];
|
|
526
|
+
const l = d.toLowerCase();
|
|
527
|
+
return o.filter(
|
|
528
|
+
(b) => b.name.toLowerCase().includes(l) && !s.includes(b.name)
|
|
529
529
|
);
|
|
530
|
-
}, [
|
|
531
|
-
const b =
|
|
532
|
-
b && !s.includes(b) && n([...s, b]), t(""),
|
|
533
|
-
}, U = (
|
|
534
|
-
n(s.filter((b) => b !==
|
|
535
|
-
}, X = (
|
|
536
|
-
|
|
537
|
-
}, Z = (
|
|
538
|
-
t(
|
|
530
|
+
}, [d, o, s]), D = (l) => {
|
|
531
|
+
const b = l.trim();
|
|
532
|
+
b && !s.includes(b) && n([...s, b]), t(""), h(!1), k(!1);
|
|
533
|
+
}, U = (l) => {
|
|
534
|
+
n(s.filter((b) => b !== l));
|
|
535
|
+
}, X = (l) => {
|
|
536
|
+
l.key === "Enter" && (l.preventDefault(), v.length > 0 ? D(v[0].name) : D(d)), l.key === "Escape" && (h(!1), t(""), k(!1));
|
|
537
|
+
}, Z = (l) => {
|
|
538
|
+
t(l.target.value);
|
|
539
539
|
};
|
|
540
|
-
return
|
|
541
|
-
k(
|
|
542
|
-
}, [
|
|
543
|
-
s.map((
|
|
544
|
-
const b = N.get(
|
|
545
|
-
return /* @__PURE__ */
|
|
540
|
+
return c.useEffect(() => {
|
|
541
|
+
k(d.trim().length > 0 && v.length > 0);
|
|
542
|
+
}, [v, d]), /* @__PURE__ */ i("div", { ref: g, className: p("flex flex-wrap items-center gap-ds-02b", u), children: [
|
|
543
|
+
s.map((l) => {
|
|
544
|
+
const b = N.get(l);
|
|
545
|
+
return /* @__PURE__ */ i(
|
|
546
546
|
"span",
|
|
547
547
|
{
|
|
548
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",
|
|
@@ -554,29 +554,29 @@ const Re = i.forwardRef(
|
|
|
554
554
|
style: { backgroundColor: b }
|
|
555
555
|
}
|
|
556
556
|
),
|
|
557
|
-
|
|
557
|
+
l,
|
|
558
558
|
!f && /* @__PURE__ */ e(
|
|
559
559
|
"button",
|
|
560
560
|
{
|
|
561
561
|
type: "button",
|
|
562
|
-
onClick: () => U(
|
|
563
|
-
className: "rounded-ds-full p-ds-01 transition-colors hover:bg-surface-
|
|
564
|
-
"aria-label": `Remove label ${
|
|
562
|
+
onClick: () => U(l),
|
|
563
|
+
className: "rounded-ds-full p-ds-01 transition-colors hover:bg-surface-raised-hover",
|
|
564
|
+
"aria-label": `Remove label ${l}`,
|
|
565
565
|
children: /* @__PURE__ */ e(B, { className: "h-ds-03 w-ds-03" })
|
|
566
566
|
}
|
|
567
567
|
)
|
|
568
568
|
]
|
|
569
569
|
},
|
|
570
|
-
|
|
570
|
+
l
|
|
571
571
|
);
|
|
572
572
|
}),
|
|
573
|
-
!f && (m ? /* @__PURE__ */
|
|
573
|
+
!f && (m ? /* @__PURE__ */ i(T, { open: a, onOpenChange: k, children: [
|
|
574
574
|
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "inline-flex items-center gap-ds-02", children: /* @__PURE__ */ e(
|
|
575
575
|
"input",
|
|
576
576
|
{
|
|
577
577
|
ref: x,
|
|
578
578
|
type: "text",
|
|
579
|
-
value:
|
|
579
|
+
value: d,
|
|
580
580
|
onChange: Z,
|
|
581
581
|
onKeyDown: X,
|
|
582
582
|
onBlur: () => {
|
|
@@ -584,7 +584,7 @@ const Re = i.forwardRef(
|
|
|
584
584
|
y.current = !1;
|
|
585
585
|
return;
|
|
586
586
|
}
|
|
587
|
-
|
|
587
|
+
d.trim() ? D(d) : (h(!1), k(!1));
|
|
588
588
|
},
|
|
589
589
|
placeholder: "Label name",
|
|
590
590
|
"aria-label": "New label name",
|
|
@@ -592,33 +592,33 @@ const Re = i.forwardRef(
|
|
|
592
592
|
autoFocus: !0
|
|
593
593
|
}
|
|
594
594
|
) }) }),
|
|
595
|
-
|
|
595
|
+
v.length > 0 && /* @__PURE__ */ e(
|
|
596
596
|
C,
|
|
597
597
|
{
|
|
598
|
-
className: "w-[180px] border-surface-border-strong bg-surface-
|
|
598
|
+
className: "w-[180px] border-surface-border-strong bg-surface-overlay p-ds-02",
|
|
599
599
|
align: "start",
|
|
600
600
|
sideOffset: 4,
|
|
601
|
-
onOpenAutoFocus: (
|
|
602
|
-
children:
|
|
601
|
+
onOpenAutoFocus: (l) => l.preventDefault(),
|
|
602
|
+
children: v.map((l) => /* @__PURE__ */ i(
|
|
603
603
|
"button",
|
|
604
604
|
{
|
|
605
605
|
type: "button",
|
|
606
606
|
onMouseDown: (b) => {
|
|
607
|
-
b.preventDefault(), y.current = !0, D(
|
|
607
|
+
b.preventDefault(), y.current = !0, D(l.name);
|
|
608
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-
|
|
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-raised-hover",
|
|
610
610
|
children: [
|
|
611
|
-
|
|
611
|
+
l.color && /* @__PURE__ */ e(
|
|
612
612
|
"span",
|
|
613
613
|
{
|
|
614
614
|
className: "h-2 w-2 shrink-0 rounded-ds-full",
|
|
615
|
-
style: { backgroundColor:
|
|
615
|
+
style: { backgroundColor: l.color }
|
|
616
616
|
}
|
|
617
617
|
),
|
|
618
|
-
/* @__PURE__ */ e("span", { className: "text-surface-fg", children:
|
|
618
|
+
/* @__PURE__ */ e("span", { className: "text-surface-fg", children: l.name })
|
|
619
619
|
]
|
|
620
620
|
},
|
|
621
|
-
|
|
621
|
+
l.name
|
|
622
622
|
))
|
|
623
623
|
}
|
|
624
624
|
)
|
|
@@ -626,8 +626,8 @@ const Re = i.forwardRef(
|
|
|
626
626
|
"button",
|
|
627
627
|
{
|
|
628
628
|
type: "button",
|
|
629
|
-
onClick: () =>
|
|
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-
|
|
629
|
+
onClick: () => h(!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-raised-hover hover:border-surface-border",
|
|
631
631
|
"aria-label": "Add label",
|
|
632
632
|
children: /* @__PURE__ */ e(j, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
633
633
|
}
|
|
@@ -640,43 +640,43 @@ Re.displayName = "TaskLabelEditor";
|
|
|
640
640
|
const S = [
|
|
641
641
|
{
|
|
642
642
|
value: "INTERNAL",
|
|
643
|
-
icon:
|
|
643
|
+
icon: de,
|
|
644
644
|
label: "Internal",
|
|
645
645
|
description: "Only team members"
|
|
646
646
|
},
|
|
647
647
|
{
|
|
648
648
|
value: "EVERYONE",
|
|
649
|
-
icon:
|
|
649
|
+
icon: le,
|
|
650
650
|
label: "Everyone",
|
|
651
651
|
description: "Visible to clients"
|
|
652
652
|
}
|
|
653
|
-
], Se =
|
|
654
|
-
function({ value: s, onChange: n, confirmOnPublic:
|
|
655
|
-
const [
|
|
653
|
+
], Se = c.forwardRef(
|
|
654
|
+
function({ value: s, onChange: n, confirmOnPublic: o, readOnly: f, className: u }, g) {
|
|
655
|
+
const [d, t] = c.useState(!1), [m, h] = c.useState(!1), a = S.find((N) => N.value === s) ?? S[0], k = a.icon, x = (N) => {
|
|
656
656
|
if (N === s) {
|
|
657
657
|
t(!1);
|
|
658
658
|
return;
|
|
659
659
|
}
|
|
660
|
-
if (N === "EVERYONE" &&
|
|
661
|
-
t(!1),
|
|
660
|
+
if (N === "EVERYONE" && o) {
|
|
661
|
+
t(!1), h(!0);
|
|
662
662
|
return;
|
|
663
663
|
}
|
|
664
664
|
n(N), t(!1);
|
|
665
665
|
}, y = () => {
|
|
666
|
-
n("EVERYONE"),
|
|
666
|
+
n("EVERYONE"), h(!1);
|
|
667
667
|
};
|
|
668
|
-
return f ? /* @__PURE__ */
|
|
668
|
+
return f ? /* @__PURE__ */ i("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
669
|
/* @__PURE__ */ e(k, { className: "h-ico-sm w-ico-sm", stroke: 1.5 }),
|
|
670
670
|
/* @__PURE__ */ e("span", { children: a.label })
|
|
671
|
-
] }) : /* @__PURE__ */
|
|
672
|
-
/* @__PURE__ */
|
|
673
|
-
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */
|
|
671
|
+
] }) : /* @__PURE__ */ i(E, { children: [
|
|
672
|
+
/* @__PURE__ */ i(T, { open: d, onOpenChange: t, children: [
|
|
673
|
+
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ i(
|
|
674
674
|
"button",
|
|
675
675
|
{
|
|
676
|
-
ref:
|
|
676
|
+
ref: g,
|
|
677
677
|
type: "button",
|
|
678
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-
|
|
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-raised-hover",
|
|
680
680
|
u
|
|
681
681
|
),
|
|
682
682
|
children: [
|
|
@@ -689,24 +689,24 @@ const S = [
|
|
|
689
689
|
/* @__PURE__ */ e(
|
|
690
690
|
C,
|
|
691
691
|
{
|
|
692
|
-
className: "w-[220px] border-surface-border-strong bg-surface-
|
|
692
|
+
className: "w-[220px] border-surface-border-strong bg-surface-overlay p-ds-02",
|
|
693
693
|
align: "start",
|
|
694
694
|
sideOffset: 4,
|
|
695
695
|
children: S.map((N) => {
|
|
696
|
-
const
|
|
697
|
-
return /* @__PURE__ */
|
|
696
|
+
const v = N.icon;
|
|
697
|
+
return /* @__PURE__ */ i(
|
|
698
698
|
"button",
|
|
699
699
|
{
|
|
700
700
|
type: "button",
|
|
701
701
|
onClick: () => x(N.value),
|
|
702
702
|
className: p(
|
|
703
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-
|
|
705
|
-
N.value === s && "bg-surface-
|
|
704
|
+
"hover:bg-surface-raised-hover",
|
|
705
|
+
N.value === s && "bg-surface-raised-hover"
|
|
706
706
|
),
|
|
707
707
|
children: [
|
|
708
|
-
/* @__PURE__ */ e(
|
|
709
|
-
/* @__PURE__ */
|
|
708
|
+
/* @__PURE__ */ e(v, { className: "h-ico-sm w-ico-sm shrink-0 text-surface-fg-muted", stroke: 1.5 }),
|
|
709
|
+
/* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
|
|
710
710
|
/* @__PURE__ */ e("div", { className: "text-ds-md text-surface-fg", children: N.label }),
|
|
711
711
|
/* @__PURE__ */ e("div", { className: "text-ds-xs text-surface-fg-subtle", children: N.description })
|
|
712
712
|
] }),
|
|
@@ -719,12 +719,12 @@ const S = [
|
|
|
719
719
|
}
|
|
720
720
|
)
|
|
721
721
|
] }),
|
|
722
|
-
/* @__PURE__ */ e(ue, { open: m, onOpenChange:
|
|
723
|
-
/* @__PURE__ */
|
|
722
|
+
/* @__PURE__ */ e(ue, { open: m, onOpenChange: h, children: /* @__PURE__ */ i(fe, { children: [
|
|
723
|
+
/* @__PURE__ */ i(me, { children: [
|
|
724
724
|
/* @__PURE__ */ e(pe, { children: "Make visible to everyone?" }),
|
|
725
|
-
/* @__PURE__ */ e(
|
|
725
|
+
/* @__PURE__ */ e(he, { 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
726
|
] }),
|
|
727
|
-
/* @__PURE__ */
|
|
727
|
+
/* @__PURE__ */ i(ge, { children: [
|
|
728
728
|
/* @__PURE__ */ e(be, { asChild: !0, children: /* @__PURE__ */ e(Y, { variant: "outline", children: "Cancel" }) }),
|
|
729
729
|
/* @__PURE__ */ e(Y, { onClick: y, children: "Confirm" })
|
|
730
730
|
] })
|
|
@@ -748,11 +748,11 @@ export {
|
|
|
748
748
|
as as ReviewCard,
|
|
749
749
|
rs as ReviewRequestButton,
|
|
750
750
|
ns as ReviewResponseForm,
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
751
|
+
is as ReviewTab,
|
|
752
|
+
cs as SubtaskAddForm,
|
|
753
|
+
os as SubtaskItem,
|
|
754
|
+
ds as SubtaskList,
|
|
755
|
+
ls as SubtaskProgress,
|
|
756
756
|
us as SubtasksTab,
|
|
757
757
|
fs as TaskActionRow,
|
|
758
758
|
Te as TaskAssigneePicker,
|
|
@@ -760,10 +760,10 @@ export {
|
|
|
760
760
|
Ie as TaskDatePicker,
|
|
761
761
|
ms as TaskDetailPanel,
|
|
762
762
|
Re as TaskLabelEditor,
|
|
763
|
-
|
|
763
|
+
we as TaskMemberPicker,
|
|
764
764
|
Ke as TaskPanel,
|
|
765
|
-
|
|
765
|
+
ve as TaskPriorityPicker,
|
|
766
766
|
ps as TaskProperties,
|
|
767
767
|
Se as TaskVisibilityPicker,
|
|
768
|
-
|
|
768
|
+
hs as VisibilityWarning
|
|
769
769
|
};
|