| 1 |
/// <reference types="react" /> |
| 2 |
import { IVisibility } from './utils/decorators/classNames'; |
| 3 |
import { OUIAProps } from '@patternfly/react-core/dist/esm/helpers/OUIA/ouia'; |
| 4 |
import { TableVariant } from './TableTypes'; |
| 5 |
export interface BaseCellProps { |
| 6 |
/** Content rendered inside the cell */ |
| 7 |
children?: React.ReactNode; |
| 8 |
/** Additional classes added to the cell */ |
| 9 |
className?: string; |
| 10 |
/** Element to render */ |
| 11 |
component?: React.ReactNode; |
| 12 |
/** Modifies cell to center its contents. */ |
| 13 |
textCenter?: boolean; |
| 14 |
/** Style modifier to apply */ |
| 15 |
modifier?: 'breakWord' | 'fitContent' | 'nowrap' | 'truncate' | 'wrap'; |
| 16 |
/** Width percentage modifier */ |
| 17 |
width?: 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 60 | 70 | 80 | 90 | 100; |
| 18 |
/** Visibility breakpoint modifiers */ |
| 19 |
visibility?: (keyof IVisibility)[]; |
| 20 |
/** @hide Forwarded ref */ |
| 21 |
innerRef?: React.Ref<any>; |
| 22 |
} |
| 23 |
export interface TableProps extends React.HTMLProps<HTMLTableElement>, OUIAProps { |
| 24 |
/** Adds an accessible name for the Table */ |
| 25 |
'aria-label'?: string; |
| 26 |
/** Content rendered inside the Table */ |
| 27 |
children?: React.ReactNode; |
| 28 |
/** Additional classes added to the Table */ |
| 29 |
className?: string; |
| 30 |
/** |
| 31 |
* Style variant for the Table |
| 32 |
* compact: Reduces spacing and makes the table more compact |
| 33 |
*/ |
| 34 |
variant?: TableVariant | 'compact'; |
| 35 |
/** Render borders */ |
| 36 |
borders?: boolean; |
| 37 |
/** Specifies the grid breakpoints */ |
| 38 |
gridBreakPoint?: '' | 'grid' | 'grid-md' | 'grid-lg' | 'grid-xl' | 'grid-2xl'; |
| 39 |
/** A valid WAI-ARIA role to be applied to the table element */ |
| 40 |
role?: string; |
| 41 |
/** @beta Flag indicating if the table should have plain styling with a transparent background */ |
| 42 |
isPlain?: boolean; |
| 43 |
/** @beta Flag indicating if the table should not have plain styling when in the glass theme */ |
| 44 |
isNoPlainOnGlass?: boolean; |
| 45 |
/** If set to true, the table header sticks to the top of its container. This property applies both the sticky position and styling. */ |
| 46 |
isStickyHeader?: boolean; |
| 47 |
/** @beta Flag indicating the table header should have sticky positioning to the top of the parent InnerScrollContainer. */ |
| 48 |
isStickyHeaderBase?: boolean; |
| 49 |
/** @beta Flag indicating the table header should have stuck styling, when the header is not at the top of the scroll container. */ |
| 50 |
isStickyHeaderStuck?: boolean; |
| 51 |
/** @hide Forwarded ref */ |
| 52 |
innerRef?: React.RefObject<any>; |
| 53 |
/** Flag indicating table is a tree table */ |
| 54 |
isTreeTable?: boolean; |
| 55 |
/** Flag indicating this table is nested within another table */ |
| 56 |
isNested?: boolean; |
| 57 |
/** Flag indicating this table should be striped. This property works best for a single <tbody> table. Striping may also be done manually by applying this property to Tbody and Tr components. */ |
| 58 |
isStriped?: boolean; |
| 59 |
/** Flag indicating this table contains expandable rows. */ |
| 60 |
isExpandable?: boolean; |
| 61 |
/** @beta Flag indicating whether expandable rows within the table have animations. Expandable rows cannot be dynamically rendered. This prop |
| 62 |
* will be removed in the next breaking change, with the default behavior becoming animations always being enabled. |
| 63 |
*/ |
| 64 |
hasAnimations?: boolean; |
| 65 |
/** Flag indicating this table's rows will not have the inset typically reserved for expanding/collapsing rows in a tree table. Intended for use on tree tables with no visible rows with children. */ |
| 66 |
hasNoInset?: boolean; |
| 67 |
/** Collection of column spans for nested headers. Deprecated: see https://github.com/patternfly/patternfly/issues/4584 */ |
| 68 |
nestedHeaderColumnSpans?: number[]; |
| 69 |
/** Visible text to add alongside the hidden a11y caption for tables with selectable rows. */ |
| 70 |
selectableRowCaptionText?: string; |
| 71 |
/** Value to overwrite the randomly generated data-ouia-component-id.*/ |
| 72 |
ouiaId?: number | string; |
| 73 |
/** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */ |
| 74 |
ouiaSafe?: boolean; |
| 75 |
} |
| 76 |
interface TableContextProps { |
| 77 |
registerSelectableRow?: () => void; |
| 78 |
hasAnimations?: boolean; |
| 79 |
variant?: TableVariant | 'compact'; |
| 80 |
} |
| 81 |
export declare const TableContext: import("react").Context<TableContextProps>; |
| 82 |
export declare const Table: import("react").ForwardRefExoticComponent<Omit<TableProps, "ref"> & import("react").RefAttributes<HTMLTableElement>>; |
| 83 |
export {}; |
| 84 |
//# sourceMappingURL=Table.d.ts.map |