shru-design-system 0.3.0 → 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
@@ -103,6 +103,26 @@ declare function RadioItem({ className, ...props }: React$1.ComponentProps<typeo
103
103
 
104
104
  declare function Skeleton({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
105
105
 
106
+ interface SkeletonGridProps {
107
+ count?: number;
108
+ cols?: {
109
+ default?: number;
110
+ md?: number;
111
+ lg?: number;
112
+ };
113
+ className?: string;
114
+ renderSkeleton?: () => React$1.ReactNode;
115
+ }
116
+ declare function SkeletonGrid({ count, cols, className, renderSkeleton, }: SkeletonGridProps): react_jsx_runtime.JSX.Element;
117
+
118
+ interface SkeletonTextProps {
119
+ lines?: number;
120
+ className?: string;
121
+ lineHeight?: "sm" | "md" | "lg";
122
+ lastLineWidth?: "full" | "3/4" | "1/2";
123
+ }
124
+ declare function SkeletonText({ lines, className, lineHeight, lastLineWidth, }: SkeletonTextProps): react_jsx_runtime.JSX.Element;
125
+
106
126
  declare const sliderOrientations: readonly ["horizontal", "vertical"];
107
127
  declare function Slider({ className, defaultValue, value, min, max, orientation, ...props }: React$1.ComponentProps<typeof SliderPrimitive.Root> & {
108
128
  orientation?: typeof sliderOrientations[number];
@@ -533,11 +553,14 @@ interface SnackbarProps {
533
553
  declare function Snackbar({ message, action, variant, className, }: SnackbarProps): react_jsx_runtime.JSX.Element;
534
554
 
535
555
  interface StatusTextProps {
536
- text: string;
537
- status: "success" | "error" | "warning" | "info";
556
+ text?: string;
557
+ status?: "success" | "error" | "warning" | "info";
558
+ count?: number;
559
+ label?: string;
560
+ variant?: "caption" | "body" | "heading";
538
561
  className?: string;
539
562
  }
540
- declare function StatusText({ text, status, className, }: StatusTextProps): react_jsx_runtime.JSX.Element;
563
+ declare function StatusText({ text, status, count, label, variant, className, }: StatusTextProps): react_jsx_runtime.JSX.Element;
541
564
 
542
565
  interface StepperProps {
543
566
  steps: Array<{
@@ -604,6 +627,20 @@ interface FormInputProps {
604
627
  }
605
628
  declare function FormInput({ className, type, label, error, description, variant, id, options, onValueChange, checked, onCheckedChange, ...props }: FormInputProps): react_jsx_runtime.JSX.Element;
606
629
 
630
+ interface SearchInputProps {
631
+ placeholder?: string;
632
+ value?: string;
633
+ onChange?: (value: string) => void;
634
+ onSearch?: (value: string) => void;
635
+ debounceMs?: number;
636
+ clearable?: boolean;
637
+ icon?: React$1.ReactNode;
638
+ variant?: "default" | "minimal" | "filled";
639
+ size?: "sm" | "md" | "lg";
640
+ className?: string;
641
+ }
642
+ declare function SearchInput({ placeholder, value: valueProp, onChange, onSearch, debounceMs, clearable, icon, variant, size, className, }: SearchInputProps): react_jsx_runtime.JSX.Element;
643
+
607
644
  interface ConfirmModalProps {
608
645
  open?: boolean;
609
646
  onOpenChange?: (open: boolean) => void;
@@ -642,13 +679,24 @@ interface FormFieldConfig {
642
679
  options?: Array<{
643
680
  label: string;
644
681
  value: string;
645
- }>;
682
+ }> | ((formData: Record<string, any>) => Array<{
683
+ label: string;
684
+ value: string;
685
+ }>) | (() => Array<{
686
+ label: string;
687
+ value: string;
688
+ }>);
646
689
  accept?: string;
647
690
  multiple?: boolean;
648
691
  min?: number;
649
692
  max?: number;
650
693
  step?: number;
651
694
  defaultValue?: any;
695
+ onChange?: (value: any, params: {
696
+ formData: Record<string, any>;
697
+ setFormData: (data: Record<string, any> | ((prev: Record<string, any>) => Record<string, any>)) => void;
698
+ fieldName: string;
699
+ }) => void;
652
700
  }
653
701
  interface FormModalProps {
654
702
  open?: boolean;
@@ -706,7 +754,7 @@ declare function Grid({ className, cols, gap, ...props }: GridProps): react_jsx_
706
754
 
707
755
  declare const cardVariants: (props?: ({
708
756
  variant?: "minimal" | "filled" | "subtle" | "outlined" | null | undefined;
709
- size?: "sm" | "lg" | "xs" | "md" | null | undefined;
757
+ size?: "sm" | "lg" | "md" | "xs" | null | undefined;
710
758
  } & class_variance_authority_types.ClassProp) | undefined) => string;
711
759
  interface CardProps extends React$1.ComponentProps<"div">, VariantProps<typeof cardVariants> {
712
760
  header?: React$1.ReactNode;
@@ -739,10 +787,29 @@ interface ContainerProps extends React$1.HTMLAttributes<HTMLDivElement> {
739
787
  }
740
788
  declare function Container({ className, maxWidth, ...props }: ContainerProps): react_jsx_runtime.JSX.Element;
741
789
 
742
- interface ListProps extends React$1.HTMLAttributes<HTMLUListElement> {
743
- variant?: "ordered" | "unordered";
790
+ interface ListProps {
791
+ items: Array<any>;
792
+ renderItem: (item: any, index: number) => React$1.ReactNode;
793
+ searchable?: boolean;
794
+ searchPlaceholder?: string;
795
+ emptyTitle?: string;
796
+ emptyDescription?: string;
797
+ emptyAction?: React$1.ReactNode;
798
+ loading?: boolean;
799
+ skeletonCount?: number;
800
+ renderSkeleton?: () => React$1.ReactNode;
801
+ type?: "grid" | "list";
802
+ gridCols?: {
803
+ default?: number;
804
+ md?: number;
805
+ lg?: number;
806
+ };
807
+ className?: string;
808
+ searchValue?: string;
809
+ onSearchChange?: (value: string) => void;
810
+ filterItems?: (items: Array<any>, searchValue: string) => Array<any>;
744
811
  }
745
- declare function List({ className, variant, ...props }: ListProps): react_jsx_runtime.JSX.Element;
812
+ declare function List({ items, renderItem, searchable, searchPlaceholder, emptyTitle, emptyDescription, emptyAction, loading, skeletonCount, renderSkeleton, type, gridCols, className, searchValue: searchValueProp, onSearchChange: onSearchChangeProp, filterItems, }: ListProps): react_jsx_runtime.JSX.Element;
746
813
 
747
814
  declare const headerVariants: (props?: ({
748
815
  variant?: "default" | "bordered" | null | undefined;
@@ -774,12 +841,21 @@ interface EmptyScreenProps extends VariantProps<typeof emptyScreenVariants> {
774
841
  declare function EmptyScreen({ title, description, icon, action, variant, size, className, }: EmptyScreenProps): react_jsx_runtime.JSX.Element;
775
842
 
776
843
  interface CollapsiblePanelProps {
777
- title: string;
844
+ title?: string;
845
+ label?: string;
846
+ keyword?: string;
778
847
  children: React$1.ReactNode;
779
848
  defaultOpen?: boolean;
780
849
  className?: string;
850
+ direction?: "horizontal" | "vertical";
851
+ triggerPosition?: "left" | "right" | "top" | "bottom";
852
+ minWidth?: string | number;
853
+ minHeight?: string | number;
854
+ triggerClassName?: string;
855
+ contentClassName?: string;
856
+ customTrigger?: React$1.ReactNode;
781
857
  }
782
- declare function CollapsiblePanel({ title, children, defaultOpen, className, }: CollapsiblePanelProps): react_jsx_runtime.JSX.Element;
858
+ declare function CollapsiblePanel({ title, label, keyword, children, defaultOpen, className, direction, triggerPosition, minWidth, minHeight, triggerClassName, contentClassName, customTrigger, }: CollapsiblePanelProps): react_jsx_runtime.JSX.Element;
783
859
 
784
860
  declare function ResizablePanelGroup({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelGroup>): react_jsx_runtime.JSX.Element;
785
861
  declare function ResizablePanel({ ...props }: React$1.ComponentProps<typeof ResizablePrimitive.Panel>): react_jsx_runtime.JSX.Element;
@@ -912,8 +988,8 @@ declare function useThemeToggle(): {
912
988
  * Theme Configuration
913
989
  * Registry of all available themes organized by category
914
990
  *
915
- * Base themes are defined here. Additional themes can be discovered dynamically
916
- * by scanning the /tokens/themes/ directory structure.
991
+ * Base themes are defined here. For custom themes, use registerTheme() to add them.
992
+ * Create theme files in public/tokens/themes/{category}/{themeId}.json and register them.
917
993
  */
918
994
  type ThemeMetadata = {
919
995
  name: string;
@@ -938,14 +1014,33 @@ type ThemeCategory = {
938
1014
  declare const THEME_CATEGORY_ORDER: readonly ["color", "typography", "shape", "density", "animation", "custom"];
939
1015
  /**
940
1016
  * Register a custom theme dynamically
941
- * Allows users to add themes without modifying the base config
942
- * Can be used for any category including custom
1017
+ * Use this to add custom themes after creating theme files in public/tokens/themes/
1018
+ *
1019
+ * Example:
1020
+ * ```ts
1021
+ * import { registerTheme } from 'shru-design-system'
1022
+ *
1023
+ * // After creating public/tokens/themes/color/ocean.json
1024
+ * registerTheme('color', 'ocean', {
1025
+ * name: 'Ocean',
1026
+ * file: 'color/ocean.json',
1027
+ * icon: '🌊',
1028
+ * description: 'Ocean color theme'
1029
+ * })
1030
+ * ```
943
1031
  */
944
1032
  declare function registerTheme(category: string, themeId: string, metadata: ThemeMetadata): Record<string, ThemeCategory>;
945
1033
  /**
946
1034
  * Register a theme from a token file
947
- * Helper function to automatically register a theme by loading its file
948
- * Users can call this after creating a theme file
1035
+ * Helper function that loads the theme file and registers it automatically
1036
+ *
1037
+ * Example:
1038
+ * ```ts
1039
+ * import { registerThemeFromFile } from 'shru-design-system'
1040
+ *
1041
+ * // After creating public/tokens/themes/color/ocean.json
1042
+ * await registerThemeFromFile('color', 'ocean')
1043
+ * ```
949
1044
  */
950
1045
  declare function registerThemeFromFile(category: string, themeId: string, filePath?: string): Promise<{
951
1046
  success: boolean;
@@ -995,4 +1090,4 @@ declare function getCurrentCSSVariables(): Record<string, string>;
995
1090
  */
996
1091
  declare function applyThemeSync(): void;
997
1092
 
998
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsiblePanel, type CollapsiblePanelProps, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmModal, type ConfirmModalProps, Container, type ContainerProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, 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, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyScreen, type EmptyScreenProps, EmptyTitle, ErrorBoundary, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Footer, type FooterProps, Form, FormControl, FormDescription, FormField, type FormFieldConfig, type FormFieldType, FormInput, type FormInputProps, type FormInputType, FormItem, FormLabel, FormMessage, FormModal, type FormModalProps, Grid, type GridProps, Header, type HeaderProps, HistoryControlButtons, type HistoryControlButtonsProps, HoverCard, HoverCardContent, HoverCardTrigger, Image, type ImageProps, InfoBanner, type InfoBannerProps, InlineEdit, type InlineEditProps, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Kbd, KbdGroup, Label, List, type ListProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, Radio, RadioItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResizeContainer, type ResizeContainerProps, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Snackbar, type SnackbarProps, Spinner, Stack, type StackProps, StatusText, type StatusTextProps, Stepper, type StepperProps, Switch, THEME_CATEGORY_ORDER, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextInput, type TextProps, Textarea, type ThemeMetadata$1 as ThemeMetadata, type ThemeSelection, ThemeToggle, type ThemeToggleProps, Toast, type ToastProps, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TriggerModal, type TriggerModalProps, Upload, type UploadProps, alertVariants, applyThemeSync, badgeVariants, buttonVariants, emptyMediaVariants, enableDebugMode, fieldVariants, getCurrentCSSVariables, getTheme, getThemeCategories, getThemeFilePath, getThemesForCategory, navigationMenuTriggerStyle, registerTheme, registerThemeFromFile, toggleVariants, useChart, useFormField, useSidebar, useTheme, useThemeToggle };
1093
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsiblePanel, type CollapsiblePanelProps, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmModal, type ConfirmModalProps, Container, type ContainerProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, 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, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyScreen, type EmptyScreenProps, EmptyTitle, ErrorBoundary, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Footer, type FooterProps, Form, FormControl, FormDescription, FormField, type FormFieldConfig, type FormFieldType, FormInput, type FormInputProps, type FormInputType, FormItem, FormLabel, FormMessage, FormModal, type FormModalProps, Grid, type GridProps, Header, type HeaderProps, HistoryControlButtons, type HistoryControlButtonsProps, HoverCard, HoverCardContent, HoverCardTrigger, Image, type ImageProps, InfoBanner, type InfoBannerProps, InlineEdit, type InlineEditProps, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Kbd, KbdGroup, Label, List, type ListProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, Radio, RadioItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResizeContainer, type ResizeContainerProps, ScrollArea, ScrollBar, SearchInput, type SearchInputProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, SkeletonGrid, type SkeletonGridProps, SkeletonText, type SkeletonTextProps, Slider, Snackbar, type SnackbarProps, Spinner, Stack, type StackProps, StatusText, type StatusTextProps, Stepper, type StepperProps, Switch, THEME_CATEGORY_ORDER, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextInput, type TextProps, Textarea, type ThemeMetadata$1 as ThemeMetadata, type ThemeSelection, ThemeToggle, type ThemeToggleProps, Toast, type ToastProps, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TriggerModal, type TriggerModalProps, Upload, type UploadProps, alertVariants, applyThemeSync, badgeVariants, buttonVariants, emptyMediaVariants, enableDebugMode, fieldVariants, getCurrentCSSVariables, getTheme, getThemeCategories, getThemeFilePath, getThemesForCategory, navigationMenuTriggerStyle, registerTheme, registerThemeFromFile, toggleVariants, useChart, useFormField, useSidebar, useTheme, useThemeToggle };
package/dist/index.d.ts CHANGED
@@ -103,6 +103,26 @@ declare function RadioItem({ className, ...props }: React$1.ComponentProps<typeo
103
103
 
104
104
  declare function Skeleton({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
105
105
 
106
+ interface SkeletonGridProps {
107
+ count?: number;
108
+ cols?: {
109
+ default?: number;
110
+ md?: number;
111
+ lg?: number;
112
+ };
113
+ className?: string;
114
+ renderSkeleton?: () => React$1.ReactNode;
115
+ }
116
+ declare function SkeletonGrid({ count, cols, className, renderSkeleton, }: SkeletonGridProps): react_jsx_runtime.JSX.Element;
117
+
118
+ interface SkeletonTextProps {
119
+ lines?: number;
120
+ className?: string;
121
+ lineHeight?: "sm" | "md" | "lg";
122
+ lastLineWidth?: "full" | "3/4" | "1/2";
123
+ }
124
+ declare function SkeletonText({ lines, className, lineHeight, lastLineWidth, }: SkeletonTextProps): react_jsx_runtime.JSX.Element;
125
+
106
126
  declare const sliderOrientations: readonly ["horizontal", "vertical"];
107
127
  declare function Slider({ className, defaultValue, value, min, max, orientation, ...props }: React$1.ComponentProps<typeof SliderPrimitive.Root> & {
108
128
  orientation?: typeof sliderOrientations[number];
@@ -533,11 +553,14 @@ interface SnackbarProps {
533
553
  declare function Snackbar({ message, action, variant, className, }: SnackbarProps): react_jsx_runtime.JSX.Element;
534
554
 
535
555
  interface StatusTextProps {
536
- text: string;
537
- status: "success" | "error" | "warning" | "info";
556
+ text?: string;
557
+ status?: "success" | "error" | "warning" | "info";
558
+ count?: number;
559
+ label?: string;
560
+ variant?: "caption" | "body" | "heading";
538
561
  className?: string;
539
562
  }
540
- declare function StatusText({ text, status, className, }: StatusTextProps): react_jsx_runtime.JSX.Element;
563
+ declare function StatusText({ text, status, count, label, variant, className, }: StatusTextProps): react_jsx_runtime.JSX.Element;
541
564
 
542
565
  interface StepperProps {
543
566
  steps: Array<{
@@ -604,6 +627,20 @@ interface FormInputProps {
604
627
  }
605
628
  declare function FormInput({ className, type, label, error, description, variant, id, options, onValueChange, checked, onCheckedChange, ...props }: FormInputProps): react_jsx_runtime.JSX.Element;
606
629
 
630
+ interface SearchInputProps {
631
+ placeholder?: string;
632
+ value?: string;
633
+ onChange?: (value: string) => void;
634
+ onSearch?: (value: string) => void;
635
+ debounceMs?: number;
636
+ clearable?: boolean;
637
+ icon?: React$1.ReactNode;
638
+ variant?: "default" | "minimal" | "filled";
639
+ size?: "sm" | "md" | "lg";
640
+ className?: string;
641
+ }
642
+ declare function SearchInput({ placeholder, value: valueProp, onChange, onSearch, debounceMs, clearable, icon, variant, size, className, }: SearchInputProps): react_jsx_runtime.JSX.Element;
643
+
607
644
  interface ConfirmModalProps {
608
645
  open?: boolean;
609
646
  onOpenChange?: (open: boolean) => void;
@@ -642,13 +679,24 @@ interface FormFieldConfig {
642
679
  options?: Array<{
643
680
  label: string;
644
681
  value: string;
645
- }>;
682
+ }> | ((formData: Record<string, any>) => Array<{
683
+ label: string;
684
+ value: string;
685
+ }>) | (() => Array<{
686
+ label: string;
687
+ value: string;
688
+ }>);
646
689
  accept?: string;
647
690
  multiple?: boolean;
648
691
  min?: number;
649
692
  max?: number;
650
693
  step?: number;
651
694
  defaultValue?: any;
695
+ onChange?: (value: any, params: {
696
+ formData: Record<string, any>;
697
+ setFormData: (data: Record<string, any> | ((prev: Record<string, any>) => Record<string, any>)) => void;
698
+ fieldName: string;
699
+ }) => void;
652
700
  }
653
701
  interface FormModalProps {
654
702
  open?: boolean;
@@ -706,7 +754,7 @@ declare function Grid({ className, cols, gap, ...props }: GridProps): react_jsx_
706
754
 
707
755
  declare const cardVariants: (props?: ({
708
756
  variant?: "minimal" | "filled" | "subtle" | "outlined" | null | undefined;
709
- size?: "sm" | "lg" | "xs" | "md" | null | undefined;
757
+ size?: "sm" | "lg" | "md" | "xs" | null | undefined;
710
758
  } & class_variance_authority_types.ClassProp) | undefined) => string;
711
759
  interface CardProps extends React$1.ComponentProps<"div">, VariantProps<typeof cardVariants> {
712
760
  header?: React$1.ReactNode;
@@ -739,10 +787,29 @@ interface ContainerProps extends React$1.HTMLAttributes<HTMLDivElement> {
739
787
  }
740
788
  declare function Container({ className, maxWidth, ...props }: ContainerProps): react_jsx_runtime.JSX.Element;
741
789
 
742
- interface ListProps extends React$1.HTMLAttributes<HTMLUListElement> {
743
- variant?: "ordered" | "unordered";
790
+ interface ListProps {
791
+ items: Array<any>;
792
+ renderItem: (item: any, index: number) => React$1.ReactNode;
793
+ searchable?: boolean;
794
+ searchPlaceholder?: string;
795
+ emptyTitle?: string;
796
+ emptyDescription?: string;
797
+ emptyAction?: React$1.ReactNode;
798
+ loading?: boolean;
799
+ skeletonCount?: number;
800
+ renderSkeleton?: () => React$1.ReactNode;
801
+ type?: "grid" | "list";
802
+ gridCols?: {
803
+ default?: number;
804
+ md?: number;
805
+ lg?: number;
806
+ };
807
+ className?: string;
808
+ searchValue?: string;
809
+ onSearchChange?: (value: string) => void;
810
+ filterItems?: (items: Array<any>, searchValue: string) => Array<any>;
744
811
  }
745
- declare function List({ className, variant, ...props }: ListProps): react_jsx_runtime.JSX.Element;
812
+ declare function List({ items, renderItem, searchable, searchPlaceholder, emptyTitle, emptyDescription, emptyAction, loading, skeletonCount, renderSkeleton, type, gridCols, className, searchValue: searchValueProp, onSearchChange: onSearchChangeProp, filterItems, }: ListProps): react_jsx_runtime.JSX.Element;
746
813
 
747
814
  declare const headerVariants: (props?: ({
748
815
  variant?: "default" | "bordered" | null | undefined;
@@ -774,12 +841,21 @@ interface EmptyScreenProps extends VariantProps<typeof emptyScreenVariants> {
774
841
  declare function EmptyScreen({ title, description, icon, action, variant, size, className, }: EmptyScreenProps): react_jsx_runtime.JSX.Element;
775
842
 
776
843
  interface CollapsiblePanelProps {
777
- title: string;
844
+ title?: string;
845
+ label?: string;
846
+ keyword?: string;
778
847
  children: React$1.ReactNode;
779
848
  defaultOpen?: boolean;
780
849
  className?: string;
850
+ direction?: "horizontal" | "vertical";
851
+ triggerPosition?: "left" | "right" | "top" | "bottom";
852
+ minWidth?: string | number;
853
+ minHeight?: string | number;
854
+ triggerClassName?: string;
855
+ contentClassName?: string;
856
+ customTrigger?: React$1.ReactNode;
781
857
  }
782
- declare function CollapsiblePanel({ title, children, defaultOpen, className, }: CollapsiblePanelProps): react_jsx_runtime.JSX.Element;
858
+ declare function CollapsiblePanel({ title, label, keyword, children, defaultOpen, className, direction, triggerPosition, minWidth, minHeight, triggerClassName, contentClassName, customTrigger, }: CollapsiblePanelProps): react_jsx_runtime.JSX.Element;
783
859
 
784
860
  declare function ResizablePanelGroup({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelGroup>): react_jsx_runtime.JSX.Element;
785
861
  declare function ResizablePanel({ ...props }: React$1.ComponentProps<typeof ResizablePrimitive.Panel>): react_jsx_runtime.JSX.Element;
@@ -912,8 +988,8 @@ declare function useThemeToggle(): {
912
988
  * Theme Configuration
913
989
  * Registry of all available themes organized by category
914
990
  *
915
- * Base themes are defined here. Additional themes can be discovered dynamically
916
- * by scanning the /tokens/themes/ directory structure.
991
+ * Base themes are defined here. For custom themes, use registerTheme() to add them.
992
+ * Create theme files in public/tokens/themes/{category}/{themeId}.json and register them.
917
993
  */
918
994
  type ThemeMetadata = {
919
995
  name: string;
@@ -938,14 +1014,33 @@ type ThemeCategory = {
938
1014
  declare const THEME_CATEGORY_ORDER: readonly ["color", "typography", "shape", "density", "animation", "custom"];
939
1015
  /**
940
1016
  * Register a custom theme dynamically
941
- * Allows users to add themes without modifying the base config
942
- * Can be used for any category including custom
1017
+ * Use this to add custom themes after creating theme files in public/tokens/themes/
1018
+ *
1019
+ * Example:
1020
+ * ```ts
1021
+ * import { registerTheme } from 'shru-design-system'
1022
+ *
1023
+ * // After creating public/tokens/themes/color/ocean.json
1024
+ * registerTheme('color', 'ocean', {
1025
+ * name: 'Ocean',
1026
+ * file: 'color/ocean.json',
1027
+ * icon: '🌊',
1028
+ * description: 'Ocean color theme'
1029
+ * })
1030
+ * ```
943
1031
  */
944
1032
  declare function registerTheme(category: string, themeId: string, metadata: ThemeMetadata): Record<string, ThemeCategory>;
945
1033
  /**
946
1034
  * Register a theme from a token file
947
- * Helper function to automatically register a theme by loading its file
948
- * Users can call this after creating a theme file
1035
+ * Helper function that loads the theme file and registers it automatically
1036
+ *
1037
+ * Example:
1038
+ * ```ts
1039
+ * import { registerThemeFromFile } from 'shru-design-system'
1040
+ *
1041
+ * // After creating public/tokens/themes/color/ocean.json
1042
+ * await registerThemeFromFile('color', 'ocean')
1043
+ * ```
949
1044
  */
950
1045
  declare function registerThemeFromFile(category: string, themeId: string, filePath?: string): Promise<{
951
1046
  success: boolean;
@@ -995,4 +1090,4 @@ declare function getCurrentCSSVariables(): Record<string, string>;
995
1090
  */
996
1091
  declare function applyThemeSync(): void;
997
1092
 
998
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsiblePanel, type CollapsiblePanelProps, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmModal, type ConfirmModalProps, Container, type ContainerProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, 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, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyScreen, type EmptyScreenProps, EmptyTitle, ErrorBoundary, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Footer, type FooterProps, Form, FormControl, FormDescription, FormField, type FormFieldConfig, type FormFieldType, FormInput, type FormInputProps, type FormInputType, FormItem, FormLabel, FormMessage, FormModal, type FormModalProps, Grid, type GridProps, Header, type HeaderProps, HistoryControlButtons, type HistoryControlButtonsProps, HoverCard, HoverCardContent, HoverCardTrigger, Image, type ImageProps, InfoBanner, type InfoBannerProps, InlineEdit, type InlineEditProps, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Kbd, KbdGroup, Label, List, type ListProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, Radio, RadioItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResizeContainer, type ResizeContainerProps, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Snackbar, type SnackbarProps, Spinner, Stack, type StackProps, StatusText, type StatusTextProps, Stepper, type StepperProps, Switch, THEME_CATEGORY_ORDER, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextInput, type TextProps, Textarea, type ThemeMetadata$1 as ThemeMetadata, type ThemeSelection, ThemeToggle, type ThemeToggleProps, Toast, type ToastProps, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TriggerModal, type TriggerModalProps, Upload, type UploadProps, alertVariants, applyThemeSync, badgeVariants, buttonVariants, emptyMediaVariants, enableDebugMode, fieldVariants, getCurrentCSSVariables, getTheme, getThemeCategories, getThemeFilePath, getThemesForCategory, navigationMenuTriggerStyle, registerTheme, registerThemeFromFile, toggleVariants, useChart, useFormField, useSidebar, useTheme, useThemeToggle };
1093
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsiblePanel, type CollapsiblePanelProps, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmModal, type ConfirmModalProps, Container, type ContainerProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, 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, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyScreen, type EmptyScreenProps, EmptyTitle, ErrorBoundary, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Footer, type FooterProps, Form, FormControl, FormDescription, FormField, type FormFieldConfig, type FormFieldType, FormInput, type FormInputProps, type FormInputType, FormItem, FormLabel, FormMessage, FormModal, type FormModalProps, Grid, type GridProps, Header, type HeaderProps, HistoryControlButtons, type HistoryControlButtonsProps, HoverCard, HoverCardContent, HoverCardTrigger, Image, type ImageProps, InfoBanner, type InfoBannerProps, InlineEdit, type InlineEditProps, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Kbd, KbdGroup, Label, List, type ListProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, Radio, RadioItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResizeContainer, type ResizeContainerProps, ScrollArea, ScrollBar, SearchInput, type SearchInputProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, SkeletonGrid, type SkeletonGridProps, SkeletonText, type SkeletonTextProps, Slider, Snackbar, type SnackbarProps, Spinner, Stack, type StackProps, StatusText, type StatusTextProps, Stepper, type StepperProps, Switch, THEME_CATEGORY_ORDER, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextInput, type TextProps, Textarea, type ThemeMetadata$1 as ThemeMetadata, type ThemeSelection, ThemeToggle, type ThemeToggleProps, Toast, type ToastProps, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TriggerModal, type TriggerModalProps, Upload, type UploadProps, alertVariants, applyThemeSync, badgeVariants, buttonVariants, emptyMediaVariants, enableDebugMode, fieldVariants, getCurrentCSSVariables, getTheme, getThemeCategories, getThemeFilePath, getThemesForCategory, navigationMenuTriggerStyle, registerTheme, registerThemeFromFile, toggleVariants, useChart, useFormField, useSidebar, useTheme, useThemeToggle };