laif-ds 0.1.4 → 0.1.6
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/button.js +1 -1
- package/dist/components/ui/card.js +41 -34
- package/dist/components/ui/data-table.js +122 -0
- package/dist/components/ui/toaster.js +26 -0
- package/dist/components/ui/typo.js +53 -0
- package/dist/dist/_virtual/jsx-runtime.js +6 -0
- package/dist/dist/_virtual/jsx-runtime2.js +5 -0
- package/dist/dist/_virtual/react-jsx-runtime.development.js +5 -0
- package/dist/dist/_virtual/react-jsx-runtime.production.js +5 -0
- package/dist/dist/components/ui/checkbox.js +32 -0
- package/dist/dist/components/ui/scroll-area.js +61 -0
- package/dist/dist/components/ui/table.js +87 -0
- package/dist/dist/lib/utils.js +9 -0
- package/dist/dist/node_modules/@radix-ui/number/dist/index.js +7 -0
- package/dist/dist/node_modules/@radix-ui/primitive/dist/index.js +10 -0
- package/dist/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +136 -0
- package/dist/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +30 -0
- package/dist/dist/node_modules/@radix-ui/react-context/dist/index.js +56 -0
- package/dist/dist/node_modules/@radix-ui/react-direction/dist/index.js +10 -0
- package/dist/dist/node_modules/@radix-ui/react-presence/dist/index.js +72 -0
- package/dist/dist/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
- package/dist/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js +534 -0
- package/dist/dist/node_modules/@radix-ui/react-slot/dist/index.js +50 -0
- package/dist/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +14 -0
- package/dist/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +33 -0
- package/dist/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
- package/dist/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +9 -0
- package/dist/dist/node_modules/@radix-ui/react-use-size/dist/index.js +28 -0
- package/dist/dist/node_modules/clsx/dist/clsx.js +18 -0
- package/dist/dist/node_modules/lucide-react/dist/esm/Icon.js +41 -0
- package/dist/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +28 -0
- package/dist/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +21 -0
- package/dist/dist/node_modules/lucide-react/dist/esm/icons/check.js +13 -0
- package/dist/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +20 -0
- package/dist/dist/node_modules/react/cjs/react-jsx-runtime.development.js +248 -0
- package/dist/dist/node_modules/react/cjs/react-jsx-runtime.production.js +36 -0
- package/dist/dist/node_modules/react/jsx-runtime.js +11 -0
- package/dist/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2732 -0
- package/dist/index.d.ts +85 -18
- package/dist/index.js +253 -249
- package/dist/node_modules/@tanstack/react-table/build/lib/index.js +103 -0
- package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1896 -0
- package/dist/styles.css +1 -1
- package/package.json +9 -7
- package/dist/components/ui/sonner.js +0 -23
|
@@ -5,7 +5,7 @@ import { cva as l } from "../../node_modules/class-variance-authority/dist/index
|
|
|
5
5
|
import { cn as u } from "../../lib/utils.js";
|
|
6
6
|
import { Icon as c } from "./icon.js";
|
|
7
7
|
const v = l(
|
|
8
|
-
"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-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
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-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
@@ -1,77 +1,84 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as
|
|
2
|
+
import { j as r } from "../../_virtual/jsx-runtime.js";
|
|
3
|
+
import * as d from "react";
|
|
3
4
|
import { cn as e } from "../../lib/utils.js";
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
const s = d.createContext({ size: "default" }), c = {
|
|
6
|
+
sm: "py-3 px-3 gap-4",
|
|
7
|
+
default: "py-6 px-6 gap-6",
|
|
8
|
+
lg: "py-8 px-8 gap-8"
|
|
9
|
+
};
|
|
10
|
+
function x({ className: a, size: t = "default", ...o }) {
|
|
11
|
+
return /* @__PURE__ */ r.jsx(s.Provider, { value: { size: t }, children: /* @__PURE__ */ r.jsx(
|
|
6
12
|
"div",
|
|
7
13
|
{
|
|
8
14
|
"data-slot": "card",
|
|
9
15
|
className: e(
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
`bg-card text-card-foreground flex flex-col rounded-xl border shadow-sm ${c[t]}`,
|
|
17
|
+
a
|
|
12
18
|
),
|
|
13
|
-
...
|
|
19
|
+
...o
|
|
14
20
|
}
|
|
15
|
-
);
|
|
21
|
+
) });
|
|
16
22
|
}
|
|
17
|
-
function
|
|
18
|
-
|
|
23
|
+
function u({ className: a, ...t }) {
|
|
24
|
+
const { size: o } = d.useContext(s), n = o === "sm" ? "px-3" : o === "lg" ? "px-8" : "px-6";
|
|
25
|
+
return /* @__PURE__ */ r.jsx(
|
|
19
26
|
"div",
|
|
20
27
|
{
|
|
21
28
|
"data-slot": "card-header",
|
|
22
29
|
className: e(
|
|
23
|
-
|
|
24
|
-
|
|
30
|
+
`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 ${n} has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6`,
|
|
31
|
+
a
|
|
25
32
|
),
|
|
26
|
-
...
|
|
33
|
+
...t
|
|
27
34
|
}
|
|
28
35
|
);
|
|
29
36
|
}
|
|
30
|
-
function
|
|
31
|
-
return /* @__PURE__ */
|
|
37
|
+
function m({ className: a, ...t }) {
|
|
38
|
+
return /* @__PURE__ */ r.jsx(
|
|
32
39
|
"div",
|
|
33
40
|
{
|
|
34
41
|
"data-slot": "card-title",
|
|
35
|
-
className: e("leading-none font-semibold",
|
|
36
|
-
...
|
|
42
|
+
className: e("leading-none font-semibold", a),
|
|
43
|
+
...t
|
|
37
44
|
}
|
|
38
45
|
);
|
|
39
46
|
}
|
|
40
|
-
function
|
|
41
|
-
return /* @__PURE__ */
|
|
47
|
+
function f({ className: a, ...t }) {
|
|
48
|
+
return /* @__PURE__ */ r.jsx(
|
|
42
49
|
"div",
|
|
43
50
|
{
|
|
44
51
|
"data-slot": "card-description",
|
|
45
|
-
className: e("text-muted-foreground text-sm",
|
|
46
|
-
...
|
|
52
|
+
className: e("text-muted-foreground text-sm", a),
|
|
53
|
+
...t
|
|
47
54
|
}
|
|
48
55
|
);
|
|
49
56
|
}
|
|
50
|
-
function
|
|
51
|
-
return /* @__PURE__ */
|
|
57
|
+
function g({ className: a, ...t }) {
|
|
58
|
+
return /* @__PURE__ */ r.jsx(
|
|
52
59
|
"div",
|
|
53
60
|
{
|
|
54
61
|
"data-slot": "card-content",
|
|
55
|
-
className: e("px-6",
|
|
56
|
-
...
|
|
62
|
+
className: e("px-6", a),
|
|
63
|
+
...t
|
|
57
64
|
}
|
|
58
65
|
);
|
|
59
66
|
}
|
|
60
|
-
function
|
|
61
|
-
return /* @__PURE__ */
|
|
67
|
+
function C({ className: a, ...t }) {
|
|
68
|
+
return /* @__PURE__ */ r.jsx(
|
|
62
69
|
"div",
|
|
63
70
|
{
|
|
64
71
|
"data-slot": "card-footer",
|
|
65
|
-
className: e("flex items-center px-6 [.border-t]:pt-6",
|
|
66
|
-
...
|
|
72
|
+
className: e("flex items-center px-6 [.border-t]:pt-6", a),
|
|
73
|
+
...t
|
|
67
74
|
}
|
|
68
75
|
);
|
|
69
76
|
}
|
|
70
77
|
export {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
x as Card,
|
|
79
|
+
g as CardContent,
|
|
80
|
+
f as CardDescription,
|
|
81
|
+
C as CardFooter,
|
|
82
|
+
u as CardHeader,
|
|
83
|
+
m as CardTitle
|
|
77
84
|
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as e } from "../../_virtual/jsx-runtime.js";
|
|
3
|
+
import { useReactTable as $, flexRender as x } from "../../node_modules/@tanstack/react-table/build/lib/index.js";
|
|
4
|
+
import { Checkbox as h } from "../../dist/components/ui/checkbox.js";
|
|
5
|
+
import { ScrollArea as A, ScrollBar as f } from "../../dist/components/ui/scroll-area.js";
|
|
6
|
+
import { Table as H, TableHeader as V, TableRow as a, TableHead as I, TableBody as B, TableCell as n } from "../../dist/components/ui/table.js";
|
|
7
|
+
import E, { useState as c, useEffect as _ } from "react";
|
|
8
|
+
import { getFilteredRowModel as L, getSortedRowModel as W, getPaginationRowModel as q, getCoreRowModel as G } from "../../node_modules/@tanstack/table-core/build/lib/index.js";
|
|
9
|
+
function Z({
|
|
10
|
+
columns: o,
|
|
11
|
+
data: j,
|
|
12
|
+
loading: S = !1,
|
|
13
|
+
loadingComponent: d,
|
|
14
|
+
emptyComponent: b,
|
|
15
|
+
className: R,
|
|
16
|
+
rowSelection: w = {},
|
|
17
|
+
onRowSelectionChange: m,
|
|
18
|
+
checkable: i = !1,
|
|
19
|
+
onCheckedRowsChange: r,
|
|
20
|
+
notFoundMessage: p = "Nessun risultato trovato.",
|
|
21
|
+
loadingMessage: C = "Caricamento in corso..."
|
|
22
|
+
}) {
|
|
23
|
+
var u;
|
|
24
|
+
const [M, N] = c([]), [y, T] = c([]), [k, v] = c({}), [F, z] = c({}), g = m ? w : F, D = m || z, P = E.useMemo(() => i ? [
|
|
25
|
+
{
|
|
26
|
+
id: "select",
|
|
27
|
+
header: ({ table: l }) => /* @__PURE__ */ e.jsx("div", { className: "text-center", children: /* @__PURE__ */ e.jsx(
|
|
28
|
+
h,
|
|
29
|
+
{
|
|
30
|
+
checked: l.getIsAllPageRowsSelected(),
|
|
31
|
+
onCheckedChange: (t) => l.toggleAllPageRowsSelected(!!t),
|
|
32
|
+
"aria-label": "Seleziona tutti"
|
|
33
|
+
}
|
|
34
|
+
) }),
|
|
35
|
+
cell: ({ row: l }) => /* @__PURE__ */ e.jsx("div", { className: "text-center", children: /* @__PURE__ */ e.jsx(
|
|
36
|
+
h,
|
|
37
|
+
{
|
|
38
|
+
checked: l.getIsSelected(),
|
|
39
|
+
onCheckedChange: (t) => l.toggleSelected(!!t),
|
|
40
|
+
"aria-label": "Seleziona riga"
|
|
41
|
+
}
|
|
42
|
+
) }),
|
|
43
|
+
enableSorting: !1,
|
|
44
|
+
enableHiding: !1
|
|
45
|
+
},
|
|
46
|
+
...o
|
|
47
|
+
] : o, [o, i]), s = $({
|
|
48
|
+
data: j,
|
|
49
|
+
columns: P,
|
|
50
|
+
getCoreRowModel: G(),
|
|
51
|
+
getPaginationRowModel: q(),
|
|
52
|
+
onSortingChange: N,
|
|
53
|
+
getSortedRowModel: W(),
|
|
54
|
+
onColumnFiltersChange: T,
|
|
55
|
+
getFilteredRowModel: L(),
|
|
56
|
+
onColumnVisibilityChange: v,
|
|
57
|
+
onRowSelectionChange: D,
|
|
58
|
+
state: {
|
|
59
|
+
sorting: M,
|
|
60
|
+
columnFilters: y,
|
|
61
|
+
columnVisibility: k,
|
|
62
|
+
rowSelection: g
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
return _(() => {
|
|
66
|
+
if (r && i) {
|
|
67
|
+
const l = s.getFilteredSelectedRowModel().rows.map((t) => t.original);
|
|
68
|
+
r(l);
|
|
69
|
+
}
|
|
70
|
+
}, [s, r, i, g]), /* @__PURE__ */ e.jsx("div", { className: `w-full ${R}`, children: /* @__PURE__ */ e.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ e.jsxs(A, { className: "h-full w-full", children: [
|
|
71
|
+
/* @__PURE__ */ e.jsx(f, { orientation: "horizontal" }),
|
|
72
|
+
/* @__PURE__ */ e.jsx(f, { orientation: "vertical" }),
|
|
73
|
+
/* @__PURE__ */ e.jsxs(H, { children: [
|
|
74
|
+
/* @__PURE__ */ e.jsx(V, { children: s.getHeaderGroups().map((l) => /* @__PURE__ */ e.jsx(a, { children: l.headers.map((t) => /* @__PURE__ */ e.jsx(
|
|
75
|
+
I,
|
|
76
|
+
{
|
|
77
|
+
className: `${t.column.columnDef.sticky ? "sticky left-0 z-10 bg-background" : ""}`,
|
|
78
|
+
children: t.isPlaceholder ? null : x(
|
|
79
|
+
t.column.columnDef.header,
|
|
80
|
+
t.getContext()
|
|
81
|
+
)
|
|
82
|
+
},
|
|
83
|
+
t.id
|
|
84
|
+
)) }, l.id)) }),
|
|
85
|
+
/* @__PURE__ */ e.jsx(B, { children: S ? d ? /* @__PURE__ */ e.jsx(a, { children: /* @__PURE__ */ e.jsx(n, { colSpan: 1e3, className: "h-24", children: d }) }) : /* @__PURE__ */ e.jsx(a, { children: /* @__PURE__ */ e.jsx(
|
|
86
|
+
n,
|
|
87
|
+
{
|
|
88
|
+
colSpan: o.length,
|
|
89
|
+
className: "h-24 text-center",
|
|
90
|
+
children: C
|
|
91
|
+
}
|
|
92
|
+
) }) : (u = s.getRowModel().rows) != null && u.length ? s.getRowModel().rows.map((l) => /* @__PURE__ */ e.jsx(
|
|
93
|
+
a,
|
|
94
|
+
{
|
|
95
|
+
"data-state": l.getIsSelected() && "selected",
|
|
96
|
+
children: l.getVisibleCells().map((t) => /* @__PURE__ */ e.jsx(
|
|
97
|
+
n,
|
|
98
|
+
{
|
|
99
|
+
className: `${t.column.columnDef.sticky ? "sticky left-0 z-10 bg-background" : ""}`,
|
|
100
|
+
children: x(
|
|
101
|
+
t.column.columnDef.cell,
|
|
102
|
+
t.getContext()
|
|
103
|
+
)
|
|
104
|
+
},
|
|
105
|
+
t.id
|
|
106
|
+
))
|
|
107
|
+
},
|
|
108
|
+
l.id
|
|
109
|
+
)) : /* @__PURE__ */ e.jsx(a, { children: /* @__PURE__ */ e.jsx(
|
|
110
|
+
n,
|
|
111
|
+
{
|
|
112
|
+
colSpan: o.length,
|
|
113
|
+
className: "h-24 text-center",
|
|
114
|
+
children: b || p
|
|
115
|
+
}
|
|
116
|
+
) }) })
|
|
117
|
+
] })
|
|
118
|
+
] }) }) });
|
|
119
|
+
}
|
|
120
|
+
export {
|
|
121
|
+
Z as DataTable
|
|
122
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as r } from "../../_virtual/jsx-runtime.js";
|
|
3
|
+
import { useTheme as e } from "../../node_modules/next-themes/dist/index.js";
|
|
4
|
+
import { Toaster as s } from "../../node_modules/sonner/dist/index.js";
|
|
5
|
+
const p = ({ ...t }) => {
|
|
6
|
+
const { theme: o = "system" } = e();
|
|
7
|
+
return /* @__PURE__ */ r.jsx(
|
|
8
|
+
s,
|
|
9
|
+
{
|
|
10
|
+
theme: o,
|
|
11
|
+
className: "toaster group",
|
|
12
|
+
toastOptions: {
|
|
13
|
+
classNames: {
|
|
14
|
+
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
15
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
16
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
17
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
...t
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
p as Toaster
|
|
26
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as d } from "../../_virtual/jsx-runtime.js";
|
|
3
|
+
import { cn as i } from "../../lib/utils.js";
|
|
4
|
+
const s = {
|
|
5
|
+
"hero-title": "text-5xl md:text-6xl font-extrabold leading-tight tracking-tight",
|
|
6
|
+
title: "text-3xl md:text-4xl font-bold leading-snug",
|
|
7
|
+
subtitle: "text-xl md:text-2xl font-semibold leading-snug text-muted-foreground",
|
|
8
|
+
body: "text-base md:text-lg font-normal leading-relaxed",
|
|
9
|
+
"body-bold": "text-base md:text-lg font-semibold leading-relaxed",
|
|
10
|
+
caption: "text-xs md:text-sm font-normal leading-tight text-muted-foreground",
|
|
11
|
+
overline: "text-xs uppercase tracking-widest font-medium text-muted-foreground",
|
|
12
|
+
button: "text-sm font-semibold uppercase tracking-wide",
|
|
13
|
+
small: "text-xs font-normal leading-tight",
|
|
14
|
+
h1: "text-4xl md:text-5xl font-extrabold leading-tight",
|
|
15
|
+
h2: "text-3xl md:text-4xl font-bold leading-snug",
|
|
16
|
+
h3: "text-2xl md:text-3xl font-semibold leading-snug",
|
|
17
|
+
h4: "text-xl md:text-2xl font-semibold leading-snug",
|
|
18
|
+
h5: "text-lg md:text-xl font-medium leading-snug"
|
|
19
|
+
}, a = {
|
|
20
|
+
"hero-title": "h1",
|
|
21
|
+
title: "h2",
|
|
22
|
+
subtitle: "h3",
|
|
23
|
+
body: "p",
|
|
24
|
+
"body-bold": "p",
|
|
25
|
+
caption: "span",
|
|
26
|
+
overline: "span",
|
|
27
|
+
button: "span",
|
|
28
|
+
small: "span",
|
|
29
|
+
h1: "h1",
|
|
30
|
+
h2: "h2",
|
|
31
|
+
h3: "h3",
|
|
32
|
+
h4: "h4",
|
|
33
|
+
h5: "h5"
|
|
34
|
+
}, r = ({
|
|
35
|
+
variant: t = "body",
|
|
36
|
+
as: e,
|
|
37
|
+
className: n,
|
|
38
|
+
children: l,
|
|
39
|
+
...o
|
|
40
|
+
}) => {
|
|
41
|
+
const x = e || a[t] || "span";
|
|
42
|
+
return /* @__PURE__ */ d.jsx(
|
|
43
|
+
x,
|
|
44
|
+
{
|
|
45
|
+
className: i(s[t], n),
|
|
46
|
+
...o,
|
|
47
|
+
children: l
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
r as Typo
|
|
53
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as r } from "../../_virtual/jsx-runtime.js";
|
|
3
|
+
import { Root as i, Indicator as t } from "../../node_modules/@radix-ui/react-checkbox/dist/index.js";
|
|
4
|
+
import { cn as s } from "../../lib/utils.js";
|
|
5
|
+
import o from "../../node_modules/lucide-react/dist/esm/icons/check.js";
|
|
6
|
+
function u({
|
|
7
|
+
className: e,
|
|
8
|
+
...a
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ r.jsx(
|
|
11
|
+
i,
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "checkbox",
|
|
14
|
+
className: s(
|
|
15
|
+
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
16
|
+
e
|
|
17
|
+
),
|
|
18
|
+
...a,
|
|
19
|
+
children: /* @__PURE__ */ r.jsx(
|
|
20
|
+
t,
|
|
21
|
+
{
|
|
22
|
+
"data-slot": "checkbox-indicator",
|
|
23
|
+
className: "flex items-center justify-center text-current transition-none",
|
|
24
|
+
children: /* @__PURE__ */ r.jsx(o, { className: "size-3.5" })
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
u as Checkbox
|
|
32
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as r } from "../../_virtual/jsx-runtime.js";
|
|
3
|
+
import { Root as s, Viewport as t, Corner as i, ScrollAreaScrollbar as n, ScrollAreaThumb as c } from "../../node_modules/@radix-ui/react-scroll-area/dist/index.js";
|
|
4
|
+
import { cn as l } from "../../lib/utils.js";
|
|
5
|
+
function m({
|
|
6
|
+
className: o,
|
|
7
|
+
children: e,
|
|
8
|
+
...a
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ r.jsxs(
|
|
11
|
+
s,
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "scroll-area",
|
|
14
|
+
className: l("relative", o),
|
|
15
|
+
...a,
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ r.jsx(
|
|
18
|
+
t,
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "scroll-area-viewport",
|
|
21
|
+
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
22
|
+
children: e
|
|
23
|
+
}
|
|
24
|
+
),
|
|
25
|
+
/* @__PURE__ */ r.jsx(u, {}),
|
|
26
|
+
/* @__PURE__ */ r.jsx(i, {})
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function u({
|
|
32
|
+
className: o,
|
|
33
|
+
orientation: e = "vertical",
|
|
34
|
+
...a
|
|
35
|
+
}) {
|
|
36
|
+
return /* @__PURE__ */ r.jsx(
|
|
37
|
+
n,
|
|
38
|
+
{
|
|
39
|
+
"data-slot": "scroll-area-scrollbar",
|
|
40
|
+
orientation: e,
|
|
41
|
+
className: l(
|
|
42
|
+
"flex touch-none p-px transition-colors select-none",
|
|
43
|
+
e === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
44
|
+
e === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
45
|
+
o
|
|
46
|
+
),
|
|
47
|
+
...a,
|
|
48
|
+
children: /* @__PURE__ */ r.jsx(
|
|
49
|
+
c,
|
|
50
|
+
{
|
|
51
|
+
"data-slot": "scroll-area-thumb",
|
|
52
|
+
className: "bg-border relative flex-1 rounded-full"
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
m as ScrollArea,
|
|
60
|
+
u as ScrollBar
|
|
61
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as t } from "../../_virtual/jsx-runtime.js";
|
|
3
|
+
import { cn as s } from "../../lib/utils.js";
|
|
4
|
+
function r({ className: a, ...e }) {
|
|
5
|
+
return /* @__PURE__ */ t.jsx(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
"data-slot": "table-container",
|
|
9
|
+
className: "relative w-full overflow-x-auto",
|
|
10
|
+
children: /* @__PURE__ */ t.jsx(
|
|
11
|
+
"table",
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "table",
|
|
14
|
+
className: s("w-full caption-bottom text-sm", a),
|
|
15
|
+
...e
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function c({ className: a, ...e }) {
|
|
22
|
+
return /* @__PURE__ */ t.jsx(
|
|
23
|
+
"thead",
|
|
24
|
+
{
|
|
25
|
+
"data-slot": "table-header",
|
|
26
|
+
className: s("[&_tr]:border-b", a),
|
|
27
|
+
...e
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function n({ className: a, ...e }) {
|
|
32
|
+
return /* @__PURE__ */ t.jsx(
|
|
33
|
+
"tbody",
|
|
34
|
+
{
|
|
35
|
+
"data-slot": "table-body",
|
|
36
|
+
className: s("[&_tr:last-child]:border-0", a),
|
|
37
|
+
...e
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function d({ className: a, ...e }) {
|
|
42
|
+
return /* @__PURE__ */ t.jsx(
|
|
43
|
+
"tr",
|
|
44
|
+
{
|
|
45
|
+
"data-slot": "table-row",
|
|
46
|
+
className: s(
|
|
47
|
+
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
|
|
48
|
+
a
|
|
49
|
+
),
|
|
50
|
+
...e
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
function b({ className: a, ...e }) {
|
|
55
|
+
return /* @__PURE__ */ t.jsx(
|
|
56
|
+
"th",
|
|
57
|
+
{
|
|
58
|
+
"data-slot": "table-head",
|
|
59
|
+
className: s(
|
|
60
|
+
"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
61
|
+
a
|
|
62
|
+
),
|
|
63
|
+
...e
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
function i({ className: a, ...e }) {
|
|
68
|
+
return /* @__PURE__ */ t.jsx(
|
|
69
|
+
"td",
|
|
70
|
+
{
|
|
71
|
+
"data-slot": "table-cell",
|
|
72
|
+
className: s(
|
|
73
|
+
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
74
|
+
a
|
|
75
|
+
),
|
|
76
|
+
...e
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
export {
|
|
81
|
+
r as Table,
|
|
82
|
+
n as TableBody,
|
|
83
|
+
i as TableCell,
|
|
84
|
+
b as TableHead,
|
|
85
|
+
c as TableHeader,
|
|
86
|
+
d as TableRow
|
|
87
|
+
};
|