laif-ds 0.2.69 → 0.2.70
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/components/ui/app-kanban.js +155 -112
- package/dist/components/ui/kanban.js +414 -285
- package/dist/components/ui/textarea.js +21 -20
- package/dist/index.d.ts +1 -0
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
|
@@ -1,69 +1,69 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { Popover as
|
|
7
|
-
import { TooltipProvider as
|
|
8
|
-
import { Typo as
|
|
9
|
-
import { cn as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
const
|
|
13
|
-
function
|
|
14
|
-
const r =
|
|
2
|
+
import { jsx as p, jsxs as C, Fragment as K } from "react/jsx-runtime";
|
|
3
|
+
import { useId as $, useRef as P, useCallback as h, useMemo as S, createContext as V, useState as w, useLayoutEffect as q, useEffect as E, useContext as _ } from "react";
|
|
4
|
+
import { createPortal as U } from "react-dom";
|
|
5
|
+
import { Button as O } from "./button.js";
|
|
6
|
+
import { Popover as W, PopoverTrigger as Y, PopoverContent as J } from "./popover.js";
|
|
7
|
+
import { TooltipProvider as G } from "./tooltip.js";
|
|
8
|
+
import { Typo as z } from "./typo.js";
|
|
9
|
+
import { cn as D } from "../../lib/utils.js";
|
|
10
|
+
import X from "../../node_modules/lucide-react/dist/esm/icons/pencil.js";
|
|
11
|
+
import Q from "../../node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.js";
|
|
12
|
+
const M = V(void 0);
|
|
13
|
+
function Z(e) {
|
|
14
|
+
const r = _(M);
|
|
15
15
|
if (!r)
|
|
16
16
|
throw new Error("useDndMonitor must be used within a DndMonitorProvider");
|
|
17
|
-
const { registerMonitor:
|
|
18
|
-
|
|
17
|
+
const { registerMonitor: l, unregisterMonitor: t } = r;
|
|
18
|
+
E(() => (l(e), () => {
|
|
19
19
|
t(e);
|
|
20
|
-
}), [e,
|
|
20
|
+
}), [e, l, t]);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
const e =
|
|
22
|
+
function L() {
|
|
23
|
+
const e = _(M);
|
|
24
24
|
if (!e)
|
|
25
25
|
throw new Error("useDndEvents must be used within a DndMonitorProvider");
|
|
26
|
-
const { activeIdRef: r, draggableDescribedById:
|
|
27
|
-
(
|
|
28
|
-
r.current =
|
|
26
|
+
const { activeIdRef: r, draggableDescribedById: l, triggerEvent: t } = e, u = h(
|
|
27
|
+
(i) => {
|
|
28
|
+
r.current = i, t("onDragStart", i);
|
|
29
29
|
},
|
|
30
30
|
[t, r]
|
|
31
|
-
),
|
|
32
|
-
(
|
|
33
|
-
t("onDragMove",
|
|
31
|
+
), d = h(
|
|
32
|
+
(i, n) => {
|
|
33
|
+
t("onDragMove", i, n);
|
|
34
34
|
},
|
|
35
35
|
[t]
|
|
36
|
-
),
|
|
37
|
-
(
|
|
38
|
-
const
|
|
39
|
-
t("onDragOver",
|
|
36
|
+
), g = h(
|
|
37
|
+
(i, n) => {
|
|
38
|
+
const c = i || r.current;
|
|
39
|
+
t("onDragOver", c, n);
|
|
40
40
|
},
|
|
41
41
|
[t, r]
|
|
42
|
-
),
|
|
43
|
-
(
|
|
44
|
-
t("onDragEnd",
|
|
42
|
+
), a = h(
|
|
43
|
+
(i, n) => {
|
|
44
|
+
t("onDragEnd", i, n);
|
|
45
45
|
},
|
|
46
46
|
[t]
|
|
47
|
-
),
|
|
48
|
-
(
|
|
49
|
-
t("onDragCancel",
|
|
47
|
+
), m = h(
|
|
48
|
+
(i) => {
|
|
49
|
+
t("onDragCancel", i);
|
|
50
50
|
},
|
|
51
51
|
[t]
|
|
52
52
|
);
|
|
53
53
|
return {
|
|
54
|
-
draggableDescribedById:
|
|
55
|
-
onDragStart:
|
|
56
|
-
onDragMove:
|
|
57
|
-
onDragOver:
|
|
58
|
-
onDragEnd:
|
|
59
|
-
onDragCancel:
|
|
54
|
+
draggableDescribedById: l,
|
|
55
|
+
onDragStart: u,
|
|
56
|
+
onDragMove: d,
|
|
57
|
+
onDragOver: g,
|
|
58
|
+
onDragEnd: a,
|
|
59
|
+
onDragCancel: m
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
const
|
|
62
|
+
const ee = `
|
|
63
63
|
To pick up a draggable item, press the space bar.
|
|
64
64
|
While dragging, use the arrow keys to move the item.
|
|
65
65
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
66
|
-
`,
|
|
66
|
+
`, re = {
|
|
67
67
|
onDragStart(e) {
|
|
68
68
|
return `Picked up draggable item ${e}.`;
|
|
69
69
|
},
|
|
@@ -77,409 +77,538 @@ Press space again to drop the item in its new position, or press escape to cance
|
|
|
77
77
|
return `Dragging was cancelled. Draggable item ${e} was dropped.`;
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
function
|
|
80
|
+
function te({
|
|
81
81
|
announcement: e,
|
|
82
82
|
ariaLiveType: r = "assertive",
|
|
83
|
-
className:
|
|
83
|
+
className: l,
|
|
84
84
|
id: t,
|
|
85
|
-
ref:
|
|
86
|
-
...
|
|
85
|
+
ref: u,
|
|
86
|
+
...d
|
|
87
87
|
}) {
|
|
88
|
-
return /* @__PURE__ */
|
|
88
|
+
return /* @__PURE__ */ p(
|
|
89
89
|
"div",
|
|
90
90
|
{
|
|
91
91
|
"aria-live": r,
|
|
92
92
|
"aria-atomic": !0,
|
|
93
|
-
className:
|
|
93
|
+
className: D(
|
|
94
94
|
"clip-[rect(0_0_0_0)] clip-path-[inset(100%)] fixed top-0 left-0 -m-px h-px w-px overflow-hidden border-0 p-0 whitespace-nowrap",
|
|
95
|
-
|
|
95
|
+
l
|
|
96
96
|
),
|
|
97
97
|
id: t,
|
|
98
|
-
ref:
|
|
98
|
+
ref: u,
|
|
99
99
|
role: "status",
|
|
100
|
-
...
|
|
100
|
+
...d,
|
|
101
101
|
children: e
|
|
102
102
|
}
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function ne({
|
|
106
106
|
id: e,
|
|
107
107
|
value: r,
|
|
108
|
-
className:
|
|
108
|
+
className: l,
|
|
109
109
|
ref: t,
|
|
110
|
-
...
|
|
110
|
+
...u
|
|
111
111
|
}) {
|
|
112
|
-
return /* @__PURE__ */
|
|
112
|
+
return /* @__PURE__ */ p("div", { id: e, className: D("hidden", l), ref: t, ...u, children: r });
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
const [e, r] =
|
|
116
|
-
return { announce:
|
|
114
|
+
function oe() {
|
|
115
|
+
const [e, r] = w("");
|
|
116
|
+
return { announce: h((t) => {
|
|
117
117
|
t != null && r(t);
|
|
118
118
|
}, []), announcement: e };
|
|
119
119
|
}
|
|
120
|
-
const
|
|
121
|
-
announcements: e =
|
|
120
|
+
const ae = ({
|
|
121
|
+
announcements: e = re,
|
|
122
122
|
container: r,
|
|
123
|
-
hiddenTextDescribedById:
|
|
124
|
-
screenReaderInstructions: t =
|
|
123
|
+
hiddenTextDescribedById: l,
|
|
124
|
+
screenReaderInstructions: t = ee
|
|
125
125
|
}) => {
|
|
126
|
-
const { announce:
|
|
127
|
-
if (
|
|
128
|
-
|
|
129
|
-
}, []),
|
|
130
|
-
|
|
126
|
+
const { announce: u, announcement: d } = oe(), g = $(), [a, m] = w(!1);
|
|
127
|
+
if (E(() => {
|
|
128
|
+
m(!0);
|
|
129
|
+
}, []), Z(
|
|
130
|
+
S(
|
|
131
131
|
() => ({
|
|
132
|
-
onDragStart(
|
|
133
|
-
|
|
132
|
+
onDragStart(n) {
|
|
133
|
+
u(e.onDragStart(n));
|
|
134
134
|
},
|
|
135
|
-
onDragMove(
|
|
136
|
-
e.onDragMove &&
|
|
135
|
+
onDragMove(n, c) {
|
|
136
|
+
e.onDragMove && u(e.onDragMove(n, c));
|
|
137
137
|
},
|
|
138
|
-
onDragOver(
|
|
139
|
-
|
|
138
|
+
onDragOver(n, c) {
|
|
139
|
+
u(e.onDragOver(n, c));
|
|
140
140
|
},
|
|
141
|
-
onDragEnd(
|
|
142
|
-
|
|
141
|
+
onDragEnd(n, c) {
|
|
142
|
+
u(e.onDragEnd(n, c));
|
|
143
143
|
},
|
|
144
|
-
onDragCancel(
|
|
145
|
-
|
|
144
|
+
onDragCancel(n) {
|
|
145
|
+
u(e.onDragCancel(n));
|
|
146
146
|
}
|
|
147
147
|
}),
|
|
148
|
-
[
|
|
148
|
+
[u, e]
|
|
149
149
|
)
|
|
150
|
-
), !
|
|
150
|
+
), !a)
|
|
151
151
|
return null;
|
|
152
|
-
const
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
|
|
152
|
+
const i = /* @__PURE__ */ C(K, { children: [
|
|
153
|
+
/* @__PURE__ */ p(
|
|
154
|
+
ne,
|
|
155
155
|
{
|
|
156
|
-
id:
|
|
156
|
+
id: l,
|
|
157
157
|
value: t
|
|
158
158
|
}
|
|
159
159
|
),
|
|
160
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ p(te, { id: g, announcement: d })
|
|
161
161
|
] });
|
|
162
|
-
return r ?
|
|
163
|
-
},
|
|
162
|
+
return r ? U(i, r) : i;
|
|
163
|
+
}, ve = ({
|
|
164
164
|
announcements: e,
|
|
165
165
|
screenReaderInstructions: r,
|
|
166
|
-
container:
|
|
166
|
+
container: l,
|
|
167
167
|
children: t
|
|
168
168
|
}) => {
|
|
169
|
-
const
|
|
170
|
-
(
|
|
171
|
-
|
|
169
|
+
const u = $(), d = P([]), g = P(""), a = h(
|
|
170
|
+
(c) => {
|
|
171
|
+
d.current.push(c);
|
|
172
172
|
},
|
|
173
173
|
[]
|
|
174
|
-
),
|
|
175
|
-
(
|
|
176
|
-
|
|
177
|
-
(
|
|
174
|
+
), m = h(
|
|
175
|
+
(c) => {
|
|
176
|
+
d.current = d.current.filter(
|
|
177
|
+
(f) => f !== c
|
|
178
178
|
);
|
|
179
179
|
},
|
|
180
180
|
[]
|
|
181
|
-
),
|
|
182
|
-
(
|
|
183
|
-
for (const
|
|
184
|
-
const
|
|
185
|
-
|
|
181
|
+
), i = h(
|
|
182
|
+
(c, f, y) => {
|
|
183
|
+
for (const T of d.current) {
|
|
184
|
+
const s = T[c];
|
|
185
|
+
s && s(f, y);
|
|
186
186
|
}
|
|
187
187
|
},
|
|
188
188
|
[]
|
|
189
|
-
),
|
|
189
|
+
), n = S(
|
|
190
190
|
() => ({
|
|
191
|
-
activeIdRef:
|
|
192
|
-
draggableDescribedById:
|
|
193
|
-
registerMonitor:
|
|
194
|
-
unregisterMonitor:
|
|
195
|
-
triggerEvent:
|
|
191
|
+
activeIdRef: g,
|
|
192
|
+
draggableDescribedById: u,
|
|
193
|
+
registerMonitor: a,
|
|
194
|
+
unregisterMonitor: m,
|
|
195
|
+
triggerEvent: i
|
|
196
196
|
}),
|
|
197
197
|
[
|
|
198
|
-
|
|
199
|
-
s,
|
|
200
|
-
p,
|
|
198
|
+
g,
|
|
201
199
|
u,
|
|
202
|
-
a
|
|
200
|
+
a,
|
|
201
|
+
m,
|
|
202
|
+
i
|
|
203
203
|
]
|
|
204
204
|
);
|
|
205
|
-
return /* @__PURE__ */
|
|
205
|
+
return /* @__PURE__ */ p(G, { children: /* @__PURE__ */ C(M.Provider, { value: n, children: [
|
|
206
206
|
t,
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
|
|
207
|
+
/* @__PURE__ */ p(
|
|
208
|
+
ae,
|
|
209
209
|
{
|
|
210
210
|
announcements: e,
|
|
211
211
|
screenReaderInstructions: r,
|
|
212
|
-
container:
|
|
213
|
-
hiddenTextDescribedById:
|
|
212
|
+
container: l,
|
|
213
|
+
hiddenTextDescribedById: u
|
|
214
214
|
}
|
|
215
215
|
)
|
|
216
216
|
] }) });
|
|
217
|
-
},
|
|
217
|
+
}, N = {
|
|
218
218
|
CARD: "kanban-board-card"
|
|
219
|
-
};
|
|
220
|
-
function
|
|
219
|
+
}, A = 48, H = 28;
|
|
220
|
+
function I(e, r) {
|
|
221
|
+
e && (typeof e == "function" ? e(r) : e.current = r);
|
|
222
|
+
}
|
|
223
|
+
function j(e) {
|
|
224
|
+
const r = e.dataTransfer?.types;
|
|
225
|
+
return r ? Array.from(r).includes(N.CARD) : !1;
|
|
226
|
+
}
|
|
227
|
+
function F(e, r, l) {
|
|
228
|
+
const t = e.getBoundingClientRect(), u = r === "x" ? t.left : t.top, d = r === "x" ? t.right : t.bottom, g = l - u, a = d - l, m = r === "x" ? "scrollLeft" : "scrollTop", i = r === "x" ? e.scrollWidth - e.clientWidth : e.scrollHeight - e.clientHeight, n = e[m];
|
|
229
|
+
if (g < A && n > 0) {
|
|
230
|
+
const c = H * ((A - g) / A);
|
|
231
|
+
e[m] = n - Math.ceil(c);
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
if (a < A && n < i) {
|
|
235
|
+
const c = H * ((A - a) / A);
|
|
236
|
+
e[m] = n + Math.ceil(c);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
function xe({
|
|
221
240
|
className: e,
|
|
222
241
|
ref: r,
|
|
223
|
-
|
|
242
|
+
onDragOverCapture: l,
|
|
243
|
+
style: t,
|
|
244
|
+
...u
|
|
224
245
|
}) {
|
|
225
|
-
|
|
246
|
+
const d = P(null), [g, a] = w(null), m = P(null), i = P(null), n = h((s) => {
|
|
247
|
+
m.current !== s && (m.current = s, a(s));
|
|
248
|
+
}, []), c = h(() => {
|
|
249
|
+
const s = d.current;
|
|
250
|
+
if (!s) return;
|
|
251
|
+
if (t && Object.prototype.hasOwnProperty.call(
|
|
252
|
+
t,
|
|
253
|
+
"--kanban-column-min-height"
|
|
254
|
+
)) {
|
|
255
|
+
n(null);
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
if (Array.from(
|
|
259
|
+
s.querySelectorAll('[data-kanban-column-list="true"]')
|
|
260
|
+
).some(
|
|
261
|
+
(k) => k.scrollHeight > k.clientHeight + 1
|
|
262
|
+
)) {
|
|
263
|
+
n(null);
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
const o = Array.from(
|
|
267
|
+
s.querySelectorAll('[data-kanban-column="true"]')
|
|
268
|
+
);
|
|
269
|
+
if (!o.length) {
|
|
270
|
+
n(null);
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
const b = s.style.getPropertyValue(
|
|
274
|
+
"--kanban-column-min-height"
|
|
275
|
+
);
|
|
276
|
+
b && s.style.setProperty("--kanban-column-min-height", "0px");
|
|
277
|
+
let x = 0;
|
|
278
|
+
for (const k of o)
|
|
279
|
+
x = Math.max(x, k.scrollHeight);
|
|
280
|
+
b && s.style.setProperty("--kanban-column-min-height", b);
|
|
281
|
+
const B = Math.ceil(x);
|
|
282
|
+
n(Number.isFinite(B) && B > 0 ? B : 0);
|
|
283
|
+
}, [n, t]), f = h(() => {
|
|
284
|
+
i.current === null && (i.current = requestAnimationFrame(() => {
|
|
285
|
+
i.current = null, c();
|
|
286
|
+
}));
|
|
287
|
+
}, [c]);
|
|
288
|
+
q(() => {
|
|
289
|
+
f();
|
|
290
|
+
}, [f]), E(() => {
|
|
291
|
+
const s = d.current;
|
|
292
|
+
if (!s) return;
|
|
293
|
+
const v = () => f(), R = new ResizeObserver(v);
|
|
294
|
+
R.observe(s);
|
|
295
|
+
const o = new MutationObserver(v);
|
|
296
|
+
return o.observe(s, { childList: !0, subtree: !0 }), window.addEventListener("resize", v), () => {
|
|
297
|
+
R.disconnect(), o.disconnect(), window.removeEventListener("resize", v), i.current !== null && cancelAnimationFrame(i.current);
|
|
298
|
+
};
|
|
299
|
+
}, [f]);
|
|
300
|
+
const y = h(
|
|
301
|
+
(s) => {
|
|
302
|
+
j(s) && d.current && F(d.current, "x", s.clientX), l?.(s);
|
|
303
|
+
},
|
|
304
|
+
[l]
|
|
305
|
+
), T = S(() => {
|
|
306
|
+
const s = t ? { ...t } : void 0, v = s && Object.prototype.hasOwnProperty.call(
|
|
307
|
+
s,
|
|
308
|
+
"--kanban-column-min-height"
|
|
309
|
+
);
|
|
310
|
+
return !v && g && s && (s["--kanban-column-min-height"] = `${g}px`), !v && g && !s ? {
|
|
311
|
+
"--kanban-column-min-height": `${g}px`
|
|
312
|
+
} : s;
|
|
313
|
+
}, [g, t]);
|
|
314
|
+
return /* @__PURE__ */ p(
|
|
226
315
|
"div",
|
|
227
316
|
{
|
|
228
|
-
className:
|
|
229
|
-
"flex h-full flex-
|
|
317
|
+
className: D(
|
|
318
|
+
"relative flex h-full w-full flex-1 items-stretch gap-x-4 overflow-x-auto py-2 pr-2 select-none",
|
|
230
319
|
e
|
|
231
320
|
),
|
|
321
|
+
"data-kanban-board": "true",
|
|
232
322
|
draggable: !1,
|
|
233
|
-
onDragStart: (
|
|
234
|
-
|
|
323
|
+
onDragStart: (s) => {
|
|
324
|
+
s.preventDefault(), s.stopPropagation();
|
|
235
325
|
},
|
|
236
|
-
|
|
237
|
-
|
|
326
|
+
onDragOverCapture: y,
|
|
327
|
+
ref: (s) => {
|
|
328
|
+
d.current = s, I(r, s);
|
|
329
|
+
},
|
|
330
|
+
style: T,
|
|
331
|
+
...u
|
|
238
332
|
}
|
|
239
333
|
);
|
|
240
334
|
}
|
|
241
|
-
const
|
|
242
|
-
function
|
|
335
|
+
const se = "relative flex h-full min-w-[16rem] flex-[1_0_18rem] flex-col rounded-2xl border border-d-border/60 bg-d-sidebar/80 p-1.5 shadow-sm backdrop-blur transition-colors min-h-[var(--kanban-column-min-height,0px)]";
|
|
336
|
+
function ye({
|
|
243
337
|
className: e,
|
|
244
338
|
columnId: r,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
339
|
+
disabled: l = !1,
|
|
340
|
+
onDropOverColumn: t,
|
|
341
|
+
ref: u,
|
|
342
|
+
...d
|
|
248
343
|
}) {
|
|
249
|
-
const [
|
|
250
|
-
return /* @__PURE__ */
|
|
344
|
+
const [g, a] = w(!1), [m, i] = w(!1), { onDragEnd: n, onDragOver: c } = L();
|
|
345
|
+
return /* @__PURE__ */ p(
|
|
251
346
|
"section",
|
|
252
347
|
{
|
|
253
348
|
"aria-labelledby": `column-${r}-title`,
|
|
254
|
-
className:
|
|
255
|
-
|
|
256
|
-
|
|
349
|
+
className: D(
|
|
350
|
+
se,
|
|
351
|
+
g && "border-d-primary/80 bg-d-primary/10 ring-2 ring-d-primary/30",
|
|
352
|
+
m && "border-d-destructive/70 bg-d-destructive/10 ring-2 ring-d-destructive/20",
|
|
257
353
|
e
|
|
258
354
|
),
|
|
355
|
+
"aria-disabled": l,
|
|
356
|
+
"data-kanban-column": "true",
|
|
259
357
|
draggable: !1,
|
|
260
|
-
onDragStart: (
|
|
261
|
-
|
|
358
|
+
onDragStart: (f) => {
|
|
359
|
+
f.preventDefault(), f.stopPropagation();
|
|
262
360
|
},
|
|
263
361
|
onDragLeave: () => {
|
|
264
|
-
|
|
362
|
+
a(!1), i(!1);
|
|
265
363
|
},
|
|
266
|
-
onDragOver: (
|
|
267
|
-
|
|
364
|
+
onDragOver: (f) => {
|
|
365
|
+
if (f.dataTransfer.types.includes(N.CARD)) {
|
|
366
|
+
if (l) {
|
|
367
|
+
a(!1), i(!0);
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
f.preventDefault(), i(!1), a(!0), c("", r);
|
|
371
|
+
}
|
|
268
372
|
},
|
|
269
|
-
onDrop: (
|
|
270
|
-
if (
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
373
|
+
onDrop: (f) => {
|
|
374
|
+
if (f.dataTransfer.types.includes(N.CARD)) {
|
|
375
|
+
if (l) {
|
|
376
|
+
a(!1), i(!1);
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
f.preventDefault(), a(!1), i(!1);
|
|
380
|
+
const y = f.dataTransfer.getData(N.CARD);
|
|
381
|
+
t?.(y), n("", r);
|
|
274
382
|
}
|
|
275
383
|
},
|
|
276
|
-
ref:
|
|
277
|
-
...
|
|
384
|
+
ref: u,
|
|
385
|
+
...d
|
|
278
386
|
}
|
|
279
387
|
);
|
|
280
388
|
}
|
|
281
|
-
function
|
|
389
|
+
function Ce({
|
|
282
390
|
className: e,
|
|
283
391
|
ref: r,
|
|
284
|
-
...
|
|
392
|
+
...l
|
|
285
393
|
}) {
|
|
286
|
-
return /* @__PURE__ */
|
|
394
|
+
return /* @__PURE__ */ p(
|
|
287
395
|
"div",
|
|
288
396
|
{
|
|
289
|
-
className:
|
|
397
|
+
className: D("flex items-center justify-between px-2 py-1", e),
|
|
290
398
|
ref: r,
|
|
291
|
-
...
|
|
399
|
+
...l
|
|
292
400
|
}
|
|
293
401
|
);
|
|
294
402
|
}
|
|
295
|
-
function
|
|
403
|
+
function we({
|
|
296
404
|
className: e,
|
|
297
405
|
ref: r,
|
|
298
|
-
|
|
406
|
+
dropDisabled: l = !1,
|
|
407
|
+
onDragOverCapture: t,
|
|
408
|
+
...u
|
|
299
409
|
}) {
|
|
300
|
-
|
|
410
|
+
const d = P(null), g = h(
|
|
411
|
+
(a) => {
|
|
412
|
+
if (l) {
|
|
413
|
+
t?.(a);
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
j(a) && d.current && F(d.current, "y", a.clientY), t?.(a);
|
|
417
|
+
},
|
|
418
|
+
[l, t]
|
|
419
|
+
);
|
|
420
|
+
return /* @__PURE__ */ p(
|
|
301
421
|
"ul",
|
|
302
422
|
{
|
|
303
|
-
className:
|
|
304
|
-
|
|
305
|
-
|
|
423
|
+
className: D("min-h-0 flex-1 overflow-y-auto", e),
|
|
424
|
+
"data-kanban-column-list": "true",
|
|
425
|
+
onDragOverCapture: g,
|
|
426
|
+
ref: (a) => {
|
|
427
|
+
d.current = a, I(r, a);
|
|
428
|
+
},
|
|
429
|
+
...u
|
|
306
430
|
}
|
|
307
431
|
);
|
|
308
432
|
}
|
|
309
|
-
const
|
|
310
|
-
function
|
|
433
|
+
const ie = "-mb-[2px] rounded-xl border-b-2 border-t-2 border-b-transparent border-t-transparent px-2 py-1 last:mb-0 transition-colors";
|
|
434
|
+
function Ne({
|
|
311
435
|
cardId: e,
|
|
312
436
|
className: r,
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
437
|
+
dropDisabled: l = !1,
|
|
438
|
+
onDropOverListItem: t,
|
|
439
|
+
ref: u,
|
|
440
|
+
...d
|
|
316
441
|
}) {
|
|
317
|
-
const [
|
|
318
|
-
return /* @__PURE__ */
|
|
442
|
+
const [g, a] = w("none"), { onDragOver: m, onDragEnd: i } = L();
|
|
443
|
+
return /* @__PURE__ */ p(
|
|
319
444
|
"li",
|
|
320
445
|
{
|
|
321
|
-
className:
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
446
|
+
className: D(
|
|
447
|
+
ie,
|
|
448
|
+
g === "top" && "border-t-d-primary !border-t-[3px]",
|
|
449
|
+
g === "bottom" && "border-b-d-primary !border-b-[3px]",
|
|
325
450
|
r
|
|
326
451
|
),
|
|
327
452
|
onDragLeave: () => {
|
|
328
|
-
|
|
453
|
+
a("none");
|
|
329
454
|
},
|
|
330
|
-
onDragOver: (
|
|
331
|
-
if (
|
|
332
|
-
|
|
333
|
-
const
|
|
334
|
-
|
|
455
|
+
onDragOver: (n) => {
|
|
456
|
+
if (!l && n.dataTransfer.types.includes(N.CARD)) {
|
|
457
|
+
n.preventDefault(), n.stopPropagation();
|
|
458
|
+
const c = n.currentTarget.getBoundingClientRect(), f = (c.top + c.bottom) / 2;
|
|
459
|
+
a(n.clientY <= f ? "top" : "bottom"), m("", e);
|
|
335
460
|
}
|
|
336
461
|
},
|
|
337
|
-
onDrop: (
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
462
|
+
onDrop: (n) => {
|
|
463
|
+
if (l) return;
|
|
464
|
+
n.stopPropagation();
|
|
465
|
+
const c = n.dataTransfer.getData(N.CARD);
|
|
466
|
+
t?.(c, g), i(JSON.parse(c).id, e), a("none");
|
|
341
467
|
},
|
|
342
|
-
ref:
|
|
343
|
-
...
|
|
468
|
+
ref: u,
|
|
469
|
+
...d
|
|
344
470
|
}
|
|
345
471
|
);
|
|
346
472
|
}
|
|
347
|
-
const
|
|
348
|
-
function
|
|
473
|
+
const le = "p-2.5 text-start";
|
|
474
|
+
function Te({
|
|
349
475
|
className: e,
|
|
350
476
|
data: r,
|
|
351
|
-
isActive:
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
477
|
+
isActive: l = !1,
|
|
478
|
+
dragDisabled: t = !1,
|
|
479
|
+
onEdit: u,
|
|
480
|
+
actions: d,
|
|
481
|
+
meta: g,
|
|
482
|
+
backgroundColor: a,
|
|
483
|
+
ref: m,
|
|
484
|
+
children: i,
|
|
485
|
+
...n
|
|
359
486
|
}) {
|
|
360
|
-
const [
|
|
361
|
-
return /* @__PURE__ */
|
|
487
|
+
const [c, f] = w(!1), [y, T] = w(!1), { draggableDescribedById: s, onDragStart: v } = L(), R = u || d && d.length > 0;
|
|
488
|
+
return /* @__PURE__ */ C(
|
|
362
489
|
"div",
|
|
363
490
|
{
|
|
364
491
|
role: "button",
|
|
365
492
|
tabIndex: 0,
|
|
366
|
-
"aria-describedby":
|
|
367
|
-
"aria-roledescription": "draggable",
|
|
368
|
-
draggable: !
|
|
369
|
-
onDragStart: (
|
|
370
|
-
|
|
371
|
-
|
|
493
|
+
"aria-describedby": t ? void 0 : s,
|
|
494
|
+
"aria-roledescription": t ? void 0 : "draggable",
|
|
495
|
+
draggable: !t,
|
|
496
|
+
onDragStart: (o) => {
|
|
497
|
+
if (t) {
|
|
498
|
+
o.preventDefault(), o.stopPropagation();
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
501
|
+
o.stopPropagation(), f(!0), o.dataTransfer.effectAllowed = "move", o.dataTransfer.setData(
|
|
502
|
+
N.CARD,
|
|
372
503
|
JSON.stringify(r)
|
|
373
504
|
);
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
), setTimeout(() => document.body.removeChild(
|
|
505
|
+
const b = o.currentTarget.cloneNode(!0), x = o.currentTarget.getBoundingClientRect();
|
|
506
|
+
b.style.position = "absolute", b.style.top = "-9999px", b.style.width = `${x.width}px`, b.style.opacity = "0.8", document.body.appendChild(b), o.dataTransfer.setDragImage(
|
|
507
|
+
b,
|
|
508
|
+
x.width / 2,
|
|
509
|
+
x.height / 2
|
|
510
|
+
), setTimeout(() => document.body.removeChild(b), 0), o.currentTarget.blur(), v(r.id);
|
|
380
511
|
},
|
|
381
512
|
onDragEnd: () => {
|
|
382
|
-
|
|
513
|
+
f(!1);
|
|
383
514
|
},
|
|
384
|
-
onClick: (
|
|
385
|
-
|
|
515
|
+
onClick: (o) => {
|
|
516
|
+
c && (o.preventDefault(), o.stopPropagation());
|
|
386
517
|
},
|
|
387
|
-
onKeyDown: (
|
|
388
|
-
(
|
|
518
|
+
onKeyDown: (o) => {
|
|
519
|
+
(o.key === "Enter" || o.key === " ") && o.preventDefault();
|
|
389
520
|
},
|
|
390
|
-
className:
|
|
391
|
-
"border-d-border text-d-card-foreground rounded-
|
|
392
|
-
!
|
|
393
|
-
|
|
394
|
-
"focus-visible:ring-d-ring inline-flex w-full
|
|
395
|
-
|
|
396
|
-
|
|
521
|
+
className: D(
|
|
522
|
+
"border-d-border text-d-card-foreground rounded-xl border shadow-sm",
|
|
523
|
+
!a && "bg-d-card/95",
|
|
524
|
+
le,
|
|
525
|
+
"focus-visible:ring-d-ring inline-flex w-full touch-manipulation flex-col gap-2 transition-all duration-200 focus-visible:ring-1 focus-visible:outline-none",
|
|
526
|
+
t ? "group/card relative cursor-default" : c ? "cursor-grabbing active:cursor-grabbing opacity-40" : "group/card relative cursor-grab hover:-translate-y-0.5 hover:shadow-lg",
|
|
527
|
+
l && "rotate-1 transform shadow-lg",
|
|
397
528
|
e
|
|
398
529
|
),
|
|
399
530
|
style: {
|
|
400
|
-
backgroundColor:
|
|
401
|
-
borderColor:
|
|
402
|
-
...
|
|
531
|
+
backgroundColor: a ? `${a}18` : void 0,
|
|
532
|
+
borderColor: a ? `${a}35` : void 0,
|
|
533
|
+
...n.style
|
|
403
534
|
},
|
|
404
|
-
ref:
|
|
405
|
-
...
|
|
535
|
+
ref: m,
|
|
536
|
+
...n,
|
|
406
537
|
children: [
|
|
407
|
-
|
|
408
|
-
|
|
538
|
+
i,
|
|
539
|
+
g && g.length > 0 && /* @__PURE__ */ p("div", { className: "mt-1.5 flex flex-wrap gap-1.5", children: g.map((o, b) => /* @__PURE__ */ C(
|
|
409
540
|
"div",
|
|
410
541
|
{
|
|
411
|
-
className: "inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px]",
|
|
542
|
+
className: "text-d-muted-foreground inline-flex items-center gap-1 rounded-full border bg-d-muted/40 px-2 py-0.5 text-[11px]",
|
|
412
543
|
style: {
|
|
413
|
-
|
|
414
|
-
color: void 0,
|
|
415
|
-
borderColor: l ? `${l}40` : void 0
|
|
544
|
+
borderColor: a ? `${a}40` : void 0
|
|
416
545
|
},
|
|
417
546
|
children: [
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
|
|
420
|
-
/* @__PURE__ */
|
|
421
|
-
/* @__PURE__ */
|
|
547
|
+
/* @__PURE__ */ p("span", { className: "truncate font-medium", children: o.name }),
|
|
548
|
+
o.value && /* @__PURE__ */ C(K, { children: [
|
|
549
|
+
/* @__PURE__ */ p("span", { className: "opacity-60", children: "•" }),
|
|
550
|
+
/* @__PURE__ */ p("span", { className: "truncate opacity-80", children: o.value })
|
|
422
551
|
] })
|
|
423
552
|
]
|
|
424
553
|
},
|
|
425
|
-
|
|
554
|
+
b
|
|
426
555
|
)) }),
|
|
427
|
-
|
|
556
|
+
R && !c && /* @__PURE__ */ C(
|
|
428
557
|
"div",
|
|
429
558
|
{
|
|
430
|
-
className:
|
|
559
|
+
className: D(
|
|
431
560
|
"bg-d-card border-d-border absolute top-2 right-2 items-center gap-1 rounded-md border p-0.5 shadow-sm",
|
|
432
|
-
|
|
561
|
+
y ? "flex" : "hidden group-focus-within/card:flex group-hover/card:flex"
|
|
433
562
|
),
|
|
434
563
|
children: [
|
|
435
|
-
|
|
436
|
-
|
|
564
|
+
u && /* @__PURE__ */ p(
|
|
565
|
+
O,
|
|
437
566
|
{
|
|
438
567
|
variant: "ghost",
|
|
439
568
|
size: "icon",
|
|
440
569
|
className: "hover:bg-d-accent size-6",
|
|
441
|
-
onClick: (
|
|
442
|
-
|
|
570
|
+
onClick: (o) => {
|
|
571
|
+
o.stopPropagation(), o.preventDefault(), c || u();
|
|
443
572
|
},
|
|
444
|
-
children: /* @__PURE__ */
|
|
573
|
+
children: /* @__PURE__ */ p(X, { className: "size-3.5" })
|
|
445
574
|
}
|
|
446
575
|
),
|
|
447
|
-
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
-
|
|
576
|
+
d && d.length > 0 && /* @__PURE__ */ C(W, { open: y, onOpenChange: T, children: [
|
|
577
|
+
/* @__PURE__ */ p(Y, { asChild: !0, children: /* @__PURE__ */ p(
|
|
578
|
+
O,
|
|
450
579
|
{
|
|
451
580
|
variant: "ghost",
|
|
452
581
|
size: "icon",
|
|
453
582
|
className: "hover:bg-d-accent size-6",
|
|
454
|
-
onClick: (
|
|
455
|
-
|
|
583
|
+
onClick: (o) => {
|
|
584
|
+
o.stopPropagation();
|
|
456
585
|
},
|
|
457
|
-
children: /* @__PURE__ */
|
|
586
|
+
children: /* @__PURE__ */ p(Q, { className: "size-3.5" })
|
|
458
587
|
}
|
|
459
588
|
) }),
|
|
460
|
-
/* @__PURE__ */
|
|
461
|
-
|
|
589
|
+
/* @__PURE__ */ p(
|
|
590
|
+
J,
|
|
462
591
|
{
|
|
463
592
|
className: "w-48 p-1",
|
|
464
593
|
align: "end",
|
|
465
594
|
side: "bottom",
|
|
466
595
|
sideOffset: 8,
|
|
467
|
-
onClick: (
|
|
468
|
-
children: /* @__PURE__ */
|
|
469
|
-
|
|
596
|
+
onClick: (o) => o.stopPropagation(),
|
|
597
|
+
children: /* @__PURE__ */ p("div", { className: "flex flex-col gap-0.5", children: d.map((o, b) => /* @__PURE__ */ C(
|
|
598
|
+
O,
|
|
470
599
|
{
|
|
471
|
-
variant:
|
|
600
|
+
variant: o.variant === "destructive" ? "ghost-destructive" : "ghost",
|
|
472
601
|
size: "sm",
|
|
473
602
|
className: "w-full justify-start gap-2",
|
|
474
|
-
onClick: (
|
|
475
|
-
|
|
603
|
+
onClick: (x) => {
|
|
604
|
+
x.stopPropagation(), x.preventDefault(), o.onClick(), T(!1);
|
|
476
605
|
},
|
|
477
606
|
children: [
|
|
478
|
-
|
|
479
|
-
|
|
607
|
+
o.icon && /* @__PURE__ */ p("span", { className: "size-4", children: o.icon }),
|
|
608
|
+
o.label
|
|
480
609
|
]
|
|
481
610
|
},
|
|
482
|
-
|
|
611
|
+
b
|
|
483
612
|
)) })
|
|
484
613
|
}
|
|
485
614
|
)
|
|
@@ -491,30 +620,30 @@ function be({
|
|
|
491
620
|
}
|
|
492
621
|
);
|
|
493
622
|
}
|
|
494
|
-
function
|
|
623
|
+
function Ae({
|
|
495
624
|
className: e,
|
|
496
625
|
...r
|
|
497
626
|
}) {
|
|
498
|
-
return /* @__PURE__ */
|
|
499
|
-
|
|
627
|
+
return /* @__PURE__ */ p(
|
|
628
|
+
z,
|
|
500
629
|
{
|
|
501
630
|
variant: "small",
|
|
502
631
|
as: "h3",
|
|
503
|
-
className:
|
|
632
|
+
className: D("text-sm font-semibold", e),
|
|
504
633
|
...r
|
|
505
634
|
}
|
|
506
635
|
);
|
|
507
636
|
}
|
|
508
|
-
function
|
|
637
|
+
function Pe({
|
|
509
638
|
className: e,
|
|
510
639
|
...r
|
|
511
640
|
}) {
|
|
512
|
-
return /* @__PURE__ */
|
|
513
|
-
|
|
641
|
+
return /* @__PURE__ */ p(
|
|
642
|
+
z,
|
|
514
643
|
{
|
|
515
644
|
variant: "caption",
|
|
516
645
|
as: "p",
|
|
517
|
-
className:
|
|
646
|
+
className: D(
|
|
518
647
|
"text-d-muted-foreground leading-relaxed whitespace-pre-wrap",
|
|
519
648
|
e
|
|
520
649
|
),
|
|
@@ -523,23 +652,23 @@ function ve({
|
|
|
523
652
|
);
|
|
524
653
|
}
|
|
525
654
|
export {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
655
|
+
xe as KanbanBoard,
|
|
656
|
+
ae as KanbanBoardAccessibility,
|
|
657
|
+
Te as KanbanBoardCard,
|
|
658
|
+
Pe as KanbanBoardCardDescription,
|
|
659
|
+
Ae as KanbanBoardCardTitle,
|
|
660
|
+
ye as KanbanBoardColumn,
|
|
661
|
+
Ce as KanbanBoardColumnHeader,
|
|
662
|
+
we as KanbanBoardColumnList,
|
|
663
|
+
Ne as KanbanBoardColumnListItem,
|
|
664
|
+
M as KanbanBoardContext,
|
|
665
|
+
ne as KanbanBoardHiddenText,
|
|
666
|
+
te as KanbanBoardLiveRegion,
|
|
667
|
+
ve as KanbanBoardProvider,
|
|
668
|
+
re as defaultAnnouncements,
|
|
669
|
+
ee as defaultScreenReaderInstructions,
|
|
670
|
+
se as kanbanBoardColumnClassNames,
|
|
671
|
+
ie as kanbanBoardColumnListItemClassNames,
|
|
672
|
+
oe as useAnnouncement,
|
|
673
|
+
L as useDndEvents
|
|
545
674
|
};
|