laif-ds 0.1.44 → 0.1.46
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/index4.js +2 -5
- package/dist/_virtual/index5.js +5 -5
- package/dist/_virtual/index6.js +5 -2
- package/dist/components/ui/app-multiple-select-dropdown.js +40 -42
- package/dist/components/ui/button.js +23 -33
- package/dist/components/ui/command.js +14 -14
- package/dist/components/ui/data-table.js +180 -102
- package/dist/components/ui/table.js +30 -30
- package/dist/index.d.ts +27 -3
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import { __require as e } from "../node_modules/style-to-js/cjs/index.js";
|
|
4
|
-
var t = e();
|
|
5
|
-
const a = /* @__PURE__ */ r(t);
|
|
2
|
+
var e = { exports: {} };
|
|
6
3
|
export {
|
|
7
|
-
|
|
4
|
+
e as __module
|
|
8
5
|
};
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getDefaultExportFromCjs as
|
|
3
|
-
import { __require as
|
|
4
|
-
var t =
|
|
5
|
-
const
|
|
2
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
3
|
+
import { __require as e } from "../node_modules/style-to-js/cjs/index.js";
|
|
4
|
+
var t = e();
|
|
5
|
+
const a = /* @__PURE__ */ r(t);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|
package/dist/_virtual/index6.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
|
|
3
|
+
import { __require as r } from "../node_modules/extend/index.js";
|
|
4
|
+
var t = r();
|
|
5
|
+
const x = /* @__PURE__ */ e(t);
|
|
3
6
|
export {
|
|
4
|
-
|
|
7
|
+
x as default
|
|
5
8
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as r, jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import { cn as
|
|
2
|
+
import { jsx as r, jsxs as t, Fragment as P } from "react/jsx-runtime";
|
|
3
|
+
import * as a from "react";
|
|
4
|
+
import { cn as v } from "../../lib/utils.js";
|
|
5
5
|
import { Label as A } from "./label.js";
|
|
6
6
|
import { Badge as B } from "./badge.js";
|
|
7
|
-
import { Button as
|
|
7
|
+
import { Button as C } from "./button.js";
|
|
8
8
|
import { Command as D, CommandList as F, CommandEmpty as E, CommandGroup as G, CommandItem as X } from "./command.js";
|
|
9
9
|
import { Input as q } from "./input.js";
|
|
10
10
|
import { Checkbox as H } from "./checkbox.js";
|
|
@@ -12,7 +12,7 @@ import { CommandPortal as I } from "./command-portal.js";
|
|
|
12
12
|
import J from "../../node_modules/lucide-react/dist/esm/icons/x.js";
|
|
13
13
|
import K from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
14
14
|
import Q from "../../node_modules/lucide-react/dist/esm/icons/check.js";
|
|
15
|
-
const T =
|
|
15
|
+
const T = a.createContext({ size: "default" });
|
|
16
16
|
function ne({
|
|
17
17
|
options: o,
|
|
18
18
|
value: l,
|
|
@@ -20,16 +20,16 @@ function ne({
|
|
|
20
20
|
placeholder: N = "Seleziona...",
|
|
21
21
|
disabled: y = !1,
|
|
22
22
|
size: c = "default",
|
|
23
|
-
label:
|
|
23
|
+
label: p,
|
|
24
24
|
labelClassName: k,
|
|
25
25
|
emptyMessage: M = "Nessun risultato trovato",
|
|
26
26
|
className: L,
|
|
27
|
-
filterPlaceholder:
|
|
27
|
+
filterPlaceholder: j = "Cerca...",
|
|
28
28
|
cancelLabel: R = "Cancella selezione",
|
|
29
29
|
cancelButtonLabel: S = "Cancella",
|
|
30
30
|
maxSelectedItems: n
|
|
31
31
|
}) {
|
|
32
|
-
const u =
|
|
32
|
+
const u = a.useId(), [f, h] = a.useState(!1), [d, g] = a.useState(""), b = a.useRef(null), z = a.useCallback(
|
|
33
33
|
(e) => {
|
|
34
34
|
if (l.includes(e))
|
|
35
35
|
i(l.filter((s) => s !== e));
|
|
@@ -40,22 +40,22 @@ function ne({
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
[l, i, n]
|
|
43
|
-
),
|
|
44
|
-
i([]),
|
|
45
|
-
}, [i]), m =
|
|
43
|
+
), x = a.useCallback(() => {
|
|
44
|
+
i([]), g("");
|
|
45
|
+
}, [i]), m = a.useMemo(() => o.filter((e) => l.includes(e.value)), [o, l]), O = a.useMemo(() => d ? o.filter(
|
|
46
46
|
(e) => e.label.toLowerCase().includes(d.toLowerCase())
|
|
47
|
-
) : o, [o, d]),
|
|
48
|
-
return /* @__PURE__ */ r(T.Provider, { value: { size: c, id: u }, children: /* @__PURE__ */
|
|
49
|
-
|
|
50
|
-
/* @__PURE__ */
|
|
47
|
+
) : o, [o, d]), w = a.useMemo(() => n ? l.length >= n : !1, [l, n]);
|
|
48
|
+
return /* @__PURE__ */ r(T.Provider, { value: { size: c, id: u }, children: /* @__PURE__ */ t("div", { className: "space-y-1.5", children: [
|
|
49
|
+
p && /* @__PURE__ */ r(A, { htmlFor: u, className: k, children: p }),
|
|
50
|
+
/* @__PURE__ */ t(
|
|
51
51
|
"div",
|
|
52
52
|
{
|
|
53
|
-
ref:
|
|
53
|
+
ref: b,
|
|
54
54
|
className: "relative w-full",
|
|
55
55
|
"data-slot": "app-multiple-select-dropdown",
|
|
56
56
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
57
|
+
/* @__PURE__ */ t(
|
|
58
|
+
C,
|
|
59
59
|
{
|
|
60
60
|
id: u,
|
|
61
61
|
type: "button",
|
|
@@ -63,7 +63,7 @@ function ne({
|
|
|
63
63
|
role: "combobox",
|
|
64
64
|
"aria-expanded": f,
|
|
65
65
|
disabled: y,
|
|
66
|
-
className:
|
|
66
|
+
className: v(
|
|
67
67
|
"relative w-full justify-between border bg-transparent font-normal",
|
|
68
68
|
"border-d-input ring-offset-background focus:ring-ring flex items-center rounded-md border !bg-transparent whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
69
69
|
"aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive",
|
|
@@ -72,10 +72,10 @@ function ne({
|
|
|
72
72
|
c === "lg" && "h-10 px-4 py-2 text-lg",
|
|
73
73
|
L
|
|
74
74
|
),
|
|
75
|
-
onClick: () =>
|
|
75
|
+
onClick: () => h(!f),
|
|
76
76
|
children: [
|
|
77
|
-
/* @__PURE__ */ r("div", { className: "flex w-full items-center gap-2 overflow-hidden", children: m.length > 0 ? /* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ r("div", { className: "flex w-full items-center gap-2 overflow-hidden", children: m.length > 0 ? /* @__PURE__ */ t(P, { children: [
|
|
78
|
+
/* @__PURE__ */ t(
|
|
79
79
|
B,
|
|
80
80
|
{
|
|
81
81
|
variant: "secondary",
|
|
@@ -86,14 +86,12 @@ function ne({
|
|
|
86
86
|
]
|
|
87
87
|
}
|
|
88
88
|
),
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
|
|
89
|
+
/* @__PURE__ */ t(
|
|
90
|
+
"div",
|
|
91
91
|
{
|
|
92
|
-
|
|
93
|
-
size: "sm",
|
|
94
|
-
className: "hover:bg-d-secondary/20 h-5 w-5 rounded-full p-0",
|
|
92
|
+
className: "hover:bg-d-secondary flex h-5 w-5 items-center justify-center gap-1 rounded-full p-0",
|
|
95
93
|
onClick: (e) => {
|
|
96
|
-
|
|
94
|
+
x(), e.stopPropagation();
|
|
97
95
|
},
|
|
98
96
|
children: [
|
|
99
97
|
/* @__PURE__ */ r(J, { className: "h-3 w-3" }),
|
|
@@ -110,44 +108,44 @@ function ne({
|
|
|
110
108
|
I,
|
|
111
109
|
{
|
|
112
110
|
open: f,
|
|
113
|
-
triggerRef:
|
|
114
|
-
onClose: () =>
|
|
115
|
-
children: /* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */
|
|
111
|
+
triggerRef: b,
|
|
112
|
+
onClose: () => h(!1),
|
|
113
|
+
children: /* @__PURE__ */ t(D, { className: "bg-d-popover w-full rounded-md shadow-md", children: [
|
|
114
|
+
/* @__PURE__ */ t("div", { className: "flex items-center border-b px-3", children: [
|
|
117
115
|
/* @__PURE__ */ r(
|
|
118
116
|
q,
|
|
119
117
|
{
|
|
120
118
|
iconLeft: "Search",
|
|
121
|
-
placeholder:
|
|
119
|
+
placeholder: j,
|
|
122
120
|
value: d,
|
|
123
|
-
onChange: (e) =>
|
|
121
|
+
onChange: (e) => g(e.target.value),
|
|
124
122
|
className: "w-full !border-0 !border-none shadow-none !outline-none focus-visible:ring-0"
|
|
125
123
|
}
|
|
126
124
|
),
|
|
127
125
|
m.length > 0 && /* @__PURE__ */ r(
|
|
128
|
-
|
|
126
|
+
C,
|
|
129
127
|
{
|
|
130
128
|
variant: "ghost",
|
|
131
129
|
size: "sm",
|
|
132
130
|
className: "h-6 px-2 text-xs",
|
|
133
|
-
onClick:
|
|
131
|
+
onClick: x,
|
|
134
132
|
children: S
|
|
135
133
|
}
|
|
136
134
|
)
|
|
137
135
|
] }),
|
|
138
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ t(F, { className: "max-h-60 w-full overflow-auto", children: [
|
|
139
137
|
/* @__PURE__ */ r(E, { children: M }),
|
|
140
138
|
/* @__PURE__ */ r(G, { children: O.map((e) => {
|
|
141
139
|
const s = l.includes(e.value);
|
|
142
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ t(
|
|
143
141
|
X,
|
|
144
142
|
{
|
|
145
143
|
value: e.value,
|
|
146
|
-
disabled: e.disabled || !s &&
|
|
147
|
-
onSelect: () =>
|
|
148
|
-
className:
|
|
144
|
+
disabled: e.disabled || !s && w,
|
|
145
|
+
onSelect: () => z(e.value),
|
|
146
|
+
className: v(
|
|
149
147
|
"aria-selected:bg-d-accent aria-selected:text-d-accent-foreground flex cursor-pointer items-center gap-2 px-2 py-1.5",
|
|
150
|
-
(e.disabled || !s &&
|
|
148
|
+
(e.disabled || !s && w) && "cursor-not-allowed opacity-50"
|
|
151
149
|
),
|
|
152
150
|
children: [
|
|
153
151
|
/* @__PURE__ */ r(
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as r, jsxs as
|
|
2
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
3
3
|
import { Root as g } from "../../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
4
|
-
import { cva as
|
|
5
|
-
import { cn as
|
|
4
|
+
import { cva as h } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
5
|
+
import { cn as l } from "../../lib/utils.js";
|
|
6
6
|
import { Icon as u } from "./icon.js";
|
|
7
|
-
const
|
|
7
|
+
const m = h(
|
|
8
8
|
"cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-d-ring focus-visible:ring-d-ring/50 focus-visible:ring-[3px] aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive transition-all duration-200",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
@@ -30,41 +30,31 @@ const v = p(
|
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
32
|
function k({
|
|
33
|
-
className:
|
|
34
|
-
variant:
|
|
33
|
+
className: d,
|
|
34
|
+
variant: n,
|
|
35
35
|
size: e,
|
|
36
|
-
asChild:
|
|
37
|
-
iconLeft:
|
|
38
|
-
iconRight:
|
|
39
|
-
isLoading:
|
|
36
|
+
asChild: o = !1,
|
|
37
|
+
iconLeft: i,
|
|
38
|
+
iconRight: a,
|
|
39
|
+
isLoading: v = !1,
|
|
40
40
|
...t
|
|
41
41
|
}) {
|
|
42
|
-
const
|
|
43
|
-
return
|
|
44
|
-
|
|
42
|
+
const s = o ? g : "button";
|
|
43
|
+
return o ? /* @__PURE__ */ r(
|
|
44
|
+
s,
|
|
45
45
|
{
|
|
46
46
|
"data-slot": "button",
|
|
47
|
-
className:
|
|
47
|
+
className: l(m({ variant: n, size: e, className: d })),
|
|
48
48
|
...t
|
|
49
49
|
}
|
|
50
|
-
) : /* @__PURE__ */
|
|
51
|
-
|
|
50
|
+
) : /* @__PURE__ */ c(
|
|
51
|
+
s,
|
|
52
52
|
{
|
|
53
53
|
"data-slot": "button",
|
|
54
|
-
className:
|
|
54
|
+
className: l(m({ variant: n, size: e, className: d }), "relative"),
|
|
55
55
|
...t,
|
|
56
56
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
"div",
|
|
59
|
-
{
|
|
60
|
-
className: o(
|
|
61
|
-
"absolute inset-0",
|
|
62
|
-
"opacity-40 group-hover:opacity-80",
|
|
63
|
-
"blur-[2.5px] transition-opacity duration-500"
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
),
|
|
67
|
-
m ? /* @__PURE__ */ l(
|
|
57
|
+
v ? /* @__PURE__ */ c(
|
|
68
58
|
"svg",
|
|
69
59
|
{
|
|
70
60
|
className: "mr-1 -ml-1 animate-spin",
|
|
@@ -95,18 +85,18 @@ function k({
|
|
|
95
85
|
)
|
|
96
86
|
]
|
|
97
87
|
}
|
|
98
|
-
) :
|
|
88
|
+
) : i && /* @__PURE__ */ r(
|
|
99
89
|
u,
|
|
100
90
|
{
|
|
101
|
-
name:
|
|
91
|
+
name: i,
|
|
102
92
|
size: e === "default" ? "md" : e === "sm" ? "xs" : "sm"
|
|
103
93
|
}
|
|
104
94
|
),
|
|
105
95
|
t.children,
|
|
106
|
-
|
|
96
|
+
a && /* @__PURE__ */ r(
|
|
107
97
|
u,
|
|
108
98
|
{
|
|
109
|
-
name:
|
|
99
|
+
name: a,
|
|
110
100
|
size: e === "default" ? "md" : e === "sm" ? "xs" : "sm"
|
|
111
101
|
}
|
|
112
102
|
)
|
|
@@ -116,5 +106,5 @@ function k({
|
|
|
116
106
|
}
|
|
117
107
|
export {
|
|
118
108
|
k as Button,
|
|
119
|
-
|
|
109
|
+
m as buttonVariants
|
|
120
110
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as o, jsxs as
|
|
2
|
+
import { jsx as o, jsxs as r } from "react/jsx-runtime";
|
|
3
3
|
import { Command as d } from "../../node_modules/cmdk/dist/index.js";
|
|
4
4
|
import { cn as a } from "../../lib/utils.js";
|
|
5
5
|
import { Dialog as s, DialogHeader as c, DialogTitle as i, DialogDescription as l, DialogContent as p } from "./dialog.js";
|
|
@@ -23,26 +23,26 @@ function g({
|
|
|
23
23
|
function v({
|
|
24
24
|
title: e = "Command Palette",
|
|
25
25
|
description: t = "Search for a command to run...",
|
|
26
|
-
children:
|
|
26
|
+
children: n,
|
|
27
27
|
...m
|
|
28
28
|
}) {
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ r(s, { ...m, children: [
|
|
30
|
+
/* @__PURE__ */ r(c, { className: "sr-only", children: [
|
|
31
31
|
/* @__PURE__ */ o(i, { children: e }),
|
|
32
32
|
/* @__PURE__ */ o(l, { children: t })
|
|
33
33
|
] }),
|
|
34
|
-
/* @__PURE__ */ o(p, { className: "overflow-hidden p-0", children: /* @__PURE__ */ o(g, { className: "[&_[cmdk-group-heading]]:text-d-secondary-foreground **:data-[slot=command-d-input-wrapper]:h-12 [&_[cmdk-d-input-wrapper]_svg]:h-5 [&_[cmdk-d-input-wrapper]_svg]:w-5 [&_[cmdk-d-input]]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children:
|
|
34
|
+
/* @__PURE__ */ o(p, { className: "overflow-hidden p-0", children: /* @__PURE__ */ o(g, { className: "[&_[cmdk-group-heading]]:text-d-secondary-foreground **:data-[slot=command-d-input-wrapper]:h-12 [&_[cmdk-d-input-wrapper]_svg]:h-5 [&_[cmdk-d-input-wrapper]_svg]:w-5 [&_[cmdk-d-input]]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: n }) })
|
|
35
35
|
] });
|
|
36
36
|
}
|
|
37
37
|
function y({
|
|
38
38
|
className: e,
|
|
39
39
|
...t
|
|
40
40
|
}) {
|
|
41
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ r(
|
|
42
42
|
"div",
|
|
43
43
|
{
|
|
44
44
|
"data-slot": "command-d-input-wrapper",
|
|
45
|
-
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
45
|
+
className: "border-d-border flex h-9 items-center gap-2 border-b px-3",
|
|
46
46
|
children: [
|
|
47
47
|
/* @__PURE__ */ o(u, { className: "size-4 shrink-0 opacity-50" }),
|
|
48
48
|
/* @__PURE__ */ o(
|
|
@@ -50,7 +50,7 @@ function y({
|
|
|
50
50
|
{
|
|
51
51
|
"data-slot": "command-d-input",
|
|
52
52
|
className: a(
|
|
53
|
-
"placeholder:text-d-secondary-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
53
|
+
"placeholder:text-d-secondary-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden outline-transparent disabled:cursor-not-allowed disabled:opacity-50",
|
|
54
54
|
e
|
|
55
55
|
),
|
|
56
56
|
...t
|
|
@@ -76,7 +76,7 @@ function w({
|
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function b({
|
|
80
80
|
...e
|
|
81
81
|
}) {
|
|
82
82
|
return /* @__PURE__ */ o(
|
|
@@ -88,7 +88,7 @@ function N({
|
|
|
88
88
|
}
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function N({
|
|
92
92
|
className: e,
|
|
93
93
|
...t
|
|
94
94
|
}) {
|
|
@@ -104,7 +104,7 @@ function C({
|
|
|
104
104
|
}
|
|
105
105
|
);
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function C({
|
|
108
108
|
className: e,
|
|
109
109
|
...t
|
|
110
110
|
}) {
|
|
@@ -152,11 +152,11 @@ function S({
|
|
|
152
152
|
export {
|
|
153
153
|
g as Command,
|
|
154
154
|
v as CommandDialog,
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
b as CommandEmpty,
|
|
156
|
+
N as CommandGroup,
|
|
157
157
|
y as CommandInput,
|
|
158
158
|
D as CommandItem,
|
|
159
159
|
w as CommandList,
|
|
160
|
-
|
|
160
|
+
C as CommandSeparator,
|
|
161
161
|
S as CommandShortcut
|
|
162
162
|
};
|