@webdevarif/dashui 0.2.5 → 0.3.1

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
@@ -204,8 +204,12 @@ declare function NotificationBell({ count, onClick, className, }: NotificationBe
204
204
 
205
205
  interface ThemeToggleProps {
206
206
  className?: string;
207
+ /** External controlled theme value. When provided, next-themes is not used. */
208
+ theme?: string;
209
+ /** External toggle handler. When provided, next-themes setTheme is not called. */
210
+ onToggle?: () => void;
207
211
  }
208
- declare function ThemeToggle({ className }: ThemeToggleProps): react_jsx_runtime.JSX.Element;
212
+ declare function ThemeToggle({ className, theme: externalTheme, onToggle }: ThemeToggleProps): react_jsx_runtime.JSX.Element;
209
213
 
210
214
  interface NavItem {
211
215
  href: string;
@@ -451,6 +455,87 @@ interface LoadingSpinnerProps {
451
455
  }
452
456
  declare function LoadingSpinner({ size, className }: LoadingSpinnerProps): react_jsx_runtime.JSX.Element;
453
457
 
458
+ type PostStatus = "DRAFT" | "PUBLISHED" | "SCHEDULED" | "ARCHIVED";
459
+ interface PostStatusBadgeProps {
460
+ status: PostStatus;
461
+ size?: "sm" | "md";
462
+ className?: string;
463
+ }
464
+ declare function PostStatusBadge({ status, size, className, }: PostStatusBadgeProps): react_jsx_runtime.JSX.Element;
465
+
466
+ interface PostListItem {
467
+ id: string;
468
+ title: string;
469
+ slug: string;
470
+ status: PostStatus;
471
+ author?: string | null;
472
+ publishedAt?: Date | string | null;
473
+ createdAt: Date | string;
474
+ featuredImageUrl?: string | null;
475
+ excerpt?: string | null;
476
+ }
477
+ interface PostListTableProps {
478
+ posts: PostListItem[];
479
+ loading?: boolean;
480
+ singularLabel?: string;
481
+ onEdit?: (id: string) => void;
482
+ onDelete?: (id: string) => void;
483
+ onDuplicate?: (id: string) => void;
484
+ onStatusChange?: (id: string, status: PostStatus) => void;
485
+ emptyMessage?: string;
486
+ emptyIcon?: React.ReactNode;
487
+ onNewPost?: () => void;
488
+ newPostLabel?: string;
489
+ className?: string;
490
+ }
491
+ declare function PostListTable({ posts, loading, singularLabel, onEdit, onDelete, onDuplicate, onStatusChange, emptyMessage, emptyIcon, onNewPost, newPostLabel, className, }: PostListTableProps): react_jsx_runtime.JSX.Element;
492
+
493
+ interface PostFiltersBarProps {
494
+ search: string;
495
+ onSearch: (v: string) => void;
496
+ status: string;
497
+ onStatusChange: (v: string) => void;
498
+ onNew?: () => void;
499
+ newLabel?: string;
500
+ total?: number;
501
+ typeLabel?: string;
502
+ className?: string;
503
+ }
504
+ declare function PostFiltersBar({ search, onSearch, status, onStatusChange, onNew, newLabel, total, typeLabel, className, }: PostFiltersBarProps): react_jsx_runtime.JSX.Element;
505
+
506
+ interface PostEditorShellProps {
507
+ title?: string;
508
+ backLabel?: string;
509
+ onBack?: () => void;
510
+ onSave?: () => void;
511
+ onPublish?: () => void;
512
+ saving?: boolean;
513
+ publishing?: boolean;
514
+ status?: PostStatus;
515
+ children: React.ReactNode;
516
+ sidebar: React.ReactNode;
517
+ className?: string;
518
+ }
519
+ declare function PostEditorShell({ title, backLabel, onBack, onSave, onPublish, saving, publishing, status, children, sidebar, className, }: PostEditorShellProps): react_jsx_runtime.JSX.Element;
520
+
521
+ interface SlugInputProps {
522
+ value: string;
523
+ onChange: (value: string) => void;
524
+ onGenerate?: () => void;
525
+ prefix?: string;
526
+ disabled?: boolean;
527
+ className?: string;
528
+ }
529
+ declare function SlugInput({ value, onChange, onGenerate, prefix, disabled, className, }: SlugInputProps): react_jsx_runtime.JSX.Element;
530
+
531
+ interface PostSidebarSectionProps {
532
+ title: string;
533
+ children: React.ReactNode;
534
+ defaultOpen?: boolean;
535
+ className?: string;
536
+ }
537
+ declare function PostSidebarSection({ title, children, defaultOpen, className, }: PostSidebarSectionProps): react_jsx_runtime.JSX.Element;
538
+
454
539
  declare function useDisclosure(initial?: boolean): {
455
540
  isOpen: boolean;
456
541
  open: () => void;
@@ -535,4 +620,4 @@ interface SkeletonProps {
535
620
  }
536
621
  declare function Skeleton({ width, height, rounded, style }: SkeletonProps): react_jsx_runtime.JSX.Element;
537
622
 
538
- 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, type Column, ConfirmDialog, type ConfirmDialogProps, DashboardLayout, type DashboardLayoutProps, DataTable, type DataTableProps, 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, ImagePickerField, type ImagePickerFieldProps, Input, type InputProps, Label, LoadingSpinner, type LoadingSpinnerProps, 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, SearchBar, type SearchBarProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sidebar, type SidebarItem, type SidebarProps, Skeleton, 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, useDisclosure, usePagination };
623
+ 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, type Column, ConfirmDialog, type ConfirmDialogProps, DashboardLayout, type DashboardLayoutProps, DataTable, type DataTableProps, 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, ImagePickerField, type ImagePickerFieldProps, Input, type InputProps, Label, LoadingSpinner, type LoadingSpinnerProps, 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, 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, useDisclosure, usePagination };
package/dist/index.d.ts CHANGED
@@ -204,8 +204,12 @@ declare function NotificationBell({ count, onClick, className, }: NotificationBe
204
204
 
205
205
  interface ThemeToggleProps {
206
206
  className?: string;
207
+ /** External controlled theme value. When provided, next-themes is not used. */
208
+ theme?: string;
209
+ /** External toggle handler. When provided, next-themes setTheme is not called. */
210
+ onToggle?: () => void;
207
211
  }
208
- declare function ThemeToggle({ className }: ThemeToggleProps): react_jsx_runtime.JSX.Element;
212
+ declare function ThemeToggle({ className, theme: externalTheme, onToggle }: ThemeToggleProps): react_jsx_runtime.JSX.Element;
209
213
 
210
214
  interface NavItem {
211
215
  href: string;
@@ -451,6 +455,87 @@ interface LoadingSpinnerProps {
451
455
  }
452
456
  declare function LoadingSpinner({ size, className }: LoadingSpinnerProps): react_jsx_runtime.JSX.Element;
453
457
 
458
+ type PostStatus = "DRAFT" | "PUBLISHED" | "SCHEDULED" | "ARCHIVED";
459
+ interface PostStatusBadgeProps {
460
+ status: PostStatus;
461
+ size?: "sm" | "md";
462
+ className?: string;
463
+ }
464
+ declare function PostStatusBadge({ status, size, className, }: PostStatusBadgeProps): react_jsx_runtime.JSX.Element;
465
+
466
+ interface PostListItem {
467
+ id: string;
468
+ title: string;
469
+ slug: string;
470
+ status: PostStatus;
471
+ author?: string | null;
472
+ publishedAt?: Date | string | null;
473
+ createdAt: Date | string;
474
+ featuredImageUrl?: string | null;
475
+ excerpt?: string | null;
476
+ }
477
+ interface PostListTableProps {
478
+ posts: PostListItem[];
479
+ loading?: boolean;
480
+ singularLabel?: string;
481
+ onEdit?: (id: string) => void;
482
+ onDelete?: (id: string) => void;
483
+ onDuplicate?: (id: string) => void;
484
+ onStatusChange?: (id: string, status: PostStatus) => void;
485
+ emptyMessage?: string;
486
+ emptyIcon?: React.ReactNode;
487
+ onNewPost?: () => void;
488
+ newPostLabel?: string;
489
+ className?: string;
490
+ }
491
+ declare function PostListTable({ posts, loading, singularLabel, onEdit, onDelete, onDuplicate, onStatusChange, emptyMessage, emptyIcon, onNewPost, newPostLabel, className, }: PostListTableProps): react_jsx_runtime.JSX.Element;
492
+
493
+ interface PostFiltersBarProps {
494
+ search: string;
495
+ onSearch: (v: string) => void;
496
+ status: string;
497
+ onStatusChange: (v: string) => void;
498
+ onNew?: () => void;
499
+ newLabel?: string;
500
+ total?: number;
501
+ typeLabel?: string;
502
+ className?: string;
503
+ }
504
+ declare function PostFiltersBar({ search, onSearch, status, onStatusChange, onNew, newLabel, total, typeLabel, className, }: PostFiltersBarProps): react_jsx_runtime.JSX.Element;
505
+
506
+ interface PostEditorShellProps {
507
+ title?: string;
508
+ backLabel?: string;
509
+ onBack?: () => void;
510
+ onSave?: () => void;
511
+ onPublish?: () => void;
512
+ saving?: boolean;
513
+ publishing?: boolean;
514
+ status?: PostStatus;
515
+ children: React.ReactNode;
516
+ sidebar: React.ReactNode;
517
+ className?: string;
518
+ }
519
+ declare function PostEditorShell({ title, backLabel, onBack, onSave, onPublish, saving, publishing, status, children, sidebar, className, }: PostEditorShellProps): react_jsx_runtime.JSX.Element;
520
+
521
+ interface SlugInputProps {
522
+ value: string;
523
+ onChange: (value: string) => void;
524
+ onGenerate?: () => void;
525
+ prefix?: string;
526
+ disabled?: boolean;
527
+ className?: string;
528
+ }
529
+ declare function SlugInput({ value, onChange, onGenerate, prefix, disabled, className, }: SlugInputProps): react_jsx_runtime.JSX.Element;
530
+
531
+ interface PostSidebarSectionProps {
532
+ title: string;
533
+ children: React.ReactNode;
534
+ defaultOpen?: boolean;
535
+ className?: string;
536
+ }
537
+ declare function PostSidebarSection({ title, children, defaultOpen, className, }: PostSidebarSectionProps): react_jsx_runtime.JSX.Element;
538
+
454
539
  declare function useDisclosure(initial?: boolean): {
455
540
  isOpen: boolean;
456
541
  open: () => void;
@@ -535,4 +620,4 @@ interface SkeletonProps {
535
620
  }
536
621
  declare function Skeleton({ width, height, rounded, style }: SkeletonProps): react_jsx_runtime.JSX.Element;
537
622
 
538
- 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, type Column, ConfirmDialog, type ConfirmDialogProps, DashboardLayout, type DashboardLayoutProps, DataTable, type DataTableProps, 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, ImagePickerField, type ImagePickerFieldProps, Input, type InputProps, Label, LoadingSpinner, type LoadingSpinnerProps, 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, SearchBar, type SearchBarProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sidebar, type SidebarItem, type SidebarProps, Skeleton, 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, useDisclosure, usePagination };
623
+ 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, type Column, ConfirmDialog, type ConfirmDialogProps, DashboardLayout, type DashboardLayoutProps, DataTable, type DataTableProps, 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, ImagePickerField, type ImagePickerFieldProps, Input, type InputProps, Label, LoadingSpinner, type LoadingSpinnerProps, 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, 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, useDisclosure, usePagination };