@use "../core/_index.scss" as *;
@use "../core/functions/index.import.scss" as *;

// Table

/// The width of the table border.
/// @group table
$kendo-table-border-width: 1px !default;
/// The width of vertical border of table cells.
/// @group table
$kendo-table-cell-vertical-border-width: 1px !default;
/// The width of horizontal border of table cells.
/// @group table
$kendo-table-cell-horizontal-border-width: 0px !default;

/// The font size of the table if no size is specified.
/// @group table
$kendo-table-font-size: null !default;

/// The line-height of the table if no size is specified.
/// @group table
$kendo-table-line-height: null !default;

/// The horizontal padding of the cells in the table if no size is specified.
/// @group table
$kendo-table-cell-padding-x: null !default;

/// The vertical padding of the cells in the table if no size is specified.
/// @group table
$kendo-table-cell-padding-y: null !default;

$kendo-table-sm-cell-padding-x: k-spacing(2) !default;
$kendo-table-sm-cell-padding-y: k-spacing(1) !default;

$kendo-table-md-cell-padding-x: k-spacing(2) !default;
$kendo-table-md-cell-padding-y: k-spacing(2) !default;

$kendo-table-lg-cell-padding-x: k-spacing(2) !default;
$kendo-table-lg-cell-padding-y: k-spacing(2.5) !default;

/// The sizes of the table.
/// @group table
$kendo-table-sizes: (
    sm: (
        font-size: var( --kendo-font-size, inherit ) ,
        line-height: var( --kendo-line-height, normal ),
        cell-padding-x: $kendo-table-sm-cell-padding-x,
        cell-padding-y: $kendo-table-sm-cell-padding-y
    ),
    md: (
        font-size: var( --kendo-font-size, inherit ) ,
        line-height: var( --kendo-line-height, normal ),
        cell-padding-x: $kendo-table-md-cell-padding-x,
        cell-padding-y: $kendo-table-md-cell-padding-y
    ),
    lg: (
        font-size: var( --kendo-font-size, inherit ) ,
        line-height: var( --kendo-line-height, normal ),
        cell-padding-x: $kendo-table-lg-cell-padding-x,
        cell-padding-y: $kendo-table-lg-cell-padding-y
    )
) !default;


/// Background color of tables.
/// @group table
$kendo-table-bg: $kendo-component-bg !default;
/// Text color of tables.
/// @group table
$kendo-table-text: $kendo-component-text !default;
/// Border color of tables.
/// @group table
$kendo-table-border: $kendo-component-border !default;


/// Background color of table headers.
/// @group table
$kendo-table-header-bg: $kendo-component-header-bg !default;
/// Text color of table headers.
/// @group table
$kendo-table-header-text: $kendo-component-header-text !default;
/// Border color of table headers.
/// @group table
$kendo-table-header-border: $kendo-component-header-border !default;
/// Gradient of table headers.
/// @group table
$kendo-table-header-gradient: $kendo-component-header-gradient !default;


/// Background color of table footers.
/// @group table
$kendo-table-footer-bg: $kendo-table-header-bg !default;
/// Text color of table footers.
/// @group table
$kendo-table-footer-text: $kendo-table-header-text !default;
/// Border color of table footers.
/// @group table
$kendo-table-footer-border: $kendo-table-header-border !default;


/// Background color of group rows in table.
/// @group table
$kendo-table-group-row-bg: $kendo-table-header-bg !default;
/// Text color of group rows in table.
/// @group table
$kendo-table-group-row-text: $kendo-table-header-text !default;
/// Border color of group rows in table.
/// @group table
$kendo-table-group-row-border: $kendo-table-header-border !default;


/// Background color of alternating rows in table.
/// @group table
$kendo-table-alt-row-bg: if($kendo-enable-color-system, color-mix(in srgb, k-color( on-app-surface ) 5%, transparent), rgba( k-contrast-color( $kendo-table-bg ), .04 )) !default;
/// Text color of alternating rows in table.
/// @group table
$kendo-table-alt-row-text: null !default;
/// Border color of alternating rows in table.
/// @group table
$kendo-table-alt-row-border: null !default;


/// Background color of hovered rows in table.
/// @group table
$kendo-table-hover-bg: if($kendo-enable-color-system, color-mix(in srgb, k-color( on-app-surface ) 9%, transparent), rgba( k-contrast-color( $kendo-table-bg ), .08 )) !default;
/// Text color of hovered rows in table.
/// @group table
$kendo-table-hover-text: null !default;
/// Border color of hovered rows in table.
/// @group table
$kendo-table-hover-border: null !default;


