laif-ds 0.2.68 → 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/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/components/ui/app-dialog.js +45 -44
- 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/components/ui/toaster.js +60 -15
- package/dist/index.d.ts +6 -2
- package/dist/index.js +377 -375
- package/dist/node_modules/eventemitter3/index2.js +1 -1
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
package/dist/_virtual/index6.js
CHANGED
package/dist/_virtual/index7.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as l, jsxs as a } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { DialogTitle as N, DialogDescription as C } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
4
|
+
import { cva as b } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
5
|
+
import { Button as y } from "./button.js";
|
|
6
|
+
import { Dialog as z, DialogTrigger as j, DialogContent as T, DialogHeader as A, DialogClose as B, DialogFooter as V } from "./dialog.js";
|
|
7
|
+
import { Typo as d } from "./typo.js";
|
|
7
8
|
import { cn as s } from "../../lib/utils.js";
|
|
8
|
-
const
|
|
9
|
+
const k = b(
|
|
9
10
|
[
|
|
10
11
|
"flex flex-col justify-between gap-2 w-full h-dvh max-w-[initial] p-6",
|
|
11
12
|
"max-sm:rounded-none max-sm:px-2 max-sm:py-3 max-sm:min-w-full max-sm:min-h-full max-sm:w-full max-sm:h-full max-sm:max-w-full max-sm:max-h-full"
|
|
@@ -25,90 +26,90 @@ const T = D(
|
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
);
|
|
28
|
-
function
|
|
29
|
+
function J({
|
|
29
30
|
children: o,
|
|
30
|
-
trigger:
|
|
31
|
+
trigger: e,
|
|
31
32
|
title: n,
|
|
32
|
-
description:
|
|
33
|
+
description: m,
|
|
33
34
|
footer: i,
|
|
34
|
-
size:
|
|
35
|
-
open:
|
|
35
|
+
size: u = "default",
|
|
36
|
+
open: r,
|
|
36
37
|
defaultOpen: c,
|
|
37
|
-
onOpenChange:
|
|
38
|
-
triggerClassName:
|
|
38
|
+
onOpenChange: f,
|
|
39
|
+
triggerClassName: t,
|
|
39
40
|
headerClassName: w,
|
|
40
41
|
bodyClassName: p,
|
|
41
|
-
footerClassName:
|
|
42
|
-
disabled:
|
|
43
|
-
asChild:
|
|
44
|
-
preventClose:
|
|
42
|
+
footerClassName: g,
|
|
43
|
+
disabled: x = !1,
|
|
44
|
+
asChild: v = !1,
|
|
45
|
+
preventClose: F,
|
|
45
46
|
...h
|
|
46
47
|
}) {
|
|
47
|
-
const
|
|
48
|
-
return
|
|
49
|
-
|
|
48
|
+
const D = r !== void 0;
|
|
49
|
+
return x ? /* @__PURE__ */ l("div", { className: t, children: e }) : /* @__PURE__ */ a(
|
|
50
|
+
z,
|
|
50
51
|
{
|
|
51
|
-
open:
|
|
52
|
+
open: D ? r : void 0,
|
|
52
53
|
defaultOpen: c,
|
|
53
|
-
onOpenChange:
|
|
54
|
+
onOpenChange: f,
|
|
54
55
|
children: [
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
e && /* @__PURE__ */ l(
|
|
57
|
+
j,
|
|
57
58
|
{
|
|
58
|
-
asChild:
|
|
59
|
-
className:
|
|
60
|
-
disabled:
|
|
61
|
-
children:
|
|
59
|
+
asChild: v,
|
|
60
|
+
className: t,
|
|
61
|
+
disabled: x,
|
|
62
|
+
children: e
|
|
62
63
|
}
|
|
63
64
|
),
|
|
64
65
|
/* @__PURE__ */ a(
|
|
65
|
-
|
|
66
|
+
T,
|
|
66
67
|
{
|
|
67
68
|
...h,
|
|
68
69
|
className: s(
|
|
69
|
-
|
|
70
|
-
size:
|
|
70
|
+
k({
|
|
71
|
+
size: u
|
|
71
72
|
}),
|
|
72
73
|
h.className
|
|
73
74
|
),
|
|
74
75
|
showCloseButton: !1,
|
|
75
76
|
children: [
|
|
76
|
-
/* @__PURE__ */ a(
|
|
77
|
+
/* @__PURE__ */ a(A, { className: s("gap-1", w), children: [
|
|
77
78
|
/* @__PURE__ */ a("div", { className: "flex w-full flex-row items-start gap-2", children: [
|
|
78
|
-
/* @__PURE__ */ l(
|
|
79
|
-
/* @__PURE__ */ l(
|
|
80
|
-
|
|
79
|
+
/* @__PURE__ */ l(N, { asChild: !0, children: /* @__PURE__ */ l(d, { variant: "h5", className: "flex flex-1", children: n }) }),
|
|
80
|
+
/* @__PURE__ */ l(B, { asChild: !0, children: /* @__PURE__ */ l(
|
|
81
|
+
y,
|
|
81
82
|
{
|
|
82
83
|
iconLeft: "X",
|
|
83
84
|
variant: "ghost",
|
|
84
85
|
size: "icon",
|
|
85
86
|
className: "size-7",
|
|
86
|
-
onClick: () =>
|
|
87
|
+
onClick: () => f?.(!1)
|
|
87
88
|
}
|
|
88
89
|
) })
|
|
89
90
|
] }),
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
m && /* @__PURE__ */ l(C, { asChild: !0, children: /* @__PURE__ */ l(
|
|
92
|
+
d,
|
|
92
93
|
{
|
|
93
94
|
variant: "caption",
|
|
94
95
|
className: "text-d-secondary-foreground flex flex-1",
|
|
95
|
-
children:
|
|
96
|
+
children: m
|
|
96
97
|
}
|
|
97
|
-
)
|
|
98
|
+
) })
|
|
98
99
|
] }),
|
|
99
100
|
o && /* @__PURE__ */ l(
|
|
100
101
|
"div",
|
|
101
102
|
{
|
|
102
103
|
className: s(
|
|
103
104
|
"border-d-border flex min-h-0 w-full flex-1 flex-col gap-2 overflow-auto py-2",
|
|
104
|
-
(!!n || !!
|
|
105
|
+
(!!n || !!m) && "border-t",
|
|
105
106
|
!!i && "border-b",
|
|
106
107
|
p
|
|
107
108
|
),
|
|
108
109
|
children: o
|
|
109
110
|
}
|
|
110
111
|
),
|
|
111
|
-
i && /* @__PURE__ */ l(
|
|
112
|
+
i && /* @__PURE__ */ l(V, { className: g, children: i })
|
|
112
113
|
]
|
|
113
114
|
}
|
|
114
115
|
)
|
|
@@ -117,7 +118,7 @@ function E({
|
|
|
117
118
|
);
|
|
118
119
|
}
|
|
119
120
|
export {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
J as AppDialog,
|
|
122
|
+
B as AppDialogClose,
|
|
123
|
+
J as default
|
|
123
124
|
};
|
|
@@ -1,151 +1,194 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { KanbanBoardProvider as
|
|
5
|
-
import { stringToHexColor as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Icon as
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { jsx as o, jsxs as l, Fragment as H } from "react/jsx-runtime";
|
|
3
|
+
import { useState as I, useMemo as P } from "react";
|
|
4
|
+
import { KanbanBoardProvider as A, KanbanBoard as F, KanbanBoardColumn as J, KanbanBoardColumnHeader as R, KanbanBoardColumnList as W, KanbanBoardColumnListItem as q, KanbanBoardCard as E, KanbanBoardCardTitle as G, KanbanBoardCardDescription as Q } from "./kanban.js";
|
|
5
|
+
import { stringToHexColor as U, cn as B, hexToRgba as K } from "../../lib/utils.js";
|
|
6
|
+
import { Button as V } from "./button.js";
|
|
7
|
+
import { Icon as X } from "./icon.js";
|
|
8
|
+
import Y from "../../node_modules/lucide-react/dist/esm/icons/lock.js";
|
|
9
|
+
import Z from "../../node_modules/lucide-react/dist/esm/icons/plus.js";
|
|
10
|
+
function ne({
|
|
11
|
+
columns: p,
|
|
12
|
+
initialTasks: w,
|
|
12
13
|
onTaskMove: m,
|
|
13
14
|
onTaskEdit: x,
|
|
14
|
-
onTaskCreate:
|
|
15
|
-
taskActions:
|
|
16
|
-
renderTaskContent:
|
|
17
|
-
className:
|
|
18
|
-
allowTaskCreate:
|
|
15
|
+
onTaskCreate: h,
|
|
16
|
+
taskActions: D,
|
|
17
|
+
renderTaskContent: g,
|
|
18
|
+
className: j,
|
|
19
|
+
allowTaskCreate: z = !0
|
|
19
20
|
}) {
|
|
20
|
-
const [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
const [N, C] = I(w), b = P(
|
|
22
|
+
() => new Set(p.filter((e) => e.disabled).map((e) => e.id)),
|
|
23
|
+
[p]
|
|
24
|
+
), y = (e) => {
|
|
25
|
+
const i = {};
|
|
26
|
+
for (const r of Object.keys(e))
|
|
27
|
+
i[r] = [...e[r]];
|
|
28
|
+
return i;
|
|
29
|
+
}, O = (e, i) => {
|
|
30
|
+
C((r) => {
|
|
31
|
+
const d = y(r);
|
|
32
|
+
let a, n;
|
|
33
|
+
for (const s of Object.keys(d)) {
|
|
34
|
+
const c = d[s].findIndex((f) => f.id === e);
|
|
31
35
|
if (c !== -1) {
|
|
32
|
-
n = s, [
|
|
36
|
+
n = s, [a] = d[s].splice(c, 1);
|
|
33
37
|
break;
|
|
34
38
|
}
|
|
35
39
|
}
|
|
36
|
-
return !
|
|
40
|
+
return !a || n === i || n && b.has(n) || b.has(i) ? r : (d[i] || (d[i] = []), d[i].push(a), n && m && m(e, n, i), d);
|
|
37
41
|
});
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
const n =
|
|
41
|
-
(
|
|
42
|
+
}, L = (e, i, r, d) => {
|
|
43
|
+
C((a) => {
|
|
44
|
+
const n = y(a), s = Object.keys(n).find(
|
|
45
|
+
(t) => n[t].some((S) => S.id === e)
|
|
42
46
|
);
|
|
43
|
-
if (!s) return
|
|
47
|
+
if (!s) return a;
|
|
44
48
|
const c = n[s].findIndex(
|
|
45
|
-
(
|
|
49
|
+
(t) => t.id === e
|
|
46
50
|
);
|
|
47
|
-
if (c === -1)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
if (c === -1 || b.has(s) || b.has(r))
|
|
52
|
+
return a;
|
|
53
|
+
const [f] = n[s].splice(c, 1);
|
|
54
|
+
n[r] || (n[r] = []);
|
|
55
|
+
const u = n[r].findIndex(
|
|
56
|
+
(t) => t.id === i
|
|
52
57
|
);
|
|
53
|
-
if (
|
|
54
|
-
n[
|
|
58
|
+
if (u === -1)
|
|
59
|
+
n[r].push(f);
|
|
55
60
|
else {
|
|
56
|
-
const
|
|
57
|
-
n[
|
|
61
|
+
const t = d === "top" ? u : u + 1;
|
|
62
|
+
n[r].splice(t, 0, f);
|
|
58
63
|
}
|
|
59
|
-
return s !==
|
|
64
|
+
return s !== r && m && m(e, s, r), n;
|
|
60
65
|
});
|
|
61
|
-
},
|
|
62
|
-
return /* @__PURE__ */
|
|
63
|
-
const
|
|
66
|
+
}, v = (e) => JSON.parse(e);
|
|
67
|
+
return /* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(F, { className: j, children: p.map((e) => {
|
|
68
|
+
const i = U(e.label), r = !!e.disabled;
|
|
64
69
|
return /* @__PURE__ */ l(
|
|
65
|
-
|
|
70
|
+
J,
|
|
66
71
|
{
|
|
67
|
-
columnId:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
columnId: e.id,
|
|
73
|
+
disabled: r,
|
|
74
|
+
onDropOverColumn: (d) => {
|
|
75
|
+
if (r) return;
|
|
76
|
+
const a = v(d);
|
|
77
|
+
O(a.id, e.id);
|
|
71
78
|
},
|
|
72
|
-
className:
|
|
79
|
+
className: B(
|
|
80
|
+
"group/column relative transition-all duration-200",
|
|
81
|
+
!r && "hover:-translate-y-0.5 hover:shadow-lg"
|
|
82
|
+
),
|
|
73
83
|
children: [
|
|
74
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ o(R, { className: "sticky top-0 z-10 mb-2 rounded-xl border border-d-border/60 bg-d-sidebar/90 px-2.5 py-2 backdrop-blur", children: /* @__PURE__ */ l("div", { className: "flex w-full items-center justify-between", children: [
|
|
75
85
|
/* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
76
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ l(
|
|
77
87
|
"div",
|
|
78
88
|
{
|
|
79
|
-
className: "flex items-center gap-1.5 rounded-
|
|
89
|
+
className: "flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs font-semibold shadow-sm",
|
|
80
90
|
style: {
|
|
81
|
-
backgroundColor:
|
|
82
|
-
color:
|
|
91
|
+
backgroundColor: K(i, 0.15),
|
|
92
|
+
color: i,
|
|
93
|
+
borderColor: K(i, 0.35)
|
|
83
94
|
},
|
|
84
|
-
children:
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ o(
|
|
97
|
+
"span",
|
|
98
|
+
{
|
|
99
|
+
className: "size-1.5 rounded-full",
|
|
100
|
+
style: { backgroundColor: i }
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
/* @__PURE__ */ o("span", { className: "max-w-[150px] truncate", children: e.label })
|
|
104
|
+
]
|
|
85
105
|
}
|
|
86
106
|
),
|
|
87
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ o("span", { className: "text-d-muted-foreground inline-flex items-center rounded-full border border-d-border/60 bg-d-muted/40 px-2 py-0.5 text-[11px] font-medium", children: N[e.id]?.length ?? 0 })
|
|
88
108
|
] }),
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
109
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-1", children: [
|
|
110
|
+
r && /* @__PURE__ */ o(
|
|
111
|
+
"span",
|
|
112
|
+
{
|
|
113
|
+
className: "text-d-muted-foreground inline-flex size-6 items-center justify-center",
|
|
114
|
+
title: "Colonna bloccata",
|
|
115
|
+
"aria-label": "Colonna bloccata",
|
|
116
|
+
children: /* @__PURE__ */ o(Y, { className: "size-3.5" })
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
z && h && /* @__PURE__ */ o(
|
|
120
|
+
V,
|
|
121
|
+
{
|
|
122
|
+
variant: "ghost",
|
|
123
|
+
size: "icon",
|
|
124
|
+
className: "text-d-muted-foreground hover:text-d-foreground h-6 w-6",
|
|
125
|
+
onClick: () => h(e.id),
|
|
126
|
+
children: /* @__PURE__ */ o(Z, { className: "size-3.5" })
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
] })
|
|
99
130
|
] }) }),
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
|
|
131
|
+
/* @__PURE__ */ o(
|
|
132
|
+
W,
|
|
102
133
|
{
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
const n = C(o);
|
|
108
|
-
O(
|
|
109
|
-
n.id,
|
|
110
|
-
e.id,
|
|
111
|
-
r.id,
|
|
112
|
-
t
|
|
113
|
-
);
|
|
114
|
-
},
|
|
115
|
-
children: /* @__PURE__ */ i(
|
|
116
|
-
J,
|
|
134
|
+
className: "px-1.5 pb-3",
|
|
135
|
+
dropDisabled: r,
|
|
136
|
+
children: N[e.id]?.map((d) => /* @__PURE__ */ o(
|
|
137
|
+
q,
|
|
117
138
|
{
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
139
|
+
cardId: d.id,
|
|
140
|
+
dropDisabled: r,
|
|
141
|
+
className: "mb-2 border-0 last:mb-0",
|
|
142
|
+
onDropOverListItem: (a, n) => {
|
|
143
|
+
if (r || n === "none") return;
|
|
144
|
+
const s = v(a);
|
|
145
|
+
L(
|
|
146
|
+
s.id,
|
|
147
|
+
d.id,
|
|
148
|
+
e.id,
|
|
149
|
+
n
|
|
150
|
+
);
|
|
151
|
+
},
|
|
152
|
+
children: /* @__PURE__ */ o(
|
|
153
|
+
E,
|
|
154
|
+
{
|
|
155
|
+
data: d,
|
|
156
|
+
dragDisabled: r,
|
|
157
|
+
className: B(
|
|
158
|
+
"group/card relative rounded-xl border border-transparent shadow-sm transition-all duration-200",
|
|
159
|
+
!r && "hover:-translate-y-0.5 hover:border-d-border/60 hover:shadow-lg"
|
|
133
160
|
),
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
161
|
+
backgroundColor: i,
|
|
162
|
+
onEdit: x ? () => x(d, e.id) : void 0,
|
|
163
|
+
actions: D?.(d, e.id),
|
|
164
|
+
meta: d.meta,
|
|
165
|
+
children: g ? g(d, e.id) : /* @__PURE__ */ l(H, { children: [
|
|
166
|
+
/* @__PURE__ */ l("div", { className: "mb-1 flex items-start gap-2", children: [
|
|
167
|
+
d.icon && /* @__PURE__ */ o(
|
|
168
|
+
X,
|
|
169
|
+
{
|
|
170
|
+
name: d.icon,
|
|
171
|
+
size: "sm",
|
|
172
|
+
className: "text-d-muted-foreground mt-0.5 shrink-0"
|
|
173
|
+
}
|
|
174
|
+
),
|
|
175
|
+
/* @__PURE__ */ o(G, { className: "flex-1 text-sm leading-snug font-semibold", children: d.title })
|
|
176
|
+
] }),
|
|
177
|
+
d.description && /* @__PURE__ */ o(Q, { className: "text-d-muted-foreground mt-1.5 line-clamp-2 text-xs leading-relaxed", children: d.description })
|
|
178
|
+
] })
|
|
179
|
+
}
|
|
180
|
+
)
|
|
181
|
+
},
|
|
182
|
+
d.id
|
|
183
|
+
))
|
|
184
|
+
}
|
|
185
|
+
)
|
|
143
186
|
]
|
|
144
187
|
},
|
|
145
|
-
|
|
188
|
+
e.id
|
|
146
189
|
);
|
|
147
190
|
}) }) });
|
|
148
191
|
}
|
|
149
192
|
export {
|
|
150
|
-
|
|
193
|
+
ne as AppKanban
|
|
151
194
|
};
|