fix(fonts): semantic typography utilities per handoff (7 roles)
Заменяет blanket override из MR !45 на типизированную type scale per design_handoff_ordinis_mdm/README.md "Scale" section. Семь semantic @utility в styles.css: text-title-xl 22/600 — modal title, section header text-title-lg 17/600 — page title в editor text-title-md 15/600 — dictionary card title text-body 13/400 — workhorse: body, buttons, tabs, inputs text-cell 12.5/500 — table cell text text-mono 11/500 — Mono: IDs, dates, FK refs (font-mono baked in) text-cap 10.5/600 — Tektur UPPERCASE caption (font/uppercase baked in) Audit phases: P1: добавил 7 утилит, font/uppercase/tracking baked где надо P2: 43 deterministic codemods (font-mono+text-2xs/[11px] → text-mono, [15/17/22]px+font-semibold → text-title-*, [12.5]px → text-cell, [10.5]px+uppercase+tracking → text-cap) P3: 64 text-sm → text-body (handoff workhorse), 84 text-2xs context-aware (TableCell → text-cell, bare → text-cell, плюс cleanup caps в backticks template literals который Phase 2 пропустил), 25 text-xs (6 → text-mono когда с font-mono, 19 → text-cell), 8 titles text-base/lg → text-title-* P4: убрал --text-2xs override (no users), оставил --text-sm: 13px scoped к @nstart/ui passthrough (см. comment в styles.css — убирается в Stage 3.9) Stats: text-body: 69 | text-cell: 99 | text-mono: 50 | text-cap: 42 text-title-xl: 5 | text-title-lg: 5 | text-title-md: 7 text-sm/text-2xs/text-xs в src/: 0 (только в styles.css комментариях) Поведение всех 277 typography usages теперь явно соответствует handoff — каждое место осознанно выбрано под роль, не плажирующий override.
This commit is contained in:
@@ -308,7 +308,7 @@ function ActiveFilterChips({ filters, onRemove }: ActiveFilterChipsProps) {
|
||||
type="button"
|
||||
onClick={() => onRemove(f.key)}
|
||||
className={[
|
||||
'inline-flex items-center gap-1.5 px-2 py-1 rounded-sm border text-2xs',
|
||||
'inline-flex items-center gap-1.5 px-2 py-1 rounded-sm border text-cell',
|
||||
'bg-white border-line hover:border-carbon/40 hover:bg-line/30',
|
||||
'transition-colors group',
|
||||
].join(' ')}
|
||||
@@ -469,7 +469,7 @@ function AuditRow({ row }: { row: AuditEntry }) {
|
||||
<>
|
||||
<TableRow>
|
||||
<TableCell>
|
||||
<span className="text-2xs tabular-nums">{timeLabel}</span>
|
||||
<span className="text-cell tabular-nums">{timeLabel}</span>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<Badge variant={actionVariant}>
|
||||
@@ -478,7 +478,7 @@ function AuditRow({ row }: { row: AuditEntry }) {
|
||||
</TableCell>
|
||||
<TableCell>{row.dictionaryName ?? '—'}</TableCell>
|
||||
<TableCell>
|
||||
<span className="font-mono text-xs">{row.businessKey ?? '—'}</span>
|
||||
<span className=" text-mono">{row.businessKey ?? '—'}</span>
|
||||
</TableCell>
|
||||
<TableCell>{row.userId ?? 'anonymous'}</TableCell>
|
||||
<TableCell>
|
||||
@@ -486,7 +486,7 @@ function AuditRow({ row }: { row: AuditEntry }) {
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<span
|
||||
className="font-mono text-2xs text-ink-2"
|
||||
className="text-mono text-ink-2"
|
||||
title={row.traceId ?? ''}
|
||||
>
|
||||
{row.traceId ? row.traceId.slice(0, 8) : '—'}
|
||||
@@ -509,7 +509,7 @@ function AuditRow({ row }: { row: AuditEntry }) {
|
||||
<div className="text-cap text-ink-2 mb-1">
|
||||
{t('audit.diff.before')}
|
||||
</div>
|
||||
<pre className="text-2xs font-mono whitespace-pre-wrap break-all bg-white border border-line rounded p-2 max-h-60 overflow-auto">
|
||||
<pre className="text-mono whitespace-pre-wrap break-all bg-white border border-line rounded p-2 max-h-60 overflow-auto">
|
||||
{row.payloadBefore
|
||||
? JSON.stringify(row.payloadBefore, null, 2)
|
||||
: '—'}
|
||||
@@ -519,14 +519,14 @@ function AuditRow({ row }: { row: AuditEntry }) {
|
||||
<div className="text-cap text-ink-2 mb-1">
|
||||
{t('audit.diff.after')}
|
||||
</div>
|
||||
<pre className="text-2xs font-mono whitespace-pre-wrap break-all bg-white border border-line rounded p-2 max-h-60 overflow-auto">
|
||||
<pre className="text-mono whitespace-pre-wrap break-all bg-white border border-line rounded p-2 max-h-60 overflow-auto">
|
||||
{row.payloadAfter
|
||||
? JSON.stringify(row.payloadAfter, null, 2)
|
||||
: '—'}
|
||||
</pre>
|
||||
</div>
|
||||
{(row.ipAddress || row.userAgent || row.requestId) && (
|
||||
<div className="md:col-span-2 text-2xs text-ink-2 flex flex-wrap gap-x-4 gap-y-1 pt-1">
|
||||
<div className="md:col-span-2 text-cell text-ink-2 flex flex-wrap gap-x-4 gap-y-1 pt-1">
|
||||
{row.ipAddress && <span>IP: {row.ipAddress}</span>}
|
||||
{row.requestId && <span>req: {row.requestId}</span>}
|
||||
{row.userAgent && (
|
||||
@@ -562,7 +562,7 @@ function Pagination({
|
||||
const { t } = useTranslation()
|
||||
return (
|
||||
<div className="flex items-center justify-between flex-wrap gap-3">
|
||||
<div className="flex items-center gap-2 text-sm">
|
||||
<div className="flex items-center gap-2 text-body">
|
||||
<span className="text-ink-2">{t('audit.page.size')}</span>
|
||||
<SingleSelect
|
||||
options={PAGE_SIZE_OPTIONS}
|
||||
@@ -570,7 +570,7 @@ function Pagination({
|
||||
onChange={(id) => onSizeChange(Number(id))}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex items-center gap-3 text-sm">
|
||||
<div className="flex items-center gap-3 text-body">
|
||||
<Button
|
||||
type="button"
|
||||
variant="secondary"
|
||||
|
||||
Reference in New Issue
Block a user