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:
parent
818a41e2a1
commit
feb14ffcfd
|
|
@ -116,7 +116,7 @@ export function DataTable<T>({
|
||||||
if (renderCard && narrow) {
|
if (renderCard && narrow) {
|
||||||
return (
|
return (
|
||||||
<div ref={ref}>
|
<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 &&
|
{skeleton &&
|
||||||
Array.from({ length: 5 }, (_, i) => (
|
Array.from({ length: 5 }, (_, i) => (
|
||||||
<li key={i} className="space-y-2 px-4 py-3">
|
<li key={i} className="space-y-2 px-4 py-3">
|
||||||
|
|
@ -149,8 +149,7 @@ export function DataTable<T>({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={ref}>
|
<div ref={ref}>
|
||||||
{/* Текст строк — text-table (15px); мелкие подписи ячеек (text-xs) — на шаг крупнее, text-ui. */}
|
<table className={cn("w-full text-sm", className)}>
|
||||||
<table className={cn("w-full text-table [&_td.text-xs]:text-ui [&_td_.text-xs]:text-ui", className)}>
|
|
||||||
{/* Липкая шапка: фон непрозрачный, линия — тенью ячеек (border у thead при прокрутке остаётся на месте). */}
|
{/* Липкая шапка: фон непрозрачный, линия — тенью ячеек (border у thead при прокрутке остаётся на месте). */}
|
||||||
<thead className="sticky top-0 z-10">
|
<thead className="sticky top-0 z-10">
|
||||||
<tr className="text-left text-ui text-muted-foreground">
|
<tr className="text-left text-ui text-muted-foreground">
|
||||||
|
|
|
||||||
|
|
@ -124,10 +124,7 @@
|
||||||
* Мелкие размеры между шагами Tailwind — вместо text-[Npx] в разметке:
|
* Мелкие размеры между шагами Tailwind — вместо text-[Npx] в разметке:
|
||||||
* text-ui (13px) — мета-строки под заголовком (телефон, карта, врач), второстепенные подписи;
|
* text-ui (13px) — мета-строки под заголовком (телефон, карта, врач), второстепенные подписи;
|
||||||
* text-2xs (11px) — счётчики, подписи осей, бейджи; text-3xs (10px) — метки в плотных сетках.
|
* 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: 0.8125rem;
|
||||||
--text-ui--line-height: 1.125rem;
|
--text-ui--line-height: 1.125rem;
|
||||||
--text-2xs: 0.6875rem;
|
--text-2xs: 0.6875rem;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue