@definable/ui 0.1.30 → 0.1.32
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/alert.js +10 -10
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/button.d.ts +11 -10
- package/dist/components/button.js +56 -47
- package/dist/components/card.js +24 -24
- package/dist/components/command-menu.js +14 -14
- package/dist/components/command.d.ts +7 -7
- package/dist/components/command.js +5 -5
- package/dist/components/dialog.js +12 -12
- package/dist/components/drawer.js +1 -1
- package/dist/components/dropzone.js +3 -3
- package/dist/components/image-cropper-modal.js +33 -33
- package/dist/components/image-cropper.js +35 -35
- package/dist/components/input.js +1 -1
- package/dist/components/loader.js +1 -1
- package/dist/components/modal.js +28 -28
- package/dist/components/picker.js +2 -2
- package/dist/components/select.js +4 -4
- package/dist/components/selection-bar.js +1 -1
- package/dist/components/sheet.js +28 -28
- package/dist/components/slider.js +5 -5
- package/dist/components/switch.js +1 -1
- package/dist/components/table-mobile.js +37 -37
- package/dist/components/table.js +32 -32
- package/dist/components/tabs.js +1 -1
- package/dist/components/textarea.js +6 -6
- package/dist/components/tooltip.js +5 -5
- package/dist/components/use-toast.js +3 -3
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/components/alert.js
CHANGED
|
@@ -8,7 +8,7 @@ const g = p(
|
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
|
-
default: "bg-
|
|
11
|
+
default: "bg-secondary text-foreground",
|
|
12
12
|
destructive: "border-destructive/50 text-destructive dark:border-destructive"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
@@ -16,7 +16,7 @@ const g = p(
|
|
|
16
16
|
variant: "default"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
),
|
|
19
|
+
), x = i.forwardRef(({ className: t, variant: r, isOpen: e, onClose: o, onConfirm: l, title: s, description: n, confirmText: m, cancelText: c, ...f }, u) => e !== void 0 && o && l && s && n ? /* @__PURE__ */ a(
|
|
20
20
|
v,
|
|
21
21
|
{
|
|
22
22
|
isOpen: e,
|
|
@@ -37,8 +37,8 @@ const g = p(
|
|
|
37
37
|
...f
|
|
38
38
|
}
|
|
39
39
|
));
|
|
40
|
-
|
|
41
|
-
const
|
|
40
|
+
x.displayName = "Alert";
|
|
41
|
+
const A = i.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ a(
|
|
42
42
|
"h5",
|
|
43
43
|
{
|
|
44
44
|
ref: e,
|
|
@@ -46,8 +46,8 @@ const x = i.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ a(
|
|
|
46
46
|
...r
|
|
47
47
|
}
|
|
48
48
|
));
|
|
49
|
-
|
|
50
|
-
const
|
|
49
|
+
A.displayName = "AlertTitle";
|
|
50
|
+
const N = i.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ a(
|
|
51
51
|
"div",
|
|
52
52
|
{
|
|
53
53
|
ref: e,
|
|
@@ -55,9 +55,9 @@ const A = i.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ a(
|
|
|
55
55
|
...r
|
|
56
56
|
}
|
|
57
57
|
));
|
|
58
|
-
|
|
58
|
+
N.displayName = "AlertDescription";
|
|
59
59
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
x as Alert,
|
|
61
|
+
N as AlertDescription,
|
|
62
|
+
A as AlertTitle
|
|
63
63
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "secondary" | "outline" | "default" | "destructive" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
6
6
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
7
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { ReactNode, ButtonHTMLAttributes } from 'react';
|
|
2
|
+
type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'outline';
|
|
3
|
+
type ButtonSize = 'icon' | 'sm' | 'md' | 'lg';
|
|
4
|
+
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
size?: ButtonSize;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
leftIcon?: ReactNode;
|
|
9
|
+
rightIcon?: ReactNode;
|
|
8
10
|
isLoading?: boolean;
|
|
9
|
-
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
+
fullWidth?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export declare const Button:
|
|
13
|
+
export declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
13
14
|
export {};
|
|
@@ -1,49 +1,58 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
import { jsxs as t, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m } from "react";
|
|
3
|
+
const x = {
|
|
4
|
+
icon: "p-0",
|
|
5
|
+
sm: "px-2.5 py-1 text-[12px]",
|
|
6
|
+
md: "px-4 py-1.5 text-[13px]",
|
|
7
|
+
lg: "px-5 py-2 text-[14px]"
|
|
8
|
+
}, b = m(({
|
|
9
|
+
variant: o = "primary",
|
|
10
|
+
size: s = "md",
|
|
11
|
+
children: c,
|
|
12
|
+
leftIcon: d,
|
|
13
|
+
rightIcon: l,
|
|
14
|
+
isLoading: r = !1,
|
|
15
|
+
fullWidth: n = !1,
|
|
16
|
+
className: i = "",
|
|
17
|
+
disabled: e,
|
|
18
|
+
...p
|
|
19
|
+
}, h) => /* @__PURE__ */ t(
|
|
20
|
+
"button",
|
|
21
|
+
{
|
|
22
|
+
ref: h,
|
|
23
|
+
className: `
|
|
24
|
+
inline-flex items-center justify-center gap-2 font-medium rounded
|
|
25
|
+
transition-all duration-200 active:scale-95
|
|
26
|
+
${(() => {
|
|
27
|
+
switch (o) {
|
|
28
|
+
case "primary":
|
|
29
|
+
return "bg-black hover:bg-black/90 dark:bg-blue-600 dark:hover:bg-blue-700 text-white";
|
|
30
|
+
case "secondary":
|
|
31
|
+
return "bg-secondary dark:bg-dark-secondary border-light dark:border-dark text-primary dark:text-dark-primary hover:bg-hover dark:hover:bg-dark-hover";
|
|
32
|
+
case "ghost":
|
|
33
|
+
return "text-secondary dark:text-dark-secondary hover:text-primary dark:hover:text-dark-primary hover:bg-hover dark:hover:bg-dark-hover";
|
|
34
|
+
case "outline":
|
|
35
|
+
return "border border-light bg-card text-foreground hover:bg-muted/50";
|
|
36
|
+
}
|
|
37
|
+
})()}
|
|
38
|
+
${x[s]}
|
|
39
|
+
${n ? "w-full" : ""}
|
|
40
|
+
${e || r ? "opacity-50 cursor-not-allowed" : ""}
|
|
41
|
+
${i}
|
|
42
|
+
`,
|
|
43
|
+
disabled: e || r,
|
|
44
|
+
...p,
|
|
45
|
+
children: [
|
|
46
|
+
r ? /* @__PURE__ */ t("svg", { className: "animate-spin w-4 h-4", fill: "none", viewBox: "0 0 24 24", children: [
|
|
47
|
+
/* @__PURE__ */ a("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
48
|
+
/* @__PURE__ */ a("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
49
|
+
] }) : d,
|
|
50
|
+
c,
|
|
51
|
+
!r && l
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
));
|
|
55
|
+
b.displayName = "Button";
|
|
47
56
|
export {
|
|
48
|
-
|
|
57
|
+
b as Button
|
|
49
58
|
};
|
package/dist/components/card.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { cn as
|
|
4
|
-
const s =
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { cn as o } from "../lib/utils.js";
|
|
4
|
+
const s = t.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d(
|
|
5
5
|
"div",
|
|
6
6
|
{
|
|
7
7
|
ref: r,
|
|
8
|
-
className:
|
|
9
|
-
"rounded-lg border-
|
|
10
|
-
|
|
8
|
+
className: o(
|
|
9
|
+
"rounded-lg border-light bg-card text-card-foreground ",
|
|
10
|
+
a
|
|
11
11
|
),
|
|
12
|
-
...
|
|
12
|
+
...e
|
|
13
13
|
}
|
|
14
14
|
));
|
|
15
15
|
s.displayName = "Card";
|
|
16
|
-
const i =
|
|
16
|
+
const i = t.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d(
|
|
17
17
|
"div",
|
|
18
18
|
{
|
|
19
19
|
ref: r,
|
|
20
|
-
className:
|
|
21
|
-
...
|
|
20
|
+
className: o("flex flex-col space-y-1.5 p-6", a),
|
|
21
|
+
...e
|
|
22
22
|
}
|
|
23
23
|
));
|
|
24
24
|
i.displayName = "CardHeader";
|
|
25
|
-
const
|
|
25
|
+
const l = t.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d(
|
|
26
26
|
"h3",
|
|
27
27
|
{
|
|
28
28
|
ref: r,
|
|
29
|
-
className:
|
|
30
|
-
...
|
|
29
|
+
className: o("text-lg font-semibold leading-none tracking-tight", a),
|
|
30
|
+
...e
|
|
31
31
|
}
|
|
32
32
|
));
|
|
33
|
-
|
|
34
|
-
const
|
|
33
|
+
l.displayName = "CardTitle";
|
|
34
|
+
const c = t.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d(
|
|
35
35
|
"p",
|
|
36
36
|
{
|
|
37
37
|
ref: r,
|
|
38
|
-
className:
|
|
39
|
-
...
|
|
38
|
+
className: o("text-sm text-muted-foreground", a),
|
|
39
|
+
...e
|
|
40
40
|
}
|
|
41
41
|
));
|
|
42
|
-
|
|
43
|
-
const m =
|
|
42
|
+
c.displayName = "CardDescription";
|
|
43
|
+
const m = t.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d("div", { ref: r, className: o("p-6 pt-0", a), ...e }));
|
|
44
44
|
m.displayName = "CardContent";
|
|
45
|
-
const n =
|
|
45
|
+
const n = t.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d(
|
|
46
46
|
"div",
|
|
47
47
|
{
|
|
48
48
|
ref: r,
|
|
49
|
-
className:
|
|
50
|
-
...
|
|
49
|
+
className: o("flex items-center p-6 pt-0", a),
|
|
50
|
+
...e
|
|
51
51
|
}
|
|
52
52
|
));
|
|
53
53
|
n.displayName = "CardFooter";
|
|
54
54
|
export {
|
|
55
55
|
s as Card,
|
|
56
56
|
m as CardContent,
|
|
57
|
-
|
|
57
|
+
c as CardDescription,
|
|
58
58
|
n as CardFooter,
|
|
59
59
|
i as CardHeader,
|
|
60
|
-
|
|
60
|
+
l as CardTitle
|
|
61
61
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { CommandDialog as l, Command as a, CommandInput as i, CommandList as u, CommandEmpty as h, CommandGroup as
|
|
2
|
+
import { CommandDialog as l, Command as a, CommandInput as i, CommandList as u, CommandEmpty as h, CommandGroup as d, CommandItem as s, CommandSeparator as p } from "./command.js";
|
|
3
3
|
import { useEffect as f, useCallback as g, useState as x } from "react";
|
|
4
|
-
import { Home as S, FileText as b, FolderOpen as N, Settings as
|
|
5
|
-
function
|
|
4
|
+
import { Home as S, FileText as b, FolderOpen as N, Settings as y, Search as C } from "lucide-react";
|
|
5
|
+
function w({ open: t, onOpenChange: o }) {
|
|
6
6
|
f(() => {
|
|
7
7
|
const m = (c) => {
|
|
8
8
|
c.key === "k" && (c.metaKey || c.ctrlKey) && (c.preventDefault(), o(!t));
|
|
@@ -16,9 +16,9 @@ function y({ open: t, onOpenChange: o }) {
|
|
|
16
16
|
/* @__PURE__ */ e(i, { placeholder: "Type a command or search..." }),
|
|
17
17
|
/* @__PURE__ */ n(u, { children: [
|
|
18
18
|
/* @__PURE__ */ e(h, { children: "No results found." }),
|
|
19
|
-
/* @__PURE__ */ n(
|
|
19
|
+
/* @__PURE__ */ n(d, { heading: "Suggestions", children: [
|
|
20
20
|
/* @__PURE__ */ n(
|
|
21
|
-
|
|
21
|
+
s,
|
|
22
22
|
{
|
|
23
23
|
onSelect: () => r(() => console.log("Home")),
|
|
24
24
|
children: [
|
|
@@ -28,7 +28,7 @@ function y({ open: t, onOpenChange: o }) {
|
|
|
28
28
|
}
|
|
29
29
|
),
|
|
30
30
|
/* @__PURE__ */ n(
|
|
31
|
-
|
|
31
|
+
s,
|
|
32
32
|
{
|
|
33
33
|
onSelect: () => r(() => console.log("Documents")),
|
|
34
34
|
children: [
|
|
@@ -38,7 +38,7 @@ function y({ open: t, onOpenChange: o }) {
|
|
|
38
38
|
}
|
|
39
39
|
),
|
|
40
40
|
/* @__PURE__ */ n(
|
|
41
|
-
|
|
41
|
+
s,
|
|
42
42
|
{
|
|
43
43
|
onSelect: () => r(() => console.log("Projects")),
|
|
44
44
|
children: [
|
|
@@ -49,12 +49,12 @@ function y({ open: t, onOpenChange: o }) {
|
|
|
49
49
|
)
|
|
50
50
|
] }),
|
|
51
51
|
/* @__PURE__ */ e(p, {}),
|
|
52
|
-
/* @__PURE__ */ e(
|
|
53
|
-
|
|
52
|
+
/* @__PURE__ */ e(d, { heading: "Settings", children: /* @__PURE__ */ n(
|
|
53
|
+
s,
|
|
54
54
|
{
|
|
55
55
|
onSelect: () => r(() => console.log("Settings")),
|
|
56
56
|
children: [
|
|
57
|
-
/* @__PURE__ */ e(
|
|
57
|
+
/* @__PURE__ */ e(y, { className: "mr-2 h-4 w-4" }),
|
|
58
58
|
/* @__PURE__ */ e("span", { children: "Settings" })
|
|
59
59
|
]
|
|
60
60
|
}
|
|
@@ -69,9 +69,9 @@ function E() {
|
|
|
69
69
|
"button",
|
|
70
70
|
{
|
|
71
71
|
onClick: () => o(!0),
|
|
72
|
-
className: "inline-flex items-center justify-center gap-1 rounded-md border border-input bg-
|
|
72
|
+
className: "inline-flex items-center justify-center gap-1 rounded-md border border-input bg-secondary px-4 py-2 text-sm font-medium text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
73
73
|
children: [
|
|
74
|
-
/* @__PURE__ */ e(
|
|
74
|
+
/* @__PURE__ */ e(C, { className: "h-4 w-4" }),
|
|
75
75
|
/* @__PURE__ */ e("span", { children: "Search..." }),
|
|
76
76
|
/* @__PURE__ */ n("kbd", { className: "pointer-events-none ml-1 inline-flex h-5 select-none items-center gap-1 rounded border border-input bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground", children: [
|
|
77
77
|
/* @__PURE__ */ e("span", { className: "text-xs", children: "⌘" }),
|
|
@@ -80,10 +80,10 @@ function E() {
|
|
|
80
80
|
]
|
|
81
81
|
}
|
|
82
82
|
),
|
|
83
|
-
/* @__PURE__ */ e(
|
|
83
|
+
/* @__PURE__ */ e(w, { open: t, onOpenChange: o })
|
|
84
84
|
] });
|
|
85
85
|
}
|
|
86
86
|
export {
|
|
87
|
-
|
|
87
|
+
w as CommandMenu,
|
|
88
88
|
E as CommandMenuDemo
|
|
89
89
|
};
|
|
@@ -5,7 +5,7 @@ declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
|
5
5
|
ref?: React.Ref<HTMLDivElement>;
|
|
6
6
|
} & {
|
|
7
7
|
asChild?: boolean;
|
|
8
|
-
}, "
|
|
8
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
9
9
|
label?: string;
|
|
10
10
|
shouldFilter?: boolean;
|
|
11
11
|
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
@@ -25,7 +25,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
25
25
|
ref?: React.Ref<HTMLInputElement>;
|
|
26
26
|
} & {
|
|
27
27
|
asChild?: boolean;
|
|
28
|
-
}, "
|
|
28
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
|
|
29
29
|
value?: string;
|
|
30
30
|
onValueChange?: (search: string) => void;
|
|
31
31
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -35,7 +35,7 @@ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
|
35
35
|
ref?: React.Ref<HTMLDivElement>;
|
|
36
36
|
} & {
|
|
37
37
|
asChild?: boolean;
|
|
38
|
-
}, "
|
|
38
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
39
39
|
label?: string;
|
|
40
40
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
41
41
|
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
@@ -44,14 +44,14 @@ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
|
44
44
|
ref?: React.Ref<HTMLDivElement>;
|
|
45
45
|
} & {
|
|
46
46
|
asChild?: boolean;
|
|
47
|
-
}, "
|
|
47
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
48
48
|
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
49
49
|
children?: React.ReactNode;
|
|
50
50
|
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
51
51
|
ref?: React.Ref<HTMLDivElement>;
|
|
52
52
|
} & {
|
|
53
53
|
asChild?: boolean;
|
|
54
|
-
}, "
|
|
54
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
|
|
55
55
|
heading?: React.ReactNode;
|
|
56
56
|
value?: string;
|
|
57
57
|
forceMount?: boolean;
|
|
@@ -60,7 +60,7 @@ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<R
|
|
|
60
60
|
ref?: React.Ref<HTMLDivElement>;
|
|
61
61
|
} & {
|
|
62
62
|
asChild?: boolean;
|
|
63
|
-
}, "
|
|
63
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
64
64
|
alwaysRender?: boolean;
|
|
65
65
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
66
66
|
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
@@ -69,7 +69,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
|
69
69
|
ref?: React.Ref<HTMLDivElement>;
|
|
70
70
|
} & {
|
|
71
71
|
asChild?: boolean;
|
|
72
|
-
}, "
|
|
72
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "disabled" | "value" | "onSelect"> & {
|
|
73
73
|
disabled?: boolean;
|
|
74
74
|
onSelect?: (value: string) => void;
|
|
75
75
|
value?: string;
|
|
@@ -15,7 +15,7 @@ const i = r.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ d(
|
|
|
15
15
|
}
|
|
16
16
|
));
|
|
17
17
|
i.displayName = t.displayName;
|
|
18
|
-
const
|
|
18
|
+
const b = ({
|
|
19
19
|
children: e,
|
|
20
20
|
open: a,
|
|
21
21
|
onOpenChange: o
|
|
@@ -23,7 +23,7 @@ const w = ({
|
|
|
23
23
|
"div",
|
|
24
24
|
{
|
|
25
25
|
className: s(
|
|
26
|
-
"fixed inset-0 z-50 bg-
|
|
26
|
+
"fixed inset-0 z-50 bg-secondary/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
27
27
|
a ? "block" : "hidden"
|
|
28
28
|
),
|
|
29
29
|
onClick: (n) => {
|
|
@@ -32,12 +32,12 @@ const w = ({
|
|
|
32
32
|
children: /* @__PURE__ */ d(
|
|
33
33
|
"div",
|
|
34
34
|
{
|
|
35
|
-
className: "fixed left-[50%] top-[50%] z-50 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] overflow-hidden rounded-lg border border-
|
|
35
|
+
className: "fixed left-[50%] top-[50%] z-50 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] overflow-hidden rounded-lg border border-light bg-popover shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
|
|
36
36
|
children: e
|
|
37
37
|
}
|
|
38
38
|
)
|
|
39
39
|
}
|
|
40
|
-
), p = r.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ m("div", { className: "flex items-center border-b border-
|
|
40
|
+
), p = r.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ m("div", { className: "flex items-center border-b border-light px-3", "cmdk-input-wrapper": "", children: [
|
|
41
41
|
/* @__PURE__ */ d(l, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
42
42
|
/* @__PURE__ */ d(
|
|
43
43
|
t.Input,
|
|
@@ -105,7 +105,7 @@ const g = r.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ d(
|
|
|
105
105
|
g.displayName = t.Item.displayName;
|
|
106
106
|
export {
|
|
107
107
|
i as Command,
|
|
108
|
-
|
|
108
|
+
b as CommandDialog,
|
|
109
109
|
f as CommandEmpty,
|
|
110
110
|
u as CommandGroup,
|
|
111
111
|
p as CommandInput,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsx as o, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
3
|
import * as a from "@radix-ui/react-dialog";
|
|
4
4
|
import { cn as s } from "../lib/utils.js";
|
|
5
5
|
import { X as m } from "lucide-react";
|
|
6
|
-
import { motion as n, AnimatePresence as
|
|
7
|
-
const w = ({ ...e }) => /* @__PURE__ */ o(a.Root, { ...e }), C = a.Trigger,
|
|
6
|
+
import { motion as n, AnimatePresence as p } from "framer-motion";
|
|
7
|
+
const w = ({ ...e }) => /* @__PURE__ */ o(a.Root, { ...e }), C = a.Trigger, g = a.Portal, R = a.Close, c = l.forwardRef(({ className: e, ...i }, t) => /* @__PURE__ */ o(
|
|
8
8
|
a.Overlay,
|
|
9
9
|
{
|
|
10
10
|
ref: t,
|
|
@@ -14,7 +14,7 @@ const w = ({ ...e }) => /* @__PURE__ */ o(a.Root, { ...e }), C = a.Trigger, p =
|
|
|
14
14
|
n.div,
|
|
15
15
|
{
|
|
16
16
|
className: s(
|
|
17
|
-
"fixed inset-0 z-50 bg-
|
|
17
|
+
"fixed inset-0 z-50 bg-secondary/80 backdrop-blur-sm",
|
|
18
18
|
e
|
|
19
19
|
),
|
|
20
20
|
initial: { opacity: 0 },
|
|
@@ -26,7 +26,7 @@ const w = ({ ...e }) => /* @__PURE__ */ o(a.Root, { ...e }), C = a.Trigger, p =
|
|
|
26
26
|
}
|
|
27
27
|
));
|
|
28
28
|
c.displayName = a.Overlay.displayName;
|
|
29
|
-
const f =
|
|
29
|
+
const f = l.forwardRef(({ className: e, children: i, ...t }, d) => /* @__PURE__ */ o(g, { children: /* @__PURE__ */ r(p, { mode: "wait", children: [
|
|
30
30
|
/* @__PURE__ */ o(c, {}),
|
|
31
31
|
/* @__PURE__ */ o(
|
|
32
32
|
a.Content,
|
|
@@ -34,11 +34,11 @@ const f = r.forwardRef(({ className: e, children: i, ...t }, d) => /* @__PURE__
|
|
|
34
34
|
ref: d,
|
|
35
35
|
asChild: !0,
|
|
36
36
|
...t,
|
|
37
|
-
children: /* @__PURE__ */
|
|
37
|
+
children: /* @__PURE__ */ r(
|
|
38
38
|
n.div,
|
|
39
39
|
{
|
|
40
40
|
className: s(
|
|
41
|
-
"fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg gap-4 border-
|
|
41
|
+
"fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg gap-4 border-light bg-secondary p-6 shadow-lg rounded-lg",
|
|
42
42
|
e
|
|
43
43
|
),
|
|
44
44
|
initial: { opacity: 0, scale: 0.95, x: "-50%", y: "-50%" },
|
|
@@ -47,7 +47,7 @@ const f = r.forwardRef(({ className: e, children: i, ...t }, d) => /* @__PURE__
|
|
|
47
47
|
transition: { duration: 0.2 },
|
|
48
48
|
children: [
|
|
49
49
|
i,
|
|
50
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ r(a.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
51
51
|
/* @__PURE__ */ o(m, { className: "h-4 w-4" }),
|
|
52
52
|
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
|
53
53
|
] })
|
|
@@ -86,7 +86,7 @@ const x = ({
|
|
|
86
86
|
}
|
|
87
87
|
);
|
|
88
88
|
x.displayName = "DialogFooter";
|
|
89
|
-
const u =
|
|
89
|
+
const u = l.forwardRef(({ className: e, ...i }, t) => /* @__PURE__ */ o(
|
|
90
90
|
a.Title,
|
|
91
91
|
{
|
|
92
92
|
ref: t,
|
|
@@ -98,7 +98,7 @@ const u = r.forwardRef(({ className: e, ...i }, t) => /* @__PURE__ */ o(
|
|
|
98
98
|
}
|
|
99
99
|
));
|
|
100
100
|
u.displayName = a.Title.displayName;
|
|
101
|
-
const N =
|
|
101
|
+
const N = l.forwardRef(({ className: e, ...i }, t) => /* @__PURE__ */ o(
|
|
102
102
|
a.Description,
|
|
103
103
|
{
|
|
104
104
|
ref: t,
|
|
@@ -115,7 +115,7 @@ export {
|
|
|
115
115
|
x as DialogFooter,
|
|
116
116
|
y as DialogHeader,
|
|
117
117
|
c as DialogOverlay,
|
|
118
|
-
|
|
118
|
+
g as DialogPortal,
|
|
119
119
|
u as DialogTitle,
|
|
120
120
|
C as DialogTrigger
|
|
121
121
|
};
|
|
@@ -60,7 +60,7 @@ const c = m.forwardRef(({ className: r, children: t, ...a }, l) => /* @__PURE__
|
|
|
60
60
|
{
|
|
61
61
|
ref: l,
|
|
62
62
|
className: i(
|
|
63
|
-
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[20px] bg-
|
|
63
|
+
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[20px] bg-secondary",
|
|
64
64
|
r
|
|
65
65
|
),
|
|
66
66
|
...a,
|
|
@@ -2,7 +2,7 @@ import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { useCallback as u } from "react";
|
|
3
3
|
import { useDropzone as b } from "react-dropzone";
|
|
4
4
|
import { Upload as f } from "lucide-react";
|
|
5
|
-
function
|
|
5
|
+
function y({
|
|
6
6
|
onDrop: r,
|
|
7
7
|
children: t,
|
|
8
8
|
className: n = "",
|
|
@@ -30,7 +30,7 @@ function D({
|
|
|
30
30
|
className: n,
|
|
31
31
|
children: [
|
|
32
32
|
/* @__PURE__ */ e("input", { ...p() }),
|
|
33
|
-
c && a && /* @__PURE__ */ e("div", { className: `absolute inset-0 bg-
|
|
33
|
+
c && a && /* @__PURE__ */ e("div", { className: `absolute inset-0 bg-secondary/80 flex items-center justify-center z-10 pointer-events-none ${s}`, children: /* @__PURE__ */ o("div", { className: "border-2 border-dashed border-primary rounded-lg p-8 text-center", children: [
|
|
34
34
|
/* @__PURE__ */ e(f, { className: "h-12 w-12 mb-2 text-primary mx-auto" }),
|
|
35
35
|
/* @__PURE__ */ e("p", { className: "text-base font-medium mb-1", children: "Drop files here" })
|
|
36
36
|
] }) }),
|
|
@@ -40,5 +40,5 @@ function D({
|
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
y as Dropzone
|
|
44
44
|
};
|