@webdevarif/dashui 0.5.0 → 0.6.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/dist/index.d.mts CHANGED
@@ -326,6 +326,63 @@ interface StorageBarProps {
326
326
  }
327
327
  declare function StorageBar({ used, limit, plan, collapsed, className, }: StorageBarProps): react_jsx_runtime.JSX.Element;
328
328
 
329
+ /**
330
+ * UploadZone — Drag & drop file input
331
+ *
332
+ * Presentation-only. Calls your callback with selected files.
333
+ * You handle: validation, upload, progress, error handling.
334
+ *
335
+ * Props:
336
+ * - onFiles: (files: File[]) => void — called when user selects/drops files
337
+ * - accept?: string — MIME types (e.g., "image/*")
338
+ * - multiple?: boolean
339
+ * - disabled?: boolean
340
+ */
341
+ declare function UploadZone({ onFiles, accept, multiple, disabled, }: {
342
+ onFiles: (files: File[]) => void;
343
+ accept?: string;
344
+ multiple?: boolean;
345
+ disabled?: boolean;
346
+ }): react_jsx_runtime.JSX.Element;
347
+
348
+ /**
349
+ * UploadProgressPanel — Display upload progress for multiple files
350
+ *
351
+ * Presentation-only. Shows status, progress, and allows retry/cancel.
352
+ * You handle: actual upload logic.
353
+ *
354
+ * Props:
355
+ * - items: UploadItem[] — files being uploaded
356
+ * - onRetry?: (id: string) => void
357
+ * - onCancel?: (id: string) => void
358
+ * - onCancelAll?: () => void
359
+ */
360
+ type UploadProgressItem = {
361
+ id: string;
362
+ name: string;
363
+ mimeType: string;
364
+ status: 'pending' | 'uploading' | 'done' | 'failed';
365
+ progress: number;
366
+ error?: string;
367
+ };
368
+ declare function UploadProgressPanel({ items, onRetry, onCancel, onCancelAll, }: {
369
+ items: UploadProgressItem[];
370
+ onRetry?: (id: string) => void;
371
+ onCancel?: (id: string) => void;
372
+ onCancelAll?: () => void;
373
+ }): react_jsx_runtime.JSX.Element | null;
374
+
375
+ interface ImagePickerFieldProps {
376
+ value?: string;
377
+ filename?: string;
378
+ onPickerOpen?: () => void;
379
+ onRemove?: () => void;
380
+ size?: "sm" | "md" | "lg";
381
+ emptyLabel?: string;
382
+ className?: string;
383
+ }
384
+ declare function ImagePickerField({ value, filename, onPickerOpen, onRemove, size, emptyLabel, className, }: ImagePickerFieldProps): react_jsx_runtime.JSX.Element;
385
+
329
386
  interface MediaCardFile {
330
387
  id: string;
331
388
  name: string;
@@ -343,64 +400,6 @@ interface MediaCardProps {
343
400
  }
344
401
  declare function MediaCard({ file, selected, onClick, className }: MediaCardProps): react_jsx_runtime.JSX.Element;
345
402
 
346
- interface MediaGridProps {
347
- files: MediaCardFile[];
348
- selected?: Set<string>;
349
- onSelect?: (file: MediaCardFile) => void;
350
- loading?: boolean;
351
- columns?: 4 | 5 | 6;
352
- emptyMessage?: string;
353
- onUploadClick?: () => void;
354
- className?: string;
355
- }
356
- declare function MediaGrid({ files, selected, onSelect, loading, columns, emptyMessage, onUploadClick, className, }: MediaGridProps): react_jsx_runtime.JSX.Element;
357
-
358
- interface MediaPickerDialogFolder {
359
- id: string;
360
- name: string;
361
- icon?: string | null;
362
- }
363
- interface UploadItem {
364
- name: string;
365
- progress: number;
366
- status: "uploading" | "done" | "failed";
367
- }
368
- interface MediaPickerDialogProps {
369
- open: boolean;
370
- onOpenChange: (open: boolean) => void;
371
- title?: string;
372
- files: MediaCardFile[];
373
- folders?: MediaPickerDialogFolder[];
374
- loading?: boolean;
375
- total: number;
376
- typeFilter?: string;
377
- onTypeChange?: (type: string) => void;
378
- search?: string;
379
- onSearch?: (q: string) => void;
380
- activeFolderId?: string;
381
- onFolderChange?: (id: string) => void;
382
- onUpload?: (files: FileList) => void;
383
- onLoadMore?: () => void;
384
- hasMore?: boolean;
385
- multiple?: boolean;
386
- initialSelected?: string[];
387
- /** "images" = only show image type tabs; "all" = show all type tabs */
388
- accept?: "images" | "all";
389
- onSelect: (files: MediaCardFile[]) => void;
390
- }
391
- declare function MediaPickerDialog({ open, onOpenChange, title, files, folders, loading, total, typeFilter, onTypeChange, search, onSearch, activeFolderId, onFolderChange, onUpload, onLoadMore, hasMore, multiple, initialSelected, accept, onSelect, }: MediaPickerDialogProps): react_jsx_runtime.JSX.Element;
392
-
393
- interface ImagePickerFieldProps {
394
- value?: string;
395
- filename?: string;
396
- onPickerOpen?: () => void;
397
- onRemove?: () => void;
398
- size?: "sm" | "md" | "lg";
399
- emptyLabel?: string;
400
- className?: string;
401
- }
402
- declare function ImagePickerField({ value, filename, onPickerOpen, onRemove, size, emptyLabel, className, }: ImagePickerFieldProps): react_jsx_runtime.JSX.Element;
403
-
404
403
  interface FormFieldProps {
405
404
  label: string;
406
405
  error?: string;
@@ -730,4 +729,4 @@ interface SkeletonProps {
730
729
  }
731
730
  declare function Skeleton({ width, height, rounded, style }: SkeletonProps): react_jsx_runtime.JSX.Element;
732
731
 
733
- export { Alert, type AlertProps, AppShell, type AppShellProps, AuthButton, AuthCard, AuthDivider, AuthField, AuthFootnote, AuthHeader, AuthLogo, AuthShell, Badge, type BadgeProps, type Breadcrumb, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColorPicker, ColorPickerAlpha, ColorPickerEyeDropper, ColorPickerFormat, ColorPickerHexOutput, ColorPickerHue, ColorPickerOutput, ColorPickerSelection, type Column, ConfirmDialog, type ConfirmDialogProps, DEVICES, DEVICE_ICONS, DashboardLayout, type DashboardLayoutProps, DataTable, type DataTableProps, type DeviceKey, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, FormField, type FormFieldProps, FormLayout, type FormLayoutProps, FormSection, type FormSectionProps, HslColorInput, ImagePickerField, type ImagePickerFieldProps, Input, type InputProps, Label, LoadingSpinner, type LoadingSpinnerProps, LocalInput, MediaCard, type MediaCardFile, type MediaCardProps, MediaGrid, type MediaGridProps, MediaPickerDialog, type MediaPickerDialogFolder, type MediaPickerDialogProps, type NavItem, NotificationBell, type NotificationBellProps, Page, type PageProps, PageSection, type PageSectionProps, Pagination, type PaginationProps, PlanBadge, type PlanBadgeProps, type PlanId, Popover, PopoverContent, PopoverTrigger, PostEditorShell, type PostEditorShellProps, PostFiltersBar, type PostFiltersBarProps, type PostListItem, PostListTable, type PostListTableProps, PostSidebarSection, type PostSidebarSectionProps, type PostStatus, PostStatusBadge, type PostStatusBadgeProps, ResponsiveSizeDeviceIcon, ResponsiveSizeField, SearchBar, type SearchBarProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sidebar, type SidebarItem, type SidebarProps, Skeleton, SlugInput, type SlugInputProps, type Stat, Stats, type StatsProps, StorageBar, type StorageBarProps, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, ThemeToggle, type ThemeToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBar, type TopBarProps, type UploadItem, badgeVariants, buttonVariants, cn, useColorPicker, useDisclosure, usePagination };
732
+ export { Alert, type AlertProps, AppShell, type AppShellProps, AuthButton, AuthCard, AuthDivider, AuthField, AuthFootnote, AuthHeader, AuthLogo, AuthShell, Badge, type BadgeProps, type Breadcrumb, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColorPicker, ColorPickerAlpha, ColorPickerEyeDropper, ColorPickerFormat, ColorPickerHexOutput, ColorPickerHue, ColorPickerOutput, ColorPickerSelection, type Column, ConfirmDialog, type ConfirmDialogProps, DEVICES, DEVICE_ICONS, DashboardLayout, type DashboardLayoutProps, DataTable, type DataTableProps, type DeviceKey, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, FormField, type FormFieldProps, FormLayout, type FormLayoutProps, FormSection, type FormSectionProps, HslColorInput, ImagePickerField, Input, type InputProps, Label, LoadingSpinner, type LoadingSpinnerProps, LocalInput, MediaCard, type NavItem, NotificationBell, type NotificationBellProps, Page, type PageProps, PageSection, type PageSectionProps, Pagination, type PaginationProps, PlanBadge, type PlanBadgeProps, type PlanId, Popover, PopoverContent, PopoverTrigger, PostEditorShell, type PostEditorShellProps, PostFiltersBar, type PostFiltersBarProps, type PostListItem, PostListTable, type PostListTableProps, PostSidebarSection, type PostSidebarSectionProps, type PostStatus, PostStatusBadge, type PostStatusBadgeProps, ResponsiveSizeDeviceIcon, ResponsiveSizeField, SearchBar, type SearchBarProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sidebar, type SidebarItem, type SidebarProps, Skeleton, SlugInput, type SlugInputProps, type Stat, Stats, type StatsProps, StorageBar, type StorageBarProps, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, ThemeToggle, type ThemeToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBar, type TopBarProps, type UploadProgressItem, UploadProgressPanel, UploadZone, badgeVariants, buttonVariants, cn, useColorPicker, useDisclosure, usePagination };
package/dist/index.d.ts CHANGED
@@ -326,6 +326,63 @@ interface StorageBarProps {
326
326
  }
327
327
  declare function StorageBar({ used, limit, plan, collapsed, className, }: StorageBarProps): react_jsx_runtime.JSX.Element;
328
328
 
329
+ /**
330
+ * UploadZone — Drag & drop file input
331
+ *
332
+ * Presentation-only. Calls your callback with selected files.
333
+ * You handle: validation, upload, progress, error handling.
334
+ *
335
+ * Props:
336
+ * - onFiles: (files: File[]) => void — called when user selects/drops files
337
+ * - accept?: string — MIME types (e.g., "image/*")
338
+ * - multiple?: boolean
339
+ * - disabled?: boolean
340
+ */
341
+ declare function UploadZone({ onFiles, accept, multiple, disabled, }: {
342
+ onFiles: (files: File[]) => void;
343
+ accept?: string;
344
+ multiple?: boolean;
345
+ disabled?: boolean;
346
+ }): react_jsx_runtime.JSX.Element;
347
+
348
+ /**
349
+ * UploadProgressPanel — Display upload progress for multiple files
350
+ *
351
+ * Presentation-only. Shows status, progress, and allows retry/cancel.
352
+ * You handle: actual upload logic.
353
+ *
354
+ * Props:
355
+ * - items: UploadItem[] — files being uploaded
356
+ * - onRetry?: (id: string) => void
357
+ * - onCancel?: (id: string) => void
358
+ * - onCancelAll?: () => void
359
+ */
360
+ type UploadProgressItem = {
361
+ id: string;
362
+ name: string;
363
+ mimeType: string;
364
+ status: 'pending' | 'uploading' | 'done' | 'failed';
365
+ progress: number;
366
+ error?: string;
367
+ };
368
+ declare function UploadProgressPanel({ items, onRetry, onCancel, onCancelAll, }: {
369
+ items: UploadProgressItem[];
370
+ onRetry?: (id: string) => void;
371
+ onCancel?: (id: string) => void;
372
+ onCancelAll?: () => void;
373
+ }): react_jsx_runtime.JSX.Element | null;
374
+
375
+ interface ImagePickerFieldProps {
376
+ value?: string;
377
+ filename?: string;
378
+ onPickerOpen?: () => void;
379
+ onRemove?: () => void;
380
+ size?: "sm" | "md" | "lg";
381
+ emptyLabel?: string;
382
+ className?: string;
383
+ }
384
+ declare function ImagePickerField({ value, filename, onPickerOpen, onRemove, size, emptyLabel, className, }: ImagePickerFieldProps): react_jsx_runtime.JSX.Element;
385
+
329
386
  interface MediaCardFile {
330
387
  id: string;
331
388
  name: string;
@@ -343,64 +400,6 @@ interface MediaCardProps {
343
400
  }
344
401
  declare function MediaCard({ file, selected, onClick, className }: MediaCardProps): react_jsx_runtime.JSX.Element;
345
402
 
346
- interface MediaGridProps {
347
- files: MediaCardFile[];
348
- selected?: Set<string>;
349
- onSelect?: (file: MediaCardFile) => void;
350
- loading?: boolean;
351
- columns?: 4 | 5 | 6;
352
- emptyMessage?: string;
353
- onUploadClick?: () => void;
354
- className?: string;
355
- }
356
- declare function MediaGrid({ files, selected, onSelect, loading, columns, emptyMessage, onUploadClick, className, }: MediaGridProps): react_jsx_runtime.JSX.Element;
357
-
358
- interface MediaPickerDialogFolder {
359
- id: string;
360
- name: string;
361
- icon?: string | null;
362
- }
363
- interface UploadItem {
364
- name: string;
365
- progress: number;
366
- status: "uploading" | "done" | "failed";
367
- }
368
- interface MediaPickerDialogProps {
369
- open: boolean;
370
- onOpenChange: (open: boolean) => void;
371
- title?: string;
372
- files: MediaCardFile[];
373
- folders?: MediaPickerDialogFolder[];
374
- loading?: boolean;
375
- total: number;
376
- typeFilter?: string;
377
- onTypeChange?: (type: string) => void;
378
- search?: string;
379
- onSearch?: (q: string) => void;
380
- activeFolderId?: string;
381
- onFolderChange?: (id: string) => void;
382
- onUpload?: (files: FileList) => void;
383
- onLoadMore?: () => void;
384
- hasMore?: boolean;
385
- multiple?: boolean;
386
- initialSelected?: string[];
387
- /** "images" = only show image type tabs; "all" = show all type tabs */
388
- accept?: "images" | "all";
389
- onSelect: (files: MediaCardFile[]) => void;
390
- }
391
- declare function MediaPickerDialog({ open, onOpenChange, title, files, folders, loading, total, typeFilter, onTypeChange, search, onSearch, activeFolderId, onFolderChange, onUpload, onLoadMore, hasMore, multiple, initialSelected, accept, onSelect, }: MediaPickerDialogProps): react_jsx_runtime.JSX.Element;
392
-
393
- interface ImagePickerFieldProps {
394
- value?: string;
395
- filename?: string;
396
- onPickerOpen?: () => void;
397
- onRemove?: () => void;
398
- size?: "sm" | "md" | "lg";
399
- emptyLabel?: string;
400
- className?: string;
401
- }
402
- declare function ImagePickerField({ value, filename, onPickerOpen, onRemove, size, emptyLabel, className, }: ImagePickerFieldProps): react_jsx_runtime.JSX.Element;
403
-
404
403
  interface FormFieldProps {
405
404
  label: string;
406
405
  error?: string;
@@ -730,4 +729,4 @@ interface SkeletonProps {
730
729
  }
731
730
  declare function Skeleton({ width, height, rounded, style }: SkeletonProps): react_jsx_runtime.JSX.Element;
732
731
 
733
- export { Alert, type AlertProps, AppShell, type AppShellProps, AuthButton, AuthCard, AuthDivider, AuthField, AuthFootnote, AuthHeader, AuthLogo, AuthShell, Badge, type BadgeProps, type Breadcrumb, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColorPicker, ColorPickerAlpha, ColorPickerEyeDropper, ColorPickerFormat, ColorPickerHexOutput, ColorPickerHue, ColorPickerOutput, ColorPickerSelection, type Column, ConfirmDialog, type ConfirmDialogProps, DEVICES, DEVICE_ICONS, DashboardLayout, type DashboardLayoutProps, DataTable, type DataTableProps, type DeviceKey, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, FormField, type FormFieldProps, FormLayout, type FormLayoutProps, FormSection, type FormSectionProps, HslColorInput, ImagePickerField, type ImagePickerFieldProps, Input, type InputProps, Label, LoadingSpinner, type LoadingSpinnerProps, LocalInput, MediaCard, type MediaCardFile, type MediaCardProps, MediaGrid, type MediaGridProps, MediaPickerDialog, type MediaPickerDialogFolder, type MediaPickerDialogProps, type NavItem, NotificationBell, type NotificationBellProps, Page, type PageProps, PageSection, type PageSectionProps, Pagination, type PaginationProps, PlanBadge, type PlanBadgeProps, type PlanId, Popover, PopoverContent, PopoverTrigger, PostEditorShell, type PostEditorShellProps, PostFiltersBar, type PostFiltersBarProps, type PostListItem, PostListTable, type PostListTableProps, PostSidebarSection, type PostSidebarSectionProps, type PostStatus, PostStatusBadge, type PostStatusBadgeProps, ResponsiveSizeDeviceIcon, ResponsiveSizeField, SearchBar, type SearchBarProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sidebar, type SidebarItem, type SidebarProps, Skeleton, SlugInput, type SlugInputProps, type Stat, Stats, type StatsProps, StorageBar, type StorageBarProps, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, ThemeToggle, type ThemeToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBar, type TopBarProps, type UploadItem, badgeVariants, buttonVariants, cn, useColorPicker, useDisclosure, usePagination };
732
+ export { Alert, type AlertProps, AppShell, type AppShellProps, AuthButton, AuthCard, AuthDivider, AuthField, AuthFootnote, AuthHeader, AuthLogo, AuthShell, Badge, type BadgeProps, type Breadcrumb, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColorPicker, ColorPickerAlpha, ColorPickerEyeDropper, ColorPickerFormat, ColorPickerHexOutput, ColorPickerHue, ColorPickerOutput, ColorPickerSelection, type Column, ConfirmDialog, type ConfirmDialogProps, DEVICES, DEVICE_ICONS, DashboardLayout, type DashboardLayoutProps, DataTable, type DataTableProps, type DeviceKey, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, FormField, type FormFieldProps, FormLayout, type FormLayoutProps, FormSection, type FormSectionProps, HslColorInput, ImagePickerField, Input, type InputProps, Label, LoadingSpinner, type LoadingSpinnerProps, LocalInput, MediaCard, type NavItem, NotificationBell, type NotificationBellProps, Page, type PageProps, PageSection, type PageSectionProps, Pagination, type PaginationProps, PlanBadge, type PlanBadgeProps, type PlanId, Popover, PopoverContent, PopoverTrigger, PostEditorShell, type PostEditorShellProps, PostFiltersBar, type PostFiltersBarProps, type PostListItem, PostListTable, type PostListTableProps, PostSidebarSection, type PostSidebarSectionProps, type PostStatus, PostStatusBadge, type PostStatusBadgeProps, ResponsiveSizeDeviceIcon, ResponsiveSizeField, SearchBar, type SearchBarProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sidebar, type SidebarItem, type SidebarProps, Skeleton, SlugInput, type SlugInputProps, type Stat, Stats, type StatsProps, StorageBar, type StorageBarProps, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, ThemeToggle, type ThemeToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBar, type TopBarProps, type UploadProgressItem, UploadProgressPanel, UploadZone, badgeVariants, buttonVariants, cn, useColorPicker, useDisclosure, usePagination };