@emoo-ai/ui-react 0.0.0-stage → 0.1.0-alpha.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/LICENSE +21 -0
- package/README.md +49 -2
- package/dist/button.d.ts +2 -0
- package/dist/components/EmptyValue.d.ts +4 -0
- package/dist/components/action-pill.d.ts +8 -0
- package/dist/components/amount-input.d.ts +22 -0
- package/dist/components/bulk-selection.d.ts +44 -0
- package/dist/components/checkbox-group.d.ts +15 -0
- package/dist/components/chips.d.ts +8 -0
- package/dist/components/choice-field.d.ts +29 -0
- package/dist/components/contacts-entities.d.ts +35 -0
- package/dist/components/date-picker.d.ts +12 -0
- package/dist/components/detail-field.d.ts +41 -0
- package/dist/components/file-intake-target.d.ts +11 -0
- package/dist/components/file-upload.d.ts +45 -0
- package/dist/components/gate-field.d.ts +12 -0
- package/dist/components/ghost-button.d.ts +12 -0
- package/dist/components/hierarchy-picker.d.ts +28 -0
- package/dist/components/history-contract.d.ts +13 -0
- package/dist/components/history-list.d.ts +36 -0
- package/dist/components/loading-overlay.d.ts +5 -0
- package/dist/components/multi-select.d.ts +17 -0
- package/dist/components/nav-menu.d.ts +27 -0
- package/dist/components/nav-segmented.d.ts +10 -0
- package/dist/components/radio-group-field.d.ts +16 -0
- package/dist/components/remote-select.d.ts +30 -0
- package/dist/components/search-box.d.ts +15 -0
- package/dist/components/segmented.d.ts +23 -0
- package/dist/components/sidebar-shell.d.ts +12 -0
- package/dist/components/spec-field.d.ts +74 -0
- package/dist/components/tags-input.d.ts +10 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/alert-dialog.d.ts +19 -0
- package/dist/components/ui/alert.d.ts +10 -0
- package/dist/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/components/ui/attachment.d.ts +24 -0
- package/dist/components/ui/avatar.d.ts +11 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/bubble.d.ts +17 -0
- package/dist/components/ui/button-group.d.ts +11 -0
- package/dist/components/ui/button.d.ts +13 -0
- package/dist/components/ui/calendar.d.ts +10 -0
- package/dist/components/ui/card.d.ts +11 -0
- package/dist/components/ui/carousel.d.ts +28 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/command.d.ts +18 -0
- package/dist/components/ui/context-menu.d.ts +32 -0
- package/dist/components/ui/dialog.d.ts +21 -0
- package/dist/components/ui/direction.d.ts +7 -0
- package/dist/components/ui/drawer.d.ts +15 -0
- package/dist/components/ui/dropdown-menu.d.ts +31 -0
- package/dist/components/ui/empty.d.ts +11 -0
- package/dist/components/ui/field.d.ts +24 -0
- package/dist/components/ui/hover-card.d.ts +8 -0
- package/dist/components/ui/input-clear-button.d.ts +1 -0
- package/dist/components/ui/input-group.d.ts +16 -0
- package/dist/components/ui/input-otp.d.ts +11 -0
- package/dist/components/ui/input.d.ts +7 -0
- package/dist/components/ui/item.d.ts +23 -0
- package/dist/components/ui/kbd.d.ts +3 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/marker.d.ts +11 -0
- package/dist/components/ui/menubar.d.ts +30 -0
- package/dist/components/ui/message-scroller.d.ts +10 -0
- package/dist/components/ui/message.d.ts +10 -0
- package/dist/components/ui/native-select.d.ts +8 -0
- package/dist/components/ui/navigation-menu.d.ts +14 -0
- package/dist/components/ui/option-pill.d.ts +11 -0
- package/dist/components/ui/pagination.d.ts +17 -0
- package/dist/components/ui/popover.d.ts +12 -0
- package/dist/components/ui/progress.d.ts +4 -0
- package/dist/components/ui/questionnaire.d.ts +19 -0
- package/dist/components/ui/radio-group.d.ts +7 -0
- package/dist/components/ui/resizable.d.ts +7 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/select-indicator.d.ts +5 -0
- package/dist/components/ui/select.d.ts +21 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/sheet.d.ts +15 -0
- package/dist/components/ui/sidebar.d.ts +70 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/table.d.ts +14 -0
- package/dist/components/ui/tabs.d.ts +11 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/toast.d.ts +4 -0
- package/dist/components/ui/toggle-group.d.ts +10 -0
- package/dist/components/ui/toggle.d.ts +9 -0
- package/dist/components/ui/tooltip.d.ts +9 -0
- package/dist/components/user-tag.d.ts +22 -0
- package/dist/components/value-diff.d.ts +5 -0
- package/dist/dialog.d.ts +1 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/index.d.ts +110 -0
- package/dist/index.js +11595 -0
- package/dist/lib/btn-base.d.ts +1 -0
- package/dist/lib/currency.d.ts +42 -0
- package/dist/lib/paged.d.ts +4 -0
- package/dist/styles.css +1 -0
- package/dist/table/ColumnDragOverlay.d.ts +6 -0
- package/dist/table/DataTable.d.ts +88 -0
- package/dist/table/InfiniteTableLoader.d.ts +12 -0
- package/dist/table/VirtualTableBody.d.ts +16 -0
- package/dist/table/column-order.d.ts +7 -0
- package/dist/table/table-preferences.d.ts +37 -0
- package/dist/table/table-scrolling.d.ts +33 -0
- package/dist/table/use-column-reordering.d.ts +34 -0
- package/dist/table/use-h-scroll-enhance.d.ts +15 -0
- package/dist/table/use-row-selection.d.ts +29 -0
- package/dist/table/use-table-preferences.d.ts +7 -0
- package/dist/table/use-table-scroll.d.ts +4 -0
- package/dist/table/use-table-sorting.d.ts +7 -0
- package/dist/theme-signal.d.ts +1 -0
- package/dist/utils.d.ts +2 -0
- package/package.json +55 -4
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type ReactNode, type Ref } from "react";
|
|
2
|
+
import { type ColumnDef, type ColumnSizingState, type OnChangeFn, type RowData, type SortingState } from "@tanstack/react-table";
|
|
3
|
+
import { type DataTableSelection } from "./use-row-selection";
|
|
4
|
+
import type { DataTableInfiniteScroll, DataTableVirtualization, DataTableScrollHandle } from "./table-scrolling";
|
|
5
|
+
export type { DataTableInfiniteScroll, DataTableVirtualization, DataTableScrollHandle, DataTableScrollPosition, } from "./table-scrolling";
|
|
6
|
+
export type { DataTableSelection } from "./use-row-selection";
|
|
7
|
+
export { useTableSorting } from "./use-table-sorting";
|
|
8
|
+
export type { TableSortingOptions } from "./use-table-sorting";
|
|
9
|
+
export { readStoredPins, readStoredSizing, readStoredVisibility, writeStoredPins, writeStoredSizing, writeStoredVisibility, } from "./table-preferences";
|
|
10
|
+
interface ServerPagination {
|
|
11
|
+
page: number;
|
|
12
|
+
pageSize: number;
|
|
13
|
+
total: number;
|
|
14
|
+
onPage: (page: number) => void;
|
|
15
|
+
}
|
|
16
|
+
declare module "@tanstack/react-table" {
|
|
17
|
+
interface ColumnMeta<TData extends RowData, TValue> {
|
|
18
|
+
className?: string;
|
|
19
|
+
headClassName?: string;
|
|
20
|
+
cellClassName?: string;
|
|
21
|
+
emptyValue?: boolean;
|
|
22
|
+
ellipsis?: boolean;
|
|
23
|
+
headerEllipsis?: boolean;
|
|
24
|
+
cellEllipsis?: boolean;
|
|
25
|
+
pinControl?: boolean;
|
|
26
|
+
menuControl?: boolean;
|
|
27
|
+
enableReordering?: boolean;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export declare function EllipsisText({ text, as }: {
|
|
31
|
+
text: string;
|
|
32
|
+
as?: "div" | "span";
|
|
33
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
interface DataTableBaseProps<TData> {
|
|
35
|
+
columns: ColumnDef<TData, unknown>[];
|
|
36
|
+
data: TData[];
|
|
37
|
+
loading?: boolean;
|
|
38
|
+
empty?: string;
|
|
39
|
+
pageSize?: number;
|
|
40
|
+
sorting?: SortingState;
|
|
41
|
+
onSortingChange?: OnChangeFn<SortingState>;
|
|
42
|
+
onRowClick?: (row: TData) => void;
|
|
43
|
+
selection?: DataTableSelection<TData>;
|
|
44
|
+
getRowId?: (row: TData, index: number) => string;
|
|
45
|
+
rowClassName?: (row: TData) => string | undefined;
|
|
46
|
+
serverPagination?: ServerPagination;
|
|
47
|
+
virtualization?: boolean | DataTableVirtualization;
|
|
48
|
+
infiniteScroll?: DataTableInfiniteScroll;
|
|
49
|
+
dataContext?: string;
|
|
50
|
+
expandedRowIds?: ReadonlySet<string>;
|
|
51
|
+
renderExpandedRow?: (row: TData) => ReactNode;
|
|
52
|
+
scrollApiRef?: Ref<DataTableScrollHandle>;
|
|
53
|
+
error?: string;
|
|
54
|
+
tableKey?: string;
|
|
55
|
+
enableColumnResizing?: boolean;
|
|
56
|
+
enableColumnPinning?: boolean;
|
|
57
|
+
enableColumnVisibility?: boolean;
|
|
58
|
+
enableColumnReordering?: boolean;
|
|
59
|
+
defaultColumnSizing?: ColumnSizingState;
|
|
60
|
+
pinnedColumns?: {
|
|
61
|
+
left?: number;
|
|
62
|
+
right?: number;
|
|
63
|
+
};
|
|
64
|
+
columnSizingKey?: string;
|
|
65
|
+
pinnedColumnsKey?: string;
|
|
66
|
+
columnVisibilityKey?: string;
|
|
67
|
+
footer?: ReactNode;
|
|
68
|
+
}
|
|
69
|
+
export type DataTableProps<TData> = DataTableBaseProps<TData> & ({
|
|
70
|
+
virtualization?: false;
|
|
71
|
+
infiniteScroll?: undefined;
|
|
72
|
+
} | {
|
|
73
|
+
virtualization: true | DataTableVirtualization;
|
|
74
|
+
infiniteScroll?: undefined;
|
|
75
|
+
getRowId: (row: TData, index: number) => string;
|
|
76
|
+
} | {
|
|
77
|
+
infiniteScroll: DataTableInfiniteScroll;
|
|
78
|
+
serverPagination?: never;
|
|
79
|
+
dataContext: string;
|
|
80
|
+
getRowId: (row: TData, index: number) => string;
|
|
81
|
+
sorting: SortingState;
|
|
82
|
+
onSortingChange: OnChangeFn<SortingState>;
|
|
83
|
+
});
|
|
84
|
+
export declare function DataTable<TData>(props: DataTableProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
85
|
+
export declare function sortParams(sorting: SortingState, defaultField: string): {
|
|
86
|
+
sort: string;
|
|
87
|
+
order: "asc" | "desc";
|
|
88
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
import type { DataTableInfiniteScroll } from "./table-scrolling";
|
|
3
|
+
interface Props {
|
|
4
|
+
options: DataTableInfiniteScroll;
|
|
5
|
+
container: RefObject<HTMLDivElement | null>;
|
|
6
|
+
count: number;
|
|
7
|
+
initialError?: string;
|
|
8
|
+
context: string;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function InfiniteTableLoader({ options, container, count: renderedCount, context, loading, initialError }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactNode, type Ref, type RefObject } from "react";
|
|
2
|
+
import type { Row } from "@tanstack/react-table";
|
|
3
|
+
import type { DataTableVirtualization, VirtualTableBodyHandle } from "./table-scrolling";
|
|
4
|
+
interface Props<TData> {
|
|
5
|
+
rows: Row<TData>[];
|
|
6
|
+
container: RefObject<HTMLDivElement | null>;
|
|
7
|
+
header: RefObject<HTMLTableSectionElement | null>;
|
|
8
|
+
options: DataTableVirtualization;
|
|
9
|
+
colCount: number;
|
|
10
|
+
expandedRowIds?: ReadonlySet<string>;
|
|
11
|
+
renderExpandedRow?: (row: TData) => ReactNode;
|
|
12
|
+
renderRow: (row: Row<TData>, index: number, props?: ComponentProps<"tr">) => ReactNode;
|
|
13
|
+
apiRef: Ref<VirtualTableBodyHandle>;
|
|
14
|
+
}
|
|
15
|
+
export declare function VirtualTableBody<TData>({ rows, container, header, options, colCount, expandedRowIds, renderExpandedRow, renderRow, apiRef, }: Props<TData>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface OrderColumn {
|
|
2
|
+
id: string;
|
|
3
|
+
parent?: string;
|
|
4
|
+
locked?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function normalizeColumnOrder(saved: readonly string[] | undefined, columns: readonly OrderColumn[], rightCount: number): string[];
|
|
7
|
+
export declare function moveColumn(order: readonly string[], columns: readonly OrderColumn[], source: string, target: string, leftCount: number, rightCount: number): string[] | undefined;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ColumnSizingState, SortingState, VisibilityState } from "@tanstack/react-table";
|
|
2
|
+
export declare function readStoredSizing(storageKey: string): ColumnSizingState;
|
|
3
|
+
export declare function writeStoredSizing(storageKey: string, sizing: ColumnSizingState, validIds: Set<string>): void;
|
|
4
|
+
export declare function readStoredPins(storageKey: string): {
|
|
5
|
+
left?: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function writeStoredPins(storageKey: string, pins: {
|
|
8
|
+
left?: number;
|
|
9
|
+
} | undefined): void;
|
|
10
|
+
export declare function readStoredVisibility(storageKey: string): VisibilityState;
|
|
11
|
+
export declare function writeStoredVisibility(storageKey: string, visibility: VisibilityState, validIds: Set<string>): void;
|
|
12
|
+
export interface TablePreferences {
|
|
13
|
+
version: 1;
|
|
14
|
+
sorting?: SortingState;
|
|
15
|
+
columnSizing?: ColumnSizingState;
|
|
16
|
+
columnOrder?: string[];
|
|
17
|
+
columnVisibility?: VisibilityState;
|
|
18
|
+
pinnedColumns?: {
|
|
19
|
+
left?: number;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface LegacyTableKeys {
|
|
23
|
+
columnSizingKey?: string;
|
|
24
|
+
columnVisibilityKey?: string;
|
|
25
|
+
pinnedColumnsKey?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function normalizeSorting(value: unknown, allowedIds?: readonly string[]): SortingState;
|
|
28
|
+
export declare function sanitizePreferences(value: unknown): TablePreferences;
|
|
29
|
+
export declare function tableStorageKey(tableKey: string): string;
|
|
30
|
+
export declare function createPreferencesStore(tableKey: string | undefined, legacy?: LegacyTableKeys): {
|
|
31
|
+
getSnapshot: () => TablePreferences;
|
|
32
|
+
hasSubscribers: () => boolean;
|
|
33
|
+
subscribe(listener: () => void): () => void;
|
|
34
|
+
start: () => void;
|
|
35
|
+
update(patch: Partial<Omit<TablePreferences, "version">>, debounce?: boolean): void;
|
|
36
|
+
reset(): void;
|
|
37
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface DataTableVirtualization {
|
|
3
|
+
estimateRowHeight?: number;
|
|
4
|
+
overscan?: number;
|
|
5
|
+
persistentRowIds?: ReadonlySet<string>;
|
|
6
|
+
}
|
|
7
|
+
export interface DataTableInfiniteScroll {
|
|
8
|
+
hasNextPage: boolean;
|
|
9
|
+
isLoadingMore: boolean;
|
|
10
|
+
onLoadMore: () => Promise<unknown>;
|
|
11
|
+
error?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
total?: number;
|
|
14
|
+
summary?: ReactNode;
|
|
15
|
+
loadedCount?: number;
|
|
16
|
+
thresholdPx?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface DataTableScrollPosition {
|
|
19
|
+
rowId?: string;
|
|
20
|
+
rowKind?: "row" | "detail";
|
|
21
|
+
rowOffset: number;
|
|
22
|
+
scrollTop: number;
|
|
23
|
+
scrollLeft: number;
|
|
24
|
+
}
|
|
25
|
+
export interface DataTableScrollHandle {
|
|
26
|
+
getPosition: () => DataTableScrollPosition;
|
|
27
|
+
restorePosition: (position: DataTableScrollPosition) => Promise<boolean>;
|
|
28
|
+
remeasure: () => void;
|
|
29
|
+
}
|
|
30
|
+
export interface VirtualTableBodyHandle {
|
|
31
|
+
scrollToRow: (rowId: string, rowKind?: DataTableScrollPosition["rowKind"]) => boolean;
|
|
32
|
+
remeasure: () => void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type PointerEvent as ReactPointerEvent, type RefObject } from "react";
|
|
2
|
+
interface ReorderOptions {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
scope: string;
|
|
5
|
+
container: RefObject<HTMLDivElement | null>;
|
|
6
|
+
headers: RefObject<Map<string, HTMLTableCellElement>>;
|
|
7
|
+
canMove: (source: string, target: string) => boolean;
|
|
8
|
+
move: (source: string, target: string) => void;
|
|
9
|
+
indexOf: (id: string) => number;
|
|
10
|
+
columnBounds: (id: string) => {
|
|
11
|
+
left: number;
|
|
12
|
+
right: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface ColumnDragState {
|
|
16
|
+
source: string;
|
|
17
|
+
target?: string;
|
|
18
|
+
after: boolean;
|
|
19
|
+
blocked: boolean;
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
preview?: {
|
|
23
|
+
left: number;
|
|
24
|
+
top: number;
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
edge: number;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export declare function useColumnReordering(options: ReorderOptions): {
|
|
31
|
+
drag: ColumnDragState | undefined;
|
|
32
|
+
start: (source: string, event: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
export declare function useHScrollEnhance(ref: RefObject<HTMLElement | null>, options?: {
|
|
3
|
+
blockForwardAtEnd?: boolean;
|
|
4
|
+
}): {
|
|
5
|
+
canLeft: boolean;
|
|
6
|
+
canRight: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function HScrollArrows({ scrollRef, canLeft, canRight, revealClass, label, className, }: {
|
|
9
|
+
scrollRef: RefObject<HTMLElement | null>;
|
|
10
|
+
canLeft: boolean;
|
|
11
|
+
canRight: boolean;
|
|
12
|
+
revealClass: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type MouseEvent as ReactMouseEvent, type PointerEvent as ReactPointerEvent, type RefObject } from "react";
|
|
2
|
+
import type { Row } from "@tanstack/react-table";
|
|
3
|
+
export interface DataTableSelection<TData> {
|
|
4
|
+
columnId: string;
|
|
5
|
+
isSelected: (row: TData) => boolean;
|
|
6
|
+
onChange: (rows: TData[], selected: boolean) => void;
|
|
7
|
+
isRowSelectable?: (row: TData) => boolean;
|
|
8
|
+
context?: string;
|
|
9
|
+
}
|
|
10
|
+
interface SelectionOptions<TData> {
|
|
11
|
+
selection?: DataTableSelection<TData>;
|
|
12
|
+
rows: Row<TData>[];
|
|
13
|
+
scope: string;
|
|
14
|
+
container: RefObject<HTMLDivElement | null>;
|
|
15
|
+
}
|
|
16
|
+
export declare function useRowSelection<TData>(options: SelectionOptions<TData>): {
|
|
17
|
+
headerProps: {
|
|
18
|
+
checked: boolean | "indeterminate";
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
onCheckedChange: (checked: boolean | "indeterminate") => void;
|
|
21
|
+
};
|
|
22
|
+
checkboxProps: (row: Row<TData>) => {
|
|
23
|
+
checked: boolean;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
onClick: (event: ReactMouseEvent<HTMLButtonElement>) => void;
|
|
26
|
+
onPointerDown: (event: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type LegacyTableKeys } from "./table-preferences";
|
|
2
|
+
export declare function useTablePreferences(tableKey: string | undefined, legacy: LegacyTableKeys): {
|
|
3
|
+
preferences: import("./table-preferences").TablePreferences;
|
|
4
|
+
update: (patch: Partial<Omit<import("./table-preferences").TablePreferences, "version">>, debounce?: boolean) => void;
|
|
5
|
+
reset: () => void;
|
|
6
|
+
getCurrent: () => import("./table-preferences").TablePreferences;
|
|
7
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type Ref, type RefObject } from "react";
|
|
2
|
+
import type { Row } from "@tanstack/react-table";
|
|
3
|
+
import type { DataTableScrollHandle, VirtualTableBodyHandle } from "./table-scrolling";
|
|
4
|
+
export declare function useTableScroll<TData>(apiRef: Ref<DataTableScrollHandle> | undefined, container: RefObject<HTMLDivElement | null>, virtualBody: RefObject<VirtualTableBodyHandle | null>, rows: Row<TData>[], context: string, resetOnContextChange: boolean): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { OnChangeFn, SortingState } from "@tanstack/react-table";
|
|
2
|
+
import { type LegacyTableKeys } from "./table-preferences";
|
|
3
|
+
export interface TableSortingOptions extends LegacyTableKeys {
|
|
4
|
+
defaultSorting?: SortingState;
|
|
5
|
+
allowedIds?: readonly string[];
|
|
6
|
+
}
|
|
7
|
+
export declare function useTableSorting(tableKey: string | undefined, { defaultSorting, allowedIds, ...legacy }?: TableSortingOptions): [SortingState, OnChangeFn<SortingState>];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useThemeSignal(): "dark" | "light";
|
package/dist/utils.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,57 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emoo-ai/ui-react",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0-alpha.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"registry": "https://registry.npmjs.org/",
|
|
7
|
+
"@emoo-ai:registry": "https://registry.npmjs.org/"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"sideEffects": [
|
|
14
|
+
"**/*.css"
|
|
15
|
+
],
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"import": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./styles.css": "./dist/styles.css"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "vite build && tsc -p tsconfig.build.json",
|
|
25
|
+
"typecheck": "tsc -p tsconfig.build.json --noEmit --emitDeclarationOnly false"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"react": "^19.2.8",
|
|
29
|
+
"react-dom": "^19.2.8"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@emoo-ai/brand": "0.1.0-alpha.1",
|
|
33
|
+
"@phosphor-icons/react": "2.1.10",
|
|
34
|
+
"@shadcn/react": "0.3.0",
|
|
35
|
+
"@tanstack/react-table": "^8.21.3",
|
|
36
|
+
"@tanstack/react-virtual": "3.14.13",
|
|
37
|
+
"class-variance-authority": "0.7.1",
|
|
38
|
+
"clsx": "2.1.1",
|
|
39
|
+
"cmdk": "1.1.1",
|
|
40
|
+
"date-fns": "^4.1.0",
|
|
41
|
+
"docx-preview": "0.4.0",
|
|
42
|
+
"embla-carousel-react": "8.6.0",
|
|
43
|
+
"input-otp": "1.5.0",
|
|
44
|
+
"radix-ui": "1.6.7",
|
|
45
|
+
"react-day-picker": "10.0.1",
|
|
46
|
+
"react-resizable-panels": "4.12.3",
|
|
47
|
+
"sonner": "2.0.8",
|
|
48
|
+
"tailwind-merge": "3.6.0",
|
|
49
|
+
"vaul": "1.1.2",
|
|
50
|
+
"xlsx": "0.18.5"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@tailwindcss/vite": "4.3.3",
|
|
54
|
+
"tailwindcss": "4.3.3",
|
|
55
|
+
"tw-animate-css": "1.4.0"
|
|
56
|
+
}
|
|
57
|
+
}
|