// Use theme variables with namespace to avoid conflicts
@use '../../../../theme/styles/variables' as vars;
@use '../../../../theme/styles/mixins' as mix;
// ------
// Hikari Table Component - FUI Styling
// ------
// ------
// Table Wrapper
// ------
.hk-table-wrapper {
display: inline-block;
width: fit-content;
max-width: 100%;
overflow-x: auto;
border-radius: vars.$hikari-radius-fui-md;
}
// ------
// Base Table Element
// ------
.hk-table {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
table-layout: auto;
font-family: vars.$hikari-font-family-sans;
font-size: vars.$hikari-font-size-sm;
color: var(--hi-color-text-primary);
background: var(--hi-surface);
border: 1px solid var(--hi-color-border);
border-radius: vars.$hikari-radius-fui-md;
}
// ------
// Size Variants
// ------
.hk-table-sm {
.hk-table-header-cell,
.hk-table-cell {
padding: 0.5rem 0.75rem;
font-size: 0.8125rem;
}
}
.hk-table-md {
.hk-table-header-cell,
.hk-table-cell {
padding: 0.625rem 0.875rem;
font-size: 0.875rem;
}
}
.hk-table-lg {
.hk-table-header-cell,
.hk-table-cell {
padding: 0.875rem 1rem;
font-size: 0.9375rem;
}
}
// ------
// Table Bordered
// ------
.hk-table-bordered {
.hk-table-header-cell,
.hk-table-cell {
border: 1px solid var(--hi-color-border);
}
}
// ------
// Table Striped
// ------
.hk-table-striped {
.hk-table-row:nth-child(even) {
background: var(--hi-color-gray-40);
}
}
// ------
// Table Hover
// ------
.hk-table-hover {
.hk-table-row:hover {
background: var(--hi-color-surface-secondary);
}
}
// ------
// Table Header Row
// ------
.hk-table-header-row {
display: table-row;
}
// ------
// Table Header Cell
// ------
.hk-table-header-cell {
padding: 0.625rem 0.875rem;
text-align: left;
font-weight: 600;
font-size: vars.$hikari-font-size-sm;
color: var(--hi-color-text-primary);
background: var(--hi-color-surface-secondary);
border-bottom: 2px solid var(--hi-color-border);
white-space: nowrap;
}
// ------
// Table Body
// ------
.hk-table-body {
display: table-row-group;
}
// ------
// Table Row
// ------
.hk-table-row {
display: table-row;
transition: background 0.15s ease;
}
// ------
// Table Cell
// ------
.hk-table-cell {
padding: 0.625rem 0.875rem;
text-align: left;
color: var(--hi-color-text-primary);
border-bottom: 1px solid var(--hi-color-border);
vertical-align: top;
line-height: 1.5;
}
// ------
// Text Alignment
// ------
.hk-text-left {
text-align: left;
}
.hk-text-center {
text-align: center;
}
.hk-text-right {
text-align: right;
}
// ------
// Empty State
// ------
.hk-table-empty {
padding: 2rem;
text-align: center;
color: var(--hi-color-text-secondary);
}
.hk-table-empty-content {
font-size: vars.$hikari-font-size-sm;
}
// ------
// Sortable
// ------
.hk-table-sortable {
cursor: pointer;
user-select: none;
&:hover {
background: var(--hi-color-surface);
}
}
.hk-table-sort-icon {
margin-left: 0.5rem;
font-size: 0.75rem;
color: var(--hi-color-text-secondary);
}
.hk-table-sort-active {
color: var(--hi-color-primary);
background: var(--hi-color-surface);
}