@deftui/react 0.2.4 → 0.2.5
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 -2
- package/dist/index.d.mts +3 -4
- package/dist/index.mjs +2 -3
- 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/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/widgets/dropzone.d.mts +5 -3
- package/dist/widgets/dropzone.mjs +11 -7
- package/dist/widgets/index.d.mts +24 -3
- package/dist/widgets/index.mjs +22 -2
- 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/README.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
A React component library built on Base UI, shadcn/ui, and their open-source registry ecosystem, offering easy-to-use compound component APIs.
|
|
4
4
|
|
|
5
|
-
[Upstream documentation](./dist/vendor/README.md): To look up component usage, check the local exports first, then consult the upstream.
|
|
6
|
-
|
|
7
5
|
> Most basic components expose exactly the same APIs as their shadcn/ui counterparts backed by Base UI.
|
|
8
6
|
|
|
9
7
|
## Installation
|
package/dist/index.d.mts
CHANGED
|
@@ -8,7 +8,7 @@ import { Input } from "./vendor/shadcn/input.mjs";
|
|
|
8
8
|
import { useSidebar } from "./vendor/shadcn/sidebar.mjs";
|
|
9
9
|
import { Sidebar } from "./widgets/sidebar.mjs";
|
|
10
10
|
import { DatePicker, DateRange, DateRangePicker, TimePicker } from "./widgets/datetime.mjs";
|
|
11
|
-
import { Dropzone,
|
|
11
|
+
import { Dropzone, formatBytes, useDropzone } from "./widgets/dropzone.mjs";
|
|
12
12
|
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";
|
|
13
13
|
import { Carousel, Image, ImageProps, Lightbox } from "./widgets/multimedia.mjs";
|
|
14
14
|
import { Pagination } from "./widgets/pagination.mjs";
|
|
@@ -27,6 +27,5 @@ import { AlertDialog, Breadcrumb, ButtonGroup, Calendar, Card, Combobox, Dialog,
|
|
|
27
27
|
import { cn } from "cn";
|
|
28
28
|
import { cva } from "class-variance-authority";
|
|
29
29
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
30
|
-
|
|
31
|
-
export type
|
|
32
|
-
export { AlertDialog, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Combobox, DatePicker, type DateRange, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, FileTree, type FileTreeNode, Form, IconSwap, Image, ImageProps, Input, InputGroup, JsonViewer, Kbd, 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, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Toaster as ToastProvider, Tooltip, cn, cva, formatSize, mergeProps, toast, useCopyToClipboard, useDropzone, useIsMobile, type useLightbox, useMediaQuery, useSidebar };
|
|
30
|
+
export * from "react-dropzone";
|
|
31
|
+
export { AlertDialog, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Combobox, DatePicker, type DateRange, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, FileTree, type FileTreeNode, Form, IconSwap, Image, ImageProps, Input, InputGroup, JsonViewer, Kbd, 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, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Toaster as ToastProvider, Tooltip, cn, cva, formatBytes, mergeProps, toast, useCopyToClipboard, useDropzone, useIsMobile, type useLightbox, useMediaQuery, useSidebar };
|
package/dist/index.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import { Skeleton } from "./vendor/shadcn/skeleton.mjs";
|
|
|
12
12
|
import { useSidebar } from "./vendor/shadcn/sidebar.mjs";
|
|
13
13
|
import { Sidebar } from "./widgets/sidebar.mjs";
|
|
14
14
|
import { DatePicker, DateRangePicker, TimePicker } from "./widgets/datetime.mjs";
|
|
15
|
-
import { Dropzone,
|
|
15
|
+
import { Dropzone, formatBytes, useDropzone } from "./widgets/dropzone.mjs";
|
|
16
16
|
import { Carousel, Image, Lightbox } from "./widgets/multimedia.mjs";
|
|
17
17
|
import { Pagination } from "./widgets/pagination.mjs";
|
|
18
18
|
import { Form } from "./vendor/coss/form.mjs";
|
|
@@ -26,5 +26,4 @@ import { AlertDialog, Breadcrumb, ButtonGroup, Calendar, Card, Combobox, Dialog,
|
|
|
26
26
|
import { cn } from "cn";
|
|
27
27
|
import { cva } from "class-variance-authority";
|
|
28
28
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
29
|
-
|
|
30
|
-
export { AlertDialog, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Combobox, DatePicker, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, FileTree, Form, IconSwap, Image, Input, InputGroup, JsonViewer, Kbd, Label, Lightbox, Pagination, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Toaster as ToastProvider, Tooltip, cn, cva, formatSize, mergeProps, toast, useCopyToClipboard, useDropzone, useIsMobile, useMediaQuery, useSidebar };
|
|
29
|
+
export { AlertDialog, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Combobox, DatePicker, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, FileTree, Form, IconSwap, Image, Input, InputGroup, JsonViewer, Kbd, Label, Lightbox, Pagination, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Toaster as ToastProvider, Tooltip, cn, cva, formatBytes, mergeProps, toast, useCopyToClipboard, useDropzone, useIsMobile, useMediaQuery, useSidebar };
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Form as FormPrimitive } from "@base-ui/react/form";
|
|
4
4
|
// src/vendor/coss/form.tsx
|
|
5
|
+
/** https://coss.com/ui/docs/components/form */
|
|
5
6
|
function Form({ className, ...props }) {
|
|
6
7
|
return /* @__PURE__ */ jsx(FormPrimitive, {
|
|
7
8
|
className,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
3
|
+
/** https://coss.com/ui/docs/components/scroll-area */
|
|
3
4
|
declare function ScrollArea$1({ className, children, scrollFade, scrollbarGutter, fill, clampContentMinWidth, overscrollContain, ...props }: ScrollAreaPrimitive.Root.Props & {
|
|
4
5
|
scrollFade?: boolean;
|
|
5
6
|
scrollbarGutter?: boolean;
|
|
@@ -3,6 +3,7 @@ import { cn } from "../shadcn/lib/utils.mjs";
|
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
5
5
|
// src/vendor/coss/scroll-area.tsx
|
|
6
|
+
/** https://coss.com/ui/docs/components/scroll-area */
|
|
6
7
|
function ScrollArea$1({ className, children, scrollFade = false, scrollbarGutter = false, fill = false, clampContentMinWidth = true, overscrollContain = false, ...props }) {
|
|
7
8
|
return /* @__PURE__ */ jsxs(ScrollAreaPrimitive.Root, {
|
|
8
9
|
className: cn("size-full min-h-0", className),
|
|
@@ -3,5 +3,6 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
4
|
variant?: "default" | "destructive" | "ghost" | "info" | "link" | "outline" | "secondary" | "success" | "warning" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
/** https://ui.shadcn.com/docs/components/base/badge */
|
|
6
7
|
declare function Badge({ className, variant, render, ...props }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
7
8
|
export { Badge, badgeVariants };
|
|
@@ -17,6 +17,7 @@ const badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-cent
|
|
|
17
17
|
} },
|
|
18
18
|
defaultVariants: { variant: "default" }
|
|
19
19
|
});
|
|
20
|
+
/** https://ui.shadcn.com/docs/components/base/badge */
|
|
20
21
|
function Badge({ className, variant = "default", render, ...props }) {
|
|
21
22
|
return useRender({
|
|
22
23
|
defaultTagName: "span",
|
|
@@ -5,6 +5,7 @@ declare const buttonVariants: (props?: ({
|
|
|
5
5
|
size?: "default" | "icon" | "icon-lg" | "icon-sm" | "icon-xs" | "lg" | "sm" | "xs" | null | undefined;
|
|
6
6
|
pill?: boolean | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
/** https://ui.shadcn.com/docs/components/base/button */
|
|
8
9
|
declare function Button$1({ className, variant, size, pill, isPending, disabled, children, ...props }: Button.Props & VariantProps<typeof buttonVariants> & {
|
|
9
10
|
isPending?: boolean;
|
|
10
11
|
}): import("react").JSX.Element;
|
|
@@ -34,6 +34,7 @@ const buttonVariants = cva("group/button inline-flex shrink-0 items-center justi
|
|
|
34
34
|
size: "default"
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
+
/** https://ui.shadcn.com/docs/components/base/button */
|
|
37
38
|
function Button$1({ className, variant = "default", size = "default", pill = false, isPending = false, disabled, children, ...props }) {
|
|
38
39
|
return /* @__PURE__ */ jsx(Button, {
|
|
39
40
|
"data-slot": "button",
|
|
@@ -4,6 +4,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
import { CheckIcon } from "lucide-react";
|
|
5
5
|
import { Checkbox } from "@base-ui/react/checkbox";
|
|
6
6
|
// src/vendor/shadcn/checkbox.tsx
|
|
7
|
+
/** https://ui.shadcn.com/docs/components/base/checkbox */
|
|
7
8
|
function Checkbox$1({ className, ...props }) {
|
|
8
9
|
return /* @__PURE__ */ jsx(Checkbox.Root, {
|
|
9
10
|
"data-slot": "checkbox",
|
|
@@ -3,6 +3,7 @@ import "react";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Input } from "@base-ui/react/input";
|
|
5
5
|
// src/vendor/shadcn/input.tsx
|
|
6
|
+
/** https://ui.shadcn.com/docs/components/base/input */
|
|
6
7
|
function Input$1({ className, type, ...props }) {
|
|
7
8
|
return /* @__PURE__ */ jsx(Input, {
|
|
8
9
|
type,
|
|
@@ -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,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
|
@@ -22,7 +22,7 @@ import "./toast.mjs";
|
|
|
22
22
|
import { Sidebar } from "./sidebar.mjs";
|
|
23
23
|
import { DatePicker, DateRange, DateRangePicker, TimePicker } from "./datetime.mjs";
|
|
24
24
|
import { Toaster, toast } from "../vendor/shadcn/toast.mjs";
|
|
25
|
-
import { Dropzone,
|
|
25
|
+
import { Dropzone, formatBytes, useDropzone } from "./dropzone.mjs";
|
|
26
26
|
import { Carousel, Image, ImageProps, Lightbox } from "./multimedia.mjs";
|
|
27
27
|
import { useSidebar } from "../vendor/shadcn/sidebar.mjs";
|
|
28
28
|
import { Pagination } from "./pagination.mjs";
|
|
@@ -33,23 +33,27 @@ import { Input } from "../vendor/shadcn/input.mjs";
|
|
|
33
33
|
import { Badge } from "../vendor/shadcn/badge.mjs";
|
|
34
34
|
import { Button } from "../vendor/shadcn/button.mjs";
|
|
35
35
|
import { Switch } from "../vendor/shadcn/switch.mjs";
|
|
36
|
-
import { Checkbox } from "../vendor/shadcn/checkbox.mjs";
|
|
37
36
|
import { Spinner } from "../vendor/shadcn/spinner.mjs";
|
|
38
37
|
import { Skeleton } from "../vendor/shadcn/skeleton.mjs";
|
|
38
|
+
import { Checkbox } from "../vendor/shadcn/checkbox.mjs";
|
|
39
39
|
import { Textarea } from "../vendor/shadcn/textarea.mjs";
|
|
40
40
|
import { Separator } from "../vendor/shadcn/separator.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://ui.shadcn.com/docs/components/base/card */
|
|
53
57
|
export declare const Card: typeof Card$1 & {
|
|
54
58
|
Header: typeof CardHeader;
|
|
55
59
|
Content: typeof CardContent;
|
|
@@ -58,11 +62,13 @@ export declare const Card: typeof Card$1 & {
|
|
|
58
62
|
Action: typeof CardAction;
|
|
59
63
|
Description: typeof CardDescription;
|
|
60
64
|
};
|
|
65
|
+
/** https://ui.shadcn.com/docs/components/base/field */
|
|
61
66
|
export declare const Field: typeof Field$1 & {
|
|
62
67
|
Label: typeof FieldLabel;
|
|
63
68
|
Description: typeof FieldDescription;
|
|
64
69
|
Error: typeof FieldError;
|
|
65
70
|
};
|
|
71
|
+
/** https://coss.com/ui/docs/components/empty */
|
|
66
72
|
export declare const Empty: typeof Empty$1 & {
|
|
67
73
|
Header: typeof EmptyHeader;
|
|
68
74
|
Content: typeof EmptyContent;
|
|
@@ -70,6 +76,7 @@ export declare const Empty: typeof Empty$1 & {
|
|
|
70
76
|
Title: typeof EmptyTitle;
|
|
71
77
|
Description: typeof EmptyDescription;
|
|
72
78
|
};
|
|
79
|
+
/** https://ui.shadcn.com/docs/components/base/table */
|
|
73
80
|
export declare const Table: typeof Table$1 & {
|
|
74
81
|
Header: typeof TableHeader;
|
|
75
82
|
Body: typeof TableBody;
|
|
@@ -78,9 +85,11 @@ export declare const Table: typeof Table$1 & {
|
|
|
78
85
|
Head: typeof TableHead;
|
|
79
86
|
Cell: typeof TableCell;
|
|
80
87
|
};
|
|
88
|
+
/** https://ui.shadcn.com/docs/components/base/radio-group */
|
|
81
89
|
export declare const Radio: typeof RadioGroupItem & {
|
|
82
90
|
Group: typeof RadioGroup;
|
|
83
91
|
};
|
|
92
|
+
/** https://ui.shadcn.com/docs/components/base/select */
|
|
84
93
|
export declare const Select: typeof import("@base-ui/react").SelectRoot & {
|
|
85
94
|
Trigger: typeof SelectTrigger;
|
|
86
95
|
Value: typeof SelectValue;
|
|
@@ -90,6 +99,7 @@ export declare const Select: typeof import("@base-ui/react").SelectRoot & {
|
|
|
90
99
|
Label: typeof SelectLabel;
|
|
91
100
|
Item: typeof SelectItem;
|
|
92
101
|
};
|
|
102
|
+
/** https://coss.com/ui/docs/components/drawer */
|
|
93
103
|
export declare const Drawer: typeof Drawer$1 & {
|
|
94
104
|
Trigger: typeof DrawerTrigger;
|
|
95
105
|
Close: typeof DrawerClose;
|
|
@@ -100,6 +110,7 @@ export declare const Drawer: typeof Drawer$1 & {
|
|
|
100
110
|
Title: typeof DrawerTitle;
|
|
101
111
|
Description: typeof DrawerDescription;
|
|
102
112
|
};
|
|
113
|
+
/** https://coss.com/ui/docs/components/dialog */
|
|
103
114
|
export declare const Dialog: (<Payload>(props: DialogPrimitive.Root.Props<Payload>) => React.JSX.Element) & {
|
|
104
115
|
Trigger: typeof DialogTrigger;
|
|
105
116
|
Close: typeof DialogClose;
|
|
@@ -110,17 +121,20 @@ export declare const Dialog: (<Payload>(props: DialogPrimitive.Root.Props<Payloa
|
|
|
110
121
|
Title: typeof DialogTitle;
|
|
111
122
|
Description: typeof DialogDescription;
|
|
112
123
|
};
|
|
124
|
+
/** https://ui.shadcn.com/docs/components/base/tooltip */
|
|
113
125
|
export declare const Tooltip: typeof Tooltip$1 & {
|
|
114
126
|
Provider: typeof TooltipProvider;
|
|
115
127
|
Trigger: typeof TooltipTrigger;
|
|
116
128
|
Content: typeof TooltipContent;
|
|
117
129
|
};
|
|
130
|
+
/** https://ui.shadcn.com/docs/components/base/popover */
|
|
118
131
|
export declare const Popover: typeof Popover$1 & {
|
|
119
132
|
Trigger: typeof PopoverTrigger;
|
|
120
133
|
Content: typeof PopoverContent;
|
|
121
134
|
Title: typeof PopoverTitle;
|
|
122
135
|
Description: typeof PopoverDescription;
|
|
123
136
|
};
|
|
137
|
+
/** https://ui.shadcn.com/docs/components/base/dropdown-menu */
|
|
124
138
|
export declare const Dropdown: typeof DropdownMenu & {
|
|
125
139
|
Trigger: typeof DropdownMenuTrigger;
|
|
126
140
|
Content: typeof DropdownMenuContent;
|
|
@@ -136,6 +150,7 @@ export declare const Dropdown: typeof DropdownMenu & {
|
|
|
136
150
|
RadioGroup: typeof DropdownMenuRadioGroup;
|
|
137
151
|
CheckboxItem: typeof DropdownMenuCheckboxItem;
|
|
138
152
|
};
|
|
153
|
+
/** https://ui.shadcn.com/docs/components/base/combobox */
|
|
139
154
|
export declare const Combobox: typeof import("@base-ui/react").ComboboxRoot & {
|
|
140
155
|
Content: typeof ComboboxContent;
|
|
141
156
|
Empty: typeof ComboboxEmpty;
|
|
@@ -151,15 +166,18 @@ export declare const Combobox: typeof import("@base-ui/react").ComboboxRoot & {
|
|
|
151
166
|
Item: typeof ComboboxItem;
|
|
152
167
|
Separator: typeof ComboboxSeparator;
|
|
153
168
|
};
|
|
169
|
+
/** https://ui.shadcn.com/docs/components/base/progress */
|
|
154
170
|
export declare const Progress: typeof Progress$1 & {
|
|
155
171
|
Label: typeof ProgressLabel;
|
|
156
172
|
Value: typeof ProgressValue;
|
|
157
173
|
Track: typeof ProgressTrack;
|
|
158
174
|
Indicator: typeof ProgressIndicator;
|
|
159
175
|
};
|
|
176
|
+
/** https://ui.shadcn.com/docs/components/base/calendar */
|
|
160
177
|
export declare const Calendar: typeof Calendar$1 & {
|
|
161
178
|
DayButton: typeof CalendarDayButton;
|
|
162
179
|
};
|
|
180
|
+
/** https://ui.shadcn.com/docs/components/base/breadcrumb */
|
|
163
181
|
export declare const Breadcrumb: typeof Breadcrumb$1 & {
|
|
164
182
|
List: typeof BreadcrumbList;
|
|
165
183
|
Item: typeof BreadcrumbItem;
|
|
@@ -168,6 +186,7 @@ export declare const Breadcrumb: typeof Breadcrumb$1 & {
|
|
|
168
186
|
Ellipsis: typeof BreadcrumbEllipsis;
|
|
169
187
|
Page: typeof BreadcrumbPage;
|
|
170
188
|
};
|
|
189
|
+
/** https://coss.com/ui/docs/components/alert-dialog */
|
|
171
190
|
export declare const AlertDialog: typeof AlertDialogPrimitive.Root & {
|
|
172
191
|
Trigger: typeof AlertDialogTrigger;
|
|
173
192
|
Close: typeof AlertDialogClose;
|
|
@@ -177,10 +196,12 @@ export declare const AlertDialog: typeof AlertDialogPrimitive.Root & {
|
|
|
177
196
|
Title: typeof AlertDialogTitle;
|
|
178
197
|
Description: typeof AlertDialogDescription;
|
|
179
198
|
};
|
|
199
|
+
/** https://ui.shadcn.com/docs/components/base/button-group */
|
|
180
200
|
export declare const ButtonGroup: typeof ButtonGroup$1 & {
|
|
181
201
|
Text: typeof ButtonGroupText;
|
|
182
202
|
Separator: typeof ButtonGroupSeparator;
|
|
183
203
|
};
|
|
204
|
+
/** https://ui.shadcn.com/docs/components/base/input-group */
|
|
184
205
|
export declare const InputGroup: typeof InputGroup$1 & {
|
|
185
206
|
Addon: typeof InputGroupAddon;
|
|
186
207
|
AddonText: typeof InputGroupText;
|
|
@@ -188,4 +209,4 @@ export declare const InputGroup: typeof InputGroup$1 & {
|
|
|
188
209
|
Textarea: typeof InputGroupTextarea;
|
|
189
210
|
Button: typeof InputGroupButton;
|
|
190
211
|
};
|
|
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,
|
|
212
|
+
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, formatBytes, toast, useDropzone, type useLightbox, useSidebar };
|
package/dist/widgets/index.mjs
CHANGED
|
@@ -30,7 +30,7 @@ import { Skeleton } from "../vendor/shadcn/skeleton.mjs";
|
|
|
30
30
|
import { useSidebar } from "../vendor/shadcn/sidebar.mjs";
|
|
31
31
|
import { Sidebar } from "./sidebar.mjs";
|
|
32
32
|
import { DatePicker, DateRangePicker, TimePicker } from "./datetime.mjs";
|
|
33
|
-
import { Dropzone,
|
|
33
|
+
import { Dropzone, formatBytes, useDropzone } from "./dropzone.mjs";
|
|
34
34
|
import { Carousel, Image, Lightbox } from "./multimedia.mjs";
|
|
35
35
|
import { Pagination } from "./pagination.mjs";
|
|
36
36
|
import { Form } from "../vendor/coss/form.mjs";
|
|
@@ -41,12 +41,15 @@ import { IconSwap } from "../vendor/tailored/icon-swap.mjs";
|
|
|
41
41
|
import { JsonViewer } from "../vendor/tailored/json-viewer.mjs";
|
|
42
42
|
import { FileTree } from "../vendor/tailored/file-tree.mjs";
|
|
43
43
|
// src/widgets/index.ts
|
|
44
|
+
/** https://ui.shadcn.com/docs/components/base/kbd */
|
|
44
45
|
const Kbd = /* @__PURE__ */ Object.assign(Kbd$1, { Group: KbdGroup });
|
|
46
|
+
/** https://ui.shadcn.com/docs/components/base/tabs */
|
|
45
47
|
const Tabs = /* @__PURE__ */ Object.assign(Tabs$1, {
|
|
46
48
|
List: TabsList,
|
|
47
49
|
Trigger: TabsTrigger,
|
|
48
50
|
Content: TabsContent
|
|
49
51
|
});
|
|
52
|
+
/** https://ui.shadcn.com/docs/components/base/card */
|
|
50
53
|
const Card = /* @__PURE__ */ Object.assign(Card$1, {
|
|
51
54
|
Header: CardHeader,
|
|
52
55
|
Content: CardContent,
|
|
@@ -55,11 +58,13 @@ const Card = /* @__PURE__ */ Object.assign(Card$1, {
|
|
|
55
58
|
Action: CardAction,
|
|
56
59
|
Description: CardDescription
|
|
57
60
|
});
|
|
61
|
+
/** https://ui.shadcn.com/docs/components/base/field */
|
|
58
62
|
const Field = /* @__PURE__ */ Object.assign(Field$1, {
|
|
59
63
|
Label: FieldLabel,
|
|
60
64
|
Description: FieldDescription,
|
|
61
65
|
Error: FieldError
|
|
62
66
|
});
|
|
67
|
+
/** https://coss.com/ui/docs/components/empty */
|
|
63
68
|
const Empty = /* @__PURE__ */ Object.assign(Empty$1, {
|
|
64
69
|
Header: EmptyHeader,
|
|
65
70
|
Content: EmptyContent,
|
|
@@ -67,6 +72,7 @@ const Empty = /* @__PURE__ */ Object.assign(Empty$1, {
|
|
|
67
72
|
Title: EmptyTitle,
|
|
68
73
|
Description: EmptyDescription
|
|
69
74
|
});
|
|
75
|
+
/** https://ui.shadcn.com/docs/components/base/table */
|
|
70
76
|
const Table = /* @__PURE__ */ Object.assign(Table$1, {
|
|
71
77
|
Header: TableHeader,
|
|
72
78
|
Body: TableBody,
|
|
@@ -75,7 +81,9 @@ const Table = /* @__PURE__ */ Object.assign(Table$1, {
|
|
|
75
81
|
Head: TableHead,
|
|
76
82
|
Cell: TableCell
|
|
77
83
|
});
|
|
84
|
+
/** https://ui.shadcn.com/docs/components/base/radio-group */
|
|
78
85
|
const Radio = /* @__PURE__ */ Object.assign(RadioGroupItem, { Group: RadioGroup });
|
|
86
|
+
/** https://ui.shadcn.com/docs/components/base/select */
|
|
79
87
|
const Select = /* @__PURE__ */ Object.assign(Select$1, {
|
|
80
88
|
Trigger: SelectTrigger,
|
|
81
89
|
Value: SelectValue,
|
|
@@ -85,6 +93,7 @@ const Select = /* @__PURE__ */ Object.assign(Select$1, {
|
|
|
85
93
|
Label: SelectLabel,
|
|
86
94
|
Item: SelectItem
|
|
87
95
|
});
|
|
96
|
+
/** https://coss.com/ui/docs/components/drawer */
|
|
88
97
|
const Drawer = /* @__PURE__ */ Object.assign(Drawer$1, {
|
|
89
98
|
Trigger: DrawerTrigger,
|
|
90
99
|
Close: DrawerClose,
|
|
@@ -95,6 +104,7 @@ const Drawer = /* @__PURE__ */ Object.assign(Drawer$1, {
|
|
|
95
104
|
Title: DrawerTitle,
|
|
96
105
|
Description: DrawerDescription
|
|
97
106
|
});
|
|
107
|
+
/** https://coss.com/ui/docs/components/dialog */
|
|
98
108
|
const Dialog = /* @__PURE__ */ Object.assign(Dialog$1, {
|
|
99
109
|
Trigger: DialogTrigger,
|
|
100
110
|
Close: DialogClose,
|
|
@@ -105,17 +115,20 @@ const Dialog = /* @__PURE__ */ Object.assign(Dialog$1, {
|
|
|
105
115
|
Title: DialogTitle,
|
|
106
116
|
Description: DialogDescription
|
|
107
117
|
});
|
|
118
|
+
/** https://ui.shadcn.com/docs/components/base/tooltip */
|
|
108
119
|
const Tooltip = /* @__PURE__ */ Object.assign(Tooltip$1, {
|
|
109
120
|
Provider: TooltipProvider,
|
|
110
121
|
Trigger: TooltipTrigger,
|
|
111
122
|
Content: TooltipContent
|
|
112
123
|
});
|
|
124
|
+
/** https://ui.shadcn.com/docs/components/base/popover */
|
|
113
125
|
const Popover = /* @__PURE__ */ Object.assign(Popover$1, {
|
|
114
126
|
Trigger: PopoverTrigger,
|
|
115
127
|
Content: PopoverContent,
|
|
116
128
|
Title: PopoverTitle,
|
|
117
129
|
Description: PopoverDescription
|
|
118
130
|
});
|
|
131
|
+
/** https://ui.shadcn.com/docs/components/base/dropdown-menu */
|
|
119
132
|
const Dropdown = /* @__PURE__ */ Object.assign(DropdownMenu, {
|
|
120
133
|
Trigger: DropdownMenuTrigger,
|
|
121
134
|
Content: DropdownMenuContent,
|
|
@@ -131,6 +144,7 @@ const Dropdown = /* @__PURE__ */ Object.assign(DropdownMenu, {
|
|
|
131
144
|
RadioGroup: DropdownMenuRadioGroup,
|
|
132
145
|
CheckboxItem: DropdownMenuCheckboxItem
|
|
133
146
|
});
|
|
147
|
+
/** https://ui.shadcn.com/docs/components/base/combobox */
|
|
134
148
|
const Combobox = /* @__PURE__ */ Object.assign(Combobox$1, {
|
|
135
149
|
Content: ComboboxContent,
|
|
136
150
|
Empty: ComboboxEmpty,
|
|
@@ -146,13 +160,16 @@ const Combobox = /* @__PURE__ */ Object.assign(Combobox$1, {
|
|
|
146
160
|
Item: ComboboxItem,
|
|
147
161
|
Separator: ComboboxSeparator
|
|
148
162
|
});
|
|
163
|
+
/** https://ui.shadcn.com/docs/components/base/progress */
|
|
149
164
|
const Progress = /* @__PURE__ */ Object.assign(Progress$1, {
|
|
150
165
|
Label: ProgressLabel,
|
|
151
166
|
Value: ProgressValue,
|
|
152
167
|
Track: ProgressTrack,
|
|
153
168
|
Indicator: ProgressIndicator
|
|
154
169
|
});
|
|
170
|
+
/** https://ui.shadcn.com/docs/components/base/calendar */
|
|
155
171
|
const Calendar = /* @__PURE__ */ Object.assign(Calendar$1, { DayButton: CalendarDayButton });
|
|
172
|
+
/** https://ui.shadcn.com/docs/components/base/breadcrumb */
|
|
156
173
|
const Breadcrumb = /* @__PURE__ */ Object.assign(Breadcrumb$1, {
|
|
157
174
|
List: BreadcrumbList,
|
|
158
175
|
Item: BreadcrumbItem,
|
|
@@ -161,6 +178,7 @@ const Breadcrumb = /* @__PURE__ */ Object.assign(Breadcrumb$1, {
|
|
|
161
178
|
Ellipsis: BreadcrumbEllipsis,
|
|
162
179
|
Page: BreadcrumbPage
|
|
163
180
|
});
|
|
181
|
+
/** https://coss.com/ui/docs/components/alert-dialog */
|
|
164
182
|
const AlertDialog = /* @__PURE__ */ Object.assign(AlertDialog$1, {
|
|
165
183
|
Trigger: AlertDialogTrigger,
|
|
166
184
|
Close: AlertDialogClose,
|
|
@@ -170,10 +188,12 @@ const AlertDialog = /* @__PURE__ */ Object.assign(AlertDialog$1, {
|
|
|
170
188
|
Title: AlertDialogTitle,
|
|
171
189
|
Description: AlertDialogDescription
|
|
172
190
|
});
|
|
191
|
+
/** https://ui.shadcn.com/docs/components/base/button-group */
|
|
173
192
|
const ButtonGroup = /* @__PURE__ */ Object.assign(ButtonGroup$1, {
|
|
174
193
|
Text: ButtonGroupText,
|
|
175
194
|
Separator: ButtonGroupSeparator
|
|
176
195
|
});
|
|
196
|
+
/** https://ui.shadcn.com/docs/components/base/input-group */
|
|
177
197
|
const InputGroup = /* @__PURE__ */ Object.assign(InputGroup$1, {
|
|
178
198
|
Addon: InputGroupAddon,
|
|
179
199
|
AddonText: InputGroupText,
|
|
@@ -181,4 +201,4 @@ const InputGroup = /* @__PURE__ */ Object.assign(InputGroup$1, {
|
|
|
181
201
|
Textarea: InputGroupTextarea,
|
|
182
202
|
Button: InputGroupButton
|
|
183
203
|
});
|
|
184
|
-
export { AlertDialog, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Combobox, DatePicker, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, FileTree, Form, IconSwap, Image, Input, InputGroup, JsonViewer, Kbd, Label, Lightbox, Pagination, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Toaster as ToastProvider, Tooltip,
|
|
204
|
+
export { AlertDialog, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Combobox, DatePicker, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, FileTree, Form, IconSwap, Image, Input, InputGroup, JsonViewer, Kbd, Label, Lightbox, Pagination, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Toaster as ToastProvider, Tooltip, formatBytes, toast, useDropzone, useSidebar };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Carousel as Carousel$1, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "../vendor/shadcn/carousel.mjs";
|
|
2
2
|
import { Lightbox as Lightbox$1, 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";
|
|
3
3
|
import { ComponentProps, ReactNode } from "react";
|
|
4
|
+
/** https://ui.iandefined.com/docs/components/lightbox/ */
|
|
4
5
|
export declare const Lightbox: typeof Lightbox$1 & {
|
|
5
6
|
Trigger: typeof LightboxTrigger;
|
|
6
7
|
Content: typeof LightboxContent;
|
|
7
8
|
};
|
|
9
|
+
/** https://ui.shadcn.com/docs/components/base/carousel */
|
|
8
10
|
export declare const Carousel: typeof Carousel$1 & {
|
|
9
11
|
Content: typeof CarouselContent;
|
|
10
12
|
Previous: typeof CarouselPrevious;
|
|
@@ -4,10 +4,12 @@ import { cn } from "cn";
|
|
|
4
4
|
import { useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
// src/widgets/multimedia.tsx
|
|
7
|
+
/** https://ui.iandefined.com/docs/components/lightbox/ */
|
|
7
8
|
const Lightbox = /* @__PURE__ */ Object.assign(Lightbox$1, {
|
|
8
9
|
Trigger: LightboxTrigger,
|
|
9
10
|
Content: LightboxContent
|
|
10
11
|
});
|
|
12
|
+
/** https://ui.shadcn.com/docs/components/base/carousel */
|
|
11
13
|
const Carousel = /* @__PURE__ */ Object.assign(Carousel$1, {
|
|
12
14
|
Content: CarouselContent,
|
|
13
15
|
Previous: CarouselPrevious,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Pagination as Pagination$1, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "../vendor/shadcn/pagination.mjs";
|
|
2
|
+
/** https://ui.shadcn.com/docs/components/base/pagination */
|
|
2
3
|
export declare const Pagination: typeof Pagination$1 & {
|
|
3
4
|
Content: typeof PaginationContent;
|
|
4
5
|
Item: typeof PaginationItem;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Pagination as Pagination$1, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "../vendor/shadcn/pagination.mjs";
|
|
2
2
|
// src/widgets/pagination.tsx
|
|
3
|
+
/** https://ui.shadcn.com/docs/components/base/pagination */
|
|
3
4
|
const Pagination = /* @__PURE__ */ Object.assign(Pagination$1, {
|
|
4
5
|
Content: PaginationContent,
|
|
5
6
|
Item: PaginationItem,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Sidebar as Sidebar$1, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from "../vendor/shadcn/sidebar.mjs";
|
|
2
|
+
/** https://ui.shadcn.com/docs/components/base/sidebar */
|
|
2
3
|
export declare const Sidebar: typeof Sidebar$1 & {
|
|
3
4
|
Provider: typeof SidebarProvider;
|
|
4
5
|
Inset: typeof SidebarInset;
|
package/dist/widgets/sidebar.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Sidebar as Sidebar$1, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from "../vendor/shadcn/sidebar.mjs";
|
|
2
2
|
// src/widgets/sidebar.tsx
|
|
3
|
+
/** https://ui.shadcn.com/docs/components/base/sidebar */
|
|
3
4
|
const Sidebar = /* @__PURE__ */ Object.assign(Sidebar$1, {
|
|
4
5
|
Provider: SidebarProvider,
|
|
5
6
|
Inset: SidebarInset,
|