@appkits-ai/ui 0.1.0
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 +51 -0
- package/dist/components/badge.d.ts +17 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +25 -0
- package/dist/components/button.d.ts +18 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +36 -0
- package/dist/components/card.d.ts +35 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +45 -0
- package/dist/components/checkbox.d.ts +7 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +20 -0
- package/dist/components/context-menu.d.ts +71 -0
- package/dist/components/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu.js +100 -0
- package/dist/components/dialog.d.ts +46 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +70 -0
- package/dist/components/input.d.ts +11 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +9 -0
- package/dist/components/label.d.ts +8 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +15 -0
- package/dist/components/notifications.d.ts +5 -0
- package/dist/components/notifications.d.ts.map +1 -0
- package/dist/components/notifications.js +22 -0
- package/dist/components/scroll-area.d.ts +12 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +23 -0
- package/dist/components/select.d.ts +46 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +72 -0
- package/dist/components/switch.d.ts +8 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +15 -0
- package/dist/components/tabs.d.ts +20 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +33 -0
- package/dist/components/theme-provider.d.ts +8 -0
- package/dist/components/theme-provider.d.ts.map +1 -0
- package/dist/components/theme-provider.js +14 -0
- package/dist/components/tooltip.d.ts +8 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +15 -0
- package/dist/components/transfer-status-panel.d.ts +34 -0
- package/dist/components/transfer-status-panel.d.ts.map +1 -0
- package/dist/components/transfer-status-panel.js +41 -0
- package/dist/components/upload-conflict-dialog.d.ts +16 -0
- package/dist/components/upload-conflict-dialog.d.ts.map +1 -0
- package/dist/components/upload-conflict-dialog.js +24 -0
- package/dist/components/upload-drop-overlay.d.ts +15 -0
- package/dist/components/upload-drop-overlay.d.ts.map +1 -0
- package/dist/components/upload-drop-overlay.js +30 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +5 -0
- package/dist/hooks/use-chain-settings.d.ts +43 -0
- package/dist/hooks/use-chain-settings.d.ts.map +1 -0
- package/dist/hooks/use-chain-settings.js +313 -0
- package/dist/hooks/use-global-dialog.d.ts +28 -0
- package/dist/hooks/use-global-dialog.d.ts.map +1 -0
- package/dist/hooks/use-global-dialog.js +80 -0
- package/dist/hooks/use-sub-app-context-menu.d.ts +5 -0
- package/dist/hooks/use-sub-app-context-menu.d.ts.map +1 -0
- package/dist/hooks/use-sub-app-context-menu.js +37 -0
- package/dist/hooks/use-theme-sync.d.ts +5 -0
- package/dist/hooks/use-theme-sync.d.ts.map +1 -0
- package/dist/hooks/use-theme-sync.js +36 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/lib/notify.d.ts +21 -0
- package/dist/lib/notify.d.ts.map +1 -0
- package/dist/lib/notify.js +81 -0
- package/dist/lib/utils.d.ts +10 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +12 -0
- package/package.json +79 -0
- package/postcss.config.mjs +6 -0
- package/src/styles/globals.css +182 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the label React component surface.
|
|
3
|
+
* @module web-ui
|
|
4
|
+
*/
|
|
5
|
+
"use client";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
8
|
+
import { cn } from "../lib/utils.js";
|
|
9
|
+
/**
|
|
10
|
+
* Renders the Label UI surface.
|
|
11
|
+
*/
|
|
12
|
+
function Label({ className, ...props }) {
|
|
13
|
+
return (_jsx(LabelPrimitive.Root, { "data-slot": "label", className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className), ...props }));
|
|
14
|
+
}
|
|
15
|
+
export { Label };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/components/notifications.tsx"],"names":[],"mappings":"AASA;;GAEG;AACH,wBAAgB,aAAa,4CAqB5B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the notifications React component surface.
|
|
3
|
+
* @module web-ui
|
|
4
|
+
*/
|
|
5
|
+
"use client";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Toaster } from "sonner";
|
|
8
|
+
import { useTheme } from "next-themes";
|
|
9
|
+
/**
|
|
10
|
+
* Renders the Notifications UI surface.
|
|
11
|
+
*/
|
|
12
|
+
export function Notifications() {
|
|
13
|
+
const { theme = "system" } = useTheme();
|
|
14
|
+
return (_jsx(Toaster, { position: "top-right", theme: theme, className: "toaster group", toastOptions: {
|
|
15
|
+
classNames: {
|
|
16
|
+
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
17
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
18
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
19
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
|
|
20
|
+
},
|
|
21
|
+
} }));
|
|
22
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
3
|
+
/**
|
|
4
|
+
* Renders the ScrollArea UI surface.
|
|
5
|
+
*/
|
|
6
|
+
declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
/**
|
|
8
|
+
* Renders the ScrollBar UI surface.
|
|
9
|
+
*/
|
|
10
|
+
declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { ScrollArea, ScrollBar };
|
|
12
|
+
//# sourceMappingURL=scroll-area.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../src/components/scroll-area.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAInE;;GAEG;AACH,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,2CAkBvD;AAED;;GAEG;AACH,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,WAAwB,EACxB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,mBAAmB,CAAC,2CAqBtE;AAED,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the scroll-area React component surface.
|
|
3
|
+
* @module web-ui
|
|
4
|
+
*/
|
|
5
|
+
"use client";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
8
|
+
import { cn } from "../lib/utils.js";
|
|
9
|
+
/**
|
|
10
|
+
* Renders the ScrollArea UI surface.
|
|
11
|
+
*/
|
|
12
|
+
function ScrollArea({ className, children, ...props }) {
|
|
13
|
+
return (_jsxs(ScrollAreaPrimitive.Root, { "data-slot": "scroll-area", className: cn("relative", className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollBar, { orientation: "horizontal" }), _jsx(ScrollAreaPrimitive.Corner, {})] }));
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Renders the ScrollBar UI surface.
|
|
17
|
+
*/
|
|
18
|
+
function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
19
|
+
return (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, { "data-slot": "scroll-area-scrollbar", orientation: orientation, className: cn("flex touch-none p-px transition-colors select-none", orientation === "vertical" &&
|
|
20
|
+
"h-full w-2.5 border-l border-l-transparent", orientation === "horizontal" &&
|
|
21
|
+
"h-2.5 flex-col border-t border-t-transparent", className), ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "bg-border relative flex-1 rounded-full" }) }));
|
|
22
|
+
}
|
|
23
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
+
/**
|
|
4
|
+
* Renders the Select UI surface.
|
|
5
|
+
*/
|
|
6
|
+
declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
/**
|
|
8
|
+
* Renders the SelectGroup UI surface.
|
|
9
|
+
*/
|
|
10
|
+
declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
/**
|
|
12
|
+
* Renders the SelectValue UI surface.
|
|
13
|
+
*/
|
|
14
|
+
declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* Renders the SelectTrigger UI surface.
|
|
17
|
+
*/
|
|
18
|
+
declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
19
|
+
size?: "sm" | "default";
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* Renders the SelectContent UI surface.
|
|
23
|
+
*/
|
|
24
|
+
declare function SelectContent({ className, children, position, align, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
/**
|
|
26
|
+
* Renders the SelectLabel UI surface.
|
|
27
|
+
*/
|
|
28
|
+
declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
/**
|
|
30
|
+
* Renders the SelectItem UI surface.
|
|
31
|
+
*/
|
|
32
|
+
declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
/**
|
|
34
|
+
* Renders the SelectSeparator UI surface.
|
|
35
|
+
*/
|
|
36
|
+
declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
/**
|
|
38
|
+
* Renders the SelectScrollUpButton UI surface.
|
|
39
|
+
*/
|
|
40
|
+
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
/**
|
|
42
|
+
* Renders the SelectScrollDownButton UI surface.
|
|
43
|
+
*/
|
|
44
|
+
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
46
|
+
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAK1D;;GAEG;AACH,iBAAS,MAAM,CAAC,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAEnD;AAED;;GAEG;AACH,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAEpD;AAED;;GAEG;AACH,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAEpD;AAED;;GAEG;AACH,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,IAAgB,EAChB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG;IACxD,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CACzB,2CAiBA;AAED;;GAEG;AACH,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,QAAyB,EACzB,KAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CA6BtD;AAED;;GAEG;AACH,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAQpD;AAED;;GAEG;AACH,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAqBnD;AAED;;GAEG;AACH,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,2CAQxD;AAED;;GAEG;AACH,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,cAAc,CAAC,2CAa7D;AAED;;GAEG;AACH,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,gBAAgB,CAAC,2CAa/D;AAED,OAAO,EACL,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the select React component surface.
|
|
3
|
+
* @module web-ui
|
|
4
|
+
*/
|
|
5
|
+
"use client";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
8
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
9
|
+
import { cn } from "../lib/utils.js";
|
|
10
|
+
/**
|
|
11
|
+
* Renders the Select UI surface.
|
|
12
|
+
*/
|
|
13
|
+
function Select({ ...props }) {
|
|
14
|
+
return _jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Renders the SelectGroup UI surface.
|
|
18
|
+
*/
|
|
19
|
+
function SelectGroup({ ...props }) {
|
|
20
|
+
return _jsx(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Renders the SelectValue UI surface.
|
|
24
|
+
*/
|
|
25
|
+
function SelectValue({ ...props }) {
|
|
26
|
+
return _jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Renders the SelectTrigger UI surface.
|
|
30
|
+
*/
|
|
31
|
+
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
32
|
+
return (_jsxs(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": size, className: cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDownIcon, { className: "size-4 opacity-50" }) })] }));
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Renders the SelectContent UI surface.
|
|
36
|
+
*/
|
|
37
|
+
function SelectContent({ className, children, position = "item-aligned", align = "center", ...props }) {
|
|
38
|
+
return (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { "data-slot": "select-content", className: cn("bg-popover text-popover-foreground 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md", position === "popper" &&
|
|
39
|
+
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), position: position, align: align, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn("p-1", position === "popper" &&
|
|
40
|
+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"), children: children }), _jsx(SelectScrollDownButton, {})] }) }));
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Renders the SelectLabel UI surface.
|
|
44
|
+
*/
|
|
45
|
+
function SelectLabel({ className, ...props }) {
|
|
46
|
+
return (_jsx(SelectPrimitive.Label, { "data-slot": "select-label", className: cn("text-muted-foreground px-2 py-1.5 text-xs", className), ...props }));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Renders the SelectItem UI surface.
|
|
50
|
+
*/
|
|
51
|
+
function SelectItem({ className, children, ...props }) {
|
|
52
|
+
return (_jsxs(SelectPrimitive.Item, { "data-slot": "select-item", className: cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className), ...props, children: [_jsx("span", { "data-slot": "select-item-indicator", className: "absolute right-2 flex size-3.5 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] }));
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Renders the SelectSeparator UI surface.
|
|
56
|
+
*/
|
|
57
|
+
function SelectSeparator({ className, ...props }) {
|
|
58
|
+
return (_jsx(SelectPrimitive.Separator, { "data-slot": "select-separator", className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className), ...props }));
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Renders the SelectScrollUpButton UI surface.
|
|
62
|
+
*/
|
|
63
|
+
function SelectScrollUpButton({ className, ...props }) {
|
|
64
|
+
return (_jsx(SelectPrimitive.ScrollUpButton, { "data-slot": "select-scroll-up-button", className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronUpIcon, { className: "size-4" }) }));
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Renders the SelectScrollDownButton UI surface.
|
|
68
|
+
*/
|
|
69
|
+
function SelectScrollDownButton({ className, ...props }) {
|
|
70
|
+
return (_jsx(SelectPrimitive.ScrollDownButton, { "data-slot": "select-scroll-down-button", className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronDownIcon, { className: "size-4" }) }));
|
|
71
|
+
}
|
|
72
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
3
|
+
/**
|
|
4
|
+
* Renders the Switch UI surface.
|
|
5
|
+
*/
|
|
6
|
+
declare function Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Switch };
|
|
8
|
+
//# sourceMappingURL=switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAI1D;;GAEG;AACH,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAkBnD;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the switch React component surface.
|
|
3
|
+
* @module web-ui
|
|
4
|
+
*/
|
|
5
|
+
"use client";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
8
|
+
import { cn } from "../lib/utils.js";
|
|
9
|
+
/**
|
|
10
|
+
* Renders the Switch UI surface.
|
|
11
|
+
*/
|
|
12
|
+
function Switch({ className, ...props }) {
|
|
13
|
+
return (_jsx(SwitchPrimitive.Root, { "data-slot": "switch", className: cn("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className), ...props, children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: cn("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0") }) }));
|
|
14
|
+
}
|
|
15
|
+
export { Switch };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
|
+
/**
|
|
4
|
+
* Renders the Tabs UI surface.
|
|
5
|
+
*/
|
|
6
|
+
declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
/**
|
|
8
|
+
* Renders the TabsList UI surface.
|
|
9
|
+
*/
|
|
10
|
+
declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
/**
|
|
12
|
+
* Renders the TabsTrigger UI surface.
|
|
13
|
+
*/
|
|
14
|
+
declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* Renders the TabsContent UI surface.
|
|
17
|
+
*/
|
|
18
|
+
declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
20
|
+
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/components/tabs.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAItD;;GAEG;AACH,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,2CAQjD;AAED;;GAEG;AACH,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,2CAWjD;AAED;;GAEG;AACH,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,2CAWpD;AAED;;GAEG;AACH,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,2CAQpD;AAED,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the tabs React component surface.
|
|
3
|
+
* @module web-ui
|
|
4
|
+
*/
|
|
5
|
+
"use client";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
8
|
+
import { cn } from "../lib/utils.js";
|
|
9
|
+
/**
|
|
10
|
+
* Renders the Tabs UI surface.
|
|
11
|
+
*/
|
|
12
|
+
function Tabs({ className, ...props }) {
|
|
13
|
+
return (_jsx(TabsPrimitive.Root, { "data-slot": "tabs", className: cn("flex flex-col gap-2", className), ...props }));
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Renders the TabsList UI surface.
|
|
17
|
+
*/
|
|
18
|
+
function TabsList({ className, ...props }) {
|
|
19
|
+
return (_jsx(TabsPrimitive.List, { "data-slot": "tabs-list", className: cn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]", className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Renders the TabsTrigger UI surface.
|
|
23
|
+
*/
|
|
24
|
+
function TabsTrigger({ className, ...props }) {
|
|
25
|
+
return (_jsx(TabsPrimitive.Trigger, { "data-slot": "tabs-trigger", className: cn("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Renders the TabsContent UI surface.
|
|
29
|
+
*/
|
|
30
|
+
function TabsContent({ className, ...props }) {
|
|
31
|
+
return (_jsx(TabsPrimitive.Content, { "data-slot": "tabs-content", className: cn("flex-1 outline-none", className), ...props }));
|
|
32
|
+
}
|
|
33
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
|
3
|
+
export { useTheme } from "next-themes";
|
|
4
|
+
/**
|
|
5
|
+
* Renders the ThemeProvider UI surface.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ThemeProvider({ children, ...props }: React.ComponentProps<typeof NextThemesProvider>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=theme-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-provider.d.ts","sourceRoot":"","sources":["../../src/components/theme-provider.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,IAAI,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,2CAEjD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the theme-provider React component surface.
|
|
3
|
+
* @module web-ui
|
|
4
|
+
*/
|
|
5
|
+
"use client";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
|
8
|
+
export { useTheme } from "next-themes";
|
|
9
|
+
/**
|
|
10
|
+
* Renders the ThemeProvider UI surface.
|
|
11
|
+
*/
|
|
12
|
+
export function ThemeProvider({ children, ...props }) {
|
|
13
|
+
return _jsx(NextThemesProvider, { ...props, children: children });
|
|
14
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
+
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
4
|
+
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
5
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
8
|
+
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAI5D,QAAA,MAAM,eAAe,iDAA4B,CAAC;AAElD,QAAA,MAAM,OAAO,yCAAwB,CAAC;AAEtC,QAAA,MAAM,cAAc,gHAA2B,CAAC;AAEhD,QAAA,MAAM,cAAc,gKAelB,CAAC;AAGH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the tooltip React component surface.
|
|
3
|
+
* @module web-ui
|
|
4
|
+
*/
|
|
5
|
+
"use client";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
9
|
+
import { cn } from "../lib/utils.js";
|
|
10
|
+
const TooltipProvider = TooltipPrimitive.Provider;
|
|
11
|
+
const Tooltip = TooltipPrimitive.Root;
|
|
12
|
+
const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
13
|
+
const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(TooltipPrimitive.Portal, { children: _jsx(TooltipPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn("z-[99999] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className), ...props }) })));
|
|
14
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
15
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface TransferStatusItem {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
pathLabel?: string;
|
|
6
|
+
status: "queued" | "uploading" | "completed" | "failed";
|
|
7
|
+
progress: number;
|
|
8
|
+
error?: string;
|
|
9
|
+
retryable?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface TransferStatusPanelProps {
|
|
12
|
+
title: string;
|
|
13
|
+
activeLabel: string;
|
|
14
|
+
failedLabel: string;
|
|
15
|
+
activeItems: TransferStatusItem[];
|
|
16
|
+
completedItems: TransferStatusItem[];
|
|
17
|
+
activeCount: number;
|
|
18
|
+
failedCount: number;
|
|
19
|
+
completedExpanded: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
runningMessage?: string;
|
|
22
|
+
completedLabel?: string;
|
|
23
|
+
onClose: () => void;
|
|
24
|
+
onRetry?: (id: string) => void;
|
|
25
|
+
onIgnore?: (id: string) => void;
|
|
26
|
+
onClearCompleted?: () => void;
|
|
27
|
+
onCompletedExpandedChange: React.Dispatch<React.SetStateAction<boolean>>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Renders a popover-style transfer status panel.
|
|
31
|
+
*/
|
|
32
|
+
declare function TransferStatusPanel({ title, activeLabel, failedLabel, activeItems, completedItems, activeCount, failedCount, completedExpanded, className, runningMessage, completedLabel, onClose, onRetry, onIgnore, onClearCompleted, onCompletedExpandedChange, }: TransferStatusPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export { TransferStatusPanel };
|
|
34
|
+
//# sourceMappingURL=transfer-status-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfer-status-panel.d.ts","sourceRoot":"","sources":["../../src/components/transfer-status-panel.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,QAAQ,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAClC,cAAc,EAAE,kBAAkB,EAAE,CAAC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,yBAAyB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CAC1E;AAED;;GAEG;AACH,iBAAS,mBAAmB,CAAC,EAC3B,KAAK,EACL,WAAW,EACX,WAAW,EACX,WAAW,EACX,cAAc,EACd,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,cAA4B,EAC5B,OAAO,EACP,OAAO,EACP,QAAQ,EACR,gBAAgB,EAChB,yBAAyB,GAC1B,EAAE,wBAAwB,2CA0F1B;AA6GD,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renders reusable transfer status panel UI.
|
|
3
|
+
* @owner web-ui
|
|
4
|
+
* @module ui-package
|
|
5
|
+
* @boundary shared-ui
|
|
6
|
+
* @business Provides shared shadcn-style progress feedback for uploads and sync operations.
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { CircleSlash, RotateCcw, Trash2, X } from "lucide-react";
|
|
11
|
+
import { Button } from "./button.js";
|
|
12
|
+
import { Card } from "./card.js";
|
|
13
|
+
import { ScrollArea } from "./scroll-area.js";
|
|
14
|
+
import { cn } from "../lib/utils.js";
|
|
15
|
+
/**
|
|
16
|
+
* Renders a popover-style transfer status panel.
|
|
17
|
+
*/
|
|
18
|
+
function TransferStatusPanel({ title, activeLabel, failedLabel, activeItems, completedItems, activeCount, failedCount, completedExpanded, className, runningMessage, completedLabel = "Completed", onClose, onRetry, onIgnore, onClearCompleted, onCompletedExpandedChange, }) {
|
|
19
|
+
return (_jsxs(Card, { className: cn("absolute bottom-20 right-4 z-[9100] w-[320px] gap-0 rounded-lg border-white/10 bg-black/65 p-3 py-3 text-xs text-white shadow-2xl backdrop-blur-md", className), children: [_jsxs("div", { className: "mb-2 flex items-center justify-between", children: [_jsxs("div", { children: [_jsx("div", { className: "text-sm font-medium text-white", children: title }), _jsxs("div", { className: "text-[11px] text-white/50", children: [activeCount, " ", activeLabel, ", ", failedCount, " ", failedLabel] })] }), _jsx(Button, { type: "button", variant: "ghost", size: "icon-sm", className: "text-white/50 hover:bg-white/8 hover:text-white", onClick: onClose, "aria-label": "Close transfer panel", children: _jsx(X, { className: "h-4 w-4" }) })] }), runningMessage && activeCount > 0 ? (_jsx("div", { className: "mb-2 rounded-md border border-amber-300/20 bg-amber-400/10 px-2.5 py-2 text-[11px] text-amber-100", children: runningMessage })) : null, _jsxs("div", { className: "space-y-2", children: [activeItems.map((item) => (_jsx(TransferCard, { item: item, onRetry: onRetry, onIgnore: onIgnore }, item.id))), completedItems.length > 0 ? (_jsxs("div", { className: "rounded-md border border-white/8 bg-white/[0.03]", children: [_jsxs("div", { className: "flex items-center justify-between px-2.5 py-2 text-[11px] text-white/70", children: [_jsxs("button", { type: "button", className: "min-w-0 flex-1 text-left transition hover:text-white", onClick: () => onCompletedExpandedChange((current) => !current), children: [completedLabel, " (", completedItems.length, ")"] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("button", { type: "button", className: "text-white/35 transition hover:text-white", onClick: () => onCompletedExpandedChange((current) => !current), children: completedExpanded ? "Hide" : "Show" }), onClearCompleted ? (_jsx(Button, { type: "button", variant: "ghost", size: "icon-sm", className: "h-6 w-6 text-white/35 hover:bg-white/8 hover:text-white", onClick: onClearCompleted, "aria-label": "Clear completed transfers", children: _jsx(Trash2, { className: "h-3 w-3" }) })) : null] })] }), completedExpanded ? (_jsx(ScrollArea, { className: "max-h-40 border-t border-white/8", children: _jsx("div", { className: "space-y-2 px-2.5 py-2", children: completedItems.map((item) => (_jsx(CompletedTransferCard, { item: item }, item.id))) }) })) : null] })) : null] })] }));
|
|
20
|
+
}
|
|
21
|
+
/** Renders one active or failed transfer item. */
|
|
22
|
+
function TransferCard({ item, onRetry, onIgnore, }) {
|
|
23
|
+
return (_jsxs("div", { className: "rounded-md border border-white/8 bg-white/5 px-2.5 py-2", children: [_jsx(TransferTitle, { item: item }), _jsx(ProgressBar, { item: item }), _jsxs("div", { className: "mt-1 flex items-center justify-between text-[11px]", children: [_jsx("span", { className: "capitalize text-white/60", children: item.status }), item.status === "failed" ? (_jsxs("div", { className: "flex items-center gap-1", children: [item.retryable && onRetry ? (_jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "h-6 gap-1 px-1.5 text-sky-300 hover:bg-white/8 hover:text-sky-200", onClick: () => onRetry(item.id), children: [_jsx(RotateCcw, { className: "h-3 w-3" }), "Retry"] })) : null, onIgnore ? (_jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "h-6 gap-1 px-1.5 text-white/55 hover:bg-white/8 hover:text-white", onClick: () => onIgnore(item.id), children: [_jsx(CircleSlash, { className: "h-3 w-3" }), "Ignore"] })) : null] })) : (_jsxs("span", { className: "text-white/35", children: [item.progress, "%"] }))] }), item.error ? (_jsx("div", { className: "mt-1 truncate text-[11px] text-rose-200/80", children: item.error })) : null] }));
|
|
24
|
+
}
|
|
25
|
+
/** Renders one completed transfer item. */
|
|
26
|
+
function CompletedTransferCard({ item }) {
|
|
27
|
+
return (_jsxs("div", { className: "rounded-md border border-white/8 bg-white/5 px-2.5 py-2", children: [_jsx(TransferTitle, { item: item }), _jsx(ProgressBar, { item: { ...item, progress: 100, status: "completed" } }), _jsxs("div", { className: "mt-1 flex items-center justify-between text-[11px]", children: [_jsx("span", { className: "text-white/60", children: "completed" }), _jsx("span", { className: "text-white/35", children: "100%" })] })] }));
|
|
28
|
+
}
|
|
29
|
+
/** Renders transfer progress with status-specific color. */
|
|
30
|
+
function ProgressBar({ item }) {
|
|
31
|
+
return (_jsx("div", { className: "mt-2 h-1.5 overflow-hidden rounded-full bg-white/10", children: _jsx("div", { className: cn("h-full rounded-full transition-all", item.status === "failed"
|
|
32
|
+
? "bg-rose-400"
|
|
33
|
+
: item.status === "completed"
|
|
34
|
+
? "bg-emerald-400"
|
|
35
|
+
: "bg-sky-400"), style: { width: `${Math.max(6, item.progress)}%` } }) }));
|
|
36
|
+
}
|
|
37
|
+
/** Renders transfer name and optional path label. */
|
|
38
|
+
function TransferTitle({ item }) {
|
|
39
|
+
return (_jsx("div", { className: "flex items-start gap-2", children: _jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "truncate text-[12px] font-medium text-white", children: item.name }), item.pathLabel ? (_jsx("div", { className: "truncate text-[11px] text-white/45", children: item.pathLabel })) : null] }) }));
|
|
40
|
+
}
|
|
41
|
+
export { TransferStatusPanel };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface UploadConflictDialogProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
itemLabels: string[];
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
cancelLabel?: string;
|
|
7
|
+
confirmLabel?: string;
|
|
8
|
+
onCancel: () => void;
|
|
9
|
+
onConfirm: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Renders upload overwrite confirmation for existing target paths.
|
|
13
|
+
*/
|
|
14
|
+
declare function UploadConflictDialog({ open, itemLabels, title, description, cancelLabel, confirmLabel, onCancel, onConfirm, }: UploadConflictDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { UploadConflictDialog };
|
|
16
|
+
//# sourceMappingURL=upload-conflict-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-conflict-dialog.d.ts","sourceRoot":"","sources":["../../src/components/upload-conflict-dialog.tsx"],"names":[],"mappings":"AAoBA,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;GAEG;AACH,iBAAS,oBAAoB,CAAC,EAC5B,IAAI,EACJ,UAAU,EACV,KAAiC,EACjC,WAAW,EACX,WAAsB,EACtB,YAAwB,EACxB,QAAQ,EACR,SAAS,GACV,EAAE,yBAAyB,2CAsC3B;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renders a reusable upload overwrite confirmation dialog.
|
|
3
|
+
* @owner web-ui
|
|
4
|
+
* @module ui-package
|
|
5
|
+
* @boundary shared-ui
|
|
6
|
+
* @business Provides shared upload-conflict confirmation UI for desktop and explorer surfaces.
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { Button } from "./button.js";
|
|
11
|
+
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "./dialog.js";
|
|
12
|
+
import { ScrollArea } from "./scroll-area.js";
|
|
13
|
+
/**
|
|
14
|
+
* Renders upload overwrite confirmation for existing target paths.
|
|
15
|
+
*/
|
|
16
|
+
function UploadConflictDialog({ open, itemLabels, title = "Replace existing files?", description, cancelLabel = "Cancel", confirmLabel = "Replace", onCancel, onConfirm, }) {
|
|
17
|
+
const resolvedDescription = description ??
|
|
18
|
+
`The upload will overwrite ${itemLabels.length} existing ${itemLabels.length === 1 ? "item" : "items"}.`;
|
|
19
|
+
return (_jsx(Dialog, { open: open, onOpenChange: (nextOpen) => {
|
|
20
|
+
if (!nextOpen)
|
|
21
|
+
onCancel();
|
|
22
|
+
}, children: _jsxs(DialogContent, { className: "z-[100000] border-border/80 bg-background/95 sm:max-w-[520px]", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: resolvedDescription })] }), _jsx(ScrollArea, { className: "max-h-56 rounded-md border border-white/8 bg-black/20", children: _jsx("div", { className: "px-3 py-2 text-xs text-white/70", children: itemLabels.map((label) => (_jsx("div", { className: "truncate py-1", title: label, children: label }, label))) }) }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", onClick: onCancel, children: cancelLabel }), _jsx(Button, { variant: "destructive", onClick: onConfirm, children: confirmLabel })] })] }) }));
|
|
23
|
+
}
|
|
24
|
+
export { UploadConflictDialog };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface UploadDropOverlayProps {
|
|
2
|
+
title: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
hint?: string;
|
|
5
|
+
dismissLabel?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
onPick?: () => void;
|
|
8
|
+
onDismiss?: () => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Renders a full-surface upload drop zone with an optional dismiss action.
|
|
12
|
+
*/
|
|
13
|
+
declare function UploadDropOverlay({ title, description, hint, dismissLabel, className, onPick, onDismiss, }: UploadDropOverlayProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { UploadDropOverlay };
|
|
15
|
+
//# sourceMappingURL=upload-drop-overlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-drop-overlay.d.ts","sourceRoot":"","sources":["../../src/components/upload-drop-overlay.tsx"],"names":[],"mappings":"AAeA,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;GAEG;AACH,iBAAS,iBAAiB,CAAC,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,YAAuC,EACvC,SAAS,EACT,MAAM,EACN,SAAS,GACV,EAAE,sBAAsB,2CAiDxB;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renders a reusable upload drop overlay.
|
|
3
|
+
* @owner web-ui
|
|
4
|
+
* @module ui-package
|
|
5
|
+
* @boundary shared-ui
|
|
6
|
+
* @business Provides a shared shadcn-style upload target for desktop and file-manager surfaces without duplicating overlay UI.
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { Upload, X } from "lucide-react";
|
|
11
|
+
import { Button } from "./button.js";
|
|
12
|
+
import { cn } from "../lib/utils.js";
|
|
13
|
+
/**
|
|
14
|
+
* Renders a full-surface upload drop zone with an optional dismiss action.
|
|
15
|
+
*/
|
|
16
|
+
function UploadDropOverlay({ title, description, hint, dismissLabel = "Dismiss upload overlay", className, onPick, onDismiss, }) {
|
|
17
|
+
return (_jsxs("div", { className: cn("absolute inset-4 z-[9000] flex items-center justify-center rounded-lg border border-dashed border-sky-300 bg-sky-500/14 text-white shadow-2xl backdrop-blur-sm", className), onClick: (event) => {
|
|
18
|
+
event.preventDefault();
|
|
19
|
+
event.stopPropagation();
|
|
20
|
+
onPick?.();
|
|
21
|
+
}, onPointerDown: (event) => {
|
|
22
|
+
event.preventDefault();
|
|
23
|
+
event.stopPropagation();
|
|
24
|
+
}, children: [onDismiss ? (_jsx(Button, { type: "button", variant: "ghost", size: "icon-sm", className: "absolute right-3 top-3 border border-white/15 bg-black/25 text-white/70 hover:bg-black/35 hover:text-white", "aria-label": dismissLabel, onClick: (event) => {
|
|
25
|
+
event.preventDefault();
|
|
26
|
+
event.stopPropagation();
|
|
27
|
+
onDismiss();
|
|
28
|
+
}, children: _jsx(X, { className: "h-4 w-4" }) })) : null, _jsxs("div", { className: "max-w-md px-6 text-center", children: [_jsx("div", { className: "mx-auto mb-3 flex h-10 w-10 items-center justify-center rounded-md border border-white/15 bg-black/20 text-white/80", children: _jsx(Upload, { className: "h-5 w-5" }) }), _jsx("div", { className: "text-base font-semibold text-white", children: title }), description ? (_jsx("div", { className: "mt-2 text-sm text-white/70", children: description })) : null, hint ? (_jsx("div", { className: "mt-3 text-[11px] uppercase tracking-[0.18em] text-white/45", children: hint })) : null] })] }));
|
|
29
|
+
}
|
|
30
|
+
export { UploadDropOverlay };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,+BAA+B,CAAC"}
|