// Use theme variables with namespace to avoid conflicts
@use '../../../../theme/styles/variables.scss' as vars;
@use '../../../../theme/styles/mixins.scss' as mix;
// ============================================
// Hikari Table Component - FUI Styling
// ============================================
// ============================================
// Table Wrapper
// ============================================
.hi-table-wrapper {
display: inline-block;
width: fit-content;
max-width: 100%;
overflow-x: auto;
border-radius: vars.$hikari-radius-fui-md;
}
// ============================================
// Base Table Element
// ============================================
.hi-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
// ============================================
.hi-table-sm {
.hi-table-header-cell,
.hi-table-cell {
padding: 0.5rem 0.75rem;
font-size: 0.8125rem;
}
}
.hi-table-md {
.hi-table-header-cell,
.hi-table-cell {
padding: 0.625rem 0.875rem;
font-size: 0.875rem;
}
}
.hi-table-lg {
.hi-table-header-cell,
.hi-table-cell {
padding: 0.875rem 1rem;
font-size: 0.9375rem;
}
}
// ============================================
// Table Bordered
// ============================================
.hi-table-bordered {
.hi-table-header-cell,
.hi-table-cell {
border: 1px solid var(--hi-color-border);
}
}
// ============================================
// Table Striped
// ============================================
.hi-table-striped {
.hi-table-row:nth-child(even) {
background: var(--hi-color-gray-40);
}
}
// ============================================
// Table Hover
// ============================================
.hi-table-hover {
.hi-table-row:hover {
background: var(--hi-color-surface-secondary);
}
}
// ============================================
// Table Header Row
// ============================================
.hi-table-header-row {
display: table-row;
}
// ============================================
// Table Header Cell
// ============================================
.hi-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
// ============================================
.hi-table-body {
display: table-row-group;
}
// ============================================
// Table Row
// ============================================
.hi-table-row {
display: table-row;
transition: background 0.15s ease;
}
// ============================================
// Table Cell
// ============================================
.hi-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
// ============================================
.hi-text-left {
text-align: left;
}
.hi-text-center {
text-align: center;
}
.hi-text-right {
text-align: right;
}
// ============================================
// Empty State
// ============================================
.hi-table-empty {
padding: 2rem;
text-align: center;
color: var(--hi-color-text-secondary);
}
.hi-table-empty-content {
font-size: vars.$hikari-font-size-sm;
}
// ============================================
// Sortable
// ============================================
.hi-table-sortable {
cursor: pointer;
user-select: none;
&:hover {
background: var(--hi-color-surface);
}
}
.hi-table-sort-icon {
margin-left: 0.5rem;
font-size: 0.75rem;
color: var(--hi-color-text-secondary);
}
.hi-table-sort-active {
color: var(--hi-color-primary);
background: var(--hi-color-surface);
}