shadcn-ui-react 0.5.3 → 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/README.md +74 -26
- package/dist/index.cjs +296 -119
- package/dist/index.d.cts +146 -9
- package/dist/index.d.ts +146 -9
- package/dist/index.js +300 -121
- package/dist/style.css +535 -21
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -769,13 +769,122 @@ type BreadcrumbsProps = {
|
|
|
769
769
|
};
|
|
770
770
|
declare function Breadcrumbs({ items, className, classNameList }: BreadcrumbsProps): react_jsx_runtime.JSX.Element;
|
|
771
771
|
|
|
772
|
+
/** =========
|
|
773
|
+
* SLOTS
|
|
774
|
+
* =========
|
|
775
|
+
* Classname “slots” you can override to customize styles at specific points
|
|
776
|
+
* (root, table, header, rows, cells, footer, etc.).
|
|
777
|
+
*/
|
|
778
|
+
type DataTableSlots = Partial<{
|
|
779
|
+
root: string;
|
|
780
|
+
table: string;
|
|
781
|
+
thead: string;
|
|
782
|
+
theadSticky: string;
|
|
783
|
+
trHead: string;
|
|
784
|
+
th: string;
|
|
785
|
+
tbody: string;
|
|
786
|
+
tr: string;
|
|
787
|
+
trClickable: string;
|
|
788
|
+
td: string;
|
|
789
|
+
footer: string;
|
|
790
|
+
footerInner: string;
|
|
791
|
+
metaWrap: string;
|
|
792
|
+
controlsWrap: string;
|
|
793
|
+
pageSizeLabel: string;
|
|
794
|
+
pageSizeTrigger: string;
|
|
795
|
+
pageLabel: string;
|
|
796
|
+
navButton: string;
|
|
797
|
+
}>;
|
|
798
|
+
/** =========
|
|
799
|
+
* ACCENTS
|
|
800
|
+
* =========
|
|
801
|
+
* Accent system for highlighting interactive/selected states.
|
|
802
|
+
* - `accent`: choose a preset accent name
|
|
803
|
+
* - `accentColor`: provide a custom CSS color (overrides `accent`)
|
|
804
|
+
* If both are null/empty, accent styling is disabled.
|
|
805
|
+
*/
|
|
806
|
+
type DataTableAccent = 'primary' | 'emerald' | 'indigo' | 'rose' | 'amber' | 'zinc';
|
|
807
|
+
/** =========
|
|
808
|
+
* TEMPLATES
|
|
809
|
+
* =========
|
|
810
|
+
* Built-in visual templates (neo, glass, compact, minimal, clean, elevated, grid, cards).
|
|
811
|
+
* Each template is a partial set of slots. Slots are merged like:
|
|
812
|
+
* `neo base` + `selected template` + `classNames overrides`.
|
|
813
|
+
*/
|
|
814
|
+
declare const DATA_TABLE_TEMPLATES: {
|
|
815
|
+
readonly neo: {
|
|
816
|
+
root: string;
|
|
817
|
+
table: string;
|
|
818
|
+
thead: string;
|
|
819
|
+
theadSticky: string;
|
|
820
|
+
trHead: string;
|
|
821
|
+
th: string;
|
|
822
|
+
tbody: string;
|
|
823
|
+
tr: string;
|
|
824
|
+
trClickable: string;
|
|
825
|
+
td: string;
|
|
826
|
+
footer: string;
|
|
827
|
+
footerInner: string;
|
|
828
|
+
metaWrap: string;
|
|
829
|
+
controlsWrap: string;
|
|
830
|
+
pageSizeLabel: string;
|
|
831
|
+
pageSizeTrigger: string;
|
|
832
|
+
pageLabel: string;
|
|
833
|
+
navButton: string;
|
|
834
|
+
};
|
|
835
|
+
readonly glass: {
|
|
836
|
+
root: string;
|
|
837
|
+
theadSticky: string;
|
|
838
|
+
tbody: string;
|
|
839
|
+
};
|
|
840
|
+
readonly compact: {
|
|
841
|
+
th: string;
|
|
842
|
+
td: string;
|
|
843
|
+
pageSizeTrigger: string;
|
|
844
|
+
};
|
|
845
|
+
readonly minimal: {
|
|
846
|
+
root: string;
|
|
847
|
+
theadSticky: string;
|
|
848
|
+
footer: string;
|
|
849
|
+
tbody: string;
|
|
850
|
+
};
|
|
851
|
+
readonly clean: {
|
|
852
|
+
root: string;
|
|
853
|
+
theadSticky: string;
|
|
854
|
+
tbody: string;
|
|
855
|
+
tr: string;
|
|
856
|
+
trClickable: string;
|
|
857
|
+
};
|
|
858
|
+
readonly elevated: {
|
|
859
|
+
root: string;
|
|
860
|
+
theadSticky: string;
|
|
861
|
+
tbody: string;
|
|
862
|
+
th: string;
|
|
863
|
+
td: string;
|
|
864
|
+
};
|
|
865
|
+
readonly grid: {
|
|
866
|
+
root: string;
|
|
867
|
+
table: string;
|
|
868
|
+
thead: string;
|
|
869
|
+
tbody: string;
|
|
870
|
+
tr: string;
|
|
871
|
+
trClickable: string;
|
|
872
|
+
};
|
|
873
|
+
readonly cards: {
|
|
874
|
+
root: string;
|
|
875
|
+
table: string;
|
|
876
|
+
theadSticky: string;
|
|
877
|
+
tr: string;
|
|
878
|
+
trClickable: string;
|
|
879
|
+
tbody: string;
|
|
880
|
+
};
|
|
881
|
+
};
|
|
882
|
+
type BuiltInTemplate = keyof typeof DATA_TABLE_TEMPLATES;
|
|
772
883
|
interface DataTableProps<TData, TValue> {
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
rowClassName?: string;
|
|
778
|
-
cellClassName?: string;
|
|
884
|
+
classNames?: DataTableSlots;
|
|
885
|
+
template?: BuiltInTemplate;
|
|
886
|
+
accent?: DataTableAccent | null;
|
|
887
|
+
accentColor?: string | null;
|
|
779
888
|
page?: number;
|
|
780
889
|
perPage?: number;
|
|
781
890
|
onPageChange?: (page: number) => void;
|
|
@@ -793,10 +902,38 @@ interface DataTableProps<TData, TValue> {
|
|
|
793
902
|
ofLabel?: string;
|
|
794
903
|
emptyData?: React__default.ReactNode;
|
|
795
904
|
animate?: boolean;
|
|
796
|
-
stickyHeader?: boolean;
|
|
797
905
|
heightClassName?: string;
|
|
906
|
+
stickyHeader?: boolean;
|
|
907
|
+
headerScroll?: boolean;
|
|
798
908
|
}
|
|
799
|
-
|
|
909
|
+
/**
|
|
910
|
+
* DataTable
|
|
911
|
+
* ----------
|
|
912
|
+
* A styled, template-driven table for TanStack Table with:
|
|
913
|
+
* - manual pagination + external page state
|
|
914
|
+
* - optional animated body transitions
|
|
915
|
+
* - optional sticky header (works because we removed wrapper div around <table>)
|
|
916
|
+
* - optional row click handler
|
|
917
|
+
* - optional accent highlight system
|
|
918
|
+
*
|
|
919
|
+
* Props:
|
|
920
|
+
* - columns, data: TanStack Table definitions and rows
|
|
921
|
+
* - page, perPage, pageCount: pagination inputs (1-based page)
|
|
922
|
+
* - onPageChange(page): called with 1-based page
|
|
923
|
+
* - onPageSizeChange(size): called when page size changes (also resets to page 1)
|
|
924
|
+
* - template: built-in template key
|
|
925
|
+
* - classNames: slot overrides (merge on top)
|
|
926
|
+
* - accent / accentColor: accent control (off by default)
|
|
927
|
+
* - stickyHeader: enables sticky header behavior (default true)
|
|
928
|
+
* - headerScroll: if true, header stickiness is disabled (use when header must scroll away)
|
|
929
|
+
* - heightClassName: sets the overall component height
|
|
930
|
+
* - animate: animates tbody on page changes
|
|
931
|
+
* - emptyData: custom empty state node
|
|
932
|
+
* - totalRows: optional meta display
|
|
933
|
+
* - isRowsSelected / rowsSelectedLabel: selection meta display
|
|
934
|
+
* - rowPerPageLabel, pageLabel, ofLabel: i18n labels
|
|
935
|
+
*/
|
|
936
|
+
declare function DataTable<TData, TValue>({ columns, data, pageCount, page, perPage, pageSizeOptions, rowPerPageLabel, ofLabel, pageLabel, isRowsSelected, totalRows, rowsSelectedLabel, template, classNames, accent, accentColor, emptyData, onPageChange, onClick, onPageSizeChange, animate, stickyHeader, headerScroll, heightClassName }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
800
937
|
|
|
801
938
|
type DataTableSkeletonProps = {
|
|
802
939
|
columnCount: number;
|
|
@@ -902,4 +1039,4 @@ declare function UiInput({ ref, label, placeholder, onChange, className, classNa
|
|
|
902
1039
|
|
|
903
1040
|
declare function cn(...inputs: ClassValue[]): string;
|
|
904
1041
|
|
|
905
|
-
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, FormSelect, Heading, HoverCard, HoverCardContent, HoverCardTrigger, Icons, ImagePreview, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, type InputVariant$1 as InputVariant, type InputVariantProps$1 as InputVariantProps, 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, type SelectOption, 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, UiInput, UiSelect, badgeVariants, buttonVariants, cn, inputVariants$2 as inputVariants, navigationMenuTriggerStyle, reducer, toast, toggleVariants, useFormField, useToast, variants };
|
|
1042
|
+
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, DATA_TABLE_TEMPLATES, DataTable, type DataTableAccent, DataTableSkeleton, type DataTableSlots, 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, FormSelect, Heading, HoverCard, HoverCardContent, HoverCardTrigger, Icons, ImagePreview, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, type InputVariant$1 as InputVariant, type InputVariantProps$1 as InputVariantProps, 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, type SelectOption, 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, UiInput, UiSelect, badgeVariants, buttonVariants, cn, inputVariants$2 as inputVariants, navigationMenuTriggerStyle, reducer, toast, toggleVariants, useFormField, useToast, variants };
|
package/dist/index.d.ts
CHANGED
|
@@ -769,13 +769,122 @@ type BreadcrumbsProps = {
|
|
|
769
769
|
};
|
|
770
770
|
declare function Breadcrumbs({ items, className, classNameList }: BreadcrumbsProps): react_jsx_runtime.JSX.Element;
|
|
771
771
|
|
|
772
|
+
/** =========
|
|
773
|
+
* SLOTS
|
|
774
|
+
* =========
|
|
775
|
+
* Classname “slots” you can override to customize styles at specific points
|
|
776
|
+
* (root, table, header, rows, cells, footer, etc.).
|
|
777
|
+
*/
|
|
778
|
+
type DataTableSlots = Partial<{
|
|
779
|
+
root: string;
|
|
780
|
+
table: string;
|
|
781
|
+
thead: string;
|
|
782
|
+
theadSticky: string;
|
|
783
|
+
trHead: string;
|
|
784
|
+
th: string;
|
|
785
|
+
tbody: string;
|
|
786
|
+
tr: string;
|
|
787
|
+
trClickable: string;
|
|
788
|
+
td: string;
|
|
789
|
+
footer: string;
|
|
790
|
+
footerInner: string;
|
|
791
|
+
metaWrap: string;
|
|
792
|
+
controlsWrap: string;
|
|
793
|
+
pageSizeLabel: string;
|
|
794
|
+
pageSizeTrigger: string;
|
|
795
|
+
pageLabel: string;
|
|
796
|
+
navButton: string;
|
|
797
|
+
}>;
|
|
798
|
+
/** =========
|
|
799
|
+
* ACCENTS
|
|
800
|
+
* =========
|
|
801
|
+
* Accent system for highlighting interactive/selected states.
|
|
802
|
+
* - `accent`: choose a preset accent name
|
|
803
|
+
* - `accentColor`: provide a custom CSS color (overrides `accent`)
|
|
804
|
+
* If both are null/empty, accent styling is disabled.
|
|
805
|
+
*/
|
|
806
|
+
type DataTableAccent = 'primary' | 'emerald' | 'indigo' | 'rose' | 'amber' | 'zinc';
|
|
807
|
+
/** =========
|
|
808
|
+
* TEMPLATES
|
|
809
|
+
* =========
|
|
810
|
+
* Built-in visual templates (neo, glass, compact, minimal, clean, elevated, grid, cards).
|
|
811
|
+
* Each template is a partial set of slots. Slots are merged like:
|
|
812
|
+
* `neo base` + `selected template` + `classNames overrides`.
|
|
813
|
+
*/
|
|
814
|
+
declare const DATA_TABLE_TEMPLATES: {
|
|
815
|
+
readonly neo: {
|
|
816
|
+
root: string;
|
|
817
|
+
table: string;
|
|
818
|
+
thead: string;
|
|
819
|
+
theadSticky: string;
|
|
820
|
+
trHead: string;
|
|
821
|
+
th: string;
|
|
822
|
+
tbody: string;
|
|
823
|
+
tr: string;
|
|
824
|
+
trClickable: string;
|
|
825
|
+
td: string;
|
|
826
|
+
footer: string;
|
|
827
|
+
footerInner: string;
|
|
828
|
+
metaWrap: string;
|
|
829
|
+
controlsWrap: string;
|
|
830
|
+
pageSizeLabel: string;
|
|
831
|
+
pageSizeTrigger: string;
|
|
832
|
+
pageLabel: string;
|
|
833
|
+
navButton: string;
|
|
834
|
+
};
|
|
835
|
+
readonly glass: {
|
|
836
|
+
root: string;
|
|
837
|
+
theadSticky: string;
|
|
838
|
+
tbody: string;
|
|
839
|
+
};
|
|
840
|
+
readonly compact: {
|
|
841
|
+
th: string;
|
|
842
|
+
td: string;
|
|
843
|
+
pageSizeTrigger: string;
|
|
844
|
+
};
|
|
845
|
+
readonly minimal: {
|
|
846
|
+
root: string;
|
|
847
|
+
theadSticky: string;
|
|
848
|
+
footer: string;
|
|
849
|
+
tbody: string;
|
|
850
|
+
};
|
|
851
|
+
readonly clean: {
|
|
852
|
+
root: string;
|
|
853
|
+
theadSticky: string;
|
|
854
|
+
tbody: string;
|
|
855
|
+
tr: string;
|
|
856
|
+
trClickable: string;
|
|
857
|
+
};
|
|
858
|
+
readonly elevated: {
|
|
859
|
+
root: string;
|
|
860
|
+
theadSticky: string;
|
|
861
|
+
tbody: string;
|
|
862
|
+
th: string;
|
|
863
|
+
td: string;
|
|
864
|
+
};
|
|
865
|
+
readonly grid: {
|
|
866
|
+
root: string;
|
|
867
|
+
table: string;
|
|
868
|
+
thead: string;
|
|
869
|
+
tbody: string;
|
|
870
|
+
tr: string;
|
|
871
|
+
trClickable: string;
|
|
872
|
+
};
|
|
873
|
+
readonly cards: {
|
|
874
|
+
root: string;
|
|
875
|
+
table: string;
|
|
876
|
+
theadSticky: string;
|
|
877
|
+
tr: string;
|
|
878
|
+
trClickable: string;
|
|
879
|
+
tbody: string;
|
|
880
|
+
};
|
|
881
|
+
};
|
|
882
|
+
type BuiltInTemplate = keyof typeof DATA_TABLE_TEMPLATES;
|
|
772
883
|
interface DataTableProps<TData, TValue> {
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
rowClassName?: string;
|
|
778
|
-
cellClassName?: string;
|
|
884
|
+
classNames?: DataTableSlots;
|
|
885
|
+
template?: BuiltInTemplate;
|
|
886
|
+
accent?: DataTableAccent | null;
|
|
887
|
+
accentColor?: string | null;
|
|
779
888
|
page?: number;
|
|
780
889
|
perPage?: number;
|
|
781
890
|
onPageChange?: (page: number) => void;
|
|
@@ -793,10 +902,38 @@ interface DataTableProps<TData, TValue> {
|
|
|
793
902
|
ofLabel?: string;
|
|
794
903
|
emptyData?: React__default.ReactNode;
|
|
795
904
|
animate?: boolean;
|
|
796
|
-
stickyHeader?: boolean;
|
|
797
905
|
heightClassName?: string;
|
|
906
|
+
stickyHeader?: boolean;
|
|
907
|
+
headerScroll?: boolean;
|
|
798
908
|
}
|
|
799
|
-
|
|
909
|
+
/**
|
|
910
|
+
* DataTable
|
|
911
|
+
* ----------
|
|
912
|
+
* A styled, template-driven table for TanStack Table with:
|
|
913
|
+
* - manual pagination + external page state
|
|
914
|
+
* - optional animated body transitions
|
|
915
|
+
* - optional sticky header (works because we removed wrapper div around <table>)
|
|
916
|
+
* - optional row click handler
|
|
917
|
+
* - optional accent highlight system
|
|
918
|
+
*
|
|
919
|
+
* Props:
|
|
920
|
+
* - columns, data: TanStack Table definitions and rows
|
|
921
|
+
* - page, perPage, pageCount: pagination inputs (1-based page)
|
|
922
|
+
* - onPageChange(page): called with 1-based page
|
|
923
|
+
* - onPageSizeChange(size): called when page size changes (also resets to page 1)
|
|
924
|
+
* - template: built-in template key
|
|
925
|
+
* - classNames: slot overrides (merge on top)
|
|
926
|
+
* - accent / accentColor: accent control (off by default)
|
|
927
|
+
* - stickyHeader: enables sticky header behavior (default true)
|
|
928
|
+
* - headerScroll: if true, header stickiness is disabled (use when header must scroll away)
|
|
929
|
+
* - heightClassName: sets the overall component height
|
|
930
|
+
* - animate: animates tbody on page changes
|
|
931
|
+
* - emptyData: custom empty state node
|
|
932
|
+
* - totalRows: optional meta display
|
|
933
|
+
* - isRowsSelected / rowsSelectedLabel: selection meta display
|
|
934
|
+
* - rowPerPageLabel, pageLabel, ofLabel: i18n labels
|
|
935
|
+
*/
|
|
936
|
+
declare function DataTable<TData, TValue>({ columns, data, pageCount, page, perPage, pageSizeOptions, rowPerPageLabel, ofLabel, pageLabel, isRowsSelected, totalRows, rowsSelectedLabel, template, classNames, accent, accentColor, emptyData, onPageChange, onClick, onPageSizeChange, animate, stickyHeader, headerScroll, heightClassName }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
800
937
|
|
|
801
938
|
type DataTableSkeletonProps = {
|
|
802
939
|
columnCount: number;
|
|
@@ -902,4 +1039,4 @@ declare function UiInput({ ref, label, placeholder, onChange, className, classNa
|
|
|
902
1039
|
|
|
903
1040
|
declare function cn(...inputs: ClassValue[]): string;
|
|
904
1041
|
|
|
905
|
-
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, FormSelect, Heading, HoverCard, HoverCardContent, HoverCardTrigger, Icons, ImagePreview, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, type InputVariant$1 as InputVariant, type InputVariantProps$1 as InputVariantProps, 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, type SelectOption, 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, UiInput, UiSelect, badgeVariants, buttonVariants, cn, inputVariants$2 as inputVariants, navigationMenuTriggerStyle, reducer, toast, toggleVariants, useFormField, useToast, variants };
|
|
1042
|
+
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, DATA_TABLE_TEMPLATES, DataTable, type DataTableAccent, DataTableSkeleton, type DataTableSlots, 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, FormSelect, Heading, HoverCard, HoverCardContent, HoverCardTrigger, Icons, ImagePreview, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, type InputVariant$1 as InputVariant, type InputVariantProps$1 as InputVariantProps, 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, type SelectOption, 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, UiInput, UiSelect, badgeVariants, buttonVariants, cn, inputVariants$2 as inputVariants, navigationMenuTriggerStyle, reducer, toast, toggleVariants, useFormField, useToast, variants };
|