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:
@@ -160,7 +160,7 @@ function ReviewsPage() {
|
||||
</Button>
|
||||
}
|
||||
>
|
||||
<ul className="space-y-1 text-2xs">
|
||||
<ul className="space-y-1 text-cell">
|
||||
{bulkResult.approved.length > 0 && (
|
||||
<li>
|
||||
{t('reviews.bulk.approvedCount', { count: bulkResult.approved.length })}
|
||||
@@ -196,7 +196,7 @@ function ReviewsPage() {
|
||||
{queue.data && queue.data.totalElements > 0 && (
|
||||
<Panel>
|
||||
<div className="flex items-center justify-between mb-3 gap-3">
|
||||
<p className="text-2xs text-mute">
|
||||
<p className="text-cell text-mute">
|
||||
{t('reviews.queueTotal', { count: queue.data.totalElements })}
|
||||
{anySelected ? (
|
||||
<span className="ml-2 text-accent font-medium">
|
||||
@@ -264,17 +264,17 @@ function ReviewsPage() {
|
||||
<Link
|
||||
to="/dictionaries/$name"
|
||||
params={{ name: d.dictionaryId }}
|
||||
className="text-accent hover:underline font-mono text-2xs"
|
||||
className="text-mono text-accent hover:underline"
|
||||
>
|
||||
{d.dictionaryId.slice(0, 8)}…
|
||||
</Link>
|
||||
</TableCell>
|
||||
<TableCell className="font-mono text-2xs">{d.businessKey}</TableCell>
|
||||
<TableCell className="text-mono">{d.businessKey}</TableCell>
|
||||
<TableCell>
|
||||
<Badge variant={operationVariant(d.operation)}>{d.operation}</Badge>
|
||||
</TableCell>
|
||||
<TableCell className="font-mono text-2xs">{d.makerId}</TableCell>
|
||||
<TableCell className="text-2xs text-ink-2">
|
||||
<TableCell className="text-mono">{d.makerId}</TableCell>
|
||||
<TableCell className="text-cell text-ink-2">
|
||||
{new Date(d.submittedAt).toLocaleString()}
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
@@ -304,7 +304,7 @@ function ReviewsPage() {
|
||||
title={t('reviews.bulk.rejectModalTitle', { count: selection.size })}
|
||||
>
|
||||
<div className="space-y-3">
|
||||
<p className="text-2xs text-ink-2">
|
||||
<p className="text-cell text-ink-2">
|
||||
{t('reviews.bulk.rejectModalDescription')}
|
||||
</p>
|
||||
<TextArea
|
||||
@@ -400,7 +400,7 @@ function ReviewDrawer({ draftId, onClose }: DrawerProps) {
|
||||
|
||||
{draft && (
|
||||
<>
|
||||
<div className="flex flex-wrap items-center gap-2 text-2xs">
|
||||
<div className="flex flex-wrap items-center gap-2 text-cell">
|
||||
<Badge variant={operationVariant(draft.operation)}>{draft.operation}</Badge>
|
||||
<span className="font-mono">{draft.businessKey}</span>
|
||||
<span className="text-mute">
|
||||
@@ -413,7 +413,7 @@ function ReviewDrawer({ draftId, onClose }: DrawerProps) {
|
||||
</div>
|
||||
|
||||
{draft.makerComment && (
|
||||
<div className="px-3 py-2 rounded-sm border border-line bg-line/30 text-2xs">
|
||||
<div className="px-3 py-2 rounded-sm border border-line bg-line/30 text-cell">
|
||||
<span className="text-mute uppercase tracking-[0.10em] font-display">
|
||||
{t('reviews.drawer.makerComment')}:
|
||||
</span>{' '}
|
||||
@@ -428,12 +428,12 @@ function ReviewDrawer({ draftId, onClose }: DrawerProps) {
|
||||
</p>
|
||||
{liveQ.isLoading && <LoadingBlock size="sm" label={t('loading')} />}
|
||||
{liveQ.data === null && (
|
||||
<p className="text-2xs text-mute italic">
|
||||
<p className="text-cell text-mute italic">
|
||||
{t('reviews.drawer.noLive')}
|
||||
</p>
|
||||
)}
|
||||
{liveQ.data && (
|
||||
<pre className="bg-line/30 rounded p-2 text-2xs font-mono overflow-x-auto whitespace-pre-wrap">
|
||||
<pre className="text-mono bg-line/30 rounded p-2 overflow-x-auto whitespace-pre-wrap">
|
||||
{JSON.stringify(liveQ.data.data, null, 2)}
|
||||
</pre>
|
||||
)}
|
||||
@@ -443,11 +443,11 @@ function ReviewDrawer({ draftId, onClose }: DrawerProps) {
|
||||
{t('reviews.drawer.proposed')}
|
||||
</p>
|
||||
{draft.operation === 'CLOSE' ? (
|
||||
<p className="text-2xs text-aurora italic">
|
||||
<p className="text-cell text-aurora italic">
|
||||
{t('reviews.drawer.closeNote')}
|
||||
</p>
|
||||
) : (
|
||||
<pre className="bg-accent/4 rounded p-2 text-2xs font-mono overflow-x-auto whitespace-pre-wrap">
|
||||
<pre className="text-mono bg-accent/4 rounded p-2 overflow-x-auto whitespace-pre-wrap">
|
||||
{JSON.stringify(draft.data, null, 2)}
|
||||
</pre>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user