shadcn-ui-react 0.3.4 → 0.3.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 +1 -0
- package/dist/index.cjs +48 -1
- package/dist/index.d.cts +20 -3
- package/dist/index.d.ts +20 -3
- package/dist/index.js +47 -1
- package/dist/style.css +27 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -158,6 +158,7 @@ __export(index_exports, {
|
|
|
158
158
|
DropdownMenuSubContent: () => DropdownMenuSubContent,
|
|
159
159
|
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
|
|
160
160
|
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
161
|
+
Dropzone: () => Dropzone,
|
|
161
162
|
FileUpload: () => FileUpload,
|
|
162
163
|
Form: () => Form,
|
|
163
164
|
FormControl: () => FormControl,
|
|
@@ -7838,7 +7839,6 @@ function FileUpload({
|
|
|
7838
7839
|
const { getRootProps, getInputProps } = (0, import_react_dropzone.useDropzone)({
|
|
7839
7840
|
accept: "image/*",
|
|
7840
7841
|
onDrop: (acceptedFiles) => {
|
|
7841
|
-
console.log("files acceptedFiles=>", acceptedFiles);
|
|
7842
7842
|
onUpdateFile(acceptedFiles);
|
|
7843
7843
|
}
|
|
7844
7844
|
});
|
|
@@ -7991,6 +7991,52 @@ function PaginationSection({
|
|
|
7991
7991
|
] })
|
|
7992
7992
|
] }) }) });
|
|
7993
7993
|
}
|
|
7994
|
+
|
|
7995
|
+
// src/shared/dropzone.tsx
|
|
7996
|
+
var import_react_dropzone2 = require("react-dropzone");
|
|
7997
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
7998
|
+
function Dropzone({
|
|
7999
|
+
label,
|
|
8000
|
+
onChange,
|
|
8001
|
+
value,
|
|
8002
|
+
className,
|
|
8003
|
+
description = "Drag and drop some files here, or click to select files",
|
|
8004
|
+
descriptionActive = "Drop the files here ...",
|
|
8005
|
+
accept,
|
|
8006
|
+
options,
|
|
8007
|
+
descriptionClassName,
|
|
8008
|
+
dropzoneClassName,
|
|
8009
|
+
valueClassName,
|
|
8010
|
+
labelClassName
|
|
8011
|
+
}) {
|
|
8012
|
+
const { getRootProps, getInputProps, isDragActive } = (0, import_react_dropzone2.useDropzone)(__spreadValues({
|
|
8013
|
+
onDrop: (acceptedFiles) => {
|
|
8014
|
+
onChange(acceptedFiles);
|
|
8015
|
+
},
|
|
8016
|
+
accept
|
|
8017
|
+
}, options));
|
|
8018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: cn("space-y-2", className), children: [
|
|
8019
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: cn("font-medium", labelClassName), children: label }),
|
|
8020
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
8021
|
+
"div",
|
|
8022
|
+
__spreadProps(__spreadValues({}, getRootProps()), {
|
|
8023
|
+
className: cn(
|
|
8024
|
+
"cursor-pointer rounded-lg border-2 border-dashed border-gray-300 p-6 text-center hover:border-gray-400",
|
|
8025
|
+
isDragActive && "border-blue-500 bg-blue-50",
|
|
8026
|
+
dropzoneClassName
|
|
8027
|
+
),
|
|
8028
|
+
children: [
|
|
8029
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("input", __spreadValues({}, getInputProps())),
|
|
8030
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: cn("text-gray-600", descriptionClassName), children: isDragActive ? descriptionActive : description })
|
|
8031
|
+
]
|
|
8032
|
+
})
|
|
8033
|
+
),
|
|
8034
|
+
value && value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("ul", { className: cn("text-sm text-gray-700 space-y-1", valueClassName), children: value.map((file, idx) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("li", { children: [
|
|
8035
|
+
"\u2022 ",
|
|
8036
|
+
file.name
|
|
8037
|
+
] }, idx)) })
|
|
8038
|
+
] });
|
|
8039
|
+
}
|
|
7994
8040
|
// Annotate the CommonJS export names for ESM import in node:
|
|
7995
8041
|
0 && (module.exports = {
|
|
7996
8042
|
Accordion,
|
|
@@ -8092,6 +8138,7 @@ function PaginationSection({
|
|
|
8092
8138
|
DropdownMenuSubContent,
|
|
8093
8139
|
DropdownMenuSubTrigger,
|
|
8094
8140
|
DropdownMenuTrigger,
|
|
8141
|
+
Dropzone,
|
|
8095
8142
|
FileUpload,
|
|
8096
8143
|
Form,
|
|
8097
8144
|
FormControl,
|
package/dist/index.d.cts
CHANGED
|
@@ -42,6 +42,7 @@ import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
|
42
42
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
43
43
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
44
44
|
import { ColumnDef } from '@tanstack/react-table';
|
|
45
|
+
import { Accept, DropzoneOptions } from 'react-dropzone';
|
|
45
46
|
import { ClassValue } from 'clsx';
|
|
46
47
|
|
|
47
48
|
declare const Accordion: React$1.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -755,14 +756,14 @@ type DataTableSkeletonProps = {
|
|
|
755
756
|
};
|
|
756
757
|
declare function DataTableSkeleton({ columnCount, rowCount, searchableColumnCount, filterableColumnCount, showViewOptions, }: DataTableSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
757
758
|
|
|
758
|
-
type TFileUploadProps = {
|
|
759
|
+
type TFileUploadProps$1 = {
|
|
759
760
|
label?: string;
|
|
760
761
|
onChange: (value: File[]) => void;
|
|
761
762
|
value: File[];
|
|
762
763
|
className?: string;
|
|
763
764
|
classNameContent?: string;
|
|
764
765
|
};
|
|
765
|
-
declare function FileUpload({ onChange, value, label, className, classNameContent, }: TFileUploadProps): react_jsx_runtime.JSX.Element;
|
|
766
|
+
declare function FileUpload({ onChange, value, label, className, classNameContent, }: TFileUploadProps$1): react_jsx_runtime.JSX.Element;
|
|
766
767
|
declare function ImagePreview({ file }: {
|
|
767
768
|
file: File;
|
|
768
769
|
}): react_jsx_runtime.JSX.Element | null;
|
|
@@ -786,6 +787,22 @@ type TPaginationSectionProps = {
|
|
|
786
787
|
};
|
|
787
788
|
declare function PaginationSection({ totalPosts, postsPerPage, currentPage, setCurrentPage, }: TPaginationSectionProps): react_jsx_runtime.JSX.Element;
|
|
788
789
|
|
|
790
|
+
type TFileUploadProps = {
|
|
791
|
+
label?: string;
|
|
792
|
+
description?: string;
|
|
793
|
+
descriptionActive?: string;
|
|
794
|
+
onChange: (value: File[]) => void;
|
|
795
|
+
value?: File[];
|
|
796
|
+
className?: string;
|
|
797
|
+
descriptionClassName?: string;
|
|
798
|
+
dropzoneClassName?: string;
|
|
799
|
+
valueClassName?: string;
|
|
800
|
+
labelClassName?: string;
|
|
801
|
+
accept?: Accept;
|
|
802
|
+
options?: DropzoneOptions;
|
|
803
|
+
};
|
|
804
|
+
declare function Dropzone({ label, onChange, value, className, description, descriptionActive, accept, options, descriptionClassName, dropzoneClassName, valueClassName, labelClassName, }: TFileUploadProps): react_jsx_runtime.JSX.Element;
|
|
805
|
+
|
|
789
806
|
declare function cn(...inputs: ClassValue[]): string;
|
|
790
807
|
|
|
791
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertModal, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, Button, type ButtonProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DataTableSkeleton, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileUpload, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Heading, HoverCard, HoverCardContent, HoverCardTrigger, Icons, ImagePreview, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageHead, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationNextLast, PaginationPrevious, PaginationPreviousLast, PaginationSection, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, navigationMenuTriggerStyle, reducer, toast, toggleVariants, useFormField, useToast };
|
|
808
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertModal, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, Button, type ButtonProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DataTableSkeleton, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, FileUpload, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Heading, HoverCard, HoverCardContent, HoverCardTrigger, Icons, ImagePreview, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageHead, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationNextLast, PaginationPrevious, PaginationPreviousLast, PaginationSection, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, navigationMenuTriggerStyle, reducer, toast, toggleVariants, useFormField, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
|
42
42
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
43
43
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
44
44
|
import { ColumnDef } from '@tanstack/react-table';
|
|
45
|
+
import { Accept, DropzoneOptions } from 'react-dropzone';
|
|
45
46
|
import { ClassValue } from 'clsx';
|
|
46
47
|
|
|
47
48
|
declare const Accordion: React$1.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -755,14 +756,14 @@ type DataTableSkeletonProps = {
|
|
|
755
756
|
};
|
|
756
757
|
declare function DataTableSkeleton({ columnCount, rowCount, searchableColumnCount, filterableColumnCount, showViewOptions, }: DataTableSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
757
758
|
|
|
758
|
-
type TFileUploadProps = {
|
|
759
|
+
type TFileUploadProps$1 = {
|
|
759
760
|
label?: string;
|
|
760
761
|
onChange: (value: File[]) => void;
|
|
761
762
|
value: File[];
|
|
762
763
|
className?: string;
|
|
763
764
|
classNameContent?: string;
|
|
764
765
|
};
|
|
765
|
-
declare function FileUpload({ onChange, value, label, className, classNameContent, }: TFileUploadProps): react_jsx_runtime.JSX.Element;
|
|
766
|
+
declare function FileUpload({ onChange, value, label, className, classNameContent, }: TFileUploadProps$1): react_jsx_runtime.JSX.Element;
|
|
766
767
|
declare function ImagePreview({ file }: {
|
|
767
768
|
file: File;
|
|
768
769
|
}): react_jsx_runtime.JSX.Element | null;
|
|
@@ -786,6 +787,22 @@ type TPaginationSectionProps = {
|
|
|
786
787
|
};
|
|
787
788
|
declare function PaginationSection({ totalPosts, postsPerPage, currentPage, setCurrentPage, }: TPaginationSectionProps): react_jsx_runtime.JSX.Element;
|
|
788
789
|
|
|
790
|
+
type TFileUploadProps = {
|
|
791
|
+
label?: string;
|
|
792
|
+
description?: string;
|
|
793
|
+
descriptionActive?: string;
|
|
794
|
+
onChange: (value: File[]) => void;
|
|
795
|
+
value?: File[];
|
|
796
|
+
className?: string;
|
|
797
|
+
descriptionClassName?: string;
|
|
798
|
+
dropzoneClassName?: string;
|
|
799
|
+
valueClassName?: string;
|
|
800
|
+
labelClassName?: string;
|
|
801
|
+
accept?: Accept;
|
|
802
|
+
options?: DropzoneOptions;
|
|
803
|
+
};
|
|
804
|
+
declare function Dropzone({ label, onChange, value, className, description, descriptionActive, accept, options, descriptionClassName, dropzoneClassName, valueClassName, labelClassName, }: TFileUploadProps): react_jsx_runtime.JSX.Element;
|
|
805
|
+
|
|
789
806
|
declare function cn(...inputs: ClassValue[]): string;
|
|
790
807
|
|
|
791
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertModal, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, Button, type ButtonProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DataTableSkeleton, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileUpload, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Heading, HoverCard, HoverCardContent, HoverCardTrigger, Icons, ImagePreview, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageHead, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationNextLast, PaginationPrevious, PaginationPreviousLast, PaginationSection, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, navigationMenuTriggerStyle, reducer, toast, toggleVariants, useFormField, useToast };
|
|
808
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertModal, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, Button, type ButtonProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DataTableSkeleton, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, FileUpload, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Heading, HoverCard, HoverCardContent, HoverCardTrigger, Icons, ImagePreview, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageHead, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationNextLast, PaginationPrevious, PaginationPreviousLast, PaginationSection, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, navigationMenuTriggerStyle, reducer, toast, toggleVariants, useFormField, useToast };
|
package/dist/index.js
CHANGED
|
@@ -7644,7 +7644,6 @@ function FileUpload({
|
|
|
7644
7644
|
const { getRootProps, getInputProps } = useDropzone({
|
|
7645
7645
|
accept: "image/*",
|
|
7646
7646
|
onDrop: (acceptedFiles) => {
|
|
7647
|
-
console.log("files acceptedFiles=>", acceptedFiles);
|
|
7648
7647
|
onUpdateFile(acceptedFiles);
|
|
7649
7648
|
}
|
|
7650
7649
|
});
|
|
@@ -7797,6 +7796,52 @@ function PaginationSection({
|
|
|
7797
7796
|
] })
|
|
7798
7797
|
] }) }) });
|
|
7799
7798
|
}
|
|
7799
|
+
|
|
7800
|
+
// src/shared/dropzone.tsx
|
|
7801
|
+
import { useDropzone as useDropzone2 } from "react-dropzone";
|
|
7802
|
+
import { jsx as jsx54, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
7803
|
+
function Dropzone({
|
|
7804
|
+
label,
|
|
7805
|
+
onChange,
|
|
7806
|
+
value,
|
|
7807
|
+
className,
|
|
7808
|
+
description = "Drag and drop some files here, or click to select files",
|
|
7809
|
+
descriptionActive = "Drop the files here ...",
|
|
7810
|
+
accept,
|
|
7811
|
+
options,
|
|
7812
|
+
descriptionClassName,
|
|
7813
|
+
dropzoneClassName,
|
|
7814
|
+
valueClassName,
|
|
7815
|
+
labelClassName
|
|
7816
|
+
}) {
|
|
7817
|
+
const { getRootProps, getInputProps, isDragActive } = useDropzone2(__spreadValues({
|
|
7818
|
+
onDrop: (acceptedFiles) => {
|
|
7819
|
+
onChange(acceptedFiles);
|
|
7820
|
+
},
|
|
7821
|
+
accept
|
|
7822
|
+
}, options));
|
|
7823
|
+
return /* @__PURE__ */ jsxs28("div", { className: cn("space-y-2", className), children: [
|
|
7824
|
+
label && /* @__PURE__ */ jsx54("p", { className: cn("font-medium", labelClassName), children: label }),
|
|
7825
|
+
/* @__PURE__ */ jsxs28(
|
|
7826
|
+
"div",
|
|
7827
|
+
__spreadProps(__spreadValues({}, getRootProps()), {
|
|
7828
|
+
className: cn(
|
|
7829
|
+
"cursor-pointer rounded-lg border-2 border-dashed border-gray-300 p-6 text-center hover:border-gray-400",
|
|
7830
|
+
isDragActive && "border-blue-500 bg-blue-50",
|
|
7831
|
+
dropzoneClassName
|
|
7832
|
+
),
|
|
7833
|
+
children: [
|
|
7834
|
+
/* @__PURE__ */ jsx54("input", __spreadValues({}, getInputProps())),
|
|
7835
|
+
/* @__PURE__ */ jsx54("p", { className: cn("text-gray-600", descriptionClassName), children: isDragActive ? descriptionActive : description })
|
|
7836
|
+
]
|
|
7837
|
+
})
|
|
7838
|
+
),
|
|
7839
|
+
value && value.length > 0 && /* @__PURE__ */ jsx54("ul", { className: cn("text-sm text-gray-700 space-y-1", valueClassName), children: value.map((file, idx) => /* @__PURE__ */ jsxs28("li", { children: [
|
|
7840
|
+
"\u2022 ",
|
|
7841
|
+
file.name
|
|
7842
|
+
] }, idx)) })
|
|
7843
|
+
] });
|
|
7844
|
+
}
|
|
7800
7845
|
export {
|
|
7801
7846
|
Accordion,
|
|
7802
7847
|
AccordionContent,
|
|
@@ -7897,6 +7942,7 @@ export {
|
|
|
7897
7942
|
DropdownMenuSubContent,
|
|
7898
7943
|
DropdownMenuSubTrigger,
|
|
7899
7944
|
DropdownMenuTrigger,
|
|
7945
|
+
Dropzone,
|
|
7900
7946
|
FileUpload,
|
|
7901
7947
|
Form,
|
|
7902
7948
|
FormControl,
|
package/dist/style.css
CHANGED
|
@@ -26,9 +26,14 @@
|
|
|
26
26
|
--color-red-400: oklch(70.4% 0.191 22.216);
|
|
27
27
|
--color-red-500: oklch(63.7% 0.237 25.331);
|
|
28
28
|
--color-red-600: oklch(57.7% 0.245 27.325);
|
|
29
|
+
--color-blue-50: oklch(97% 0.014 254.604);
|
|
30
|
+
--color-blue-500: oklch(62.3% 0.214 259.815);
|
|
29
31
|
--color-gray-100: oklch(96.7% 0.003 264.542);
|
|
30
32
|
--color-gray-200: oklch(92.8% 0.006 264.531);
|
|
31
33
|
--color-gray-300: oklch(87.2% 0.01 258.338);
|
|
34
|
+
--color-gray-400: oklch(70.7% 0.022 261.325);
|
|
35
|
+
--color-gray-600: oklch(44.6% 0.03 256.802);
|
|
36
|
+
--color-gray-700: oklch(37.3% 0.034 259.733);
|
|
32
37
|
--color-black: #000;
|
|
33
38
|
--color-white: #fff;
|
|
34
39
|
--spacing: 0.25rem;
|
|
@@ -866,6 +871,9 @@
|
|
|
866
871
|
--tw-border-style: dashed;
|
|
867
872
|
border-style: dashed;
|
|
868
873
|
}
|
|
874
|
+
.border-blue-500 {
|
|
875
|
+
border-color: var(--color-blue-500);
|
|
876
|
+
}
|
|
869
877
|
.border-destructive {
|
|
870
878
|
border-color: var(--destructive);
|
|
871
879
|
}
|
|
@@ -875,6 +883,9 @@
|
|
|
875
883
|
border-color: color-mix(in oklab, var(--destructive) 50%, transparent);
|
|
876
884
|
}
|
|
877
885
|
}
|
|
886
|
+
.border-gray-300 {
|
|
887
|
+
border-color: var(--color-gray-300);
|
|
888
|
+
}
|
|
878
889
|
.border-input {
|
|
879
890
|
border-color: var(--input);
|
|
880
891
|
}
|
|
@@ -908,6 +919,9 @@
|
|
|
908
919
|
background-color: color-mix(in oklab, var(--color-black) 80%, transparent);
|
|
909
920
|
}
|
|
910
921
|
}
|
|
922
|
+
.bg-blue-50 {
|
|
923
|
+
background-color: var(--color-blue-50);
|
|
924
|
+
}
|
|
911
925
|
.bg-border {
|
|
912
926
|
background-color: var(--border);
|
|
913
927
|
}
|
|
@@ -1154,6 +1168,12 @@
|
|
|
1154
1168
|
.text-gray-100 {
|
|
1155
1169
|
color: var(--color-gray-100);
|
|
1156
1170
|
}
|
|
1171
|
+
.text-gray-600 {
|
|
1172
|
+
color: var(--color-gray-600);
|
|
1173
|
+
}
|
|
1174
|
+
.text-gray-700 {
|
|
1175
|
+
color: var(--color-gray-700);
|
|
1176
|
+
}
|
|
1157
1177
|
.text-muted-foreground {
|
|
1158
1178
|
color: var(--muted-foreground);
|
|
1159
1179
|
}
|
|
@@ -1573,6 +1593,13 @@
|
|
|
1573
1593
|
z-index: 20;
|
|
1574
1594
|
}
|
|
1575
1595
|
}
|
|
1596
|
+
.hover\:border-gray-400 {
|
|
1597
|
+
&:hover {
|
|
1598
|
+
@media (hover: hover) {
|
|
1599
|
+
border-color: var(--color-gray-400);
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1576
1603
|
.hover\:bg-accent {
|
|
1577
1604
|
&:hover {
|
|
1578
1605
|
@media (hover: hover) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shadcn-ui-react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Bleker Cordova <bleker@gliyen.com>",
|
|
6
6
|
"description": "A collection of components for building beautiful and accessible user interfaces with React and Tailwind CSS.",
|