@tetrascience-npm/tetrascience-react-ui 0.5.0-beta.28.1 → 0.5.0-beta.30.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/components/ui/alert.cjs +1 -1
- package/dist/components/ui/alert.cjs.map +1 -1
- package/dist/components/ui/alert.js +23 -20
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/badge.cjs +1 -1
- package/dist/components/ui/badge.cjs.map +1 -1
- package/dist/components/ui/badge.js +10 -10
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/data-table/data-table-column-toggle.cjs +2 -0
- package/dist/components/ui/data-table/data-table-column-toggle.cjs.map +1 -0
- package/dist/components/ui/data-table/data-table-column-toggle.js +142 -0
- package/dist/components/ui/data-table/data-table-column-toggle.js.map +1 -0
- package/dist/components/ui/data-table/data-table-pagination.cjs +2 -0
- package/dist/components/ui/data-table/data-table-pagination.cjs.map +1 -0
- package/dist/components/ui/data-table/data-table-pagination.js +88 -0
- package/dist/components/ui/data-table/data-table-pagination.js.map +1 -0
- package/dist/components/ui/data-table/data-table.cjs +2 -0
- package/dist/components/ui/data-table/data-table.cjs.map +1 -0
- package/dist/components/ui/data-table/data-table.js +293 -0
- package/dist/components/ui/data-table/data-table.js.map +1 -0
- package/dist/components/ui/dialog.cjs +1 -1
- package/dist/components/ui/dialog.cjs.map +1 -1
- package/dist/components/ui/dialog.js +62 -51
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/table.cjs +1 -1
- package/dist/components/ui/table.cjs.map +1 -1
- package/dist/components/ui/table.js +68 -36
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.cjs +1 -1
- package/dist/components/ui/tabs.cjs.map +1 -1
- package/dist/components/ui/tabs.js +28 -27
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +73 -5
- package/dist/index.js +338 -329
- package/dist/index.js.map +1 -1
- package/dist/index.tailwind.css +1 -1
- package/package.json +6 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ import { Avatar as Avatar_2 } from 'radix-ui';
|
|
|
5
5
|
import { Checkbox as Checkbox_2 } from 'radix-ui';
|
|
6
6
|
import { ClassProp } from 'class-variance-authority/types';
|
|
7
7
|
import { Collapsible as Collapsible_2 } from 'radix-ui';
|
|
8
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
9
|
+
import { ColumnOrderState } from '@tanstack/react-table';
|
|
8
10
|
import { Combobox as Combobox_2 } from '@base-ui/react';
|
|
9
11
|
import { Command as Command_2 } from 'cmdk';
|
|
10
12
|
import { ContextMenu as ContextMenu_2 } from 'radix-ui';
|
|
@@ -24,6 +26,7 @@ import { Menubar as Menubar_2 } from 'radix-ui';
|
|
|
24
26
|
import { NavigationMenu as NavigationMenu_2 } from 'radix-ui';
|
|
25
27
|
import { OnChange } from '@monaco-editor/react';
|
|
26
28
|
import { OTPInput } from 'input-otp';
|
|
29
|
+
import { PaginationState } from '@tanstack/react-table';
|
|
27
30
|
import { RadioGroup as RadioGroup_2 } from 'radix-ui';
|
|
28
31
|
import * as React_2 from 'react';
|
|
29
32
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
@@ -33,6 +36,7 @@ import { Select as Select_2 } from 'radix-ui';
|
|
|
33
36
|
import { Separator as Separator_2 } from 'radix-ui';
|
|
34
37
|
import { Slider as Slider_2 } from 'radix-ui';
|
|
35
38
|
import { Switch as Switch_2 } from 'radix-ui';
|
|
39
|
+
import { Table as Table_2 } from '@tanstack/react-table';
|
|
36
40
|
import { Tabs as Tabs_2 } from 'radix-ui';
|
|
37
41
|
import { ToasterProps } from 'sonner';
|
|
38
42
|
import { Toggle as Toggle_2 } from 'radix-ui';
|
|
@@ -40,6 +44,7 @@ import { ToggleGroup as ToggleGroup_2 } from 'radix-ui';
|
|
|
40
44
|
import { Tooltip as Tooltip_2 } from 'radix-ui';
|
|
41
45
|
import { UseEmblaCarouselType } from 'embla-carousel-react';
|
|
42
46
|
import { VariantProps } from 'class-variance-authority';
|
|
47
|
+
import { VisibilityState } from '@tanstack/react-table';
|
|
43
48
|
|
|
44
49
|
export declare function Accordion({ className, ...props }: React_2.ComponentProps<typeof Accordion_2.Root>): JSX.Element;
|
|
45
50
|
|
|
@@ -84,7 +89,7 @@ export declare function AlertDialogTrigger({ ...props }: React_2.ComponentProps<
|
|
|
84
89
|
export declare function AlertTitle({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
|
|
85
90
|
|
|
86
91
|
declare const alertVariants: (props?: ({
|
|
87
|
-
variant?: "default" | "destructive" | null | undefined;
|
|
92
|
+
variant?: "default" | "destructive" | "info" | "positive" | "warning" | null | undefined;
|
|
88
93
|
} & ClassProp) | undefined) => string;
|
|
89
94
|
|
|
90
95
|
export declare const AppHeader: default_2.FC<AppHeaderProps>;
|
|
@@ -642,8 +647,52 @@ export declare function ContextMenuSubTrigger({ className, inset, children, ...p
|
|
|
642
647
|
|
|
643
648
|
export declare function ContextMenuTrigger({ className, ...props }: React_2.ComponentProps<typeof ContextMenu_2.Trigger>): JSX.Element;
|
|
644
649
|
|
|
650
|
+
export declare function DataTable<TData, TValue>({ columns, data, toolbar, enableSorting, enableColumnVisibility, children, columnOrder: controlledColumnOrder, onColumnOrderChange, columnVisibility: controlledColumnVisibility, onColumnVisibilityChange, columnLabels: controlledColumnLabels, onColumnLabelChange, enablePagination, defaultPageSize, pagination: controlledPagination, onPaginationChange, enableColumnReorder, density, className, variant, containerClassName, }: DataTableProps<TData, TValue>): JSX.Element;
|
|
651
|
+
|
|
652
|
+
export declare function DataTableColumnToggle({ className }: DataTableColumnToggleProps): JSX.Element | null;
|
|
653
|
+
|
|
654
|
+
export declare interface DataTableColumnToggleProps {
|
|
655
|
+
className?: string;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
export declare function DataTablePagination({ pageSizeOptions, className, }: DataTablePaginationProps): JSX.Element | null;
|
|
659
|
+
|
|
660
|
+
export declare interface DataTablePaginationProps {
|
|
661
|
+
pageSizeOptions?: number[];
|
|
662
|
+
className?: string;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export declare interface DataTableProps<TData, TValue> {
|
|
666
|
+
columns: ColumnDef<TData, TValue>[];
|
|
667
|
+
data: TData[];
|
|
668
|
+
/** @deprecated Use `<TableToolbar>` as a child instead */
|
|
669
|
+
toolbar?: React_2.ReactNode;
|
|
670
|
+
enableSorting?: boolean;
|
|
671
|
+
enableColumnVisibility?: boolean;
|
|
672
|
+
columnOrder?: ColumnOrderState;
|
|
673
|
+
onColumnOrderChange?: (order: ColumnOrderState) => void;
|
|
674
|
+
columnVisibility?: VisibilityState;
|
|
675
|
+
onColumnVisibilityChange?: (vis: VisibilityState) => void;
|
|
676
|
+
columnLabels?: Record<string, string>;
|
|
677
|
+
onColumnLabelChange?: (columnId: string, label: string) => void;
|
|
678
|
+
enablePagination?: boolean;
|
|
679
|
+
defaultPageSize?: number;
|
|
680
|
+
pagination?: PaginationState;
|
|
681
|
+
onPaginationChange?: (pagination: PaginationState) => void;
|
|
682
|
+
enableColumnReorder?: boolean;
|
|
683
|
+
density?: "compact" | "default" | "relaxed";
|
|
684
|
+
children?: React_2.ReactNode;
|
|
685
|
+
className?: string;
|
|
686
|
+
/** Variant passed to the base Table component */
|
|
687
|
+
variant?: React_2.ComponentProps<typeof Table>["variant"];
|
|
688
|
+
/** className passed to the base Table's container div */
|
|
689
|
+
containerClassName?: React_2.ComponentProps<typeof Table>["containerClassName"];
|
|
690
|
+
}
|
|
691
|
+
|
|
645
692
|
export declare function Dialog({ ...props }: React_2.ComponentProps<typeof Dialog_2.Root>): JSX.Element;
|
|
646
693
|
|
|
694
|
+
export declare function DialogBody({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
|
|
695
|
+
|
|
647
696
|
export declare function DialogClose({ ...props }: React_2.ComponentProps<typeof Dialog_2.Close>): JSX.Element;
|
|
648
697
|
|
|
649
698
|
export declare function DialogContent({ className, children, showCloseButton, ...props }: React_2.ComponentProps<typeof Dialog_2.Content> & {
|
|
@@ -1658,22 +1707,39 @@ export declare function Switch({ className, size, ...props }: React_2.ComponentP
|
|
|
1658
1707
|
size?: "sm" | "default";
|
|
1659
1708
|
}): JSX.Element;
|
|
1660
1709
|
|
|
1661
|
-
export declare function Table({ className, ...props }: React_2.ComponentProps<"table">
|
|
1710
|
+
export declare function Table({ className, containerClassName, variant, ...props }: React_2.ComponentProps<"table"> & {
|
|
1711
|
+
containerClassName?: string;
|
|
1712
|
+
variant?: "default" | "card";
|
|
1713
|
+
}): JSX.Element;
|
|
1662
1714
|
|
|
1663
1715
|
export declare function TableBody({ className, ...props }: React_2.ComponentProps<"tbody">): JSX.Element;
|
|
1664
1716
|
|
|
1665
1717
|
export declare function TableCaption({ className, ...props }: React_2.ComponentProps<"caption">): JSX.Element;
|
|
1666
1718
|
|
|
1667
|
-
export declare function TableCell({ className, ...props }: React_2.ComponentProps<"td">
|
|
1719
|
+
export declare function TableCell({ className, variant, ...props }: React_2.ComponentProps<"td"> & {
|
|
1720
|
+
variant?: "default" | "numeric" | "action";
|
|
1721
|
+
}): JSX.Element;
|
|
1722
|
+
|
|
1723
|
+
declare interface TableContextValue<TData> {
|
|
1724
|
+
table: Table_2<TData>;
|
|
1725
|
+
columnLabels: Record<string, string>;
|
|
1726
|
+
setColumnLabel: (columnId: string, label: string) => void;
|
|
1727
|
+
}
|
|
1668
1728
|
|
|
1669
1729
|
export declare function TableFooter({ className, ...props }: React_2.ComponentProps<"tfoot">): JSX.Element;
|
|
1670
1730
|
|
|
1671
|
-
export declare function TableHead({ className, ...props }: React_2.ComponentProps<"th">
|
|
1731
|
+
export declare function TableHead({ className, variant, ...props }: React_2.ComponentProps<"th"> & {
|
|
1732
|
+
variant?: "default" | "numeric" | "action";
|
|
1733
|
+
}): JSX.Element;
|
|
1672
1734
|
|
|
1673
|
-
export declare function TableHeader({ className, ...props }: React_2.ComponentProps<"thead">
|
|
1735
|
+
export declare function TableHeader({ className, variant, ...props }: React_2.ComponentProps<"thead"> & {
|
|
1736
|
+
variant?: "default" | "sticky";
|
|
1737
|
+
}): JSX.Element;
|
|
1674
1738
|
|
|
1675
1739
|
export declare function TableRow({ className, ...props }: React_2.ComponentProps<"tr">): JSX.Element;
|
|
1676
1740
|
|
|
1741
|
+
export declare function TableToolbar({ className, children, ...props }: React_2.ComponentProps<"div">): JSX.Element;
|
|
1742
|
+
|
|
1677
1743
|
export declare function Tabs({ className, orientation, ...props }: React_2.ComponentProps<typeof Tabs_2.Root>): JSX.Element;
|
|
1678
1744
|
|
|
1679
1745
|
export declare function TabsContent({ className, ...props }: React_2.ComponentProps<typeof Tabs_2.Content>): JSX.Element;
|
|
@@ -1910,6 +1976,8 @@ declare type UseCarouselParameters = Parameters<typeof default_3>;
|
|
|
1910
1976
|
|
|
1911
1977
|
export declare function useComboboxAnchor(): React_2.RefObject<HTMLDivElement | null>;
|
|
1912
1978
|
|
|
1979
|
+
export declare function useDataTable<TData = unknown>(): TableContextValue<TData>;
|
|
1980
|
+
|
|
1913
1981
|
declare interface UserProfileInfo {
|
|
1914
1982
|
name: string;
|
|
1915
1983
|
avatar?: string;
|