import { ComponentProps, ReactNode } from 'react'; import { Input } from '@lattice-php/form/primitives/input'; import { ContentAlign, Side } from '@lattice-php/ui'; import { SortDirection } from '../generated.js'; export type DataTablePinBoundary = Side; export type DataTableTrack = "column" | "expander" | "selection" | "actions" | "filler"; export declare const DATA_TABLE_EXPANDER_TRACK = "2.5rem"; export declare const DATA_TABLE_SELECTION_TRACK = "3rem"; export declare const DATA_TABLE_ACTIONS_TRACK = "10rem"; /** * Utility tracks are fixed widths because the independent header, filter, and * body grids would drift apart with content-sized tracks. */ export declare function dataTableUtilityTracks({ actions, expander, selection, }: { actions?: boolean; expander?: boolean; selection?: boolean; }): { leadingTracks: string[]; trailingTracks: string[]; }; export declare function pinBoundaryClassName(boundary: DataTablePinBoundary | undefined): string | undefined; type PinProps = { pinBoundary?: DataTablePinBoundary; pinIndex?: number; pinned?: Side; }; export type DataTableProps = ComponentProps<"div">; export declare function DataTable({ children, className, ...props }: DataTableProps): ReactNode; export type DataTableToolbarProps = Omit, "children"> & { end?: ReactNode; start?: ReactNode; }; export declare function DataTableToolbar({ className, end, start, ...props }: DataTableToolbarProps): ReactNode; export type DataTableSearchProps = Omit, "onChange" | "value"> & { clearButtonProps?: Omit, "children" | "onClick"> & { "data-test"?: string; }; clearLabel: string; onClear: () => void; onValueChange: (value: string) => void; value: string; }; export declare function DataTableSearch({ className, clearButtonProps, clearLabel, onClear, onValueChange, placeholder, value, ...props }: DataTableSearchProps): ReactNode; export type DataTableFilterBarProps = ComponentProps<"div">; export declare function DataTableFilterBar({ children, className, ...props }: DataTableFilterBarProps): ReactNode; export type DataTableFilterChipProps = ComponentProps<"span">; export declare function DataTableFilterChip({ className, ...props }: DataTableFilterChipProps): ReactNode; export type DataTableSortBarProps = ComponentProps<"div">; export declare function DataTableSortBar({ className, ...props }: DataTableSortBarProps): ReactNode; export type DataTableBulkBarProps = ComponentProps<"div"> & { action?: ReactNode; summary: ReactNode; }; export declare function DataTableBulkBar({ action, children, className, summary, ...props }: DataTableBulkBarProps): ReactNode; export type DataTableGridProps = ComponentProps<"div"> & { columns: string; pinned?: boolean; }; export declare function DataTableGrid({ children, className, columns, pinned, style, ...props }: DataTableGridProps): ReactNode; export type DataTableHeaderProps = ComponentProps<"div">; export declare function DataTableHeader(props: DataTableHeaderProps): ReactNode; export type DataTableHeaderRowProps = ComponentProps<"div">; export declare function DataTableHeaderRow({ className, ...props }: DataTableHeaderRowProps): ReactNode; export type DataTableHeaderCellProps = ComponentProps<"div"> & PinProps & { align?: ContentAlign; bottomBordered?: boolean; kind?: DataTableTrack; sortDirection?: SortDirection | null; }; export declare function DataTableHeaderCell({ align, bottomBordered, className, kind, pinBoundary, pinIndex, pinned, sortDirection, style, ...props }: DataTableHeaderCellProps): ReactNode; export type DataTableSortButtonProps = ComponentProps<"button"> & { align?: ContentAlign; direction?: SortDirection | null; }; export declare function DataTableSortButton({ align, children, className, direction, ...props }: DataTableSortButtonProps): ReactNode; export type DataTableHeaderLabelProps = ComponentProps<"span"> & { align?: ContentAlign; }; export declare function DataTableHeaderLabel({ align, className, ...props }: DataTableHeaderLabelProps): ReactNode; export type DataTableFilterCellProps = ComponentProps<"div"> & PinProps & { kind?: DataTableTrack; }; export declare function DataTableFilterCell({ className, kind, pinBoundary, pinIndex, pinned, style, ...props }: DataTableFilterCellProps): ReactNode; export type DataTableBodyProps = ComponentProps<"div">; export declare function DataTableBody(props: DataTableBodyProps): ReactNode; export type DataTableRowProps = ComponentProps<"div"> & { clickable?: boolean; striped?: boolean; }; export declare function DataTableRow({ children, className, clickable, striped, ...props }: DataTableRowProps): ReactNode; export type DataTableCellProps = ComponentProps<"div"> & PinProps & { align?: ContentAlign; kind?: DataTableTrack; label?: ReactNode; }; export declare function DataTableCell({ align, children, className, kind, label, pinBoundary, pinIndex, pinned, style, ...props }: DataTableCellProps): ReactNode; export type DataTableRowToggleProps = Omit, "children"> & { expanded: boolean; }; export declare function DataTableRowToggle({ className, expanded, ...props }: DataTableRowToggleProps): ReactNode; export type DataTableRowDetailProps = ComponentProps<"div">; export declare function DataTableRowDetail({ className, ...props }: DataTableRowDetailProps): ReactNode; export type DataTableStatusRowProps = ComponentProps<"div">; export declare function DataTableEmpty({ children, className, ...props }: DataTableStatusRowProps): ReactNode; export declare function DataTableLoading({ children, className, ...props }: DataTableStatusRowProps): ReactNode; export type DataTableFooterProps = ComponentProps<"div">; export declare function DataTableFooter({ className, ...props }: DataTableFooterProps): ReactNode; export type DataTablePaginationLabels = { next: string; page: (page: number) => string; previous: string; }; export type DataTablePaginationProps = { disabled?: boolean; hasNextPage: boolean; labels: DataTablePaginationLabels; onPageChange: (page: number) => void; page: number; pages?: number[]; }; export declare function DataTablePagination({ disabled, hasNextPage, labels, onPageChange, page, pages, }: DataTablePaginationProps): ReactNode; export {};