Appearance
Design System — MyHoreca Pay
Modern fintech operations workspace для бухгалтера, оператора импорта, matching, allocation, posting и reconciliation.
Методологический референс: MyHoreca POS docs/ui (адаптирован под desktop accounting, не под restaurant POS).
Product principles
- Ясность выше декоративности.
- Предотвращение ошибок выше визуальной эффектности.
- Предсказуемость выше оригинальности.
- Скорость работы выше количества функций на экране.
- Правила Шнейдермана обязательны.
Визуальная иерархия: объект → состояние → важные данные → действие → результат.
Visual identity
- Светлая тема (основная); tokens допускают dark theme позже.
- Canvas: нейтральный slate (
semanticColors.canvas). - Sidebar: navy/slate без декоративного gradient.
- Accent: blue.
- Success / warning / danger / info — только семантически.
- Тени: только overlays / raised surfaces (
shadows.surface|floating|dialog). - Скругления:
control/panel/dialog/pill. - Плотность data-heavy:
compactпо умолчанию.
Tokens
Путь: frontend/src/shared/ui/tokens/
| Файл | Содержимое |
|---|---|
colors.ts | Semantic color roles |
spacing.ts | 4–40 scale |
typography.ts | Roles + fontWeights 400/500/600/700 |
radius.ts | control / panel / dialog / pill |
shadows.ts | none / surface / floating / dialog |
density.ts | compact / comfortable |
layout.ts | shell / page metrics |
zIndex.ts | stacking |
statusColorMap.ts | StatusTone → Mantine color |
Theme: frontend/src/shared/ui/theme/appTheme.ts.
Component hierarchy
text
@/shared/ui
theme/ + tokens/
icons/ — Tabler registry only
layout/ — AppShell, Sidebar, TopBar
components/ — Button, forms, table, feedback, MoneyAmount…
domain/ — status resolvers + domain badges
index.ts — barrel onlyWrappers оправданы, если фиксируют variants, semantics, a11y или financial contract.
Buttons
Variants: primary | secondary | subtle | ghost | danger.
- Одно primary на контекст.
- Financial actions — с текстовой подписью.
- Danger отделён от primary.
- Loading не меняет ширину (Mantine
loading).
Forms
Input, Select (+ facade SearchableSelect, ToggleField до полной миграции).
Правила: видимый label, единый error placement, единая высота controls.
Tables
Canonical: AppDataTable (alias DataTable).
Поддержка: density, sticky actions column, empty/loading/error, optional row click + keyboard, truncation via TableCellText, fillHeight for workspace layout.
Typography: header Text size="xs" uppercase; body fz="sm"; money via MoneyAmount (size="sm", tabular); status via StatusBadge (prefer size="xs" in dense tables).
Tree catalogs: ReferenceTreeTable — same token sizes (--mantine-font-size-xs/sm), shared Button for expand/collapse.
Text left / money & numbers right.
Filters
FilterBar, FilterChipGroup, ClearFiltersAction.
Search предсказуем; clear единый; toolbar actions отделены от filters.
Statuses
Резолверы в domain/statusResolvers.ts — страница не выбирает цвет по enum вручную.
Domain badges: PaymentStatusBadge, PostingStatusBadge, AllocationStatusBadge, ReconciliationStatusBadge, ImportStatusBadge, RecognitionStatusBadge, плюс существующие CounterpartyMatchStatusBadge, SyrveDocumentTypeBadge, ConfidenceIndicator.
Status = label + tone (+ icon).
Feedback
LoadingState, ErrorState (что / к чему / retry), EmptyState, NoPermissionState, InlineAlert.
Не full-page loader, если данные уже читаемы.
Page layout
text
PageShell (layout: scroll | workspace)
PageHeader
optional FilterBar / status strip
PageSection / Data workspace
optional sticky actionsScroll contract (mandatory)
- Document (
html/body) never scrolls. AppShell.Maindoes not wrap the whole page in a global scrollbar.PageShell layout="scroll"(default): the main work area scrolls.PageShell layout="workspace": chrome (header/tabs) stays fixed; only nested tables/panels scroll (AppDataTable fillHeight, treefillHeight, etc.).
Desktop data pages with side-by-side panels (e.g. Syrve references) use workspace + CSS grid that stacks below ~992px.
Financial actions
Показывать объект, сумму, валюту, состояние, ожидаемый результат, warnings, primary action, итог.
Risky → ConfirmDialog с business summary.
Recognition workspace
Сохранить 55/45 desktop split, independent scroll, confidence, sticky confirm. Унифицировать toolbar/icon buttons через shared UI (миграция in progress).
Accessibility
Visible focus, labels, tooltip+aria-label для icon-only, status не только цветом, keyboard для row click, modal focus.
Responsive
Desktop 1280–1920 primary. Mobile: filters stack/drawer, tables horizontal scroll, recognition tabs preserved.
Prohibited
Glassmorphism, decorative gradients, emoji icons, page-local button systems, raw Mantine/Tabler в pages, card вокруг каждого блока, decorative KPI без действия.
Adding a component
- Есть ли уже с той же ответственностью?
- Можно ли расширить canonical?
- Это system rule или локальный exception?
- Обновить
codegraph/manifest.yamlи docs при structural change.