@definable/ui 0.1.13 → 0.1.15
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/README.md +0 -7
- package/dist/components/alert-dialog.js +55 -2
- package/dist/components/alert.js +63 -2
- package/dist/components/avatar.js +41 -2
- package/dist/components/badge.js +26 -2
- package/dist/components/button.d.ts +2 -2
- package/dist/components/button.js +49 -2
- package/dist/components/calendar.js +86 -2
- package/dist/components/card.js +61 -2
- package/dist/components/carousel.js +100 -2
- package/dist/components/checkbox.js +31 -2
- package/dist/components/collapse.js +49 -2
- package/dist/components/command-menu.js +89 -2
- package/dist/components/command.js +115 -2
- package/dist/components/confirmation-modal.js +44 -2
- package/dist/components/context-menu.js +185 -2
- package/dist/components/dialog.js +121 -2
- package/dist/components/dropdown-menu.js +48 -2
- package/dist/components/dropzone.js +44 -2
- package/dist/components/image-cropper-modal.js +250 -2
- package/dist/components/image-cropper.js +130 -2
- package/dist/components/input.js +21 -2
- package/dist/components/label.js +19 -2
- package/dist/components/loader.js +69 -2
- package/dist/components/loading-placeholder.js +24 -2
- package/dist/components/mention.js +153 -2
- package/dist/components/modal.js +135 -2
- package/dist/components/notification.js +25 -2
- package/dist/components/popover.js +23 -2
- package/dist/components/progress.js +34 -2
- package/dist/components/radio-group.js +47 -2
- package/dist/components/scroll-area.js +46 -2
- package/dist/components/select.js +130 -2
- package/dist/components/selection-bar.js +53 -2
- package/dist/components/separator.js +24 -2
- package/dist/components/sheet.js +128 -2
- package/dist/components/skeleton.js +17 -2
- package/dist/components/slider.js +32 -2
- package/dist/components/stepper/index.d.ts +4 -0
- package/dist/components/stepper/step-layout.d.ts +8 -0
- package/dist/components/stepper/stepper-modal.d.ts +26 -0
- package/dist/components/stepper/stepper.d.ts +7 -0
- package/dist/components/stepper/types.d.ts +6 -0
- package/dist/components/stepper.js +6 -2
- package/dist/components/switch.js +35 -2
- package/dist/components/table-empty.js +22 -2
- package/dist/components/table-mobile.js +91 -2
- package/dist/components/table.js +156 -2
- package/dist/components/tabs.js +46 -2
- package/dist/components/terminal.js +49 -2
- package/dist/components/textarea.js +20 -2
- package/dist/components/tooltip.js +75 -2
- package/dist/components/use-toast.js +64 -2
- package/dist/icons/icons.d.ts +8 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/providers/anthropic.d.ts +2 -0
- package/dist/icons/providers/claude.d.ts +2 -0
- package/dist/icons/providers/deepseek.d.ts +2 -0
- package/dist/icons/providers/gemini.d.ts +2 -0
- package/dist/icons/providers/grok.d.ts +2 -0
- package/dist/icons/providers/index.d.ts +6 -0
- package/dist/icons/providers/openai.d.ts +2 -0
- package/dist/icons/providers/types.d.ts +4 -0
- package/dist/index.d.ts +48 -962
- package/dist/index.js +444 -2
- package/dist/lib/icons.d.ts +14 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/utils.js +8 -2
- package/dist/{stepper-modal-SYU9mbXs.js → stepper-modal-JXpOXOV2.js} +90 -91
- package/dist/styles.css +1 -1
- package/package.json +180 -134
- package/dist/MonacoEditor-COZcVMEj.cjs +0 -8
- package/dist/MonacoEditor-COZcVMEj.cjs.map +0 -1
- package/dist/MonacoEditor-D3QSSKa4.js +0 -295
- package/dist/MonacoEditor-D3QSSKa4.js.map +0 -1
- package/dist/alert-dialog.d.ts +0 -18
- package/dist/alert.d.ts +0 -25
- package/dist/avatar.d.ts +0 -9
- package/dist/badge.d.ts +0 -15
- package/dist/button.d.ts +0 -16
- package/dist/calendar.d.ts +0 -21
- package/dist/card.d.ts +0 -15
- package/dist/carousel.d.ts +0 -18
- package/dist/charts.d.ts +0 -26
- package/dist/checkbox.d.ts +0 -6
- package/dist/collapse.d.ts +0 -15
- package/dist/command-menu.d.ts +0 -12
- package/dist/command.d.ts +0 -89
- package/dist/components/alert-dialog.esm.js +0 -59
- package/dist/components/alert-dialog.esm.js.map +0 -1
- package/dist/components/alert-dialog.js.map +0 -1
- package/dist/components/alert.esm.js +0 -64
- package/dist/components/alert.esm.js.map +0 -1
- package/dist/components/alert.js.map +0 -1
- package/dist/components/avatar.esm.js +0 -42
- package/dist/components/avatar.esm.js.map +0 -1
- package/dist/components/avatar.js.map +0 -1
- package/dist/components/badge.esm.js +0 -27
- package/dist/components/badge.esm.js.map +0 -1
- package/dist/components/badge.js.map +0 -1
- package/dist/components/button.esm.js +0 -48
- package/dist/components/button.esm.js.map +0 -1
- package/dist/components/button.js.map +0 -1
- package/dist/components/calendar.esm.js +0 -5562
- package/dist/components/calendar.esm.js.map +0 -1
- package/dist/components/calendar.js.map +0 -1
- package/dist/components/card.esm.js +0 -62
- package/dist/components/card.esm.js.map +0 -1
- package/dist/components/card.js.map +0 -1
- package/dist/components/carousel.esm.js +0 -101
- package/dist/components/carousel.esm.js.map +0 -1
- package/dist/components/carousel.js.map +0 -1
- package/dist/components/charts.d.ts +0 -17
- package/dist/components/charts.esm.js +0 -48
- package/dist/components/charts.esm.js.map +0 -1
- package/dist/components/charts.js +0 -2
- package/dist/components/charts.js.map +0 -1
- package/dist/components/checkbox.esm.js +0 -32
- package/dist/components/checkbox.esm.js.map +0 -1
- package/dist/components/checkbox.js.map +0 -1
- package/dist/components/collapse.esm.js +0 -50
- package/dist/components/collapse.esm.js.map +0 -1
- package/dist/components/collapse.js.map +0 -1
- package/dist/components/command-menu.esm.js +0 -90
- package/dist/components/command-menu.esm.js.map +0 -1
- package/dist/components/command-menu.js.map +0 -1
- package/dist/components/command.esm.js +0 -425
- package/dist/components/command.esm.js.map +0 -1
- package/dist/components/command.js.map +0 -1
- package/dist/components/confirmation-modal.esm.js +0 -46
- package/dist/components/confirmation-modal.esm.js.map +0 -1
- package/dist/components/confirmation-modal.js.map +0 -1
- package/dist/components/context-menu.esm.js +0 -186
- package/dist/components/context-menu.esm.js.map +0 -1
- package/dist/components/context-menu.js.map +0 -1
- package/dist/components/dialog.esm.js +0 -122
- package/dist/components/dialog.esm.js.map +0 -1
- package/dist/components/dialog.js.map +0 -1
- package/dist/components/dropdown-menu.esm.js +0 -49
- package/dist/components/dropdown-menu.esm.js.map +0 -1
- package/dist/components/dropdown-menu.js.map +0 -1
- package/dist/components/dropzone.esm.js +0 -45
- package/dist/components/dropzone.esm.js.map +0 -1
- package/dist/components/dropzone.js.map +0 -1
- package/dist/components/image-cropper-modal.esm.js +0 -251
- package/dist/components/image-cropper-modal.esm.js.map +0 -1
- package/dist/components/image-cropper-modal.js.map +0 -1
- package/dist/components/image-cropper.esm.js +0 -131
- package/dist/components/image-cropper.esm.js.map +0 -1
- package/dist/components/image-cropper.js.map +0 -1
- package/dist/components/input.esm.js +0 -22
- package/dist/components/input.esm.js.map +0 -1
- package/dist/components/input.js.map +0 -1
- package/dist/components/label.esm.js +0 -20
- package/dist/components/label.esm.js.map +0 -1
- package/dist/components/label.js.map +0 -1
- package/dist/components/loader.esm.js +0 -70
- package/dist/components/loader.esm.js.map +0 -1
- package/dist/components/loader.js.map +0 -1
- package/dist/components/loading-placeholder.esm.js +0 -25
- package/dist/components/loading-placeholder.esm.js.map +0 -1
- package/dist/components/loading-placeholder.js.map +0 -1
- package/dist/components/markdown.d.ts +0 -2
- package/dist/components/markdown.esm.js +0 -12066
- package/dist/components/markdown.esm.js.map +0 -1
- package/dist/components/markdown.js +0 -18
- package/dist/components/markdown.js.map +0 -1
- package/dist/components/mention.esm.js +0 -154
- package/dist/components/mention.esm.js.map +0 -1
- package/dist/components/mention.js.map +0 -1
- package/dist/components/modal.esm.js +0 -136
- package/dist/components/modal.esm.js.map +0 -1
- package/dist/components/modal.js.map +0 -1
- package/dist/components/monaco-editor.d.ts +0 -2
- package/dist/components/monaco-editor.esm.js +0 -9
- package/dist/components/monaco-editor.esm.js.map +0 -1
- package/dist/components/monaco-editor.js +0 -2
- package/dist/components/monaco-editor.js.map +0 -1
- package/dist/components/notification.esm.js +0 -26
- package/dist/components/notification.esm.js.map +0 -1
- package/dist/components/notification.js.map +0 -1
- package/dist/components/popover.esm.js +0 -24
- package/dist/components/popover.esm.js.map +0 -1
- package/dist/components/popover.js.map +0 -1
- package/dist/components/progress.esm.js +0 -35
- package/dist/components/progress.esm.js.map +0 -1
- package/dist/components/progress.js.map +0 -1
- package/dist/components/radio-group.esm.js +0 -48
- package/dist/components/radio-group.esm.js.map +0 -1
- package/dist/components/radio-group.js.map +0 -1
- package/dist/components/scroll-area.esm.js +0 -47
- package/dist/components/scroll-area.esm.js.map +0 -1
- package/dist/components/scroll-area.js.map +0 -1
- package/dist/components/select.esm.js +0 -131
- package/dist/components/select.esm.js.map +0 -1
- package/dist/components/select.js.map +0 -1
- package/dist/components/selection-bar.esm.js +0 -54
- package/dist/components/selection-bar.esm.js.map +0 -1
- package/dist/components/selection-bar.js.map +0 -1
- package/dist/components/separator.esm.js +0 -25
- package/dist/components/separator.esm.js.map +0 -1
- package/dist/components/separator.js.map +0 -1
- package/dist/components/sheet.esm.js +0 -129
- package/dist/components/sheet.esm.js.map +0 -1
- package/dist/components/sheet.js.map +0 -1
- package/dist/components/skeleton.esm.js +0 -18
- package/dist/components/skeleton.esm.js.map +0 -1
- package/dist/components/skeleton.js.map +0 -1
- package/dist/components/slider.esm.js +0 -33
- package/dist/components/slider.esm.js.map +0 -1
- package/dist/components/slider.js.map +0 -1
- package/dist/components/stepper.d.ts +0 -2
- package/dist/components/stepper.esm.js +0 -7
- package/dist/components/stepper.esm.js.map +0 -1
- package/dist/components/stepper.js.map +0 -1
- package/dist/components/switch.esm.js +0 -36
- package/dist/components/switch.esm.js.map +0 -1
- package/dist/components/switch.js.map +0 -1
- package/dist/components/table-empty.esm.js +0 -23
- package/dist/components/table-empty.esm.js.map +0 -1
- package/dist/components/table-empty.js.map +0 -1
- package/dist/components/table-mobile.esm.js +0 -92
- package/dist/components/table-mobile.esm.js.map +0 -1
- package/dist/components/table-mobile.js.map +0 -1
- package/dist/components/table.esm.js +0 -157
- package/dist/components/table.esm.js.map +0 -1
- package/dist/components/table.js.map +0 -1
- package/dist/components/tabs.esm.js +0 -47
- package/dist/components/tabs.esm.js.map +0 -1
- package/dist/components/tabs.js.map +0 -1
- package/dist/components/terminal.esm.js +0 -50
- package/dist/components/terminal.esm.js.map +0 -1
- package/dist/components/terminal.js.map +0 -1
- package/dist/components/textarea.esm.js +0 -21
- package/dist/components/textarea.esm.js.map +0 -1
- package/dist/components/textarea.js.map +0 -1
- package/dist/components/tooltip.esm.js +0 -76
- package/dist/components/tooltip.esm.js.map +0 -1
- package/dist/components/tooltip.js.map +0 -1
- package/dist/components/use-toast.esm.js +0 -65
- package/dist/components/use-toast.esm.js.map +0 -1
- package/dist/components/use-toast.js.map +0 -1
- package/dist/confirmation-modal.d.ts +0 -16
- package/dist/context-menu.d.ts +0 -41
- package/dist/dialog.d.ts +0 -33
- package/dist/dropdown-menu.d.ts +0 -16
- package/dist/dropzone.d.ts +0 -16
- package/dist/image-cropper-modal.d.ts +0 -14
- package/dist/image-cropper.d.ts +0 -15
- package/dist/index-DACAHwoB.js +0 -35
- package/dist/index-DACAHwoB.js.map +0 -1
- package/dist/index-Deooizx8.cjs +0 -2
- package/dist/index-Deooizx8.cjs.map +0 -1
- package/dist/index.esm.js +0 -458
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/input.d.ts +0 -8
- package/dist/jsx-runtime-BYECrxsp.cjs +0 -31
- package/dist/jsx-runtime-BYECrxsp.cjs.map +0 -1
- package/dist/jsx-runtime-DGlMoOmv.js +0 -631
- package/dist/jsx-runtime-DGlMoOmv.js.map +0 -1
- package/dist/label.d.ts +0 -6
- package/dist/lib/utils.esm.js +0 -5
- package/dist/lib/utils.esm.js.map +0 -1
- package/dist/lib/utils.js.map +0 -1
- package/dist/loader.d.ts +0 -14
- package/dist/loading-placeholder.d.ts +0 -12
- package/dist/markdown.d.ts +0 -122
- package/dist/mention.d.ts +0 -29
- package/dist/modal.d.ts +0 -28
- package/dist/monaco-editor.d.ts +0 -76
- package/dist/notification.d.ts +0 -9
- package/dist/popover.d.ts +0 -10
- package/dist/progress.d.ts +0 -6
- package/dist/radio-group.d.ts +0 -8
- package/dist/scroll-area.d.ts +0 -8
- package/dist/select.d.ts +0 -31
- package/dist/selection-bar.d.ts +0 -15
- package/dist/separator.d.ts +0 -6
- package/dist/sheet.d.ts +0 -17
- package/dist/skeleton.d.ts +0 -5
- package/dist/slider.d.ts +0 -6
- package/dist/stepper-modal-CPlBpxWy.cjs +0 -2
- package/dist/stepper-modal-CPlBpxWy.cjs.map +0 -1
- package/dist/stepper-modal-SYU9mbXs.js.map +0 -1
- package/dist/stepper.d.ts +0 -75
- package/dist/switch.d.ts +0 -6
- package/dist/table-empty.d.ts +0 -13
- package/dist/table-mobile.d.ts +0 -37
- package/dist/table.d.ts +0 -37
- package/dist/tabs.d.ts +0 -12
- package/dist/terminal.d.ts +0 -47
- package/dist/textarea.d.ts +0 -8
- package/dist/tooltip.d.ts +0 -12
- package/dist/use-toast.d.ts +0 -28
- package/dist/utils-DSKoFOjv.cjs +0 -2
- package/dist/utils-DSKoFOjv.cjs.map +0 -1
- package/dist/utils-qaFjX9_3.js +0 -2279
- package/dist/utils-qaFjX9_3.js.map +0 -1
- package/dist/utils.d.ts +0 -5
|
@@ -1,2 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { AnimatePresence as o, motion as d } from "framer-motion";
|
|
3
|
+
import { Check as h, X as p, Download as g, Trash as x } from "lucide-react";
|
|
4
|
+
import { Button as r } from "./button.js";
|
|
5
|
+
function w({
|
|
6
|
+
selectedCount: l,
|
|
7
|
+
onEnable: a,
|
|
8
|
+
onDisable: s,
|
|
9
|
+
onDelete: t,
|
|
10
|
+
onDownload: c,
|
|
11
|
+
onCancel: m,
|
|
12
|
+
show: n
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ e(o, { children: n && /* @__PURE__ */ e(
|
|
15
|
+
d.div,
|
|
16
|
+
{
|
|
17
|
+
initial: { y: 100, opacity: 0 },
|
|
18
|
+
animate: { y: 0, opacity: 1 },
|
|
19
|
+
exit: { y: 100, opacity: 0 },
|
|
20
|
+
className: "fixed bottom-4 left-1/2 -translate-x-1/2 w-fit bg-background rounded-lg border shadow-lg z-50",
|
|
21
|
+
children: /* @__PURE__ */ i("div", { className: "flex items-center gap-6 px-4 py-2", children: [
|
|
22
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
23
|
+
/* @__PURE__ */ e("span", { className: "bg-primary text-primary-foreground w-8 h-8 rounded-lg flex items-center justify-center", children: l }),
|
|
24
|
+
"Selected"
|
|
25
|
+
] }),
|
|
26
|
+
/* @__PURE__ */ e("div", { className: "h-4 w-px bg-border" }),
|
|
27
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
28
|
+
a && /* @__PURE__ */ i(r, { variant: "ghost", size: "sm", onClick: a, children: [
|
|
29
|
+
/* @__PURE__ */ e(h, { className: "mr-2 h-4 w-4" }),
|
|
30
|
+
"Enable"
|
|
31
|
+
] }),
|
|
32
|
+
s && /* @__PURE__ */ i(r, { variant: "ghost", size: "sm", onClick: s, children: [
|
|
33
|
+
/* @__PURE__ */ e(p, { className: "mr-2 h-4 w-4" }),
|
|
34
|
+
"Disable"
|
|
35
|
+
] }),
|
|
36
|
+
c && /* @__PURE__ */ i(r, { variant: "ghost", size: "sm", onClick: c, children: [
|
|
37
|
+
/* @__PURE__ */ e(g, { className: "mr-2 h-4 w-4" }),
|
|
38
|
+
"Download"
|
|
39
|
+
] }),
|
|
40
|
+
t && /* @__PURE__ */ i(r, { variant: "ghost", size: "sm", className: "text-destructive", onClick: t, children: [
|
|
41
|
+
/* @__PURE__ */ e(x, { className: "mr-2 h-4 w-4" }),
|
|
42
|
+
"Delete"
|
|
43
|
+
] })
|
|
44
|
+
] }),
|
|
45
|
+
/* @__PURE__ */ e("div", { className: "h-4 w-px bg-border" }),
|
|
46
|
+
/* @__PURE__ */ e(r, { variant: "ghost", size: "sm", onClick: m, children: "Cancel" })
|
|
47
|
+
] })
|
|
48
|
+
}
|
|
49
|
+
) });
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
w as SelectionBar
|
|
53
|
+
};
|
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import * as o from "@radix-ui/react-separator";
|
|
4
|
+
import { cn as l } from "../lib/utils.js";
|
|
5
|
+
const s = i.forwardRef(
|
|
6
|
+
({ className: a, orientation: r = "horizontal", decorative: t = !0, ...m }, p) => /* @__PURE__ */ e(
|
|
7
|
+
o.Root,
|
|
8
|
+
{
|
|
9
|
+
ref: p,
|
|
10
|
+
decorative: t,
|
|
11
|
+
orientation: r,
|
|
12
|
+
className: l(
|
|
13
|
+
"shrink-0 bg-border",
|
|
14
|
+
r === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
15
|
+
a
|
|
16
|
+
),
|
|
17
|
+
...m
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
);
|
|
21
|
+
s.displayName = o.Root.displayName;
|
|
22
|
+
export {
|
|
23
|
+
s as Separator
|
|
24
|
+
};
|
package/dist/components/sheet.js
CHANGED
|
@@ -1,2 +1,128 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { jsxs as l, jsx as t, Fragment as F } from "react/jsx-runtime";
|
|
2
|
+
import { Minimize2 as R, Maximize2 as B, X as I } from "lucide-react";
|
|
3
|
+
import { Button as x } from "./button.js";
|
|
4
|
+
import { useState as M, useRef as X, useEffect as m } from "react";
|
|
5
|
+
import { cn as u } from "../lib/utils.js";
|
|
6
|
+
import { AnimatePresence as q, motion as b } from "framer-motion";
|
|
7
|
+
import { createPortal as D } from "react-dom";
|
|
8
|
+
let a = [];
|
|
9
|
+
function V({
|
|
10
|
+
isOpen: i,
|
|
11
|
+
onClose: n,
|
|
12
|
+
children: y,
|
|
13
|
+
header: g,
|
|
14
|
+
footer: f,
|
|
15
|
+
className: v,
|
|
16
|
+
enableFullscreen: N = !0,
|
|
17
|
+
position: c = "right",
|
|
18
|
+
headerClassName: k = ""
|
|
19
|
+
}) {
|
|
20
|
+
const [o, w] = M(!1), r = X(null);
|
|
21
|
+
if (m(() => (i ? a.push(r) : a = a.filter((e) => e !== r), () => {
|
|
22
|
+
a = a.filter((e) => e !== r);
|
|
23
|
+
}), [i]), m(() => {
|
|
24
|
+
const e = (s) => {
|
|
25
|
+
var h;
|
|
26
|
+
const j = a.some(
|
|
27
|
+
(p) => p.current && p.current.contains(s.target)
|
|
28
|
+
), A = (h = s.target) == null ? void 0 : h.closest("[data-sheet-close]");
|
|
29
|
+
!j && !A && r.current && !r.current.contains(s.target) && n();
|
|
30
|
+
};
|
|
31
|
+
return i && !o && document.addEventListener("mousedown", e), () => {
|
|
32
|
+
document.removeEventListener("mousedown", e);
|
|
33
|
+
};
|
|
34
|
+
}, [i, o, n]), m(() => {
|
|
35
|
+
const e = (s) => {
|
|
36
|
+
s.key === "Escape" && i && a[a.length - 1] === r && n();
|
|
37
|
+
};
|
|
38
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
39
|
+
}, [i, n]), !i) return null;
|
|
40
|
+
const P = (e) => {
|
|
41
|
+
e.stopPropagation(), n();
|
|
42
|
+
}, E = /* @__PURE__ */ l("div", { className: "flex flex-col h-full", children: [
|
|
43
|
+
/* @__PURE__ */ l("div", { className: u(
|
|
44
|
+
"flex items-center bg-card justify-between py-4 px-4 h-header border-b border-border/50",
|
|
45
|
+
k
|
|
46
|
+
), children: [
|
|
47
|
+
/* @__PURE__ */ t("div", { className: "text-sm font-medium", children: g }),
|
|
48
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-1 ml-auto", children: [
|
|
49
|
+
N && /* @__PURE__ */ t(
|
|
50
|
+
x,
|
|
51
|
+
{
|
|
52
|
+
variant: "ghost",
|
|
53
|
+
size: "icon",
|
|
54
|
+
className: "h-7 w-7",
|
|
55
|
+
onClick: (e) => {
|
|
56
|
+
e.stopPropagation(), w(!o);
|
|
57
|
+
},
|
|
58
|
+
children: o ? /* @__PURE__ */ t(R, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(B, { className: "h-3.5 w-3.5" })
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
/* @__PURE__ */ t(
|
|
62
|
+
x,
|
|
63
|
+
{
|
|
64
|
+
variant: "ghost",
|
|
65
|
+
size: "icon",
|
|
66
|
+
className: "h-7 w-7",
|
|
67
|
+
onClick: P,
|
|
68
|
+
"data-sheet-close": "true",
|
|
69
|
+
children: /* @__PURE__ */ t(I, { className: "h-3.5 w-3.5" })
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
] })
|
|
73
|
+
] }),
|
|
74
|
+
/* @__PURE__ */ t("div", { className: "flex-1 overflow-auto", children: y }),
|
|
75
|
+
f && /* @__PURE__ */ t("div", { className: "border-t border-border/50 bg-card py-2 px-3", children: /* @__PURE__ */ t("div", { className: "text-sm", children: f }) })
|
|
76
|
+
] }), z = () => c === "left" ? {
|
|
77
|
+
initial: { x: -100, opacity: 0 },
|
|
78
|
+
animate: { x: 0, opacity: 1 },
|
|
79
|
+
exit: { x: -100, opacity: 0 }
|
|
80
|
+
} : c === "bottom" ? {
|
|
81
|
+
initial: { y: 100, opacity: 0 },
|
|
82
|
+
animate: { y: 0, opacity: 1 },
|
|
83
|
+
exit: { y: 100, opacity: 0 }
|
|
84
|
+
} : {
|
|
85
|
+
initial: { x: 100, opacity: 0 },
|
|
86
|
+
animate: { x: 0, opacity: 1 },
|
|
87
|
+
exit: { x: 100, opacity: 0 }
|
|
88
|
+
}, C = () => o ? "inset-4 rounded-lg" : c === "left" ? "inset-y-0 left-0 border-r" : c === "bottom" ? "inset-x-0 bottom-0 border-t" : "inset-y-0 right-0 border-l", d = z(), L = C(), S = /* @__PURE__ */ t(q, { children: i && /* @__PURE__ */ l(F, { children: [
|
|
89
|
+
/* @__PURE__ */ t(
|
|
90
|
+
b.div,
|
|
91
|
+
{
|
|
92
|
+
initial: { opacity: 0 },
|
|
93
|
+
animate: { opacity: 1 },
|
|
94
|
+
exit: { opacity: 0 },
|
|
95
|
+
onClick: (e) => {
|
|
96
|
+
e.stopPropagation(), n();
|
|
97
|
+
},
|
|
98
|
+
className: u(
|
|
99
|
+
"fixed inset-0 z-[100] bg-background/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",
|
|
100
|
+
o ? "block" : "hidden"
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ t(
|
|
105
|
+
b.div,
|
|
106
|
+
{
|
|
107
|
+
ref: r,
|
|
108
|
+
initial: d.initial,
|
|
109
|
+
animate: d.animate,
|
|
110
|
+
exit: d.exit,
|
|
111
|
+
transition: {
|
|
112
|
+
duration: 0.3,
|
|
113
|
+
ease: [0.32, 0.72, 0, 1]
|
|
114
|
+
},
|
|
115
|
+
className: u(
|
|
116
|
+
"fixed z-[100] bg-background shadow-lg flex flex-col border-border/50",
|
|
117
|
+
L,
|
|
118
|
+
v
|
|
119
|
+
),
|
|
120
|
+
children: E
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
] }) });
|
|
124
|
+
return D(S, document.body);
|
|
125
|
+
}
|
|
126
|
+
export {
|
|
127
|
+
V as Sheet
|
|
128
|
+
};
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { cn as r } from "../lib/utils.js";
|
|
3
|
+
function d({
|
|
4
|
+
className: e,
|
|
5
|
+
...m
|
|
6
|
+
}) {
|
|
7
|
+
return /* @__PURE__ */ o(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
className: r("animate-pulse rounded-md bg-muted/60", e),
|
|
11
|
+
...m
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
d as Skeleton
|
|
17
|
+
};
|
|
@@ -1,2 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import * as e from "@radix-ui/react-slider";
|
|
4
|
+
import { cn as n } from "../lib/utils.js";
|
|
5
|
+
const c = t.forwardRef(({ className: l, ...o }, a) => {
|
|
6
|
+
var i;
|
|
7
|
+
return /* @__PURE__ */ s(
|
|
8
|
+
e.Root,
|
|
9
|
+
{
|
|
10
|
+
ref: a,
|
|
11
|
+
className: n(
|
|
12
|
+
"relative flex w-full touch-none select-none items-center",
|
|
13
|
+
l
|
|
14
|
+
),
|
|
15
|
+
...o,
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ r(e.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ r(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
className: "absolute h-full bg-primary",
|
|
21
|
+
style: { width: `${(((i = o.value) == null ? void 0 : i[0]) || 0) * 100}%` }
|
|
22
|
+
}
|
|
23
|
+
) }),
|
|
24
|
+
/* @__PURE__ */ r(e.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:scale-110 active:scale-90" })
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
});
|
|
29
|
+
c.displayName = e.Root.displayName;
|
|
30
|
+
export {
|
|
31
|
+
c as Slider
|
|
32
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface StepLayoutProps {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
title?: string;
|
|
4
|
+
sidebar?: React.ReactNode;
|
|
5
|
+
subclassName?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function StepLayout({ children, title, sidebar, subclassName, }: StepLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ModalProps } from '../modal';
|
|
2
|
+
interface StepperModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
icon?: React.ComponentType<any>;
|
|
8
|
+
currentStep: number;
|
|
9
|
+
totalSteps: number;
|
|
10
|
+
onBack: () => void;
|
|
11
|
+
onNext: () => void;
|
|
12
|
+
onComplete: () => void;
|
|
13
|
+
sidebar: React.ReactNode;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
continueText?: string;
|
|
16
|
+
completeText?: string;
|
|
17
|
+
isNextDisabled?: boolean;
|
|
18
|
+
isNextLoading?: boolean;
|
|
19
|
+
size?: ModalProps['size'];
|
|
20
|
+
stepLayoutSubclassName?: string;
|
|
21
|
+
isShowClose?: boolean;
|
|
22
|
+
isShowBackButton?: boolean;
|
|
23
|
+
isModelContentScrollable?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare function StepperModal({ isOpen, onClose, title, description, icon: Icon, currentStep, totalSteps, onBack, onNext, onComplete, sidebar, children, continueText, completeText, isNextDisabled, isNextLoading, size, stepLayoutSubclassName, isShowBackButton, isModelContentScrollable }: StepperModalProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { a as p, S as t, b as o } from "../stepper-modal-JXpOXOV2.js";
|
|
2
|
+
export {
|
|
3
|
+
p as StepLayout,
|
|
4
|
+
t as Stepper,
|
|
5
|
+
o as StepperModal
|
|
6
|
+
};
|
|
@@ -1,2 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import * as e from "@radix-ui/react-switch";
|
|
4
|
+
import { cn as a } from "../lib/utils.js";
|
|
5
|
+
import { motion as n } from "framer-motion";
|
|
6
|
+
const c = t.forwardRef(({ className: r, ...o }, s) => /* @__PURE__ */ i(
|
|
7
|
+
e.Root,
|
|
8
|
+
{
|
|
9
|
+
className: a(
|
|
10
|
+
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
11
|
+
r
|
|
12
|
+
),
|
|
13
|
+
...o,
|
|
14
|
+
ref: s,
|
|
15
|
+
children: /* @__PURE__ */ i(e.Thumb, { asChild: !0, children: /* @__PURE__ */ i(
|
|
16
|
+
n.div,
|
|
17
|
+
{
|
|
18
|
+
className: "block h-4 w-4 rounded-full bg-background shadow-lg ring-0",
|
|
19
|
+
initial: !1,
|
|
20
|
+
animate: {
|
|
21
|
+
x: o.checked ? 16 : 0
|
|
22
|
+
},
|
|
23
|
+
transition: {
|
|
24
|
+
type: "spring",
|
|
25
|
+
stiffness: 500,
|
|
26
|
+
damping: 30
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
) })
|
|
30
|
+
}
|
|
31
|
+
));
|
|
32
|
+
c.displayName = e.Root.displayName;
|
|
33
|
+
export {
|
|
34
|
+
c as Switch
|
|
35
|
+
};
|
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { FolderOpen as m } from "lucide-react";
|
|
3
|
+
import { Button as i } from "./button.js";
|
|
4
|
+
function x({
|
|
5
|
+
title: a = "No data available",
|
|
6
|
+
description: s = "Get started by creating your first record.",
|
|
7
|
+
actionLabel: c = "Create New",
|
|
8
|
+
onAction: t,
|
|
9
|
+
icon: l = /* @__PURE__ */ e(m, { className: "w-10 h-10 text-muted-foreground" })
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-12 px-4", children: /* @__PURE__ */ r("div", { className: "space-y-5 text-center", children: [
|
|
12
|
+
/* @__PURE__ */ e("div", { className: "flex justify-center", children: l }),
|
|
13
|
+
/* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
14
|
+
/* @__PURE__ */ e("h3", { className: "text-lg font-medium", children: a }),
|
|
15
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground max-w-sm mx-auto", children: s })
|
|
16
|
+
] }),
|
|
17
|
+
t && /* @__PURE__ */ e(i, { onClick: t, children: c })
|
|
18
|
+
] }) });
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
x as TableEmpty
|
|
22
|
+
};
|
|
@@ -1,2 +1,91 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { cn as c } from "../lib/utils.js";
|
|
3
|
+
import { Checkbox as v } from "./checkbox.js";
|
|
4
|
+
import { Tooltip as b } from "./tooltip.js";
|
|
5
|
+
import { useState as g } from "react";
|
|
6
|
+
import { ChevronRight as x } from "lucide-react";
|
|
7
|
+
function V({
|
|
8
|
+
data: n,
|
|
9
|
+
columns: o,
|
|
10
|
+
showCheckbox: m = !0,
|
|
11
|
+
onRowClick: t,
|
|
12
|
+
selectedItems: i,
|
|
13
|
+
onSelect: l,
|
|
14
|
+
isLoading: h = !1,
|
|
15
|
+
loadingRows: u = 3
|
|
16
|
+
}) {
|
|
17
|
+
const [f, p] = g(null);
|
|
18
|
+
return h ? /* @__PURE__ */ r("div", { className: "space-y-4", children: Array(u).fill(0).map((a, s) => /* @__PURE__ */ d(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
className: "border border-border/50 rounded-xl p-4 space-y-4 shadow-sm bg-card/30 animate-pulse",
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ d("div", { className: "flex items-center justify-between", children: [
|
|
24
|
+
/* @__PURE__ */ r("div", { className: "h-5 bg-muted/70 rounded-md w-2/5" }),
|
|
25
|
+
m && /* @__PURE__ */ r("div", { className: "h-4 w-4 rounded-md bg-muted/50" })
|
|
26
|
+
] }),
|
|
27
|
+
/* @__PURE__ */ r("div", { className: "space-y-3 pt-2", children: o.slice(0, 4).map((e, N) => /* @__PURE__ */ d("div", { className: "flex items-start gap-3", children: [
|
|
28
|
+
/* @__PURE__ */ r("div", { className: "h-4 bg-muted/40 rounded-md w-1/4" }),
|
|
29
|
+
/* @__PURE__ */ r("div", { className: "h-4 bg-muted/60 rounded-md", style: { width: Math.random() * 50 + 30 + "%" } })
|
|
30
|
+
] }, `skeleton-col-${e.id}`)) })
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
`skeleton-${s}`
|
|
34
|
+
)) }) : n.length === 0 ? null : /* @__PURE__ */ r("div", { className: "space-y-4", children: n.map((a, s) => /* @__PURE__ */ d(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
className: c(
|
|
38
|
+
"border border-border/40 rounded-xl overflow-hidden bg-card/30 shadow-sm transition-all duration-200",
|
|
39
|
+
t && "cursor-pointer hover:border-primary/30 hover:shadow-md hover:bg-card/50"
|
|
40
|
+
),
|
|
41
|
+
onClick: () => t == null ? void 0 : t(a),
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ d("div", { className: "flex items-center justify-between p-4 border-b border-border/30 bg-muted/5", children: [
|
|
44
|
+
/* @__PURE__ */ r("div", { className: "font-medium", children: o[0].cell(a) || `Item ${s + 1}` }),
|
|
45
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
46
|
+
m && /* @__PURE__ */ r(
|
|
47
|
+
v,
|
|
48
|
+
{
|
|
49
|
+
checked: i == null ? void 0 : i.has(a.id),
|
|
50
|
+
onClick: (e) => {
|
|
51
|
+
e.stopPropagation(), l == null || l(a.id, !(i != null && i.has(a.id)));
|
|
52
|
+
},
|
|
53
|
+
className: "data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground"
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
t && /* @__PURE__ */ r(x, { className: "h-4 w-4 text-muted-foreground/50" })
|
|
57
|
+
] })
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ r("div", { className: "px-4 py-3 space-y-3", children: o.slice(1).map((e) => /* @__PURE__ */ d(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
className: "flex items-start gap-3 text-sm group",
|
|
63
|
+
onMouseEnter: () => e.tooltipValue && p(`${s}-${e.id}`),
|
|
64
|
+
onMouseLeave: () => p(null),
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ r("div", { className: "font-medium text-muted-foreground w-1/3 min-w-[80px] text-xs uppercase tracking-wide pt-0.5", children: e.header }),
|
|
67
|
+
/* @__PURE__ */ r("div", { className: c(
|
|
68
|
+
"flex-1 min-w-0 text-foreground/90 group-hover:text-foreground transition-colors",
|
|
69
|
+
e.truncate && "truncate"
|
|
70
|
+
), children: e.cell(a) }),
|
|
71
|
+
e.tooltipValue && f === `${s}-${e.id}` && /* @__PURE__ */ r(
|
|
72
|
+
b,
|
|
73
|
+
{
|
|
74
|
+
content: e.tooltipValue(a),
|
|
75
|
+
side: "bottom",
|
|
76
|
+
align: "start",
|
|
77
|
+
isVisible: !0
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
e.id
|
|
83
|
+
)) })
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
a.id
|
|
87
|
+
)) });
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
V as TableMobile
|
|
91
|
+
};
|