/** * Options for DataTable visual representation * @public */ export interface DataTableVisualVariantProps { variant?: { /** * rowSeparation can be set to 'horizontalDividers' which will provide lines between rows or * can be set to 'zebraStripes' which will provide alternate row coloring. * @defaultValue 'horizontalDividers' */ rowSeparation?: 'none' | 'horizontalDividers' | 'zebraStripes'; /** * If true provides vertical lines between the columns. * @defaultValue false */ verticalDividers?: boolean; /** * If true provides a border for the table. * @defaultValue true */ contained?: boolean; /** * rowDensity adds spacing around the content inside the row * with minimal space for 'condensed', maximum spacing for 'comfortable' and * 'default' being medium spacing. * @defaultValue 'default' */ rowDensity?: 'default' | 'condensed' | 'comfortable'; /** * fontStyle, sets the font style for the entire data table. * This does not overwrite any fontStyle set at the lower level, like columns etc. * @defaultValue 'text' */ fontStyle?: 'text' | 'code'; /** * headers defines if the header rows of the table should be rendered or not. * @defaultValue 'default' */ headers?: 'default' | 'hidden'; /** * Determines the vertical alignment for all table cells. * If header and body cells should have a different vertical alignment, they can be configured separately. * @defaultValue 'top' */ verticalAlignment?: 'top' | 'center' | 'bottom' | { header: 'top' | 'center' | 'bottom'; body: 'top' | 'center' | 'bottom'; }; }; } /** * Extension interface to extend the tanstack table state with the visual variant state. * @internal */ export interface DataTableVisualVariantTableState { visualVariantConfig: Required['variant']>; } /** * Extension interface to extend the types from the tanstack table instance. * @internal */ export interface DataTableVisualVariantTableInstance { /** * Gets the visual variant configuration set for this table. */ getVisualVariantOptions: () => DataTableVisualVariantTableState['visualVariantConfig']; /** * Gets the vertical alignment of the table body from the visual config. */ getBodyVerticalAlignment: () => 'top' | 'center' | 'bottom'; /** * Gets the vertical alignment of the table header from the visual config. */ getHeaderVerticalAlignment: () => 'top' | 'center' | 'bottom'; }