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,10 +308,10 @@ export const DictionaryEditorDialog = ({ open, mode, onClose, onSuccess }: Props
|
||||
className="mt-0.5 size-4 accent-ultramarain"
|
||||
/>
|
||||
<span className="flex-1">
|
||||
<span className="block text-sm font-sans text-ink">
|
||||
<span className="block text-body font-sans text-ink">
|
||||
{t('schema.redisProjection.label')}
|
||||
</span>
|
||||
<span className="block text-2xs text-mute mt-0.5">
|
||||
<span className="block text-cell text-mute mt-0.5">
|
||||
{t('schema.redisProjection.hint')}
|
||||
</span>
|
||||
</span>
|
||||
@@ -328,10 +328,10 @@ export const DictionaryEditorDialog = ({ open, mode, onClose, onSuccess }: Props
|
||||
className="mt-0.5 size-4 accent-orbit"
|
||||
/>
|
||||
<span className="flex-1">
|
||||
<span className="block text-sm font-sans text-ink">
|
||||
<span className="block text-body font-sans text-ink">
|
||||
{t('schema.approvalRequired.label')}
|
||||
</span>
|
||||
<span className="block text-2xs text-mute mt-0.5">
|
||||
<span className="block text-cell text-mute mt-0.5">
|
||||
{t('schema.approvalRequired.hint')}
|
||||
</span>
|
||||
</span>
|
||||
@@ -351,7 +351,7 @@ export const DictionaryEditorDialog = ({ open, mode, onClose, onSuccess }: Props
|
||||
onChange={(e) => setApprovalMinRole(e.target.value)}
|
||||
placeholder="ordinis:internal"
|
||||
/>
|
||||
<p className="text-2xs text-mute mt-0.5">
|
||||
<p className="text-cell text-mute mt-0.5">
|
||||
{t('schema.approvalMinRole.hint')}
|
||||
</p>
|
||||
</div>
|
||||
@@ -364,7 +364,7 @@ export const DictionaryEditorDialog = ({ open, mode, onClose, onSuccess }: Props
|
||||
</div>
|
||||
|
||||
<div className={activeTab === 'preview' ? 'block' : 'hidden'}>
|
||||
<pre className="bg-line/30 rounded p-3 text-2xs font-mono overflow-x-auto whitespace-pre-wrap">
|
||||
<pre className="text-mono bg-line/30 rounded p-3 overflow-x-auto whitespace-pre-wrap">
|
||||
{JSON.stringify(schemaJson, null, 2)}
|
||||
</pre>
|
||||
</div>
|
||||
@@ -384,8 +384,8 @@ export const DictionaryEditorDialog = ({ open, mode, onClose, onSuccess }: Props
|
||||
{isEdit && breaking && (
|
||||
<Alert variant="error" title={t('schema.diff.blockedTitle')}>
|
||||
<div className="space-y-2">
|
||||
<p className="text-sm">{t('schema.diff.blockedBody')}</p>
|
||||
<ul className="list-disc pl-5 text-sm space-y-0.5">
|
||||
<p className="text-body">{t('schema.diff.blockedBody')}</p>
|
||||
<ul className="list-disc pl-5 text-body space-y-0.5">
|
||||
{changes
|
||||
.filter((c) => c.severity === 'breaking')
|
||||
.map((c, i) => (
|
||||
@@ -400,7 +400,7 @@ export const DictionaryEditorDialog = ({ open, mode, onClose, onSuccess }: Props
|
||||
|
||||
{isEdit && !breaking && changes.length > 0 && (
|
||||
<Alert variant="info" title={t('schema.diff.compatibleTitle')}>
|
||||
<ul className="list-disc pl-5 text-sm space-y-0.5">
|
||||
<ul className="list-disc pl-5 text-body space-y-0.5">
|
||||
{changes.map((c, i) => (
|
||||
<li key={i}>
|
||||
<span className="font-mono">{c.field}</span> — {c.reason}
|
||||
|
||||
Reference in New Issue
Block a user