/// Background color of focused rows in table.
/// @group table
$kendo-table-focus-bg: null !default;
/// Text color of focused rows in table.
/// @group table
$kendo-table-focus-text: null !default;
/// Border color of focused rows in table.
/// @group table
$kendo-table-focus-border: null !default;
/// Box shadow of focused rows in table.
/// @group table
$kendo-table-focus-shadow: inset 0 0 0 2px rgba( $kendo-color-black, .08) !default;


/// Background color of selected rows in table.
/// @group table
$kendo-table-selected-bg: if($kendo-enable-color-system, color-mix(in srgb, k-color( primary ) 25%, transparent), rgba( $kendo-selected-bg, .25 )) !default;
/// Text color of selected rows in table.
/// @group table
$kendo-table-selected-text: $kendo-table-text !default;
/// Border color of selected rows in table.
/// @group table
$kendo-table-selected-border: null !default;

/// The box shadow of the row spanned cells.
/// @group table
$kendo-table-cell-row-span-shadow: inset 0 0 0 1px $kendo-table-border !default;


@forward "@progress/kendo-theme-core/scss/components/table/_variables.scss" with (
    $kendo-table-border-width: $kendo-table-border-width,
    $kendo-table-cell-vertical-border-width: $kendo-table-cell-vertical-border-width,
    $kendo-table-cell-horizontal-border-width: $kendo-table-cell-horizontal-border-width,
    $kendo-table-font-size: $kendo-table-font-size,
    $kendo-table-line-height: $kendo-table-line-height,
    $kendo-table-cell-padding-x: $kendo-table-cell-padding-x,
    $kendo-table-cell-padding-y: $kendo-table-cell-padding-y,
    $kendo-table-sm-cell-padding-x: $kendo-table-sm-cell-padding-x,
    $kendo-table-sm-cell-padding-y: $kendo-table-sm-cell-padding-y,
    $kendo-table-md-cell-padding-x: $kendo-table-md-cell-padding-x,
    $kendo-table-md-cell-padding-y: $kendo-table-md-cell-padding-y,
    $kendo-table-lg-cell-padding-x: $kendo-table-lg-cell-padding-x,
    $kendo-table-lg-cell-padding-y: $kendo-table-lg-cell-padding-y,
    $kendo-table-sizes: $kendo-table-sizes,
    $kendo-table-bg: $kendo-table-bg,
    $kendo-table-text: $kendo-table-text,
    $kendo-table-border: $kendo-table-border,
    $kendo-table-header-bg: $kendo-table-header-bg,
    $kendo-table-header-text: $kendo-table-header-text,
    $kendo-table-header-border: $kendo-table-header-border,
    $kendo-table-header-gradient: $kendo-table-header-gradient,
    $kendo-table-footer-bg: $kendo-table-footer-bg,
    $kendo-table-footer-text: $kendo-table-footer-text,
    $kendo-table-footer-border: $kendo-table-footer-border,
    $kendo-table-group-row-bg: $kendo-table-group-row-bg,
    $kendo-table-group-row-text: $kendo-table-group-row-text,
    $kendo-table-group-row-border: $kendo-table-group-row-border,
    $kendo-table-alt-row-bg: $kendo-table-alt-row-bg,
    $kendo-table-alt-row-text: $kendo-table-alt-row-text,
    $kendo-table-alt-row-border: $kendo-table-alt-row-border,
    $kendo-table-hover-bg: $kendo-table-hover-bg,
    $kendo-table-hover-text: $kendo-table-hover-text,
    $kendo-table-hover-border: $kendo-table-hover-border,
    $kendo-table-focus-bg: $kendo-table-focus-bg,
    $kendo-table-focus-text: $kendo-table-focus-text,
    $kendo-table-focus-border: $kendo-table-focus-border,
    $kendo-table-focus-shadow: $kendo-table-focus-shadow,
    $kendo-table-selected-bg: $kendo-table-selected-bg,
    $kendo-table-selected-text: $kendo-table-selected-text,
    $kendo-table-selected-border: $kendo-table-selected-border,
    $kendo-table-cell-row-span-shadow: $kendo-table-cell-row-span-shadow
);
