@deftui/react 0.2.4 → 0.3.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 +2 -4
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +5 -5
- package/dist/styles.css +3 -0
- package/dist/vendor/README.md +8 -8
- package/dist/vendor/coss/calendar.d.mts +4 -0
- package/dist/vendor/coss/calendar.mjs +70 -0
- package/dist/vendor/coss/card.d.mts +23 -0
- package/dist/vendor/coss/card.mjs +160 -0
- package/dist/vendor/coss/dialog.d.mts +1 -1
- package/dist/vendor/coss/dialog.mjs +1 -1
- package/dist/vendor/coss/form.d.mts +1 -0
- package/dist/vendor/coss/form.mjs +1 -0
- package/dist/vendor/coss/scroll-area.d.mts +1 -0
- package/dist/vendor/coss/scroll-area.mjs +1 -0
- package/dist/vendor/coss/table.d.mts +15 -0
- package/dist/vendor/coss/table.mjs +73 -0
- package/dist/vendor/shadcn/badge.d.mts +1 -0
- package/dist/vendor/shadcn/badge.mjs +1 -0
- package/dist/vendor/shadcn/button.d.mts +1 -0
- package/dist/vendor/shadcn/button.mjs +1 -0
- package/dist/vendor/shadcn/checkbox.d.mts +1 -0
- package/dist/vendor/shadcn/checkbox.mjs +1 -0
- package/dist/vendor/shadcn/input.d.mts +1 -0
- package/dist/vendor/shadcn/input.mjs +1 -0
- package/dist/vendor/shadcn/label.d.mts +1 -0
- package/dist/vendor/shadcn/label.mjs +1 -0
- package/dist/vendor/shadcn/separator.d.mts +1 -0
- package/dist/vendor/shadcn/separator.mjs +1 -0
- package/dist/vendor/shadcn/skeleton.d.mts +1 -0
- package/dist/vendor/shadcn/skeleton.mjs +1 -0
- package/dist/vendor/shadcn/spinner.d.mts +1 -0
- package/dist/vendor/shadcn/spinner.mjs +1 -0
- package/dist/vendor/shadcn/switch.d.mts +1 -0
- package/dist/vendor/shadcn/switch.mjs +1 -0
- package/dist/vendor/shadcn/textarea.d.mts +1 -0
- package/dist/vendor/shadcn/textarea.mjs +1 -0
- package/dist/vendor/tailored/file-tree.d.mts +1 -0
- package/dist/vendor/tailored/file-tree.mjs +1 -0
- package/dist/vendor/tailored/icon-swap.d.mts +1 -0
- package/dist/vendor/tailored/icon-swap.mjs +1 -0
- package/dist/vendor/tailored/json-viewer.d.mts +1 -0
- package/dist/vendor/tailored/json-viewer.mjs +1 -0
- package/dist/vendor/tailored/lightbox.d.mts +1 -1
- package/dist/vendor/tailored/lightbox.mjs +1 -1
- package/dist/widgets/datetime.d.mts +1 -1
- package/dist/widgets/datetime.mjs +6 -1
- package/dist/widgets/dropzone.d.mts +5 -3
- package/dist/widgets/dropzone.mjs +11 -7
- package/dist/widgets/index.d.mts +38 -12
- package/dist/widgets/index.mjs +35 -8
- package/dist/widgets/multimedia.d.mts +2 -0
- package/dist/widgets/multimedia.mjs +2 -0
- package/dist/widgets/pagination.d.mts +1 -0
- package/dist/widgets/pagination.mjs +1 -0
- package/dist/widgets/sidebar.d.mts +1 -0
- package/dist/widgets/sidebar.mjs +1 -0
- package/package.json +1 -1
- package/dist/vendor/shadcn/calendar.d.mts +0 -10
- package/dist/vendor/shadcn/calendar.mjs +0 -107
- package/dist/vendor/shadcn/card.d.mts +0 -11
- package/dist/vendor/shadcn/card.mjs +0 -55
- package/dist/vendor/shadcn/table.d.mts +0 -9
- package/dist/vendor/shadcn/table.mjs +0 -59
|
@@ -3,6 +3,7 @@ import { cn } from "cn";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
// src/vendor/shadcn/label.tsx
|
|
6
|
+
/** https://ui.shadcn.com/docs/components/base/label */
|
|
6
7
|
function Label({ className, ...props }) {
|
|
7
8
|
return /* @__PURE__ */ jsx("label", {
|
|
8
9
|
"data-slot": "label",
|
|
@@ -3,6 +3,7 @@ import { cn } from "cn";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Separator } from "@base-ui/react/separator";
|
|
5
5
|
// src/vendor/shadcn/separator.tsx
|
|
6
|
+
/** https://ui.shadcn.com/docs/components/base/separator */
|
|
6
7
|
function Separator$1({ className, orientation = "horizontal", ...props }) {
|
|
7
8
|
return /* @__PURE__ */ jsx(Separator, {
|
|
8
9
|
"data-slot": "separator",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { cn } from "cn";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
// src/vendor/shadcn/skeleton.tsx
|
|
4
|
+
/** https://ui.shadcn.com/docs/components/base/skeleton */
|
|
4
5
|
function Skeleton({ className, ...props }) {
|
|
5
6
|
return /* @__PURE__ */ jsx("div", {
|
|
6
7
|
"data-slot": "skeleton",
|
|
@@ -2,6 +2,7 @@ import { cn } from "cn";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Loader2Icon } from "lucide-react";
|
|
4
4
|
// src/vendor/shadcn/spinner.tsx
|
|
5
|
+
/** https://ui.shadcn.com/docs/components/base/spinner */
|
|
5
6
|
function Spinner({ className, ...props }) {
|
|
6
7
|
return /* @__PURE__ */ jsx(Loader2Icon, {
|
|
7
8
|
"data-slot": "spinner",
|
|
@@ -3,6 +3,7 @@ import { cn } from "cn";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Switch } from "@base-ui/react/switch";
|
|
5
5
|
// src/vendor/shadcn/switch.tsx
|
|
6
|
+
/** https://ui.shadcn.com/docs/components/base/switch */
|
|
6
7
|
function Switch$1({ className, size = "default", ...props }) {
|
|
7
8
|
return /* @__PURE__ */ jsx(Switch.Root, {
|
|
8
9
|
"data-slot": "switch",
|
|
@@ -2,6 +2,7 @@ import { cn } from "cn";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
// src/vendor/shadcn/textarea.tsx
|
|
5
|
+
/** https://ui.shadcn.com/docs/components/base/textarea */
|
|
5
6
|
function Textarea({ className, ...props }) {
|
|
6
7
|
return /* @__PURE__ */ jsx("textarea", {
|
|
7
8
|
"data-slot": "textarea",
|
|
@@ -17,4 +17,5 @@ export type FileTreeProps = Omit<React$1.HTMLAttributes<HTMLDivElement>, "childr
|
|
|
17
17
|
onSelect?: (node: FileTreeNode) => void;
|
|
18
18
|
label?: string;
|
|
19
19
|
};
|
|
20
|
+
/** https://ui.tinkererslabs.com/docs/components/file-tree/ */
|
|
20
21
|
export declare function FileTree({ nodes, expandedIds, defaultExpandedIds, onExpandedChange, selectedId, defaultSelectedId, onSelect, label, className, ...rootProps }: FileTreeProps): React$1.JSX.Element;
|
|
@@ -21,6 +21,7 @@ function flatten(nodes, expanded, level = 1) {
|
|
|
21
21
|
return [self, ...flatten(node.children, expanded, level + 1)];
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
+
/** https://ui.tinkererslabs.com/docs/components/file-tree/ */
|
|
24
25
|
function FileTree({ nodes, expandedIds, defaultExpandedIds = [], onExpandedChange, selectedId, defaultSelectedId = null, onSelect, label = "Files", className, ...rootProps }) {
|
|
25
26
|
const [uncontrolledExpanded, setUncontrolledExpanded] = React$1.useState(defaultExpandedIds);
|
|
26
27
|
const [uncontrolledSelected, setUncontrolledSelected] = React$1.useState(defaultSelectedId);
|
|
@@ -3,5 +3,6 @@ type IconSwapProps = Omit<HTMLMotionProps<"span">, "children"> & {
|
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
state: React.Key;
|
|
5
5
|
};
|
|
6
|
+
/** https://ui.iandefined.com/docs/utilities/icon-swap/ */
|
|
6
7
|
declare function IconSwap({ children, state, ...props }: IconSwapProps): import("react").JSX.Element;
|
|
7
8
|
export { IconSwap, type IconSwapProps };
|
|
@@ -7,4 +7,5 @@ export type JsonViewerProps = Omit<React$1.HTMLAttributes<HTMLDivElement>, "chil
|
|
|
7
7
|
copyable?: boolean;
|
|
8
8
|
label?: string;
|
|
9
9
|
};
|
|
10
|
+
/** https://ui.tinkererslabs.com/docs/components/json-viewer/ */
|
|
10
11
|
export declare function JsonViewer({ value, rootName, defaultExpandedDepth, maxStringLength, copyable, label, className, ...rootProps }: JsonViewerProps): React$1.JSX.Element;
|
|
@@ -80,6 +80,7 @@ const VALUE_CLASS = {
|
|
|
80
80
|
object: "text-muted-foreground",
|
|
81
81
|
array: "text-muted-foreground"
|
|
82
82
|
};
|
|
83
|
+
/** https://ui.tinkererslabs.com/docs/components/json-viewer/ */
|
|
83
84
|
function JsonViewer({ value, rootName = "root", defaultExpandedDepth = 1, maxStringLength = 120, copyable = true, label = "JSON", className, ...rootProps }) {
|
|
84
85
|
const [expanded, setExpanded] = React$1.useState(() => pathsToDepth(value, rootName, defaultExpandedDepth));
|
|
85
86
|
const [copied, setCopied] = React$1.useState(null);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button } from "../shadcn/button.mjs";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
|
-
import { Dialog } from "@base-ui/react/dialog";
|
|
4
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
5
5
|
type LightboxOverlay = "blur" | "brightness";
|
|
6
6
|
type LightboxDirection = "ltr" | "rtl";
|
|
7
7
|
type LightboxChangeReason = "trigger-press" | "previous-press" | "next-press" | "thumbnail-press" | "swipe" | "keyboard" | "programmatic" | "items-change";
|
|
@@ -7,8 +7,8 @@ import { cn } from "cn";
|
|
|
7
7
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
8
8
|
import * as React$1 from "react";
|
|
9
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import { Dialog } from "@base-ui/react/dialog";
|
|
11
10
|
import { useRender } from "@base-ui/react/use-render";
|
|
11
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
12
12
|
import { ChevronLeftIcon, ChevronRightIcon, DownloadIcon, EllipsisIcon, ImageOffIcon, XIcon, ZoomInIcon, ZoomOutIcon } from "lucide-react";
|
|
13
13
|
import { ScrollArea } from "@base-ui/react/scroll-area";
|
|
14
14
|
import { Menu } from "@base-ui/react/menu";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Calendar } from "../vendor/coss/calendar.mjs";
|
|
1
2
|
import { Button } from "../vendor/shadcn/button.mjs";
|
|
2
|
-
import { Calendar } from "../vendor/shadcn/calendar.mjs";
|
|
3
3
|
import { Input } from "../vendor/shadcn/input.mjs";
|
|
4
4
|
import { ComponentProps } from "react";
|
|
5
5
|
import { DateRange } from "@daypicker/react";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { Calendar } from "../vendor/coss/calendar.mjs";
|
|
1
2
|
import { Button } from "../vendor/shadcn/button.mjs";
|
|
2
|
-
import { Calendar } from "../vendor/shadcn/calendar.mjs";
|
|
3
3
|
import { Input } from "../vendor/shadcn/input.mjs";
|
|
4
4
|
import { Popover, PopoverContent, PopoverTrigger } from "../vendor/shadcn/popover.mjs";
|
|
5
5
|
import { cn } from "cn";
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { CalendarIcon } from "lucide-react";
|
|
9
|
+
import { enUS, zhCN } from "@daypicker/react/locale";
|
|
9
10
|
import { format } from "date-fns";
|
|
10
11
|
// src/widgets/datetime.tsx
|
|
11
12
|
function TimePicker({ className, step = "1", ...props }) {
|
|
@@ -18,6 +19,7 @@ function TimePicker({ className, step = "1", ...props }) {
|
|
|
18
19
|
}
|
|
19
20
|
function DatePicker({ value, defaultValue = null, placeholder = "请选择日期", disabled, onChange, className, calendarProps, ...props }) {
|
|
20
21
|
const [internalValue, setInternalValue] = useState(defaultValue);
|
|
22
|
+
const locale = navigator.language.startsWith("zh") ? zhCN : enUS;
|
|
21
23
|
const date = value === void 0 ? internalValue : value;
|
|
22
24
|
function handleSelect(selected) {
|
|
23
25
|
const nextValue = selected ?? null;
|
|
@@ -34,6 +36,7 @@ function DatePicker({ value, defaultValue = null, placeholder = "请选择日期
|
|
|
34
36
|
}),
|
|
35
37
|
children: [/* @__PURE__ */ jsx(CalendarIcon, { "aria-hidden": "true" }), date ? format(date, "PPP") : placeholder]
|
|
36
38
|
}), /* @__PURE__ */ jsx(PopoverContent, { children: /* @__PURE__ */ jsx(Calendar, {
|
|
39
|
+
locale,
|
|
37
40
|
defaultMonth: date ?? void 0,
|
|
38
41
|
...calendarProps,
|
|
39
42
|
disabled: disabled || calendarProps?.disabled,
|
|
@@ -44,6 +47,7 @@ function DatePicker({ value, defaultValue = null, placeholder = "请选择日期
|
|
|
44
47
|
}
|
|
45
48
|
function DateRangePicker({ value, defaultValue = null, placeholder = "请选择日期范围", disabled, onChange, className, calendarProps, ...props }) {
|
|
46
49
|
const [internalValue, setInternalValue] = useState(defaultValue);
|
|
50
|
+
const locale = navigator.language.startsWith("zh") ? zhCN : enUS;
|
|
47
51
|
const date = value === void 0 ? internalValue : value;
|
|
48
52
|
function handleSelect(selected) {
|
|
49
53
|
const nextValue = selected ?? null;
|
|
@@ -64,6 +68,7 @@ function DateRangePicker({ value, defaultValue = null, placeholder = "请选择
|
|
|
64
68
|
date?.to && /* @__PURE__ */ jsxs(Fragment, { children: [" - ", format(date.to, "LLL dd, y")] })
|
|
65
69
|
]
|
|
66
70
|
}), /* @__PURE__ */ jsx(PopoverContent, { children: /* @__PURE__ */ jsx(Calendar, {
|
|
71
|
+
locale,
|
|
67
72
|
defaultMonth: date?.from,
|
|
68
73
|
...calendarProps,
|
|
69
74
|
disabled: disabled || calendarProps?.disabled,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { DropzoneOptions } from "react-dropzone";
|
|
2
1
|
import { ComponentProps } from "react";
|
|
2
|
+
import { DropzoneOptions, useDropzone as useDropzone$1 } from "react-dropzone";
|
|
3
|
+
export type * from "react-dropzone";
|
|
4
|
+
export declare function formatBytes(bytes: number, nospace?: boolean): string;
|
|
3
5
|
type DropzoneProps = DropzoneOptions & Omit<ComponentProps<"div">, keyof DropzoneOptions>;
|
|
4
|
-
|
|
6
|
+
/** https://react-dropzone.js.org/ */
|
|
5
7
|
export declare function Dropzone({ accept, minSize, maxSize, maxFiles, multiple, disabled, preventDropOnDocument, noClick, noKeyboard, noDrag, noDragEventsBubbling, noPaste, onDrop, onDropAccepted, onDropRejected, onDragEnter, onDragOver, onDragLeave, getFilesFromEvent, onFileDialogCancel, onFileDialogOpen, onError, validator, getErrorMessage, useFsAccessApi, autoFocus, children, className, ref, ...props }: DropzoneProps): import("react").JSX.Element;
|
|
6
|
-
export {};
|
|
8
|
+
export { useDropzone$1 as useDropzone };
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { buttonVariants } from "../vendor/shadcn/button.mjs";
|
|
3
3
|
import { cn } from "cn";
|
|
4
|
-
import { useDropzone } from "react-dropzone";
|
|
5
4
|
import { useId, useImperativeHandle } from "react";
|
|
6
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { UploadIcon } from "lucide-react";
|
|
7
|
+
import { useDropzone, useDropzone as useDropzone$1 } from "react-dropzone";
|
|
8
8
|
// src/widgets/dropzone.tsx
|
|
9
|
-
function
|
|
9
|
+
function formatBytes(bytes, nospace = false) {
|
|
10
|
+
if (!Number.isFinite(bytes) || bytes < 0) return "—";
|
|
11
|
+
if (bytes === 0) return `0${nospace ? "" : " "}B`;
|
|
10
12
|
const units = [
|
|
11
13
|
"B",
|
|
12
14
|
"KB",
|
|
13
15
|
"MB",
|
|
14
16
|
"GB",
|
|
15
|
-
"TB"
|
|
17
|
+
"TB",
|
|
18
|
+
"PB"
|
|
16
19
|
];
|
|
17
|
-
const index =
|
|
18
|
-
return `${Number((bytes / 1024 ** index).toFixed(1))} ${units[index]}`;
|
|
20
|
+
const index = Math.max(0, Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), units.length - 1));
|
|
21
|
+
return `${Number((bytes / 1024 ** index).toFixed(1))}${nospace ? "" : " "}${units[index]}`;
|
|
19
22
|
}
|
|
23
|
+
/** https://react-dropzone.js.org/ */
|
|
20
24
|
function Dropzone({ accept, minSize, maxSize, maxFiles, multiple, disabled, preventDropOnDocument, noClick, noKeyboard, noDrag, noDragEventsBubbling, noPaste, onDrop, onDropAccepted, onDropRejected, onDragEnter, onDragOver, onDragLeave, getFilesFromEvent, onFileDialogCancel, onFileDialogOpen, onError, validator, getErrorMessage, useFsAccessApi, autoFocus, children, className, ref, ...props }) {
|
|
21
25
|
const { getRootProps, getInputProps, rootRef, isDragActive, isDragReject, isProcessing } = useDropzone({
|
|
22
26
|
accept,
|
|
@@ -48,7 +52,7 @@ function Dropzone({ accept, minSize, maxSize, maxFiles, multiple, disabled, prev
|
|
|
48
52
|
});
|
|
49
53
|
useImperativeHandle(ref, () => rootRef.current);
|
|
50
54
|
const descriptionId = useId();
|
|
51
|
-
const limits = [multiple === false ? "单个文件" : maxFiles && maxFiles > 0 ? `最多 ${maxFiles} 个文件` : void 0, maxSize !== void 0 && Number.isFinite(maxSize) ? `每个不超过 ${
|
|
55
|
+
const limits = [multiple === false ? "单个文件" : maxFiles && maxFiles > 0 ? `最多 ${maxFiles} 个文件` : void 0, maxSize !== void 0 && Number.isFinite(maxSize) ? `每个不超过 ${formatBytes(maxSize)}` : void 0].filter(Boolean);
|
|
52
56
|
return /* @__PURE__ */ jsxs("div", {
|
|
53
57
|
...getRootProps({
|
|
54
58
|
"role": "button",
|
|
@@ -95,4 +99,4 @@ function Dropzone({ accept, minSize, maxSize, maxFiles, multiple, disabled, prev
|
|
|
95
99
|
] })]
|
|
96
100
|
});
|
|
97
101
|
}
|
|
98
|
-
export { Dropzone,
|
|
102
|
+
export { Dropzone, formatBytes, useDropzone$1 as useDropzone };
|
package/dist/widgets/index.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AlertDialogClose, AlertDialogContent as AlertDialogPopup, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPrimitive, AlertDialogTitle, AlertDialogTrigger } from "../vendor/coss/alert-dialog.mjs";
|
|
2
|
+
import { Card as Card$1, CardAction, CardContent as CardPanel, CardDescription, CardFooter, CardFrame, CardFrameAction, CardFrameDescription, CardFrameFooter, CardFrameHeader, CardFrameTitle, CardHeader, CardTitle } from "../vendor/coss/card.mjs";
|
|
2
3
|
import { DialogClose, DialogContent as DialogPopup, DialogDescription, DialogFooter, DialogHeader, DialogPanel, DialogPrimitive, DialogTitle, DialogTrigger } from "../vendor/coss/dialog.mjs";
|
|
3
4
|
import { Drawer as Drawer$1, DrawerClose, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPanel, DrawerPopup, DrawerTitle, DrawerTrigger } from "../vendor/coss/drawer.mjs";
|
|
4
5
|
import { Empty as Empty$1, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../vendor/coss/empty.mjs";
|
|
6
|
+
import { Table as Table$1, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "../vendor/coss/table.mjs";
|
|
5
7
|
import { Breadcrumb as Breadcrumb$1, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "../vendor/shadcn/breadcrumb.mjs";
|
|
6
8
|
import { ButtonGroup as ButtonGroup$1, ButtonGroupSeparator, ButtonGroupText } from "../vendor/shadcn/button-group.mjs";
|
|
7
|
-
import { Calendar as Calendar$1, CalendarDayButton } from "../vendor/shadcn/calendar.mjs";
|
|
8
|
-
import { Card as Card$1, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../vendor/shadcn/card.mjs";
|
|
9
9
|
import { ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxValue } from "../vendor/shadcn/combobox.mjs";
|
|
10
10
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../vendor/shadcn/dropdown-menu.mjs";
|
|
11
11
|
import { Field as Field$1, FieldDescription, FieldError, FieldLabel } from "../vendor/shadcn/field.mjs";
|
|
@@ -15,54 +15,68 @@ import { Popover as Popover$1, PopoverContent, PopoverDescription, PopoverTitle,
|
|
|
15
15
|
import { Progress as Progress$1, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue } from "../vendor/shadcn/progress.mjs";
|
|
16
16
|
import { RadioGroup, RadioGroupItem } from "../vendor/shadcn/radio-group.mjs";
|
|
17
17
|
import { SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue } from "../vendor/shadcn/select.mjs";
|
|
18
|
-
import { Table as Table$1, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "../vendor/shadcn/table.mjs";
|
|
19
18
|
import { Tabs as Tabs$1, TabsContent, TabsList, TabsTrigger } from "../vendor/shadcn/tabs.mjs";
|
|
20
19
|
import { Tooltip as Tooltip$1, TooltipContent, TooltipProvider, TooltipTrigger } from "../vendor/shadcn/tooltip.mjs";
|
|
21
20
|
import "./toast.mjs";
|
|
22
21
|
import { Sidebar } from "./sidebar.mjs";
|
|
23
22
|
import { DatePicker, DateRange, DateRangePicker, TimePicker } from "./datetime.mjs";
|
|
24
23
|
import { Toaster, toast } from "../vendor/shadcn/toast.mjs";
|
|
25
|
-
import { Dropzone,
|
|
24
|
+
import { Dropzone, formatBytes, useDropzone } from "./dropzone.mjs";
|
|
26
25
|
import { Carousel, Image, ImageProps, Lightbox } from "./multimedia.mjs";
|
|
27
26
|
import { useSidebar } from "../vendor/shadcn/sidebar.mjs";
|
|
28
27
|
import { Pagination } from "./pagination.mjs";
|
|
29
|
-
import { Form } from "../vendor/coss/form.mjs";
|
|
30
28
|
import { Label } from "../vendor/shadcn/label.mjs";
|
|
31
|
-
import { LightboxActions, LightboxBackdrop, LightboxCaptions, LightboxChangeReason, LightboxClose, LightboxContent, LightboxControl, LightboxControlContext, LightboxCounter, LightboxDownload, LightboxImageChangeEventDetails, LightboxImageItem, LightboxItem, LightboxMore, LightboxNext, LightboxOpenEventDetails, LightboxPrevious, LightboxProps, LightboxSlide, LightboxSlides, LightboxThumbnail, LightboxThumbnails, LightboxToolbar, LightboxTrigger, LightboxTriggerProps, LightboxVideoItem, LightboxViewport, LightboxZoom, LightboxZoomButton, useLightbox } from "../vendor/tailored/lightbox.mjs";
|
|
32
29
|
import { Input } from "../vendor/shadcn/input.mjs";
|
|
33
30
|
import { Badge } from "../vendor/shadcn/badge.mjs";
|
|
31
|
+
import { LightboxActions, LightboxBackdrop, LightboxCaptions, LightboxChangeReason, LightboxClose, LightboxContent, LightboxControl, LightboxControlContext, LightboxCounter, LightboxDownload, LightboxImageChangeEventDetails, LightboxImageItem, LightboxItem, LightboxMore, LightboxNext, LightboxOpenEventDetails, LightboxPrevious, LightboxProps, LightboxSlide, LightboxSlides, LightboxThumbnail, LightboxThumbnails, LightboxToolbar, LightboxTrigger, LightboxTriggerProps, LightboxVideoItem, LightboxViewport, LightboxZoom, LightboxZoomButton, useLightbox } from "../vendor/tailored/lightbox.mjs";
|
|
34
32
|
import { Button } from "../vendor/shadcn/button.mjs";
|
|
35
33
|
import { Switch } from "../vendor/shadcn/switch.mjs";
|
|
36
|
-
import { Checkbox } from "../vendor/shadcn/checkbox.mjs";
|
|
37
34
|
import { Spinner } from "../vendor/shadcn/spinner.mjs";
|
|
38
35
|
import { Skeleton } from "../vendor/shadcn/skeleton.mjs";
|
|
36
|
+
import { Checkbox } from "../vendor/shadcn/checkbox.mjs";
|
|
39
37
|
import { Textarea } from "../vendor/shadcn/textarea.mjs";
|
|
40
38
|
import { Separator } from "../vendor/shadcn/separator.mjs";
|
|
39
|
+
import { Form } from "../vendor/coss/form.mjs";
|
|
40
|
+
import { Calendar } from "../vendor/coss/calendar.mjs";
|
|
41
41
|
import { ScrollArea } from "../vendor/coss/scroll-area.mjs";
|
|
42
42
|
import { IconSwap } from "../vendor/tailored/icon-swap.mjs";
|
|
43
43
|
import { JsonViewer } from "../vendor/tailored/json-viewer.mjs";
|
|
44
44
|
import { FileTree, FileTreeNode } from "../vendor/tailored/file-tree.mjs";
|
|
45
|
+
export * from "react-dropzone";
|
|
46
|
+
/** https://ui.shadcn.com/docs/components/base/kbd */
|
|
45
47
|
export declare const Kbd: typeof Kbd$1 & {
|
|
46
48
|
Group: typeof KbdGroup;
|
|
47
49
|
};
|
|
50
|
+
/** https://ui.shadcn.com/docs/components/base/tabs */
|
|
48
51
|
export declare const Tabs: typeof Tabs$1 & {
|
|
49
52
|
List: typeof TabsList;
|
|
50
53
|
Trigger: typeof TabsTrigger;
|
|
51
54
|
Content: typeof TabsContent;
|
|
52
55
|
};
|
|
56
|
+
/** https://coss.com/ui/docs/components/card */
|
|
53
57
|
export declare const Card: typeof Card$1 & {
|
|
54
58
|
Header: typeof CardHeader;
|
|
55
|
-
|
|
59
|
+
Panel: typeof CardPanel;
|
|
56
60
|
Footer: typeof CardFooter;
|
|
57
61
|
Title: typeof CardTitle;
|
|
58
62
|
Action: typeof CardAction;
|
|
59
63
|
Description: typeof CardDescription;
|
|
60
64
|
};
|
|
65
|
+
/** https://coss.com/ui/docs/components/card#cardframe */
|
|
66
|
+
export declare const Frame: typeof CardFrame & {
|
|
67
|
+
Header: typeof CardFrameHeader;
|
|
68
|
+
Footer: typeof CardFrameFooter;
|
|
69
|
+
Title: typeof CardFrameTitle;
|
|
70
|
+
Description: typeof CardFrameDescription;
|
|
71
|
+
Action: typeof CardFrameAction;
|
|
72
|
+
};
|
|
73
|
+
/** https://ui.shadcn.com/docs/components/base/field */
|
|
61
74
|
export declare const Field: typeof Field$1 & {
|
|
62
75
|
Label: typeof FieldLabel;
|
|
63
76
|
Description: typeof FieldDescription;
|
|
64
77
|
Error: typeof FieldError;
|
|
65
78
|
};
|
|
79
|
+
/** https://coss.com/ui/docs/components/empty */
|
|
66
80
|
export declare const Empty: typeof Empty$1 & {
|
|
67
81
|
Header: typeof EmptyHeader;
|
|
68
82
|
Content: typeof EmptyContent;
|
|
@@ -70,17 +84,21 @@ export declare const Empty: typeof Empty$1 & {
|
|
|
70
84
|
Title: typeof EmptyTitle;
|
|
71
85
|
Description: typeof EmptyDescription;
|
|
72
86
|
};
|
|
87
|
+
/** https://coss.com/ui/docs/components/table */
|
|
73
88
|
export declare const Table: typeof Table$1 & {
|
|
74
89
|
Header: typeof TableHeader;
|
|
75
90
|
Body: typeof TableBody;
|
|
76
91
|
Footer: typeof TableFooter;
|
|
92
|
+
Caption: typeof TableCaption;
|
|
77
93
|
Row: typeof TableRow;
|
|
78
94
|
Head: typeof TableHead;
|
|
79
95
|
Cell: typeof TableCell;
|
|
80
96
|
};
|
|
97
|
+
/** https://ui.shadcn.com/docs/components/base/radio-group */
|
|
81
98
|
export declare const Radio: typeof RadioGroupItem & {
|
|
82
99
|
Group: typeof RadioGroup;
|
|
83
100
|
};
|
|
101
|
+
/** https://ui.shadcn.com/docs/components/base/select */
|
|
84
102
|
export declare const Select: typeof import("@base-ui/react").SelectRoot & {
|
|
85
103
|
Trigger: typeof SelectTrigger;
|
|
86
104
|
Value: typeof SelectValue;
|
|
@@ -90,6 +108,7 @@ export declare const Select: typeof import("@base-ui/react").SelectRoot & {
|
|
|
90
108
|
Label: typeof SelectLabel;
|
|
91
109
|
Item: typeof SelectItem;
|
|
92
110
|
};
|
|
111
|
+
/** https://coss.com/ui/docs/components/drawer */
|
|
93
112
|
export declare const Drawer: typeof Drawer$1 & {
|
|
94
113
|
Trigger: typeof DrawerTrigger;
|
|
95
114
|
Close: typeof DrawerClose;
|
|
@@ -100,6 +119,7 @@ export declare const Drawer: typeof Drawer$1 & {
|
|
|
100
119
|
Title: typeof DrawerTitle;
|
|
101
120
|
Description: typeof DrawerDescription;
|
|
102
121
|
};
|
|
122
|
+
/** https://coss.com/ui/docs/components/dialog */
|
|
103
123
|
export declare const Dialog: (<Payload>(props: DialogPrimitive.Root.Props<Payload>) => React.JSX.Element) & {
|
|
104
124
|
Trigger: typeof DialogTrigger;
|
|
105
125
|
Close: typeof DialogClose;
|
|
@@ -110,17 +130,20 @@ export declare const Dialog: (<Payload>(props: DialogPrimitive.Root.Props<Payloa
|
|
|
110
130
|
Title: typeof DialogTitle;
|
|
111
131
|
Description: typeof DialogDescription;
|
|
112
132
|
};
|
|
133
|
+
/** https://ui.shadcn.com/docs/components/base/tooltip */
|
|
113
134
|
export declare const Tooltip: typeof Tooltip$1 & {
|
|
114
135
|
Provider: typeof TooltipProvider;
|
|
115
136
|
Trigger: typeof TooltipTrigger;
|
|
116
137
|
Content: typeof TooltipContent;
|
|
117
138
|
};
|
|
139
|
+
/** https://ui.shadcn.com/docs/components/base/popover */
|
|
118
140
|
export declare const Popover: typeof Popover$1 & {
|
|
119
141
|
Trigger: typeof PopoverTrigger;
|
|
120
142
|
Content: typeof PopoverContent;
|
|
121
143
|
Title: typeof PopoverTitle;
|
|
122
144
|
Description: typeof PopoverDescription;
|
|
123
145
|
};
|
|
146
|
+
/** https://ui.shadcn.com/docs/components/base/dropdown-menu */
|
|
124
147
|
export declare const Dropdown: typeof DropdownMenu & {
|
|
125
148
|
Trigger: typeof DropdownMenuTrigger;
|
|
126
149
|
Content: typeof DropdownMenuContent;
|
|
@@ -136,6 +159,7 @@ export declare const Dropdown: typeof DropdownMenu & {
|
|
|
136
159
|
RadioGroup: typeof DropdownMenuRadioGroup;
|
|
137
160
|
CheckboxItem: typeof DropdownMenuCheckboxItem;
|
|
138
161
|
};
|
|
162
|
+
/** https://ui.shadcn.com/docs/components/base/combobox */
|
|
139
163
|
export declare const Combobox: typeof import("@base-ui/react").ComboboxRoot & {
|
|
140
164
|
Content: typeof ComboboxContent;
|
|
141
165
|
Empty: typeof ComboboxEmpty;
|
|
@@ -151,15 +175,14 @@ export declare const Combobox: typeof import("@base-ui/react").ComboboxRoot & {
|
|
|
151
175
|
Item: typeof ComboboxItem;
|
|
152
176
|
Separator: typeof ComboboxSeparator;
|
|
153
177
|
};
|
|
178
|
+
/** https://ui.shadcn.com/docs/components/base/progress */
|
|
154
179
|
export declare const Progress: typeof Progress$1 & {
|
|
155
180
|
Label: typeof ProgressLabel;
|
|
156
181
|
Value: typeof ProgressValue;
|
|
157
182
|
Track: typeof ProgressTrack;
|
|
158
183
|
Indicator: typeof ProgressIndicator;
|
|
159
184
|
};
|
|
160
|
-
|
|
161
|
-
DayButton: typeof CalendarDayButton;
|
|
162
|
-
};
|
|
185
|
+
/** https://ui.shadcn.com/docs/components/base/breadcrumb */
|
|
163
186
|
export declare const Breadcrumb: typeof Breadcrumb$1 & {
|
|
164
187
|
List: typeof BreadcrumbList;
|
|
165
188
|
Item: typeof BreadcrumbItem;
|
|
@@ -168,6 +191,7 @@ export declare const Breadcrumb: typeof Breadcrumb$1 & {
|
|
|
168
191
|
Ellipsis: typeof BreadcrumbEllipsis;
|
|
169
192
|
Page: typeof BreadcrumbPage;
|
|
170
193
|
};
|
|
194
|
+
/** https://coss.com/ui/docs/components/alert-dialog */
|
|
171
195
|
export declare const AlertDialog: typeof AlertDialogPrimitive.Root & {
|
|
172
196
|
Trigger: typeof AlertDialogTrigger;
|
|
173
197
|
Close: typeof AlertDialogClose;
|
|
@@ -177,10 +201,12 @@ export declare const AlertDialog: typeof AlertDialogPrimitive.Root & {
|
|
|
177
201
|
Title: typeof AlertDialogTitle;
|
|
178
202
|
Description: typeof AlertDialogDescription;
|
|
179
203
|
};
|
|
204
|
+
/** https://ui.shadcn.com/docs/components/base/button-group */
|
|
180
205
|
export declare const ButtonGroup: typeof ButtonGroup$1 & {
|
|
181
206
|
Text: typeof ButtonGroupText;
|
|
182
207
|
Separator: typeof ButtonGroupSeparator;
|
|
183
208
|
};
|
|
209
|
+
/** https://ui.shadcn.com/docs/components/base/input-group */
|
|
184
210
|
export declare const InputGroup: typeof InputGroup$1 & {
|
|
185
211
|
Addon: typeof InputGroupAddon;
|
|
186
212
|
AddonText: typeof InputGroupText;
|
|
@@ -188,4 +214,4 @@ export declare const InputGroup: typeof InputGroup$1 & {
|
|
|
188
214
|
Textarea: typeof InputGroupTextarea;
|
|
189
215
|
Button: typeof InputGroupButton;
|
|
190
216
|
};
|
|
191
|
-
export { Badge, Button, Carousel, Checkbox, DatePicker, type DateRange, DateRangePicker, Dropzone, FileTree, type FileTreeNode, Form, IconSwap, Image, ImageProps, Input, JsonViewer, Label, Lightbox, type LightboxActions, type LightboxBackdrop, type LightboxCaptions, type LightboxChangeReason, type LightboxClose, type LightboxContent, type LightboxControl, type LightboxControlContext, type LightboxCounter, type LightboxDownload, type LightboxImageChangeEventDetails, type LightboxImageItem, type LightboxItem, type LightboxMore, type LightboxNext, type LightboxOpenEventDetails, type LightboxPrevious, type LightboxProps, type LightboxSlide, type LightboxSlides, type LightboxThumbnail, type LightboxThumbnails, type LightboxToolbar, type LightboxTrigger, type LightboxTriggerProps, type LightboxVideoItem, type LightboxViewport, type LightboxZoom, type LightboxZoomButton, Pagination, ScrollArea, Separator, Sidebar, Skeleton, Spinner, Switch, Textarea, TimePicker, Toaster as ToastProvider,
|
|
217
|
+
export { Badge, Button, Calendar, Carousel, Checkbox, DatePicker, type DateRange, DateRangePicker, Dropzone, FileTree, type FileTreeNode, Form, IconSwap, Image, ImageProps, Input, JsonViewer, Label, Lightbox, type LightboxActions, type LightboxBackdrop, type LightboxCaptions, type LightboxChangeReason, type LightboxClose, type LightboxContent, type LightboxControl, type LightboxControlContext, type LightboxCounter, type LightboxDownload, type LightboxImageChangeEventDetails, type LightboxImageItem, type LightboxItem, type LightboxMore, type LightboxNext, type LightboxOpenEventDetails, type LightboxPrevious, type LightboxProps, type LightboxSlide, type LightboxSlides, type LightboxThumbnail, type LightboxThumbnails, type LightboxToolbar, type LightboxTrigger, type LightboxTriggerProps, type LightboxVideoItem, type LightboxViewport, type LightboxZoom, type LightboxZoomButton, Pagination, ScrollArea, Separator, Sidebar, Skeleton, Spinner, Switch, Textarea, TimePicker, Toaster as ToastProvider, formatBytes, toast, useDropzone, type useLightbox, useSidebar };
|