DataTable: row text and cell captions back to 0.11.0 sizes

Rows are 14px again and small cell captions 12px; the text-table token
is gone. Only the header keeps 13px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ilya Mukhortov 2026-10-28 12:11:33 +10:00
parent 818a41e2a1
commit feb14ffcfd
2 changed files with 2 additions and 6 deletions

View File

@ -116,7 +116,7 @@ export function DataTable<T>({
if (renderCard && narrow) {
return (
<div ref={ref}>
<ul className={cn("divide-y divide-border/60 text-table [&_.text-xs]:text-ui", className)}>
<ul className={cn("divide-y divide-border/60 text-sm", className)}>
{skeleton &&
Array.from({ length: 5 }, (_, i) => (
<li key={i} className="space-y-2 px-4 py-3">
@ -149,8 +149,7 @@ export function DataTable<T>({
return (
<div ref={ref}>
{/* Текст строк — text-table (15px); мелкие подписи ячеек (text-xs) — на шаг крупнее, text-ui. */}
<table className={cn("w-full text-table [&_td.text-xs]:text-ui [&_td_.text-xs]:text-ui", className)}>
<table className={cn("w-full text-sm", className)}>
{/* Липкая шапка: фон непрозрачный, линия — тенью ячеек (border у thead при прокрутке остаётся на месте). */}
<thead className="sticky top-0 z-10">
<tr className="text-left text-ui text-muted-foreground">

View File

@ -124,10 +124,7 @@
* Мелкие размеры между шагами Tailwind — вместо text-[Npx] в разметке:
* text-ui (13px) — мета-строки под заголовком (телефон, карта, врач), второстепенные подписи;
* text-2xs (11px) — счётчики, подписи осей, бейджи; text-3xs (10px) — метки в плотных сетках.
* text-table (15px) — основной текст строк DataTable: таблицы читают подолгу, на шаг крупнее text-sm.
*/
--text-table: 0.9375rem;
--text-table--line-height: 1.375rem;
--text-ui: 0.8125rem;
--text-ui--line-height: 1.125rem;
--text-2xs: 0.6875rem;