import * as React from 'react' export interface TableProps { /** * Should be ``, ``, and `` components */ children?: React.ReactNode className?: string dataTest?: string role?: string /** * Remove the default striping on alternating rows */ suppressZebraStriping?: boolean } export const Table: React.FC export interface TableBodyProps { /** * Should be `` components */ children?: React.ReactNode className?: string dataTest?: string role?: string } export const TableBody: React.FC export interface TableCellProps { children?: React.ReactNode className?: string colSpan?: string dataTest?: string /** * Uses less padding and height for information-dense layouts */ dense?: boolean role?: string rowSpan?: string } export const TableCell: React.FC export interface TableFootProps { /** * Should be `` components */ children?: React.ReactNode className?: string dataTest?: string role?: string } export const TableFoot: React.FC export interface TableHeadProps { /** * Should be `` components */ children?: React.ReactNode className?: string dataTest?: string role?: string } export const TableHead: React.FC export interface TableCellHeadProps { children?: React.ReactNode className?: string colSpan?: string dataTest?: string /** * Uses less padding and height for information-dense layouts */ dense?: boolean role?: string rowSpan?: string } export const TableCellHead: React.FC export interface TableRowProps { /** * Should be `` or `` components */ children?: React.ReactNode className?: string dataTest?: string role?: string /** * Disables the default row striping for this row */ suppressZebraStriping?: boolean } export const TableRow: React.FC export interface TableRowHeadProps { /** * Should be `` components */ children?: React.ReactNode className?: string dataTest?: string role?: string /** * Disables the default row striping for this row */ suppressZebraStriping?: boolean } export const TableRowHead: React.FC /** STACKEDTABLE */ export interface StackedTableBodyProps { children?: React.ReactNode className?: string dataTest?: string } export const StackedTableBody: React.FC export interface StackedTableCellHeadProps { children?: string className?: string colSpan?: string dataTest?: string rowSpan?: string } export const StackedTableCellHead: React.FC export interface StackedTableCellProps { children?: React.ReactNode className?: string colSpan?: string column?: number dataTest?: string headerLabels?: string[] hideTitle?: boolean rowSpan?: string title?: string } export const StackedTableCell: React.FC export interface StackedTableFootProps { children?: React.ReactNode className?: string dataTest?: string } export const StackedTableFoot: React.FC export interface StackedTableHeadProps { children?: React.ReactNode className?: string dataTest?: string } export const StackedTableHead: React.FC export interface StackedTableRowHeadProps { children?: React.ReactNode className?: string dataTest?: string } export const StackedTableRowHead: React.FC export interface StackedTableRowProps { children?: React.ReactNode className?: string dataTest?: string } export const StackedTableRow: React.FC export interface StackedTableProps { children?: React.ReactNode className?: string dataTest?: string /** * Labels for columns. Use an empty string for a column without a header. */ headerLabels?: string[] } export const StackedTable: React.FC /** DATATABLE */ export type DataTableLayout = 'auto' | 'fixed' | 'initial' | 'inherit' export interface DataTableProps { /** * Should be ``, ``, and `` components */ children?: React.ReactNode className?: string dataTest?: string /** * Sets the `datatable-layout` property. Switching to `fixed` can prevent style * issues when dealing with a datatable with multiple frozen columns or when dealing * with filter elements in the datatable headers. */ layout?: DataTableLayout role?: string /** * Sets max-height of scrollbox */ scrollHeight?: string /** * Sets max-width of scrollbox */ scrollWidth?: string /** * Sets the `width` property. Providing an explicit width can prevent style * issues when dealing with horizontally scrolling datatables with a fixed layout. */ width?: string } export const DataTable: React.ForwardRefExoticComponent export interface DataTableBodyProps { children?: React.ReactNode className?: string dataTest?: string loading?: boolean role?: string } export const DataTableBody: React.ForwardRefExoticComponent type TdProps = React.ComponentPropsWithoutRef<'td'> type ThProps = React.ComponentPropsWithoutRef<'th'> type DataTableCellForwardProps = Omit< TdProps | ThProps, keyof DataTableCellProps > export type DataTableCellProps = { /** * To toggle border color, for example for editing */ active?: boolean align?: 'left' | 'center' | 'right' /** * Sets background color of the cell. Disables dynamic background colors from active, hover, and selected states */ backgroundColor?: string bordered?: boolean children?: React.ReactNode className?: string colSpan?: string dataTest?: string /** * Mutually exclusive with muted and valid */ error?: boolean /** * When true a TableHeaderCell with sticky positioning will be rendered */ fixed?: boolean large?: boolean /** * Required when fixed */ left?: boolean /** * Mutually exclusive with error and valid */ muted?: boolean role?: string rowSpan?: string scope?: string /** * Surpress hover and active event styles */ staticStyle?: boolean /** * Render a TableDataCell or TableHeaderCell respectively */ tag?: 'td' | 'th' /** * Mutually exclusive with error and muted */ valid?: boolean /** * Required when fixed */ width?: string onClick?: React.MouseEventHandler } export const DataTableCell: React.ForwardRefExoticComponent< DataTableCellProps & DataTableCellForwardProps > export type DataTableSortDirection = 'asc' | 'desc' | 'default' export interface DataTableColumnHeaderProps { align?: 'left' | 'center' | 'right' children?: React.ReactNode className?: string colSpan?: string dataTest?: string /** * The filter element (JSX), required when onFilterIconClick or showFilter are present */ filter?: boolean fixed?: boolean large?: boolean /** * Left or top required when fixed */ left?: string /** * Can be used to match a column with a property name */ name?: string role?: string rowSpan?: string scope?: string showFilter?: boolean sortDirection?: DataTableSortDirection sortIconTitle?: string /** * Left or top required when fixed */ top?: string width?: string onFilterIconClick?: ( payload: { name?: string; active: boolean }, event: React.MouseEvent ) => void /** * Sort icon click callback with `nextSortDirection` and `name` in payload */ onSortIconClick?: ( payload: { name?: string; direction: DataTableSortDirection }, event: React.MouseEvent ) => void } export const DataTableColumnHeader: React.ForwardRefExoticComponent export const DataTableFoot: React.ForwardRefExoticComponent export const DataTableHead: React.ForwardRefExoticComponent export interface DataTableRowProps { /** * Should be `` or `` components */ children?: React.ReactNode className?: string dataTest?: string /** * Renders and additional table cell with drag icon and applies draggable styles */ draggable?: boolean /** * This content will be rendered into an additional row with fullwidth cell and the presence of this prop will display an additional table cell with expand icon */ expandableContent?: React.ReactNode /** * Toggles expand icon (up/down) and expandable content visibility */ expanded?: boolean role?: string /** * Adds a green background color */ selected?: boolean /** * Callback for expand icon cell clicks */ onExpandToggle?: (payload: { expanded: boolean }) => void } export const DataTableRow: React.ForwardRefExoticComponent export interface DataTableToolbarProps { children?: React.ReactNode className?: string dataTest?: string position?: 'top' | 'bottom' } export const DataTableToolbar: React.ForwardRefExoticComponent